diff --git a/litellm/proxy/_experimental/out/404.html b/litellm/proxy/_experimental/out/404.html
index a8ef84a338e..a8bd30680ab 100644
--- a/litellm/proxy/_experimental/out/404.html
+++ b/litellm/proxy/_experimental/out/404.html
@@ -1 +1 @@
-
404: This page could not be found.LiteLLM Dashboard404
This page could not be found.
\ No newline at end of file
+404: This page could not be found.LiteLLM Dashboard404
This page could not be found.
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/8YepvLrDdt6e_FwiLneCs/_buildManifest.js b/litellm/proxy/_experimental/out/_next/static/MkHZcSjEBwlJY7dIHtt6n/_buildManifest.js
similarity index 100%
rename from litellm/proxy/_experimental/out/_next/static/8YepvLrDdt6e_FwiLneCs/_buildManifest.js
rename to litellm/proxy/_experimental/out/_next/static/MkHZcSjEBwlJY7dIHtt6n/_buildManifest.js
diff --git a/litellm/proxy/_experimental/out/_next/static/8YepvLrDdt6e_FwiLneCs/_ssgManifest.js b/litellm/proxy/_experimental/out/_next/static/MkHZcSjEBwlJY7dIHtt6n/_ssgManifest.js
similarity index 100%
rename from litellm/proxy/_experimental/out/_next/static/8YepvLrDdt6e_FwiLneCs/_ssgManifest.js
rename to litellm/proxy/_experimental/out/_next/static/MkHZcSjEBwlJY7dIHtt6n/_ssgManifest.js
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1059-26bdac09bbb12a4b.js b/litellm/proxy/_experimental/out/_next/static/chunks/1059-26bdac09bbb12a4b.js
new file mode 100644
index 00000000000..cd4f5e4e326
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/1059-26bdac09bbb12a4b.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1059],{83669:function(t,e,r){r.d(e,{Z:function(){return c}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"},i=r(55015),c=o.forwardRef(function(t,e){return o.createElement(i.Z,(0,n.Z)({},t,{ref:e,icon:a}))})},62670:function(t,e,r){r.d(e,{Z:function(){return c}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm47.7-395.2l-25.4-5.9V348.6c38 5.2 61.5 29 65.5 58.2.5 4 3.9 6.9 7.9 6.9h44.9c4.7 0 8.4-4.1 8-8.8-6.1-62.3-57.4-102.3-125.9-109.2V263c0-4.4-3.6-8-8-8h-28.1c-4.4 0-8 3.6-8 8v33c-70.8 6.9-126.2 46-126.2 119 0 67.6 49.8 100.2 102.1 112.7l24.7 6.3v142.7c-44.2-5.9-69-29.5-74.1-61.3-.6-3.8-4-6.6-7.9-6.6H363c-4.7 0-8.4 4-8 8.7 4.5 55 46.2 105.6 135.2 112.1V761c0 4.4 3.6 8 8 8h28.4c4.4 0 8-3.6 8-8.1l-.2-31.7c78.3-6.9 134.3-48.8 134.3-124-.1-69.4-44.2-100.4-109-116.4zm-68.6-16.2c-5.6-1.6-10.3-3.1-15-5-33.8-12.2-49.5-31.9-49.5-57.3 0-36.3 27.5-57 64.5-61.7v124zM534.3 677V543.3c3.1.9 5.9 1.6 8.8 2.2 47.3 14.4 63.2 34.4 63.2 65.1 0 39.1-29.4 62.6-72 66.4z"}}]},name:"dollar",theme:"outlined"},i=r(55015),c=o.forwardRef(function(t,e){return o.createElement(i.Z,(0,n.Z)({},t,{ref:e,icon:a}))})},45246:function(t,e,r){r.d(e,{Z:function(){return c}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},i=r(55015),c=o.forwardRef(function(t,e){return o.createElement(i.Z,(0,n.Z)({},t,{ref:e,icon:a}))})},89245:function(t,e,r){r.d(e,{Z:function(){return c}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},i=r(55015),c=o.forwardRef(function(t,e){return o.createElement(i.Z,(0,n.Z)({},t,{ref:e,icon:a}))})},77565:function(t,e,r){r.d(e,{Z:function(){return c}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},i=r(55015),c=o.forwardRef(function(t,e){return o.createElement(i.Z,(0,n.Z)({},t,{ref:e,icon:a}))})},69993:function(t,e,r){r.d(e,{Z:function(){return c}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},i=r(55015),c=o.forwardRef(function(t,e){return o.createElement(i.Z,(0,n.Z)({},t,{ref:e,icon:a}))})},58630:function(t,e,r){r.d(e,{Z:function(){return c}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"},i=r(55015),c=o.forwardRef(function(t,e){return o.createElement(i.Z,(0,n.Z)({},t,{ref:e,icon:a}))})},47323:function(t,e,r){r.d(e,{Z:function(){return b}});var n=r(5853),o=r(2265),a=r(47187),i=r(7084),c=r(13241),l=r(1153),s=r(26898);let d={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},u={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},g=(t,e)=>{switch(t){case"simple":return{textColor:e?(0,l.bM)(e,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:e?(0,l.bM)(e,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,c.q)((0,l.bM)(e,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:e?(0,l.bM)(e,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,c.q)((0,l.bM)(e,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:e?(0,l.bM)(e,s.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:e?(0,c.q)((0,l.bM)(e,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:e?(0,l.bM)(e,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,c.q)((0,l.bM)(e,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:e?(0,l.bM)(e,s.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:e?(0,c.q)((0,l.bM)(e,s.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},p=(0,l.fn)("Icon"),b=o.forwardRef((t,e)=>{let{icon:r,variant:s="simple",tooltip:b,size:f=i.u8.SM,color:h,className:v}=t,y=(0,n._T)(t,["icon","variant","tooltip","size","color","className"]),w=g(s,h),{tooltipProps:x,getReferenceProps:k}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,l.lq)([e,x.refs.setReference]),className:(0,c.q)(p("root"),"inline-flex shrink-0 items-center justify-center",w.bgColor,w.textColor,w.borderColor,w.ringColor,m[s].rounded,m[s].border,m[s].shadow,m[s].ring,d[f].paddingX,d[f].paddingY,v)},k,y),o.createElement(a.Z,Object.assign({text:b},x)),o.createElement(r,{className:(0,c.q)(p("icon"),"shrink-0",u[f].height,u[f].width)}))});b.displayName="Icon"},67101:function(t,e,r){r.d(e,{Z:function(){return d}});var n=r(5853),o=r(13241),a=r(1153),i=r(2265),c=r(9496);let l=(0,a.fn)("Grid"),s=(t,e)=>t&&Object.keys(e).includes(String(t))?e[t]:"",d=i.forwardRef((t,e)=>{let{numItems:r=1,numItemsSm:a,numItemsMd:d,numItemsLg:u,children:m,className:g}=t,p=(0,n._T)(t,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),b=s(r,c._m),f=s(a,c.LH),h=s(d,c.l5),v=s(u,c.N4),y=(0,o.q)(b,f,h,v);return i.createElement("div",Object.assign({ref:e,className:(0,o.q)(l("root"),"grid",y,g)},p),m)});d.displayName="Grid"},9496:function(t,e,r){r.d(e,{LH:function(){return o},N4:function(){return i},PT:function(){return c},SP:function(){return l},VS:function(){return s},_m:function(){return n},_w:function(){return d},l5:function(){return a}});let n={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},o={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},a={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},i={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},c={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},l={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},s={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},d={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"}},96761:function(t,e,r){r.d(e,{Z:function(){return l}});var n=r(5853),o=r(26898),a=r(13241),i=r(1153),c=r(2265);let l=c.forwardRef((t,e)=>{let{color:r,children:l,className:s}=t,d=(0,n._T)(t,["color","children","className"]);return c.createElement("p",Object.assign({ref:e,className:(0,a.q)("font-medium text-tremor-title",r?(0,i.bM)(r,o.K.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",s)},d),l)});l.displayName="Title"},33866:function(t,e,r){r.d(e,{Z:function(){return I}});var n=r(2265),o=r(36760),a=r.n(o),i=r(66632),c=r(93350),l=r(19722),s=r(71744),d=r(93463),u=r(12918),m=r(18536),g=r(71140),p=r(99320);let b=new d.E4("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),f=new d.E4("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),h=new d.E4("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),v=new d.E4("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),y=new d.E4("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),w=new d.E4("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),x=t=>{let{componentCls:e,iconCls:r,antCls:n,badgeShadowSize:o,textFontSize:a,textFontSizeSM:i,statusSize:c,dotSize:l,textFontWeight:s,indicatorHeight:g,indicatorHeightSM:p,marginXS:x,calc:k}=t,O="".concat(n,"-scroll-number"),C=(0,m.Z)(t,(t,r)=>{let{darkColor:n}=r;return{["&".concat(e," ").concat(e,"-color-").concat(t)]:{background:n,["&:not(".concat(e,"-count)")]:{color:n},"a:hover &":{background:n}}}});return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.Wf)(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,["".concat(e,"-count")]:{display:"inline-flex",justifyContent:"center",zIndex:t.indicatorZIndex,minWidth:g,height:g,color:t.badgeTextColor,fontWeight:s,fontSize:a,lineHeight:(0,d.bf)(g),whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:k(g).div(2).equal(),boxShadow:"0 0 0 ".concat((0,d.bf)(o)," ").concat(t.badgeShadowColor),transition:"background ".concat(t.motionDurationMid),a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},["".concat(e,"-count-sm")]:{minWidth:p,height:p,fontSize:i,lineHeight:(0,d.bf)(p),borderRadius:k(p).div(2).equal()},["".concat(e,"-multiple-words")]:{padding:"0 ".concat((0,d.bf)(t.paddingXS)),bdi:{unicodeBidi:"plaintext"}},["".concat(e,"-dot")]:{zIndex:t.indicatorZIndex,width:l,minWidth:l,height:l,background:t.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat((0,d.bf)(o)," ").concat(t.badgeShadowColor)},["".concat(e,"-count, ").concat(e,"-dot, ").concat(O,"-custom-component")]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",["&".concat(r,"-spin")]:{animationName:w,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&".concat(e,"-status")]:{lineHeight:"inherit",verticalAlign:"baseline",["".concat(e,"-status-dot")]:{position:"relative",top:-1,display:"inline-block",width:c,height:c,verticalAlign:"middle",borderRadius:"50%"},["".concat(e,"-status-success")]:{backgroundColor:t.colorSuccess},["".concat(e,"-status-processing")]:{overflow:"visible",color:t.colorInfo,backgroundColor:t.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:b,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},["".concat(e,"-status-default")]:{backgroundColor:t.colorTextPlaceholder},["".concat(e,"-status-error")]:{backgroundColor:t.colorError},["".concat(e,"-status-warning")]:{backgroundColor:t.colorWarning},["".concat(e,"-status-text")]:{marginInlineStart:x,color:t.colorText,fontSize:t.fontSize}}}),C),{["".concat(e,"-zoom-appear, ").concat(e,"-zoom-enter")]:{animationName:f,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},["".concat(e,"-zoom-leave")]:{animationName:h,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},["&".concat(e,"-not-a-wrapper")]:{["".concat(e,"-zoom-appear, ").concat(e,"-zoom-enter")]:{animationName:v,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},["".concat(e,"-zoom-leave")]:{animationName:y,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},["&:not(".concat(e,"-status)")]:{verticalAlign:"middle"},["".concat(O,"-custom-component, ").concat(e,"-count")]:{transform:"none"},["".concat(O,"-custom-component, ").concat(O)]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[O]:{overflow:"hidden",transition:"all ".concat(t.motionDurationMid," ").concat(t.motionEaseOutBack),["".concat(O,"-only")]:{position:"relative",display:"inline-block",height:g,transition:"all ".concat(t.motionDurationSlow," ").concat(t.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",["> p".concat(O,"-only-unit")]:{height:g,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},["".concat(O,"-symbol")]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",["".concat(e,"-count, ").concat(e,"-dot, ").concat(O,"-custom-component")]:{transform:"translate(-50%, -50%)"}}})}},k=t=>{let{fontHeight:e,lineWidth:r,marginXS:n,colorBorderBg:o}=t,a=t.colorTextLightSolid,i=t.colorError,c=t.colorErrorHover;return(0,g.IX)(t,{badgeFontHeight:e,badgeShadowSize:r,badgeTextColor:a,badgeColor:i,badgeColorHover:c,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:n,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},O=t=>{let{fontSize:e,lineHeight:r,fontSizeSM:n,lineWidth:o}=t;return{indicatorZIndex:"auto",indicatorHeight:Math.round(e*r)-2*o,indicatorHeightSM:e,dotSize:n/2,textFontSize:n,textFontSizeSM:n,textFontWeight:"normal",statusSize:n/2}};var C=(0,p.I$)("Badge",t=>x(k(t)),O);let E=t=>{let{antCls:e,badgeFontHeight:r,marginXS:n,badgeRibbonOffset:o,calc:a}=t,i="".concat(e,"-ribbon"),c=(0,m.Z)(t,(t,e)=>{let{darkColor:r}=e;return{["&".concat(i,"-color-").concat(t)]:{background:r,color:r}}});return{["".concat(e,"-ribbon-wrapper")]:{position:"relative"},[i]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.Wf)(t)),{position:"absolute",top:n,padding:"0 ".concat((0,d.bf)(t.paddingXS)),color:t.colorPrimary,lineHeight:(0,d.bf)(r),whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,["".concat(i,"-text")]:{color:t.badgeTextColor},["".concat(i,"-corner")]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:"".concat((0,d.bf)(a(o).div(2).equal())," solid"),transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),c),{["&".concat(i,"-placement-end")]:{insetInlineEnd:a(o).mul(-1).equal(),borderEndEndRadius:0,["".concat(i,"-corner")]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},["&".concat(i,"-placement-start")]:{insetInlineStart:a(o).mul(-1).equal(),borderEndStartRadius:0,["".concat(i,"-corner")]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}};var S=(0,p.I$)(["Badge","Ribbon"],t=>E(k(t)),O);let N=t=>{let e;let{prefixCls:r,value:o,current:i,offset:c=0}=t;return c&&(e={position:"absolute",top:"".concat(c,"00%"),left:0}),n.createElement("span",{style:e,className:a()("".concat(r,"-only-unit"),{current:i})},o)};var j=t=>{let e,r;let{prefixCls:o,count:a,value:i}=t,c=Number(i),l=Math.abs(a),[s,d]=n.useState(c),[u,m]=n.useState(l),g=()=>{d(c),m(l)};if(n.useEffect(()=>{let t=setTimeout(g,1e3);return()=>clearTimeout(t)},[c]),s===c||Number.isNaN(c)||Number.isNaN(s))e=[n.createElement(N,Object.assign({},t,{key:c,current:!0}))],r={transition:"none"};else{e=[];let o=c+10,a=[];for(let t=c;t<=o;t+=1)a.push(t);let i=ut%10===s);e=(i<0?a.slice(0,d+1):a.slice(d)).map((e,r)=>n.createElement(N,Object.assign({},t,{key:e,value:e%10,offset:i<0?r-d:r,current:r===d}))),r={transform:"translateY(".concat(-function(t,e,r){let n=t,o=0;for(;(n+10)%10!==e;)n+=r,o+=r;return o}(s,c,i),"00%)")}}return n.createElement("span",{className:"".concat(o,"-only"),style:r,onTransitionEnd:g},e)},M=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(t);oe.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r};let z=n.forwardRef((t,e)=>{let{prefixCls:r,count:o,className:i,motionClassName:c,style:d,title:u,show:m,component:g="sup",children:p}=t,b=M(t,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:f}=n.useContext(s.E_),h=f("scroll-number",r),v=Object.assign(Object.assign({},b),{"data-show":m,style:d,className:a()(h,i,c),title:u}),y=o;if(o&&Number(o)%1==0){let t=String(o).split("");y=n.createElement("bdi",null,t.map((e,r)=>n.createElement(j,{prefixCls:h,count:Number(o),value:e,key:t.length-r})))}return((null==d?void 0:d.borderColor)&&(v.style=Object.assign(Object.assign({},d),{boxShadow:"0 0 0 1px ".concat(d.borderColor," inset")})),p)?(0,l.Tm)(p,t=>({className:a()("".concat(h,"-custom-component"),null==t?void 0:t.className,c)})):n.createElement(g,Object.assign({},v,{ref:e}),y)});var Z=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(t);oe.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r};let R=n.forwardRef((t,e)=>{var r,o,d,u,m;let{prefixCls:g,scrollNumberPrefixCls:p,children:b,status:f,text:h,color:v,count:y=null,overflowCount:w=99,dot:x=!1,size:k="default",title:O,offset:E,style:S,className:N,rootClassName:j,classNames:M,styles:R,showZero:I=!1}=t,L=Z(t,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:B,direction:T,badge:P}=n.useContext(s.E_),W=B("badge",g),[A,q,H]=C(W),G=y>w?"".concat(w,"+"):y,D="0"===G||0===G||"0"===h||0===h,K=null===y||D&&!I,V=(null!=f||null!=v)&&K,F=null!=f||!D,_=x&&!D,X=_?"":G,Y=(0,n.useMemo)(()=>((null==X||""===X)&&(null==h||""===h)||D&&!I)&&!_,[X,D,I,_,h]),$=(0,n.useRef)(y);Y||($.current=y);let U=$.current,J=(0,n.useRef)(X);Y||(J.current=X);let Q=J.current,tt=(0,n.useRef)(_);Y||(tt.current=_);let te=(0,n.useMemo)(()=>{if(!E)return Object.assign(Object.assign({},null==P?void 0:P.style),S);let t={marginTop:E[1]};return"rtl"===T?t.left=Number.parseInt(E[0],10):t.right=-Number.parseInt(E[0],10),Object.assign(Object.assign(Object.assign({},t),null==P?void 0:P.style),S)},[T,E,S,null==P?void 0:P.style]),tr=null!=O?O:"string"==typeof U||"number"==typeof U?U:void 0,tn=!Y&&(0===h?I:!!h&&!0!==h),to=tn?n.createElement("span",{className:"".concat(W,"-status-text")},h):null,ta=U&&"object"==typeof U?(0,l.Tm)(U,t=>({style:Object.assign(Object.assign({},te),t.style)})):void 0,ti=(0,c.o2)(v,!1),tc=a()(null==M?void 0:M.indicator,null===(r=null==P?void 0:P.classNames)||void 0===r?void 0:r.indicator,{["".concat(W,"-status-dot")]:V,["".concat(W,"-status-").concat(f)]:!!f,["".concat(W,"-color-").concat(v)]:ti}),tl={};v&&!ti&&(tl.color=v,tl.background=v);let ts=a()(W,{["".concat(W,"-status")]:V,["".concat(W,"-not-a-wrapper")]:!b,["".concat(W,"-rtl")]:"rtl"===T},N,j,null==P?void 0:P.className,null===(o=null==P?void 0:P.classNames)||void 0===o?void 0:o.root,null==M?void 0:M.root,q,H);if(!b&&V&&(h||F||!K)){let t=te.color;return A(n.createElement("span",Object.assign({},L,{className:ts,style:Object.assign(Object.assign(Object.assign({},null==R?void 0:R.root),null===(d=null==P?void 0:P.styles)||void 0===d?void 0:d.root),te)}),n.createElement("span",{className:tc,style:Object.assign(Object.assign(Object.assign({},null==R?void 0:R.indicator),null===(u=null==P?void 0:P.styles)||void 0===u?void 0:u.indicator),tl)}),tn&&n.createElement("span",{style:{color:t},className:"".concat(W,"-status-text")},h)))}return A(n.createElement("span",Object.assign({ref:e},L,{className:ts,style:Object.assign(Object.assign({},null===(m=null==P?void 0:P.styles)||void 0===m?void 0:m.root),null==R?void 0:R.root)}),b,n.createElement(i.ZP,{visible:!Y,motionName:"".concat(W,"-zoom"),motionAppear:!1,motionDeadline:1e3},t=>{var e,r;let{className:o}=t,i=B("scroll-number",p),c=tt.current,l=a()(null==M?void 0:M.indicator,null===(e=null==P?void 0:P.classNames)||void 0===e?void 0:e.indicator,{["".concat(W,"-dot")]:c,["".concat(W,"-count")]:!c,["".concat(W,"-count-sm")]:"small"===k,["".concat(W,"-multiple-words")]:!c&&Q&&Q.toString().length>1,["".concat(W,"-status-").concat(f)]:!!f,["".concat(W,"-color-").concat(v)]:ti}),s=Object.assign(Object.assign(Object.assign({},null==R?void 0:R.indicator),null===(r=null==P?void 0:P.styles)||void 0===r?void 0:r.indicator),te);return v&&!ti&&((s=s||{}).background=v),n.createElement(z,{prefixCls:i,show:!Y,motionClassName:o,className:l,count:Q,title:tr,style:s,key:"scrollNumber"},ta)}),to))});R.Ribbon=t=>{let{className:e,prefixCls:r,style:o,color:i,children:l,text:d,placement:u="end",rootClassName:m}=t,{getPrefixCls:g,direction:p}=n.useContext(s.E_),b=g("ribbon",r),f="".concat(b,"-wrapper"),[h,v,y]=S(b,f),w=(0,c.o2)(i,!1),x=a()(b,"".concat(b,"-placement-").concat(u),{["".concat(b,"-rtl")]:"rtl"===p,["".concat(b,"-color-").concat(i)]:w},e),k={},O={};return i&&!w&&(k.background=i,O.color=i),h(n.createElement("div",{className:a()(f,m,v,y)},l,n.createElement("div",{className:a()(x,v),style:Object.assign(Object.assign({},k),o)},n.createElement("span",{className:"".concat(b,"-text")},d),n.createElement("div",{className:"".concat(b,"-corner"),style:O}))))};var I=R},58760:function(t,e,r){r.d(e,{Z:function(){return S}});var n=r(2265),o=r(36760),a=r.n(o),i=r(45287);function c(t){return["small","middle","large"].includes(t)}function l(t){return!!t&&"number"==typeof t&&!Number.isNaN(t)}var s=r(71744),d=r(77685),u=r(17691),m=r(99320);let g=t=>{let{componentCls:e,borderRadius:r,paddingSM:n,colorBorder:o,paddingXS:a,fontSizeLG:i,fontSizeSM:c,borderRadiusLG:l,borderRadiusSM:s,colorBgContainerDisabled:d,lineWidth:m}=t;return{[e]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:n,margin:0,background:d,borderWidth:m,borderStyle:"solid",borderColor:o,borderRadius:r,"&-large":{fontSize:i,borderRadius:l},"&-small":{paddingInline:a,borderRadius:s,fontSize:c},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,u.c)(t,{focus:!1})]}};var p=(0,m.I$)(["Space","Addon"],t=>[g(t)]),b=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(t);oe.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r};let f=n.forwardRef((t,e)=>{let{className:r,children:o,style:i,prefixCls:c}=t,l=b(t,["className","children","style","prefixCls"]),{getPrefixCls:u,direction:m}=n.useContext(s.E_),g=u("space-addon",c),[f,h,v]=p(g),{compactItemClassnames:y,compactSize:w}=(0,d.ri)(g,m),x=a()(g,h,y,v,{["".concat(g,"-").concat(w)]:w},r);return f(n.createElement("div",Object.assign({ref:e,className:x,style:i},l),o))}),h=n.createContext({latestIndex:0}),v=h.Provider;var y=t=>{let{className:e,index:r,children:o,split:a,style:i}=t,{latestIndex:c}=n.useContext(h);return null==o?null:n.createElement(n.Fragment,null,n.createElement("div",{className:e,style:i},o),r{let{componentCls:e,antCls:r}=t;return{[e]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},["".concat(e,"-item:empty")]:{display:"none"},["".concat(e,"-item > ").concat(r,"-badge-not-a-wrapper:only-child")]:{display:"block"}}}},k=t=>{let{componentCls:e}=t;return{[e]:{"&-gap-row-small":{rowGap:t.spaceGapSmallSize},"&-gap-row-middle":{rowGap:t.spaceGapMiddleSize},"&-gap-row-large":{rowGap:t.spaceGapLargeSize},"&-gap-col-small":{columnGap:t.spaceGapSmallSize},"&-gap-col-middle":{columnGap:t.spaceGapMiddleSize},"&-gap-col-large":{columnGap:t.spaceGapLargeSize}}}};var O=(0,m.I$)("Space",t=>{let e=(0,w.IX)(t,{spaceGapSmallSize:t.paddingXS,spaceGapMiddleSize:t.padding,spaceGapLargeSize:t.paddingLG});return[x(e),k(e)]},()=>({}),{resetStyle:!1}),C=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(t);oe.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r};let E=n.forwardRef((t,e)=>{var r;let{getPrefixCls:o,direction:d,size:u,className:m,style:g,classNames:p,styles:b}=(0,s.dj)("space"),{size:f=null!=u?u:"small",align:h,className:w,rootClassName:x,children:k,direction:E="horizontal",prefixCls:S,split:N,style:j,wrap:M=!1,classNames:z,styles:Z}=t,R=C(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[I,L]=Array.isArray(f)?f:[f,f],B=c(L),T=c(I),P=l(L),W=l(I),A=(0,i.Z)(k,{keepEmpty:!0}),q=void 0===h&&"horizontal"===E?"center":h,H=o("space",S),[G,D,K]=O(H),V=a()(H,m,D,"".concat(H,"-").concat(E),{["".concat(H,"-rtl")]:"rtl"===d,["".concat(H,"-align-").concat(q)]:q,["".concat(H,"-gap-row-").concat(L)]:B,["".concat(H,"-gap-col-").concat(I)]:T},w,x,K),F=a()("".concat(H,"-item"),null!==(r=null==z?void 0:z.item)&&void 0!==r?r:p.item),_=Object.assign(Object.assign({},b.item),null==Z?void 0:Z.item),X=A.map((t,e)=>{let r=(null==t?void 0:t.key)||"".concat(F,"-").concat(e);return n.createElement(y,{className:F,key:r,index:e,split:N,style:_},t)}),Y=n.useMemo(()=>({latestIndex:A.reduce((t,e,r)=>null!=e?r:t,0)}),[A]);if(0===A.length)return null;let $={};return M&&($.flexWrap="wrap"),!T&&W&&($.columnGap=I),!B&&P&&($.rowGap=L),G(n.createElement("div",Object.assign({ref:e,className:V,style:Object.assign(Object.assign(Object.assign({},$),g),j)},R),n.createElement(v,{value:Y},X)))});E.Compact=d.ZP,E.Addon=f;var S=E},79205:function(t,e,r){r.d(e,{Z:function(){return u}});var n=r(2265);let o=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,e,r)=>r?r.toUpperCase():e.toLowerCase()),i=t=>{let e=a(t);return e.charAt(0).toUpperCase()+e.slice(1)},c=function(){for(var t=arguments.length,e=Array(t),r=0;r!!t&&""!==t.trim()&&r.indexOf(t)===e).join(" ").trim()},l=t=>{for(let e in t)if(e.startsWith("aria-")||"role"===e||"title"===e)return!0};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let d=(0,n.forwardRef)((t,e)=>{let{color:r="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:d="",children:u,iconNode:m,...g}=t;return(0,n.createElement)("svg",{ref:e,...s,width:o,height:o,stroke:r,strokeWidth:i?24*Number(a)/Number(o):a,className:c("lucide",d),...!u&&!l(g)&&{"aria-hidden":"true"},...g},[...m.map(t=>{let[e,r]=t;return(0,n.createElement)(e,r)}),...Array.isArray(u)?u:[u]])}),u=(t,e)=>{let r=(0,n.forwardRef)((r,a)=>{let{className:l,...s}=r;return(0,n.createElement)(d,{ref:a,iconNode:e,className:c("lucide-".concat(o(i(t))),"lucide-".concat(t),l),...s})});return r.displayName=i(t),r}},30401:function(t,e,r){r.d(e,{Z:function(){return n}});let n=(0,r(79205).Z)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},64935:function(t,e,r){r.d(e,{Z:function(){return n}});let n=(0,r(79205).Z)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]])},78867:function(t,e,r){r.d(e,{Z:function(){return n}});let n=(0,r(79205).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},96362:function(t,e,r){r.d(e,{Z:function(){return n}});let n=(0,r(79205).Z)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},29202:function(t,e,r){r.d(e,{Z:function(){return n}});let n=(0,r(79205).Z)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},54001:function(t,e,r){r.d(e,{Z:function(){return n}});let n=(0,r(79205).Z)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]])},96137:function(t,e,r){r.d(e,{Z:function(){return n}});let n=(0,r(79205).Z)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},80221:function(t,e,r){r.d(e,{Z:function(){return n}});let n=(0,r(79205).Z)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]])},11239:function(t,e,r){r.d(e,{Z:function(){return n}});let n=(0,r(79205).Z)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},10900:function(t,e,r){var n=r(2265);let o=n.forwardRef(function(t,e){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.Z=o},71437:function(t,e,r){var n=r(2265);let o=n.forwardRef(function(t,e){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"}))});e.Z=o},82376:function(t,e,r){var n=r(2265);let o=n.forwardRef(function(t,e){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"}))});e.Z=o},53410:function(t,e,r){var n=r(2265);let o=n.forwardRef(function(t,e){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.Z=o},74998:function(t,e,r){var n=r(2265);let o=n.forwardRef(function(t,e){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.Z=o},21770:function(t,e,r){r.d(e,{D:function(){return d}});var n=r(2265),o=r(2894),a=r(18238),i=r(24112),c=r(45345),l=class extends i.l{#t;#e=void 0;#r;#n;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,c.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,c.Ym)(e.mutationKey)!==(0,c.Ym)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#o(),this.#a(t)}getCurrentResult(){return this.#e}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#o(),this.#a()}mutate(t,e){return this.#n=e,this.#r?.removeObserver(this),this.#r=this.#t.getMutationCache().build(this.#t,this.options),this.#r.addObserver(this),this.#r.execute(t)}#o(){let t=this.#r?.state??(0,o.R)();this.#e={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#a(t){a.Vr.batch(()=>{if(this.#n&&this.hasListeners()){let e=this.#e.variables,r=this.#e.context,n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#n.onSuccess?.(t.data,e,r,n),this.#n.onSettled?.(t.data,null,e,r,n)):t?.type==="error"&&(this.#n.onError?.(t.error,e,r,n),this.#n.onSettled?.(void 0,t.error,e,r,n))}this.listeners.forEach(t=>{t(this.#e)})})}},s=r(29827);function d(t,e){let r=(0,s.NL)(e),[o]=n.useState(()=>new l(r,t));n.useEffect(()=>{o.setOptions(t)},[o,t]);let i=n.useSyncExternalStore(n.useCallback(t=>o.subscribe(a.Vr.batchCalls(t)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=n.useCallback((t,e)=>{o.mutate(t,e).catch(c.ZT)},[o]);if(i.error&&(0,c.L3)(o.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:d,mutateAsync:i.mutate}}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1070-ab9dafb0fc6e0b85.js b/litellm/proxy/_experimental/out/_next/static/chunks/1070-ab9dafb0fc6e0b85.js
new file mode 100644
index 00000000000..a35f71fe0e6
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/1070-ab9dafb0fc6e0b85.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1070],{88009:function(e,t,c){c.d(t,{Z:function(){return i}});var n=c(1119),a=c(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"},o=c(55015),i=a.forwardRef(function(e,t){return a.createElement(o.Z,(0,n.Z)({},e,{ref:t,icon:r}))})},93750:function(e,t,c){c.d(t,{Z:function(){return i}});var n=c(1119),a=c(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"},o=c(55015),i=a.forwardRef(function(e,t){return a.createElement(o.Z,(0,n.Z)({},e,{ref:t,icon:r}))})},37527:function(e,t,c){c.d(t,{Z:function(){return i}});var n=c(1119),a=c(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z"}}]},name:"bank",theme:"outlined"},o=c(55015),i=a.forwardRef(function(e,t){return a.createElement(o.Z,(0,n.Z)({},e,{ref:t,icon:r}))})},9775:function(e,t,c){c.d(t,{Z:function(){return i}});var n=c(1119),a=c(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},o=c(55015),i=a.forwardRef(function(e,t){return a.createElement(o.Z,(0,n.Z)({},e,{ref:t,icon:r}))})},68208:function(e,t,c){c.d(t,{Z:function(){return i}});var n=c(1119),a=c(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"},o=c(55015),i=a.forwardRef(function(e,t){return a.createElement(o.Z,(0,n.Z)({},e,{ref:t,icon:r}))})},41169:function(e,t,c){c.d(t,{Z:function(){return i}});var n=c(1119),a=c(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z"}}]},name:"experiment",theme:"outlined"},o=c(55015),i=a.forwardRef(function(e,t){return a.createElement(o.Z,(0,n.Z)({},e,{ref:t,icon:r}))})},48231:function(e,t,c){c.d(t,{Z:function(){return i}});var n=c(1119),a=c(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z"}}]},name:"line-chart",theme:"outlined"},o=c(55015),i=a.forwardRef(function(e,t){return a.createElement(o.Z,(0,n.Z)({},e,{ref:t,icon:r}))})},28595:function(e,t,c){c.d(t,{Z:function(){return i}});var n=c(1119),a=c(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"},o=c(55015),i=a.forwardRef(function(e,t){return a.createElement(o.Z,(0,n.Z)({},e,{ref:t,icon:r}))})},41361:function(e,t,c){c.d(t,{Z:function(){return i}});var n=c(1119),a=c(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"},o=c(55015),i=a.forwardRef(function(e,t){return a.createElement(o.Z,(0,n.Z)({},e,{ref:t,icon:r}))})},13817:function(e,t,c){c.d(t,{default:function(){return H}});var n=c(83145),a=c(2265),r=c(36760),o=c.n(r),i=c(18694),f=c(71744),l=c(80856),u=c(45287),s=c(32186),h=c(25437),d=function(e,t){var c={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(c[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(c[n[a]]=e[n[a]]);return c};function m(e){let{suffixCls:t,tagName:c,displayName:n}=e;return e=>a.forwardRef((n,r)=>a.createElement(e,Object.assign({ref:r,suffixCls:t,tagName:c},n)))}let v=a.forwardRef((e,t)=>{let{prefixCls:c,suffixCls:n,className:r,tagName:i}=e,l=d(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:u}=a.useContext(f.E_),s=u("layout",c),[m,v,p]=(0,h.ZP)(s),g=n?"".concat(s,"-").concat(n):s;return m(a.createElement(i,Object.assign({className:o()(c||g,r,v,p),ref:t},l)))}),p=a.forwardRef((e,t)=>{let{direction:c}=a.useContext(f.E_),[r,m]=a.useState([]),{prefixCls:v,className:p,rootClassName:g,children:Z,hasSider:y,tagName:z,style:H}=e,V=d(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),b=(0,i.Z)(V,["suffixCls"]),{getPrefixCls:M,className:w,style:x}=(0,f.dj)("layout"),k=M("layout",v),C="boolean"==typeof y?y:!!r.length||(0,u.Z)(Z).some(e=>e.type===s.Z),[N,E,O]=(0,h.ZP)(k),L=o()(k,{["".concat(k,"-has-sider")]:C,["".concat(k,"-rtl")]:"rtl"===c},w,p,g,E,O),j=a.useMemo(()=>({siderHook:{addSider:e=>{m(t=>[].concat((0,n.Z)(t),[e]))},removeSider:e=>{m(t=>t.filter(t=>t!==e))}}}),[]);return N(a.createElement(l.V.Provider,{value:j},a.createElement(z,Object.assign({ref:t,className:L,style:Object.assign(Object.assign({},x),H)},b),Z)))}),g=m({tagName:"div",displayName:"Layout"})(p),Z=m({suffixCls:"header",tagName:"header",displayName:"Header"})(v),y=m({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(v),z=m({suffixCls:"content",tagName:"main",displayName:"Content"})(v);g.Header=Z,g.Footer=y,g.Content=z,g.Sider=s.Z,g._InternalSiderContext=s.D;var H=g},40875:function(e,t,c){c.d(t,{Z:function(){return n}});let n=(0,c(79205).Z)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},22135:function(e,t,c){c.d(t,{Z:function(){return n}});let n=(0,c(79205).Z)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},51817:function(e,t,c){c.d(t,{Z:function(){return n}});let n=(0,c(79205).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},21047:function(e,t,c){c.d(t,{Z:function(){return n}});let n=(0,c(79205).Z)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},70525:function(e,t,c){c.d(t,{Z:function(){return n}});let n=(0,c(79205).Z)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]])},76865:function(e,t,c){c.d(t,{Z:function(){return n}});let n=(0,c(79205).Z)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},49663:function(e,t,c){c.d(t,{Z:function(){return n}});let n=(0,c(79205).Z)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},95805:function(e,t,c){c.d(t,{Z:function(){return n}});let n=(0,c(79205).Z)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1132-d0fa0c9565944e8f.js b/litellm/proxy/_experimental/out/_next/static/chunks/1132-d0fa0c9565944e8f.js
deleted file mode 100644
index 76fa42eb99f..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/1132-d0fa0c9565944e8f.js
+++ /dev/null
@@ -1 +0,0 @@
-(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1132],{12660:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"},l=r(55015),i=o.forwardRef(function(e,t){return o.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},5540:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},l=r(55015),i=o.forwardRef(function(e,t){return o.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},3632:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},l=r(55015),i=o.forwardRef(function(e,t){return o.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},35291:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"},l=r(55015),i=o.forwardRef(function(e,t){return o.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},58747:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(5853),o=r(2265);let a=e=>{var t=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))}},4537:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(5853),o=r(2265);let a=e=>{var t=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))}},47323:function(e,t,r){"use strict";r.d(t,{Z:function(){return h}});var n=r(5853),o=r(2265),a=r(47187),l=r(7084),i=r(13241),s=r(1153),c=r(26898);let u={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},f=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,i.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,s.bM)(t,c.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,i.q)((0,s.bM)(t,c.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},p=(0,s.fn)("Icon"),h=o.forwardRef((e,t)=>{let{icon:r,variant:c="simple",tooltip:h,size:b=l.u8.SM,color:g,className:v}=e,y=(0,n._T)(e,["icon","variant","tooltip","size","color","className"]),w=f(c,g),{tooltipProps:k,getReferenceProps:x}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,s.lq)([t,k.refs.setReference]),className:(0,i.q)(p("root"),"inline-flex shrink-0 items-center justify-center",w.bgColor,w.textColor,w.borderColor,w.ringColor,m[c].rounded,m[c].border,m[c].shadow,m[c].ring,u[b].paddingX,u[b].paddingY,v)},x,y),o.createElement(a.Z,Object.assign({text:h},k)),o.createElement(r,{className:(0,i.q)(p("icon"),"shrink-0",d[b].height,d[b].width)}))});h.displayName="Icon"},30150:function(e,t,r){"use strict";r.d(t,{Z:function(){return m}});var n=r(5853),o=r(2265);let a=e=>{var t=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),o.createElement("path",{d:"M12 4v16m8-8H4"}))},l=e=>{var t=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),o.createElement("path",{d:"M20 12H4"}))};var i=r(13241),s=r(1153),c=r(69262);let u="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",d="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",m=o.forwardRef((e,t)=>{let{onSubmit:r,enableStepper:m=!0,disabled:f,onValueChange:p,onChange:h}=e,b=(0,n._T)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),g=(0,o.useRef)(null),[v,y]=o.useState(!1),w=o.useCallback(()=>{y(!0)},[]),k=o.useCallback(()=>{y(!1)},[]),[x,C]=o.useState(!1),E=o.useCallback(()=>{C(!0)},[]),S=o.useCallback(()=>{C(!1)},[]);return o.createElement(c.Z,Object.assign({type:"number",ref:(0,s.lq)([g,t]),disabled:f,makeInputClassName:(0,s.fn)("NumberInput"),onKeyDown:e=>{var t;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null===(t=g.current)||void 0===t?void 0:t.value;null==r||r(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&w(),"ArrowUp"===e.key&&E()},onKeyUp:e=>{"ArrowDown"===e.key&&k(),"ArrowUp"===e.key&&S()},onChange:e=>{f||(null==p||p(parseFloat(e.target.value)),null==h||h(e))},stepper:m?o.createElement("div",{className:(0,i.q)("flex justify-center align-middle")},o.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;f||(null===(e=g.current)||void 0===e||e.stepDown(),null===(t=g.current)||void 0===t||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.q)(!f&&d,u,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},o.createElement(l,{"data-testid":"step-down",className:(v?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),o.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,t;f||(null===(e=g.current)||void 0===e||e.stepUp(),null===(t=g.current)||void 0===t||t.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.q)(!f&&d,u,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},o.createElement(a,{"data-testid":"step-up",className:(x?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},b))});m.displayName="NumberInput"},27281:function(e,t,r){"use strict";r.d(t,{Z:function(){return p}});var n=r(5853),o=r(58747),a=r(2265),l=r(4537),i=r(13241),s=r(1153),c=r(96398),u=r(51975),d=r(85238),m=r(44140);let f=(0,s.fn)("Select"),p=a.forwardRef((e,t)=>{let{defaultValue:r="",value:s,onValueChange:p,placeholder:h="Select...",disabled:b=!1,icon:g,enableClear:v=!1,required:y,children:w,name:k,error:x=!1,errorMessage:C,className:E,id:S}=e,O=(0,n._T)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),j=(0,a.useRef)(null),N=a.Children.toArray(w),[_,R]=(0,m.Z)(r,s),T=(0,a.useMemo)(()=>{let e=a.Children.toArray(w).filter(a.isValidElement);return(0,c.sl)(e)},[w]);return a.createElement("div",{className:(0,i.q)("w-full min-w-[10rem] text-tremor-default",E)},a.createElement("div",{className:"relative"},a.createElement("select",{title:"select-hidden",required:y,className:(0,i.q)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:_,onChange:e=>{e.preventDefault()},name:k,disabled:b,id:S,onFocus:()=>{let e=j.current;e&&e.focus()}},a.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},h),N.map(e=>{let t=e.props.value,r=e.props.children;return a.createElement("option",{className:"hidden",key:t,value:t},r)})),a.createElement(u.Ri,Object.assign({as:"div",ref:t,defaultValue:_,value:_,onChange:e=>{null==p||p(e),R(e)},disabled:b,id:S},O),e=>{var t;let{value:r}=e;return a.createElement(a.Fragment,null,a.createElement(u.Y4,{ref:j,className:(0,i.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",g?"pl-10":"pl-3",(0,c.um)((0,c.Uh)(r),b,x))},g&&a.createElement("span",{className:(0,i.q)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.createElement(g,{className:(0,i.q)(f("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.createElement("span",{className:"w-[90%] block truncate"},r&&null!==(t=T.get(r))&&void 0!==t?t:h),a.createElement("span",{className:(0,i.q)("absolute inset-y-0 right-0 flex items-center mr-3")},a.createElement(o.Z,{className:(0,i.q)(f("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),v&&_?a.createElement("button",{type:"button",className:(0,i.q)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),R(""),null==p||p("")}},a.createElement(l.Z,{className:(0,i.q)(f("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.createElement(d.u,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.createElement(u.O_,{anchor:"bottom start",className:(0,i.q)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},w)))})),x&&C?a.createElement("p",{className:(0,i.q)("errorMessage","text-sm text-rose-500 mt-1")},C):null)});p.displayName="Select"},59341:function(e,t,r){"use strict";r.d(t,{Z:function(){return M}});var n=r(5853),o=r(71049),a=r(11323),l=r(2265),i=r(66797),s=r(40099),c=r(74275),u=r(59456),d=r(93980),m=r(65573),f=r(67561),p=r(87550),h=r(628),b=r(80281),g=r(31370),v=r(20131),y=r(38929),w=r(52307),k=r(52724),x=r(7935);let C=(0,l.createContext)(null);C.displayName="GroupContext";let E=l.Fragment,S=Object.assign((0,y.yV)(function(e,t){var r;let n=(0,l.useId)(),E=(0,b.Q)(),S=(0,p.B)(),{id:O=E||"headlessui-switch-".concat(n),disabled:j=S||!1,checked:N,defaultChecked:_,onChange:R,name:T,value:M,form:P,autoFocus:z=!1,...L}=e,I=(0,l.useContext)(C),[Z,F]=(0,l.useState)(null),B=(0,l.useRef)(null),D=(0,f.T)(B,t,null===I?null:I.setSwitch,F),q=(0,c.L)(_),[A,W]=(0,s.q)(N,R,null!=q&&q),H=(0,u.G)(),[V,K]=(0,l.useState)(!1),U=(0,d.z)(()=>{K(!0),null==W||W(!A),H.nextFrame(()=>{K(!1)})}),X=(0,d.z)(e=>{if((0,g.P)(e.currentTarget))return e.preventDefault();e.preventDefault(),U()}),Y=(0,d.z)(e=>{e.key===k.R.Space?(e.preventDefault(),U()):e.key===k.R.Enter&&(0,v.g)(e.currentTarget)}),G=(0,d.z)(e=>e.preventDefault()),$=(0,x.wp)(),J=(0,w.zH)(),{isFocusVisible:Q,focusProps:ee}=(0,o.F)({autoFocus:z}),{isHovered:et,hoverProps:er}=(0,a.X)({isDisabled:j}),{pressed:en,pressProps:eo}=(0,i.x)({disabled:j}),ea=(0,l.useMemo)(()=>({checked:A,disabled:j,hover:et,focus:Q,active:en,autofocus:z,changing:V}),[A,et,Q,en,j,V,z]),el=(0,y.dG)({id:O,ref:D,role:"switch",type:(0,m.f)(e,Z),tabIndex:-1===e.tabIndex?0:null!=(r=e.tabIndex)?r:0,"aria-checked":A,"aria-labelledby":$,"aria-describedby":J,disabled:j||void 0,autoFocus:z,onClick:X,onKeyUp:Y,onKeyPress:G},ee,er,eo),ei=(0,l.useCallback)(()=>{if(void 0!==q)return null==W?void 0:W(q)},[W,q]),es=(0,y.L6)();return l.createElement(l.Fragment,null,null!=T&&l.createElement(h.Mt,{disabled:j,data:{[T]:M||"on"},overrides:{type:"checkbox",checked:A},form:P,onReset:ei}),es({ourProps:el,theirProps:L,slot:ea,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,n]=(0,l.useState)(null),[o,a]=(0,x.bE)(),[i,s]=(0,w.fw)(),c=(0,l.useMemo)(()=>({switch:r,setSwitch:n}),[r,n]),u=(0,y.L6)();return l.createElement(s,{name:"Switch.Description",value:i},l.createElement(a,{name:"Switch.Label",value:o,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},l.createElement(C.Provider,{value:c},u({ourProps:{},theirProps:e,slot:{},defaultTag:E,name:"Switch.Group"}))))},Label:x.__,Description:w.dk});var O=r(44140),j=r(26898),N=r(13241),_=r(1153),R=r(47187);let T=(0,_.fn)("Switch"),M=l.forwardRef((e,t)=>{let{checked:r,defaultChecked:o=!1,onChange:a,color:i,name:s,error:c,errorMessage:u,disabled:d,required:m,tooltip:f,id:p}=e,h=(0,n._T)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),b={bgColor:i?(0,_.bM)(i,j.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:i?(0,_.bM)(i,j.K.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[g,v]=(0,O.Z)(o,r),[y,w]=(0,l.useState)(!1),{tooltipProps:k,getReferenceProps:x}=(0,R.l)(300);return l.createElement("div",{className:"flex flex-row items-center justify-start"},l.createElement(R.Z,Object.assign({text:f},k)),l.createElement("div",Object.assign({ref:(0,_.lq)([t,k.refs.setReference]),className:(0,N.q)(T("root"),"flex flex-row relative h-5")},h,x),l.createElement("input",{type:"checkbox",className:(0,N.q)(T("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:s,required:m,checked:g,onChange:e=>{e.preventDefault()}}),l.createElement(S,{checked:g,onChange:e=>{v(e),null==a||a(e)},disabled:d,className:(0,N.q)(T("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",d?"cursor-not-allowed":""),onFocus:()=>w(!0),onBlur:()=>w(!1),id:p},l.createElement("span",{className:(0,N.q)(T("sr-only"),"sr-only")},"Switch ",g?"on":"off"),l.createElement("span",{"aria-hidden":"true",className:(0,N.q)(T("background"),g?b.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),l.createElement("span",{"aria-hidden":"true",className:(0,N.q)(T("round"),g?(0,N.q)(b.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",y?(0,N.q)("ring-2",b.ringColor):"")}))),c&&u?l.createElement("p",{className:(0,N.q)(T("errorMessage"),"text-sm text-red-500 mt-1 ")},u):null)});M.displayName="Switch"},87452:function(e,t,r){"use strict";r.d(t,{Z:function(){return d},r:function(){return u}});var n=r(5853),o=r(91054);r(42698),r(64016);var a=r(8710);r(33232);var l=r(13241),i=r(1153),s=r(2265);let c=(0,i.fn)("Accordion"),u=(0,s.createContext)({isOpen:!1}),d=s.forwardRef((e,t)=>{var r;let{defaultOpen:i=!1,children:d,className:m}=e,f=(0,n._T)(e,["defaultOpen","children","className"]),p=null!==(r=(0,s.useContext)(a.Z))&&void 0!==r?r:(0,l.q)("rounded-tremor-default border");return s.createElement(o.pJ,Object.assign({as:"div",ref:t,className:(0,l.q)(c("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",p,m),defaultOpen:i},f),e=>{let{open:t}=e;return s.createElement(u.Provider,{value:{isOpen:t}},d)})});d.displayName="Accordion"},88829:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(5853),o=r(2265),a=r(91054),l=r(13241);let i=(0,r(1153).fn)("AccordionBody"),s=o.forwardRef((e,t)=>{let{children:r,className:s}=e,c=(0,n._T)(e,["children","className"]);return o.createElement(a.pJ.Panel,Object.assign({ref:t,className:(0,l.q)(i("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",s)},c),r)});s.displayName="AccordionBody"},72208:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n=r(5853),o=r(2265),a=r(91054);let l=e=>{var t=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z"}))};var i=r(87452),s=r(13241);let c=(0,r(1153).fn)("AccordionHeader"),u=o.forwardRef((e,t)=>{let{children:r,className:u}=e,d=(0,n._T)(e,["children","className"]),{isOpen:m}=(0,o.useContext)(i.r);return o.createElement(a.pJ.Button,Object.assign({ref:t,className:(0,s.q)(c("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",u)},d),o.createElement("div",{className:(0,s.q)(c("children"),"flex flex-1 text-inherit mr-4")},r),o.createElement("div",null,o.createElement(l,{className:(0,s.q)(c("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",m?"transition-all":"transition-all -rotate-180")})))});u.displayName="AccordionHeader"},49804:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(5853),o=r(13241),a=r(1153),l=r(2265),i=r(9496);let s=(0,a.fn)("Col"),c=l.forwardRef((e,t)=>{let{numColSpan:r=1,numColSpanSm:a,numColSpanMd:c,numColSpanLg:u,children:d,className:m}=e,f=(0,n._T)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),p=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return l.createElement("div",Object.assign({ref:t,className:(0,o.q)(s("root"),(()=>{let e=p(r,i.PT),t=p(a,i.SP),n=p(c,i.VS),l=p(u,i._w);return(0,o.q)(e,t,n,l)})(),m)},f),d)});c.displayName="Col"},97765:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(5853),o=r(26898),a=r(13241),l=r(1153),i=r(2265);let s=i.forwardRef((e,t)=>{let{color:r,children:s,className:c}=e,u=(0,n._T)(e,["color","children","className"]);return i.createElement("p",Object.assign({ref:t,className:(0,a.q)(r?(0,l.bM)(r,o.K.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},u),s)});s.displayName="Subtitle"},92570:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=e=>e?"function"==typeof e?e():e:null},33866:function(e,t,r){"use strict";r.d(t,{Z:function(){return P}});var n=r(2265),o=r(36760),a=r.n(o),l=r(66632),i=r(93350),s=r(19722),c=r(71744),u=r(93463),d=r(12918),m=r(18536),f=r(71140),p=r(99320);let h=new u.E4("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),b=new u.E4("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),g=new u.E4("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),v=new u.E4("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),y=new u.E4("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),w=new u.E4("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),k=e=>{let{componentCls:t,iconCls:r,antCls:n,badgeShadowSize:o,textFontSize:a,textFontSizeSM:l,statusSize:i,dotSize:s,textFontWeight:c,indicatorHeight:f,indicatorHeightSM:p,marginXS:k,calc:x}=e,C="".concat(n,"-scroll-number"),E=(0,m.Z)(e,(e,r)=>{let{darkColor:n}=r;return{["&".concat(t," ").concat(t,"-color-").concat(e)]:{background:n,["&:not(".concat(t,"-count)")]:{color:n},"a:hover &":{background:n}}}});return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,d.Wf)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,["".concat(t,"-count")]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:f,height:f,color:e.badgeTextColor,fontWeight:c,fontSize:a,lineHeight:(0,u.bf)(f),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:x(f).div(2).equal(),boxShadow:"0 0 0 ".concat((0,u.bf)(o)," ").concat(e.badgeShadowColor),transition:"background ".concat(e.motionDurationMid),a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},["".concat(t,"-count-sm")]:{minWidth:p,height:p,fontSize:l,lineHeight:(0,u.bf)(p),borderRadius:x(p).div(2).equal()},["".concat(t,"-multiple-words")]:{padding:"0 ".concat((0,u.bf)(e.paddingXS)),bdi:{unicodeBidi:"plaintext"}},["".concat(t,"-dot")]:{zIndex:e.indicatorZIndex,width:s,minWidth:s,height:s,background:e.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat((0,u.bf)(o)," ").concat(e.badgeShadowColor)},["".concat(t,"-count, ").concat(t,"-dot, ").concat(C,"-custom-component")]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",["&".concat(r,"-spin")]:{animationName:w,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&".concat(t,"-status")]:{lineHeight:"inherit",verticalAlign:"baseline",["".concat(t,"-status-dot")]:{position:"relative",top:-1,display:"inline-block",width:i,height:i,verticalAlign:"middle",borderRadius:"50%"},["".concat(t,"-status-success")]:{backgroundColor:e.colorSuccess},["".concat(t,"-status-processing")]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:h,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},["".concat(t,"-status-default")]:{backgroundColor:e.colorTextPlaceholder},["".concat(t,"-status-error")]:{backgroundColor:e.colorError},["".concat(t,"-status-warning")]:{backgroundColor:e.colorWarning},["".concat(t,"-status-text")]:{marginInlineStart:k,color:e.colorText,fontSize:e.fontSize}}}),E),{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:b,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["".concat(t,"-zoom-leave")]:{animationName:g,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["&".concat(t,"-not-a-wrapper")]:{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["".concat(t,"-zoom-leave")]:{animationName:y,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["&:not(".concat(t,"-status)")]:{verticalAlign:"middle"},["".concat(C,"-custom-component, ").concat(t,"-count")]:{transform:"none"},["".concat(C,"-custom-component, ").concat(C)]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[C]:{overflow:"hidden",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseOutBack),["".concat(C,"-only")]:{position:"relative",display:"inline-block",height:f,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",["> p".concat(C,"-only-unit")]:{height:f,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},["".concat(C,"-symbol")]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",["".concat(t,"-count, ").concat(t,"-dot, ").concat(C,"-custom-component")]:{transform:"translate(-50%, -50%)"}}})}},x=e=>{let{fontHeight:t,lineWidth:r,marginXS:n,colorBorderBg:o}=e,a=e.colorTextLightSolid,l=e.colorError,i=e.colorErrorHover;return(0,f.IX)(e,{badgeFontHeight:t,badgeShadowSize:r,badgeTextColor:a,badgeColor:l,badgeColorHover:i,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:n,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},C=e=>{let{fontSize:t,lineHeight:r,fontSizeSM:n,lineWidth:o}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*r)-2*o,indicatorHeightSM:t,dotSize:n/2,textFontSize:n,textFontSizeSM:n,textFontWeight:"normal",statusSize:n/2}};var E=(0,p.I$)("Badge",e=>k(x(e)),C);let S=e=>{let{antCls:t,badgeFontHeight:r,marginXS:n,badgeRibbonOffset:o,calc:a}=e,l="".concat(t,"-ribbon"),i=(0,m.Z)(e,(e,t)=>{let{darkColor:r}=t;return{["&".concat(l,"-color-").concat(e)]:{background:r,color:r}}});return{["".concat(t,"-ribbon-wrapper")]:{position:"relative"},[l]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,d.Wf)(e)),{position:"absolute",top:n,padding:"0 ".concat((0,u.bf)(e.paddingXS)),color:e.colorPrimary,lineHeight:(0,u.bf)(r),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,["".concat(l,"-text")]:{color:e.badgeTextColor},["".concat(l,"-corner")]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:"".concat((0,u.bf)(a(o).div(2).equal())," solid"),transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),i),{["&".concat(l,"-placement-end")]:{insetInlineEnd:a(o).mul(-1).equal(),borderEndEndRadius:0,["".concat(l,"-corner")]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},["&".concat(l,"-placement-start")]:{insetInlineStart:a(o).mul(-1).equal(),borderEndStartRadius:0,["".concat(l,"-corner")]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}};var O=(0,p.I$)(["Badge","Ribbon"],e=>S(x(e)),C);let j=e=>{let t;let{prefixCls:r,value:o,current:l,offset:i=0}=e;return i&&(t={position:"absolute",top:"".concat(i,"00%"),left:0}),n.createElement("span",{style:t,className:a()("".concat(r,"-only-unit"),{current:l})},o)};var N=e=>{let t,r;let{prefixCls:o,count:a,value:l}=e,i=Number(l),s=Math.abs(a),[c,u]=n.useState(i),[d,m]=n.useState(s),f=()=>{u(i),m(s)};if(n.useEffect(()=>{let e=setTimeout(f,1e3);return()=>clearTimeout(e)},[i]),c===i||Number.isNaN(i)||Number.isNaN(c))t=[n.createElement(j,Object.assign({},e,{key:i,current:!0}))],r={transition:"none"};else{t=[];let o=i+10,a=[];for(let e=i;e<=o;e+=1)a.push(e);let l=de%10===c);t=(l<0?a.slice(0,u+1):a.slice(u)).map((t,r)=>n.createElement(j,Object.assign({},e,{key:t,value:t%10,offset:l<0?r-u:r,current:r===u}))),r={transform:"translateY(".concat(-function(e,t,r){let n=e,o=0;for(;(n+10)%10!==t;)n+=r,o+=r;return o}(c,i,l),"00%)")}}return n.createElement("span",{className:"".concat(o,"-only"),style:r,onTransitionEnd:f},t)},_=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let R=n.forwardRef((e,t)=>{let{prefixCls:r,count:o,className:l,motionClassName:i,style:u,title:d,show:m,component:f="sup",children:p}=e,h=_(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:b}=n.useContext(c.E_),g=b("scroll-number",r),v=Object.assign(Object.assign({},h),{"data-show":m,style:u,className:a()(g,l,i),title:d}),y=o;if(o&&Number(o)%1==0){let e=String(o).split("");y=n.createElement("bdi",null,e.map((t,r)=>n.createElement(N,{prefixCls:g,count:Number(o),value:t,key:e.length-r})))}return((null==u?void 0:u.borderColor)&&(v.style=Object.assign(Object.assign({},u),{boxShadow:"0 0 0 1px ".concat(u.borderColor," inset")})),p)?(0,s.Tm)(p,e=>({className:a()("".concat(g,"-custom-component"),null==e?void 0:e.className,i)})):n.createElement(f,Object.assign({},v,{ref:t}),y)});var T=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let M=n.forwardRef((e,t)=>{var r,o,u,d,m;let{prefixCls:f,scrollNumberPrefixCls:p,children:h,status:b,text:g,color:v,count:y=null,overflowCount:w=99,dot:k=!1,size:x="default",title:C,offset:S,style:O,className:j,rootClassName:N,classNames:_,styles:M,showZero:P=!1}=e,z=T(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:L,direction:I,badge:Z}=n.useContext(c.E_),F=L("badge",f),[B,D,q]=E(F),A=y>w?"".concat(w,"+"):y,W="0"===A||0===A||"0"===g||0===g,H=null===y||W&&!P,V=(null!=b||null!=v)&&H,K=null!=b||!W,U=k&&!W,X=U?"":A,Y=(0,n.useMemo)(()=>((null==X||""===X)&&(null==g||""===g)||W&&!P)&&!U,[X,W,P,U,g]),G=(0,n.useRef)(y);Y||(G.current=y);let $=G.current,J=(0,n.useRef)(X);Y||(J.current=X);let Q=J.current,ee=(0,n.useRef)(U);Y||(ee.current=U);let et=(0,n.useMemo)(()=>{if(!S)return Object.assign(Object.assign({},null==Z?void 0:Z.style),O);let e={marginTop:S[1]};return"rtl"===I?e.left=Number.parseInt(S[0],10):e.right=-Number.parseInt(S[0],10),Object.assign(Object.assign(Object.assign({},e),null==Z?void 0:Z.style),O)},[I,S,O,null==Z?void 0:Z.style]),er=null!=C?C:"string"==typeof $||"number"==typeof $?$:void 0,en=!Y&&(0===g?P:!!g&&!0!==g),eo=en?n.createElement("span",{className:"".concat(F,"-status-text")},g):null,ea=$&&"object"==typeof $?(0,s.Tm)($,e=>({style:Object.assign(Object.assign({},et),e.style)})):void 0,el=(0,i.o2)(v,!1),ei=a()(null==_?void 0:_.indicator,null===(r=null==Z?void 0:Z.classNames)||void 0===r?void 0:r.indicator,{["".concat(F,"-status-dot")]:V,["".concat(F,"-status-").concat(b)]:!!b,["".concat(F,"-color-").concat(v)]:el}),es={};v&&!el&&(es.color=v,es.background=v);let ec=a()(F,{["".concat(F,"-status")]:V,["".concat(F,"-not-a-wrapper")]:!h,["".concat(F,"-rtl")]:"rtl"===I},j,N,null==Z?void 0:Z.className,null===(o=null==Z?void 0:Z.classNames)||void 0===o?void 0:o.root,null==_?void 0:_.root,D,q);if(!h&&V&&(g||K||!H)){let e=et.color;return B(n.createElement("span",Object.assign({},z,{className:ec,style:Object.assign(Object.assign(Object.assign({},null==M?void 0:M.root),null===(u=null==Z?void 0:Z.styles)||void 0===u?void 0:u.root),et)}),n.createElement("span",{className:ei,style:Object.assign(Object.assign(Object.assign({},null==M?void 0:M.indicator),null===(d=null==Z?void 0:Z.styles)||void 0===d?void 0:d.indicator),es)}),en&&n.createElement("span",{style:{color:e},className:"".concat(F,"-status-text")},g)))}return B(n.createElement("span",Object.assign({ref:t},z,{className:ec,style:Object.assign(Object.assign({},null===(m=null==Z?void 0:Z.styles)||void 0===m?void 0:m.root),null==M?void 0:M.root)}),h,n.createElement(l.ZP,{visible:!Y,motionName:"".concat(F,"-zoom"),motionAppear:!1,motionDeadline:1e3},e=>{var t,r;let{className:o}=e,l=L("scroll-number",p),i=ee.current,s=a()(null==_?void 0:_.indicator,null===(t=null==Z?void 0:Z.classNames)||void 0===t?void 0:t.indicator,{["".concat(F,"-dot")]:i,["".concat(F,"-count")]:!i,["".concat(F,"-count-sm")]:"small"===x,["".concat(F,"-multiple-words")]:!i&&Q&&Q.toString().length>1,["".concat(F,"-status-").concat(b)]:!!b,["".concat(F,"-color-").concat(v)]:el}),c=Object.assign(Object.assign(Object.assign({},null==M?void 0:M.indicator),null===(r=null==Z?void 0:Z.styles)||void 0===r?void 0:r.indicator),et);return v&&!el&&((c=c||{}).background=v),n.createElement(R,{prefixCls:l,show:!Y,motionClassName:o,className:s,count:Q,title:er,style:c,key:"scrollNumber"},ea)}),eo))});M.Ribbon=e=>{let{className:t,prefixCls:r,style:o,color:l,children:s,text:u,placement:d="end",rootClassName:m}=e,{getPrefixCls:f,direction:p}=n.useContext(c.E_),h=f("ribbon",r),b="".concat(h,"-wrapper"),[g,v,y]=O(h,b),w=(0,i.o2)(l,!1),k=a()(h,"".concat(h,"-placement-").concat(d),{["".concat(h,"-rtl")]:"rtl"===p,["".concat(h,"-color-").concat(l)]:w},t),x={},C={};return l&&!w&&(x.background=l,C.color=l),g(n.createElement("div",{className:a()(b,m,v,y)},s,n.createElement("div",{className:a()(k,v),style:Object.assign(Object.assign({},x),o)},n.createElement("span",{className:"".concat(h,"-text")},u),n.createElement("div",{className:"".concat(h,"-corner"),style:C}))))};var P=M},20435:function(e,t,r){"use strict";r.d(t,{aV:function(){return d}});var n=r(2265),o=r(36760),a=r.n(o),l=r(5769),i=r(92570),s=r(71744),c=r(72262),u=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let d=e=>{let{title:t,content:r,prefixCls:o}=e;return t||r?n.createElement(n.Fragment,null,t&&n.createElement("div",{className:"".concat(o,"-title")},t),r&&n.createElement("div",{className:"".concat(o,"-inner-content")},r)):null},m=e=>{let{hashId:t,prefixCls:r,className:o,style:s,placement:c="top",title:u,content:m,children:f}=e,p=(0,i.Z)(u),h=(0,i.Z)(m),b=a()(t,r,"".concat(r,"-pure"),"".concat(r,"-placement-").concat(c),o);return n.createElement("div",{className:b,style:s},n.createElement("div",{className:"".concat(r,"-arrow")}),n.createElement(l.G,Object.assign({},e,{className:t,prefixCls:r}),f||n.createElement(d,{prefixCls:r,title:p,content:h})))};t.ZP=e=>{let{prefixCls:t,className:r}=e,o=u(e,["prefixCls","className"]),{getPrefixCls:l}=n.useContext(s.E_),i=l("popover",t),[d,f,p]=(0,c.Z)(i);return d(n.createElement(m,Object.assign({},o,{prefixCls:i,hashId:f,className:a()(r,p)})))}},79326:function(e,t,r){"use strict";var n=r(2265),o=r(36760),a=r.n(o),l=r(50506),i=r(95814),s=r(92570),c=r(68710),u=r(19722),d=r(71744),m=r(99981),f=r(20435),p=r(72262),h=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let b=n.forwardRef((e,t)=>{var r,o;let{prefixCls:b,title:g,content:v,overlayClassName:y,placement:w="top",trigger:k="hover",children:x,mouseEnterDelay:C=.1,mouseLeaveDelay:E=.1,onOpenChange:S,overlayStyle:O={},styles:j,classNames:N}=e,_=h(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:R,className:T,style:M,classNames:P,styles:z}=(0,d.dj)("popover"),L=R("popover",b),[I,Z,F]=(0,p.Z)(L),B=R(),D=a()(y,Z,F,T,P.root,null==N?void 0:N.root),q=a()(P.body,null==N?void 0:N.body),[A,W]=(0,l.Z)(!1,{value:null!==(r=e.open)&&void 0!==r?r:e.visible,defaultValue:null!==(o=e.defaultOpen)&&void 0!==o?o:e.defaultVisible}),H=(e,t)=>{W(e,!0),null==S||S(e,t)},V=e=>{e.keyCode===i.Z.ESC&&H(!1,e)},K=(0,s.Z)(g),U=(0,s.Z)(v);return I(n.createElement(m.Z,Object.assign({placement:w,trigger:k,mouseEnterDelay:C,mouseLeaveDelay:E},_,{prefixCls:L,classNames:{root:D,body:q},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},z.root),M),O),null==j?void 0:j.root),body:Object.assign(Object.assign({},z.body),null==j?void 0:j.body)},ref:t,open:A,onOpenChange:e=>{H(e)},overlay:K||U?n.createElement(f.aV,{prefixCls:L,title:K,content:U}):null,transitionName:(0,c.m)(B,"zoom-big",_.transitionName),"data-popover-inject":!0}),(0,u.Tm)(x,{onKeyDown:e=>{var t,r;(0,n.isValidElement)(x)&&(null===(r=null==x?void 0:(t=x.props).onKeyDown)||void 0===r||r.call(t,e)),V(e)}})))});b._InternalPanelDoNotUseOrYouWillBeFired=f.ZP,t.Z=b},72262:function(e,t,r){"use strict";var n=r(12918),o=r(691),a=r(88260),l=r(34442),i=r(53454),s=r(99320),c=r(71140);let u=e=>{let{componentCls:t,popoverColor:r,titleMinWidth:o,fontWeightStrong:l,innerPadding:i,boxShadowSecondary:s,colorTextHeading:c,borderRadiusLG:u,zIndexPopup:d,titleMarginBottom:m,colorBgElevated:f,popoverBg:p,titleBorderBottom:h,innerContentPadding:b,titlePadding:g}=e;return[{[t]:Object.assign(Object.assign({},(0,n.Wf)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":f,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},["".concat(t,"-content")]:{position:"relative"},["".concat(t,"-inner")]:{backgroundColor:p,backgroundClip:"padding-box",borderRadius:u,boxShadow:s,padding:i},["".concat(t,"-title")]:{minWidth:o,marginBottom:m,color:c,fontWeight:l,borderBottom:h,padding:g},["".concat(t,"-inner-content")]:{color:r,padding:b}})},(0,a.ZP)(e,"var(--antd-arrow-background-color)"),{["".concat(t,"-pure")]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",["".concat(t,"-content")]:{display:"inline-block"}}}]},d=e=>{let{componentCls:t}=e;return{[t]:i.i.map(r=>{let n=e["".concat(r,"6")];return{["&".concat(t,"-").concat(r)]:{"--antd-arrow-background-color":n,["".concat(t,"-inner")]:{backgroundColor:n},["".concat(t,"-arrow")]:{background:"transparent"}}}})}};t.Z=(0,s.I$)("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,n=(0,c.IX)(e,{popoverBg:t,popoverColor:r});return[u(n),d(n),(0,o._y)(n,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:r,fontHeight:n,padding:o,wireframe:i,zIndexPopupBase:s,borderRadiusLG:c,marginXS:u,lineType:d,colorSplit:m,paddingSM:f}=e,p=r-n;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:s+30},(0,l.w)(e)),(0,a.wZ)({contentRadius:c,limitVerticalRadius:!0})),{innerPadding:i?0:12,titleMarginBottom:i?0:u,titlePadding:i?"".concat(p/2,"px ").concat(o,"px ").concat(p/2-t,"px"):0,titleBorderBottom:i?"".concat(t,"px ").concat(d," ").concat(m):"none",innerContentPadding:i?"".concat(f,"px ").concat(o,"px"):0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]})},3810:function(e,t,r){"use strict";r.d(t,{Z:function(){return R}});var n=r(2265),o=r(36760),a=r.n(o),l=r(18694),i=r(93350),s=r(53445),c=r(19722),u=r(6694),d=r(71744),m=r(93463),f=r(54558),p=r(12918),h=r(71140),b=r(99320);let g=e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:o,calc:a}=e,l=a(n).sub(r).equal(),i=a(t).sub(r).equal();return{[o]:Object.assign(Object.assign({},(0,p.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:"".concat((0,m.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusSM,opacity:1,transition:"all ".concat(e.motionDurationMid),textAlign:"start",position:"relative",["&".concat(o,"-rtl")]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},["".concat(o,"-close-icon")]:{marginInlineStart:i,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),"&:hover":{color:e.colorTextHeading}},["&".concat(o,"-has-color")]:{borderColor:"transparent",["&, a, a:hover, ".concat(e.iconCls,"-close, ").concat(e.iconCls,"-close:hover")]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",["&:not(".concat(o,"-checkable-checked):hover")]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},["> ".concat(e.iconCls," + span, > span + ").concat(e.iconCls)]:{marginInlineStart:l}}),["".concat(o,"-borderless")]:{borderColor:"transparent",background:e.tagBorderlessBg}}},v=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,o=e.fontSizeSM;return(0,h.IX)(e,{tagFontSize:o,tagLineHeight:(0,m.bf)(n(e.lineHeightSM).mul(o).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},y=e=>({defaultBg:new f.t(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var w=(0,b.I$)("Tag",e=>g(v(e)),y),k=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let x=n.forwardRef((e,t)=>{let{prefixCls:r,style:o,className:l,checked:i,children:s,icon:c,onChange:u,onClick:m}=e,f=k(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:p,tag:h}=n.useContext(d.E_),b=p("tag",r),[g,v,y]=w(b),x=a()(b,"".concat(b,"-checkable"),{["".concat(b,"-checkable-checked")]:i},null==h?void 0:h.className,l,v,y);return g(n.createElement("span",Object.assign({},f,{ref:t,style:Object.assign(Object.assign({},o),null==h?void 0:h.style),className:x,onClick:e=>{null==u||u(!i),null==m||m(e)}}),c,n.createElement("span",null,s)))});var C=r(18536);let E=e=>(0,C.Z)(e,(t,r)=>{let{textColor:n,lightBorderColor:o,lightColor:a,darkColor:l}=r;return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:n,background:a,borderColor:o,"&-inverse":{color:e.colorTextLightSolid,background:l,borderColor:l},["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}});var S=(0,b.bk)(["Tag","preset"],e=>E(v(e)),y);let O=(e,t,r)=>{let n="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:e["color".concat(r)],background:e["color".concat(n,"Bg")],borderColor:e["color".concat(n,"Border")],["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}};var j=(0,b.bk)(["Tag","status"],e=>{let t=v(e);return[O(t,"success","Success"),O(t,"processing","Info"),O(t,"error","Error"),O(t,"warning","Warning")]},y),N=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let _=n.forwardRef((e,t)=>{let{prefixCls:r,className:o,rootClassName:m,style:f,children:p,icon:h,color:b,onClose:g,bordered:v=!0,visible:y}=e,k=N(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:x,direction:C,tag:E}=n.useContext(d.E_),[O,_]=n.useState(!0),R=(0,l.Z)(k,["closeIcon","closable"]);n.useEffect(()=>{void 0!==y&&_(y)},[y]);let T=(0,i.o2)(b),M=(0,i.yT)(b),P=T||M,z=Object.assign(Object.assign({backgroundColor:b&&!P?b:void 0},null==E?void 0:E.style),f),L=x("tag",r),[I,Z,F]=w(L),B=a()(L,null==E?void 0:E.className,{["".concat(L,"-").concat(b)]:P,["".concat(L,"-has-color")]:b&&!P,["".concat(L,"-hidden")]:!O,["".concat(L,"-rtl")]:"rtl"===C,["".concat(L,"-borderless")]:!v},o,m,Z,F),D=e=>{e.stopPropagation(),null==g||g(e),e.defaultPrevented||_(!1)},[,q]=(0,s.b)((0,s.w)(e),(0,s.w)(E),{closable:!1,closeIconRender:e=>{let t=n.createElement("span",{className:"".concat(L,"-close-icon"),onClick:D},e);return(0,c.wm)(e,t,e=>({onClick:t=>{var r;null===(r=null==e?void 0:e.onClick)||void 0===r||r.call(e,t),D(t)},className:a()(null==e?void 0:e.className,"".concat(L,"-close-icon"))}))}}),A="function"==typeof k.onClick||p&&"a"===p.type,W=h||null,H=W?n.createElement(n.Fragment,null,W,p&&n.createElement("span",null,p)):p,V=n.createElement("span",Object.assign({},R,{ref:t,className:B,style:z}),H,q,T&&n.createElement(S,{key:"preset",prefixCls:L}),M&&n.createElement(j,{key:"status",prefixCls:L}));return I(A?n.createElement(u.Z,{component:"Tag"},V):V)});_.CheckableTag=x;var R=_},23910:function(e,t,r){var n=r(74288).Symbol;e.exports=n},54506:function(e,t,r){var n=r(23910),o=r(4479),a=r(80910),l=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":l&&l in Object(e)?o(e):a(e)}},55041:function(e,t,r){var n=r(5035),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},17071:function(e,t,r){var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},4479:function(e,t,r){var n=r(23910),o=Object.prototype,a=o.hasOwnProperty,l=o.toString,i=n?n.toStringTag:void 0;e.exports=function(e){var t=a.call(e,i),r=e[i];try{e[i]=void 0;var n=!0}catch(e){}var o=l.call(e);return n&&(t?e[i]=r:delete e[i]),o}},80910:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},74288:function(e,t,r){var n=r(17071),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},5035:function(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},7310:function(e,t,r){var n=r(28302),o=r(11121),a=r(6660),l=Math.max,i=Math.min;e.exports=function(e,t,r){var s,c,u,d,m,f,p=0,h=!1,b=!1,g=!0;if("function"!=typeof e)throw TypeError("Expected a function");function v(t){var r=s,n=c;return s=c=void 0,p=t,d=e.apply(n,r)}function y(e){var r=e-f,n=e-p;return void 0===f||r>=t||r<0||b&&n>=u}function w(){var e,r,n,a=o();if(y(a))return k(a);m=setTimeout(w,(e=a-f,r=a-p,n=t-e,b?i(n,u-r):n))}function k(e){return(m=void 0,g&&s)?v(e):(s=c=void 0,d)}function x(){var e,r=o(),n=y(r);if(s=arguments,c=this,f=r,n){if(void 0===m)return p=e=f,m=setTimeout(w,t),h?v(e):d;if(b)return clearTimeout(m),m=setTimeout(w,t),v(f)}return void 0===m&&(m=setTimeout(w,t)),d}return t=a(t)||0,n(r)&&(h=!!r.leading,u=(b="maxWait"in r)?l(a(r.maxWait)||0,t):u,g="trailing"in r?!!r.trailing:g),x.cancel=function(){void 0!==m&&clearTimeout(m),p=0,s=f=c=m=void 0},x.flush=function(){return void 0===m?d:k(o())},x}},28302:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},10303:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},78371:function(e,t,r){var n=r(54506),o=r(10303);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},11121:function(e,t,r){var n=r(74288);e.exports=function(){return n.Date.now()}},6660:function(e,t,r){var n=r(55041),o=r(28302),a=r(78371),l=0/0,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return l;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||c.test(e)?u(e.slice(2),r?2:8):i.test(e)?l:+e}},79205:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(2265);let o=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),l=e=>{let t=a(e);return t.charAt(0).toUpperCase()+t.slice(1)},i=function(){for(var e=arguments.length,t=Array(e),r=0;r!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()},s=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var c={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let u=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:u="",children:d,iconNode:m,...f}=e;return(0,n.createElement)("svg",{ref:t,...c,width:o,height:o,stroke:r,strokeWidth:l?24*Number(a)/Number(o):a,className:i("lucide",u),...!d&&!s(f)&&{"aria-hidden":"true"},...f},[...m.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(d)?d:[d]])}),d=(e,t)=>{let r=(0,n.forwardRef)((r,a)=>{let{className:s,...c}=r;return(0,n.createElement)(u,{ref:a,iconNode:t,className:i("lucide-".concat(o(l(e))),"lucide-".concat(e),s),...c})});return r.displayName=l(e),r}},30401:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},78867:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},32489:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},24601:function(){},18975:function(e,t,r){"use strict";var n=r(40257);r(24601);var o=r(2265),a=o&&"object"==typeof o&&"default"in o?o:{default:o},l=void 0!==n&&n.env&&!0,i=function(e){return"[object String]"===Object.prototype.toString.call(e)},s=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,o=t.optimizeForSpeed,a=void 0===o?l:o;c(i(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",c("boolean"==typeof a,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=a,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var s="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=s?s.getAttribute("content"):null}var t=e.prototype;return t.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},t.isOptimizeForSpeed=function(){return this._optimizeForSpeed},t.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,"undefined"!=typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(l||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},t.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t>>0},d={};function m(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return d[n]||(d[n]="jsx-"+u(e+"-"+r)),d[n]}function f(e,t){"undefined"==typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var r=e+t;return d[r]||(d[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),d[r]}var p=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,n=void 0===r?null:r,o=t.optimizeForSpeed,a=void 0!==o&&o;this._sheet=n||new s({name:"styled-jsx",optimizeForSpeed:a}),this._sheet.inject(),n&&"boolean"==typeof a&&(this._sheet.setOptimizeForSpeed(a),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"undefined"==typeof window||this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),n=r.styleId,o=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var a=o.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=a,this._instancesCounts[n]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],n=e[1];return a.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var o=m(n,r);return{styleId:o,rules:Array.isArray(t)?t.map(function(e){return f(o,e)}):[f(o,t)]}}return{styleId:m(n),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),h=o.createContext(null);h.displayName="StyleSheetContext";var b=a.default.useInsertionEffect||a.default.useLayoutEffect,g="undefined"!=typeof window?new p:void 0;function v(e){var t=g||o.useContext(h);return t&&("undefined"==typeof window?t.add(e):b(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}v.dynamic=function(e){return e.map(function(e){return m(e[0],e[1])}).join(" ")},t.style=v},29:function(e,t,r){"use strict";e.exports=r(18975).style},10900:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});t.Z=o},91777:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});t.Z=o},86462:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});t.Z=o},47686:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});t.Z=o},44633:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});t.Z=o},82182:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});t.Z=o},79814:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))});t.Z=o},93416:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});t.Z=o},77355:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=o},22452:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});t.Z=o},23628:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});t.Z=o},25327:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))});t.Z=o},49084:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});t.Z=o},74998:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});t.Z=o},3497:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"}))});t.Z=o},91054:function(e,t,r){"use strict";let n,o;r.d(t,{pJ:function(){return M}});var a,l=r(71049),i=r(11323),s=r(2265),c=r(66797),u=r(93980),d=r(65573),m=r(67561),f=r(98218),p=r(33443),h=r(28294),b=r(31370),g=r(72468),v=r(5664),y=r(38929);let w=null!=(a=s.startTransition)?a:function(e){e()};var k=r(52724),x=((n=x||{})[n.Open=0]="Open",n[n.Closed=1]="Closed",n),C=((o=C||{})[o.ToggleDisclosure=0]="ToggleDisclosure",o[o.CloseDisclosure=1]="CloseDisclosure",o[o.SetButtonId=2]="SetButtonId",o[o.SetPanelId=3]="SetPanelId",o[o.SetButtonElement=4]="SetButtonElement",o[o.SetPanelElement=5]="SetPanelElement",o);let E={0:e=>({...e,disclosureState:(0,g.E)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId},4:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},5:(e,t)=>e.panelElement===t.element?e:{...e,panelElement:t.element}},S=(0,s.createContext)(null);function O(e){let t=(0,s.useContext)(S);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,O),t}return t}S.displayName="DisclosureContext";let j=(0,s.createContext)(null);j.displayName="DisclosureAPIContext";let N=(0,s.createContext)(null);function _(e,t){return(0,g.E)(t.type,E,e,t)}N.displayName="DisclosurePanelContext";let R=s.Fragment,T=y.VN.RenderStrategy|y.VN.Static,M=Object.assign((0,y.yV)(function(e,t){let{defaultOpen:r=!1,...n}=e,o=(0,s.useRef)(null),a=(0,m.T)(t,(0,m.h)(e=>{o.current=e},void 0===e.as||e.as===s.Fragment)),l=(0,s.useReducer)(_,{disclosureState:r?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:i,buttonId:c},d]=l,f=(0,u.z)(e=>{d({type:1});let t=(0,v.r)(o);if(!t||!c)return;let r=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(c):t.getElementById(c);null==r||r.focus()}),b=(0,s.useMemo)(()=>({close:f}),[f]),w=(0,s.useMemo)(()=>({open:0===i,close:f}),[i,f]),k=(0,y.L6)();return s.createElement(S.Provider,{value:l},s.createElement(j.Provider,{value:b},s.createElement(p.Z,{value:f},s.createElement(h.up,{value:(0,g.E)(i,{0:h.ZM.Open,1:h.ZM.Closed})},k({ourProps:{ref:a},theirProps:n,slot:w,defaultTag:R,name:"Disclosure"})))))}),{Button:(0,y.yV)(function(e,t){let r=(0,s.useId)(),{id:n="headlessui-disclosure-button-".concat(r),disabled:o=!1,autoFocus:a=!1,...f}=e,[p,h]=O("Disclosure.Button"),g=(0,s.useContext)(N),v=null!==g&&g===p.panelId,w=(0,s.useRef)(null),x=(0,m.T)(w,t,(0,u.z)(e=>{if(!v)return h({type:4,element:e})}));(0,s.useEffect)(()=>{if(!v)return h({type:2,buttonId:n}),()=>{h({type:2,buttonId:null})}},[n,h,v]);let C=(0,u.z)(e=>{var t;if(v){if(1===p.disclosureState)return;switch(e.key){case k.R.Space:case k.R.Enter:e.preventDefault(),e.stopPropagation(),h({type:0}),null==(t=p.buttonElement)||t.focus()}}else switch(e.key){case k.R.Space:case k.R.Enter:e.preventDefault(),e.stopPropagation(),h({type:0})}}),E=(0,u.z)(e=>{e.key===k.R.Space&&e.preventDefault()}),S=(0,u.z)(e=>{var t;(0,b.P)(e.currentTarget)||o||(v?(h({type:0}),null==(t=p.buttonElement)||t.focus()):h({type:0}))}),{isFocusVisible:j,focusProps:_}=(0,l.F)({autoFocus:a}),{isHovered:R,hoverProps:T}=(0,i.X)({isDisabled:o}),{pressed:M,pressProps:P}=(0,c.x)({disabled:o}),z=(0,s.useMemo)(()=>({open:0===p.disclosureState,hover:R,active:M,disabled:o,focus:j,autofocus:a}),[p,R,M,j,o,a]),L=(0,d.f)(e,p.buttonElement),I=v?(0,y.dG)({ref:x,type:L,disabled:o||void 0,autoFocus:a,onKeyDown:C,onClick:S},_,T,P):(0,y.dG)({ref:x,id:n,type:L,"aria-expanded":0===p.disclosureState,"aria-controls":p.panelElement?p.panelId:void 0,disabled:o||void 0,autoFocus:a,onKeyDown:C,onKeyUp:E,onClick:S},_,T,P);return(0,y.L6)()({ourProps:I,theirProps:f,slot:z,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,y.yV)(function(e,t){let r=(0,s.useId)(),{id:n="headlessui-disclosure-panel-".concat(r),transition:o=!1,...a}=e,[l,i]=O("Disclosure.Panel"),{close:c}=function e(t){let r=(0,s.useContext)(j);if(null===r){let r=Error("<".concat(t," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(r,e),r}return r}("Disclosure.Panel"),[d,p]=(0,s.useState)(null),b=(0,m.T)(t,(0,u.z)(e=>{w(()=>i({type:5,element:e}))}),p);(0,s.useEffect)(()=>(i({type:3,panelId:n}),()=>{i({type:3,panelId:null})}),[n,i]);let g=(0,h.oJ)(),[v,k]=(0,f.Y)(o,d,null!==g?(g&h.ZM.Open)===h.ZM.Open:0===l.disclosureState),x=(0,s.useMemo)(()=>({open:0===l.disclosureState,close:c}),[l.disclosureState,c]),C={ref:b,id:n,...(0,f.X)(k)},E=(0,y.L6)();return s.createElement(h.uu,null,s.createElement(N.Provider,{value:l.panelId},E({ourProps:C,theirProps:a,slot:x,defaultTag:"div",features:T,visible:v,name:"Disclosure.Panel"})))})})},85238:function(e,t,r){"use strict";let n;r.d(t,{u:function(){return N}});var o=r(2265),a=r(59456),l=r(93980),i=r(25289),s=r(73389),c=r(43507),u=r(180),d=r(67561),m=r(98218),f=r(28294),p=r(95504),h=r(72468),b=r(38929);function g(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:C)!==o.Fragment||1===o.Children.count(e.children)}let v=(0,o.createContext)(null);v.displayName="TransitionContext";var y=((n=y||{}).Visible="visible",n.Hidden="hidden",n);let w=(0,o.createContext)(null);function k(e){return"children"in e?k(e.children):e.current.filter(e=>{let{el:t}=e;return null!==t.current}).filter(e=>{let{state:t}=e;return"visible"===t}).length>0}function x(e,t){let r=(0,c.E)(e),n=(0,o.useRef)([]),s=(0,i.t)(),u=(0,a.G)(),d=(0,l.z)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b.l4.Hidden,o=n.current.findIndex(t=>{let{el:r}=t;return r===e});-1!==o&&((0,h.E)(t,{[b.l4.Unmount](){n.current.splice(o,1)},[b.l4.Hidden](){n.current[o].state="hidden"}}),u.microTask(()=>{var e;!k(n)&&s.current&&(null==(e=r.current)||e.call(r))}))}),m=(0,l.z)(e=>{let t=n.current.find(t=>{let{el:r}=t;return r===e});return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>d(e,b.l4.Unmount)}),f=(0,o.useRef)([]),p=(0,o.useRef)(Promise.resolve()),g=(0,o.useRef)({enter:[],leave:[]}),v=(0,l.z)((e,r,n)=>{f.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter(t=>{let[r]=t;return r!==e})),null==t||t.chains.current[r].push([e,new Promise(e=>{f.current.push(e)})]),null==t||t.chains.current[r].push([e,new Promise(e=>{Promise.all(g.current[r].map(e=>{let[t,r]=e;return r})).then(()=>e())})]),"enter"===r?p.current=p.current.then(()=>null==t?void 0:t.wait.current).then(()=>n(r)):n(r)}),y=(0,l.z)((e,t,r)=>{Promise.all(g.current[t].splice(0).map(e=>{let[t,r]=e;return r})).then(()=>{var e;null==(e=f.current.shift())||e()}).then(()=>r(t))});return(0,o.useMemo)(()=>({children:n,register:m,unregister:d,onStart:v,onStop:y,wait:p,chains:g}),[m,d,n,v,y,g,p])}w.displayName="NestingContext";let C=o.Fragment,E=b.VN.RenderStrategy,S=(0,b.yV)(function(e,t){let{show:r,appear:n=!1,unmount:a=!0,...i}=e,c=(0,o.useRef)(null),m=g(e),p=(0,d.T)(...m?[c,t]:null===t?[]:[t]);(0,u.H)();let h=(0,f.oJ)();if(void 0===r&&null!==h&&(r=(h&f.ZM.Open)===f.ZM.Open),void 0===r)throw Error("A is used but it is missing a `show={true | false}` prop.");let[y,C]=(0,o.useState)(r?"visible":"hidden"),S=x(()=>{r||C("hidden")}),[j,N]=(0,o.useState)(!0),_=(0,o.useRef)([r]);(0,s.e)(()=>{!1!==j&&_.current[_.current.length-1]!==r&&(_.current.push(r),N(!1))},[_,r]);let R=(0,o.useMemo)(()=>({show:r,appear:n,initial:j}),[r,n,j]);(0,s.e)(()=>{r?C("visible"):k(S)||null===c.current||C("hidden")},[r,S]);let T={unmount:a},M=(0,l.z)(()=>{var t;j&&N(!1),null==(t=e.beforeEnter)||t.call(e)}),P=(0,l.z)(()=>{var t;j&&N(!1),null==(t=e.beforeLeave)||t.call(e)}),z=(0,b.L6)();return o.createElement(w.Provider,{value:S},o.createElement(v.Provider,{value:R},z({ourProps:{...T,as:o.Fragment,children:o.createElement(O,{ref:p,...T,...i,beforeEnter:M,beforeLeave:P})},theirProps:{},defaultTag:o.Fragment,features:E,visible:"visible"===y,name:"Transition"})))}),O=(0,b.yV)(function(e,t){var r,n;let{transition:a=!0,beforeEnter:i,afterEnter:c,beforeLeave:y,afterLeave:S,enter:O,enterFrom:j,enterTo:N,entered:_,leave:R,leaveFrom:T,leaveTo:M,...P}=e,[z,L]=(0,o.useState)(null),I=(0,o.useRef)(null),Z=g(e),F=(0,d.T)(...Z?[I,t,L]:null===t?[]:[t]),B=null==(r=P.unmount)||r?b.l4.Unmount:b.l4.Hidden,{show:D,appear:q,initial:A}=function(){let e=(0,o.useContext)(v);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[W,H]=(0,o.useState)(D?"visible":"hidden"),V=function(){let e=(0,o.useContext)(w);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:K,unregister:U}=V;(0,s.e)(()=>K(I),[K,I]),(0,s.e)(()=>{if(B===b.l4.Hidden&&I.current){if(D&&"visible"!==W){H("visible");return}return(0,h.E)(W,{hidden:()=>U(I),visible:()=>K(I)})}},[W,I,K,U,D,B]);let X=(0,u.H)();(0,s.e)(()=>{if(Z&&X&&"visible"===W&&null===I.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[I,W,X,Z]);let Y=A&&!q,G=q&&D&&A,$=(0,o.useRef)(!1),J=x(()=>{$.current||(H("hidden"),U(I))},V),Q=(0,l.z)(e=>{$.current=!0,J.onStart(I,e?"enter":"leave",e=>{"enter"===e?null==i||i():"leave"===e&&(null==y||y())})}),ee=(0,l.z)(e=>{let t=e?"enter":"leave";$.current=!1,J.onStop(I,t,e=>{"enter"===e?null==c||c():"leave"===e&&(null==S||S())}),"leave"!==t||k(J)||(H("hidden"),U(I))});(0,o.useEffect)(()=>{Z&&a||(Q(D),ee(D))},[D,Z,a]);let et=!(!a||!Z||!X||Y),[,er]=(0,m.Y)(et,z,D,{start:Q,end:ee}),en=(0,b.oA)({ref:F,className:(null==(n=(0,p.A)(P.className,G&&O,G&&j,er.enter&&O,er.enter&&er.closed&&j,er.enter&&!er.closed&&N,er.leave&&R,er.leave&&!er.closed&&T,er.leave&&er.closed&&M,!er.transition&&D&&_))?void 0:n.trim())||void 0,...(0,m.X)(er)}),eo=0;"visible"===W&&(eo|=f.ZM.Open),"hidden"===W&&(eo|=f.ZM.Closed),er.enter&&(eo|=f.ZM.Opening),er.leave&&(eo|=f.ZM.Closing);let ea=(0,b.L6)();return o.createElement(w.Provider,{value:J},o.createElement(f.up,{value:eo},ea({ourProps:en,theirProps:P,defaultTag:C,features:E,visible:"visible"===W,name:"Transition.Child"})))}),j=(0,b.yV)(function(e,t){let r=null!==(0,o.useContext)(v),n=null!==(0,f.oJ)();return o.createElement(o.Fragment,null,!r&&n?o.createElement(S,{ref:t,...e}):o.createElement(O,{ref:t,...e}))}),N=Object.assign(S,{Child:j,Root:S})},33443:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(2265);let o=(0,n.createContext)(()=>{});function a(e){let{value:t,children:r}=e;return n.createElement(o.Provider,{value:t},r)}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1176-9175d7684b344026.js b/litellm/proxy/_experimental/out/_next/static/chunks/1176-9175d7684b344026.js
deleted file mode 100644
index 753a61d0bbb..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/1176-9175d7684b344026.js
+++ /dev/null
@@ -1 +0,0 @@
-(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1176,1623],{5540:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(1119),a=n(2265),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},i=n(55015),s=a.forwardRef(function(e,t){return a.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:o}))})},69993:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(1119),a=n(2265),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},i=n(55015),s=a.forwardRef(function(e,t){return a.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:o}))})},55322:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(1119),a=n(2265),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},i=n(55015),s=a.forwardRef(function(e,t){return a.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:o}))})},59341:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var r=n(5853),a=n(71049),o=n(11323),i=n(2265),s=n(66797),l=n(40099),c=n(74275),u=n(59456),d=n(93980),h=n(65573),m=n(67561),f=n(87550),p=n(628),b=n(80281),g=n(31370),v=n(20131),y=n(38929),w=n(52307),k=n(52724),C=n(7935);let E=(0,i.createContext)(null);E.displayName="GroupContext";let O=i.Fragment,x=Object.assign((0,y.yV)(function(e,t){var n;let r=(0,i.useId)(),O=(0,b.Q)(),x=(0,f.B)(),{id:N=O||"headlessui-switch-".concat(r),disabled:S=x||!1,checked:M,defaultChecked:j,onChange:R,name:q,value:P,form:D,autoFocus:L=!1,...F}=e,T=(0,i.useContext)(E),[I,Z]=(0,i.useState)(null),z=(0,i.useRef)(null),V=(0,m.T)(z,t,null===T?null:T.setSwitch,Z),A=(0,c.L)(j),[B,Q]=(0,l.q)(M,R,null!=A&&A),_=(0,u.G)(),[H,K]=(0,i.useState)(!1),W=(0,d.z)(()=>{K(!0),null==Q||Q(!B),_.nextFrame(()=>{K(!1)})}),G=(0,d.z)(e=>{if((0,g.P)(e.currentTarget))return e.preventDefault();e.preventDefault(),W()}),J=(0,d.z)(e=>{e.key===k.R.Space?(e.preventDefault(),W()):e.key===k.R.Enter&&(0,v.g)(e.currentTarget)}),Y=(0,d.z)(e=>e.preventDefault()),X=(0,C.wp)(),U=(0,w.zH)(),{isFocusVisible:$,focusProps:ee}=(0,a.F)({autoFocus:L}),{isHovered:et,hoverProps:en}=(0,o.X)({isDisabled:S}),{pressed:er,pressProps:ea}=(0,s.x)({disabled:S}),eo=(0,i.useMemo)(()=>({checked:B,disabled:S,hover:et,focus:$,active:er,autofocus:L,changing:H}),[B,et,$,er,S,H,L]),ei=(0,y.dG)({id:N,ref:V,role:"switch",type:(0,h.f)(e,I),tabIndex:-1===e.tabIndex?0:null!=(n=e.tabIndex)?n:0,"aria-checked":B,"aria-labelledby":X,"aria-describedby":U,disabled:S||void 0,autoFocus:L,onClick:G,onKeyUp:J,onKeyPress:Y},ee,en,ea),es=(0,i.useCallback)(()=>{if(void 0!==A)return null==Q?void 0:Q(A)},[Q,A]),el=(0,y.L6)();return i.createElement(i.Fragment,null,null!=q&&i.createElement(p.Mt,{disabled:S,data:{[q]:P||"on"},overrides:{type:"checkbox",checked:B},form:D,onReset:es}),el({ourProps:ei,theirProps:F,slot:eo,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[n,r]=(0,i.useState)(null),[a,o]=(0,C.bE)(),[s,l]=(0,w.fw)(),c=(0,i.useMemo)(()=>({switch:n,setSwitch:r}),[n,r]),u=(0,y.L6)();return i.createElement(l,{name:"Switch.Description",value:s},i.createElement(o,{name:"Switch.Label",value:a,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){n&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},i.createElement(E.Provider,{value:c},u({ourProps:{},theirProps:e,slot:{},defaultTag:O,name:"Switch.Group"}))))},Label:C.__,Description:w.dk});var N=n(44140),S=n(26898),M=n(13241),j=n(1153),R=n(47187);let q=(0,j.fn)("Switch"),P=i.forwardRef((e,t)=>{let{checked:n,defaultChecked:a=!1,onChange:o,color:s,name:l,error:c,errorMessage:u,disabled:d,required:h,tooltip:m,id:f}=e,p=(0,r._T)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),b={bgColor:s?(0,j.bM)(s,S.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:s?(0,j.bM)(s,S.K.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[g,v]=(0,N.Z)(a,n),[y,w]=(0,i.useState)(!1),{tooltipProps:k,getReferenceProps:C}=(0,R.l)(300);return i.createElement("div",{className:"flex flex-row items-center justify-start"},i.createElement(R.Z,Object.assign({text:m},k)),i.createElement("div",Object.assign({ref:(0,j.lq)([t,k.refs.setReference]),className:(0,M.q)(q("root"),"flex flex-row relative h-5")},p,C),i.createElement("input",{type:"checkbox",className:(0,M.q)(q("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:l,required:h,checked:g,onChange:e=>{e.preventDefault()}}),i.createElement(x,{checked:g,onChange:e=>{v(e),null==o||o(e)},disabled:d,className:(0,M.q)(q("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",d?"cursor-not-allowed":""),onFocus:()=>w(!0),onBlur:()=>w(!1),id:f},i.createElement("span",{className:(0,M.q)(q("sr-only"),"sr-only")},"Switch ",g?"on":"off"),i.createElement("span",{"aria-hidden":"true",className:(0,M.q)(q("background"),g?b.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),i.createElement("span",{"aria-hidden":"true",className:(0,M.q)(q("round"),g?(0,M.q)(b.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",y?(0,M.q)("ring-2",b.ringColor):"")}))),c&&u?i.createElement("p",{className:(0,M.q)(q("errorMessage"),"text-sm text-red-500 mt-1 ")},u):null)});P.displayName="Switch"},49804:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(5853),a=n(13241),o=n(1153),i=n(2265),s=n(9496);let l=(0,o.fn)("Col"),c=i.forwardRef((e,t)=>{let{numColSpan:n=1,numColSpanSm:o,numColSpanMd:c,numColSpanLg:u,children:d,className:h}=e,m=(0,r._T)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),f=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return i.createElement("div",Object.assign({ref:t,className:(0,a.q)(l("root"),(()=>{let e=f(n,s.PT),t=f(o,s.SP),r=f(c,s.VS),i=f(u,s._w);return(0,a.q)(e,t,r,i)})(),h)},m),d)});c.displayName="Col"},35829:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(5853),a=n(26898),o=n(13241),i=n(1153),s=n(2265);let l=s.forwardRef((e,t)=>{let{color:n,children:l,className:c}=e,u=(0,r._T)(e,["color","children","className"]);return s.createElement("p",Object.assign({ref:t,className:(0,o.q)("font-semibold text-tremor-metric",n?(0,i.bM)(n,a.K.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",c)},u),l)});l.displayName="Metric"},33866:function(e,t,n){"use strict";n.d(t,{Z:function(){return D}});var r=n(2265),a=n(36760),o=n.n(a),i=n(66632),s=n(93350),l=n(19722),c=n(71744),u=n(93463),d=n(12918),h=n(18536),m=n(71140),f=n(99320);let p=new u.E4("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),b=new u.E4("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),g=new u.E4("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),v=new u.E4("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),y=new u.E4("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),w=new u.E4("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),k=e=>{let{componentCls:t,iconCls:n,antCls:r,badgeShadowSize:a,textFontSize:o,textFontSizeSM:i,statusSize:s,dotSize:l,textFontWeight:c,indicatorHeight:m,indicatorHeightSM:f,marginXS:k,calc:C}=e,E="".concat(r,"-scroll-number"),O=(0,h.Z)(e,(e,n)=>{let{darkColor:r}=n;return{["&".concat(t," ").concat(t,"-color-").concat(e)]:{background:r,["&:not(".concat(t,"-count)")]:{color:r},"a:hover &":{background:r}}}});return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,d.Wf)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,["".concat(t,"-count")]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:m,height:m,color:e.badgeTextColor,fontWeight:c,fontSize:o,lineHeight:(0,u.bf)(m),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:C(m).div(2).equal(),boxShadow:"0 0 0 ".concat((0,u.bf)(a)," ").concat(e.badgeShadowColor),transition:"background ".concat(e.motionDurationMid),a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},["".concat(t,"-count-sm")]:{minWidth:f,height:f,fontSize:i,lineHeight:(0,u.bf)(f),borderRadius:C(f).div(2).equal()},["".concat(t,"-multiple-words")]:{padding:"0 ".concat((0,u.bf)(e.paddingXS)),bdi:{unicodeBidi:"plaintext"}},["".concat(t,"-dot")]:{zIndex:e.indicatorZIndex,width:l,minWidth:l,height:l,background:e.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat((0,u.bf)(a)," ").concat(e.badgeShadowColor)},["".concat(t,"-count, ").concat(t,"-dot, ").concat(E,"-custom-component")]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",["&".concat(n,"-spin")]:{animationName:w,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&".concat(t,"-status")]:{lineHeight:"inherit",verticalAlign:"baseline",["".concat(t,"-status-dot")]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},["".concat(t,"-status-success")]:{backgroundColor:e.colorSuccess},["".concat(t,"-status-processing")]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:a,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:p,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},["".concat(t,"-status-default")]:{backgroundColor:e.colorTextPlaceholder},["".concat(t,"-status-error")]:{backgroundColor:e.colorError},["".concat(t,"-status-warning")]:{backgroundColor:e.colorWarning},["".concat(t,"-status-text")]:{marginInlineStart:k,color:e.colorText,fontSize:e.fontSize}}}),O),{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:b,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["".concat(t,"-zoom-leave")]:{animationName:g,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["&".concat(t,"-not-a-wrapper")]:{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["".concat(t,"-zoom-leave")]:{animationName:y,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["&:not(".concat(t,"-status)")]:{verticalAlign:"middle"},["".concat(E,"-custom-component, ").concat(t,"-count")]:{transform:"none"},["".concat(E,"-custom-component, ").concat(E)]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[E]:{overflow:"hidden",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseOutBack),["".concat(E,"-only")]:{position:"relative",display:"inline-block",height:m,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",["> p".concat(E,"-only-unit")]:{height:m,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},["".concat(E,"-symbol")]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",["".concat(t,"-count, ").concat(t,"-dot, ").concat(E,"-custom-component")]:{transform:"translate(-50%, -50%)"}}})}},C=e=>{let{fontHeight:t,lineWidth:n,marginXS:r,colorBorderBg:a}=e,o=e.colorTextLightSolid,i=e.colorError,s=e.colorErrorHover;return(0,m.IX)(e,{badgeFontHeight:t,badgeShadowSize:n,badgeTextColor:o,badgeColor:i,badgeColorHover:s,badgeShadowColor:a,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},E=e=>{let{fontSize:t,lineHeight:n,fontSizeSM:r,lineWidth:a}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*n)-2*a,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}};var O=(0,f.I$)("Badge",e=>k(C(e)),E);let x=e=>{let{antCls:t,badgeFontHeight:n,marginXS:r,badgeRibbonOffset:a,calc:o}=e,i="".concat(t,"-ribbon"),s=(0,h.Z)(e,(e,t)=>{let{darkColor:n}=t;return{["&".concat(i,"-color-").concat(e)]:{background:n,color:n}}});return{["".concat(t,"-ribbon-wrapper")]:{position:"relative"},[i]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,d.Wf)(e)),{position:"absolute",top:r,padding:"0 ".concat((0,u.bf)(e.paddingXS)),color:e.colorPrimary,lineHeight:(0,u.bf)(n),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,["".concat(i,"-text")]:{color:e.badgeTextColor},["".concat(i,"-corner")]:{position:"absolute",top:"100%",width:a,height:a,color:"currentcolor",border:"".concat((0,u.bf)(o(a).div(2).equal())," solid"),transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),s),{["&".concat(i,"-placement-end")]:{insetInlineEnd:o(a).mul(-1).equal(),borderEndEndRadius:0,["".concat(i,"-corner")]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},["&".concat(i,"-placement-start")]:{insetInlineStart:o(a).mul(-1).equal(),borderEndStartRadius:0,["".concat(i,"-corner")]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}};var N=(0,f.I$)(["Badge","Ribbon"],e=>x(C(e)),E);let S=e=>{let t;let{prefixCls:n,value:a,current:i,offset:s=0}=e;return s&&(t={position:"absolute",top:"".concat(s,"00%"),left:0}),r.createElement("span",{style:t,className:o()("".concat(n,"-only-unit"),{current:i})},a)};var M=e=>{let t,n;let{prefixCls:a,count:o,value:i}=e,s=Number(i),l=Math.abs(o),[c,u]=r.useState(s),[d,h]=r.useState(l),m=()=>{u(s),h(l)};if(r.useEffect(()=>{let e=setTimeout(m,1e3);return()=>clearTimeout(e)},[s]),c===s||Number.isNaN(s)||Number.isNaN(c))t=[r.createElement(S,Object.assign({},e,{key:s,current:!0}))],n={transition:"none"};else{t=[];let a=s+10,o=[];for(let e=s;e<=a;e+=1)o.push(e);let i=de%10===c);t=(i<0?o.slice(0,u+1):o.slice(u)).map((t,n)=>r.createElement(S,Object.assign({},e,{key:t,value:t%10,offset:i<0?n-u:n,current:n===u}))),n={transform:"translateY(".concat(-function(e,t,n){let r=e,a=0;for(;(r+10)%10!==t;)r+=n,a+=n;return a}(c,s,i),"00%)")}}return r.createElement("span",{className:"".concat(a,"-only"),style:n,onTransitionEnd:m},t)},j=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};let R=r.forwardRef((e,t)=>{let{prefixCls:n,count:a,className:i,motionClassName:s,style:u,title:d,show:h,component:m="sup",children:f}=e,p=j(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:b}=r.useContext(c.E_),g=b("scroll-number",n),v=Object.assign(Object.assign({},p),{"data-show":h,style:u,className:o()(g,i,s),title:d}),y=a;if(a&&Number(a)%1==0){let e=String(a).split("");y=r.createElement("bdi",null,e.map((t,n)=>r.createElement(M,{prefixCls:g,count:Number(a),value:t,key:e.length-n})))}return((null==u?void 0:u.borderColor)&&(v.style=Object.assign(Object.assign({},u),{boxShadow:"0 0 0 1px ".concat(u.borderColor," inset")})),f)?(0,l.Tm)(f,e=>({className:o()("".concat(g,"-custom-component"),null==e?void 0:e.className,s)})):r.createElement(m,Object.assign({},v,{ref:t}),y)});var q=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};let P=r.forwardRef((e,t)=>{var n,a,u,d,h;let{prefixCls:m,scrollNumberPrefixCls:f,children:p,status:b,text:g,color:v,count:y=null,overflowCount:w=99,dot:k=!1,size:C="default",title:E,offset:x,style:N,className:S,rootClassName:M,classNames:j,styles:P,showZero:D=!1}=e,L=q(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:F,direction:T,badge:I}=r.useContext(c.E_),Z=F("badge",m),[z,V,A]=O(Z),B=y>w?"".concat(w,"+"):y,Q="0"===B||0===B||"0"===g||0===g,_=null===y||Q&&!D,H=(null!=b||null!=v)&&_,K=null!=b||!Q,W=k&&!Q,G=W?"":B,J=(0,r.useMemo)(()=>((null==G||""===G)&&(null==g||""===g)||Q&&!D)&&!W,[G,Q,D,W,g]),Y=(0,r.useRef)(y);J||(Y.current=y);let X=Y.current,U=(0,r.useRef)(G);J||(U.current=G);let $=U.current,ee=(0,r.useRef)(W);J||(ee.current=W);let et=(0,r.useMemo)(()=>{if(!x)return Object.assign(Object.assign({},null==I?void 0:I.style),N);let e={marginTop:x[1]};return"rtl"===T?e.left=Number.parseInt(x[0],10):e.right=-Number.parseInt(x[0],10),Object.assign(Object.assign(Object.assign({},e),null==I?void 0:I.style),N)},[T,x,N,null==I?void 0:I.style]),en=null!=E?E:"string"==typeof X||"number"==typeof X?X:void 0,er=!J&&(0===g?D:!!g&&!0!==g),ea=er?r.createElement("span",{className:"".concat(Z,"-status-text")},g):null,eo=X&&"object"==typeof X?(0,l.Tm)(X,e=>({style:Object.assign(Object.assign({},et),e.style)})):void 0,ei=(0,s.o2)(v,!1),es=o()(null==j?void 0:j.indicator,null===(n=null==I?void 0:I.classNames)||void 0===n?void 0:n.indicator,{["".concat(Z,"-status-dot")]:H,["".concat(Z,"-status-").concat(b)]:!!b,["".concat(Z,"-color-").concat(v)]:ei}),el={};v&&!ei&&(el.color=v,el.background=v);let ec=o()(Z,{["".concat(Z,"-status")]:H,["".concat(Z,"-not-a-wrapper")]:!p,["".concat(Z,"-rtl")]:"rtl"===T},S,M,null==I?void 0:I.className,null===(a=null==I?void 0:I.classNames)||void 0===a?void 0:a.root,null==j?void 0:j.root,V,A);if(!p&&H&&(g||K||!_)){let e=et.color;return z(r.createElement("span",Object.assign({},L,{className:ec,style:Object.assign(Object.assign(Object.assign({},null==P?void 0:P.root),null===(u=null==I?void 0:I.styles)||void 0===u?void 0:u.root),et)}),r.createElement("span",{className:es,style:Object.assign(Object.assign(Object.assign({},null==P?void 0:P.indicator),null===(d=null==I?void 0:I.styles)||void 0===d?void 0:d.indicator),el)}),er&&r.createElement("span",{style:{color:e},className:"".concat(Z,"-status-text")},g)))}return z(r.createElement("span",Object.assign({ref:t},L,{className:ec,style:Object.assign(Object.assign({},null===(h=null==I?void 0:I.styles)||void 0===h?void 0:h.root),null==P?void 0:P.root)}),p,r.createElement(i.ZP,{visible:!J,motionName:"".concat(Z,"-zoom"),motionAppear:!1,motionDeadline:1e3},e=>{var t,n;let{className:a}=e,i=F("scroll-number",f),s=ee.current,l=o()(null==j?void 0:j.indicator,null===(t=null==I?void 0:I.classNames)||void 0===t?void 0:t.indicator,{["".concat(Z,"-dot")]:s,["".concat(Z,"-count")]:!s,["".concat(Z,"-count-sm")]:"small"===C,["".concat(Z,"-multiple-words")]:!s&&$&&$.toString().length>1,["".concat(Z,"-status-").concat(b)]:!!b,["".concat(Z,"-color-").concat(v)]:ei}),c=Object.assign(Object.assign(Object.assign({},null==P?void 0:P.indicator),null===(n=null==I?void 0:I.styles)||void 0===n?void 0:n.indicator),et);return v&&!ei&&((c=c||{}).background=v),r.createElement(R,{prefixCls:i,show:!J,motionClassName:a,className:l,count:$,title:en,style:c,key:"scrollNumber"},eo)}),ea))});P.Ribbon=e=>{let{className:t,prefixCls:n,style:a,color:i,children:l,text:u,placement:d="end",rootClassName:h}=e,{getPrefixCls:m,direction:f}=r.useContext(c.E_),p=m("ribbon",n),b="".concat(p,"-wrapper"),[g,v,y]=N(p,b),w=(0,s.o2)(i,!1),k=o()(p,"".concat(p,"-placement-").concat(d),{["".concat(p,"-rtl")]:"rtl"===f,["".concat(p,"-color-").concat(i)]:w},t),C={},E={};return i&&!w&&(C.background=i,E.color=i),g(r.createElement("div",{className:o()(b,h,v,y)},l,r.createElement("div",{className:o()(k,v),style:Object.assign(Object.assign({},C),a)},r.createElement("span",{className:"".concat(p,"-text")},u),r.createElement("div",{className:"".concat(p,"-corner"),style:E}))))};var D=P},15051:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},49322:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},99397:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},32489:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},86669:function(e,t,n){"use strict";n.d(t,{gc:function(){return w},jF:function(){return v}});var r=n(2265);let a=e=>"boolean"==typeof e||e instanceof Boolean,o=e=>"number"==typeof e||e instanceof Number,i=e=>"bigint"==typeof e||e instanceof BigInt,s=e=>!!e&&e instanceof Date,l=e=>"string"==typeof e||e instanceof String,c=e=>Array.isArray(e),u=e=>"object"==typeof e&&null!==e,d=e=>!!e&&e instanceof Object&&"function"==typeof e;function h(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function m(e){let{field:t,value:n,data:a,lastElement:o,openBracket:i,closeBracket:s,level:l,style:c,shouldExpandNode:u,clickToExpandNode:d,outerRef:m,beforeExpandChange:f}=e,p=(0,r.useRef)(!1),[b,v]=(0,r.useState)(()=>u(l,n,t)),y=(0,r.useRef)(null);(0,r.useEffect)(()=>{p.current?v(u(l,n,t)):p.current=!0},[u]);let w=(0,r.useId)();if(0===a.length)return function(e){let{field:t,openBracket:n,closeBracket:a,lastElement:o,style:i}=e;return(0,r.createElement)("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,r.createElement)("span",{className:i.label},h(t,i.quotesForFieldNames),":"),(0,r.createElement)("span",{className:i.punctuation},n),(0,r.createElement)("span",{className:i.punctuation},a),!o&&(0,r.createElement)("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:s,lastElement:o,style:c});let k=b?c.collapseIcon:c.expandIcon,C=b?c.ariaLables.collapseJson:c.ariaLables.expandJson,E=l+1,O=a.length-1,x=e=>{b!==e&&(!f||f({level:l,value:n,field:t,newExpandValue:e}))&&v(e)},N=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),x("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!m.current)return;let n=m.current.querySelectorAll("[role=button]"),r=-1;for(let e=0;e{var e;x(!b);let t=y.current;if(!t)return;let n=null===(e=m.current)||void 0===e?void 0:e.querySelector('[role=button][tabindex="0"]');n&&(n.tabIndex=-1),t.tabIndex=0,t.focus()};return(0,r.createElement)("div",{className:c.basicChildStyle,role:"treeitem","aria-expanded":b,"aria-selected":void 0},(0,r.createElement)("span",{className:k,onClick:S,onKeyDown:N,role:"button","aria-label":C,"aria-expanded":b,"aria-controls":b?w:void 0,ref:y,tabIndex:0===l?0:-1}),(t||""===t)&&(d?(0,r.createElement)("span",{className:c.clickableLabel,onClick:S,onKeyDown:N},h(t,c.quotesForFieldNames),":"):(0,r.createElement)("span",{className:c.label},h(t,c.quotesForFieldNames),":")),(0,r.createElement)("span",{className:c.punctuation},i),b?(0,r.createElement)("ul",{id:w,role:"group",className:c.childFieldsContainer},a.map((e,t)=>(0,r.createElement)(g,{key:e[0]||t,field:e[0],value:e[1],style:c,lastElement:t===O,level:E,shouldExpandNode:u,clickToExpandNode:d,beforeExpandChange:f,outerRef:m}))):(0,r.createElement)("span",{className:c.collapsedContent,onClick:S,onKeyDown:N}),(0,r.createElement)("span",{className:c.punctuation},s),!o&&(0,r.createElement)("span",{className:c.punctuation},","))}function f(e){let{field:t,value:n,style:r,lastElement:a,shouldExpandNode:o,clickToExpandNode:i,level:s,outerRef:l,beforeExpandChange:c}=e;return m({field:t,value:n,lastElement:a||!1,level:s,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:o,clickToExpandNode:i,data:Object.keys(n).map(e=>[e,n[e]]),outerRef:l,beforeExpandChange:c})}function p(e){let{field:t,value:n,style:r,lastElement:a,level:o,shouldExpandNode:i,clickToExpandNode:s,outerRef:l,beforeExpandChange:c}=e;return m({field:t,value:n,lastElement:a||!1,level:o,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:i,clickToExpandNode:s,data:n.map(e=>[void 0,e]),outerRef:l,beforeExpandChange:c})}function b(e){let t,{field:n,value:c,style:u,lastElement:m}=e,f=u.otherValue;if(null===c)t="null",f=u.nullValue;else if(void 0===c)t="undefined",f=u.undefinedValue;else if(l(c)){var p;p=!u.noQuotesForStringValues,t=u.stringifyStringValues?JSON.stringify(c):p?`"${c}"`:c,f=u.stringValue}else a(c)?(t=c?"true":"false",f=u.booleanValue):o(c)?(t=c.toString(),f=u.numberValue):i(c)?(t=`${c.toString()}n`,f=u.numberValue):t=s(c)?c.toISOString():d(c)?"function() { }":c.toString();return(0,r.createElement)("div",{className:u.basicChildStyle,role:"treeitem","aria-selected":void 0},(n||""===n)&&(0,r.createElement)("span",{className:u.label},h(n,u.quotesForFieldNames),":"),(0,r.createElement)("span",{className:f},t),!m&&(0,r.createElement)("span",{className:u.punctuation},","))}function g(e){let t=e.value;return c(t)?(0,r.createElement)(p,Object.assign({},e)):!u(t)||s(t)||d(t)?(0,r.createElement)(b,Object.assign({},e)):(0,r.createElement)(f,Object.assign({},e))}let v={container:"_2IvMF _GzYRV",basicChildStyle:"_2bkNM",childFieldsContainer:"_1BXBN",label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:{collapseJson:"collapse JSON",expandJson:"expand JSON"},stringifyStringValues:!1},y=()=>!0,w=e=>{let{data:t,style:n=v,shouldExpandNode:a=y,clickToExpandNode:o=!1,beforeExpandChange:i,compactTopLevel:s,...l}=e,c=(0,r.useRef)(null);return(0,r.createElement)("div",Object.assign({"aria-label":"JSON view"},l,{className:n.container,ref:c,role:"tree"}),s&&u(t)?Object.entries(t).map(e=>{let[t,s]=e;return(0,r.createElement)(g,{key:t,field:t,value:s,style:{...v,...n},lastElement:!0,level:1,shouldExpandNode:a,clickToExpandNode:o,beforeExpandChange:i,outerRef:c})}):(0,r.createElement)(g,{value:t,style:{...v,...n},lastElement:!0,level:0,shouldExpandNode:a,clickToExpandNode:o,outerRef:c,beforeExpandChange:i}))}},52621:function(){},10900:function(e,t,n){"use strict";var r=n(2265);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});t.Z=a},91777:function(e,t,n){"use strict";var r=n(2265);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});t.Z=a},47686:function(e,t,n){"use strict";var r=n(2265);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});t.Z=a},58710:function(e,t,n){"use strict";var r=n(2265);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=a},82182:function(e,t,n){"use strict";var r=n(2265);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});t.Z=a},79814:function(e,t,n){"use strict";var r=n(2265);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))});t.Z=a},2356:function(e,t,n){"use strict";var r=n(2265);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});t.Z=a},93416:function(e,t,n){"use strict";var r=n(2265);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});t.Z=a},77355:function(e,t,n){"use strict";var r=n(2265);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=a},22452:function(e,t,n){"use strict";var r=n(2265);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});t.Z=a},25327:function(e,t,n){"use strict";var r=n(2265);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))});t.Z=a},49084:function(e,t,n){"use strict";var r=n(2265);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});t.Z=a},3497:function(e,t,n){"use strict";var r=n(2265);let a=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"}))});t.Z=a},2894:function(e,t,n){"use strict";n.d(t,{R:function(){return s},m:function(){return i}});var r=n(18238),a=n(7989),o=n(11255),i=class extends a.F{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||s(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#a({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=(0,o.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#a({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r="pending"===this.state.status,a=!this.#r.canStart();try{if(r)t();else{this.#a({type:"pending",variables:e,isPaused:a}),await this.#n.config.onMutate?.(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:a})}let o=await this.#r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#a({type:"success",data:o}),o}catch(t){try{throw await this.#n.config.onError?.(t,e,this.state.context,this,n),await this.options.onError?.(t,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,t,e,this.state.context,n),t}finally{this.#a({type:"error",error:t})}}finally{this.#n.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),r.Vr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function s(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},21623:function(e,t,n){"use strict";n.d(t,{S:function(){return p}});var r=n(45345),a=n(21733),o=n(18238),i=n(24112),s=class extends i.l{constructor(e={}){super(),this.config=e,this.#o=new Map}#o;build(e,t,n){let o=t.queryKey,i=t.queryHash??(0,r.Rm)(o,t),s=this.get(i);return s||(s=new a.A({client:e,queryKey:o,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o)}),this.add(s)),s}add(e){this.#o.has(e.queryHash)||(this.#o.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#o.get(e.queryHash);t&&(e.destroy(),t===e&&this.#o.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){o.Vr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#o.get(e)}getAll(){return[...this.#o.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r._x)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,r._x)(e,t)):t}notify(e){o.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){o.Vr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){o.Vr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},l=n(2894),c=class extends i.l{constructor(e={}){super(),this.config=e,this.#i=new Set,this.#s=new Map,this.#l=0}#i;#s;#l;build(e,t,n){let r=new l.m({client:e,mutationCache:this,mutationId:++this.#l,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#i.add(e);let t=u(e);if("string"==typeof t){let n=this.#s.get(t);n?n.push(e):this.#s.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#i.delete(e)){let t=u(e);if("string"==typeof t){let n=this.#s.get(t);if(n){if(n.length>1){let t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#s.delete(t)}}}this.notify({type:"removed",mutation:e})}canRun(e){let t=u(e);if("string"!=typeof t)return!0;{let n=this.#s.get(t),r=n?.find(e=>"pending"===e.state.status);return!r||r===e}}runNext(e){let t=u(e);if("string"!=typeof t)return Promise.resolve();{let n=this.#s.get(t)?.find(t=>t!==e&&t.state.isPaused);return n?.continue()??Promise.resolve()}}clear(){o.Vr.batch(()=>{this.#i.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#i.clear(),this.#s.clear()})}getAll(){return Array.from(this.#i)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r.X7)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,r.X7)(e,t))}notify(e){o.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return o.Vr.batch(()=>Promise.all(e.map(e=>e.continue().catch(r.ZT))))}};function u(e){return e.options.scope?.id}var d=n(87045),h=n(57853);function m(e){return{onFetch:(t,n)=>{let a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],s=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},c=0,u=async()=>{let n=!1,u=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",()=>{n=!0}),t.signal)})},d=(0,r.cG)(t.options,t.fetchOptions),h=async(e,a,o)=>{if(n)return Promise.reject();if(null==a&&e.pages.length)return Promise.resolve(e);let i=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:a,direction:o?"backward":"forward",meta:t.options.meta};return u(e),e})(),s=await d(i),{maxPages:l}=t.options,c=o?r.Ht:r.VX;return{pages:c(e.pages,s,l),pageParams:c(e.pageParams,a,l)}};if(o&&i.length){let e="backward"===o,t={pages:i,pageParams:s},n=(e?function(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}:f)(a,t);l=await h(t,n,e)}else{let t=e??i.length;do{let e=0===c?s[0]??a.initialPageParam:f(a,l);if(c>0&&null==e)break;l=await h(l,e),c++}while(ct.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function f(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}var p=class{#c;#n;#u;#d;#h;#m;#f;#p;constructor(e={}){this.#c=e.queryCache||new s,this.#n=e.mutationCache||new c,this.#u=e.defaultOptions||{},this.#d=new Map,this.#h=new Map,this.#m=0}mount(){this.#m++,1===this.#m&&(this.#f=d.j.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#c.onFocus())}),this.#p=h.N.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#c.onOnline())}))}unmount(){this.#m--,0===this.#m&&(this.#f?.(),this.#f=void 0,this.#p?.(),this.#p=void 0)}isFetching(e){return this.#c.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#c.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#c.build(this,t),a=n.state.data;return void 0===a?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime((0,r.KC)(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#c.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let a=this.defaultQueryOptions({queryKey:e}),o=this.#c.get(a.queryHash),i=o?.state.data,s=(0,r.SE)(t,i);if(void 0!==s)return this.#c.build(this,a).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return o.Vr.batch(()=>this.#c.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#c.get(t.queryHash)?.state}removeQueries(e){let t=this.#c;o.Vr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#c;return o.Vr.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t};return Promise.all(o.Vr.batch(()=>this.#c.findAll(e).map(e=>e.cancel(n)))).then(r.ZT).catch(r.ZT)}invalidateQueries(e,t={}){return o.Vr.batch(()=>(this.#c.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(o.Vr.batch(()=>this.#c.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(r.ZT)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(r.ZT)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let n=this.#c.build(this,t);return n.isStaleByTime((0,r.KC)(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r.ZT).catch(r.ZT)}fetchInfiniteQuery(e){return e.behavior=m(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r.ZT).catch(r.ZT)}ensureInfiniteQueryData(e){return e.behavior=m(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return h.N.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#c}getMutationCache(){return this.#n}getDefaultOptions(){return this.#u}setDefaultOptions(e){this.#u=e}setQueryDefaults(e,t){this.#d.set((0,r.Ym)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#d.values()],n={};return t.forEach(t=>{(0,r.to)(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#h.set((0,r.Ym)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#h.values()],n={};return t.forEach(t=>{(0,r.to)(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#u.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,r.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===r.CN&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#u.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#c.clear(),this.#n.clear()}}},21770:function(e,t,n){"use strict";n.d(t,{D:function(){return u}});var r=n(2265),a=n(2894),o=n(18238),i=n(24112),s=n(45345),l=class extends i.l{#e;#b=void 0;#g;#v;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#y()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,s.VS)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#g,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,s.Ym)(t.mutationKey)!==(0,s.Ym)(this.options.mutationKey)?this.reset():this.#g?.state.status==="pending"&&this.#g.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#g?.removeObserver(this)}onMutationUpdate(e){this.#y(),this.#w(e)}getCurrentResult(){return this.#b}reset(){this.#g?.removeObserver(this),this.#g=void 0,this.#y(),this.#w()}mutate(e,t){return this.#v=t,this.#g?.removeObserver(this),this.#g=this.#e.getMutationCache().build(this.#e,this.options),this.#g.addObserver(this),this.#g.execute(e)}#y(){let e=this.#g?.state??(0,a.R)();this.#b={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#w(e){o.Vr.batch(()=>{if(this.#v&&this.hasListeners()){let t=this.#b.variables,n=this.#b.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type==="success"?(this.#v.onSuccess?.(e.data,t,n,r),this.#v.onSettled?.(e.data,null,t,n,r)):e?.type==="error"&&(this.#v.onError?.(e.error,t,n,r),this.#v.onSettled?.(void 0,e.error,t,n,r))}this.listeners.forEach(e=>{e(this.#b)})})}},c=n(29827);function u(e,t){let n=(0,c.NL)(t),[a]=r.useState(()=>new l(n,e));r.useEffect(()=>{a.setOptions(e)},[a,e]);let i=r.useSyncExternalStore(r.useCallback(e=>a.subscribe(o.Vr.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),u=r.useCallback((e,t)=>{a.mutate(e,t).catch(s.ZT)},[a]);if(i.error&&(0,s.L3)(a.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}},92668:function(e,t,n){"use strict";n.d(t,{I:function(){return s}});var r=n(59121),a=n(31091),o=n(63497),i=n(99649);function s(e,t){let{years:n=0,months:s=0,weeks:l=0,days:c=0,hours:u=0,minutes:d=0,seconds:h=0}=t,m=(0,i.Q)(e),f=s||n?(0,a.z)(m,s+12*n):m,p=c||l?(0,r.E)(f,c+7*l):f;return(0,o.L)(e,p.getTime()+1e3*(h+60*(d+60*u)))}},59121:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var r=n(99649),a=n(63497);function o(e,t){let n=(0,r.Q)(e);return isNaN(t)?(0,a.L)(e,NaN):(t&&n.setDate(n.getDate()+t),n)}},31091:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});var r=n(99649),a=n(63497);function o(e,t){let n=(0,r.Q)(e);if(isNaN(t))return(0,a.L)(e,NaN);if(!t)return n;let o=n.getDate(),i=(0,a.L)(e,n.getTime());return(i.setMonth(n.getMonth()+t+1,0),o>=i.getDate())?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}},63497:function(e,t,n){"use strict";function r(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}n.d(t,{L:function(){return r}})},99649:function(e,t,n){"use strict";function r(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}n.d(t,{Q:function(){return r}})}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1208-5caf6d9856cc3f13.js b/litellm/proxy/_experimental/out/_next/static/chunks/1208-5caf6d9856cc3f13.js
new file mode 100644
index 00000000000..de5590f1965
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/1208-5caf6d9856cc3f13.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1208],{44625:function(t,e,o){o.d(e,{Z:function(){return l}});var r=o(1119),n=o(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"},i=o(55015),l=n.forwardRef(function(t,e){return n.createElement(i.Z,(0,r.Z)({},t,{ref:e,icon:a}))})},46783:function(t,e,o){o.d(e,{Z:function(){return l}});var r=o(1119),n=o(2265),a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},i=o(55015),l=n.forwardRef(function(t,e){return n.createElement(i.Z,(0,r.Z)({},t,{ref:e,icon:a}))})},23907:function(t,e,o){o.d(e,{Z:function(){return l}});var r=o(1119),n=o(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"},i=o(55015),l=n.forwardRef(function(t,e){return n.createElement(i.Z,(0,r.Z)({},t,{ref:e,icon:a}))})},47323:function(t,e,o){o.d(e,{Z:function(){return f}});var r=o(5853),n=o(2265),a=o(47187),i=o(7084),l=o(13241),c=o(1153),s=o(26898);let d={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},u={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},g=(t,e)=>{switch(t){case"simple":return{textColor:e?(0,c.bM)(e,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:e?(0,c.bM)(e,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,l.q)((0,c.bM)(e,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:e?(0,c.bM)(e,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,l.q)((0,c.bM)(e,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:e?(0,c.bM)(e,s.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:e?(0,l.q)((0,c.bM)(e,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:e?(0,c.bM)(e,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,l.q)((0,c.bM)(e,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:e?(0,c.bM)(e,s.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:e?(0,l.q)((0,c.bM)(e,s.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},b=(0,c.fn)("Icon"),f=n.forwardRef((t,e)=>{let{icon:o,variant:s="simple",tooltip:f,size:p=i.u8.SM,color:h,className:v}=t,w=(0,r._T)(t,["icon","variant","tooltip","size","color","className"]),k=g(s,h),{tooltipProps:x,getReferenceProps:C}=(0,a.l)();return n.createElement("span",Object.assign({ref:(0,c.lq)([e,x.refs.setReference]),className:(0,l.q)(b("root"),"inline-flex shrink-0 items-center justify-center",k.bgColor,k.textColor,k.borderColor,k.ringColor,m[s].rounded,m[s].border,m[s].shadow,m[s].ring,d[p].paddingX,d[p].paddingY,v)},C,w),n.createElement(a.Z,Object.assign({text:f},x)),n.createElement(o,{className:(0,l.q)(b("icon"),"shrink-0",u[p].height,u[p].width)}))});f.displayName="Icon"},49804:function(t,e,o){o.d(e,{Z:function(){return s}});var r=o(5853),n=o(13241),a=o(1153),i=o(2265),l=o(9496);let c=(0,a.fn)("Col"),s=i.forwardRef((t,e)=>{let{numColSpan:o=1,numColSpanSm:a,numColSpanMd:s,numColSpanLg:d,children:u,className:m}=t,g=(0,r._T)(t,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),b=(t,e)=>t&&Object.keys(e).includes(String(t))?e[t]:"";return i.createElement("div",Object.assign({ref:e,className:(0,n.q)(c("root"),(()=>{let t=b(o,l.PT),e=b(a,l.SP),r=b(s,l.VS),i=b(d,l._w);return(0,n.q)(t,e,r,i)})(),m)},g),u)});s.displayName="Col"},33866:function(t,e,o){o.d(e,{Z:function(){return R}});var r=o(2265),n=o(36760),a=o.n(n),i=o(66632),l=o(93350),c=o(19722),s=o(71744),d=o(93463),u=o(12918),m=o(18536),g=o(71140),b=o(99320);let f=new d.E4("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),p=new d.E4("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),h=new d.E4("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),v=new d.E4("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),w=new d.E4("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),k=new d.E4("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),x=t=>{let{componentCls:e,iconCls:o,antCls:r,badgeShadowSize:n,textFontSize:a,textFontSizeSM:i,statusSize:l,dotSize:c,textFontWeight:s,indicatorHeight:g,indicatorHeightSM:b,marginXS:x,calc:C}=t,y="".concat(r,"-scroll-number"),O=(0,m.Z)(t,(t,o)=>{let{darkColor:r}=o;return{["&".concat(e," ").concat(e,"-color-").concat(t)]:{background:r,["&:not(".concat(e,"-count)")]:{color:r},"a:hover &":{background:r}}}});return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.Wf)(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,["".concat(e,"-count")]:{display:"inline-flex",justifyContent:"center",zIndex:t.indicatorZIndex,minWidth:g,height:g,color:t.badgeTextColor,fontWeight:s,fontSize:a,lineHeight:(0,d.bf)(g),whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:C(g).div(2).equal(),boxShadow:"0 0 0 ".concat((0,d.bf)(n)," ").concat(t.badgeShadowColor),transition:"background ".concat(t.motionDurationMid),a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},["".concat(e,"-count-sm")]:{minWidth:b,height:b,fontSize:i,lineHeight:(0,d.bf)(b),borderRadius:C(b).div(2).equal()},["".concat(e,"-multiple-words")]:{padding:"0 ".concat((0,d.bf)(t.paddingXS)),bdi:{unicodeBidi:"plaintext"}},["".concat(e,"-dot")]:{zIndex:t.indicatorZIndex,width:c,minWidth:c,height:c,background:t.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat((0,d.bf)(n)," ").concat(t.badgeShadowColor)},["".concat(e,"-count, ").concat(e,"-dot, ").concat(y,"-custom-component")]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",["&".concat(o,"-spin")]:{animationName:k,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&".concat(e,"-status")]:{lineHeight:"inherit",verticalAlign:"baseline",["".concat(e,"-status-dot")]:{position:"relative",top:-1,display:"inline-block",width:l,height:l,verticalAlign:"middle",borderRadius:"50%"},["".concat(e,"-status-success")]:{backgroundColor:t.colorSuccess},["".concat(e,"-status-processing")]:{overflow:"visible",color:t.colorInfo,backgroundColor:t.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:n,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:f,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},["".concat(e,"-status-default")]:{backgroundColor:t.colorTextPlaceholder},["".concat(e,"-status-error")]:{backgroundColor:t.colorError},["".concat(e,"-status-warning")]:{backgroundColor:t.colorWarning},["".concat(e,"-status-text")]:{marginInlineStart:x,color:t.colorText,fontSize:t.fontSize}}}),O),{["".concat(e,"-zoom-appear, ").concat(e,"-zoom-enter")]:{animationName:p,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},["".concat(e,"-zoom-leave")]:{animationName:h,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},["&".concat(e,"-not-a-wrapper")]:{["".concat(e,"-zoom-appear, ").concat(e,"-zoom-enter")]:{animationName:v,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},["".concat(e,"-zoom-leave")]:{animationName:w,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},["&:not(".concat(e,"-status)")]:{verticalAlign:"middle"},["".concat(y,"-custom-component, ").concat(e,"-count")]:{transform:"none"},["".concat(y,"-custom-component, ").concat(y)]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[y]:{overflow:"hidden",transition:"all ".concat(t.motionDurationMid," ").concat(t.motionEaseOutBack),["".concat(y,"-only")]:{position:"relative",display:"inline-block",height:g,transition:"all ".concat(t.motionDurationSlow," ").concat(t.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",["> p".concat(y,"-only-unit")]:{height:g,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},["".concat(y,"-symbol")]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",["".concat(e,"-count, ").concat(e,"-dot, ").concat(y,"-custom-component")]:{transform:"translate(-50%, -50%)"}}})}},C=t=>{let{fontHeight:e,lineWidth:o,marginXS:r,colorBorderBg:n}=t,a=t.colorTextLightSolid,i=t.colorError,l=t.colorErrorHover;return(0,g.IX)(t,{badgeFontHeight:e,badgeShadowSize:o,badgeTextColor:a,badgeColor:i,badgeColorHover:l,badgeShadowColor:n,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},y=t=>{let{fontSize:e,lineHeight:o,fontSizeSM:r,lineWidth:n}=t;return{indicatorZIndex:"auto",indicatorHeight:Math.round(e*o)-2*n,indicatorHeightSM:e,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}};var O=(0,b.I$)("Badge",t=>x(C(t)),y);let j=t=>{let{antCls:e,badgeFontHeight:o,marginXS:r,badgeRibbonOffset:n,calc:a}=t,i="".concat(e,"-ribbon"),l=(0,m.Z)(t,(t,e)=>{let{darkColor:o}=e;return{["&".concat(i,"-color-").concat(t)]:{background:o,color:o}}});return{["".concat(e,"-ribbon-wrapper")]:{position:"relative"},[i]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.Wf)(t)),{position:"absolute",top:r,padding:"0 ".concat((0,d.bf)(t.paddingXS)),color:t.colorPrimary,lineHeight:(0,d.bf)(o),whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,["".concat(i,"-text")]:{color:t.badgeTextColor},["".concat(i,"-corner")]:{position:"absolute",top:"100%",width:n,height:n,color:"currentcolor",border:"".concat((0,d.bf)(a(n).div(2).equal())," solid"),transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),l),{["&".concat(i,"-placement-end")]:{insetInlineEnd:a(n).mul(-1).equal(),borderEndEndRadius:0,["".concat(i,"-corner")]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},["&".concat(i,"-placement-start")]:{insetInlineStart:a(n).mul(-1).equal(),borderEndStartRadius:0,["".concat(i,"-corner")]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}};var S=(0,b.I$)(["Badge","Ribbon"],t=>j(C(t)),y);let E=t=>{let e;let{prefixCls:o,value:n,current:i,offset:l=0}=t;return l&&(e={position:"absolute",top:"".concat(l,"00%"),left:0}),r.createElement("span",{style:e,className:a()("".concat(o,"-only-unit"),{current:i})},n)};var N=t=>{let e,o;let{prefixCls:n,count:a,value:i}=t,l=Number(i),c=Math.abs(a),[s,d]=r.useState(l),[u,m]=r.useState(c),g=()=>{d(l),m(c)};if(r.useEffect(()=>{let t=setTimeout(g,1e3);return()=>clearTimeout(t)},[l]),s===l||Number.isNaN(l)||Number.isNaN(s))e=[r.createElement(E,Object.assign({},t,{key:l,current:!0}))],o={transition:"none"};else{e=[];let n=l+10,a=[];for(let t=l;t<=n;t+=1)a.push(t);let i=ut%10===s);e=(i<0?a.slice(0,d+1):a.slice(d)).map((e,o)=>r.createElement(E,Object.assign({},t,{key:e,value:e%10,offset:i<0?o-d:o,current:o===d}))),o={transform:"translateY(".concat(-function(t,e,o){let r=t,n=0;for(;(r+10)%10!==e;)r+=o,n+=o;return n}(s,l,i),"00%)")}}return r.createElement("span",{className:"".concat(n,"-only"),style:o,onTransitionEnd:g},e)},M=function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(t);ne.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(o[r[n]]=t[r[n]]);return o};let z=r.forwardRef((t,e)=>{let{prefixCls:o,count:n,className:i,motionClassName:l,style:d,title:u,show:m,component:g="sup",children:b}=t,f=M(t,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:p}=r.useContext(s.E_),h=p("scroll-number",o),v=Object.assign(Object.assign({},f),{"data-show":m,style:d,className:a()(h,i,l),title:u}),w=n;if(n&&Number(n)%1==0){let t=String(n).split("");w=r.createElement("bdi",null,t.map((e,o)=>r.createElement(N,{prefixCls:h,count:Number(n),value:e,key:t.length-o})))}return((null==d?void 0:d.borderColor)&&(v.style=Object.assign(Object.assign({},d),{boxShadow:"0 0 0 1px ".concat(d.borderColor," inset")})),b)?(0,c.Tm)(b,t=>({className:a()("".concat(h,"-custom-component"),null==t?void 0:t.className,l)})):r.createElement(g,Object.assign({},v,{ref:e}),w)});var B=function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(t);ne.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(o[r[n]]=t[r[n]]);return o};let Z=r.forwardRef((t,e)=>{var o,n,d,u,m;let{prefixCls:g,scrollNumberPrefixCls:b,children:f,status:p,text:h,color:v,count:w=null,overflowCount:k=99,dot:x=!1,size:C="default",title:y,offset:j,style:S,className:E,rootClassName:N,classNames:M,styles:Z,showZero:R=!1}=t,L=B(t,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:T,direction:I,badge:H}=r.useContext(s.E_),P=T("badge",g),[W,D,F]=O(P),q=w>k?"".concat(k,"+"):w,A="0"===q||0===q||"0"===h||0===h,X=null===w||A&&!R,_=(null!=p||null!=v)&&X,V=null!=p||!A,K=x&&!A,Y=K?"":q,G=(0,r.useMemo)(()=>((null==Y||""===Y)&&(null==h||""===h)||A&&!R)&&!K,[Y,A,R,K,h]),Q=(0,r.useRef)(w);G||(Q.current=w);let $=Q.current,J=(0,r.useRef)(Y);G||(J.current=Y);let U=J.current,tt=(0,r.useRef)(K);G||(tt.current=K);let te=(0,r.useMemo)(()=>{if(!j)return Object.assign(Object.assign({},null==H?void 0:H.style),S);let t={marginTop:j[1]};return"rtl"===I?t.left=Number.parseInt(j[0],10):t.right=-Number.parseInt(j[0],10),Object.assign(Object.assign(Object.assign({},t),null==H?void 0:H.style),S)},[I,j,S,null==H?void 0:H.style]),to=null!=y?y:"string"==typeof $||"number"==typeof $?$:void 0,tr=!G&&(0===h?R:!!h&&!0!==h),tn=tr?r.createElement("span",{className:"".concat(P,"-status-text")},h):null,ta=$&&"object"==typeof $?(0,c.Tm)($,t=>({style:Object.assign(Object.assign({},te),t.style)})):void 0,ti=(0,l.o2)(v,!1),tl=a()(null==M?void 0:M.indicator,null===(o=null==H?void 0:H.classNames)||void 0===o?void 0:o.indicator,{["".concat(P,"-status-dot")]:_,["".concat(P,"-status-").concat(p)]:!!p,["".concat(P,"-color-").concat(v)]:ti}),tc={};v&&!ti&&(tc.color=v,tc.background=v);let ts=a()(P,{["".concat(P,"-status")]:_,["".concat(P,"-not-a-wrapper")]:!f,["".concat(P,"-rtl")]:"rtl"===I},E,N,null==H?void 0:H.className,null===(n=null==H?void 0:H.classNames)||void 0===n?void 0:n.root,null==M?void 0:M.root,D,F);if(!f&&_&&(h||V||!X)){let t=te.color;return W(r.createElement("span",Object.assign({},L,{className:ts,style:Object.assign(Object.assign(Object.assign({},null==Z?void 0:Z.root),null===(d=null==H?void 0:H.styles)||void 0===d?void 0:d.root),te)}),r.createElement("span",{className:tl,style:Object.assign(Object.assign(Object.assign({},null==Z?void 0:Z.indicator),null===(u=null==H?void 0:H.styles)||void 0===u?void 0:u.indicator),tc)}),tr&&r.createElement("span",{style:{color:t},className:"".concat(P,"-status-text")},h)))}return W(r.createElement("span",Object.assign({ref:e},L,{className:ts,style:Object.assign(Object.assign({},null===(m=null==H?void 0:H.styles)||void 0===m?void 0:m.root),null==Z?void 0:Z.root)}),f,r.createElement(i.ZP,{visible:!G,motionName:"".concat(P,"-zoom"),motionAppear:!1,motionDeadline:1e3},t=>{var e,o;let{className:n}=t,i=T("scroll-number",b),l=tt.current,c=a()(null==M?void 0:M.indicator,null===(e=null==H?void 0:H.classNames)||void 0===e?void 0:e.indicator,{["".concat(P,"-dot")]:l,["".concat(P,"-count")]:!l,["".concat(P,"-count-sm")]:"small"===C,["".concat(P,"-multiple-words")]:!l&&U&&U.toString().length>1,["".concat(P,"-status-").concat(p)]:!!p,["".concat(P,"-color-").concat(v)]:ti}),s=Object.assign(Object.assign(Object.assign({},null==Z?void 0:Z.indicator),null===(o=null==H?void 0:H.styles)||void 0===o?void 0:o.indicator),te);return v&&!ti&&((s=s||{}).background=v),r.createElement(z,{prefixCls:i,show:!G,motionClassName:n,className:c,count:U,title:to,style:s,key:"scrollNumber"},ta)}),tn))});Z.Ribbon=t=>{let{className:e,prefixCls:o,style:n,color:i,children:c,text:d,placement:u="end",rootClassName:m}=t,{getPrefixCls:g,direction:b}=r.useContext(s.E_),f=g("ribbon",o),p="".concat(f,"-wrapper"),[h,v,w]=S(f,p),k=(0,l.o2)(i,!1),x=a()(f,"".concat(f,"-placement-").concat(u),{["".concat(f,"-rtl")]:"rtl"===b,["".concat(f,"-color-").concat(i)]:k},e),C={},y={};return i&&!k&&(C.background=i,y.color=i),h(r.createElement("div",{className:a()(p,m,v,w)},c,r.createElement("div",{className:a()(x,v),style:Object.assign(Object.assign({},C),n)},r.createElement("span",{className:"".concat(f,"-text")},d),r.createElement("div",{className:"".concat(f,"-corner"),style:y}))))};var R=Z},2651:function(t,e,o){o.d(e,{Z:function(){return w}});var r=o(93463),n=o(11938),a=o(70774),i=o(73602),l=o(91691),c=o(25119),s=o(37628),d=o(32417),u=o(4877),m=o(57943),g=o(12789),b=o(54558);let f=(t,e)=>new b.t(t).setA(e).toRgbString(),p=(t,e)=>new b.t(t).lighten(e).toHexString(),h=t=>{let e=(0,m.R_)(t,{theme:"dark"});return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[6],6:e[5],7:e[4],8:e[6],9:e[5],10:e[4]}},v=(t,e)=>{let o=t||"#000",r=e||"#fff";return{colorBgBase:o,colorTextBase:r,colorText:f(r,.85),colorTextSecondary:f(r,.65),colorTextTertiary:f(r,.45),colorTextQuaternary:f(r,.25),colorFill:f(r,.18),colorFillSecondary:f(r,.12),colorFillTertiary:f(r,.08),colorFillQuaternary:f(r,.04),colorBgSolid:f(r,.95),colorBgSolidHover:f(r,1),colorBgSolidActive:f(r,.9),colorBgElevated:p(o,12),colorBgContainer:p(o,8),colorBgLayout:p(o,0),colorBgSpotlight:p(o,26),colorBgBlur:f(r,.04),colorBorder:p(o,26),colorBorderSecondary:p(o,19)}};var w={defaultSeed:c.u_.token,useToken:function(){let[t,e,o]=(0,l.ZP)();return{theme:t,token:e,hashId:o}},defaultAlgorithm:s.Z,darkAlgorithm:(t,e)=>{let o=Object.keys(a.M).map(e=>{let o=(0,m.R_)(t[e],{theme:"dark"});return Array.from({length:10},()=>1).reduce((t,r,n)=>(t["".concat(e,"-").concat(n+1)]=o[n],t["".concat(e).concat(n+1)]=o[n],t),{})}).reduce((t,e)=>t=Object.assign(Object.assign({},t),e),{}),r=null!=e?e:(0,s.Z)(t),n=(0,g.Z)(t,{generateColorPalettes:h,generateNeutralColorPalettes:v});return Object.assign(Object.assign(Object.assign(Object.assign({},r),o),n),{colorPrimaryBg:n.colorPrimaryBorder,colorPrimaryBgHover:n.colorPrimaryBorderHover})},compactAlgorithm:(t,e)=>{let o=null!=e?e:(0,s.Z)(t),r=o.fontSizeSM,n=o.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),function(t){let{sizeUnit:e,sizeStep:o}=t,r=o-2;return{sizeXXL:e*(r+10),sizeXL:e*(r+6),sizeLG:e*(r+2),sizeMD:e*(r+2),sizeMS:e*(r+1),size:e*r,sizeSM:e*r,sizeXS:e*(r-1),sizeXXS:e*(r-1)}}(null!=e?e:t)),(0,u.Z)(r)),{controlHeight:n}),(0,d.Z)(Object.assign(Object.assign({},o),{controlHeight:n})))},getDesignToken:t=>{let e=(null==t?void 0:t.algorithm)?(0,r.jG)(t.algorithm):n.Z,o=Object.assign(Object.assign({},a.Z),null==t?void 0:t.token);return(0,r.t2)(o,{override:null==t?void 0:t.token},e,i.Z)},defaultConfig:c.u_,_internalContext:c.Mj}},10900:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.Z=n},86462:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.Z=n},44633:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.Z=n},3477:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.Z=n},53410:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.Z=n},91126:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.Z=n},23628:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.Z=n},49084:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.Z=n},74998:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.Z=n}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1658-2c9554a5b3840812.js b/litellm/proxy/_experimental/out/_next/static/chunks/1658-c301cddaf7772753.js
similarity index 98%
rename from litellm/proxy/_experimental/out/_next/static/chunks/1658-2c9554a5b3840812.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/1658-c301cddaf7772753.js
index 824c8bc9b96..730804d53de 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/1658-2c9554a5b3840812.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/1658-c301cddaf7772753.js
@@ -1 +1 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1658],{71658:function(e,l,t){t.d(l,{Z:function(){return l1}});var s=t(57437),a=t(19250),r=t(11713),i=t(90246),n=t(39760);let o=(0,i.n)("credentials"),d=()=>{let{accessToken:e}=(0,n.Z)();return(0,r.a)({queryKey:o.list({}),queryFn:async()=>await (0,a.credentialListCall)(e),enabled:!!e})},c=(0,i.n)("modelCostMap"),m=()=>(0,r.a)({queryKey:c.list({}),queryFn:async()=>await (0,a.modelCostMap)(),staleTime:6e4,gcTime:6e4});var u=t(52178),h=t(55584),x=t(47359),p=t(71594),g=t(24525),f=t(2265),j=t(19130),v=t(73705),_=t(5545),b=t(44633),y=t(86462),N=t(3837),w=t(49084);let Z=e=>{let{sortState:l,onSortChange:t}=e,a=[{key:"asc",label:"Ascending",icon:(0,s.jsx)(b.Z,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,s.jsx)(y.Z,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,s.jsx)(N.Z,{className:"h-4 w-4"})}];return(0,s.jsx)(v.Z,{menu:{items:a,onClick:e=>{let{key:l}=e;"asc"===l?t("asc"):"desc"===l?t("desc"):"reset"===l&&t(!1)},selectable:!0,selectedKeys:l?[l]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,s.jsx)(_.ZP,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===l?(0,s.jsx)(b.Z,{className:"h-4 w-4"}):"desc"===l?(0,s.jsx)(y.Z,{className:"h-4 w-4"}):(0,s.jsx)(w.Z,{className:"h-4 w-4"}),className:l?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})};function C(e){let{data:l=[],columns:t,isLoading:a=!1,sorting:r=[],onSortingChange:i,pagination:n,onPaginationChange:o,enablePagination:d=!1}=e,[c]=f.useState("onChange"),[m,u]=f.useState({}),[h,x]=f.useState({}),v=(0,p.b7)({data:l,columns:t,state:{sorting:r,columnSizing:m,columnVisibility:h,...d&&n?{pagination:n}:{}},columnResizeMode:c,onSortingChange:i,onColumnSizingChange:u,onColumnVisibilityChange:x,...d&&o?{onPaginationChange:o}:{},getCoreRowModel:(0,g.sC)(),...d?{getPaginationRowModel:(0,g.G_)()}:{},enableSorting:!0,enableColumnResizing:!0,manualSorting:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,s.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsx)("div",{className:"relative min-w-full",children:(0,s.jsxs)(j.iA,{className:"[&_td]:py-2 [&_th]:py-2 w-full",children:[(0,s.jsx)(j.ss,{children:v.getHeaderGroups().map(e=>(0,s.jsx)(j.SC,{children:e.headers.map(e=>{var l;return(0,s.jsxs)(j.xs,{className:"py-1 h-8 relative ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""," ").concat((null===(l=e.column.columnDef.meta)||void 0===l?void 0:l.className)||""),style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,p.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&i&&(0,s.jsx)(Z,{sortState:!1!==e.column.getIsSorted()&&e.column.getIsSorted(),onSortChange:l=>{!1===l?i([]):i([{id:e.column.id,desc:"desc"===l}])},columnId:e.column.id})]}),e.column.getCanResize()&&(0,s.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:"absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ".concat(e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200")})]},e.id)})},e.id))}),(0,s.jsx)(j.RM,{children:a?(0,s.jsx)(j.SC,{children:(0,s.jsx)(j.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"\uD83D\uDE85 Loading models..."})})})}):v.getRowModel().rows.length>0?v.getRowModel().rows.map(e=>(0,s.jsx)(j.SC,{children:e.getVisibleCells().map(e=>{var l;return(0,s.jsx)(j.pj,{className:"py-0.5 ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""," ").concat((null===(l=e.column.columnDef.meta)||void 0===l?void 0:l.className)||""),style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,p.ie)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):(0,s.jsx)(j.SC,{children:(0,s.jsx)(j.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"No models found"})})})})})]})})})})}var k=t(45589),S=t(74998),A=t(41649),E=t(78489),P=t(47323),M=t(99981),L=t(42673);let F=e=>{let{provider:l,className:t="w-4 h-4"}=e,[a,r]=(0,f.useState)(!1),{logo:i}=(0,L.dr)(l);return a||!i?(0,s.jsx)("div",{className:"".concat(t," rounded-full bg-gray-200 flex items-center justify-center text-xs"),children:(null==l?void 0:l.charAt(0))||"-"}):(0,s.jsx)("img",{src:i,alt:"".concat(l," logo"),className:t,onError:()=>r(!0)})},I=(e,l,t,a,r,i,n,o,d,c)=>[{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Model ID"}),accessorKey:"model_info.id",enableSorting:!1,cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)(M.Z,{title:t.model_info.id,children:(0,s.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>a(t.model_info.id),children:t.model_info.id})})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Model Information"}),accessorKey:"model_name",size:250,cell:e=>{let{row:l}=e,t=l.original,a=i(l.original)||"-",r=(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Provider:"})," ",t.provider||"-"]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Public Model Name:"})," ",a]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"LiteLLM Model Name:"})," ",t.litellm_model_name||"-"]})]});return(0,s.jsx)(M.Z,{title:r,children:(0,s.jsxs)("div",{className:"flex items-start space-x-2 min-w-0 w-full max-w-[250px]",children:[(0,s.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:t.provider?(0,s.jsx)(F,{provider:t.provider}):(0,s.jsx)("div",{className:"w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",children:"-"})}),(0,s.jsxs)("div",{className:"flex flex-col min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-xs font-medium text-gray-900 truncate max-w-[210px]",children:a}),(0,s.jsx)("div",{className:"text-xs text-gray-500 truncate mt-0.5 max-w-[210px]",children:t.litellm_model_name||"-"})]})]})})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Credentials"}),accessorKey:"litellm_credential_name",enableSorting:!1,size:180,cell:e=>{var l;let{row:t}=e,a=null===(l=t.original.litellm_params)||void 0===l?void 0:l.litellm_credential_name;return a?(0,s.jsx)(M.Z,{title:"Credential: ".concat(a),children:(0,s.jsxs)("div",{className:"flex items-center space-x-2 max-w-[180px]",children:[(0,s.jsx)(k.Z,{className:"w-4 h-4 text-blue-500 flex-shrink-0"}),(0,s.jsx)("span",{className:"text-xs truncate",title:a,children:a})]})}):(0,s.jsxs)("div",{className:"flex items-center space-x-2 max-w-[180px]",children:[(0,s.jsx)(k.Z,{className:"w-4 h-4 text-gray-300 flex-shrink-0"}),(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"No credentials"})]})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Created By"}),accessorKey:"model_info.created_by",sortingFn:"datetime",size:160,cell:e=>{var l;let{row:t}=e,a=t.original,r=!(null===(l=a.model_info)||void 0===l?void 0:l.db_model),i=a.model_info.created_by,n=a.model_info.created_at?new Date(a.model_info.created_at).toLocaleDateString():null;return(0,s.jsxs)("div",{className:"flex flex-col min-w-0 max-w-[160px]",children:[(0,s.jsx)("div",{className:"text-xs font-medium text-gray-900 truncate",title:r?"Defined in config":i||"Unknown",children:r?"Defined in config":i||"Unknown"}),(0,s.jsx)("div",{className:"text-xs text-gray-500 truncate mt-0.5",title:r?"Config file":n||"Unknown date",children:r?"-":n||"Unknown date"})]})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Updated At"}),accessorKey:"model_info.updated_at",sortingFn:"datetime",cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)("span",{className:"text-xs",children:t.model_info.updated_at?new Date(t.model_info.updated_at).toLocaleDateString():"-"})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Costs"}),accessorKey:"input_cost",size:120,cell:e=>{let{row:l}=e,t=l.original,a=t.input_cost,r=t.output_cost;return a||r?(0,s.jsx)(M.Z,{title:"Cost per 1M tokens",children:(0,s.jsxs)("div",{className:"flex flex-col min-w-0 max-w-[120px]",children:[a&&(0,s.jsxs)("div",{className:"text-xs font-medium text-gray-900 truncate",children:["In: $",a]}),r&&(0,s.jsxs)("div",{className:"text-xs text-gray-500 truncate mt-0.5",children:["Out: $",r]})]})}):(0,s.jsx)("div",{className:"max-w-[120px]",children:(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"-"})})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Team ID"}),accessorKey:"model_info.team_id",enableSorting:!1,cell:e=>{let{row:l}=e,t=l.original;return t.model_info.team_id?(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(M.Z,{title:t.model_info.team_id,children:(0,s.jsxs)(E.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>r(t.model_info.team_id),children:[t.model_info.team_id.slice(0,7),"..."]})})}):"-"}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Model Access Group"}),accessorKey:"model_info.model_access_group",enableSorting:!1,cell:e=>{let{row:l}=e,t=l.original,a=t.model_info.access_groups;if(!a||0===a.length)return"-";let r=t.model_info.id,i=d.has(r),n=a.length>1,o=()=>{let e=new Set(d);i?e.delete(r):e.add(r),c(e)};return(0,s.jsxs)("div",{className:"flex items-center gap-1 overflow-hidden",children:[(0,s.jsx)(A.Z,{size:"xs",color:"blue",className:"text-xs px-1.5 py-0.5 h-5 leading-tight flex-shrink-0",children:a[0]}),(i||!n&&2===a.length)&&a.slice(1).map((e,l)=>(0,s.jsx)(A.Z,{size:"xs",color:"blue",className:"text-xs px-1.5 py-0.5 h-5 leading-tight flex-shrink-0",children:e},l+1)),n&&(0,s.jsx)("button",{onClick:e=>{e.stopPropagation(),o()},className:"text-xs text-blue-600 hover:text-blue-800 px-1 py-0.5 rounded hover:bg-blue-50 h-5 leading-tight flex-shrink-0 whitespace-nowrap",children:i?"−":"+".concat(a.length-1)})]})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Status"}),accessorKey:"model_info.db_model",cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)("div",{className:"\n inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium\n ".concat(t.model_info.db_model?"bg-blue-50 text-blue-600":"bg-gray-100 text-gray-600","\n "),children:t.model_info.db_model?"DB Model":"Config Model"})}},{id:"actions",header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Actions"}),cell:t=>{var r,i;let{row:n}=t,o=n.original,d="Admin"===e||(null===(r=o.model_info)||void 0===r?void 0:r.created_by)===l,c=!(null===(i=o.model_info)||void 0===i?void 0:i.db_model);return(0,s.jsx)("div",{className:"flex items-center justify-end gap-2 pr-4",children:c?(0,s.jsx)(M.Z,{title:"Config model cannot be deleted on the dashboard. Please delete it from the config file.",children:(0,s.jsx)(P.Z,{icon:S.Z,size:"sm",className:"opacity-50 cursor-not-allowed"})}):(0,s.jsx)(M.Z,{title:"Delete model",children:(0,s.jsx)(P.Z,{icon:S.Z,size:"sm",onClick:()=>{d&&a(o.model_info.id)},className:d?"cursor-pointer hover:text-red-600":"opacity-50 cursor-not-allowed"})})})}}],T=e=>{var l;return(null==e?void 0:null===(l=e.model_info)||void 0===l?void 0:l.team_public_model_name)?e.model_info.team_public_model_name:(null==e?void 0:e.model_name)||"-"};var R=t(15424),O=t(67101),V=t(27281),q=t(57365),z=t(29706),D=t(84264),B=t(50337),G=t(10353),U=t(7310),H=t.n(U);let K=(e,l)=>{if(!(null==e?void 0:e.data))return{data:[]};let t=JSON.parse(JSON.stringify(e.data));for(let e=0;e{let[l]=e;return"model"!==l&&"api_base"!==l}))),t[e].provider=c,t[e].input_cost=m,t[e].output_cost=u,t[e].litellm_model_name=n,t[e].input_cost&&(t[e].input_cost=(1e6*Number(t[e].input_cost)).toFixed(2)),t[e].output_cost&&(t[e].output_cost=(1e6*Number(t[e].output_cost)).toFixed(2)),t[e].max_tokens=h,t[e].max_input_tokens=x,t[e].api_base=null==i?void 0:null===(r=i.litellm_params)||void 0===r?void 0:r.api_base,t[e].cleanedLitellmParams=p}return{data:t}};var J=e=>{let{selectedModelGroup:l,setSelectedModelGroup:t,availableModelGroups:a,availableModelAccessGroups:r,setSelectedModelId:i,setSelectedTeamId:o}=e,{data:d,isLoading:c}=m(),{userId:h,userRole:p,premiumUser:g}=(0,n.Z)(),{data:j,isLoading:v}=(0,x.y2)(),[_,b]=(0,f.useState)(""),[y,N]=(0,f.useState)(""),[w,Z]=(0,f.useState)("current_team"),[k,S]=(0,f.useState)("personal"),[A,E]=(0,f.useState)(!1),[P,M]=(0,f.useState)(null),[L,F]=(0,f.useState)(new Set),[U,J]=(0,f.useState)(1),[W]=(0,f.useState)(50),[Y,$]=(0,f.useState)({pageIndex:0,pageSize:50}),[X,Q]=(0,f.useState)([]),ee=(0,f.useMemo)(()=>H()(e=>{N(e),J(1),$(e=>({...e,pageIndex:0}))},200),[]);(0,f.useEffect)(()=>(ee(_),()=>{ee.cancel()}),[_,ee]);let el="personal"===k?void 0:k.team_id,et=(0,f.useMemo)(()=>{if(0===X.length)return;let e=X[0];return({input_cost:"costs",model_info_db_model:"status",model_info_created_by:"created_at",model_info_updated_at:"updated_at"})[e.id]||e.id},[X]),es=(0,f.useMemo)(()=>{if(0!==X.length)return X[0].desc?"desc":"asc"},[X]),{data:ea,isLoading:er}=(0,u.XP)(U,W,y||void 0,void 0,el,et,es),ei=er||c,en=e=>null!=d&&"object"==typeof d&&e in d?d[e].litellm_provider:"openai",eo=(0,f.useMemo)(()=>ea?K(ea,en):{data:[]},[ea,d]),ed=(0,f.useMemo)(()=>{var e,l,t,s;return ea?{total_count:null!==(e=ea.total_count)&&void 0!==e?e:0,current_page:null!==(l=ea.current_page)&&void 0!==l?l:1,total_pages:null!==(t=ea.total_pages)&&void 0!==t?t:1,size:null!==(s=ea.size)&&void 0!==s?s:W}:{total_count:0,current_page:1,total_pages:1,size:W}},[ea,W]),ec=(0,f.useMemo)(()=>eo&&eo.data&&0!==eo.data.length?eo.data.filter(e=>{var t,s;let a="all"===l||e.model_name===l||!l||"wildcard"===l&&(null===(t=e.model_name)||void 0===t?void 0:t.includes("*")),r="all"===P||(null===(s=e.model_info.access_groups)||void 0===s?void 0:s.includes(P))||!P;return a&&r}):[],[eo,l,P]);return(0,f.useEffect)(()=>{$(e=>({...e,pageIndex:0})),J(1)},[l,P]),(0,f.useEffect)(()=>{J(1),$(e=>({...e,pageIndex:0}))},[el]),(0,f.useEffect)(()=>{J(1),$(e=>({...e,pageIndex:0}))},[X]),(0,s.jsx)(z.Z,{children:(0,s.jsx)(O.Z,{children:(0,s.jsx)("div",{className:"flex flex-col space-y-4",children:(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,s.jsxs)("div",{className:"border-b px-6 py-4 bg-gray-50",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)(D.Z,{className:"text-lg font-semibold text-gray-900",children:"Current Team:"}),ei?(0,s.jsx)(B.Z.Input,{active:!0,style:{width:320,height:36}}):(0,s.jsxs)(V.Z,{className:"w-80",defaultValue:"personal",value:"personal"===k?"personal":k.team_id,onValueChange:e=>{if("personal"===e)S("personal"),J(1),$(e=>({...e,pageIndex:0}));else{let l=null==j?void 0:j.find(l=>l.team_id===e);l&&(S(l),J(1),$(e=>({...e,pageIndex:0})))}},children:[(0,s.jsx)(q.Z,{value:"personal",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:"Personal"})]})}),v?(0,s.jsx)(q.Z,{value:"loading",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(G.Z,{size:"small"}),(0,s.jsx)("span",{className:"font-medium text-gray-500",children:"Loading teams..."})]})}):null==j?void 0:j.filter(e=>e.team_id).map(e=>(0,s.jsx)(q.Z,{value:e.team_id,children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:e.team_alias?"".concat(e.team_alias.slice(0,30),"..."):"Team ".concat(e.team_id.slice(0,30),"...")})]})},e.team_id))]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)(D.Z,{className:"text-lg font-semibold text-gray-900",children:"View:"}),ei?(0,s.jsx)(B.Z.Input,{active:!0,style:{width:256,height:36}}):(0,s.jsxs)(V.Z,{className:"w-64",defaultValue:"current_team",value:w,onValueChange:e=>Z(e),children:[(0,s.jsx)(q.Z,{value:"current_team",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-purple-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:"Current Team Models"})]})}),(0,s.jsx)(q.Z,{value:"all",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-gray-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:"All Available Models"})]})})]})]})]}),"current_team"===w&&(0,s.jsxs)("div",{className:"flex items-start gap-2 mt-3",children:[(0,s.jsx)(R.Z,{className:"text-gray-400 mt-0.5 flex-shrink-0 text-xs"}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"personal"===k?(0,s.jsxs)("span",{children:["To access these models: Create a Virtual Key without selecting a team on the"," ",(0,s.jsx)("a",{href:"/public?login=success&page=api-keys",className:"text-gray-600 hover:text-gray-800 underline",children:"Virtual Keys page"})]}):(0,s.jsxs)("span",{children:['To access these models: Create a Virtual Key and select Team as "',"string"!=typeof k?k.team_alias||k.team_id:"",'" on the'," ",(0,s.jsx)("a",{href:"/public?login=success&page=api-keys",className:"text-gray-600 hover:text-gray-800 underline",children:"Virtual Keys page"})]})})]})]}),(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("div",{className:"relative w-64",children:[(0,s.jsx)("input",{type:"text",placeholder:"Search model names...",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:_,onChange:e=>b(e.target.value)}),(0,s.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,s.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 ".concat(A?"bg-gray-100":""),onClick:()=>E(!A),children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),"Filters"]}),(0,s.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:()=>{b(""),t("all"),M(null),S("personal"),Z("current_team"),J(1),$({pageIndex:0,pageSize:50}),Q([])},children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Reset Filters"]})]}),A&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsx)("div",{className:"w-64",children:(0,s.jsxs)(V.Z,{value:null!=l?l:"all",onValueChange:e=>t("all"===e?"all":e),placeholder:"Filter by Public Model Name",children:[(0,s.jsx)(q.Z,{value:"all",children:"All Models"}),(0,s.jsx)(q.Z,{value:"wildcard",children:"Wildcard Models (*)"}),a.map((e,l)=>(0,s.jsx)(q.Z,{value:e,children:e},l))]})}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsxs)(V.Z,{value:null!=P?P:"all",onValueChange:e=>M("all"===e?null:e),placeholder:"Filter by Model Access Group",children:[(0,s.jsx)(q.Z,{value:"all",children:"All Model Access Groups"}),r.map((e,l)=>(0,s.jsx)(q.Z,{value:e,children:e},l))]})})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[ei?(0,s.jsx)(B.Z.Input,{active:!0,style:{width:184,height:20}}):(0,s.jsx)("span",{className:"text-sm text-gray-700",children:ed.total_count>0?"Showing ".concat((U-1)*W+1," - ").concat(Math.min(U*W,ed.total_count)," of ").concat(ed.total_count," results"):"Showing 0 results"}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[ei?(0,s.jsx)(B.Z.Button,{active:!0,style:{width:84,height:30}}):(0,s.jsx)("button",{onClick:()=>{J(U-1),$(e=>({...e,pageIndex:0}))},disabled:1===U,className:"px-3 py-1 text-sm border rounded-md ".concat(1===U?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"),children:"Previous"}),ei?(0,s.jsx)(B.Z.Button,{active:!0,style:{width:56,height:30}}):(0,s.jsx)("button",{onClick:()=>{J(U+1),$(e=>({...e,pageIndex:0}))},disabled:U>=ed.total_pages,className:"px-3 py-1 text-sm border rounded-md ".concat(U>=ed.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"),children:"Next"})]})]})]})}),(0,s.jsx)(C,{columns:I(p,h,g,i,o,T,()=>{},()=>{},L,F),data:ec,isLoading:er,sorting:X,onSortingChange:Q,pagination:Y,onPaginationChange:$,enablePagination:!0})]})})})})},W=t(96761),Y=t(19015);let $={"BadRequestError (400)":"BadRequestErrorRetries","AuthenticationError (401)":"AuthenticationErrorRetries","TimeoutError (408)":"TimeoutErrorRetries","RateLimitError (429)":"RateLimitErrorRetries","ContentPolicyViolationError (400)":"ContentPolicyViolationErrorRetries","InternalServerError (500)":"InternalServerErrorRetries"};var X=e=>{let{selectedModelGroup:l,setSelectedModelGroup:t,availableModelGroups:a,globalRetryPolicy:r,setGlobalRetryPolicy:i,defaultRetry:n,modelGroupRetryPolicy:o,setModelGroupRetryPolicy:d,handleSaveRetrySettings:c}=e;return(0,s.jsxs)(z.Z,{children:[(0,s.jsx)("div",{className:"flex items-center gap-4 mb-6",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(D.Z,{children:"Retry Policy Scope:"}),(0,s.jsxs)(V.Z,{className:"ml-2 w-48",defaultValue:"global",value:"global"===l?"global":l||a[0],onValueChange:e=>t(e),children:[(0,s.jsx)(q.Z,{value:"global",children:"Global Default"}),a.map((e,l)=>(0,s.jsx)(q.Z,{value:e,onClick:()=>t(e),children:e},l))]})]})}),"global"===l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(W.Z,{children:"Global Retry Policy"}),(0,s.jsx)(D.Z,{className:"mb-6",children:"Default retry settings applied to all model groups unless overridden"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(W.Z,{children:["Retry Policy for ",l]}),(0,s.jsx)(D.Z,{className:"mb-6",children:"Model-specific retry settings. Falls back to global defaults if not set."})]}),$&&(0,s.jsx)("table",{children:(0,s.jsx)("tbody",{children:Object.entries($).map((e,t)=>{var a,c,m,u;let h,[x,p]=e;if("global"===l)h=null!==(a=null==r?void 0:r[p])&&void 0!==a?a:n;else{let e=null==o?void 0:null===(c=o[l])||void 0===c?void 0:c[p];h=null!=e?e:null!==(m=null==r?void 0:r[p])&&void 0!==m?m:n}return(0,s.jsxs)("tr",{className:"flex justify-between items-center mt-2",children:[(0,s.jsxs)("td",{children:[(0,s.jsx)(D.Z,{children:x}),"global"!==l&&(0,s.jsxs)(D.Z,{className:"text-xs text-gray-500 ml-2",children:["(Global: ",null!==(u=null==r?void 0:r[p])&&void 0!==u?u:n,")"]})]}),(0,s.jsx)("td",{children:(0,s.jsx)(Y.Z,{className:"ml-5",value:h,min:0,step:1,onChange:e=>{"global"===l?i(l=>null==e?l:{...null!=l?l:{},[p]:e}):d(t=>{var s;let a=null!==(s=null==t?void 0:t[l])&&void 0!==s?s:{};return{...null!=t?t:{},[l]:{...a,[p]:e}}})}})})]},t)})})}),(0,s.jsx)(E.Z,{className:"mt-6 mr-8",onClick:c,children:"Save"})]})},Q=t(57840),ee=t(58760),el=t(867),et=t(5945),es=t(3810),ea=t(22116),er=t(89245),ei=t(5540),en=t(8881),eo=t(9114);let{Text:ed}=Q.default;var ec=e=>{let{accessToken:l,onReloadSuccess:t,buttonText:r="Reload Price Data",showIcon:i=!0,size:n="middle",type:o="primary",className:d=""}=e,[c,m]=(0,f.useState)(!1),[u,h]=(0,f.useState)(!1),[x,p]=(0,f.useState)(!1),[g,j]=(0,f.useState)(!1),[v,b]=(0,f.useState)(6),[y,N]=(0,f.useState)(null),[w,Z]=(0,f.useState)(!1);(0,f.useEffect)(()=>{C();let e=setInterval(()=>{C()},3e4);return()=>clearInterval(e)},[l]);let C=async()=>{if(l){Z(!0);try{console.log("Fetching reload status...");let e=await (0,a.getModelCostMapReloadStatus)(l);console.log("Received status:",e),N(e)}catch(e){console.error("Failed to fetch reload status:",e),N({scheduled:!1,interval_hours:null,last_run:null,next_run:null})}finally{Z(!1)}}},k=async()=>{if(!l){eo.Z.fromBackend("No access token available");return}m(!0);try{let e=await (0,a.reloadModelCostMap)(l);"success"===e.status?(eo.Z.success("Price data reloaded successfully! ".concat(e.models_count||0," models updated.")),null==t||t(),await C()):eo.Z.fromBackend("Failed to reload price data")}catch(e){console.error("Error reloading price data:",e),eo.Z.fromBackend("Failed to reload price data. Please try again.")}finally{m(!1)}},S=async()=>{if(!l){eo.Z.fromBackend("No access token available");return}if(v<=0){eo.Z.fromBackend("Hours must be greater than 0");return}h(!0);try{let e=await (0,a.scheduleModelCostMapReload)(l,v);"success"===e.status?(eo.Z.success("Periodic reload scheduled for every ".concat(v," hours")),j(!1),await C()):eo.Z.fromBackend("Failed to schedule periodic reload")}catch(e){console.error("Error scheduling reload:",e),eo.Z.fromBackend("Failed to schedule periodic reload. Please try again.")}finally{h(!1)}},A=async()=>{if(!l){eo.Z.fromBackend("No access token available");return}p(!0);try{let e=await (0,a.cancelModelCostMapReload)(l);"success"===e.status?(eo.Z.success("Periodic reload cancelled successfully"),await C()):eo.Z.fromBackend("Failed to cancel periodic reload")}catch(e){console.error("Error cancelling reload:",e),eo.Z.fromBackend("Failed to cancel periodic reload. Please try again.")}finally{p(!1)}},E=e=>{if(!e)return"Never";try{return new Date(e).toLocaleString()}catch(l){return e}};return(0,s.jsxs)("div",{className:d,children:[(0,s.jsxs)(ee.Z,{direction:"horizontal",size:"middle",style:{marginBottom:16},children:[(0,s.jsx)(el.Z,{title:"Hard Refresh Price Data",description:"This will immediately fetch the latest pricing information from the remote source. Continue?",onConfirm:k,okText:"Yes",cancelText:"No",okButtonProps:{style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem",transition:"all 0.2s ease-in-out"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#4f46e5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1"}},children:(0,s.jsx)(_.ZP,{type:o,size:n,loading:c,icon:i?(0,s.jsx)(er.Z,{}):void 0,style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem",transition:"all 0.2s ease-in-out"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#4f46e5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1"},children:r})}),(null==y?void 0:y.scheduled)?(0,s.jsx)(_.ZP,{type:"default",size:n,danger:!0,icon:(0,s.jsx)(en.Z,{}),loading:x,onClick:A,style:{borderColor:"#ff4d4f",color:"#ff4d4f",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem"},children:"Cancel Periodic Reload"}):(0,s.jsx)(_.ZP,{type:"default",size:n,icon:(0,s.jsx)(ei.Z,{}),onClick:()=>j(!0),style:{borderColor:"#d9d9d9",color:"#6366f1",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem"},children:"Set Up Periodic Reload"})]}),y&&(0,s.jsx)(et.Z,{size:"small",style:{backgroundColor:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:8},children:(0,s.jsxs)(ee.Z,{direction:"vertical",size:"small",style:{width:"100%"},children:[y.scheduled?(0,s.jsx)("div",{children:(0,s.jsxs)(es.Z,{color:"green",icon:(0,s.jsx)(ei.Z,{}),children:["Scheduled every ",y.interval_hours," hours"]})}):(0,s.jsx)(ed,{type:"secondary",children:"No periodic reload scheduled"}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)(ed,{type:"secondary",style:{fontSize:"12px"},children:"Last run:"}),(0,s.jsx)(ed,{style:{fontSize:"12px"},children:E(y.last_run)})]}),y.scheduled&&(0,s.jsxs)(s.Fragment,{children:[y.next_run&&(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)(ed,{type:"secondary",style:{fontSize:"12px"},children:"Next run:"}),(0,s.jsx)(ed,{style:{fontSize:"12px"},children:E(y.next_run)})]}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)(ed,{type:"secondary",style:{fontSize:"12px"},children:"Status:"}),(0,s.jsx)(es.Z,{color:(null==y?void 0:y.scheduled)?y.last_run?"success":"processing":"default",children:(null==y?void 0:y.scheduled)?y.last_run?"Active":"Ready":"Not scheduled"})]})]})]})}),(0,s.jsxs)(ea.Z,{title:"Set Up Periodic Reload",open:g,onOk:S,onCancel:()=>j(!1),confirmLoading:u,okText:"Schedule",cancelText:"Cancel",okButtonProps:{style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white"}},children:[(0,s.jsx)("div",{style:{marginBottom:16},children:(0,s.jsx)(ed,{children:"Set up automatic reload of price data every:"})}),(0,s.jsx)("div",{style:{marginBottom:16},children:(0,s.jsx)(Y.Z,{min:1,max:168,value:v,onChange:e=>b(e||6),addonAfter:"hours",style:{width:"100%"}})}),(0,s.jsx)("div",{children:(0,s.jsxs)(ed,{type:"secondary",children:["This will automatically fetch the latest pricing data from the remote source every ",v," hours."]})})]})]})},em=()=>{let{accessToken:e}=(0,n.Z)(),{refetch:l}=m();return(0,s.jsx)(z.Z,{children:(0,s.jsxs)("div",{className:"p-6",children:[(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)(W.Z,{children:"Price Data Management"}),(0,s.jsx)(D.Z,{className:"text-tremor-content",children:"Manage model pricing data and configure automatic reload schedules"})]}),(0,s.jsx)(ec,{accessToken:e,onReloadSuccess:()=>{l()},buttonText:"Reload Price Data",size:"middle",type:"primary",className:"w-full"})]})})};let eu=async(e,l,t)=>{try{var s,a;console.log("handling submit for formValues:",e);let l=e.model_mappings||[];if("model_mappings"in e&&delete e.model_mappings,e.model&&e.model.includes("all-wildcard")){let t=e.custom_llm_provider,a=(null!==(s=L.fK[t])&&void 0!==s?s:t.toLowerCase())+"/*";e.model_name=a,l.push({public_name:a,litellm_model:a}),e.model=a}let t=[];for(let s of l){let l={},r={},i=s.public_name;for(let[t,i]of(l.model=s.litellm_model,e.input_cost_per_token&&(e.input_cost_per_token=Number(e.input_cost_per_token)/1e6),e.output_cost_per_token&&(e.output_cost_per_token=Number(e.output_cost_per_token)/1e6),l.model=s.litellm_model,console.log("formValues add deployment:",e),Object.entries(e)))if(""!==i&&"custom_pricing"!==t&&"pricing_model"!==t&&"cache_control"!==t){if("model_name"==t)l.model=i;else if("custom_llm_provider"==t){console.log("custom_llm_provider:",i);let e=null!==(a=L.fK[i])&&void 0!==a?a:i.toLowerCase();l.custom_llm_provider=e,console.log("custom_llm_provider mappingResult:",e)}else if("model"==t)continue;else if("base_model"===t)r[t]=i;else if("team_id"===t)r.team_id=i;else if("model_access_group"===t)r.access_groups=i;else if("mode"==t)console.log("placing mode in modelInfo"),r.mode=i,delete l.mode;else if("custom_model_name"===t)l.model=i;else if("litellm_extra_params"==t){console.log("litellm_extra_params:",i);let e={};if(i&&void 0!=i){try{e=JSON.parse(i)}catch(e){throw eo.Z.fromBackend("Failed to parse LiteLLM Extra Params: "+e),Error("Failed to parse litellm_extra_params: "+e)}for(let[t,s]of Object.entries(e))l[t]=s}}else if("model_info_params"==t){console.log("model_info_params:",i);let e={};if(i&&void 0!=i){try{e=JSON.parse(i)}catch(e){throw eo.Z.fromBackend("Failed to parse LiteLLM Extra Params: "+e),Error("Failed to parse litellm_extra_params: "+e)}for(let[l,t]of Object.entries(e))r[l]=t}}else if("input_cost_per_token"===t||"output_cost_per_token"===t||"input_cost_per_second"===t){i&&(l[t]=Number(i));continue}else l[t]=i}t.push({litellmParamsObj:l,modelInfoObj:r,modelName:i})}return t}catch(e){eo.Z.fromBackend("Failed to create model: "+e)}},eh=async(e,l,t,s)=>{try{let r=await eu(e,l,t);if(!r||0===r.length)return;for(let e of r){let{litellmParamsObj:t,modelInfoObj:s,modelName:r}=e,i={model_name:r,litellm_params:t,model_info:s},n=await (0,a.modelCreateCall)(l,i);console.log("response for model create call: ".concat(n.data))}s&&s(),t.resetFields()}catch(e){eo.Z.fromBackend("Failed to add model: "+e)}};var ex=t(53410),ep=t(62490),eg=t(10032),ef=t(21609),ej=t(31283),ev=t(37592);let e_=(0,i.n)("providerFields"),eb=()=>(0,r.a)({queryKey:e_.list({}),queryFn:async()=>await (0,a.getProviderCreateMetadata)(),staleTime:864e5,gcTime:864e5});var ey=t(3632),eN=t(56522),ew=t(47451),eZ=t(69410),eC=t(65319),ek=t(4260);let{Link:eS}=Q.default,eA=e=>{var l,t,s,a,r;let i="password"===e.field_type?"password":"select"===e.field_type?"select":"upload"===e.field_type?"upload":"textarea"===e.field_type?"textarea":"text";return{key:e.key,label:e.label,placeholder:null!==(l=e.placeholder)&&void 0!==l?l:void 0,tooltip:null!==(t=e.tooltip)&&void 0!==t?t:void 0,required:null!==(s=e.required)&&void 0!==s&&s,type:i,options:null!==(a=e.options)&&void 0!==a?a:void 0,defaultValue:null!==(r=e.default_value)&&void 0!==r?r:void 0}},eE={};var eP=e=>{let{selectedProvider:l,uploadProps:t}=e,a=L.Cl[l],r=eg.Z.useFormInstance(),{data:i,isLoading:n,error:o}=eb(),d=f.useMemo(()=>{if(!i)return null;let e={};return i.forEach(l=>{let t=l.provider_display_name,s=l.credential_fields.map(eA);e[t]=s,l.provider&&(e[l.provider]=s),l.litellm_provider&&(e[l.litellm_provider]=s)}),e},[i]);f.useEffect(()=>{d&&Object.assign(eE,d)},[d]);let c=f.useMemo(()=>{var e;let t=null!==(e=eE[a])&&void 0!==e?e:eE[l];if(t)return t;if(!i)return[];let s=i.find(e=>e.provider_display_name===a||e.provider===l||e.litellm_provider===l);if(!s)return[];let r=s.credential_fields.map(eA);return eE[s.provider_display_name]=r,s.provider&&(eE[s.provider]=r),s.litellm_provider&&(eE[s.litellm_provider]=r),r},[a,l,i]),m={name:"file",accept:".json",beforeUpload:e=>{if("application/json"===e.type){let l=new FileReader;l.onload=e=>{if(e.target){let l=e.target.result;console.log("Setting field value from JSON, length: ".concat(l.length)),r.setFieldsValue({vertex_credentials:l}),console.log("Form values after setting:",r.getFieldsValue())}},l.readAsText(e)}return!1},onChange(e){console.log("Upload onChange triggered in ProviderSpecificFields"),console.log("Current form values:",r.getFieldsValue()),"uploading"!==e.file.status&&console.log(e.file,e.fileList)}};return(0,s.jsxs)(s.Fragment,{children:[n&&0===c.length&&(0,s.jsx)(ew.Z,{children:(0,s.jsx)(eZ.Z,{span:24,children:(0,s.jsx)(eN.x,{className:"mb-2",children:"Loading provider fields..."})})}),o&&0===c.length&&(0,s.jsx)(ew.Z,{children:(0,s.jsx)(eZ.Z,{span:24,children:(0,s.jsx)(eN.x,{className:"mb-2 text-red-500",children:o instanceof Error?o.message:"Failed to load provider credential fields"})})}),c.map(e=>{var l;return(0,s.jsxs)(f.Fragment,{children:[(0,s.jsx)(eg.Z.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:"Required"}]:void 0,tooltip:e.tooltip,className:"vertex_credentials"===e.key?"mb-0":void 0,children:"select"===e.type?(0,s.jsx)(ev.default,{placeholder:e.placeholder,defaultValue:e.defaultValue,children:null===(l=e.options)||void 0===l?void 0:l.map(e=>(0,s.jsx)(ev.default.Option,{value:e,children:e},e))}):"upload"===e.type?(0,s.jsx)(eC.default,{...m,onChange:l=>{(null==t?void 0:t.onChange)&&t.onChange(l),setTimeout(()=>{let l=r.getFieldValue(e.key);console.log("".concat(e.key," value after upload:"),JSON.stringify(l))},500)},children:(0,s.jsx)(_.ZP,{icon:(0,s.jsx)(ey.Z,{}),children:"Click to Upload"})}):"textarea"===e.type?(0,s.jsx)(ek.default.TextArea,{placeholder:e.placeholder,defaultValue:e.defaultValue,rows:6,style:{fontFamily:"monospace",fontSize:"12px"}}):(0,s.jsx)(eN.o,{placeholder:e.placeholder,type:"password"===e.type?"password":"text",defaultValue:e.defaultValue})}),"vertex_credentials"===e.key&&(0,s.jsx)(ew.Z,{children:(0,s.jsx)(eZ.Z,{children:(0,s.jsx)(eN.x,{className:"mb-3 mt-1",children:"Give a gcp service account(.json file)"})})}),"base_model"===e.key&&(0,s.jsxs)(ew.Z,{children:[(0,s.jsx)(eZ.Z,{span:10}),(0,s.jsx)(eZ.Z,{span:10,children:(0,s.jsxs)(eN.x,{className:"mb-2",children:["The actual model your azure deployment uses. Used for accurate cost tracking. Select name from"," ",(0,s.jsx)(eS,{href:"https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json",target:"_blank",children:"here"})]})})]})]},e.key)})]})};let{Link:eM}=Q.default;var eL=e=>{let{open:l,onCancel:t,onAddCredential:a,uploadProps:r}=e,[i]=eg.Z.useForm(),[n,o]=(0,f.useState)(L.Cl.OpenAI);return(0,s.jsx)(ea.Z,{title:"Add New Credential",open:l,onCancel:()=>{t(),i.resetFields()},footer:null,width:600,children:(0,s.jsxs)(eg.Z,{form:i,onFinish:e=>{a(Object.entries(e).reduce((e,l)=>{let[t,s]=l;return""!==s&&null!=s&&(e[t]=s),e},{})),i.resetFields()},layout:"vertical",children:[(0,s.jsx)(eg.Z.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],children:(0,s.jsx)(ej.o,{placeholder:"Enter a friendly name for these credentials"})}),(0,s.jsx)(eg.Z.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"Helper to auto-populate provider specific fields",children:(0,s.jsx)(ev.default,{showSearch:!0,onChange:e=>{o(e),i.setFieldValue("custom_llm_provider",e)},children:Object.entries(L.Cl).map(e=>{let[l,t]=e;return(0,s.jsx)(ev.default.Option,{value:l,children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("img",{src:L.cd[t],alt:"".concat(l," logo"),className:"w-5 h-5",onError:e=>{let l=e.target,s=l.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=t.charAt(0),s.replaceChild(e,l)}}}),(0,s.jsx)("span",{children:t})]})},l)})})}),(0,s.jsx)(eP,{selectedProvider:n,uploadProps:r}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(M.Z,{title:"Get help on our github",children:(0,s.jsx)(eM,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(_.ZP,{onClick:()=>{t(),i.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,s.jsx)(_.ZP,{htmlType:"submit",children:"Add Credential"})]})]})]})})};let{Link:eF}=Q.default;function eI(e){let{open:l,onCancel:t,onUpdateCredential:a,uploadProps:r,existingCredential:i}=e,[n]=eg.Z.useForm(),[o,d]=(0,f.useState)(L.Cl.Anthropic);return(0,f.useEffect)(()=>{if(i){let e=Object.entries(i.credential_values||{}).reduce((e,l)=>{let[t,s]=l;return e[t]=null!=s?s:null,e},{});n.setFieldsValue({credential_name:i.credential_name,custom_llm_provider:i.credential_info.custom_llm_provider,...e}),d(i.credential_info.custom_llm_provider)}},[i]),(0,s.jsx)(ea.Z,{title:"Edit Credential",open:l,onCancel:()=>{t(),n.resetFields()},footer:null,width:600,destroyOnHidden:!0,children:(0,s.jsxs)(eg.Z,{form:n,onFinish:e=>{a(Object.entries(e).reduce((e,l)=>{let[t,s]=l;return""!==s&&null!=s&&(e[t]=s),e},{})),n.resetFields()},layout:"vertical",children:[(0,s.jsx)(eg.Z.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],initialValue:null==i?void 0:i.credential_name,children:(0,s.jsx)(ej.o,{placeholder:"Enter a friendly name for these credentials",disabled:null!=i&&!!i.credential_name})}),(0,s.jsx)(eg.Z.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"Helper to auto-populate provider specific fields",children:(0,s.jsx)(ev.default,{showSearch:!0,onChange:e=>{d(e),n.setFieldValue("custom_llm_provider",e)},children:Object.entries(L.Cl).map(e=>{let[l,t]=e;return(0,s.jsx)(ev.default.Option,{value:l,children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("img",{src:L.cd[t],alt:"".concat(l," logo"),className:"w-5 h-5",onError:e=>{let l=e.target,s=l.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=t.charAt(0),s.replaceChild(e,l)}}}),(0,s.jsx)("span",{children:t})]})},l)})})}),(0,s.jsx)(eP,{selectedProvider:o,uploadProps:r}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(M.Z,{title:"Get help on our github",children:(0,s.jsx)(eF,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(_.ZP,{onClick:()=>{t(),n.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,s.jsx)(_.ZP,{htmlType:"submit",children:"Update Credential"})]})]})]})})}var eT=e=>{var l;let{uploadProps:t}=e,{accessToken:r}=(0,n.Z)(),{data:i,refetch:o}=d(),c=(null==i?void 0:i.credentials)||[],[m,u]=(0,f.useState)(!1),[h,x]=(0,f.useState)(!1),[p,g]=(0,f.useState)(null),[j,v]=(0,f.useState)(null),[_,b]=(0,f.useState)(!1),[y,N]=(0,f.useState)(!1),[w]=eg.Z.useForm(),Z=["credential_name","custom_llm_provider"],C=async e=>{if(!r)return;let l=Object.entries(e).filter(e=>{let[l]=e;return!Z.includes(l)}).reduce((e,l)=>{let[t,s]=l;return{...e,[t]:s}},{}),t={credential_name:e.credential_name,credential_values:l,credential_info:{custom_llm_provider:e.custom_llm_provider}};await (0,a.credentialUpdateCall)(r,e.credential_name,t),eo.Z.success("Credential updated successfully"),x(!1),await o()},k=async e=>{if(!r)return;let l=Object.entries(e).filter(e=>{let[l]=e;return!Z.includes(l)}).reduce((e,l)=>{let[t,s]=l;return{...e,[t]:s}},{}),t={credential_name:e.credential_name,credential_values:l,credential_info:{custom_llm_provider:e.custom_llm_provider}};await (0,a.credentialCreateCall)(r,t),eo.Z.success("Credential added successfully"),u(!1),await o()},A=e=>{let l={openai:"blue",azure:"indigo",anthropic:"purple",default:"gray"},t=l[e.toLowerCase()]||l.default;return(0,s.jsx)(ep.Ct,{color:t,size:"xs",children:e})},E=async()=>{if(r&&j){N(!0);try{await (0,a.credentialDeleteCall)(r,j.credential_name),eo.Z.success("Credential deleted successfully"),await o()}catch(e){eo.Z.error("Failed to delete credential")}finally{v(null),b(!1),N(!1)}}},P=e=>{v(e),b(!0)};return(0,s.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto p-2",children:[(0,s.jsx)(ep.zx,{onClick:()=>u(!0),children:"Add Credential"}),(0,s.jsx)("div",{className:"flex justify-between items-center mt-4 mb-4",children:(0,s.jsx)(ep.xv,{children:"Configured credentials for different AI providers. Add and manage your API credentials."})}),(0,s.jsx)(ep.Zb,{children:(0,s.jsxs)(ep.iA,{children:[(0,s.jsx)(ep.ss,{children:(0,s.jsxs)(ep.SC,{children:[(0,s.jsx)(ep.xs,{children:"Credential Name"}),(0,s.jsx)(ep.xs,{children:"Provider"}),(0,s.jsx)(ep.xs,{children:"Actions"})]})}),(0,s.jsx)(ep.RM,{children:c&&0!==c.length?c.map((e,l)=>{var t;return(0,s.jsxs)(ep.SC,{children:[(0,s.jsx)(ep.pj,{children:e.credential_name}),(0,s.jsx)(ep.pj,{children:A((null===(t=e.credential_info)||void 0===t?void 0:t.custom_llm_provider)||"-")}),(0,s.jsxs)(ep.pj,{children:[(0,s.jsx)(ep.zx,{icon:ex.Z,variant:"light",size:"sm",onClick:()=>{g(e),x(!0)}}),(0,s.jsx)(ep.zx,{icon:S.Z,variant:"light",size:"sm",onClick:()=>P(e),className:"ml-2"})]})]},l)}):(0,s.jsx)(ep.SC,{children:(0,s.jsx)(ep.pj,{colSpan:4,className:"text-center py-4 text-gray-500",children:"No credentials configured"})})})]})}),m&&(0,s.jsx)(eL,{onAddCredential:k,open:m,onCancel:()=>u(!1),uploadProps:t}),h&&(0,s.jsx)(eI,{open:h,existingCredential:p,onUpdateCredential:C,uploadProps:t,onCancel:()=>x(!1)}),(0,s.jsx)(ef.Z,{isOpen:_,onCancel:()=>{v(null),b(!1)},onOk:E,title:"Delete Credential?",message:"Are you sure you want to delete this credential? This action cannot be undone and may break existing integrations.",resourceInformationTitle:"Credential Information",resourceInformation:[{label:"Credential Name",value:null==j?void 0:j.credential_name},{label:"Provider",value:(null==j?void 0:null===(l=j.credential_info)||void 0===l?void 0:l.custom_llm_provider)||"-"}],confirmLoading:y,requiredConfirmation:null==j?void 0:j.credential_name})]})},eR=t(20347),eO=t(23628),eV=t(29827),eq=t(49804),ez=t(12485),eD=t(18135),eB=t(35242),eG=t(77991),eU=t(34419),eH=t(58643),eK=t(29),eJ=t.n(eK),eW=t(23496),eY=t(35291),e$=t(23639);let{Text:eX}=Q.default;var eQ=e=>{let{formValues:l,accessToken:t,testMode:r,modelName:i="this model",onClose:n,onTestComplete:o}=e,[d,c]=f.useState(null),[m,u]=f.useState(null),[h,x]=f.useState(null),[p,g]=f.useState(!0),[j,v]=f.useState(!1),[b,y]=f.useState(!1),N=async()=>{g(!0),y(!1),c(null),u(null),x(null),v(!1),await new Promise(e=>setTimeout(e,100));try{console.log("Testing connection with form values:",l);let r=await eu(l,t,null);if(!r){console.log("No result from prepareModelAddRequest"),c("Failed to prepare model data. Please check your form inputs."),v(!1),g(!1);return}console.log("Result from prepareModelAddRequest:",r);let{litellmParamsObj:i,modelInfoObj:n,modelName:o}=r[0],d=await (0,a.testConnectionRequest)(t,i,n,null==n?void 0:n.mode);if("success"===d.status)eo.Z.success("Connection test successful!"),c(null),v(!0);else{var e,s;let l=(null===(e=d.result)||void 0===e?void 0:e.error)||d.message||"Unknown error";c(l),u(i),x(null===(s=d.result)||void 0===s?void 0:s.raw_request_typed_dict),v(!1)}}catch(e){console.error("Test connection error:",e),c(e instanceof Error?e.message:String(e)),v(!1)}finally{g(!1),o&&o()}};f.useEffect(()=>{let e=setTimeout(()=>{N()},200);return()=>clearTimeout(e)},[]);let w=e=>e?e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error: /,""):"Unknown error",Z="string"==typeof d?w(d):(null==d?void 0:d.message)?w(d.message):"Unknown error",C=h?((e,l,t)=>{let s=JSON.stringify(l,null,2).split("\n").map(e=>" ".concat(e)).join("\n"),a=Object.entries(t).map(e=>{let[l,t]=e;return"-H '".concat(l,": ").concat(t,"'")}).join(" \\\n ");return"curl -X POST \\\n ".concat(e," \\\n ").concat(a?"".concat(a," \\\n "):"","-H 'Content-Type: application/json' \\\n -d '{\n").concat(s,"\n }'")})(h.raw_request_api_base,h.raw_request_body,h.raw_request_headers||{}):"";return(0,s.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:[p?(0,s.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,s.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,s.jsx)("div",{style:{border:"3px solid #f3f3f3",borderTop:"3px solid #1890ff",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite",margin:"0 auto"},className:"jsx-dc9a0e2d897fe63b"})}),(0,s.jsxs)(eX,{style:{fontSize:"16px"},children:["Testing connection to ",i,"..."]}),(0,s.jsx)(eJ(),{id:"dc9a0e2d897fe63b",children:"@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg);transform:rotate(0deg)}100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}"})]}):j?(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,s.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,s.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),(0,s.jsxs)(eX,{type:"success",style:{fontSize:"18px",fontWeight:500,marginLeft:"10px"},children:["Connection to ",i," successful!"]})]}):(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,s.jsx)(eY.Z,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,s.jsxs)(eX,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",i," failed"]})]}),(0,s.jsxs)("div",{style:{backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"8px",padding:"16px",marginBottom:"20px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.03)"},children:[(0,s.jsxs)(eX,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,s.jsx)(eX,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:Z}),d&&(0,s.jsx)("div",{style:{marginTop:"12px"},children:(0,s.jsx)(_.ZP,{type:"link",onClick:()=>y(!b),style:{paddingLeft:0,height:"auto"},children:b?"Hide Details":"Show Details"})})]}),b&&(0,s.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,s.jsx)(eX,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Troubleshooting Details"}),(0,s.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"200px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:"string"==typeof d?d:JSON.stringify(d,null,2)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(eX,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"API Request"}),(0,s.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"250px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:C||"No request data available"}),(0,s.jsx)(_.ZP,{style:{marginTop:"8px"},icon:(0,s.jsx)(e$.Z,{}),onClick:()=>{navigator.clipboard.writeText(C||""),eo.Z.success("Copied to clipboard")},children:"Copy to Clipboard"})]})]})}),(0,s.jsx)(eW.Z,{style:{margin:"24px 0 16px"}}),(0,s.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,s.jsx)(_.ZP,{type:"link",href:"https://docs.litellm.ai/docs/providers",target:"_blank",icon:(0,s.jsx)(R.Z,{}),children:"View Documentation"})})]})};let e0=async(e,l,t,s)=>{try{console.log("=== AUTO ROUTER SUBMIT HANDLER CALLED ==="),console.log("handling auto router submit for formValues:",e),console.log("Access token:",l?"Present":"Missing"),console.log("Form:",t?"Present":"Missing"),console.log("Callback:",s?"Present":"Missing");let r={model_name:e.auto_router_name,litellm_params:{model:"auto_router/".concat(e.auto_router_name),auto_router_config:JSON.stringify(e.auto_router_config),auto_router_default_model:e.auto_router_default_model},model_info:{}};e.auto_router_embedding_model&&"custom"!==e.auto_router_embedding_model?r.litellm_params.auto_router_embedding_model=e.auto_router_embedding_model:e.custom_embedding_model&&(r.litellm_params.auto_router_embedding_model=e.custom_embedding_model),e.team_id&&(r.model_info.team_id=e.team_id),e.model_access_group&&e.model_access_group.length>0&&(r.model_info.access_groups=e.model_access_group),console.log("Auto router configuration to be created:",r),console.log("Auto router config (stringified):",r.litellm_params.auto_router_config),console.log("Calling modelCreateCall with:",{accessToken:l?"Present":"Missing",config:r});let i=await (0,a.modelCreateCall)(l,r);console.log("response for auto router create call:",i),t.resetFields()}catch(e){console.error("Failed to add auto router:",e),eo.Z.fromBackend("Failed to add auto router: "+e)}};var e1=t(10703),e2=t(44851),e4=t(96473),e5=t(70464),e6=t(26349),e3=t(92280);let{TextArea:e8}=ek.default,{Panel:e7}=e2.default;var e9=e=>{let{modelInfo:l,value:t,onChange:a}=e,[r,i]=(0,f.useState)([]),[n,o]=(0,f.useState)(!1),[d,c]=(0,f.useState)([]);(0,f.useEffect)(()=>{if(null==t?void 0:t.routes){let e=t.routes.map((e,l)=>({id:e.id||"route-".concat(l,"-").concat(Date.now()),model:e.name||e.model||"",utterances:e.utterances||[],description:e.description||"",score_threshold:e.score_threshold||.5}));i(e),c(e.map(e=>e.id))}else i([]),c([])},[t]);let m=e=>{let l=r.filter(l=>l.id!==e);i(l),h(l),c(l=>l.filter(l=>l!==e))},u=(e,l,t)=>{let s=r.map(s=>s.id===e?{...s,[l]:t}:s);i(s),h(s)},h=e=>{let l={routes:e.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))};null==a||a(l)},x=l.map(e=>({value:e.model_group,label:e.model_group}));return(0,s.jsxs)("div",{className:"w-full max-w-none",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6 w-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(e3.x,{className:"text-lg font-semibold",children:"Routes Configuration"}),(0,s.jsx)(M.Z,{title:"Configure routing logic to automatically select the best model based on user input patterns",children:(0,s.jsx)(R.Z,{className:"text-gray-400"})})]}),(0,s.jsx)(_.ZP,{type:"primary",icon:(0,s.jsx)(e4.Z,{}),onClick:()=>{let e="route-".concat(Date.now()),l=[...r,{id:e,model:"",utterances:[],description:"",score_threshold:.5}];i(l),h(l),c(l=>[...l,e])},className:"bg-blue-600 hover:bg-blue-700",children:"Add Route"})]}),0===r.length?(0,s.jsx)("div",{className:"text-center py-12 text-gray-500 bg-gray-50 rounded-lg border-2 border-dashed border-gray-200 mb-6",children:(0,s.jsx)(e3.x,{children:"No routes configured. Click “Add Route” to get started."})}):(0,s.jsx)("div",{className:"space-y-3 mb-6 w-full",children:r.map((e,l)=>(0,s.jsx)(et.Z,{className:"border border-gray-200 shadow-sm w-full",bodyStyle:{padding:0},children:(0,s.jsx)(e2.default,{ghost:!0,expandIcon:e=>{let{isActive:l}=e;return(0,s.jsx)(e5.Z,{rotate:l?180:0})},activeKey:d,onChange:e=>c(Array.isArray(e)?e:[e].filter(Boolean)),items:[{key:e.id,label:(0,s.jsxs)("div",{className:"flex justify-between items-center py-2",children:[(0,s.jsxs)(e3.x,{className:"font-medium text-base",children:["Route ",l+1,": ",e.model||"Unnamed"]}),(0,s.jsx)(_.ZP,{type:"text",danger:!0,icon:(0,s.jsx)(e6.Z,{}),onClick:l=>{l.stopPropagation(),m(e.id)},className:"mr-2"})]}),children:(0,s.jsxs)("div",{className:"px-6 pb-6 w-full",children:[(0,s.jsxs)("div",{className:"mb-4 w-full",children:[(0,s.jsx)(e3.x,{className:"text-sm font-medium mb-2 block",children:"Model"}),(0,s.jsx)(ev.default,{value:e.model,onChange:l=>u(e.id,"model",l),placeholder:"Select model",showSearch:!0,style:{width:"100%"},options:x})]}),(0,s.jsxs)("div",{className:"mb-4 w-full",children:[(0,s.jsx)(e3.x,{className:"text-sm font-medium mb-2 block",children:"Description"}),(0,s.jsx)(e8,{value:e.description,onChange:l=>u(e.id,"description",l.target.value),placeholder:"Describe when this route should be used...",rows:2,style:{width:"100%"}})]}),(0,s.jsxs)("div",{className:"mb-4 w-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(e3.x,{className:"text-sm font-medium",children:"Score Threshold"}),(0,s.jsx)(M.Z,{title:"Minimum similarity score to route to this model (0-1)",children:(0,s.jsx)(R.Z,{className:"text-gray-400"})})]}),(0,s.jsx)(Y.Z,{value:e.score_threshold,onChange:l=>u(e.id,"score_threshold",l||0),min:0,max:1,step:.1,style:{width:"100%"},placeholder:"0.5"})]}),(0,s.jsxs)("div",{className:"w-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(e3.x,{className:"text-sm font-medium",children:"Example Utterances"}),(0,s.jsx)(M.Z,{title:"Training examples for this route. Type an utterance and press Enter to add it.",children:(0,s.jsx)(R.Z,{className:"text-gray-400"})})]}),(0,s.jsx)(e3.x,{className:"text-xs text-gray-500 mb-2",children:"Type an utterance and press Enter to add it. You can also paste multiple lines."}),(0,s.jsx)(ev.default,{mode:"tags",value:e.utterances,onChange:l=>u(e.id,"utterances",l),placeholder:"Type an utterance and press Enter...",style:{width:"100%"},tokenSeparators:["\n"],maxTagCount:"responsive",allowClear:!0})]})]})}]})},e.id))}),(0,s.jsxs)("div",{className:"border-t pt-6 w-full",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4 w-full",children:[(0,s.jsx)(e3.x,{className:"text-lg font-semibold",children:"JSON Preview"}),(0,s.jsx)(_.ZP,{type:"link",onClick:()=>o(!n),className:"text-blue-600 p-0",children:n?"Hide":"Show"})]}),n&&(0,s.jsx)(et.Z,{className:"bg-gray-50 w-full",children:(0,s.jsx)("pre",{className:"text-sm overflow-auto max-h-64 w-full",children:JSON.stringify({routes:r.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))},null,2)})})]})]})};let{Title:le,Link:ll}=Q.default;var lt=e=>{let{form:l,handleOk:t,accessToken:r,userRole:i}=e,[n,o]=(0,f.useState)(!1),[d,c]=(0,f.useState)(!1),[m,u]=(0,f.useState)(""),[h,x]=(0,f.useState)([]),[p,g]=(0,f.useState)([]),[j,v]=(0,f.useState)(!1),[b,y]=(0,f.useState)(!1),[N,w]=(0,f.useState)(null);(0,f.useEffect)(()=>{(async()=>{x((await (0,a.modelAvailableCall)(r,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[r]),(0,f.useEffect)(()=>{(async()=>{try{let e=await (0,e1.p)(r);console.log("Fetched models for auto router:",e),g(e)}catch(e){console.error("Error fetching model info for auto router:",e)}})()},[r]);let Z=eR.ZL.includes(i),C=async()=>{c(!0),u("test-".concat(Date.now())),o(!0)},k=()=>{console.log("Auto router submit triggered!"),console.log("Router config:",N);let e=l.getFieldsValue();if(console.log("Form values:",e),!e.auto_router_name){eo.Z.fromBackend("Please enter an Auto Router Name");return}if(!e.auto_router_default_model){eo.Z.fromBackend("Please select a Default Model");return}if(l.setFieldsValue({custom_llm_provider:"auto_router",model:e.auto_router_name,api_key:"not_required_for_auto_router"}),!N||!N.routes||0===N.routes.length){eo.Z.fromBackend("Please configure at least one route for the auto router");return}if(N.routes.filter(e=>!e.name||!e.description||0===e.utterances.length).length>0){eo.Z.fromBackend("Please ensure all routes have a target model, description, and at least one utterance");return}l.validateFields().then(e=>{console.log("Form validation passed, submitting with values:",e);let s={...e,auto_router_config:N};console.log("Final submit values:",s),e0(s,r,l,t)}).catch(e=>{console.error("Validation failed:",e);let l=e.errorFields||[];if(l.length>0){let e=l.map(e=>{let l=e.name[0];return({auto_router_name:"Auto Router Name",auto_router_default_model:"Default Model",auto_router_embedding_model:"Embedding Model"})[l]||l});eo.Z.fromBackend("Please fill in the following required fields: ".concat(e.join(", ")))}else eo.Z.fromBackend("Please fill in all required fields")})};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(le,{level:2,children:"Add Auto Router"}),(0,s.jsx)(eN.x,{className:"text-gray-600 mb-6",children:"Create an auto router with intelligent routing logic that automatically selects the best model based on user input patterns and semantic matching."}),(0,s.jsx)(et.Z,{children:(0,s.jsxs)(eg.Z,{form:l,onFinish:k,labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:[(0,s.jsx)(eg.Z.Item,{rules:[{required:!0,message:"Auto router name is required"}],label:"Auto Router Name",name:"auto_router_name",tooltip:"Unique name for this auto router configuration",labelCol:{span:10},labelAlign:"left",children:(0,s.jsx)(eN.o,{placeholder:"e.g., auto_router_1, smart_routing"})}),(0,s.jsx)("div",{className:"w-full mb-4",children:(0,s.jsx)(e9,{modelInfo:p,value:N,onChange:e=>{w(e),l.setFieldValue("auto_router_config",e)}})}),(0,s.jsx)(eg.Z.Item,{rules:[{required:!0,message:"Default model is required"}],label:"Default Model",name:"auto_router_default_model",tooltip:"Fallback model to use when auto routing logic cannot determine the best model",labelCol:{span:10},labelAlign:"left",children:(0,s.jsx)(ev.default,{placeholder:"Select a default model",onChange:e=>{v("custom"===e)},options:[...Array.from(new Set(p.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0})}),(0,s.jsx)(eg.Z.Item,{label:"Embedding Model",name:"auto_router_embedding_model",tooltip:"Optional: Embedding model to use for semantic routing decisions",labelCol:{span:10},labelAlign:"left",children:(0,s.jsx)(ev.default,{value:l.getFieldValue("auto_router_embedding_model"),placeholder:"Select an embedding model (optional)",onChange:e=>{y("custom"===e),l.setFieldValue("auto_router_embedding_model",e)},options:[...Array.from(new Set(p.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0,allowClear:!0})}),(0,s.jsxs)("div",{className:"flex items-center my-4",children:[(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,s.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Settings"}),(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),Z&&(0,s.jsx)(eg.Z.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to control who can access this auto router",children:(0,s.jsx)(ev.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:h.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})}),(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(M.Z,{title:"Get help on our github",children:(0,s.jsx)(Q.default.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{className:"space-x-2",children:[(0,s.jsx)(_.ZP,{onClick:C,loading:d,children:"Test Connect"}),(0,s.jsx)(_.ZP,{onClick:()=>{console.log("Add Auto Router button clicked!"),console.log("Current router config:",N),console.log("Current form values:",l.getFieldsValue()),k()},children:"Add Auto Router"})]})]})]})}),(0,s.jsx)(ea.Z,{title:"Connection Test Results",open:n,onCancel:()=>{o(!1),c(!1)},footer:[(0,s.jsx)(_.ZP,{onClick:()=>{o(!1),c(!1)},children:"Close"},"close")],width:700,children:n&&(0,s.jsx)(eQ,{formValues:l.getFieldsValue(),accessToken:r,testMode:"chat",modelName:l.getFieldValue("auto_router_name"),onClose:()=>{o(!1),c(!1)},onTestComplete:()=>c(!1)},m)})]})};let ls=(0,i.n)("guardrails"),la=()=>{let{accessToken:e,userId:l,userRole:t}=(0,n.Z)();return(0,r.a)({queryKey:ls.list({}),queryFn:async()=>(await (0,a.getGuardrailsList)(e)).guardrails.map(e=>e.guardrail_name),enabled:!!(e&&l&&t)})},lr=(0,i.n)("tags"),li=()=>{let{accessToken:e,userId:l,userRole:t}=(0,n.Z)();return(0,r.a)({queryKey:lr.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&l&&t)})};var ln=t(59341),lo=t(51653),ld=t(84376),lc=t(63709),lm=t(26210),lu=t(34766),lh=t(45246),lx=t(24199);let{Text:lp}=Q.default;var lg=e=>{let{form:l,showCacheControl:t,onCacheControlChange:a}=e,r=e=>{let t=l.getFieldValue("litellm_extra_params");try{let s=t?JSON.parse(t):{};e.length>0?s.cache_control_injection_points=e:delete s.cache_control_injection_points,Object.keys(s).length>0?l.setFieldValue("litellm_extra_params",JSON.stringify(s,null,2)):l.setFieldValue("litellm_extra_params","")}catch(e){console.error("Error updating cache control points:",e)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eg.Z.Item,{label:"Cache Control Injection Points",name:"cache_control",valuePropName:"checked",className:"mb-4",tooltip:"Tell litellm where to inject cache control checkpoints. You can specify either by role (to apply to all messages of that role) or by specific message index.",children:(0,s.jsx)(lc.Z,{onChange:a,className:"bg-gray-600"})}),t&&(0,s.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,s.jsx)(lp,{className:"text-sm text-gray-500 block mb-4",children:"Providers like Anthropic, Bedrock API require users to specify where to inject cache control checkpoints, litellm can automatically add them for you as a cost saving feature."}),(0,s.jsx)(eg.Z.List,{name:"cache_control_injection_points",initialValue:[{location:"message"}],children:(e,t)=>{let{add:a,remove:i}=t;return(0,s.jsxs)(s.Fragment,{children:[e.map((t,a)=>(0,s.jsxs)("div",{className:"flex items-center mb-4 gap-4",children:[(0,s.jsx)(eg.Z.Item,{...t,label:"Type",name:[t.name,"location"],initialValue:"message",className:"mb-0",style:{width:"180px"},children:(0,s.jsx)(ev.default,{disabled:!0,options:[{value:"message",label:"Message"}]})}),(0,s.jsx)(eg.Z.Item,{...t,label:"Role",name:[t.name,"role"],className:"mb-0",style:{width:"180px"},tooltip:"LiteLLM will mark all messages of this role as cacheable",children:(0,s.jsx)(ev.default,{placeholder:"Select a role",allowClear:!0,options:[{value:"user",label:"User"},{value:"system",label:"System"},{value:"assistant",label:"Assistant"}],onChange:()=>{r(l.getFieldValue("cache_control_points"))}})}),(0,s.jsx)(eg.Z.Item,{...t,label:"Index",name:[t.name,"index"],className:"mb-0",style:{width:"180px"},tooltip:"(Optional) If set litellm will mark the message at this index as cacheable",children:(0,s.jsx)(lx.Z,{type:"number",placeholder:"Optional",step:1,onChange:()=>{r(l.getFieldValue("cache_control_points"))}})}),e.length>1&&(0,s.jsx)(lh.Z,{className:"text-red-500 cursor-pointer text-lg ml-12",onClick:()=>{i(t.name),setTimeout(()=>{r(l.getFieldValue("cache_control_points"))},0)}})]},t.key)),(0,s.jsx)(eg.Z.Item,{children:(0,s.jsxs)("button",{type:"button",className:"flex items-center justify-center w-full border border-dashed border-gray-300 py-2 px-4 text-gray-600 hover:text-blue-600 hover:border-blue-300 transition-all rounded",onClick:()=>a(),children:[(0,s.jsx)(e4.Z,{className:"mr-2"}),"Add Injection Point"]})})]})}})]})]})},lf=t(9309);let{Link:lj}=Q.default;var lv=e=>{let{showAdvancedSettings:l,setShowAdvancedSettings:t,teams:a,guardrailsList:r,tagsList:i}=e,[n]=eg.Z.useForm(),[o,d]=f.useState(!1),[c,m]=f.useState("per_token"),[u,h]=f.useState(!1),x=(e,l)=>l&&(isNaN(Number(l))||0>Number(l))?Promise.reject("Please enter a valid positive number"):Promise.resolve();return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(lm.UQ,{className:"mt-2 mb-4",children:[(0,s.jsx)(lm._m,{children:(0,s.jsx)("b",{children:"Advanced Settings"})}),(0,s.jsx)(lm.X1,{children:(0,s.jsxs)("div",{className:"bg-white rounded-lg",children:[(0,s.jsx)(eg.Z.Item,{label:"Custom Pricing",name:"custom_pricing",valuePropName:"checked",className:"mb-4",children:(0,s.jsx)(lc.Z,{onChange:e=>{d(e),e||n.setFieldsValue({input_cost_per_token:void 0,output_cost_per_token:void 0,input_cost_per_second:void 0})},className:"bg-gray-600"})}),(0,s.jsx)(eg.Z.Item,{label:(0,s.jsxs)("span",{children:["Guardrails"," ",(0,s.jsx)(M.Z,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(R.Z,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:"Select existing guardrails. Go to 'Guardrails' tab to create new guardrails.",children:(0,s.jsx)(ev.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:r.map(e=>({value:e,label:e}))})}),(0,s.jsx)(eg.Z.Item,{label:"Tags",name:"tags",className:"mb-4",children:(0,s.jsx)(ev.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(i).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),o&&(0,s.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,s.jsx)(eg.Z.Item,{label:"Pricing Model",name:"pricing_model",className:"mb-4",children:(0,s.jsx)(ev.default,{defaultValue:"per_token",onChange:e=>m(e),options:[{value:"per_token",label:"Per Million Tokens"},{value:"per_second",label:"Per Second"}]})}),"per_token"===c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eg.Z.Item,{label:"Input Cost (per 1M tokens)",name:"input_cost_per_token",rules:[{validator:x}],className:"mb-4",children:(0,s.jsx)(lm.oi,{})}),(0,s.jsx)(eg.Z.Item,{label:"Output Cost (per 1M tokens)",name:"output_cost_per_token",rules:[{validator:x}],className:"mb-4",children:(0,s.jsx)(lm.oi,{})})]}):(0,s.jsx)(eg.Z.Item,{label:"Cost Per Second",name:"input_cost_per_second",rules:[{validator:x}],className:"mb-4",children:(0,s.jsx)(lm.oi,{})})]}),(0,s.jsx)(eg.Z.Item,{label:"Use in pass through routes",name:"use_in_pass_through",valuePropName:"checked",className:"mb-4 mt-4",tooltip:(0,s.jsxs)("span",{children:["Allow using these credentials in pass through routes."," ",(0,s.jsx)(lj,{href:"https://docs.litellm.ai/docs/pass_through/vertex_ai",target:"_blank",children:"Learn more"})]}),children:(0,s.jsx)(lc.Z,{onChange:e=>{let l=n.getFieldValue("litellm_extra_params");try{let t=l?JSON.parse(l):{};e?t.use_in_pass_through=!0:delete t.use_in_pass_through,Object.keys(t).length>0?n.setFieldValue("litellm_extra_params",JSON.stringify(t,null,2)):n.setFieldValue("litellm_extra_params","")}catch(l){e?n.setFieldValue("litellm_extra_params",JSON.stringify({use_in_pass_through:!0},null,2)):n.setFieldValue("litellm_extra_params","")}},className:"bg-gray-600"})}),(0,s.jsx)(lg,{form:n,showCacheControl:u,onCacheControlChange:e=>{if(h(e),!e){let e=n.getFieldValue("litellm_extra_params");try{let l=e?JSON.parse(e):{};delete l.cache_control_injection_points,Object.keys(l).length>0?n.setFieldValue("litellm_extra_params",JSON.stringify(l,null,2)):n.setFieldValue("litellm_extra_params","")}catch(e){n.setFieldValue("litellm_extra_params","")}}}}),(0,s.jsx)(eg.Z.Item,{label:"LiteLLM Params",name:"litellm_extra_params",tooltip:"Optional litellm params used for making a litellm.completion() call.",className:"mb-4 mt-4",rules:[{validator:lf.Ac}],children:(0,s.jsx)(lu.Z,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}),(0,s.jsxs)(ew.Z,{className:"mb-4",children:[(0,s.jsx)(eZ.Z,{span:10}),(0,s.jsx)(eZ.Z,{span:10,children:(0,s.jsxs)(lm.xv,{className:"text-gray-600 text-sm",children:["Pass JSON of litellm supported params"," ",(0,s.jsx)(lj,{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",children:"litellm.completion() call"})]})})]}),(0,s.jsx)(eg.Z.Item,{label:"Model Info",name:"model_info_params",tooltip:"Optional model info params. Returned when calling `/model/info` endpoint.",className:"mb-0",rules:[{validator:lf.Ac}],children:(0,s.jsx)(lu.Z,{rows:4,placeholder:'{ "mode": "chat" }'})})]})})]})})},l_=t(56609),lb=t(67187);let ly=e=>{let{content:l,children:t,width:a="auto",className:r=""}=e,[i,n]=(0,f.useState)(!1),[o,d]=(0,f.useState)("top"),c=(0,f.useRef)(null),m=()=>{if(c.current){let e=c.current.getBoundingClientRect(),l=e.top,t=window.innerHeight-e.bottom;l<300&&t>300?d("bottom"):d("top")}};return(0,s.jsxs)("div",{className:"relative inline-block",ref:c,children:[t||(0,s.jsx)(lb.Z,{className:"ml-1 text-gray-500 cursor-help",onMouseEnter:()=>{m(),n(!0)},onMouseLeave:()=>n(!1)}),i&&(0,s.jsxs)("div",{className:"absolute left-1/2 -translate-x-1/2 z-50 bg-black/90 text-white p-2 rounded-md text-sm font-normal shadow-lg ".concat(r),style:{["top"===o?"bottom":"top"]:"100%",width:a,marginBottom:"top"===o?"8px":"0",marginTop:"bottom"===o?"8px":"0"},children:[l,(0,s.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 w-0 h-0",style:{top:"top"===o?"100%":"auto",bottom:"bottom"===o?"100%":"auto",borderTop:"top"===o?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderBottom:"bottom"===o?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderLeft:"6px solid transparent",borderRight:"6px solid transparent"}})]})]})};var lN=()=>{let e=eg.Z.useFormInstance(),[l,t]=(0,f.useState)(0),a=eg.Z.useWatch("model",e)||[],r=Array.isArray(a)?a:[a],i=eg.Z.useWatch("custom_model_name",e),n=!r.includes("all-wildcard"),o=eg.Z.useWatch("custom_llm_provider",e);if((0,f.useEffect)(()=>{if(i&&r.includes("custom")){let l=(e.getFieldValue("model_mappings")||[]).map(e=>"custom"===e.public_name||"custom"===e.litellm_model?o===L.Cl.Azure?{public_name:i,litellm_model:"azure/".concat(i)}:{public_name:i,litellm_model:i}:e);e.setFieldValue("model_mappings",l),t(e=>e+1)}},[i,r,o,e]),(0,f.useEffect)(()=>{if(r.length>0&&!r.includes("all-wildcard")){let l=e.getFieldValue("model_mappings")||[];if(l.length!==r.length||!r.every(e=>l.some(l=>"custom"===e?"custom"===l.litellm_model||l.litellm_model===i:o===L.Cl.Azure?l.litellm_model==="azure/".concat(e):l.litellm_model===e))){let l=r.map(e=>"custom"===e&&i?o===L.Cl.Azure?{public_name:i,litellm_model:"azure/".concat(i)}:{public_name:i,litellm_model:i}:o===L.Cl.Azure?{public_name:e,litellm_model:"azure/".concat(e)}:{public_name:e,litellm_model:e});e.setFieldValue("model_mappings",l),t(e=>e+1)}}},[r,i,o,e]),!n)return null;let d=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mb-2 font-normal",children:"The name you specify in your API calls to LiteLLM Proxy"}),(0,s.jsxs)("div",{className:"mb-2 font-normal",children:[(0,s.jsx)("strong",{children:"Example:"})," If you name your public model"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"example-name"}),", and choose"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"openai/qwen-plus-latest"})," as the LiteLLM model"]}),(0,s.jsxs)("div",{className:"mb-2 font-normal",children:[(0,s.jsx)("strong",{children:"Usage:"})," You make an API call to the LiteLLM proxy with"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:'model = "example-name"'})]}),(0,s.jsxs)("div",{className:"font-normal",children:[(0,s.jsx)("strong",{children:"Result:"})," LiteLLM sends"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"qwen-plus-latest"})," to the provider"]})]}),c=(0,s.jsx)("div",{children:"The model name LiteLLM will send to the LLM API"}),m=[{title:(0,s.jsxs)("span",{className:"flex items-center",children:["Public Model Name",(0,s.jsx)(ly,{content:d,width:"500px"})]}),dataIndex:"public_name",key:"public_name",render:(l,t,a)=>(0,s.jsx)(ej.o,{value:l,onChange:l=>{let t=l.target.value,s=[...e.getFieldValue("model_mappings")],r=o===L.Cl.Anthropic,i=t.endsWith("-1m"),n=e.getFieldValue("litellm_extra_params"),d=!n||""===n.trim(),c=t;if(r&&i&&d){let l=JSON.stringify({extra_headers:{"anthropic-beta":"context-1m-2025-08-07"}},null,2);e.setFieldValue("litellm_extra_params",l),c=t.slice(0,-3)}s[a].public_name=c,e.setFieldValue("model_mappings",s)}})},{title:(0,s.jsxs)("span",{className:"flex items-center",children:["LiteLLM Model Name",(0,s.jsx)(ly,{content:c,width:"360px"})]}),dataIndex:"litellm_model",key:"litellm_model"}];return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(eg.Z.Item,{label:"Model Mappings",name:"model_mappings",tooltip:"Map public model names to LiteLLM model names for load balancing",labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",rules:[{required:!0,validator:async(e,l)=>{if(!l||0===l.length)throw Error("At least one model mapping is required");if(l.filter(e=>!e.public_name||""===e.public_name.trim()).length>0)throw Error("All model mappings must have valid public names")}}],children:(0,s.jsx)(l_.Z,{dataSource:e.getFieldValue("model_mappings"),columns:m,pagination:!1,size:"small"},l)})})},lw=e=>{let{selectedProvider:l,providerModels:t,getPlaceholder:a}=e,r=eg.Z.useFormInstance(),i=e=>{let t=e.target.value,s=(r.getFieldValue("model_mappings")||[]).map(e=>"custom"===e.public_name||"custom"===e.litellm_model?l===L.Cl.Azure?{public_name:t,litellm_model:"azure/".concat(t)}:{public_name:t,litellm_model:t}:e);r.setFieldsValue({model_mappings:s})};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(eg.Z.Item,{label:"LiteLLM Model Name(s)",tooltip:"The model name LiteLLM will send to the LLM API",className:"mb-0",children:[(0,s.jsx)(eg.Z.Item,{name:"model",rules:[{required:!0,message:"Please enter ".concat(l===L.Cl.Azure?"a deployment name":"at least one model",".")}],noStyle:!0,children:l===L.Cl.Azure||l===L.Cl.OpenAI_Compatible||l===L.Cl.Ollama?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(eN.o,{placeholder:a(l),onChange:l===L.Cl.Azure?e=>{let l=e.target.value,t=l?[{public_name:l,litellm_model:"azure/".concat(l)}]:[];r.setFieldsValue({model:l,model_mappings:t})}:void 0})}):t.length>0?(0,s.jsx)(ev.default,{mode:"multiple",allowClear:!0,showSearch:!0,placeholder:"Select models",onChange:e=>{let t=Array.isArray(e)?e:[e];if(t.includes("all-wildcard"))r.setFieldsValue({model_name:void 0,model_mappings:[]});else if(JSON.stringify(r.getFieldValue("model"))!==JSON.stringify(t)){let e=t.map(e=>l===L.Cl.Azure?{public_name:e,litellm_model:"azure/".concat(e)}:{public_name:e,litellm_model:e});r.setFieldsValue({model:t,model_mappings:e})}},optionFilterProp:"children",filterOption:(e,l)=>{var t;return(null!==(t=null==l?void 0:l.label)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())},options:[{label:"Custom Model Name (Enter below)",value:"custom"},{label:"All ".concat(l," Models (Wildcard)"),value:"all-wildcard"},...t.map(e=>({label:e,value:e}))],style:{width:"100%"}}):(0,s.jsx)(eN.o,{placeholder:a(l)})}),(0,s.jsx)(eg.Z.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.model!==l.model,children:e=>{let{getFieldValue:t}=e,a=t("model")||[];return(Array.isArray(a)?a:[a]).includes("custom")&&(0,s.jsx)(eg.Z.Item,{name:"custom_model_name",rules:[{required:!0,message:"Please enter a custom model name."}],className:"mt-2",children:(0,s.jsx)(eN.o,{placeholder:l===L.Cl.Azure?"Enter Azure deployment name":"Enter custom model name",onChange:i})})}})]}),(0,s.jsxs)(ew.Z,{children:[(0,s.jsx)(eZ.Z,{span:10}),(0,s.jsx)(eZ.Z,{span:14,children:(0,s.jsx)(eN.x,{className:"mb-3 mt-1",children:l===L.Cl.Azure?"Your deployment name will be saved as the public model name, and LiteLLM will use 'azure/deployment-name' internally":"The model name LiteLLM will send to the LLM API"})})]})]})};let lZ=[{value:"chat",label:"Chat - /chat/completions"},{value:"completion",label:"Completion - /completions"},{value:"embedding",label:"Embedding - /embeddings"},{value:"audio_speech",label:"Audio Speech - /audio/speech"},{value:"audio_transcription",label:"Audio Transcription - /audio/transcriptions"},{value:"image_generation",label:"Image Generation - /images/generations"},{value:"video_generation",label:"Video Generation - /videos"},{value:"rerank",label:"Rerank - /rerank"},{value:"realtime",label:"Realtime - /realtime"},{value:"batch",label:"Batch - /batch"},{value:"ocr",label:"OCR - /ocr"}],{Title:lC,Link:lk}=Q.default;var lS=e=>{let{form:l,handleOk:t,selectedProvider:r,setSelectedProvider:i,providerModels:o,setProviderModelsFn:d,getPlaceholder:c,uploadProps:m,showAdvancedSettings:u,setShowAdvancedSettings:h,teams:x,credentials:p}=e,[g,j]=(0,f.useState)("chat"),[v,b]=(0,f.useState)(!1),[y,N]=(0,f.useState)(!1),[w,Z]=(0,f.useState)(""),{accessToken:C,userRole:k,premiumUser:S,userId:A}=(0,n.Z)(),{data:E,isLoading:P,error:I}=eb(),{data:T,isLoading:R,error:O}=la(),{data:V,isLoading:q,error:z}=li(),B=async()=>{N(!0),Z("test-".concat(Date.now())),b(!0)},[G,U]=(0,f.useState)(!1),[H,K]=(0,f.useState)([]),[J,W]=(0,f.useState)(null);(0,f.useEffect)(()=>{(async()=>{K((await (0,a.modelAvailableCall)(C,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[C]);let Y=(0,f.useMemo)(()=>E?[...E].sort((e,l)=>e.provider_display_name.localeCompare(l.provider_display_name)):[],[E]),$=I?I instanceof Error?I.message:"Failed to load providers":null,X=eR.ZL.includes(k),ee=(0,eR.yV)(x,A);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(lC,{level:2,children:"Add Model"}),(0,s.jsx)(et.Z,{children:(0,s.jsx)(eg.Z,{form:l,onFinish:async e=>{console.log("\uD83D\uDD25 Form onFinish triggered with values:",e),await t().then(()=>{W(null)})},onFinishFailed:e=>{console.log("\uD83D\uDCA5 Form onFinishFailed triggered:",e)},labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:(0,s.jsxs)(s.Fragment,{children:[ee&&!X&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eg.Z.Item,{label:"Select Team",name:"team_id",rules:[{required:!0,message:"Please select a team to continue"}],tooltip:"Select the team for which you want to add this model",children:(0,s.jsx)(ld.Z,{teams:x,onChange:e=>{W(e)}})}),!J&&(0,s.jsx)(lo.Z,{message:"Team Selection Required",description:"As a team admin, you need to select your team first before adding models.",type:"info",showIcon:!0,className:"mb-4"})]}),(X||ee&&J)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eg.Z.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"E.g. OpenAI, Azure OpenAI, Anthropic, Bedrock, etc.",labelCol:{span:10},labelAlign:"left",children:(0,s.jsxs)(ev.default,{virtual:!1,showSearch:!0,loading:P,placeholder:P?"Loading providers...":"Select a provider",optionFilterProp:"data-label",onChange:e=>{i(e),d(e),l.setFieldsValue({custom_llm_provider:e}),l.setFieldsValue({model:[],model_name:void 0})},children:[$&&0===Y.length&&(0,s.jsx)(ev.default.Option,{value:"",children:$},"__error"),Y.map(e=>{let l=e.provider_display_name,t=e.provider;return L.cd[l],(0,s.jsx)(ev.default.Option,{value:t,"data-label":l,children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(F,{provider:t,className:"w-5 h-5"}),(0,s.jsx)("span",{children:l})]})},t)})]})}),(0,s.jsx)(lw,{selectedProvider:r,providerModels:o,getPlaceholder:c}),(0,s.jsx)(lN,{}),(0,s.jsx)(eg.Z.Item,{label:"Mode",name:"mode",className:"mb-1",children:(0,s.jsx)(ev.default,{style:{width:"100%"},value:g,onChange:e=>j(e),options:lZ})}),(0,s.jsxs)(ew.Z,{children:[(0,s.jsx)(eZ.Z,{span:10}),(0,s.jsx)(eZ.Z,{span:10,children:(0,s.jsxs)(D.Z,{className:"mb-5 mt-1",children:[(0,s.jsx)("strong",{children:"Optional"})," - LiteLLM endpoint to use when health checking this model"," ",(0,s.jsx)(lk,{href:"https://docs.litellm.ai/docs/proxy/health#health",target:"_blank",children:"Learn more"})]})})]}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)(Q.default.Text,{className:"text-sm text-gray-500 mb-2",children:"Either select existing credentials OR enter new provider credentials below"})}),(0,s.jsx)(eg.Z.Item,{label:"Existing Credentials",name:"litellm_credential_name",initialValue:null,children:(0,s.jsx)(ev.default,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,l)=>{var t;return(null!==(t=null==l?void 0:l.label)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())},options:[{value:null,label:"None"},...p.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}),(0,s.jsx)(eg.Z.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.litellm_credential_name!==l.litellm_credential_name||e.provider!==l.provider,children:e=>{let{getFieldValue:l}=e,t=l("litellm_credential_name");return(console.log("\uD83D\uDD11 Credential Name Changed:",t),t)?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center my-4",children:[(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,s.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"OR"}),(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(0,s.jsx)(eP,{selectedProvider:r,uploadProps:m})]})}}),(0,s.jsxs)("div",{className:"flex items-center my-4",children:[(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,s.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Model Info Settings"}),(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(X||!ee)&&(0,s.jsx)(eg.Z.Item,{label:"Team-BYOK Model",tooltip:"Only use this model + credential combination for this team. Useful when teams want to onboard their own OpenAI keys.",className:"mb-4",children:(0,s.jsx)(M.Z,{title:S?"":"This is an enterprise-only feature. Upgrade to premium to restrict model+credential combinations to a specific team.",placement:"top",children:(0,s.jsx)(ln.Z,{checked:G,onChange:e=>{U(e),e||l.setFieldValue("team_id",void 0)},disabled:!S})})}),G&&(X||!ee)&&(0,s.jsx)(eg.Z.Item,{label:"Select Team",name:"team_id",className:"mb-4",tooltip:"Only keys for this team will be able to call this model.",rules:[{required:G&&!X,message:"Please select a team."}],children:(0,s.jsx)(ld.Z,{teams:x,disabled:!S})}),X&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(eg.Z.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to give users access to select models, and add new ones to the group over time.",children:(0,s.jsx)(ev.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:H.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})}),(0,s.jsx)(lv,{showAdvancedSettings:u,setShowAdvancedSettings:h,teams:x,guardrailsList:T||[],tagsList:V||{}})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(M.Z,{title:"Get help on our github",children:(0,s.jsx)(Q.default.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{className:"space-x-2",children:[(0,s.jsx)(_.ZP,{onClick:B,loading:y,children:"Test Connect"}),(0,s.jsx)(_.ZP,{htmlType:"submit",children:"Add Model"})]})]})]})})}),(0,s.jsx)(ea.Z,{title:"Connection Test Results",open:v,onCancel:()=>{b(!1),N(!1)},footer:[(0,s.jsx)(_.ZP,{onClick:()=>{b(!1),N(!1)},children:"Close"},"close")],width:700,children:v&&(0,s.jsx)(eQ,{formValues:l.getFieldsValue(),accessToken:C,testMode:g,modelName:l.getFieldValue("model_name")||l.getFieldValue("model"),onClose:()=>{b(!1),N(!1)},onTestComplete:()=>N(!1)},w)})]})},lA=e=>{let{form:l,handleOk:t,selectedProvider:a,setSelectedProvider:r,providerModels:i,setProviderModelsFn:n,getPlaceholder:o,uploadProps:d,showAdvancedSettings:c,setShowAdvancedSettings:m,teams:u,credentials:h,accessToken:x,userRole:p}=e,[g]=eg.Z.useForm();return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(eH.v0,{className:"w-full",children:[(0,s.jsxs)(eH.td,{className:"mb-4",children:[(0,s.jsx)(eH.OK,{children:"Add Model"}),(0,s.jsx)(eH.OK,{children:"Add Auto Router"})]}),(0,s.jsxs)(eH.nP,{children:[(0,s.jsx)(eH.x4,{children:(0,s.jsx)(lS,{form:l,handleOk:t,selectedProvider:a,setSelectedProvider:r,providerModels:i,setProviderModelsFn:n,getPlaceholder:o,uploadProps:d,showAdvancedSettings:c,setShowAdvancedSettings:m,teams:u,credentials:h})}),(0,s.jsx)(eH.x4,{children:(0,s.jsx)(lt,{form:g,handleOk:()=>{g.validateFields().then(e=>{e0(e,x,g,t)}).catch(e=>{console.error("Validation failed:",e)})},accessToken:x,userRole:p})})]})]})})},lE=t(8048),lP=t(4156),lM=t(15731),lL=t(91126);let lF=(e,l,t,a,r,i,n,o,d,c,m)=>[{header:()=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(lP.Z,{checked:t,indeterminate:l.length>0&&!t,onChange:e=>r(e.target.checked),onClick:e=>e.stopPropagation()}),(0,s.jsx)("span",{children:"Model ID"})]}),accessorKey:"model_info.id",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:t}=e,r=t.original,i=r.model_name,n=l.includes(i);return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(lP.Z,{checked:n,onChange:e=>a(i,e.target.checked),onClick:e=>e.stopPropagation()}),(0,s.jsx)(M.Z,{title:r.model_info.id,children:(0,s.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>m&&m(r.model_info.id),children:r.model_info.id})})]})}},{header:"Model Name",accessorKey:"model_name",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:l}=e,t=l.original,a=o(t)||t.model_name;return(0,s.jsx)("div",{className:"font-medium text-sm",children:(0,s.jsx)(M.Z,{title:a,children:(0,s.jsx)("div",{className:"truncate max-w-[200px]",children:a})})})}},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,sortingFn:(e,l,t)=>{var s,a;let r=e.getValue("health_status")||"unknown",i=l.getValue("health_status")||"unknown",n={healthy:0,checking:1,unknown:2,unhealthy:3};return(null!==(s=n[r])&&void 0!==s?s:4)-(null!==(a=n[i])&&void 0!==a?a:4)},cell:l=>{var t;let{row:a}=l,r=a.original,i={status:r.health_status,loading:r.health_loading,error:r.health_error};if(i.loading)return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsxs)("div",{className:"flex space-x-1",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse"}),(0,s.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,s.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}),(0,s.jsx)(e3.x,{className:"text-gray-600 text-sm",children:"Checking..."})]});let o=r.model_name,d="healthy"===i.status&&(null===(t=e[o])||void 0===t?void 0:t.successResponse);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[n(i.status),d&&c&&(0,s.jsx)(M.Z,{title:"View response details",placement:"top",children:(0,s.jsx)("button",{onClick:()=>{var l;return c(o,null===(l=e[o])||void 0===l?void 0:l.successResponse)},className:"p-1 text-green-600 hover:text-green-800 hover:bg-green-50 rounded cursor-pointer transition-colors",children:(0,s.jsx)(lM.Z,{className:"h-4 w-4"})})})]})}},{header:"Error Details",accessorKey:"health_error",enableSorting:!1,cell:l=>{let{row:t}=l,a=t.original.model_name,r=e[a];if(!(null==r?void 0:r.error))return(0,s.jsx)(e3.x,{className:"text-gray-400 text-sm",children:"No errors"});let i=r.error,n=r.fullError||r.error;return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("div",{className:"max-w-[200px]",children:(0,s.jsx)(M.Z,{title:i,placement:"top",children:(0,s.jsx)(e3.x,{className:"text-red-600 text-sm truncate",children:i})})}),d&&n!==i&&(0,s.jsx)(M.Z,{title:"View full error details",placement:"top",children:(0,s.jsx)("button",{onClick:()=>d(a,i,n),className:"p-1 text-red-600 hover:text-red-800 hover:bg-red-50 rounded cursor-pointer transition-colors",children:(0,s.jsx)(lM.Z,{className:"h-4 w-4"})})})]})}},{header:"Last Check",accessorKey:"last_check",enableSorting:!0,sortingFn:(e,l,t)=>{let s=e.getValue("last_check")||"Never checked",a=l.getValue("last_check")||"Never checked";if("Never checked"===s&&"Never checked"===a)return 0;if("Never checked"===s)return 1;if("Never checked"===a)return -1;if("Check in progress..."===s&&"Check in progress..."===a)return 0;if("Check in progress..."===s)return -1;if("Check in progress..."===a)return 1;let r=new Date(s),i=new Date(a);return isNaN(r.getTime())&&isNaN(i.getTime())?0:isNaN(r.getTime())?1:isNaN(i.getTime())?-1:i.getTime()-r.getTime()},cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)(e3.x,{className:"text-gray-600 text-sm",children:t.health_loading?"Check in progress...":t.last_check})}},{header:"Last Success",accessorKey:"last_success",enableSorting:!0,sortingFn:(e,l,t)=>{let s=e.getValue("last_success")||"Never succeeded",a=l.getValue("last_success")||"Never succeeded";if("Never succeeded"===s&&"Never succeeded"===a)return 0;if("Never succeeded"===s)return 1;if("Never succeeded"===a)return -1;if("None"===s&&"None"===a)return 0;if("None"===s)return 1;if("None"===a)return -1;let r=new Date(s),i=new Date(a);return isNaN(r.getTime())&&isNaN(i.getTime())?0:isNaN(r.getTime())?1:isNaN(i.getTime())?-1:i.getTime()-r.getTime()},cell:l=>{let{row:t}=l,a=e[t.original.model_name],r=(null==a?void 0:a.lastSuccess)||"None";return(0,s.jsx)(e3.x,{className:"text-gray-600 text-sm",children:r})}},{header:"Actions",id:"actions",cell:e=>{let{row:l}=e,t=l.original,a=t.model_name,r=t.health_status&&"none"!==t.health_status,n=t.health_loading?"Checking...":r?"Re-run Health Check":"Run Health Check";return(0,s.jsx)(M.Z,{title:n,placement:"top",children:(0,s.jsx)("button",{className:"p-2 rounded-md transition-colors ".concat(t.health_loading?"text-gray-400 cursor-not-allowed bg-gray-100":"text-indigo-600 hover:text-indigo-700 hover:bg-indigo-50"),onClick:()=>{t.health_loading||i(a)},disabled:t.health_loading,children:t.health_loading?(0,s.jsxs)("div",{className:"flex space-x-1",children:[(0,s.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse"}),(0,s.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,s.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}):r?(0,s.jsx)(eO.Z,{className:"h-4 w-4"}):(0,s.jsx)(lL.Z,{className:"h-4 w-4"})})})},enableSorting:!1}],lI=[{pattern:/Missing .* API Key/i,replacement:"Missing API Key"},{pattern:/Connection timeout/i,replacement:"Connection timeout"},{pattern:/Network.*not.*ok/i,replacement:"Network connection failed"},{pattern:/403.*Forbidden/i,replacement:"Access forbidden - check API key permissions"},{pattern:/401.*Unauthorized/i,replacement:"Unauthorized - invalid API key"},{pattern:/429.*rate limit/i,replacement:"Rate limit exceeded"},{pattern:/500.*Internal Server Error/i,replacement:"Provider internal server error"},{pattern:/litellm\.AuthenticationError/i,replacement:"Authentication failed"},{pattern:/litellm\.RateLimitError/i,replacement:"Rate limit exceeded"},{pattern:/litellm\.APIError/i,replacement:"API error"}];var lT=e=>{let{accessToken:l,modelData:t,all_models_on_proxy:r,getDisplayModelName:i,setSelectedModelId:n}=e,[o,d]=(0,f.useState)({}),[c,m]=(0,f.useState)([]),[u,h]=(0,f.useState)(!1),[x,p]=(0,f.useState)(!1),[g,j]=(0,f.useState)(null),[v,b]=(0,f.useState)(!1),[y,N]=(0,f.useState)(null);(0,f.useRef)(null),(0,f.useEffect)(()=>{l&&(null==t?void 0:t.data)&&(async()=>{let e={};t.data.forEach(l=>{e[l.model_name]={status:"none",lastCheck:"None",lastSuccess:"None",loading:!1,error:void 0,fullError:void 0,successResponse:void 0}});try{let s=await (0,a.latestHealthChecksCall)(l);s&&s.latest_health_checks&&"object"==typeof s.latest_health_checks&&Object.entries(s.latest_health_checks).forEach(l=>{let[s,a]=l;if(!a)return;let r=null,i=t.data.find(e=>e.model_name===s);if(i)r=i.model_name;else{let e=t.data.find(e=>e.model_info&&e.model_info.id===s);if(e)r=e.model_name;else if(a.model_name){let e=t.data.find(e=>e.model_name===a.model_name);e&&(r=e.model_name)}}if(r){let l=a.error_message||void 0;e[r]={status:a.status||"unknown",lastCheck:a.checked_at?new Date(a.checked_at).toLocaleString():"None",lastSuccess:"healthy"===a.status&&a.checked_at?new Date(a.checked_at).toLocaleString():"None",loading:!1,error:l?w(l):void 0,fullError:l,successResponse:"healthy"===a.status?a:void 0}}})}catch(e){console.warn("Failed to load health check history (using default states):",e)}d(e)})()},[l,t]);let w=e=>{var l;if(!e)return"Health check failed";let t="string"==typeof e?e:JSON.stringify(e),s=t.match(/(\w+Error):\s*(\d{3})/i);if(s)return"".concat(s[1],": ").concat(s[2]);let a=t.match(/(AuthenticationError|RateLimitError|BadRequestError|InternalServerError|TimeoutError|NotFoundError|ForbiddenError|ServiceUnavailableError|BadGatewayError|ContentPolicyViolationError|\w+Error)/i),r=t.match(/\b(400|401|403|404|408|429|500|502|503|504)\b/);if(a&&r)return"".concat(a[1],": ").concat(r[1]);if(r){let e=r[1];return"".concat({400:"BadRequestError",401:"AuthenticationError",403:"ForbiddenError",404:"NotFoundError",408:"TimeoutError",429:"RateLimitError",500:"InternalServerError",502:"BadGatewayError",503:"ServiceUnavailableError",504:"GatewayTimeoutError"}[e],": ").concat(e)}if(a){let e=a[1],l={AuthenticationError:"401",RateLimitError:"429",BadRequestError:"400",InternalServerError:"500",TimeoutError:"408",NotFoundError:"404",ForbiddenError:"403",ServiceUnavailableError:"503",BadGatewayError:"502",GatewayTimeoutError:"504",ContentPolicyViolationError:"400"}[e];return l?"".concat(e,": ").concat(l):e}for(let{pattern:e,replacement:l}of lI)if(e.test(t))return l;if(/missing.*api.*key|invalid.*key|unauthorized/i.test(t))return"AuthenticationError: 401";if(/rate.*limit|too.*many.*requests/i.test(t))return"RateLimitError: 429";if(/timeout|timed.*out/i.test(t))return"TimeoutError: 408";if(/not.*found/i.test(t))return"NotFoundError: 404";if(/forbidden|access.*denied/i.test(t))return"ForbiddenError: 403";if(/internal.*server.*error/i.test(t))return"InternalServerError: 500";let i=t.replace(/[\n\r]+/g," ").replace(/\s+/g," ").trim(),n=null===(l=i.split(/[.!?]/)[0])||void 0===l?void 0:l.trim();return n&&n.length>0?n.length>100?n.substring(0,97)+"...":n:i.length>100?i.substring(0,97)+"...":i},Z=async e=>{if(l){d(l=>({...l,[e]:{...l[e],loading:!0,status:"checking"}}));try{var s,r;let i=await (0,a.individualModelHealthCheckCall)(l,e),n=new Date().toLocaleString();if(i.unhealthy_count>0&&i.unhealthy_endpoints&&i.unhealthy_endpoints.length>0){let l=(null===(s=i.unhealthy_endpoints[0])||void 0===s?void 0:s.error)||"Health check failed",t=w(l);d(s=>{var a;return{...s,[e]:{status:"unhealthy",lastCheck:n,lastSuccess:(null===(a=s[e])||void 0===a?void 0:a.lastSuccess)||"None",loading:!1,error:t,fullError:l}}})}else d(l=>({...l,[e]:{status:"healthy",lastCheck:n,lastSuccess:n,loading:!1,successResponse:i}}));try{let s=await (0,a.latestHealthChecksCall)(l),i=t.data.find(l=>l.model_name===e);if(i){let l=i.model_info.id,t=null===(r=s.latest_health_checks)||void 0===r?void 0:r[l];if(t){let l=t.error_message||void 0;d(s=>{var a,r,i,n,o,d,c;return{...s,[e]:{status:t.status||(null===(a=s[e])||void 0===a?void 0:a.status)||"unknown",lastCheck:t.checked_at?new Date(t.checked_at).toLocaleString():(null===(r=s[e])||void 0===r?void 0:r.lastCheck)||"None",lastSuccess:"healthy"===t.status?t.checked_at?new Date(t.checked_at).toLocaleString():(null===(i=s[e])||void 0===i?void 0:i.lastSuccess)||"None":(null===(n=s[e])||void 0===n?void 0:n.lastSuccess)||"None",loading:!1,error:l?w(l):null===(o=s[e])||void 0===o?void 0:o.error,fullError:l||(null===(d=s[e])||void 0===d?void 0:d.fullError),successResponse:"healthy"===t.status?t:null===(c=s[e])||void 0===c?void 0:c.successResponse}}})}}}catch(e){console.debug("Could not fetch updated status from database (non-critical):",e)}}catch(a){let l=new Date().toLocaleString(),t=a instanceof Error?a.message:String(a),s=w(t);d(a=>{var r;return{...a,[e]:{status:"unhealthy",lastCheck:l,lastSuccess:(null===(r=a[e])||void 0===r?void 0:r.lastSuccess)||"None",loading:!1,error:s,fullError:t}}})}}},C=async()=>{let e=c.length>0?c:r,s=e.reduce((e,l)=>(e[l]={...o[l],loading:!0,status:"checking"},e),{});d(e=>({...e,...s}));let i={},n=e.map(async e=>{if(l)try{let s=await (0,a.individualModelHealthCheckCall)(l,e);i[e]=s;let r=new Date().toLocaleString();if(s.unhealthy_count>0&&s.unhealthy_endpoints&&s.unhealthy_endpoints.length>0){var t;let l=(null===(t=s.unhealthy_endpoints[0])||void 0===t?void 0:t.error)||"Health check failed",a=w(l);d(t=>{var s;return{...t,[e]:{status:"unhealthy",lastCheck:r,lastSuccess:(null===(s=t[e])||void 0===s?void 0:s.lastSuccess)||"None",loading:!1,error:a,fullError:l}}})}else d(l=>({...l,[e]:{status:"healthy",lastCheck:r,lastSuccess:r,loading:!1,successResponse:s}}))}catch(a){console.error("Health check failed for ".concat(e,":"),a);let l=new Date().toLocaleString(),t=a instanceof Error?a.message:String(a),s=w(t);d(a=>{var r;return{...a,[e]:{status:"unhealthy",lastCheck:l,lastSuccess:(null===(r=a[e])||void 0===r?void 0:r.lastSuccess)||"None",loading:!1,error:s,fullError:t}}})}});await Promise.allSettled(n);try{if(!l)return;let s=await (0,a.latestHealthChecksCall)(l);s.latest_health_checks&&Object.entries(s.latest_health_checks).forEach(l=>{let[s,a]=l,r=t.data.find(e=>e.model_info.id===s);if(r&&e.includes(r.model_name)&&a){let e=r.model_name,l=a.error_message||void 0;d(t=>{let s=t[e];return{...t,[e]:{status:a.status||(null==s?void 0:s.status)||"unknown",lastCheck:a.checked_at?new Date(a.checked_at).toLocaleString():(null==s?void 0:s.lastCheck)||"None",lastSuccess:"healthy"===a.status&&a.checked_at?new Date(a.checked_at).toLocaleString():(null==s?void 0:s.lastSuccess)||"None",loading:!1,error:l?w(l):null==s?void 0:s.error,fullError:l||(null==s?void 0:s.fullError),successResponse:"healthy"===a.status?a:null==s?void 0:s.successResponse}}})}})}catch(e){console.warn("Failed to fetch updated health statuses from database (non-critical):",e)}},k=e=>{h(e),e?m(r):m([])},S=()=>{p(!1),j(null)},P=()=>{b(!1),N(null)};return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-6",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(W.Z,{children:"Model Health Status"}),(0,s.jsx)(D.Z,{className:"text-gray-600 mt-1",children:"Run health checks on individual models to verify they are working correctly"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[c.length>0&&(0,s.jsx)(E.Z,{size:"sm",variant:"light",onClick:()=>k(!1),className:"px-3 py-1 text-sm",children:"Clear Selection"}),(0,s.jsx)(E.Z,{size:"sm",variant:"secondary",onClick:C,disabled:Object.values(o).some(e=>e.loading),className:"px-3 py-1 text-sm",children:c.length>0&&c.length{l?m(l=>[...l,e]):(m(l=>l.filter(l=>l!==e)),h(!1))},k,Z,e=>{switch(e){case"healthy":return(0,s.jsx)(A.Z,{color:"emerald",children:"healthy"});case"unhealthy":return(0,s.jsx)(A.Z,{color:"red",children:"unhealthy"});case"checking":return(0,s.jsx)(A.Z,{color:"blue",children:"checking"});case"none":return(0,s.jsx)(A.Z,{color:"gray",children:"none"});default:return(0,s.jsx)(A.Z,{color:"gray",children:"unknown"})}},i,(e,l,t)=>{j({modelName:e,cleanedError:l,fullError:t}),p(!0)},(e,l)=>{N({modelName:e,response:l}),b(!0)},n),data:t.data.map(e=>{let l=o[e.model_name]||{status:"none",lastCheck:"None",loading:!1};return{model_name:e.model_name,model_info:e.model_info,provider:e.provider,litellm_model_name:e.litellm_model_name,health_status:l.status,last_check:l.lastCheck,last_success:l.lastSuccess||"None",health_loading:l.loading,health_error:l.error,health_full_error:l.fullError}}),isLoading:!1})}),(0,s.jsx)(ea.Z,{title:g?"Health Check Error - ".concat(g.modelName):"Error Details",open:x,onCancel:S,footer:[(0,s.jsx)(_.ZP,{onClick:S,children:"Close"},"close")],width:800,children:g&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Error:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,s.jsx)(D.Z,{className:"text-red-800",children:g.cleanedError})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Full Error Details:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,s.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:g.fullError})})]})]})}),(0,s.jsx)(ea.Z,{title:y?"Health Check Response - ".concat(y.modelName):"Response Details",open:v,onCancel:P,footer:[(0,s.jsx)(_.ZP,{onClick:P,children:"Close"},"close")],width:800,children:y&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Status:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-green-50 border border-green-200 rounded-md",children:(0,s.jsx)(D.Z,{className:"text-green-800",children:"Health check passed successfully"})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Response Details:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,s.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:JSON.stringify(y.response,null,2)})})]})]})})]})},lR=t(47686),lO=t(77355),lV=t(93416),lq=t(95704),lz=e=>{let{accessToken:l,initialModelGroupAlias:t={},onAliasUpdate:r}=e,[i,n]=(0,f.useState)([]),[o,d]=(0,f.useState)({aliasName:"",targetModelGroup:""}),[c,m]=(0,f.useState)(null),[u,h]=(0,f.useState)(!0);(0,f.useEffect)(()=>{n(Object.entries(t).map((e,l)=>{var t;let[s,a]=e;return{id:"".concat(l,"-").concat(s),aliasName:s,targetModelGroup:"string"==typeof a?a:null!==(t=null==a?void 0:a.model)&&void 0!==t?t:""}}))},[t]);let x=async e=>{if(!l)return console.error("Access token is missing"),!1;try{let t={};return e.forEach(e=>{t[e.aliasName]=e.targetModelGroup}),console.log("Saving model group alias:",t),await (0,a.setCallbacksCall)(l,{router_settings:{model_group_alias:t}}),r&&r(t),!0}catch(e){return console.error("Failed to save model group alias settings:",e),eo.Z.fromBackend("Failed to save model group alias settings"),!1}},p=async()=>{if(!o.aliasName||!o.targetModelGroup){eo.Z.fromBackend("Please provide both alias name and target model group");return}if(i.some(e=>e.aliasName===o.aliasName)){eo.Z.fromBackend("An alias with this name already exists");return}let e=[...i,{id:"".concat(Date.now(),"-").concat(o.aliasName),aliasName:o.aliasName,targetModelGroup:o.targetModelGroup}];await x(e)&&(n(e),d({aliasName:"",targetModelGroup:""}),eo.Z.success("Alias added successfully"))},g=e=>{m({...e})},j=async()=>{if(!c)return;if(!c.aliasName||!c.targetModelGroup){eo.Z.fromBackend("Please provide both alias name and target model group");return}if(i.some(e=>e.id!==c.id&&e.aliasName===c.aliasName)){eo.Z.fromBackend("An alias with this name already exists");return}let e=i.map(e=>e.id===c.id?c:e);await x(e)&&(n(e),m(null),eo.Z.success("Alias updated successfully"))},v=()=>{m(null)},_=async e=>{let l=i.filter(l=>l.id!==e);await x(l)&&(n(l),eo.Z.success("Alias deleted successfully"))},b=i.reduce((e,l)=>(e[l.aliasName]=l.targetModelGroup,e),{});return(0,s.jsxs)(lq.Zb,{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>h(!u),children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)(lq.Dx,{className:"mb-0",children:"Model Group Alias Settings"}),(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"Create aliases for your model groups to simplify API calls. For example, you can create an alias 'gpt-4o' that points to 'gpt-4o-mini-openai' model group."})]}),(0,s.jsx)("div",{className:"flex items-center",children:u?(0,s.jsx)(y.Z,{className:"w-5 h-5 text-gray-500"}):(0,s.jsx)(lR.Z,{className:"w-5 h-5 text-gray-500"})})]}),u&&(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)(lq.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,s.jsx)("input",{type:"text",value:o.aliasName,onChange:e=>d({...o,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model Group"}),(0,s.jsx)("input",{type:"text",value:o.targetModelGroup,onChange:e=>d({...o,targetModelGroup:e.target.value}),placeholder:"e.g., gpt-4o-mini-openai",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,s.jsx)("div",{className:"flex items-end",children:(0,s.jsxs)("button",{onClick:p,disabled:!o.aliasName||!o.targetModelGroup,className:"flex items-center px-4 py-2 rounded-md text-sm ".concat(o.aliasName&&o.targetModelGroup?"bg-green-600 text-white hover:bg-green-700":"bg-gray-300 text-gray-500 cursor-not-allowed"),children:[(0,s.jsx)(lO.Z,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,s.jsx)(lq.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,s.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(lq.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,s.jsx)(lq.ss,{children:(0,s.jsxs)(lq.SC,{children:[(0,s.jsx)(lq.xs,{className:"py-1 h-8",children:"Alias Name"}),(0,s.jsx)(lq.xs,{className:"py-1 h-8",children:"Target Model Group"}),(0,s.jsx)(lq.xs,{className:"py-1 h-8",children:"Actions"})]})}),(0,s.jsxs)(lq.RM,{children:[i.map(e=>(0,s.jsx)(lq.SC,{className:"h-8",children:c&&c.id===e.id?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(lq.pj,{className:"py-0.5",children:(0,s.jsx)("input",{type:"text",value:c.aliasName,onChange:e=>m({...c,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,s.jsx)(lq.pj,{className:"py-0.5",children:(0,s.jsx)("input",{type:"text",value:c.targetModelGroup,onChange:e=>m({...c,targetModelGroup:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,s.jsx)(lq.pj,{className:"py-0.5 whitespace-nowrap",children:(0,s.jsxs)("div",{className:"flex space-x-2",children:[(0,s.jsx)("button",{onClick:j,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,s.jsx)("button",{onClick:v,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(lq.pj,{className:"py-0.5 text-sm text-gray-900",children:e.aliasName}),(0,s.jsx)(lq.pj,{className:"py-0.5 text-sm text-gray-500",children:e.targetModelGroup}),(0,s.jsx)(lq.pj,{className:"py-0.5 whitespace-nowrap",children:(0,s.jsxs)("div",{className:"flex space-x-2",children:[(0,s.jsx)("button",{onClick:()=>g(e),className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,s.jsx)(lV.Z,{className:"w-3 h-3"})}),(0,s.jsx)("button",{onClick:()=>_(e.id),className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,s.jsx)(S.Z,{className:"w-3 h-3"})})]})})]})},e.id)),0===i.length&&(0,s.jsx)(lq.SC,{children:(0,s.jsx)(lq.pj,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),(0,s.jsxs)(lq.Zb,{children:[(0,s.jsx)(lq.Dx,{className:"mb-4",children:"Configuration Example"}),(0,s.jsx)(lq.xv,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config.yaml:"}),(0,s.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,s.jsxs)("div",{className:"text-gray-700",children:["router_settings:",(0,s.jsx)("br",{}),"\xa0\xa0model_group_alias:",0===Object.keys(b).length?(0,s.jsxs)("span",{className:"text-gray-500",children:[(0,s.jsx)("br",{}),"\xa0\xa0\xa0\xa0# No aliases configured yet"]}):Object.entries(b).map(e=>{let[l,t]=e;return(0,s.jsxs)("span",{children:[(0,s.jsx)("br",{}),'\xa0\xa0\xa0\xa0"',l,'": "',t,'"']},l)})]})})]})]})]})},lD=t(10900),lB=t(12514),lG=t(49566),lU=t(30401),lH=t(78867),lK=t(59872),lJ=e=>{let{isVisible:l,onCancel:t,onSuccess:r,modelData:i,accessToken:n,userRole:o}=e,[d]=eg.Z.useForm(),[c,m]=(0,f.useState)(!1),[u,h]=(0,f.useState)([]),[x,p]=(0,f.useState)([]),[g,j]=(0,f.useState)(!1),[v,b]=(0,f.useState)(!1),[y,N]=(0,f.useState)(null);(0,f.useEffect)(()=>{l&&i&&w()},[l,i]),(0,f.useEffect)(()=>{let e=async()=>{if(n)try{let e=await (0,a.modelAvailableCall)(n,"","",!1,null,!0,!0);h(e.data.map(e=>e.id))}catch(e){console.error("Error fetching model access groups:",e)}},t=async()=>{if(n)try{let e=await (0,e1.p)(n);p(e)}catch(e){console.error("Error fetching model info:",e)}};l&&(e(),t())},[l,n]);let w=()=>{try{var e,l,t,s,a,r;let n=null;(null===(e=i.litellm_params)||void 0===e?void 0:e.auto_router_config)&&(n="string"==typeof i.litellm_params.auto_router_config?JSON.parse(i.litellm_params.auto_router_config):i.litellm_params.auto_router_config),N(n),d.setFieldsValue({auto_router_name:i.model_name,auto_router_default_model:(null===(l=i.litellm_params)||void 0===l?void 0:l.auto_router_default_model)||"",auto_router_embedding_model:(null===(t=i.litellm_params)||void 0===t?void 0:t.auto_router_embedding_model)||"",model_access_group:(null===(s=i.model_info)||void 0===s?void 0:s.access_groups)||[]});let o=new Set(x.map(e=>e.model_group));j(!o.has(null===(a=i.litellm_params)||void 0===a?void 0:a.auto_router_default_model)),b(!o.has(null===(r=i.litellm_params)||void 0===r?void 0:r.auto_router_embedding_model))}catch(e){console.error("Error parsing auto router config:",e),eo.Z.fromBackend("Error loading auto router configuration")}},Z=async()=>{try{m(!0);let e=await d.validateFields(),l={...i.litellm_params,auto_router_config:JSON.stringify(y),auto_router_default_model:e.auto_router_default_model,auto_router_embedding_model:e.auto_router_embedding_model||void 0},s={...i.model_info,access_groups:e.model_access_group||[]},o={model_name:e.auto_router_name,litellm_params:l,model_info:s};await (0,a.modelPatchUpdateCall)(n,o,i.model_info.id);let c={...i,model_name:e.auto_router_name,litellm_params:l,model_info:s};eo.Z.success("Auto router configuration updated successfully"),r(c),t()}catch(e){console.error("Error updating auto router:",e),eo.Z.fromBackend("Failed to update auto router configuration")}finally{m(!1)}},C=x.map(e=>({value:e.model_group,label:e.model_group}));return(0,s.jsx)(ea.Z,{title:"Edit Auto Router Configuration",open:l,onCancel:t,footer:[(0,s.jsx)(_.ZP,{onClick:t,children:"Cancel"},"cancel"),(0,s.jsx)(_.ZP,{loading:c,onClick:Z,children:"Save Changes"},"submit")],width:1e3,destroyOnClose:!0,children:(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(eN.x,{className:"text-gray-600",children:"Edit the auto router configuration including routing logic, default models, and access settings."}),(0,s.jsxs)(eg.Z,{form:d,layout:"vertical",className:"space-y-4",children:[(0,s.jsx)(eg.Z.Item,{label:"Auto Router Name",name:"auto_router_name",rules:[{required:!0,message:"Auto router name is required"}],children:(0,s.jsx)(eN.o,{placeholder:"e.g., auto_router_1, smart_routing"})}),(0,s.jsx)("div",{className:"w-full",children:(0,s.jsx)(e9,{modelInfo:x,value:y,onChange:e=>{N(e)}})}),(0,s.jsx)(eg.Z.Item,{label:"Default Model",name:"auto_router_default_model",rules:[{required:!0,message:"Default model is required"}],children:(0,s.jsx)(ev.default,{placeholder:"Select a default model",onChange:e=>{j("custom"===e)},options:[...C,{value:"custom",label:"Enter custom model name"}],showSearch:!0})}),(0,s.jsx)(eg.Z.Item,{label:"Embedding Model",name:"auto_router_embedding_model",children:(0,s.jsx)(ev.default,{placeholder:"Select an embedding model (optional)",onChange:e=>{b("custom"===e)},options:[...C,{value:"custom",label:"Enter custom model name"}],showSearch:!0,allowClear:!0})}),"Admin"===o&&(0,s.jsx)(eg.Z.Item,{label:"Model Access Groups",name:"model_access_group",tooltip:"Control who can access this auto router",children:(0,s.jsx)(ev.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:u.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})]})]})})};let{Title:lW,Link:lY}=Q.default;var l$=e=>{let{isVisible:l,onCancel:t,onAddCredential:a,existingCredential:r,setIsCredentialModalOpen:i}=e,[n]=eg.Z.useForm();return console.log("existingCredential in add credentials tab: ".concat(JSON.stringify(r))),(0,s.jsx)(ea.Z,{title:"Reuse Credentials",visible:l,onCancel:()=>{t(),n.resetFields()},footer:null,width:600,children:(0,s.jsxs)(eg.Z,{form:n,onFinish:e=>{a(e),n.resetFields(),i(!1)},layout:"vertical",children:[(0,s.jsx)(eg.Z.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],initialValue:null==r?void 0:r.credential_name,children:(0,s.jsx)(ej.o,{placeholder:"Enter a friendly name for these credentials"})}),Object.entries((null==r?void 0:r.credential_values)||{}).map(e=>{let[l,t]=e;return(0,s.jsx)(eg.Z.Item,{label:l,name:l,initialValue:t,children:(0,s.jsx)(ej.o,{placeholder:"Enter ".concat(l),disabled:!0})},l)}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(M.Z,{title:"Get help on our github",children:(0,s.jsx)(lY,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(_.ZP,{onClick:()=>{t(),n.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,s.jsx)(_.ZP,{htmlType:"submit",children:"Reuse Credentials"})]})]})]})})};function lX(e){var l,t,r,i,n,o,d,c,h,x,p,g,j,v,b,y,N,w,Z,C,A,P,F,I,V,q,B,G,U,H,J,Y,$;let{modelId:X,onClose:Q,accessToken:ee,userID:el,userRole:et,onModelUpdate:es,modelAccessGroups:er}=e,[ei]=eg.Z.useForm(),[en,ed]=(0,f.useState)(null),[ec,em]=(0,f.useState)(!1),[eu,eh]=(0,f.useState)(!1),[ex,ep]=(0,f.useState)(!1),[ej,e_]=(0,f.useState)(!1),[eb,ey]=(0,f.useState)(!1),[eN,ew]=(0,f.useState)(!1),[eZ,eC]=(0,f.useState)(null),[eS,eA]=(0,f.useState)(!1),[eE,eP]=(0,f.useState)({}),[eM,eL]=(0,f.useState)(!1),[eF,eI]=(0,f.useState)([]),[eT,eR]=(0,f.useState)({}),{data:eV,isLoading:eq}=(0,u.XP)(1,50,void 0,X),{data:eU}=m(),{data:eH}=(0,u.VI)(),eK=e=>null!=eU&&"object"==typeof eU&&e in eU?eU[e].litellm_provider:"openai",eJ=(0,f.useMemo)(()=>(null==eV?void 0:eV.data)&&0!==eV.data.length&&K(eV,eK).data[0]||null,[eV,eU]),eW=("Admin"===et||(null==eJ?void 0:null===(l=eJ.model_info)||void 0===l?void 0:l.created_by)===el)&&(null==eJ?void 0:null===(t=eJ.model_info)||void 0===t?void 0:t.db_model),eY="Admin"===et,e$=(null==eJ?void 0:null===(r=eJ.litellm_params)||void 0===r?void 0:r.auto_router_config)!=null,eX=(null==eJ?void 0:null===(i=eJ.litellm_params)||void 0===i?void 0:i.litellm_credential_name)!=null&&(null==eJ?void 0:null===(n=eJ.litellm_params)||void 0===n?void 0:n.litellm_credential_name)!=void 0;(0,f.useEffect)(()=>{if(eJ&&!en){var e,l,t,s,a,r,i;let n=eJ;n.litellm_model_name||(n={...n,litellm_model_name:null!==(i=null!==(r=null!==(a=null==n?void 0:null===(l=n.litellm_params)||void 0===l?void 0:l.litellm_model_name)&&void 0!==a?a:null==n?void 0:null===(t=n.litellm_params)||void 0===t?void 0:t.model)&&void 0!==r?r:null==n?void 0:null===(s=n.model_info)||void 0===s?void 0:s.key)&&void 0!==i?i:null}),ed(n),(null==n?void 0:null===(e=n.litellm_params)||void 0===e?void 0:e.cache_control_injection_points)&&eA(!0)}},[eJ,en]),(0,f.useEffect)(()=>{let e=async()=>{var e,l,t,s,r,i,n;if(!ee||eJ)return;let o=await (0,a.modelInfoV1Call)(ee,X);console.log("modelInfoResponse, ",o);let d=o.data[0];d&&!d.litellm_model_name&&(d={...d,litellm_model_name:null!==(n=null!==(i=null!==(r=null==d?void 0:null===(l=d.litellm_params)||void 0===l?void 0:l.litellm_model_name)&&void 0!==r?r:null==d?void 0:null===(t=d.litellm_params)||void 0===t?void 0:t.model)&&void 0!==i?i:null==d?void 0:null===(s=d.model_info)||void 0===s?void 0:s.key)&&void 0!==n?n:null}),ed(d),(null==d?void 0:null===(e=d.litellm_params)||void 0===e?void 0:e.cache_control_injection_points)&&eA(!0)},l=async()=>{if(ee)try{let e=(await (0,a.getGuardrailsList)(ee)).guardrails.map(e=>e.guardrail_name);eI(e)}catch(e){console.error("Failed to fetch guardrails:",e)}},t=async()=>{if(ee)try{let e=await (0,a.tagListCall)(ee);eR(e)}catch(e){console.error("Failed to fetch tags:",e)}};(async()=>{if(console.log("accessToken, ",ee),!ee||eX)return;let e=await (0,a.credentialGetCall)(ee,null,X);console.log("existingCredentialResponse, ",e),eC({credential_name:e.credential_name,credential_values:e.credential_values,credential_info:e.credential_info})})(),e(),l(),t()},[ee,X]);let eQ=async e=>{var l;if(console.log("values, ",e),!ee)return;let t={credential_name:e.credential_name,model_id:X,credential_info:{custom_llm_provider:null===(l=en.litellm_params)||void 0===l?void 0:l.custom_llm_provider}};eo.Z.info("Storing credential.."),console.log("credentialResponse, ",await (0,a.credentialCreateCall)(ee,t)),eo.Z.success("Credential stored successfully")},e0=async e=>{try{var l;let t;if(!ee)return;ey(!0),console.log("values.model_name, ",e.model_name);let s={};try{s=e.litellm_extra_params?JSON.parse(e.litellm_extra_params):{}}catch(e){eo.Z.fromBackend("Invalid JSON in LiteLLM Params"),ey(!1);return}let r={...e.litellm_params,...s,model:e.litellm_model_name,api_base:e.api_base,custom_llm_provider:e.custom_llm_provider,organization:e.organization,tpm:e.tpm,rpm:e.rpm,max_retries:e.max_retries,timeout:e.timeout,stream_timeout:e.stream_timeout,input_cost_per_token:e.input_cost/1e6,output_cost_per_token:e.output_cost/1e6,tags:e.tags};e.guardrails&&(r.guardrails=e.guardrails),e.cache_control&&(null===(l=e.cache_control_injection_points)||void 0===l?void 0:l.length)>0?r.cache_control_injection_points=e.cache_control_injection_points:delete r.cache_control_injection_points;try{t=e.model_info?JSON.parse(e.model_info):eJ.model_info,e.model_access_group&&(t={...t,access_groups:e.model_access_group}),void 0!==e.health_check_model&&(t={...t,health_check_model:e.health_check_model})}catch(e){eo.Z.fromBackend("Invalid JSON in Model Info");return}let i={model_name:e.model_name,litellm_params:r,model_info:t};await (0,a.modelPatchUpdateCall)(ee,i,X);let n={...en,model_name:e.model_name,litellm_model_name:e.litellm_model_name,litellm_params:r,model_info:t};ed(n),es&&es(n),eo.Z.success("Model settings updated successfully"),e_(!1),ew(!1)}catch(e){console.error("Error updating model:",e),eo.Z.fromBackend("Failed to update model settings")}finally{ey(!1)}};if(eq)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(E.Z,{icon:lD.Z,variant:"light",onClick:Q,className:"mb-4",children:"Back to Models"}),(0,s.jsx)(D.Z,{children:"Loading..."})]});if(!eJ)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(E.Z,{icon:lD.Z,variant:"light",onClick:Q,className:"mb-4",children:"Back to Models"}),(0,s.jsx)(D.Z,{children:"Model not found"})]});let e1=async()=>{if(ee)try{var e,l,t;eo.Z.info("Testing connection...");let s=await (0,a.testConnectionRequest)(ee,{custom_llm_provider:en.litellm_params.custom_llm_provider,litellm_credential_name:en.litellm_params.litellm_credential_name,model:en.litellm_model_name},{mode:null===(e=en.model_info)||void 0===e?void 0:e.mode},null===(l=en.model_info)||void 0===l?void 0:l.mode);if("success"===s.status)eo.Z.success("Connection test successful!");else throw Error((null==s?void 0:null===(t=s.result)||void 0===t?void 0:t.error)||(null==s?void 0:s.message)||"Unknown error")}catch(e){e instanceof Error?eo.Z.error("Error testing connection: "+(0,lf.aS)(e.message,100)):eo.Z.error("Error testing connection: "+String(e))}},e2=async()=>{try{if(eh(!0),!ee)return;await (0,a.modelDeleteCall)(ee,X),eo.Z.success("Model deleted successfully"),es&&es({deleted:!0,model_info:{id:X}}),Q()}catch(e){console.error("Error deleting the model:",e),eo.Z.fromBackend("Failed to delete model")}finally{eh(!1),em(!1)}},e4=async(e,l)=>{await (0,lK.vQ)(e)&&(eP(e=>({...e,[l]:!0})),setTimeout(()=>{eP(e=>({...e,[l]:!1}))},2e3))},e5=eJ.litellm_model_name.includes("*");return console.log("isWildcardModel, ",e5),(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(E.Z,{icon:lD.Z,variant:"light",onClick:Q,className:"mb-4",children:"Back to Models"}),(0,s.jsxs)(W.Z,{children:["Public Model Name: ",T(eJ)]}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(D.Z,{className:"text-gray-500 font-mono",children:eJ.model_info.id}),(0,s.jsx)(_.ZP,{type:"text",size:"small",icon:eE["model-id"]?(0,s.jsx)(lU.Z,{size:12}):(0,s.jsx)(lH.Z,{size:12}),onClick:()=>e4(eJ.model_info.id,"model-id"),className:"left-2 z-10 transition-all duration-200 ".concat(eE["model-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(E.Z,{variant:"secondary",icon:eO.Z,onClick:e1,className:"flex items-center gap-2","data-testid":"test-connection-button",children:"Test Connection"}),(0,s.jsx)(E.Z,{icon:k.Z,variant:"secondary",onClick:()=>ep(!0),className:"flex items-center",disabled:!eY,"data-testid":"reuse-credentials-button",children:"Re-use Credentials"}),(0,s.jsx)(E.Z,{icon:S.Z,variant:"secondary",onClick:()=>em(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-700",disabled:!eW,"data-testid":"delete-model-button",children:"Delete Model"})]})]}),(0,s.jsxs)(eD.Z,{children:[(0,s.jsxs)(eB.Z,{className:"mb-6",children:[(0,s.jsx)(ez.Z,{children:"Overview"}),(0,s.jsx)(ez.Z,{children:"Raw JSON"})]}),(0,s.jsxs)(eG.Z,{children:[(0,s.jsxs)(z.Z,{children:[(0,s.jsxs)(O.Z,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6 mb-6",children:[(0,s.jsxs)(lB.Z,{children:[(0,s.jsx)(D.Z,{children:"Provider"}),(0,s.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[eJ.provider&&(0,s.jsx)("img",{src:(0,L.dr)(eJ.provider).logo,alt:"".concat(eJ.provider," logo"),className:"w-4 h-4",onError:e=>{let l=e.currentTarget,t=l.parentElement;if(t&&t.contains(l))try{var s;let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=(null===(s=eJ.provider)||void 0===s?void 0:s.charAt(0))||"-",t.replaceChild(e,l)}catch(e){console.error("Failed to replace provider logo fallback:",e)}}}),(0,s.jsx)(W.Z,{children:eJ.provider||"Not Set"})]})]}),(0,s.jsxs)(lB.Z,{children:[(0,s.jsx)(D.Z,{children:"LiteLLM Model"}),(0,s.jsx)("div",{className:"mt-2 overflow-hidden",children:(0,s.jsx)(M.Z,{title:eJ.litellm_model_name||"Not Set",children:(0,s.jsx)("div",{className:"break-all text-sm font-medium leading-relaxed cursor-pointer",children:eJ.litellm_model_name||"Not Set"})})})]}),(0,s.jsxs)(lB.Z,{children:[(0,s.jsx)(D.Z,{children:"Pricing"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(D.Z,{children:["Input: $",eJ.input_cost,"/1M tokens"]}),(0,s.jsxs)(D.Z,{children:["Output: $",eJ.output_cost,"/1M tokens"]})]})]})]}),(0,s.jsxs)("div",{className:"mb-6 text-sm text-gray-500 flex items-center gap-x-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Created At"," ",eJ.model_info.created_at?new Date(eJ.model_info.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"Not Set"]}),(0,s.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})}),"Created By ",eJ.model_info.created_by||"Not Set"]})]}),(0,s.jsxs)(lB.Z,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(W.Z,{children:"Model Settings"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[e$&&eW&&!eN&&(0,s.jsx)(E.Z,{onClick:()=>eL(!0),className:"flex items-center",children:"Edit Auto Router"}),eW?!eN&&(0,s.jsx)(E.Z,{onClick:()=>ew(!0),className:"flex items-center",children:"Edit Settings"}):(0,s.jsx)(M.Z,{title:"Only DB models can be edited. You must be an admin or the creator of the model to edit it.",children:(0,s.jsx)(R.Z,{})})]})]}),en?(0,s.jsx)(eg.Z,{form:ei,onFinish:e0,initialValues:{model_name:en.model_name,litellm_model_name:en.litellm_model_name,api_base:en.litellm_params.api_base,custom_llm_provider:en.litellm_params.custom_llm_provider,organization:en.litellm_params.organization,tpm:en.litellm_params.tpm,rpm:en.litellm_params.rpm,max_retries:en.litellm_params.max_retries,timeout:en.litellm_params.timeout,stream_timeout:en.litellm_params.stream_timeout,input_cost:en.litellm_params.input_cost_per_token?1e6*en.litellm_params.input_cost_per_token:(null===(o=en.model_info)||void 0===o?void 0:o.input_cost_per_token)*1e6||null,output_cost:(null===(d=en.litellm_params)||void 0===d?void 0:d.output_cost_per_token)?1e6*en.litellm_params.output_cost_per_token:(null===(c=en.model_info)||void 0===c?void 0:c.output_cost_per_token)*1e6||null,cache_control:null!==(h=en.litellm_params)&&void 0!==h&&!!h.cache_control_injection_points,cache_control_injection_points:(null===(x=en.litellm_params)||void 0===x?void 0:x.cache_control_injection_points)||[],model_access_group:Array.isArray(null===(p=en.model_info)||void 0===p?void 0:p.access_groups)?en.model_info.access_groups:[],guardrails:Array.isArray(null===(g=en.litellm_params)||void 0===g?void 0:g.guardrails)?en.litellm_params.guardrails:[],tags:Array.isArray(null===(j=en.litellm_params)||void 0===j?void 0:j.tags)?en.litellm_params.tags:[],health_check_model:e5?null===(v=en.model_info)||void 0===v?void 0:v.health_check_model:null,litellm_extra_params:JSON.stringify(en.litellm_params||{},null,2)},layout:"vertical",onValuesChange:()=>e_(!0),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Model Name"}),eN?(0,s.jsx)(eg.Z.Item,{name:"model_name",className:"mb-0",children:(0,s.jsx)(lG.Z,{placeholder:"Enter model name"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:en.model_name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"LiteLLM Model Name"}),eN?(0,s.jsx)(eg.Z.Item,{name:"litellm_model_name",className:"mb-0",children:(0,s.jsx)(lG.Z,{placeholder:"Enter LiteLLM model name"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:en.litellm_model_name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Input Cost (per 1M tokens)"}),eN?(0,s.jsx)(eg.Z.Item,{name:"input_cost",className:"mb-0",children:(0,s.jsx)(lx.Z,{placeholder:"Enter input cost"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null==en?void 0:null===(b=en.litellm_params)||void 0===b?void 0:b.input_cost_per_token)?((null===(y=en.litellm_params)||void 0===y?void 0:y.input_cost_per_token)*1e6).toFixed(4):(null==en?void 0:null===(N=en.model_info)||void 0===N?void 0:N.input_cost_per_token)?(1e6*en.model_info.input_cost_per_token).toFixed(4):null})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Output Cost (per 1M tokens)"}),eN?(0,s.jsx)(eg.Z.Item,{name:"output_cost",className:"mb-0",children:(0,s.jsx)(lx.Z,{placeholder:"Enter output cost"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null==en?void 0:null===(w=en.litellm_params)||void 0===w?void 0:w.output_cost_per_token)?(1e6*en.litellm_params.output_cost_per_token).toFixed(4):(null==en?void 0:null===(Z=en.model_info)||void 0===Z?void 0:Z.output_cost_per_token)?(1e6*en.model_info.output_cost_per_token).toFixed(4):null})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"API Base"}),eN?(0,s.jsx)(eg.Z.Item,{name:"api_base",className:"mb-0",children:(0,s.jsx)(lG.Z,{placeholder:"Enter API base"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(C=en.litellm_params)||void 0===C?void 0:C.api_base)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Custom LLM Provider"}),eN?(0,s.jsx)(eg.Z.Item,{name:"custom_llm_provider",className:"mb-0",children:(0,s.jsx)(lG.Z,{placeholder:"Enter custom LLM provider"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(A=en.litellm_params)||void 0===A?void 0:A.custom_llm_provider)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Organization"}),eN?(0,s.jsx)(eg.Z.Item,{name:"organization",className:"mb-0",children:(0,s.jsx)(lG.Z,{placeholder:"Enter organization"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(P=en.litellm_params)||void 0===P?void 0:P.organization)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"TPM (Tokens per Minute)"}),eN?(0,s.jsx)(eg.Z.Item,{name:"tpm",className:"mb-0",children:(0,s.jsx)(lx.Z,{placeholder:"Enter TPM"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(F=en.litellm_params)||void 0===F?void 0:F.tpm)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"RPM (Requests per Minute)"}),eN?(0,s.jsx)(eg.Z.Item,{name:"rpm",className:"mb-0",children:(0,s.jsx)(lx.Z,{placeholder:"Enter RPM"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(I=en.litellm_params)||void 0===I?void 0:I.rpm)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Max Retries"}),eN?(0,s.jsx)(eg.Z.Item,{name:"max_retries",className:"mb-0",children:(0,s.jsx)(lx.Z,{placeholder:"Enter max retries"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(V=en.litellm_params)||void 0===V?void 0:V.max_retries)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Timeout (seconds)"}),eN?(0,s.jsx)(eg.Z.Item,{name:"timeout",className:"mb-0",children:(0,s.jsx)(lx.Z,{placeholder:"Enter timeout"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(q=en.litellm_params)||void 0===q?void 0:q.timeout)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Stream Timeout (seconds)"}),eN?(0,s.jsx)(eg.Z.Item,{name:"stream_timeout",className:"mb-0",children:(0,s.jsx)(lx.Z,{placeholder:"Enter stream timeout"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(B=en.litellm_params)||void 0===B?void 0:B.stream_timeout)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Model Access Groups"}),eN?(0,s.jsx)(eg.Z.Item,{name:"model_access_group",className:"mb-0",children:(0,s.jsx)(ev.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:null==er?void 0:er.map(e=>({value:e,label:e}))})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(G=en.model_info)||void 0===G?void 0:G.access_groups)?Array.isArray(en.model_info.access_groups)?en.model_info.access_groups.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:en.model_info.access_groups.map((e,l)=>(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:e},l))}):"No groups assigned":en.model_info.access_groups:"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(D.Z,{className:"font-medium",children:["Guardrails",(0,s.jsx)(M.Z,{title:"Apply safety guardrails to this model to filter content or enforce policies",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(R.Z,{style:{marginLeft:"4px"}})})})]}),eN?(0,s.jsx)(eg.Z.Item,{name:"guardrails",className:"mb-0",children:(0,s.jsx)(ev.default,{mode:"tags",showSearch:!0,placeholder:"Select existing guardrails or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:eF.map(e=>({value:e,label:e}))})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(U=en.litellm_params)||void 0===U?void 0:U.guardrails)?Array.isArray(en.litellm_params.guardrails)?en.litellm_params.guardrails.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:en.litellm_params.guardrails.map((e,l)=>(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:e},l))}):"No guardrails assigned":en.litellm_params.guardrails:"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Tags"}),eN?(0,s.jsx)(eg.Z.Item,{name:"tags",className:"mb-0",children:(0,s.jsx)(ev.default,{mode:"tags",showSearch:!0,placeholder:"Select existing tags or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:Object.values(eT).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(H=en.litellm_params)||void 0===H?void 0:H.tags)?Array.isArray(en.litellm_params.tags)?en.litellm_params.tags.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:en.litellm_params.tags.map((e,l)=>(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-purple-100 text-purple-800",children:e},l))}):"No tags assigned":en.litellm_params.tags:"Not Set"})]}),e5&&(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Health Check Model"}),eN?(0,s.jsx)(eg.Z.Item,{name:"health_check_model",className:"mb-0",children:(0,s.jsx)(ev.default,{showSearch:!0,placeholder:"Select existing health check model",optionFilterProp:"children",allowClear:!0,options:(()=>{var e;let l=eJ.litellm_model_name.split("/")[0];return(null==eH?void 0:null===(e=eH.data)||void 0===e?void 0:e.filter(e=>{var t;return(null===(t=e.providers)||void 0===t?void 0:t.includes(l))&&e.model_group!==eJ.litellm_model_name}).map(e=>({value:e.model_group,label:e.model_group})))||[]})()})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(J=en.model_info)||void 0===J?void 0:J.health_check_model)||"Not Set"})]}),eN?(0,s.jsx)(lg,{form:ei,showCacheControl:eS,onCacheControlChange:e=>eA(e)}):(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Cache Control"}),(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(Y=en.litellm_params)||void 0===Y?void 0:Y.cache_control_injection_points)?(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:"Enabled"}),(0,s.jsx)("div",{className:"mt-2",children:en.litellm_params.cache_control_injection_points.map((e,l)=>(0,s.jsxs)("div",{className:"text-sm text-gray-600 mb-1",children:["Location: ",e.location,",",e.role&&(0,s.jsxs)("span",{children:[" Role: ",e.role]}),void 0!==e.index&&(0,s.jsxs)("span",{children:[" Index: ",e.index]})]},l))})]}):"Disabled"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Model Info"}),eN?(0,s.jsx)(eg.Z.Item,{name:"model_info",className:"mb-0",children:(0,s.jsx)(ek.default.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}',defaultValue:JSON.stringify(eJ.model_info,null,2)})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(en.model_info,null,2)})})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(D.Z,{className:"font-medium",children:["LiteLLM Params",(0,s.jsx)(M.Z,{title:"Optional litellm params used for making a litellm.completion() call. Some params are automatically added by LiteLLM.",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(R.Z,{style:{marginLeft:"4px"}})})})]}),eN?(0,s.jsx)(eg.Z.Item,{name:"litellm_extra_params",rules:[{validator:lf.Ac}],children:(0,s.jsx)(ek.default.TextArea,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(en.litellm_params,null,2)})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Team ID"}),(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:eJ.model_info.team_id||"Not Set"})]})]}),eN&&(0,s.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,s.jsx)(E.Z,{variant:"secondary",onClick:()=>{ei.resetFields(),e_(!1),ew(!1)},disabled:eb,children:"Cancel"}),(0,s.jsx)(E.Z,{variant:"primary",onClick:()=>ei.submit(),loading:eb,children:"Save Changes"})]})]})}):(0,s.jsx)(D.Z,{children:"Loading..."})]})]}),(0,s.jsx)(z.Z,{children:(0,s.jsx)(lB.Z,{children:(0,s.jsx)("pre",{className:"bg-gray-100 p-4 rounded text-xs overflow-auto",children:JSON.stringify(eJ,null,2)})})})]})]}),(0,s.jsx)(ef.Z,{isOpen:ec,title:"Delete Model",alertMessage:"This action cannot be undone.",message:"Are you sure you want to delete this model?",resourceInformationTitle:"Model Information",resourceInformation:[{label:"Model Name",value:(null==eJ?void 0:eJ.model_name)||"Not Set"},{label:"LiteLLM Model Name",value:(null==eJ?void 0:eJ.litellm_model_name)||"Not Set"},{label:"Provider",value:(null==eJ?void 0:eJ.provider)||"Not Set"},{label:"Created By",value:(null==eJ?void 0:null===($=eJ.model_info)||void 0===$?void 0:$.created_by)||"Not Set"}],onCancel:()=>em(!1),onOk:e2,confirmLoading:eu}),ex&&!eX?(0,s.jsx)(l$,{isVisible:ex,onCancel:()=>ep(!1),onAddCredential:eQ,existingCredential:eZ,setIsCredentialModalOpen:ep}):(0,s.jsx)(ea.Z,{open:ex,onCancel:()=>ep(!1),title:"Using Existing Credential",children:(0,s.jsx)(D.Z,{children:eJ.litellm_params.litellm_credential_name})}),(0,s.jsx)(lJ,{isVisible:eM,onCancel:()=>eL(!1),onSuccess:e=>{ed(e),es&&es(e)},modelData:en||eJ,accessToken:ee||"",userRole:et||""})]})}var lQ=t(27593),l0=t(56147),l1=e=>{var l;let{premiumUser:t,teams:r}=e,{accessToken:i,token:o,userRole:c,userId:x}=(0,n.Z)(),[p]=eg.Z.useForm(),[g,j]=(0,f.useState)(""),[v,_]=(0,f.useState)([]),[b,y]=(0,f.useState)(L.Cl.Anthropic),[N,w]=(0,f.useState)(null),[Z,C]=(0,f.useState)(null),[k,S]=(0,f.useState)(null),[A,E]=(0,f.useState)(0),[M,F]=(0,f.useState)({}),[I,R]=(0,f.useState)(!1),[V,q]=(0,f.useState)(null),[B,G]=(0,f.useState)(null),[U,H]=(0,f.useState)(0),W=(0,eV.NL)(),{data:Y,isLoading:$,refetch:ee}=(0,u.XP)(),{data:el,isLoading:et}=m(),{data:es,isLoading:ea}=d(),er=(null==es?void 0:es.credentials)||[],{data:ei,isLoading:en}=(0,h.L)(),ed=(0,f.useMemo)(()=>{if(!(null==Y?void 0:Y.data))return[];let e=new Set;for(let l of Y.data)e.add(l.model_name);return Array.from(e).sort()},[null==Y?void 0:Y.data]),ec=(0,f.useMemo)(()=>{if(!(null==Y?void 0:Y.data))return[];let e=new Set;for(let l of Y.data){let t=l.model_info;if(null==t?void 0:t.access_groups)for(let l of t.access_groups)e.add(l)}return Array.from(e)},[null==Y?void 0:Y.data]),eu=(0,f.useMemo)(()=>(null==Y?void 0:Y.data)?Y.data.map(e=>e.model_name):[],[null==Y?void 0:Y.data]),ex=e=>null!=el&&"object"==typeof el&&e in el?el[e].litellm_provider:"openai",ep=(0,f.useMemo)(()=>(null==Y?void 0:Y.data)?K(Y,ex):{data:[]},[null==Y?void 0:Y.data,ex]),ef=c&&(0,eR.P4)(c),ej=c&&eR.lo.includes(c),ev=x&&(0,eR.yV)(r,x),e_=ej&&(null==ei?void 0:null===(l=ei.values)||void 0===l?void 0:l.disable_model_add_for_internal_users)===!0,eb=!ef&&(e_||!ev),ey={name:"file",accept:".json",pastable:!1,beforeUpload:e=>{if("application/json"===e.type){let l=new FileReader;l.onload=e=>{if(e.target){let l=e.target.result;p.setFieldsValue({vertex_credentials:l})}},l.readAsText(e)}return!1},onChange(e){"done"===e.file.status?eo.Z.success("".concat(e.file.name," file uploaded successfully")):"error"===e.file.status&&eo.Z.fromBackend("".concat(e.file.name," file upload failed."))}},eN=()=>{j(new Date().toLocaleString()),W.invalidateQueries({queryKey:["models","list"]}),ee()},ew=async()=>{if(i)try{let e={router_settings:{}};"global"===N?(k&&(e.router_settings.retry_policy=k),eo.Z.success("Global retry settings saved successfully")):(Z&&(e.router_settings.model_group_retry_policy=Z),eo.Z.success("Retry settings saved successfully for ".concat(N))),await (0,a.setCallbacksCall)(i,e)}catch(e){eo.Z.fromBackend("Failed to save retry settings")}};if((0,f.useEffect)(()=>{if(!i||!o||!c||!x||!Y)return;let e=async()=>{try{let e=(await (0,a.getCallbacksCall)(i,x,c)).router_settings,l=e.model_group_retry_policy,t=e.num_retries;C(l),S(e.retry_policy),E(t);let s=e.model_group_alias||{};F(s)}catch(e){console.error("Error fetching model data:",e)}};i&&o&&c&&x&&Y&&e()},[i,o,c,x,Y]),c&&"Admin Viewer"==c){let{Title:e,Paragraph:l}=Q.default;return(0,s.jsxs)("div",{children:[(0,s.jsx)(e,{level:1,children:"Access Denied"}),(0,s.jsx)(l,{children:"Ask your proxy admin for access to view all models"})]})}let eZ=async()=>{try{let e=await p.validateFields();await eh(e,i,p,eN)}catch(t){var e;let l=(null===(e=t.errorFields)||void 0===e?void 0:e.map(e=>"".concat(e.name.join("."),": ").concat(e.errors.join(", "))).join(" | "))||"Unknown validation error";eo.Z.fromBackend("Please fill in the following required fields: ".concat(l))}};return(Object.keys(L.Cl).find(e=>L.Cl[e]===b),B)?(0,s.jsx)("div",{className:"w-full h-full",children:(0,s.jsx)(l0.Z,{teamId:B,onClose:()=>G(null),accessToken:i,is_team_admin:"Admin"===c,is_proxy_admin:"Proxy Admin"===c,userModels:eu,editTeam:!1,onUpdate:eN,premiumUser:t})}):(0,s.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,s.jsx)(O.Z,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,s.jsxs)(eq.Z,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Model Management"}),eR.ZL.includes(c)?(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"Add and manage models for the proxy"}):(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"Add models for teams you are an admin for."})]})}),(0,s.jsxs)("div",{className:"mb-4 px-4 py-3 bg-blue-50 rounded-lg border border-blue-100 flex items-center gap-4",children:[(0,s.jsx)("div",{className:"flex-shrink-0 w-10 h-10 bg-white rounded-full flex items-center justify-center border border-blue-200",children:(0,s.jsx)(eU.Z,{style:{fontSize:"18px",color:"#6366f1"}})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("h4",{className:"text-gray-900 font-semibold text-sm m-0",children:"Missing a provider?"}),(0,s.jsx)("p",{className:"text-gray-500 text-xs m-0 mt-0.5",children:"The LiteLLM engineering team is constantly adding support for new LLM models, providers, endpoints. If you don't see the one you need, let us know and we'll prioritize it."})]}),(0,s.jsxs)("a",{href:"https://models.litellm.ai/?request=true",target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0 inline-flex items-center gap-2 px-4 py-2 bg-[#6366f1] hover:bg-[#5558e3] text-white text-sm font-medium rounded-lg transition-colors",children:["Request Provider",(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})]}),V&&!($||et||ea||en)?(0,s.jsx)(lX,{modelId:V,onClose:()=>{q(null)},accessToken:i,userID:x,userRole:c,onModelUpdate:e=>{W.invalidateQueries({queryKey:["models","list"]}),eN()},modelAccessGroups:ec}):(0,s.jsxs)(eD.Z,{index:U,onIndexChange:H,className:"gap-2 h-[75vh] w-full ",children:[(0,s.jsxs)(eB.Z,{className:"flex justify-between mt-2 w-full items-center",children:[(0,s.jsxs)("div",{className:"flex",children:[eR.ZL.includes(c)?(0,s.jsx)(ez.Z,{children:"All Models"}):(0,s.jsx)(ez.Z,{children:"Your Models"}),!eb&&(0,s.jsx)(ez.Z,{children:"Add Model"}),eR.ZL.includes(c)&&(0,s.jsx)(ez.Z,{children:"LLM Credentials"}),eR.ZL.includes(c)&&(0,s.jsx)(ez.Z,{children:"Pass-Through Endpoints"}),eR.ZL.includes(c)&&(0,s.jsx)(ez.Z,{children:"Health Status"}),eR.ZL.includes(c)&&(0,s.jsx)(ez.Z,{children:"Model Retry Settings"}),eR.ZL.includes(c)&&(0,s.jsx)(ez.Z,{children:"Model Group Alias"}),eR.ZL.includes(c)&&(0,s.jsx)(ez.Z,{children:"Price Data Reload"})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[g&&(0,s.jsxs)(D.Z,{children:["Last Refreshed: ",g]}),(0,s.jsx)(P.Z,{icon:eO.Z,variant:"shadow",size:"xs",className:"self-center",onClick:eN})]})]}),(0,s.jsxs)(eG.Z,{children:[(0,s.jsx)(J,{selectedModelGroup:N,setSelectedModelGroup:w,availableModelGroups:ed,availableModelAccessGroups:ec,setSelectedModelId:q,setSelectedTeamId:G}),!eb&&(0,s.jsx)(z.Z,{className:"h-full",children:(0,s.jsx)(lA,{form:p,handleOk:eZ,selectedProvider:b,setSelectedProvider:y,providerModels:v,setProviderModelsFn:e=>{_((0,L.bK)(e,el))},getPlaceholder:L.ph,uploadProps:ey,showAdvancedSettings:I,setShowAdvancedSettings:R,teams:r,credentials:er,accessToken:i,userRole:c})}),(0,s.jsx)(z.Z,{children:(0,s.jsx)(eT,{uploadProps:ey})}),(0,s.jsx)(z.Z,{children:(0,s.jsx)(lQ.Z,{accessToken:i,userRole:c,userID:x,modelData:ep,premiumUser:t})}),(0,s.jsx)(z.Z,{children:(0,s.jsx)(lT,{accessToken:i,modelData:ep,all_models_on_proxy:eu,getDisplayModelName:T,setSelectedModelId:q})}),(0,s.jsx)(X,{selectedModelGroup:N,setSelectedModelGroup:w,availableModelGroups:ed,globalRetryPolicy:k,setGlobalRetryPolicy:S,defaultRetry:A,modelGroupRetryPolicy:Z,setModelGroupRetryPolicy:C,handleSaveRetrySettings:ew}),(0,s.jsx)(z.Z,{children:(0,s.jsx)(lz,{accessToken:i,initialModelGroupAlias:M,onAliasUpdate:F})}),(0,s.jsx)(em,{})]})]})]})})})}},27593:function(e,l,t){t.d(l,{Z:function(){return Y}});var s=t(57437),a=t(2265),r=t(78489),i=t(47323),n=t(84264),o=t(96761),d=t(19250),c=t(99981),m=t(33866),u=t(15731),h=t(53410),x=t(74998),p=t(59341),g=t(49566),f=t(12514),j=t(97765),v=t(37592),_=t(10032),b=t(22116),y=t(51653),N=t(24199),w=t(12660),Z=t(15424),C=t(58760),k=t(5545),S=t(45246),A=t(96473),E=t(31283),P=e=>{let{value:l={},onChange:t}=e,[r,i]=(0,a.useState)(Object.entries(l)),n=e=>{let l=r.filter((l,t)=>t!==e);i(l),null==t||t(Object.fromEntries(l))},o=(e,l,s)=>{let a=[...r];a[e]=[l,s],i(a),null==t||t(Object.fromEntries(a))};return(0,s.jsxs)("div",{children:[r.map((e,l)=>{let[t,a]=e;return(0,s.jsxs)(C.Z,{style:{display:"flex",marginBottom:8},align:"center",children:[(0,s.jsx)(E.o,{placeholder:"Header Name",value:t,onChange:e=>o(l,e.target.value,a)}),(0,s.jsx)(E.o,{placeholder:"Header Value",value:a,onChange:e=>o(l,t,e.target.value)}),(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,s.jsx)(S.Z,{onClick:()=>n(l),style:{cursor:"pointer"}})})]},l)}),(0,s.jsx)(k.ZP,{type:"dashed",onClick:()=>{i([...r,["",""]])},icon:(0,s.jsx)(A.Z,{}),children:"Add Header"})]})},M=t(77565),L=e=>{let{pathValue:l,targetValue:t,includeSubpath:a}=e,r=(0,d.getProxyBaseUrl)();return l&&t?(0,s.jsxs)(f.Z,{className:"p-5",children:[(0,s.jsx)(o.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Preview"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-5",children:"How your requests will be routed"}),(0,s.jsxs)("div",{className:"space-y-5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"Basic routing:"}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint"}),(0,s.jsx)("code",{className:"font-mono text-sm text-gray-900",children:l?"".concat(r).concat(l):""})]}),(0,s.jsx)("div",{className:"text-gray-400",children:(0,s.jsx)(M.Z,{className:"text-lg"})}),(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,s.jsx)("code",{className:"font-mono text-sm text-gray-900",children:t})]})]})]}),a&&(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"With subpaths:"}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint + subpath"}),(0,s.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[l&&"".concat(r).concat(l),(0,s.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]}),(0,s.jsx)("div",{className:"text-gray-400",children:(0,s.jsx)(M.Z,{className:"text-lg"})}),(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,s.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[t,(0,s.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]})]}),(0,s.jsxs)("div",{className:"mt-3 text-sm text-gray-600",children:["Any path after ",l," will be appended to the target URL"]})]})}),!a&&(0,s.jsx)("div",{className:"mt-4 p-3 bg-blue-50 rounded-md border border-blue-200",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)(Z.Z,{className:"text-blue-500 mt-0.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{className:"text-sm text-blue-700",children:[(0,s.jsx)("span",{className:"font-medium",children:"Not seeing the routing you wanted?"})," Try enabling - Include Subpaths - above - this allows subroutes like"," ",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded font-mono text-xs",children:"/api/v1/models"})," to be forwarded automatically."]})]})})]})]}):null},F=t(9114),I=t(63709),T=e=>{let{premiumUser:l,authEnabled:t,onAuthChange:a}=e;return(0,s.jsxs)(f.Z,{className:"p-6",children:[(0,s.jsx)(o.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Security"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-4",children:"When enabled, requests to this endpoint will require a valid LiteLLM Virtual Key"}),l?(0,s.jsx)(_.Z.Item,{name:"auth",valuePropName:"checked",className:"mb-0",children:(0,s.jsx)(I.Z,{checked:t,onChange:e=>{a(e)}})}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center mb-3",children:[(0,s.jsx)(I.Z,{disabled:!0,checked:!1,style:{outline:"2px solid #d1d5db",outlineOffset:"2px"}}),(0,s.jsx)("span",{className:"ml-2 text-sm text-gray-400",children:"Authentication (Premium)"})]}),(0,s.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,s.jsxs)(n.Z,{className:"text-sm text-yellow-800",children:["Setting authentication for pass-through endpoints is a LiteLLM Enterprise feature. Get a trial key"," ",(0,s.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})]})},R=t(67479),O=e=>{let{accessToken:l,value:t={},onChange:r,disabled:i=!1}=e,[n,d]=(0,a.useState)(Object.keys(t)),[m,u]=(0,a.useState)(t);(0,a.useEffect)(()=>{u(t),d(Object.keys(t))},[t]);let h=(e,l,t)=>{var s,a;let i=m[e]||{},n={...m,[e]:{...i,[l]:t.length>0?t:void 0}};(null===(s=n[e])||void 0===s?void 0:s.request_fields)||(null===(a=n[e])||void 0===a?void 0:a.response_fields)||(n[e]=null),u(n),r&&r(n)};return(0,s.jsxs)(f.Z,{className:"p-6",children:[(0,s.jsx)(o.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Guardrails"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-6",children:"Configure guardrails to enforce policies on requests and responses. Guardrails are opt-in for passthrough endpoints."}),(0,s.jsx)(y.Z,{message:(0,s.jsxs)("span",{children:["Field-Level Targeting"," ",(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through_guardrails#field-level-targeting",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"(Learn More)"})]}),description:(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("div",{children:"Optionally specify which fields to check. If left empty, the entire request/response is sent to the guardrail."}),(0,s.jsxs)("div",{className:"text-xs space-y-1 mt-2",children:[(0,s.jsx)("div",{className:"font-medium",children:"Common Examples:"}),(0,s.jsxs)("div",{children:["• ",(0,s.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"query"})," - Single field"]}),(0,s.jsxs)("div",{children:["• ",(0,s.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"documents[*].text"})," - All text in documents array"]}),(0,s.jsxs)("div",{children:["• ",(0,s.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"messages[*].content"})," - All message contents"]})]})]}),type:"info",showIcon:!0,className:"mb-4"}),(0,s.jsx)(_.Z.Item,{label:(0,s.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Select Guardrails",(0,s.jsx)(c.Z,{title:"Choose which guardrails should run on this endpoint. Org/team/key level guardrails will also be included.",children:(0,s.jsx)(Z.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),children:(0,s.jsx)(R.Z,{accessToken:l,value:n,onChange:e=>{d(e);let l={};e.forEach(e=>{l[e]=m[e]||null}),u(l),r&&r(l)},disabled:i})}),n.length>0&&(0,s.jsxs)("div",{className:"mt-6 space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Field Targeting (Optional)"}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"\uD83D\uDCA1 Tip: Leave empty to check entire payload"})]}),n.map(e=>{var l,t;return(0,s.jsxs)(f.Z,{className:"p-4 bg-gray-50",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-gray-900 mb-3",children:e}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,s.jsxs)("label",{className:"text-xs text-gray-600 flex items-center",children:["Request Fields (pre_call)",(0,s.jsx)(c.Z,{title:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-medium mb-1",children:"Specify which request fields to check"}),(0,s.jsxs)("div",{className:"text-xs space-y-1",children:[(0,s.jsx)("div",{children:"Examples:"}),(0,s.jsx)("div",{children:"• query"}),(0,s.jsx)("div",{children:"• documents[*].text"}),(0,s.jsx)("div",{children:"• messages[*].content"})]})]}),children:(0,s.jsx)(Z.Z,{className:"ml-1 text-gray-400"})})]}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)("button",{type:"button",onClick:()=>{var l;let t=(null===(l=m[e])||void 0===l?void 0:l.request_fields)||[];h(e,"request_fields",[...t,"query"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:i,children:"+ query"}),(0,s.jsx)("button",{type:"button",onClick:()=>{var l;let t=(null===(l=m[e])||void 0===l?void 0:l.request_fields)||[];h(e,"request_fields",[...t,"documents[*]"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:i,children:"+ documents[*]"})]})]}),(0,s.jsx)(v.default,{mode:"tags",style:{width:"100%"},placeholder:"Type field name or use + buttons above (e.g., query, documents[*].text)",value:(null===(l=m[e])||void 0===l?void 0:l.request_fields)||[],onChange:l=>h(e,"request_fields",l),disabled:i,tokenSeparators:[","]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,s.jsxs)("label",{className:"text-xs text-gray-600 flex items-center",children:["Response Fields (post_call)",(0,s.jsx)(c.Z,{title:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-medium mb-1",children:"Specify which response fields to check"}),(0,s.jsxs)("div",{className:"text-xs space-y-1",children:[(0,s.jsx)("div",{children:"Examples:"}),(0,s.jsx)("div",{children:"• results[*].text"}),(0,s.jsx)("div",{children:"• choices[*].message.content"})]})]}),children:(0,s.jsx)(Z.Z,{className:"ml-1 text-gray-400"})})]}),(0,s.jsx)("div",{className:"flex gap-1",children:(0,s.jsx)("button",{type:"button",onClick:()=>{var l;let t=(null===(l=m[e])||void 0===l?void 0:l.response_fields)||[];h(e,"response_fields",[...t,"results[*]"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:i,children:"+ results[*]"})})]}),(0,s.jsx)(v.default,{mode:"tags",style:{width:"100%"},placeholder:"Type field name or use + buttons above (e.g., results[*].text)",value:(null===(t=m[e])||void 0===t?void 0:t.response_fields)||[],onChange:l=>h(e,"response_fields",l),disabled:i,tokenSeparators:[","]})]})]})]},e)})]})]})};let{Option:V}=v.default;var q=e=>{let{accessToken:l,setPassThroughItems:t,passThroughItems:i,premiumUser:n=!1}=e,[m]=_.Z.useForm(),[u,h]=(0,a.useState)(!1),[x,v]=(0,a.useState)(!1),[C,k]=(0,a.useState)(""),[S,A]=(0,a.useState)(""),[E,M]=(0,a.useState)(""),[I,R]=(0,a.useState)(!0),[V,q]=(0,a.useState)(!1),[z,D]=(0,a.useState)({}),B=()=>{m.resetFields(),A(""),M(""),R(!0),D({}),h(!1)},G=e=>{let l=e;e&&!e.startsWith("/")&&(l="/"+e),A(l),m.setFieldsValue({path:l})},U=async e=>{console.log("addPassThrough called with:",e),v(!0);try{!n&&"auth"in e&&delete e.auth,z&&Object.keys(z).length>0&&(e.guardrails=z),console.log("formValues: ".concat(JSON.stringify(e)));let s=(await (0,d.createPassThroughEndpoint)(l,e)).endpoints[0],a=[...i,s];t(a),F.Z.success("Pass-through endpoint created successfully"),m.resetFields(),A(""),M(""),R(!0),D({}),h(!1)}catch(e){F.Z.fromBackend("Error creating pass-through endpoint: "+e)}finally{v(!1)}};return(0,s.jsxs)("div",{children:[(0,s.jsx)(r.Z,{className:"mx-auto mb-4 mt-4",onClick:()=>h(!0),children:"+ Add Pass-Through Endpoint"}),(0,s.jsx)(b.Z,{title:(0,s.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,s.jsx)(w.Z,{className:"text-xl text-blue-500"}),(0,s.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Pass-Through Endpoint"})]}),open:u,width:1e3,onCancel:B,footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,s.jsxs)("div",{className:"mt-6",children:[(0,s.jsx)(y.Z,{message:"What is a Pass-Through Endpoint?",description:"Route requests from your LiteLLM proxy to any external API. Perfect for custom models, image generation APIs, or any service you want to proxy through LiteLLM.",type:"info",showIcon:!0,className:"mb-6"}),(0,s.jsxs)(_.Z,{form:m,onFinish:U,layout:"vertical",className:"space-y-6",initialValues:{include_subpath:!0,path:S,target:E},children:[(0,s.jsxs)(f.Z,{className:"p-5",children:[(0,s.jsx)(o.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Configuration"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-5",children:"Configure how requests to your domain will be forwarded to the target API"}),(0,s.jsxs)("div",{className:"space-y-5",children:[(0,s.jsx)(_.Z.Item,{label:(0,s.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Path Prefix"}),name:"path",rules:[{required:!0,message:"Path is required",pattern:/^\//}],extra:(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example: /bria, /adobe-photoshop, /elasticsearch"}),className:"mb-4",children:(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)(g.Z,{placeholder:"bria",value:S,onChange:e=>G(e.target.value),className:"flex-1"})})}),(0,s.jsx)(_.Z.Item,{label:(0,s.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Target URL"}),name:"target",rules:[{required:!0,message:"Target URL is required"},{type:"url",message:"Please enter a valid URL"}],extra:(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example:https://engine.prod.bria-api.com"}),className:"mb-4",children:(0,s.jsx)(g.Z,{placeholder:"https://engine.prod.bria-api.com",value:E,onChange:e=>{M(e.target.value),m.setFieldsValue({target:e.target.value})}})}),(0,s.jsxs)("div",{className:"flex items-center justify-between py-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Include Subpaths"}),(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Forward all subpaths to the target API (recommended for REST APIs)"})]}),(0,s.jsx)(_.Z.Item,{name:"include_subpath",valuePropName:"checked",className:"mb-0",children:(0,s.jsx)(p.Z,{checked:I,onChange:R})})]})]})]}),(0,s.jsx)(L,{pathValue:S,targetValue:E,includeSubpath:I}),(0,s.jsxs)(f.Z,{className:"p-6",children:[(0,s.jsx)(o.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Headers"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-6",children:"Add headers that will be sent with every request to the target API"}),(0,s.jsx)(_.Z.Item,{label:(0,s.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Headers",(0,s.jsx)(c.Z,{title:"Authentication and other headers to forward with requests",children:(0,s.jsx)(Z.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"headers",rules:[{required:!0,message:"Please configure the headers"}],extra:(0,s.jsxs)("div",{className:"text-xs text-gray-500 mt-2",children:[(0,s.jsx)("div",{className:"font-medium mb-1",children:"Add authentication tokens and other required headers"}),(0,s.jsx)("div",{children:"Common examples: auth_token, Authorization, x-api-key"})]}),children:(0,s.jsx)(P,{})})]}),(0,s.jsx)(T,{premiumUser:n,authEnabled:V,onAuthChange:e=>{q(e),m.setFieldsValue({auth:e})}}),(0,s.jsx)(O,{accessToken:l,value:z,onChange:D}),(0,s.jsxs)(f.Z,{className:"p-6",children:[(0,s.jsx)(o.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Billing"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-6",children:"Optional cost tracking for this endpoint"}),(0,s.jsx)(_.Z.Item,{label:(0,s.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Cost Per Request (USD)",(0,s.jsx)(c.Z,{title:"Optional: Track costs for requests to this endpoint",children:(0,s.jsx)(Z.Z,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:"cost_per_request",extra:(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"The cost charged for each request through this endpoint"}),children:(0,s.jsx)(N.Z,{min:0,step:.001,precision:4,placeholder:"2.0000",size:"large"})})]}),(0,s.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:[(0,s.jsx)(r.Z,{variant:"secondary",onClick:B,children:"Cancel"}),(0,s.jsx)(r.Z,{variant:"primary",loading:x,onClick:()=>{console.log("Submit button clicked"),m.submit()},children:x?"Creating...":"Add Pass-Through Endpoint"})]})]})]})})]})},z=t(30078),D=t(4260),B=t(19015),G=t(87769),U=t(42208);let H=e=>{let{value:l}=e,[t,r]=(0,a.useState)(!1),i=JSON.stringify(l,null,2);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("pre",{className:"font-mono text-xs bg-gray-50 p-2 rounded max-w-md overflow-auto",children:t?i:"••••••••"}),(0,s.jsx)("button",{onClick:()=>r(!t),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:t?(0,s.jsx)(G.Z,{className:"w-4 h-4 text-gray-500"}):(0,s.jsx)(U.Z,{className:"w-4 h-4 text-gray-500"})})]})};var K=e=>{let{endpointData:l,onClose:t,accessToken:r,isAdmin:i,premiumUser:n=!1,onEndpointUpdated:o}=e,[c,m]=(0,a.useState)(l),[u,h]=(0,a.useState)(!1),[x,p]=(0,a.useState)(!1),[g,f]=(0,a.useState)((null==l?void 0:l.auth)||!1),[j,v]=(0,a.useState)((null==l?void 0:l.guardrails)||{}),[b]=_.Z.useForm(),y=async e=>{try{if(!r||!(null==c?void 0:c.id))return;let l={};if(e.headers)try{l="string"==typeof e.headers?JSON.parse(e.headers):e.headers}catch(e){F.Z.fromBackend("Invalid JSON format for headers");return}let t={path:c.path,target:e.target,headers:l,include_subpath:e.include_subpath,cost_per_request:e.cost_per_request,auth:n?e.auth:void 0,guardrails:j&&Object.keys(j).length>0?j:void 0};await (0,d.updatePassThroughEndpoint)(r,c.id,t),m({...c,...t}),p(!1),o&&o()}catch(e){console.error("Error updating endpoint:",e),F.Z.fromBackend("Failed to update pass through endpoint")}},N=async()=>{try{if(!r||!(null==c?void 0:c.id))return;await (0,d.deletePassThroughEndpointsCall)(r,c.id),F.Z.success("Pass through endpoint deleted successfully"),t(),o&&o()}catch(e){console.error("Error deleting endpoint:",e),F.Z.fromBackend("Failed to delete pass through endpoint")}};return u?(0,s.jsx)("div",{className:"p-4",children:"Loading..."}):c?(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(k.ZP,{onClick:t,className:"mb-4",children:"← Back"}),(0,s.jsxs)(z.Dx,{children:["Pass Through Endpoint: ",c.path]}),(0,s.jsx)(z.xv,{className:"text-gray-500 font-mono",children:c.id})]})}),(0,s.jsxs)(z.v0,{children:[(0,s.jsxs)(z.td,{className:"mb-4",children:[(0,s.jsx)(z.OK,{children:"Overview"},"overview"),i?(0,s.jsx)(z.OK,{children:"Settings"},"settings"):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(z.nP,{children:[(0,s.jsxs)(z.x4,{children:[(0,s.jsxs)(z.rj,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,s.jsxs)(z.Zb,{children:[(0,s.jsx)(z.xv,{children:"Path"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(z.Dx,{className:"font-mono",children:c.path})})]}),(0,s.jsxs)(z.Zb,{children:[(0,s.jsx)(z.xv,{children:"Target"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(z.Dx,{children:c.target})})]}),(0,s.jsxs)(z.Zb,{children:[(0,s.jsx)(z.xv,{children:"Configuration"}),(0,s.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,s.jsx)("div",{children:(0,s.jsx)(z.Ct,{color:c.include_subpath?"green":"gray",children:c.include_subpath?"Include Subpath":"Exact Path"})}),(0,s.jsx)("div",{children:(0,s.jsx)(z.Ct,{color:c.auth?"blue":"gray",children:c.auth?"Auth Required":"No Auth"})}),void 0!==c.cost_per_request&&(0,s.jsx)("div",{children:(0,s.jsxs)(z.xv,{children:["Cost per request: $",c.cost_per_request]})})]})]})]}),(0,s.jsx)("div",{className:"mt-6",children:(0,s.jsx)(L,{pathValue:c.path,targetValue:c.target,includeSubpath:c.include_subpath||!1})}),c.headers&&Object.keys(c.headers).length>0&&(0,s.jsxs)(z.Zb,{className:"mt-6",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Headers"}),(0,s.jsxs)(z.Ct,{color:"blue",children:[Object.keys(c.headers).length," headers configured"]})]}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(H,{value:c.headers})})]}),c.guardrails&&Object.keys(c.guardrails).length>0&&(0,s.jsxs)(z.Zb,{className:"mt-6",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Guardrails"}),(0,s.jsxs)(z.Ct,{color:"purple",children:[Object.keys(c.guardrails).length," guardrails configured"]})]}),(0,s.jsx)("div",{className:"mt-4 space-y-2",children:Object.entries(c.guardrails).map(e=>{let[l,t]=e;return(0,s.jsxs)("div",{className:"p-3 bg-gray-50 rounded",children:[(0,s.jsx)("div",{className:"font-medium text-sm",children:l}),t&&(t.request_fields||t.response_fields)&&(0,s.jsxs)("div",{className:"mt-2 text-xs text-gray-600 space-y-1",children:[t.request_fields&&(0,s.jsxs)("div",{children:["Request fields: ",t.request_fields.join(", ")]}),t.response_fields&&(0,s.jsxs)("div",{children:["Response fields: ",t.response_fields.join(", ")]})]}),!t&&(0,s.jsx)("div",{className:"text-xs text-gray-600 mt-1",children:"Uses entire payload"})]},l)})})]})]}),i&&(0,s.jsx)(z.x4,{children:(0,s.jsxs)(z.Zb,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(z.Dx,{children:"Pass Through Endpoint Settings"}),(0,s.jsx)("div",{className:"space-x-2",children:!x&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(z.zx,{onClick:()=>p(!0),children:"Edit Settings"}),(0,s.jsx)(z.zx,{onClick:N,variant:"secondary",color:"red",children:"Delete Endpoint"})]})})]}),x?(0,s.jsxs)(_.Z,{form:b,onFinish:y,initialValues:{target:c.target,headers:c.headers?JSON.stringify(c.headers,null,2):"",include_subpath:c.include_subpath||!1,cost_per_request:c.cost_per_request,auth:c.auth||!1},layout:"vertical",children:[(0,s.jsx)(_.Z.Item,{label:"Target URL",name:"target",rules:[{required:!0,message:"Please input a target URL"}],children:(0,s.jsx)(z.oi,{placeholder:"https://api.example.com"})}),(0,s.jsx)(_.Z.Item,{label:"Headers (JSON)",name:"headers",children:(0,s.jsx)(D.default.TextArea,{rows:5,placeholder:'{"Authorization": "Bearer your-token", "Content-Type": "application/json"}'})}),(0,s.jsx)(_.Z.Item,{label:"Include Subpath",name:"include_subpath",valuePropName:"checked",children:(0,s.jsx)(I.Z,{})}),(0,s.jsx)(_.Z.Item,{label:"Cost per Request",name:"cost_per_request",children:(0,s.jsx)(B.Z,{min:0,step:.01,precision:2,placeholder:"0.00",addonBefore:"$"})}),(0,s.jsx)(T,{premiumUser:n,authEnabled:g,onAuthChange:e=>{f(e),b.setFieldsValue({auth:e})}}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(O,{accessToken:r||"",value:j,onChange:v})}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,s.jsx)(k.ZP,{onClick:()=>p(!1),children:"Cancel"}),(0,s.jsx)(z.zx,{children:"Save Changes"})]})]}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Path"}),(0,s.jsx)("div",{className:"font-mono",children:c.path})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Target URL"}),(0,s.jsx)("div",{children:c.target})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Include Subpath"}),(0,s.jsx)(z.Ct,{color:c.include_subpath?"green":"gray",children:c.include_subpath?"Yes":"No"})]}),void 0!==c.cost_per_request&&(0,s.jsxs)("div",{children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Cost per Request"}),(0,s.jsxs)("div",{children:["$",c.cost_per_request]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Authentication Required"}),(0,s.jsx)(z.Ct,{color:c.auth?"green":"gray",children:c.auth?"Yes":"No"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Headers"}),c.headers&&Object.keys(c.headers).length>0?(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(H,{value:c.headers})}):(0,s.jsx)("div",{className:"text-gray-500",children:"No headers configured"})]})]})]})})]})]})]}):(0,s.jsx)("div",{className:"p-4",children:"Pass through endpoint not found"})},J=t(12322);let W=e=>{let{value:l}=e,[t,r]=(0,a.useState)(!1),i=JSON.stringify(l);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{className:"font-mono text-xs",children:t?i:"••••••••"}),(0,s.jsx)("button",{onClick:()=>r(!t),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:t?(0,s.jsx)(G.Z,{className:"w-4 h-4 text-gray-500"}):(0,s.jsx)(U.Z,{className:"w-4 h-4 text-gray-500"})})]})};var Y=e=>{let{accessToken:l,userRole:t,userID:p,modelData:g,premiumUser:f}=e,[j,v]=(0,a.useState)([]),[_,b]=(0,a.useState)(null),[y,N]=(0,a.useState)(!1),[w,Z]=(0,a.useState)(null);(0,a.useEffect)(()=>{l&&t&&p&&(0,d.getPassThroughEndpointsCall)(l).then(e=>{v(e.endpoints)})},[l,t,p]);let C=async e=>{Z(e),N(!0)},k=async()=>{if(null!=w&&l){try{await (0,d.deletePassThroughEndpointsCall)(l,w);let e=j.filter(e=>e.id!==w);v(e),F.Z.success("Endpoint deleted successfully.")}catch(e){console.error("Error deleting the endpoint:",e),F.Z.fromBackend("Error deleting the endpoint: "+e)}N(!1),Z(null)}},S=(e,l)=>{C(e)},A=[{header:"ID",accessorKey:"id",cell:e=>(0,s.jsx)(c.Z,{title:e.row.original.id,children:(0,s.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>e.row.original.id&&b(e.row.original.id),children:e.row.original.id})})},{header:"Path",accessorKey:"path"},{header:"Target",accessorKey:"target",cell:e=>(0,s.jsx)(n.Z,{children:e.getValue()})},{header:()=>(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{children:"Authentication"}),(0,s.jsx)(c.Z,{title:"LiteLLM Virtual Key required to call endpoint",children:(0,s.jsx)(u.Z,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),accessorKey:"auth",cell:e=>(0,s.jsx)(m.Z,{color:e.getValue()?"green":"gray",children:e.getValue()?"Yes":"No"})},{header:"Headers",accessorKey:"headers",cell:e=>(0,s.jsx)(W,{value:e.getValue()||{}})},{header:"Actions",id:"actions",cell:e=>{let{row:l}=e;return(0,s.jsxs)("div",{className:"flex space-x-1",children:[(0,s.jsx)(i.Z,{icon:h.Z,size:"sm",onClick:()=>l.original.id&&b(l.original.id),title:"Edit"}),(0,s.jsx)(i.Z,{icon:x.Z,size:"sm",onClick:()=>S(l.original.id,l.index),title:"Delete"})]})}}];if(!l)return null;if(_){console.log("selectedEndpointId",_),console.log("generalSettings",j);let e=j.find(e=>e.id===_);return e?(0,s.jsx)(K,{endpointData:e,onClose:()=>b(null),accessToken:l,isAdmin:"Admin"===t||"admin"===t,premiumUser:f,onEndpointUpdated:()=>{l&&(0,d.getPassThroughEndpointsCall)(l).then(e=>{v(e.endpoints)})}}):(0,s.jsx)("div",{children:"Endpoint not found"})}return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(o.Z,{children:"Pass Through Endpoints"}),(0,s.jsx)(n.Z,{className:"text-tremor-content",children:"Configure and manage your pass-through endpoints"})]}),(0,s.jsx)(q,{accessToken:l,setPassThroughItems:v,passThroughItems:j,premiumUser:f}),(0,s.jsx)(J.w,{data:j,columns:A,renderSubComponent:()=>(0,s.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:!1,noDataMessage:"No pass-through endpoints configured"}),y&&(0,s.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,s.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,s.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,s.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,s.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:""}),(0,s.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,s.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,s.jsx)("div",{className:"sm:flex sm:items-start",children:(0,s.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,s.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Pass-Through Endpoint"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this pass-through endpoint? This action cannot be undone."})})]})})}),(0,s.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,s.jsx)(r.Z,{onClick:k,color:"red",className:"ml-2",children:"Delete"}),(0,s.jsx)(r.Z,{onClick:()=>{N(!1),Z(null)},children:"Cancel"})]})]})]})})]})}},12322:function(e,l,t){t.d(l,{w:function(){return o}});var s=t(57437),a=t(2265),r=t(71594),i=t(24525),n=t(19130);function o(e){let{data:l=[],columns:t,getRowCanExpand:o,renderSubComponent:d,isLoading:c=!1,loadingMessage:m="\uD83D\uDE85 Loading logs...",noDataMessage:u="No logs found"}=e,h=(0,r.b7)({data:l,columns:t,getRowCanExpand:o,getRowId:(e,l)=>{var t;return null!==(t=null==e?void 0:e.request_id)&&void 0!==t?t:String(l)},getCoreRowModel:(0,i.sC)(),getExpandedRowModel:(0,i.rV)()});return(0,s.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,s.jsxs)(n.iA,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,s.jsx)(n.ss,{children:h.getHeaderGroups().map(e=>(0,s.jsx)(n.SC,{children:e.headers.map(e=>(0,s.jsx)(n.xs,{className:"py-1 h-8",children:e.isPlaceholder?null:(0,r.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,s.jsx)(n.RM,{children:c?(0,s.jsx)(n.SC,{children:(0,s.jsx)(n.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:m})})})}):h.getRowModel().rows.length>0?h.getRowModel().rows.map(e=>(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)(n.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,s.jsx)(n.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,r.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),e.getIsExpanded()&&(0,s.jsx)(n.SC,{children:(0,s.jsx)(n.pj,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,s.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:d({row:e})})})})]},e.id)):(0,s.jsx)(n.SC,{children:(0,s.jsx)(n.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:u})})})})})]})})}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1658],{71658:function(e,l,t){t.d(l,{Z:function(){return l1}});var s=t(57437),a=t(19250),r=t(11713),i=t(90246),n=t(39760);let o=(0,i.n)("credentials"),d=()=>{let{accessToken:e}=(0,n.Z)();return(0,r.a)({queryKey:o.list({}),queryFn:async()=>await (0,a.credentialListCall)(e),enabled:!!e})},c=(0,i.n)("modelCostMap"),m=()=>(0,r.a)({queryKey:c.list({}),queryFn:async()=>await (0,a.modelCostMap)(),staleTime:6e4,gcTime:6e4});var u=t(52178),h=t(55584),x=t(47359),p=t(71594),g=t(24525),f=t(2265),j=t(19130),v=t(73705),_=t(5545),b=t(44633),y=t(86462),N=t(3837),w=t(49084);let Z=e=>{let{sortState:l,onSortChange:t}=e,a=[{key:"asc",label:"Ascending",icon:(0,s.jsx)(b.Z,{className:"h-4 w-4"})},{key:"desc",label:"Descending",icon:(0,s.jsx)(y.Z,{className:"h-4 w-4"})},{key:"reset",label:"Reset",icon:(0,s.jsx)(N.Z,{className:"h-4 w-4"})}];return(0,s.jsx)(v.Z,{menu:{items:a,onClick:e=>{let{key:l}=e;"asc"===l?t("asc"):"desc"===l?t("desc"):"reset"===l&&t(!1)},selectable:!0,selectedKeys:l?[l]:[]},trigger:["click"],autoAdjustOverflow:!0,children:(0,s.jsx)(_.ZP,{type:"text",onClick:e=>e.stopPropagation(),icon:"asc"===l?(0,s.jsx)(b.Z,{className:"h-4 w-4"}):"desc"===l?(0,s.jsx)(y.Z,{className:"h-4 w-4"}):(0,s.jsx)(w.Z,{className:"h-4 w-4"}),className:l?"text-blue-500 hover:text-blue-600":"text-gray-400 hover:text-blue-500"})})};function C(e){let{data:l=[],columns:t,isLoading:a=!1,sorting:r=[],onSortingChange:i,pagination:n,onPaginationChange:o,enablePagination:d=!1}=e,[c]=f.useState("onChange"),[m,u]=f.useState({}),[h,x]=f.useState({}),v=(0,p.b7)({data:l,columns:t,state:{sorting:r,columnSizing:m,columnVisibility:h,...d&&n?{pagination:n}:{}},columnResizeMode:c,onSortingChange:i,onColumnSizingChange:u,onColumnVisibilityChange:x,...d&&o?{onPaginationChange:o}:{},getCoreRowModel:(0,g.sC)(),...d?{getPaginationRowModel:(0,g.G_)()}:{},enableSorting:!0,enableColumnResizing:!0,manualSorting:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,s.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsx)("div",{className:"relative min-w-full",children:(0,s.jsxs)(j.iA,{className:"[&_td]:py-2 [&_th]:py-2 w-full",children:[(0,s.jsx)(j.ss,{children:v.getHeaderGroups().map(e=>(0,s.jsx)(j.SC,{children:e.headers.map(e=>{var l;return(0,s.jsxs)(j.xs,{className:"py-1 h-8 relative ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""," ").concat((null===(l=e.column.columnDef.meta)||void 0===l?void 0:l.className)||""),style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,p.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&i&&(0,s.jsx)(Z,{sortState:!1!==e.column.getIsSorted()&&e.column.getIsSorted(),onSortChange:l=>{!1===l?i([]):i([{id:e.column.id,desc:"desc"===l}])},columnId:e.column.id})]}),e.column.getCanResize()&&(0,s.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:"absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ".concat(e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200")})]},e.id)})},e.id))}),(0,s.jsx)(j.RM,{children:a?(0,s.jsx)(j.SC,{children:(0,s.jsx)(j.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"\uD83D\uDE85 Loading models..."})})})}):v.getRowModel().rows.length>0?v.getRowModel().rows.map(e=>(0,s.jsx)(j.SC,{children:e.getVisibleCells().map(e=>{var l;return(0,s.jsx)(j.pj,{className:"py-0.5 ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""," ").concat((null===(l=e.column.columnDef.meta)||void 0===l?void 0:l.className)||""),style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,p.ie)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):(0,s.jsx)(j.SC,{children:(0,s.jsx)(j.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:"No models found"})})})})})]})})})})}var k=t(45589),S=t(74998),A=t(41649),E=t(78489),P=t(47323),M=t(99981),L=t(42673);let F=e=>{let{provider:l,className:t="w-4 h-4"}=e,[a,r]=(0,f.useState)(!1),{logo:i}=(0,L.dr)(l);return a||!i?(0,s.jsx)("div",{className:"".concat(t," rounded-full bg-gray-200 flex items-center justify-center text-xs"),children:(null==l?void 0:l.charAt(0))||"-"}):(0,s.jsx)("img",{src:i,alt:"".concat(l," logo"),className:t,onError:()=>r(!0)})},I=(e,l,t,a,r,i,n,o,d,c)=>[{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Model ID"}),accessorKey:"model_info.id",enableSorting:!1,cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)(M.Z,{title:t.model_info.id,children:(0,s.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>a(t.model_info.id),children:t.model_info.id})})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Model Information"}),accessorKey:"model_name",size:250,cell:e=>{let{row:l}=e,t=l.original,a=i(l.original)||"-",r=(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Provider:"})," ",t.provider||"-"]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Public Model Name:"})," ",a]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"LiteLLM Model Name:"})," ",t.litellm_model_name||"-"]})]});return(0,s.jsx)(M.Z,{title:r,children:(0,s.jsxs)("div",{className:"flex items-start space-x-2 min-w-0 w-full max-w-[250px]",children:[(0,s.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:t.provider?(0,s.jsx)(F,{provider:t.provider}):(0,s.jsx)("div",{className:"w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",children:"-"})}),(0,s.jsxs)("div",{className:"flex flex-col min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-xs font-medium text-gray-900 truncate max-w-[210px]",children:a}),(0,s.jsx)("div",{className:"text-xs text-gray-500 truncate mt-0.5 max-w-[210px]",children:t.litellm_model_name||"-"})]})]})})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Credentials"}),accessorKey:"litellm_credential_name",enableSorting:!1,size:180,cell:e=>{var l;let{row:t}=e,a=null===(l=t.original.litellm_params)||void 0===l?void 0:l.litellm_credential_name;return a?(0,s.jsx)(M.Z,{title:"Credential: ".concat(a),children:(0,s.jsxs)("div",{className:"flex items-center space-x-2 max-w-[180px]",children:[(0,s.jsx)(k.Z,{className:"w-4 h-4 text-blue-500 flex-shrink-0"}),(0,s.jsx)("span",{className:"text-xs truncate",title:a,children:a})]})}):(0,s.jsxs)("div",{className:"flex items-center space-x-2 max-w-[180px]",children:[(0,s.jsx)(k.Z,{className:"w-4 h-4 text-gray-300 flex-shrink-0"}),(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"No credentials"})]})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Created By"}),accessorKey:"model_info.created_by",sortingFn:"datetime",size:160,cell:e=>{var l;let{row:t}=e,a=t.original,r=!(null===(l=a.model_info)||void 0===l?void 0:l.db_model),i=a.model_info.created_by,n=a.model_info.created_at?new Date(a.model_info.created_at).toLocaleDateString():null;return(0,s.jsxs)("div",{className:"flex flex-col min-w-0 max-w-[160px]",children:[(0,s.jsx)("div",{className:"text-xs font-medium text-gray-900 truncate",title:r?"Defined in config":i||"Unknown",children:r?"Defined in config":i||"Unknown"}),(0,s.jsx)("div",{className:"text-xs text-gray-500 truncate mt-0.5",title:r?"Config file":n||"Unknown date",children:r?"-":n||"Unknown date"})]})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Updated At"}),accessorKey:"model_info.updated_at",sortingFn:"datetime",cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)("span",{className:"text-xs",children:t.model_info.updated_at?new Date(t.model_info.updated_at).toLocaleDateString():"-"})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Costs"}),accessorKey:"input_cost",size:120,cell:e=>{let{row:l}=e,t=l.original,a=t.input_cost,r=t.output_cost;return a||r?(0,s.jsx)(M.Z,{title:"Cost per 1M tokens",children:(0,s.jsxs)("div",{className:"flex flex-col min-w-0 max-w-[120px]",children:[a&&(0,s.jsxs)("div",{className:"text-xs font-medium text-gray-900 truncate",children:["In: $",a]}),r&&(0,s.jsxs)("div",{className:"text-xs text-gray-500 truncate mt-0.5",children:["Out: $",r]})]})}):(0,s.jsx)("div",{className:"max-w-[120px]",children:(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"-"})})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Team ID"}),accessorKey:"model_info.team_id",enableSorting:!1,cell:e=>{let{row:l}=e,t=l.original;return t.model_info.team_id?(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(M.Z,{title:t.model_info.team_id,children:(0,s.jsxs)(E.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>r(t.model_info.team_id),children:[t.model_info.team_id.slice(0,7),"..."]})})}):"-"}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Model Access Group"}),accessorKey:"model_info.model_access_group",enableSorting:!1,cell:e=>{let{row:l}=e,t=l.original,a=t.model_info.access_groups;if(!a||0===a.length)return"-";let r=t.model_info.id,i=d.has(r),n=a.length>1,o=()=>{let e=new Set(d);i?e.delete(r):e.add(r),c(e)};return(0,s.jsxs)("div",{className:"flex items-center gap-1 overflow-hidden",children:[(0,s.jsx)(A.Z,{size:"xs",color:"blue",className:"text-xs px-1.5 py-0.5 h-5 leading-tight flex-shrink-0",children:a[0]}),(i||!n&&2===a.length)&&a.slice(1).map((e,l)=>(0,s.jsx)(A.Z,{size:"xs",color:"blue",className:"text-xs px-1.5 py-0.5 h-5 leading-tight flex-shrink-0",children:e},l+1)),n&&(0,s.jsx)("button",{onClick:e=>{e.stopPropagation(),o()},className:"text-xs text-blue-600 hover:text-blue-800 px-1 py-0.5 rounded hover:bg-blue-50 h-5 leading-tight flex-shrink-0 whitespace-nowrap",children:i?"−":"+".concat(a.length-1)})]})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Status"}),accessorKey:"model_info.db_model",cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)("div",{className:"\n inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium\n ".concat(t.model_info.db_model?"bg-blue-50 text-blue-600":"bg-gray-100 text-gray-600","\n "),children:t.model_info.db_model?"DB Model":"Config Model"})}},{id:"actions",header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Actions"}),cell:t=>{var r,i;let{row:n}=t,o=n.original,d="Admin"===e||(null===(r=o.model_info)||void 0===r?void 0:r.created_by)===l,c=!(null===(i=o.model_info)||void 0===i?void 0:i.db_model);return(0,s.jsx)("div",{className:"flex items-center justify-end gap-2 pr-4",children:c?(0,s.jsx)(M.Z,{title:"Config model cannot be deleted on the dashboard. Please delete it from the config file.",children:(0,s.jsx)(P.Z,{icon:S.Z,size:"sm",className:"opacity-50 cursor-not-allowed"})}):(0,s.jsx)(M.Z,{title:"Delete model",children:(0,s.jsx)(P.Z,{icon:S.Z,size:"sm",onClick:()=>{d&&a(o.model_info.id)},className:d?"cursor-pointer hover:text-red-600":"opacity-50 cursor-not-allowed"})})})}}],T=e=>{var l;return(null==e?void 0:null===(l=e.model_info)||void 0===l?void 0:l.team_public_model_name)?e.model_info.team_public_model_name:(null==e?void 0:e.model_name)||"-"};var R=t(15424),O=t(67101),V=t(27281),q=t(57365),z=t(29706),D=t(84264),B=t(50337),G=t(10353),U=t(7310),H=t.n(U);let K=(e,l)=>{if(!(null==e?void 0:e.data))return{data:[]};let t=JSON.parse(JSON.stringify(e.data));for(let e=0;e{let[l]=e;return"model"!==l&&"api_base"!==l}))),t[e].provider=c,t[e].input_cost=m,t[e].output_cost=u,t[e].litellm_model_name=n,t[e].input_cost&&(t[e].input_cost=(1e6*Number(t[e].input_cost)).toFixed(2)),t[e].output_cost&&(t[e].output_cost=(1e6*Number(t[e].output_cost)).toFixed(2)),t[e].max_tokens=h,t[e].max_input_tokens=x,t[e].api_base=null==i?void 0:null===(r=i.litellm_params)||void 0===r?void 0:r.api_base,t[e].cleanedLitellmParams=p}return{data:t}};var J=e=>{let{selectedModelGroup:l,setSelectedModelGroup:t,availableModelGroups:a,availableModelAccessGroups:r,setSelectedModelId:i,setSelectedTeamId:o}=e,{data:d,isLoading:c}=m(),{userId:h,userRole:p,premiumUser:g}=(0,n.Z)(),{data:j,isLoading:v}=(0,x.y2)(),[_,b]=(0,f.useState)(""),[y,N]=(0,f.useState)(""),[w,Z]=(0,f.useState)("current_team"),[k,S]=(0,f.useState)("personal"),[A,E]=(0,f.useState)(!1),[P,M]=(0,f.useState)(null),[L,F]=(0,f.useState)(new Set),[U,J]=(0,f.useState)(1),[W]=(0,f.useState)(50),[Y,$]=(0,f.useState)({pageIndex:0,pageSize:50}),[X,Q]=(0,f.useState)([]),ee=(0,f.useMemo)(()=>H()(e=>{N(e),J(1),$(e=>({...e,pageIndex:0}))},200),[]);(0,f.useEffect)(()=>(ee(_),()=>{ee.cancel()}),[_,ee]);let el="personal"===k?void 0:k.team_id,et=(0,f.useMemo)(()=>{if(0===X.length)return;let e=X[0];return({input_cost:"costs",model_info_db_model:"status",model_info_created_by:"created_at",model_info_updated_at:"updated_at"})[e.id]||e.id},[X]),es=(0,f.useMemo)(()=>{if(0!==X.length)return X[0].desc?"desc":"asc"},[X]),{data:ea,isLoading:er}=(0,u.XP)(U,W,y||void 0,void 0,el,et,es),ei=er||c,en=e=>null!=d&&"object"==typeof d&&e in d?d[e].litellm_provider:"openai",eo=(0,f.useMemo)(()=>ea?K(ea,en):{data:[]},[ea,d]),ed=(0,f.useMemo)(()=>{var e,l,t,s;return ea?{total_count:null!==(e=ea.total_count)&&void 0!==e?e:0,current_page:null!==(l=ea.current_page)&&void 0!==l?l:1,total_pages:null!==(t=ea.total_pages)&&void 0!==t?t:1,size:null!==(s=ea.size)&&void 0!==s?s:W}:{total_count:0,current_page:1,total_pages:1,size:W}},[ea,W]),ec=(0,f.useMemo)(()=>eo&&eo.data&&0!==eo.data.length?eo.data.filter(e=>{var t,s;let a="all"===l||e.model_name===l||!l||"wildcard"===l&&(null===(t=e.model_name)||void 0===t?void 0:t.includes("*")),r="all"===P||(null===(s=e.model_info.access_groups)||void 0===s?void 0:s.includes(P))||!P;return a&&r}):[],[eo,l,P]);return(0,f.useEffect)(()=>{$(e=>({...e,pageIndex:0})),J(1)},[l,P]),(0,f.useEffect)(()=>{J(1),$(e=>({...e,pageIndex:0}))},[el]),(0,f.useEffect)(()=>{J(1),$(e=>({...e,pageIndex:0}))},[X]),(0,s.jsx)(z.Z,{children:(0,s.jsx)(O.Z,{children:(0,s.jsx)("div",{className:"flex flex-col space-y-4",children:(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,s.jsxs)("div",{className:"border-b px-6 py-4 bg-gray-50",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)(D.Z,{className:"text-lg font-semibold text-gray-900",children:"Current Team:"}),ei?(0,s.jsx)(B.Z.Input,{active:!0,style:{width:320,height:36}}):(0,s.jsxs)(V.Z,{className:"w-80",defaultValue:"personal",value:"personal"===k?"personal":k.team_id,onValueChange:e=>{if("personal"===e)S("personal"),J(1),$(e=>({...e,pageIndex:0}));else{let l=null==j?void 0:j.find(l=>l.team_id===e);l&&(S(l),J(1),$(e=>({...e,pageIndex:0})))}},children:[(0,s.jsx)(q.Z,{value:"personal",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:"Personal"})]})}),v?(0,s.jsx)(q.Z,{value:"loading",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(G.Z,{size:"small"}),(0,s.jsx)("span",{className:"font-medium text-gray-500",children:"Loading teams..."})]})}):null==j?void 0:j.filter(e=>e.team_id).map(e=>(0,s.jsx)(q.Z,{value:e.team_id,children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:e.team_alias?"".concat(e.team_alias.slice(0,30),"..."):"Team ".concat(e.team_id.slice(0,30),"...")})]})},e.team_id))]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)(D.Z,{className:"text-lg font-semibold text-gray-900",children:"View:"}),ei?(0,s.jsx)(B.Z.Input,{active:!0,style:{width:256,height:36}}):(0,s.jsxs)(V.Z,{className:"w-64",defaultValue:"current_team",value:w,onValueChange:e=>Z(e),children:[(0,s.jsx)(q.Z,{value:"current_team",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-purple-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:"Current Team Models"})]})}),(0,s.jsx)(q.Z,{value:"all",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-gray-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:"All Available Models"})]})})]})]})]}),"current_team"===w&&(0,s.jsxs)("div",{className:"flex items-start gap-2 mt-3",children:[(0,s.jsx)(R.Z,{className:"text-gray-400 mt-0.5 flex-shrink-0 text-xs"}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"personal"===k?(0,s.jsxs)("span",{children:["To access these models: Create a Virtual Key without selecting a team on the"," ",(0,s.jsx)("a",{href:"/public?login=success&page=api-keys",className:"text-gray-600 hover:text-gray-800 underline",children:"Virtual Keys page"})]}):(0,s.jsxs)("span",{children:['To access these models: Create a Virtual Key and select Team as "',"string"!=typeof k?k.team_alias||k.team_id:"",'" on the'," ",(0,s.jsx)("a",{href:"/public?login=success&page=api-keys",className:"text-gray-600 hover:text-gray-800 underline",children:"Virtual Keys page"})]})})]})]}),(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("div",{className:"relative w-64",children:[(0,s.jsx)("input",{type:"text",placeholder:"Search model names...",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:_,onChange:e=>b(e.target.value)}),(0,s.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,s.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 ".concat(A?"bg-gray-100":""),onClick:()=>E(!A),children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),"Filters"]}),(0,s.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:()=>{b(""),t("all"),M(null),S("personal"),Z("current_team"),J(1),$({pageIndex:0,pageSize:50}),Q([])},children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Reset Filters"]})]}),A&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsx)("div",{className:"w-64",children:(0,s.jsxs)(V.Z,{value:null!=l?l:"all",onValueChange:e=>t("all"===e?"all":e),placeholder:"Filter by Public Model Name",children:[(0,s.jsx)(q.Z,{value:"all",children:"All Models"}),(0,s.jsx)(q.Z,{value:"wildcard",children:"Wildcard Models (*)"}),a.map((e,l)=>(0,s.jsx)(q.Z,{value:e,children:e},l))]})}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsxs)(V.Z,{value:null!=P?P:"all",onValueChange:e=>M("all"===e?null:e),placeholder:"Filter by Model Access Group",children:[(0,s.jsx)(q.Z,{value:"all",children:"All Model Access Groups"}),r.map((e,l)=>(0,s.jsx)(q.Z,{value:e,children:e},l))]})})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[ei?(0,s.jsx)(B.Z.Input,{active:!0,style:{width:184,height:20}}):(0,s.jsx)("span",{className:"text-sm text-gray-700",children:ed.total_count>0?"Showing ".concat((U-1)*W+1," - ").concat(Math.min(U*W,ed.total_count)," of ").concat(ed.total_count," results"):"Showing 0 results"}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[ei?(0,s.jsx)(B.Z.Button,{active:!0,style:{width:84,height:30}}):(0,s.jsx)("button",{onClick:()=>{J(U-1),$(e=>({...e,pageIndex:0}))},disabled:1===U,className:"px-3 py-1 text-sm border rounded-md ".concat(1===U?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"),children:"Previous"}),ei?(0,s.jsx)(B.Z.Button,{active:!0,style:{width:56,height:30}}):(0,s.jsx)("button",{onClick:()=>{J(U+1),$(e=>({...e,pageIndex:0}))},disabled:U>=ed.total_pages,className:"px-3 py-1 text-sm border rounded-md ".concat(U>=ed.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"),children:"Next"})]})]})]})}),(0,s.jsx)(C,{columns:I(p,h,g,i,o,T,()=>{},()=>{},L,F),data:ec,isLoading:er,sorting:X,onSortingChange:Q,pagination:Y,onPaginationChange:$,enablePagination:!0})]})})})})},W=t(96761),Y=t(12221);let $={"BadRequestError (400)":"BadRequestErrorRetries","AuthenticationError (401)":"AuthenticationErrorRetries","TimeoutError (408)":"TimeoutErrorRetries","RateLimitError (429)":"RateLimitErrorRetries","ContentPolicyViolationError (400)":"ContentPolicyViolationErrorRetries","InternalServerError (500)":"InternalServerErrorRetries"};var X=e=>{let{selectedModelGroup:l,setSelectedModelGroup:t,availableModelGroups:a,globalRetryPolicy:r,setGlobalRetryPolicy:i,defaultRetry:n,modelGroupRetryPolicy:o,setModelGroupRetryPolicy:d,handleSaveRetrySettings:c}=e;return(0,s.jsxs)(z.Z,{children:[(0,s.jsx)("div",{className:"flex items-center gap-4 mb-6",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(D.Z,{children:"Retry Policy Scope:"}),(0,s.jsxs)(V.Z,{className:"ml-2 w-48",defaultValue:"global",value:"global"===l?"global":l||a[0],onValueChange:e=>t(e),children:[(0,s.jsx)(q.Z,{value:"global",children:"Global Default"}),a.map((e,l)=>(0,s.jsx)(q.Z,{value:e,onClick:()=>t(e),children:e},l))]})]})}),"global"===l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(W.Z,{children:"Global Retry Policy"}),(0,s.jsx)(D.Z,{className:"mb-6",children:"Default retry settings applied to all model groups unless overridden"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(W.Z,{children:["Retry Policy for ",l]}),(0,s.jsx)(D.Z,{className:"mb-6",children:"Model-specific retry settings. Falls back to global defaults if not set."})]}),$&&(0,s.jsx)("table",{children:(0,s.jsx)("tbody",{children:Object.entries($).map((e,t)=>{var a,c,m,u;let h,[x,p]=e;if("global"===l)h=null!==(a=null==r?void 0:r[p])&&void 0!==a?a:n;else{let e=null==o?void 0:null===(c=o[l])||void 0===c?void 0:c[p];h=null!=e?e:null!==(m=null==r?void 0:r[p])&&void 0!==m?m:n}return(0,s.jsxs)("tr",{className:"flex justify-between items-center mt-2",children:[(0,s.jsxs)("td",{children:[(0,s.jsx)(D.Z,{children:x}),"global"!==l&&(0,s.jsxs)(D.Z,{className:"text-xs text-gray-500 ml-2",children:["(Global: ",null!==(u=null==r?void 0:r[p])&&void 0!==u?u:n,")"]})]}),(0,s.jsx)("td",{children:(0,s.jsx)(Y.Z,{className:"ml-5",value:h,min:0,step:1,onChange:e=>{"global"===l?i(l=>null==e?l:{...null!=l?l:{},[p]:e}):d(t=>{var s;let a=null!==(s=null==t?void 0:t[l])&&void 0!==s?s:{};return{...null!=t?t:{},[l]:{...a,[p]:e}}})}})})]},t)})})}),(0,s.jsx)(E.Z,{className:"mt-6 mr-8",onClick:c,children:"Save"})]})},Q=t(57840),ee=t(58760),el=t(867),et=t(5945),es=t(3810),ea=t(22116),er=t(89245),ei=t(5540),en=t(8881),eo=t(9114);let{Text:ed}=Q.default;var ec=e=>{let{accessToken:l,onReloadSuccess:t,buttonText:r="Reload Price Data",showIcon:i=!0,size:n="middle",type:o="primary",className:d=""}=e,[c,m]=(0,f.useState)(!1),[u,h]=(0,f.useState)(!1),[x,p]=(0,f.useState)(!1),[g,j]=(0,f.useState)(!1),[v,b]=(0,f.useState)(6),[y,N]=(0,f.useState)(null),[w,Z]=(0,f.useState)(!1);(0,f.useEffect)(()=>{C();let e=setInterval(()=>{C()},3e4);return()=>clearInterval(e)},[l]);let C=async()=>{if(l){Z(!0);try{console.log("Fetching reload status...");let e=await (0,a.getModelCostMapReloadStatus)(l);console.log("Received status:",e),N(e)}catch(e){console.error("Failed to fetch reload status:",e),N({scheduled:!1,interval_hours:null,last_run:null,next_run:null})}finally{Z(!1)}}},k=async()=>{if(!l){eo.Z.fromBackend("No access token available");return}m(!0);try{let e=await (0,a.reloadModelCostMap)(l);"success"===e.status?(eo.Z.success("Price data reloaded successfully! ".concat(e.models_count||0," models updated.")),null==t||t(),await C()):eo.Z.fromBackend("Failed to reload price data")}catch(e){console.error("Error reloading price data:",e),eo.Z.fromBackend("Failed to reload price data. Please try again.")}finally{m(!1)}},S=async()=>{if(!l){eo.Z.fromBackend("No access token available");return}if(v<=0){eo.Z.fromBackend("Hours must be greater than 0");return}h(!0);try{let e=await (0,a.scheduleModelCostMapReload)(l,v);"success"===e.status?(eo.Z.success("Periodic reload scheduled for every ".concat(v," hours")),j(!1),await C()):eo.Z.fromBackend("Failed to schedule periodic reload")}catch(e){console.error("Error scheduling reload:",e),eo.Z.fromBackend("Failed to schedule periodic reload. Please try again.")}finally{h(!1)}},A=async()=>{if(!l){eo.Z.fromBackend("No access token available");return}p(!0);try{let e=await (0,a.cancelModelCostMapReload)(l);"success"===e.status?(eo.Z.success("Periodic reload cancelled successfully"),await C()):eo.Z.fromBackend("Failed to cancel periodic reload")}catch(e){console.error("Error cancelling reload:",e),eo.Z.fromBackend("Failed to cancel periodic reload. Please try again.")}finally{p(!1)}},E=e=>{if(!e)return"Never";try{return new Date(e).toLocaleString()}catch(l){return e}};return(0,s.jsxs)("div",{className:d,children:[(0,s.jsxs)(ee.Z,{direction:"horizontal",size:"middle",style:{marginBottom:16},children:[(0,s.jsx)(el.Z,{title:"Hard Refresh Price Data",description:"This will immediately fetch the latest pricing information from the remote source. Continue?",onConfirm:k,okText:"Yes",cancelText:"No",okButtonProps:{style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem",transition:"all 0.2s ease-in-out"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#4f46e5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1"}},children:(0,s.jsx)(_.ZP,{type:o,size:n,loading:c,icon:i?(0,s.jsx)(er.Z,{}):void 0,style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem",transition:"all 0.2s ease-in-out"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#4f46e5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1"},children:r})}),(null==y?void 0:y.scheduled)?(0,s.jsx)(_.ZP,{type:"default",size:n,danger:!0,icon:(0,s.jsx)(en.Z,{}),loading:x,onClick:A,style:{borderColor:"#ff4d4f",color:"#ff4d4f",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem"},children:"Cancel Periodic Reload"}):(0,s.jsx)(_.ZP,{type:"default",size:n,icon:(0,s.jsx)(ei.Z,{}),onClick:()=>j(!0),style:{borderColor:"#d9d9d9",color:"#6366f1",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem"},children:"Set Up Periodic Reload"})]}),y&&(0,s.jsx)(et.Z,{size:"small",style:{backgroundColor:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:8},children:(0,s.jsxs)(ee.Z,{direction:"vertical",size:"small",style:{width:"100%"},children:[y.scheduled?(0,s.jsx)("div",{children:(0,s.jsxs)(es.Z,{color:"green",icon:(0,s.jsx)(ei.Z,{}),children:["Scheduled every ",y.interval_hours," hours"]})}):(0,s.jsx)(ed,{type:"secondary",children:"No periodic reload scheduled"}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)(ed,{type:"secondary",style:{fontSize:"12px"},children:"Last run:"}),(0,s.jsx)(ed,{style:{fontSize:"12px"},children:E(y.last_run)})]}),y.scheduled&&(0,s.jsxs)(s.Fragment,{children:[y.next_run&&(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)(ed,{type:"secondary",style:{fontSize:"12px"},children:"Next run:"}),(0,s.jsx)(ed,{style:{fontSize:"12px"},children:E(y.next_run)})]}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)(ed,{type:"secondary",style:{fontSize:"12px"},children:"Status:"}),(0,s.jsx)(es.Z,{color:(null==y?void 0:y.scheduled)?y.last_run?"success":"processing":"default",children:(null==y?void 0:y.scheduled)?y.last_run?"Active":"Ready":"Not scheduled"})]})]})]})}),(0,s.jsxs)(ea.Z,{title:"Set Up Periodic Reload",open:g,onOk:S,onCancel:()=>j(!1),confirmLoading:u,okText:"Schedule",cancelText:"Cancel",okButtonProps:{style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white"}},children:[(0,s.jsx)("div",{style:{marginBottom:16},children:(0,s.jsx)(ed,{children:"Set up automatic reload of price data every:"})}),(0,s.jsx)("div",{style:{marginBottom:16},children:(0,s.jsx)(Y.Z,{min:1,max:168,value:v,onChange:e=>b(e||6),addonAfter:"hours",style:{width:"100%"}})}),(0,s.jsx)("div",{children:(0,s.jsxs)(ed,{type:"secondary",children:["This will automatically fetch the latest pricing data from the remote source every ",v," hours."]})})]})]})},em=()=>{let{accessToken:e}=(0,n.Z)(),{refetch:l}=m();return(0,s.jsx)(z.Z,{children:(0,s.jsxs)("div",{className:"p-6",children:[(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)(W.Z,{children:"Price Data Management"}),(0,s.jsx)(D.Z,{className:"text-tremor-content",children:"Manage model pricing data and configure automatic reload schedules"})]}),(0,s.jsx)(ec,{accessToken:e,onReloadSuccess:()=>{l()},buttonText:"Reload Price Data",size:"middle",type:"primary",className:"w-full"})]})})};let eu=async(e,l,t)=>{try{var s,a;console.log("handling submit for formValues:",e);let l=e.model_mappings||[];if("model_mappings"in e&&delete e.model_mappings,e.model&&e.model.includes("all-wildcard")){let t=e.custom_llm_provider,a=(null!==(s=L.fK[t])&&void 0!==s?s:t.toLowerCase())+"/*";e.model_name=a,l.push({public_name:a,litellm_model:a}),e.model=a}let t=[];for(let s of l){let l={},r={},i=s.public_name;for(let[t,i]of(l.model=s.litellm_model,e.input_cost_per_token&&(e.input_cost_per_token=Number(e.input_cost_per_token)/1e6),e.output_cost_per_token&&(e.output_cost_per_token=Number(e.output_cost_per_token)/1e6),l.model=s.litellm_model,console.log("formValues add deployment:",e),Object.entries(e)))if(""!==i&&"custom_pricing"!==t&&"pricing_model"!==t&&"cache_control"!==t){if("model_name"==t)l.model=i;else if("custom_llm_provider"==t){console.log("custom_llm_provider:",i);let e=null!==(a=L.fK[i])&&void 0!==a?a:i.toLowerCase();l.custom_llm_provider=e,console.log("custom_llm_provider mappingResult:",e)}else if("model"==t)continue;else if("base_model"===t)r[t]=i;else if("team_id"===t)r.team_id=i;else if("model_access_group"===t)r.access_groups=i;else if("mode"==t)console.log("placing mode in modelInfo"),r.mode=i,delete l.mode;else if("custom_model_name"===t)l.model=i;else if("litellm_extra_params"==t){console.log("litellm_extra_params:",i);let e={};if(i&&void 0!=i){try{e=JSON.parse(i)}catch(e){throw eo.Z.fromBackend("Failed to parse LiteLLM Extra Params: "+e),Error("Failed to parse litellm_extra_params: "+e)}for(let[t,s]of Object.entries(e))l[t]=s}}else if("model_info_params"==t){console.log("model_info_params:",i);let e={};if(i&&void 0!=i){try{e=JSON.parse(i)}catch(e){throw eo.Z.fromBackend("Failed to parse LiteLLM Extra Params: "+e),Error("Failed to parse litellm_extra_params: "+e)}for(let[l,t]of Object.entries(e))r[l]=t}}else if("input_cost_per_token"===t||"output_cost_per_token"===t||"input_cost_per_second"===t){i&&(l[t]=Number(i));continue}else l[t]=i}t.push({litellmParamsObj:l,modelInfoObj:r,modelName:i})}return t}catch(e){eo.Z.fromBackend("Failed to create model: "+e)}},eh=async(e,l,t,s)=>{try{let r=await eu(e,l,t);if(!r||0===r.length)return;for(let e of r){let{litellmParamsObj:t,modelInfoObj:s,modelName:r}=e,i={model_name:r,litellm_params:t,model_info:s},n=await (0,a.modelCreateCall)(l,i);console.log("response for model create call: ".concat(n.data))}s&&s(),t.resetFields()}catch(e){eo.Z.fromBackend("Failed to add model: "+e)}};var ex=t(53410),ep=t(62490),eg=t(10032),ef=t(21609),ej=t(31283),ev=t(37592);let e_=(0,i.n)("providerFields"),eb=()=>(0,r.a)({queryKey:e_.list({}),queryFn:async()=>await (0,a.getProviderCreateMetadata)(),staleTime:864e5,gcTime:864e5});var ey=t(3632),eN=t(56522),ew=t(47451),eZ=t(69410),eC=t(65319),ek=t(4260);let{Link:eS}=Q.default,eA=e=>{var l,t,s,a,r;let i="password"===e.field_type?"password":"select"===e.field_type?"select":"upload"===e.field_type?"upload":"textarea"===e.field_type?"textarea":"text";return{key:e.key,label:e.label,placeholder:null!==(l=e.placeholder)&&void 0!==l?l:void 0,tooltip:null!==(t=e.tooltip)&&void 0!==t?t:void 0,required:null!==(s=e.required)&&void 0!==s&&s,type:i,options:null!==(a=e.options)&&void 0!==a?a:void 0,defaultValue:null!==(r=e.default_value)&&void 0!==r?r:void 0}},eE={};var eP=e=>{let{selectedProvider:l,uploadProps:t}=e,a=L.Cl[l],r=eg.Z.useFormInstance(),{data:i,isLoading:n,error:o}=eb(),d=f.useMemo(()=>{if(!i)return null;let e={};return i.forEach(l=>{let t=l.provider_display_name,s=l.credential_fields.map(eA);e[t]=s,l.provider&&(e[l.provider]=s),l.litellm_provider&&(e[l.litellm_provider]=s)}),e},[i]);f.useEffect(()=>{d&&Object.assign(eE,d)},[d]);let c=f.useMemo(()=>{var e;let t=null!==(e=eE[a])&&void 0!==e?e:eE[l];if(t)return t;if(!i)return[];let s=i.find(e=>e.provider_display_name===a||e.provider===l||e.litellm_provider===l);if(!s)return[];let r=s.credential_fields.map(eA);return eE[s.provider_display_name]=r,s.provider&&(eE[s.provider]=r),s.litellm_provider&&(eE[s.litellm_provider]=r),r},[a,l,i]),m={name:"file",accept:".json",beforeUpload:e=>{if("application/json"===e.type){let l=new FileReader;l.onload=e=>{if(e.target){let l=e.target.result;console.log("Setting field value from JSON, length: ".concat(l.length)),r.setFieldsValue({vertex_credentials:l}),console.log("Form values after setting:",r.getFieldsValue())}},l.readAsText(e)}return!1},onChange(e){console.log("Upload onChange triggered in ProviderSpecificFields"),console.log("Current form values:",r.getFieldsValue()),"uploading"!==e.file.status&&console.log(e.file,e.fileList)}};return(0,s.jsxs)(s.Fragment,{children:[n&&0===c.length&&(0,s.jsx)(ew.Z,{children:(0,s.jsx)(eZ.Z,{span:24,children:(0,s.jsx)(eN.x,{className:"mb-2",children:"Loading provider fields..."})})}),o&&0===c.length&&(0,s.jsx)(ew.Z,{children:(0,s.jsx)(eZ.Z,{span:24,children:(0,s.jsx)(eN.x,{className:"mb-2 text-red-500",children:o instanceof Error?o.message:"Failed to load provider credential fields"})})}),c.map(e=>{var l;return(0,s.jsxs)(f.Fragment,{children:[(0,s.jsx)(eg.Z.Item,{label:e.label,name:e.key,rules:e.required?[{required:!0,message:"Required"}]:void 0,tooltip:e.tooltip,className:"vertex_credentials"===e.key?"mb-0":void 0,children:"select"===e.type?(0,s.jsx)(ev.default,{placeholder:e.placeholder,defaultValue:e.defaultValue,children:null===(l=e.options)||void 0===l?void 0:l.map(e=>(0,s.jsx)(ev.default.Option,{value:e,children:e},e))}):"upload"===e.type?(0,s.jsx)(eC.default,{...m,onChange:l=>{(null==t?void 0:t.onChange)&&t.onChange(l),setTimeout(()=>{let l=r.getFieldValue(e.key);console.log("".concat(e.key," value after upload:"),JSON.stringify(l))},500)},children:(0,s.jsx)(_.ZP,{icon:(0,s.jsx)(ey.Z,{}),children:"Click to Upload"})}):"textarea"===e.type?(0,s.jsx)(ek.default.TextArea,{placeholder:e.placeholder,defaultValue:e.defaultValue,rows:6,style:{fontFamily:"monospace",fontSize:"12px"}}):(0,s.jsx)(eN.o,{placeholder:e.placeholder,type:"password"===e.type?"password":"text",defaultValue:e.defaultValue})}),"vertex_credentials"===e.key&&(0,s.jsx)(ew.Z,{children:(0,s.jsx)(eZ.Z,{children:(0,s.jsx)(eN.x,{className:"mb-3 mt-1",children:"Give a gcp service account(.json file)"})})}),"base_model"===e.key&&(0,s.jsxs)(ew.Z,{children:[(0,s.jsx)(eZ.Z,{span:10}),(0,s.jsx)(eZ.Z,{span:10,children:(0,s.jsxs)(eN.x,{className:"mb-2",children:["The actual model your azure deployment uses. Used for accurate cost tracking. Select name from"," ",(0,s.jsx)(eS,{href:"https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json",target:"_blank",children:"here"})]})})]})]},e.key)})]})};let{Link:eM}=Q.default;var eL=e=>{let{open:l,onCancel:t,onAddCredential:a,uploadProps:r}=e,[i]=eg.Z.useForm(),[n,o]=(0,f.useState)(L.Cl.OpenAI);return(0,s.jsx)(ea.Z,{title:"Add New Credential",open:l,onCancel:()=>{t(),i.resetFields()},footer:null,width:600,children:(0,s.jsxs)(eg.Z,{form:i,onFinish:e=>{a(Object.entries(e).reduce((e,l)=>{let[t,s]=l;return""!==s&&null!=s&&(e[t]=s),e},{})),i.resetFields()},layout:"vertical",children:[(0,s.jsx)(eg.Z.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],children:(0,s.jsx)(ej.o,{placeholder:"Enter a friendly name for these credentials"})}),(0,s.jsx)(eg.Z.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"Helper to auto-populate provider specific fields",children:(0,s.jsx)(ev.default,{showSearch:!0,onChange:e=>{o(e),i.setFieldValue("custom_llm_provider",e)},children:Object.entries(L.Cl).map(e=>{let[l,t]=e;return(0,s.jsx)(ev.default.Option,{value:l,children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("img",{src:L.cd[t],alt:"".concat(l," logo"),className:"w-5 h-5",onError:e=>{let l=e.target,s=l.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=t.charAt(0),s.replaceChild(e,l)}}}),(0,s.jsx)("span",{children:t})]})},l)})})}),(0,s.jsx)(eP,{selectedProvider:n,uploadProps:r}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(M.Z,{title:"Get help on our github",children:(0,s.jsx)(eM,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(_.ZP,{onClick:()=>{t(),i.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,s.jsx)(_.ZP,{htmlType:"submit",children:"Add Credential"})]})]})]})})};let{Link:eF}=Q.default;function eI(e){let{open:l,onCancel:t,onUpdateCredential:a,uploadProps:r,existingCredential:i}=e,[n]=eg.Z.useForm(),[o,d]=(0,f.useState)(L.Cl.Anthropic);return(0,f.useEffect)(()=>{if(i){let e=Object.entries(i.credential_values||{}).reduce((e,l)=>{let[t,s]=l;return e[t]=null!=s?s:null,e},{});n.setFieldsValue({credential_name:i.credential_name,custom_llm_provider:i.credential_info.custom_llm_provider,...e}),d(i.credential_info.custom_llm_provider)}},[i]),(0,s.jsx)(ea.Z,{title:"Edit Credential",open:l,onCancel:()=>{t(),n.resetFields()},footer:null,width:600,destroyOnHidden:!0,children:(0,s.jsxs)(eg.Z,{form:n,onFinish:e=>{a(Object.entries(e).reduce((e,l)=>{let[t,s]=l;return""!==s&&null!=s&&(e[t]=s),e},{})),n.resetFields()},layout:"vertical",children:[(0,s.jsx)(eg.Z.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],initialValue:null==i?void 0:i.credential_name,children:(0,s.jsx)(ej.o,{placeholder:"Enter a friendly name for these credentials",disabled:null!=i&&!!i.credential_name})}),(0,s.jsx)(eg.Z.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"Helper to auto-populate provider specific fields",children:(0,s.jsx)(ev.default,{showSearch:!0,onChange:e=>{d(e),n.setFieldValue("custom_llm_provider",e)},children:Object.entries(L.Cl).map(e=>{let[l,t]=e;return(0,s.jsx)(ev.default.Option,{value:l,children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("img",{src:L.cd[t],alt:"".concat(l," logo"),className:"w-5 h-5",onError:e=>{let l=e.target,s=l.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=t.charAt(0),s.replaceChild(e,l)}}}),(0,s.jsx)("span",{children:t})]})},l)})})}),(0,s.jsx)(eP,{selectedProvider:o,uploadProps:r}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(M.Z,{title:"Get help on our github",children:(0,s.jsx)(eF,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(_.ZP,{onClick:()=>{t(),n.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,s.jsx)(_.ZP,{htmlType:"submit",children:"Update Credential"})]})]})]})})}var eT=e=>{var l;let{uploadProps:t}=e,{accessToken:r}=(0,n.Z)(),{data:i,refetch:o}=d(),c=(null==i?void 0:i.credentials)||[],[m,u]=(0,f.useState)(!1),[h,x]=(0,f.useState)(!1),[p,g]=(0,f.useState)(null),[j,v]=(0,f.useState)(null),[_,b]=(0,f.useState)(!1),[y,N]=(0,f.useState)(!1),[w]=eg.Z.useForm(),Z=["credential_name","custom_llm_provider"],C=async e=>{if(!r)return;let l=Object.entries(e).filter(e=>{let[l]=e;return!Z.includes(l)}).reduce((e,l)=>{let[t,s]=l;return{...e,[t]:s}},{}),t={credential_name:e.credential_name,credential_values:l,credential_info:{custom_llm_provider:e.custom_llm_provider}};await (0,a.credentialUpdateCall)(r,e.credential_name,t),eo.Z.success("Credential updated successfully"),x(!1),await o()},k=async e=>{if(!r)return;let l=Object.entries(e).filter(e=>{let[l]=e;return!Z.includes(l)}).reduce((e,l)=>{let[t,s]=l;return{...e,[t]:s}},{}),t={credential_name:e.credential_name,credential_values:l,credential_info:{custom_llm_provider:e.custom_llm_provider}};await (0,a.credentialCreateCall)(r,t),eo.Z.success("Credential added successfully"),u(!1),await o()},A=e=>{let l={openai:"blue",azure:"indigo",anthropic:"purple",default:"gray"},t=l[e.toLowerCase()]||l.default;return(0,s.jsx)(ep.Ct,{color:t,size:"xs",children:e})},E=async()=>{if(r&&j){N(!0);try{await (0,a.credentialDeleteCall)(r,j.credential_name),eo.Z.success("Credential deleted successfully"),await o()}catch(e){eo.Z.error("Failed to delete credential")}finally{v(null),b(!1),N(!1)}}},P=e=>{v(e),b(!0)};return(0,s.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto p-2",children:[(0,s.jsx)(ep.zx,{onClick:()=>u(!0),children:"Add Credential"}),(0,s.jsx)("div",{className:"flex justify-between items-center mt-4 mb-4",children:(0,s.jsx)(ep.xv,{children:"Configured credentials for different AI providers. Add and manage your API credentials."})}),(0,s.jsx)(ep.Zb,{children:(0,s.jsxs)(ep.iA,{children:[(0,s.jsx)(ep.ss,{children:(0,s.jsxs)(ep.SC,{children:[(0,s.jsx)(ep.xs,{children:"Credential Name"}),(0,s.jsx)(ep.xs,{children:"Provider"}),(0,s.jsx)(ep.xs,{children:"Actions"})]})}),(0,s.jsx)(ep.RM,{children:c&&0!==c.length?c.map((e,l)=>{var t;return(0,s.jsxs)(ep.SC,{children:[(0,s.jsx)(ep.pj,{children:e.credential_name}),(0,s.jsx)(ep.pj,{children:A((null===(t=e.credential_info)||void 0===t?void 0:t.custom_llm_provider)||"-")}),(0,s.jsxs)(ep.pj,{children:[(0,s.jsx)(ep.zx,{icon:ex.Z,variant:"light",size:"sm",onClick:()=>{g(e),x(!0)}}),(0,s.jsx)(ep.zx,{icon:S.Z,variant:"light",size:"sm",onClick:()=>P(e),className:"ml-2"})]})]},l)}):(0,s.jsx)(ep.SC,{children:(0,s.jsx)(ep.pj,{colSpan:4,className:"text-center py-4 text-gray-500",children:"No credentials configured"})})})]})}),m&&(0,s.jsx)(eL,{onAddCredential:k,open:m,onCancel:()=>u(!1),uploadProps:t}),h&&(0,s.jsx)(eI,{open:h,existingCredential:p,onUpdateCredential:C,uploadProps:t,onCancel:()=>x(!1)}),(0,s.jsx)(ef.Z,{isOpen:_,onCancel:()=>{v(null),b(!1)},onOk:E,title:"Delete Credential?",message:"Are you sure you want to delete this credential? This action cannot be undone and may break existing integrations.",resourceInformationTitle:"Credential Information",resourceInformation:[{label:"Credential Name",value:null==j?void 0:j.credential_name},{label:"Provider",value:(null==j?void 0:null===(l=j.credential_info)||void 0===l?void 0:l.custom_llm_provider)||"-"}],confirmLoading:y,requiredConfirmation:null==j?void 0:j.credential_name})]})},eR=t(20347),eO=t(23628),eV=t(29827),eq=t(49804),ez=t(12485),eD=t(18135),eB=t(35242),eG=t(77991),eU=t(34419),eH=t(58643),eK=t(29),eJ=t.n(eK),eW=t(23496),eY=t(35291),e$=t(23639);let{Text:eX}=Q.default;var eQ=e=>{let{formValues:l,accessToken:t,testMode:r,modelName:i="this model",onClose:n,onTestComplete:o}=e,[d,c]=f.useState(null),[m,u]=f.useState(null),[h,x]=f.useState(null),[p,g]=f.useState(!0),[j,v]=f.useState(!1),[b,y]=f.useState(!1),N=async()=>{g(!0),y(!1),c(null),u(null),x(null),v(!1),await new Promise(e=>setTimeout(e,100));try{console.log("Testing connection with form values:",l);let r=await eu(l,t,null);if(!r){console.log("No result from prepareModelAddRequest"),c("Failed to prepare model data. Please check your form inputs."),v(!1),g(!1);return}console.log("Result from prepareModelAddRequest:",r);let{litellmParamsObj:i,modelInfoObj:n,modelName:o}=r[0],d=await (0,a.testConnectionRequest)(t,i,n,null==n?void 0:n.mode);if("success"===d.status)eo.Z.success("Connection test successful!"),c(null),v(!0);else{var e,s;let l=(null===(e=d.result)||void 0===e?void 0:e.error)||d.message||"Unknown error";c(l),u(i),x(null===(s=d.result)||void 0===s?void 0:s.raw_request_typed_dict),v(!1)}}catch(e){console.error("Test connection error:",e),c(e instanceof Error?e.message:String(e)),v(!1)}finally{g(!1),o&&o()}};f.useEffect(()=>{let e=setTimeout(()=>{N()},200);return()=>clearTimeout(e)},[]);let w=e=>e?e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error: /,""):"Unknown error",Z="string"==typeof d?w(d):(null==d?void 0:d.message)?w(d.message):"Unknown error",C=h?((e,l,t)=>{let s=JSON.stringify(l,null,2).split("\n").map(e=>" ".concat(e)).join("\n"),a=Object.entries(t).map(e=>{let[l,t]=e;return"-H '".concat(l,": ").concat(t,"'")}).join(" \\\n ");return"curl -X POST \\\n ".concat(e," \\\n ").concat(a?"".concat(a," \\\n "):"","-H 'Content-Type: application/json' \\\n -d '{\n").concat(s,"\n }'")})(h.raw_request_api_base,h.raw_request_body,h.raw_request_headers||{}):"";return(0,s.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:[p?(0,s.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,s.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,s.jsx)("div",{style:{border:"3px solid #f3f3f3",borderTop:"3px solid #1890ff",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite",margin:"0 auto"},className:"jsx-dc9a0e2d897fe63b"})}),(0,s.jsxs)(eX,{style:{fontSize:"16px"},children:["Testing connection to ",i,"..."]}),(0,s.jsx)(eJ(),{id:"dc9a0e2d897fe63b",children:"@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg);transform:rotate(0deg)}100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}"})]}):j?(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,s.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,s.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})})}),(0,s.jsxs)(eX,{type:"success",style:{fontSize:"18px",fontWeight:500,marginLeft:"10px"},children:["Connection to ",i," successful!"]})]}):(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,s.jsx)(eY.Z,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,s.jsxs)(eX,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",i," failed"]})]}),(0,s.jsxs)("div",{style:{backgroundColor:"#fff2f0",border:"1px solid #ffccc7",borderRadius:"8px",padding:"16px",marginBottom:"20px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.03)"},children:[(0,s.jsxs)(eX,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,s.jsx)(eX,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:Z}),d&&(0,s.jsx)("div",{style:{marginTop:"12px"},children:(0,s.jsx)(_.ZP,{type:"link",onClick:()=>y(!b),style:{paddingLeft:0,height:"auto"},children:b?"Hide Details":"Show Details"})})]}),b&&(0,s.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,s.jsx)(eX,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Troubleshooting Details"}),(0,s.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"200px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:"string"==typeof d?d:JSON.stringify(d,null,2)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(eX,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"API Request"}),(0,s.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"250px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:C||"No request data available"}),(0,s.jsx)(_.ZP,{style:{marginTop:"8px"},icon:(0,s.jsx)(e$.Z,{}),onClick:()=>{navigator.clipboard.writeText(C||""),eo.Z.success("Copied to clipboard")},children:"Copy to Clipboard"})]})]})}),(0,s.jsx)(eW.Z,{style:{margin:"24px 0 16px"}}),(0,s.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,s.jsx)(_.ZP,{type:"link",href:"https://docs.litellm.ai/docs/providers",target:"_blank",icon:(0,s.jsx)(R.Z,{}),children:"View Documentation"})})]})};let e0=async(e,l,t,s)=>{try{console.log("=== AUTO ROUTER SUBMIT HANDLER CALLED ==="),console.log("handling auto router submit for formValues:",e),console.log("Access token:",l?"Present":"Missing"),console.log("Form:",t?"Present":"Missing"),console.log("Callback:",s?"Present":"Missing");let r={model_name:e.auto_router_name,litellm_params:{model:"auto_router/".concat(e.auto_router_name),auto_router_config:JSON.stringify(e.auto_router_config),auto_router_default_model:e.auto_router_default_model},model_info:{}};e.auto_router_embedding_model&&"custom"!==e.auto_router_embedding_model?r.litellm_params.auto_router_embedding_model=e.auto_router_embedding_model:e.custom_embedding_model&&(r.litellm_params.auto_router_embedding_model=e.custom_embedding_model),e.team_id&&(r.model_info.team_id=e.team_id),e.model_access_group&&e.model_access_group.length>0&&(r.model_info.access_groups=e.model_access_group),console.log("Auto router configuration to be created:",r),console.log("Auto router config (stringified):",r.litellm_params.auto_router_config),console.log("Calling modelCreateCall with:",{accessToken:l?"Present":"Missing",config:r});let i=await (0,a.modelCreateCall)(l,r);console.log("response for auto router create call:",i),t.resetFields()}catch(e){console.error("Failed to add auto router:",e),eo.Z.fromBackend("Failed to add auto router: "+e)}};var e1=t(10703),e2=t(44851),e4=t(96473),e5=t(70464),e6=t(26349),e3=t(92280);let{TextArea:e8}=ek.default,{Panel:e7}=e2.default;var e9=e=>{let{modelInfo:l,value:t,onChange:a}=e,[r,i]=(0,f.useState)([]),[n,o]=(0,f.useState)(!1),[d,c]=(0,f.useState)([]);(0,f.useEffect)(()=>{if(null==t?void 0:t.routes){let e=t.routes.map((e,l)=>({id:e.id||"route-".concat(l,"-").concat(Date.now()),model:e.name||e.model||"",utterances:e.utterances||[],description:e.description||"",score_threshold:e.score_threshold||.5}));i(e),c(e.map(e=>e.id))}else i([]),c([])},[t]);let m=e=>{let l=r.filter(l=>l.id!==e);i(l),h(l),c(l=>l.filter(l=>l!==e))},u=(e,l,t)=>{let s=r.map(s=>s.id===e?{...s,[l]:t}:s);i(s),h(s)},h=e=>{let l={routes:e.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))};null==a||a(l)},x=l.map(e=>({value:e.model_group,label:e.model_group}));return(0,s.jsxs)("div",{className:"w-full max-w-none",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6 w-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(e3.x,{className:"text-lg font-semibold",children:"Routes Configuration"}),(0,s.jsx)(M.Z,{title:"Configure routing logic to automatically select the best model based on user input patterns",children:(0,s.jsx)(R.Z,{className:"text-gray-400"})})]}),(0,s.jsx)(_.ZP,{type:"primary",icon:(0,s.jsx)(e4.Z,{}),onClick:()=>{let e="route-".concat(Date.now()),l=[...r,{id:e,model:"",utterances:[],description:"",score_threshold:.5}];i(l),h(l),c(l=>[...l,e])},className:"bg-blue-600 hover:bg-blue-700",children:"Add Route"})]}),0===r.length?(0,s.jsx)("div",{className:"text-center py-12 text-gray-500 bg-gray-50 rounded-lg border-2 border-dashed border-gray-200 mb-6",children:(0,s.jsx)(e3.x,{children:"No routes configured. Click “Add Route” to get started."})}):(0,s.jsx)("div",{className:"space-y-3 mb-6 w-full",children:r.map((e,l)=>(0,s.jsx)(et.Z,{className:"border border-gray-200 shadow-sm w-full",bodyStyle:{padding:0},children:(0,s.jsx)(e2.default,{ghost:!0,expandIcon:e=>{let{isActive:l}=e;return(0,s.jsx)(e5.Z,{rotate:l?180:0})},activeKey:d,onChange:e=>c(Array.isArray(e)?e:[e].filter(Boolean)),items:[{key:e.id,label:(0,s.jsxs)("div",{className:"flex justify-between items-center py-2",children:[(0,s.jsxs)(e3.x,{className:"font-medium text-base",children:["Route ",l+1,": ",e.model||"Unnamed"]}),(0,s.jsx)(_.ZP,{type:"text",danger:!0,icon:(0,s.jsx)(e6.Z,{}),onClick:l=>{l.stopPropagation(),m(e.id)},className:"mr-2"})]}),children:(0,s.jsxs)("div",{className:"px-6 pb-6 w-full",children:[(0,s.jsxs)("div",{className:"mb-4 w-full",children:[(0,s.jsx)(e3.x,{className:"text-sm font-medium mb-2 block",children:"Model"}),(0,s.jsx)(ev.default,{value:e.model,onChange:l=>u(e.id,"model",l),placeholder:"Select model",showSearch:!0,style:{width:"100%"},options:x})]}),(0,s.jsxs)("div",{className:"mb-4 w-full",children:[(0,s.jsx)(e3.x,{className:"text-sm font-medium mb-2 block",children:"Description"}),(0,s.jsx)(e8,{value:e.description,onChange:l=>u(e.id,"description",l.target.value),placeholder:"Describe when this route should be used...",rows:2,style:{width:"100%"}})]}),(0,s.jsxs)("div",{className:"mb-4 w-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(e3.x,{className:"text-sm font-medium",children:"Score Threshold"}),(0,s.jsx)(M.Z,{title:"Minimum similarity score to route to this model (0-1)",children:(0,s.jsx)(R.Z,{className:"text-gray-400"})})]}),(0,s.jsx)(Y.Z,{value:e.score_threshold,onChange:l=>u(e.id,"score_threshold",l||0),min:0,max:1,step:.1,style:{width:"100%"},placeholder:"0.5"})]}),(0,s.jsxs)("div",{className:"w-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(e3.x,{className:"text-sm font-medium",children:"Example Utterances"}),(0,s.jsx)(M.Z,{title:"Training examples for this route. Type an utterance and press Enter to add it.",children:(0,s.jsx)(R.Z,{className:"text-gray-400"})})]}),(0,s.jsx)(e3.x,{className:"text-xs text-gray-500 mb-2",children:"Type an utterance and press Enter to add it. You can also paste multiple lines."}),(0,s.jsx)(ev.default,{mode:"tags",value:e.utterances,onChange:l=>u(e.id,"utterances",l),placeholder:"Type an utterance and press Enter...",style:{width:"100%"},tokenSeparators:["\n"],maxTagCount:"responsive",allowClear:!0})]})]})}]})},e.id))}),(0,s.jsxs)("div",{className:"border-t pt-6 w-full",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4 w-full",children:[(0,s.jsx)(e3.x,{className:"text-lg font-semibold",children:"JSON Preview"}),(0,s.jsx)(_.ZP,{type:"link",onClick:()=>o(!n),className:"text-blue-600 p-0",children:n?"Hide":"Show"})]}),n&&(0,s.jsx)(et.Z,{className:"bg-gray-50 w-full",children:(0,s.jsx)("pre",{className:"text-sm overflow-auto max-h-64 w-full",children:JSON.stringify({routes:r.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))},null,2)})})]})]})};let{Title:le,Link:ll}=Q.default;var lt=e=>{let{form:l,handleOk:t,accessToken:r,userRole:i}=e,[n,o]=(0,f.useState)(!1),[d,c]=(0,f.useState)(!1),[m,u]=(0,f.useState)(""),[h,x]=(0,f.useState)([]),[p,g]=(0,f.useState)([]),[j,v]=(0,f.useState)(!1),[b,y]=(0,f.useState)(!1),[N,w]=(0,f.useState)(null);(0,f.useEffect)(()=>{(async()=>{x((await (0,a.modelAvailableCall)(r,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[r]),(0,f.useEffect)(()=>{(async()=>{try{let e=await (0,e1.p)(r);console.log("Fetched models for auto router:",e),g(e)}catch(e){console.error("Error fetching model info for auto router:",e)}})()},[r]);let Z=eR.ZL.includes(i),C=async()=>{c(!0),u("test-".concat(Date.now())),o(!0)},k=()=>{console.log("Auto router submit triggered!"),console.log("Router config:",N);let e=l.getFieldsValue();if(console.log("Form values:",e),!e.auto_router_name){eo.Z.fromBackend("Please enter an Auto Router Name");return}if(!e.auto_router_default_model){eo.Z.fromBackend("Please select a Default Model");return}if(l.setFieldsValue({custom_llm_provider:"auto_router",model:e.auto_router_name,api_key:"not_required_for_auto_router"}),!N||!N.routes||0===N.routes.length){eo.Z.fromBackend("Please configure at least one route for the auto router");return}if(N.routes.filter(e=>!e.name||!e.description||0===e.utterances.length).length>0){eo.Z.fromBackend("Please ensure all routes have a target model, description, and at least one utterance");return}l.validateFields().then(e=>{console.log("Form validation passed, submitting with values:",e);let s={...e,auto_router_config:N};console.log("Final submit values:",s),e0(s,r,l,t)}).catch(e=>{console.error("Validation failed:",e);let l=e.errorFields||[];if(l.length>0){let e=l.map(e=>{let l=e.name[0];return({auto_router_name:"Auto Router Name",auto_router_default_model:"Default Model",auto_router_embedding_model:"Embedding Model"})[l]||l});eo.Z.fromBackend("Please fill in the following required fields: ".concat(e.join(", ")))}else eo.Z.fromBackend("Please fill in all required fields")})};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(le,{level:2,children:"Add Auto Router"}),(0,s.jsx)(eN.x,{className:"text-gray-600 mb-6",children:"Create an auto router with intelligent routing logic that automatically selects the best model based on user input patterns and semantic matching."}),(0,s.jsx)(et.Z,{children:(0,s.jsxs)(eg.Z,{form:l,onFinish:k,labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:[(0,s.jsx)(eg.Z.Item,{rules:[{required:!0,message:"Auto router name is required"}],label:"Auto Router Name",name:"auto_router_name",tooltip:"Unique name for this auto router configuration",labelCol:{span:10},labelAlign:"left",children:(0,s.jsx)(eN.o,{placeholder:"e.g., auto_router_1, smart_routing"})}),(0,s.jsx)("div",{className:"w-full mb-4",children:(0,s.jsx)(e9,{modelInfo:p,value:N,onChange:e=>{w(e),l.setFieldValue("auto_router_config",e)}})}),(0,s.jsx)(eg.Z.Item,{rules:[{required:!0,message:"Default model is required"}],label:"Default Model",name:"auto_router_default_model",tooltip:"Fallback model to use when auto routing logic cannot determine the best model",labelCol:{span:10},labelAlign:"left",children:(0,s.jsx)(ev.default,{placeholder:"Select a default model",onChange:e=>{v("custom"===e)},options:[...Array.from(new Set(p.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0})}),(0,s.jsx)(eg.Z.Item,{label:"Embedding Model",name:"auto_router_embedding_model",tooltip:"Optional: Embedding model to use for semantic routing decisions",labelCol:{span:10},labelAlign:"left",children:(0,s.jsx)(ev.default,{value:l.getFieldValue("auto_router_embedding_model"),placeholder:"Select an embedding model (optional)",onChange:e=>{y("custom"===e),l.setFieldValue("auto_router_embedding_model",e)},options:[...Array.from(new Set(p.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0,allowClear:!0})}),(0,s.jsxs)("div",{className:"flex items-center my-4",children:[(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,s.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Settings"}),(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),Z&&(0,s.jsx)(eg.Z.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to control who can access this auto router",children:(0,s.jsx)(ev.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:h.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})}),(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(M.Z,{title:"Get help on our github",children:(0,s.jsx)(Q.default.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{className:"space-x-2",children:[(0,s.jsx)(_.ZP,{onClick:C,loading:d,children:"Test Connect"}),(0,s.jsx)(_.ZP,{onClick:()=>{console.log("Add Auto Router button clicked!"),console.log("Current router config:",N),console.log("Current form values:",l.getFieldsValue()),k()},children:"Add Auto Router"})]})]})]})}),(0,s.jsx)(ea.Z,{title:"Connection Test Results",open:n,onCancel:()=>{o(!1),c(!1)},footer:[(0,s.jsx)(_.ZP,{onClick:()=>{o(!1),c(!1)},children:"Close"},"close")],width:700,children:n&&(0,s.jsx)(eQ,{formValues:l.getFieldsValue(),accessToken:r,testMode:"chat",modelName:l.getFieldValue("auto_router_name"),onClose:()=>{o(!1),c(!1)},onTestComplete:()=>c(!1)},m)})]})};let ls=(0,i.n)("guardrails"),la=()=>{let{accessToken:e,userId:l,userRole:t}=(0,n.Z)();return(0,r.a)({queryKey:ls.list({}),queryFn:async()=>(await (0,a.getGuardrailsList)(e)).guardrails.map(e=>e.guardrail_name),enabled:!!(e&&l&&t)})},lr=(0,i.n)("tags"),li=()=>{let{accessToken:e,userId:l,userRole:t}=(0,n.Z)();return(0,r.a)({queryKey:lr.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&l&&t)})};var ln=t(59341),lo=t(51653),ld=t(84376),lc=t(63709),lm=t(26210),lu=t(34766),lh=t(45246),lx=t(24199);let{Text:lp}=Q.default;var lg=e=>{let{form:l,showCacheControl:t,onCacheControlChange:a}=e,r=e=>{let t=l.getFieldValue("litellm_extra_params");try{let s=t?JSON.parse(t):{};e.length>0?s.cache_control_injection_points=e:delete s.cache_control_injection_points,Object.keys(s).length>0?l.setFieldValue("litellm_extra_params",JSON.stringify(s,null,2)):l.setFieldValue("litellm_extra_params","")}catch(e){console.error("Error updating cache control points:",e)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eg.Z.Item,{label:"Cache Control Injection Points",name:"cache_control",valuePropName:"checked",className:"mb-4",tooltip:"Tell litellm where to inject cache control checkpoints. You can specify either by role (to apply to all messages of that role) or by specific message index.",children:(0,s.jsx)(lc.Z,{onChange:a,className:"bg-gray-600"})}),t&&(0,s.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,s.jsx)(lp,{className:"text-sm text-gray-500 block mb-4",children:"Providers like Anthropic, Bedrock API require users to specify where to inject cache control checkpoints, litellm can automatically add them for you as a cost saving feature."}),(0,s.jsx)(eg.Z.List,{name:"cache_control_injection_points",initialValue:[{location:"message"}],children:(e,t)=>{let{add:a,remove:i}=t;return(0,s.jsxs)(s.Fragment,{children:[e.map((t,a)=>(0,s.jsxs)("div",{className:"flex items-center mb-4 gap-4",children:[(0,s.jsx)(eg.Z.Item,{...t,label:"Type",name:[t.name,"location"],initialValue:"message",className:"mb-0",style:{width:"180px"},children:(0,s.jsx)(ev.default,{disabled:!0,options:[{value:"message",label:"Message"}]})}),(0,s.jsx)(eg.Z.Item,{...t,label:"Role",name:[t.name,"role"],className:"mb-0",style:{width:"180px"},tooltip:"LiteLLM will mark all messages of this role as cacheable",children:(0,s.jsx)(ev.default,{placeholder:"Select a role",allowClear:!0,options:[{value:"user",label:"User"},{value:"system",label:"System"},{value:"assistant",label:"Assistant"}],onChange:()=>{r(l.getFieldValue("cache_control_points"))}})}),(0,s.jsx)(eg.Z.Item,{...t,label:"Index",name:[t.name,"index"],className:"mb-0",style:{width:"180px"},tooltip:"(Optional) If set litellm will mark the message at this index as cacheable",children:(0,s.jsx)(lx.Z,{type:"number",placeholder:"Optional",step:1,onChange:()=>{r(l.getFieldValue("cache_control_points"))}})}),e.length>1&&(0,s.jsx)(lh.Z,{className:"text-red-500 cursor-pointer text-lg ml-12",onClick:()=>{i(t.name),setTimeout(()=>{r(l.getFieldValue("cache_control_points"))},0)}})]},t.key)),(0,s.jsx)(eg.Z.Item,{children:(0,s.jsxs)("button",{type:"button",className:"flex items-center justify-center w-full border border-dashed border-gray-300 py-2 px-4 text-gray-600 hover:text-blue-600 hover:border-blue-300 transition-all rounded",onClick:()=>a(),children:[(0,s.jsx)(e4.Z,{className:"mr-2"}),"Add Injection Point"]})})]})}})]})]})},lf=t(9309);let{Link:lj}=Q.default;var lv=e=>{let{showAdvancedSettings:l,setShowAdvancedSettings:t,teams:a,guardrailsList:r,tagsList:i}=e,[n]=eg.Z.useForm(),[o,d]=f.useState(!1),[c,m]=f.useState("per_token"),[u,h]=f.useState(!1),x=(e,l)=>l&&(isNaN(Number(l))||0>Number(l))?Promise.reject("Please enter a valid positive number"):Promise.resolve();return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(lm.UQ,{className:"mt-2 mb-4",children:[(0,s.jsx)(lm._m,{children:(0,s.jsx)("b",{children:"Advanced Settings"})}),(0,s.jsx)(lm.X1,{children:(0,s.jsxs)("div",{className:"bg-white rounded-lg",children:[(0,s.jsx)(eg.Z.Item,{label:"Custom Pricing",name:"custom_pricing",valuePropName:"checked",className:"mb-4",children:(0,s.jsx)(lc.Z,{onChange:e=>{d(e),e||n.setFieldsValue({input_cost_per_token:void 0,output_cost_per_token:void 0,input_cost_per_second:void 0})},className:"bg-gray-600"})}),(0,s.jsx)(eg.Z.Item,{label:(0,s.jsxs)("span",{children:["Guardrails"," ",(0,s.jsx)(M.Z,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(R.Z,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:"Select existing guardrails. Go to 'Guardrails' tab to create new guardrails.",children:(0,s.jsx)(ev.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:r.map(e=>({value:e,label:e}))})}),(0,s.jsx)(eg.Z.Item,{label:"Tags",name:"tags",className:"mb-4",children:(0,s.jsx)(ev.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(i).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),o&&(0,s.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,s.jsx)(eg.Z.Item,{label:"Pricing Model",name:"pricing_model",className:"mb-4",children:(0,s.jsx)(ev.default,{defaultValue:"per_token",onChange:e=>m(e),options:[{value:"per_token",label:"Per Million Tokens"},{value:"per_second",label:"Per Second"}]})}),"per_token"===c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eg.Z.Item,{label:"Input Cost (per 1M tokens)",name:"input_cost_per_token",rules:[{validator:x}],className:"mb-4",children:(0,s.jsx)(lm.oi,{})}),(0,s.jsx)(eg.Z.Item,{label:"Output Cost (per 1M tokens)",name:"output_cost_per_token",rules:[{validator:x}],className:"mb-4",children:(0,s.jsx)(lm.oi,{})})]}):(0,s.jsx)(eg.Z.Item,{label:"Cost Per Second",name:"input_cost_per_second",rules:[{validator:x}],className:"mb-4",children:(0,s.jsx)(lm.oi,{})})]}),(0,s.jsx)(eg.Z.Item,{label:"Use in pass through routes",name:"use_in_pass_through",valuePropName:"checked",className:"mb-4 mt-4",tooltip:(0,s.jsxs)("span",{children:["Allow using these credentials in pass through routes."," ",(0,s.jsx)(lj,{href:"https://docs.litellm.ai/docs/pass_through/vertex_ai",target:"_blank",children:"Learn more"})]}),children:(0,s.jsx)(lc.Z,{onChange:e=>{let l=n.getFieldValue("litellm_extra_params");try{let t=l?JSON.parse(l):{};e?t.use_in_pass_through=!0:delete t.use_in_pass_through,Object.keys(t).length>0?n.setFieldValue("litellm_extra_params",JSON.stringify(t,null,2)):n.setFieldValue("litellm_extra_params","")}catch(l){e?n.setFieldValue("litellm_extra_params",JSON.stringify({use_in_pass_through:!0},null,2)):n.setFieldValue("litellm_extra_params","")}},className:"bg-gray-600"})}),(0,s.jsx)(lg,{form:n,showCacheControl:u,onCacheControlChange:e=>{if(h(e),!e){let e=n.getFieldValue("litellm_extra_params");try{let l=e?JSON.parse(e):{};delete l.cache_control_injection_points,Object.keys(l).length>0?n.setFieldValue("litellm_extra_params",JSON.stringify(l,null,2)):n.setFieldValue("litellm_extra_params","")}catch(e){n.setFieldValue("litellm_extra_params","")}}}}),(0,s.jsx)(eg.Z.Item,{label:"LiteLLM Params",name:"litellm_extra_params",tooltip:"Optional litellm params used for making a litellm.completion() call.",className:"mb-4 mt-4",rules:[{validator:lf.Ac}],children:(0,s.jsx)(lu.Z,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}),(0,s.jsxs)(ew.Z,{className:"mb-4",children:[(0,s.jsx)(eZ.Z,{span:10}),(0,s.jsx)(eZ.Z,{span:10,children:(0,s.jsxs)(lm.xv,{className:"text-gray-600 text-sm",children:["Pass JSON of litellm supported params"," ",(0,s.jsx)(lj,{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",children:"litellm.completion() call"})]})})]}),(0,s.jsx)(eg.Z.Item,{label:"Model Info",name:"model_info_params",tooltip:"Optional model info params. Returned when calling `/model/info` endpoint.",className:"mb-0",rules:[{validator:lf.Ac}],children:(0,s.jsx)(lu.Z,{rows:4,placeholder:'{ "mode": "chat" }'})})]})})]})})},l_=t(56609),lb=t(67187);let ly=e=>{let{content:l,children:t,width:a="auto",className:r=""}=e,[i,n]=(0,f.useState)(!1),[o,d]=(0,f.useState)("top"),c=(0,f.useRef)(null),m=()=>{if(c.current){let e=c.current.getBoundingClientRect(),l=e.top,t=window.innerHeight-e.bottom;l<300&&t>300?d("bottom"):d("top")}};return(0,s.jsxs)("div",{className:"relative inline-block",ref:c,children:[t||(0,s.jsx)(lb.Z,{className:"ml-1 text-gray-500 cursor-help",onMouseEnter:()=>{m(),n(!0)},onMouseLeave:()=>n(!1)}),i&&(0,s.jsxs)("div",{className:"absolute left-1/2 -translate-x-1/2 z-50 bg-black/90 text-white p-2 rounded-md text-sm font-normal shadow-lg ".concat(r),style:{["top"===o?"bottom":"top"]:"100%",width:a,marginBottom:"top"===o?"8px":"0",marginTop:"bottom"===o?"8px":"0"},children:[l,(0,s.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 w-0 h-0",style:{top:"top"===o?"100%":"auto",bottom:"bottom"===o?"100%":"auto",borderTop:"top"===o?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderBottom:"bottom"===o?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderLeft:"6px solid transparent",borderRight:"6px solid transparent"}})]})]})};var lN=()=>{let e=eg.Z.useFormInstance(),[l,t]=(0,f.useState)(0),a=eg.Z.useWatch("model",e)||[],r=Array.isArray(a)?a:[a],i=eg.Z.useWatch("custom_model_name",e),n=!r.includes("all-wildcard"),o=eg.Z.useWatch("custom_llm_provider",e);if((0,f.useEffect)(()=>{if(i&&r.includes("custom")){let l=(e.getFieldValue("model_mappings")||[]).map(e=>"custom"===e.public_name||"custom"===e.litellm_model?o===L.Cl.Azure?{public_name:i,litellm_model:"azure/".concat(i)}:{public_name:i,litellm_model:i}:e);e.setFieldValue("model_mappings",l),t(e=>e+1)}},[i,r,o,e]),(0,f.useEffect)(()=>{if(r.length>0&&!r.includes("all-wildcard")){let l=e.getFieldValue("model_mappings")||[];if(l.length!==r.length||!r.every(e=>l.some(l=>"custom"===e?"custom"===l.litellm_model||l.litellm_model===i:o===L.Cl.Azure?l.litellm_model==="azure/".concat(e):l.litellm_model===e))){let l=r.map(e=>"custom"===e&&i?o===L.Cl.Azure?{public_name:i,litellm_model:"azure/".concat(i)}:{public_name:i,litellm_model:i}:o===L.Cl.Azure?{public_name:e,litellm_model:"azure/".concat(e)}:{public_name:e,litellm_model:e});e.setFieldValue("model_mappings",l),t(e=>e+1)}}},[r,i,o,e]),!n)return null;let d=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mb-2 font-normal",children:"The name you specify in your API calls to LiteLLM Proxy"}),(0,s.jsxs)("div",{className:"mb-2 font-normal",children:[(0,s.jsx)("strong",{children:"Example:"})," If you name your public model"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"example-name"}),", and choose"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"openai/qwen-plus-latest"})," as the LiteLLM model"]}),(0,s.jsxs)("div",{className:"mb-2 font-normal",children:[(0,s.jsx)("strong",{children:"Usage:"})," You make an API call to the LiteLLM proxy with"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:'model = "example-name"'})]}),(0,s.jsxs)("div",{className:"font-normal",children:[(0,s.jsx)("strong",{children:"Result:"})," LiteLLM sends"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"qwen-plus-latest"})," to the provider"]})]}),c=(0,s.jsx)("div",{children:"The model name LiteLLM will send to the LLM API"}),m=[{title:(0,s.jsxs)("span",{className:"flex items-center",children:["Public Model Name",(0,s.jsx)(ly,{content:d,width:"500px"})]}),dataIndex:"public_name",key:"public_name",render:(l,t,a)=>(0,s.jsx)(ej.o,{value:l,onChange:l=>{let t=l.target.value,s=[...e.getFieldValue("model_mappings")],r=o===L.Cl.Anthropic,i=t.endsWith("-1m"),n=e.getFieldValue("litellm_extra_params"),d=!n||""===n.trim(),c=t;if(r&&i&&d){let l=JSON.stringify({extra_headers:{"anthropic-beta":"context-1m-2025-08-07"}},null,2);e.setFieldValue("litellm_extra_params",l),c=t.slice(0,-3)}s[a].public_name=c,e.setFieldValue("model_mappings",s)}})},{title:(0,s.jsxs)("span",{className:"flex items-center",children:["LiteLLM Model Name",(0,s.jsx)(ly,{content:c,width:"360px"})]}),dataIndex:"litellm_model",key:"litellm_model"}];return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(eg.Z.Item,{label:"Model Mappings",name:"model_mappings",tooltip:"Map public model names to LiteLLM model names for load balancing",labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",rules:[{required:!0,validator:async(e,l)=>{if(!l||0===l.length)throw Error("At least one model mapping is required");if(l.filter(e=>!e.public_name||""===e.public_name.trim()).length>0)throw Error("All model mappings must have valid public names")}}],children:(0,s.jsx)(l_.Z,{dataSource:e.getFieldValue("model_mappings"),columns:m,pagination:!1,size:"small"},l)})})},lw=e=>{let{selectedProvider:l,providerModels:t,getPlaceholder:a}=e,r=eg.Z.useFormInstance(),i=e=>{let t=e.target.value,s=(r.getFieldValue("model_mappings")||[]).map(e=>"custom"===e.public_name||"custom"===e.litellm_model?l===L.Cl.Azure?{public_name:t,litellm_model:"azure/".concat(t)}:{public_name:t,litellm_model:t}:e);r.setFieldsValue({model_mappings:s})};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(eg.Z.Item,{label:"LiteLLM Model Name(s)",tooltip:"The model name LiteLLM will send to the LLM API",className:"mb-0",children:[(0,s.jsx)(eg.Z.Item,{name:"model",rules:[{required:!0,message:"Please enter ".concat(l===L.Cl.Azure?"a deployment name":"at least one model",".")}],noStyle:!0,children:l===L.Cl.Azure||l===L.Cl.OpenAI_Compatible||l===L.Cl.Ollama?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(eN.o,{placeholder:a(l),onChange:l===L.Cl.Azure?e=>{let l=e.target.value,t=l?[{public_name:l,litellm_model:"azure/".concat(l)}]:[];r.setFieldsValue({model:l,model_mappings:t})}:void 0})}):t.length>0?(0,s.jsx)(ev.default,{mode:"multiple",allowClear:!0,showSearch:!0,placeholder:"Select models",onChange:e=>{let t=Array.isArray(e)?e:[e];if(t.includes("all-wildcard"))r.setFieldsValue({model_name:void 0,model_mappings:[]});else if(JSON.stringify(r.getFieldValue("model"))!==JSON.stringify(t)){let e=t.map(e=>l===L.Cl.Azure?{public_name:e,litellm_model:"azure/".concat(e)}:{public_name:e,litellm_model:e});r.setFieldsValue({model:t,model_mappings:e})}},optionFilterProp:"children",filterOption:(e,l)=>{var t;return(null!==(t=null==l?void 0:l.label)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())},options:[{label:"Custom Model Name (Enter below)",value:"custom"},{label:"All ".concat(l," Models (Wildcard)"),value:"all-wildcard"},...t.map(e=>({label:e,value:e}))],style:{width:"100%"}}):(0,s.jsx)(eN.o,{placeholder:a(l)})}),(0,s.jsx)(eg.Z.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.model!==l.model,children:e=>{let{getFieldValue:t}=e,a=t("model")||[];return(Array.isArray(a)?a:[a]).includes("custom")&&(0,s.jsx)(eg.Z.Item,{name:"custom_model_name",rules:[{required:!0,message:"Please enter a custom model name."}],className:"mt-2",children:(0,s.jsx)(eN.o,{placeholder:l===L.Cl.Azure?"Enter Azure deployment name":"Enter custom model name",onChange:i})})}})]}),(0,s.jsxs)(ew.Z,{children:[(0,s.jsx)(eZ.Z,{span:10}),(0,s.jsx)(eZ.Z,{span:14,children:(0,s.jsx)(eN.x,{className:"mb-3 mt-1",children:l===L.Cl.Azure?"Your deployment name will be saved as the public model name, and LiteLLM will use 'azure/deployment-name' internally":"The model name LiteLLM will send to the LLM API"})})]})]})};let lZ=[{value:"chat",label:"Chat - /chat/completions"},{value:"completion",label:"Completion - /completions"},{value:"embedding",label:"Embedding - /embeddings"},{value:"audio_speech",label:"Audio Speech - /audio/speech"},{value:"audio_transcription",label:"Audio Transcription - /audio/transcriptions"},{value:"image_generation",label:"Image Generation - /images/generations"},{value:"video_generation",label:"Video Generation - /videos"},{value:"rerank",label:"Rerank - /rerank"},{value:"realtime",label:"Realtime - /realtime"},{value:"batch",label:"Batch - /batch"},{value:"ocr",label:"OCR - /ocr"}],{Title:lC,Link:lk}=Q.default;var lS=e=>{let{form:l,handleOk:t,selectedProvider:r,setSelectedProvider:i,providerModels:o,setProviderModelsFn:d,getPlaceholder:c,uploadProps:m,showAdvancedSettings:u,setShowAdvancedSettings:h,teams:x,credentials:p}=e,[g,j]=(0,f.useState)("chat"),[v,b]=(0,f.useState)(!1),[y,N]=(0,f.useState)(!1),[w,Z]=(0,f.useState)(""),{accessToken:C,userRole:k,premiumUser:S,userId:A}=(0,n.Z)(),{data:E,isLoading:P,error:I}=eb(),{data:T,isLoading:R,error:O}=la(),{data:V,isLoading:q,error:z}=li(),B=async()=>{N(!0),Z("test-".concat(Date.now())),b(!0)},[G,U]=(0,f.useState)(!1),[H,K]=(0,f.useState)([]),[J,W]=(0,f.useState)(null);(0,f.useEffect)(()=>{(async()=>{K((await (0,a.modelAvailableCall)(C,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[C]);let Y=(0,f.useMemo)(()=>E?[...E].sort((e,l)=>e.provider_display_name.localeCompare(l.provider_display_name)):[],[E]),$=I?I instanceof Error?I.message:"Failed to load providers":null,X=eR.ZL.includes(k),ee=(0,eR.yV)(x,A);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(lC,{level:2,children:"Add Model"}),(0,s.jsx)(et.Z,{children:(0,s.jsx)(eg.Z,{form:l,onFinish:async e=>{console.log("\uD83D\uDD25 Form onFinish triggered with values:",e),await t().then(()=>{W(null)})},onFinishFailed:e=>{console.log("\uD83D\uDCA5 Form onFinishFailed triggered:",e)},labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:(0,s.jsxs)(s.Fragment,{children:[ee&&!X&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eg.Z.Item,{label:"Select Team",name:"team_id",rules:[{required:!0,message:"Please select a team to continue"}],tooltip:"Select the team for which you want to add this model",children:(0,s.jsx)(ld.Z,{teams:x,onChange:e=>{W(e)}})}),!J&&(0,s.jsx)(lo.Z,{message:"Team Selection Required",description:"As a team admin, you need to select your team first before adding models.",type:"info",showIcon:!0,className:"mb-4"})]}),(X||ee&&J)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eg.Z.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"E.g. OpenAI, Azure OpenAI, Anthropic, Bedrock, etc.",labelCol:{span:10},labelAlign:"left",children:(0,s.jsxs)(ev.default,{virtual:!1,showSearch:!0,loading:P,placeholder:P?"Loading providers...":"Select a provider",optionFilterProp:"data-label",onChange:e=>{i(e),d(e),l.setFieldsValue({custom_llm_provider:e}),l.setFieldsValue({model:[],model_name:void 0})},children:[$&&0===Y.length&&(0,s.jsx)(ev.default.Option,{value:"",children:$},"__error"),Y.map(e=>{let l=e.provider_display_name,t=e.provider;return L.cd[l],(0,s.jsx)(ev.default.Option,{value:t,"data-label":l,children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(F,{provider:t,className:"w-5 h-5"}),(0,s.jsx)("span",{children:l})]})},t)})]})}),(0,s.jsx)(lw,{selectedProvider:r,providerModels:o,getPlaceholder:c}),(0,s.jsx)(lN,{}),(0,s.jsx)(eg.Z.Item,{label:"Mode",name:"mode",className:"mb-1",children:(0,s.jsx)(ev.default,{style:{width:"100%"},value:g,onChange:e=>j(e),options:lZ})}),(0,s.jsxs)(ew.Z,{children:[(0,s.jsx)(eZ.Z,{span:10}),(0,s.jsx)(eZ.Z,{span:10,children:(0,s.jsxs)(D.Z,{className:"mb-5 mt-1",children:[(0,s.jsx)("strong",{children:"Optional"})," - LiteLLM endpoint to use when health checking this model"," ",(0,s.jsx)(lk,{href:"https://docs.litellm.ai/docs/proxy/health#health",target:"_blank",children:"Learn more"})]})})]}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)(Q.default.Text,{className:"text-sm text-gray-500 mb-2",children:"Either select existing credentials OR enter new provider credentials below"})}),(0,s.jsx)(eg.Z.Item,{label:"Existing Credentials",name:"litellm_credential_name",initialValue:null,children:(0,s.jsx)(ev.default,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,l)=>{var t;return(null!==(t=null==l?void 0:l.label)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())},options:[{value:null,label:"None"},...p.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}),(0,s.jsx)(eg.Z.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.litellm_credential_name!==l.litellm_credential_name||e.provider!==l.provider,children:e=>{let{getFieldValue:l}=e,t=l("litellm_credential_name");return(console.log("\uD83D\uDD11 Credential Name Changed:",t),t)?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center my-4",children:[(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,s.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"OR"}),(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(0,s.jsx)(eP,{selectedProvider:r,uploadProps:m})]})}}),(0,s.jsxs)("div",{className:"flex items-center my-4",children:[(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,s.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Model Info Settings"}),(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(X||!ee)&&(0,s.jsx)(eg.Z.Item,{label:"Team-BYOK Model",tooltip:"Only use this model + credential combination for this team. Useful when teams want to onboard their own OpenAI keys.",className:"mb-4",children:(0,s.jsx)(M.Z,{title:S?"":"This is an enterprise-only feature. Upgrade to premium to restrict model+credential combinations to a specific team.",placement:"top",children:(0,s.jsx)(ln.Z,{checked:G,onChange:e=>{U(e),e||l.setFieldValue("team_id",void 0)},disabled:!S})})}),G&&(X||!ee)&&(0,s.jsx)(eg.Z.Item,{label:"Select Team",name:"team_id",className:"mb-4",tooltip:"Only keys for this team will be able to call this model.",rules:[{required:G&&!X,message:"Please select a team."}],children:(0,s.jsx)(ld.Z,{teams:x,disabled:!S})}),X&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(eg.Z.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to give users access to select models, and add new ones to the group over time.",children:(0,s.jsx)(ev.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:H.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})}),(0,s.jsx)(lv,{showAdvancedSettings:u,setShowAdvancedSettings:h,teams:x,guardrailsList:T||[],tagsList:V||{}})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(M.Z,{title:"Get help on our github",children:(0,s.jsx)(Q.default.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{className:"space-x-2",children:[(0,s.jsx)(_.ZP,{onClick:B,loading:y,children:"Test Connect"}),(0,s.jsx)(_.ZP,{htmlType:"submit",children:"Add Model"})]})]})]})})}),(0,s.jsx)(ea.Z,{title:"Connection Test Results",open:v,onCancel:()=>{b(!1),N(!1)},footer:[(0,s.jsx)(_.ZP,{onClick:()=>{b(!1),N(!1)},children:"Close"},"close")],width:700,children:v&&(0,s.jsx)(eQ,{formValues:l.getFieldsValue(),accessToken:C,testMode:g,modelName:l.getFieldValue("model_name")||l.getFieldValue("model"),onClose:()=>{b(!1),N(!1)},onTestComplete:()=>N(!1)},w)})]})},lA=e=>{let{form:l,handleOk:t,selectedProvider:a,setSelectedProvider:r,providerModels:i,setProviderModelsFn:n,getPlaceholder:o,uploadProps:d,showAdvancedSettings:c,setShowAdvancedSettings:m,teams:u,credentials:h,accessToken:x,userRole:p}=e,[g]=eg.Z.useForm();return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(eH.v0,{className:"w-full",children:[(0,s.jsxs)(eH.td,{className:"mb-4",children:[(0,s.jsx)(eH.OK,{children:"Add Model"}),(0,s.jsx)(eH.OK,{children:"Add Auto Router"})]}),(0,s.jsxs)(eH.nP,{children:[(0,s.jsx)(eH.x4,{children:(0,s.jsx)(lS,{form:l,handleOk:t,selectedProvider:a,setSelectedProvider:r,providerModels:i,setProviderModelsFn:n,getPlaceholder:o,uploadProps:d,showAdvancedSettings:c,setShowAdvancedSettings:m,teams:u,credentials:h})}),(0,s.jsx)(eH.x4,{children:(0,s.jsx)(lt,{form:g,handleOk:()=>{g.validateFields().then(e=>{e0(e,x,g,t)}).catch(e=>{console.error("Validation failed:",e)})},accessToken:x,userRole:p})})]})]})})},lE=t(8048),lP=t(4156),lM=t(15731),lL=t(91126);let lF=(e,l,t,a,r,i,n,o,d,c,m)=>[{header:()=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(lP.Z,{checked:t,indeterminate:l.length>0&&!t,onChange:e=>r(e.target.checked),onClick:e=>e.stopPropagation()}),(0,s.jsx)("span",{children:"Model ID"})]}),accessorKey:"model_info.id",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:t}=e,r=t.original,i=r.model_name,n=l.includes(i);return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(lP.Z,{checked:n,onChange:e=>a(i,e.target.checked),onClick:e=>e.stopPropagation()}),(0,s.jsx)(M.Z,{title:r.model_info.id,children:(0,s.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>m&&m(r.model_info.id),children:r.model_info.id})})]})}},{header:"Model Name",accessorKey:"model_name",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:l}=e,t=l.original,a=o(t)||t.model_name;return(0,s.jsx)("div",{className:"font-medium text-sm",children:(0,s.jsx)(M.Z,{title:a,children:(0,s.jsx)("div",{className:"truncate max-w-[200px]",children:a})})})}},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,sortingFn:(e,l,t)=>{var s,a;let r=e.getValue("health_status")||"unknown",i=l.getValue("health_status")||"unknown",n={healthy:0,checking:1,unknown:2,unhealthy:3};return(null!==(s=n[r])&&void 0!==s?s:4)-(null!==(a=n[i])&&void 0!==a?a:4)},cell:l=>{var t;let{row:a}=l,r=a.original,i={status:r.health_status,loading:r.health_loading,error:r.health_error};if(i.loading)return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsxs)("div",{className:"flex space-x-1",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse"}),(0,s.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,s.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}),(0,s.jsx)(e3.x,{className:"text-gray-600 text-sm",children:"Checking..."})]});let o=r.model_name,d="healthy"===i.status&&(null===(t=e[o])||void 0===t?void 0:t.successResponse);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[n(i.status),d&&c&&(0,s.jsx)(M.Z,{title:"View response details",placement:"top",children:(0,s.jsx)("button",{onClick:()=>{var l;return c(o,null===(l=e[o])||void 0===l?void 0:l.successResponse)},className:"p-1 text-green-600 hover:text-green-800 hover:bg-green-50 rounded cursor-pointer transition-colors",children:(0,s.jsx)(lM.Z,{className:"h-4 w-4"})})})]})}},{header:"Error Details",accessorKey:"health_error",enableSorting:!1,cell:l=>{let{row:t}=l,a=t.original.model_name,r=e[a];if(!(null==r?void 0:r.error))return(0,s.jsx)(e3.x,{className:"text-gray-400 text-sm",children:"No errors"});let i=r.error,n=r.fullError||r.error;return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("div",{className:"max-w-[200px]",children:(0,s.jsx)(M.Z,{title:i,placement:"top",children:(0,s.jsx)(e3.x,{className:"text-red-600 text-sm truncate",children:i})})}),d&&n!==i&&(0,s.jsx)(M.Z,{title:"View full error details",placement:"top",children:(0,s.jsx)("button",{onClick:()=>d(a,i,n),className:"p-1 text-red-600 hover:text-red-800 hover:bg-red-50 rounded cursor-pointer transition-colors",children:(0,s.jsx)(lM.Z,{className:"h-4 w-4"})})})]})}},{header:"Last Check",accessorKey:"last_check",enableSorting:!0,sortingFn:(e,l,t)=>{let s=e.getValue("last_check")||"Never checked",a=l.getValue("last_check")||"Never checked";if("Never checked"===s&&"Never checked"===a)return 0;if("Never checked"===s)return 1;if("Never checked"===a)return -1;if("Check in progress..."===s&&"Check in progress..."===a)return 0;if("Check in progress..."===s)return -1;if("Check in progress..."===a)return 1;let r=new Date(s),i=new Date(a);return isNaN(r.getTime())&&isNaN(i.getTime())?0:isNaN(r.getTime())?1:isNaN(i.getTime())?-1:i.getTime()-r.getTime()},cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)(e3.x,{className:"text-gray-600 text-sm",children:t.health_loading?"Check in progress...":t.last_check})}},{header:"Last Success",accessorKey:"last_success",enableSorting:!0,sortingFn:(e,l,t)=>{let s=e.getValue("last_success")||"Never succeeded",a=l.getValue("last_success")||"Never succeeded";if("Never succeeded"===s&&"Never succeeded"===a)return 0;if("Never succeeded"===s)return 1;if("Never succeeded"===a)return -1;if("None"===s&&"None"===a)return 0;if("None"===s)return 1;if("None"===a)return -1;let r=new Date(s),i=new Date(a);return isNaN(r.getTime())&&isNaN(i.getTime())?0:isNaN(r.getTime())?1:isNaN(i.getTime())?-1:i.getTime()-r.getTime()},cell:l=>{let{row:t}=l,a=e[t.original.model_name],r=(null==a?void 0:a.lastSuccess)||"None";return(0,s.jsx)(e3.x,{className:"text-gray-600 text-sm",children:r})}},{header:"Actions",id:"actions",cell:e=>{let{row:l}=e,t=l.original,a=t.model_name,r=t.health_status&&"none"!==t.health_status,n=t.health_loading?"Checking...":r?"Re-run Health Check":"Run Health Check";return(0,s.jsx)(M.Z,{title:n,placement:"top",children:(0,s.jsx)("button",{className:"p-2 rounded-md transition-colors ".concat(t.health_loading?"text-gray-400 cursor-not-allowed bg-gray-100":"text-indigo-600 hover:text-indigo-700 hover:bg-indigo-50"),onClick:()=>{t.health_loading||i(a)},disabled:t.health_loading,children:t.health_loading?(0,s.jsxs)("div",{className:"flex space-x-1",children:[(0,s.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse"}),(0,s.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,s.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}):r?(0,s.jsx)(eO.Z,{className:"h-4 w-4"}):(0,s.jsx)(lL.Z,{className:"h-4 w-4"})})})},enableSorting:!1}],lI=[{pattern:/Missing .* API Key/i,replacement:"Missing API Key"},{pattern:/Connection timeout/i,replacement:"Connection timeout"},{pattern:/Network.*not.*ok/i,replacement:"Network connection failed"},{pattern:/403.*Forbidden/i,replacement:"Access forbidden - check API key permissions"},{pattern:/401.*Unauthorized/i,replacement:"Unauthorized - invalid API key"},{pattern:/429.*rate limit/i,replacement:"Rate limit exceeded"},{pattern:/500.*Internal Server Error/i,replacement:"Provider internal server error"},{pattern:/litellm\.AuthenticationError/i,replacement:"Authentication failed"},{pattern:/litellm\.RateLimitError/i,replacement:"Rate limit exceeded"},{pattern:/litellm\.APIError/i,replacement:"API error"}];var lT=e=>{let{accessToken:l,modelData:t,all_models_on_proxy:r,getDisplayModelName:i,setSelectedModelId:n}=e,[o,d]=(0,f.useState)({}),[c,m]=(0,f.useState)([]),[u,h]=(0,f.useState)(!1),[x,p]=(0,f.useState)(!1),[g,j]=(0,f.useState)(null),[v,b]=(0,f.useState)(!1),[y,N]=(0,f.useState)(null);(0,f.useRef)(null),(0,f.useEffect)(()=>{l&&(null==t?void 0:t.data)&&(async()=>{let e={};t.data.forEach(l=>{e[l.model_name]={status:"none",lastCheck:"None",lastSuccess:"None",loading:!1,error:void 0,fullError:void 0,successResponse:void 0}});try{let s=await (0,a.latestHealthChecksCall)(l);s&&s.latest_health_checks&&"object"==typeof s.latest_health_checks&&Object.entries(s.latest_health_checks).forEach(l=>{let[s,a]=l;if(!a)return;let r=null,i=t.data.find(e=>e.model_name===s);if(i)r=i.model_name;else{let e=t.data.find(e=>e.model_info&&e.model_info.id===s);if(e)r=e.model_name;else if(a.model_name){let e=t.data.find(e=>e.model_name===a.model_name);e&&(r=e.model_name)}}if(r){let l=a.error_message||void 0;e[r]={status:a.status||"unknown",lastCheck:a.checked_at?new Date(a.checked_at).toLocaleString():"None",lastSuccess:"healthy"===a.status&&a.checked_at?new Date(a.checked_at).toLocaleString():"None",loading:!1,error:l?w(l):void 0,fullError:l,successResponse:"healthy"===a.status?a:void 0}}})}catch(e){console.warn("Failed to load health check history (using default states):",e)}d(e)})()},[l,t]);let w=e=>{var l;if(!e)return"Health check failed";let t="string"==typeof e?e:JSON.stringify(e),s=t.match(/(\w+Error):\s*(\d{3})/i);if(s)return"".concat(s[1],": ").concat(s[2]);let a=t.match(/(AuthenticationError|RateLimitError|BadRequestError|InternalServerError|TimeoutError|NotFoundError|ForbiddenError|ServiceUnavailableError|BadGatewayError|ContentPolicyViolationError|\w+Error)/i),r=t.match(/\b(400|401|403|404|408|429|500|502|503|504)\b/);if(a&&r)return"".concat(a[1],": ").concat(r[1]);if(r){let e=r[1];return"".concat({400:"BadRequestError",401:"AuthenticationError",403:"ForbiddenError",404:"NotFoundError",408:"TimeoutError",429:"RateLimitError",500:"InternalServerError",502:"BadGatewayError",503:"ServiceUnavailableError",504:"GatewayTimeoutError"}[e],": ").concat(e)}if(a){let e=a[1],l={AuthenticationError:"401",RateLimitError:"429",BadRequestError:"400",InternalServerError:"500",TimeoutError:"408",NotFoundError:"404",ForbiddenError:"403",ServiceUnavailableError:"503",BadGatewayError:"502",GatewayTimeoutError:"504",ContentPolicyViolationError:"400"}[e];return l?"".concat(e,": ").concat(l):e}for(let{pattern:e,replacement:l}of lI)if(e.test(t))return l;if(/missing.*api.*key|invalid.*key|unauthorized/i.test(t))return"AuthenticationError: 401";if(/rate.*limit|too.*many.*requests/i.test(t))return"RateLimitError: 429";if(/timeout|timed.*out/i.test(t))return"TimeoutError: 408";if(/not.*found/i.test(t))return"NotFoundError: 404";if(/forbidden|access.*denied/i.test(t))return"ForbiddenError: 403";if(/internal.*server.*error/i.test(t))return"InternalServerError: 500";let i=t.replace(/[\n\r]+/g," ").replace(/\s+/g," ").trim(),n=null===(l=i.split(/[.!?]/)[0])||void 0===l?void 0:l.trim();return n&&n.length>0?n.length>100?n.substring(0,97)+"...":n:i.length>100?i.substring(0,97)+"...":i},Z=async e=>{if(l){d(l=>({...l,[e]:{...l[e],loading:!0,status:"checking"}}));try{var s,r;let i=await (0,a.individualModelHealthCheckCall)(l,e),n=new Date().toLocaleString();if(i.unhealthy_count>0&&i.unhealthy_endpoints&&i.unhealthy_endpoints.length>0){let l=(null===(s=i.unhealthy_endpoints[0])||void 0===s?void 0:s.error)||"Health check failed",t=w(l);d(s=>{var a;return{...s,[e]:{status:"unhealthy",lastCheck:n,lastSuccess:(null===(a=s[e])||void 0===a?void 0:a.lastSuccess)||"None",loading:!1,error:t,fullError:l}}})}else d(l=>({...l,[e]:{status:"healthy",lastCheck:n,lastSuccess:n,loading:!1,successResponse:i}}));try{let s=await (0,a.latestHealthChecksCall)(l),i=t.data.find(l=>l.model_name===e);if(i){let l=i.model_info.id,t=null===(r=s.latest_health_checks)||void 0===r?void 0:r[l];if(t){let l=t.error_message||void 0;d(s=>{var a,r,i,n,o,d,c;return{...s,[e]:{status:t.status||(null===(a=s[e])||void 0===a?void 0:a.status)||"unknown",lastCheck:t.checked_at?new Date(t.checked_at).toLocaleString():(null===(r=s[e])||void 0===r?void 0:r.lastCheck)||"None",lastSuccess:"healthy"===t.status?t.checked_at?new Date(t.checked_at).toLocaleString():(null===(i=s[e])||void 0===i?void 0:i.lastSuccess)||"None":(null===(n=s[e])||void 0===n?void 0:n.lastSuccess)||"None",loading:!1,error:l?w(l):null===(o=s[e])||void 0===o?void 0:o.error,fullError:l||(null===(d=s[e])||void 0===d?void 0:d.fullError),successResponse:"healthy"===t.status?t:null===(c=s[e])||void 0===c?void 0:c.successResponse}}})}}}catch(e){console.debug("Could not fetch updated status from database (non-critical):",e)}}catch(a){let l=new Date().toLocaleString(),t=a instanceof Error?a.message:String(a),s=w(t);d(a=>{var r;return{...a,[e]:{status:"unhealthy",lastCheck:l,lastSuccess:(null===(r=a[e])||void 0===r?void 0:r.lastSuccess)||"None",loading:!1,error:s,fullError:t}}})}}},C=async()=>{let e=c.length>0?c:r,s=e.reduce((e,l)=>(e[l]={...o[l],loading:!0,status:"checking"},e),{});d(e=>({...e,...s}));let i={},n=e.map(async e=>{if(l)try{let s=await (0,a.individualModelHealthCheckCall)(l,e);i[e]=s;let r=new Date().toLocaleString();if(s.unhealthy_count>0&&s.unhealthy_endpoints&&s.unhealthy_endpoints.length>0){var t;let l=(null===(t=s.unhealthy_endpoints[0])||void 0===t?void 0:t.error)||"Health check failed",a=w(l);d(t=>{var s;return{...t,[e]:{status:"unhealthy",lastCheck:r,lastSuccess:(null===(s=t[e])||void 0===s?void 0:s.lastSuccess)||"None",loading:!1,error:a,fullError:l}}})}else d(l=>({...l,[e]:{status:"healthy",lastCheck:r,lastSuccess:r,loading:!1,successResponse:s}}))}catch(a){console.error("Health check failed for ".concat(e,":"),a);let l=new Date().toLocaleString(),t=a instanceof Error?a.message:String(a),s=w(t);d(a=>{var r;return{...a,[e]:{status:"unhealthy",lastCheck:l,lastSuccess:(null===(r=a[e])||void 0===r?void 0:r.lastSuccess)||"None",loading:!1,error:s,fullError:t}}})}});await Promise.allSettled(n);try{if(!l)return;let s=await (0,a.latestHealthChecksCall)(l);s.latest_health_checks&&Object.entries(s.latest_health_checks).forEach(l=>{let[s,a]=l,r=t.data.find(e=>e.model_info.id===s);if(r&&e.includes(r.model_name)&&a){let e=r.model_name,l=a.error_message||void 0;d(t=>{let s=t[e];return{...t,[e]:{status:a.status||(null==s?void 0:s.status)||"unknown",lastCheck:a.checked_at?new Date(a.checked_at).toLocaleString():(null==s?void 0:s.lastCheck)||"None",lastSuccess:"healthy"===a.status&&a.checked_at?new Date(a.checked_at).toLocaleString():(null==s?void 0:s.lastSuccess)||"None",loading:!1,error:l?w(l):null==s?void 0:s.error,fullError:l||(null==s?void 0:s.fullError),successResponse:"healthy"===a.status?a:null==s?void 0:s.successResponse}}})}})}catch(e){console.warn("Failed to fetch updated health statuses from database (non-critical):",e)}},k=e=>{h(e),e?m(r):m([])},S=()=>{p(!1),j(null)},P=()=>{b(!1),N(null)};return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-6",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(W.Z,{children:"Model Health Status"}),(0,s.jsx)(D.Z,{className:"text-gray-600 mt-1",children:"Run health checks on individual models to verify they are working correctly"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[c.length>0&&(0,s.jsx)(E.Z,{size:"sm",variant:"light",onClick:()=>k(!1),className:"px-3 py-1 text-sm",children:"Clear Selection"}),(0,s.jsx)(E.Z,{size:"sm",variant:"secondary",onClick:C,disabled:Object.values(o).some(e=>e.loading),className:"px-3 py-1 text-sm",children:c.length>0&&c.length{l?m(l=>[...l,e]):(m(l=>l.filter(l=>l!==e)),h(!1))},k,Z,e=>{switch(e){case"healthy":return(0,s.jsx)(A.Z,{color:"emerald",children:"healthy"});case"unhealthy":return(0,s.jsx)(A.Z,{color:"red",children:"unhealthy"});case"checking":return(0,s.jsx)(A.Z,{color:"blue",children:"checking"});case"none":return(0,s.jsx)(A.Z,{color:"gray",children:"none"});default:return(0,s.jsx)(A.Z,{color:"gray",children:"unknown"})}},i,(e,l,t)=>{j({modelName:e,cleanedError:l,fullError:t}),p(!0)},(e,l)=>{N({modelName:e,response:l}),b(!0)},n),data:t.data.map(e=>{let l=o[e.model_name]||{status:"none",lastCheck:"None",loading:!1};return{model_name:e.model_name,model_info:e.model_info,provider:e.provider,litellm_model_name:e.litellm_model_name,health_status:l.status,last_check:l.lastCheck,last_success:l.lastSuccess||"None",health_loading:l.loading,health_error:l.error,health_full_error:l.fullError}}),isLoading:!1})}),(0,s.jsx)(ea.Z,{title:g?"Health Check Error - ".concat(g.modelName):"Error Details",open:x,onCancel:S,footer:[(0,s.jsx)(_.ZP,{onClick:S,children:"Close"},"close")],width:800,children:g&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Error:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,s.jsx)(D.Z,{className:"text-red-800",children:g.cleanedError})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Full Error Details:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,s.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:g.fullError})})]})]})}),(0,s.jsx)(ea.Z,{title:y?"Health Check Response - ".concat(y.modelName):"Response Details",open:v,onCancel:P,footer:[(0,s.jsx)(_.ZP,{onClick:P,children:"Close"},"close")],width:800,children:y&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Status:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-green-50 border border-green-200 rounded-md",children:(0,s.jsx)(D.Z,{className:"text-green-800",children:"Health check passed successfully"})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Response Details:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,s.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:JSON.stringify(y.response,null,2)})})]})]})})]})},lR=t(47686),lO=t(77355),lV=t(93416),lq=t(95704),lz=e=>{let{accessToken:l,initialModelGroupAlias:t={},onAliasUpdate:r}=e,[i,n]=(0,f.useState)([]),[o,d]=(0,f.useState)({aliasName:"",targetModelGroup:""}),[c,m]=(0,f.useState)(null),[u,h]=(0,f.useState)(!0);(0,f.useEffect)(()=>{n(Object.entries(t).map((e,l)=>{var t;let[s,a]=e;return{id:"".concat(l,"-").concat(s),aliasName:s,targetModelGroup:"string"==typeof a?a:null!==(t=null==a?void 0:a.model)&&void 0!==t?t:""}}))},[t]);let x=async e=>{if(!l)return console.error("Access token is missing"),!1;try{let t={};return e.forEach(e=>{t[e.aliasName]=e.targetModelGroup}),console.log("Saving model group alias:",t),await (0,a.setCallbacksCall)(l,{router_settings:{model_group_alias:t}}),r&&r(t),!0}catch(e){return console.error("Failed to save model group alias settings:",e),eo.Z.fromBackend("Failed to save model group alias settings"),!1}},p=async()=>{if(!o.aliasName||!o.targetModelGroup){eo.Z.fromBackend("Please provide both alias name and target model group");return}if(i.some(e=>e.aliasName===o.aliasName)){eo.Z.fromBackend("An alias with this name already exists");return}let e=[...i,{id:"".concat(Date.now(),"-").concat(o.aliasName),aliasName:o.aliasName,targetModelGroup:o.targetModelGroup}];await x(e)&&(n(e),d({aliasName:"",targetModelGroup:""}),eo.Z.success("Alias added successfully"))},g=e=>{m({...e})},j=async()=>{if(!c)return;if(!c.aliasName||!c.targetModelGroup){eo.Z.fromBackend("Please provide both alias name and target model group");return}if(i.some(e=>e.id!==c.id&&e.aliasName===c.aliasName)){eo.Z.fromBackend("An alias with this name already exists");return}let e=i.map(e=>e.id===c.id?c:e);await x(e)&&(n(e),m(null),eo.Z.success("Alias updated successfully"))},v=()=>{m(null)},_=async e=>{let l=i.filter(l=>l.id!==e);await x(l)&&(n(l),eo.Z.success("Alias deleted successfully"))},b=i.reduce((e,l)=>(e[l.aliasName]=l.targetModelGroup,e),{});return(0,s.jsxs)(lq.Zb,{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>h(!u),children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)(lq.Dx,{className:"mb-0",children:"Model Group Alias Settings"}),(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"Create aliases for your model groups to simplify API calls. For example, you can create an alias 'gpt-4o' that points to 'gpt-4o-mini-openai' model group."})]}),(0,s.jsx)("div",{className:"flex items-center",children:u?(0,s.jsx)(y.Z,{className:"w-5 h-5 text-gray-500"}):(0,s.jsx)(lR.Z,{className:"w-5 h-5 text-gray-500"})})]}),u&&(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)(lq.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,s.jsx)("input",{type:"text",value:o.aliasName,onChange:e=>d({...o,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model Group"}),(0,s.jsx)("input",{type:"text",value:o.targetModelGroup,onChange:e=>d({...o,targetModelGroup:e.target.value}),placeholder:"e.g., gpt-4o-mini-openai",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,s.jsx)("div",{className:"flex items-end",children:(0,s.jsxs)("button",{onClick:p,disabled:!o.aliasName||!o.targetModelGroup,className:"flex items-center px-4 py-2 rounded-md text-sm ".concat(o.aliasName&&o.targetModelGroup?"bg-green-600 text-white hover:bg-green-700":"bg-gray-300 text-gray-500 cursor-not-allowed"),children:[(0,s.jsx)(lO.Z,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,s.jsx)(lq.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,s.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(lq.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,s.jsx)(lq.ss,{children:(0,s.jsxs)(lq.SC,{children:[(0,s.jsx)(lq.xs,{className:"py-1 h-8",children:"Alias Name"}),(0,s.jsx)(lq.xs,{className:"py-1 h-8",children:"Target Model Group"}),(0,s.jsx)(lq.xs,{className:"py-1 h-8",children:"Actions"})]})}),(0,s.jsxs)(lq.RM,{children:[i.map(e=>(0,s.jsx)(lq.SC,{className:"h-8",children:c&&c.id===e.id?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(lq.pj,{className:"py-0.5",children:(0,s.jsx)("input",{type:"text",value:c.aliasName,onChange:e=>m({...c,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,s.jsx)(lq.pj,{className:"py-0.5",children:(0,s.jsx)("input",{type:"text",value:c.targetModelGroup,onChange:e=>m({...c,targetModelGroup:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,s.jsx)(lq.pj,{className:"py-0.5 whitespace-nowrap",children:(0,s.jsxs)("div",{className:"flex space-x-2",children:[(0,s.jsx)("button",{onClick:j,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,s.jsx)("button",{onClick:v,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(lq.pj,{className:"py-0.5 text-sm text-gray-900",children:e.aliasName}),(0,s.jsx)(lq.pj,{className:"py-0.5 text-sm text-gray-500",children:e.targetModelGroup}),(0,s.jsx)(lq.pj,{className:"py-0.5 whitespace-nowrap",children:(0,s.jsxs)("div",{className:"flex space-x-2",children:[(0,s.jsx)("button",{onClick:()=>g(e),className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,s.jsx)(lV.Z,{className:"w-3 h-3"})}),(0,s.jsx)("button",{onClick:()=>_(e.id),className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,s.jsx)(S.Z,{className:"w-3 h-3"})})]})})]})},e.id)),0===i.length&&(0,s.jsx)(lq.SC,{children:(0,s.jsx)(lq.pj,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),(0,s.jsxs)(lq.Zb,{children:[(0,s.jsx)(lq.Dx,{className:"mb-4",children:"Configuration Example"}),(0,s.jsx)(lq.xv,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config.yaml:"}),(0,s.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,s.jsxs)("div",{className:"text-gray-700",children:["router_settings:",(0,s.jsx)("br",{}),"\xa0\xa0model_group_alias:",0===Object.keys(b).length?(0,s.jsxs)("span",{className:"text-gray-500",children:[(0,s.jsx)("br",{}),"\xa0\xa0\xa0\xa0# No aliases configured yet"]}):Object.entries(b).map(e=>{let[l,t]=e;return(0,s.jsxs)("span",{children:[(0,s.jsx)("br",{}),'\xa0\xa0\xa0\xa0"',l,'": "',t,'"']},l)})]})})]})]})]})},lD=t(10900),lB=t(12514),lG=t(49566),lU=t(30401),lH=t(78867),lK=t(59872),lJ=e=>{let{isVisible:l,onCancel:t,onSuccess:r,modelData:i,accessToken:n,userRole:o}=e,[d]=eg.Z.useForm(),[c,m]=(0,f.useState)(!1),[u,h]=(0,f.useState)([]),[x,p]=(0,f.useState)([]),[g,j]=(0,f.useState)(!1),[v,b]=(0,f.useState)(!1),[y,N]=(0,f.useState)(null);(0,f.useEffect)(()=>{l&&i&&w()},[l,i]),(0,f.useEffect)(()=>{let e=async()=>{if(n)try{let e=await (0,a.modelAvailableCall)(n,"","",!1,null,!0,!0);h(e.data.map(e=>e.id))}catch(e){console.error("Error fetching model access groups:",e)}},t=async()=>{if(n)try{let e=await (0,e1.p)(n);p(e)}catch(e){console.error("Error fetching model info:",e)}};l&&(e(),t())},[l,n]);let w=()=>{try{var e,l,t,s,a,r;let n=null;(null===(e=i.litellm_params)||void 0===e?void 0:e.auto_router_config)&&(n="string"==typeof i.litellm_params.auto_router_config?JSON.parse(i.litellm_params.auto_router_config):i.litellm_params.auto_router_config),N(n),d.setFieldsValue({auto_router_name:i.model_name,auto_router_default_model:(null===(l=i.litellm_params)||void 0===l?void 0:l.auto_router_default_model)||"",auto_router_embedding_model:(null===(t=i.litellm_params)||void 0===t?void 0:t.auto_router_embedding_model)||"",model_access_group:(null===(s=i.model_info)||void 0===s?void 0:s.access_groups)||[]});let o=new Set(x.map(e=>e.model_group));j(!o.has(null===(a=i.litellm_params)||void 0===a?void 0:a.auto_router_default_model)),b(!o.has(null===(r=i.litellm_params)||void 0===r?void 0:r.auto_router_embedding_model))}catch(e){console.error("Error parsing auto router config:",e),eo.Z.fromBackend("Error loading auto router configuration")}},Z=async()=>{try{m(!0);let e=await d.validateFields(),l={...i.litellm_params,auto_router_config:JSON.stringify(y),auto_router_default_model:e.auto_router_default_model,auto_router_embedding_model:e.auto_router_embedding_model||void 0},s={...i.model_info,access_groups:e.model_access_group||[]},o={model_name:e.auto_router_name,litellm_params:l,model_info:s};await (0,a.modelPatchUpdateCall)(n,o,i.model_info.id);let c={...i,model_name:e.auto_router_name,litellm_params:l,model_info:s};eo.Z.success("Auto router configuration updated successfully"),r(c),t()}catch(e){console.error("Error updating auto router:",e),eo.Z.fromBackend("Failed to update auto router configuration")}finally{m(!1)}},C=x.map(e=>({value:e.model_group,label:e.model_group}));return(0,s.jsx)(ea.Z,{title:"Edit Auto Router Configuration",open:l,onCancel:t,footer:[(0,s.jsx)(_.ZP,{onClick:t,children:"Cancel"},"cancel"),(0,s.jsx)(_.ZP,{loading:c,onClick:Z,children:"Save Changes"},"submit")],width:1e3,destroyOnClose:!0,children:(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(eN.x,{className:"text-gray-600",children:"Edit the auto router configuration including routing logic, default models, and access settings."}),(0,s.jsxs)(eg.Z,{form:d,layout:"vertical",className:"space-y-4",children:[(0,s.jsx)(eg.Z.Item,{label:"Auto Router Name",name:"auto_router_name",rules:[{required:!0,message:"Auto router name is required"}],children:(0,s.jsx)(eN.o,{placeholder:"e.g., auto_router_1, smart_routing"})}),(0,s.jsx)("div",{className:"w-full",children:(0,s.jsx)(e9,{modelInfo:x,value:y,onChange:e=>{N(e)}})}),(0,s.jsx)(eg.Z.Item,{label:"Default Model",name:"auto_router_default_model",rules:[{required:!0,message:"Default model is required"}],children:(0,s.jsx)(ev.default,{placeholder:"Select a default model",onChange:e=>{j("custom"===e)},options:[...C,{value:"custom",label:"Enter custom model name"}],showSearch:!0})}),(0,s.jsx)(eg.Z.Item,{label:"Embedding Model",name:"auto_router_embedding_model",children:(0,s.jsx)(ev.default,{placeholder:"Select an embedding model (optional)",onChange:e=>{b("custom"===e)},options:[...C,{value:"custom",label:"Enter custom model name"}],showSearch:!0,allowClear:!0})}),"Admin"===o&&(0,s.jsx)(eg.Z.Item,{label:"Model Access Groups",name:"model_access_group",tooltip:"Control who can access this auto router",children:(0,s.jsx)(ev.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:u.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})]})]})})};let{Title:lW,Link:lY}=Q.default;var l$=e=>{let{isVisible:l,onCancel:t,onAddCredential:a,existingCredential:r,setIsCredentialModalOpen:i}=e,[n]=eg.Z.useForm();return console.log("existingCredential in add credentials tab: ".concat(JSON.stringify(r))),(0,s.jsx)(ea.Z,{title:"Reuse Credentials",visible:l,onCancel:()=>{t(),n.resetFields()},footer:null,width:600,children:(0,s.jsxs)(eg.Z,{form:n,onFinish:e=>{a(e),n.resetFields(),i(!1)},layout:"vertical",children:[(0,s.jsx)(eg.Z.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],initialValue:null==r?void 0:r.credential_name,children:(0,s.jsx)(ej.o,{placeholder:"Enter a friendly name for these credentials"})}),Object.entries((null==r?void 0:r.credential_values)||{}).map(e=>{let[l,t]=e;return(0,s.jsx)(eg.Z.Item,{label:l,name:l,initialValue:t,children:(0,s.jsx)(ej.o,{placeholder:"Enter ".concat(l),disabled:!0})},l)}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(M.Z,{title:"Get help on our github",children:(0,s.jsx)(lY,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(_.ZP,{onClick:()=>{t(),n.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,s.jsx)(_.ZP,{htmlType:"submit",children:"Reuse Credentials"})]})]})]})})};function lX(e){var l,t,r,i,n,o,d,c,h,x,p,g,j,v,b,y,N,w,Z,C,A,P,F,I,V,q,B,G,U,H,J,Y,$;let{modelId:X,onClose:Q,accessToken:ee,userID:el,userRole:et,onModelUpdate:es,modelAccessGroups:er}=e,[ei]=eg.Z.useForm(),[en,ed]=(0,f.useState)(null),[ec,em]=(0,f.useState)(!1),[eu,eh]=(0,f.useState)(!1),[ex,ep]=(0,f.useState)(!1),[ej,e_]=(0,f.useState)(!1),[eb,ey]=(0,f.useState)(!1),[eN,ew]=(0,f.useState)(!1),[eZ,eC]=(0,f.useState)(null),[eS,eA]=(0,f.useState)(!1),[eE,eP]=(0,f.useState)({}),[eM,eL]=(0,f.useState)(!1),[eF,eI]=(0,f.useState)([]),[eT,eR]=(0,f.useState)({}),{data:eV,isLoading:eq}=(0,u.XP)(1,50,void 0,X),{data:eU}=m(),{data:eH}=(0,u.VI)(),eK=e=>null!=eU&&"object"==typeof eU&&e in eU?eU[e].litellm_provider:"openai",eJ=(0,f.useMemo)(()=>(null==eV?void 0:eV.data)&&0!==eV.data.length&&K(eV,eK).data[0]||null,[eV,eU]),eW=("Admin"===et||(null==eJ?void 0:null===(l=eJ.model_info)||void 0===l?void 0:l.created_by)===el)&&(null==eJ?void 0:null===(t=eJ.model_info)||void 0===t?void 0:t.db_model),eY="Admin"===et,e$=(null==eJ?void 0:null===(r=eJ.litellm_params)||void 0===r?void 0:r.auto_router_config)!=null,eX=(null==eJ?void 0:null===(i=eJ.litellm_params)||void 0===i?void 0:i.litellm_credential_name)!=null&&(null==eJ?void 0:null===(n=eJ.litellm_params)||void 0===n?void 0:n.litellm_credential_name)!=void 0;(0,f.useEffect)(()=>{if(eJ&&!en){var e,l,t,s,a,r,i;let n=eJ;n.litellm_model_name||(n={...n,litellm_model_name:null!==(i=null!==(r=null!==(a=null==n?void 0:null===(l=n.litellm_params)||void 0===l?void 0:l.litellm_model_name)&&void 0!==a?a:null==n?void 0:null===(t=n.litellm_params)||void 0===t?void 0:t.model)&&void 0!==r?r:null==n?void 0:null===(s=n.model_info)||void 0===s?void 0:s.key)&&void 0!==i?i:null}),ed(n),(null==n?void 0:null===(e=n.litellm_params)||void 0===e?void 0:e.cache_control_injection_points)&&eA(!0)}},[eJ,en]),(0,f.useEffect)(()=>{let e=async()=>{var e,l,t,s,r,i,n;if(!ee||eJ)return;let o=await (0,a.modelInfoV1Call)(ee,X);console.log("modelInfoResponse, ",o);let d=o.data[0];d&&!d.litellm_model_name&&(d={...d,litellm_model_name:null!==(n=null!==(i=null!==(r=null==d?void 0:null===(l=d.litellm_params)||void 0===l?void 0:l.litellm_model_name)&&void 0!==r?r:null==d?void 0:null===(t=d.litellm_params)||void 0===t?void 0:t.model)&&void 0!==i?i:null==d?void 0:null===(s=d.model_info)||void 0===s?void 0:s.key)&&void 0!==n?n:null}),ed(d),(null==d?void 0:null===(e=d.litellm_params)||void 0===e?void 0:e.cache_control_injection_points)&&eA(!0)},l=async()=>{if(ee)try{let e=(await (0,a.getGuardrailsList)(ee)).guardrails.map(e=>e.guardrail_name);eI(e)}catch(e){console.error("Failed to fetch guardrails:",e)}},t=async()=>{if(ee)try{let e=await (0,a.tagListCall)(ee);eR(e)}catch(e){console.error("Failed to fetch tags:",e)}};(async()=>{if(console.log("accessToken, ",ee),!ee||eX)return;let e=await (0,a.credentialGetCall)(ee,null,X);console.log("existingCredentialResponse, ",e),eC({credential_name:e.credential_name,credential_values:e.credential_values,credential_info:e.credential_info})})(),e(),l(),t()},[ee,X]);let eQ=async e=>{var l;if(console.log("values, ",e),!ee)return;let t={credential_name:e.credential_name,model_id:X,credential_info:{custom_llm_provider:null===(l=en.litellm_params)||void 0===l?void 0:l.custom_llm_provider}};eo.Z.info("Storing credential.."),console.log("credentialResponse, ",await (0,a.credentialCreateCall)(ee,t)),eo.Z.success("Credential stored successfully")},e0=async e=>{try{var l;let t;if(!ee)return;ey(!0),console.log("values.model_name, ",e.model_name);let s={};try{s=e.litellm_extra_params?JSON.parse(e.litellm_extra_params):{}}catch(e){eo.Z.fromBackend("Invalid JSON in LiteLLM Params"),ey(!1);return}let r={...e.litellm_params,...s,model:e.litellm_model_name,api_base:e.api_base,custom_llm_provider:e.custom_llm_provider,organization:e.organization,tpm:e.tpm,rpm:e.rpm,max_retries:e.max_retries,timeout:e.timeout,stream_timeout:e.stream_timeout,input_cost_per_token:e.input_cost/1e6,output_cost_per_token:e.output_cost/1e6,tags:e.tags};e.guardrails&&(r.guardrails=e.guardrails),e.cache_control&&(null===(l=e.cache_control_injection_points)||void 0===l?void 0:l.length)>0?r.cache_control_injection_points=e.cache_control_injection_points:delete r.cache_control_injection_points;try{t=e.model_info?JSON.parse(e.model_info):eJ.model_info,e.model_access_group&&(t={...t,access_groups:e.model_access_group}),void 0!==e.health_check_model&&(t={...t,health_check_model:e.health_check_model})}catch(e){eo.Z.fromBackend("Invalid JSON in Model Info");return}let i={model_name:e.model_name,litellm_params:r,model_info:t};await (0,a.modelPatchUpdateCall)(ee,i,X);let n={...en,model_name:e.model_name,litellm_model_name:e.litellm_model_name,litellm_params:r,model_info:t};ed(n),es&&es(n),eo.Z.success("Model settings updated successfully"),e_(!1),ew(!1)}catch(e){console.error("Error updating model:",e),eo.Z.fromBackend("Failed to update model settings")}finally{ey(!1)}};if(eq)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(E.Z,{icon:lD.Z,variant:"light",onClick:Q,className:"mb-4",children:"Back to Models"}),(0,s.jsx)(D.Z,{children:"Loading..."})]});if(!eJ)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(E.Z,{icon:lD.Z,variant:"light",onClick:Q,className:"mb-4",children:"Back to Models"}),(0,s.jsx)(D.Z,{children:"Model not found"})]});let e1=async()=>{if(ee)try{var e,l,t;eo.Z.info("Testing connection...");let s=await (0,a.testConnectionRequest)(ee,{custom_llm_provider:en.litellm_params.custom_llm_provider,litellm_credential_name:en.litellm_params.litellm_credential_name,model:en.litellm_model_name},{mode:null===(e=en.model_info)||void 0===e?void 0:e.mode},null===(l=en.model_info)||void 0===l?void 0:l.mode);if("success"===s.status)eo.Z.success("Connection test successful!");else throw Error((null==s?void 0:null===(t=s.result)||void 0===t?void 0:t.error)||(null==s?void 0:s.message)||"Unknown error")}catch(e){e instanceof Error?eo.Z.error("Error testing connection: "+(0,lf.aS)(e.message,100)):eo.Z.error("Error testing connection: "+String(e))}},e2=async()=>{try{if(eh(!0),!ee)return;await (0,a.modelDeleteCall)(ee,X),eo.Z.success("Model deleted successfully"),es&&es({deleted:!0,model_info:{id:X}}),Q()}catch(e){console.error("Error deleting the model:",e),eo.Z.fromBackend("Failed to delete model")}finally{eh(!1),em(!1)}},e4=async(e,l)=>{await (0,lK.vQ)(e)&&(eP(e=>({...e,[l]:!0})),setTimeout(()=>{eP(e=>({...e,[l]:!1}))},2e3))},e5=eJ.litellm_model_name.includes("*");return console.log("isWildcardModel, ",e5),(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(E.Z,{icon:lD.Z,variant:"light",onClick:Q,className:"mb-4",children:"Back to Models"}),(0,s.jsxs)(W.Z,{children:["Public Model Name: ",T(eJ)]}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(D.Z,{className:"text-gray-500 font-mono",children:eJ.model_info.id}),(0,s.jsx)(_.ZP,{type:"text",size:"small",icon:eE["model-id"]?(0,s.jsx)(lU.Z,{size:12}):(0,s.jsx)(lH.Z,{size:12}),onClick:()=>e4(eJ.model_info.id,"model-id"),className:"left-2 z-10 transition-all duration-200 ".concat(eE["model-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(E.Z,{variant:"secondary",icon:eO.Z,onClick:e1,className:"flex items-center gap-2","data-testid":"test-connection-button",children:"Test Connection"}),(0,s.jsx)(E.Z,{icon:k.Z,variant:"secondary",onClick:()=>ep(!0),className:"flex items-center",disabled:!eY,"data-testid":"reuse-credentials-button",children:"Re-use Credentials"}),(0,s.jsx)(E.Z,{icon:S.Z,variant:"secondary",onClick:()=>em(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-700",disabled:!eW,"data-testid":"delete-model-button",children:"Delete Model"})]})]}),(0,s.jsxs)(eD.Z,{children:[(0,s.jsxs)(eB.Z,{className:"mb-6",children:[(0,s.jsx)(ez.Z,{children:"Overview"}),(0,s.jsx)(ez.Z,{children:"Raw JSON"})]}),(0,s.jsxs)(eG.Z,{children:[(0,s.jsxs)(z.Z,{children:[(0,s.jsxs)(O.Z,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6 mb-6",children:[(0,s.jsxs)(lB.Z,{children:[(0,s.jsx)(D.Z,{children:"Provider"}),(0,s.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[eJ.provider&&(0,s.jsx)("img",{src:(0,L.dr)(eJ.provider).logo,alt:"".concat(eJ.provider," logo"),className:"w-4 h-4",onError:e=>{let l=e.currentTarget,t=l.parentElement;if(t&&t.contains(l))try{var s;let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=(null===(s=eJ.provider)||void 0===s?void 0:s.charAt(0))||"-",t.replaceChild(e,l)}catch(e){console.error("Failed to replace provider logo fallback:",e)}}}),(0,s.jsx)(W.Z,{children:eJ.provider||"Not Set"})]})]}),(0,s.jsxs)(lB.Z,{children:[(0,s.jsx)(D.Z,{children:"LiteLLM Model"}),(0,s.jsx)("div",{className:"mt-2 overflow-hidden",children:(0,s.jsx)(M.Z,{title:eJ.litellm_model_name||"Not Set",children:(0,s.jsx)("div",{className:"break-all text-sm font-medium leading-relaxed cursor-pointer",children:eJ.litellm_model_name||"Not Set"})})})]}),(0,s.jsxs)(lB.Z,{children:[(0,s.jsx)(D.Z,{children:"Pricing"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(D.Z,{children:["Input: $",eJ.input_cost,"/1M tokens"]}),(0,s.jsxs)(D.Z,{children:["Output: $",eJ.output_cost,"/1M tokens"]})]})]})]}),(0,s.jsxs)("div",{className:"mb-6 text-sm text-gray-500 flex items-center gap-x-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Created At"," ",eJ.model_info.created_at?new Date(eJ.model_info.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"Not Set"]}),(0,s.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})}),"Created By ",eJ.model_info.created_by||"Not Set"]})]}),(0,s.jsxs)(lB.Z,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(W.Z,{children:"Model Settings"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[e$&&eW&&!eN&&(0,s.jsx)(E.Z,{onClick:()=>eL(!0),className:"flex items-center",children:"Edit Auto Router"}),eW?!eN&&(0,s.jsx)(E.Z,{onClick:()=>ew(!0),className:"flex items-center",children:"Edit Settings"}):(0,s.jsx)(M.Z,{title:"Only DB models can be edited. You must be an admin or the creator of the model to edit it.",children:(0,s.jsx)(R.Z,{})})]})]}),en?(0,s.jsx)(eg.Z,{form:ei,onFinish:e0,initialValues:{model_name:en.model_name,litellm_model_name:en.litellm_model_name,api_base:en.litellm_params.api_base,custom_llm_provider:en.litellm_params.custom_llm_provider,organization:en.litellm_params.organization,tpm:en.litellm_params.tpm,rpm:en.litellm_params.rpm,max_retries:en.litellm_params.max_retries,timeout:en.litellm_params.timeout,stream_timeout:en.litellm_params.stream_timeout,input_cost:en.litellm_params.input_cost_per_token?1e6*en.litellm_params.input_cost_per_token:(null===(o=en.model_info)||void 0===o?void 0:o.input_cost_per_token)*1e6||null,output_cost:(null===(d=en.litellm_params)||void 0===d?void 0:d.output_cost_per_token)?1e6*en.litellm_params.output_cost_per_token:(null===(c=en.model_info)||void 0===c?void 0:c.output_cost_per_token)*1e6||null,cache_control:null!==(h=en.litellm_params)&&void 0!==h&&!!h.cache_control_injection_points,cache_control_injection_points:(null===(x=en.litellm_params)||void 0===x?void 0:x.cache_control_injection_points)||[],model_access_group:Array.isArray(null===(p=en.model_info)||void 0===p?void 0:p.access_groups)?en.model_info.access_groups:[],guardrails:Array.isArray(null===(g=en.litellm_params)||void 0===g?void 0:g.guardrails)?en.litellm_params.guardrails:[],tags:Array.isArray(null===(j=en.litellm_params)||void 0===j?void 0:j.tags)?en.litellm_params.tags:[],health_check_model:e5?null===(v=en.model_info)||void 0===v?void 0:v.health_check_model:null,litellm_extra_params:JSON.stringify(en.litellm_params||{},null,2)},layout:"vertical",onValuesChange:()=>e_(!0),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Model Name"}),eN?(0,s.jsx)(eg.Z.Item,{name:"model_name",className:"mb-0",children:(0,s.jsx)(lG.Z,{placeholder:"Enter model name"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:en.model_name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"LiteLLM Model Name"}),eN?(0,s.jsx)(eg.Z.Item,{name:"litellm_model_name",className:"mb-0",children:(0,s.jsx)(lG.Z,{placeholder:"Enter LiteLLM model name"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:en.litellm_model_name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Input Cost (per 1M tokens)"}),eN?(0,s.jsx)(eg.Z.Item,{name:"input_cost",className:"mb-0",children:(0,s.jsx)(lx.Z,{placeholder:"Enter input cost"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null==en?void 0:null===(b=en.litellm_params)||void 0===b?void 0:b.input_cost_per_token)?((null===(y=en.litellm_params)||void 0===y?void 0:y.input_cost_per_token)*1e6).toFixed(4):(null==en?void 0:null===(N=en.model_info)||void 0===N?void 0:N.input_cost_per_token)?(1e6*en.model_info.input_cost_per_token).toFixed(4):null})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Output Cost (per 1M tokens)"}),eN?(0,s.jsx)(eg.Z.Item,{name:"output_cost",className:"mb-0",children:(0,s.jsx)(lx.Z,{placeholder:"Enter output cost"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null==en?void 0:null===(w=en.litellm_params)||void 0===w?void 0:w.output_cost_per_token)?(1e6*en.litellm_params.output_cost_per_token).toFixed(4):(null==en?void 0:null===(Z=en.model_info)||void 0===Z?void 0:Z.output_cost_per_token)?(1e6*en.model_info.output_cost_per_token).toFixed(4):null})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"API Base"}),eN?(0,s.jsx)(eg.Z.Item,{name:"api_base",className:"mb-0",children:(0,s.jsx)(lG.Z,{placeholder:"Enter API base"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(C=en.litellm_params)||void 0===C?void 0:C.api_base)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Custom LLM Provider"}),eN?(0,s.jsx)(eg.Z.Item,{name:"custom_llm_provider",className:"mb-0",children:(0,s.jsx)(lG.Z,{placeholder:"Enter custom LLM provider"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(A=en.litellm_params)||void 0===A?void 0:A.custom_llm_provider)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Organization"}),eN?(0,s.jsx)(eg.Z.Item,{name:"organization",className:"mb-0",children:(0,s.jsx)(lG.Z,{placeholder:"Enter organization"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(P=en.litellm_params)||void 0===P?void 0:P.organization)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"TPM (Tokens per Minute)"}),eN?(0,s.jsx)(eg.Z.Item,{name:"tpm",className:"mb-0",children:(0,s.jsx)(lx.Z,{placeholder:"Enter TPM"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(F=en.litellm_params)||void 0===F?void 0:F.tpm)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"RPM (Requests per Minute)"}),eN?(0,s.jsx)(eg.Z.Item,{name:"rpm",className:"mb-0",children:(0,s.jsx)(lx.Z,{placeholder:"Enter RPM"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(I=en.litellm_params)||void 0===I?void 0:I.rpm)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Max Retries"}),eN?(0,s.jsx)(eg.Z.Item,{name:"max_retries",className:"mb-0",children:(0,s.jsx)(lx.Z,{placeholder:"Enter max retries"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(V=en.litellm_params)||void 0===V?void 0:V.max_retries)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Timeout (seconds)"}),eN?(0,s.jsx)(eg.Z.Item,{name:"timeout",className:"mb-0",children:(0,s.jsx)(lx.Z,{placeholder:"Enter timeout"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(q=en.litellm_params)||void 0===q?void 0:q.timeout)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Stream Timeout (seconds)"}),eN?(0,s.jsx)(eg.Z.Item,{name:"stream_timeout",className:"mb-0",children:(0,s.jsx)(lx.Z,{placeholder:"Enter stream timeout"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(B=en.litellm_params)||void 0===B?void 0:B.stream_timeout)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Model Access Groups"}),eN?(0,s.jsx)(eg.Z.Item,{name:"model_access_group",className:"mb-0",children:(0,s.jsx)(ev.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:null==er?void 0:er.map(e=>({value:e,label:e}))})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(G=en.model_info)||void 0===G?void 0:G.access_groups)?Array.isArray(en.model_info.access_groups)?en.model_info.access_groups.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:en.model_info.access_groups.map((e,l)=>(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:e},l))}):"No groups assigned":en.model_info.access_groups:"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(D.Z,{className:"font-medium",children:["Guardrails",(0,s.jsx)(M.Z,{title:"Apply safety guardrails to this model to filter content or enforce policies",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(R.Z,{style:{marginLeft:"4px"}})})})]}),eN?(0,s.jsx)(eg.Z.Item,{name:"guardrails",className:"mb-0",children:(0,s.jsx)(ev.default,{mode:"tags",showSearch:!0,placeholder:"Select existing guardrails or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:eF.map(e=>({value:e,label:e}))})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(U=en.litellm_params)||void 0===U?void 0:U.guardrails)?Array.isArray(en.litellm_params.guardrails)?en.litellm_params.guardrails.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:en.litellm_params.guardrails.map((e,l)=>(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:e},l))}):"No guardrails assigned":en.litellm_params.guardrails:"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Tags"}),eN?(0,s.jsx)(eg.Z.Item,{name:"tags",className:"mb-0",children:(0,s.jsx)(ev.default,{mode:"tags",showSearch:!0,placeholder:"Select existing tags or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:Object.values(eT).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(H=en.litellm_params)||void 0===H?void 0:H.tags)?Array.isArray(en.litellm_params.tags)?en.litellm_params.tags.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:en.litellm_params.tags.map((e,l)=>(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-purple-100 text-purple-800",children:e},l))}):"No tags assigned":en.litellm_params.tags:"Not Set"})]}),e5&&(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Health Check Model"}),eN?(0,s.jsx)(eg.Z.Item,{name:"health_check_model",className:"mb-0",children:(0,s.jsx)(ev.default,{showSearch:!0,placeholder:"Select existing health check model",optionFilterProp:"children",allowClear:!0,options:(()=>{var e;let l=eJ.litellm_model_name.split("/")[0];return(null==eH?void 0:null===(e=eH.data)||void 0===e?void 0:e.filter(e=>{var t;return(null===(t=e.providers)||void 0===t?void 0:t.includes(l))&&e.model_group!==eJ.litellm_model_name}).map(e=>({value:e.model_group,label:e.model_group})))||[]})()})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(J=en.model_info)||void 0===J?void 0:J.health_check_model)||"Not Set"})]}),eN?(0,s.jsx)(lg,{form:ei,showCacheControl:eS,onCacheControlChange:e=>eA(e)}):(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Cache Control"}),(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(Y=en.litellm_params)||void 0===Y?void 0:Y.cache_control_injection_points)?(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:"Enabled"}),(0,s.jsx)("div",{className:"mt-2",children:en.litellm_params.cache_control_injection_points.map((e,l)=>(0,s.jsxs)("div",{className:"text-sm text-gray-600 mb-1",children:["Location: ",e.location,",",e.role&&(0,s.jsxs)("span",{children:[" Role: ",e.role]}),void 0!==e.index&&(0,s.jsxs)("span",{children:[" Index: ",e.index]})]},l))})]}):"Disabled"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Model Info"}),eN?(0,s.jsx)(eg.Z.Item,{name:"model_info",className:"mb-0",children:(0,s.jsx)(ek.default.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}',defaultValue:JSON.stringify(eJ.model_info,null,2)})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(en.model_info,null,2)})})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(D.Z,{className:"font-medium",children:["LiteLLM Params",(0,s.jsx)(M.Z,{title:"Optional litellm params used for making a litellm.completion() call. Some params are automatically added by LiteLLM.",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(R.Z,{style:{marginLeft:"4px"}})})})]}),eN?(0,s.jsx)(eg.Z.Item,{name:"litellm_extra_params",rules:[{validator:lf.Ac}],children:(0,s.jsx)(ek.default.TextArea,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(en.litellm_params,null,2)})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(D.Z,{className:"font-medium",children:"Team ID"}),(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:eJ.model_info.team_id||"Not Set"})]})]}),eN&&(0,s.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,s.jsx)(E.Z,{variant:"secondary",onClick:()=>{ei.resetFields(),e_(!1),ew(!1)},disabled:eb,children:"Cancel"}),(0,s.jsx)(E.Z,{variant:"primary",onClick:()=>ei.submit(),loading:eb,children:"Save Changes"})]})]})}):(0,s.jsx)(D.Z,{children:"Loading..."})]})]}),(0,s.jsx)(z.Z,{children:(0,s.jsx)(lB.Z,{children:(0,s.jsx)("pre",{className:"bg-gray-100 p-4 rounded text-xs overflow-auto",children:JSON.stringify(eJ,null,2)})})})]})]}),(0,s.jsx)(ef.Z,{isOpen:ec,title:"Delete Model",alertMessage:"This action cannot be undone.",message:"Are you sure you want to delete this model?",resourceInformationTitle:"Model Information",resourceInformation:[{label:"Model Name",value:(null==eJ?void 0:eJ.model_name)||"Not Set"},{label:"LiteLLM Model Name",value:(null==eJ?void 0:eJ.litellm_model_name)||"Not Set"},{label:"Provider",value:(null==eJ?void 0:eJ.provider)||"Not Set"},{label:"Created By",value:(null==eJ?void 0:null===($=eJ.model_info)||void 0===$?void 0:$.created_by)||"Not Set"}],onCancel:()=>em(!1),onOk:e2,confirmLoading:eu}),ex&&!eX?(0,s.jsx)(l$,{isVisible:ex,onCancel:()=>ep(!1),onAddCredential:eQ,existingCredential:eZ,setIsCredentialModalOpen:ep}):(0,s.jsx)(ea.Z,{open:ex,onCancel:()=>ep(!1),title:"Using Existing Credential",children:(0,s.jsx)(D.Z,{children:eJ.litellm_params.litellm_credential_name})}),(0,s.jsx)(lJ,{isVisible:eM,onCancel:()=>eL(!1),onSuccess:e=>{ed(e),es&&es(e)},modelData:en||eJ,accessToken:ee||"",userRole:et||""})]})}var lQ=t(27593),l0=t(56147),l1=e=>{var l;let{premiumUser:t,teams:r}=e,{accessToken:i,token:o,userRole:c,userId:x}=(0,n.Z)(),[p]=eg.Z.useForm(),[g,j]=(0,f.useState)(""),[v,_]=(0,f.useState)([]),[b,y]=(0,f.useState)(L.Cl.Anthropic),[N,w]=(0,f.useState)(null),[Z,C]=(0,f.useState)(null),[k,S]=(0,f.useState)(null),[A,E]=(0,f.useState)(0),[M,F]=(0,f.useState)({}),[I,R]=(0,f.useState)(!1),[V,q]=(0,f.useState)(null),[B,G]=(0,f.useState)(null),[U,H]=(0,f.useState)(0),W=(0,eV.NL)(),{data:Y,isLoading:$,refetch:ee}=(0,u.XP)(),{data:el,isLoading:et}=m(),{data:es,isLoading:ea}=d(),er=(null==es?void 0:es.credentials)||[],{data:ei,isLoading:en}=(0,h.L)(),ed=(0,f.useMemo)(()=>{if(!(null==Y?void 0:Y.data))return[];let e=new Set;for(let l of Y.data)e.add(l.model_name);return Array.from(e).sort()},[null==Y?void 0:Y.data]),ec=(0,f.useMemo)(()=>{if(!(null==Y?void 0:Y.data))return[];let e=new Set;for(let l of Y.data){let t=l.model_info;if(null==t?void 0:t.access_groups)for(let l of t.access_groups)e.add(l)}return Array.from(e)},[null==Y?void 0:Y.data]),eu=(0,f.useMemo)(()=>(null==Y?void 0:Y.data)?Y.data.map(e=>e.model_name):[],[null==Y?void 0:Y.data]),ex=e=>null!=el&&"object"==typeof el&&e in el?el[e].litellm_provider:"openai",ep=(0,f.useMemo)(()=>(null==Y?void 0:Y.data)?K(Y,ex):{data:[]},[null==Y?void 0:Y.data,ex]),ef=c&&(0,eR.P4)(c),ej=c&&eR.lo.includes(c),ev=x&&(0,eR.yV)(r,x),e_=ej&&(null==ei?void 0:null===(l=ei.values)||void 0===l?void 0:l.disable_model_add_for_internal_users)===!0,eb=!ef&&(e_||!ev),ey={name:"file",accept:".json",pastable:!1,beforeUpload:e=>{if("application/json"===e.type){let l=new FileReader;l.onload=e=>{if(e.target){let l=e.target.result;p.setFieldsValue({vertex_credentials:l})}},l.readAsText(e)}return!1},onChange(e){"done"===e.file.status?eo.Z.success("".concat(e.file.name," file uploaded successfully")):"error"===e.file.status&&eo.Z.fromBackend("".concat(e.file.name," file upload failed."))}},eN=()=>{j(new Date().toLocaleString()),W.invalidateQueries({queryKey:["models","list"]}),ee()},ew=async()=>{if(i)try{let e={router_settings:{}};"global"===N?(k&&(e.router_settings.retry_policy=k),eo.Z.success("Global retry settings saved successfully")):(Z&&(e.router_settings.model_group_retry_policy=Z),eo.Z.success("Retry settings saved successfully for ".concat(N))),await (0,a.setCallbacksCall)(i,e)}catch(e){eo.Z.fromBackend("Failed to save retry settings")}};if((0,f.useEffect)(()=>{if(!i||!o||!c||!x||!Y)return;let e=async()=>{try{let e=(await (0,a.getCallbacksCall)(i,x,c)).router_settings,l=e.model_group_retry_policy,t=e.num_retries;C(l),S(e.retry_policy),E(t);let s=e.model_group_alias||{};F(s)}catch(e){console.error("Error fetching model data:",e)}};i&&o&&c&&x&&Y&&e()},[i,o,c,x,Y]),c&&"Admin Viewer"==c){let{Title:e,Paragraph:l}=Q.default;return(0,s.jsxs)("div",{children:[(0,s.jsx)(e,{level:1,children:"Access Denied"}),(0,s.jsx)(l,{children:"Ask your proxy admin for access to view all models"})]})}let eZ=async()=>{try{let e=await p.validateFields();await eh(e,i,p,eN)}catch(t){var e;let l=(null===(e=t.errorFields)||void 0===e?void 0:e.map(e=>"".concat(e.name.join("."),": ").concat(e.errors.join(", "))).join(" | "))||"Unknown validation error";eo.Z.fromBackend("Please fill in the following required fields: ".concat(l))}};return(Object.keys(L.Cl).find(e=>L.Cl[e]===b),B)?(0,s.jsx)("div",{className:"w-full h-full",children:(0,s.jsx)(l0.Z,{teamId:B,onClose:()=>G(null),accessToken:i,is_team_admin:"Admin"===c,is_proxy_admin:"Proxy Admin"===c,userModels:eu,editTeam:!1,onUpdate:eN,premiumUser:t})}):(0,s.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,s.jsx)(O.Z,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,s.jsxs)(eq.Z,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Model Management"}),eR.ZL.includes(c)?(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"Add and manage models for the proxy"}):(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"Add models for teams you are an admin for."})]})}),(0,s.jsxs)("div",{className:"mb-4 px-4 py-3 bg-blue-50 rounded-lg border border-blue-100 flex items-center gap-4",children:[(0,s.jsx)("div",{className:"flex-shrink-0 w-10 h-10 bg-white rounded-full flex items-center justify-center border border-blue-200",children:(0,s.jsx)(eU.Z,{style:{fontSize:"18px",color:"#6366f1"}})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("h4",{className:"text-gray-900 font-semibold text-sm m-0",children:"Missing a provider?"}),(0,s.jsx)("p",{className:"text-gray-500 text-xs m-0 mt-0.5",children:"The LiteLLM engineering team is constantly adding support for new LLM models, providers, endpoints. If you don't see the one you need, let us know and we'll prioritize it."})]}),(0,s.jsxs)("a",{href:"https://models.litellm.ai/?request=true",target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0 inline-flex items-center gap-2 px-4 py-2 bg-[#6366f1] hover:bg-[#5558e3] text-white text-sm font-medium rounded-lg transition-colors",children:["Request Provider",(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})]}),V&&!($||et||ea||en)?(0,s.jsx)(lX,{modelId:V,onClose:()=>{q(null)},accessToken:i,userID:x,userRole:c,onModelUpdate:e=>{W.invalidateQueries({queryKey:["models","list"]}),eN()},modelAccessGroups:ec}):(0,s.jsxs)(eD.Z,{index:U,onIndexChange:H,className:"gap-2 h-[75vh] w-full ",children:[(0,s.jsxs)(eB.Z,{className:"flex justify-between mt-2 w-full items-center",children:[(0,s.jsxs)("div",{className:"flex",children:[eR.ZL.includes(c)?(0,s.jsx)(ez.Z,{children:"All Models"}):(0,s.jsx)(ez.Z,{children:"Your Models"}),!eb&&(0,s.jsx)(ez.Z,{children:"Add Model"}),eR.ZL.includes(c)&&(0,s.jsx)(ez.Z,{children:"LLM Credentials"}),eR.ZL.includes(c)&&(0,s.jsx)(ez.Z,{children:"Pass-Through Endpoints"}),eR.ZL.includes(c)&&(0,s.jsx)(ez.Z,{children:"Health Status"}),eR.ZL.includes(c)&&(0,s.jsx)(ez.Z,{children:"Model Retry Settings"}),eR.ZL.includes(c)&&(0,s.jsx)(ez.Z,{children:"Model Group Alias"}),eR.ZL.includes(c)&&(0,s.jsx)(ez.Z,{children:"Price Data Reload"})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[g&&(0,s.jsxs)(D.Z,{children:["Last Refreshed: ",g]}),(0,s.jsx)(P.Z,{icon:eO.Z,variant:"shadow",size:"xs",className:"self-center",onClick:eN})]})]}),(0,s.jsxs)(eG.Z,{children:[(0,s.jsx)(J,{selectedModelGroup:N,setSelectedModelGroup:w,availableModelGroups:ed,availableModelAccessGroups:ec,setSelectedModelId:q,setSelectedTeamId:G}),!eb&&(0,s.jsx)(z.Z,{className:"h-full",children:(0,s.jsx)(lA,{form:p,handleOk:eZ,selectedProvider:b,setSelectedProvider:y,providerModels:v,setProviderModelsFn:e=>{_((0,L.bK)(e,el))},getPlaceholder:L.ph,uploadProps:ey,showAdvancedSettings:I,setShowAdvancedSettings:R,teams:r,credentials:er,accessToken:i,userRole:c})}),(0,s.jsx)(z.Z,{children:(0,s.jsx)(eT,{uploadProps:ey})}),(0,s.jsx)(z.Z,{children:(0,s.jsx)(lQ.Z,{accessToken:i,userRole:c,userID:x,modelData:ep,premiumUser:t})}),(0,s.jsx)(z.Z,{children:(0,s.jsx)(lT,{accessToken:i,modelData:ep,all_models_on_proxy:eu,getDisplayModelName:T,setSelectedModelId:q})}),(0,s.jsx)(X,{selectedModelGroup:N,setSelectedModelGroup:w,availableModelGroups:ed,globalRetryPolicy:k,setGlobalRetryPolicy:S,defaultRetry:A,modelGroupRetryPolicy:Z,setModelGroupRetryPolicy:C,handleSaveRetrySettings:ew}),(0,s.jsx)(z.Z,{children:(0,s.jsx)(lz,{accessToken:i,initialModelGroupAlias:M,onAliasUpdate:F})}),(0,s.jsx)(em,{})]})]})]})})})}},27593:function(e,l,t){t.d(l,{Z:function(){return Y}});var s=t(57437),a=t(2265),r=t(78489),i=t(47323),n=t(84264),o=t(96761),d=t(19250),c=t(99981),m=t(33866),u=t(15731),h=t(53410),x=t(74998),p=t(59341),g=t(49566),f=t(12514),j=t(97765),v=t(37592),_=t(10032),b=t(22116),y=t(51653),N=t(24199),w=t(12660),Z=t(15424),C=t(58760),k=t(5545),S=t(45246),A=t(96473),E=t(31283),P=e=>{let{value:l={},onChange:t}=e,[r,i]=(0,a.useState)(Object.entries(l)),n=e=>{let l=r.filter((l,t)=>t!==e);i(l),null==t||t(Object.fromEntries(l))},o=(e,l,s)=>{let a=[...r];a[e]=[l,s],i(a),null==t||t(Object.fromEntries(a))};return(0,s.jsxs)("div",{children:[r.map((e,l)=>{let[t,a]=e;return(0,s.jsxs)(C.Z,{style:{display:"flex",marginBottom:8},align:"center",children:[(0,s.jsx)(E.o,{placeholder:"Header Name",value:t,onChange:e=>o(l,e.target.value,a)}),(0,s.jsx)(E.o,{placeholder:"Header Value",value:a,onChange:e=>o(l,t,e.target.value)}),(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,s.jsx)(S.Z,{onClick:()=>n(l),style:{cursor:"pointer"}})})]},l)}),(0,s.jsx)(k.ZP,{type:"dashed",onClick:()=>{i([...r,["",""]])},icon:(0,s.jsx)(A.Z,{}),children:"Add Header"})]})},M=t(77565),L=e=>{let{pathValue:l,targetValue:t,includeSubpath:a}=e,r=(0,d.getProxyBaseUrl)();return l&&t?(0,s.jsxs)(f.Z,{className:"p-5",children:[(0,s.jsx)(o.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Preview"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-5",children:"How your requests will be routed"}),(0,s.jsxs)("div",{className:"space-y-5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"Basic routing:"}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint"}),(0,s.jsx)("code",{className:"font-mono text-sm text-gray-900",children:l?"".concat(r).concat(l):""})]}),(0,s.jsx)("div",{className:"text-gray-400",children:(0,s.jsx)(M.Z,{className:"text-lg"})}),(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,s.jsx)("code",{className:"font-mono text-sm text-gray-900",children:t})]})]})]}),a&&(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"With subpaths:"}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint + subpath"}),(0,s.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[l&&"".concat(r).concat(l),(0,s.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]}),(0,s.jsx)("div",{className:"text-gray-400",children:(0,s.jsx)(M.Z,{className:"text-lg"})}),(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,s.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[t,(0,s.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]})]}),(0,s.jsxs)("div",{className:"mt-3 text-sm text-gray-600",children:["Any path after ",l," will be appended to the target URL"]})]})}),!a&&(0,s.jsx)("div",{className:"mt-4 p-3 bg-blue-50 rounded-md border border-blue-200",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)(Z.Z,{className:"text-blue-500 mt-0.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{className:"text-sm text-blue-700",children:[(0,s.jsx)("span",{className:"font-medium",children:"Not seeing the routing you wanted?"})," Try enabling - Include Subpaths - above - this allows subroutes like"," ",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded font-mono text-xs",children:"/api/v1/models"})," to be forwarded automatically."]})]})})]})]}):null},F=t(9114),I=t(63709),T=e=>{let{premiumUser:l,authEnabled:t,onAuthChange:a}=e;return(0,s.jsxs)(f.Z,{className:"p-6",children:[(0,s.jsx)(o.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Security"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-4",children:"When enabled, requests to this endpoint will require a valid LiteLLM Virtual Key"}),l?(0,s.jsx)(_.Z.Item,{name:"auth",valuePropName:"checked",className:"mb-0",children:(0,s.jsx)(I.Z,{checked:t,onChange:e=>{a(e)}})}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center mb-3",children:[(0,s.jsx)(I.Z,{disabled:!0,checked:!1,style:{outline:"2px solid #d1d5db",outlineOffset:"2px"}}),(0,s.jsx)("span",{className:"ml-2 text-sm text-gray-400",children:"Authentication (Premium)"})]}),(0,s.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,s.jsxs)(n.Z,{className:"text-sm text-yellow-800",children:["Setting authentication for pass-through endpoints is a LiteLLM Enterprise feature. Get a trial key"," ",(0,s.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})]})},R=t(67479),O=e=>{let{accessToken:l,value:t={},onChange:r,disabled:i=!1}=e,[n,d]=(0,a.useState)(Object.keys(t)),[m,u]=(0,a.useState)(t);(0,a.useEffect)(()=>{u(t),d(Object.keys(t))},[t]);let h=(e,l,t)=>{var s,a;let i=m[e]||{},n={...m,[e]:{...i,[l]:t.length>0?t:void 0}};(null===(s=n[e])||void 0===s?void 0:s.request_fields)||(null===(a=n[e])||void 0===a?void 0:a.response_fields)||(n[e]=null),u(n),r&&r(n)};return(0,s.jsxs)(f.Z,{className:"p-6",children:[(0,s.jsx)(o.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Guardrails"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-6",children:"Configure guardrails to enforce policies on requests and responses. Guardrails are opt-in for passthrough endpoints."}),(0,s.jsx)(y.Z,{message:(0,s.jsxs)("span",{children:["Field-Level Targeting"," ",(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through_guardrails#field-level-targeting",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"(Learn More)"})]}),description:(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("div",{children:"Optionally specify which fields to check. If left empty, the entire request/response is sent to the guardrail."}),(0,s.jsxs)("div",{className:"text-xs space-y-1 mt-2",children:[(0,s.jsx)("div",{className:"font-medium",children:"Common Examples:"}),(0,s.jsxs)("div",{children:["• ",(0,s.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"query"})," - Single field"]}),(0,s.jsxs)("div",{children:["• ",(0,s.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"documents[*].text"})," - All text in documents array"]}),(0,s.jsxs)("div",{children:["• ",(0,s.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"messages[*].content"})," - All message contents"]})]})]}),type:"info",showIcon:!0,className:"mb-4"}),(0,s.jsx)(_.Z.Item,{label:(0,s.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Select Guardrails",(0,s.jsx)(c.Z,{title:"Choose which guardrails should run on this endpoint. Org/team/key level guardrails will also be included.",children:(0,s.jsx)(Z.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),children:(0,s.jsx)(R.Z,{accessToken:l,value:n,onChange:e=>{d(e);let l={};e.forEach(e=>{l[e]=m[e]||null}),u(l),r&&r(l)},disabled:i})}),n.length>0&&(0,s.jsxs)("div",{className:"mt-6 space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Field Targeting (Optional)"}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"\uD83D\uDCA1 Tip: Leave empty to check entire payload"})]}),n.map(e=>{var l,t;return(0,s.jsxs)(f.Z,{className:"p-4 bg-gray-50",children:[(0,s.jsx)("div",{className:"text-sm font-medium text-gray-900 mb-3",children:e}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,s.jsxs)("label",{className:"text-xs text-gray-600 flex items-center",children:["Request Fields (pre_call)",(0,s.jsx)(c.Z,{title:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-medium mb-1",children:"Specify which request fields to check"}),(0,s.jsxs)("div",{className:"text-xs space-y-1",children:[(0,s.jsx)("div",{children:"Examples:"}),(0,s.jsx)("div",{children:"• query"}),(0,s.jsx)("div",{children:"• documents[*].text"}),(0,s.jsx)("div",{children:"• messages[*].content"})]})]}),children:(0,s.jsx)(Z.Z,{className:"ml-1 text-gray-400"})})]}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)("button",{type:"button",onClick:()=>{var l;let t=(null===(l=m[e])||void 0===l?void 0:l.request_fields)||[];h(e,"request_fields",[...t,"query"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:i,children:"+ query"}),(0,s.jsx)("button",{type:"button",onClick:()=>{var l;let t=(null===(l=m[e])||void 0===l?void 0:l.request_fields)||[];h(e,"request_fields",[...t,"documents[*]"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:i,children:"+ documents[*]"})]})]}),(0,s.jsx)(v.default,{mode:"tags",style:{width:"100%"},placeholder:"Type field name or use + buttons above (e.g., query, documents[*].text)",value:(null===(l=m[e])||void 0===l?void 0:l.request_fields)||[],onChange:l=>h(e,"request_fields",l),disabled:i,tokenSeparators:[","]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,s.jsxs)("label",{className:"text-xs text-gray-600 flex items-center",children:["Response Fields (post_call)",(0,s.jsx)(c.Z,{title:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-medium mb-1",children:"Specify which response fields to check"}),(0,s.jsxs)("div",{className:"text-xs space-y-1",children:[(0,s.jsx)("div",{children:"Examples:"}),(0,s.jsx)("div",{children:"• results[*].text"}),(0,s.jsx)("div",{children:"• choices[*].message.content"})]})]}),children:(0,s.jsx)(Z.Z,{className:"ml-1 text-gray-400"})})]}),(0,s.jsx)("div",{className:"flex gap-1",children:(0,s.jsx)("button",{type:"button",onClick:()=>{var l;let t=(null===(l=m[e])||void 0===l?void 0:l.response_fields)||[];h(e,"response_fields",[...t,"results[*]"])},className:"text-xs px-2 py-1 bg-white border border-gray-300 rounded hover:bg-gray-50",disabled:i,children:"+ results[*]"})})]}),(0,s.jsx)(v.default,{mode:"tags",style:{width:"100%"},placeholder:"Type field name or use + buttons above (e.g., results[*].text)",value:(null===(t=m[e])||void 0===t?void 0:t.response_fields)||[],onChange:l=>h(e,"response_fields",l),disabled:i,tokenSeparators:[","]})]})]})]},e)})]})]})};let{Option:V}=v.default;var q=e=>{let{accessToken:l,setPassThroughItems:t,passThroughItems:i,premiumUser:n=!1}=e,[m]=_.Z.useForm(),[u,h]=(0,a.useState)(!1),[x,v]=(0,a.useState)(!1),[C,k]=(0,a.useState)(""),[S,A]=(0,a.useState)(""),[E,M]=(0,a.useState)(""),[I,R]=(0,a.useState)(!0),[V,q]=(0,a.useState)(!1),[z,D]=(0,a.useState)({}),B=()=>{m.resetFields(),A(""),M(""),R(!0),D({}),h(!1)},G=e=>{let l=e;e&&!e.startsWith("/")&&(l="/"+e),A(l),m.setFieldsValue({path:l})},U=async e=>{console.log("addPassThrough called with:",e),v(!0);try{!n&&"auth"in e&&delete e.auth,z&&Object.keys(z).length>0&&(e.guardrails=z),console.log("formValues: ".concat(JSON.stringify(e)));let s=(await (0,d.createPassThroughEndpoint)(l,e)).endpoints[0],a=[...i,s];t(a),F.Z.success("Pass-through endpoint created successfully"),m.resetFields(),A(""),M(""),R(!0),D({}),h(!1)}catch(e){F.Z.fromBackend("Error creating pass-through endpoint: "+e)}finally{v(!1)}};return(0,s.jsxs)("div",{children:[(0,s.jsx)(r.Z,{className:"mx-auto mb-4 mt-4",onClick:()=>h(!0),children:"+ Add Pass-Through Endpoint"}),(0,s.jsx)(b.Z,{title:(0,s.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,s.jsx)(w.Z,{className:"text-xl text-blue-500"}),(0,s.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Pass-Through Endpoint"})]}),open:u,width:1e3,onCancel:B,footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,s.jsxs)("div",{className:"mt-6",children:[(0,s.jsx)(y.Z,{message:"What is a Pass-Through Endpoint?",description:"Route requests from your LiteLLM proxy to any external API. Perfect for custom models, image generation APIs, or any service you want to proxy through LiteLLM.",type:"info",showIcon:!0,className:"mb-6"}),(0,s.jsxs)(_.Z,{form:m,onFinish:U,layout:"vertical",className:"space-y-6",initialValues:{include_subpath:!0,path:S,target:E},children:[(0,s.jsxs)(f.Z,{className:"p-5",children:[(0,s.jsx)(o.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Configuration"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-5",children:"Configure how requests to your domain will be forwarded to the target API"}),(0,s.jsxs)("div",{className:"space-y-5",children:[(0,s.jsx)(_.Z.Item,{label:(0,s.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Path Prefix"}),name:"path",rules:[{required:!0,message:"Path is required",pattern:/^\//}],extra:(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example: /bria, /adobe-photoshop, /elasticsearch"}),className:"mb-4",children:(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)(g.Z,{placeholder:"bria",value:S,onChange:e=>G(e.target.value),className:"flex-1"})})}),(0,s.jsx)(_.Z.Item,{label:(0,s.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Target URL"}),name:"target",rules:[{required:!0,message:"Target URL is required"},{type:"url",message:"Please enter a valid URL"}],extra:(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example:https://engine.prod.bria-api.com"}),className:"mb-4",children:(0,s.jsx)(g.Z,{placeholder:"https://engine.prod.bria-api.com",value:E,onChange:e=>{M(e.target.value),m.setFieldsValue({target:e.target.value})}})}),(0,s.jsxs)("div",{className:"flex items-center justify-between py-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Include Subpaths"}),(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Forward all subpaths to the target API (recommended for REST APIs)"})]}),(0,s.jsx)(_.Z.Item,{name:"include_subpath",valuePropName:"checked",className:"mb-0",children:(0,s.jsx)(p.Z,{checked:I,onChange:R})})]})]})]}),(0,s.jsx)(L,{pathValue:S,targetValue:E,includeSubpath:I}),(0,s.jsxs)(f.Z,{className:"p-6",children:[(0,s.jsx)(o.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Headers"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-6",children:"Add headers that will be sent with every request to the target API"}),(0,s.jsx)(_.Z.Item,{label:(0,s.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Headers",(0,s.jsx)(c.Z,{title:"Authentication and other headers to forward with requests",children:(0,s.jsx)(Z.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"headers",rules:[{required:!0,message:"Please configure the headers"}],extra:(0,s.jsxs)("div",{className:"text-xs text-gray-500 mt-2",children:[(0,s.jsx)("div",{className:"font-medium mb-1",children:"Add authentication tokens and other required headers"}),(0,s.jsx)("div",{children:"Common examples: auth_token, Authorization, x-api-key"})]}),children:(0,s.jsx)(P,{})})]}),(0,s.jsx)(T,{premiumUser:n,authEnabled:V,onAuthChange:e=>{q(e),m.setFieldsValue({auth:e})}}),(0,s.jsx)(O,{accessToken:l,value:z,onChange:D}),(0,s.jsxs)(f.Z,{className:"p-6",children:[(0,s.jsx)(o.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Billing"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-6",children:"Optional cost tracking for this endpoint"}),(0,s.jsx)(_.Z.Item,{label:(0,s.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Cost Per Request (USD)",(0,s.jsx)(c.Z,{title:"Optional: Track costs for requests to this endpoint",children:(0,s.jsx)(Z.Z,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:"cost_per_request",extra:(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"The cost charged for each request through this endpoint"}),children:(0,s.jsx)(N.Z,{min:0,step:.001,precision:4,placeholder:"2.0000",size:"large"})})]}),(0,s.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:[(0,s.jsx)(r.Z,{variant:"secondary",onClick:B,children:"Cancel"}),(0,s.jsx)(r.Z,{variant:"primary",loading:x,onClick:()=>{console.log("Submit button clicked"),m.submit()},children:x?"Creating...":"Add Pass-Through Endpoint"})]})]})]})})]})},z=t(30078),D=t(4260),B=t(12221),G=t(87769),U=t(42208);let H=e=>{let{value:l}=e,[t,r]=(0,a.useState)(!1),i=JSON.stringify(l,null,2);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("pre",{className:"font-mono text-xs bg-gray-50 p-2 rounded max-w-md overflow-auto",children:t?i:"••••••••"}),(0,s.jsx)("button",{onClick:()=>r(!t),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:t?(0,s.jsx)(G.Z,{className:"w-4 h-4 text-gray-500"}):(0,s.jsx)(U.Z,{className:"w-4 h-4 text-gray-500"})})]})};var K=e=>{let{endpointData:l,onClose:t,accessToken:r,isAdmin:i,premiumUser:n=!1,onEndpointUpdated:o}=e,[c,m]=(0,a.useState)(l),[u,h]=(0,a.useState)(!1),[x,p]=(0,a.useState)(!1),[g,f]=(0,a.useState)((null==l?void 0:l.auth)||!1),[j,v]=(0,a.useState)((null==l?void 0:l.guardrails)||{}),[b]=_.Z.useForm(),y=async e=>{try{if(!r||!(null==c?void 0:c.id))return;let l={};if(e.headers)try{l="string"==typeof e.headers?JSON.parse(e.headers):e.headers}catch(e){F.Z.fromBackend("Invalid JSON format for headers");return}let t={path:c.path,target:e.target,headers:l,include_subpath:e.include_subpath,cost_per_request:e.cost_per_request,auth:n?e.auth:void 0,guardrails:j&&Object.keys(j).length>0?j:void 0};await (0,d.updatePassThroughEndpoint)(r,c.id,t),m({...c,...t}),p(!1),o&&o()}catch(e){console.error("Error updating endpoint:",e),F.Z.fromBackend("Failed to update pass through endpoint")}},N=async()=>{try{if(!r||!(null==c?void 0:c.id))return;await (0,d.deletePassThroughEndpointsCall)(r,c.id),F.Z.success("Pass through endpoint deleted successfully"),t(),o&&o()}catch(e){console.error("Error deleting endpoint:",e),F.Z.fromBackend("Failed to delete pass through endpoint")}};return u?(0,s.jsx)("div",{className:"p-4",children:"Loading..."}):c?(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(k.ZP,{onClick:t,className:"mb-4",children:"← Back"}),(0,s.jsxs)(z.Dx,{children:["Pass Through Endpoint: ",c.path]}),(0,s.jsx)(z.xv,{className:"text-gray-500 font-mono",children:c.id})]})}),(0,s.jsxs)(z.v0,{children:[(0,s.jsxs)(z.td,{className:"mb-4",children:[(0,s.jsx)(z.OK,{children:"Overview"},"overview"),i?(0,s.jsx)(z.OK,{children:"Settings"},"settings"):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(z.nP,{children:[(0,s.jsxs)(z.x4,{children:[(0,s.jsxs)(z.rj,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,s.jsxs)(z.Zb,{children:[(0,s.jsx)(z.xv,{children:"Path"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(z.Dx,{className:"font-mono",children:c.path})})]}),(0,s.jsxs)(z.Zb,{children:[(0,s.jsx)(z.xv,{children:"Target"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(z.Dx,{children:c.target})})]}),(0,s.jsxs)(z.Zb,{children:[(0,s.jsx)(z.xv,{children:"Configuration"}),(0,s.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,s.jsx)("div",{children:(0,s.jsx)(z.Ct,{color:c.include_subpath?"green":"gray",children:c.include_subpath?"Include Subpath":"Exact Path"})}),(0,s.jsx)("div",{children:(0,s.jsx)(z.Ct,{color:c.auth?"blue":"gray",children:c.auth?"Auth Required":"No Auth"})}),void 0!==c.cost_per_request&&(0,s.jsx)("div",{children:(0,s.jsxs)(z.xv,{children:["Cost per request: $",c.cost_per_request]})})]})]})]}),(0,s.jsx)("div",{className:"mt-6",children:(0,s.jsx)(L,{pathValue:c.path,targetValue:c.target,includeSubpath:c.include_subpath||!1})}),c.headers&&Object.keys(c.headers).length>0&&(0,s.jsxs)(z.Zb,{className:"mt-6",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Headers"}),(0,s.jsxs)(z.Ct,{color:"blue",children:[Object.keys(c.headers).length," headers configured"]})]}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(H,{value:c.headers})})]}),c.guardrails&&Object.keys(c.guardrails).length>0&&(0,s.jsxs)(z.Zb,{className:"mt-6",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Guardrails"}),(0,s.jsxs)(z.Ct,{color:"purple",children:[Object.keys(c.guardrails).length," guardrails configured"]})]}),(0,s.jsx)("div",{className:"mt-4 space-y-2",children:Object.entries(c.guardrails).map(e=>{let[l,t]=e;return(0,s.jsxs)("div",{className:"p-3 bg-gray-50 rounded",children:[(0,s.jsx)("div",{className:"font-medium text-sm",children:l}),t&&(t.request_fields||t.response_fields)&&(0,s.jsxs)("div",{className:"mt-2 text-xs text-gray-600 space-y-1",children:[t.request_fields&&(0,s.jsxs)("div",{children:["Request fields: ",t.request_fields.join(", ")]}),t.response_fields&&(0,s.jsxs)("div",{children:["Response fields: ",t.response_fields.join(", ")]})]}),!t&&(0,s.jsx)("div",{className:"text-xs text-gray-600 mt-1",children:"Uses entire payload"})]},l)})})]})]}),i&&(0,s.jsx)(z.x4,{children:(0,s.jsxs)(z.Zb,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(z.Dx,{children:"Pass Through Endpoint Settings"}),(0,s.jsx)("div",{className:"space-x-2",children:!x&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(z.zx,{onClick:()=>p(!0),children:"Edit Settings"}),(0,s.jsx)(z.zx,{onClick:N,variant:"secondary",color:"red",children:"Delete Endpoint"})]})})]}),x?(0,s.jsxs)(_.Z,{form:b,onFinish:y,initialValues:{target:c.target,headers:c.headers?JSON.stringify(c.headers,null,2):"",include_subpath:c.include_subpath||!1,cost_per_request:c.cost_per_request,auth:c.auth||!1},layout:"vertical",children:[(0,s.jsx)(_.Z.Item,{label:"Target URL",name:"target",rules:[{required:!0,message:"Please input a target URL"}],children:(0,s.jsx)(z.oi,{placeholder:"https://api.example.com"})}),(0,s.jsx)(_.Z.Item,{label:"Headers (JSON)",name:"headers",children:(0,s.jsx)(D.default.TextArea,{rows:5,placeholder:'{"Authorization": "Bearer your-token", "Content-Type": "application/json"}'})}),(0,s.jsx)(_.Z.Item,{label:"Include Subpath",name:"include_subpath",valuePropName:"checked",children:(0,s.jsx)(I.Z,{})}),(0,s.jsx)(_.Z.Item,{label:"Cost per Request",name:"cost_per_request",children:(0,s.jsx)(B.Z,{min:0,step:.01,precision:2,placeholder:"0.00",addonBefore:"$"})}),(0,s.jsx)(T,{premiumUser:n,authEnabled:g,onAuthChange:e=>{f(e),b.setFieldsValue({auth:e})}}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(O,{accessToken:r||"",value:j,onChange:v})}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,s.jsx)(k.ZP,{onClick:()=>p(!1),children:"Cancel"}),(0,s.jsx)(z.zx,{children:"Save Changes"})]})]}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Path"}),(0,s.jsx)("div",{className:"font-mono",children:c.path})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Target URL"}),(0,s.jsx)("div",{children:c.target})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Include Subpath"}),(0,s.jsx)(z.Ct,{color:c.include_subpath?"green":"gray",children:c.include_subpath?"Yes":"No"})]}),void 0!==c.cost_per_request&&(0,s.jsxs)("div",{children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Cost per Request"}),(0,s.jsxs)("div",{children:["$",c.cost_per_request]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Authentication Required"}),(0,s.jsx)(z.Ct,{color:c.auth?"green":"gray",children:c.auth?"Yes":"No"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(z.xv,{className:"font-medium",children:"Headers"}),c.headers&&Object.keys(c.headers).length>0?(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(H,{value:c.headers})}):(0,s.jsx)("div",{className:"text-gray-500",children:"No headers configured"})]})]})]})})]})]})]}):(0,s.jsx)("div",{className:"p-4",children:"Pass through endpoint not found"})},J=t(12322);let W=e=>{let{value:l}=e,[t,r]=(0,a.useState)(!1),i=JSON.stringify(l);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{className:"font-mono text-xs",children:t?i:"••••••••"}),(0,s.jsx)("button",{onClick:()=>r(!t),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:t?(0,s.jsx)(G.Z,{className:"w-4 h-4 text-gray-500"}):(0,s.jsx)(U.Z,{className:"w-4 h-4 text-gray-500"})})]})};var Y=e=>{let{accessToken:l,userRole:t,userID:p,modelData:g,premiumUser:f}=e,[j,v]=(0,a.useState)([]),[_,b]=(0,a.useState)(null),[y,N]=(0,a.useState)(!1),[w,Z]=(0,a.useState)(null);(0,a.useEffect)(()=>{l&&t&&p&&(0,d.getPassThroughEndpointsCall)(l).then(e=>{v(e.endpoints)})},[l,t,p]);let C=async e=>{Z(e),N(!0)},k=async()=>{if(null!=w&&l){try{await (0,d.deletePassThroughEndpointsCall)(l,w);let e=j.filter(e=>e.id!==w);v(e),F.Z.success("Endpoint deleted successfully.")}catch(e){console.error("Error deleting the endpoint:",e),F.Z.fromBackend("Error deleting the endpoint: "+e)}N(!1),Z(null)}},S=(e,l)=>{C(e)},A=[{header:"ID",accessorKey:"id",cell:e=>(0,s.jsx)(c.Z,{title:e.row.original.id,children:(0,s.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>e.row.original.id&&b(e.row.original.id),children:e.row.original.id})})},{header:"Path",accessorKey:"path"},{header:"Target",accessorKey:"target",cell:e=>(0,s.jsx)(n.Z,{children:e.getValue()})},{header:()=>(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{children:"Authentication"}),(0,s.jsx)(c.Z,{title:"LiteLLM Virtual Key required to call endpoint",children:(0,s.jsx)(u.Z,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),accessorKey:"auth",cell:e=>(0,s.jsx)(m.Z,{color:e.getValue()?"green":"gray",children:e.getValue()?"Yes":"No"})},{header:"Headers",accessorKey:"headers",cell:e=>(0,s.jsx)(W,{value:e.getValue()||{}})},{header:"Actions",id:"actions",cell:e=>{let{row:l}=e;return(0,s.jsxs)("div",{className:"flex space-x-1",children:[(0,s.jsx)(i.Z,{icon:h.Z,size:"sm",onClick:()=>l.original.id&&b(l.original.id),title:"Edit"}),(0,s.jsx)(i.Z,{icon:x.Z,size:"sm",onClick:()=>S(l.original.id,l.index),title:"Delete"})]})}}];if(!l)return null;if(_){console.log("selectedEndpointId",_),console.log("generalSettings",j);let e=j.find(e=>e.id===_);return e?(0,s.jsx)(K,{endpointData:e,onClose:()=>b(null),accessToken:l,isAdmin:"Admin"===t||"admin"===t,premiumUser:f,onEndpointUpdated:()=>{l&&(0,d.getPassThroughEndpointsCall)(l).then(e=>{v(e.endpoints)})}}):(0,s.jsx)("div",{children:"Endpoint not found"})}return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(o.Z,{children:"Pass Through Endpoints"}),(0,s.jsx)(n.Z,{className:"text-tremor-content",children:"Configure and manage your pass-through endpoints"})]}),(0,s.jsx)(q,{accessToken:l,setPassThroughItems:v,passThroughItems:j,premiumUser:f}),(0,s.jsx)(J.w,{data:j,columns:A,renderSubComponent:()=>(0,s.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:!1,noDataMessage:"No pass-through endpoints configured"}),y&&(0,s.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,s.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,s.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,s.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,s.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:""}),(0,s.jsxs)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full",children:[(0,s.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,s.jsx)("div",{className:"sm:flex sm:items-start",children:(0,s.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,s.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Pass-Through Endpoint"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this pass-through endpoint? This action cannot be undone."})})]})})}),(0,s.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,s.jsx)(r.Z,{onClick:k,color:"red",className:"ml-2",children:"Delete"}),(0,s.jsx)(r.Z,{onClick:()=>{N(!1),Z(null)},children:"Cancel"})]})]})]})})]})}},12322:function(e,l,t){t.d(l,{w:function(){return o}});var s=t(57437),a=t(2265),r=t(71594),i=t(24525),n=t(19130);function o(e){let{data:l=[],columns:t,onRowClick:o,renderSubComponent:d,getRowCanExpand:c,isLoading:m=!1,loadingMessage:u="\uD83D\uDE85 Loading logs...",noDataMessage:h="No logs found"}=e,x=!!d&&!!c,p=(0,r.b7)({data:l,columns:t,...x&&{getRowCanExpand:c},getRowId:(e,l)=>{var t;return null!==(t=null==e?void 0:e.request_id)&&void 0!==t?t:String(l)},getCoreRowModel:(0,i.sC)(),...x&&{getExpandedRowModel:(0,i.rV)()}});return(0,s.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,s.jsxs)(n.iA,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,s.jsx)(n.ss,{children:p.getHeaderGroups().map(e=>(0,s.jsx)(n.SC,{children:e.headers.map(e=>(0,s.jsx)(n.xs,{className:"py-1 h-8",children:e.isPlaceholder?null:(0,r.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,s.jsx)(n.RM,{children:m?(0,s.jsx)(n.SC,{children:(0,s.jsx)(n.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:u})})})}):p.getRowModel().rows.length>0?p.getRowModel().rows.map(e=>(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)(n.SC,{className:"h-8 ".concat(x?"":"cursor-pointer hover:bg-gray-50"),onClick:()=>!x&&(null==o?void 0:o(e.original)),children:e.getVisibleCells().map(e=>(0,s.jsx)(n.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,r.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),x&&e.getIsExpanded()&&d&&(0,s.jsx)(n.SC,{children:(0,s.jsx)(n.pj,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,s.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:d({row:e})})})})]},e.id)):(0,s.jsx)(n.SC,{children:(0,s.jsx)(n.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:h})})})})})]})})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1716-1c0ba935a144e6ff.js b/litellm/proxy/_experimental/out/_next/static/chunks/1716-1c0ba935a144e6ff.js
deleted file mode 100644
index a7f835359b0..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/1716-1c0ba935a144e6ff.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1716],{41649:function(e,t,n){n.d(t,{Z:function(){return u}});var o=n(5853),i=n(2265),a=n(47187),r=n(7084),c=n(26898),l=n(13241),s=n(1153);let d={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},m={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},g=(0,s.fn)("Badge"),u=i.forwardRef((e,t)=>{let{color:n,icon:u,size:p=r.u8.SM,tooltip:b,className:h,children:f}=e,v=(0,o._T)(e,["color","icon","size","tooltip","className","children"]),S=u||null,{tooltipProps:x,getReferenceProps:k}=(0,a.l)();return i.createElement("span",Object.assign({ref:(0,s.lq)([t,x.refs.setReference]),className:(0,l.q)(g("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",n?(0,l.q)((0,s.bM)(n,c.K.background).bgColor,(0,s.bM)(n,c.K.iconText).textColor,(0,s.bM)(n,c.K.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,l.q)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),d[p].paddingX,d[p].paddingY,d[p].fontSize,h)},k,v),i.createElement(a.Z,Object.assign({text:b},x)),S?i.createElement(S,{className:(0,l.q)(g("icon"),"shrink-0 -ml-1 mr-1.5",m[p].height,m[p].width)}):null,i.createElement("span",{className:(0,l.q)(g("text"),"whitespace-nowrap")},f))});u.displayName="Badge"},67101:function(e,t,n){n.d(t,{Z:function(){return d}});var o=n(5853),i=n(13241),a=n(1153),r=n(2265),c=n(9496);let l=(0,a.fn)("Grid"),s=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"",d=r.forwardRef((e,t)=>{let{numItems:n=1,numItemsSm:a,numItemsMd:d,numItemsLg:m,children:g,className:u}=e,p=(0,o._T)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),b=s(n,c._m),h=s(a,c.LH),f=s(d,c.l5),v=s(m,c.N4),S=(0,i.q)(b,h,f,v);return r.createElement("div",Object.assign({ref:t,className:(0,i.q)(l("root"),"grid",S,u)},p),g)});d.displayName="Grid"},9496:function(e,t,n){n.d(t,{LH:function(){return i},N4:function(){return r},PT:function(){return c},SP:function(){return l},VS:function(){return s},_m:function(){return o},_w:function(){return d},l5:function(){return a}});let o={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},i={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},a={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},r={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},c={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},l={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},s={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},d={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"}},23496:function(e,t,n){n.d(t,{Z:function(){return f}});var o=n(2265),i=n(36760),a=n.n(i),r=n(71744),c=n(33759),l=n(93463),s=n(12918),d=n(99320),m=n(71140);let g=e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{["&".concat(t)]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},u=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:o,lineWidth:i,textPaddingInline:a,orientationMargin:r,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},(0,s.Wf)(e)),{borderBlockStart:"".concat((0,l.bf)(i)," solid ").concat(o),"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:"".concat((0,l.bf)(i)," solid ").concat(o)},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:"".concat((0,l.bf)(e.marginLG)," 0")},["&-horizontal".concat(t,"-with-text")]:{display:"flex",alignItems:"center",margin:"".concat((0,l.bf)(e.dividerHorizontalWithTextGutterMargin)," 0"),color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:"0 ".concat(o),"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:"".concat((0,l.bf)(i)," solid transparent"),borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},["&-horizontal".concat(t,"-with-text-start")]:{"&::before":{width:"calc(".concat(r," * 100%)")},"&::after":{width:"calc(100% - ".concat(r," * 100%)")}},["&-horizontal".concat(t,"-with-text-end")]:{"&::before":{width:"calc(100% - ".concat(r," * 100%)")},"&::after":{width:"calc(".concat(r," * 100%)")}},["".concat(t,"-inner-text")]:{display:"inline-block",paddingBlock:0,paddingInline:a},"&-dashed":{background:"none",borderColor:o,borderStyle:"dashed",borderWidth:"".concat((0,l.bf)(i)," 0 0")},["&-horizontal".concat(t,"-with-text").concat(t,"-dashed")]:{"&::before, &::after":{borderStyle:"dashed none none"}},["&-vertical".concat(t,"-dashed")]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:o,borderStyle:"dotted",borderWidth:"".concat((0,l.bf)(i)," 0 0")},["&-horizontal".concat(t,"-with-text").concat(t,"-dotted")]:{"&::before, &::after":{borderStyle:"dotted none none"}},["&-vertical".concat(t,"-dotted")]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},["&-plain".concat(t,"-with-text")]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},["&-horizontal".concat(t,"-with-text-start").concat(t,"-no-default-orientation-margin-start")]:{"&::before":{width:0},"&::after":{width:"100%"},["".concat(t,"-inner-text")]:{paddingInlineStart:n}},["&-horizontal".concat(t,"-with-text-end").concat(t,"-no-default-orientation-margin-end")]:{"&::before":{width:"100%"},"&::after":{width:0},["".concat(t,"-inner-text")]:{paddingInlineEnd:n}}})}};var p=(0,d.I$)("Divider",e=>{let t=(0,m.IX)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[u(t),g(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),b=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,o=Object.getOwnPropertySymbols(e);it.indexOf(o[i])&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n};let h={small:"sm",middle:"md"};var f=e=>{let{getPrefixCls:t,direction:n,className:i,style:l}=(0,r.dj)("divider"),{prefixCls:s,type:d="horizontal",orientation:m="center",orientationMargin:g,className:u,rootClassName:f,children:v,dashed:S,variant:x="solid",plain:k,style:y,size:C}=e,z=b(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),w=t("divider",s),[E,N,j]=p(w),I=h[(0,c.Z)(C)],M=!!v,B=o.useMemo(()=>"left"===m?"rtl"===n?"end":"start":"right"===m?"rtl"===n?"start":"end":m,[n,m]),O="start"===B&&null!=g,P="end"===B&&null!=g,Z=a()(w,i,N,j,"".concat(w,"-").concat(d),{["".concat(w,"-with-text")]:M,["".concat(w,"-with-text-").concat(B)]:M,["".concat(w,"-dashed")]:!!S,["".concat(w,"-").concat(x)]:"solid"!==x,["".concat(w,"-plain")]:!!k,["".concat(w,"-rtl")]:"rtl"===n,["".concat(w,"-no-default-orientation-margin-start")]:O,["".concat(w,"-no-default-orientation-margin-end")]:P,["".concat(w,"-").concat(I)]:!!I},u,f),T=o.useMemo(()=>"number"==typeof g?g:/^\d+$/.test(g)?Number(g):g,[g]);return E(o.createElement("div",Object.assign({className:Z,style:Object.assign(Object.assign({},l),y)},z,{role:"separator"}),v&&"vertical"!==d&&o.createElement("span",{className:"".concat(w,"-inner-text"),style:{marginInlineStart:O?T:void 0,marginInlineEnd:P?T:void 0}},v)))}},40049:function(e,t,n){n.d(t,{Z:function(){return ei}});var o=n(2265),i=n(1119),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},r=n(55015),c=o.forwardRef(function(e,t){return o.createElement(r.Z,(0,i.Z)({},e,{ref:t,icon:a}))}),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},s=o.forwardRef(function(e,t){return o.createElement(r.Z,(0,i.Z)({},e,{ref:t,icon:l}))}),d=n(15327),m=n(77565),g=n(36760),u=n.n(g),p=n(11993),b=n(41154),h=n(31686),f=n(26365),v=n(50506),S=n(95814),x=n(18242);n(32559);var k={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},y=[10,20,50,100],C=function(e){var t=e.pageSizeOptions,n=void 0===t?y:t,i=e.locale,a=e.changeSize,r=e.pageSize,c=e.goButton,l=e.quickGo,s=e.rootPrefixCls,d=e.disabled,m=e.buildOptionText,g=e.showSizeChanger,u=e.sizeChangerRender,p=o.useState(""),b=(0,f.Z)(p,2),h=b[0],v=b[1],x=function(){return!h||Number.isNaN(h)?void 0:Number(h)},k="function"==typeof m?m:function(e){return"".concat(e," ").concat(i.items_per_page)},C=function(e){""!==h&&(e.keyCode===S.Z.ENTER||"click"===e.type)&&(v(""),null==l||l(x()))},z="".concat(s,"-options");if(!g&&!l)return null;var w=null,E=null,N=null;return g&&u&&(w=u({disabled:d,size:r,onSizeChange:function(e){null==a||a(Number(e))},"aria-label":i.page_size,className:"".concat(z,"-size-changer"),options:(n.some(function(e){return e.toString()===r.toString()})?n:n.concat([r]).sort(function(e,t){return(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))})).map(function(e){return{label:k(e),value:e}})})),l&&(c&&(N="boolean"==typeof c?o.createElement("button",{type:"button",onClick:C,onKeyUp:C,disabled:d,className:"".concat(z,"-quick-jumper-button")},i.jump_to_confirm):o.createElement("span",{onClick:C,onKeyUp:C},c)),E=o.createElement("div",{className:"".concat(z,"-quick-jumper")},i.jump_to,o.createElement("input",{disabled:d,type:"text",value:h,onChange:function(e){v(e.target.value)},onKeyUp:C,onBlur:function(e){!c&&""!==h&&(v(""),e.relatedTarget&&(e.relatedTarget.className.indexOf("".concat(s,"-item-link"))>=0||e.relatedTarget.className.indexOf("".concat(s,"-item"))>=0)||null==l||l(x()))},"aria-label":i.page}),i.page,N)),o.createElement("li",{className:z},w,E)},z=function(e){var t=e.rootPrefixCls,n=e.page,i=e.active,a=e.className,r=e.showTitle,c=e.onClick,l=e.onKeyPress,s=e.itemRender,d="".concat(t,"-item"),m=u()(d,"".concat(d,"-").concat(n),(0,p.Z)((0,p.Z)({},"".concat(d,"-active"),i),"".concat(d,"-disabled"),!n),a),g=s(n,"page",o.createElement("a",{rel:"nofollow"},n));return g?o.createElement("li",{title:r?String(n):null,className:m,onClick:function(){c(n)},onKeyDown:function(e){l(e,c,n)},tabIndex:0},g):null},w=function(e,t,n){return n};function E(){}function N(e){var t=Number(e);return"number"==typeof t&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function j(e,t,n){return Math.floor((n-1)/(void 0===e?t:e))+1}var I=function(e){var t,n,a,r,c=e.prefixCls,l=void 0===c?"rc-pagination":c,s=e.selectPrefixCls,d=e.className,m=e.current,g=e.defaultCurrent,y=e.total,I=void 0===y?0:y,M=e.pageSize,B=e.defaultPageSize,O=e.onChange,P=void 0===O?E:O,Z=e.hideOnSinglePage,T=e.align,H=e.showPrevNextJumpers,D=e.showQuickJumper,_=e.showLessItems,A=e.showTitle,W=void 0===A||A,R=e.onShowSizeChange,q=void 0===R?E:R,X=e.locale,L=void 0===X?k:X,K=e.style,G=e.totalBoundaryShowSizeChanger,U=e.disabled,J=e.simple,Y=e.showTotal,F=e.showSizeChanger,Q=void 0===F?I>(void 0===G?50:G):F,V=e.sizeChangerRender,$=e.pageSizeOptions,ee=e.itemRender,et=void 0===ee?w:ee,en=e.jumpPrevIcon,eo=e.jumpNextIcon,ei=e.prevIcon,ea=e.nextIcon,er=o.useRef(null),ec=(0,v.Z)(10,{value:M,defaultValue:void 0===B?10:B}),el=(0,f.Z)(ec,2),es=el[0],ed=el[1],em=(0,v.Z)(1,{value:m,defaultValue:void 0===g?1:g,postState:function(e){return Math.max(1,Math.min(e,j(void 0,es,I)))}}),eg=(0,f.Z)(em,2),eu=eg[0],ep=eg[1],eb=o.useState(eu),eh=(0,f.Z)(eb,2),ef=eh[0],ev=eh[1];(0,o.useEffect)(function(){ev(eu)},[eu]);var eS=Math.max(1,eu-(_?3:5)),ex=Math.min(j(void 0,es,I),eu+(_?3:5));function ek(t,n){var i=t||o.createElement("button",{type:"button","aria-label":n,className:"".concat(l,"-item-link")});return"function"==typeof t&&(i=o.createElement(t,(0,h.Z)({},e))),i}function ey(e){var t=e.target.value,n=j(void 0,es,I);return""===t?t:Number.isNaN(Number(t))?ef:t>=n?n:Number(t)}var eC=I>es&&D;function ez(e){var t=ey(e);switch(t!==ef&&ev(t),e.keyCode){case S.Z.ENTER:ew(t);break;case S.Z.UP:ew(t-1);break;case S.Z.DOWN:ew(t+1)}}function ew(e){if(N(e)&&e!==eu&&N(I)&&I>0&&!U){var t=j(void 0,es,I),n=e;return e>t?n=t:e<1&&(n=1),n!==ef&&ev(n),ep(n),null==P||P(n,es),n}return eu}var eE=eu>1,eN=eu2?n-2:0),i=2;iI?I:eu*es])),eD=null,e_=j(void 0,es,I);if(Z&&I<=es)return null;var eA=[],eW={rootPrefixCls:l,onClick:ew,onKeyPress:eO,showTitle:W,itemRender:et,page:-1},eR=eu-1>0?eu-1:0,eq=eu+1=2*eU&&3!==eu&&(eA[0]=o.cloneElement(eA[0],{className:u()("".concat(l,"-item-after-jump-prev"),eA[0].props.className)}),eA.unshift(eZ)),e_-eu>=2*eU&&eu!==e_-2){var e2=eA[eA.length-1];eA[eA.length-1]=o.cloneElement(e2,{className:u()("".concat(l,"-item-before-jump-next"),e2.props.className)}),eA.push(eD)}1!==e$&&eA.unshift(o.createElement(z,(0,i.Z)({},eW,{key:1,page:1}))),e0!==e_&&eA.push(o.createElement(z,(0,i.Z)({},eW,{key:e_,page:e_})))}var e3=(t=et(eR,"prev",ek(ei,"prev page")),o.isValidElement(t)?o.cloneElement(t,{disabled:!eE}):t);if(e3){var e5=!eE||!e_;e3=o.createElement("li",{title:W?L.prev_page:null,onClick:ej,tabIndex:e5?null:0,onKeyDown:function(e){eO(e,ej)},className:u()("".concat(l,"-prev"),(0,p.Z)({},"".concat(l,"-disabled"),e5)),"aria-disabled":e5},e3)}var e6=(n=et(eq,"next",ek(ea,"next page")),o.isValidElement(n)?o.cloneElement(n,{disabled:!eN}):n);e6&&(J?(a=!eN,r=eE?0:null):r=(a=!eN||!e_)?null:0,e6=o.createElement("li",{title:W?L.next_page:null,onClick:eI,tabIndex:r,onKeyDown:function(e){eO(e,eI)},className:u()("".concat(l,"-next"),(0,p.Z)({},"".concat(l,"-disabled"),a)),"aria-disabled":a},e6));var e9=u()(l,d,(0,p.Z)((0,p.Z)((0,p.Z)((0,p.Z)((0,p.Z)({},"".concat(l,"-start"),"start"===T),"".concat(l,"-center"),"center"===T),"".concat(l,"-end"),"end"===T),"".concat(l,"-simple"),J),"".concat(l,"-disabled"),U));return o.createElement("ul",(0,i.Z)({className:e9,style:K,ref:er},eT),eH,e3,J?eG:eA,e6,o.createElement(C,{locale:L,rootPrefixCls:l,disabled:U,selectPrefixCls:void 0===s?"rc-select":s,changeSize:function(e){var t=j(e,es,I),n=eu>t&&0!==t?t:eu;ed(e),ev(n),null==q||q(eu,e),ep(n),null==P||P(n,e)},pageSize:es,pageSizeOptions:$,quickGo:eC?ew:null,goButton:eK,showSizeChanger:Q,sizeChangerRender:V}))},M=n(96257),B=n(71744),O=n(33759),P=n(28617),Z=n(55274),T=n(37592),H=n(91691),D=n(93463),_=n(31282),A=n(37433),W=n(65265),R=n(12918),q=n(71140),X=n(99320);let L=e=>{let{componentCls:t}=e;return{["".concat(t,"-disabled")]:{"&, &:hover":{cursor:"not-allowed",["".concat(t,"-item-link")]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",["".concat(t,"-item-link")]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},["&".concat(t,"-disabled")]:{cursor:"not-allowed",["".concat(t,"-item")]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},["".concat(t,"-item-link")]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},["".concat(t,"-simple&")]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},["".concat(t,"-simple-pager")]:{color:e.colorTextDisabled},["".concat(t,"-jump-prev, ").concat(t,"-jump-next")]:{["".concat(t,"-item-link-icon")]:{opacity:0},["".concat(t,"-item-ellipsis")]:{opacity:1}}}}},K=e=>{let{componentCls:t}=e;return{["&".concat(t,"-mini ").concat(t,"-total-text, &").concat(t,"-mini ").concat(t,"-simple-pager")]:{height:e.itemSizeSM,lineHeight:(0,D.bf)(e.itemSizeSM)},["&".concat(t,"-mini ").concat(t,"-item")]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:(0,D.bf)(e.calc(e.itemSizeSM).sub(2).equal())},["&".concat(t,"-mini ").concat(t,"-prev, &").concat(t,"-mini ").concat(t,"-next")]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:(0,D.bf)(e.itemSizeSM)},["&".concat(t,"-mini:not(").concat(t,"-disabled)")]:{["".concat(t,"-prev, ").concat(t,"-next")]:{["&:hover ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextHover},["&:active ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextActive},["&".concat(t,"-disabled:hover ").concat(t,"-item-link")]:{backgroundColor:"transparent"}}},["\n &".concat(t,"-mini ").concat(t,"-prev ").concat(t,"-item-link,\n &").concat(t,"-mini ").concat(t,"-next ").concat(t,"-item-link\n ")]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:(0,D.bf)(e.itemSizeSM)}},["&".concat(t,"-mini ").concat(t,"-jump-prev, &").concat(t,"-mini ").concat(t,"-jump-next")]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:(0,D.bf)(e.itemSizeSM)},["&".concat(t,"-mini ").concat(t,"-options")]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:(0,D.bf)(e.itemSizeSM),input:Object.assign(Object.assign({},(0,_.x0)(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},G=e=>{let{componentCls:t}=e;return{["&".concat(t,"-simple")]:{["".concat(t,"-prev, ").concat(t,"-next")]:{height:e.itemSize,lineHeight:(0,D.bf)(e.itemSize),verticalAlign:"top",["".concat(t,"-item-link")]:{height:e.itemSize,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSize,lineHeight:(0,D.bf)(e.itemSize)}}},["".concat(t,"-simple-pager")]:{display:"inline-flex",alignItems:"center",height:e.itemSize,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:"0 ".concat((0,D.bf)(e.paginationItemPaddingInline)),textAlign:"center",backgroundColor:e.itemInputBg,border:"".concat((0,D.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadius,outline:"none",transition:"border-color ".concat(e.motionDurationMid),color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:"".concat((0,D.bf)(e.inputOutlineOffset)," 0 ").concat((0,D.bf)(e.controlOutlineWidth)," ").concat(e.controlOutline)},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},["&".concat(t,"-disabled")]:{["".concat(t,"-prev, ").concat(t,"-next")]:{["".concat(t,"-item-link")]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},["&".concat(t,"-mini")]:{["".concat(t,"-prev, ").concat(t,"-next")]:{height:e.itemSizeSM,lineHeight:(0,D.bf)(e.itemSizeSM),["".concat(t,"-item-link")]:{height:e.itemSizeSM,"&::after":{height:e.itemSizeSM,lineHeight:(0,D.bf)(e.itemSizeSM)}}},["".concat(t,"-simple-pager")]:{height:e.itemSizeSM,input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},U=e=>{let{componentCls:t}=e;return{["".concat(t,"-jump-prev, ").concat(t,"-jump-next")]:{outline:0,["".concat(t,"-item-container")]:{position:"relative",["".concat(t,"-item-link-icon")]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:"all ".concat(e.motionDurationMid),"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},["".concat(t,"-item-ellipsis")]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:"all ".concat(e.motionDurationMid)}},"&:hover":{["".concat(t,"-item-link-icon")]:{opacity:1},["".concat(t,"-item-ellipsis")]:{opacity:0}}},["\n ".concat(t,"-prev,\n ").concat(t,"-jump-prev,\n ").concat(t,"-jump-next\n ")]:{marginInlineEnd:e.marginXS},["\n ".concat(t,"-prev,\n ").concat(t,"-next,\n ").concat(t,"-jump-prev,\n ").concat(t,"-jump-next\n ")]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:(0,D.bf)(e.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:"all ".concat(e.motionDurationMid)},["".concat(t,"-prev, ").concat(t,"-next")]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},["".concat(t,"-item-link")]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:"".concat((0,D.bf)(e.lineWidth)," ").concat(e.lineType," transparent"),borderRadius:e.borderRadius,outline:"none",transition:"all ".concat(e.motionDurationMid)},["&:hover ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextHover},["&:active ".concat(t,"-item-link")]:{backgroundColor:e.colorBgTextActive},["&".concat(t,"-disabled:hover")]:{["".concat(t,"-item-link")]:{backgroundColor:"transparent"}}},["".concat(t,"-slash")]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},["".concat(t,"-options")]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:(0,D.bf)(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},(0,_.ik)(e)),(0,W.$U)(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},(0,W.Xy)(e)),width:e.quickJumperInputWidth,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},J=e=>{let{componentCls:t}=e;return{["".concat(t,"-item")]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:(0,D.bf)(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:"".concat((0,D.bf)(e.lineWidth)," ").concat(e.lineType," transparent"),borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:"0 ".concat((0,D.bf)(e.paginationItemPaddingInline)),color:e.colorText,"&:hover":{textDecoration:"none"}},["&:not(".concat(t,"-item-active)")]:{"&:hover":{transition:"all ".concat(e.motionDurationMid),backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},Y=e=>{let{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,R.Wf)(e)),{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},["".concat(t,"-total-text")]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:(0,D.bf)(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),J(e)),U(e)),G(e)),K(e)),L(e)),{["@media only screen and (max-width: ".concat(e.screenLG,"px)")]:{["".concat(t,"-item")]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},["@media only screen and (max-width: ".concat(e.screenSM,"px)")]:{["".concat(t,"-options")]:{display:"none"}}}),["&".concat(e.componentCls,"-rtl")]:{direction:"rtl"}}},F=e=>{let{componentCls:t}=e;return{["".concat(t,":not(").concat(t,"-disabled)")]:{["".concat(t,"-item")]:Object.assign({},(0,R.Qy)(e)),["".concat(t,"-jump-prev, ").concat(t,"-jump-next")]:{"&:focus-visible":Object.assign({["".concat(t,"-item-link-icon")]:{opacity:1},["".concat(t,"-item-ellipsis")]:{opacity:0}},(0,R.oN)(e))},["".concat(t,"-prev, ").concat(t,"-next")]:{["&:focus-visible ".concat(t,"-item-link")]:(0,R.oN)(e)}}}},Q=e=>Object.assign({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0},(0,A.T)(e)),V=e=>(0,q.IX)(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,A.e)(e));var $=(0,X.I$)("Pagination",e=>{let t=V(e);return[Y(t),F(t)]},Q);let ee=e=>{let{componentCls:t}=e;return{["".concat(t).concat(t,"-bordered").concat(t,"-disabled:not(").concat(t,"-mini)")]:{"&, &:hover":{["".concat(t,"-item-link")]:{borderColor:e.colorBorder}},"&:focus-visible":{["".concat(t,"-item-link")]:{borderColor:e.colorBorder}},["".concat(t,"-item, ").concat(t,"-item-link")]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,["&:hover:not(".concat(t,"-item-active)")]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},["&".concat(t,"-item-active")]:{backgroundColor:e.itemActiveBgDisabled}},["".concat(t,"-prev, ").concat(t,"-next")]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},["".concat(t,"-item-link")]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},["".concat(t).concat(t,"-bordered:not(").concat(t,"-mini)")]:{["".concat(t,"-prev, ").concat(t,"-next")]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},["".concat(t,"-item-link")]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},["&:hover ".concat(t,"-item-link")]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},["&".concat(t,"-disabled")]:{["".concat(t,"-item-link")]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},["".concat(t,"-item")]:{backgroundColor:e.itemBg,border:"".concat((0,D.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),["&:hover:not(".concat(t,"-item-active)")]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}};var et=(0,X.bk)(["Pagination","bordered"],e=>ee(V(e)),Q);function en(e){return(0,o.useMemo)(()=>"boolean"==typeof e?[e,{}]:e&&"object"==typeof e?[!0,e]:[void 0,void 0],[e])}var eo=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,o=Object.getOwnPropertySymbols(e);it.indexOf(o[i])&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n},ei=e=>{let{align:t,prefixCls:n,selectPrefixCls:i,className:a,rootClassName:r,style:l,size:g,locale:p,responsive:b,showSizeChanger:h,selectComponentClass:f,pageSizeOptions:v}=e,S=eo(e,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:x}=(0,P.Z)(b),[,k]=(0,H.ZP)(),{getPrefixCls:y,direction:C,showSizeChanger:z,className:w,style:E}=(0,B.dj)("pagination"),N=y("pagination",n),[j,D,_]=$(N),A=(0,O.Z)(g),W="small"===A||!!(x&&!A&&b),[R]=(0,Z.Z)("Pagination",M.Z),q=Object.assign(Object.assign({},R),p),[X,L]=en(h),[K,G]=en(z),U=null!=L?L:G,J=f||T.default,Y=o.useMemo(()=>v?v.map(e=>Number(e)):void 0,[v]),F=o.useMemo(()=>{let e=o.createElement("span",{className:"".concat(N,"-item-ellipsis")},"•••"),t=o.createElement("button",{className:"".concat(N,"-item-link"),type:"button",tabIndex:-1},"rtl"===C?o.createElement(m.Z,null):o.createElement(d.Z,null));return{prevIcon:t,nextIcon:o.createElement("button",{className:"".concat(N,"-item-link"),type:"button",tabIndex:-1},"rtl"===C?o.createElement(d.Z,null):o.createElement(m.Z,null)),jumpPrevIcon:o.createElement("a",{className:"".concat(N,"-item-link")},o.createElement("div",{className:"".concat(N,"-item-container")},"rtl"===C?o.createElement(s,{className:"".concat(N,"-item-link-icon")}):o.createElement(c,{className:"".concat(N,"-item-link-icon")}),e)),jumpNextIcon:o.createElement("a",{className:"".concat(N,"-item-link")},o.createElement("div",{className:"".concat(N,"-item-container")},"rtl"===C?o.createElement(c,{className:"".concat(N,"-item-link-icon")}):o.createElement(s,{className:"".concat(N,"-item-link-icon")}),e))}},[C,N]),Q=y("select",i),V=u()({["".concat(N,"-").concat(t)]:!!t,["".concat(N,"-mini")]:W,["".concat(N,"-rtl")]:"rtl"===C,["".concat(N,"-bordered")]:k.wireframe},w,a,r,D,_),ee=Object.assign(Object.assign({},E),l);return j(o.createElement(o.Fragment,null,k.wireframe&&o.createElement(et,{prefixCls:N}),o.createElement(I,Object.assign({},F,S,{style:ee,prefixCls:N,selectPrefixCls:Q,className:V,locale:q,pageSizeOptions:Y,showSizeChanger:null!=X?X:K,sizeChangerRender:e=>{var t;let{disabled:n,size:i,onSizeChange:a,"aria-label":r,className:c,options:l}=e,{className:s,onChange:d}=U||{},m=null===(t=l.find(e=>String(e.value)===String(i)))||void 0===t?void 0:t.value;return o.createElement(J,Object.assign({disabled:n,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:e=>e.parentNode,"aria-label":r,options:l},U,{value:m,onChange:(e,t)=>{null==a||a(e),null==d||d(e,t)},size:W?"small":"middle",className:u()(c,s)}))}}))))}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1717-bb1b888f6ccc52d6.js b/litellm/proxy/_experimental/out/_next/static/chunks/1717-bb1b888f6ccc52d6.js
deleted file mode 100644
index 85a7967f39f..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/1717-bb1b888f6ccc52d6.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1717],{58747:function(e,t,n){n.d(t,{Z:function(){return a}});var r=n(5853),o=n(2265);let a=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))}},4537:function(e,t,n){n.d(t,{Z:function(){return a}});var r=n(5853),o=n(2265);let a=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))}},27281:function(e,t,n){n.d(t,{Z:function(){return f}});var r=n(5853),o=n(58747),a=n(2265),l=n(4537),i=n(13241),c=n(1153),s=n(96398),u=n(51975),d=n(85238),m=n(44140);let b=(0,c.fn)("Select"),f=a.forwardRef((e,t)=>{let{defaultValue:n="",value:c,onValueChange:f,placeholder:p="Select...",disabled:g=!1,icon:v,enableClear:h=!1,required:w,children:y,name:E,error:x=!1,errorMessage:N,className:O,id:C}=e,k=(0,r._T)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),S=(0,a.useRef)(null),j=a.Children.toArray(y),[T,R]=(0,m.Z)(n,c),I=(0,a.useMemo)(()=>{let e=a.Children.toArray(y).filter(a.isValidElement);return(0,s.sl)(e)},[y]);return a.createElement("div",{className:(0,i.q)("w-full min-w-[10rem] text-tremor-default",O)},a.createElement("div",{className:"relative"},a.createElement("select",{title:"select-hidden",required:w,className:(0,i.q)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:T,onChange:e=>{e.preventDefault()},name:E,disabled:g,id:C,onFocus:()=>{let e=S.current;e&&e.focus()}},a.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},p),j.map(e=>{let t=e.props.value,n=e.props.children;return a.createElement("option",{className:"hidden",key:t,value:t},n)})),a.createElement(u.Ri,Object.assign({as:"div",ref:t,defaultValue:T,value:T,onChange:e=>{null==f||f(e),R(e)},disabled:g,id:C},k),e=>{var t;let{value:n}=e;return a.createElement(a.Fragment,null,a.createElement(u.Y4,{ref:S,className:(0,i.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",v?"pl-10":"pl-3",(0,s.um)((0,s.Uh)(n),g,x))},v&&a.createElement("span",{className:(0,i.q)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.createElement(v,{className:(0,i.q)(b("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.createElement("span",{className:"w-[90%] block truncate"},n&&null!==(t=I.get(n))&&void 0!==t?t:p),a.createElement("span",{className:(0,i.q)("absolute inset-y-0 right-0 flex items-center mr-3")},a.createElement(o.Z,{className:(0,i.q)(b("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),h&&T?a.createElement("button",{type:"button",className:(0,i.q)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),R(""),null==f||f("")}},a.createElement(l.Z,{className:(0,i.q)(b("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.createElement(d.u,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.createElement(u.O_,{anchor:"bottom start",className:(0,i.q)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},y)))})),x&&N?a.createElement("p",{className:(0,i.q)("errorMessage","text-sm text-rose-500 mt-1")},N):null)});f.displayName="Select"},67982:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(5853),o=n(13241),a=n(1153),l=n(2265);let i=(0,a.fn)("Divider"),c=l.forwardRef((e,t)=>{let{className:n,children:a}=e,c=(0,r._T)(e,["className","children"]);return l.createElement("div",Object.assign({ref:t,className:(0,o.q)(i("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",n)},c),a?l.createElement(l.Fragment,null,l.createElement("div",{className:(0,o.q)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),l.createElement("div",{className:(0,o.q)("text-inherit whitespace-nowrap")},a),l.createElement("div",{className:(0,o.q)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):l.createElement("div",{className:(0,o.q)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});c.displayName="Divider"},33866:function(e,t,n){n.d(t,{Z:function(){return F}});var r=n(2265),o=n(36760),a=n.n(o),l=n(66632),i=n(93350),c=n(19722),s=n(71744),u=n(93463),d=n(12918),m=n(18536),b=n(71140),f=n(99320);let p=new u.E4("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),g=new u.E4("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),v=new u.E4("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),h=new u.E4("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),w=new u.E4("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),y=new u.E4("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),E=e=>{let{componentCls:t,iconCls:n,antCls:r,badgeShadowSize:o,textFontSize:a,textFontSizeSM:l,statusSize:i,dotSize:c,textFontWeight:s,indicatorHeight:b,indicatorHeightSM:f,marginXS:E,calc:x}=e,N="".concat(r,"-scroll-number"),O=(0,m.Z)(e,(e,n)=>{let{darkColor:r}=n;return{["&".concat(t," ").concat(t,"-color-").concat(e)]:{background:r,["&:not(".concat(t,"-count)")]:{color:r},"a:hover &":{background:r}}}});return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,d.Wf)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,["".concat(t,"-count")]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:b,height:b,color:e.badgeTextColor,fontWeight:s,fontSize:a,lineHeight:(0,u.bf)(b),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:x(b).div(2).equal(),boxShadow:"0 0 0 ".concat((0,u.bf)(o)," ").concat(e.badgeShadowColor),transition:"background ".concat(e.motionDurationMid),a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},["".concat(t,"-count-sm")]:{minWidth:f,height:f,fontSize:l,lineHeight:(0,u.bf)(f),borderRadius:x(f).div(2).equal()},["".concat(t,"-multiple-words")]:{padding:"0 ".concat((0,u.bf)(e.paddingXS)),bdi:{unicodeBidi:"plaintext"}},["".concat(t,"-dot")]:{zIndex:e.indicatorZIndex,width:c,minWidth:c,height:c,background:e.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat((0,u.bf)(o)," ").concat(e.badgeShadowColor)},["".concat(t,"-count, ").concat(t,"-dot, ").concat(N,"-custom-component")]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",["&".concat(n,"-spin")]:{animationName:y,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&".concat(t,"-status")]:{lineHeight:"inherit",verticalAlign:"baseline",["".concat(t,"-status-dot")]:{position:"relative",top:-1,display:"inline-block",width:i,height:i,verticalAlign:"middle",borderRadius:"50%"},["".concat(t,"-status-success")]:{backgroundColor:e.colorSuccess},["".concat(t,"-status-processing")]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:p,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},["".concat(t,"-status-default")]:{backgroundColor:e.colorTextPlaceholder},["".concat(t,"-status-error")]:{backgroundColor:e.colorError},["".concat(t,"-status-warning")]:{backgroundColor:e.colorWarning},["".concat(t,"-status-text")]:{marginInlineStart:E,color:e.colorText,fontSize:e.fontSize}}}),O),{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:g,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["".concat(t,"-zoom-leave")]:{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["&".concat(t,"-not-a-wrapper")]:{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:h,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["".concat(t,"-zoom-leave")]:{animationName:w,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["&:not(".concat(t,"-status)")]:{verticalAlign:"middle"},["".concat(N,"-custom-component, ").concat(t,"-count")]:{transform:"none"},["".concat(N,"-custom-component, ").concat(N)]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[N]:{overflow:"hidden",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseOutBack),["".concat(N,"-only")]:{position:"relative",display:"inline-block",height:b,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",["> p".concat(N,"-only-unit")]:{height:b,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},["".concat(N,"-symbol")]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",["".concat(t,"-count, ").concat(t,"-dot, ").concat(N,"-custom-component")]:{transform:"translate(-50%, -50%)"}}})}},x=e=>{let{fontHeight:t,lineWidth:n,marginXS:r,colorBorderBg:o}=e,a=e.colorTextLightSolid,l=e.colorError,i=e.colorErrorHover;return(0,b.IX)(e,{badgeFontHeight:t,badgeShadowSize:n,badgeTextColor:a,badgeColor:l,badgeColorHover:i,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},N=e=>{let{fontSize:t,lineHeight:n,fontSizeSM:r,lineWidth:o}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*n)-2*o,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}};var O=(0,f.I$)("Badge",e=>E(x(e)),N);let C=e=>{let{antCls:t,badgeFontHeight:n,marginXS:r,badgeRibbonOffset:o,calc:a}=e,l="".concat(t,"-ribbon"),i=(0,m.Z)(e,(e,t)=>{let{darkColor:n}=t;return{["&".concat(l,"-color-").concat(e)]:{background:n,color:n}}});return{["".concat(t,"-ribbon-wrapper")]:{position:"relative"},[l]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,d.Wf)(e)),{position:"absolute",top:r,padding:"0 ".concat((0,u.bf)(e.paddingXS)),color:e.colorPrimary,lineHeight:(0,u.bf)(n),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,["".concat(l,"-text")]:{color:e.badgeTextColor},["".concat(l,"-corner")]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:"".concat((0,u.bf)(a(o).div(2).equal())," solid"),transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),i),{["&".concat(l,"-placement-end")]:{insetInlineEnd:a(o).mul(-1).equal(),borderEndEndRadius:0,["".concat(l,"-corner")]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},["&".concat(l,"-placement-start")]:{insetInlineStart:a(o).mul(-1).equal(),borderEndStartRadius:0,["".concat(l,"-corner")]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}};var k=(0,f.I$)(["Badge","Ribbon"],e=>C(x(e)),N);let S=e=>{let t;let{prefixCls:n,value:o,current:l,offset:i=0}=e;return i&&(t={position:"absolute",top:"".concat(i,"00%"),left:0}),r.createElement("span",{style:t,className:a()("".concat(n,"-only-unit"),{current:l})},o)};var j=e=>{let t,n;let{prefixCls:o,count:a,value:l}=e,i=Number(l),c=Math.abs(a),[s,u]=r.useState(i),[d,m]=r.useState(c),b=()=>{u(i),m(c)};if(r.useEffect(()=>{let e=setTimeout(b,1e3);return()=>clearTimeout(e)},[i]),s===i||Number.isNaN(i)||Number.isNaN(s))t=[r.createElement(S,Object.assign({},e,{key:i,current:!0}))],n={transition:"none"};else{t=[];let o=i+10,a=[];for(let e=i;e<=o;e+=1)a.push(e);let l=de%10===s);t=(l<0?a.slice(0,u+1):a.slice(u)).map((t,n)=>r.createElement(S,Object.assign({},e,{key:t,value:t%10,offset:l<0?n-u:n,current:n===u}))),n={transform:"translateY(".concat(-function(e,t,n){let r=e,o=0;for(;(r+10)%10!==t;)r+=n,o+=n;return o}(s,i,l),"00%)")}}return r.createElement("span",{className:"".concat(o,"-only"),style:n,onTransitionEnd:b},t)},T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let R=r.forwardRef((e,t)=>{let{prefixCls:n,count:o,className:l,motionClassName:i,style:u,title:d,show:m,component:b="sup",children:f}=e,p=T(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:g}=r.useContext(s.E_),v=g("scroll-number",n),h=Object.assign(Object.assign({},p),{"data-show":m,style:u,className:a()(v,l,i),title:d}),w=o;if(o&&Number(o)%1==0){let e=String(o).split("");w=r.createElement("bdi",null,e.map((t,n)=>r.createElement(j,{prefixCls:v,count:Number(o),value:t,key:e.length-n})))}return((null==u?void 0:u.borderColor)&&(h.style=Object.assign(Object.assign({},u),{boxShadow:"0 0 0 1px ".concat(u.borderColor," inset")})),f)?(0,c.Tm)(f,e=>({className:a()("".concat(v,"-custom-component"),null==e?void 0:e.className,i)})):r.createElement(b,Object.assign({},h,{ref:t}),w)});var I=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let z=r.forwardRef((e,t)=>{var n,o,u,d,m;let{prefixCls:b,scrollNumberPrefixCls:f,children:p,status:g,text:v,color:h,count:w=null,overflowCount:y=99,dot:E=!1,size:x="default",title:N,offset:C,style:k,className:S,rootClassName:j,classNames:T,styles:z,showZero:F=!1}=e,Z=I(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:M,direction:P,badge:L}=r.useContext(s.E_),q=M("badge",b),[D,B,H]=O(q),W=w>y?"".concat(y,"+"):w,A="0"===W||0===W||"0"===v||0===v,V=null===w||A&&!F,_=(null!=g||null!=h)&&V,U=null!=g||!A,X=E&&!A,Y=X?"":W,J=(0,r.useMemo)(()=>((null==Y||""===Y)&&(null==v||""===v)||A&&!F)&&!X,[Y,A,F,X,v]),$=(0,r.useRef)(w);J||($.current=w);let G=$.current,K=(0,r.useRef)(Y);J||(K.current=Y);let Q=K.current,ee=(0,r.useRef)(X);J||(ee.current=X);let et=(0,r.useMemo)(()=>{if(!C)return Object.assign(Object.assign({},null==L?void 0:L.style),k);let e={marginTop:C[1]};return"rtl"===P?e.left=Number.parseInt(C[0],10):e.right=-Number.parseInt(C[0],10),Object.assign(Object.assign(Object.assign({},e),null==L?void 0:L.style),k)},[P,C,k,null==L?void 0:L.style]),en=null!=N?N:"string"==typeof G||"number"==typeof G?G:void 0,er=!J&&(0===v?F:!!v&&!0!==v),eo=er?r.createElement("span",{className:"".concat(q,"-status-text")},v):null,ea=G&&"object"==typeof G?(0,c.Tm)(G,e=>({style:Object.assign(Object.assign({},et),e.style)})):void 0,el=(0,i.o2)(h,!1),ei=a()(null==T?void 0:T.indicator,null===(n=null==L?void 0:L.classNames)||void 0===n?void 0:n.indicator,{["".concat(q,"-status-dot")]:_,["".concat(q,"-status-").concat(g)]:!!g,["".concat(q,"-color-").concat(h)]:el}),ec={};h&&!el&&(ec.color=h,ec.background=h);let es=a()(q,{["".concat(q,"-status")]:_,["".concat(q,"-not-a-wrapper")]:!p,["".concat(q,"-rtl")]:"rtl"===P},S,j,null==L?void 0:L.className,null===(o=null==L?void 0:L.classNames)||void 0===o?void 0:o.root,null==T?void 0:T.root,B,H);if(!p&&_&&(v||U||!V)){let e=et.color;return D(r.createElement("span",Object.assign({},Z,{className:es,style:Object.assign(Object.assign(Object.assign({},null==z?void 0:z.root),null===(u=null==L?void 0:L.styles)||void 0===u?void 0:u.root),et)}),r.createElement("span",{className:ei,style:Object.assign(Object.assign(Object.assign({},null==z?void 0:z.indicator),null===(d=null==L?void 0:L.styles)||void 0===d?void 0:d.indicator),ec)}),er&&r.createElement("span",{style:{color:e},className:"".concat(q,"-status-text")},v)))}return D(r.createElement("span",Object.assign({ref:t},Z,{className:es,style:Object.assign(Object.assign({},null===(m=null==L?void 0:L.styles)||void 0===m?void 0:m.root),null==z?void 0:z.root)}),p,r.createElement(l.ZP,{visible:!J,motionName:"".concat(q,"-zoom"),motionAppear:!1,motionDeadline:1e3},e=>{var t,n;let{className:o}=e,l=M("scroll-number",f),i=ee.current,c=a()(null==T?void 0:T.indicator,null===(t=null==L?void 0:L.classNames)||void 0===t?void 0:t.indicator,{["".concat(q,"-dot")]:i,["".concat(q,"-count")]:!i,["".concat(q,"-count-sm")]:"small"===x,["".concat(q,"-multiple-words")]:!i&&Q&&Q.toString().length>1,["".concat(q,"-status-").concat(g)]:!!g,["".concat(q,"-color-").concat(h)]:el}),s=Object.assign(Object.assign(Object.assign({},null==z?void 0:z.indicator),null===(n=null==L?void 0:L.styles)||void 0===n?void 0:n.indicator),et);return h&&!el&&((s=s||{}).background=h),r.createElement(R,{prefixCls:l,show:!J,motionClassName:o,className:c,count:Q,title:en,style:s,key:"scrollNumber"},ea)}),eo))});z.Ribbon=e=>{let{className:t,prefixCls:n,style:o,color:l,children:c,text:u,placement:d="end",rootClassName:m}=e,{getPrefixCls:b,direction:f}=r.useContext(s.E_),p=b("ribbon",n),g="".concat(p,"-wrapper"),[v,h,w]=k(p,g),y=(0,i.o2)(l,!1),E=a()(p,"".concat(p,"-placement-").concat(d),{["".concat(p,"-rtl")]:"rtl"===f,["".concat(p,"-color-").concat(l)]:y},t),x={},N={};return l&&!y&&(x.background=l,N.color=l),v(r.createElement("div",{className:a()(g,m,h,w)},c,r.createElement("div",{className:a()(E,h),style:Object.assign(Object.assign({},x),o)},r.createElement("span",{className:"".concat(p,"-text")},u),r.createElement("div",{className:"".concat(p,"-corner"),style:N}))))};var F=z},85238:function(e,t,n){let r;n.d(t,{u:function(){return j}});var o=n(2265),a=n(59456),l=n(93980),i=n(25289),c=n(73389),s=n(43507),u=n(180),d=n(67561),m=n(98218),b=n(28294),f=n(95504),p=n(72468),g=n(38929);function v(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:N)!==o.Fragment||1===o.Children.count(e.children)}let h=(0,o.createContext)(null);h.displayName="TransitionContext";var w=((r=w||{}).Visible="visible",r.Hidden="hidden",r);let y=(0,o.createContext)(null);function E(e){return"children"in e?E(e.children):e.current.filter(e=>{let{el:t}=e;return null!==t.current}).filter(e=>{let{state:t}=e;return"visible"===t}).length>0}function x(e,t){let n=(0,s.E)(e),r=(0,o.useRef)([]),c=(0,i.t)(),u=(0,a.G)(),d=(0,l.z)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.l4.Hidden,o=r.current.findIndex(t=>{let{el:n}=t;return n===e});-1!==o&&((0,p.E)(t,{[g.l4.Unmount](){r.current.splice(o,1)},[g.l4.Hidden](){r.current[o].state="hidden"}}),u.microTask(()=>{var e;!E(r)&&c.current&&(null==(e=n.current)||e.call(n))}))}),m=(0,l.z)(e=>{let t=r.current.find(t=>{let{el:n}=t;return n===e});return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>d(e,g.l4.Unmount)}),b=(0,o.useRef)([]),f=(0,o.useRef)(Promise.resolve()),v=(0,o.useRef)({enter:[],leave:[]}),h=(0,l.z)((e,n,r)=>{b.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(t=>{let[n]=t;return n!==e})),null==t||t.chains.current[n].push([e,new Promise(e=>{b.current.push(e)})]),null==t||t.chains.current[n].push([e,new Promise(e=>{Promise.all(v.current[n].map(e=>{let[t,n]=e;return n})).then(()=>e())})]),"enter"===n?f.current=f.current.then(()=>null==t?void 0:t.wait.current).then(()=>r(n)):r(n)}),w=(0,l.z)((e,t,n)=>{Promise.all(v.current[t].splice(0).map(e=>{let[t,n]=e;return n})).then(()=>{var e;null==(e=b.current.shift())||e()}).then(()=>n(t))});return(0,o.useMemo)(()=>({children:r,register:m,unregister:d,onStart:h,onStop:w,wait:f,chains:v}),[m,d,r,h,w,v,f])}y.displayName="NestingContext";let N=o.Fragment,O=g.VN.RenderStrategy,C=(0,g.yV)(function(e,t){let{show:n,appear:r=!1,unmount:a=!0,...i}=e,s=(0,o.useRef)(null),m=v(e),f=(0,d.T)(...m?[s,t]:null===t?[]:[t]);(0,u.H)();let p=(0,b.oJ)();if(void 0===n&&null!==p&&(n=(p&b.ZM.Open)===b.ZM.Open),void 0===n)throw Error("A is used but it is missing a `show={true | false}` prop.");let[w,N]=(0,o.useState)(n?"visible":"hidden"),C=x(()=>{n||N("hidden")}),[S,j]=(0,o.useState)(!0),T=(0,o.useRef)([n]);(0,c.e)(()=>{!1!==S&&T.current[T.current.length-1]!==n&&(T.current.push(n),j(!1))},[T,n]);let R=(0,o.useMemo)(()=>({show:n,appear:r,initial:S}),[n,r,S]);(0,c.e)(()=>{n?N("visible"):E(C)||null===s.current||N("hidden")},[n,C]);let I={unmount:a},z=(0,l.z)(()=>{var t;S&&j(!1),null==(t=e.beforeEnter)||t.call(e)}),F=(0,l.z)(()=>{var t;S&&j(!1),null==(t=e.beforeLeave)||t.call(e)}),Z=(0,g.L6)();return o.createElement(y.Provider,{value:C},o.createElement(h.Provider,{value:R},Z({ourProps:{...I,as:o.Fragment,children:o.createElement(k,{ref:f,...I,...i,beforeEnter:z,beforeLeave:F})},theirProps:{},defaultTag:o.Fragment,features:O,visible:"visible"===w,name:"Transition"})))}),k=(0,g.yV)(function(e,t){var n,r;let{transition:a=!0,beforeEnter:i,afterEnter:s,beforeLeave:w,afterLeave:C,enter:k,enterFrom:S,enterTo:j,entered:T,leave:R,leaveFrom:I,leaveTo:z,...F}=e,[Z,M]=(0,o.useState)(null),P=(0,o.useRef)(null),L=v(e),q=(0,d.T)(...L?[P,t,M]:null===t?[]:[t]),D=null==(n=F.unmount)||n?g.l4.Unmount:g.l4.Hidden,{show:B,appear:H,initial:W}=function(){let e=(0,o.useContext)(h);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[A,V]=(0,o.useState)(B?"visible":"hidden"),_=function(){let e=(0,o.useContext)(y);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:U,unregister:X}=_;(0,c.e)(()=>U(P),[U,P]),(0,c.e)(()=>{if(D===g.l4.Hidden&&P.current){if(B&&"visible"!==A){V("visible");return}return(0,p.E)(A,{hidden:()=>X(P),visible:()=>U(P)})}},[A,P,U,X,B,D]);let Y=(0,u.H)();(0,c.e)(()=>{if(L&&Y&&"visible"===A&&null===P.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[P,A,Y,L]);let J=W&&!H,$=H&&B&&W,G=(0,o.useRef)(!1),K=x(()=>{G.current||(V("hidden"),X(P))},_),Q=(0,l.z)(e=>{G.current=!0,K.onStart(P,e?"enter":"leave",e=>{"enter"===e?null==i||i():"leave"===e&&(null==w||w())})}),ee=(0,l.z)(e=>{let t=e?"enter":"leave";G.current=!1,K.onStop(P,t,e=>{"enter"===e?null==s||s():"leave"===e&&(null==C||C())}),"leave"!==t||E(K)||(V("hidden"),X(P))});(0,o.useEffect)(()=>{L&&a||(Q(B),ee(B))},[B,L,a]);let et=!(!a||!L||!Y||J),[,en]=(0,m.Y)(et,Z,B,{start:Q,end:ee}),er=(0,g.oA)({ref:q,className:(null==(r=(0,f.A)(F.className,$&&k,$&&S,en.enter&&k,en.enter&&en.closed&&S,en.enter&&!en.closed&&j,en.leave&&R,en.leave&&!en.closed&&I,en.leave&&en.closed&&z,!en.transition&&B&&T))?void 0:r.trim())||void 0,...(0,m.X)(en)}),eo=0;"visible"===A&&(eo|=b.ZM.Open),"hidden"===A&&(eo|=b.ZM.Closed),en.enter&&(eo|=b.ZM.Opening),en.leave&&(eo|=b.ZM.Closing);let ea=(0,g.L6)();return o.createElement(y.Provider,{value:K},o.createElement(b.up,{value:eo},ea({ourProps:er,theirProps:F,defaultTag:N,features:O,visible:"visible"===A,name:"Transition.Child"})))}),S=(0,g.yV)(function(e,t){let n=null!==(0,o.useContext)(h),r=null!==(0,b.oJ)();return o.createElement(o.Fragment,null,!n&&r?o.createElement(C,{ref:t,...e}):o.createElement(k,{ref:t,...e}))}),j=Object.assign(C,{Child:S,Root:C})}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1789-a56ee544e60cd01d.js b/litellm/proxy/_experimental/out/_next/static/chunks/1789-c534ff8966aa231a.js
similarity index 79%
rename from litellm/proxy/_experimental/out/_next/static/chunks/1789-a56ee544e60cd01d.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/1789-c534ff8966aa231a.js
index b252b89cf2f..a555310c8a2 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/1789-a56ee544e60cd01d.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/1789-c534ff8966aa231a.js
@@ -1 +1 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1789],{25512:function(e,s,l){l.d(s,{P:function(){return t.Z},Q:function(){return i.Z}});var t=l(27281),i=l(57365)},51789:function(e,s,l){l.d(s,{Z:function(){return e1}});var t=l(57437),i=l(2265),r=l(57840),n=l(51653),a=l(99376),o=l(10032),c=l(4260),d=l(5545),u=l(22116);l(25512);var m=l(78489),g=l(94789),p=l(12514),x=l(12485),h=l(18135),_=l(35242),f=l(29706),j=l(77991),y=l(21626),v=l(97214),b=l(28241),S=l(58834),Z=l(69552),w=l(71876),N=l(37592),I=l(4156),C=l(56522),k=l(19250),O=l(9114),E=l(85968);let T={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},L={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}};var P=e=>{let{isAddSSOModalVisible:s,isInstructionsModalVisible:l,handleAddSSOOk:r,handleAddSSOCancel:n,handleShowInstructions:a,handleInstructionsOk:m,handleInstructionsCancel:g,form:p,accessToken:x,ssoConfigured:h=!1}=e,[_,f]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(async()=>{if(s&&x)try{let s=await (0,k.getSSOSettings)(x);if(console.log("Raw SSO data received:",s),s&&s.values){var e,l,t,i,r,n;console.log("SSO values:",s.values),console.log("user_email from API:",s.values.user_email);let a=null;s.values.google_client_id?a="google":s.values.microsoft_client_id?a="microsoft":s.values.generic_client_id&&(a=(null===(e=s.values.generic_authorization_endpoint)||void 0===e?void 0:e.includes("okta"))||(null===(l=s.values.generic_authorization_endpoint)||void 0===l?void 0:l.includes("auth0"))?"okta":"generic");let o={};if(s.values.role_mappings){let e=s.values.role_mappings,l=e=>e&&0!==e.length?e.join(", "):"";o={use_role_mappings:!0,group_claim:e.group_claim,default_role:e.default_role||"internal_user",proxy_admin_teams:l(null===(t=e.roles)||void 0===t?void 0:t.proxy_admin),admin_viewer_teams:l(null===(i=e.roles)||void 0===i?void 0:i.proxy_admin_viewer),internal_user_teams:l(null===(r=e.roles)||void 0===r?void 0:r.internal_user),internal_viewer_teams:l(null===(n=e.roles)||void 0===n?void 0:n.internal_user_viewer)}}let c={sso_provider:a,proxy_base_url:s.values.proxy_base_url,user_email:s.values.user_email,...s.values,...o};console.log("Setting form values:",c),p.resetFields(),setTimeout(()=>{p.setFieldsValue(c),console.log("Form values set, current form values:",p.getFieldsValue())},100)}}catch(e){console.error("Failed to load SSO settings:",e)}})()},[s,x,p]);let j=async e=>{if(!x){O.Z.fromBackend("No access token available");return}try{let{proxy_admin_teams:s,admin_viewer_teams:l,internal_user_teams:t,internal_viewer_teams:i,default_role:r,group_claim:n,use_role_mappings:o,...c}=e,d={...c};if(o){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];d.role_mappings={provider:"generic",group_claim:n,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[r]||"internal_user",roles:{proxy_admin:e(s),proxy_admin_viewer:e(l),internal_user:e(t),internal_user_viewer:e(i)}}}await (0,k.updateSSOSettings)(x,d),a(e)}catch(e){O.Z.fromBackend("Failed to save SSO settings: "+(0,E.O)(e))}},y=async()=>{if(!x){O.Z.fromBackend("No access token available");return}try{await (0,k.updateSSOSettings)(x,{google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null}),p.resetFields(),f(!1),r(),O.Z.success("SSO settings cleared successfully")}catch(e){console.error("Failed to clear SSO settings:",e),O.Z.fromBackend("Failed to clear SSO settings")}},v=e=>{let s=L[e];return s?s.fields.map(e=>(0,t.jsx)(o.Z.Item,{label:e.label,name:e.name,rules:[{required:!0,message:"Please enter the ".concat(e.label.toLowerCase())}],children:e.name.includes("client")?(0,t.jsx)(c.default.Password,{}):(0,t.jsx)(C.o,{placeholder:e.placeholder})},e.name)):null};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Z,{title:h?"Edit SSO Settings":"Add SSO",visible:s,width:800,footer:null,onOk:r,onCancel:n,children:(0,t.jsxs)(o.Z,{form:p,onFinish:j,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Z.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(N.default,{children:Object.entries(T).map(e=>{let[s,l]=e;return(0,t.jsx)(N.default.Option,{value:s,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[l&&(0,t.jsx)("img",{src:l,alt:s,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsxs)("span",{children:["okta"===s.toLowerCase()?"Okta / Auth0":s.charAt(0).toUpperCase()+s.slice(1)," ","SSO"]})]})},s)})})}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.sso_provider!==s.sso_provider,children:e=>{let{getFieldValue:s}=e,l=s("sso_provider");return l?v(l):null}}),(0,t.jsx)(o.Z.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(C.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>null==e?void 0:e.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,s)=>s&&/^https?:\/\/.+/.test(s)&&s.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(C.o,{placeholder:"https://example.com"})}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.sso_provider!==s.sso_provider,children:e=>{let{getFieldValue:s}=e,l=s("sso_provider");return"okta"===l||"generic"===l?(0,t.jsx)(o.Z.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(I.Z,{})}):null}}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.use_role_mappings!==s.use_role_mappings,children:e=>{let{getFieldValue:s}=e;return s("use_role_mappings")?(0,t.jsx)(o.Z.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(C.o,{})}):null}}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.use_role_mappings!==s.use_role_mappings,children:e=>{let{getFieldValue:s}=e;return s("use_role_mappings")?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Z.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(N.default,{children:[(0,t.jsx)(N.default.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(N.default.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(N.default.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(N.default.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(o.Z.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(C.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(C.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(C.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(C.o,{})})]}):null}})]}),(0,t.jsxs)("div",{style:{textAlign:"right",marginTop:"10px",display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px"},children:[h&&(0,t.jsx)(d.ZP,{onClick:()=>f(!0),style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#5558eb",e.currentTarget.style.borderColor="#5558eb"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1",e.currentTarget.style.borderColor="#6366f1"},children:"Clear"}),(0,t.jsx)(d.ZP,{htmlType:"submit",children:"Save"})]})]})}),(0,t.jsxs)(u.Z,{title:"Confirm Clear SSO Settings",visible:_,onOk:y,onCancel:()=>f(!1),okText:"Yes, Clear",cancelText:"Cancel",okButtonProps:{danger:!0,style:{backgroundColor:"#dc2626",borderColor:"#dc2626"}},children:[(0,t.jsx)("p",{children:"Are you sure you want to clear all SSO settings? This action cannot be undone."}),(0,t.jsx)("p",{children:"Users will no longer be able to login using SSO after this change."})]}),(0,t.jsxs)(u.Z,{title:"SSO Setup Instructions",visible:l,width:800,footer:null,onOk:m,onCancel:g,children:[(0,t.jsx)("p",{children:"Follow these steps to complete the SSO setup:"}),(0,t.jsx)(C.x,{className:"mt-2",children:"1. DO NOT Exit this TAB"}),(0,t.jsx)(C.x,{className:"mt-2",children:"2. Open a new tab, visit your proxy base url"}),(0,t.jsx)(C.x,{className:"mt-2",children:"3. Confirm your SSO is configured correctly and you can login on the new Tab"}),(0,t.jsx)(C.x,{className:"mt-2",children:"4. If Step 3 is successful, you can close this tab"}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.ZP,{onClick:m,children:"Done"})})]})]})},A=l(67982),U=l(67101),R=l(84264),M=l(49566),z=l(96761),F=l(29233),G=l(62272),D=l(23639),B=l(92403),V=l(29271),q=l(34419),Y=e=>{let{accessToken:s,userID:l,proxySettings:r}=e,[n]=o.Z.useForm(),[a,c]=(0,i.useState)(!1),[d,u]=(0,i.useState)(null),[x,h]=(0,i.useState)("");(0,i.useEffect)(()=>{let e="";h(r&&r.PROXY_BASE_URL&&void 0!==r.PROXY_BASE_URL?r.PROXY_BASE_URL:window.location.origin)},[r]);let _="".concat(x,"/scim/v2"),f=async e=>{if(!s||!l){O.Z.fromBackend("You need to be logged in to create a SCIM token");return}try{c(!0);let t={key_alias:e.key_alias||"SCIM Access Token",team_id:null,models:[],allowed_routes:["/scim/*"]},i=await (0,k.keyCreateCall)(s,l,t);u(i),O.Z.success("SCIM token created successfully")}catch(e){console.error("Error creating SCIM token:",e),O.Z.fromBackend("Failed to create SCIM token: "+(0,E.O)(e))}finally{c(!1)}};return(0,t.jsx)(U.Z,{numItems:1,children:(0,t.jsxs)(p.Z,{children:[(0,t.jsx)("div",{className:"flex items-center mb-4",children:(0,t.jsx)(z.Z,{children:"SCIM Configuration"})}),(0,t.jsx)(R.Z,{className:"text-gray-600",children:"System for Cross-domain Identity Management (SCIM) allows you to automatically provision and manage users and groups in LiteLLM."}),(0,t.jsx)(A.Z,{}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"1"}),(0,t.jsxs)(z.Z,{className:"text-lg flex items-center",children:[(0,t.jsx)(G.Z,{className:"h-5 w-5 mr-2"}),"SCIM Tenant URL"]})]}),(0,t.jsx)(R.Z,{className:"text-gray-600 mb-3",children:"Use this URL in your identity provider SCIM integration settings."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(M.Z,{value:_,disabled:!0,className:"flex-grow"}),(0,t.jsx)(F.CopyToClipboard,{text:_,onCopy:()=>O.Z.success("URL copied to clipboard"),children:(0,t.jsxs)(m.Z,{variant:"primary",className:"ml-2 flex items-center",children:[(0,t.jsx)(D.Z,{className:"h-4 w-4 mr-1"}),"Copy"]})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"2"}),(0,t.jsxs)(z.Z,{className:"text-lg flex items-center",children:[(0,t.jsx)(B.Z,{className:"h-5 w-5 mr-2"}),"Authentication Token"]})]}),(0,t.jsx)(g.Z,{title:"Using SCIM",color:"blue",className:"mb-4",children:"You need a SCIM token to authenticate with the SCIM API. Create one below and use it in your SCIM provider configuration."}),d?(0,t.jsxs)(p.Z,{className:"border border-yellow-300 bg-yellow-50",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 text-yellow-800",children:[(0,t.jsx)(V.Z,{className:"h-5 w-5 mr-2"}),(0,t.jsx)(z.Z,{className:"text-lg text-yellow-800",children:"Your SCIM Token"})]}),(0,t.jsx)(R.Z,{className:"text-yellow-800 mb-4 font-medium",children:"Make sure to copy this token now. You will not be able to see it again."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(M.Z,{value:d.key,className:"flex-grow mr-2 bg-white",type:"password",disabled:!0}),(0,t.jsx)(F.CopyToClipboard,{text:d.key,onCopy:()=>O.Z.success("Token copied to clipboard"),children:(0,t.jsxs)(m.Z,{variant:"primary",className:"flex items-center",children:[(0,t.jsx)(D.Z,{className:"h-4 w-4 mr-1"}),"Copy"]})})]}),(0,t.jsxs)(m.Z,{className:"mt-4 flex items-center",variant:"secondary",onClick:()=>u(null),children:[(0,t.jsx)(q.Z,{className:"h-4 w-4 mr-1"}),"Create Another Token"]})]}):(0,t.jsx)("div",{className:"bg-gray-50 p-4 rounded-lg",children:(0,t.jsxs)(o.Z,{form:n,onFinish:f,layout:"vertical",children:[(0,t.jsx)(o.Z.Item,{name:"key_alias",label:"Token Name",rules:[{required:!0,message:"Please enter a name for your token"}],children:(0,t.jsx)(M.Z,{placeholder:"SCIM Access Token"})}),(0,t.jsx)(o.Z.Item,{children:(0,t.jsxs)(m.Z,{variant:"primary",type:"submit",loading:a,className:"flex items-center",children:[(0,t.jsx)(B.Z,{className:"h-4 w-4 mr-1"}),"Create SCIM Token"]})})]})})]})]})]})})},K=e=>{let{accessToken:s,onSuccess:l}=e,[r]=o.Z.useForm(),[n,a]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(async()=>{if(s)try{let e=await (0,k.getSSOSettings)(s);if(e&&e.values){let s=e.values.ui_access_mode,l={};s&&"object"==typeof s?l={ui_access_mode_type:s.type,restricted_sso_group:s.restricted_sso_group,sso_group_jwt_field:s.sso_group_jwt_field}:"string"==typeof s&&(l={ui_access_mode_type:s,restricted_sso_group:e.values.restricted_sso_group,sso_group_jwt_field:e.values.team_ids_jwt_field||e.values.sso_group_jwt_field}),r.setFieldsValue(l)}}catch(e){console.error("Failed to load UI access settings:",e)}})()},[s,r]);let c=async e=>{if(!s){O.Z.fromBackend("No access token available");return}a(!0);try{let t;t="all_authenticated_users"===e.ui_access_mode_type?{ui_access_mode:"none"}:{ui_access_mode:{type:e.ui_access_mode_type,restricted_sso_group:e.restricted_sso_group,sso_group_jwt_field:e.sso_group_jwt_field}},await (0,k.updateSSOSettings)(s,t),l()}catch(e){console.error("Failed to save UI access settings:",e),O.Z.fromBackend("Failed to save UI access settings")}finally{a(!1)}};return(0,t.jsxs)("div",{style:{padding:"16px"},children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},children:(0,t.jsx)(C.x,{style:{fontSize:"14px",color:"#6b7280"},children:"Configure who can access the UI interface and how group information is extracted from JWT tokens."})}),(0,t.jsxs)(o.Z,{form:r,onFinish:c,layout:"vertical",children:[(0,t.jsx)(o.Z.Item,{label:"UI Access Mode",name:"ui_access_mode_type",tooltip:"Controls who can access the UI interface",children:(0,t.jsxs)(N.default,{placeholder:"Select access mode",children:[(0,t.jsx)(N.default.Option,{value:"all_authenticated_users",children:"All Authenticated Users"}),(0,t.jsx)(N.default.Option,{value:"restricted_sso_group",children:"Restricted SSO Group"})]})}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.ui_access_mode_type!==s.ui_access_mode_type,children:e=>{let{getFieldValue:s}=e;return"restricted_sso_group"===s("ui_access_mode_type")?(0,t.jsx)(o.Z.Item,{label:"Restricted SSO Group",name:"restricted_sso_group",rules:[{required:!0,message:"Please enter the restricted SSO group"}],children:(0,t.jsx)(C.o,{placeholder:"ui-access-group"})}):null}}),(0,t.jsx)(o.Z.Item,{label:"SSO Group JWT Field",name:"sso_group_jwt_field",tooltip:"JWT field name that contains team/group information. Use dot notation to access nested fields.",children:(0,t.jsx)(C.o,{placeholder:"groups"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"16px"},children:(0,t.jsx)(d.ZP,{type:"primary",htmlType:"submit",loading:n,style:{backgroundColor:"#6366f1",borderColor:"#6366f1"},children:"Update UI Access Control"})})]})]})},H=l(12363),W=l(55584),Q=l(29827),J=l(21770),X=l(90246);let $=(0,X.n)("uiSettings"),ee=e=>{let s=(0,Q.NL)();return(0,J.D)({mutationFn:async s=>{if(!e)throw Error("Access token is required");return(0,k.updateUiSettings)(e,s)},onSuccess:()=>{s.invalidateQueries({queryKey:$.all})}})};var es=l(39760),el=l(1633);let et={"api-keys":"Manage virtual keys for API access and authentication","llm-playground":"Interactive playground for testing LLM requests",models:"Configure and manage LLM models and endpoints",agents:"Create and manage AI agents","mcp-servers":"Configure Model Context Protocol servers",guardrails:"Set up content moderation and safety guardrails",policies:"Define access control and usage policies","search-tools":"Configure RAG search and retrieval tools","vector-stores":"Manage vector databases for embeddings",new_usage:"View usage analytics and metrics",logs:"Access request and response logs",users:"Manage internal user accounts and permissions",teams:"Create and manage teams for access control",organizations:"Manage organizations and their members",budgets:"Set and monitor spending budgets",api_ref:"Browse API documentation and endpoints","model-hub-table":"Explore available AI models and providers","learning-resources":"Access tutorials and documentation",caching:"Configure response caching settings","transform-request":"Set up request transformation rules","cost-tracking":"Track and analyze API costs","ui-theme":"Customize dashboard appearance","tag-management":"Organize resources with tags",prompts:"Manage and version prompt templates","claude-code-plugins":"Configure Claude Code plugins",usage:"View legacy usage dashboard","router-settings":"Configure routing and load balancing settings","logging-and-alerts":"Set up logging and alert configurations","admin-panel":"Access admin panel and settings"};var ei=l(20347);let er=e=>!e||0===e.length||e.some(e=>ei.lo.includes(e)),en=()=>{let e=[];return el.j.forEach(s=>{s.items.forEach(l=>{if(l.page&&"tools"!==l.page&&"experimental"!==l.page&&"settings"!==l.page&&er(l.roles)){let t="string"==typeof l.label?l.label:l.key;e.push({page:l.page,label:t,group:s.groupLabel,description:et[l.page]||"No description available"})}if(l.children){let t="string"==typeof l.label?l.label:l.key;l.children.forEach(l=>{if(er(l.roles)){let i="string"==typeof l.label?l.label:l.key;e.push({page:l.page,label:i,group:"".concat(s.groupLabel," > ").concat(t),description:et[l.page]||"No description available"})}})}})}),e};var ea=l(58760),eo=l(3810),ec=l(44851);function ed(e){let{enabledPagesInternalUsers:s,enabledPagesPropertyDescription:l,isUpdating:n,onUpdate:a}=e,o=null!=s,c=(0,i.useMemo)(()=>en(),[]),u=(0,i.useMemo)(()=>{let e={};return c.forEach(s=>{e[s.group]||(e[s.group]=[]),e[s.group].push(s)}),e},[c]),[m,g]=(0,i.useState)(s||[]);return(0,i.useMemo)(()=>{s?g(s):g([])},[s]),(0,t.jsxs)(ea.Z,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsxs)(ea.Z,{direction:"vertical",size:4,children:[(0,t.jsxs)(ea.Z,{align:"center",children:[(0,t.jsx)(r.default.Text,{strong:!0,children:"Internal User Page Visibility"}),!o&&(0,t.jsx)(eo.Z,{color:"default",style:{marginLeft:"8px"},children:"Not set (all pages visible)"}),o&&(0,t.jsxs)(eo.Z,{color:"blue",style:{marginLeft:"8px"},children:[m.length," page",1!==m.length?"s":""," selected"]})]}),l&&(0,t.jsx)(r.default.Text,{type:"secondary",children:l}),(0,t.jsx)(r.default.Text,{type:"secondary",style:{fontSize:"12px",fontStyle:"italic"},children:"By default, all pages are visible to internal users. Select specific pages to restrict visibility."}),(0,t.jsx)(r.default.Text,{type:"secondary",style:{fontSize:"12px",color:"#8b5cf6"},children:"Note: Only pages accessible to internal user roles are shown here. Admin-only pages are excluded as they cannot be made visible to internal users regardless of this setting."})]}),(0,t.jsx)(ec.default,{items:[{key:"page-visibility",label:"Configure Page Visibility",children:(0,t.jsxs)(ea.Z,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsx)(I.Z.Group,{value:m,onChange:g,style:{width:"100%"},children:(0,t.jsx)(ea.Z,{direction:"vertical",size:"middle",style:{width:"100%"},children:Object.entries(u).map(e=>{let[s,l]=e;return(0,t.jsxs)("div",{children:[(0,t.jsx)(r.default.Text,{strong:!0,style:{fontSize:"11px",color:"#6b7280",letterSpacing:"0.05em",display:"block",marginBottom:"8px"},children:s}),(0,t.jsx)(ea.Z,{direction:"vertical",size:"small",style:{marginLeft:"16px",width:"100%"},children:l.map(e=>(0,t.jsx)("div",{style:{marginBottom:"4px"},children:(0,t.jsx)(I.Z,{value:e.page,children:(0,t.jsxs)(ea.Z,{direction:"vertical",size:0,children:[(0,t.jsx)(r.default.Text,{children:e.label}),(0,t.jsx)(r.default.Text,{type:"secondary",style:{fontSize:"12px"},children:e.description})]})})},e.page))})]},s)})})}),(0,t.jsxs)(ea.Z,{children:[(0,t.jsx)(d.ZP,{type:"primary",onClick:()=>{a({enabled_ui_pages_internal_users:m.length>0?m:null})},loading:n,disabled:n,children:"Save Page Visibility Settings"}),o&&(0,t.jsx)(d.ZP,{onClick:()=>{g([]),a({enabled_ui_pages_internal_users:null})},loading:n,disabled:n,children:"Reset to Default (All Pages)"})]})]})}]})]})}var eu=l(5945),em=l(50337),eg=l(63709),ep=l(23496);function ex(){var e,s,l,i,a,o;let{accessToken:c}=(0,es.Z)(),{data:d,isLoading:u,isError:m,error:g}=(0,W.L)(),{mutate:p,isPending:x,error:h}=ee(c),_=null==d?void 0:d.field_schema,f=null==_?void 0:null===(e=_.properties)||void 0===e?void 0:e.disable_model_add_for_internal_users,j=null==_?void 0:null===(s=_.properties)||void 0===s?void 0:s.disable_team_admin_delete_team_user,y=null==_?void 0:null===(l=_.properties)||void 0===l?void 0:l.enabled_ui_pages_internal_users,v=null!==(i=null==d?void 0:d.values)&&void 0!==i?i:{},b=!!v.disable_model_add_for_internal_users,S=!!v.disable_team_admin_delete_team_user;return(0,t.jsx)(eu.Z,{title:"UI Settings",children:u?(0,t.jsx)(em.Z,{active:!0}):m?(0,t.jsx)(n.Z,{type:"error",message:"Could not load UI settings",description:g instanceof Error?g.message:void 0}):(0,t.jsxs)(ea.Z,{direction:"vertical",size:"large",style:{width:"100%"},children:[(null==_?void 0:_.description)&&(0,t.jsx)(r.default.Paragraph,{style:{marginBottom:0},children:_.description}),h&&(0,t.jsx)(n.Z,{type:"error",message:"Could not update UI settings",description:h instanceof Error?h.message:void 0}),(0,t.jsxs)(ea.Z,{align:"start",size:"middle",children:[(0,t.jsx)(eg.Z,{checked:b,disabled:x,loading:x,onChange:e=>{p({disable_model_add_for_internal_users:e},{onSuccess:()=>{O.Z.success("UI settings updated successfully")},onError:e=>{O.Z.fromBackend(e)}})},"aria-label":null!==(a=null==f?void 0:f.description)&&void 0!==a?a:"Disable model add for internal users"}),(0,t.jsxs)(ea.Z,{direction:"vertical",size:4,children:[(0,t.jsx)(r.default.Text,{strong:!0,children:"Disable model add for internal users"}),(null==f?void 0:f.description)&&(0,t.jsx)(r.default.Text,{type:"secondary",children:f.description})]})]}),(0,t.jsxs)(ea.Z,{align:"start",size:"middle",children:[(0,t.jsx)(eg.Z,{checked:S,disabled:x,loading:x,onChange:e=>{p({disable_team_admin_delete_team_user:e},{onSuccess:()=>{O.Z.success("UI settings updated successfully")},onError:e=>{O.Z.fromBackend(e)}})},"aria-label":null!==(o=null==j?void 0:j.description)&&void 0!==o?o:"Disable team admin delete team user"}),(0,t.jsxs)(ea.Z,{direction:"vertical",size:4,children:[(0,t.jsx)(r.default.Text,{strong:!0,children:"Disable team admin delete team user"}),(null==j?void 0:j.description)&&(0,t.jsx)(r.default.Text,{type:"secondary",children:j.description})]})]}),(0,t.jsx)(ep.Z,{}),(0,t.jsx)(ed,{enabledPagesInternalUsers:v.enabled_ui_pages_internal_users,enabledPagesPropertyDescription:null==y?void 0:y.description,isUpdating:x,onUpdate:e=>{p(e,{onSuccess:()=>{O.Z.success("Page visibility settings updated successfully")},onError:e=>{O.Z.fromBackend(e)}})}})]})})}var eh=l(11713);let e_=(0,X.n)("sso"),ef=()=>{let{accessToken:e,userId:s,userRole:l}=(0,es.Z)();return(0,eh.a)({queryKey:e_.detail("settings"),queryFn:async()=>await (0,k.getSSOSettings)(e),enabled:!!(e&&s&&l)})};var ej=l(76188),ey=l(88906),ev=l(15868),eb=l(18930);let eS={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},eZ={google:"Google SSO",microsoft:"Microsoft SSO",okta:"Okta / Auth0 SSO",generic:"Generic SSO"},ew={internal_user_viewer:"Internal Viewer",internal_user:"Internal User",proxy_admin_viewer:"Proxy Admin Viewer",proxy_admin:"Proxy Admin"};var eN=l(31283);let eI={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}},eC=e=>{let s=eI[e];return s?s.fields.map(e=>(0,t.jsx)(o.Z.Item,{label:e.label,name:e.name,rules:[{required:!0,message:"Please enter the ".concat(e.label.toLowerCase())}],children:e.name.includes("client")?(0,t.jsx)(c.default.Password,{}):(0,t.jsx)(eN.o,{placeholder:e.placeholder})},e.name)):null};var ek=e=>{let{form:s,onFormSubmit:l}=e;return(0,t.jsx)("div",{children:(0,t.jsxs)(o.Z,{form:s,onFinish:l,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(o.Z.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(N.default,{children:Object.entries(eS).map(e=>{let[s,l]=e;return(0,t.jsx)(N.default.Option,{value:s,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[l&&(0,t.jsx)("img",{src:l,alt:s,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsx)("span",{children:eZ[s]||s.charAt(0).toUpperCase()+s.slice(1)+" SSO"})]})},s)})})}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.sso_provider!==s.sso_provider,children:e=>{let{getFieldValue:s}=e,l=s("sso_provider");return l?eC(l):null}}),(0,t.jsx)(o.Z.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(eN.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>null==e?void 0:e.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,s)=>s&&/^https?:\/\/.+/.test(s)&&s.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(eN.o,{placeholder:"https://example.com"})}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.sso_provider!==s.sso_provider,children:e=>{let{getFieldValue:s}=e,l=s("sso_provider");return"okta"===l||"generic"===l?(0,t.jsx)(o.Z.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(I.Z,{})}):null}}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.use_role_mappings!==s.use_role_mappings||e.sso_provider!==s.sso_provider,children:e=>{let{getFieldValue:s}=e,l=s("use_role_mappings"),i=s("sso_provider");return l&&("okta"===i||"generic"===i)?(0,t.jsx)(o.Z.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(eN.o,{})}):null}}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.use_role_mappings!==s.use_role_mappings||e.sso_provider!==s.sso_provider,children:e=>{let{getFieldValue:s}=e,l=s("use_role_mappings"),i=s("sso_provider");return l&&("okta"===i||"generic"===i)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Z.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(N.default,{children:[(0,t.jsx)(N.default.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(N.default.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(N.default.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(N.default.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(o.Z.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(eN.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(eN.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(eN.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(eN.o,{})})]}):null}})]})})};let eO=()=>{let{accessToken:e}=(0,es.Z)();return(0,J.D)({mutationFn:async s=>{if(!e)throw Error("Access token is required");return await (0,k.updateSSOSettings)(e,s)}})},eE=e=>{let{proxy_admin_teams:s,admin_viewer_teams:l,internal_user_teams:t,internal_viewer_teams:i,default_role:r,group_claim:n,use_role_mappings:a,...o}=e,c={...o};if(a){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];c.role_mappings={provider:"generic",group_claim:n,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[r]||"internal_user",roles:{proxy_admin:e(s),proxy_admin_viewer:e(l),internal_user:e(t),internal_user_viewer:e(i)}}}return c},eT=e=>{if(e.google_client_id)return"google";if(e.microsoft_client_id)return"microsoft";if(e.generic_client_id){var s,l;return(null===(s=e.generic_authorization_endpoint)||void 0===s?void 0:s.includes("okta"))||(null===(l=e.generic_authorization_endpoint)||void 0===l?void 0:l.includes("auth0"))?"okta":"generic"}return null};var eL=e=>{let{isVisible:s,onCancel:l,onSuccess:i}=e,[r]=o.Z.useForm(),{mutateAsync:n,isPending:a}=eO(),c=async e=>{let s=eE(e);await n(s,{onSuccess:()=>{O.Z.success("SSO settings added successfully"),i()},onError:e=>{O.Z.fromBackend("Failed to save SSO settings: "+(0,E.O)(e))}})},m=()=>{r.resetFields(),l()};return(0,t.jsx)(u.Z,{title:"Add SSO",open:s,width:800,footer:(0,t.jsxs)(ea.Z,{children:[(0,t.jsx)(d.ZP,{onClick:m,disabled:a,children:"Cancel"}),(0,t.jsx)(d.ZP,{loading:a,onClick:()=>r.submit(),children:a?"Adding...":"Add SSO"})]}),onCancel:m,children:(0,t.jsx)(ek,{form:r,onFormSubmit:c})})},eP=l(21609),eA=e=>{let{isVisible:s,onCancel:l,onSuccess:i}=e,{data:r}=ef(),{mutateAsync:n,isPending:a}=eO(),o=async()=>{await n({google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null},{onSuccess:()=>{O.Z.success("SSO settings cleared successfully"),l(),i()},onError:e=>{O.Z.fromBackend("Failed to clear SSO settings: "+(0,E.O)(e))}})};return(0,t.jsx)(eP.Z,{isOpen:s,title:"Confirm Clear SSO Settings",alertMessage:"This action cannot be undone.",message:"Are you sure you want to clear all SSO settings? Users will no longer be able to login using SSO after this change.",resourceInformationTitle:"SSO Settings",resourceInformation:[{label:"Provider",value:(null==r?void 0:r.values)&&eT(null==r?void 0:r.values)||"Generic"}],onCancel:l,onOk:o,confirmLoading:a})},eU=e=>{let{isVisible:s,onCancel:l,onSuccess:r}=e,[n]=o.Z.useForm(),a=ef(),{mutateAsync:c,isPending:m}=eO();(0,i.useEffect)(()=>{if(s&&a.data&&a.data.values){var e,l,t,i,r,o;let s=a.data;console.log("Raw SSO data received:",s),console.log("SSO values:",s.values),console.log("user_email from API:",s.values.user_email);let c=null;s.values.google_client_id?c="google":s.values.microsoft_client_id?c="microsoft":s.values.generic_client_id&&(c=(null===(e=s.values.generic_authorization_endpoint)||void 0===e?void 0:e.includes("okta"))||(null===(l=s.values.generic_authorization_endpoint)||void 0===l?void 0:l.includes("auth0"))?"okta":"generic");let d={};if(s.values.role_mappings){let e=s.values.role_mappings,l=e=>e&&0!==e.length?e.join(", "):"";d={use_role_mappings:!0,group_claim:e.group_claim,default_role:e.default_role||"internal_user",proxy_admin_teams:l(null===(t=e.roles)||void 0===t?void 0:t.proxy_admin),admin_viewer_teams:l(null===(i=e.roles)||void 0===i?void 0:i.proxy_admin_viewer),internal_user_teams:l(null===(r=e.roles)||void 0===r?void 0:r.internal_user),internal_viewer_teams:l(null===(o=e.roles)||void 0===o?void 0:o.internal_user_viewer)}}let u={sso_provider:c,...s.values,...d};console.log("Setting form values:",u),n.resetFields(),setTimeout(()=>{n.setFieldsValue(u),console.log("Form values set, current form values:",n.getFieldsValue())},100)}},[s,a.data,n]);let g=async e=>{try{let s=eE(e);await c(s,{onSuccess:()=>{O.Z.success("SSO settings updated successfully"),r()},onError:e=>{O.Z.fromBackend("Failed to save SSO settings: "+(0,E.O)(e))}})}catch(e){O.Z.fromBackend("Failed to process SSO settings: "+(0,E.O)(e))}},p=()=>{n.resetFields(),l()};return(0,t.jsx)(u.Z,{title:"Edit SSO Settings",open:s,width:800,footer:(0,t.jsxs)(ea.Z,{children:[(0,t.jsx)(d.ZP,{onClick:p,disabled:m,children:"Cancel"}),(0,t.jsx)(d.ZP,{loading:m,onClick:()=>n.submit(),children:m?"Saving...":"Save"})]}),onCancel:p,children:(0,t.jsx)(ek,{form:n,onFormSubmit:g})})},eR=l(42208),eM=l(87769);function ez(e){let{defaultHidden:s=!0,value:l}=e,[r,n]=(0,i.useState)(s);return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-gray-600 flex-1",children:l?r?"•".repeat(l.length):l:(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"})}),l&&(0,t.jsx)(d.ZP,{type:"text",size:"small",icon:r?(0,t.jsx)(eR.Z,{className:"w-4 h-4"}):(0,t.jsx)(eM.Z,{className:"w-4 h-4"}),onClick:()=>n(!r),className:"text-gray-400 hover:text-gray-600"})]})}var eF=l(56609),eG=l(95805);let{Title:eD,Text:eB}=r.default;function eV(e){let{roleMappings:s}=e;if(!s)return null;let l=[{title:"Role",dataIndex:"role",key:"role",render:e=>(0,t.jsx)(eB,{strong:!0,children:ew[e]})},{title:"Mapped Groups",dataIndex:"groups",key:"groups",render:e=>(0,t.jsx)(t.Fragment,{children:e.length>0?e.map((e,s)=>(0,t.jsx)(eo.Z,{color:"blue",children:e},s)):(0,t.jsx)(eB,{className:"text-gray-400 italic",children:"No groups mapped"})})}];return(0,t.jsxs)(eu.Z,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(eG.Z,{className:"w-6 h-6 text-gray-400 mb-2"}),(0,t.jsx)(eD,{level:3,children:"Role Mappings"})]}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eD,{level:5,children:"Group Claim"}),(0,t.jsx)("div",{children:(0,t.jsx)(eB,{code:!0,children:s.group_claim})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eD,{level:5,children:"Default Role"}),(0,t.jsx)("div",{children:(0,t.jsx)(eB,{strong:!0,children:ew[s.default_role]})})]})]}),(0,t.jsx)(ep.Z,{}),(0,t.jsx)(eF.Z,{columns:l,dataSource:Object.entries(s.roles).map(e=>{let[s,l]=e;return{role:s,groups:l}}),pagination:!1,bordered:!0,size:"small",className:"w-full"})]})]})}var eq=l(85180);let{Title:eY,Paragraph:eK}=r.default;function eH(e){let{onAdd:s}=e;return(0,t.jsx)("div",{className:"bg-white p-12 rounded-lg border border-dashed border-gray-300 text-center w-full",children:(0,t.jsx)(eq.Z,{image:eq.Z.PRESENTED_IMAGE_SIMPLE,description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(eY,{level:4,children:"No SSO Configuration Found"}),(0,t.jsx)(eK,{type:"secondary",className:"max-w-md mx-auto",children:"Configure Single Sign-On (SSO) to enable seamless authentication for your team members using your identity provider."})]}),children:(0,t.jsx)(d.ZP,{type:"primary",size:"large",onClick:s,className:"flex items-center gap-2 mx-auto mt-4",children:"Configure SSO"})})})}let{Title:eW,Text:eQ}=r.default;function eJ(){return(0,t.jsx)(eu.Z,{children:(0,t.jsxs)(ea.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(ey.Z,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eW,{level:3,children:"SSO Configuration"}),(0,t.jsx)(eQ,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(em.Z.Button,{active:!0,size:"default",style:{width:170,height:32}}),(0,t.jsx)(em.Z.Button,{active:!0,size:"default",style:{width:190,height:32}})]})]}),(0,t.jsxs)(ej.Z,{bordered:!0,column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1},children:[(0,t.jsx)(ej.Z.Item,{label:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:100,height:16}})})}),(0,t.jsx)(ej.Z.Item,{label:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:200,height:16}})}),(0,t.jsx)(ej.Z.Item,{label:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:250,height:16}})}),(0,t.jsx)(ej.Z.Item,{label:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:180,height:16}})}),(0,t.jsx)(ej.Z.Item,{label:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:220,height:16}})})]})]})})}let{Title:eX,Text:e$}=r.default;function e0(){let{data:e,refetch:s,isLoading:l}=ef(),[r,n]=(0,i.useState)(!1),[a,o]=(0,i.useState)(!1),[c,u]=(0,i.useState)(!1),m=!!(null==e?void 0:e.values.google_client_id)||!!(null==e?void 0:e.values.microsoft_client_id)||!!(null==e?void 0:e.values.generic_client_id),g=(null==e?void 0:e.values)?eT(e.values):null,p=!!(null==e?void 0:e.values.role_mappings),x=e=>(0,t.jsx)(e$,{className:"font-mono text-gray-600 text-sm",copyable:!!e,children:e||"-"}),h=e=>e||(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"}),_={column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}},f={google:{providerText:eZ.google,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ez,{value:e.google_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ez,{value:e.google_client_secret})},{label:"Proxy Base URL",render:e=>h(e.proxy_base_url)}]},microsoft:{providerText:eZ.microsoft,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ez,{value:e.microsoft_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ez,{value:e.microsoft_client_secret})},{label:"Tenant",render:e=>h(e.microsoft_tenant)},{label:"Proxy Base URL",render:e=>h(e.proxy_base_url)}]},okta:{providerText:eZ.okta,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ez,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ez,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>x(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>x(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>x(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>h(e.proxy_base_url)}]},generic:{providerText:eZ.generic,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ez,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ez,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>x(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>x(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>x(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>h(e.proxy_base_url)}]}};return(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(eJ,{}):(0,t.jsxs)(ea.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(eu.Z,{children:(0,t.jsxs)(ea.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(ey.Z,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eX,{level:3,children:"SSO Configuration"}),(0,t.jsx)(e$,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:m&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.ZP,{icon:(0,t.jsx)(ev.Z,{className:"w-4 h-4"}),onClick:()=>u(!0),children:"Edit SSO Settings"}),(0,t.jsx)(d.ZP,{danger:!0,icon:(0,t.jsx)(eb.Z,{className:"w-4 h-4"}),onClick:()=>n(!0),children:"Delete SSO Settings"})]})})]}),m?(()=>{if(!(null==e?void 0:e.values)||!g)return null;let{values:s}=e,l=f[g];return l?(0,t.jsxs)(ej.Z,{bordered:!0,..._,children:[(0,t.jsx)(ej.Z.Item,{label:"Provider",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[eS[g]&&(0,t.jsx)("img",{src:eS[g],alt:g,style:{height:24,width:24,objectFit:"contain"}}),(0,t.jsx)("span",{children:l.providerText})]})}),l.fields.map((e,l)=>(0,t.jsx)(ej.Z.Item,{label:e.label,children:e.render(s)},l))]}):null})():(0,t.jsx)(eH,{onAdd:()=>o(!0)})]})}),p&&(0,t.jsx)(eV,{roleMappings:null==e?void 0:e.values.role_mappings})]}),(0,t.jsx)(eA,{isVisible:r,onCancel:()=>n(!1),onSuccess:()=>s()}),(0,t.jsx)(eL,{isVisible:a,onCancel:()=>o(!1),onSuccess:()=>{o(!1),s()}}),(0,t.jsx)(eU,{isVisible:c,onCancel:()=>u(!1),onSuccess:()=>{u(!1),s()}})]})}var e1=e=>{let{searchParams:s,accessToken:l,userID:N,showSSOBanner:I,premiumUser:C,proxySettings:E,userRole:T}=e,[L]=o.Z.useForm(),[A]=o.Z.useForm(),{Title:U,Paragraph:R}=r.default,[M,z]=(0,i.useState)(""),[F,G]=(0,i.useState)(null),[D,B]=(0,i.useState)(null),[V,q]=(0,i.useState)(!1),[W,Q]=(0,i.useState)(!1),[J,X]=(0,i.useState)(!1),[$,ee]=(0,i.useState)(!1),[es,el]=(0,i.useState)(!1),[et,ei]=(0,i.useState)(!1),[er,en]=(0,i.useState)(!1),[ea,eo]=(0,i.useState)(!1),[ec,ed]=(0,i.useState)(!1),[eu,em]=(0,i.useState)(!1),[eg,ep]=(0,i.useState)([]),[eh,e_]=(0,i.useState)(null),[ef,ej]=(0,i.useState)(!1);(0,a.useRouter)();let[ey,ev]=(0,i.useState)(null);console.log=function(){};let eb=(0,H.n)(),eS="All IP Addresses Allowed",eZ=eb;eZ+="/fallback/login";let ew=async()=>{if(l)try{let e=await (0,k.getSSOSettings)(l);if(console.log("SSO data:",e),e&&e.values){let s=e.values.google_client_id&&e.values.google_client_secret,l=e.values.microsoft_client_id&&e.values.microsoft_client_secret,t=e.values.generic_client_id&&e.values.generic_client_secret;ej(s||l||t)}else ej(!1)}catch(e){console.error("Error checking SSO configuration:",e),ej(!1)}},eN=async()=>{try{if(!0!==C){O.Z.fromBackend("This feature is only available for premium users. Please upgrade your account.");return}if(l){let e=await (0,k.getAllowedIPs)(l);ep(e&&e.length>0?e:[eS])}else ep([eS])}catch(e){console.error("Error fetching allowed IPs:",e),O.Z.fromBackend("Failed to fetch allowed IPs ".concat(e)),ep([eS])}finally{!0===C&&en(!0)}},eI=async e=>{try{if(l){await (0,k.addAllowedIP)(l,e.ip);let s=await (0,k.getAllowedIPs)(l);ep(s),O.Z.success("IP address added successfully")}}catch(e){console.error("Error adding IP:",e),O.Z.fromBackend("Failed to add IP address ".concat(e))}finally{eo(!1)}},eC=async e=>{e_(e),ed(!0)},ek=async()=>{if(eh&&l)try{await (0,k.deleteAllowedIP)(l,eh);let e=await (0,k.getAllowedIPs)(l);ep(e.length>0?e:[eS]),O.Z.success("IP address deleted successfully")}catch(e){console.error("Error deleting IP:",e),O.Z.fromBackend("Failed to delete IP address ".concat(e))}finally{ed(!1),e_(null)}};(0,i.useEffect)(()=>{(async()=>{if(null!=l){let e=[],s=await (0,k.userGetAllUsersCall)(l,"proxy_admin_viewer");console.log("proxy admin viewer response: ",s);let t=s.users;console.log("proxy viewers response: ".concat(t)),t.forEach(s=>{e.push({user_role:s.user_role,user_id:s.user_id,user_email:s.user_email})}),console.log("proxy viewers: ".concat(t));let i=(await (0,k.userGetAllUsersCall)(l,"proxy_admin")).users;i.forEach(s=>{e.push({user_role:s.user_role,user_id:s.user_id,user_email:s.user_email})}),console.log("proxy admins: ".concat(i)),console.log("combinedList: ".concat(e)),G(e),ev(await (0,k.getPossibleUserRoles)(l))}})()},[l]),(0,i.useEffect)(()=>{ew()},[l,C]);let eO=()=>{em(!1)};return console.log("admins: ".concat(null==F?void 0:F.length)),(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsx)(U,{level:4,children:"Admin Access "}),(0,t.jsx)(R,{children:"Go to 'Internal Users' page to add other admins."}),(0,t.jsxs)(h.Z,{children:[(0,t.jsxs)(_.Z,{children:[(0,t.jsx)(x.Z,{children:"SSO Settings"}),(0,t.jsx)(x.Z,{children:"Security Settings"}),(0,t.jsx)(x.Z,{children:"SCIM"}),(0,t.jsx)(x.Z,{children:"UI Settings"})]}),(0,t.jsxs)(j.Z,{children:[(0,t.jsx)(f.Z,{children:(0,t.jsx)(e0,{})}),(0,t.jsxs)(f.Z,{children:[(0,t.jsxs)(p.Z,{children:[(0,t.jsx)(U,{level:4,children:" ✨ Security Settings"}),(0,t.jsx)(n.Z,{message:"SSO Configuration Deprecated",description:"Editing SSO Settings on this page is deprecated and will be removed in a future version. Please use the SSO Settings tab for SSO configuration.",type:"warning",showIcon:!0}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",marginTop:"1rem",marginLeft:"0.5rem"},children:[(0,t.jsx)("div",{children:(0,t.jsx)(m.Z,{style:{width:"150px"},onClick:()=>el(!0),children:ef?"Edit SSO Settings":"Add SSO"})}),(0,t.jsx)("div",{children:(0,t.jsx)(m.Z,{style:{width:"150px"},onClick:eN,children:"Allowed IPs"})}),(0,t.jsx)("div",{children:(0,t.jsx)(m.Z,{style:{width:"150px"},onClick:()=>!0===C?em(!0):O.Z.fromBackend("Only premium users can configure UI access control"),children:"UI Access Control"})})]})]}),(0,t.jsxs)("div",{className:"flex justify-start mb-4",children:[(0,t.jsx)(P,{isAddSSOModalVisible:es,isInstructionsModalVisible:et,handleAddSSOOk:()=>{el(!1),L.resetFields(),l&&C&&ew()},handleAddSSOCancel:()=>{el(!1),L.resetFields()},handleShowInstructions:e=>{el(!1),ei(!0)},handleInstructionsOk:()=>{ei(!1),l&&C&&ew()},handleInstructionsCancel:()=>{ei(!1),l&&C&&ew()},form:L,accessToken:l,ssoConfigured:ef}),(0,t.jsx)(u.Z,{title:"Manage Allowed IP Addresses",width:800,visible:er,onCancel:()=>en(!1),footer:[(0,t.jsx)(m.Z,{className:"mx-1",onClick:()=>eo(!0),children:"Add IP Address"},"add"),(0,t.jsx)(m.Z,{onClick:()=>en(!1),children:"Close"},"close")],children:(0,t.jsxs)(y.Z,{children:[(0,t.jsx)(S.Z,{children:(0,t.jsxs)(w.Z,{children:[(0,t.jsx)(Z.Z,{children:"IP Address"}),(0,t.jsx)(Z.Z,{className:"text-right",children:"Action"})]})}),(0,t.jsx)(v.Z,{children:eg.map((e,s)=>(0,t.jsxs)(w.Z,{children:[(0,t.jsx)(b.Z,{children:e}),(0,t.jsx)(b.Z,{className:"text-right",children:e!==eS&&(0,t.jsx)(m.Z,{onClick:()=>eC(e),color:"red",size:"xs",children:"Delete"})})]},s))})]})}),(0,t.jsx)(u.Z,{title:"Add Allowed IP Address",visible:ea,onCancel:()=>eo(!1),footer:null,children:(0,t.jsxs)(o.Z,{onFinish:eI,children:[(0,t.jsx)(o.Z.Item,{name:"ip",rules:[{required:!0,message:"Please enter an IP address"}],children:(0,t.jsx)(c.default,{placeholder:"Enter IP address"})}),(0,t.jsx)(o.Z.Item,{children:(0,t.jsx)(d.ZP,{htmlType:"submit",children:"Add IP Address"})})]})}),(0,t.jsx)(u.Z,{title:"Confirm Delete",visible:ec,onCancel:()=>ed(!1),onOk:ek,footer:[(0,t.jsx)(m.Z,{className:"mx-1",onClick:()=>ek(),children:"Yes"},"delete"),(0,t.jsx)(m.Z,{onClick:()=>ed(!1),children:"Close"},"close")],children:(0,t.jsxs)("p",{children:["Are you sure you want to delete the IP address: ",eh,"?"]})}),(0,t.jsx)(u.Z,{title:"UI Access Control Settings",visible:eu,width:600,footer:null,onOk:eO,onCancel:()=>{em(!1)},children:(0,t.jsx)(K,{accessToken:l,onSuccess:()=>{eO(),O.Z.success("UI Access Control settings updated successfully")}})})]}),(0,t.jsxs)(g.Z,{title:"Login without SSO",color:"teal",children:["If you need to login without sso, you can access"," ",(0,t.jsxs)("a",{href:eZ,target:"_blank",children:[(0,t.jsx)("b",{children:eZ})," "]})]})]}),(0,t.jsx)(f.Z,{children:(0,t.jsx)(Y,{accessToken:l,userID:N,proxySettings:E})}),(0,t.jsx)(f.Z,{children:(0,t.jsx)(ex,{})})]})]})]})}},1633:function(e,s,l){l.d(s,{j:function(){return R}});var t=l(57437),i=l(39823),r=l(39760),n=l(92403),a=l(28595),o=l(68208),c=l(69993),d=l(58630),u=l(57400),m=l(93750),g=l(29436),p=l(44625),x=l(9775),h=l(48231),_=l(15883),f=l(41361),j=l(37527),y=l(99458),v=l(12660),b=l(88009),S=l(71916),Z=l(41169),w=l(38434),N=l(71891),I=l(55322),C=l(11429),k=l(13817),O=l(18310),E=l(60985),T=l(2265),L=l(20347),P=l(79262),A=l(91027);let{Sider:U}=k.default,R=[{groupLabel:"AI GATEWAY",items:[{key:"api-keys",page:"api-keys",label:"Virtual Keys",icon:(0,t.jsx)(n.Z,{})},{key:"llm-playground",page:"llm-playground",label:"Playground",icon:(0,t.jsx)(a.Z,{}),roles:L.LQ},{key:"models",page:"models",label:"Models + Endpoints",icon:(0,t.jsx)(o.Z,{}),roles:L.LQ},{key:"agents",page:"agents",label:"Agents",icon:(0,t.jsx)(c.Z,{}),roles:L.LQ},{key:"mcp-servers",page:"mcp-servers",label:"MCP Servers",icon:(0,t.jsx)(d.Z,{})},{key:"guardrails",page:"guardrails",label:"Guardrails",icon:(0,t.jsx)(u.Z,{}),roles:L.ZL},{key:"policies",page:"policies",label:(0,t.jsxs)("span",{className:"flex items-center gap-4",children:["Policies ",(0,t.jsx)(A.Z,{})]}),icon:(0,t.jsx)(m.Z,{}),roles:L.ZL},{key:"tools",page:"tools",label:"Tools",icon:(0,t.jsx)(d.Z,{}),children:[{key:"search-tools",page:"search-tools",label:"Search Tools",icon:(0,t.jsx)(g.Z,{})},{key:"vector-stores",page:"vector-stores",label:"Vector Stores",icon:(0,t.jsx)(p.Z,{})}]}]},{groupLabel:"OBSERVABILITY",items:[{key:"new_usage",page:"new_usage",icon:(0,t.jsx)(x.Z,{}),roles:[...L.ZL,...L.lo],label:"Usage"},{key:"logs",page:"logs",label:(0,t.jsxs)("span",{className:"flex items-center gap-4",children:["Logs ",(0,t.jsx)(A.Z,{})]}),icon:(0,t.jsx)(h.Z,{})}]},{groupLabel:"ACCESS CONTROL",items:[{key:"users",page:"users",label:"Internal Users",icon:(0,t.jsx)(_.Z,{}),roles:L.ZL},{key:"teams",page:"teams",label:"Teams",icon:(0,t.jsx)(f.Z,{})},{key:"organizations",page:"organizations",label:"Organizations",icon:(0,t.jsx)(j.Z,{}),roles:L.ZL},{key:"budgets",page:"budgets",label:"Budgets",icon:(0,t.jsx)(y.Z,{}),roles:L.ZL}]},{groupLabel:"DEVELOPER TOOLS",items:[{key:"api_ref",page:"api_ref",label:"API Reference",icon:(0,t.jsx)(v.Z,{})},{key:"model-hub-table",page:"model-hub-table",label:"AI Hub",icon:(0,t.jsx)(b.Z,{})},{key:"learning-resources",page:"learning-resources",label:"Learning Resources",icon:(0,t.jsx)(S.Z,{}),external_url:"https://models.litellm.ai/cookbook"},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,t.jsx)(Z.Z,{}),children:[{key:"caching",page:"caching",label:"Caching",icon:(0,t.jsx)(p.Z,{}),roles:L.ZL},{key:"prompts",page:"prompts",label:"Prompts",icon:(0,t.jsx)(w.Z,{}),roles:L.ZL},{key:"transform-request",page:"transform-request",label:"API Playground",icon:(0,t.jsx)(v.Z,{}),roles:[...L.ZL,...L.lo]},{key:"tag-management",page:"tag-management",label:"Tag Management",icon:(0,t.jsx)(N.Z,{}),roles:L.ZL},{key:"claude-code-plugins",page:"claude-code-plugins",label:"Claude Code Plugins",icon:(0,t.jsx)(d.Z,{}),roles:L.ZL},{key:"4",page:"usage",label:"Old Usage",icon:(0,t.jsx)(x.Z,{})}]}]},{groupLabel:"SETTINGS",roles:L.ZL,items:[{key:"settings",page:"settings",label:(0,t.jsx)("span",{className:"flex items-center gap-4",children:"Settings"}),icon:(0,t.jsx)(I.Z,{}),roles:L.ZL,children:[{key:"router-settings",page:"router-settings",label:"Router Settings",icon:(0,t.jsx)(I.Z,{}),roles:L.ZL},{key:"logging-and-alerts",page:"logging-and-alerts",label:"Logging & Alerts",icon:(0,t.jsx)(I.Z,{}),roles:L.ZL},{key:"admin-panel",page:"admin-panel",label:"Admin Settings",icon:(0,t.jsx)(I.Z,{}),roles:L.ZL},{key:"cost-tracking",page:"cost-tracking",label:"Cost Tracking",icon:(0,t.jsx)(x.Z,{}),roles:L.ZL},{key:"ui-theme",page:"ui-theme",label:"UI Theme",icon:(0,t.jsx)(C.Z,{}),roles:L.ZL}]}]}];s.Z=e=>{let{setPage:s,defaultSelectedKey:l,collapsed:n=!1,enabledPagesInternalUsers:a}=e,{userId:o,accessToken:c,userRole:d}=(0,r.Z)(),{data:u}=(0,i.q)(),m=(0,T.useMemo)(()=>!!o&&!!u&&u.some(e=>{var s;return null===(s=e.members)||void 0===s?void 0:s.some(e=>e.user_id===o&&"org_admin"===e.user_role)}),[o,u]),g=e=>{let l=new URLSearchParams(window.location.search);l.set("page",e),window.history.pushState(null,"","?".concat(l.toString())),s(e)},p=e=>{let s=(0,L.tY)(d);return null!=a&&console.log("[LeftNav] Filtering with enabled pages:",{userRole:d,isAdmin:s,enabledPagesInternalUsers:a}),e.map(e=>({...e,children:e.children?p(e.children):void 0})).filter(e=>{if("organizations"===e.key){if(!(!e.roles||e.roles.includes(d)||m))return!1;if(!s&&null!=a){let s=a.includes(e.page);return console.log('[LeftNav] Page "'.concat(e.page,'" (').concat(e.key,"): ").concat(s?"VISIBLE":"HIDDEN")),s}return!0}if(e.roles&&!e.roles.includes(d))return!1;if(!s&&null!=a){if(e.children&&e.children.length>0&&e.children.some(e=>a.includes(e.page)))return console.log('[LeftNav] Parent "'.concat(e.page,'" (').concat(e.key,"): VISIBLE (has visible children)")),!0;let s=a.includes(e.page);return console.log('[LeftNav] Page "'.concat(e.page,'" (').concat(e.key,"): ").concat(s?"VISIBLE":"HIDDEN")),s}return!0})},x=(e=>{for(let s of R)for(let l of s.items){if(l.page===e)return l.key;if(l.children){let s=l.children.find(s=>s.page===e);if(s)return s.key}}return"api-keys"})(l);return(0,t.jsx)(k.default,{children:(0,t.jsxs)(U,{theme:"light",width:220,collapsed:n,collapsedWidth:80,collapsible:!0,trigger:null,style:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[(0,t.jsx)(O.ZP,{theme:{components:{Menu:{iconSize:15,fontSize:13,itemMarginInline:4,itemPaddingInline:8,itemHeight:30,itemBorderRadius:6,subMenuItemBorderRadius:6,groupTitleFontSize:10,groupTitleLineHeight:1.5}}},children:(0,t.jsx)(E.Z,{mode:"inline",selectedKeys:[x],defaultOpenKeys:[],inlineCollapsed:n,className:"custom-sidebar-menu",style:{borderRight:0,backgroundColor:"transparent",fontSize:"13px",paddingTop:"4px"},items:(()=>{let e=[];return R.forEach(s=>{if(s.roles&&!s.roles.includes(d))return;let l=p(s.items);0!==l.length&&e.push({type:"group",label:n?null:(0,t.jsx)("span",{style:{fontSize:"10px",fontWeight:600,color:"#6b7280",letterSpacing:"0.05em",padding:"12px 0 4px 12px",display:"block",marginBottom:"2px"},children:s.groupLabel}),children:l.map(e=>{var s;return{key:e.key,icon:e.icon,label:e.label,children:null===(s=e.children)||void 0===s?void 0:s.map(e=>({key:e.key,icon:e.icon,label:e.label,onClick:()=>{e.external_url?window.open(e.external_url,"_blank"):g(e.page)}})),onClick:e.children?void 0:()=>{e.external_url?window.open(e.external_url,"_blank"):g(e.page)}}})})}),e})()})}),(0,L.tY)(d)&&!n&&(0,t.jsx)(P.Z,{accessToken:c,width:220})]})})}},79262:function(e,s,l){l.d(s,{Z:function(){return g}});var t=l(57437);l(1309);var i=l(76865),r=l(70525),n=l(95805),a=l(51817),o=l(21047);l(22135),l(40875);var c=l(49663),d=l(2265),u=l(19250);let m=function(){for(var e=arguments.length,s=Array(e),l=0;l{(async()=>{if(s){y(!0),b(null);try{let e=await (0,u.getRemainingUsers)(s);f(e)}catch(e){console.error("Failed to fetch usage data:",e),b("Failed to load usage data")}finally{y(!1)}}})()},[s]);let{isOverLimit:S,isNearLimit:Z,usagePercentage:w,userMetrics:N,teamMetrics:I}=(e=>{if(!e)return{isOverLimit:!1,isNearLimit:!1,usagePercentage:0,userMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0},teamMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0}};let s=e.total_users?e.total_users_used/e.total_users*100:0,l=s>100,t=s>=80&&s<=100,i=e.total_teams?e.total_teams_used/e.total_teams*100:0,r=i>100,n=i>=80&&i<=100,a=l||r;return{isOverLimit:a,isNearLimit:(t||n)&&!a,usagePercentage:Math.max(s,i),userMetrics:{isOverLimit:l,isNearLimit:t,usagePercentage:s},teamMetrics:{isOverLimit:r,isNearLimit:n,usagePercentage:i}}})(_),C=()=>S?(0,t.jsx)(i.Z,{className:"h-3 w-3"}):Z?(0,t.jsx)(r.Z,{className:"h-3 w-3"}):null;return s&&((null==_?void 0:_.total_users)!==null||(null==_?void 0:_.total_teams)!==null)?(0,t.jsx)("div",{className:"fixed bottom-4 left-4 z-50",style:{width:"".concat(Math.min(l,220),"px")},children:(0,t.jsx)(()=>x?(0,t.jsx)("button",{onClick:()=>h(!1),className:m("bg-white border border-gray-200 rounded-lg shadow-sm p-3 hover:shadow-md transition-all w-full"),title:"Show usage details",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Z,{className:"h-4 w-4 flex-shrink-0"}),(S||Z)&&(0,t.jsx)("span",{className:"flex-shrink-0",children:C()}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium truncate",children:[_&&null!==_.total_users&&(0,t.jsxs)("span",{className:m("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["U: ",_.total_users_used,"/",_.total_users]}),_&&null!==_.total_teams&&(0,t.jsxs)("span",{className:m("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",I.isOverLimit&&"bg-red-50 text-red-700 border-red-200",I.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!I.isOverLimit&&!I.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["T: ",_.total_teams_used,"/",_.total_teams]}),!_||null===_.total_users&&null===_.total_teams&&(0,t.jsx)("span",{className:"truncate",children:"Usage"})]})]})}):j?(0,t.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 w-full",children:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2",children:[(0,t.jsx)(a.Z,{className:"h-4 w-4 animate-spin"}),(0,t.jsx)("span",{className:"text-sm text-gray-500 truncate",children:"Loading..."})]})}):v||!_?(0,t.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 group w-full",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsx)("span",{className:"text-sm text-gray-500 truncate block",children:v||"No data"})}),(0,t.jsx)("button",{onClick:()=>h(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,t.jsx)(o.Z,{className:"h-3 w-3 text-gray-400"})})]})}):(0,t.jsxs)("div",{className:m("bg-white border rounded-lg shadow-sm p-3 transition-all duration-200 group w-full"),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,t.jsx)(n.Z,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsx)("span",{className:"font-medium text-sm truncate",children:"Usage"})]}),(0,t.jsx)("button",{onClick:()=>h(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,t.jsx)(o.Z,{className:"h-3 w-3 text-gray-400"})})]}),(0,t.jsxs)("div",{className:"space-y-3 text-sm",children:[null!==_.total_users&&(0,t.jsxs)("div",{className:m("space-y-1 border rounded-md p-2",N.isOverLimit&&"border-red-200 bg-red-50",N.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,t.jsx)(n.Z,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-medium",children:"Users"}),(0,t.jsx)("span",{className:m("ml-1 px-1.5 py-0.5 rounded border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:N.isOverLimit?"Over limit":N.isNearLimit?"Near limit":"OK"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[_.total_users_used,"/",_.total_users]})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,t.jsx)("span",{className:m("font-medium text-right",N.isOverLimit&&"text-red-600",N.isNearLimit&&"text-yellow-600"),children:_.total_users_remaining})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[Math.round(N.usagePercentage),"%"]})]}),(0,t.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,t.jsx)("div",{className:m("h-2 rounded-full transition-all duration-300",N.isOverLimit&&"bg-red-500",N.isNearLimit&&"bg-yellow-500",!N.isOverLimit&&!N.isNearLimit&&"bg-green-500"),style:{width:"".concat(Math.min(N.usagePercentage,100),"%")}})})]}),null!==_.total_teams&&(0,t.jsxs)("div",{className:m("space-y-1 border rounded-md p-2",I.isOverLimit&&"border-red-200 bg-red-50",I.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,t.jsx)(c.Z,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-medium",children:"Teams"}),(0,t.jsx)("span",{className:m("ml-1 px-1.5 py-0.5 rounded border",I.isOverLimit&&"bg-red-50 text-red-700 border-red-200",I.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!I.isOverLimit&&!I.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:I.isOverLimit?"Over limit":I.isNearLimit?"Near limit":"OK"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[_.total_teams_used,"/",_.total_teams]})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,t.jsx)("span",{className:m("font-medium text-right",I.isOverLimit&&"text-red-600",I.isNearLimit&&"text-yellow-600"),children:_.total_teams_remaining})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[Math.round(I.usagePercentage),"%"]})]}),(0,t.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,t.jsx)("div",{className:m("h-2 rounded-full transition-all duration-300",I.isOverLimit&&"bg-red-500",I.isNearLimit&&"bg-yellow-500",!I.isOverLimit&&!I.isNearLimit&&"bg-green-500"),style:{width:"".concat(Math.min(I.usagePercentage,100),"%")}})})]})]})]}),{})}):null}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1789],{25512:function(e,s,l){l.d(s,{P:function(){return t.Z},Q:function(){return i.Z}});var t=l(27281),i=l(57365)},51789:function(e,s,l){l.d(s,{Z:function(){return e1}});var t=l(57437),i=l(2265),r=l(57840),n=l(51653),a=l(99376),o=l(10032),c=l(4260),d=l(5545),u=l(22116);l(25512);var m=l(78489),g=l(94789),p=l(12514),x=l(12485),h=l(18135),_=l(35242),f=l(29706),j=l(77991),y=l(21626),v=l(97214),b=l(28241),S=l(58834),Z=l(69552),w=l(71876),N=l(37592),I=l(4156),C=l(56522),k=l(19250),O=l(9114),E=l(85968);let T={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},L={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}};var P=e=>{let{isAddSSOModalVisible:s,isInstructionsModalVisible:l,handleAddSSOOk:r,handleAddSSOCancel:n,handleShowInstructions:a,handleInstructionsOk:m,handleInstructionsCancel:g,form:p,accessToken:x,ssoConfigured:h=!1}=e,[_,f]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(async()=>{if(s&&x)try{let s=await (0,k.getSSOSettings)(x);if(console.log("Raw SSO data received:",s),s&&s.values){var e,l,t,i,r,n;console.log("SSO values:",s.values),console.log("user_email from API:",s.values.user_email);let a=null;s.values.google_client_id?a="google":s.values.microsoft_client_id?a="microsoft":s.values.generic_client_id&&(a=(null===(e=s.values.generic_authorization_endpoint)||void 0===e?void 0:e.includes("okta"))||(null===(l=s.values.generic_authorization_endpoint)||void 0===l?void 0:l.includes("auth0"))?"okta":"generic");let o={};if(s.values.role_mappings){let e=s.values.role_mappings,l=e=>e&&0!==e.length?e.join(", "):"";o={use_role_mappings:!0,group_claim:e.group_claim,default_role:e.default_role||"internal_user",proxy_admin_teams:l(null===(t=e.roles)||void 0===t?void 0:t.proxy_admin),admin_viewer_teams:l(null===(i=e.roles)||void 0===i?void 0:i.proxy_admin_viewer),internal_user_teams:l(null===(r=e.roles)||void 0===r?void 0:r.internal_user),internal_viewer_teams:l(null===(n=e.roles)||void 0===n?void 0:n.internal_user_viewer)}}let c={sso_provider:a,proxy_base_url:s.values.proxy_base_url,user_email:s.values.user_email,...s.values,...o};console.log("Setting form values:",c),p.resetFields(),setTimeout(()=>{p.setFieldsValue(c),console.log("Form values set, current form values:",p.getFieldsValue())},100)}}catch(e){console.error("Failed to load SSO settings:",e)}})()},[s,x,p]);let j=async e=>{if(!x){O.Z.fromBackend("No access token available");return}try{let{proxy_admin_teams:s,admin_viewer_teams:l,internal_user_teams:t,internal_viewer_teams:i,default_role:r,group_claim:n,use_role_mappings:o,...c}=e,d={...c};if(o){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];d.role_mappings={provider:"generic",group_claim:n,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[r]||"internal_user",roles:{proxy_admin:e(s),proxy_admin_viewer:e(l),internal_user:e(t),internal_user_viewer:e(i)}}}await (0,k.updateSSOSettings)(x,d),a(e)}catch(e){O.Z.fromBackend("Failed to save SSO settings: "+(0,E.O)(e))}},y=async()=>{if(!x){O.Z.fromBackend("No access token available");return}try{await (0,k.updateSSOSettings)(x,{google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null}),p.resetFields(),f(!1),r(),O.Z.success("SSO settings cleared successfully")}catch(e){console.error("Failed to clear SSO settings:",e),O.Z.fromBackend("Failed to clear SSO settings")}},v=e=>{let s=L[e];return s?s.fields.map(e=>(0,t.jsx)(o.Z.Item,{label:e.label,name:e.name,rules:[{required:!0,message:"Please enter the ".concat(e.label.toLowerCase())}],children:e.name.includes("client")?(0,t.jsx)(c.default.Password,{}):(0,t.jsx)(C.o,{placeholder:e.placeholder})},e.name)):null};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Z,{title:h?"Edit SSO Settings":"Add SSO",visible:s,width:800,footer:null,onOk:r,onCancel:n,children:(0,t.jsxs)(o.Z,{form:p,onFinish:j,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Z.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(N.default,{children:Object.entries(T).map(e=>{let[s,l]=e;return(0,t.jsx)(N.default.Option,{value:s,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[l&&(0,t.jsx)("img",{src:l,alt:s,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsxs)("span",{children:["okta"===s.toLowerCase()?"Okta / Auth0":s.charAt(0).toUpperCase()+s.slice(1)," ","SSO"]})]})},s)})})}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.sso_provider!==s.sso_provider,children:e=>{let{getFieldValue:s}=e,l=s("sso_provider");return l?v(l):null}}),(0,t.jsx)(o.Z.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(C.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>null==e?void 0:e.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,s)=>s&&/^https?:\/\/.+/.test(s)&&s.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(C.o,{placeholder:"https://example.com"})}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.sso_provider!==s.sso_provider,children:e=>{let{getFieldValue:s}=e,l=s("sso_provider");return"okta"===l||"generic"===l?(0,t.jsx)(o.Z.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(I.Z,{})}):null}}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.use_role_mappings!==s.use_role_mappings,children:e=>{let{getFieldValue:s}=e;return s("use_role_mappings")?(0,t.jsx)(o.Z.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(C.o,{})}):null}}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.use_role_mappings!==s.use_role_mappings,children:e=>{let{getFieldValue:s}=e;return s("use_role_mappings")?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Z.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(N.default,{children:[(0,t.jsx)(N.default.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(N.default.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(N.default.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(N.default.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(o.Z.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(C.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(C.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(C.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(C.o,{})})]}):null}})]}),(0,t.jsxs)("div",{style:{textAlign:"right",marginTop:"10px",display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px"},children:[h&&(0,t.jsx)(d.ZP,{onClick:()=>f(!0),style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#5558eb",e.currentTarget.style.borderColor="#5558eb"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1",e.currentTarget.style.borderColor="#6366f1"},children:"Clear"}),(0,t.jsx)(d.ZP,{htmlType:"submit",children:"Save"})]})]})}),(0,t.jsxs)(u.Z,{title:"Confirm Clear SSO Settings",visible:_,onOk:y,onCancel:()=>f(!1),okText:"Yes, Clear",cancelText:"Cancel",okButtonProps:{danger:!0,style:{backgroundColor:"#dc2626",borderColor:"#dc2626"}},children:[(0,t.jsx)("p",{children:"Are you sure you want to clear all SSO settings? This action cannot be undone."}),(0,t.jsx)("p",{children:"Users will no longer be able to login using SSO after this change."})]}),(0,t.jsxs)(u.Z,{title:"SSO Setup Instructions",visible:l,width:800,footer:null,onOk:m,onCancel:g,children:[(0,t.jsx)("p",{children:"Follow these steps to complete the SSO setup:"}),(0,t.jsx)(C.x,{className:"mt-2",children:"1. DO NOT Exit this TAB"}),(0,t.jsx)(C.x,{className:"mt-2",children:"2. Open a new tab, visit your proxy base url"}),(0,t.jsx)(C.x,{className:"mt-2",children:"3. Confirm your SSO is configured correctly and you can login on the new Tab"}),(0,t.jsx)(C.x,{className:"mt-2",children:"4. If Step 3 is successful, you can close this tab"}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(d.ZP,{onClick:m,children:"Done"})})]})]})},A=l(67982),U=l(67101),R=l(84264),M=l(49566),z=l(96761),F=l(29233),G=l(62272),D=l(23639),B=l(92403),V=l(29271),q=l(34419),Y=e=>{let{accessToken:s,userID:l,proxySettings:r}=e,[n]=o.Z.useForm(),[a,c]=(0,i.useState)(!1),[d,u]=(0,i.useState)(null),[x,h]=(0,i.useState)("");(0,i.useEffect)(()=>{let e="";h(r&&r.PROXY_BASE_URL&&void 0!==r.PROXY_BASE_URL?r.PROXY_BASE_URL:window.location.origin)},[r]);let _="".concat(x,"/scim/v2"),f=async e=>{if(!s||!l){O.Z.fromBackend("You need to be logged in to create a SCIM token");return}try{c(!0);let t={key_alias:e.key_alias||"SCIM Access Token",team_id:null,models:[],allowed_routes:["/scim/*"]},i=await (0,k.keyCreateCall)(s,l,t);u(i),O.Z.success("SCIM token created successfully")}catch(e){console.error("Error creating SCIM token:",e),O.Z.fromBackend("Failed to create SCIM token: "+(0,E.O)(e))}finally{c(!1)}};return(0,t.jsx)(U.Z,{numItems:1,children:(0,t.jsxs)(p.Z,{children:[(0,t.jsx)("div",{className:"flex items-center mb-4",children:(0,t.jsx)(z.Z,{children:"SCIM Configuration"})}),(0,t.jsx)(R.Z,{className:"text-gray-600",children:"System for Cross-domain Identity Management (SCIM) allows you to automatically provision and manage users and groups in LiteLLM."}),(0,t.jsx)(A.Z,{}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"1"}),(0,t.jsxs)(z.Z,{className:"text-lg flex items-center",children:[(0,t.jsx)(G.Z,{className:"h-5 w-5 mr-2"}),"SCIM Tenant URL"]})]}),(0,t.jsx)(R.Z,{className:"text-gray-600 mb-3",children:"Use this URL in your identity provider SCIM integration settings."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(M.Z,{value:_,disabled:!0,className:"flex-grow"}),(0,t.jsx)(F.CopyToClipboard,{text:_,onCopy:()=>O.Z.success("URL copied to clipboard"),children:(0,t.jsxs)(m.Z,{variant:"primary",className:"ml-2 flex items-center",children:[(0,t.jsx)(D.Z,{className:"h-4 w-4 mr-1"}),"Copy"]})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-2",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-blue-100 text-blue-700 mr-2",children:"2"}),(0,t.jsxs)(z.Z,{className:"text-lg flex items-center",children:[(0,t.jsx)(B.Z,{className:"h-5 w-5 mr-2"}),"Authentication Token"]})]}),(0,t.jsx)(g.Z,{title:"Using SCIM",color:"blue",className:"mb-4",children:"You need a SCIM token to authenticate with the SCIM API. Create one below and use it in your SCIM provider configuration."}),d?(0,t.jsxs)(p.Z,{className:"border border-yellow-300 bg-yellow-50",children:[(0,t.jsxs)("div",{className:"flex items-center mb-2 text-yellow-800",children:[(0,t.jsx)(V.Z,{className:"h-5 w-5 mr-2"}),(0,t.jsx)(z.Z,{className:"text-lg text-yellow-800",children:"Your SCIM Token"})]}),(0,t.jsx)(R.Z,{className:"text-yellow-800 mb-4 font-medium",children:"Make sure to copy this token now. You will not be able to see it again."}),(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(M.Z,{value:d.key,className:"flex-grow mr-2 bg-white",type:"password",disabled:!0}),(0,t.jsx)(F.CopyToClipboard,{text:d.key,onCopy:()=>O.Z.success("Token copied to clipboard"),children:(0,t.jsxs)(m.Z,{variant:"primary",className:"flex items-center",children:[(0,t.jsx)(D.Z,{className:"h-4 w-4 mr-1"}),"Copy"]})})]}),(0,t.jsxs)(m.Z,{className:"mt-4 flex items-center",variant:"secondary",onClick:()=>u(null),children:[(0,t.jsx)(q.Z,{className:"h-4 w-4 mr-1"}),"Create Another Token"]})]}):(0,t.jsx)("div",{className:"bg-gray-50 p-4 rounded-lg",children:(0,t.jsxs)(o.Z,{form:n,onFinish:f,layout:"vertical",children:[(0,t.jsx)(o.Z.Item,{name:"key_alias",label:"Token Name",rules:[{required:!0,message:"Please enter a name for your token"}],children:(0,t.jsx)(M.Z,{placeholder:"SCIM Access Token"})}),(0,t.jsx)(o.Z.Item,{children:(0,t.jsxs)(m.Z,{variant:"primary",type:"submit",loading:a,className:"flex items-center",children:[(0,t.jsx)(B.Z,{className:"h-4 w-4 mr-1"}),"Create SCIM Token"]})})]})})]})]})]})})},K=e=>{let{accessToken:s,onSuccess:l}=e,[r]=o.Z.useForm(),[n,a]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(async()=>{if(s)try{let e=await (0,k.getSSOSettings)(s);if(e&&e.values){let s=e.values.ui_access_mode,l={};s&&"object"==typeof s?l={ui_access_mode_type:s.type,restricted_sso_group:s.restricted_sso_group,sso_group_jwt_field:s.sso_group_jwt_field}:"string"==typeof s&&(l={ui_access_mode_type:s,restricted_sso_group:e.values.restricted_sso_group,sso_group_jwt_field:e.values.team_ids_jwt_field||e.values.sso_group_jwt_field}),r.setFieldsValue(l)}}catch(e){console.error("Failed to load UI access settings:",e)}})()},[s,r]);let c=async e=>{if(!s){O.Z.fromBackend("No access token available");return}a(!0);try{let t;t="all_authenticated_users"===e.ui_access_mode_type?{ui_access_mode:"none"}:{ui_access_mode:{type:e.ui_access_mode_type,restricted_sso_group:e.restricted_sso_group,sso_group_jwt_field:e.sso_group_jwt_field}},await (0,k.updateSSOSettings)(s,t),l()}catch(e){console.error("Failed to save UI access settings:",e),O.Z.fromBackend("Failed to save UI access settings")}finally{a(!1)}};return(0,t.jsxs)("div",{style:{padding:"16px"},children:[(0,t.jsx)("div",{style:{marginBottom:"16px"},children:(0,t.jsx)(C.x,{style:{fontSize:"14px",color:"#6b7280"},children:"Configure who can access the UI interface and how group information is extracted from JWT tokens."})}),(0,t.jsxs)(o.Z,{form:r,onFinish:c,layout:"vertical",children:[(0,t.jsx)(o.Z.Item,{label:"UI Access Mode",name:"ui_access_mode_type",tooltip:"Controls who can access the UI interface",children:(0,t.jsxs)(N.default,{placeholder:"Select access mode",children:[(0,t.jsx)(N.default.Option,{value:"all_authenticated_users",children:"All Authenticated Users"}),(0,t.jsx)(N.default.Option,{value:"restricted_sso_group",children:"Restricted SSO Group"})]})}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.ui_access_mode_type!==s.ui_access_mode_type,children:e=>{let{getFieldValue:s}=e;return"restricted_sso_group"===s("ui_access_mode_type")?(0,t.jsx)(o.Z.Item,{label:"Restricted SSO Group",name:"restricted_sso_group",rules:[{required:!0,message:"Please enter the restricted SSO group"}],children:(0,t.jsx)(C.o,{placeholder:"ui-access-group"})}):null}}),(0,t.jsx)(o.Z.Item,{label:"SSO Group JWT Field",name:"sso_group_jwt_field",tooltip:"JWT field name that contains team/group information. Use dot notation to access nested fields.",children:(0,t.jsx)(C.o,{placeholder:"groups"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"16px"},children:(0,t.jsx)(d.ZP,{type:"primary",htmlType:"submit",loading:n,style:{backgroundColor:"#6366f1",borderColor:"#6366f1"},children:"Update UI Access Control"})})]})]})},H=l(12363),W=l(55584),Q=l(29827),J=l(21770),X=l(90246);let $=(0,X.n)("uiSettings"),ee=e=>{let s=(0,Q.NL)();return(0,J.D)({mutationFn:async s=>{if(!e)throw Error("Access token is required");return(0,k.updateUiSettings)(e,s)},onSuccess:()=>{s.invalidateQueries({queryKey:$.all})}})};var es=l(39760),el=l(1633);let et={"api-keys":"Manage virtual keys for API access and authentication","llm-playground":"Interactive playground for testing LLM requests",models:"Configure and manage LLM models and endpoints",agents:"Create and manage AI agents","mcp-servers":"Configure Model Context Protocol servers",guardrails:"Set up content moderation and safety guardrails",policies:"Define access control and usage policies","search-tools":"Configure RAG search and retrieval tools","vector-stores":"Manage vector databases for embeddings",new_usage:"View usage analytics and metrics",logs:"Access request and response logs",users:"Manage internal user accounts and permissions",teams:"Create and manage teams for access control",organizations:"Manage organizations and their members",budgets:"Set and monitor spending budgets",api_ref:"Browse API documentation and endpoints","model-hub-table":"Explore available AI models and providers","learning-resources":"Access tutorials and documentation",caching:"Configure response caching settings","transform-request":"Set up request transformation rules","cost-tracking":"Track and analyze API costs","ui-theme":"Customize dashboard appearance","tag-management":"Organize resources with tags",prompts:"Manage and version prompt templates","claude-code-plugins":"Configure Claude Code plugins",usage:"View legacy usage dashboard","router-settings":"Configure routing and load balancing settings","logging-and-alerts":"Set up logging and alert configurations","admin-panel":"Access admin panel and settings"};var ei=l(20347);let er=e=>!e||0===e.length||e.some(e=>ei.lo.includes(e)),en=()=>{let e=[];return el.j.forEach(s=>{s.items.forEach(l=>{if(l.page&&"tools"!==l.page&&"experimental"!==l.page&&"settings"!==l.page&&er(l.roles)){let t="string"==typeof l.label?l.label:l.key;e.push({page:l.page,label:t,group:s.groupLabel,description:et[l.page]||"No description available"})}if(l.children){let t="string"==typeof l.label?l.label:l.key;l.children.forEach(l=>{if(er(l.roles)){let i="string"==typeof l.label?l.label:l.key;e.push({page:l.page,label:i,group:"".concat(s.groupLabel," > ").concat(t),description:et[l.page]||"No description available"})}})}})}),e};var ea=l(58760),eo=l(3810),ec=l(44851);function ed(e){let{enabledPagesInternalUsers:s,enabledPagesPropertyDescription:l,isUpdating:n,onUpdate:a}=e,o=null!=s,c=(0,i.useMemo)(()=>en(),[]),u=(0,i.useMemo)(()=>{let e={};return c.forEach(s=>{e[s.group]||(e[s.group]=[]),e[s.group].push(s)}),e},[c]),[m,g]=(0,i.useState)(s||[]);return(0,i.useMemo)(()=>{s?g(s):g([])},[s]),(0,t.jsxs)(ea.Z,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsxs)(ea.Z,{direction:"vertical",size:4,children:[(0,t.jsxs)(ea.Z,{align:"center",children:[(0,t.jsx)(r.default.Text,{strong:!0,children:"Internal User Page Visibility"}),!o&&(0,t.jsx)(eo.Z,{color:"default",style:{marginLeft:"8px"},children:"Not set (all pages visible)"}),o&&(0,t.jsxs)(eo.Z,{color:"blue",style:{marginLeft:"8px"},children:[m.length," page",1!==m.length?"s":""," selected"]})]}),l&&(0,t.jsx)(r.default.Text,{type:"secondary",children:l}),(0,t.jsx)(r.default.Text,{type:"secondary",style:{fontSize:"12px",fontStyle:"italic"},children:"By default, all pages are visible to internal users. Select specific pages to restrict visibility."}),(0,t.jsx)(r.default.Text,{type:"secondary",style:{fontSize:"12px",color:"#8b5cf6"},children:"Note: Only pages accessible to internal user roles are shown here. Admin-only pages are excluded as they cannot be made visible to internal users regardless of this setting."})]}),(0,t.jsx)(ec.default,{items:[{key:"page-visibility",label:"Configure Page Visibility",children:(0,t.jsxs)(ea.Z,{direction:"vertical",size:"middle",style:{width:"100%"},children:[(0,t.jsx)(I.Z.Group,{value:m,onChange:g,style:{width:"100%"},children:(0,t.jsx)(ea.Z,{direction:"vertical",size:"middle",style:{width:"100%"},children:Object.entries(u).map(e=>{let[s,l]=e;return(0,t.jsxs)("div",{children:[(0,t.jsx)(r.default.Text,{strong:!0,style:{fontSize:"11px",color:"#6b7280",letterSpacing:"0.05em",display:"block",marginBottom:"8px"},children:s}),(0,t.jsx)(ea.Z,{direction:"vertical",size:"small",style:{marginLeft:"16px",width:"100%"},children:l.map(e=>(0,t.jsx)("div",{style:{marginBottom:"4px"},children:(0,t.jsx)(I.Z,{value:e.page,children:(0,t.jsxs)(ea.Z,{direction:"vertical",size:0,children:[(0,t.jsx)(r.default.Text,{children:e.label}),(0,t.jsx)(r.default.Text,{type:"secondary",style:{fontSize:"12px"},children:e.description})]})})},e.page))})]},s)})})}),(0,t.jsxs)(ea.Z,{children:[(0,t.jsx)(d.ZP,{type:"primary",onClick:()=>{a({enabled_ui_pages_internal_users:m.length>0?m:null})},loading:n,disabled:n,children:"Save Page Visibility Settings"}),o&&(0,t.jsx)(d.ZP,{onClick:()=>{g([]),a({enabled_ui_pages_internal_users:null})},loading:n,disabled:n,children:"Reset to Default (All Pages)"})]})]})}]})]})}var eu=l(5945),em=l(50337),eg=l(63709),ep=l(23496);function ex(){var e,s,l,i,a,o;let{accessToken:c}=(0,es.Z)(),{data:d,isLoading:u,isError:m,error:g}=(0,W.L)(),{mutate:p,isPending:x,error:h}=ee(c),_=null==d?void 0:d.field_schema,f=null==_?void 0:null===(e=_.properties)||void 0===e?void 0:e.disable_model_add_for_internal_users,j=null==_?void 0:null===(s=_.properties)||void 0===s?void 0:s.disable_team_admin_delete_team_user,y=null==_?void 0:null===(l=_.properties)||void 0===l?void 0:l.enabled_ui_pages_internal_users,v=null!==(i=null==d?void 0:d.values)&&void 0!==i?i:{},b=!!v.disable_model_add_for_internal_users,S=!!v.disable_team_admin_delete_team_user;return(0,t.jsx)(eu.Z,{title:"UI Settings",children:u?(0,t.jsx)(em.Z,{active:!0}):m?(0,t.jsx)(n.Z,{type:"error",message:"Could not load UI settings",description:g instanceof Error?g.message:void 0}):(0,t.jsxs)(ea.Z,{direction:"vertical",size:"large",style:{width:"100%"},children:[(null==_?void 0:_.description)&&(0,t.jsx)(r.default.Paragraph,{style:{marginBottom:0},children:_.description}),h&&(0,t.jsx)(n.Z,{type:"error",message:"Could not update UI settings",description:h instanceof Error?h.message:void 0}),(0,t.jsxs)(ea.Z,{align:"start",size:"middle",children:[(0,t.jsx)(eg.Z,{checked:b,disabled:x,loading:x,onChange:e=>{p({disable_model_add_for_internal_users:e},{onSuccess:()=>{O.Z.success("UI settings updated successfully")},onError:e=>{O.Z.fromBackend(e)}})},"aria-label":null!==(a=null==f?void 0:f.description)&&void 0!==a?a:"Disable model add for internal users"}),(0,t.jsxs)(ea.Z,{direction:"vertical",size:4,children:[(0,t.jsx)(r.default.Text,{strong:!0,children:"Disable model add for internal users"}),(null==f?void 0:f.description)&&(0,t.jsx)(r.default.Text,{type:"secondary",children:f.description})]})]}),(0,t.jsxs)(ea.Z,{align:"start",size:"middle",children:[(0,t.jsx)(eg.Z,{checked:S,disabled:x,loading:x,onChange:e=>{p({disable_team_admin_delete_team_user:e},{onSuccess:()=>{O.Z.success("UI settings updated successfully")},onError:e=>{O.Z.fromBackend(e)}})},"aria-label":null!==(o=null==j?void 0:j.description)&&void 0!==o?o:"Disable team admin delete team user"}),(0,t.jsxs)(ea.Z,{direction:"vertical",size:4,children:[(0,t.jsx)(r.default.Text,{strong:!0,children:"Disable team admin delete team user"}),(null==j?void 0:j.description)&&(0,t.jsx)(r.default.Text,{type:"secondary",children:j.description})]})]}),(0,t.jsx)(ep.Z,{}),(0,t.jsx)(ed,{enabledPagesInternalUsers:v.enabled_ui_pages_internal_users,enabledPagesPropertyDescription:null==y?void 0:y.description,isUpdating:x,onUpdate:e=>{p(e,{onSuccess:()=>{O.Z.success("Page visibility settings updated successfully")},onError:e=>{O.Z.fromBackend(e)}})}})]})})}var eh=l(11713);let e_=(0,X.n)("sso"),ef=()=>{let{accessToken:e,userId:s,userRole:l}=(0,es.Z)();return(0,eh.a)({queryKey:e_.detail("settings"),queryFn:async()=>await (0,k.getSSOSettings)(e),enabled:!!(e&&s&&l)})};var ej=l(76188),ey=l(88906),ev=l(15868),eb=l(18930);let eS={google:"https://artificialanalysis.ai/img/logos/google_small.svg",microsoft:"https://upload.wikimedia.org/wikipedia/commons/a/a8/Microsoft_Azure_Logo.svg",okta:"https://www.okta.com/sites/default/files/Okta_Logo_BrightBlue_Medium.png",generic:""},eZ={google:"Google SSO",microsoft:"Microsoft SSO",okta:"Okta / Auth0 SSO",generic:"Generic SSO"},ew={internal_user_viewer:"Internal Viewer",internal_user:"Internal User",proxy_admin_viewer:"Proxy Admin Viewer",proxy_admin:"Proxy Admin"};var eN=l(31283);let eI={google:{envVarMap:{google_client_id:"GOOGLE_CLIENT_ID",google_client_secret:"GOOGLE_CLIENT_SECRET"},fields:[{label:"Google Client ID",name:"google_client_id"},{label:"Google Client Secret",name:"google_client_secret"}]},microsoft:{envVarMap:{microsoft_client_id:"MICROSOFT_CLIENT_ID",microsoft_client_secret:"MICROSOFT_CLIENT_SECRET",microsoft_tenant:"MICROSOFT_TENANT"},fields:[{label:"Microsoft Client ID",name:"microsoft_client_id"},{label:"Microsoft Client Secret",name:"microsoft_client_secret"},{label:"Microsoft Tenant",name:"microsoft_tenant"}]},okta:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint",placeholder:"https://your-domain/authorize"},{label:"Token Endpoint",name:"generic_token_endpoint",placeholder:"https://your-domain/token"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint",placeholder:"https://your-domain/userinfo"}]},generic:{envVarMap:{generic_client_id:"GENERIC_CLIENT_ID",generic_client_secret:"GENERIC_CLIENT_SECRET",generic_authorization_endpoint:"GENERIC_AUTHORIZATION_ENDPOINT",generic_token_endpoint:"GENERIC_TOKEN_ENDPOINT",generic_userinfo_endpoint:"GENERIC_USERINFO_ENDPOINT"},fields:[{label:"Generic Client ID",name:"generic_client_id"},{label:"Generic Client Secret",name:"generic_client_secret"},{label:"Authorization Endpoint",name:"generic_authorization_endpoint"},{label:"Token Endpoint",name:"generic_token_endpoint"},{label:"Userinfo Endpoint",name:"generic_userinfo_endpoint"}]}},eC=e=>{let s=eI[e];return s?s.fields.map(e=>(0,t.jsx)(o.Z.Item,{label:e.label,name:e.name,rules:[{required:!0,message:"Please enter the ".concat(e.label.toLowerCase())}],children:e.name.includes("client")?(0,t.jsx)(c.default.Password,{}):(0,t.jsx)(eN.o,{placeholder:e.placeholder})},e.name)):null};var ek=e=>{let{form:s,onFormSubmit:l}=e;return(0,t.jsx)("div",{children:(0,t.jsxs)(o.Z,{form:s,onFinish:l,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsx)(o.Z.Item,{label:"SSO Provider",name:"sso_provider",rules:[{required:!0,message:"Please select an SSO provider"}],children:(0,t.jsx)(N.default,{children:Object.entries(eS).map(e=>{let[s,l]=e;return(0,t.jsx)(N.default.Option,{value:s,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",padding:"4px 0"},children:[l&&(0,t.jsx)("img",{src:l,alt:s,style:{height:24,width:24,marginRight:12,objectFit:"contain"}}),(0,t.jsx)("span",{children:eZ[s]||s.charAt(0).toUpperCase()+s.slice(1)+" SSO"})]})},s)})})}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.sso_provider!==s.sso_provider,children:e=>{let{getFieldValue:s}=e,l=s("sso_provider");return l?eC(l):null}}),(0,t.jsx)(o.Z.Item,{label:"Proxy Admin Email",name:"user_email",rules:[{required:!0,message:"Please enter the email of the proxy admin"}],children:(0,t.jsx)(eN.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Proxy Base URL",name:"proxy_base_url",normalize:e=>null==e?void 0:e.trim(),rules:[{required:!0,message:"Please enter the proxy base url"},{pattern:/^https?:\/\/.+/,message:"URL must start with http:// or https://"},{validator:(e,s)=>s&&/^https?:\/\/.+/.test(s)&&s.endsWith("/")?Promise.reject("URL must not end with a trailing slash"):Promise.resolve()}],children:(0,t.jsx)(eN.o,{placeholder:"https://example.com"})}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.sso_provider!==s.sso_provider,children:e=>{let{getFieldValue:s}=e,l=s("sso_provider");return"okta"===l||"generic"===l?(0,t.jsx)(o.Z.Item,{label:"Use Role Mappings",name:"use_role_mappings",valuePropName:"checked",children:(0,t.jsx)(I.Z,{})}):null}}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.use_role_mappings!==s.use_role_mappings||e.sso_provider!==s.sso_provider,children:e=>{let{getFieldValue:s}=e,l=s("use_role_mappings"),i=s("sso_provider");return l&&("okta"===i||"generic"===i)?(0,t.jsx)(o.Z.Item,{label:"Group Claim",name:"group_claim",rules:[{required:!0,message:"Please enter the group claim"}],children:(0,t.jsx)(eN.o,{})}):null}}),(0,t.jsx)(o.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.use_role_mappings!==s.use_role_mappings||e.sso_provider!==s.sso_provider,children:e=>{let{getFieldValue:s}=e,l=s("use_role_mappings"),i=s("sso_provider");return l&&("okta"===i||"generic"===i)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Z.Item,{label:"Default Role",name:"default_role",initialValue:"Internal User",children:(0,t.jsxs)(N.default,{children:[(0,t.jsx)(N.default.Option,{value:"internal_user_viewer",children:"Internal Viewer"}),(0,t.jsx)(N.default.Option,{value:"internal_user",children:"Internal User"}),(0,t.jsx)(N.default.Option,{value:"proxy_admin_viewer",children:"Admin Viewer"}),(0,t.jsx)(N.default.Option,{value:"proxy_admin",children:"Proxy Admin"})]})}),(0,t.jsx)(o.Z.Item,{label:"Proxy Admin Teams",name:"proxy_admin_teams",children:(0,t.jsx)(eN.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Admin Viewer Teams",name:"admin_viewer_teams",children:(0,t.jsx)(eN.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Internal User Teams",name:"internal_user_teams",children:(0,t.jsx)(eN.o,{})}),(0,t.jsx)(o.Z.Item,{label:"Internal Viewer Teams",name:"internal_viewer_teams",children:(0,t.jsx)(eN.o,{})})]}):null}})]})})};let eO=()=>{let{accessToken:e}=(0,es.Z)();return(0,J.D)({mutationFn:async s=>{if(!e)throw Error("Access token is required");return await (0,k.updateSSOSettings)(e,s)}})},eE=e=>{let{proxy_admin_teams:s,admin_viewer_teams:l,internal_user_teams:t,internal_viewer_teams:i,default_role:r,group_claim:n,use_role_mappings:a,...o}=e,c={...o};if(a){let e=e=>e&&""!==e.trim()?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];c.role_mappings={provider:"generic",group_claim:n,default_role:({internal_user_viewer:"internal_user_viewer",internal_user:"internal_user",proxy_admin_viewer:"proxy_admin_viewer",proxy_admin:"proxy_admin"})[r]||"internal_user",roles:{proxy_admin:e(s),proxy_admin_viewer:e(l),internal_user:e(t),internal_user_viewer:e(i)}}}return c},eT=e=>{if(e.google_client_id)return"google";if(e.microsoft_client_id)return"microsoft";if(e.generic_client_id){var s,l;return(null===(s=e.generic_authorization_endpoint)||void 0===s?void 0:s.includes("okta"))||(null===(l=e.generic_authorization_endpoint)||void 0===l?void 0:l.includes("auth0"))?"okta":"generic"}return null};var eL=e=>{let{isVisible:s,onCancel:l,onSuccess:i}=e,[r]=o.Z.useForm(),{mutateAsync:n,isPending:a}=eO(),c=async e=>{let s=eE(e);await n(s,{onSuccess:()=>{O.Z.success("SSO settings added successfully"),i()},onError:e=>{O.Z.fromBackend("Failed to save SSO settings: "+(0,E.O)(e))}})},m=()=>{r.resetFields(),l()};return(0,t.jsx)(u.Z,{title:"Add SSO",open:s,width:800,footer:(0,t.jsxs)(ea.Z,{children:[(0,t.jsx)(d.ZP,{onClick:m,disabled:a,children:"Cancel"}),(0,t.jsx)(d.ZP,{loading:a,onClick:()=>r.submit(),children:a?"Adding...":"Add SSO"})]}),onCancel:m,children:(0,t.jsx)(ek,{form:r,onFormSubmit:c})})},eP=l(21609),eA=e=>{let{isVisible:s,onCancel:l,onSuccess:i}=e,{data:r}=ef(),{mutateAsync:n,isPending:a}=eO(),o=async()=>{await n({google_client_id:null,google_client_secret:null,microsoft_client_id:null,microsoft_client_secret:null,microsoft_tenant:null,generic_client_id:null,generic_client_secret:null,generic_authorization_endpoint:null,generic_token_endpoint:null,generic_userinfo_endpoint:null,proxy_base_url:null,user_email:null,sso_provider:null,role_mappings:null},{onSuccess:()=>{O.Z.success("SSO settings cleared successfully"),l(),i()},onError:e=>{O.Z.fromBackend("Failed to clear SSO settings: "+(0,E.O)(e))}})};return(0,t.jsx)(eP.Z,{isOpen:s,title:"Confirm Clear SSO Settings",alertMessage:"This action cannot be undone.",message:"Are you sure you want to clear all SSO settings? Users will no longer be able to login using SSO after this change.",resourceInformationTitle:"SSO Settings",resourceInformation:[{label:"Provider",value:(null==r?void 0:r.values)&&eT(null==r?void 0:r.values)||"Generic"}],onCancel:l,onOk:o,confirmLoading:a})},eU=e=>{let{isVisible:s,onCancel:l,onSuccess:r}=e,[n]=o.Z.useForm(),a=ef(),{mutateAsync:c,isPending:m}=eO();(0,i.useEffect)(()=>{if(s&&a.data&&a.data.values){var e,l,t,i,r,o;let s=a.data;console.log("Raw SSO data received:",s),console.log("SSO values:",s.values),console.log("user_email from API:",s.values.user_email);let c=null;s.values.google_client_id?c="google":s.values.microsoft_client_id?c="microsoft":s.values.generic_client_id&&(c=(null===(e=s.values.generic_authorization_endpoint)||void 0===e?void 0:e.includes("okta"))||(null===(l=s.values.generic_authorization_endpoint)||void 0===l?void 0:l.includes("auth0"))?"okta":"generic");let d={};if(s.values.role_mappings){let e=s.values.role_mappings,l=e=>e&&0!==e.length?e.join(", "):"";d={use_role_mappings:!0,group_claim:e.group_claim,default_role:e.default_role||"internal_user",proxy_admin_teams:l(null===(t=e.roles)||void 0===t?void 0:t.proxy_admin),admin_viewer_teams:l(null===(i=e.roles)||void 0===i?void 0:i.proxy_admin_viewer),internal_user_teams:l(null===(r=e.roles)||void 0===r?void 0:r.internal_user),internal_viewer_teams:l(null===(o=e.roles)||void 0===o?void 0:o.internal_user_viewer)}}let u={sso_provider:c,...s.values,...d};console.log("Setting form values:",u),n.resetFields(),setTimeout(()=>{n.setFieldsValue(u),console.log("Form values set, current form values:",n.getFieldsValue())},100)}},[s,a.data,n]);let g=async e=>{try{let s=eE(e);await c(s,{onSuccess:()=>{O.Z.success("SSO settings updated successfully"),r()},onError:e=>{O.Z.fromBackend("Failed to save SSO settings: "+(0,E.O)(e))}})}catch(e){O.Z.fromBackend("Failed to process SSO settings: "+(0,E.O)(e))}},p=()=>{n.resetFields(),l()};return(0,t.jsx)(u.Z,{title:"Edit SSO Settings",open:s,width:800,footer:(0,t.jsxs)(ea.Z,{children:[(0,t.jsx)(d.ZP,{onClick:p,disabled:m,children:"Cancel"}),(0,t.jsx)(d.ZP,{loading:m,onClick:()=>n.submit(),children:m?"Saving...":"Save"})]}),onCancel:p,children:(0,t.jsx)(ek,{form:n,onFormSubmit:g})})},eR=l(42208),eM=l(87769);function ez(e){let{defaultHidden:s=!0,value:l}=e,[r,n]=(0,i.useState)(s);return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-gray-600 flex-1",children:l?r?"•".repeat(l.length):l:(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"})}),l&&(0,t.jsx)(d.ZP,{type:"text",size:"small",icon:r?(0,t.jsx)(eR.Z,{className:"w-4 h-4"}):(0,t.jsx)(eM.Z,{className:"w-4 h-4"}),onClick:()=>n(!r),className:"text-gray-400 hover:text-gray-600"})]})}var eF=l(56609),eG=l(95805);let{Title:eD,Text:eB}=r.default;function eV(e){let{roleMappings:s}=e;if(!s)return null;let l=[{title:"Role",dataIndex:"role",key:"role",render:e=>(0,t.jsx)(eB,{strong:!0,children:ew[e]})},{title:"Mapped Groups",dataIndex:"groups",key:"groups",render:e=>(0,t.jsx)(t.Fragment,{children:e.length>0?e.map((e,s)=>(0,t.jsx)(eo.Z,{color:"blue",children:e},s)):(0,t.jsx)(eB,{className:"text-gray-400 italic",children:"No groups mapped"})})}];return(0,t.jsxs)(eu.Z,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(eG.Z,{className:"w-6 h-6 text-gray-400 mb-2"}),(0,t.jsx)(eD,{level:3,children:"Role Mappings"})]}),(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eD,{level:5,children:"Group Claim"}),(0,t.jsx)("div",{children:(0,t.jsx)(eB,{code:!0,children:s.group_claim})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eD,{level:5,children:"Default Role"}),(0,t.jsx)("div",{children:(0,t.jsx)(eB,{strong:!0,children:ew[s.default_role]})})]})]}),(0,t.jsx)(ep.Z,{}),(0,t.jsx)(eF.Z,{columns:l,dataSource:Object.entries(s.roles).map(e=>{let[s,l]=e;return{role:s,groups:l}}),pagination:!1,bordered:!0,size:"small",className:"w-full"})]})]})}var eq=l(85180);let{Title:eY,Paragraph:eK}=r.default;function eH(e){let{onAdd:s}=e;return(0,t.jsx)("div",{className:"bg-white p-12 rounded-lg border border-dashed border-gray-300 text-center w-full",children:(0,t.jsx)(eq.Z,{image:eq.Z.PRESENTED_IMAGE_SIMPLE,description:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(eY,{level:4,children:"No SSO Configuration Found"}),(0,t.jsx)(eK,{type:"secondary",className:"max-w-md mx-auto",children:"Configure Single Sign-On (SSO) to enable seamless authentication for your team members using your identity provider."})]}),children:(0,t.jsx)(d.ZP,{type:"primary",size:"large",onClick:s,className:"flex items-center gap-2 mx-auto mt-4",children:"Configure SSO"})})})}let{Title:eW,Text:eQ}=r.default;function eJ(){return(0,t.jsx)(eu.Z,{children:(0,t.jsxs)(ea.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(ey.Z,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eW,{level:3,children:"SSO Configuration"}),(0,t.jsx)(eQ,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(em.Z.Button,{active:!0,size:"default",style:{width:170,height:32}}),(0,t.jsx)(em.Z.Button,{active:!0,size:"default",style:{width:190,height:32}})]})]}),(0,t.jsxs)(ej.Z,{bordered:!0,column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1},children:[(0,t.jsx)(ej.Z.Item,{label:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:100,height:16}})})}),(0,t.jsx)(ej.Z.Item,{label:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:200,height:16}})}),(0,t.jsx)(ej.Z.Item,{label:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:250,height:16}})}),(0,t.jsx)(ej.Z.Item,{label:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:180,height:16}})}),(0,t.jsx)(ej.Z.Item,{label:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:80,height:16}}),children:(0,t.jsx)(em.Z.Node,{active:!0,style:{width:220,height:16}})})]})]})})}let{Title:eX,Text:e$}=r.default;function e0(){let{data:e,refetch:s,isLoading:l}=ef(),[r,n]=(0,i.useState)(!1),[a,o]=(0,i.useState)(!1),[c,u]=(0,i.useState)(!1),m=!!(null==e?void 0:e.values.google_client_id)||!!(null==e?void 0:e.values.microsoft_client_id)||!!(null==e?void 0:e.values.generic_client_id),g=(null==e?void 0:e.values)?eT(e.values):null,p=!!(null==e?void 0:e.values.role_mappings),x=e=>(0,t.jsx)(e$,{className:"font-mono text-gray-600 text-sm",copyable:!!e,children:e||"-"}),h=e=>e||(0,t.jsx)("span",{className:"text-gray-400 italic",children:"Not configured"}),_={column:{xxl:1,xl:1,lg:1,md:1,sm:1,xs:1}},f={google:{providerText:eZ.google,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ez,{value:e.google_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ez,{value:e.google_client_secret})},{label:"Proxy Base URL",render:e=>h(e.proxy_base_url)}]},microsoft:{providerText:eZ.microsoft,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ez,{value:e.microsoft_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ez,{value:e.microsoft_client_secret})},{label:"Tenant",render:e=>h(e.microsoft_tenant)},{label:"Proxy Base URL",render:e=>h(e.proxy_base_url)}]},okta:{providerText:eZ.okta,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ez,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ez,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>x(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>x(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>x(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>h(e.proxy_base_url)}]},generic:{providerText:eZ.generic,fields:[{label:"Client ID",render:e=>(0,t.jsx)(ez,{value:e.generic_client_id})},{label:"Client Secret",render:e=>(0,t.jsx)(ez,{value:e.generic_client_secret})},{label:"Authorization Endpoint",render:e=>x(e.generic_authorization_endpoint)},{label:"Token Endpoint",render:e=>x(e.generic_token_endpoint)},{label:"User Info Endpoint",render:e=>x(e.generic_userinfo_endpoint)},{label:"Proxy Base URL",render:e=>h(e.proxy_base_url)}]}};return(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(eJ,{}):(0,t.jsxs)(ea.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(eu.Z,{children:(0,t.jsxs)(ea.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(ey.Z,{className:"w-6 h-6 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eX,{level:3,children:"SSO Configuration"}),(0,t.jsx)(e$,{type:"secondary",children:"Manage Single Sign-On authentication settings"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:m&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.ZP,{icon:(0,t.jsx)(ev.Z,{className:"w-4 h-4"}),onClick:()=>u(!0),children:"Edit SSO Settings"}),(0,t.jsx)(d.ZP,{danger:!0,icon:(0,t.jsx)(eb.Z,{className:"w-4 h-4"}),onClick:()=>n(!0),children:"Delete SSO Settings"})]})})]}),m?(()=>{if(!(null==e?void 0:e.values)||!g)return null;let{values:s}=e,l=f[g];return l?(0,t.jsxs)(ej.Z,{bordered:!0,..._,children:[(0,t.jsx)(ej.Z.Item,{label:"Provider",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[eS[g]&&(0,t.jsx)("img",{src:eS[g],alt:g,style:{height:24,width:24,objectFit:"contain"}}),(0,t.jsx)("span",{children:l.providerText})]})}),l.fields.map((e,l)=>(0,t.jsx)(ej.Z.Item,{label:e.label,children:e.render(s)},l))]}):null})():(0,t.jsx)(eH,{onAdd:()=>o(!0)})]})}),p&&(0,t.jsx)(eV,{roleMappings:null==e?void 0:e.values.role_mappings})]}),(0,t.jsx)(eA,{isVisible:r,onCancel:()=>n(!1),onSuccess:()=>s()}),(0,t.jsx)(eL,{isVisible:a,onCancel:()=>o(!1),onSuccess:()=>{o(!1),s()}}),(0,t.jsx)(eU,{isVisible:c,onCancel:()=>u(!1),onSuccess:()=>{u(!1),s()}})]})}var e1=e=>{let{searchParams:s,accessToken:l,userID:N,showSSOBanner:I,premiumUser:C,proxySettings:E,userRole:T}=e,[L]=o.Z.useForm(),[A]=o.Z.useForm(),{Title:U,Paragraph:R}=r.default,[M,z]=(0,i.useState)(""),[F,G]=(0,i.useState)(null),[D,B]=(0,i.useState)(null),[V,q]=(0,i.useState)(!1),[W,Q]=(0,i.useState)(!1),[J,X]=(0,i.useState)(!1),[$,ee]=(0,i.useState)(!1),[es,el]=(0,i.useState)(!1),[et,ei]=(0,i.useState)(!1),[er,en]=(0,i.useState)(!1),[ea,eo]=(0,i.useState)(!1),[ec,ed]=(0,i.useState)(!1),[eu,em]=(0,i.useState)(!1),[eg,ep]=(0,i.useState)([]),[eh,e_]=(0,i.useState)(null),[ef,ej]=(0,i.useState)(!1);(0,a.useRouter)();let[ey,ev]=(0,i.useState)(null);console.log=function(){};let eb=(0,H.n)(),eS="All IP Addresses Allowed",eZ=eb;eZ+="/fallback/login";let ew=async()=>{if(l)try{let e=await (0,k.getSSOSettings)(l);if(console.log("SSO data:",e),e&&e.values){let s=e.values.google_client_id&&e.values.google_client_secret,l=e.values.microsoft_client_id&&e.values.microsoft_client_secret,t=e.values.generic_client_id&&e.values.generic_client_secret;ej(s||l||t)}else ej(!1)}catch(e){console.error("Error checking SSO configuration:",e),ej(!1)}},eN=async()=>{try{if(!0!==C){O.Z.fromBackend("This feature is only available for premium users. Please upgrade your account.");return}if(l){let e=await (0,k.getAllowedIPs)(l);ep(e&&e.length>0?e:[eS])}else ep([eS])}catch(e){console.error("Error fetching allowed IPs:",e),O.Z.fromBackend("Failed to fetch allowed IPs ".concat(e)),ep([eS])}finally{!0===C&&en(!0)}},eI=async e=>{try{if(l){await (0,k.addAllowedIP)(l,e.ip);let s=await (0,k.getAllowedIPs)(l);ep(s),O.Z.success("IP address added successfully")}}catch(e){console.error("Error adding IP:",e),O.Z.fromBackend("Failed to add IP address ".concat(e))}finally{eo(!1)}},eC=async e=>{e_(e),ed(!0)},ek=async()=>{if(eh&&l)try{await (0,k.deleteAllowedIP)(l,eh);let e=await (0,k.getAllowedIPs)(l);ep(e.length>0?e:[eS]),O.Z.success("IP address deleted successfully")}catch(e){console.error("Error deleting IP:",e),O.Z.fromBackend("Failed to delete IP address ".concat(e))}finally{ed(!1),e_(null)}};(0,i.useEffect)(()=>{(async()=>{if(null!=l){let e=[],s=await (0,k.userGetAllUsersCall)(l,"proxy_admin_viewer");console.log("proxy admin viewer response: ",s);let t=s.users;console.log("proxy viewers response: ".concat(t)),t.forEach(s=>{e.push({user_role:s.user_role,user_id:s.user_id,user_email:s.user_email})}),console.log("proxy viewers: ".concat(t));let i=(await (0,k.userGetAllUsersCall)(l,"proxy_admin")).users;i.forEach(s=>{e.push({user_role:s.user_role,user_id:s.user_id,user_email:s.user_email})}),console.log("proxy admins: ".concat(i)),console.log("combinedList: ".concat(e)),G(e),ev(await (0,k.getPossibleUserRoles)(l))}})()},[l]),(0,i.useEffect)(()=>{ew()},[l,C]);let eO=()=>{em(!1)};return console.log("admins: ".concat(null==F?void 0:F.length)),(0,t.jsxs)("div",{className:"w-full m-2 mt-2 p-8",children:[(0,t.jsx)(U,{level:4,children:"Admin Access "}),(0,t.jsx)(R,{children:"Go to 'Internal Users' page to add other admins."}),(0,t.jsxs)(h.Z,{children:[(0,t.jsxs)(_.Z,{children:[(0,t.jsx)(x.Z,{children:"SSO Settings"}),(0,t.jsx)(x.Z,{children:"Security Settings"}),(0,t.jsx)(x.Z,{children:"SCIM"}),(0,t.jsx)(x.Z,{children:"UI Settings"})]}),(0,t.jsxs)(j.Z,{children:[(0,t.jsx)(f.Z,{children:(0,t.jsx)(e0,{})}),(0,t.jsxs)(f.Z,{children:[(0,t.jsxs)(p.Z,{children:[(0,t.jsx)(U,{level:4,children:" ✨ Security Settings"}),(0,t.jsx)(n.Z,{message:"SSO Configuration Deprecated",description:"Editing SSO Settings on this page is deprecated and will be removed in a future version. Please use the SSO Settings tab for SSO configuration.",type:"warning",showIcon:!0}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",marginTop:"1rem",marginLeft:"0.5rem"},children:[(0,t.jsx)("div",{children:(0,t.jsx)(m.Z,{style:{width:"150px"},onClick:()=>el(!0),children:ef?"Edit SSO Settings":"Add SSO"})}),(0,t.jsx)("div",{children:(0,t.jsx)(m.Z,{style:{width:"150px"},onClick:eN,children:"Allowed IPs"})}),(0,t.jsx)("div",{children:(0,t.jsx)(m.Z,{style:{width:"150px"},onClick:()=>!0===C?em(!0):O.Z.fromBackend("Only premium users can configure UI access control"),children:"UI Access Control"})})]})]}),(0,t.jsxs)("div",{className:"flex justify-start mb-4",children:[(0,t.jsx)(P,{isAddSSOModalVisible:es,isInstructionsModalVisible:et,handleAddSSOOk:()=>{el(!1),L.resetFields(),l&&C&&ew()},handleAddSSOCancel:()=>{el(!1),L.resetFields()},handleShowInstructions:e=>{el(!1),ei(!0)},handleInstructionsOk:()=>{ei(!1),l&&C&&ew()},handleInstructionsCancel:()=>{ei(!1),l&&C&&ew()},form:L,accessToken:l,ssoConfigured:ef}),(0,t.jsx)(u.Z,{title:"Manage Allowed IP Addresses",width:800,visible:er,onCancel:()=>en(!1),footer:[(0,t.jsx)(m.Z,{className:"mx-1",onClick:()=>eo(!0),children:"Add IP Address"},"add"),(0,t.jsx)(m.Z,{onClick:()=>en(!1),children:"Close"},"close")],children:(0,t.jsxs)(y.Z,{children:[(0,t.jsx)(S.Z,{children:(0,t.jsxs)(w.Z,{children:[(0,t.jsx)(Z.Z,{children:"IP Address"}),(0,t.jsx)(Z.Z,{className:"text-right",children:"Action"})]})}),(0,t.jsx)(v.Z,{children:eg.map((e,s)=>(0,t.jsxs)(w.Z,{children:[(0,t.jsx)(b.Z,{children:e}),(0,t.jsx)(b.Z,{className:"text-right",children:e!==eS&&(0,t.jsx)(m.Z,{onClick:()=>eC(e),color:"red",size:"xs",children:"Delete"})})]},s))})]})}),(0,t.jsx)(u.Z,{title:"Add Allowed IP Address",visible:ea,onCancel:()=>eo(!1),footer:null,children:(0,t.jsxs)(o.Z,{onFinish:eI,children:[(0,t.jsx)(o.Z.Item,{name:"ip",rules:[{required:!0,message:"Please enter an IP address"}],children:(0,t.jsx)(c.default,{placeholder:"Enter IP address"})}),(0,t.jsx)(o.Z.Item,{children:(0,t.jsx)(d.ZP,{htmlType:"submit",children:"Add IP Address"})})]})}),(0,t.jsx)(u.Z,{title:"Confirm Delete",visible:ec,onCancel:()=>ed(!1),onOk:ek,footer:[(0,t.jsx)(m.Z,{className:"mx-1",onClick:()=>ek(),children:"Yes"},"delete"),(0,t.jsx)(m.Z,{onClick:()=>ed(!1),children:"Close"},"close")],children:(0,t.jsxs)("p",{children:["Are you sure you want to delete the IP address: ",eh,"?"]})}),(0,t.jsx)(u.Z,{title:"UI Access Control Settings",visible:eu,width:600,footer:null,onOk:eO,onCancel:()=>{em(!1)},children:(0,t.jsx)(K,{accessToken:l,onSuccess:()=>{eO(),O.Z.success("UI Access Control settings updated successfully")}})})]}),(0,t.jsxs)(g.Z,{title:"Login without SSO",color:"teal",children:["If you need to login without sso, you can access"," ",(0,t.jsxs)("a",{href:eZ,target:"_blank",children:[(0,t.jsx)("b",{children:eZ})," "]})]})]}),(0,t.jsx)(f.Z,{children:(0,t.jsx)(Y,{accessToken:l,userID:N,proxySettings:E})}),(0,t.jsx)(f.Z,{children:(0,t.jsx)(ex,{})})]})]})]})}},1633:function(e,s,l){l.d(s,{j:function(){return R}});var t=l(57437),i=l(39823),r=l(39760),n=l(92403),a=l(28595),o=l(68208),c=l(69993),d=l(58630),u=l(57400),m=l(93750),g=l(29436),p=l(44625),x=l(9775),h=l(48231),_=l(15883),f=l(41361),j=l(37527),y=l(99458),v=l(12660),b=l(88009),S=l(71916),Z=l(41169),w=l(38434),N=l(71891),I=l(55322),C=l(11429),k=l(13817),O=l(18310),E=l(60985),T=l(2265),L=l(20347),P=l(79262),A=l(91027);let{Sider:U}=k.default,R=[{groupLabel:"AI GATEWAY",items:[{key:"api-keys",page:"api-keys",label:"Virtual Keys",icon:(0,t.jsx)(n.Z,{})},{key:"llm-playground",page:"llm-playground",label:"Playground",icon:(0,t.jsx)(a.Z,{}),roles:L.LQ},{key:"models",page:"models",label:"Models + Endpoints",icon:(0,t.jsx)(o.Z,{}),roles:L.LQ},{key:"agents",page:"agents",label:"Agents",icon:(0,t.jsx)(c.Z,{}),roles:L.LQ},{key:"mcp-servers",page:"mcp-servers",label:"MCP Servers",icon:(0,t.jsx)(d.Z,{})},{key:"guardrails",page:"guardrails",label:"Guardrails",icon:(0,t.jsx)(u.Z,{}),roles:L.ZL},{key:"policies",page:"policies",label:(0,t.jsx)("span",{className:"flex items-center gap-4",children:"Policies"}),icon:(0,t.jsx)(m.Z,{}),roles:L.ZL},{key:"tools",page:"tools",label:"Tools",icon:(0,t.jsx)(d.Z,{}),children:[{key:"search-tools",page:"search-tools",label:"Search Tools",icon:(0,t.jsx)(g.Z,{})},{key:"vector-stores",page:"vector-stores",label:"Vector Stores",icon:(0,t.jsx)(p.Z,{})}]}]},{groupLabel:"OBSERVABILITY",items:[{key:"new_usage",page:"new_usage",icon:(0,t.jsx)(x.Z,{}),roles:[...L.ZL,...L.lo],label:"Usage"},{key:"logs",page:"logs",label:(0,t.jsxs)("span",{className:"flex items-center gap-4",children:["Logs ",(0,t.jsx)(A.Z,{})]}),icon:(0,t.jsx)(h.Z,{})}]},{groupLabel:"ACCESS CONTROL",items:[{key:"users",page:"users",label:"Internal Users",icon:(0,t.jsx)(_.Z,{}),roles:L.ZL},{key:"teams",page:"teams",label:"Teams",icon:(0,t.jsx)(f.Z,{})},{key:"organizations",page:"organizations",label:"Organizations",icon:(0,t.jsx)(j.Z,{}),roles:L.ZL},{key:"budgets",page:"budgets",label:"Budgets",icon:(0,t.jsx)(y.Z,{}),roles:L.ZL}]},{groupLabel:"DEVELOPER TOOLS",items:[{key:"api_ref",page:"api_ref",label:"API Reference",icon:(0,t.jsx)(v.Z,{})},{key:"model-hub-table",page:"model-hub-table",label:"AI Hub",icon:(0,t.jsx)(b.Z,{})},{key:"learning-resources",page:"learning-resources",label:"Learning Resources",icon:(0,t.jsx)(S.Z,{}),external_url:"https://models.litellm.ai/cookbook"},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,t.jsx)(Z.Z,{}),children:[{key:"caching",page:"caching",label:"Caching",icon:(0,t.jsx)(p.Z,{}),roles:L.ZL},{key:"prompts",page:"prompts",label:"Prompts",icon:(0,t.jsx)(w.Z,{}),roles:L.ZL},{key:"transform-request",page:"transform-request",label:"API Playground",icon:(0,t.jsx)(v.Z,{}),roles:[...L.ZL,...L.lo]},{key:"tag-management",page:"tag-management",label:"Tag Management",icon:(0,t.jsx)(N.Z,{}),roles:L.ZL},{key:"claude-code-plugins",page:"claude-code-plugins",label:"Claude Code Plugins",icon:(0,t.jsx)(d.Z,{}),roles:L.ZL},{key:"4",page:"usage",label:"Old Usage",icon:(0,t.jsx)(x.Z,{})}]}]},{groupLabel:"SETTINGS",roles:L.ZL,items:[{key:"settings",page:"settings",label:(0,t.jsx)("span",{className:"flex items-center gap-4",children:"Settings"}),icon:(0,t.jsx)(I.Z,{}),roles:L.ZL,children:[{key:"router-settings",page:"router-settings",label:"Router Settings",icon:(0,t.jsx)(I.Z,{}),roles:L.ZL},{key:"logging-and-alerts",page:"logging-and-alerts",label:"Logging & Alerts",icon:(0,t.jsx)(I.Z,{}),roles:L.ZL},{key:"admin-panel",page:"admin-panel",label:"Admin Settings",icon:(0,t.jsx)(I.Z,{}),roles:L.ZL},{key:"cost-tracking",page:"cost-tracking",label:"Cost Tracking",icon:(0,t.jsx)(x.Z,{}),roles:L.ZL},{key:"ui-theme",page:"ui-theme",label:"UI Theme",icon:(0,t.jsx)(C.Z,{}),roles:L.ZL}]}]}];s.Z=e=>{let{setPage:s,defaultSelectedKey:l,collapsed:n=!1,enabledPagesInternalUsers:a}=e,{userId:o,accessToken:c,userRole:d}=(0,r.Z)(),{data:u}=(0,i.q)(),m=(0,T.useMemo)(()=>!!o&&!!u&&u.some(e=>{var s;return null===(s=e.members)||void 0===s?void 0:s.some(e=>e.user_id===o&&"org_admin"===e.user_role)}),[o,u]),g=e=>{let l=new URLSearchParams(window.location.search);l.set("page",e),window.history.pushState(null,"","?".concat(l.toString())),s(e)},p=e=>{let s=(0,L.tY)(d);return null!=a&&console.log("[LeftNav] Filtering with enabled pages:",{userRole:d,isAdmin:s,enabledPagesInternalUsers:a}),e.map(e=>({...e,children:e.children?p(e.children):void 0})).filter(e=>{if("organizations"===e.key){if(!(!e.roles||e.roles.includes(d)||m))return!1;if(!s&&null!=a){let s=a.includes(e.page);return console.log('[LeftNav] Page "'.concat(e.page,'" (').concat(e.key,"): ").concat(s?"VISIBLE":"HIDDEN")),s}return!0}if(e.roles&&!e.roles.includes(d))return!1;if(!s&&null!=a){if(e.children&&e.children.length>0&&e.children.some(e=>a.includes(e.page)))return console.log('[LeftNav] Parent "'.concat(e.page,'" (').concat(e.key,"): VISIBLE (has visible children)")),!0;let s=a.includes(e.page);return console.log('[LeftNav] Page "'.concat(e.page,'" (').concat(e.key,"): ").concat(s?"VISIBLE":"HIDDEN")),s}return!0})},x=(e=>{for(let s of R)for(let l of s.items){if(l.page===e)return l.key;if(l.children){let s=l.children.find(s=>s.page===e);if(s)return s.key}}return"api-keys"})(l);return(0,t.jsx)(k.default,{children:(0,t.jsxs)(U,{theme:"light",width:220,collapsed:n,collapsedWidth:80,collapsible:!0,trigger:null,style:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[(0,t.jsx)(O.ZP,{theme:{components:{Menu:{iconSize:15,fontSize:13,itemMarginInline:4,itemPaddingInline:8,itemHeight:30,itemBorderRadius:6,subMenuItemBorderRadius:6,groupTitleFontSize:10,groupTitleLineHeight:1.5}}},children:(0,t.jsx)(E.Z,{mode:"inline",selectedKeys:[x],defaultOpenKeys:[],inlineCollapsed:n,className:"custom-sidebar-menu",style:{borderRight:0,backgroundColor:"transparent",fontSize:"13px",paddingTop:"4px"},items:(()=>{let e=[];return R.forEach(s=>{if(s.roles&&!s.roles.includes(d))return;let l=p(s.items);0!==l.length&&e.push({type:"group",label:n?null:(0,t.jsx)("span",{style:{fontSize:"10px",fontWeight:600,color:"#6b7280",letterSpacing:"0.05em",padding:"12px 0 4px 12px",display:"block",marginBottom:"2px"},children:s.groupLabel}),children:l.map(e=>{var s;return{key:e.key,icon:e.icon,label:e.label,children:null===(s=e.children)||void 0===s?void 0:s.map(e=>({key:e.key,icon:e.icon,label:e.label,onClick:()=>{e.external_url?window.open(e.external_url,"_blank"):g(e.page)}})),onClick:e.children?void 0:()=>{e.external_url?window.open(e.external_url,"_blank"):g(e.page)}}})})}),e})()})}),(0,L.tY)(d)&&!n&&(0,t.jsx)(P.Z,{accessToken:c,width:220})]})})}},79262:function(e,s,l){l.d(s,{Z:function(){return g}});var t=l(57437);l(1309);var i=l(76865),r=l(70525),n=l(95805),a=l(51817),o=l(21047);l(22135),l(40875);var c=l(49663),d=l(2265),u=l(19250);let m=function(){for(var e=arguments.length,s=Array(e),l=0;l{(async()=>{if(s){y(!0),b(null);try{let e=await (0,u.getRemainingUsers)(s);f(e)}catch(e){console.error("Failed to fetch usage data:",e),b("Failed to load usage data")}finally{y(!1)}}})()},[s]);let{isOverLimit:S,isNearLimit:Z,usagePercentage:w,userMetrics:N,teamMetrics:I}=(e=>{if(!e)return{isOverLimit:!1,isNearLimit:!1,usagePercentage:0,userMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0},teamMetrics:{isOverLimit:!1,isNearLimit:!1,usagePercentage:0}};let s=e.total_users?e.total_users_used/e.total_users*100:0,l=s>100,t=s>=80&&s<=100,i=e.total_teams?e.total_teams_used/e.total_teams*100:0,r=i>100,n=i>=80&&i<=100,a=l||r;return{isOverLimit:a,isNearLimit:(t||n)&&!a,usagePercentage:Math.max(s,i),userMetrics:{isOverLimit:l,isNearLimit:t,usagePercentage:s},teamMetrics:{isOverLimit:r,isNearLimit:n,usagePercentage:i}}})(_),C=()=>S?(0,t.jsx)(i.Z,{className:"h-3 w-3"}):Z?(0,t.jsx)(r.Z,{className:"h-3 w-3"}):null;return s&&((null==_?void 0:_.total_users)!==null||(null==_?void 0:_.total_teams)!==null)?(0,t.jsx)("div",{className:"fixed bottom-4 left-4 z-50",style:{width:"".concat(Math.min(l,220),"px")},children:(0,t.jsx)(()=>x?(0,t.jsx)("button",{onClick:()=>h(!1),className:m("bg-white border border-gray-200 rounded-lg shadow-sm p-3 hover:shadow-md transition-all w-full"),title:"Show usage details",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Z,{className:"h-4 w-4 flex-shrink-0"}),(S||Z)&&(0,t.jsx)("span",{className:"flex-shrink-0",children:C()}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium truncate",children:[_&&null!==_.total_users&&(0,t.jsxs)("span",{className:m("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["U: ",_.total_users_used,"/",_.total_users]}),_&&null!==_.total_teams&&(0,t.jsxs)("span",{className:m("flex-shrink-0 px-1.5 py-0.5 rounded text-xs border",I.isOverLimit&&"bg-red-50 text-red-700 border-red-200",I.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!I.isOverLimit&&!I.isNearLimit&&"bg-gray-50 text-gray-700 border-gray-200"),children:["T: ",_.total_teams_used,"/",_.total_teams]}),!_||null===_.total_users&&null===_.total_teams&&(0,t.jsx)("span",{className:"truncate",children:"Usage"})]})]})}):j?(0,t.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 w-full",children:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2",children:[(0,t.jsx)(a.Z,{className:"h-4 w-4 animate-spin"}),(0,t.jsx)("span",{className:"text-sm text-gray-500 truncate",children:"Loading..."})]})}):v||!_?(0,t.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg shadow-sm p-4 group w-full",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsx)("span",{className:"text-sm text-gray-500 truncate block",children:v||"No data"})}),(0,t.jsx)("button",{onClick:()=>h(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,t.jsx)(o.Z,{className:"h-3 w-3 text-gray-400"})})]})}):(0,t.jsxs)("div",{className:m("bg-white border rounded-lg shadow-sm p-3 transition-all duration-200 group w-full"),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,t.jsx)(n.Z,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsx)("span",{className:"font-medium text-sm truncate",children:"Usage"})]}),(0,t.jsx)("button",{onClick:()=>h(!0),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-gray-100 rounded transition-all flex-shrink-0",title:"Minimize",children:(0,t.jsx)(o.Z,{className:"h-3 w-3 text-gray-400"})})]}),(0,t.jsxs)("div",{className:"space-y-3 text-sm",children:[null!==_.total_users&&(0,t.jsxs)("div",{className:m("space-y-1 border rounded-md p-2",N.isOverLimit&&"border-red-200 bg-red-50",N.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,t.jsx)(n.Z,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-medium",children:"Users"}),(0,t.jsx)("span",{className:m("ml-1 px-1.5 py-0.5 rounded border",N.isOverLimit&&"bg-red-50 text-red-700 border-red-200",N.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!N.isOverLimit&&!N.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:N.isOverLimit?"Over limit":N.isNearLimit?"Near limit":"OK"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[_.total_users_used,"/",_.total_users]})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,t.jsx)("span",{className:m("font-medium text-right",N.isOverLimit&&"text-red-600",N.isNearLimit&&"text-yellow-600"),children:_.total_users_remaining})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[Math.round(N.usagePercentage),"%"]})]}),(0,t.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,t.jsx)("div",{className:m("h-2 rounded-full transition-all duration-300",N.isOverLimit&&"bg-red-500",N.isNearLimit&&"bg-yellow-500",!N.isOverLimit&&!N.isNearLimit&&"bg-green-500"),style:{width:"".concat(Math.min(N.usagePercentage,100),"%")}})})]}),null!==_.total_teams&&(0,t.jsxs)("div",{className:m("space-y-1 border rounded-md p-2",I.isOverLimit&&"border-red-200 bg-red-50",I.isNearLimit&&"border-yellow-200 bg-yellow-50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-600 mb-1",children:[(0,t.jsx)(c.Z,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"font-medium",children:"Teams"}),(0,t.jsx)("span",{className:m("ml-1 px-1.5 py-0.5 rounded border",I.isOverLimit&&"bg-red-50 text-red-700 border-red-200",I.isNearLimit&&"bg-yellow-50 text-yellow-700 border-yellow-200",!I.isOverLimit&&!I.isNearLimit&&"bg-gray-50 text-gray-600 border-gray-200"),children:I.isOverLimit?"Over limit":I.isNearLimit?"Near limit":"OK"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Used:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[_.total_teams_used,"/",_.total_teams]})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Remaining:"}),(0,t.jsx)("span",{className:m("font-medium text-right",I.isOverLimit&&"text-red-600",I.isNearLimit&&"text-yellow-600"),children:_.total_teams_remaining})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-gray-600 text-xs",children:"Usage:"}),(0,t.jsxs)("span",{className:"font-medium text-right",children:[Math.round(I.usagePercentage),"%"]})]}),(0,t.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2",children:(0,t.jsx)("div",{className:m("h-2 rounded-full transition-all duration-300",I.isOverLimit&&"bg-red-500",I.isNearLimit&&"bg-yellow-500",!I.isOverLimit&&!I.isNearLimit&&"bg-green-500"),style:{width:"".concat(Math.min(I.usagePercentage,100),"%")}})})]})]})]}),{})}):null}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2-253aec8d55c7bb6f.js b/litellm/proxy/_experimental/out/_next/static/chunks/2-253aec8d55c7bb6f.js
deleted file mode 100644
index 85f8498f5f2..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/2-253aec8d55c7bb6f.js
+++ /dev/null
@@ -1 +0,0 @@
-(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2],{49634:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},l=r(55015),i=o.forwardRef(function(e,t){return o.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},60216:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0010.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 00-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"}}]},name:"file-excel",theme:"outlined"},l=r(55015),i=o.forwardRef(function(e,t){return o.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},10798:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"},l=r(55015),i=o.forwardRef(function(e,t){return o.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},64739:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},l=r(55015),i=o.forwardRef(function(e,t){return o.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},46783:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},l=r(55015),i=o.forwardRef(function(e,t){return o.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},23907:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"},l=r(55015),i=o.forwardRef(function(e,t){return o.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},40312:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z"}}]},name:"shopping-cart",theme:"outlined"},l=r(55015),i=o.forwardRef(function(e,t){return o.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},59664:function(e,t,r){"use strict";r.d(t,{Z:function(){return O}});var n=r(5853),o=r(2265),a=r(47625),l=r(93765),i=r(54061),s=r(97059),c=r(62994),u=r(25311),d=(0,l.z)({chartName:"LineChart",GraphicalChild:i.x,axisComponents:[{axisType:"xAxis",AxisComp:s.K},{axisType:"yAxis",AxisComp:c.B}],formatAxisMap:u.t9}),h=r(56940),m=r(26680),p=r(8147),f=r(22190),g=r(81889),b=r(65278),k=r(98593),y=r(92666),v=r(32644),x=r(7084),w=r(26898),E=r(13241),C=r(1153);let O=o.forwardRef((e,t)=>{let{data:r=[],categories:l=[],index:u,colors:O=w.s,valueFormatter:M=C.Cj,startEndOnly:Z=!1,showXAxis:N=!0,showYAxis:q=!0,yAxisWidth:S=56,intervalType:j="equidistantPreserveStart",animationDuration:z=900,showAnimation:L=!1,showTooltip:_=!0,showLegend:A=!0,showGridLines:V=!0,autoMinValue:T=!1,curveType:H="linear",minValue:F,maxValue:P,connectNulls:R=!1,allowDecimals:D=!0,noDataText:B,className:Q,onValueChange:K,enableLegendSlider:I=!1,customTooltip:W,rotateLabelX:G,padding:X=N||q?{left:20,right:20}:{left:0,right:0},tickGap:J=5,xAxisLabel:Y,yAxisLabel:$}=e,U=(0,n._T)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","padding","tickGap","xAxisLabel","yAxisLabel"]),[ee,et]=(0,o.useState)(60),[er,en]=(0,o.useState)(void 0),[eo,ea]=(0,o.useState)(void 0),el=(0,v.me)(l,O),ei=(0,v.i4)(T,F,P),es=!!K;function ec(e){es&&(e===eo&&!er||(0,v.FB)(r,e)&&er&&er.dataKey===e?(ea(void 0),null==K||K(null)):(ea(e),null==K||K({eventType:"category",categoryClicked:e})),en(void 0))}return o.createElement("div",Object.assign({ref:t,className:(0,E.q)("w-full h-80",Q)},U),o.createElement(a.h,{className:"h-full w-full"},(null==r?void 0:r.length)?o.createElement(d,{data:r,onClick:es&&(eo||er)?()=>{en(void 0),ea(void 0),null==K||K(null)}:void 0,margin:{bottom:Y?30:void 0,left:$?20:void 0,right:$?5:void 0,top:5}},V?o.createElement(h.q,{className:(0,E.q)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,o.createElement(s.K,{padding:X,hide:!N,dataKey:u,interval:Z?"preserveStartEnd":j,tick:{transform:"translate(0, 6)"},ticks:Z?[r[0][u],r[r.length-1][u]]:void 0,fill:"",stroke:"",className:(0,E.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:J,angle:null==G?void 0:G.angle,dy:null==G?void 0:G.verticalShift,height:null==G?void 0:G.xAxisHeight},Y&&o.createElement(m._,{position:"insideBottom",offset:-20,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},Y)),o.createElement(c.B,{width:S,hide:!q,axisLine:!1,tickLine:!1,type:"number",domain:ei,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,E.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:M,allowDecimals:D},$&&o.createElement(m._,{position:"insideLeft",style:{textAnchor:"middle"},angle:-90,offset:-15,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},$)),o.createElement(p.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:_?e=>{let{active:t,payload:r,label:n}=e;return W?o.createElement(W,{payload:null==r?void 0:r.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=el.get(e.dataKey))&&void 0!==t?t:x.fr.Gray})}),active:t,label:n}):o.createElement(k.ZP,{active:t,payload:r,label:n,valueFormatter:M,categoryColors:el})}:o.createElement(o.Fragment,null),position:{y:0}}),A?o.createElement(f.D,{verticalAlign:"top",height:ee,content:e=>{let{payload:t}=e;return(0,b.Z)({payload:t},el,et,eo,es?e=>ec(e):void 0,I)}}):null,l.map(e=>{var t;return o.createElement(i.x,{className:(0,E.q)((0,C.bM)(null!==(t=el.get(e))&&void 0!==t?t:x.fr.Gray,w.K.text).strokeColor),strokeOpacity:er||eo&&eo!==e?.3:1,activeDot:e=>{var t;let{cx:n,cy:a,stroke:l,strokeLinecap:i,strokeLinejoin:s,strokeWidth:c,dataKey:u}=e;return o.createElement(g.o,{className:(0,E.q)("stroke-tremor-background dark:stroke-dark-tremor-background",K?"cursor-pointer":"",(0,C.bM)(null!==(t=el.get(u))&&void 0!==t?t:x.fr.Gray,w.K.text).fillColor),cx:n,cy:a,r:5,fill:"",stroke:l,strokeLinecap:i,strokeLinejoin:s,strokeWidth:c,onClick:(t,n)=>{n.stopPropagation(),es&&(e.index===(null==er?void 0:er.index)&&e.dataKey===(null==er?void 0:er.dataKey)||(0,v.FB)(r,e.dataKey)&&eo&&eo===e.dataKey?(ea(void 0),en(void 0),null==K||K(null)):(ea(e.dataKey),en({index:e.index,dataKey:e.dataKey}),null==K||K(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var n;let{stroke:a,strokeLinecap:l,strokeLinejoin:i,strokeWidth:s,cx:c,cy:u,dataKey:d,index:h}=t;return(0,v.FB)(r,e)&&!(er||eo&&eo!==e)||(null==er?void 0:er.index)===h&&(null==er?void 0:er.dataKey)===e?o.createElement(g.o,{key:h,cx:c,cy:u,r:5,stroke:a,fill:"",strokeLinecap:l,strokeLinejoin:i,strokeWidth:s,className:(0,E.q)("stroke-tremor-background dark:stroke-dark-tremor-background",K?"cursor-pointer":"",(0,C.bM)(null!==(n=el.get(d))&&void 0!==n?n:x.fr.Gray,w.K.text).fillColor)}):o.createElement(o.Fragment,{key:h})},key:e,name:e,type:H,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:L,animationDuration:z,connectNulls:R})}),K?l.map(e=>o.createElement(i.x,{className:(0,E.q)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:H,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:R,onClick:(e,t)=>{t.stopPropagation();let{name:r}=e;ec(r)}})):null):o.createElement(y.Z,{noDataText:B})))});O.displayName="LineChart"},16853:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n=r(5853),o=r(96398),a=r(44140),l=r(2265),i=r(13241),s=r(1153);let c=(0,s.fn)("Textarea"),u=l.forwardRef((e,t)=>{let{value:r,defaultValue:u="",placeholder:d="Type...",error:h=!1,errorMessage:m,disabled:p=!1,className:f,onChange:g,onValueChange:b,autoHeight:k=!1}=e,y=(0,n._T)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[v,x]=(0,a.Z)(u,r),w=(0,l.useRef)(null),E=(0,o.Uh)(v);return(0,l.useEffect)(()=>{let e=w.current;if(k&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[k,w,v]),l.createElement(l.Fragment,null,l.createElement("textarea",Object.assign({ref:(0,s.lq)([w,t]),value:v,placeholder:d,disabled:p,className:(0,i.q)(c("Textarea"),"w-full flex items-center outline-none rounded-tremor-default px-3 py-2 text-tremor-default focus:ring-2 transition duration-100 border","shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:shadow-dark-tremor-input focus:dark:border-dark-tremor-brand-subtle focus:dark:ring-dark-tremor-brand-muted",(0,o.um)(E,p,h),p?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",f),"data-testid":"text-area",onChange:e=>{null==g||g(e),x(e.target.value),null==b||b(e.target.value)}},y)),h&&m?l.createElement("p",{className:(0,i.q)(c("errorMessage"),"text-sm text-red-500 mt-1")},m):null)});u.displayName="Textarea"},35829:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(5853),o=r(26898),a=r(13241),l=r(1153),i=r(2265);let s=i.forwardRef((e,t)=>{let{color:r,children:s,className:c}=e,u=(0,n._T)(e,["color","children","className"]);return i.createElement("p",Object.assign({ref:t,className:(0,a.q)("font-semibold text-tremor-metric",r?(0,l.bM)(r,o.K.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",c)},u),s)});s.displayName="Metric"},96889:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n=r(5853),o=r(2265),a=r(26898),l=r(13241),i=r(1153);let s=(0,i.fn)("BarList");function c(e,t){let{data:r=[],color:c,valueFormatter:u=i.Cj,showAnimation:d=!1,onValueChange:h,sortOrder:m="descending",className:p}=e,f=(0,n._T)(e,["data","color","valueFormatter","showAnimation","onValueChange","sortOrder","className"]),g=h?"button":"div",b=o.useMemo(()=>"none"===m?r:[...r].sort((e,t)=>"ascending"===m?e.value-t.value:t.value-e.value),[r,m]),k=o.useMemo(()=>{let e=Math.max(...b.map(e=>e.value),0);return b.map(t=>0===t.value?0:Math.max(t.value/e*100,2))},[b]);return o.createElement("div",Object.assign({ref:t,className:(0,l.q)(s("root"),"flex justify-between space-x-6",p),"aria-sort":m},f),o.createElement("div",{className:(0,l.q)(s("bars"),"relative w-full space-y-1.5")},b.map((e,t)=>{var r,n,u;let m=e.icon;return o.createElement(g,{key:null!==(r=e.key)&&void 0!==r?r:t,onClick:()=>{null==h||h(e)},className:(0,l.q)(s("bar"),"group w-full flex items-center rounded-tremor-small",h?["cursor-pointer","hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-subtle/40"]:"")},o.createElement("div",{className:(0,l.q)("flex items-center rounded transition-all bg-opacity-40","h-8",e.color||c?[(0,i.bM)(null!==(n=e.color)&&void 0!==n?n:c,a.K.background).bgColor,h?"group-hover:bg-opacity-30":""]:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle/60",!h||e.color||c?"":"group-hover:bg-tremor-brand-subtle/30 group-hover:dark:bg-dark-tremor-brand-subtle/70",t===b.length-1?"mb-0":"",d?"duration-500":""),style:{width:"".concat(k[t],"%"),transition:d?"all 1s":""}},o.createElement("div",{className:(0,l.q)("absolute left-2 pr-4 flex max-w-full")},m?o.createElement(m,{className:(0,l.q)(s("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,e.href?o.createElement("a",{href:e.href,target:null!==(u=e.target)&&void 0!==u?u:"_blank",rel:"noreferrer",className:(0,l.q)(s("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default",h?"cursor-pointer":"","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis"),onClick:e=>e.stopPropagation()},e.name):o.createElement("p",{className:(0,l.q)(s("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name))))})),o.createElement("div",{className:s("labels")},b.map((e,t)=>{var r;return o.createElement("div",{key:null!==(r=e.key)&&void 0!==r?r:t,className:(0,l.q)(s("labelWrapper"),"flex justify-end items-center","h-8",t===b.length-1?"mb-0":"mb-1.5")},o.createElement("p",{className:(0,l.q)(s("labelText"),"whitespace-nowrap leading-none truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},u(e.value)))})))}c.displayName="BarList";let u=o.forwardRef(c)},45235:function(e,t,r){"use strict";r.d(t,{Z:function(){return C}});var n=r(2265),o=r(74126),a=r(53346),l=r(19722),i=r(36760),s=r.n(i),c=r(18242),u=r(71744),d=r(50337),h=e=>{let t;let{value:r,formatter:o,precision:a,decimalSeparator:l,groupSeparator:i="",prefixCls:s}=e;if("function"==typeof o)t=o(r);else{let e=String(r),o=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(o&&"-"!==e){let e=o[1],r=o[2]||"0",c=o[4]||"";r=r.replace(/\B(?=(\d{3})+(?!\d))/g,i),"number"==typeof a&&(c=c.padEnd(a,"0").slice(0,a>0?a:0)),c&&(c="".concat(l).concat(c)),t=[n.createElement("span",{key:"int",className:"".concat(s,"-content-value-int")},e,r),c&&n.createElement("span",{key:"decimal",className:"".concat(s,"-content-value-decimal")},c)]}else t=e}return n.createElement("span",{className:"".concat(s,"-content-value")},t)},m=r(12918),p=r(99320),f=r(71140);let g=e=>{let{componentCls:t,marginXXS:r,padding:n,colorTextDescription:o,titleFontSize:a,colorTextHeading:l,contentFontSize:i,fontFamily:s}=e;return{[t]:Object.assign(Object.assign({},(0,m.Wf)(e)),{["".concat(t,"-title")]:{marginBottom:r,color:o,fontSize:a},["".concat(t,"-skeleton")]:{paddingTop:n},["".concat(t,"-content")]:{color:l,fontSize:i,fontFamily:s,["".concat(t,"-content-value")]:{display:"inline-block",direction:"ltr"},["".concat(t,"-content-prefix, ").concat(t,"-content-suffix")]:{display:"inline-block"},["".concat(t,"-content-prefix")]:{marginInlineEnd:r},["".concat(t,"-content-suffix")]:{marginInlineStart:r}}})}};var b=(0,p.I$)("Statistic",e=>g((0,f.IX)(e,{})),e=>{let{fontSizeHeading3:t,fontSize:r}=e;return{titleFontSize:r,contentFontSize:t}}),k=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let y=n.forwardRef((e,t)=>{let{prefixCls:r,className:o,rootClassName:a,style:l,valueStyle:i,value:m=0,title:p,valueRender:f,prefix:g,suffix:y,loading:v=!1,formatter:x,precision:w,decimalSeparator:E=".",groupSeparator:C=",",onMouseEnter:O,onMouseLeave:M}=e,Z=k(e,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:N,direction:q,className:S,style:j}=(0,u.dj)("statistic"),z=N("statistic",r),[L,_,A]=b(z),V=n.createElement(h,{decimalSeparator:E,groupSeparator:C,prefixCls:z,formatter:x,precision:w,value:m}),T=s()(z,{["".concat(z,"-rtl")]:"rtl"===q},S,o,a,_,A),H=n.useRef(null);n.useImperativeHandle(t,()=>({nativeElement:H.current}));let F=(0,c.Z)(Z,{aria:!0,data:!0});return L(n.createElement("div",Object.assign({},F,{ref:H,className:T,style:Object.assign(Object.assign({},j),l),onMouseEnter:O,onMouseLeave:M}),p&&n.createElement("div",{className:"".concat(z,"-title")},p),n.createElement(d.Z,{paragraph:!1,loading:v,className:"".concat(z,"-skeleton"),active:!0},n.createElement("div",{style:i,className:"".concat(z,"-content")},g&&n.createElement("span",{className:"".concat(z,"-content-prefix")},g),f?f(V):V,y&&n.createElement("span",{className:"".concat(z,"-content-suffix")},y)))))}),v=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];var x=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},w=e=>{let{value:t,format:r="HH:mm:ss",onChange:i,onFinish:s,type:c}=e,u=x(e,["value","format","onChange","onFinish","type"]),d="countdown"===c,[h,m]=n.useState(null),p=(0,o.zX)(()=>{let e=Date.now(),r=new Date(t).getTime();return m({}),null==i||i(d?r-e:e-r),!d||!(r{let e;let t=()=>{e=(0,a.Z)(()=>{p()&&t()})};return t(),()=>a.Z.cancel(e)},[t,d]),n.useEffect(()=>{m({})},[]),n.createElement(y,Object.assign({},u,{value:t,valueRender:e=>(0,l.Tm)(e,{title:void 0}),formatter:(e,t)=>h?function(e,t,r){let{format:n=""}=t,o=new Date(e).getTime(),a=Date.now();return function(e,t){let r=e,n=/\[[^\]]*]/g,o=(t.match(n)||[]).map(e=>e.slice(1,-1)),a=t.replace(n,"[]"),l=v.reduce((e,t)=>{let[n,o]=t;if(e.includes(n)){let t=Math.floor(r/o);return r-=t*o,e.replace(RegExp("".concat(n,"+"),"g"),e=>{let r=e.length;return t.toString().padStart(r,"0")})}return e},a),i=0;return l.replace(n,()=>{let e=o[i];return i+=1,e})}(r?Math.max(o-a,0):Math.max(a-o,0),n)}(e,Object.assign(Object.assign({},t),{format:r}),d):"-"}))},E=n.memo(e=>n.createElement(w,Object.assign({},e,{type:"countdown"})));y.Timer=w,y.Countdown=E;var C=y},2651:function(e,t,r){"use strict";r.d(t,{Z:function(){return y}});var n=r(93463),o=r(11938),a=r(70774),l=r(73602),i=r(91691),s=r(25119),c=r(37628),u=r(32417),d=r(4877),h=r(57943),m=r(12789),p=r(54558);let f=(e,t)=>new p.t(e).setA(t).toRgbString(),g=(e,t)=>new p.t(e).lighten(t).toHexString(),b=e=>{let t=(0,h.R_)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},k=(e,t)=>{let r=e||"#000",n=t||"#fff";return{colorBgBase:r,colorTextBase:n,colorText:f(n,.85),colorTextSecondary:f(n,.65),colorTextTertiary:f(n,.45),colorTextQuaternary:f(n,.25),colorFill:f(n,.18),colorFillSecondary:f(n,.12),colorFillTertiary:f(n,.08),colorFillQuaternary:f(n,.04),colorBgSolid:f(n,.95),colorBgSolidHover:f(n,1),colorBgSolidActive:f(n,.9),colorBgElevated:g(r,12),colorBgContainer:g(r,8),colorBgLayout:g(r,0),colorBgSpotlight:g(r,26),colorBgBlur:f(n,.04),colorBorder:g(r,26),colorBorderSecondary:g(r,19)}};var y={defaultSeed:s.u_.token,useToken:function(){let[e,t,r]=(0,i.ZP)();return{theme:e,token:t,hashId:r}},defaultAlgorithm:c.Z,darkAlgorithm:(e,t)=>{let r=Object.keys(a.M).map(t=>{let r=(0,h.R_)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,n,o)=>(e["".concat(t,"-").concat(o+1)]=r[o],e["".concat(t).concat(o+1)]=r[o],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),n=null!=t?t:(0,c.Z)(e),o=(0,m.Z)(e,{generateColorPalettes:b,generateNeutralColorPalettes:k});return Object.assign(Object.assign(Object.assign(Object.assign({},n),r),o),{colorPrimaryBg:o.colorPrimaryBorder,colorPrimaryBgHover:o.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let r=null!=t?t:(0,c.Z)(e),n=r.fontSizeSM,o=r.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),function(e){let{sizeUnit:t,sizeStep:r}=e,n=r-2;return{sizeXXL:t*(n+10),sizeXL:t*(n+6),sizeLG:t*(n+2),sizeMD:t*(n+2),sizeMS:t*(n+1),size:t*n,sizeSM:t*n,sizeXS:t*(n-1),sizeXXS:t*(n-1)}}(null!=t?t:e)),(0,d.Z)(n)),{controlHeight:o}),(0,u.Z)(Object.assign(Object.assign({},r),{controlHeight:o})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,n.jG)(e.algorithm):o.Z,r=Object.assign(Object.assign({},a.Z),null==e?void 0:e.token);return(0,n.t2)(r,{override:null==e?void 0:e.token},t,l.Z)},defaultConfig:s.u_,_internalContext:s.Mj}},76858:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},82222:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},41671:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},66344:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},5136:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]])},64935:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]])},96362:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},3577:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]])},29202:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},33245:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},54001:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]])},11:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},33276:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},69076:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},73247:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},96137:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},80221:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]])},17689:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},79862:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("user-round",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]])},92369:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},11239:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},86669:function(e,t,r){"use strict";r.d(t,{gc:function(){return v},jF:function(){return k}});var n=r(2265);let o=e=>"boolean"==typeof e||e instanceof Boolean,a=e=>"number"==typeof e||e instanceof Number,l=e=>"bigint"==typeof e||e instanceof BigInt,i=e=>!!e&&e instanceof Date,s=e=>"string"==typeof e||e instanceof String,c=e=>Array.isArray(e),u=e=>"object"==typeof e&&null!==e,d=e=>!!e&&e instanceof Object&&"function"==typeof e;function h(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function m(e){let{field:t,value:r,data:o,lastElement:a,openBracket:l,closeBracket:i,level:s,style:c,shouldExpandNode:u,clickToExpandNode:d,outerRef:m,beforeExpandChange:p}=e,f=(0,n.useRef)(!1),[g,k]=(0,n.useState)(()=>u(s,r,t)),y=(0,n.useRef)(null);(0,n.useEffect)(()=>{f.current?k(u(s,r,t)):f.current=!0},[u]);let v=(0,n.useId)();if(0===o.length)return function(e){let{field:t,openBracket:r,closeBracket:o,lastElement:a,style:l}=e;return(0,n.createElement)("div",{className:l.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,n.createElement)("span",{className:l.label},h(t,l.quotesForFieldNames),":"),(0,n.createElement)("span",{className:l.punctuation},r),(0,n.createElement)("span",{className:l.punctuation},o),!a&&(0,n.createElement)("span",{className:l.punctuation},","))}({field:t,openBracket:l,closeBracket:i,lastElement:a,style:c});let x=g?c.collapseIcon:c.expandIcon,w=g?c.ariaLables.collapseJson:c.ariaLables.expandJson,E=s+1,C=o.length-1,O=e=>{g!==e&&(!p||p({level:s,value:r,field:t,newExpandValue:e}))&&k(e)},M=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),O("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!m.current)return;let r=m.current.querySelectorAll("[role=button]"),n=-1;for(let e=0;e{var e;O(!g);let t=y.current;if(!t)return;let r=null===(e=m.current)||void 0===e?void 0:e.querySelector('[role=button][tabindex="0"]');r&&(r.tabIndex=-1),t.tabIndex=0,t.focus()};return(0,n.createElement)("div",{className:c.basicChildStyle,role:"treeitem","aria-expanded":g,"aria-selected":void 0},(0,n.createElement)("span",{className:x,onClick:Z,onKeyDown:M,role:"button","aria-label":w,"aria-expanded":g,"aria-controls":g?v:void 0,ref:y,tabIndex:0===s?0:-1}),(t||""===t)&&(d?(0,n.createElement)("span",{className:c.clickableLabel,onClick:Z,onKeyDown:M},h(t,c.quotesForFieldNames),":"):(0,n.createElement)("span",{className:c.label},h(t,c.quotesForFieldNames),":")),(0,n.createElement)("span",{className:c.punctuation},l),g?(0,n.createElement)("ul",{id:v,role:"group",className:c.childFieldsContainer},o.map((e,t)=>(0,n.createElement)(b,{key:e[0]||t,field:e[0],value:e[1],style:c,lastElement:t===C,level:E,shouldExpandNode:u,clickToExpandNode:d,beforeExpandChange:p,outerRef:m}))):(0,n.createElement)("span",{className:c.collapsedContent,onClick:Z,onKeyDown:M}),(0,n.createElement)("span",{className:c.punctuation},i),!a&&(0,n.createElement)("span",{className:c.punctuation},","))}function p(e){let{field:t,value:r,style:n,lastElement:o,shouldExpandNode:a,clickToExpandNode:l,level:i,outerRef:s,beforeExpandChange:c}=e;return m({field:t,value:r,lastElement:o||!1,level:i,openBracket:"{",closeBracket:"}",style:n,shouldExpandNode:a,clickToExpandNode:l,data:Object.keys(r).map(e=>[e,r[e]]),outerRef:s,beforeExpandChange:c})}function f(e){let{field:t,value:r,style:n,lastElement:o,level:a,shouldExpandNode:l,clickToExpandNode:i,outerRef:s,beforeExpandChange:c}=e;return m({field:t,value:r,lastElement:o||!1,level:a,openBracket:"[",closeBracket:"]",style:n,shouldExpandNode:l,clickToExpandNode:i,data:r.map(e=>[void 0,e]),outerRef:s,beforeExpandChange:c})}function g(e){let t,{field:r,value:c,style:u,lastElement:m}=e,p=u.otherValue;if(null===c)t="null",p=u.nullValue;else if(void 0===c)t="undefined",p=u.undefinedValue;else if(s(c)){var f;f=!u.noQuotesForStringValues,t=u.stringifyStringValues?JSON.stringify(c):f?`"${c}"`:c,p=u.stringValue}else o(c)?(t=c?"true":"false",p=u.booleanValue):a(c)?(t=c.toString(),p=u.numberValue):l(c)?(t=`${c.toString()}n`,p=u.numberValue):t=i(c)?c.toISOString():d(c)?"function() { }":c.toString();return(0,n.createElement)("div",{className:u.basicChildStyle,role:"treeitem","aria-selected":void 0},(r||""===r)&&(0,n.createElement)("span",{className:u.label},h(r,u.quotesForFieldNames),":"),(0,n.createElement)("span",{className:p},t),!m&&(0,n.createElement)("span",{className:u.punctuation},","))}function b(e){let t=e.value;return c(t)?(0,n.createElement)(f,Object.assign({},e)):!u(t)||i(t)||d(t)?(0,n.createElement)(g,Object.assign({},e)):(0,n.createElement)(p,Object.assign({},e))}let k={container:"_2IvMF _GzYRV",basicChildStyle:"_2bkNM",childFieldsContainer:"_1BXBN",label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:{collapseJson:"collapse JSON",expandJson:"expand JSON"},stringifyStringValues:!1},y=()=>!0,v=e=>{let{data:t,style:r=k,shouldExpandNode:o=y,clickToExpandNode:a=!1,beforeExpandChange:l,compactTopLevel:i,...s}=e,c=(0,n.useRef)(null);return(0,n.createElement)("div",Object.assign({"aria-label":"JSON view"},s,{className:r.container,ref:c,role:"tree"}),i&&u(t)?Object.entries(t).map(e=>{let[t,i]=e;return(0,n.createElement)(b,{key:t,field:t,value:i,style:{...k,...r},lastElement:!0,level:1,shouldExpandNode:o,clickToExpandNode:a,beforeExpandChange:l,outerRef:c})}):(0,n.createElement)(b,{value:t,style:{...k,...r},lastElement:!0,level:0,shouldExpandNode:o,clickToExpandNode:a,outerRef:c,beforeExpandChange:l}))}},1479:function(e,t){"use strict";t.Z={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}}},52621:function(){},82422:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))});t.Z=o},51853:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});t.Z=o},71437:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"}))});t.Z=o},82376:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"}))});t.Z=o},2356:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});t.Z=o},17732:function(e,t,r){"use strict";var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))});t.Z=o},21623:function(e,t,r){"use strict";r.d(t,{S:function(){return f}});var n=r(45345),o=r(21733),a=r(18238),l=r(24112),i=class extends l.l{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){let a=t.queryKey,l=t.queryHash??(0,n.Rm)(a,t),i=this.get(l);return i||(i=new o.A({client:e,queryKey:a,queryHash:l,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(a)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){a.Vr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,n._x)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,n._x)(e,t)):t}notify(e){a.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){a.Vr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){a.Vr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},s=r(2894),c=class extends l.l{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#r=new Map,this.#n=0}#t;#r;#n;build(e,t,r){let n=new s.m({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#t.add(e);let t=u(e);if("string"==typeof t){let r=this.#r.get(t);r?r.push(e):this.#r.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=u(e);if("string"==typeof t){let r=this.#r.get(t);if(r){if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#r.delete(t)}}}this.notify({type:"removed",mutation:e})}canRun(e){let t=u(e);if("string"!=typeof t)return!0;{let r=this.#r.get(t),n=r?.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=u(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#r.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){a.Vr.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#r.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,n.X7)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,n.X7)(e,t))}notify(e){a.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return a.Vr.batch(()=>Promise.all(e.map(e=>e.continue().catch(n.ZT))))}};function u(e){return e.options.scope?.id}var d=r(87045),h=r(57853);function m(e){return{onFetch:(t,r)=>{let o=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],i=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,u=async()=>{let r=!1,u=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)})},d=(0,n.cG)(t.options,t.fetchOptions),h=async(e,o,a)=>{if(r)return Promise.reject();if(null==o&&e.pages.length)return Promise.resolve(e);let l=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:o,direction:a?"backward":"forward",meta:t.options.meta};return u(e),e})(),i=await d(l),{maxPages:s}=t.options,c=a?n.Ht:n.VX;return{pages:c(e.pages,i,s),pageParams:c(e.pageParams,o,s)}};if(a&&l.length){let e="backward"===a,t={pages:l,pageParams:i},r=(e?function(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}:p)(o,t);s=await h(t,r,e)}else{let t=e??l.length;do{let e=0===c?i[0]??o.initialPageParam:p(o,s);if(c>0&&null==e)break;s=await h(s,e),c++}while(ct.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=u}}}function p(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}var f=class{#o;#a;#l;#i;#s;#c;#u;#d;constructor(e={}){this.#o=e.queryCache||new i,this.#a=e.mutationCache||new c,this.#l=e.defaultOptions||{},this.#i=new Map,this.#s=new Map,this.#c=0}mount(){this.#c++,1===this.#c&&(this.#u=d.j.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#o.onFocus())}),this.#d=h.N.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#o.onOnline())}))}unmount(){this.#c--,0===this.#c&&(this.#u?.(),this.#u=void 0,this.#d?.(),this.#d=void 0)}isFetching(e){return this.#o.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#a.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#o.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#o.build(this,t),o=r.state.data;return void 0===o?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,n.KC)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(e){return this.#o.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let o=this.defaultQueryOptions({queryKey:e}),a=this.#o.get(o.queryHash),l=a?.state.data,i=(0,n.SE)(t,l);if(void 0!==i)return this.#o.build(this,o).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return a.Vr.batch(()=>this.#o.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#o.get(t.queryHash)?.state}removeQueries(e){let t=this.#o;a.Vr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#o;return a.Vr.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(a.Vr.batch(()=>this.#o.findAll(e).map(e=>e.cancel(r)))).then(n.ZT).catch(n.ZT)}invalidateQueries(e,t={}){return a.Vr.batch(()=>(this.#o.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(a.Vr.batch(()=>this.#o.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(n.ZT)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(n.ZT)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#o.build(this,t);return r.isStaleByTime((0,n.KC)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(n.ZT).catch(n.ZT)}fetchInfiniteQuery(e){return e.behavior=m(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(n.ZT).catch(n.ZT)}ensureInfiniteQueryData(e){return e.behavior=m(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return h.N.isOnline()?this.#a.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#o}getMutationCache(){return this.#a}getDefaultOptions(){return this.#l}setDefaultOptions(e){this.#l=e}setQueryDefaults(e,t){this.#i.set((0,n.Ym)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#i.values()],r={};return t.forEach(t=>{(0,n.to)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#s.set((0,n.Ym)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#s.values()],r={};return t.forEach(t=>{(0,n.to)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#l.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,n.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===n.CN&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#l.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#o.clear(),this.#a.clear()}}},19616:function(e,t,r){"use strict";r.d(t,{G:function(){return l}});var n=r(2265);let o={enabled:!0,leading:!1,trailing:!0,wait:0,onExecute:()=>{}};class a{constructor(e,t){this.fn=e,this._canLeadingExecute=!0,this._isPending=!1,this._executionCount=0,this._options={...o,...t}}setOptions(e){return this._options={...this._options,...e},this._options.enabled||(this._isPending=!1),this._options}getOptions(){return this._options}maybeExecute(...e){this._options.leading&&this._canLeadingExecute&&(this.executeFunction(...e),this._canLeadingExecute=!1),(this._options.leading||this._options.trailing)&&(this._isPending=!0),this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=setTimeout(()=>{this._canLeadingExecute=!0,this._isPending=!1,this._options.trailing&&this.executeFunction(...e)},this._options.wait)}executeFunction(...e){this._options.enabled&&(this.fn(...e),this._executionCount++,this._options.onExecute(this))}cancel(){this._timeoutId&&(clearTimeout(this._timeoutId),this._canLeadingExecute=!0,this._isPending=!1)}getExecutionCount(){return this._executionCount}getIsPending(){return this._options.enabled&&this._isPending}}function l(e,t){let[r,o]=(0,n.useState)(e),l=function(e,t){let[r]=(0,n.useState)(()=>{var r;return Object.getOwnPropertyNames(Object.getPrototypeOf(r=new a(e,t))).filter(e=>"function"==typeof r[e]).reduce((e,t)=>{let n=r[t];return"function"==typeof n&&(e[t]=n.bind(r)),e},{})});return r.setOptions(t),r}(o,t);return[r,l.maybeExecute,l]}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2172-c97c9e958a9c36e3.js b/litellm/proxy/_experimental/out/_next/static/chunks/2172-c97c9e958a9c36e3.js
deleted file mode 100644
index 195498ee042..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/2172-c97c9e958a9c36e3.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2172],{15327:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(1119),n=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},a=r(55015),l=n.forwardRef(function(e,t){return n.createElement(a.Z,(0,o.Z)({},e,{ref:t,icon:c}))})},77565:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(1119),n=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},a=r(55015),l=n.forwardRef(function(e,t){return n.createElement(a.Z,(0,o.Z)({},e,{ref:t,icon:c}))})},3632:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(1119),n=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},a=r(55015),l=n.forwardRef(function(e,t){return n.createElement(a.Z,(0,o.Z)({},e,{ref:t,icon:c}))})},15883:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(1119),n=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},a=r(55015),l=n.forwardRef(function(e,t){return n.createElement(a.Z,(0,o.Z)({},e,{ref:t,icon:c}))})},84264:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(26898),n=r(13241),c=r(1153),a=r(2265);let l=a.forwardRef((e,t)=>{let{color:r,className:l,children:i}=e;return a.createElement("p",{ref:t,className:(0,n.q)("text-tremor-default",r?(0,c.bM)(r,o.K.text).textColor:(0,n.q)("text-tremor-content","dark:text-dark-tremor-content"),l)},i)});l.displayName="Text"},3810:function(e,t,r){r.d(t,{Z:function(){return B}});var o=r(2265),n=r(36760),c=r.n(n),a=r(18694),l=r(93350),i=r(53445),s=r(19722),u=r(6694),d=r(71744),f=r(93463),g=r(54558),h=r(12918),p=r(71140),m=r(99320);let v=e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:o,componentCls:n,calc:c}=e,a=c(o).sub(r).equal(),l=c(t).sub(r).equal();return{[n]:Object.assign(Object.assign({},(0,h.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:"".concat((0,f.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusSM,opacity:1,transition:"all ".concat(e.motionDurationMid),textAlign:"start",position:"relative",["&".concat(n,"-rtl")]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},["".concat(n,"-close-icon")]:{marginInlineStart:l,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),"&:hover":{color:e.colorTextHeading}},["&".concat(n,"-has-color")]:{borderColor:"transparent",["&, a, a:hover, ".concat(e.iconCls,"-close, ").concat(e.iconCls,"-close:hover")]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",["&:not(".concat(n,"-checkable-checked):hover")]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},["> ".concat(e.iconCls," + span, > span + ").concat(e.iconCls)]:{marginInlineStart:a}}),["".concat(n,"-borderless")]:{borderColor:"transparent",background:e.tagBorderlessBg}}},b=e=>{let{lineWidth:t,fontSizeIcon:r,calc:o}=e,n=e.fontSizeSM;return(0,p.IX)(e,{tagFontSize:n,tagLineHeight:(0,f.bf)(o(e.lineHeightSM).mul(n).equal()),tagIconSize:o(r).sub(o(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},k=e=>({defaultBg:new g.t(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var w=(0,m.I$)("Tag",e=>v(b(e)),k),C=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let y=o.forwardRef((e,t)=>{let{prefixCls:r,style:n,className:a,checked:l,children:i,icon:s,onChange:u,onClick:f}=e,g=C(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:h,tag:p}=o.useContext(d.E_),m=h("tag",r),[v,b,k]=w(m),y=c()(m,"".concat(m,"-checkable"),{["".concat(m,"-checkable-checked")]:l},null==p?void 0:p.className,a,b,k);return v(o.createElement("span",Object.assign({},g,{ref:t,style:Object.assign(Object.assign({},n),null==p?void 0:p.style),className:y,onClick:e=>{null==u||u(!l),null==f||f(e)}}),s,o.createElement("span",null,i)))});var x=r(18536);let E=e=>(0,x.Z)(e,(t,r)=>{let{textColor:o,lightBorderColor:n,lightColor:c,darkColor:a}=r;return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:o,background:c,borderColor:n,"&-inverse":{color:e.colorTextLightSolid,background:a,borderColor:a},["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}});var O=(0,m.bk)(["Tag","preset"],e=>E(b(e)),k);let Z=(e,t,r)=>{let o="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:e["color".concat(r)],background:e["color".concat(o,"Bg")],borderColor:e["color".concat(o,"Border")],["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}};var j=(0,m.bk)(["Tag","status"],e=>{let t=b(e);return[Z(t,"success","Success"),Z(t,"processing","Info"),Z(t,"error","Error"),Z(t,"warning","Warning")]},k),S=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let L=o.forwardRef((e,t)=>{let{prefixCls:r,className:n,rootClassName:f,style:g,children:h,icon:p,color:m,onClose:v,bordered:b=!0,visible:k}=e,C=S(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:y,direction:x,tag:E}=o.useContext(d.E_),[Z,L]=o.useState(!0),B=(0,a.Z)(C,["closeIcon","closable"]);o.useEffect(()=>{void 0!==k&&L(k)},[k]);let M=(0,l.o2)(m),N=(0,l.yT)(m),R=M||N,z=Object.assign(Object.assign({backgroundColor:m&&!R?m:void 0},null==E?void 0:E.style),g),I=y("tag",r),[P,T,A]=w(I),H=c()(I,null==E?void 0:E.className,{["".concat(I,"-").concat(m)]:R,["".concat(I,"-has-color")]:m&&!R,["".concat(I,"-hidden")]:!Z,["".concat(I,"-rtl")]:"rtl"===x,["".concat(I,"-borderless")]:!b},n,f,T,A),W=e=>{e.stopPropagation(),null==v||v(e),e.defaultPrevented||L(!1)},[,V]=(0,i.b)((0,i.w)(e),(0,i.w)(E),{closable:!1,closeIconRender:e=>{let t=o.createElement("span",{className:"".concat(I,"-close-icon"),onClick:W},e);return(0,s.wm)(e,t,e=>({onClick:t=>{var r;null===(r=null==e?void 0:e.onClick)||void 0===r||r.call(e,t),W(t)},className:c()(null==e?void 0:e.className,"".concat(I,"-close-icon"))}))}}),_="function"==typeof C.onClick||h&&"a"===h.type,q=p||null,F=q?o.createElement(o.Fragment,null,q,h&&o.createElement("span",null,h)):h,U=o.createElement("span",Object.assign({},B,{ref:t,className:H,style:z}),F,V,M&&o.createElement(O,{key:"preset",prefixCls:I}),N&&o.createElement(j,{key:"status",prefixCls:I}));return P(_?o.createElement(u.Z,{component:"Tag"},U):U)});L.CheckableTag=y;var B=L},79205:function(e,t,r){r.d(t,{Z:function(){return d}});var o=r(2265);let n=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),c=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),a=e=>{let t=c(e);return t.charAt(0).toUpperCase()+t.slice(1)},l=function(){for(var e=arguments.length,t=Array(e),r=0;r!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()},i=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let u=(0,o.forwardRef)((e,t)=>{let{color:r="currentColor",size:n=24,strokeWidth:c=2,absoluteStrokeWidth:a,className:u="",children:d,iconNode:f,...g}=e;return(0,o.createElement)("svg",{ref:t,...s,width:n,height:n,stroke:r,strokeWidth:a?24*Number(c)/Number(n):c,className:l("lucide",u),...!d&&!i(g)&&{"aria-hidden":"true"},...g},[...f.map(e=>{let[t,r]=e;return(0,o.createElement)(t,r)}),...Array.isArray(d)?d:[d]])}),d=(e,t)=>{let r=(0,o.forwardRef)((r,c)=>{let{className:i,...s}=r;return(0,o.createElement)(u,{ref:c,iconNode:t,className:l("lucide-".concat(n(a(e))),"lucide-".concat(e),i),...s})});return r.displayName=a(e),r}},30401:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},78867:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},99397:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},10900:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});t.Z=n},86462:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});t.Z=n},44633:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});t.Z=n},93416:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});t.Z=n},49084:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});t.Z=n},74998:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});t.Z=n}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2318-b8f043257a4eca15.js b/litellm/proxy/_experimental/out/_next/static/chunks/2318-8bec43289448e95d.js
similarity index 99%
rename from litellm/proxy/_experimental/out/_next/static/chunks/2318-b8f043257a4eca15.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/2318-8bec43289448e95d.js
index 873168483d9..5d5774da27e 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/2318-b8f043257a4eca15.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/2318-8bec43289448e95d.js
@@ -1 +1 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2318],{88913:function(e,s,l){l.d(s,{Dx:function(){return d.Z},Zb:function(){return a.Z},iz:function(){return i.Z},oi:function(){return n.Z},xv:function(){return r.Z},zx:function(){return t.Z}});var t=l(78489),a=l(12514),i=l(67982),r=l(84264),n=l(49566),d=l(96761)},42318:function(e,s,l){l.d(s,{Z:function(){return eI}});var t=l(57437),a=l(58643),i=l(2265),r=l(16312),n=l(57840),d=l(42264),o=l(22116),c=l(4156),u=l(56609),m=l(23496),x=l(5945),h=l(58760),g=l(37592),v=l(19015),j=l(19250),p=l(10032),f=l(99981),y=l(24199),_=l(57365),b=l(49566),N=l(16853),S=l(46468),Z=l(20347),w=l(15424),k=l(65925);function C(e){let{userData:s,onCancel:l,onSubmit:a,teams:n,accessToken:d,userID:o,userRole:c,userModels:u,possibleUIRoles:m,isBulkEdit:x=!1}=e,[h]=p.Z.useForm();return i.useEffect(()=>{var e,l,t,a,i,r,n;h.setFieldsValue({user_id:s.user_id,user_email:null===(e=s.user_info)||void 0===e?void 0:e.user_email,user_alias:null===(l=s.user_info)||void 0===l?void 0:l.user_alias,user_role:null===(t=s.user_info)||void 0===t?void 0:t.user_role,models:(null===(a=s.user_info)||void 0===a?void 0:a.models)||[],max_budget:null===(i=s.user_info)||void 0===i?void 0:i.max_budget,budget_duration:null===(r=s.user_info)||void 0===r?void 0:r.budget_duration,metadata:(null===(n=s.user_info)||void 0===n?void 0:n.metadata)?JSON.stringify(s.user_info.metadata,null,2):void 0})},[s,h]),(0,t.jsxs)(p.Z,{form:h,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}a(e)},layout:"vertical",children:[!x&&(0,t.jsx)(p.Z.Item,{label:"User ID",name:"user_id",children:(0,t.jsx)(b.Z,{disabled:!0})}),!x&&(0,t.jsx)(p.Z.Item,{label:"Email",name:"user_email",children:(0,t.jsx)(b.Z,{})}),(0,t.jsx)(p.Z.Item,{label:"User Alias",name:"user_alias",children:(0,t.jsx)(b.Z,{})}),(0,t.jsx)(p.Z.Item,{label:(0,t.jsxs)("span",{children:["Global Proxy Role"," ",(0,t.jsx)(f.Z,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,t.jsx)(w.Z,{})})]}),name:"user_role",children:(0,t.jsx)(g.default,{children:m&&Object.entries(m).map(e=>{let[s,{ui_label:l,description:a}]=e;return(0,t.jsx)(_.Z,{value:s,title:l,children:(0,t.jsxs)("div",{className:"flex",children:[l," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},s)})})}),(0,t.jsx)(p.Z.Item,{label:(0,t.jsxs)("span",{children:["Personal Models"," ",(0,t.jsx)(f.Z,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,t.jsx)(w.Z,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsxs)(g.default,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!Z.ZL.includes(c||""),children:[(0,t.jsx)(g.default.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,t.jsx)(g.default.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),u.map(e=>(0,t.jsx)(g.default.Option,{value:e,children:(0,S.W0)(e)},e))]})}),(0,t.jsx)(p.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(y.Z,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(p.Z.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(k.Z,{})}),(0,t.jsx)(p.Z.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(N.Z,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,t.jsx)(r.z,{variant:"secondary",type:"button",onClick:l,children:"Cancel"}),(0,t.jsx)(r.z,{type:"submit",children:"Save Changes"})]})]})}var U=l(9114);let{Text:I,Title:D}=n.default;var z=e=>{let{open:s,onCancel:l,selectedUsers:a,possibleUIRoles:r,accessToken:n,onSuccess:p,teams:f,userRole:y,userModels:_,allowAllUsers:b=!1}=e,[N,S]=(0,i.useState)(!1),[Z,w]=(0,i.useState)([]),[k,z]=(0,i.useState)(null),[A,B]=(0,i.useState)(!1),[E,T]=(0,i.useState)(!1),O=()=>{w([]),z(null),B(!1),T(!1),l()},L=i.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:f||[]}),[f,s]),F=async e=>{if(console.log("formValues",e),!n){U.Z.fromBackend("Access token not found");return}S(!0);try{let s=a.map(e=>e.user_id),t={};e.user_role&&""!==e.user_role&&(t.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(t.max_budget=e.max_budget),e.models&&e.models.length>0&&(t.models=e.models),e.budget_duration&&""!==e.budget_duration&&(t.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(t.metadata=e.metadata);let i=Object.keys(t).length>0,r=A&&Z.length>0;if(!i&&!r){U.Z.fromBackend("Please modify at least one field or select teams to add users to");return}let o=[];if(i){if(E){let e=await (0,j.userBulkUpdateUserCall)(n,t,void 0,!0);o.push("Updated all users (".concat(e.total_requested," total)"))}else await (0,j.userBulkUpdateUserCall)(n,t,s),o.push("Updated ".concat(s.length," user(s)"))}if(r){let e=[];for(let s of Z)try{let l=null;l=E?null:a.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let t=await (0,j.teamBulkMemberAddCall)(n,s,l||null,k||void 0,E);console.log("result",t),e.push({teamId:s,success:!0,successfulAdditions:t.successful_additions,failedAdditions:t.failed_additions})}catch(l){console.error("Failed to add users to team ".concat(s,":"),l),e.push({teamId:s,success:!1,error:l})}let s=e.filter(e=>e.success),l=e.filter(e=>!e.success);if(s.length>0){let e=s.reduce((e,s)=>e+s.successfulAdditions,0);o.push("Added users to ".concat(s.length," team(s) (").concat(e," total additions)"))}l.length>0&&d.ZP.warning("Failed to add users to ".concat(l.length," team(s)"))}o.length>0&&U.Z.success(o.join(". ")),w([]),z(null),B(!1),T(!1),p(),l()}catch(e){console.error("Bulk operation failed:",e),U.Z.fromBackend("Failed to perform bulk operations")}finally{S(!1)}};return(0,t.jsxs)(o.Z,{open:s,onCancel:O,footer:null,title:E?"Bulk Edit All Users":"Bulk Edit ".concat(a.length," User(s)"),width:800,children:[b&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(c.Z,{checked:E,onChange:e=>T(e.target.checked),children:(0,t.jsx)(I,{strong:!0,children:"Update ALL users in the system"})}),E&&(0,t.jsx)("div",{style:{marginTop:8},children:(0,t.jsx)(I,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!E&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)(D,{level:5,children:["Selected Users (",a.length,"):"]}),(0,t.jsx)(u.Z,{size:"small",bordered:!0,dataSource:a,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,t.jsx)(I,{strong:!0,style:{fontSize:"12px"},children:e.length>20?"".concat(e.slice(0,20),"..."):e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,t.jsx)(I,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>{var s;return(0,t.jsx)(I,{style:{fontSize:"12px"},children:(null==r?void 0:null===(s=r[e])||void 0===s?void 0:s.ui_label)||e})}},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,t.jsx)(I,{style:{fontSize:"12px"},children:null!==e?"$".concat(e):"Unlimited"})}]})]}),(0,t.jsx)(m.Z,{}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)(I,{children:[(0,t.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,t.jsx)(x.Z,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,t.jsxs)(h.Z,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsx)(c.Z,{checked:A,onChange:e=>B(e.target.checked),children:"Add selected users to teams"}),A&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(I,{strong:!0,children:"Select Teams:"}),(0,t.jsx)(g.default,{mode:"multiple",placeholder:"Select teams to add users to",value:Z,onChange:w,style:{width:"100%",marginTop:8},options:(null==f?void 0:f.map(e=>({label:e.team_alias||e.team_id,value:e.team_id})))||[]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(I,{strong:!0,children:"Team Budget (Optional):"}),(0,t.jsx)(v.Z,{placeholder:"Max budget per user in team",value:k,onChange:e=>z(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,t.jsx)(I,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,t.jsx)(I,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,t.jsx)(C,{userData:L,onCancel:O,onSubmit:F,teams:f,accessToken:n,userID:"bulk_edit",userRole:y,userModels:_,possibleUIRoles:r,isBulkEdit:!0}),N&&(0,t.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,t.jsxs)(I,{children:["Updating ",E?"all users":a.length," user(s)..."]})})]})},A=l(7765),B=l(5545),E=e=>{let{visible:s,possibleUIRoles:l,onCancel:a,user:r,onSubmit:n}=e,[d,c]=(0,i.useState)(r),[u]=p.Z.useForm();(0,i.useEffect)(()=>{u.resetFields()},[r]);let m=async()=>{u.resetFields(),a()},x=async e=>{n(e),u.resetFields(),a()};return r?(0,t.jsx)(o.Z,{visible:s,onCancel:m,footer:null,title:"Edit User "+r.user_id,width:1e3,children:(0,t.jsx)(p.Z,{form:u,onFinish:x,initialValues:r,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.Z.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,t.jsx)(b.Z,{})}),(0,t.jsx)(p.Z.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,t.jsx)(b.Z,{})}),(0,t.jsx)(p.Z.Item,{label:"User Role",name:"user_role",children:(0,t.jsx)(g.default,{children:l&&Object.entries(l).map(e=>{let[s,{ui_label:l,description:a}]=e;return(0,t.jsx)(_.Z,{value:s,title:l,children:(0,t.jsxs)("div",{className:"flex",children:[l," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},s)})})}),(0,t.jsx)(p.Z.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,t.jsx)(v.Z,{min:0,step:.01})}),(0,t.jsx)(p.Z.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,t.jsx)(y.Z,{min:0,step:.01})}),(0,t.jsx)(p.Z.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(k.Z,{})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(B.ZP,{htmlType:"submit",children:"Save"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(B.ZP,{htmlType:"submit",children:"Save"})})]})})}):null},T=l(98187),O=l(59872),L=l(19616),F=l(29827),R=l(11713),P=l(21609),M=l(88913),K=l(63709),V=l(10353),q=l(26349),G=l(96473),J=e=>{var s;let{accessToken:l,possibleUIRoles:a,userID:r,userRole:d}=e,[o,c]=(0,i.useState)(!0),[u,m]=(0,i.useState)(null),[x,h]=(0,i.useState)(!1),[p,f]=(0,i.useState)({}),[y,_]=(0,i.useState)(!1),[b,N]=(0,i.useState)([]),{Paragraph:Z}=n.default,{Option:w}=g.default;(0,i.useEffect)(()=>{(async()=>{if(!l){c(!1);return}try{let e=await (0,j.getInternalUserSettings)(l);if(m(e),f(e.values||{}),l)try{let e=await (0,j.modelAvailableCall)(l,r,d);if(e&&e.data){let s=e.data.map(e=>e.id);N(s)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),U.Z.fromBackend("Failed to fetch SSO settings")}finally{c(!1)}})()},[l]);let C=async()=>{if(l){_(!0);try{let e=Object.entries(p).reduce((e,s)=>{let[l,t]=s;return e[l]=""===t?null:t,e},{}),s=await (0,j.updateInternalUserSettings)(l,e);m({...u,values:s.settings}),h(!1)}catch(e){console.error("Error updating SSO settings:",e),U.Z.fromBackend("Failed to update settings: "+e)}finally{_(!1)}}},I=(e,s)=>{f(l=>({...l,[e]:s}))},D=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[],z=e=>{let s=D(e),l=(e,l,t)=>{let a=[...s];a[e]={...a[e],[l]:t},I("teams",a)},a=e=>{I("teams",s.filter((s,l)=>l!==e))};return(0,t.jsxs)("div",{className:"space-y-3",children:[s.map((e,s)=>(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)(M.xv,{className:"font-medium",children:["Team ",s+1]}),(0,t.jsx)(M.zx,{size:"sm",variant:"secondary",icon:q.Z,onClick:()=>a(s),className:"text-red-500 hover:text-red-700",children:"Remove"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(M.xv,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,t.jsx)(M.oi,{value:e.team_id,onChange:e=>l(s,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(M.xv,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,t.jsx)(v.Z,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>l(s,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(M.xv,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,t.jsxs)(g.default,{style:{width:"100%"},value:e.user_role,onChange:e=>l(s,"user_role",e),children:[(0,t.jsx)(w,{value:"user",children:"User"}),(0,t.jsx)(w,{value:"admin",children:"Admin"})]})]})]})]},s)),(0,t.jsx)(M.zx,{variant:"secondary",icon:G.Z,onClick:()=>{I("teams",[...s,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]})},A=(e,s,l)=>{var i;let r=s.type;if("teams"===e)return(0,t.jsx)("div",{className:"mt-2",children:z(p[e]||[])});if("user_role"===e&&a)return(0,t.jsx)(g.default,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:Object.entries(a).filter(e=>{let[s]=e;return s.includes("internal_user")}).map(e=>{let[s,{ui_label:l,description:a}]=e;return(0,t.jsx)(w,{value:s,children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{children:l}),(0,t.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:a})]})},s)})});if("budget_duration"===e)return(0,t.jsx)(k.Z,{value:p[e]||null,onChange:s=>I(e,s),className:"mt-2"});if("boolean"===r)return(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(K.Z,{checked:!!p[e],onChange:s=>I(e,s)})});if("array"===r&&(null===(i=s.items)||void 0===i?void 0:i.enum))return(0,t.jsx)(g.default,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:s.items.enum.map(e=>(0,t.jsx)(w,{value:e,children:e},e))});if("models"===e)return(0,t.jsxs)(g.default,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:[(0,t.jsx)(w,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,t.jsx)(w,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),b.map(e=>(0,t.jsx)(w,{value:e,children:(0,S.W0)(e)},e))]});if("string"===r&&s.enum)return(0,t.jsx)(g.default,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:s.enum.map(e=>(0,t.jsx)(w,{value:e,children:e},e))});else return(0,t.jsx)(M.oi,{value:void 0!==p[e]?String(p[e]):"",onChange:s=>I(e,s.target.value),placeholder:s.description||"",className:"mt-2"})},B=(e,s)=>{if(null==s)return(0,t.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(s)){if(0===s.length)return(0,t.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=D(s);return(0,t.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,s)=>(0,t.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,t.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,t.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?"$".concat((0,O.pw)(e.max_budget_in_team,4)):"No limit"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,t.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},s))})}if("user_role"===e&&a&&a[s]){let{ui_label:e,description:l}=a[s];return(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium",children:e}),l&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:l})]})}return"budget_duration"===e?(0,t.jsx)("span",{children:(0,k.m)(s)}):"boolean"==typeof s?(0,t.jsx)("span",{children:s?"Enabled":"Disabled"}):"models"===e&&Array.isArray(s)?0===s.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:s.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,S.W0)(e)},s))}):"object"==typeof s?Array.isArray(s)?0===s.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:s.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},s))}):(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(s,null,2)}):(0,t.jsx)("span",{children:String(s)})};return o?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(V.Z,{size:"large"})}):u?(0,t.jsxs)(M.Zb,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(M.Dx,{children:"Default User Settings"}),!o&&u&&(x?(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(M.zx,{variant:"secondary",onClick:()=>{h(!1),f(u.values||{})},disabled:y,children:"Cancel"}),(0,t.jsx)(M.zx,{onClick:C,loading:y,children:"Save Changes"})]}):(0,t.jsx)(M.zx,{onClick:()=>h(!0),children:"Edit Settings"}))]}),(null==u?void 0:null===(s=u.field_schema)||void 0===s?void 0:s.description)&&(0,t.jsx)(Z,{className:"mb-4",children:u.field_schema.description}),(0,t.jsx)(M.iz,{}),(0,t.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:s}=u;return s&&s.properties?Object.entries(s.properties).map(s=>{let[l,a]=s,i=e[l],r=l.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,t.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,t.jsx)(M.xv,{className:"font-medium text-lg",children:r}),(0,t.jsx)(Z,{className:"text-sm text-gray-500 mt-1",children:a.description||"No description available"}),x?(0,t.jsx)("div",{className:"mt-2",children:A(l,a,i)}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:B(l,i)})]},l)}):(0,t.jsx)(M.xv,{children:"No schema information available"})})()})]}):(0,t.jsx)(M.Zb,{children:(0,t.jsx)(M.xv,{children:"No settings available or you do not have permission to view them."})})},Q=l(41649),H=l(67101),$=l(47323),W=l(15731),Y=l(53410),X=l(74998),ee=l(23628);let es=(e,s,l,a,i,r)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:e=>{let{row:s}=e;return(0,t.jsx)(f.Z,{title:s.original.user_id,children:(0,t.jsx)("span",{className:"text-xs",children:s.original.user_id?"".concat(s.original.user_id.slice(0,7),"..."):"-"})})}},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:e=>{let{row:s}=e;return(0,t.jsx)("span",{className:"text-xs",children:s.original.user_email||"-"})}},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:s=>{var l;let{row:a}=s;return(0,t.jsx)("span",{className:"text-xs",children:(null==e?void 0:null===(l=e[a.original.user_role])||void 0===l?void 0:l.ui_label)||"-"})}},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:e=>{let{row:s}=e;return(0,t.jsx)("span",{className:"text-xs",children:s.original.user_alias||"-"})}},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:e=>{let{row:s}=e;return(0,t.jsx)("span",{className:"text-xs",children:s.original.spend?(0,O.pw)(s.original.spend,4):"-"})}},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:e=>{let{row:s}=e;return(0,t.jsx)("span",{className:"text-xs",children:null!==s.original.max_budget?s.original.max_budget:"Unlimited"})}},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"SSO ID"}),(0,t.jsx)(f.Z,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,t.jsx)(W.Z,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:e=>{let{row:s}=e;return(0,t.jsx)("span",{className:"text-xs",children:null!==s.original.sso_user_id?s.original.sso_user_id:"-"})}},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:e=>{let{row:s}=e;return(0,t.jsx)(H.Z,{numItems:2,children:s.original.key_count>0?(0,t.jsxs)(Q.Z,{size:"xs",color:"indigo",children:[s.original.key_count," ",1===s.original.key_count?"Key":"Keys"]}):(0,t.jsx)(Q.Z,{size:"xs",color:"gray",children:"No Keys"})})}},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:e=>{let{row:s}=e;return(0,t.jsx)("span",{className:"text-xs",children:s.original.created_at?new Date(s.original.created_at).toLocaleDateString():"-"})}},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:e=>{let{row:s}=e;return(0,t.jsx)("span",{className:"text-xs",children:s.original.updated_at?new Date(s.original.updated_at).toLocaleDateString():"-"})}},{id:"actions",header:"Actions",enableSorting:!1,cell:e=>{let{row:s}=e;return(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(f.Z,{title:"Edit user details",children:(0,t.jsx)($.Z,{icon:Y.Z,size:"sm",onClick:()=>i(s.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(f.Z,{title:"Delete user",children:(0,t.jsx)($.Z,{icon:X.Z,size:"sm",onClick:()=>l(s.original),className:"cursor-pointer hover:text-red-600"})}),(0,t.jsx)(f.Z,{title:"Reset Password",children:(0,t.jsx)($.Z,{icon:ee.Z,size:"sm",onClick:()=>a(s.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}}];if(r){let{onSelectUser:e,onSelectAll:s,isUserSelected:l,isAllSelected:a,isIndeterminate:i}=r;return[{id:"select",enableSorting:!1,header:()=>(0,t.jsx)(c.Z,{indeterminate:i,checked:a,onChange:e=>s(e.target.checked),onClick:e=>e.stopPropagation()}),cell:s=>{let{row:a}=s;return(0,t.jsx)(c.Z,{checked:l(a.original),onChange:s=>e(a.original,s.target.checked),onClick:e=>e.stopPropagation()})}},...n]}return n};var el=l(71594),et=l(24525),ea=l(27281),ei=l(21626),er=l(97214),en=l(28241),ed=l(58834),eo=l(69552),ec=l(71876),eu=l(44633),em=l(86462),ex=l(49084),eh=l(50337),eg=l(84717),ev=l(10900),ej=l(30401),ep=l(78867);function ef(e){var s,l,a,r,n,d,o,c,u,m,x,h,g,v,p,f,y,_,b,N,S,w,I,D,z,A,E,L,F,R,M,K,V,q,G,J,Q,H,$,W,Y,es,el,et,ea;let{userId:ei,onClose:er,accessToken:en,userRole:ed,onDelete:eo,possibleUIRoles:ec,initialTab:eu=0,startInEditMode:em=!1}=e,[ex,eh]=(0,i.useState)(null),[ef,ey]=(0,i.useState)(!1),[e_,eb]=(0,i.useState)(!1),[eN,eS]=(0,i.useState)(!0),[eZ,ew]=(0,i.useState)(em),[ek,eC]=(0,i.useState)([]),[eU,eI]=(0,i.useState)(!1),[eD,ez]=(0,i.useState)(null),[eA,eB]=(0,i.useState)(null),[eE,eT]=(0,i.useState)(eu),[eO,eL]=(0,i.useState)({}),[eF,eR]=(0,i.useState)(!1);i.useEffect(()=>{eB((0,j.getProxyBaseUrl)())},[]),i.useEffect(()=>{console.log("userId: ".concat(ei,", userRole: ").concat(ed,", accessToken: ").concat(en)),(async()=>{try{if(!en)return;let e=await (0,j.userInfoCall)(en,ei,ed||"",!1,null,null,!0);eh(e);let s=(await (0,j.modelAvailableCall)(en,ei,ed||"")).data.map(e=>e.id);eC(s)}catch(e){console.error("Error fetching user data:",e),U.Z.fromBackend("Failed to fetch user data")}finally{eS(!1)}})()},[en,ei,ed]);let eP=async()=>{if(!en){U.Z.fromBackend("Access token not found");return}try{U.Z.success("Generating password reset link...");let e=await (0,j.invitationCreateCall)(en,ei);ez(e),eI(!0)}catch(e){U.Z.fromBackend("Failed to generate password reset link")}},eM=async()=>{try{if(!en)return;eb(!0),await (0,j.userDeleteCall)(en,[ei]),U.Z.success("User deleted successfully"),eo&&eo(),er()}catch(e){console.error("Error deleting user:",e),U.Z.fromBackend("Failed to delete user")}finally{ey(!1),eb(!1)}},eK=async e=>{try{if(!en||!ex)return;await (0,j.userUpdateUserCall)(en,e,null),eh({...ex,user_info:{...ex.user_info,user_email:e.user_email,user_alias:e.user_alias,models:e.models,max_budget:e.max_budget,budget_duration:e.budget_duration,metadata:e.metadata}}),U.Z.success("User updated successfully"),ew(!1)}catch(e){console.error("Error updating user:",e),U.Z.fromBackend("Failed to update user")}};if(eN)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(eg.zx,{icon:ev.Z,variant:"light",onClick:er,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(eg.xv,{children:"Loading user data..."})]});if(!ex)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(eg.zx,{icon:ev.Z,variant:"light",onClick:er,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(eg.xv,{children:"User not found"})]});let eV=async(e,s)=>{await (0,O.vQ)(e)&&(eL(e=>({...e,[s]:!0})),setTimeout(()=>{eL(e=>({...e,[s]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.zx,{icon:ev.Z,variant:"light",onClick:er,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(eg.Dx,{children:(null===(s=ex.user_info)||void 0===s?void 0:s.user_email)||"User"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(eg.xv,{className:"text-gray-500 font-mono",children:ex.user_id}),(0,t.jsx)(B.ZP,{type:"text",size:"small",icon:eO["user-id"]?(0,t.jsx)(ej.Z,{size:12}):(0,t.jsx)(ep.Z,{size:12}),onClick:()=>eV(ex.user_id,"user-id"),className:"left-2 z-10 transition-all duration-200 ".concat(eO["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]}),ed&&Z.LQ.includes(ed)&&(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(eg.zx,{icon:ee.Z,variant:"secondary",onClick:eP,className:"flex items-center",children:"Reset Password"}),(0,t.jsx)(eg.zx,{icon:X.Z,variant:"secondary",onClick:()=>ey(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,t.jsx)(P.Z,{isOpen:ef,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:null===(l=ex.user_info)||void 0===l?void 0:l.user_email},{label:"User ID",value:ex.user_id,code:!0},{label:"Global Proxy Role",value:(null===(a=ex.user_info)||void 0===a?void 0:a.user_role)&&(null==ec?void 0:null===(r=ec[ex.user_info.user_role])||void 0===r?void 0:r.ui_label)||(null===(n=ex.user_info)||void 0===n?void 0:n.user_role)||"-"},{label:"Total Spend (USD)",value:(null===(d=ex.user_info)||void 0===d?void 0:d.spend)!==null&&(null===(o=ex.user_info)||void 0===o?void 0:o.spend)!==void 0?ex.user_info.spend.toFixed(2):void 0}],onCancel:()=>{ey(!1)},onOk:eM,confirmLoading:e_}),(0,t.jsxs)(eg.v0,{defaultIndex:eE,onIndexChange:eT,children:[(0,t.jsxs)(eg.td,{className:"mb-4",children:[(0,t.jsx)(eg.OK,{children:"Overview"}),(0,t.jsx)(eg.OK,{children:"Details"})]}),(0,t.jsxs)(eg.nP,{children:[(0,t.jsx)(eg.x4,{children:(0,t.jsxs)(eg.rj,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(eg.Zb,{children:[(0,t.jsx)(eg.xv,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(eg.Dx,{children:["$",(0,O.pw)((null===(c=ex.user_info)||void 0===c?void 0:c.spend)||0,4)]}),(0,t.jsxs)(eg.xv,{children:["of"," ",(null===(u=ex.user_info)||void 0===u?void 0:u.max_budget)!==null?"$".concat((0,O.pw)(ex.user_info.max_budget,4)):"Unlimited"]})]})]}),(0,t.jsxs)(eg.Zb,{children:[(0,t.jsx)(eg.xv,{children:"Teams"}),(0,t.jsx)("div",{className:"mt-2",children:(null===(m=ex.teams)||void 0===m?void 0:m.length)&&(null===(x=ex.teams)||void 0===x?void 0:x.length)>0?(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[null===(h=ex.teams)||void 0===h?void 0:h.slice(0,eF?ex.teams.length:20).map((e,s)=>(0,t.jsx)(eg.Ct,{color:"blue",title:e.team_alias,children:e.team_alias},s)),!eF&&(null===(g=ex.teams)||void 0===g?void 0:g.length)>20&&(0,t.jsxs)(eg.Ct,{color:"gray",className:"cursor-pointer hover:bg-gray-200 transition-colors",onClick:()=>eR(!0),children:["+",ex.teams.length-20," more"]}),eF&&(null===(v=ex.teams)||void 0===v?void 0:v.length)>20&&(0,t.jsx)(eg.Ct,{color:"gray",className:"cursor-pointer hover:bg-gray-200 transition-colors",onClick:()=>eR(!1),children:"Show Less"})]}):(0,t.jsx)(eg.xv,{children:"No teams"})})]}),(0,t.jsxs)(eg.Zb,{children:[(0,t.jsx)(eg.xv,{children:"Virtual Keys"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsxs)(eg.xv,{children:[(null===(p=ex.keys)||void 0===p?void 0:p.length)||0," ",(null===(f=ex.keys)||void 0===f?void 0:f.length)===1?"Key":"Keys"]})})]}),(0,t.jsxs)(eg.Zb,{children:[(0,t.jsx)(eg.xv,{children:"Personal Models"}),(0,t.jsx)("div",{className:"mt-2",children:(null===(_=ex.user_info)||void 0===_?void 0:null===(y=_.models)||void 0===y?void 0:y.length)&&(null===(N=ex.user_info)||void 0===N?void 0:null===(b=N.models)||void 0===b?void 0:b.length)>0?null===(w=ex.user_info)||void 0===w?void 0:null===(S=w.models)||void 0===S?void 0:S.map((e,s)=>(0,t.jsx)(eg.xv,{children:e},s)):(0,t.jsx)(eg.xv,{children:"All proxy models"})})]})]})}),(0,t.jsx)(eg.x4,{children:(0,t.jsxs)(eg.Zb,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(eg.Dx,{children:"User Settings"}),!eZ&&ed&&Z.LQ.includes(ed)&&(0,t.jsx)(eg.zx,{onClick:()=>ew(!0),children:"Edit Settings"})]}),eZ&&ex?(0,t.jsx)(C,{userData:ex,onCancel:()=>ew(!1),onSubmit:eK,teams:ex.teams,accessToken:en,userID:ei,userRole:ed,userModels:ek,possibleUIRoles:ec}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"User ID"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(eg.xv,{className:"font-mono",children:ex.user_id}),(0,t.jsx)(B.ZP,{type:"text",size:"small",icon:eO["user-id"]?(0,t.jsx)(ej.Z,{size:12}):(0,t.jsx)(ep.Z,{size:12}),onClick:()=>eV(ex.user_id,"user-id"),className:"left-2 z-10 transition-all duration-200 ".concat(eO["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Email"}),(0,t.jsx)(eg.xv,{children:(null===(I=ex.user_info)||void 0===I?void 0:I.user_email)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"User Alias"}),(0,t.jsx)(eg.xv,{children:(null===(D=ex.user_info)||void 0===D?void 0:D.user_alias)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Global Proxy Role"}),(0,t.jsx)(eg.xv,{children:(null===(z=ex.user_info)||void 0===z?void 0:z.user_role)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Created"}),(0,t.jsx)(eg.xv,{children:(null===(A=ex.user_info)||void 0===A?void 0:A.created_at)?new Date(ex.user_info.created_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)(eg.xv,{children:(null===(E=ex.user_info)||void 0===E?void 0:E.updated_at)?new Date(ex.user_info.updated_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Teams"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:(null===(L=ex.teams)||void 0===L?void 0:L.length)&&(null===(F=ex.teams)||void 0===F?void 0:F.length)>0?(0,t.jsxs)(t.Fragment,{children:[null===(R=ex.teams)||void 0===R?void 0:R.slice(0,eF?ex.teams.length:20).map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",title:e.team_alias||e.team_id,children:e.team_alias||e.team_id},s)),!eF&&(null===(M=ex.teams)||void 0===M?void 0:M.length)>20&&(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded text-xs cursor-pointer hover:bg-gray-200 transition-colors",onClick:()=>eR(!0),children:["+",ex.teams.length-20," more"]}),eF&&(null===(K=ex.teams)||void 0===K?void 0:K.length)>20&&(0,t.jsx)("span",{className:"px-2 py-1 bg-gray-100 rounded text-xs cursor-pointer hover:bg-gray-200 transition-colors",onClick:()=>eR(!1),children:"Show Less"})]}):(0,t.jsx)(eg.xv,{children:"No teams"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Personal Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:(null===(q=ex.user_info)||void 0===q?void 0:null===(V=q.models)||void 0===V?void 0:V.length)&&(null===(J=ex.user_info)||void 0===J?void 0:null===(G=J.models)||void 0===G?void 0:G.length)>0?null===(H=ex.user_info)||void 0===H?void 0:null===(Q=H.models)||void 0===Q?void 0:Q.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):(0,t.jsx)(eg.xv,{children:"All proxy models"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Virtual Keys"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:(null===($=ex.keys)||void 0===$?void 0:$.length)&&(null===(W=ex.keys)||void 0===W?void 0:W.length)>0?ex.keys.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-green-100 rounded text-xs",children:e.key_alias||e.token},s)):(0,t.jsx)(eg.xv,{children:"No Virtual Keys"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Max Budget"}),(0,t.jsx)(eg.xv,{children:(null===(Y=ex.user_info)||void 0===Y?void 0:Y.max_budget)!==null&&(null===(es=ex.user_info)||void 0===es?void 0:es.max_budget)!==void 0?"$".concat((0,O.pw)(ex.user_info.max_budget,4)):"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Budget Reset"}),(0,t.jsx)(eg.xv,{children:(0,k.m)(null!==(ea=null===(el=ex.user_info)||void 0===el?void 0:el.budget_duration)&&void 0!==ea?ea:null)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify((null===(et=ex.user_info)||void 0===et?void 0:et.metadata)||{},null,2)})]})]})]})})]})]}),(0,t.jsx)(T.Z,{isInvitationLinkModalVisible:eU,setIsInvitationLinkModalVisible:eI,baseUrl:eA||"",invitationLinkData:eD,modalType:"resetPassword"})]})}var ey=l(56083),e_=l(51205),eb=l(57716),eN=l(73247),eS=l(92369),eZ=l(66344);function ew(e){let{data:s=[],columns:l,isLoading:a=!1,onSortChange:r,currentSort:n,accessToken:d,userRole:o,possibleUIRoles:c,handleEdit:u,handleDelete:m,handleResetPassword:x,selectedUsers:h=[],onSelectionChange:g,enableSelection:v=!1,filters:j,updateFilters:p,initialFilters:f,teams:y,userListResponse:b,currentPage:N,handlePageChange:S}=e,[Z,w]=i.useState([{id:(null==n?void 0:n.sortBy)||"created_at",desc:(null==n?void 0:n.sortOrder)==="desc"}]),[k,C]=i.useState(null),[U,I]=i.useState(!1),[D,z]=i.useState(!1),A=function(e){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];C(e),I(s)},B=(e,s)=>{g&&(s?g([...h,e]):g(h.filter(s=>s.user_id!==e.user_id)))},E=e=>{g&&(e?g(s):g([]))},T=e=>h.some(s=>s.user_id===e.user_id),O=s.length>0&&h.length===s.length,L=h.length>0&&h.lengthc?es(c,u,m,x,A,v?{selectedUsers:h,onSelectUser:B,onSelectAll:E,isUserSelected:T,isAllSelected:O,isIndeterminate:L}:void 0):l,[c,u,m,x,A,l,v,h,O,L]),R=(0,el.b7)({data:s,columns:F,state:{sorting:Z},onSortingChange:e=>{let s="function"==typeof e?e(Z):e;if(w(s),s&&Array.isArray(s)&&s.length>0&&s[0]){let e=s[0];if(e.id){let s=e.id,l=e.desc?"desc":"asc";null==r||r(s,l)}}else null==r||r("created_at","desc")},getCoreRowModel:(0,et.sC)(),manualSorting:!0,enableSorting:!0});return(i.useEffect(()=>{n&&w([{id:n.sortBy,desc:"desc"===n.sortOrder}])},[n]),k)?(0,t.jsx)(ef,{userId:k,onClose:()=>{C(null),I(!1)},accessToken:d,userRole:o,possibleUIRoles:c,initialTab:U?1:0,startInEditMode:U}):(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(ey.H,{placeholder:"Search by email...",value:j.email,onChange:e=>p({email:e}),icon:eN.Z}),(0,t.jsx)(e_.c,{onClick:()=>z(!D),active:D,hasActiveFilters:!!(j.user_id||j.user_role||j.team)}),(0,t.jsx)(eb.z,{onClick:()=>{p(f)}})]}),D&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,t.jsx)(ey.H,{placeholder:"Filter by User ID",value:j.user_id,onChange:e=>p({user_id:e}),icon:eS.Z}),(0,t.jsx)(ey.H,{placeholder:"Filter by SSO ID",value:j.sso_user_id,onChange:e=>p({sso_user_id:e}),icon:eZ.Z}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ea.Z,{value:j.user_role,onValueChange:e=>p({user_role:e}),placeholder:"Select Role",children:c&&Object.entries(c).map(e=>{let[s,l]=e;return(0,t.jsx)(_.Z,{value:s,children:l.ui_label},s)})})}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ea.Z,{value:j.team,onValueChange:e=>p({team:e}),placeholder:"Select Team",children:null==y?void 0:y.map(e=>(0,t.jsx)(_.Z,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[a?(0,t.jsx)(eh.Z.Input,{active:!0,style:{width:192,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",b&&b.users&&b.users.length>0?(b.page-1)*b.page_size+1:0," ","-"," ",b&&b.users?Math.min(b.page*b.page_size,b.total):0," ","of ",b?b.total:0," results"]}),(0,t.jsx)("div",{className:"flex space-x-2",children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eh.Z.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,t.jsx)(eh.Z.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>S(N-1),disabled:1===N,className:"px-3 py-1 text-sm border rounded-md ".concat(1===N?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"),children:"Previous"}),(0,t.jsx)("button",{onClick:()=>S(N+1),disabled:!b||N>=b.total_pages,className:"px-3 py-1 text-sm border rounded-md ".concat(!b||N>=b.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"),children:"Next"})]})})]})]})}),(0,t.jsx)("div",{className:"overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(ei.Z,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(ed.Z,{children:R.getHeaderGroups().map(e=>(0,t.jsx)(ec.Z,{children:e.headers.map(e=>(0,t.jsx)(eo.Z,{className:"py-1 h-8 ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""," ").concat(e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""),onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,el.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(eu.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(em.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(ex.Z,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(er.Z,{children:a?(0,t.jsx)(ec.Z,{children:(0,t.jsx)(en.Z,{colSpan:F.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"\uD83D\uDE85 Loading users..."})})})}):s.length>0?R.getRowModel().rows.map(e=>(0,t.jsx)(ec.Z,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(en.Z,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""),onClick:()=>{"user_id"===e.column.id&&A(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,el.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(ec.Z,{children:(0,t.jsx)(en.Z,{colSpan:F.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:ek,Title:eC}=n.default,eU={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};var eI=e=>{var s,l,n;let{accessToken:d,token:o,userRole:c,userID:u,teams:m}=e,x=(0,F.NL)(),[h,g]=(0,i.useState)(1),[v,p]=(0,i.useState)(!1),[f,y]=(0,i.useState)(null),[_,b]=(0,i.useState)(!1),[N,S]=(0,i.useState)(!1),[w,k]=(0,i.useState)(null),[C,I]=(0,i.useState)("users"),[D,B]=(0,i.useState)(eU),[M,K,V]=(0,L.G)(D,{wait:300}),[q,G]=(0,i.useState)(!1),[Q,H]=(0,i.useState)(null),[$,W]=(0,i.useState)(null),[Y,X]=(0,i.useState)([]),[ee,el]=(0,i.useState)(!1),[et,ea]=(0,i.useState)(!1),[ei,er]=(0,i.useState)([]),en=e=>{k(e),b(!0)};(0,i.useEffect)(()=>()=>{V.cancel()},[V]),(0,i.useEffect)(()=>{W((0,j.getProxyBaseUrl)())},[]),(0,i.useEffect)(()=>{(async()=>{try{if(!u||!c||!d)return;let e=(await (0,j.modelAvailableCall)(d,u,c)).data.map(e=>e.id);console.log("available_model_names:",e),er(e)}catch(e){console.error("Error fetching user models:",e)}})()},[d,u,c]);let ed=e=>{B(s=>{let l={...s,...e};return K(l),l})},eo=async e=>{if(!d){U.Z.fromBackend("Access token not found");return}try{U.Z.success("Generating password reset link...");let s=await (0,j.invitationCreateCall)(d,e);H(s),G(!0)}catch(e){U.Z.fromBackend("Failed to generate password reset link")}},ec=async()=>{if(w&&d)try{S(!0),await (0,j.userDeleteCall)(d,[w.user_id]),x.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let s=e.users.filter(e=>e.user_id!==w.user_id);return{...e,users:s}}),U.Z.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),U.Z.fromBackend("Failed to delete user")}finally{b(!1),k(null),S(!1)}},eu=async()=>{y(null),p(!1)},em=async e=>{if(console.log("inside handleEditSubmit:",e),d&&o&&c&&u){try{let s=await (0,j.userUpdateUserCall)(d,e,null);x.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let l=e.users.map(e=>e.user_id===s.data.user_id?(0,O.nl)(e,s.data):e);return{...e,users:l}}),U.Z.success("User ".concat(e.user_id," updated successfully"))}catch(e){console.error("There was an error updating the user",e)}y(null),p(!1)}},ex=async e=>{g(e)},eg=(0,R.a)({queryKey:["userList",{debouncedFilter:M,currentPage:h}],queryFn:async()=>{if(!d)throw Error("Access token required");return await (0,j.userListCall)(d,M.user_id?[M.user_id]:null,h,25,M.email||null,M.user_role||null,M.team||null,M.sso_user_id||null,M.sort_by,M.sort_order)},enabled:!!(d&&o&&c&&u),placeholderData:e=>e}),ev=eg.data,ej=(0,R.a)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!d)throw Error("Access token required");return await (0,j.getPossibleUserRoles)(d)},enabled:!!(d&&o&&c&&u)}).data,ep=es(ej,e=>{y(e),p(!0)},en,eo,()=>{});return(0,t.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("div",{className:"flex space-x-3",children:eg.isLoading?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eh.Z.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,t.jsx)(eh.Z.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,t.jsx)(eh.Z.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.Z,{userID:u,accessToken:d,teams:m,possibleUIRoles:ej}),(0,t.jsx)(r.z,{onClick:()=>{ea(!et),X([])},variant:et?"primary":"secondary",className:"flex items-center",children:et?"Cancel Selection":"Select Users"}),et&&(0,t.jsxs)(r.z,{onClick:()=>{if(0===Y.length){U.Z.fromBackend("Please select users to edit");return}el(!0)},disabled:0===Y.length,className:"flex items-center",children:["Bulk Edit (",Y.length," selected)"]})]}):null})}),(0,t.jsxs)(a.v0,{defaultIndex:0,onIndexChange:e=>I(0===e?"users":"settings"),children:[(0,t.jsxs)(a.td,{className:"mb-4",children:[(0,t.jsx)(a.OK,{children:"Users"}),(0,t.jsx)(a.OK,{children:"Default User Settings"})]}),(0,t.jsxs)(a.nP,{children:[(0,t.jsx)(a.x4,{children:(0,t.jsx)(ew,{data:(null===(s=eg.data)||void 0===s?void 0:s.users)||[],columns:ep,isLoading:eg.isLoading,accessToken:d,userRole:c,onSortChange:(e,s)=>{ed({sort_by:e,sort_order:s})},currentSort:{sortBy:D.sort_by,sortOrder:D.sort_order},possibleUIRoles:ej,handleEdit:e=>{y(e),p(!0)},handleDelete:en,handleResetPassword:eo,enableSelection:et,selectedUsers:Y,onSelectionChange:e=>{X(e)},filters:D,updateFilters:ed,initialFilters:eU,teams:m,userListResponse:ev,currentPage:h,handlePageChange:ex})}),(0,t.jsx)(a.x4,{children:u&&c&&d?(0,t.jsx)(J,{accessToken:d,possibleUIRoles:ej,userID:u,userRole:c}):(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(eh.Z,{active:!0,paragraph:{rows:4}})})})]})]}),(0,t.jsx)(E,{visible:v,possibleUIRoles:ej,onCancel:eu,user:f,onSubmit:em}),(0,t.jsx)(P.Z,{isOpen:_,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:null==w?void 0:w.user_email},{label:"User ID",value:null==w?void 0:w.user_id,code:!0},{label:"Global Proxy Role",value:w&&(null==ej?void 0:null===(l=ej[w.user_role])||void 0===l?void 0:l.ui_label)||(null==w?void 0:w.user_role)||"-"},{label:"Total Spend (USD)",value:null==w?void 0:null===(n=w.spend)||void 0===n?void 0:n.toFixed(2)}],onCancel:()=>{b(!1),k(null)},onOk:ec,confirmLoading:N}),(0,t.jsx)(T.Z,{isInvitationLinkModalVisible:q,setIsInvitationLinkModalVisible:G,baseUrl:$||"",invitationLinkData:Q,modalType:"resetPassword"}),(0,t.jsx)(z,{open:ee,onCancel:()=>el(!1),selectedUsers:Y,possibleUIRoles:ej,accessToken:d,onSuccess:()=>{x.invalidateQueries({queryKey:["userList"]}),X([]),ea(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,Z.tY)(c)})]})}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2318],{88913:function(e,s,l){l.d(s,{Dx:function(){return d.Z},Zb:function(){return a.Z},iz:function(){return i.Z},oi:function(){return n.Z},xv:function(){return r.Z},zx:function(){return t.Z}});var t=l(78489),a=l(12514),i=l(67982),r=l(84264),n=l(49566),d=l(96761)},42318:function(e,s,l){l.d(s,{Z:function(){return eI}});var t=l(57437),a=l(58643),i=l(2265),r=l(16312),n=l(57840),d=l(42264),o=l(22116),c=l(4156),u=l(56609),m=l(23496),x=l(5945),h=l(58760),g=l(37592),v=l(12221),j=l(19250),p=l(10032),f=l(99981),y=l(24199),_=l(57365),b=l(49566),N=l(16853),S=l(46468),Z=l(20347),w=l(15424),k=l(65925);function C(e){let{userData:s,onCancel:l,onSubmit:a,teams:n,accessToken:d,userID:o,userRole:c,userModels:u,possibleUIRoles:m,isBulkEdit:x=!1}=e,[h]=p.Z.useForm();return i.useEffect(()=>{var e,l,t,a,i,r,n;h.setFieldsValue({user_id:s.user_id,user_email:null===(e=s.user_info)||void 0===e?void 0:e.user_email,user_alias:null===(l=s.user_info)||void 0===l?void 0:l.user_alias,user_role:null===(t=s.user_info)||void 0===t?void 0:t.user_role,models:(null===(a=s.user_info)||void 0===a?void 0:a.models)||[],max_budget:null===(i=s.user_info)||void 0===i?void 0:i.max_budget,budget_duration:null===(r=s.user_info)||void 0===r?void 0:r.budget_duration,metadata:(null===(n=s.user_info)||void 0===n?void 0:n.metadata)?JSON.stringify(s.user_info.metadata,null,2):void 0})},[s,h]),(0,t.jsxs)(p.Z,{form:h,onFinish:e=>{if(e.metadata&&"string"==typeof e.metadata)try{e.metadata=JSON.parse(e.metadata)}catch(e){console.error("Error parsing metadata JSON:",e);return}a(e)},layout:"vertical",children:[!x&&(0,t.jsx)(p.Z.Item,{label:"User ID",name:"user_id",children:(0,t.jsx)(b.Z,{disabled:!0})}),!x&&(0,t.jsx)(p.Z.Item,{label:"Email",name:"user_email",children:(0,t.jsx)(b.Z,{})}),(0,t.jsx)(p.Z.Item,{label:"User Alias",name:"user_alias",children:(0,t.jsx)(b.Z,{})}),(0,t.jsx)(p.Z.Item,{label:(0,t.jsxs)("span",{children:["Global Proxy Role"," ",(0,t.jsx)(f.Z,{title:"This is the role that the user will globally on the proxy. This role is independent of any team/org specific roles.",children:(0,t.jsx)(w.Z,{})})]}),name:"user_role",children:(0,t.jsx)(g.default,{children:m&&Object.entries(m).map(e=>{let[s,{ui_label:l,description:a}]=e;return(0,t.jsx)(_.Z,{value:s,title:l,children:(0,t.jsxs)("div",{className:"flex",children:[l," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},s)})})}),(0,t.jsx)(p.Z.Item,{label:(0,t.jsxs)("span",{children:["Personal Models"," ",(0,t.jsx)(f.Z,{title:"Select which models this user can access outside of team-scope. Choose 'All Proxy Models' to grant access to all models available on the proxy.",children:(0,t.jsx)(w.Z,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,t.jsxs)(g.default,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:!Z.ZL.includes(c||""),children:[(0,t.jsx)(g.default.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),(0,t.jsx)(g.default.Option,{value:"no-default-models",children:"No Default Models"},"no-default-models"),u.map(e=>(0,t.jsx)(g.default.Option,{value:e,children:(0,S.W0)(e)},e))]})}),(0,t.jsx)(p.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(y.Z,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(p.Z.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(k.Z,{})}),(0,t.jsx)(p.Z.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(N.Z,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,t.jsx)(r.z,{variant:"secondary",type:"button",onClick:l,children:"Cancel"}),(0,t.jsx)(r.z,{type:"submit",children:"Save Changes"})]})]})}var U=l(9114);let{Text:I,Title:D}=n.default;var z=e=>{let{open:s,onCancel:l,selectedUsers:a,possibleUIRoles:r,accessToken:n,onSuccess:p,teams:f,userRole:y,userModels:_,allowAllUsers:b=!1}=e,[N,S]=(0,i.useState)(!1),[Z,w]=(0,i.useState)([]),[k,z]=(0,i.useState)(null),[A,B]=(0,i.useState)(!1),[E,T]=(0,i.useState)(!1),O=()=>{w([]),z(null),B(!1),T(!1),l()},L=i.useMemo(()=>({user_id:"bulk_edit",user_info:{user_email:"",user_role:"",teams:[],models:[],max_budget:null,spend:0,metadata:{},created_at:null,updated_at:null},keys:[],teams:f||[]}),[f,s]),F=async e=>{if(console.log("formValues",e),!n){U.Z.fromBackend("Access token not found");return}S(!0);try{let s=a.map(e=>e.user_id),t={};e.user_role&&""!==e.user_role&&(t.user_role=e.user_role),null!==e.max_budget&&void 0!==e.max_budget&&(t.max_budget=e.max_budget),e.models&&e.models.length>0&&(t.models=e.models),e.budget_duration&&""!==e.budget_duration&&(t.budget_duration=e.budget_duration),e.metadata&&Object.keys(e.metadata).length>0&&(t.metadata=e.metadata);let i=Object.keys(t).length>0,r=A&&Z.length>0;if(!i&&!r){U.Z.fromBackend("Please modify at least one field or select teams to add users to");return}let o=[];if(i){if(E){let e=await (0,j.userBulkUpdateUserCall)(n,t,void 0,!0);o.push("Updated all users (".concat(e.total_requested," total)"))}else await (0,j.userBulkUpdateUserCall)(n,t,s),o.push("Updated ".concat(s.length," user(s)"))}if(r){let e=[];for(let s of Z)try{let l=null;l=E?null:a.map(e=>({user_id:e.user_id,role:"user",user_email:e.user_email||null}));let t=await (0,j.teamBulkMemberAddCall)(n,s,l||null,k||void 0,E);console.log("result",t),e.push({teamId:s,success:!0,successfulAdditions:t.successful_additions,failedAdditions:t.failed_additions})}catch(l){console.error("Failed to add users to team ".concat(s,":"),l),e.push({teamId:s,success:!1,error:l})}let s=e.filter(e=>e.success),l=e.filter(e=>!e.success);if(s.length>0){let e=s.reduce((e,s)=>e+s.successfulAdditions,0);o.push("Added users to ".concat(s.length," team(s) (").concat(e," total additions)"))}l.length>0&&d.ZP.warning("Failed to add users to ".concat(l.length," team(s)"))}o.length>0&&U.Z.success(o.join(". ")),w([]),z(null),B(!1),T(!1),p(),l()}catch(e){console.error("Bulk operation failed:",e),U.Z.fromBackend("Failed to perform bulk operations")}finally{S(!1)}};return(0,t.jsxs)(o.Z,{open:s,onCancel:O,footer:null,title:E?"Bulk Edit All Users":"Bulk Edit ".concat(a.length," User(s)"),width:800,children:[b&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(c.Z,{checked:E,onChange:e=>T(e.target.checked),children:(0,t.jsx)(I,{strong:!0,children:"Update ALL users in the system"})}),E&&(0,t.jsx)("div",{style:{marginTop:8},children:(0,t.jsx)(I,{type:"warning",style:{fontSize:"12px"},children:"⚠️ This will apply changes to ALL users in the system, not just the selected ones."})})]}),!E&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)(D,{level:5,children:["Selected Users (",a.length,"):"]}),(0,t.jsx)(u.Z,{size:"small",bordered:!0,dataSource:a,pagination:!1,scroll:{y:200},rowKey:"user_id",columns:[{title:"User ID",dataIndex:"user_id",key:"user_id",width:"30%",render:e=>(0,t.jsx)(I,{strong:!0,style:{fontSize:"12px"},children:e.length>20?"".concat(e.slice(0,20),"..."):e})},{title:"Email",dataIndex:"user_email",key:"user_email",width:"25%",render:e=>(0,t.jsx)(I,{type:"secondary",style:{fontSize:"12px"},children:e||"No email"})},{title:"Current Role",dataIndex:"user_role",key:"user_role",width:"25%",render:e=>{var s;return(0,t.jsx)(I,{style:{fontSize:"12px"},children:(null==r?void 0:null===(s=r[e])||void 0===s?void 0:s.ui_label)||e})}},{title:"Budget",dataIndex:"max_budget",key:"max_budget",width:"20%",render:e=>(0,t.jsx)(I,{style:{fontSize:"12px"},children:null!==e?"$".concat(e):"Unlimited"})}]})]}),(0,t.jsx)(m.Z,{}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)(I,{children:[(0,t.jsx)("strong",{children:"Instructions:"})," Fill in the fields below with the values you want to apply to all selected users. You can bulk edit: role, budget, models, and metadata. You can also add users to teams."]})}),(0,t.jsx)(x.Z,{title:"Team Management",size:"small",className:"mb-4",style:{backgroundColor:"#fafafa"},children:(0,t.jsxs)(h.Z,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsx)(c.Z,{checked:A,onChange:e=>B(e.target.checked),children:"Add selected users to teams"}),A&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(I,{strong:!0,children:"Select Teams:"}),(0,t.jsx)(g.default,{mode:"multiple",placeholder:"Select teams to add users to",value:Z,onChange:w,style:{width:"100%",marginTop:8},options:(null==f?void 0:f.map(e=>({label:e.team_alias||e.team_id,value:e.team_id})))||[]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(I,{strong:!0,children:"Team Budget (Optional):"}),(0,t.jsx)(v.Z,{placeholder:"Max budget per user in team",value:k,onChange:e=>z(e),style:{width:"100%",marginTop:8},min:0,step:.01,precision:2}),(0,t.jsx)(I,{type:"secondary",style:{fontSize:"12px"},children:"Leave empty for unlimited budget within team limits"})]}),(0,t.jsx)(I,{type:"secondary",style:{fontSize:"12px"},children:'Users will be added with "user" role by default. All users will be added to each selected team.'})]})]})}),(0,t.jsx)(C,{userData:L,onCancel:O,onSubmit:F,teams:f,accessToken:n,userID:"bulk_edit",userRole:y,userModels:_,possibleUIRoles:r,isBulkEdit:!0}),N&&(0,t.jsx)("div",{style:{textAlign:"center",marginTop:"10px"},children:(0,t.jsxs)(I,{children:["Updating ",E?"all users":a.length," user(s)..."]})})]})},A=l(7765),B=l(5545),E=e=>{let{visible:s,possibleUIRoles:l,onCancel:a,user:r,onSubmit:n}=e,[d,c]=(0,i.useState)(r),[u]=p.Z.useForm();(0,i.useEffect)(()=>{u.resetFields()},[r]);let m=async()=>{u.resetFields(),a()},x=async e=>{n(e),u.resetFields(),a()};return r?(0,t.jsx)(o.Z,{visible:s,onCancel:m,footer:null,title:"Edit User "+r.user_id,width:1e3,children:(0,t.jsx)(p.Z,{form:u,onFinish:x,initialValues:r,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.Z.Item,{className:"mt-8",label:"User Email",tooltip:"Email of the User",name:"user_email",children:(0,t.jsx)(b.Z,{})}),(0,t.jsx)(p.Z.Item,{label:"user_id",name:"user_id",hidden:!0,children:(0,t.jsx)(b.Z,{})}),(0,t.jsx)(p.Z.Item,{label:"User Role",name:"user_role",children:(0,t.jsx)(g.default,{children:l&&Object.entries(l).map(e=>{let[s,{ui_label:l,description:a}]=e;return(0,t.jsx)(_.Z,{value:s,title:l,children:(0,t.jsxs)("div",{className:"flex",children:[l," ",(0,t.jsx)("p",{className:"ml-2",style:{color:"gray",fontSize:"12px"},children:a})]})},s)})})}),(0,t.jsx)(p.Z.Item,{label:"Spend (USD)",name:"spend",tooltip:"(float) - Spend of all LLM calls completed by this user",help:"Across all keys (including keys with team_id).",children:(0,t.jsx)(v.Z,{min:0,step:.01})}),(0,t.jsx)(p.Z.Item,{label:"User Budget (USD)",name:"max_budget",tooltip:"(float) - Maximum budget of this user",help:"Maximum budget of this user.",children:(0,t.jsx)(y.Z,{min:0,step:.01})}),(0,t.jsx)(p.Z.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsx)(k.Z,{})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(B.ZP,{htmlType:"submit",children:"Save"})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(B.ZP,{htmlType:"submit",children:"Save"})})]})})}):null},T=l(98187),O=l(59872),L=l(19616),F=l(29827),R=l(11713),P=l(21609),M=l(88913),K=l(63709),V=l(10353),q=l(26349),G=l(96473),J=e=>{var s;let{accessToken:l,possibleUIRoles:a,userID:r,userRole:d}=e,[o,c]=(0,i.useState)(!0),[u,m]=(0,i.useState)(null),[x,h]=(0,i.useState)(!1),[p,f]=(0,i.useState)({}),[y,_]=(0,i.useState)(!1),[b,N]=(0,i.useState)([]),{Paragraph:Z}=n.default,{Option:w}=g.default;(0,i.useEffect)(()=>{(async()=>{if(!l){c(!1);return}try{let e=await (0,j.getInternalUserSettings)(l);if(m(e),f(e.values||{}),l)try{let e=await (0,j.modelAvailableCall)(l,r,d);if(e&&e.data){let s=e.data.map(e=>e.id);N(s)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching SSO settings:",e),U.Z.fromBackend("Failed to fetch SSO settings")}finally{c(!1)}})()},[l]);let C=async()=>{if(l){_(!0);try{let e=Object.entries(p).reduce((e,s)=>{let[l,t]=s;return e[l]=""===t?null:t,e},{}),s=await (0,j.updateInternalUserSettings)(l,e);m({...u,values:s.settings}),h(!1)}catch(e){console.error("Error updating SSO settings:",e),U.Z.fromBackend("Failed to update settings: "+e)}finally{_(!1)}}},I=(e,s)=>{f(l=>({...l,[e]:s}))},D=e=>e&&Array.isArray(e)?e.map(e=>"string"==typeof e?{team_id:e,user_role:"user"}:"object"==typeof e&&e.team_id?{team_id:e.team_id,max_budget_in_team:e.max_budget_in_team,user_role:e.user_role||"user"}:{team_id:"",user_role:"user"}):[],z=e=>{let s=D(e),l=(e,l,t)=>{let a=[...s];a[e]={...a[e],[l]:t},I("teams",a)},a=e=>{I("teams",s.filter((s,l)=>l!==e))};return(0,t.jsxs)("div",{className:"space-y-3",children:[s.map((e,s)=>(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)(M.xv,{className:"font-medium",children:["Team ",s+1]}),(0,t.jsx)(M.zx,{size:"sm",variant:"secondary",icon:q.Z,onClick:()=>a(s),className:"text-red-500 hover:text-red-700",children:"Remove"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(M.xv,{className:"text-sm font-medium mb-1",children:"Team ID"}),(0,t.jsx)(M.oi,{value:e.team_id,onChange:e=>l(s,"team_id",e.target.value),placeholder:"Enter team ID"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(M.xv,{className:"text-sm font-medium mb-1",children:"Max Budget in Team"}),(0,t.jsx)(v.Z,{style:{width:"100%"},value:e.max_budget_in_team,onChange:e=>l(s,"max_budget_in_team",e),placeholder:"Optional",min:0,step:.01,precision:2})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(M.xv,{className:"text-sm font-medium mb-1",children:"User Role"}),(0,t.jsxs)(g.default,{style:{width:"100%"},value:e.user_role,onChange:e=>l(s,"user_role",e),children:[(0,t.jsx)(w,{value:"user",children:"User"}),(0,t.jsx)(w,{value:"admin",children:"Admin"})]})]})]})]},s)),(0,t.jsx)(M.zx,{variant:"secondary",icon:G.Z,onClick:()=>{I("teams",[...s,{team_id:"",user_role:"user"}])},className:"w-full",children:"Add Team"})]})},A=(e,s,l)=>{var i;let r=s.type;if("teams"===e)return(0,t.jsx)("div",{className:"mt-2",children:z(p[e]||[])});if("user_role"===e&&a)return(0,t.jsx)(g.default,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:Object.entries(a).filter(e=>{let[s]=e;return s.includes("internal_user")}).map(e=>{let[s,{ui_label:l,description:a}]=e;return(0,t.jsx)(w,{value:s,children:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)("span",{children:l}),(0,t.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:a})]})},s)})});if("budget_duration"===e)return(0,t.jsx)(k.Z,{value:p[e]||null,onChange:s=>I(e,s),className:"mt-2"});if("boolean"===r)return(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(K.Z,{checked:!!p[e],onChange:s=>I(e,s)})});if("array"===r&&(null===(i=s.items)||void 0===i?void 0:i.enum))return(0,t.jsx)(g.default,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:s.items.enum.map(e=>(0,t.jsx)(w,{value:e,children:e},e))});if("models"===e)return(0,t.jsxs)(g.default,{mode:"multiple",style:{width:"100%"},value:p[e]||[],onChange:s=>I(e,s),className:"mt-2",children:[(0,t.jsx)(w,{value:"no-default-models",children:"No Default Models"},"no-default-models"),(0,t.jsx)(w,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),b.map(e=>(0,t.jsx)(w,{value:e,children:(0,S.W0)(e)},e))]});if("string"===r&&s.enum)return(0,t.jsx)(g.default,{style:{width:"100%"},value:p[e]||"",onChange:s=>I(e,s),className:"mt-2",children:s.enum.map(e=>(0,t.jsx)(w,{value:e,children:e},e))});else return(0,t.jsx)(M.oi,{value:void 0!==p[e]?String(p[e]):"",onChange:s=>I(e,s.target.value),placeholder:s.description||"",className:"mt-2"})},B=(e,s)=>{if(null==s)return(0,t.jsx)("span",{className:"text-gray-400",children:"Not set"});if("teams"===e&&Array.isArray(s)){if(0===s.length)return(0,t.jsx)("span",{className:"text-gray-400",children:"No teams assigned"});let e=D(s);return(0,t.jsx)("div",{className:"space-y-2 mt-1",children:e.map((e,s)=>(0,t.jsx)("div",{className:"border rounded-lg p-3 bg-white",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Team ID:"}),(0,t.jsx)("p",{className:"text-gray-900",children:e.team_id||"Not specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Max Budget:"}),(0,t.jsx)("p",{className:"text-gray-900",children:void 0!==e.max_budget_in_team?"$".concat((0,O.pw)(e.max_budget_in_team,4)):"No limit"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium text-gray-600",children:"Role:"}),(0,t.jsx)("p",{className:"text-gray-900 capitalize",children:e.user_role})]})]})},s))})}if("user_role"===e&&a&&a[s]){let{ui_label:e,description:l}=a[s];return(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium",children:e}),l&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:l})]})}return"budget_duration"===e?(0,t.jsx)("span",{children:(0,k.m)(s)}):"boolean"==typeof s?(0,t.jsx)("span",{children:s?"Enabled":"Disabled"}):"models"===e&&Array.isArray(s)?0===s.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:s.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,S.W0)(e)},s))}):"object"==typeof s?Array.isArray(s)?0===s.length?(0,t.jsx)("span",{className:"text-gray-400",children:"None"}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:s.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},s))}):(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(s,null,2)}):(0,t.jsx)("span",{children:String(s)})};return o?(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(V.Z,{size:"large"})}):u?(0,t.jsxs)(M.Zb,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(M.Dx,{children:"Default User Settings"}),!o&&u&&(x?(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(M.zx,{variant:"secondary",onClick:()=>{h(!1),f(u.values||{})},disabled:y,children:"Cancel"}),(0,t.jsx)(M.zx,{onClick:C,loading:y,children:"Save Changes"})]}):(0,t.jsx)(M.zx,{onClick:()=>h(!0),children:"Edit Settings"}))]}),(null==u?void 0:null===(s=u.field_schema)||void 0===s?void 0:s.description)&&(0,t.jsx)(Z,{className:"mb-4",children:u.field_schema.description}),(0,t.jsx)(M.iz,{}),(0,t.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:s}=u;return s&&s.properties?Object.entries(s.properties).map(s=>{let[l,a]=s,i=e[l],r=l.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,t.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,t.jsx)(M.xv,{className:"font-medium text-lg",children:r}),(0,t.jsx)(Z,{className:"text-sm text-gray-500 mt-1",children:a.description||"No description available"}),x?(0,t.jsx)("div",{className:"mt-2",children:A(l,a,i)}):(0,t.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:B(l,i)})]},l)}):(0,t.jsx)(M.xv,{children:"No schema information available"})})()})]}):(0,t.jsx)(M.Zb,{children:(0,t.jsx)(M.xv,{children:"No settings available or you do not have permission to view them."})})},Q=l(41649),H=l(67101),$=l(47323),W=l(15731),Y=l(53410),X=l(74998),ee=l(23628);let es=(e,s,l,a,i,r)=>{let n=[{header:"User ID",accessorKey:"user_id",enableSorting:!0,cell:e=>{let{row:s}=e;return(0,t.jsx)(f.Z,{title:s.original.user_id,children:(0,t.jsx)("span",{className:"text-xs",children:s.original.user_id?"".concat(s.original.user_id.slice(0,7),"..."):"-"})})}},{header:"Email",accessorKey:"user_email",enableSorting:!0,cell:e=>{let{row:s}=e;return(0,t.jsx)("span",{className:"text-xs",children:s.original.user_email||"-"})}},{header:"Global Proxy Role",accessorKey:"user_role",enableSorting:!0,cell:s=>{var l;let{row:a}=s;return(0,t.jsx)("span",{className:"text-xs",children:(null==e?void 0:null===(l=e[a.original.user_role])||void 0===l?void 0:l.ui_label)||"-"})}},{header:"User Alias",accessorKey:"user_alias",enableSorting:!1,cell:e=>{let{row:s}=e;return(0,t.jsx)("span",{className:"text-xs",children:s.original.user_alias||"-"})}},{header:"Spend (USD)",accessorKey:"spend",enableSorting:!0,cell:e=>{let{row:s}=e;return(0,t.jsx)("span",{className:"text-xs",children:s.original.spend?(0,O.pw)(s.original.spend,4):"-"})}},{header:"Budget (USD)",accessorKey:"max_budget",enableSorting:!1,cell:e=>{let{row:s}=e;return(0,t.jsx)("span",{className:"text-xs",children:null!==s.original.max_budget?s.original.max_budget:"Unlimited"})}},{header:()=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"SSO ID"}),(0,t.jsx)(f.Z,{title:"SSO ID is the ID of the user in the SSO provider. If the user is not using SSO, this will be null.",children:(0,t.jsx)(W.Z,{className:"w-4 h-4"})})]}),accessorKey:"sso_user_id",enableSorting:!1,cell:e=>{let{row:s}=e;return(0,t.jsx)("span",{className:"text-xs",children:null!==s.original.sso_user_id?s.original.sso_user_id:"-"})}},{header:"Virtual Keys",accessorKey:"key_count",enableSorting:!1,cell:e=>{let{row:s}=e;return(0,t.jsx)(H.Z,{numItems:2,children:s.original.key_count>0?(0,t.jsxs)(Q.Z,{size:"xs",color:"indigo",children:[s.original.key_count," ",1===s.original.key_count?"Key":"Keys"]}):(0,t.jsx)(Q.Z,{size:"xs",color:"gray",children:"No Keys"})})}},{header:"Created At",accessorKey:"created_at",enableSorting:!0,cell:e=>{let{row:s}=e;return(0,t.jsx)("span",{className:"text-xs",children:s.original.created_at?new Date(s.original.created_at).toLocaleDateString():"-"})}},{header:"Updated At",accessorKey:"updated_at",enableSorting:!1,cell:e=>{let{row:s}=e;return(0,t.jsx)("span",{className:"text-xs",children:s.original.updated_at?new Date(s.original.updated_at).toLocaleDateString():"-"})}},{id:"actions",header:"Actions",enableSorting:!1,cell:e=>{let{row:s}=e;return(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(f.Z,{title:"Edit user details",children:(0,t.jsx)($.Z,{icon:Y.Z,size:"sm",onClick:()=>i(s.original.user_id,!0),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(f.Z,{title:"Delete user",children:(0,t.jsx)($.Z,{icon:X.Z,size:"sm",onClick:()=>l(s.original),className:"cursor-pointer hover:text-red-600"})}),(0,t.jsx)(f.Z,{title:"Reset Password",children:(0,t.jsx)($.Z,{icon:ee.Z,size:"sm",onClick:()=>a(s.original.user_id),className:"cursor-pointer hover:text-green-600"})})]})}}];if(r){let{onSelectUser:e,onSelectAll:s,isUserSelected:l,isAllSelected:a,isIndeterminate:i}=r;return[{id:"select",enableSorting:!1,header:()=>(0,t.jsx)(c.Z,{indeterminate:i,checked:a,onChange:e=>s(e.target.checked),onClick:e=>e.stopPropagation()}),cell:s=>{let{row:a}=s;return(0,t.jsx)(c.Z,{checked:l(a.original),onChange:s=>e(a.original,s.target.checked),onClick:e=>e.stopPropagation()})}},...n]}return n};var el=l(71594),et=l(24525),ea=l(27281),ei=l(21626),er=l(97214),en=l(28241),ed=l(58834),eo=l(69552),ec=l(71876),eu=l(44633),em=l(86462),ex=l(49084),eh=l(50337),eg=l(84717),ev=l(10900),ej=l(30401),ep=l(78867);function ef(e){var s,l,a,r,n,d,o,c,u,m,x,h,g,v,p,f,y,_,b,N,S,w,I,D,z,A,E,L,F,R,M,K,V,q,G,J,Q,H,$,W,Y,es,el,et,ea;let{userId:ei,onClose:er,accessToken:en,userRole:ed,onDelete:eo,possibleUIRoles:ec,initialTab:eu=0,startInEditMode:em=!1}=e,[ex,eh]=(0,i.useState)(null),[ef,ey]=(0,i.useState)(!1),[e_,eb]=(0,i.useState)(!1),[eN,eS]=(0,i.useState)(!0),[eZ,ew]=(0,i.useState)(em),[ek,eC]=(0,i.useState)([]),[eU,eI]=(0,i.useState)(!1),[eD,ez]=(0,i.useState)(null),[eA,eB]=(0,i.useState)(null),[eE,eT]=(0,i.useState)(eu),[eO,eL]=(0,i.useState)({}),[eF,eR]=(0,i.useState)(!1);i.useEffect(()=>{eB((0,j.getProxyBaseUrl)())},[]),i.useEffect(()=>{console.log("userId: ".concat(ei,", userRole: ").concat(ed,", accessToken: ").concat(en)),(async()=>{try{if(!en)return;let e=await (0,j.userInfoCall)(en,ei,ed||"",!1,null,null,!0);eh(e);let s=(await (0,j.modelAvailableCall)(en,ei,ed||"")).data.map(e=>e.id);eC(s)}catch(e){console.error("Error fetching user data:",e),U.Z.fromBackend("Failed to fetch user data")}finally{eS(!1)}})()},[en,ei,ed]);let eP=async()=>{if(!en){U.Z.fromBackend("Access token not found");return}try{U.Z.success("Generating password reset link...");let e=await (0,j.invitationCreateCall)(en,ei);ez(e),eI(!0)}catch(e){U.Z.fromBackend("Failed to generate password reset link")}},eM=async()=>{try{if(!en)return;eb(!0),await (0,j.userDeleteCall)(en,[ei]),U.Z.success("User deleted successfully"),eo&&eo(),er()}catch(e){console.error("Error deleting user:",e),U.Z.fromBackend("Failed to delete user")}finally{ey(!1),eb(!1)}},eK=async e=>{try{if(!en||!ex)return;await (0,j.userUpdateUserCall)(en,e,null),eh({...ex,user_info:{...ex.user_info,user_email:e.user_email,user_alias:e.user_alias,models:e.models,max_budget:e.max_budget,budget_duration:e.budget_duration,metadata:e.metadata}}),U.Z.success("User updated successfully"),ew(!1)}catch(e){console.error("Error updating user:",e),U.Z.fromBackend("Failed to update user")}};if(eN)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(eg.zx,{icon:ev.Z,variant:"light",onClick:er,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(eg.xv,{children:"Loading user data..."})]});if(!ex)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(eg.zx,{icon:ev.Z,variant:"light",onClick:er,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(eg.xv,{children:"User not found"})]});let eV=async(e,s)=>{await (0,O.vQ)(e)&&(eL(e=>({...e,[s]:!0})),setTimeout(()=>{eL(e=>({...e,[s]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.zx,{icon:ev.Z,variant:"light",onClick:er,className:"mb-4",children:"Back to Users"}),(0,t.jsx)(eg.Dx,{children:(null===(s=ex.user_info)||void 0===s?void 0:s.user_email)||"User"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(eg.xv,{className:"text-gray-500 font-mono",children:ex.user_id}),(0,t.jsx)(B.ZP,{type:"text",size:"small",icon:eO["user-id"]?(0,t.jsx)(ej.Z,{size:12}):(0,t.jsx)(ep.Z,{size:12}),onClick:()=>eV(ex.user_id,"user-id"),className:"left-2 z-10 transition-all duration-200 ".concat(eO["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]}),ed&&Z.LQ.includes(ed)&&(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(eg.zx,{icon:ee.Z,variant:"secondary",onClick:eP,className:"flex items-center",children:"Reset Password"}),(0,t.jsx)(eg.zx,{icon:X.Z,variant:"secondary",onClick:()=>ey(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-600 hover:border-red-600",children:"Delete User"})]})]}),(0,t.jsx)(P.Z,{isOpen:ef,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:null===(l=ex.user_info)||void 0===l?void 0:l.user_email},{label:"User ID",value:ex.user_id,code:!0},{label:"Global Proxy Role",value:(null===(a=ex.user_info)||void 0===a?void 0:a.user_role)&&(null==ec?void 0:null===(r=ec[ex.user_info.user_role])||void 0===r?void 0:r.ui_label)||(null===(n=ex.user_info)||void 0===n?void 0:n.user_role)||"-"},{label:"Total Spend (USD)",value:(null===(d=ex.user_info)||void 0===d?void 0:d.spend)!==null&&(null===(o=ex.user_info)||void 0===o?void 0:o.spend)!==void 0?ex.user_info.spend.toFixed(2):void 0}],onCancel:()=>{ey(!1)},onOk:eM,confirmLoading:e_}),(0,t.jsxs)(eg.v0,{defaultIndex:eE,onIndexChange:eT,children:[(0,t.jsxs)(eg.td,{className:"mb-4",children:[(0,t.jsx)(eg.OK,{children:"Overview"}),(0,t.jsx)(eg.OK,{children:"Details"})]}),(0,t.jsxs)(eg.nP,{children:[(0,t.jsx)(eg.x4,{children:(0,t.jsxs)(eg.rj,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(eg.Zb,{children:[(0,t.jsx)(eg.xv,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(eg.Dx,{children:["$",(0,O.pw)((null===(c=ex.user_info)||void 0===c?void 0:c.spend)||0,4)]}),(0,t.jsxs)(eg.xv,{children:["of"," ",(null===(u=ex.user_info)||void 0===u?void 0:u.max_budget)!==null?"$".concat((0,O.pw)(ex.user_info.max_budget,4)):"Unlimited"]})]})]}),(0,t.jsxs)(eg.Zb,{children:[(0,t.jsx)(eg.xv,{children:"Teams"}),(0,t.jsx)("div",{className:"mt-2",children:(null===(m=ex.teams)||void 0===m?void 0:m.length)&&(null===(x=ex.teams)||void 0===x?void 0:x.length)>0?(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[null===(h=ex.teams)||void 0===h?void 0:h.slice(0,eF?ex.teams.length:20).map((e,s)=>(0,t.jsx)(eg.Ct,{color:"blue",title:e.team_alias,children:e.team_alias},s)),!eF&&(null===(g=ex.teams)||void 0===g?void 0:g.length)>20&&(0,t.jsxs)(eg.Ct,{color:"gray",className:"cursor-pointer hover:bg-gray-200 transition-colors",onClick:()=>eR(!0),children:["+",ex.teams.length-20," more"]}),eF&&(null===(v=ex.teams)||void 0===v?void 0:v.length)>20&&(0,t.jsx)(eg.Ct,{color:"gray",className:"cursor-pointer hover:bg-gray-200 transition-colors",onClick:()=>eR(!1),children:"Show Less"})]}):(0,t.jsx)(eg.xv,{children:"No teams"})})]}),(0,t.jsxs)(eg.Zb,{children:[(0,t.jsx)(eg.xv,{children:"Virtual Keys"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsxs)(eg.xv,{children:[(null===(p=ex.keys)||void 0===p?void 0:p.length)||0," ",(null===(f=ex.keys)||void 0===f?void 0:f.length)===1?"Key":"Keys"]})})]}),(0,t.jsxs)(eg.Zb,{children:[(0,t.jsx)(eg.xv,{children:"Personal Models"}),(0,t.jsx)("div",{className:"mt-2",children:(null===(_=ex.user_info)||void 0===_?void 0:null===(y=_.models)||void 0===y?void 0:y.length)&&(null===(N=ex.user_info)||void 0===N?void 0:null===(b=N.models)||void 0===b?void 0:b.length)>0?null===(w=ex.user_info)||void 0===w?void 0:null===(S=w.models)||void 0===S?void 0:S.map((e,s)=>(0,t.jsx)(eg.xv,{children:e},s)):(0,t.jsx)(eg.xv,{children:"All proxy models"})})]})]})}),(0,t.jsx)(eg.x4,{children:(0,t.jsxs)(eg.Zb,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(eg.Dx,{children:"User Settings"}),!eZ&&ed&&Z.LQ.includes(ed)&&(0,t.jsx)(eg.zx,{onClick:()=>ew(!0),children:"Edit Settings"})]}),eZ&&ex?(0,t.jsx)(C,{userData:ex,onCancel:()=>ew(!1),onSubmit:eK,teams:ex.teams,accessToken:en,userID:ei,userRole:ed,userModels:ek,possibleUIRoles:ec}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"User ID"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(eg.xv,{className:"font-mono",children:ex.user_id}),(0,t.jsx)(B.ZP,{type:"text",size:"small",icon:eO["user-id"]?(0,t.jsx)(ej.Z,{size:12}):(0,t.jsx)(ep.Z,{size:12}),onClick:()=>eV(ex.user_id,"user-id"),className:"left-2 z-10 transition-all duration-200 ".concat(eO["user-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Email"}),(0,t.jsx)(eg.xv,{children:(null===(I=ex.user_info)||void 0===I?void 0:I.user_email)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"User Alias"}),(0,t.jsx)(eg.xv,{children:(null===(D=ex.user_info)||void 0===D?void 0:D.user_alias)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Global Proxy Role"}),(0,t.jsx)(eg.xv,{children:(null===(z=ex.user_info)||void 0===z?void 0:z.user_role)||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Created"}),(0,t.jsx)(eg.xv,{children:(null===(A=ex.user_info)||void 0===A?void 0:A.created_at)?new Date(ex.user_info.created_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Last Updated"}),(0,t.jsx)(eg.xv,{children:(null===(E=ex.user_info)||void 0===E?void 0:E.updated_at)?new Date(ex.user_info.updated_at).toLocaleString():"Unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Teams"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:(null===(L=ex.teams)||void 0===L?void 0:L.length)&&(null===(F=ex.teams)||void 0===F?void 0:F.length)>0?(0,t.jsxs)(t.Fragment,{children:[null===(R=ex.teams)||void 0===R?void 0:R.slice(0,eF?ex.teams.length:20).map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",title:e.team_alias||e.team_id,children:e.team_alias||e.team_id},s)),!eF&&(null===(M=ex.teams)||void 0===M?void 0:M.length)>20&&(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded text-xs cursor-pointer hover:bg-gray-200 transition-colors",onClick:()=>eR(!0),children:["+",ex.teams.length-20," more"]}),eF&&(null===(K=ex.teams)||void 0===K?void 0:K.length)>20&&(0,t.jsx)("span",{className:"px-2 py-1 bg-gray-100 rounded text-xs cursor-pointer hover:bg-gray-200 transition-colors",onClick:()=>eR(!1),children:"Show Less"})]}):(0,t.jsx)(eg.xv,{children:"No teams"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Personal Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:(null===(q=ex.user_info)||void 0===q?void 0:null===(V=q.models)||void 0===V?void 0:V.length)&&(null===(J=ex.user_info)||void 0===J?void 0:null===(G=J.models)||void 0===G?void 0:G.length)>0?null===(H=ex.user_info)||void 0===H?void 0:null===(Q=H.models)||void 0===Q?void 0:Q.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):(0,t.jsx)(eg.xv,{children:"All proxy models"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Virtual Keys"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:(null===($=ex.keys)||void 0===$?void 0:$.length)&&(null===(W=ex.keys)||void 0===W?void 0:W.length)>0?ex.keys.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-green-100 rounded text-xs",children:e.key_alias||e.token},s)):(0,t.jsx)(eg.xv,{children:"No Virtual Keys"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Max Budget"}),(0,t.jsx)(eg.xv,{children:(null===(Y=ex.user_info)||void 0===Y?void 0:Y.max_budget)!==null&&(null===(es=ex.user_info)||void 0===es?void 0:es.max_budget)!==void 0?"$".concat((0,O.pw)(ex.user_info.max_budget,4)):"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Budget Reset"}),(0,t.jsx)(eg.xv,{children:(0,k.m)(null!==(ea=null===(el=ex.user_info)||void 0===el?void 0:el.budget_duration)&&void 0!==ea?ea:null)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eg.xv,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify((null===(et=ex.user_info)||void 0===et?void 0:et.metadata)||{},null,2)})]})]})]})})]})]}),(0,t.jsx)(T.Z,{isInvitationLinkModalVisible:eU,setIsInvitationLinkModalVisible:eI,baseUrl:eA||"",invitationLinkData:eD,modalType:"resetPassword"})]})}var ey=l(56083),e_=l(51205),eb=l(57716),eN=l(73247),eS=l(92369),eZ=l(66344);function ew(e){let{data:s=[],columns:l,isLoading:a=!1,onSortChange:r,currentSort:n,accessToken:d,userRole:o,possibleUIRoles:c,handleEdit:u,handleDelete:m,handleResetPassword:x,selectedUsers:h=[],onSelectionChange:g,enableSelection:v=!1,filters:j,updateFilters:p,initialFilters:f,teams:y,userListResponse:b,currentPage:N,handlePageChange:S}=e,[Z,w]=i.useState([{id:(null==n?void 0:n.sortBy)||"created_at",desc:(null==n?void 0:n.sortOrder)==="desc"}]),[k,C]=i.useState(null),[U,I]=i.useState(!1),[D,z]=i.useState(!1),A=function(e){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];C(e),I(s)},B=(e,s)=>{g&&(s?g([...h,e]):g(h.filter(s=>s.user_id!==e.user_id)))},E=e=>{g&&(e?g(s):g([]))},T=e=>h.some(s=>s.user_id===e.user_id),O=s.length>0&&h.length===s.length,L=h.length>0&&h.lengthc?es(c,u,m,x,A,v?{selectedUsers:h,onSelectUser:B,onSelectAll:E,isUserSelected:T,isAllSelected:O,isIndeterminate:L}:void 0):l,[c,u,m,x,A,l,v,h,O,L]),R=(0,el.b7)({data:s,columns:F,state:{sorting:Z},onSortingChange:e=>{let s="function"==typeof e?e(Z):e;if(w(s),s&&Array.isArray(s)&&s.length>0&&s[0]){let e=s[0];if(e.id){let s=e.id,l=e.desc?"desc":"asc";null==r||r(s,l)}}else null==r||r("created_at","desc")},getCoreRowModel:(0,et.sC)(),manualSorting:!0,enableSorting:!0});return(i.useEffect(()=>{n&&w([{id:n.sortBy,desc:"desc"===n.sortOrder}])},[n]),k)?(0,t.jsx)(ef,{userId:k,onClose:()=>{C(null),I(!1)},accessToken:d,userRole:o,possibleUIRoles:c,initialTab:U?1:0,startInEditMode:U}):(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,t.jsx)("div",{className:"border-b px-6 py-4",children:(0,t.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(ey.H,{placeholder:"Search by email...",value:j.email,onChange:e=>p({email:e}),icon:eN.Z}),(0,t.jsx)(e_.c,{onClick:()=>z(!D),active:D,hasActiveFilters:!!(j.user_id||j.user_role||j.team)}),(0,t.jsx)(eb.z,{onClick:()=>{p(f)}})]}),D&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,t.jsx)(ey.H,{placeholder:"Filter by User ID",value:j.user_id,onChange:e=>p({user_id:e}),icon:eS.Z}),(0,t.jsx)(ey.H,{placeholder:"Filter by SSO ID",value:j.sso_user_id,onChange:e=>p({sso_user_id:e}),icon:eZ.Z}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ea.Z,{value:j.user_role,onValueChange:e=>p({user_role:e}),placeholder:"Select Role",children:c&&Object.entries(c).map(e=>{let[s,l]=e;return(0,t.jsx)(_.Z,{value:s,children:l.ui_label},s)})})}),(0,t.jsx)("div",{className:"w-64",children:(0,t.jsx)(ea.Z,{value:j.team,onValueChange:e=>p({team:e}),placeholder:"Select Team",children:null==y?void 0:y.map(e=>(0,t.jsx)(_.Z,{value:e.team_id,children:e.team_alias||e.team_id},e.team_id))})})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[a?(0,t.jsx)(eh.Z.Input,{active:!0,style:{width:192,height:20}}):(0,t.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing"," ",b&&b.users&&b.users.length>0?(b.page-1)*b.page_size+1:0," ","-"," ",b&&b.users?Math.min(b.page*b.page_size,b.total):0," ","of ",b?b.total:0," results"]}),(0,t.jsx)("div",{className:"flex space-x-2",children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eh.Z.Button,{active:!0,size:"small",style:{width:80,height:30}}),(0,t.jsx)(eh.Z.Button,{active:!0,size:"small",style:{width:60,height:30}})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:()=>S(N-1),disabled:1===N,className:"px-3 py-1 text-sm border rounded-md ".concat(1===N?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"),children:"Previous"}),(0,t.jsx)("button",{onClick:()=>S(N+1),disabled:!b||N>=b.total_pages,className:"px-3 py-1 text-sm border rounded-md ".concat(!b||N>=b.total_pages?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"),children:"Next"})]})})]})]})}),(0,t.jsx)("div",{className:"overflow-auto",children:(0,t.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(ei.Z,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(ed.Z,{children:R.getHeaderGroups().map(e=>(0,t.jsx)(ec.Z,{children:e.headers.map(e=>(0,t.jsx)(eo.Z,{className:"py-1 h-8 ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""," ").concat(e.column.getCanSort()?"cursor-pointer hover:bg-gray-50":""),onClick:e.column.getToggleSortingHandler(),children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,el.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,t.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,t.jsx)(eu.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,t.jsx)(em.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,t.jsx)(ex.Z,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,t.jsx)(er.Z,{children:a?(0,t.jsx)(ec.Z,{children:(0,t.jsx)(en.Z,{colSpan:F.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"\uD83D\uDE85 Loading users..."})})})}):s.length>0?R.getRowModel().rows.map(e=>(0,t.jsx)(ec.Z,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(en.Z,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""),onClick:()=>{"user_id"===e.column.id&&A(e.getValue(),!1)},style:{cursor:"user_id"===e.column.id?"pointer":"default",color:"user_id"===e.column.id?"#3b82f6":"inherit"},children:(0,el.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,t.jsx)(ec.Z,{children:(0,t.jsx)(en.Z,{colSpan:F.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:"No users found"})})})})})]})})})})]})}let{Text:ek,Title:eC}=n.default,eU={email:"",user_id:"",user_role:"",sso_user_id:"",team:"",model:"",min_spend:null,max_spend:null,sort_by:"created_at",sort_order:"desc"};var eI=e=>{var s,l,n;let{accessToken:d,token:o,userRole:c,userID:u,teams:m}=e,x=(0,F.NL)(),[h,g]=(0,i.useState)(1),[v,p]=(0,i.useState)(!1),[f,y]=(0,i.useState)(null),[_,b]=(0,i.useState)(!1),[N,S]=(0,i.useState)(!1),[w,k]=(0,i.useState)(null),[C,I]=(0,i.useState)("users"),[D,B]=(0,i.useState)(eU),[M,K,V]=(0,L.G)(D,{wait:300}),[q,G]=(0,i.useState)(!1),[Q,H]=(0,i.useState)(null),[$,W]=(0,i.useState)(null),[Y,X]=(0,i.useState)([]),[ee,el]=(0,i.useState)(!1),[et,ea]=(0,i.useState)(!1),[ei,er]=(0,i.useState)([]),en=e=>{k(e),b(!0)};(0,i.useEffect)(()=>()=>{V.cancel()},[V]),(0,i.useEffect)(()=>{W((0,j.getProxyBaseUrl)())},[]),(0,i.useEffect)(()=>{(async()=>{try{if(!u||!c||!d)return;let e=(await (0,j.modelAvailableCall)(d,u,c)).data.map(e=>e.id);console.log("available_model_names:",e),er(e)}catch(e){console.error("Error fetching user models:",e)}})()},[d,u,c]);let ed=e=>{B(s=>{let l={...s,...e};return K(l),l})},eo=async e=>{if(!d){U.Z.fromBackend("Access token not found");return}try{U.Z.success("Generating password reset link...");let s=await (0,j.invitationCreateCall)(d,e);H(s),G(!0)}catch(e){U.Z.fromBackend("Failed to generate password reset link")}},ec=async()=>{if(w&&d)try{S(!0),await (0,j.userDeleteCall)(d,[w.user_id]),x.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let s=e.users.filter(e=>e.user_id!==w.user_id);return{...e,users:s}}),U.Z.success("User deleted successfully")}catch(e){console.error("Error deleting user:",e),U.Z.fromBackend("Failed to delete user")}finally{b(!1),k(null),S(!1)}},eu=async()=>{y(null),p(!1)},em=async e=>{if(console.log("inside handleEditSubmit:",e),d&&o&&c&&u){try{let s=await (0,j.userUpdateUserCall)(d,e,null);x.setQueriesData({queryKey:["userList"]},e=>{if(void 0===e)return e;let l=e.users.map(e=>e.user_id===s.data.user_id?(0,O.nl)(e,s.data):e);return{...e,users:l}}),U.Z.success("User ".concat(e.user_id," updated successfully"))}catch(e){console.error("There was an error updating the user",e)}y(null),p(!1)}},ex=async e=>{g(e)},eg=(0,R.a)({queryKey:["userList",{debouncedFilter:M,currentPage:h}],queryFn:async()=>{if(!d)throw Error("Access token required");return await (0,j.userListCall)(d,M.user_id?[M.user_id]:null,h,25,M.email||null,M.user_role||null,M.team||null,M.sso_user_id||null,M.sort_by,M.sort_order)},enabled:!!(d&&o&&c&&u),placeholderData:e=>e}),ev=eg.data,ej=(0,R.a)({queryKey:["userRoles"],initialData:()=>({}),queryFn:async()=>{if(!d)throw Error("Access token required");return await (0,j.getPossibleUserRoles)(d)},enabled:!!(d&&o&&c&&u)}).data,ep=es(ej,e=>{y(e),p(!0)},en,eo,()=>{});return(0,t.jsxs)("div",{className:"w-full p-8 overflow-hidden",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,t.jsx)("div",{className:"flex space-x-3",children:eg.isLoading?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eh.Z.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}}),(0,t.jsx)(eh.Z.Button,{active:!0,size:"default",shape:"default",style:{width:145,height:36}}),(0,t.jsx)(eh.Z.Button,{active:!0,size:"default",shape:"default",style:{width:110,height:36}})]}):u&&d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.Z,{userID:u,accessToken:d,teams:m,possibleUIRoles:ej}),(0,t.jsx)(r.z,{onClick:()=>{ea(!et),X([])},variant:et?"primary":"secondary",className:"flex items-center",children:et?"Cancel Selection":"Select Users"}),et&&(0,t.jsxs)(r.z,{onClick:()=>{if(0===Y.length){U.Z.fromBackend("Please select users to edit");return}el(!0)},disabled:0===Y.length,className:"flex items-center",children:["Bulk Edit (",Y.length," selected)"]})]}):null})}),(0,t.jsxs)(a.v0,{defaultIndex:0,onIndexChange:e=>I(0===e?"users":"settings"),children:[(0,t.jsxs)(a.td,{className:"mb-4",children:[(0,t.jsx)(a.OK,{children:"Users"}),(0,t.jsx)(a.OK,{children:"Default User Settings"})]}),(0,t.jsxs)(a.nP,{children:[(0,t.jsx)(a.x4,{children:(0,t.jsx)(ew,{data:(null===(s=eg.data)||void 0===s?void 0:s.users)||[],columns:ep,isLoading:eg.isLoading,accessToken:d,userRole:c,onSortChange:(e,s)=>{ed({sort_by:e,sort_order:s})},currentSort:{sortBy:D.sort_by,sortOrder:D.sort_order},possibleUIRoles:ej,handleEdit:e=>{y(e),p(!0)},handleDelete:en,handleResetPassword:eo,enableSelection:et,selectedUsers:Y,onSelectionChange:e=>{X(e)},filters:D,updateFilters:ed,initialFilters:eU,teams:m,userListResponse:ev,currentPage:h,handlePageChange:ex})}),(0,t.jsx)(a.x4,{children:u&&c&&d?(0,t.jsx)(J,{accessToken:d,possibleUIRoles:ej,userID:u,userRole:c}):(0,t.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,t.jsx)(eh.Z,{active:!0,paragraph:{rows:4}})})})]})]}),(0,t.jsx)(E,{visible:v,possibleUIRoles:ej,onCancel:eu,user:f,onSubmit:em}),(0,t.jsx)(P.Z,{isOpen:_,title:"Delete User?",message:"Are you sure you want to delete this user? This action cannot be undone.",resourceInformationTitle:"User Information",resourceInformation:[{label:"Email",value:null==w?void 0:w.user_email},{label:"User ID",value:null==w?void 0:w.user_id,code:!0},{label:"Global Proxy Role",value:w&&(null==ej?void 0:null===(l=ej[w.user_role])||void 0===l?void 0:l.ui_label)||(null==w?void 0:w.user_role)||"-"},{label:"Total Spend (USD)",value:null==w?void 0:null===(n=w.spend)||void 0===n?void 0:n.toFixed(2)}],onCancel:()=>{b(!1),k(null)},onOk:ec,confirmLoading:N}),(0,t.jsx)(T.Z,{isInvitationLinkModalVisible:q,setIsInvitationLinkModalVisible:G,baseUrl:$||"",invitationLinkData:Q,modalType:"resetPassword"}),(0,t.jsx)(z,{open:ee,onCancel:()=>el(!1),selectedUsers:Y,possibleUIRoles:ej,accessToken:d,onSuccess:()=>{x.invalidateQueries({queryKey:["userList"]}),X([]),ea(!1)},teams:m,userRole:c,userModels:ei,allowAllUsers:!!c&&(0,Z.tY)(c)})]})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2344-905d7ecc9d0c6724.js b/litellm/proxy/_experimental/out/_next/static/chunks/2344-905d7ecc9d0c6724.js
deleted file mode 100644
index ac70c71a273..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/2344-905d7ecc9d0c6724.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2344],{38434:function(t,e,n){n.d(e,{Z:function(){return i}});var r=n(1119),a=n(2265),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},c=n(55015),i=a.forwardRef(function(t,e){return a.createElement(c.Z,(0,r.Z)({},t,{ref:e,icon:o}))})},96473:function(t,e,n){n.d(e,{Z:function(){return i}});var r=n(1119),a=n(2265),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},c=n(55015),i=a.forwardRef(function(t,e){return a.createElement(c.Z,(0,r.Z)({},t,{ref:e,icon:o}))})},77565:function(t,e,n){n.d(e,{Z:function(){return i}});var r=n(1119),a=n(2265),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},c=n(55015),i=a.forwardRef(function(t,e){return a.createElement(c.Z,(0,r.Z)({},t,{ref:e,icon:o}))})},57400:function(t,e,n){n.d(e,{Z:function(){return i}});var r=n(1119),a=n(2265),o={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z"}},{tag:"path",attrs:{d:"M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z"}}]},name:"safety",theme:"outlined"},c=n(55015),i=a.forwardRef(function(t,e){return a.createElement(c.Z,(0,r.Z)({},t,{ref:e,icon:o}))})},15883:function(t,e,n){n.d(e,{Z:function(){return i}});var r=n(1119),a=n(2265),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},c=n(55015),i=a.forwardRef(function(t,e){return a.createElement(c.Z,(0,r.Z)({},t,{ref:e,icon:o}))})},23496:function(t,e,n){n.d(e,{Z:function(){return p}});var r=n(2265),a=n(36760),o=n.n(a),c=n(71744),i=n(33759),l=n(93463),d=n(12918),s=n(99320),f=n(71140);let h=t=>{let{componentCls:e}=t;return{[e]:{"&-horizontal":{["&".concat(e)]:{"&-sm":{marginBlock:t.marginXS},"&-md":{marginBlock:t.margin}}}}}},u=t=>{let{componentCls:e,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:a,textPaddingInline:o,orientationMargin:c,verticalMarginInline:i}=t;return{[e]:Object.assign(Object.assign({},(0,d.Wf)(t)),{borderBlockStart:"".concat((0,l.bf)(a)," solid ").concat(r),"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:i,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:"".concat((0,l.bf)(a)," solid ").concat(r)},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:"".concat((0,l.bf)(t.marginLG)," 0")},["&-horizontal".concat(e,"-with-text")]:{display:"flex",alignItems:"center",margin:"".concat((0,l.bf)(t.dividerHorizontalWithTextGutterMargin)," 0"),color:t.colorTextHeading,fontWeight:500,fontSize:t.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:"0 ".concat(r),"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:"".concat((0,l.bf)(a)," solid transparent"),borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},["&-horizontal".concat(e,"-with-text-start")]:{"&::before":{width:"calc(".concat(c," * 100%)")},"&::after":{width:"calc(100% - ".concat(c," * 100%)")}},["&-horizontal".concat(e,"-with-text-end")]:{"&::before":{width:"calc(100% - ".concat(c," * 100%)")},"&::after":{width:"calc(".concat(c," * 100%)")}},["".concat(e,"-inner-text")]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:"".concat((0,l.bf)(a)," 0 0")},["&-horizontal".concat(e,"-with-text").concat(e,"-dashed")]:{"&::before, &::after":{borderStyle:"dashed none none"}},["&-vertical".concat(e,"-dashed")]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:"".concat((0,l.bf)(a)," 0 0")},["&-horizontal".concat(e,"-with-text").concat(e,"-dotted")]:{"&::before, &::after":{borderStyle:"dotted none none"}},["&-vertical".concat(e,"-dotted")]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},["&-plain".concat(e,"-with-text")]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize},["&-horizontal".concat(e,"-with-text-start").concat(e,"-no-default-orientation-margin-start")]:{"&::before":{width:0},"&::after":{width:"100%"},["".concat(e,"-inner-text")]:{paddingInlineStart:n}},["&-horizontal".concat(e,"-with-text-end").concat(e,"-no-default-orientation-margin-end")]:{"&::before":{width:"100%"},"&::after":{width:0},["".concat(e,"-inner-text")]:{paddingInlineEnd:n}}})}};var g=(0,s.I$)("Divider",t=>{let e=(0,f.IX)(t,{dividerHorizontalWithTextGutterMargin:t.margin,sizePaddingEdgeHorizontal:0});return[u(e),h(e)]},t=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:t.marginXS}),{unitless:{orientationMargin:!0}}),m=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(t);ae.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(n[r[a]]=t[r[a]]);return n};let b={small:"sm",middle:"md"};var p=t=>{let{getPrefixCls:e,direction:n,className:a,style:l}=(0,c.dj)("divider"),{prefixCls:d,type:s="horizontal",orientation:f="center",orientationMargin:h,className:u,rootClassName:p,children:v,dashed:w,variant:y="solid",plain:x,style:k,size:z}=t,S=m(t,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),Z=e("divider",d),[M,E,B]=g(Z),C=b[(0,i.Z)(z)],I=!!v,O=r.useMemo(()=>"left"===f?"rtl"===n?"end":"start":"right"===f?"rtl"===n?"start":"end":f,[n,f]),j="start"===O&&null!=h,L="end"===O&&null!=h,N=o()(Z,a,E,B,"".concat(Z,"-").concat(s),{["".concat(Z,"-with-text")]:I,["".concat(Z,"-with-text-").concat(O)]:I,["".concat(Z,"-dashed")]:!!w,["".concat(Z,"-").concat(y)]:"solid"!==y,["".concat(Z,"-plain")]:!!x,["".concat(Z,"-rtl")]:"rtl"===n,["".concat(Z,"-no-default-orientation-margin-start")]:j,["".concat(Z,"-no-default-orientation-margin-end")]:L,["".concat(Z,"-").concat(C)]:!!C},u,p),W=r.useMemo(()=>"number"==typeof h?h:/^\d+$/.test(h)?Number(h):h,[h]);return M(r.createElement("div",Object.assign({className:N,style:Object.assign(Object.assign({},l),k)},S,{role:"separator"}),v&&"vertical"!==s&&r.createElement("span",{className:"".concat(Z,"-inner-text"),style:{marginInlineStart:j?W:void 0,marginInlineEnd:L?W:void 0}},v)))}},79205:function(t,e,n){n.d(e,{Z:function(){return f}});var r=n(2265);let a=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,e,n)=>n?n.toUpperCase():e.toLowerCase()),c=t=>{let e=o(t);return e.charAt(0).toUpperCase()+e.slice(1)},i=function(){for(var t=arguments.length,e=Array(t),n=0;n!!t&&""!==t.trim()&&n.indexOf(t)===e).join(" ").trim()},l=t=>{for(let e in t)if(e.startsWith("aria-")||"role"===e||"title"===e)return!0};var d={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=(0,r.forwardRef)((t,e)=>{let{color:n="currentColor",size:a=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:s="",children:f,iconNode:h,...u}=t;return(0,r.createElement)("svg",{ref:e,...d,width:a,height:a,stroke:n,strokeWidth:c?24*Number(o)/Number(a):o,className:i("lucide",s),...!f&&!l(u)&&{"aria-hidden":"true"},...u},[...h.map(t=>{let[e,n]=t;return(0,r.createElement)(e,n)}),...Array.isArray(f)?f:[f]])}),f=(t,e)=>{let n=(0,r.forwardRef)((n,o)=>{let{className:l,...d}=n;return(0,r.createElement)(s,{ref:o,iconNode:e,className:i("lucide-".concat(a(c(t))),"lucide-".concat(t),l),...d})});return n.displayName=c(t),n}},82222:function(t,e,n){n.d(e,{Z:function(){return r}});let r=(0,n(79205).Z)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},51817:function(t,e,n){n.d(e,{Z:function(){return r}});let r=(0,n(79205).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},98728:function(t,e,n){n.d(e,{Z:function(){return r}});let r=(0,n(79205).Z)("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},79862:function(t,e,n){n.d(e,{Z:function(){return r}});let r=(0,n(79205).Z)("user-round",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]])},32489:function(t,e,n){n.d(e,{Z:function(){return r}});let r=(0,n(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},25523:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return r}});let r=n(47043)._(n(2265)).default.createContext(null)}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2652-55de14f9e14b1064.js b/litellm/proxy/_experimental/out/_next/static/chunks/2652-61deef051e2dc3b2.js
similarity index 100%
rename from litellm/proxy/_experimental/out/_next/static/chunks/2652-55de14f9e14b1064.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/2652-61deef051e2dc3b2.js
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2731-b2ffcaeb9eabaa23.js b/litellm/proxy/_experimental/out/_next/static/chunks/2731-b2ffcaeb9eabaa23.js
deleted file mode 100644
index 283a3debb99..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/2731-b2ffcaeb9eabaa23.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2731],{41649:function(e,r,t){t.d(r,{Z:function(){return f}});var n=t(5853),o=t(2265),a=t(47187),l=t(7084),i=t(26898),d=t(13241),u=t(1153);let s={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},c={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},m=(0,u.fn)("Badge"),f=o.forwardRef((e,r)=>{let{color:t,icon:f,size:p=l.u8.SM,tooltip:g,className:b,children:h}=e,k=(0,n._T)(e,["color","icon","size","tooltip","className","children"]),x=f||null,{tooltipProps:v,getReferenceProps:w}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,u.lq)([r,v.refs.setReference]),className:(0,d.q)(m("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",t?(0,d.q)((0,u.bM)(t,i.K.background).bgColor,(0,u.bM)(t,i.K.iconText).textColor,(0,u.bM)(t,i.K.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,d.q)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),s[p].paddingX,s[p].paddingY,s[p].fontSize,b)},w,k),o.createElement(a.Z,Object.assign({text:g},v)),x?o.createElement(x,{className:(0,d.q)(m("icon"),"shrink-0 -ml-1 mr-1.5",c[p].height,c[p].width)}):null,o.createElement("span",{className:(0,d.q)(m("text"),"whitespace-nowrap")},h))});f.displayName="Badge"},47323:function(e,r,t){t.d(r,{Z:function(){return g}});var n=t(5853),o=t(2265),a=t(47187),l=t(7084),i=t(13241),d=t(1153),u=t(26898);let s={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},c={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},f=(e,r)=>{switch(e){case"simple":return{textColor:r?(0,d.bM)(r,u.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:r?(0,d.bM)(r,u.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,i.q)((0,d.bM)(r,u.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:r?(0,d.bM)(r,u.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,i.q)((0,d.bM)(r,u.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:r?(0,d.bM)(r,u.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:r?(0,i.q)((0,d.bM)(r,u.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:r?(0,d.bM)(r,u.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,i.q)((0,d.bM)(r,u.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:r?(0,d.bM)(r,u.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:r?(0,i.q)((0,d.bM)(r,u.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},p=(0,d.fn)("Icon"),g=o.forwardRef((e,r)=>{let{icon:t,variant:u="simple",tooltip:g,size:b=l.u8.SM,color:h,className:k}=e,x=(0,n._T)(e,["icon","variant","tooltip","size","color","className"]),v=f(u,h),{tooltipProps:w,getReferenceProps:y}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,d.lq)([r,w.refs.setReference]),className:(0,i.q)(p("root"),"inline-flex shrink-0 items-center justify-center",v.bgColor,v.textColor,v.borderColor,v.ringColor,m[u].rounded,m[u].border,m[u].shadow,m[u].ring,s[b].paddingX,s[b].paddingY,k)},y,x),o.createElement(a.Z,Object.assign({text:g},w)),o.createElement(t,{className:(0,i.q)(p("icon"),"shrink-0",c[b].height,c[b].width)}))});g.displayName="Icon"},59341:function(e,r,t){t.d(r,{Z:function(){return R}});var n=t(5853),o=t(71049),a=t(11323),l=t(2265),i=t(66797),d=t(40099),u=t(74275),s=t(59456),c=t(93980),m=t(65573),f=t(67561),p=t(87550),g=t(628),b=t(80281),h=t(31370),k=t(20131),x=t(38929),v=t(52307),w=t(52724),y=t(7935);let C=(0,l.createContext)(null);C.displayName="GroupContext";let E=l.Fragment,N=Object.assign((0,x.yV)(function(e,r){var t;let n=(0,l.useId)(),E=(0,b.Q)(),N=(0,p.B)(),{id:T=E||"headlessui-switch-".concat(n),disabled:M=N||!1,checked:q,defaultChecked:S,onChange:L,name:j,value:R,form:Z,autoFocus:O=!1,...P}=e,z=(0,l.useContext)(C),[F,_]=(0,l.useState)(null),K=(0,l.useRef)(null),B=(0,f.T)(K,r,null===z?null:z.setSwitch,_),H=(0,u.L)(S),[A,I]=(0,d.q)(q,L,null!=H&&H),D=(0,s.G)(),[Y,X]=(0,l.useState)(!1),G=(0,c.z)(()=>{X(!0),null==I||I(!A),D.nextFrame(()=>{X(!1)})}),U=(0,c.z)(e=>{if((0,h.P)(e.currentTarget))return e.preventDefault();e.preventDefault(),G()}),W=(0,c.z)(e=>{e.key===w.R.Space?(e.preventDefault(),G()):e.key===w.R.Enter&&(0,k.g)(e.currentTarget)}),V=(0,c.z)(e=>e.preventDefault()),Q=(0,y.wp)(),$=(0,v.zH)(),{isFocusVisible:J,focusProps:ee}=(0,o.F)({autoFocus:O}),{isHovered:er,hoverProps:et}=(0,a.X)({isDisabled:M}),{pressed:en,pressProps:eo}=(0,i.x)({disabled:M}),ea=(0,l.useMemo)(()=>({checked:A,disabled:M,hover:er,focus:J,active:en,autofocus:O,changing:Y}),[A,er,J,en,M,Y,O]),el=(0,x.dG)({id:T,ref:B,role:"switch",type:(0,m.f)(e,F),tabIndex:-1===e.tabIndex?0:null!=(t=e.tabIndex)?t:0,"aria-checked":A,"aria-labelledby":Q,"aria-describedby":$,disabled:M||void 0,autoFocus:O,onClick:U,onKeyUp:W,onKeyPress:V},ee,et,eo),ei=(0,l.useCallback)(()=>{if(void 0!==H)return null==I?void 0:I(H)},[I,H]),ed=(0,x.L6)();return l.createElement(l.Fragment,null,null!=j&&l.createElement(g.Mt,{disabled:M,data:{[j]:R||"on"},overrides:{type:"checkbox",checked:A},form:Z,onReset:ei}),ed({ourProps:el,theirProps:P,slot:ea,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var r;let[t,n]=(0,l.useState)(null),[o,a]=(0,y.bE)(),[i,d]=(0,v.fw)(),u=(0,l.useMemo)(()=>({switch:t,setSwitch:n}),[t,n]),s=(0,x.L6)();return l.createElement(d,{name:"Switch.Description",value:i},l.createElement(a,{name:"Switch.Label",value:o,props:{htmlFor:null==(r=u.switch)?void 0:r.id,onClick(e){t&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},l.createElement(C.Provider,{value:u},s({ourProps:{},theirProps:e,slot:{},defaultTag:E,name:"Switch.Group"}))))},Label:y.__,Description:v.dk});var T=t(44140),M=t(26898),q=t(13241),S=t(1153),L=t(47187);let j=(0,S.fn)("Switch"),R=l.forwardRef((e,r)=>{let{checked:t,defaultChecked:o=!1,onChange:a,color:i,name:d,error:u,errorMessage:s,disabled:c,required:m,tooltip:f,id:p}=e,g=(0,n._T)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),b={bgColor:i?(0,S.bM)(i,M.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:i?(0,S.bM)(i,M.K.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[h,k]=(0,T.Z)(o,t),[x,v]=(0,l.useState)(!1),{tooltipProps:w,getReferenceProps:y}=(0,L.l)(300);return l.createElement("div",{className:"flex flex-row items-center justify-start"},l.createElement(L.Z,Object.assign({text:f},w)),l.createElement("div",Object.assign({ref:(0,S.lq)([r,w.refs.setReference]),className:(0,q.q)(j("root"),"flex flex-row relative h-5")},g,y),l.createElement("input",{type:"checkbox",className:(0,q.q)(j("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:d,required:m,checked:h,onChange:e=>{e.preventDefault()}}),l.createElement(N,{checked:h,onChange:e=>{k(e),null==a||a(e)},disabled:c,className:(0,q.q)(j("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",c?"cursor-not-allowed":""),onFocus:()=>v(!0),onBlur:()=>v(!1),id:p},l.createElement("span",{className:(0,q.q)(j("sr-only"),"sr-only")},"Switch ",h?"on":"off"),l.createElement("span",{"aria-hidden":"true",className:(0,q.q)(j("background"),h?b.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),l.createElement("span",{"aria-hidden":"true",className:(0,q.q)(j("round"),h?(0,q.q)(b.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",x?(0,q.q)("ring-2",b.ringColor):"")}))),u&&s?l.createElement("p",{className:(0,q.q)(j("errorMessage"),"text-sm text-red-500 mt-1 ")},s):null)});R.displayName="Switch"},21626:function(e,r,t){t.d(r,{Z:function(){return i}});var n=t(5853),o=t(2265),a=t(13241);let l=(0,t(1153).fn)("Table"),i=o.forwardRef((e,r)=>{let{children:t,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement("div",{className:(0,a.q)(l("root"),"overflow-auto",i)},o.createElement("table",Object.assign({ref:r,className:(0,a.q)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},d),t))});i.displayName="Table"},97214:function(e,r,t){t.d(r,{Z:function(){return i}});var n=t(5853),o=t(2265),a=t(13241);let l=(0,t(1153).fn)("TableBody"),i=o.forwardRef((e,r)=>{let{children:t,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tbody",Object.assign({ref:r,className:(0,a.q)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},d),t))});i.displayName="TableBody"},28241:function(e,r,t){t.d(r,{Z:function(){return i}});var n=t(5853),o=t(2265),a=t(13241);let l=(0,t(1153).fn)("TableCell"),i=o.forwardRef((e,r)=>{let{children:t,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("td",Object.assign({ref:r,className:(0,a.q)(l("root"),"align-middle whitespace-nowrap text-left p-4",i)},d),t))});i.displayName="TableCell"},58834:function(e,r,t){t.d(r,{Z:function(){return i}});var n=t(5853),o=t(2265),a=t(13241);let l=(0,t(1153).fn)("TableHead"),i=o.forwardRef((e,r)=>{let{children:t,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("thead",Object.assign({ref:r,className:(0,a.q)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},d),t))});i.displayName="TableHead"},69552:function(e,r,t){t.d(r,{Z:function(){return i}});var n=t(5853),o=t(2265),a=t(13241);let l=(0,t(1153).fn)("TableHeaderCell"),i=o.forwardRef((e,r)=>{let{children:t,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("th",Object.assign({ref:r,className:(0,a.q)(l("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},d),t))});i.displayName="TableHeaderCell"},71876:function(e,r,t){t.d(r,{Z:function(){return i}});var n=t(5853),o=t(2265),a=t(13241);let l=(0,t(1153).fn)("TableRow"),i=o.forwardRef((e,r)=>{let{children:t,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tr",Object.assign({ref:r,className:(0,a.q)(l("row"),i)},d),t))});i.displayName="TableRow"},84264:function(e,r,t){t.d(r,{Z:function(){return i}});var n=t(26898),o=t(13241),a=t(1153),l=t(2265);let i=l.forwardRef((e,r)=>{let{color:t,className:i,children:d}=e;return l.createElement("p",{ref:r,className:(0,o.q)("text-tremor-default",t?(0,a.bM)(t,n.K.text).textColor:(0,o.q)("text-tremor-content","dark:text-dark-tremor-content"),i)},d)});i.displayName="Text"},44140:function(e,r,t){t.d(r,{Z:function(){return o}});var n=t(2265);let o=(e,r)=>{let t=void 0!==r,[o,a]=(0,n.useState)(e);return[t?r:o,e=>{t||a(e)}]}},79205:function(e,r,t){t.d(r,{Z:function(){return c}});var n=t(2265);let o=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase()),l=e=>{let r=a(e);return r.charAt(0).toUpperCase()+r.slice(1)},i=function(){for(var e=arguments.length,r=Array(e),t=0;t!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim()},d=e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0};var u={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=(0,n.forwardRef)((e,r)=>{let{color:t="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:s="",children:c,iconNode:m,...f}=e;return(0,n.createElement)("svg",{ref:r,...u,width:o,height:o,stroke:t,strokeWidth:l?24*Number(a)/Number(o):a,className:i("lucide",s),...!c&&!d(f)&&{"aria-hidden":"true"},...f},[...m.map(e=>{let[r,t]=e;return(0,n.createElement)(r,t)}),...Array.isArray(c)?c:[c]])}),c=(e,r)=>{let t=(0,n.forwardRef)((t,a)=>{let{className:d,...u}=t;return(0,n.createElement)(s,{ref:a,iconNode:r,className:i("lucide-".concat(o(l(e))),"lucide-".concat(e),d),...u})});return t.displayName=l(e),t}},15051:function(e,r,t){t.d(r,{Z:function(){return n}});let n=(0,t(79205).Z)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},76858:function(e,r,t){t.d(r,{Z:function(){return n}});let n=(0,t(79205).Z)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},49322:function(e,r,t){t.d(r,{Z:function(){return n}});let n=(0,t(79205).Z)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},99397:function(e,r,t){t.d(r,{Z:function(){return n}});let n=(0,t(79205).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},32489:function(e,r,t){t.d(r,{Z:function(){return n}});let n=(0,t(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},44643:function(e,r,t){var n=t(2265);let o=n.forwardRef(function(e,r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))});r.Z=o},91126:function(e,r,t){var n=t(2265);let o=n.forwardRef(function(e,r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});r.Z=o},74998:function(e,r,t){var n=t(2265);let o=n.forwardRef(function(e,r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});r.Z=o},52307:function(e,r,t){t.d(r,{dk:function(){return m},fw:function(){return c},zH:function(){return s}});var n=t(2265),o=t(93980),a=t(73389),l=t(67561),i=t(87550),d=t(38929);let u=(0,n.createContext)(null);function s(){var e,r;return null!=(r=null==(e=(0,n.useContext)(u))?void 0:e.value)?r:void 0}function c(){let[e,r]=(0,n.useState)([]);return[e.length>0?e.join(" "):void 0,(0,n.useMemo)(()=>function(e){let t=(0,o.z)(e=>(r(r=>[...r,e]),()=>r(r=>{let t=r.slice(),n=t.indexOf(e);return -1!==n&&t.splice(n,1),t}))),a=(0,n.useMemo)(()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value}),[t,e.slot,e.name,e.props,e.value]);return n.createElement(u.Provider,{value:a},e.children)},[r])]}u.displayName="DescriptionContext";let m=Object.assign((0,d.yV)(function(e,r){let t=(0,n.useId)(),o=(0,i.B)(),{id:s="headlessui-description-".concat(t),...c}=e,m=function e(){let r=(0,n.useContext)(u);if(null===r){let r=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,e),r}return r}(),f=(0,l.T)(r);(0,a.e)(()=>m.register(s),[s,m.register]);let p=o||!1,g=(0,n.useMemo)(()=>({...m.slot,disabled:p}),[m.slot,p]),b={ref:f,...m.props,id:s};return(0,d.L6)()({ourProps:b,theirProps:c,slot:g,defaultTag:"p",name:m.name||"Description"})}),{})},7935:function(e,r,t){t.d(r,{__:function(){return f},bE:function(){return m},wp:function(){return c}});var n=t(2265),o=t(93980),a=t(73389),l=t(67561),i=t(87550),d=t(80281),u=t(38929);let s=(0,n.createContext)(null);function c(e){var r,t,o;let a=null!=(t=null==(r=(0,n.useContext)(s))?void 0:r.value)?t:void 0;return(null!=(o=null==e?void 0:e.length)?o:0)>0?[a,...e].filter(Boolean).join(" "):a}function m(){let{inherit:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=c(),[t,a]=(0,n.useState)([]),l=e?[r,...t].filter(Boolean):t;return[l.length>0?l.join(" "):void 0,(0,n.useMemo)(()=>function(e){let r=(0,o.z)(e=>(a(r=>[...r,e]),()=>a(r=>{let t=r.slice(),n=t.indexOf(e);return -1!==n&&t.splice(n,1),t}))),t=(0,n.useMemo)(()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value}),[r,e.slot,e.name,e.props,e.value]);return n.createElement(s.Provider,{value:t},e.children)},[a])]}s.displayName="LabelContext";let f=Object.assign((0,u.yV)(function(e,r){var t;let c=(0,n.useId)(),m=function e(){let r=(0,n.useContext)(s);if(null===r){let r=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,e),r}return r}(),f=(0,d.Q)(),p=(0,i.B)(),{id:g="headlessui-label-".concat(c),htmlFor:b=null!=f?f:null==(t=m.props)?void 0:t.htmlFor,passive:h=!1,...k}=e,x=(0,l.T)(r);(0,a.e)(()=>m.register(g),[g,m.register]);let v=(0,o.z)(e=>{let r=e.currentTarget;if(r instanceof HTMLLabelElement&&e.preventDefault(),m.props&&"onClick"in m.props&&"function"==typeof m.props.onClick&&m.props.onClick(e),r instanceof HTMLLabelElement){let e=document.getElementById(r.htmlFor);if(e){let r=e.getAttribute("disabled");if("true"===r||""===r)return;let t=e.getAttribute("aria-disabled");if("true"===t||""===t)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}}),w=p||!1,y=(0,n.useMemo)(()=>({...m.slot,disabled:w}),[m.slot,w]),C={ref:x,...m.props,id:g,htmlFor:b,onClick:v};return h&&("onClick"in C&&(delete C.htmlFor,delete C.onClick),"onClick"in k&&delete k.onClick),(0,u.L6)()({ourProps:C,theirProps:k,slot:y,defaultTag:b?"label":"div",name:m.name||"Label"})}),{})},40099:function(e,r,t){t.d(r,{q:function(){return a}});var n=t(2265),o=t(93980);function a(e,r,t){let[a,l]=(0,n.useState)(t),i=void 0!==e,d=(0,n.useRef)(i),u=(0,n.useRef)(!1),s=(0,n.useRef)(!1);return!i||d.current||u.current?i||!d.current||s.current||(s.current=!0,d.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(u.current=!0,d.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[i?e:a,(0,o.z)(e=>(i||l(e),null==r?void 0:r(e)))]}},74275:function(e,r,t){t.d(r,{L:function(){return o}});var n=t(2265);function o(e){let[r]=(0,n.useState)(e);return r}},87550:function(e,r,t){t.d(r,{B:function(){return a}});var n=t(2265);let o=(0,n.createContext)(void 0);function a(){return(0,n.useContext)(o)}},628:function(e,r,t){t.d(r,{Mt:function(){return c}});var n=t(2265),o=t(54887),a=t(59456),l=t(20131),i=t(38929),d=t(65639);let u=(0,n.createContext)(null);function s(e){let{children:r}=e,t=(0,n.useContext)(u);if(!t)return n.createElement(n.Fragment,null,r);let{target:a}=t;return a?(0,o.createPortal)(n.createElement(n.Fragment,null,r),a):null}function c(e){let{data:r,form:t,disabled:o,onReset:u,overrides:c}=e,[f,p]=(0,n.useState)(null),g=(0,a.G)();return(0,n.useEffect)(()=>{if(u&&f)return g.addEventListener(f,"reset",u)},[f,t,u]),n.createElement(s,null,n.createElement(m,{setForm:p,formId:t}),(0,l.t)(r).map(e=>{let[r,a]=e;return n.createElement(d._,{features:d.x.Hidden,...(0,i.oA)({key:r,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:o,name:r,value:a,...c})})}))}function m(e){let{setForm:r,formId:t}=e;return(0,n.useEffect)(()=>{if(t){let e=document.getElementById(t);e&&r(e)}},[r,t]),t?null:n.createElement(d._,{features:d.x.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let t=e.closest("form");t&&r(t)}})}},80281:function(e,r,t){t.d(r,{Q:function(){return a}});var n=t(2265);let o=(0,n.createContext)(void 0);function a(){return(0,n.useContext)(o)}},31370:function(e,r,t){function n(e){let r=e.parentElement,t=null;for(;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(t=r),r=r.parentElement;let n=(null==r?void 0:r.getAttribute("disabled"))==="";return!(n&&function(e){if(!e)return!1;let r=e.previousElementSibling;for(;null!==r;){if(r instanceof HTMLLegendElement)return!1;r=r.previousElementSibling}return!0}(t))&&n}t.d(r,{P:function(){return n}})},20131:function(e,r,t){function n(e,r){return e?e+"["+r+"]":r}function o(e){var r,t;let n=null!=(r=null==e?void 0:e.form)?r:e.closest("form");if(n){for(let r of n.elements)if(r!==e&&("INPUT"===r.tagName&&"submit"===r.type||"BUTTON"===r.tagName&&"submit"===r.type||"INPUT"===r.nodeName&&"image"===r.type)){r.click();return}null==(t=n.requestSubmit)||t.call(n)}}t.d(r,{g:function(){return o},t:function(){return function e(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(let[a,l]of Object.entries(r))!function r(t,o,a){if(Array.isArray(a))for(let[e,l]of a.entries())r(t,n(o,e.toString()),l);else a instanceof Date?t.push([o,a.toISOString()]):"boolean"==typeof a?t.push([o,a?"1":"0"]):"string"==typeof a?t.push([o,a]):"number"==typeof a?t.push([o,"".concat(a)]):null==a?t.push([o,""]):e(a,o,t)}(o,n(t,a),l);return o}}})}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/292-7bd148a17bc0a05b.js b/litellm/proxy/_experimental/out/_next/static/chunks/292-7bd148a17bc0a05b.js
deleted file mode 100644
index dc6935ad8a4..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/292-7bd148a17bc0a05b.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[292],{57589:function(e,s,t){t.d(s,{Z:function(){return j}});var a=t(57437),r=t(39760),l=t(44633),n=t(86462),i=t(40278),c=t(78489),o=t(99981),d=t(10968),u=t(2265),m=t(59872);let x=e=>{let{key:s,info:t}=e;return{token:s,...t}};var h=t(19250),p=t(50665),g=t(12322),j=e=>{let{topKeys:s,teams:t,showTags:j=!1,topKeysLimit:f,setTopKeysLimit:_}=e,{accessToken:y,userRole:v,userId:k,premiumUser:b}=(0,r.Z)(),[Z,N]=(0,u.useState)(!1),[w,q]=(0,u.useState)(null),[S,C]=(0,u.useState)(void 0),[T,D]=(0,u.useState)("table"),[L,E]=(0,u.useState)(new Set),A=e=>{E(s=>{let t=new Set(s);return t.has(e)?t.delete(e):t.add(e),t})},F=async e=>{if(y)try{let s=await (0,h.keyInfoV1Call)(y,e.api_key),t=x(s);C(t),q(e.api_key),N(!0)}catch(e){console.error("Error fetching key info:",e)}},O=()=>{N(!1),q(null),C(void 0)};u.useEffect(()=>{let e=e=>{"Escape"===e.key&&Z&&O()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[Z]);let M=[{header:"Key ID",accessorKey:"api_key",cell:e=>(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(o.Z,{title:e.getValue(),children:(0,a.jsx)(c.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>F(e.row.original),children:e.getValue()?"".concat(e.getValue().slice(0,7),"..."):"-"})})})},{header:"Key Alias",accessorKey:"key_alias",cell:e=>e.getValue()||"-"}],U={header:"Spend (USD)",accessorKey:"spend",cell:e=>{let s=e.getValue();return s>0&&s<.01?"<$0.01":"$".concat((0,m.pw)(s,2))}},V=j?[...M,{header:"Tags",accessorKey:"tags",cell:e=>{let s=e.getValue(),t=e.row.original.api_key,r=L.has(t);if(!s||0===s.length)return"-";let i=s.sort((e,s)=>s.usage-e.usage),c=r?i:i.slice(0,2),d=s.length>2;return(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[c.map((e,s)=>(0,a.jsx)(o.Z,{title:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Tag Name:"})," ",e.tag]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Spend:"})," ",e.usage>0&&e.usage<.01?"<$0.01":"$".concat((0,m.pw)(e.usage,2))]})]}),children:(0,a.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[e.tag.slice(0,7),"..."]})},s)),d&&(0,a.jsx)("button",{onClick:()=>A(t),className:"ml-1 p-1 hover:bg-gray-200 rounded-full transition-colors",title:r?"Show fewer tags":"Show all tags",children:r?(0,a.jsx)(l.Z,{className:"h-3 w-3 text-gray-500"}):(0,a.jsx)(n.Z,{className:"h-3 w-3 text-gray-500"})})]})})}},U]:[...M,U],R=s.map(e=>({...e,display_key_alias:e.key_alias&&e.key_alias.length>10?"".concat(e.key_alias.slice(0,10),"..."):e.key_alias||"-"}));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,a.jsx)(d.Z,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:f,onChange:e=>_(e)}),(0,a.jsxs)("div",{className:"flex space-x-2",children:[(0,a.jsx)("button",{onClick:()=>D("table"),className:"px-3 py-1 text-sm rounded-md ".concat("table"===T?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Table View"}),(0,a.jsx)("button",{onClick:()=>D("chart"),className:"px-3 py-1 text-sm rounded-md ".concat("chart"===T?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Chart View"})]})]}),"chart"===T?(0,a.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,a.jsx)(i.Z,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(R.length,f)},data:R,index:"display_key_alias",categories:["spend"],colors:["cyan"],yAxisWidth:120,tickGap:5,layout:"vertical",showLegend:!1,valueFormatter:e=>"$".concat((0,m.pw)(e,2)),onValueChange:e=>F(e),showTooltip:!0,customTooltip:e=>{var s,t;let r=null===(t=e.payload)||void 0===t?void 0:null===(s=t[0])||void 0===s?void 0:s.payload;return(0,a.jsx)("div",{className:"relative z-50 p-3 bg-black/90 shadow-lg rounded-lg text-white max-w-xs",children:(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Key Alias: "}),(0,a.jsx)("span",{className:"font-mono text-gray-100 break-all",children:null==r?void 0:r.key_alias})]}),(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Key ID: "}),(0,a.jsx)("span",{className:"font-mono text-gray-100 break-all",children:null==r?void 0:r.api_key})]}),(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Spend: "}),(0,a.jsxs)("span",{className:"text-white font-medium",children:["$",(0,m.pw)(null==r?void 0:r.spend,2)]})]})]})})}})}):(0,a.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,a.jsx)(g.w,{columns:V,data:s,renderSubComponent:()=>(0,a.jsx)(a.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})}),Z&&w&&S&&(console.log("Rendering modal with:",{isModalOpen:Z,selectedKey:w,keyData:S}),(0,a.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",onClick:e=>{e.target===e.currentTarget&&O()},children:(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow-xl relative w-11/12 max-w-6xl max-h-[90vh] overflow-y-auto min-h-[750px]",children:[(0,a.jsx)("button",{onClick:O,className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700 focus:outline-none","aria-label":"Close",children:(0,a.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),(0,a.jsx)("div",{className:"p-6 h-full",children:(0,a.jsx)(p.Z,{keyId:w,onClose:O,keyData:S,teams:t})})]})}))]})}},90292:function(e,s,t){t.d(s,{Z:function(){return e9}});var a=t(57437),r=t(40278),l=t(12514),n=t(49804),i=t(14042),c=t(67101),o=t(12485),d=t(18135),u=t(35242),m=t(29706),x=t(77991),h=t(21626),p=t(97214),g=t(28241),j=t(58834),f=t(69552),_=t(71876),y=t(84264),v=t(96761),k=t(10968),b=t(51653),Z=t(2265),N=t(19250),w=t(11713),q=t(90246),S=t(20347),C=t(39760);let T=(0,q.n)("agents"),D=()=>{let{accessToken:e,userRole:s}=(0,C.Z)();return(0,w.a)({queryKey:T.list({}),queryFn:async()=>await (0,N.getAgentsList)(e),enabled:!!e&&S.ZL.includes(s||"")})},L=(0,q.n)("customers"),E=()=>{let{accessToken:e,userRole:s}=(0,C.Z)();return(0,w.a)({queryKey:L.list({}),queryFn:async()=>await (0,N.allEndUsersCall)(e),enabled:!!e&&S.ZL.includes(s)})};var A=t(76134),F=t(59872),O=t(16312),M=t(29299),U=t(75105),V=t(44851);let R={blue:"#3b82f6",cyan:"#06b6d4",indigo:"#6366f1",green:"#22c55e",red:"#ef4444",purple:"#8b5cf6",emerald:"#37bc7d"},z=e=>{let{active:s,payload:t,label:r}=e;if(s&&t&&t.length){let e=e=>e.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),s=(e,s)=>{let t=s.substring(s.indexOf(".")+1);if(e.metrics&&t in e.metrics)return e.metrics[t]};return(0,a.jsxs)("div",{className:"w-56 rounded-tremor-default border border-tremor-border bg-tremor-background p-2 text-tremor-default shadow-tremor-dropdown",children:[(0,a.jsx)("p",{className:"text-tremor-content-strong",children:r}),t.map(t=>{var r;let l=null===(r=t.dataKey)||void 0===r?void 0:r.toString();if(!l||!t.payload)return null;let n=s(t.payload,l),i=l.includes("spend"),c=void 0!==n?i?"$".concat(n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})):n.toLocaleString():"N/A",o=R[t.color]||t.color;return(0,a.jsxs)("div",{className:"flex items-center justify-between space-x-4",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-2 ring-white drop-shadow-md",style:{backgroundColor:o}}),(0,a.jsx)("p",{className:"font-medium text-tremor-content dark:text-dark-tremor-content",children:e(l)})]}),(0,a.jsx)("p",{className:"font-medium text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",children:c})]},l)})]})}return null},I=e=>{let{categories:s,colors:t}=e,r=e=>e.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return(0,a.jsx)("div",{className:"flex items-center justify-end space-x-4",children:s.map((e,s)=>{let l=R[t[s]]||t[s];return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-4 ring-white",style:{backgroundColor:l}}),(0,a.jsx)("p",{className:"text-sm text-tremor-content dark:text-dark-tremor-content",children:r(e)})]},e)})})};function Y(e){return e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?e/1e3+"k":e.toString()}function K(e){return 0===e?"$0":e>=1e6?"$"+e/1e6+"M":e>=1e3?"$"+e/1e3+"k":"$"+e}let $=e=>{var s,t;let{modelName:n,metrics:i,hidePromptCachingMetrics:o=!1}=e;return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)(c.Z,{numItems:4,className:"gap-4",children:[(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Requests"}),(0,a.jsx)(v.Z,{children:i.total_requests.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Successful Requests"}),(0,a.jsx)(v.Z,{children:i.total_successful_requests.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Tokens"}),(0,a.jsx)(v.Z,{children:i.total_tokens.toLocaleString()}),(0,a.jsxs)(y.Z,{children:[Math.round(i.total_tokens/i.total_successful_requests)," avg per successful request"]})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Spend"}),(0,a.jsxs)(v.Z,{children:["$",(0,F.pw)(i.total_spend,2)]}),(0,a.jsxs)(y.Z,{children:["$",(0,F.pw)(i.total_spend/i.total_successful_requests,3)," per successful request"]})]})]}),i.top_api_keys&&i.top_api_keys.length>0&&(0,a.jsxs)(l.Z,{className:"mt-4",children:[(0,a.jsx)(v.Z,{children:"Top Virtual Keys by Spend"}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)("div",{className:"grid grid-cols-1 gap-2",children:i.top_api_keys.map((e,s)=>(0,a.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"font-medium",children:e.key_alias||"".concat(e.api_key.substring(0,10),"...")}),e.team_id&&(0,a.jsxs)(y.Z,{className:"text-xs text-gray-500",children:["Team: ",e.team_id]})]}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsxs)(y.Z,{className:"font-medium",children:["$",(0,F.pw)(e.spend,2)]}),(0,a.jsxs)(y.Z,{className:"text-xs text-gray-500",children:[e.requests.toLocaleString()," requests | ",e.tokens.toLocaleString()," tokens"]})]})]},e.api_key))})})]}),(0,a.jsxs)(c.Z,{numItems:2,className:"gap-4",children:[(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Total Tokens"}),(0,a.jsx)(I,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,a.jsx)(U.Z,{className:"mt-4",data:i.daily_data,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:Y,customTooltip:z,showLegend:!1})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Requests per day"}),(0,a.jsx)(I,{categories:["metrics.api_requests"],colors:["blue"]})]}),(0,a.jsx)(r.Z,{className:"mt-4",data:i.daily_data,index:"date",categories:["metrics.api_requests"],colors:["blue"],valueFormatter:Y,customTooltip:z,showLegend:!1})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Spend per day"}),(0,a.jsx)(I,{categories:["metrics.spend"],colors:["green"]})]}),(0,a.jsx)(r.Z,{className:"mt-4",data:i.daily_data,index:"date",categories:["metrics.spend"],colors:["green"],valueFormatter:e=>"$".concat((0,F.pw)(e,2,!0)),yAxisWidth:72})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Success vs Failed Requests"}),(0,a.jsx)(I,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,a.jsx)(U.Z,{className:"mt-4",data:i.daily_data,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:Y,stack:!0,customTooltip:z,showLegend:!1})]}),!o&&(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Prompt Caching Metrics"}),(0,a.jsx)(I,{categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"]})]}),(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsxs)(y.Z,{children:["Cache Read: ",(null===(s=i.total_cache_read_input_tokens)||void 0===s?void 0:s.toLocaleString())||0," tokens"]}),(0,a.jsxs)(y.Z,{children:["Cache Creation: ",(null===(t=i.total_cache_creation_input_tokens)||void 0===t?void 0:t.toLocaleString())||0," tokens"]})]}),(0,a.jsx)(U.Z,{className:"mt-4",data:i.daily_data,index:"date",categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"],valueFormatter:Y,customTooltip:z,showLegend:!1})]})]})]})},P=e=>{let{modelMetrics:s,hidePromptCachingMetrics:t=!1}=e,r=Object.keys(s).sort((e,t)=>""===e?1:""===t?-1:s[t].total_spend-s[e].total_spend),n={total_requests:0,total_successful_requests:0,total_tokens:0,total_spend:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,daily_data:{}};Object.values(s).forEach(e=>{n.total_requests+=e.total_requests,n.total_successful_requests+=e.total_successful_requests,n.total_tokens+=e.total_tokens,n.total_spend+=e.total_spend,n.total_cache_read_input_tokens+=e.total_cache_read_input_tokens||0,n.total_cache_creation_input_tokens+=e.total_cache_creation_input_tokens||0,e.daily_data.forEach(e=>{n.daily_data[e.date]||(n.daily_data[e.date]={prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,spend:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0}),n.daily_data[e.date].prompt_tokens+=e.metrics.prompt_tokens,n.daily_data[e.date].completion_tokens+=e.metrics.completion_tokens,n.daily_data[e.date].total_tokens+=e.metrics.total_tokens,n.daily_data[e.date].api_requests+=e.metrics.api_requests,n.daily_data[e.date].spend+=e.metrics.spend,n.daily_data[e.date].successful_requests+=e.metrics.successful_requests,n.daily_data[e.date].failed_requests+=e.metrics.failed_requests,n.daily_data[e.date].cache_read_input_tokens+=e.metrics.cache_read_input_tokens||0,n.daily_data[e.date].cache_creation_input_tokens+=e.metrics.cache_creation_input_tokens||0})});let i=Object.entries(n.daily_data).map(e=>{let[s,t]=e;return{date:s,metrics:t}}).sort((e,s)=>new Date(e.date).getTime()-new Date(s.date).getTime());return(0,a.jsxs)("div",{className:"space-y-8",children:[(0,a.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,a.jsx)(v.Z,{children:"Overall Usage"}),(0,a.jsxs)(c.Z,{numItems:4,className:"gap-4 mb-4",children:[(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Requests"}),(0,a.jsx)(v.Z,{children:n.total_requests.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Successful Requests"}),(0,a.jsx)(v.Z,{children:n.total_successful_requests.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Tokens"}),(0,a.jsx)(v.Z,{children:n.total_tokens.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Spend"}),(0,a.jsxs)(v.Z,{children:["$",(0,F.pw)(n.total_spend,2)]})]})]}),(0,a.jsxs)(c.Z,{numItems:2,className:"gap-4",children:[(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Total Tokens Over Time"}),(0,a.jsx)(I,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,a.jsx)(U.Z,{className:"mt-4",data:i,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:Y,customTooltip:z,showLegend:!1})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Total Requests Over Time"}),(0,a.jsx)(I,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"]})]}),(0,a.jsx)(U.Z,{className:"mt-4",data:i,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:z,showLegend:!1})]})]})]}),(0,a.jsx)(V.default,{defaultActiveKey:r[0],children:r.map(e=>(0,a.jsx)(V.default.Panel,{header:(0,a.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,a.jsx)(v.Z,{children:s[e].label||"Unknown Item"}),(0,a.jsxs)("div",{className:"flex space-x-4 text-sm text-gray-500",children:[(0,a.jsxs)("span",{children:["$",(0,F.pw)(s[e].total_spend,2)]}),(0,a.jsxs)("span",{children:[s[e].total_requests.toLocaleString()," requests"]})]})]}),children:(0,a.jsx)($,{modelName:e||"Unknown Model",metrics:s[e],hidePromptCachingMetrics:t})},e))})]})},W=(e,s,t)=>{let a=e.metadata.key_alias||"key-hash-".concat(s),r=e.metadata.team_id;if(r){let e=(0,M.o)(r,t);return e?"".concat(a," (team: ").concat(e,")"):"".concat(a," (team_id: ").concat(r,")")}return a},B=function(e,s){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a={};return e.results.forEach(e=>{Object.entries(e.breakdown[s]||{}).forEach(r=>{let[l,n]=r;a[l]||(a[l]={label:"api_keys"===s?W(n,l,t):l,total_requests:0,total_successful_requests:0,total_failed_requests:0,total_tokens:0,prompt_tokens:0,completion_tokens:0,total_spend:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,top_api_keys:[],daily_data:[]}),a[l].total_requests+=n.metrics.api_requests,a[l].prompt_tokens+=n.metrics.prompt_tokens,a[l].completion_tokens+=n.metrics.completion_tokens,a[l].total_tokens+=n.metrics.total_tokens,a[l].total_spend+=n.metrics.spend,a[l].total_successful_requests+=n.metrics.successful_requests,a[l].total_failed_requests+=n.metrics.failed_requests,a[l].total_cache_read_input_tokens+=n.metrics.cache_read_input_tokens||0,a[l].total_cache_creation_input_tokens+=n.metrics.cache_creation_input_tokens||0,a[l].daily_data.push({date:e.date,metrics:{prompt_tokens:n.metrics.prompt_tokens,completion_tokens:n.metrics.completion_tokens,total_tokens:n.metrics.total_tokens,api_requests:n.metrics.api_requests,spend:n.metrics.spend,successful_requests:n.metrics.successful_requests,failed_requests:n.metrics.failed_requests,cache_read_input_tokens:n.metrics.cache_read_input_tokens||0,cache_creation_input_tokens:n.metrics.cache_creation_input_tokens||0}})})}),"api_keys"!==s&&Object.entries(a).forEach(t=>{let[r,l]=t,n={};e.results.forEach(e=>{var t;let a=null===(t=e.breakdown[s])||void 0===t?void 0:t[r];a&&"api_key_breakdown"in a&&Object.entries(a.api_key_breakdown||{}).forEach(e=>{let[s,t]=e;n[s]||(n[s]={api_key:s,key_alias:t.metadata.key_alias,team_id:t.metadata.team_id,spend:0,requests:0,tokens:0}),n[s].spend+=t.metrics.spend,n[s].requests+=t.metrics.api_requests,n[s].tokens+=t.metrics.total_tokens})}),a[r].top_api_keys=Object.values(n).sort((e,s)=>s.spend-e.spend).slice(0,5)}),Object.values(a).forEach(e=>{e.daily_data.sort((e,s)=>new Date(e.date).getTime()-new Date(s.date).getTime())}),a};var H=t(78489),G=t(94789),J=t(49566),Q=t(10032),X=t(22116),ee=t(37592),es=t(10353),et=t(9114),ea=e=>{let{isOpen:s,onClose:t,accessToken:r}=e,[l]=Q.Z.useForm(),[n,i]=(0,Z.useState)(!1),[c,o]=(0,Z.useState)(null),[d,u]=(0,Z.useState)(!1),[m,x]=(0,Z.useState)("cloudzero"),[h,p]=(0,Z.useState)(!1);(0,Z.useEffect)(()=>{s&&r&&g()},[s,r]);let g=async()=>{u(!0);try{let e=await fetch("/cloudzero/settings",{method:"GET",headers:{[(0,N.getGlobalLitellmHeaderName)()]:"Bearer ".concat(r),"Content-Type":"application/json"}});if(e.ok){let s=await e.json();o(s),l.setFieldsValue({connection_id:s.connection_id})}else if(404!==e.status){let s=await e.json();et.Z.fromBackend("Failed to load existing settings: ".concat(s.error||"Unknown error"))}}catch(e){console.error("Error loading CloudZero settings:",e),et.Z.fromBackend("Failed to load existing settings")}finally{u(!1)}},j=async e=>{if(!r){et.Z.fromBackend("No access token available");return}i(!0);try{let s={...e,timezone:"UTC"},t=await fetch(c?"/cloudzero/settings":"/cloudzero/init",{method:c?"PUT":"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:"Bearer ".concat(r),"Content-Type":"application/json"},body:JSON.stringify(s)}),a=await t.json();if(t.ok)return et.Z.success(a.message||"CloudZero settings saved successfully"),o({api_key_masked:e.api_key.substring(0,4)+"****"+e.api_key.slice(-4),connection_id:e.connection_id,status:"configured"}),!0;return et.Z.fromBackend(a.error||"Failed to save CloudZero settings"),!1}catch(e){return console.error("Error saving CloudZero settings:",e),et.Z.fromBackend("Failed to save CloudZero settings"),!1}finally{i(!1)}},f=async()=>{if(!r){et.Z.fromBackend("No access token available");return}p(!0);try{let e=await fetch("/cloudzero/export",{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:"Bearer ".concat(r),"Content-Type":"application/json"},body:JSON.stringify({limit:1e5,operation:"replace_hourly"})}),s=await e.json();e.ok?(et.Z.success(s.message||"Export to CloudZero completed successfully"),t()):et.Z.fromBackend(s.error||"Failed to export to CloudZero")}catch(e){console.error("Error exporting to CloudZero:",e),et.Z.fromBackend("Failed to export to CloudZero")}finally{p(!1)}},_=async()=>{p(!0);try{et.Z.info("CSV export functionality coming soon!"),t()}catch(e){console.error("Error exporting CSV:",e),et.Z.fromBackend("Failed to export CSV")}finally{p(!1)}},v=async()=>{if("cloudzero"===m){if(!c){let e=await l.validateFields();if(!await j(e))return}await f()}else await _()},k=()=>{l.resetFields(),x("cloudzero"),o(null),t()},b=[{value:"cloudzero",label:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:"/cloudzero.png",alt:"CloudZero",className:"w-5 h-5",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{children:"Export to CloudZero"})]})},{value:"csv",label:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),(0,a.jsx)("span",{children:"Export to CSV"})]})}];return(0,a.jsx)(X.Z,{title:"Export Data",open:s,onCancel:k,footer:null,width:600,destroyOnClose:!0,children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"font-medium mb-2 block",children:"Export Destination"}),(0,a.jsx)(ee.default,{value:m,onChange:x,options:b,className:"w-full",size:"large"})]}),"cloudzero"===m&&(0,a.jsx)("div",{children:d?(0,a.jsx)("div",{className:"flex justify-center py-8",children:(0,a.jsx)(es.Z,{size:"large"})}):(0,a.jsxs)(a.Fragment,{children:[c&&(0,a.jsx)(G.Z,{title:"Existing CloudZero Configuration",icon:()=>(0,a.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),color:"green",className:"mb-4",children:(0,a.jsxs)(y.Z,{children:["API Key: ",c.api_key_masked,(0,a.jsx)("br",{}),"Connection ID: ",c.connection_id]})}),!c&&(0,a.jsxs)(Q.Z,{form:l,layout:"vertical",children:[(0,a.jsx)(Q.Z.Item,{label:"CloudZero API Key",name:"api_key",rules:[{required:!0,message:"Please enter your CloudZero API key"}],children:(0,a.jsx)(J.Z,{type:"password",placeholder:"Enter your CloudZero API key"})}),(0,a.jsx)(Q.Z.Item,{label:"Connection ID",name:"connection_id",rules:[{required:!0,message:"Please enter the CloudZero connection ID"}],children:(0,a.jsx)(J.Z,{placeholder:"Enter CloudZero connection ID"})})]})]})}),"csv"===m&&(0,a.jsx)(G.Z,{title:"CSV Export",icon:()=>(0,a.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),color:"blue",children:(0,a.jsx)(y.Z,{children:"Export your usage data as a CSV file for analysis in spreadsheet applications."})}),(0,a.jsxs)("div",{className:"flex justify-end space-x-2 pt-4",children:[(0,a.jsx)(H.Z,{variant:"secondary",onClick:k,children:"Cancel"}),(0,a.jsx)(H.Z,{onClick:v,loading:n||h,disabled:n||h,children:"cloudzero"===m?"Export to CloudZero":"Export CSV"})]})]})})},er=t(47359),el=t(50337),en=t(5545),ei=e=>{let{value:s,onChange:t}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Format"}),(0,a.jsx)(ee.default,{value:s,onChange:t,className:"w-full",options:[{value:"csv",label:"CSV (Excel, Google Sheets)"},{value:"json",label:"JSON (includes metadata)"}]})]})},ec=e=>{var s,t;let{dateRange:r,selectedFilters:l}=e;return(0,a.jsxs)("div",{className:"text-sm text-gray-500",children:[null===(s=r.from)||void 0===s?void 0:s.toLocaleDateString()," - ",null===(t=r.to)||void 0===t?void 0:t.toLocaleDateString(),l.length>0&&" \xb7 ".concat(l.length," filter").concat(l.length>1?"s":"")]})},eo=t(29967),ed=e=>{let{value:s,onChange:t,entityType:r}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Export type"}),(0,a.jsx)(eo.ZP.Group,{value:s,onChange:e=>t(e.target.value),className:"w-full",children:(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,a.jsx)(eo.ZP,{value:"daily",className:"mt-0.5"}),(0,a.jsxs)("div",{className:"ml-3 flex-1",children:[(0,a.jsx)("div",{className:"font-medium text-sm",children:"Day-by-day breakdown"}),(0,a.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",r]})]})]}),(0,a.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,a.jsx)(eo.ZP,{value:"daily_with_models",className:"mt-0.5"}),(0,a.jsxs)("div",{className:"ml-3 flex-1",children:[(0,a.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day by ",r," and model"]}),(0,a.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Daily metrics split by model"})]})]})]})})]})},eu=t(15452),em=t.n(eu);let ex=e=>{if(!e)return null;for(let t of Object.values(e)){var s;let e=null==t?void 0:null===(s=t.metadata)||void 0===s?void 0:s.team_id;if(e)return e}return null},eh=function(e,s){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[];return e.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(r=>{let[l,n]=r,i=ex(n.api_key_breakdown),c=i&&t[i]||null;a.push({Date:e.date,[s]:c||"-",["".concat(s," ID")]:i||"-","Spend ($)":(0,F.pw)(n.metrics.spend,4),Requests:n.metrics.api_requests,"Successful Requests":n.metrics.successful_requests,"Failed Requests":n.metrics.failed_requests,"Total Tokens":n.metrics.total_tokens,"Prompt Tokens":n.metrics.prompt_tokens||0,"Completion Tokens":n.metrics.completion_tokens||0})})}),a.sort((e,s)=>new Date(e.Date).getTime()-new Date(s.Date).getTime())},ep=function(e,s){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[];return e.results.forEach(e=>{let r={};Object.entries(e.breakdown.entities||{}).forEach(s=>{let[t,a]=s;r[t]||(r[t]={}),Object.entries(e.breakdown.models||{}).forEach(e=>{let[s,l]=e;Object.entries(a.api_key_breakdown||{}).forEach(e=>{let[a,l]=e;r[t][s]||(r[t][s]={spend:0,requests:0,successful:0,failed:0,tokens:0}),r[t][s].spend+=l.metrics.spend||0,r[t][s].requests+=l.metrics.api_requests||0,r[t][s].successful+=l.metrics.successful_requests||0,r[t][s].failed+=l.metrics.failed_requests||0,r[t][s].tokens+=l.metrics.total_tokens||0})})}),Object.entries(r).forEach(r=>{var l;let[n,i]=r,c=null===(l=e.breakdown.entities)||void 0===l?void 0:l[n],o=ex(null==c?void 0:c.api_key_breakdown),d=o&&t[o]||null;Object.entries(i).forEach(t=>{let[r,l]=t;a.push({Date:e.date,[s]:d||"-",["".concat(s," ID")]:o||"-",Model:r,"Spend ($)":(0,F.pw)(l.spend,4),Requests:l.requests,Successful:l.successful,Failed:l.failed,"Total Tokens":l.tokens})})})}),a.sort((e,s)=>new Date(e.Date).getTime()-new Date(s.Date).getTime())},eg=function(e,s,t){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};switch(s){case"daily":default:return eh(e,t,a);case"daily_with_models":return ep(e,t,a)}},ej=(e,s,t,a,r)=>{var l,n;return{export_date:new Date().toISOString(),entity_type:e,date_range:{from:null===(l=s.from)||void 0===l?void 0:l.toISOString(),to:null===(n=s.to)||void 0===n?void 0:n.toISOString()},filters_applied:t.length>0?t:"None",export_scope:a,summary:{total_spend:r.metadata.total_spend,total_requests:r.metadata.total_api_requests,successful_requests:r.metadata.total_successful_requests,failed_requests:r.metadata.total_failed_requests,total_tokens:r.metadata.total_tokens}}},ef=function(e,s,t,a){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},l=eg(e,s,t,r),n=new Blob([em().unparse(l)],{type:"text/csv;charset=utf-8;"}),i=window.URL.createObjectURL(n),c=document.createElement("a");c.href=i;let o="".concat(a,"_usage_").concat(s,"_").concat(new Date().toISOString().split("T")[0],".csv");c.download=o,document.body.appendChild(c),c.click(),document.body.removeChild(c),window.URL.revokeObjectURL(i)},e_=function(e,s,t,a,r,l){let n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},i=eg(e,s,t,n),c=new Blob([JSON.stringify({metadata:ej(a,r,l,s,e),data:i},null,2)],{type:"application/json"}),o=window.URL.createObjectURL(c),d=document.createElement("a");d.href=o;let u="".concat(a,"_usage_").concat(s,"_").concat(new Date().toISOString().split("T")[0],".json");d.download=u,document.body.appendChild(d),d.click(),document.body.removeChild(d),window.URL.revokeObjectURL(o)};var ey=e=>{let{isOpen:s,onClose:t,entityType:r,spendData:l,dateRange:n,selectedFilters:i,customTitle:c}=e,[o,d]=(0,Z.useState)("csv"),[u,m]=(0,Z.useState)("daily"),[x,h]=(0,Z.useState)(!1),{data:p,isLoading:g}=(0,er.y2)(),j=r.charAt(0).toUpperCase()+r.slice(1),f=c||"Export ".concat(j," Usage"),_=(0,Z.useMemo)(()=>(0,M.O)(p),[p]),y=async e=>{let s=e||o;h(!0);try{"csv"===s?(ef(l,u,j,r,_),et.Z.success("".concat(j," usage data exported successfully as CSV"))):(e_(l,u,j,r,n,i,_),et.Z.success("".concat(j," usage data exported successfully as JSON"))),t()}catch(e){console.error("Error exporting data:",e),et.Z.fromBackend("Failed to export data")}finally{h(!1)}};return(0,a.jsx)(X.Z,{title:(0,a.jsx)("span",{className:"text-base font-semibold",children:f}),open:s,onCancel:t,footer:null,width:480,children:(0,a.jsxs)("div",{className:"space-y-5 py-2",children:[g?(0,a.jsx)(el.Z,{active:!0}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ec,{dateRange:n,selectedFilters:i}),(0,a.jsx)(ed,{value:u,onChange:m,entityType:r}),(0,a.jsx)(ei,{value:o,onChange:d})]}),g?(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,a.jsx)(el.Z.Button,{active:!0}),(0,a.jsx)(el.Z.Button,{active:!0})]}):(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,a.jsx)(en.ZP,{variant:"outlined",onClick:t,disabled:x,children:"Cancel"}),(0,a.jsx)(en.ZP,{onClick:()=>y(),loading:x||g,disabled:x||g,type:"primary",children:x?"Exporting...":"Export ".concat(o.toUpperCase())})]})]})})},ev=t(19431),ek=e=>{let{dateValue:s,entityType:t,spendData:r,showFilters:l=!1,filterLabel:n,filterPlaceholder:i,selectedFilters:c=[],onFiltersChange:o,filterOptions:d=[],customTitle:u,compactLayout:m=!1,teams:x=[]}=e,[h,p]=(0,Z.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsxs)("div",{className:"grid ".concat(l&&d.length>0?"grid-cols-[1fr_auto]":"grid-cols-[auto]"," items-end gap-4"),children:[l&&d.length>0&&(0,a.jsxs)("div",{children:[n&&(0,a.jsx)(ev.x,{className:"mb-2",children:n}),(0,a.jsx)(ee.default,{mode:"multiple",style:{width:"100%"},placeholder:i,value:c,onChange:o,options:d,allowClear:!0})]}),(0,a.jsx)("div",{className:"justify-self-end",children:(0,a.jsx)(ev.z,{onClick:()=>p(!0),icon:()=>(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})})]})}),(0,a.jsx)(ey,{isOpen:h,onClose:()=>p(!1),entityType:t,spendData:r,dateRange:s,selectedFilters:c,customTitle:u,teams:x})]})},eb=t(42673),eZ=t(5540),eN=t(49634),ew=t(77398),eq=t.n(ew);let eS=[{label:"Today",shortLabel:"today",getValue:()=>({from:eq()().startOf("day").toDate(),to:eq()().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:eq()().subtract(7,"days").startOf("day").toDate(),to:eq()().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:eq()().subtract(30,"days").startOf("day").toDate(),to:eq()().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:eq()().startOf("month").toDate(),to:eq()().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:eq()().startOf("year").toDate(),to:eq()().endOf("day").toDate()})}];var eC=e=>{let{value:s,onValueChange:t,label:r="Select Time Range",showTimeRange:l=!0}=e,[n,i]=(0,Z.useState)(!1),[c,o]=(0,Z.useState)(s),[d,u]=(0,Z.useState)(null),[m,x]=(0,Z.useState)(""),[h,p]=(0,Z.useState)(""),g=(0,Z.useRef)(null),j=(0,Z.useCallback)(e=>{if(!e.from||!e.to)return null;for(let s of eS){let t=s.getValue(),a=eq()(e.from).isSame(eq()(t.from),"day"),r=eq()(e.to).isSame(eq()(t.to),"day");if(a&&r)return s.shortLabel}return null},[]);(0,Z.useEffect)(()=>{u(j(s))},[s,j]);let f=(0,Z.useCallback)(()=>{if(!m||!h)return{isValid:!0,error:""};let e=eq()(m,"YYYY-MM-DD"),s=eq()(h,"YYYY-MM-DD");return e.isValid()&&s.isValid()?s.isBefore(e)?{isValid:!1,error:"End date cannot be before start date"}:{isValid:!0,error:""}:{isValid:!1,error:"Invalid date format"}},[m,h])();(0,Z.useEffect)(()=>{s.from&&x(eq()(s.from).format("YYYY-MM-DD")),s.to&&p(eq()(s.to).format("YYYY-MM-DD")),o(s)},[s]),(0,Z.useEffect)(()=>{let e=e=>{g.current&&!g.current.contains(e.target)&&i(!1)};return n&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[n]);let _=(0,Z.useCallback)((e,s)=>{if(!e||!s)return"Select date range";let t=e=>eq()(e).format("D MMM, HH:mm");return"".concat(t(e)," - ").concat(t(s))},[]),y=(0,Z.useCallback)(e=>{let s;if(!e.from)return e;let t={...e},a=new Date(e.from);return s=new Date(e.to?e.to:e.from),a.toDateString(),s.toDateString(),a.setHours(0,0,0,0),s.setHours(23,59,59,999),t.from=a,t.to=s,t},[]),v=e=>{let{from:s,to:t}=e.getValue();o({from:s,to:t}),u(e.shortLabel),x(eq()(s).format("YYYY-MM-DD")),p(eq()(t).format("YYYY-MM-DD"))},k=(0,Z.useCallback)(()=>{try{if(m&&h&&f.isValid){let e=eq()(m,"YYYY-MM-DD").startOf("day"),s=eq()(h,"YYYY-MM-DD").endOf("day");if(e.isValid()&&s.isValid()){let t={from:e.toDate(),to:s.toDate()};o(t);let a=j(t);u(a)}}}catch(e){console.warn("Invalid date format:",e)}},[m,h,f.isValid,j]);return(0,Z.useEffect)(()=>{k()},[k]),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[r&&(0,a.jsx)(ev.x,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:r}),(0,a.jsxs)("div",{className:"relative",ref:g,children:[(0,a.jsx)("div",{className:"w-[300px] px-3 py-2 text-sm border border-gray-300 rounded-md bg-white cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500",onClick:()=>i(!n),children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(eZ.Z,{className:"text-gray-600"}),(0,a.jsx)("span",{className:"text-gray-900",children:_(s.from,s.to)})]}),(0,a.jsx)("svg",{className:"w-4 h-4 text-gray-400 transition-transform ".concat(n?"rotate-180":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),n&&(0,a.jsx)("div",{className:"absolute top-full right-0 z-[9999] min-w-[600px] mt-1 bg-white border border-gray-200 rounded-lg shadow-xl",children:(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsxs)("div",{className:"w-1/2 border-r border-gray-200",children:[(0,a.jsx)("div",{className:"p-3 border-b border-gray-200",children:(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Relative time"})}),(0,a.jsx)("div",{className:"h-[350px] overflow-y-auto",children:eS.map(e=>{let s=d===e.shortLabel;return(0,a.jsxs)("div",{className:"flex items-center justify-between px-5 py-4 cursor-pointer border-b border-gray-100 transition-colors ".concat(s?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"),onClick:()=>v(e),children:[(0,a.jsx)("span",{className:"text-sm ".concat(s?"text-blue-700 font-medium":"text-gray-700"),children:e.label}),(0,a.jsx)("span",{className:"text-xs px-2 py-1 rounded capitalize ".concat(s?"text-blue-700 bg-blue-100":"text-gray-500 bg-gray-100"),children:e.shortLabel})]},e.label)})})]}),(0,a.jsxs)("div",{className:"w-1/2 relative",children:[(0,a.jsx)("div",{className:"p-3.5 border-b border-gray-200",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(eN.Z,{className:"text-gray-600"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Start and end dates"})]})}),(0,a.jsxs)("div",{className:"p-6 space-y-6 pb-20",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"Start date"}),(0,a.jsx)("input",{type:"date",value:m,onChange:e=>x(e.target.value),className:"w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ".concat(f.isValid?"border-gray-300":"border-red-300 focus:border-red-500 focus:ring-red-200")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"End date"}),(0,a.jsx)("input",{type:"date",value:h,onChange:e=>p(e.target.value),className:"w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ".concat(f.isValid?"border-gray-300":"border-red-300 focus:border-red-500 focus:ring-red-200")})]}),!f.isValid&&f.error&&(0,a.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("svg",{className:"w-4 h-4 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,a.jsx)("span",{className:"text-sm text-red-700 font-medium",children:f.error})]})}),c.from&&c.to&&f.isValid&&(0,a.jsxs)("div",{className:"bg-blue-50 p-3 rounded-md space-y-1",children:[(0,a.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,a.jsx)("span",{className:"font-medium",children:"From:"})," ",eq()(c.from).format("MMM D, YYYY [at] HH:mm:ss")]}),(0,a.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,a.jsx)("span",{className:"font-medium",children:"To:"})," ",eq()(c.to).format("MMM D, YYYY [at] HH:mm:ss")]})]})]}),(0,a.jsx)("div",{className:"absolute bottom-4 right-4",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(ev.z,{variant:"secondary",onClick:()=>{o(s),s.from&&x(eq()(s.from).format("YYYY-MM-DD")),s.to&&p(eq()(s.to).format("YYYY-MM-DD")),u(j(s)),i(!1)},children:"Cancel"}),(0,a.jsx)(ev.z,{onClick:()=>{c.from&&c.to&&f.isValid&&(t(c),requestIdleCallback(()=>{t(y(c))},{timeout:100}),i(!1))},disabled:!c.from||!c.to||!f.isValid,children:"Apply"})]})})]})]})})]})]})},eT=t(91323);let eD=e=>{let{isDateChanging:s=!1}=e;return(0,a.jsx)("div",{className:"flex items-center justify-center h-40",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,a.jsx)(eT.S,{className:"size-5"}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"text-gray-600 text-sm font-medium",children:s?"Processing date selection...":"Loading chart data..."}),(0,a.jsx)("span",{className:"text-gray-400 text-xs mt-1",children:s?"This will only take a moment":"Fetching your data"})]})]})})};var eL=t(35829),eE=t(97765),eA=t(99981),eF=e=>{let{accessToken:s,selectedTags:t,formatAbbreviatedNumber:l}=e,[n,i]=(0,Z.useState)({results:[],total_count:0,page:1,page_size:50,total_pages:0}),[c,k]=(0,Z.useState)(!1),[b,w]=(0,Z.useState)(1),q=async()=>{if(s){k(!0);try{let e=await (0,N.perUserAnalyticsCall)(s,b,50,t.length>0?t:void 0);i(e)}catch(e){console.error("Failed to fetch per-user data:",e)}finally{k(!1)}}};return(0,Z.useEffect)(()=>{q()},[s,t,b]),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)(v.Z,{children:"Per User Usage"}),(0,a.jsx)(eE.Z,{children:"Individual developer usage metrics"}),(0,a.jsxs)(d.Z,{children:[(0,a.jsxs)(u.Z,{className:"mb-6",children:[(0,a.jsx)(o.Z,{children:"User Details"}),(0,a.jsx)(o.Z,{children:"Usage Distribution"})]}),(0,a.jsxs)(x.Z,{children:[(0,a.jsxs)(m.Z,{children:[(0,a.jsxs)(h.Z,{children:[(0,a.jsx)(j.Z,{children:(0,a.jsxs)(_.Z,{children:[(0,a.jsx)(f.Z,{children:"User ID"}),(0,a.jsx)(f.Z,{children:"User Email"}),(0,a.jsx)(f.Z,{children:"User Agent"}),(0,a.jsx)(f.Z,{className:"text-right",children:"Success Generations"}),(0,a.jsx)(f.Z,{className:"text-right",children:"Total Tokens"}),(0,a.jsx)(f.Z,{className:"text-right",children:"Failed Requests"}),(0,a.jsx)(f.Z,{className:"text-right",children:"Total Cost"})]})}),(0,a.jsx)(p.Z,{children:n.results.slice(0,10).map((e,s)=>(0,a.jsxs)(_.Z,{children:[(0,a.jsx)(g.Z,{children:(0,a.jsx)(y.Z,{className:"font-medium",children:e.user_id})}),(0,a.jsx)(g.Z,{children:(0,a.jsx)(y.Z,{children:e.user_email||"N/A"})}),(0,a.jsx)(g.Z,{children:(0,a.jsx)(y.Z,{children:e.user_agent||"Unknown"})}),(0,a.jsx)(g.Z,{className:"text-right",children:(0,a.jsx)(y.Z,{children:l(e.successful_requests)})}),(0,a.jsx)(g.Z,{className:"text-right",children:(0,a.jsx)(y.Z,{children:l(e.total_tokens)})}),(0,a.jsx)(g.Z,{className:"text-right",children:(0,a.jsx)(y.Z,{children:l(e.failed_requests)})}),(0,a.jsx)(g.Z,{className:"text-right",children:(0,a.jsxs)(y.Z,{children:["$",l(e.spend,4)]})})]},s))})]}),n.results.length>10&&(0,a.jsxs)("div",{className:"mt-4 flex justify-between items-center",children:[(0,a.jsxs)(y.Z,{className:"text-sm text-gray-500",children:["Showing 10 of ",n.total_count," results"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(H.Z,{size:"sm",variant:"secondary",onClick:()=>{b>1&&w(b-1)},disabled:1===b,children:"Previous"}),(0,a.jsx)(H.Z,{size:"sm",variant:"secondary",onClick:()=>{b=n.total_pages,children:"Next"})]})]})]}),(0,a.jsxs)(m.Z,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)(v.Z,{className:"text-lg",children:"User Usage Distribution"}),(0,a.jsx)(eE.Z,{children:"Number of users by successful request frequency"})]}),(0,a.jsx)(r.Z,{data:(()=>{let e=new Map;n.results.forEach(s=>{let t=s.user_agent||"Unknown";e.set(t,(e.get(t)||0)+1)});let s=Array.from(e.entries()).sort((e,s)=>{let[,t]=e,[,a]=s;return a-t}).slice(0,8).map(e=>{let[s]=e;return s}),t={"1-9 requests":{range:[1,9],agents:{}},"10-99 requests":{range:[10,99],agents:{}},"100-999 requests":{range:[100,999],agents:{}},"1K-9.9K requests":{range:[1e3,9999],agents:{}},"10K-99.9K requests":{range:[1e4,99999],agents:{}},"100K+ requests":{range:[1e5,1/0],agents:{}}};return n.results.forEach(e=>{let a=e.successful_requests,r=e.user_agent||"Unknown";s.includes(r)&&Object.entries(t).forEach(e=>{let[s,t]=e;a>=t.range[0]&&a<=t.range[1]&&(t.agents[r]||(t.agents[r]=0),t.agents[r]++)})}),Object.entries(t).map(e=>{let[t,a]=e,r={category:t};return s.forEach(e=>{r[e]=a.agents[e]||0}),r})})(),index:"category",categories:(()=>{let e=new Map;return n.results.forEach(s=>{let t=s.user_agent||"Unknown";e.set(t,(e.get(t)||0)+1)}),Array.from(e.entries()).sort((e,s)=>{let[,t]=e,[,a]=s;return a-t}).slice(0,8).map(e=>{let[s]=e;return s})})(),colors:["blue","green","orange","red","purple","yellow","pink","indigo"],valueFormatter:e=>"".concat(e," users"),yAxisWidth:80,showLegend:!0,stack:!0})]})]})]})]})},eO=e=>{let{accessToken:s,userRole:t,dateValue:n,onDateChange:i}=e,[h,p]=(0,Z.useState)({results:[]}),[g,j]=(0,Z.useState)({results:[]}),[f,_]=(0,Z.useState)({results:[]}),[k,b]=(0,Z.useState)({results:[]}),[w,q]=(0,Z.useState)(""),[S,C]=(0,Z.useState)([]),[T,D]=(0,Z.useState)([]),[L,E]=(0,Z.useState)(!1),[A,F]=(0,Z.useState)(!1),[O,M]=(0,Z.useState)(!1),[U,V]=(0,Z.useState)(!1),[R,z]=(0,Z.useState)(!1),I=new Date,Y=async()=>{if(s){E(!0);try{let e=await (0,N.tagDistinctCall)(s);C(e.results.map(e=>e.tag))}catch(e){console.error("Failed to fetch available tags:",e)}finally{E(!1)}}},K=async()=>{if(s){F(!0);try{let e=await (0,N.tagDauCall)(s,I,w||void 0,T.length>0?T:void 0);p(e)}catch(e){console.error("Failed to fetch DAU data:",e)}finally{F(!1)}}},$=async()=>{if(s){M(!0);try{let e=await (0,N.tagWauCall)(s,I,w||void 0,T.length>0?T:void 0);j(e)}catch(e){console.error("Failed to fetch WAU data:",e)}finally{M(!1)}}},P=async()=>{if(s){V(!0);try{let e=await (0,N.tagMauCall)(s,I,w||void 0,T.length>0?T:void 0);_(e)}catch(e){console.error("Failed to fetch MAU data:",e)}finally{V(!1)}}},W=async()=>{if(s&&n.from&&n.to){z(!0);try{let e=await (0,N.userAgentSummaryCall)(s,n.from,n.to,T.length>0?T:void 0);b(e)}catch(e){console.error("Failed to fetch user agent summary data:",e)}finally{z(!1)}}};(0,Z.useEffect)(()=>{Y()},[s]),(0,Z.useEffect)(()=>{if(!s)return;let e=setTimeout(()=>{K(),$(),P()},50);return()=>clearTimeout(e)},[s,w,T]),(0,Z.useEffect)(()=>{if(!n.from||!n.to)return;let e=setTimeout(()=>{W()},50);return()=>clearTimeout(e)},[s,n,T]);let B=e=>e.startsWith("User-Agent: ")?e.replace("User-Agent: ",""):e,H=e=>e.length>15?e.substring(0,15)+"...":e,G=e=>Object.entries(e.reduce((e,s)=>(e[s.tag]=(e[s.tag]||0)+s.active_users,e),{})).sort((e,s)=>{let[,t]=e,[,a]=s;return a-t}).map(e=>{let[s]=e;return s}),J=G(h.results).slice(0,10),Q=G(g.results).slice(0,10),X=G(f.results).slice(0,10),es=(()=>{let e=[],s=new Date;for(let t=6;t>=0;t--){let a=new Date(s);a.setDate(a.getDate()-t);let r={date:a.toISOString().split("T")[0]};J.forEach(e=>{r[B(e)]=0}),e.push(r)}return h.results.forEach(s=>{let t=B(s.tag),a=e.find(e=>e.date===s.date);a&&(a[t]=s.active_users)}),e})(),et=(()=>{let e=[];for(let s=1;s<=7;s++){let t={week:"Week ".concat(s)};Q.forEach(e=>{t[B(e)]=0}),e.push(t)}return g.results.forEach(s=>{let t=B(s.tag),a=s.date.match(/Week (\d+)/);if(a){let r="Week ".concat(a[1]),l=e.find(e=>e.week===r);l&&(l[t]=s.active_users)}}),e})(),ea=(()=>{let e=[];for(let s=1;s<=7;s++){let t={month:"Month ".concat(s)};X.forEach(e=>{t[B(e)]=0}),e.push(t)}return f.results.forEach(s=>{let t=B(s.tag),a=s.date.match(/Month (\d+)/);if(a){let r="Month ".concat(a[1]),l=e.find(e=>e.month===r);l&&(l[t]=s.active_users)}}),e})(),er=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e>=1e8||e>=1e7||e>=1e6?(e/1e6).toFixed(s)+"M":e>=1e4?(e/1e3).toFixed(s)+"K":e>=1e3?(e/1e3).toFixed(s)+"K":e.toFixed(s)};return(0,a.jsxs)("div",{className:"space-y-6 mt-6",children:[(0,a.jsx)(l.Z,{children:(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex justify-between items-start",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(v.Z,{children:"Summary by User Agent"}),(0,a.jsx)(eE.Z,{children:"Performance metrics for different user agents"})]}),(0,a.jsxs)("div",{className:"w-96",children:[(0,a.jsx)(y.Z,{className:"text-sm font-medium block mb-2",children:"Filter by User Agents"}),(0,a.jsx)(ee.default,{mode:"multiple",placeholder:"All User Agents",value:T,onChange:D,style:{width:"100%"},showSearch:!0,allowClear:!0,loading:L,optionFilterProp:"label",className:"rounded-md",maxTagCount:"responsive",children:S.map(e=>{let s=B(e),t=s.length>50?"".concat(s.substring(0,50),"..."):s;return(0,a.jsx)(ee.default.Option,{value:e,label:t,title:s,children:t},e)})})]})]}),R?(0,a.jsx)(eD,{isDateChanging:!1}):(0,a.jsxs)(c.Z,{numItems:4,className:"gap-4",children:[(k.results||[]).slice(0,4).map((e,s)=>{let t=B(e.tag),r=H(t);return(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(eA.Z,{title:t,placement:"top",children:(0,a.jsx)(v.Z,{className:"truncate",children:r})}),(0,a.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,a.jsx)(eL.Z,{className:"text-lg",children:er(e.successful_requests)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,a.jsx)(eL.Z,{className:"text-lg",children:er(e.total_tokens)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,a.jsxs)(eL.Z,{className:"text-lg",children:["$",er(e.total_spend,4)]})]})]})]},s)}),Array.from({length:Math.max(0,4-(k.results||[]).length)}).map((e,s)=>(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"No Data"}),(0,a.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,a.jsx)(eL.Z,{className:"text-lg",children:"-"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,a.jsx)(eL.Z,{className:"text-lg",children:"-"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,a.jsx)(eL.Z,{className:"text-lg",children:"-"})]})]})]},"empty-".concat(s)))]})]})}),(0,a.jsx)(l.Z,{children:(0,a.jsxs)(d.Z,{children:[(0,a.jsxs)(u.Z,{className:"mb-6",children:[(0,a.jsx)(o.Z,{children:"DAU/WAU/MAU"}),(0,a.jsx)(o.Z,{children:"Per User Usage (Last 30 Days)"})]}),(0,a.jsxs)(x.Z,{children:[(0,a.jsxs)(m.Z,{children:[(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)(v.Z,{children:"DAU, WAU & MAU per Agent"}),(0,a.jsx)(eE.Z,{children:"Active users across different time periods"})]}),(0,a.jsxs)(d.Z,{children:[(0,a.jsxs)(u.Z,{className:"mb-6",children:[(0,a.jsx)(o.Z,{children:"DAU"}),(0,a.jsx)(o.Z,{children:"WAU"}),(0,a.jsx)(o.Z,{children:"MAU"})]}),(0,a.jsxs)(x.Z,{children:[(0,a.jsxs)(m.Z,{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(v.Z,{className:"text-lg",children:"Daily Active Users - Last 7 Days"})}),A?(0,a.jsx)(eD,{isDateChanging:!1}):(0,a.jsx)(r.Z,{data:es,index:"date",categories:J.map(B),valueFormatter:e=>er(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,a.jsxs)(m.Z,{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(v.Z,{className:"text-lg",children:"Weekly Active Users - Last 7 Weeks"})}),O?(0,a.jsx)(eD,{isDateChanging:!1}):(0,a.jsx)(r.Z,{data:et,index:"week",categories:Q.map(B),valueFormatter:e=>er(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,a.jsxs)(m.Z,{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(v.Z,{className:"text-lg",children:"Monthly Active Users - Last 7 Months"})}),U?(0,a.jsx)(eD,{isDateChanging:!1}):(0,a.jsx)(r.Z,{data:ea,index:"month",categories:X.map(B),valueFormatter:e=>er(e),yAxisWidth:60,showLegend:!0,stack:!0})]})]})]})]}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(eF,{accessToken:s,selectedTags:T,formatAbbreviatedNumber:er})})]})]})})]})},eM=t(47375),eU=e=>{let{endpointData:s}=e,t=s||{},n=Z.useMemo(()=>Object.entries(t).map(e=>{let[s,t]=e;return{endpoint:s,"metrics.successful_requests":t.metrics.successful_requests,"metrics.failed_requests":t.metrics.failed_requests,metrics:{successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests}}}),[t]);return(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Success vs Failed Requests by Endpoint"}),(0,a.jsx)(I,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,a.jsx)(r.Z,{className:"mt-4",data:n,index:"endpoint",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:z,showLegend:!1,stack:!0,yAxisWidth:60})]})},eV=t(59664),eR=function(e){let{dailyData:s,endpointData:t}=e,r=(0,Z.useMemo)(()=>(null==s?void 0:s.results)&&0!==s.results.length?function(e){let s=[],t=new Set;return e.forEach(e=>{e.breakdown.endpoints&&Object.keys(e.breakdown.endpoints).forEach(e=>t.add(e))}),e.forEach(e=>{let a={date:new Date(e.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})};t.forEach(s=>{var t;let r=null===(t=e.breakdown.endpoints)||void 0===t?void 0:t[s];a[s]=(null==r?void 0:r.metrics.api_requests)||0}),s.push(a)}),s.reverse()}(s.results):[],[s]),n=(0,Z.useMemo)(()=>0===r.length?[]:Object.keys(r[0]).filter(e=>"date"!==e),[r]);return(0,a.jsxs)(l.Z,{className:"mb-6",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsx)(v.Z,{children:"Endpoint Usage Trends"})}),(0,a.jsx)(eV.Z,{className:"h-80",data:r,index:"date",categories:n,colors:["blue","cyan","indigo","violet","purple","fuchsia","pink","rose","red","orange"].slice(0,n.length),valueFormatter:e=>e.toLocaleString(),showLegend:!0,showGridLines:!0,yAxisWidth:60,connectNulls:!0,curveType:"natural"})]})},ez=t(68565),eI=t(56609),eY=e=>{let{endpointData:s}=e,t=(e,s)=>0===s?0:e/s*100,r=Object.entries(s).map(e=>{let[s,a]=e;return{key:s,endpoint:s,successful_requests:a.metrics.successful_requests,failed_requests:a.metrics.failed_requests,api_requests:a.metrics.api_requests,total_tokens:a.metrics.total_tokens,spend:a.metrics.spend,successRate:t(a.metrics.successful_requests,a.metrics.api_requests)}}),l=[{title:"Endpoint",dataIndex:"endpoint",key:"endpoint",render:e=>(0,a.jsx)("span",{className:"font-medium",children:e})},{title:"Successful / Failed",key:"requests",render:(e,s)=>{let t=s.api_requests>0?s.successful_requests/s.api_requests*100:0,r=s.api_requests>0?s.failed_requests/s.api_requests*100:0,l={"0%":"#22c55e"};return t>0&&t<100&&(l["".concat(t,"%")]="#22c55e",l["".concat(t+.01,"%")]="#ef4444"),l["100%"]=r>0?"#ef4444":"#22c55e",(0,a.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,a.jsx)("div",{className:"flex-1 relative",children:(0,a.jsx)(ez.Z,{percent:t+r,size:"small",strokeColor:l,showInfo:!1})}),(0,a.jsxs)("div",{className:"flex items-center space-x-2 text-sm min-w-[100px]",children:[(0,a.jsx)("span",{className:"text-green-600 font-medium",children:s.successful_requests.toLocaleString()}),(0,a.jsx)("span",{className:"text-gray-400",children:"/"}),(0,a.jsx)("span",{className:"text-red-600 font-medium",children:s.failed_requests.toLocaleString()})]})]})}},{title:"Total Request",dataIndex:"api_requests",key:"api_requests",render:e=>e.toLocaleString()},{title:"Success Rate",dataIndex:"successRate",key:"successRate",render:e=>{let s=e.toFixed(2);return(0,a.jsxs)("span",{className:e>=95?"text-green-600 font-medium":e>=80?"text-yellow-600 font-medium":"text-red-600 font-medium",children:[s,"%"]})}},{title:"Total Tokens",dataIndex:"total_tokens",key:"total_tokens",render:e=>e.toLocaleString()},{title:"Spend",dataIndex:"spend",key:"spend",render:e=>"$".concat((0,F.pw)(e,2))}];return(0,a.jsx)(eI.Z,{columns:l,dataSource:r,pagination:!1})},eK=e=>{let{userSpendData:s}=e,t=(0,Z.useMemo)(()=>{let e={};return(null==s?void 0:s.results)&&s.results.forEach(s=>{Object.entries(s.breakdown.endpoints||{}).forEach(s=>{let[t,a]=s;e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:a.metadata||{},api_key_breakdown:{}}),e[t].metrics.spend+=a.metrics.spend,e[t].metrics.prompt_tokens+=a.metrics.prompt_tokens,e[t].metrics.completion_tokens+=a.metrics.completion_tokens,e[t].metrics.total_tokens+=a.metrics.total_tokens,e[t].metrics.api_requests+=a.metrics.api_requests,e[t].metrics.successful_requests+=a.metrics.successful_requests||0,e[t].metrics.failed_requests+=a.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=a.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=a.metrics.cache_creation_input_tokens||0})}),e},[s]);return(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(eY,{endpointData:t}),(0,a.jsx)(eU,{endpointData:t}),(0,a.jsx)(eR,{dailyData:s,endpointData:t})]})},e$=t(49282),eP=t(57589),eW=t(12322);function eB(e){let{topModels:s,topModelsLimit:t,setTopModelsLimit:l}=e,[n,i]=(0,Z.useState)("table"),c=s.slice(0,t);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,a.jsx)(k.Z,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:t,onChange:e=>l(e)}),(0,a.jsxs)("div",{className:"flex space-x-2",children:[(0,a.jsx)("button",{onClick:()=>i("table"),className:"px-3 py-1 text-sm rounded-md ".concat("table"===n?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Table View"}),(0,a.jsx)("button",{onClick:()=>i("chart"),className:"px-3 py-1 text-sm rounded-md ".concat("chart"===n?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Chart View"})]})]}),"chart"===n?(0,a.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,a.jsx)(r.Z,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(c.length,t)},data:c,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>"$".concat((0,F.pw)(e,2)),layout:"vertical",yAxisWidth:200,tickGap:5,showLegend:!1})}):(0,a.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,a.jsx)(eW.w,{columns:[{header:"Model",accessorKey:"key",cell:e=>e.getValue()||"-"},{header:"Spend (USD)",accessorKey:"spend",cell:e=>{let s=e.getValue();return"$".concat((0,F.pw)(s,2))}},{header:"Successful",accessorKey:"successful_requests",cell:e=>{var s;return(0,a.jsx)("span",{className:"text-green-600",children:(null===(s=e.getValue())||void 0===s?void 0:s.toLocaleString())||0})}},{header:"Failed",accessorKey:"failed_requests",cell:e=>{var s;return(0,a.jsx)("span",{className:"text-red-600",children:(null===(s=e.getValue())||void 0===s?void 0:s.toLocaleString())||0})}},{header:"Tokens",accessorKey:"tokens",cell:e=>{var s;return(null===(s=e.getValue())||void 0===s?void 0:s.toLocaleString())||0}}],data:c,renderSubComponent:()=>(0,a.jsx)(a.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})})]})}var eH=e=>{let{accessToken:s,entityType:t,entityId:k,entityList:b,dateValue:w}=e,[q,S]=(0,Z.useState)({results:[],metadata:{total_spend:0,total_api_requests:0,total_successful_requests:0,total_failed_requests:0,total_tokens:0}}),{teams:C}=(0,e$.Z)(),T=B(q,"models",C||[]),D=B(q,"api_keys",C||[]),[L,E]=(0,Z.useState)([]),[A,O]=(0,Z.useState)(5),[M,U]=(0,Z.useState)(5),V=async()=>{if(!s||!w.from||!w.to)return;let e=new Date(w.from),a=new Date(w.to);if("tag"===t)S(await (0,N.tagDailyActivityCall)(s,e,a,1,L.length>0?L:null));else if("team"===t)S(await (0,N.teamDailyActivityCall)(s,e,a,1,L.length>0?L:null));else if("organization"===t)S(await (0,N.organizationDailyActivityCall)(s,e,a,1,L.length>0?L:null));else if("customer"===t)S(await (0,N.customerDailyActivityCall)(s,e,a,1,L.length>0?L:null));else if("agent"===t)S(await (0,N.agentDailyActivityCall)(s,e,a,1,L.length>0?L:null));else throw Error("Invalid entity type")};(0,Z.useEffect)(()=>{V()},[s,w,k,L]);let R=()=>{let e={};return q.results.forEach(s=>{Object.entries(s.breakdown.providers||{}).forEach(s=>{let[t,a]=s;e[t]||(e[t]={provider:t,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{e[t].spend+=a.metrics.spend,e[t].requests+=a.metrics.api_requests,e[t].successful_requests+=a.metrics.successful_requests,e[t].failed_requests+=a.metrics.failed_requests,e[t].tokens+=a.metrics.total_tokens}catch(e){console.error("Error processing provider ".concat(t,": ").concat(e))}})}),Object.values(e).filter(e=>e.spend>0).sort((e,s)=>s.spend-e.spend)},z=(e,s)=>{if(b){let s=b.find(s=>s.value===e);if(s)return s.label}return(null==s?void 0:s.team_alias)?s.team_alias:e},I=e=>0===L.length?e:e.filter(e=>L.includes(e.metadata.id)),Y=()=>{let e={};return q.results.forEach(s=>{Object.entries(s.breakdown.entities||{}).forEach(s=>{let[t,a]=s;e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{alias:z(t,a.metadata),id:t}}),e[t].metrics.spend+=a.metrics.spend,e[t].metrics.api_requests+=a.metrics.api_requests,e[t].metrics.successful_requests+=a.metrics.successful_requests,e[t].metrics.failed_requests+=a.metrics.failed_requests,e[t].metrics.total_tokens+=a.metrics.total_tokens})}),I(Object.values(e).sort((e,s)=>s.metrics.spend-e.metrics.spend))},$=t.charAt(0).toUpperCase()+t.slice(1);return(0,a.jsxs)("div",{style:{width:"100%"},className:"relative",children:[(0,a.jsx)(ek,{dateValue:w,entityType:t,spendData:q,showFilters:null!==b&&b.length>0,filterLabel:"Filter by ".concat(t),filterPlaceholder:"Select ".concat(t," to filter..."),selectedFilters:L,onFiltersChange:E,filterOptions:(()=>{if(b)return b})()||void 0,teams:C||[]}),(0,a.jsxs)(d.Z,{children:[(0,a.jsxs)(u.Z,{variant:"solid",className:"mt-1",children:[(0,a.jsx)(o.Z,{children:"Cost"}),(0,a.jsx)(o.Z,{children:"agent"===t?"Request / Token Consumption":"Model Activity"}),(0,a.jsx)(o.Z,{children:"Key Activity"}),(0,a.jsx)(o.Z,{children:"Endpoint Activity"})]}),(0,a.jsxs)(x.Z,{children:[(0,a.jsx)(m.Z,{children:(0,a.jsxs)(c.Z,{numItems:2,className:"gap-2 w-full",children:[(0,a.jsx)(n.Z,{numColSpan:2,children:(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)(v.Z,{children:[$," Spend Overview"]}),(0,a.jsxs)(c.Z,{numItems:5,className:"gap-4 mt-4",children:[(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Total Spend"}),(0,a.jsxs)(y.Z,{className:"text-2xl font-bold mt-2",children:["$",(0,F.pw)(q.metadata.total_spend,2)]})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Total Requests"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2",children:q.metadata.total_api_requests.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Successful Requests"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2 text-green-600",children:q.metadata.total_successful_requests.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Failed Requests"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2 text-red-600",children:q.metadata.total_failed_requests.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Total Tokens"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2",children:q.metadata.total_tokens.toLocaleString()})]})]})]})}),(0,a.jsx)(n.Z,{numColSpan:2,children:(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Daily Spend"}),(0,a.jsx)(r.Z,{data:[...q.results].sort((e,s)=>new Date(e.date).getTime()-new Date(s.date).getTime()),index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:K,yAxisWidth:100,showLegend:!1,customTooltip:e=>{let{payload:s,active:t}=e;if(!t||!(null==s?void 0:s[0]))return null;let r=s[0].payload,l=Object.keys(r.breakdown.entities||{}).length;return(0,a.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,a.jsx)("p",{className:"font-bold",children:r.date}),(0,a.jsxs)("p",{className:"text-cyan-500",children:["Total Spend: $",(0,F.pw)(r.metrics.spend,2)]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",r.metrics.api_requests]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Successful: ",r.metrics.successful_requests]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Failed: ",r.metrics.failed_requests]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Total Tokens: ",r.metrics.total_tokens]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Total ",$,"s: ",l]}),(0,a.jsxs)("div",{className:"mt-2 border-t pt-2",children:[(0,a.jsxs)("p",{className:"font-semibold",children:["Spend by ",$,":"]}),Object.entries(r.breakdown.entities||{}).sort((e,s)=>{let[,t]=e,[,a]=s,r=t.metrics.spend;return a.metrics.spend-r}).slice(0,5).map(e=>{let[s,t]=e;return(0,a.jsxs)("p",{className:"text-sm text-gray-600",children:[z(s,t.metadata),": $",(0,F.pw)(t.metrics.spend,2)]},s)}),l>5&&(0,a.jsxs)("p",{className:"text-sm text-gray-500 italic",children:["...and ",l-5," more"]})]})]})}})]})}),(0,a.jsx)(n.Z,{numColSpan:2,children:(0,a.jsx)(l.Z,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,a.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,a.jsxs)(v.Z,{children:["Spend Per ",$]}),(0,a.jsx)(eE.Z,{className:"text-xs",children:"Showing Top 5 by Spend"}),(0,a.jsxs)("div",{className:"flex items-center text-sm text-gray-500",children:[(0,a.jsxs)("span",{children:["Get Started by Tracking cost per ",$," "]}),(0,a.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/enterprise#spend-tracking",className:"text-blue-500 hover:text-blue-700 ml-1",children:"here"})]})]}),(0,a.jsxs)(c.Z,{numItems:2,className:"gap-6",children:[(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsx)(r.Z,{className:"mt-4 h-52",data:Y().slice(0,5).map(e=>({...e,metadata:{...e.metadata,alias_display:e.metadata.alias&&e.metadata.alias.length>15?"".concat(e.metadata.alias.slice(0,15),"..."):e.metadata.alias}})),index:"metadata.alias_display",categories:["metrics.spend"],colors:["cyan"],valueFormatter:K,layout:"vertical",showLegend:!1,yAxisWidth:150,customTooltip:e=>{let{payload:s,active:t}=e;if(!t||!(null==s?void 0:s[0]))return null;let r=s[0].payload;return(0,a.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,a.jsx)("p",{className:"font-bold",children:r.metadata.alias}),(0,a.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,F.pw)(r.metrics.spend,4)]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Requests: ",r.metrics.api_requests.toLocaleString()]}),(0,a.jsxs)("p",{className:"text-green-600",children:["Successful: ",r.metrics.successful_requests.toLocaleString()]}),(0,a.jsxs)("p",{className:"text-red-600",children:["Failed: ",r.metrics.failed_requests.toLocaleString()]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",r.metrics.total_tokens.toLocaleString()]})]})}})}),(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsx)("div",{className:"h-52 overflow-y-auto",children:(0,a.jsxs)(h.Z,{children:[(0,a.jsx)(j.Z,{children:(0,a.jsxs)(_.Z,{children:[(0,a.jsx)(f.Z,{children:$}),(0,a.jsx)(f.Z,{children:"Spend"}),(0,a.jsx)(f.Z,{className:"text-green-600",children:"Successful"}),(0,a.jsx)(f.Z,{className:"text-red-600",children:"Failed"}),(0,a.jsx)(f.Z,{children:"Tokens"})]})}),(0,a.jsx)(p.Z,{children:Y().filter(e=>e.metrics.spend>0).map(e=>(0,a.jsxs)(_.Z,{children:[(0,a.jsx)(g.Z,{children:e.metadata.alias}),(0,a.jsxs)(g.Z,{children:["$",(0,F.pw)(e.metrics.spend,4)]}),(0,a.jsx)(g.Z,{className:"text-green-600",children:e.metrics.successful_requests.toLocaleString()}),(0,a.jsx)(g.Z,{className:"text-red-600",children:e.metrics.failed_requests.toLocaleString()}),(0,a.jsx)(g.Z,{children:e.metrics.total_tokens.toLocaleString()})]},e.metadata.id))})]})})})]})]})})}),(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Top Virtual Keys"}),(0,a.jsx)(eP.Z,{topKeys:(()=>{console.log("debugTags",{spendData:q});let e={};return q.results.forEach(s=>{let{breakdown:t}=s,{entities:a}=t;console.log("debugTags",{entities:a});let r=Object.keys(a).reduce((e,s)=>{let{api_key_breakdown:t}=a[s];return Object.keys(t).forEach(a=>{let r={tag:s,usage:t[a].metrics.spend};e[a]?e[a].push(r):e[a]=[r]}),e},{});console.log("debugTags",{tagDictionary:r}),Object.entries(s.breakdown.api_keys||{}).forEach(s=>{let[t,a]=s;e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{key_alias:a.metadata.key_alias,team_id:a.metadata.team_id||null,tags:r[t]||[]}},console.log("debugTags",{keySpend:e})),e[t].metrics.spend+=a.metrics.spend,e[t].metrics.prompt_tokens+=a.metrics.prompt_tokens,e[t].metrics.completion_tokens+=a.metrics.completion_tokens,e[t].metrics.total_tokens+=a.metrics.total_tokens,e[t].metrics.api_requests+=a.metrics.api_requests,e[t].metrics.successful_requests+=a.metrics.successful_requests,e[t].metrics.failed_requests+=a.metrics.failed_requests,e[t].metrics.cache_read_input_tokens+=a.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=a.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(e=>{let[s,t]=e;return{api_key:s,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||"-",spend:t.metrics.spend}}).sort((e,s)=>s.spend-e.spend).slice(0,A)})(),teams:null,showTags:"tag"===t,topKeysLimit:A,setTopKeysLimit:O})]})}),(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"agent"===t?"Top Agents":"Top Models"}),(0,a.jsx)(eB,{topModels:(()=>{let e={};return q.results.forEach(s=>{Object.entries(s.breakdown.models||{}).forEach(s=>{let[t,a]=s;e[t]||(e[t]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{e[t].spend+=a.metrics.spend}catch(e){console.error("Error adding spend for ".concat(t,": ").concat(e,", got metrics: ").concat(JSON.stringify(a)))}e[t].requests+=a.metrics.api_requests,e[t].successful_requests+=a.metrics.successful_requests,e[t].failed_requests+=a.metrics.failed_requests,e[t].tokens+=a.metrics.total_tokens})}),Object.entries(e).map(e=>{let[s,t]=e;return{key:s,...t}}).sort((e,s)=>s.spend-e.spend).slice(0,M)})(),topModelsLimit:M,setTopModelsLimit:U})]})}),(0,a.jsx)(n.Z,{numColSpan:2,children:(0,a.jsx)(l.Z,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,a.jsx)(v.Z,{children:"Provider Usage"}),(0,a.jsxs)(c.Z,{numItems:2,children:[(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsx)(i.Z,{className:"mt-4 h-40",data:R(),index:"provider",category:"spend",valueFormatter:e=>"$".concat((0,F.pw)(e,2)),colors:["cyan","blue","indigo","violet","purple"]})}),(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsxs)(h.Z,{children:[(0,a.jsx)(j.Z,{children:(0,a.jsxs)(_.Z,{children:[(0,a.jsx)(f.Z,{children:"Provider"}),(0,a.jsx)(f.Z,{children:"Spend"}),(0,a.jsx)(f.Z,{className:"text-green-600",children:"Successful"}),(0,a.jsx)(f.Z,{className:"text-red-600",children:"Failed"}),(0,a.jsx)(f.Z,{children:"Tokens"})]})}),(0,a.jsx)(p.Z,{children:R().map(e=>(0,a.jsxs)(_.Z,{children:[(0,a.jsx)(g.Z,{children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,a.jsx)("img",{src:(0,eb.dr)(e.provider).logo,alt:"".concat(e.provider," logo"),className:"w-4 h-4",onError:s=>{let t=s.target,a=t.parentElement;if(a){var r;let s=document.createElement("div");s.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",s.textContent=(null===(r=e.provider)||void 0===r?void 0:r.charAt(0))||"-",a.replaceChild(s,t)}}}),(0,a.jsx)("span",{children:e.provider})]})}),(0,a.jsxs)(g.Z,{children:["$",(0,F.pw)(e.spend,2)]}),(0,a.jsx)(g.Z,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,a.jsx)(g.Z,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,a.jsx)(g.Z,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})})})]})}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(P,{modelMetrics:T,hidePromptCachingMetrics:"agent"===t})}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(P,{modelMetrics:D,hidePromptCachingMetrics:"agent"===t})}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(eK,{userSpendData:q})})]})]})]})},eG=t(64739),eJ=t(37527),eQ=t(41361),eX=t(40312),e0=t(71891),e1=t(69993),e2=t(48231),e4=t(9775),e5=t(33866);let e6=[{value:"global",label:"Global Usage",showForAdmin:"Global Usage",showForNonAdmin:"Your Usage",description:"View usage across all resources",descriptionForAdmin:"View usage across all resources",descriptionForNonAdmin:"View your usage",icon:(0,a.jsx)(eG.Z,{style:{fontSize:"16px"}})},{value:"organization",label:"Organization Usage",showForAdmin:"Organization Usage",showForNonAdmin:"Your Organization Usage",description:"View organization-level usage",descriptionForAdmin:"View usage across all organizations",descriptionForNonAdmin:"View your organization's usage",icon:(0,a.jsx)(eJ.Z,{style:{fontSize:"16px"}})},{value:"team",label:"Team Usage",description:"View usage by team",icon:(0,a.jsx)(eQ.Z,{style:{fontSize:"16px"}})},{value:"customer",label:"Customer Usage",description:"View usage by customer accounts",icon:(0,a.jsx)(eX.Z,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"tag",label:"Tag Usage",description:"View usage grouped by tags",icon:(0,a.jsx)(e0.Z,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"agent",label:"Agent Usage (A2A)",description:"View usage by AI agents",icon:(0,a.jsx)(e1.Z,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user-agent-activity",label:"User Agent Activity",description:"View detailed user agent activity logs",icon:(0,a.jsx)(e2.Z,{style:{fontSize:"16px"}}),adminOnly:!0}],e3=e=>{let{value:s,onChange:t,isAdmin:r,title:l="Usage View",description:n="Select the usage data you want to view","data-id":i}=e,c=e6.filter(e=>!e.adminOnly||!!r).map(e=>{let s=e.label,t=e.description;return e.showForAdmin&&e.showForNonAdmin&&(s=r?e.showForAdmin:e.showForNonAdmin),e.descriptionForAdmin&&e.descriptionForNonAdmin&&(t=r?e.descriptionForAdmin:e.descriptionForNonAdmin),{value:e.value,label:s,description:t,icon:e.icon,badgeText:e.badgeText}});return(0,a.jsx)("div",{className:"w-full","data-id":i,children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-start gap-4",children:[(0,a.jsxs)("div",{className:"flex items-stretch gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"flex-shrink-0 flex items-center",children:(0,a.jsx)(e4.Z,{style:{fontSize:"32px"}})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-0.5 leading-tight",children:l}),(0,a.jsx)("p",{className:"text-xs text-gray-600 leading-tight",children:n})]})]}),(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsx)(ee.default,{value:s,onChange:t,className:"w-54 sm:w-64 md:w-72",size:"large",options:c.map(e=>({value:e.value,label:e.label})),optionRender:e=>{let s=c.find(s=>s.value===e.value);return s?(0,a.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[(0,a.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:s.icon}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-900",children:s.label}),(0,a.jsx)("div",{className:"text-xs text-gray-600 mt-0.5",children:s.description})]}),s.badgeText&&(0,a.jsx)("div",{className:"items-center",children:(0,a.jsx)(e5.Z,{color:"blue",count:s.badgeText})})]}):e.label},labelRender:e=>{let s=c.find(s=>s.value===e.value);return s?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{children:s.icon}),(0,a.jsx)("span",{className:"text-sm",children:s.label})]}):e.label}})})]})})};var e9=e=>{var s,t,w,q,T,L,M,U,V,R,z;let{teams:I,organizations:Y}=e,{accessToken:$,userRole:W,userId:H,premiumUser:G}=(0,C.Z)(),[J,Q]=(0,Z.useState)({results:[],metadata:{}}),[X,ee]=(0,Z.useState)(!1),[es,et]=(0,Z.useState)(!1),er=(0,Z.useMemo)(()=>new Date(Date.now()-6048e5),[]),el=(0,Z.useMemo)(()=>new Date,[]),[en,ei]=(0,Z.useState)({from:er,to:el}),[ec,eo]=(0,Z.useState)([]),{data:ed=[]}=E(),{data:eu}=D(),{data:em}=(0,A.x)();console.log("currentUser: ".concat(JSON.stringify(em))),console.log("currentUser max budget: ".concat(null==em?void 0:em.max_budget));let[ex,eh]=(0,Z.useState)("groups"),[ep,eg]=(0,Z.useState)(!1),[ej,ef]=(0,Z.useState)(!1),[e_,ev]=(0,Z.useState)(!0),[ek,eZ]=(0,Z.useState)(!0),[eN,ew]=(0,Z.useState)("global"),[eq,eS]=(0,Z.useState)(!0),[eT,eL]=(0,Z.useState)(5),[eE,eA]=(0,Z.useState)(5),eF=async()=>{$&&eo(Object.values(await (0,N.tagListCall)($)).map(e=>({label:e.name,value:e.name})))};(0,Z.useEffect)(()=>{eF()},[$]);let eU=(null===(s=J.metadata)||void 0===s?void 0:s.total_spend)||0,eV=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,s={};return J.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(e=>{let[t,a]=e;s[t]||(s[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),s[t].metrics.spend+=a.metrics.spend,s[t].metrics.prompt_tokens+=a.metrics.prompt_tokens,s[t].metrics.completion_tokens+=a.metrics.completion_tokens,s[t].metrics.total_tokens+=a.metrics.total_tokens,s[t].metrics.api_requests+=a.metrics.api_requests,s[t].metrics.successful_requests+=a.metrics.successful_requests||0,s[t].metrics.failed_requests+=a.metrics.failed_requests||0,s[t].metrics.cache_read_input_tokens+=a.metrics.cache_read_input_tokens||0,s[t].metrics.cache_creation_input_tokens+=a.metrics.cache_creation_input_tokens||0})}),Object.entries(s).map(e=>{let[s,t]=e;return{key:s,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens}}).sort((e,s)=>s.spend-e.spend).slice(0,e)},eR=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,s={};return J.results.forEach(e=>{Object.entries(e.breakdown.model_groups||{}).forEach(e=>{let[t,a]=e;s[t]||(s[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),s[t].metrics.spend+=a.metrics.spend,s[t].metrics.prompt_tokens+=a.metrics.prompt_tokens,s[t].metrics.completion_tokens+=a.metrics.completion_tokens,s[t].metrics.total_tokens+=a.metrics.total_tokens,s[t].metrics.api_requests+=a.metrics.api_requests,s[t].metrics.successful_requests+=a.metrics.successful_requests||0,s[t].metrics.failed_requests+=a.metrics.failed_requests||0,s[t].metrics.cache_read_input_tokens+=a.metrics.cache_read_input_tokens||0,s[t].metrics.cache_creation_input_tokens+=a.metrics.cache_creation_input_tokens||0})}),Object.entries(s).map(e=>{let[s,t]=e;return{key:s,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens}}).sort((e,s)=>s.spend-e.spend).slice(0,e)},ez=()=>{let e={};return J.results.forEach(s=>{Object.entries(s.breakdown.providers||{}).forEach(s=>{let[t,a]=s;e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[t].metrics.spend+=a.metrics.spend,e[t].metrics.prompt_tokens+=a.metrics.prompt_tokens,e[t].metrics.completion_tokens+=a.metrics.completion_tokens,e[t].metrics.total_tokens+=a.metrics.total_tokens,e[t].metrics.api_requests+=a.metrics.api_requests,e[t].metrics.successful_requests+=a.metrics.successful_requests||0,e[t].metrics.failed_requests+=a.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=a.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=a.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(e=>{let[s,t]=e;return{provider:s,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens}})},eI=(0,Z.useCallback)(async()=>{if(!$||!en.from||!en.to)return;ee(!0);let e=new Date(en.from),s=new Date(en.to);try{try{let t=await (0,N.userDailyActivityAggregatedCall)($,e,s);Q(t);return}catch(e){}let t=await (0,N.userDailyActivityCall)($,e,s);if(t.metadata.total_pages<=1){Q(t);return}let a=[...t.results],r={...t.metadata};for(let l=2;l<=t.metadata.total_pages;l++){let t=await (0,N.userDailyActivityCall)($,e,s,l);a.push(...t.results),t.metadata&&(r.total_spend+=t.metadata.total_spend||0,r.total_api_requests+=t.metadata.total_api_requests||0,r.total_successful_requests+=t.metadata.total_successful_requests||0,r.total_failed_requests+=t.metadata.total_failed_requests||0,r.total_tokens+=t.metadata.total_tokens||0)}Q({results:a,metadata:r})}catch(e){console.error("Error fetching user spend data:",e)}finally{ee(!1),et(!1)}},[$,en.from,en.to]),eY=(0,Z.useCallback)(e=>{et(!0),ee(!0),ei(e)},[]);(0,Z.useEffect)(()=>{if(!en.from||!en.to)return;let e=setTimeout(()=>{eI()},50);return()=>clearTimeout(e)},[eI]);let e$=B(J,"models",I),eW=B(J,"api_keys",I),eB=B(J,"mcp_servers",I);return(0,a.jsxs)("div",{style:{width:"100%"},className:"p-8 relative",children:[(0,a.jsx)("div",{className:"flex items-end justify-between gap-6 mb-6",children:(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex items-end justify-between gap-6 mb-4 w-full",children:[(0,a.jsx)(e3,{value:eN,onChange:e=>ew(e),isAdmin:S.ZL.includes(W||"")}),(0,a.jsx)(eC,{value:en,onValueChange:eY})]}),"global"===eN&&(0,a.jsxs)(d.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsxs)(u.Z,{variant:"solid",className:"mt-1",children:[(0,a.jsx)(o.Z,{children:"Cost"}),(0,a.jsx)(o.Z,{children:"Model Activity"}),(0,a.jsx)(o.Z,{children:"Key Activity"}),(0,a.jsx)(o.Z,{children:"MCP Server Activity"}),(0,a.jsx)(o.Z,{children:"Endpoint Activity"})]}),(0,a.jsx)(O.z,{onClick:()=>ef(!0),icon:()=>(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})]}),(0,a.jsxs)(x.Z,{children:[(0,a.jsx)(m.Z,{children:(0,a.jsxs)(c.Z,{numItems:2,className:"gap-2 w-full",children:[(0,a.jsxs)(n.Z,{numColSpan:2,children:[(0,a.jsxs)(y.Z,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content mb-2 mt-2 text-lg",children:["Project Spend"," ",en.from&&en.to&&(0,a.jsxs)(a.Fragment,{children:[en.from.toLocaleDateString("en-US",{month:"short",day:"numeric",year:en.from.getFullYear()!==en.to.getFullYear()?"numeric":void 0})," - ",en.to.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]}),(0,a.jsx)(eM.Z,{userSpend:eU,selectedTeam:null,userMaxBudget:(null==em?void 0:em.max_budget)||null})]}),(0,a.jsx)(n.Z,{numColSpan:2,children:(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Usage Metrics"}),(0,a.jsxs)(c.Z,{numItems:5,className:"gap-4 mt-4",children:[(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Total Requests"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2",children:(null===(w=J.metadata)||void 0===w?void 0:null===(t=w.total_api_requests)||void 0===t?void 0:t.toLocaleString())||0})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Successful Requests"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2 text-green-600",children:(null===(T=J.metadata)||void 0===T?void 0:null===(q=T.total_successful_requests)||void 0===q?void 0:q.toLocaleString())||0})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Failed Requests"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2 text-red-600",children:(null===(M=J.metadata)||void 0===M?void 0:null===(L=M.total_failed_requests)||void 0===L?void 0:L.toLocaleString())||0})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Total Tokens"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2",children:(null===(V=J.metadata)||void 0===V?void 0:null===(U=V.total_tokens)||void 0===U?void 0:U.toLocaleString())||0})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Average Cost per Request"}),(0,a.jsxs)(y.Z,{className:"text-2xl font-bold mt-2",children:["$",(0,F.pw)((eU||0)/((null===(R=J.metadata)||void 0===R?void 0:R.total_api_requests)||1),4)]})]})]})]})}),(0,a.jsx)(n.Z,{numColSpan:2,children:(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Daily Spend"}),X?(0,a.jsx)(eD,{isDateChanging:es}):(0,a.jsx)(r.Z,{data:[...J.results].sort((e,s)=>new Date(e.date).getTime()-new Date(s.date).getTime()),index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:K,yAxisWidth:100,showLegend:!1,customTooltip:e=>{let{payload:s,active:t}=e;if(!t||!(null==s?void 0:s[0]))return null;let r=s[0].payload;return(0,a.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,a.jsx)("p",{className:"font-bold",children:r.date}),(0,a.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,F.pw)(r.metrics.spend,2)]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Requests: ",r.metrics.api_requests]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Successful: ",r.metrics.successful_requests]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Failed: ",r.metrics.failed_requests]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",r.metrics.total_tokens]})]})}})]})}),(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsxs)(l.Z,{className:"h-full",children:[(0,a.jsx)(v.Z,{children:"Top Virtual Keys"}),(0,a.jsx)(eP.Z,{topKeys:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,s={};return J.results.forEach(e=>{Object.entries(e.breakdown.api_keys||{}).forEach(e=>{let[t,a]=e;s[t]||(s[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{key_alias:a.metadata.key_alias,team_id:null,tags:a.metadata.tags||[]}}),s[t].metrics.spend+=a.metrics.spend,s[t].metrics.prompt_tokens+=a.metrics.prompt_tokens,s[t].metrics.completion_tokens+=a.metrics.completion_tokens,s[t].metrics.total_tokens+=a.metrics.total_tokens,s[t].metrics.api_requests+=a.metrics.api_requests,s[t].metrics.successful_requests+=a.metrics.successful_requests,s[t].metrics.failed_requests+=a.metrics.failed_requests,s[t].metrics.cache_read_input_tokens+=a.metrics.cache_read_input_tokens||0,s[t].metrics.cache_creation_input_tokens+=a.metrics.cache_creation_input_tokens||0})}),console.log("debugTags",{keySpend:s,userSpendData:J}),Object.entries(s).map(e=>{let[s,t]=e;return{api_key:s,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||[],spend:t.metrics.spend}}).sort((e,s)=>s.spend-e.spend).slice(0,e)}(eT),teams:null,topKeysLimit:eT,setTopKeysLimit:eL})]})}),(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsxs)(l.Z,{className:"h-full",children:[(0,a.jsx)(v.Z,{children:"groups"===ex?"Top Public Model Names":"Top Litellm Models"}),(0,a.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,a.jsx)(k.Z,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:eE,onChange:e=>eA(e)}),(0,a.jsxs)("div",{className:"flex bg-gray-100 rounded-lg p-1",children:[(0,a.jsx)("button",{className:"px-3 py-1 text-sm rounded-md transition-colors ".concat("groups"===ex?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"),onClick:()=>eh("groups"),children:"Public Model Name"}),(0,a.jsx)("button",{className:"px-3 py-1 text-sm rounded-md transition-colors ".concat("individual"===ex?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"),onClick:()=>eh("individual"),children:"Litellm Model Name"})]})]}),X?(0,a.jsx)(eD,{isDateChanging:es}):(0,a.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(()=>{let e="groups"===ex?eR(eE):eV(eE);return(0,a.jsx)(r.Z,{className:"mt-4",style:{height:52*Math.min(e.length,eE)},data:e,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:K,layout:"vertical",yAxisWidth:200,showLegend:!1,customTooltip:e=>{let{payload:s,active:t}=e;if(!t||!(null==s?void 0:s[0]))return null;let r=s[0].payload;return(0,a.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,a.jsx)("p",{className:"font-bold",children:r.key}),(0,a.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,F.pw)(r.spend,2)]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",r.requests.toLocaleString()]}),(0,a.jsxs)("p",{className:"text-green-600",children:["Successful: ",r.successful_requests.toLocaleString()]}),(0,a.jsxs)("p",{className:"text-red-600",children:["Failed: ",r.failed_requests.toLocaleString()]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",r.tokens.toLocaleString()]})]})}})})()})]})}),(0,a.jsx)(n.Z,{numColSpan:2,children:(0,a.jsxs)(l.Z,{className:"h-full",children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,a.jsx)(v.Z,{children:"Spend by Provider"})}),X?(0,a.jsx)(eD,{isDateChanging:es}):(0,a.jsxs)(c.Z,{numItems:2,children:[(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsx)(i.Z,{className:"mt-4 h-40",data:ez(),index:"provider",category:"spend",valueFormatter:e=>"$".concat((0,F.pw)(e,2)),colors:["cyan"]})}),(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsxs)(h.Z,{children:[(0,a.jsx)(j.Z,{children:(0,a.jsxs)(_.Z,{children:[(0,a.jsx)(f.Z,{children:"Provider"}),(0,a.jsx)(f.Z,{children:"Spend"}),(0,a.jsx)(f.Z,{className:"text-green-600",children:"Successful"}),(0,a.jsx)(f.Z,{className:"text-red-600",children:"Failed"}),(0,a.jsx)(f.Z,{children:"Tokens"})]})}),(0,a.jsx)(p.Z,{children:ez().filter(e=>e.spend>0).map(e=>(0,a.jsxs)(_.Z,{children:[(0,a.jsx)(g.Z,{children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,a.jsx)("img",{src:(0,eb.dr)(e.provider).logo,alt:"".concat(e.provider," logo"),className:"w-4 h-4",onError:s=>{let t=s.target,a=t.parentElement;if(a){var r;let s=document.createElement("div");s.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",s.textContent=(null===(r=e.provider)||void 0===r?void 0:r.charAt(0))||"-",a.replaceChild(s,t)}}}),(0,a.jsx)("span",{children:e.provider})]})}),(0,a.jsxs)(g.Z,{children:["$",(0,F.pw)(e.spend,2)]}),(0,a.jsx)(g.Z,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,a.jsx)(g.Z,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,a.jsx)(g.Z,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})})]})}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(P,{modelMetrics:e$})}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(P,{modelMetrics:eW})}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(P,{modelMetrics:eB})}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(eK,{userSpendData:J})})]})]}),"organization"===eN&&(0,a.jsxs)(a.Fragment,{children:[e_&&(0,a.jsx)(b.Z,{banner:!0,type:"info",message:"Organization usage is a new feature.",description:"Spend is tracked from feature launch and previous data isn't backfilled, so only future usage appears here.",closable:!0,onClose:()=>ev(!1),className:"mb-5"}),(0,a.jsx)(eH,{accessToken:$,entityType:"organization",userID:H,userRole:W,dateValue:en,entityList:(null==Y?void 0:Y.map(e=>({label:e.organization_alias,value:e.organization_id})))||null,premiumUser:G})]}),"team"===eN&&(0,a.jsx)(eH,{accessToken:$,entityType:"team",userID:H,userRole:W,entityList:(null==I?void 0:I.map(e=>({label:e.team_alias,value:e.team_id})))||null,premiumUser:G,dateValue:en}),"customer"===eN&&(0,a.jsxs)(a.Fragment,{children:[ek&&(0,a.jsx)(b.Z,{banner:!0,type:"info",message:"Customer usage is a new feature.",description:"Spend is tracked from feature launch and previous data isn't backfilled, so only future usage appears here.",closable:!0,onClose:()=>eZ(!1),className:"mb-5"}),(0,a.jsx)(eH,{accessToken:$,entityType:"customer",userID:H,userRole:W,entityList:(null==ed?void 0:ed.map(e=>({label:e.alias||e.user_id,value:e.user_id})))||null,premiumUser:G,dateValue:en})]}),"tag"===eN&&(0,a.jsx)(eH,{accessToken:$,entityType:"tag",userID:H,userRole:W,entityList:ec,premiumUser:G,dateValue:en}),"agent"===eN&&(0,a.jsxs)(a.Fragment,{children:[eq&&(0,a.jsx)(b.Z,{banner:!0,type:"info",message:"Agent usage (A2A) is a new feature.",description:"Spend is tracked from feature launch and previous data isn't backfilled, so only future usage appears here.",closable:!0,onClose:()=>eS(!1),className:"mb-5"}),(0,a.jsx)(eH,{accessToken:$,entityType:"agent",userID:H,userRole:W,entityList:(null==eu?void 0:null===(z=eu.agents)||void 0===z?void 0:z.map(e=>({label:e.agent_name,value:e.agent_id})))||null,premiumUser:G,dateValue:en})," "]}),"user-agent-activity"===eN&&(0,a.jsx)(eO,{accessToken:$,userRole:W,dateValue:en})]})}),(0,a.jsx)(ea,{isOpen:ep,onClose:()=>eg(!1),accessToken:$}),(0,a.jsx)(ey,{isOpen:ej,onClose:()=>ef(!1),entityType:"team",spendData:{results:J.results,metadata:J.metadata},dateRange:en,selectedFilters:[],customTitle:"Export Usage Data"})]})}},91323:function(e,s,t){t.d(s,{S:function(){return n}});var a=t(57437),r=t(2265),l=t(10012);function n(e){var s,t;let{className:n="",...i}=e,c=(0,r.useId)();return s=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),s=e.find(e=>{var s;return(null===(s=e.effect.target)||void 0===s?void 0:s.getAttribute("data-spinner-id"))===c}),t=e.find(e=>{var s;return e.effect instanceof KeyframeEffect&&(null===(s=e.effect.target)||void 0===s?void 0:s.getAttribute("data-spinner-id"))!==c});s&&t&&(s.currentTime=t.currentTime)},t=[c],(0,r.useLayoutEffect)(s,t),(0,a.jsxs)("svg",{"data-spinner-id":c,className:(0,l.cx)("pointer-events-none size-12 animate-spin text-current",n),fill:"none",viewBox:"0 0 24 24",...i,children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}},47375:function(e,s,t){var a=t(57437),r=t(2265),l=t(19250),n=t(59872),i=t(39760);s.Z=e=>{let{userSpend:s,userMaxBudget:t,selectedTeam:c}=e,{accessToken:o,userRole:d,userId:u}=(0,i.Z)(),[m,x]=(0,r.useState)(null!==s?s:0),[h,p]=(0,r.useState)(c?Number((0,n.pw)(c.max_budget,4)):null);(0,r.useEffect)(()=>{if(c){if("Default Team"===c.team_alias)p(t);else{let e=!1;if(c.team_memberships)for(let s of c.team_memberships)s.user_id===u&&"max_budget"in s.litellm_budget_table&&null!==s.litellm_budget_table.max_budget&&(p(s.litellm_budget_table.max_budget),e=!0);e||p(c.max_budget)}}else p(t)},[c,t]);let[g,j]=(0,r.useState)([]);(0,r.useEffect)(()=>{let e=async()=>{if(!o||!u||!d)return};(async()=>{try{if(null===u||null===d)return;if(null!==o){let e=(await (0,l.modelAvailableCall)(o,u,d)).data.map(e=>e.id);console.log("available_model_names:",e),j(e)}}catch(e){console.error("Error fetching user models:",e)}})(),e()},[d,o,u]),(0,r.useEffect)(()=>{null!==s&&x(s)},[s]);let f=[];c&&c.models&&(f=c.models),f&&f.includes("all-proxy-models")?(console.log("user models:",g),f=g):f&&f.includes("all-team-models")?f=c.models:f&&0===f.length&&(f=g);let _=null!==h?"$".concat((0,n.pw)(Number(h),4)," limit"):"No limit",y=void 0!==m?(0,n.pw)(m,4):null;return console.log("spend in view user spend: ".concat(m)),(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsxs)("div",{className:"flex justify-between gap-x-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content",children:"Total Spend"}),(0,a.jsxs)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:["$",y]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content",children:"Max Budget"}),(0,a.jsx)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:_})]})]})})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3138-faa6fb0b1d7f2d67.js b/litellm/proxy/_experimental/out/_next/static/chunks/3138-faa6fb0b1d7f2d67.js
new file mode 100644
index 00000000000..eb422f38d52
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/3138-faa6fb0b1d7f2d67.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3138],{58747:function(e,t,n){n.d(t,{Z:function(){return a}});var r=n(5853),o=n(2265);let a=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))}},4537:function(e,t,n){n.d(t,{Z:function(){return a}});var r=n(5853),o=n(2265);let a=e=>{var t=(0,r._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))}},27281:function(e,t,n){n.d(t,{Z:function(){return g}});var r=n(5853),o=n(58747),a=n(2265),l=n(4537),i=n(13241),c=n(1153),s=n(96398),u=n(51975),d=n(85238),m=n(44140);let b=(0,c.fn)("Select"),g=a.forwardRef((e,t)=>{let{defaultValue:n="",value:c,onValueChange:g,placeholder:f="Select...",disabled:p=!1,icon:v,enableClear:h=!1,required:y,children:w,name:E,error:O=!1,errorMessage:x,className:k,id:C}=e,N=(0,r._T)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),S=(0,a.useRef)(null),j=a.Children.toArray(w),[T,R]=(0,m.Z)(n,c),z=(0,a.useMemo)(()=>{let e=a.Children.toArray(w).filter(a.isValidElement);return(0,s.sl)(e)},[w]);return a.createElement("div",{className:(0,i.q)("w-full min-w-[10rem] text-tremor-default",k)},a.createElement("div",{className:"relative"},a.createElement("select",{title:"select-hidden",required:y,className:(0,i.q)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:T,onChange:e=>{e.preventDefault()},name:E,disabled:p,id:C,onFocus:()=>{let e=S.current;e&&e.focus()}},a.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},f),j.map(e=>{let t=e.props.value,n=e.props.children;return a.createElement("option",{className:"hidden",key:t,value:t},n)})),a.createElement(u.Ri,Object.assign({as:"div",ref:t,defaultValue:T,value:T,onChange:e=>{null==g||g(e),R(e)},disabled:p,id:C},N),e=>{var t;let{value:n}=e;return a.createElement(a.Fragment,null,a.createElement(u.Y4,{ref:S,className:(0,i.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",v?"pl-10":"pl-3",(0,s.um)((0,s.Uh)(n),p,O))},v&&a.createElement("span",{className:(0,i.q)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.createElement(v,{className:(0,i.q)(b("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.createElement("span",{className:"w-[90%] block truncate"},n&&null!==(t=z.get(n))&&void 0!==t?t:f),a.createElement("span",{className:(0,i.q)("absolute inset-y-0 right-0 flex items-center mr-3")},a.createElement(o.Z,{className:(0,i.q)(b("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),h&&T?a.createElement("button",{type:"button",className:(0,i.q)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),R(""),null==g||g("")}},a.createElement(l.Z,{className:(0,i.q)(b("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.createElement(d.u,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.createElement(u.O_,{anchor:"bottom start",className:(0,i.q)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},w)))})),O&&x?a.createElement("p",{className:(0,i.q)("errorMessage","text-sm text-rose-500 mt-1")},x):null)});g.displayName="Select"},67982:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(5853),o=n(13241),a=n(1153),l=n(2265);let i=(0,a.fn)("Divider"),c=l.forwardRef((e,t)=>{let{className:n,children:a}=e,c=(0,r._T)(e,["className","children"]);return l.createElement("div",Object.assign({ref:t,className:(0,o.q)(i("root"),"w-full mx-auto my-6 flex justify-between gap-3 items-center text-tremor-default","text-tremor-content","dark:text-dark-tremor-content",n)},c),a?l.createElement(l.Fragment,null,l.createElement("div",{className:(0,o.q)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}),l.createElement("div",{className:(0,o.q)("text-inherit whitespace-nowrap")},a),l.createElement("div",{className:(0,o.q)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")})):l.createElement("div",{className:(0,o.q)("w-full h-[1px] bg-tremor-border dark:bg-dark-tremor-border")}))});c.displayName="Divider"},33866:function(e,t,n){n.d(t,{Z:function(){return B}});var r=n(2265),o=n(36760),a=n.n(o),l=n(66632),i=n(93350),c=n(19722),s=n(71744),u=n(93463),d=n(12918),m=n(18536),b=n(71140),g=n(99320);let f=new u.E4("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),p=new u.E4("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),v=new u.E4("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),h=new u.E4("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),y=new u.E4("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),w=new u.E4("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),E=e=>{let{componentCls:t,iconCls:n,antCls:r,badgeShadowSize:o,textFontSize:a,textFontSizeSM:l,statusSize:i,dotSize:c,textFontWeight:s,indicatorHeight:b,indicatorHeightSM:g,marginXS:E,calc:O}=e,x="".concat(r,"-scroll-number"),k=(0,m.Z)(e,(e,n)=>{let{darkColor:r}=n;return{["&".concat(t," ").concat(t,"-color-").concat(e)]:{background:r,["&:not(".concat(t,"-count)")]:{color:r},"a:hover &":{background:r}}}});return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,d.Wf)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,["".concat(t,"-count")]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:b,height:b,color:e.badgeTextColor,fontWeight:s,fontSize:a,lineHeight:(0,u.bf)(b),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:O(b).div(2).equal(),boxShadow:"0 0 0 ".concat((0,u.bf)(o)," ").concat(e.badgeShadowColor),transition:"background ".concat(e.motionDurationMid),a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},["".concat(t,"-count-sm")]:{minWidth:g,height:g,fontSize:l,lineHeight:(0,u.bf)(g),borderRadius:O(g).div(2).equal()},["".concat(t,"-multiple-words")]:{padding:"0 ".concat((0,u.bf)(e.paddingXS)),bdi:{unicodeBidi:"plaintext"}},["".concat(t,"-dot")]:{zIndex:e.indicatorZIndex,width:c,minWidth:c,height:c,background:e.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat((0,u.bf)(o)," ").concat(e.badgeShadowColor)},["".concat(t,"-count, ").concat(t,"-dot, ").concat(x,"-custom-component")]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",["&".concat(n,"-spin")]:{animationName:w,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&".concat(t,"-status")]:{lineHeight:"inherit",verticalAlign:"baseline",["".concat(t,"-status-dot")]:{position:"relative",top:-1,display:"inline-block",width:i,height:i,verticalAlign:"middle",borderRadius:"50%"},["".concat(t,"-status-success")]:{backgroundColor:e.colorSuccess},["".concat(t,"-status-processing")]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:f,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},["".concat(t,"-status-default")]:{backgroundColor:e.colorTextPlaceholder},["".concat(t,"-status-error")]:{backgroundColor:e.colorError},["".concat(t,"-status-warning")]:{backgroundColor:e.colorWarning},["".concat(t,"-status-text")]:{marginInlineStart:E,color:e.colorText,fontSize:e.fontSize}}}),k),{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:p,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["".concat(t,"-zoom-leave")]:{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["&".concat(t,"-not-a-wrapper")]:{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:h,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["".concat(t,"-zoom-leave")]:{animationName:y,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["&:not(".concat(t,"-status)")]:{verticalAlign:"middle"},["".concat(x,"-custom-component, ").concat(t,"-count")]:{transform:"none"},["".concat(x,"-custom-component, ").concat(x)]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[x]:{overflow:"hidden",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseOutBack),["".concat(x,"-only")]:{position:"relative",display:"inline-block",height:b,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",["> p".concat(x,"-only-unit")]:{height:b,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},["".concat(x,"-symbol")]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",["".concat(t,"-count, ").concat(t,"-dot, ").concat(x,"-custom-component")]:{transform:"translate(-50%, -50%)"}}})}},O=e=>{let{fontHeight:t,lineWidth:n,marginXS:r,colorBorderBg:o}=e,a=e.colorTextLightSolid,l=e.colorError,i=e.colorErrorHover;return(0,b.IX)(e,{badgeFontHeight:t,badgeShadowSize:n,badgeTextColor:a,badgeColor:l,badgeColorHover:i,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},x=e=>{let{fontSize:t,lineHeight:n,fontSizeSM:r,lineWidth:o}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*n)-2*o,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}};var k=(0,g.I$)("Badge",e=>E(O(e)),x);let C=e=>{let{antCls:t,badgeFontHeight:n,marginXS:r,badgeRibbonOffset:o,calc:a}=e,l="".concat(t,"-ribbon"),i=(0,m.Z)(e,(e,t)=>{let{darkColor:n}=t;return{["&".concat(l,"-color-").concat(e)]:{background:n,color:n}}});return{["".concat(t,"-ribbon-wrapper")]:{position:"relative"},[l]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,d.Wf)(e)),{position:"absolute",top:r,padding:"0 ".concat((0,u.bf)(e.paddingXS)),color:e.colorPrimary,lineHeight:(0,u.bf)(n),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,["".concat(l,"-text")]:{color:e.badgeTextColor},["".concat(l,"-corner")]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:"".concat((0,u.bf)(a(o).div(2).equal())," solid"),transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),i),{["&".concat(l,"-placement-end")]:{insetInlineEnd:a(o).mul(-1).equal(),borderEndEndRadius:0,["".concat(l,"-corner")]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},["&".concat(l,"-placement-start")]:{insetInlineStart:a(o).mul(-1).equal(),borderEndStartRadius:0,["".concat(l,"-corner")]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}};var N=(0,g.I$)(["Badge","Ribbon"],e=>C(O(e)),x);let S=e=>{let t;let{prefixCls:n,value:o,current:l,offset:i=0}=e;return i&&(t={position:"absolute",top:"".concat(i,"00%"),left:0}),r.createElement("span",{style:t,className:a()("".concat(n,"-only-unit"),{current:l})},o)};var j=e=>{let t,n;let{prefixCls:o,count:a,value:l}=e,i=Number(l),c=Math.abs(a),[s,u]=r.useState(i),[d,m]=r.useState(c),b=()=>{u(i),m(c)};if(r.useEffect(()=>{let e=setTimeout(b,1e3);return()=>clearTimeout(e)},[i]),s===i||Number.isNaN(i)||Number.isNaN(s))t=[r.createElement(S,Object.assign({},e,{key:i,current:!0}))],n={transition:"none"};else{t=[];let o=i+10,a=[];for(let e=i;e<=o;e+=1)a.push(e);let l=de%10===s);t=(l<0?a.slice(0,u+1):a.slice(u)).map((t,n)=>r.createElement(S,Object.assign({},e,{key:t,value:t%10,offset:l<0?n-u:n,current:n===u}))),n={transform:"translateY(".concat(-function(e,t,n){let r=e,o=0;for(;(r+10)%10!==t;)r+=n,o+=n;return o}(s,i,l),"00%)")}}return r.createElement("span",{className:"".concat(o,"-only"),style:n,onTransitionEnd:b},t)},T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let R=r.forwardRef((e,t)=>{let{prefixCls:n,count:o,className:l,motionClassName:i,style:u,title:d,show:m,component:b="sup",children:g}=e,f=T(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:p}=r.useContext(s.E_),v=p("scroll-number",n),h=Object.assign(Object.assign({},f),{"data-show":m,style:u,className:a()(v,l,i),title:d}),y=o;if(o&&Number(o)%1==0){let e=String(o).split("");y=r.createElement("bdi",null,e.map((t,n)=>r.createElement(j,{prefixCls:v,count:Number(o),value:t,key:e.length-n})))}return((null==u?void 0:u.borderColor)&&(h.style=Object.assign(Object.assign({},u),{boxShadow:"0 0 0 1px ".concat(u.borderColor," inset")})),g)?(0,c.Tm)(g,e=>({className:a()("".concat(v,"-custom-component"),null==e?void 0:e.className,i)})):r.createElement(b,Object.assign({},h,{ref:t}),y)});var z=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let Z=r.forwardRef((e,t)=>{var n,o,u,d,m;let{prefixCls:b,scrollNumberPrefixCls:g,children:f,status:p,text:v,color:h,count:y=null,overflowCount:w=99,dot:E=!1,size:O="default",title:x,offset:C,style:N,className:S,rootClassName:j,classNames:T,styles:Z,showZero:B=!1}=e,P=z(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:M,direction:F,badge:I}=r.useContext(s.E_),L=M("badge",b),[D,q,H]=k(L),A=y>w?"".concat(w,"+"):y,_="0"===A||0===A||"0"===v||0===v,W=null===y||_&&!B,V=(null!=p||null!=h)&&W,X=null!=p||!_,U=E&&!_,Y=U?"":A,G=(0,r.useMemo)(()=>((null==Y||""===Y)&&(null==v||""===v)||_&&!B)&&!U,[Y,_,B,U,v]),J=(0,r.useRef)(y);G||(J.current=y);let Q=J.current,$=(0,r.useRef)(Y);G||($.current=Y);let K=$.current,ee=(0,r.useRef)(U);G||(ee.current=U);let et=(0,r.useMemo)(()=>{if(!C)return Object.assign(Object.assign({},null==I?void 0:I.style),N);let e={marginTop:C[1]};return"rtl"===F?e.left=Number.parseInt(C[0],10):e.right=-Number.parseInt(C[0],10),Object.assign(Object.assign(Object.assign({},e),null==I?void 0:I.style),N)},[F,C,N,null==I?void 0:I.style]),en=null!=x?x:"string"==typeof Q||"number"==typeof Q?Q:void 0,er=!G&&(0===v?B:!!v&&!0!==v),eo=er?r.createElement("span",{className:"".concat(L,"-status-text")},v):null,ea=Q&&"object"==typeof Q?(0,c.Tm)(Q,e=>({style:Object.assign(Object.assign({},et),e.style)})):void 0,el=(0,i.o2)(h,!1),ei=a()(null==T?void 0:T.indicator,null===(n=null==I?void 0:I.classNames)||void 0===n?void 0:n.indicator,{["".concat(L,"-status-dot")]:V,["".concat(L,"-status-").concat(p)]:!!p,["".concat(L,"-color-").concat(h)]:el}),ec={};h&&!el&&(ec.color=h,ec.background=h);let es=a()(L,{["".concat(L,"-status")]:V,["".concat(L,"-not-a-wrapper")]:!f,["".concat(L,"-rtl")]:"rtl"===F},S,j,null==I?void 0:I.className,null===(o=null==I?void 0:I.classNames)||void 0===o?void 0:o.root,null==T?void 0:T.root,q,H);if(!f&&V&&(v||X||!W)){let e=et.color;return D(r.createElement("span",Object.assign({},P,{className:es,style:Object.assign(Object.assign(Object.assign({},null==Z?void 0:Z.root),null===(u=null==I?void 0:I.styles)||void 0===u?void 0:u.root),et)}),r.createElement("span",{className:ei,style:Object.assign(Object.assign(Object.assign({},null==Z?void 0:Z.indicator),null===(d=null==I?void 0:I.styles)||void 0===d?void 0:d.indicator),ec)}),er&&r.createElement("span",{style:{color:e},className:"".concat(L,"-status-text")},v)))}return D(r.createElement("span",Object.assign({ref:t},P,{className:es,style:Object.assign(Object.assign({},null===(m=null==I?void 0:I.styles)||void 0===m?void 0:m.root),null==Z?void 0:Z.root)}),f,r.createElement(l.ZP,{visible:!G,motionName:"".concat(L,"-zoom"),motionAppear:!1,motionDeadline:1e3},e=>{var t,n;let{className:o}=e,l=M("scroll-number",g),i=ee.current,c=a()(null==T?void 0:T.indicator,null===(t=null==I?void 0:I.classNames)||void 0===t?void 0:t.indicator,{["".concat(L,"-dot")]:i,["".concat(L,"-count")]:!i,["".concat(L,"-count-sm")]:"small"===O,["".concat(L,"-multiple-words")]:!i&&K&&K.toString().length>1,["".concat(L,"-status-").concat(p)]:!!p,["".concat(L,"-color-").concat(h)]:el}),s=Object.assign(Object.assign(Object.assign({},null==Z?void 0:Z.indicator),null===(n=null==I?void 0:I.styles)||void 0===n?void 0:n.indicator),et);return h&&!el&&((s=s||{}).background=h),r.createElement(R,{prefixCls:l,show:!G,motionClassName:o,className:c,count:K,title:en,style:s,key:"scrollNumber"},ea)}),eo))});Z.Ribbon=e=>{let{className:t,prefixCls:n,style:o,color:l,children:c,text:u,placement:d="end",rootClassName:m}=e,{getPrefixCls:b,direction:g}=r.useContext(s.E_),f=b("ribbon",n),p="".concat(f,"-wrapper"),[v,h,y]=N(f,p),w=(0,i.o2)(l,!1),E=a()(f,"".concat(f,"-placement-").concat(d),{["".concat(f,"-rtl")]:"rtl"===g,["".concat(f,"-color-").concat(l)]:w},t),O={},x={};return l&&!w&&(O.background=l,x.color=l),v(r.createElement("div",{className:a()(p,m,h,y)},c,r.createElement("div",{className:a()(E,h),style:Object.assign(Object.assign({},O),o)},r.createElement("span",{className:"".concat(f,"-text")},u),r.createElement("div",{className:"".concat(f,"-corner"),style:x}))))};var B=Z},2651:function(e,t,n){n.d(t,{Z:function(){return y}});var r=n(93463),o=n(11938),a=n(70774),l=n(73602),i=n(91691),c=n(25119),s=n(37628),u=n(32417),d=n(4877),m=n(57943),b=n(12789),g=n(54558);let f=(e,t)=>new g.t(e).setA(t).toRgbString(),p=(e,t)=>new g.t(e).lighten(t).toHexString(),v=e=>{let t=(0,m.R_)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},h=(e,t)=>{let n=e||"#000",r=t||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:f(r,.85),colorTextSecondary:f(r,.65),colorTextTertiary:f(r,.45),colorTextQuaternary:f(r,.25),colorFill:f(r,.18),colorFillSecondary:f(r,.12),colorFillTertiary:f(r,.08),colorFillQuaternary:f(r,.04),colorBgSolid:f(r,.95),colorBgSolidHover:f(r,1),colorBgSolidActive:f(r,.9),colorBgElevated:p(n,12),colorBgContainer:p(n,8),colorBgLayout:p(n,0),colorBgSpotlight:p(n,26),colorBgBlur:f(r,.04),colorBorder:p(n,26),colorBorderSecondary:p(n,19)}};var y={defaultSeed:c.u_.token,useToken:function(){let[e,t,n]=(0,i.ZP)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:s.Z,darkAlgorithm:(e,t)=>{let n=Object.keys(a.M).map(t=>{let n=(0,m.R_)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,r,o)=>(e["".concat(t,"-").concat(o+1)]=n[o],e["".concat(t).concat(o+1)]=n[o],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),r=null!=t?t:(0,s.Z)(e),o=(0,b.Z)(e,{generateColorPalettes:v,generateNeutralColorPalettes:h});return Object.assign(Object.assign(Object.assign(Object.assign({},r),n),o),{colorPrimaryBg:o.colorPrimaryBorder,colorPrimaryBgHover:o.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,s.Z)(e),r=n.fontSizeSM,o=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){let{sizeUnit:t,sizeStep:n}=e,r=n-2;return{sizeXXL:t*(r+10),sizeXL:t*(r+6),sizeLG:t*(r+2),sizeMD:t*(r+2),sizeMS:t*(r+1),size:t*r,sizeSM:t*r,sizeXS:t*(r-1),sizeXXS:t*(r-1)}}(null!=t?t:e)),(0,d.Z)(r)),{controlHeight:o}),(0,u.Z)(Object.assign(Object.assign({},n),{controlHeight:o})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,r.jG)(e.algorithm):o.Z,n=Object.assign(Object.assign({},a.Z),null==e?void 0:e.token);return(0,r.t2)(n,{override:null==e?void 0:e.token},t,l.Z)},defaultConfig:c.u_,_internalContext:c.Mj}},85238:function(e,t,n){let r;n.d(t,{u:function(){return j}});var o=n(2265),a=n(59456),l=n(93980),i=n(25289),c=n(73389),s=n(43507),u=n(180),d=n(67561),m=n(98218),b=n(28294),g=n(95504),f=n(72468),p=n(38929);function v(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:x)!==o.Fragment||1===o.Children.count(e.children)}let h=(0,o.createContext)(null);h.displayName="TransitionContext";var y=((r=y||{}).Visible="visible",r.Hidden="hidden",r);let w=(0,o.createContext)(null);function E(e){return"children"in e?E(e.children):e.current.filter(e=>{let{el:t}=e;return null!==t.current}).filter(e=>{let{state:t}=e;return"visible"===t}).length>0}function O(e,t){let n=(0,s.E)(e),r=(0,o.useRef)([]),c=(0,i.t)(),u=(0,a.G)(),d=(0,l.z)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.l4.Hidden,o=r.current.findIndex(t=>{let{el:n}=t;return n===e});-1!==o&&((0,f.E)(t,{[p.l4.Unmount](){r.current.splice(o,1)},[p.l4.Hidden](){r.current[o].state="hidden"}}),u.microTask(()=>{var e;!E(r)&&c.current&&(null==(e=n.current)||e.call(n))}))}),m=(0,l.z)(e=>{let t=r.current.find(t=>{let{el:n}=t;return n===e});return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>d(e,p.l4.Unmount)}),b=(0,o.useRef)([]),g=(0,o.useRef)(Promise.resolve()),v=(0,o.useRef)({enter:[],leave:[]}),h=(0,l.z)((e,n,r)=>{b.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(t=>{let[n]=t;return n!==e})),null==t||t.chains.current[n].push([e,new Promise(e=>{b.current.push(e)})]),null==t||t.chains.current[n].push([e,new Promise(e=>{Promise.all(v.current[n].map(e=>{let[t,n]=e;return n})).then(()=>e())})]),"enter"===n?g.current=g.current.then(()=>null==t?void 0:t.wait.current).then(()=>r(n)):r(n)}),y=(0,l.z)((e,t,n)=>{Promise.all(v.current[t].splice(0).map(e=>{let[t,n]=e;return n})).then(()=>{var e;null==(e=b.current.shift())||e()}).then(()=>n(t))});return(0,o.useMemo)(()=>({children:r,register:m,unregister:d,onStart:h,onStop:y,wait:g,chains:v}),[m,d,r,h,y,v,g])}w.displayName="NestingContext";let x=o.Fragment,k=p.VN.RenderStrategy,C=(0,p.yV)(function(e,t){let{show:n,appear:r=!1,unmount:a=!0,...i}=e,s=(0,o.useRef)(null),m=v(e),g=(0,d.T)(...m?[s,t]:null===t?[]:[t]);(0,u.H)();let f=(0,b.oJ)();if(void 0===n&&null!==f&&(n=(f&b.ZM.Open)===b.ZM.Open),void 0===n)throw Error("A is used but it is missing a `show={true | false}` prop.");let[y,x]=(0,o.useState)(n?"visible":"hidden"),C=O(()=>{n||x("hidden")}),[S,j]=(0,o.useState)(!0),T=(0,o.useRef)([n]);(0,c.e)(()=>{!1!==S&&T.current[T.current.length-1]!==n&&(T.current.push(n),j(!1))},[T,n]);let R=(0,o.useMemo)(()=>({show:n,appear:r,initial:S}),[n,r,S]);(0,c.e)(()=>{n?x("visible"):E(C)||null===s.current||x("hidden")},[n,C]);let z={unmount:a},Z=(0,l.z)(()=>{var t;S&&j(!1),null==(t=e.beforeEnter)||t.call(e)}),B=(0,l.z)(()=>{var t;S&&j(!1),null==(t=e.beforeLeave)||t.call(e)}),P=(0,p.L6)();return o.createElement(w.Provider,{value:C},o.createElement(h.Provider,{value:R},P({ourProps:{...z,as:o.Fragment,children:o.createElement(N,{ref:g,...z,...i,beforeEnter:Z,beforeLeave:B})},theirProps:{},defaultTag:o.Fragment,features:k,visible:"visible"===y,name:"Transition"})))}),N=(0,p.yV)(function(e,t){var n,r;let{transition:a=!0,beforeEnter:i,afterEnter:s,beforeLeave:y,afterLeave:C,enter:N,enterFrom:S,enterTo:j,entered:T,leave:R,leaveFrom:z,leaveTo:Z,...B}=e,[P,M]=(0,o.useState)(null),F=(0,o.useRef)(null),I=v(e),L=(0,d.T)(...I?[F,t,M]:null===t?[]:[t]),D=null==(n=B.unmount)||n?p.l4.Unmount:p.l4.Hidden,{show:q,appear:H,initial:A}=function(){let e=(0,o.useContext)(h);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[_,W]=(0,o.useState)(q?"visible":"hidden"),V=function(){let e=(0,o.useContext)(w);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:X,unregister:U}=V;(0,c.e)(()=>X(F),[X,F]),(0,c.e)(()=>{if(D===p.l4.Hidden&&F.current){if(q&&"visible"!==_){W("visible");return}return(0,f.E)(_,{hidden:()=>U(F),visible:()=>X(F)})}},[_,F,X,U,q,D]);let Y=(0,u.H)();(0,c.e)(()=>{if(I&&Y&&"visible"===_&&null===F.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[F,_,Y,I]);let G=A&&!H,J=H&&q&&A,Q=(0,o.useRef)(!1),$=O(()=>{Q.current||(W("hidden"),U(F))},V),K=(0,l.z)(e=>{Q.current=!0,$.onStart(F,e?"enter":"leave",e=>{"enter"===e?null==i||i():"leave"===e&&(null==y||y())})}),ee=(0,l.z)(e=>{let t=e?"enter":"leave";Q.current=!1,$.onStop(F,t,e=>{"enter"===e?null==s||s():"leave"===e&&(null==C||C())}),"leave"!==t||E($)||(W("hidden"),U(F))});(0,o.useEffect)(()=>{I&&a||(K(q),ee(q))},[q,I,a]);let et=!(!a||!I||!Y||G),[,en]=(0,m.Y)(et,P,q,{start:K,end:ee}),er=(0,p.oA)({ref:L,className:(null==(r=(0,g.A)(B.className,J&&N,J&&S,en.enter&&N,en.enter&&en.closed&&S,en.enter&&!en.closed&&j,en.leave&&R,en.leave&&!en.closed&&z,en.leave&&en.closed&&Z,!en.transition&&q&&T))?void 0:r.trim())||void 0,...(0,m.X)(en)}),eo=0;"visible"===_&&(eo|=b.ZM.Open),"hidden"===_&&(eo|=b.ZM.Closed),en.enter&&(eo|=b.ZM.Opening),en.leave&&(eo|=b.ZM.Closing);let ea=(0,p.L6)();return o.createElement(w.Provider,{value:$},o.createElement(b.up,{value:eo},ea({ourProps:er,theirProps:B,defaultTag:x,features:k,visible:"visible"===_,name:"Transition.Child"})))}),S=(0,p.yV)(function(e,t){let n=null!==(0,o.useContext)(h),r=null!==(0,b.oJ)();return o.createElement(o.Fragment,null,!n&&r?o.createElement(C,{ref:t,...e}):o.createElement(N,{ref:t,...e}))}),j=Object.assign(C,{Child:S,Root:C})}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3242-663d3264e87271d0.js b/litellm/proxy/_experimental/out/_next/static/chunks/3242-663d3264e87271d0.js
deleted file mode 100644
index ca70e6ca4e7..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/3242-663d3264e87271d0.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3242],{51653:function(t,e,n){n.d(e,{Z:function(){return L}});var o=n(2265),a=n(8900),r=n(39725),i=n(49638),s=n(54537),c=n(55726),l=n(36760),u=n.n(l),d=n(66632),p=n(18242),m=n(28791),h=n(19722),g=n(71744),f=n(93463),b=n(12918),y=n(99320);let v=(t,e,n,o,a)=>({background:t,border:"".concat((0,f.bf)(o.lineWidth)," ").concat(o.lineType," ").concat(e),["".concat(a,"-icon")]:{color:n}}),O=t=>{let{componentCls:e,motionDurationSlow:n,marginXS:o,marginSM:a,fontSize:r,fontSizeLG:i,lineHeight:s,borderRadiusLG:c,motionEaseInOutCirc:l,withDescriptionIconSize:u,colorText:d,colorTextHeading:p,withDescriptionPadding:m,defaultPadding:h}=t;return{[e]:Object.assign(Object.assign({},(0,b.Wf)(t)),{position:"relative",display:"flex",alignItems:"center",padding:h,wordWrap:"break-word",borderRadius:c,["&".concat(e,"-rtl")]:{direction:"rtl"},["".concat(e,"-content")]:{flex:1,minWidth:0},["".concat(e,"-icon")]:{marginInlineEnd:o,lineHeight:0},"&-description":{display:"none",fontSize:r,lineHeight:s},"&-message":{color:p},["&".concat(e,"-motion-leave")]:{overflow:"hidden",opacity:1,transition:"max-height ".concat(n," ").concat(l,", opacity ").concat(n," ").concat(l,",\n padding-top ").concat(n," ").concat(l,", padding-bottom ").concat(n," ").concat(l,",\n margin-bottom ").concat(n," ").concat(l)},["&".concat(e,"-motion-leave-active")]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),["".concat(e,"-with-description")]:{alignItems:"flex-start",padding:m,["".concat(e,"-icon")]:{marginInlineEnd:a,fontSize:u,lineHeight:0},["".concat(e,"-message")]:{display:"block",marginBottom:o,color:p,fontSize:i},["".concat(e,"-description")]:{display:"block",color:d}},["".concat(e,"-banner")]:{marginBottom:0,border:"0 !important",borderRadius:0}}},S=t=>{let{componentCls:e,colorSuccess:n,colorSuccessBorder:o,colorSuccessBg:a,colorWarning:r,colorWarningBorder:i,colorWarningBg:s,colorError:c,colorErrorBorder:l,colorErrorBg:u,colorInfo:d,colorInfoBorder:p,colorInfoBg:m}=t;return{[e]:{"&-success":v(a,o,n,t,e),"&-info":v(m,p,d,t,e),"&-warning":v(s,i,r,t,e),"&-error":Object.assign(Object.assign({},v(u,l,c,t,e)),{["".concat(e,"-description > pre")]:{margin:0,padding:0}})}}},E=t=>{let{componentCls:e,iconCls:n,motionDurationMid:o,marginXS:a,fontSizeIcon:r,colorIcon:i,colorIconHover:s}=t;return{[e]:{"&-action":{marginInlineStart:a},["".concat(e,"-close-icon")]:{marginInlineStart:a,padding:0,overflow:"hidden",fontSize:r,lineHeight:(0,f.bf)(r),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",["".concat(n,"-close")]:{color:i,transition:"color ".concat(o),"&:hover":{color:s}}},"&-close-text":{color:i,transition:"color ".concat(o),"&:hover":{color:s}}}}};var w=(0,y.I$)("Alert",t=>[O(t),S(t),E(t)],t=>({withDescriptionIconSize:t.fontSizeHeading3,defaultPadding:"".concat(t.paddingContentVerticalSM,"px ").concat(12,"px"),withDescriptionPadding:"".concat(t.paddingMD,"px ").concat(t.paddingContentHorizontalLG,"px")})),x=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(t);ae.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(t,o[a])&&(n[o[a]]=t[o[a]]);return n};let I={success:a.Z,info:c.Z,error:r.Z,warning:s.Z},C=t=>{let{icon:e,prefixCls:n,type:a}=t,r=I[a]||null;return e?(0,h.wm)(e,o.createElement("span",{className:"".concat(n,"-icon")},e),()=>({className:u()("".concat(n,"-icon"),e.props.className)})):o.createElement(r,{className:"".concat(n,"-icon")})},j=t=>{let{isClosable:e,prefixCls:n,closeIcon:a,handleClose:r,ariaProps:s}=t,c=!0===a||void 0===a?o.createElement(i.Z,null):a;return e?o.createElement("button",Object.assign({type:"button",onClick:r,className:"".concat(n,"-close-icon"),tabIndex:0},s),c):null},N=o.forwardRef((t,e)=>{let{description:n,prefixCls:a,message:r,banner:i,className:s,rootClassName:c,style:l,onMouseEnter:h,onMouseLeave:f,onClick:b,afterClose:y,showIcon:v,closable:O,closeText:S,closeIcon:E,action:I,id:N}=t,M=x(t,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[R,k]=o.useState(!1),z=o.useRef(null);o.useImperativeHandle(e,()=>({nativeElement:z.current}));let{getPrefixCls:G,direction:Z,closable:P,closeIcon:L,className:H,style:D}=(0,g.dj)("alert"),A=G("alert",a),[W,K,B]=w(A),_=e=>{var n;k(!0),null===(n=t.onClose)||void 0===n||n.call(t,e)},T=o.useMemo(()=>void 0!==t.type?t.type:i?"warning":"info",[t.type,i]),V=o.useMemo(()=>"object"==typeof O&&!!O.closeIcon||!!S||("boolean"==typeof O?O:!1!==E&&null!=E||!!P),[S,E,O,P]),U=!!i&&void 0===v||v,X=u()(A,"".concat(A,"-").concat(T),{["".concat(A,"-with-description")]:!!n,["".concat(A,"-no-icon")]:!U,["".concat(A,"-banner")]:!!i,["".concat(A,"-rtl")]:"rtl"===Z},H,s,c,B,K),$=(0,p.Z)(M,{aria:!0,data:!0}),Y=o.useMemo(()=>"object"==typeof O&&O.closeIcon?O.closeIcon:S||(void 0!==E?E:"object"==typeof P&&P.closeIcon?P.closeIcon:L),[E,O,P,S,L]),F=o.useMemo(()=>{let t=null!=O?O:P;if("object"==typeof t){let{closeIcon:e}=t;return x(t,["closeIcon"])}return{}},[O,P]);return W(o.createElement(d.ZP,{visible:!R,motionName:"".concat(A,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:t=>({maxHeight:t.offsetHeight}),onLeaveEnd:y},(e,a)=>{let{className:i,style:s}=e;return o.createElement("div",Object.assign({id:N,ref:(0,m.sQ)(z,a),"data-show":!R,className:u()(X,i),style:Object.assign(Object.assign(Object.assign({},D),l),s),onMouseEnter:h,onMouseLeave:f,onClick:b,role:"alert"},$),U?o.createElement(C,{description:n,icon:t.icon,prefixCls:A,type:T}):null,o.createElement("div",{className:"".concat(A,"-content")},r?o.createElement("div",{className:"".concat(A,"-message")},r):null,n?o.createElement("div",{className:"".concat(A,"-description")},n):null),I?o.createElement("div",{className:"".concat(A,"-action")},I):null,o.createElement(j,{isClosable:V,prefixCls:A,closeIcon:Y,handleClose:_,ariaProps:F}))}))});var M=n(76405),R=n(25049),k=n(24995),z=n(63929),G=n(37977),Z=n(41690);let P=function(t){function e(){var t,n,o;return(0,M.Z)(this,e),n=e,o=arguments,n=(0,k.Z)(n),(t=(0,G.Z)(this,(0,z.Z)()?Reflect.construct(n,o||[],(0,k.Z)(this).constructor):n.apply(this,o))).state={error:void 0,info:{componentStack:""}},t}return(0,Z.Z)(e,t),(0,R.Z)(e,[{key:"componentDidCatch",value:function(t,e){this.setState({error:t,info:e})}},{key:"render",value:function(){let{message:t,description:e,id:n,children:a}=this.props,{error:r,info:i}=this.state,s=(null==i?void 0:i.componentStack)||null,c=void 0===t?(r||"").toString():t;return r?o.createElement(N,{id:n,type:"error",message:c,description:o.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},void 0===e?s:e)}):a}}])}(o.Component);N.ErrorBoundary=P;var L=N},58760:function(t,e,n){n.d(e,{Z:function(){return C}});var o=n(2265),a=n(36760),r=n.n(a),i=n(45287);function s(t){return["small","middle","large"].includes(t)}function c(t){return!!t&&"number"==typeof t&&!Number.isNaN(t)}var l=n(71744),u=n(77685),d=n(17691),p=n(99320);let m=t=>{let{componentCls:e,borderRadius:n,paddingSM:o,colorBorder:a,paddingXS:r,fontSizeLG:i,fontSizeSM:s,borderRadiusLG:c,borderRadiusSM:l,colorBgContainerDisabled:u,lineWidth:p}=t;return{[e]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:o,margin:0,background:u,borderWidth:p,borderStyle:"solid",borderColor:a,borderRadius:n,"&-large":{fontSize:i,borderRadius:c},"&-small":{paddingInline:r,borderRadius:l,fontSize:s},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,d.c)(t,{focus:!1})]}};var h=(0,p.I$)(["Space","Addon"],t=>[m(t)]),g=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(t);ae.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(t,o[a])&&(n[o[a]]=t[o[a]]);return n};let f=o.forwardRef((t,e)=>{let{className:n,children:a,style:i,prefixCls:s}=t,c=g(t,["className","children","style","prefixCls"]),{getPrefixCls:d,direction:p}=o.useContext(l.E_),m=d("space-addon",s),[f,b,y]=h(m),{compactItemClassnames:v,compactSize:O}=(0,u.ri)(m,p),S=r()(m,b,v,y,{["".concat(m,"-").concat(O)]:O},n);return f(o.createElement("div",Object.assign({ref:e,className:S,style:i},c),a))}),b=o.createContext({latestIndex:0}),y=b.Provider;var v=t=>{let{className:e,index:n,children:a,split:r,style:i}=t,{latestIndex:s}=o.useContext(b);return null==a?null:o.createElement(o.Fragment,null,o.createElement("div",{className:e,style:i},a),n{let{componentCls:e,antCls:n}=t;return{[e]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},["".concat(e,"-item:empty")]:{display:"none"},["".concat(e,"-item > ").concat(n,"-badge-not-a-wrapper:only-child")]:{display:"block"}}}},E=t=>{let{componentCls:e}=t;return{[e]:{"&-gap-row-small":{rowGap:t.spaceGapSmallSize},"&-gap-row-middle":{rowGap:t.spaceGapMiddleSize},"&-gap-row-large":{rowGap:t.spaceGapLargeSize},"&-gap-col-small":{columnGap:t.spaceGapSmallSize},"&-gap-col-middle":{columnGap:t.spaceGapMiddleSize},"&-gap-col-large":{columnGap:t.spaceGapLargeSize}}}};var w=(0,p.I$)("Space",t=>{let e=(0,O.IX)(t,{spaceGapSmallSize:t.paddingXS,spaceGapMiddleSize:t.padding,spaceGapLargeSize:t.paddingLG});return[S(e),E(e)]},()=>({}),{resetStyle:!1}),x=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(t);ae.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(t,o[a])&&(n[o[a]]=t[o[a]]);return n};let I=o.forwardRef((t,e)=>{var n;let{getPrefixCls:a,direction:u,size:d,className:p,style:m,classNames:h,styles:g}=(0,l.dj)("space"),{size:f=null!=d?d:"small",align:b,className:O,rootClassName:S,children:E,direction:I="horizontal",prefixCls:C,split:j,style:N,wrap:M=!1,classNames:R,styles:k}=t,z=x(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[G,Z]=Array.isArray(f)?f:[f,f],P=s(Z),L=s(G),H=c(Z),D=c(G),A=(0,i.Z)(E,{keepEmpty:!0}),W=void 0===b&&"horizontal"===I?"center":b,K=a("space",C),[B,_,T]=w(K),V=r()(K,p,_,"".concat(K,"-").concat(I),{["".concat(K,"-rtl")]:"rtl"===u,["".concat(K,"-align-").concat(W)]:W,["".concat(K,"-gap-row-").concat(Z)]:P,["".concat(K,"-gap-col-").concat(G)]:L},O,S,T),U=r()("".concat(K,"-item"),null!==(n=null==R?void 0:R.item)&&void 0!==n?n:h.item),X=Object.assign(Object.assign({},g.item),null==k?void 0:k.item),$=A.map((t,e)=>{let n=(null==t?void 0:t.key)||"".concat(U,"-").concat(e);return o.createElement(v,{className:U,key:n,index:e,split:j,style:X},t)}),Y=o.useMemo(()=>({latestIndex:A.reduce((t,e,n)=>null!=e?n:t,0)}),[A]);if(0===A.length)return null;let F={};return M&&(F.flexWrap="wrap"),!L&&D&&(F.columnGap=G),!P&&H&&(F.rowGap=Z),B(o.createElement("div",Object.assign({ref:e,className:V,style:Object.assign(Object.assign(Object.assign({},F),m),N)},z),o.createElement(y,{value:Y},$)))});I.Compact=u.ZP,I.Addon=f;var C=I},21770:function(t,e,n){n.d(e,{D:function(){return u}});var o=n(2265),a=n(2894),r=n(18238),i=n(24112),s=n(45345),c=class extends i.l{#t;#e=void 0;#n;#o;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,s.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,s.Ym)(e.mutationKey)!==(0,s.Ym)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#r(t)}getCurrentResult(){return this.#e}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#r()}mutate(t,e){return this.#o=e,this.#n?.removeObserver(this),this.#n=this.#t.getMutationCache().build(this.#t,this.options),this.#n.addObserver(this),this.#n.execute(t)}#a(){let t=this.#n?.state??(0,a.R)();this.#e={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#r(t){r.Vr.batch(()=>{if(this.#o&&this.hasListeners()){let e=this.#e.variables,n=this.#e.context,o={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#o.onSuccess?.(t.data,e,n,o),this.#o.onSettled?.(t.data,null,e,n,o)):t?.type==="error"&&(this.#o.onError?.(t.error,e,n,o),this.#o.onSettled?.(void 0,t.error,e,n,o))}this.listeners.forEach(t=>{t(this.#e)})})}},l=n(29827);function u(t,e){let n=(0,l.NL)(e),[a]=o.useState(()=>new c(n,t));o.useEffect(()=>{a.setOptions(t)},[a,t]);let i=o.useSyncExternalStore(o.useCallback(t=>a.subscribe(r.Vr.batchCalls(t)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),u=o.useCallback((t,e)=>{a.mutate(t,e).catch(s.ZT)},[a]);if(i.error&&(0,s.L3)(a.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3331-37f4428be6db0332.js b/litellm/proxy/_experimental/out/_next/static/chunks/3331-37f4428be6db0332.js
new file mode 100644
index 00000000000..4d97641c324
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/3331-37f4428be6db0332.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3331],{12660:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(1119),a=n(2265),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"},c=n(55015),i=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,r.Z)({},e,{ref:t,icon:l}))})},44625:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(1119),a=n(2265),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"},c=n(55015),i=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,r.Z)({},e,{ref:t,icon:l}))})},38434:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(1119),a=n(2265),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},c=n(55015),i=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,r.Z)({},e,{ref:t,icon:l}))})},92403:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(1119),a=n(2265),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5l-41.1 41.1-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-44.9 44.9-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-65.3 65.3a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6A304.06 304.06 0 00608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644c-60.9 0-118.2-23.7-161.2-66.8-43.1-43-66.8-100.3-66.8-161.2 0-60.9 23.7-118.2 66.8-161.2 43-43.1 100.3-66.8 161.2-66.8 60.9 0 118.2 23.7 161.2 66.8 43.1 43 66.8 100.3 66.8 161.2 0 60.9-23.7 118.2-66.8 161.2z"}}]},name:"key",theme:"outlined"},c=n(55015),i=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,r.Z)({},e,{ref:t,icon:l}))})},55322:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(1119),a=n(2265),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},c=n(55015),i=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,r.Z)({},e,{ref:t,icon:l}))})},71891:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(1119),a=n(2265),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm62.6-651.7l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9zm60.16 186.23a48 48 0 1067.88-67.89 48 48 0 10-67.88 67.89zM889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z"}}]},name:"tags",theme:"outlined"},c=n(55015),i=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,r.Z)({},e,{ref:t,icon:l}))})},58630:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(1119),a=n(2265),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"},c=n(55015),i=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,r.Z)({},e,{ref:t,icon:l}))})},41649:function(e,t,n){n.d(t,{Z:function(){return g}});var r=n(5853),a=n(2265),l=n(47187),c=n(7084),i=n(26898),o=n(13241),s=n(1153);let d={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},u={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},f=(0,s.fn)("Badge"),g=a.forwardRef((e,t)=>{let{color:n,icon:g,size:m=c.u8.SM,tooltip:h,className:p,children:v}=e,b=(0,r._T)(e,["color","icon","size","tooltip","className","children"]),w=g||null,{tooltipProps:z,getReferenceProps:x}=(0,l.l)();return a.createElement("span",Object.assign({ref:(0,s.lq)([t,z.refs.setReference]),className:(0,o.q)(f("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",n?(0,o.q)((0,s.bM)(n,i.K.background).bgColor,(0,s.bM)(n,i.K.iconText).textColor,(0,s.bM)(n,i.K.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,o.q)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),d[m].paddingX,d[m].paddingY,d[m].fontSize,p)},x,b),a.createElement(l.Z,Object.assign({text:h},z)),w?a.createElement(w,{className:(0,o.q)(f("icon"),"shrink-0 -ml-1 mr-1.5",u[m].height,u[m].width)}):null,a.createElement("span",{className:(0,o.q)(f("text"),"whitespace-nowrap")},v))});g.displayName="Badge"},53253:function(e,t){t.Z=function(){for(var e=arguments.length,t=Array(e),n=0;n{e&&Object.keys(e).forEach(t=>{void 0!==e[t]&&(r[t]=e[t])})}),r}},53445:function(e,t,n){n.d(t,{b:function(){return f},w:function(){return s}});var r=n(2265),a=n(49638),l=n(18242),c=n(55274),i=n(37381),o=n(53253);function s(e){if(!e)return;let{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}}function d(e){let{closable:t,closeIcon:n}=e||{};return r.useMemo(()=>{if(!t&&(!1===t||!1===n||null===n))return!1;if(void 0===t&&void 0===n)return null;let e={closeIcon:"boolean"!=typeof n&&null!==n?n:void 0};return t&&"object"==typeof t&&(e=Object.assign(Object.assign({},e),t)),e},[t,n])}let u={},f=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,s=d(e),f=d(t),[g]=(0,c.Z)("global",i.Z.global),m="boolean"!=typeof s&&!!(null==s?void 0:s.disabled),h=r.useMemo(()=>Object.assign({closeIcon:r.createElement(a.Z,null)},n),[n]),p=r.useMemo(()=>!1!==s&&(s?(0,o.Z)(h,f,s):!1!==f&&(f?(0,o.Z)(h,f):!!h.closable&&h)),[s,f,h]);return r.useMemo(()=>{var e,t;if(!1===p)return[!1,null,m,{}];let{closeIconRender:n}=h,{closeIcon:a}=p,c=a,i=(0,l.Z)(p,!0);return null!=c&&(n&&(c=n(a)),c=r.isValidElement(c)?r.cloneElement(c,Object.assign(Object.assign(Object.assign({},c.props),{"aria-label":null!==(t=null===(e=c.props)||void 0===e?void 0:e["aria-label"])&&void 0!==t?t:g.close}),i)):r.createElement("span",Object.assign({"aria-label":g.close},i),c)),[!0,c,m,i]},[m,g.close,p,h])}},79205:function(e,t,n){n.d(t,{Z:function(){return u}});var r=n(2265);let a=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),c=e=>{let t=l(e);return t.charAt(0).toUpperCase()+t.slice(1)},i=function(){for(var e=arguments.length,t=Array(e),n=0;n!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()},o=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let d=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:c,className:d="",children:u,iconNode:f,...g}=e;return(0,r.createElement)("svg",{ref:t,...s,width:a,height:a,stroke:n,strokeWidth:c?24*Number(l)/Number(a):l,className:i("lucide",d),...!u&&!o(g)&&{"aria-hidden":"true"},...g},[...f.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(u)?u:[u]])}),u=(e,t)=>{let n=(0,r.forwardRef)((n,l)=>{let{className:o,...s}=n;return(0,r.createElement)(d,{ref:l,iconNode:t,className:i("lucide-".concat(a(c(e))),"lucide-".concat(e),o),...s})});return n.displayName=c(e),n}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3554-f22a2e21673afd42.js b/litellm/proxy/_experimental/out/_next/static/chunks/3554-f22a2e21673afd42.js
deleted file mode 100644
index 3ffa97bb83d..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/3554-f22a2e21673afd42.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{84264:function(e,r,t){t.d(r,{Z:function(){return l}});var o=t(26898),n=t(13241),a=t(1153),c=t(2265);let l=c.forwardRef((e,r)=>{let{color:t,className:l,children:i}=e;return c.createElement("p",{ref:r,className:(0,n.q)("text-tremor-default",t?(0,a.bM)(t,o.K.text).textColor:(0,n.q)("text-tremor-content","dark:text-dark-tremor-content"),l)},i)});l.displayName="Text"},96761:function(e,r,t){t.d(r,{Z:function(){return i}});var o=t(5853),n=t(26898),a=t(13241),c=t(1153),l=t(2265);let i=l.forwardRef((e,r)=>{let{color:t,children:i,className:s}=e,d=(0,o._T)(e,["color","children","className"]);return l.createElement("p",Object.assign({ref:r,className:(0,a.q)("font-medium text-tremor-title",t?(0,c.bM)(t,n.K.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",s)},d),i)});i.displayName="Title"},3810:function(e,r,t){t.d(r,{Z:function(){return B}});var o=t(2265),n=t(36760),a=t.n(n),c=t(18694),l=t(93350),i=t(53445),s=t(19722),d=t(6694),u=t(71744),f=t(93463),g=t(54558),p=t(12918),m=t(71140),h=t(99320);let b=e=>{let{paddingXXS:r,lineWidth:t,tagPaddingHorizontal:o,componentCls:n,calc:a}=e,c=a(o).sub(t).equal(),l=a(r).sub(t).equal();return{[n]:Object.assign(Object.assign({},(0,p.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:c,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:"".concat((0,f.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusSM,opacity:1,transition:"all ".concat(e.motionDurationMid),textAlign:"start",position:"relative",["&".concat(n,"-rtl")]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},["".concat(n,"-close-icon")]:{marginInlineStart:l,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),"&:hover":{color:e.colorTextHeading}},["&".concat(n,"-has-color")]:{borderColor:"transparent",["&, a, a:hover, ".concat(e.iconCls,"-close, ").concat(e.iconCls,"-close:hover")]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",["&:not(".concat(n,"-checkable-checked):hover")]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},["> ".concat(e.iconCls," + span, > span + ").concat(e.iconCls)]:{marginInlineStart:c}}),["".concat(n,"-borderless")]:{borderColor:"transparent",background:e.tagBorderlessBg}}},k=e=>{let{lineWidth:r,fontSizeIcon:t,calc:o}=e,n=e.fontSizeSM;return(0,m.IX)(e,{tagFontSize:n,tagLineHeight:(0,f.bf)(o(e.lineHeightSM).mul(n).equal()),tagIconSize:o(t).sub(o(r).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},v=e=>({defaultBg:new g.t(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var w=(0,h.I$)("Tag",e=>b(k(e)),v),C=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>r.indexOf(o)&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nr.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(t[o[n]]=e[o[n]]);return t};let y=o.forwardRef((e,r)=>{let{prefixCls:t,style:n,className:c,checked:l,children:i,icon:s,onChange:d,onClick:f}=e,g=C(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:p,tag:m}=o.useContext(u.E_),h=p("tag",t),[b,k,v]=w(h),y=a()(h,"".concat(h,"-checkable"),{["".concat(h,"-checkable-checked")]:l},null==m?void 0:m.className,c,k,v);return b(o.createElement("span",Object.assign({},g,{ref:r,style:Object.assign(Object.assign({},n),null==m?void 0:m.style),className:y,onClick:e=>{null==d||d(!l),null==f||f(e)}}),s,o.createElement("span",null,i)))});var x=t(18536);let E=e=>(0,x.Z)(e,(r,t)=>{let{textColor:o,lightBorderColor:n,lightColor:a,darkColor:c}=t;return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(r)]:{color:o,background:a,borderColor:n,"&-inverse":{color:e.colorTextLightSolid,background:c,borderColor:c},["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}});var O=(0,h.bk)(["Tag","preset"],e=>E(k(e)),v);let j=(e,r,t)=>{let o="string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1);return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(r)]:{color:e["color".concat(t)],background:e["color".concat(o,"Bg")],borderColor:e["color".concat(o,"Border")],["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}};var N=(0,h.bk)(["Tag","status"],e=>{let r=k(e);return[j(r,"success","Success"),j(r,"processing","Info"),j(r,"error","Error"),j(r,"warning","Warning")]},v),S=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>r.indexOf(o)&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nr.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(t[o[n]]=e[o[n]]);return t};let L=o.forwardRef((e,r)=>{let{prefixCls:t,className:n,rootClassName:f,style:g,children:p,icon:m,color:h,onClose:b,bordered:k=!0,visible:v}=e,C=S(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:y,direction:x,tag:E}=o.useContext(u.E_),[j,L]=o.useState(!0),B=(0,c.Z)(C,["closeIcon","closable"]);o.useEffect(()=>{void 0!==v&&L(v)},[v]);let Z=(0,l.o2)(h),M=(0,l.yT)(h),T=Z||M,R=Object.assign(Object.assign({backgroundColor:h&&!T?h:void 0},null==E?void 0:E.style),g),I=y("tag",t),[P,W,z]=w(I),A=a()(I,null==E?void 0:E.className,{["".concat(I,"-").concat(h)]:T,["".concat(I,"-has-color")]:h&&!T,["".concat(I,"-hidden")]:!j,["".concat(I,"-rtl")]:"rtl"===x,["".concat(I,"-borderless")]:!k},n,f,W,z),H=e=>{e.stopPropagation(),null==b||b(e),e.defaultPrevented||L(!1)},[,_]=(0,i.b)((0,i.w)(e),(0,i.w)(E),{closable:!1,closeIconRender:e=>{let r=o.createElement("span",{className:"".concat(I,"-close-icon"),onClick:H},e);return(0,s.wm)(e,r,e=>({onClick:r=>{var t;null===(t=null==e?void 0:e.onClick)||void 0===t||t.call(e,r),H(r)},className:a()(null==e?void 0:e.className,"".concat(I,"-close-icon"))}))}}),q="function"==typeof C.onClick||p&&"a"===p.type,F=m||null,U=F?o.createElement(o.Fragment,null,F,p&&o.createElement("span",null,p)):p,$=o.createElement("span",Object.assign({},B,{ref:r,className:A,style:R}),U,_,Z&&o.createElement(O,{key:"preset",prefixCls:I}),M&&o.createElement(N,{key:"status",prefixCls:I}));return P(q?o.createElement(d.Z,{component:"Tag"},$):$)});L.CheckableTag=y;var B=L},79205:function(e,r,t){t.d(r,{Z:function(){return u}});var o=t(2265);let n=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase()),c=e=>{let r=a(e);return r.charAt(0).toUpperCase()+r.slice(1)},l=function(){for(var e=arguments.length,r=Array(e),t=0;t!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim()},i=e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let d=(0,o.forwardRef)((e,r)=>{let{color:t="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:c,className:d="",children:u,iconNode:f,...g}=e;return(0,o.createElement)("svg",{ref:r,...s,width:n,height:n,stroke:t,strokeWidth:c?24*Number(a)/Number(n):a,className:l("lucide",d),...!u&&!i(g)&&{"aria-hidden":"true"},...g},[...f.map(e=>{let[r,t]=e;return(0,o.createElement)(r,t)}),...Array.isArray(u)?u:[u]])}),u=(e,r)=>{let t=(0,o.forwardRef)((t,a)=>{let{className:i,...s}=t;return(0,o.createElement)(d,{ref:a,iconNode:r,className:l("lucide-".concat(n(c(e))),"lucide-".concat(e),i),...s})});return t.displayName=c(e),t}},78867:function(e,r,t){t.d(r,{Z:function(){return o}});let o=(0,t(79205).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},33245:function(e,r,t){t.d(r,{Z:function(){return o}});let o=(0,t(79205).Z)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},86462:function(e,r,t){var o=t(2265);let n=o.forwardRef(function(e,r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});r.Z=n},44633:function(e,r,t){var o=t(2265);let n=o.forwardRef(function(e,r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});r.Z=n},3477:function(e,r,t){var o=t(2265);let n=o.forwardRef(function(e,r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});r.Z=n},17732:function(e,r,t){var o=t(2265);let n=o.forwardRef(function(e,r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))});r.Z=n},49084:function(e,r,t){var o=t(2265);let n=o.forwardRef(function(e,r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});r.Z=n}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3705-dde102fd596f74e8.js b/litellm/proxy/_experimental/out/_next/static/chunks/3705-dde102fd596f74e8.js
deleted file mode 100644
index 31b580244d6..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/3705-dde102fd596f74e8.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3705],{15327:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},r=n(55015),l=a.forwardRef(function(e,t){return a.createElement(r.Z,(0,o.Z)({},e,{ref:t,icon:c}))})},77565:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},r=n(55015),l=a.forwardRef(function(e,t){return a.createElement(r.Z,(0,o.Z)({},e,{ref:t,icon:c}))})},73705:function(e,t,n){n.d(t,{Z:function(){return _}});var o=n(2265),a=n(15327),c=n(77565),r=n(36760),l=n.n(r),i=n(71030),d=n(58525),s=n(50506),u=n(18694),m=n(62236),p=e=>"object"!=typeof e&&"function"!=typeof e||null===e,g=n(92736),b=n(93942),f=n(19722),v=n(13613),h=n(95140),y=n(71744),I=n(64024),x=n(60985),w=n(88208),S=n(91691),C=n(93463),O=n(12918),B=n(18544),k=n(29382),j=n(691),E=n(88260),z=n(34442),N=n(99320),H=n(71140),T=e=>{let{componentCls:t,menuCls:n,colorError:o,colorTextLightSolid:a}=e,c="".concat(n,"-item");return{["".concat(t,", ").concat(t,"-menu-submenu")]:{["".concat(n," ").concat(c)]:{["&".concat(c,"-danger:not(").concat(c,"-disabled)")]:{color:o,"&:hover":{color:a,backgroundColor:o}}}}}};let P=e=>{let{componentCls:t,menuCls:n,zIndexPopup:o,dropdownArrowDistance:a,sizePopupArrow:c,antCls:r,iconCls:l,motionDurationMid:i,paddingBlock:d,fontSize:s,dropdownEdgeChildPadding:u,colorTextDisabled:m,fontSizeIcon:p,controlPaddingHorizontal:g,colorBgElevated:b}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:o,display:"block","&::before":{position:"absolute",insetBlock:e.calc(c).div(2).sub(a).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},["&-trigger".concat(r,"-btn")]:{["& > ".concat(l,"-down, & > ").concat(r,"-btn-icon > ").concat(l,"-down")]:{fontSize:p}},["".concat(t,"-wrap")]:{position:"relative",["".concat(r,"-btn > ").concat(l,"-down")]:{fontSize:p},["".concat(l,"-down::before")]:{transition:"transform ".concat(i)}},["".concat(t,"-wrap-open")]:{["".concat(l,"-down::before")]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},["&".concat(r,"-slide-down-enter").concat(r,"-slide-down-enter-active").concat(t,"-placement-bottomLeft,\n &").concat(r,"-slide-down-appear").concat(r,"-slide-down-appear-active").concat(t,"-placement-bottomLeft,\n &").concat(r,"-slide-down-enter").concat(r,"-slide-down-enter-active").concat(t,"-placement-bottom,\n &").concat(r,"-slide-down-appear").concat(r,"-slide-down-appear-active").concat(t,"-placement-bottom,\n &").concat(r,"-slide-down-enter").concat(r,"-slide-down-enter-active").concat(t,"-placement-bottomRight,\n &").concat(r,"-slide-down-appear").concat(r,"-slide-down-appear-active").concat(t,"-placement-bottomRight")]:{animationName:B.fJ},["&".concat(r,"-slide-up-enter").concat(r,"-slide-up-enter-active").concat(t,"-placement-topLeft,\n &").concat(r,"-slide-up-appear").concat(r,"-slide-up-appear-active").concat(t,"-placement-topLeft,\n &").concat(r,"-slide-up-enter").concat(r,"-slide-up-enter-active").concat(t,"-placement-top,\n &").concat(r,"-slide-up-appear").concat(r,"-slide-up-appear-active").concat(t,"-placement-top,\n &").concat(r,"-slide-up-enter").concat(r,"-slide-up-enter-active").concat(t,"-placement-topRight,\n &").concat(r,"-slide-up-appear").concat(r,"-slide-up-appear-active").concat(t,"-placement-topRight")]:{animationName:B.Qt},["&".concat(r,"-slide-down-leave").concat(r,"-slide-down-leave-active").concat(t,"-placement-bottomLeft,\n &").concat(r,"-slide-down-leave").concat(r,"-slide-down-leave-active").concat(t,"-placement-bottom,\n &").concat(r,"-slide-down-leave").concat(r,"-slide-down-leave-active").concat(t,"-placement-bottomRight")]:{animationName:B.Uw},["&".concat(r,"-slide-up-leave").concat(r,"-slide-up-leave-active").concat(t,"-placement-topLeft,\n &").concat(r,"-slide-up-leave").concat(r,"-slide-up-leave-active").concat(t,"-placement-top,\n &").concat(r,"-slide-up-leave").concat(r,"-slide-up-leave-active").concat(t,"-placement-topRight")]:{animationName:B.ly}}},(0,E.ZP)(e,b,{arrowPlacement:{top:!0,bottom:!0}}),{["".concat(t," ").concat(n)]:{position:"relative",margin:0},["".concat(n,"-submenu-popup")]:{position:"absolute",zIndex:o,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},["".concat(t,", ").concat(t,"-menu-submenu")]:Object.assign(Object.assign({},(0,O.Wf)(e)),{[n]:Object.assign(Object.assign({padding:u,listStyleType:"none",backgroundColor:b,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},(0,O.Qy)(e)),{"&:empty":{padding:0,boxShadow:"none"},["".concat(n,"-item-group-title")]:{padding:"".concat((0,C.bf)(d)," ").concat((0,C.bf)(g)),color:e.colorTextDescription,transition:"all ".concat(i)},["".concat(n,"-item")]:{position:"relative",display:"flex",alignItems:"center"},["".concat(n,"-item-icon")]:{minWidth:s,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},["".concat(n,"-title-content")]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:"all ".concat(i),"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},["".concat(n,"-item-extra")]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},["".concat(n,"-item, ").concat(n,"-submenu-title")]:Object.assign(Object.assign({display:"flex",margin:0,padding:"".concat((0,C.bf)(d)," ").concat((0,C.bf)(g)),color:e.colorText,fontWeight:"normal",fontSize:s,lineHeight:e.lineHeight,cursor:"pointer",transition:"all ".concat(i),borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},(0,O.Qy)(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:m,cursor:"not-allowed","&:hover":{color:m,backgroundColor:b,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:"".concat((0,C.bf)(e.marginXXS)," 0"),overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},["".concat(t,"-menu-submenu-expand-icon")]:{position:"absolute",insetInlineEnd:e.paddingXS,["".concat(t,"-menu-submenu-arrow-icon")]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:p,fontStyle:"normal"}}}),["".concat(n,"-item-group-list")]:{margin:"0 ".concat((0,C.bf)(e.marginXS)),padding:0,listStyle:"none"},["".concat(n,"-submenu-title")]:{paddingInlineEnd:e.calc(g).add(e.fontSizeSM).equal()},["".concat(n,"-submenu-vertical")]:{position:"relative"},["".concat(n,"-submenu").concat(n,"-submenu-disabled ").concat(t,"-menu-submenu-title")]:{["&, ".concat(t,"-menu-submenu-arrow-icon")]:{color:m,backgroundColor:b,cursor:"not-allowed"}},["".concat(n,"-submenu-selected ").concat(t,"-menu-submenu-title")]:{color:e.colorPrimary}})})},[(0,B.oN)(e,"slide-up"),(0,B.oN)(e,"slide-down"),(0,k.Fm)(e,"move-up"),(0,k.Fm)(e,"move-down"),(0,j._y)(e,"zoom-big")]]};var R=(0,N.I$)("Dropdown",e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:o,componentCls:a}=e,c=(0,H.IX)(e,{menuCls:"".concat(a,"-menu"),dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:o});return[P(c),T(c)]},e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},(0,E.wZ)({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),(0,z.w)(e)),{resetStyle:!1});let Z=e=>{var t;let{menu:n,arrow:r,prefixCls:b,children:C,trigger:O,disabled:B,dropdownRender:k,popupRender:j,getPopupContainer:E,overlayClassName:z,rootClassName:N,overlayStyle:H,open:T,onOpenChange:P,visible:Z,onVisibleChange:M,mouseEnterDelay:D=.15,mouseLeaveDelay:A=.1,autoAdjustOverflow:W=!0,placement:L="",overlay:G,transitionName:X,destroyOnHidden:_,destroyPopupOnHide:q}=e,{getPopupContainer:F,getPrefixCls:V,direction:Y,dropdown:$}=o.useContext(y.E_),J=j||k;(0,v.ln)("Dropdown");let Q=o.useMemo(()=>{let e=V();return void 0!==X?X:L.includes("top")?"".concat(e,"-slide-down"):"".concat(e,"-slide-up")},[V,L,X]),U=o.useMemo(()=>L?L.includes("Center")?L.slice(0,L.indexOf("Center")):L:"rtl"===Y?"bottomRight":"bottomLeft",[L,Y]),K=V("dropdown",b),ee=(0,I.Z)(K),[et,en,eo]=R(K,ee),[,ea]=(0,S.ZP)(),ec=o.Children.only(p(C)?o.createElement("span",null,C):C),er=(0,f.Tm)(ec,{className:l()("".concat(K,"-trigger"),{["".concat(K,"-rtl")]:"rtl"===Y},ec.props.className),disabled:null!==(t=ec.props.disabled)&&void 0!==t?t:B}),el=B?[]:O,ei=!!(null==el?void 0:el.includes("contextMenu")),[ed,es]=(0,s.Z)(!1,{value:null!=T?T:Z}),eu=(0,d.Z)(e=>{null==P||P(e,{source:"trigger"}),null==M||M(e),es(e)}),em=l()(z,N,en,eo,ee,null==$?void 0:$.className,{["".concat(K,"-rtl")]:"rtl"===Y}),ep=(0,g.Z)({arrowPointAtCenter:"object"==typeof r&&r.pointAtCenter,autoAdjustOverflow:W,offset:ea.marginXXS,arrowWidth:r?ea.sizePopupArrow:0,borderRadius:ea.borderRadius}),eg=(0,d.Z)(()=>{null!=n&&n.selectable&&null!=n&&n.multiple||(null==P||P(!1,{source:"menu"}),es(!1))}),[eb,ef]=(0,m.Cn)("Dropdown",null==H?void 0:H.zIndex),ev=o.createElement(i.Z,Object.assign({alignPoint:ei},(0,u.Z)(e,["rootClassName"]),{mouseEnterDelay:D,mouseLeaveDelay:A,visible:ed,builtinPlacements:ep,arrow:!!r,overlayClassName:em,prefixCls:K,getPopupContainer:E||F,transitionName:Q,trigger:el,overlay:()=>{let e;return e=(null==n?void 0:n.items)?o.createElement(x.Z,Object.assign({},n)):"function"==typeof G?G():G,J&&(e=J(e)),e=o.Children.only("string"==typeof e?o.createElement("span",null,e):e),o.createElement(w.J,{prefixCls:"".concat(K,"-menu"),rootClassName:l()(eo,ee),expandIcon:o.createElement("span",{className:"".concat(K,"-menu-submenu-arrow")},"rtl"===Y?o.createElement(a.Z,{className:"".concat(K,"-menu-submenu-arrow-icon")}):o.createElement(c.Z,{className:"".concat(K,"-menu-submenu-arrow-icon")})),mode:"vertical",selectable:!1,onClick:eg,validator:e=>{let{mode:t}=e}},e)},placement:U,onVisibleChange:eu,overlayStyle:Object.assign(Object.assign(Object.assign({},null==$?void 0:$.style),H),{zIndex:eb}),autoDestroy:null!=_?_:q}),er);return eb&&(ev=o.createElement(h.Z.Provider,{value:ef},ev)),et(ev)},M=(0,b.Z)(Z,"align",void 0,"dropdown",e=>e);Z._InternalPanelDoNotUseOrYouWillBeFired=e=>o.createElement(M,Object.assign({},e),o.createElement("span",null));var D=n(60440),A=n(5545),W=n(58760),L=n(77685),G=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let X=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:a}=o.useContext(y.E_),{prefixCls:c,type:r="default",danger:i,disabled:d,loading:s,onClick:u,htmlType:m,children:p,className:g,menu:b,arrow:f,autoFocus:v,overlay:h,trigger:I,align:x,open:w,onOpenChange:S,placement:C,getPopupContainer:O,href:B,icon:k=o.createElement(D.Z,null),title:j,buttonsRender:E=e=>e,mouseEnterDelay:z,mouseLeaveDelay:N,overlayClassName:H,overlayStyle:T,destroyOnHidden:P,destroyPopupOnHide:R,dropdownRender:M,popupRender:X}=e,_=G(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),q=n("dropdown",c),F={menu:b,arrow:f,autoFocus:v,align:x,disabled:d,trigger:d?[]:I,onOpenChange:S,getPopupContainer:O||t,mouseEnterDelay:z,mouseLeaveDelay:N,overlayClassName:H,overlayStyle:T,destroyOnHidden:P,popupRender:X||M},{compactSize:V,compactItemClassnames:Y}=(0,L.ri)(q,a),$=l()("".concat(q,"-button"),Y,g);"destroyPopupOnHide"in e&&(F.destroyPopupOnHide=R),"overlay"in e&&(F.overlay=h),"open"in e&&(F.open=w),"placement"in e?F.placement=C:F.placement="rtl"===a?"bottomLeft":"bottomRight";let[J,Q]=E([o.createElement(A.ZP,{type:r,danger:i,disabled:d,loading:s,onClick:u,htmlType:m,href:B,title:j},p),o.createElement(A.ZP,{type:r,danger:i,icon:k})]);return o.createElement(W.Z.Compact,Object.assign({className:$,size:V,block:!0},_),J,o.createElement(Z,Object.assign({},F),Q))};X.__ANT_BUTTON=!0,Z.Button=X;var _=Z},32186:function(e,t,n){let o;n.d(t,{D:function(){return S},Z:function(){return O}});var a=n(2265),c=n(1119),r={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},l=n(55015),i=a.forwardRef(function(e,t){return a.createElement(l.Z,(0,c.Z)({},e,{ref:t,icon:r}))}),d=n(15327),s=n(77565),u=n(36760),m=n.n(u),p=n(18694),g=n(16774),b=n(71744),f=n(80856),v=n(93463),h=n(25437),y=(0,n(99320).I$)(["Layout","Sider"],e=>{let{componentCls:t,siderBg:n,motionDurationMid:o,motionDurationSlow:a,antCls:c,triggerHeight:r,triggerColor:l,triggerBg:i,headerHeight:d,zeroTriggerWidth:s,zeroTriggerHeight:u,borderRadiusLG:m,lightSiderBg:p,lightTriggerColor:g,lightTriggerBg:b,bodyBg:f}=e;return{[t]:{position:"relative",minWidth:0,background:n,transition:"all ".concat(o,", background 0s"),"&-has-trigger":{paddingBottom:r},"&-right":{order:1},["".concat(t,"-children")]:{height:"100%",marginTop:-.1,paddingTop:.1,["".concat(c,"-menu").concat(c,"-menu-inline-collapsed")]:{width:"auto"}},["&-zero-width ".concat(t,"-children")]:{overflow:"hidden"},["".concat(t,"-trigger")]:{position:"fixed",bottom:0,zIndex:1,height:r,color:l,lineHeight:(0,v.bf)(r),textAlign:"center",background:i,cursor:"pointer",transition:"all ".concat(o)},["".concat(t,"-zero-width-trigger")]:{position:"absolute",top:d,insetInlineEnd:e.calc(s).mul(-1).equal(),zIndex:1,width:s,height:u,color:l,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:"0 ".concat((0,v.bf)(m)," ").concat((0,v.bf)(m)," 0"),cursor:"pointer",transition:"background ".concat(a," ease"),"&::after":{position:"absolute",inset:0,background:"transparent",transition:"all ".concat(a),content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(s).mul(-1).equal(),borderRadius:"".concat((0,v.bf)(m)," 0 0 ").concat((0,v.bf)(m))}},"&-light":{background:p,["".concat(t,"-trigger")]:{color:g,background:b},["".concat(t,"-zero-width-trigger")]:{color:g,background:b,border:"1px solid ".concat(f),borderInlineStart:0}}}}},h.eh,{deprecatedTokens:h.jn}),I=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let x={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},w=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),S=a.createContext({}),C=(o=0,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return o+=1,"".concat(e).concat(o)});var O=a.forwardRef((e,t)=>{let{prefixCls:n,className:o,trigger:c,children:r,defaultCollapsed:l=!1,theme:u="dark",style:v={},collapsible:h=!1,reverseArrow:O=!1,width:B=200,collapsedWidth:k=80,zeroWidthTriggerStyle:j,breakpoint:E,onCollapse:z,onBreakpoint:N}=e,H=I(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:T}=(0,a.useContext)(f.V),[P,R]=(0,a.useState)("collapsed"in e?e.collapsed:l),[Z,M]=(0,a.useState)(!1);(0,a.useEffect)(()=>{"collapsed"in e&&R(e.collapsed)},[e.collapsed]);let D=(t,n)=>{"collapsed"in e||R(t),null==z||z(t,n)},{getPrefixCls:A,direction:W}=(0,a.useContext)(b.E_),L=A("layout-sider",n),[G,X,_]=y(L),q=(0,a.useRef)(null);q.current=e=>{M(e.matches),null==N||N(e.matches),P!==e.matches&&D(e.matches,"responsive")},(0,a.useEffect)(()=>{let e;function t(e){var t;return null===(t=q.current)||void 0===t?void 0:t.call(q,e)}return void 0!==(null==window?void 0:window.matchMedia)&&E&&E in x&&(e=window.matchMedia("screen and (max-width: ".concat(x[E],")")),(0,g.x)(e,t),t(e)),()=>{(0,g.h)(e,t)}},[E]),(0,a.useEffect)(()=>{let e=C("ant-sider-");return T.addSider(e),()=>T.removeSider(e)},[]);let F=()=>{D(!P,"clickTrigger")},V=(0,p.Z)(H,["collapsed"]),Y=P?k:B,$=w(Y)?"".concat(Y,"px"):String(Y),J=0===Number.parseFloat(String(k||0))?a.createElement("span",{onClick:F,className:m()("".concat(L,"-zero-width-trigger"),"".concat(L,"-zero-width-trigger-").concat(O?"right":"left")),style:j},c||a.createElement(i,null)):null,Q="rtl"===W==!O,U={expanded:Q?a.createElement(s.Z,null):a.createElement(d.Z,null),collapsed:Q?a.createElement(d.Z,null):a.createElement(s.Z,null)}[P?"collapsed":"expanded"],K=null!==c?J||a.createElement("div",{className:"".concat(L,"-trigger"),onClick:F,style:{width:$}},c||U):null,ee=Object.assign(Object.assign({},v),{flex:"0 0 ".concat($),maxWidth:$,minWidth:$,width:$}),et=m()(L,"".concat(L,"-").concat(u),{["".concat(L,"-collapsed")]:!!P,["".concat(L,"-has-trigger")]:h&&null!==c&&!J,["".concat(L,"-below")]:!!Z,["".concat(L,"-zero-width")]:0===Number.parseFloat($)},o,X,_),en=a.useMemo(()=>({siderCollapsed:P}),[P]);return G(a.createElement(S.Provider,{value:en},a.createElement("aside",Object.assign({className:et},V,{style:ee,ref:t}),a.createElement("div",{className:"".concat(L,"-children")},r),h||Z&&J?K:null)))})},80856:function(e,t,n){n.d(t,{V:function(){return o}});let o=n(2265).createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},25437:function(e,t,n){n.d(t,{eh:function(){return c},jn:function(){return r}});var o=n(93463),a=n(99320);let c=e=>{let{colorBgLayout:t,controlHeight:n,controlHeightLG:o,colorText:a,controlHeightSM:c,marginXXS:r,colorTextLightSolid:l,colorBgContainer:i}=e,d=1.25*o;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:2*n,headerPadding:"0 ".concat(d,"px"),headerColor:a,footerPadding:"".concat(c,"px ").concat(d,"px"),footerBg:t,siderBg:"#001529",triggerHeight:o+2*r,triggerBg:"#002140",triggerColor:l,zeroTriggerWidth:o,zeroTriggerHeight:o,lightSiderBg:i,lightTriggerBg:i,lightTriggerColor:a}},r=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];t.ZP=(0,a.I$)("Layout",e=>{let{antCls:t,componentCls:n,colorText:a,footerBg:c,headerHeight:r,headerPadding:l,headerColor:i,footerPadding:d,fontSize:s,bodyBg:u,headerBg:m}=e;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},["&".concat(n,"-has-sider")]:{flexDirection:"row",["> ".concat(n,", > ").concat(n,"-content")]:{width:0}},["".concat(n,"-header, &").concat(n,"-footer")]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},["".concat(n,"-header")]:{height:r,padding:l,color:i,lineHeight:(0,o.bf)(r),background:m,["".concat(t,"-menu")]:{lineHeight:"inherit"}},["".concat(n,"-footer")]:{padding:d,color:a,fontSize:s,background:c},["".concat(n,"-content")]:{flex:"auto",color:a,minHeight:0}}},c,{deprecatedTokens:r})},88208:function(e,t,n){n.d(t,{J:function(){return i}});var o=n(2265),a=n(28791),c=n(391),r=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let l=o.createContext(null),i=o.forwardRef((e,t)=>{let{children:n}=e,i=r(e,["children"]),d=o.useContext(l),s=o.useMemo(()=>Object.assign(Object.assign({},d),i),[d,i.prefixCls,i.mode,i.selectable,i.rootClassName]),u=(0,a.t4)(n),m=(0,a.x1)(t,u?(0,a.C4)(n):null);return o.createElement(l.Provider,{value:s},o.createElement(c.Z,{space:!0},u?o.cloneElement(n,{ref:m}):n))});t.Z=l},60985:function(e,t,n){n.d(t,{Z:function(){return V}});var o=n(2265),a=n(33082),c=n(32186),r=n(60440),l=n(36760),i=n.n(l),d=n(58525),s=n(18694),u=n(68710),m=n(19722),p=n(71744),g=n(64024);let b=(0,o.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var f=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n},v=e=>{let{prefixCls:t,className:n,dashed:c}=e,r=f(e,["prefixCls","className","dashed"]),{getPrefixCls:l}=o.useContext(p.E_),d=l("menu",t),s=i()({["".concat(d,"-item-divider-dashed")]:!!c},n);return o.createElement(a.iz,Object.assign({className:s},r))},h=n(45287),y=n(99981),I=e=>{var t;let{className:n,children:r,icon:l,title:d,danger:u,extra:p}=e,{prefixCls:g,firstLevel:f,direction:v,disableMenuItemTitleTooltip:I,inlineCollapsed:x}=o.useContext(b),{siderCollapsed:w}=o.useContext(c.D),S=d;void 0===d?S=f?r:"":!1===d&&(S="");let C={title:S};w||x||(C.title=null,C.open=!1);let O=(0,h.Z)(r).length,B=o.createElement(a.ck,Object.assign({},(0,s.Z)(e,["title","icon","danger"]),{className:i()({["".concat(g,"-item-danger")]:u,["".concat(g,"-item-only-child")]:(l?O+1:O)===1},n),title:"string"==typeof d?d:void 0}),(0,m.Tm)(l,{className:i()(o.isValidElement(l)?null===(t=l.props)||void 0===t?void 0:t.className:void 0,"".concat(g,"-item-icon"))}),(e=>{let t=null==r?void 0:r[0],n=o.createElement("span",{className:i()("".concat(g,"-title-content"),{["".concat(g,"-title-content-with-extra")]:!!p||0===p})},r);return(!l||o.isValidElement(r)&&"span"===r.type)&&r&&e&&f&&"string"==typeof t?o.createElement("div",{className:"".concat(g,"-inline-collapsed-noicon")},t.charAt(0)):n})(x));return I||(B=o.createElement(y.Z,Object.assign({},C,{placement:"rtl"===v?"left":"right",classNames:{root:"".concat(g,"-inline-collapsed-tooltip")}}),B)),B},x=n(88208),w=n(93463),S=n(54558),C=n(12918),O=n(63074),B=n(18544),k=n(691),j=n(99320),E=n(71140),z=e=>{let{componentCls:t,motionDurationSlow:n,horizontalLineHeight:o,colorSplit:a,lineWidth:c,lineType:r,itemPaddingInline:l}=e;return{["".concat(t,"-horizontal")]:{lineHeight:o,border:0,borderBottom:"".concat((0,w.bf)(c)," ").concat(r," ").concat(a),boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},["".concat(t,"-item, ").concat(t,"-submenu")]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},["> ".concat(t,"-item:hover,\n > ").concat(t,"-item-active,\n > ").concat(t,"-submenu ").concat(t,"-submenu-title:hover")]:{backgroundColor:"transparent"},["".concat(t,"-item, ").concat(t,"-submenu-title")]:{transition:["border-color ".concat(n),"background ".concat(n)].join(",")},["".concat(t,"-submenu-arrow")]:{display:"none"}}}},N=e=>{let{componentCls:t,menuArrowOffset:n,calc:o}=e;return{["".concat(t,"-rtl")]:{direction:"rtl"},["".concat(t,"-submenu-rtl")]:{transformOrigin:"100% 0"},["".concat(t,"-rtl").concat(t,"-vertical,\n ").concat(t,"-submenu-rtl ").concat(t,"-vertical")]:{["".concat(t,"-submenu-arrow")]:{"&::before":{transform:"rotate(-45deg) translateY(".concat((0,w.bf)(o(n).mul(-1).equal()),")")},"&::after":{transform:"rotate(45deg) translateY(".concat((0,w.bf)(n),")")}}}}};let H=e=>(0,C.oN)(e);var T=(e,t)=>{let{componentCls:n,itemColor:o,itemSelectedColor:a,subMenuItemSelectedColor:c,groupTitleColor:r,itemBg:l,subMenuItemBg:i,itemSelectedBg:d,activeBarHeight:s,activeBarWidth:u,activeBarBorderWidth:m,motionDurationSlow:p,motionEaseInOut:g,motionEaseOut:b,itemPaddingInline:f,motionDurationMid:v,itemHoverColor:h,lineType:y,colorSplit:I,itemDisabledColor:x,dangerItemColor:S,dangerItemHoverColor:C,dangerItemSelectedColor:O,dangerItemActiveBg:B,dangerItemSelectedBg:k,popupBg:j,itemHoverBg:E,itemActiveBg:z,menuSubMenuBg:N,horizontalItemSelectedColor:T,horizontalItemSelectedBg:P,horizontalItemBorderRadius:R,horizontalItemHoverBg:Z}=e;return{["".concat(n,"-").concat(t,", ").concat(n,"-").concat(t," > ").concat(n)]:{color:o,background:l,["&".concat(n,"-root:focus-visible")]:Object.assign({},H(e)),["".concat(n,"-item")]:{"&-group-title, &-extra":{color:r}},["".concat(n,"-submenu-selected > ").concat(n,"-submenu-title")]:{color:c},["".concat(n,"-item, ").concat(n,"-submenu-title")]:{color:o,["&:not(".concat(n,"-item-disabled):focus-visible")]:Object.assign({},H(e))},["".concat(n,"-item-disabled, ").concat(n,"-submenu-disabled")]:{color:"".concat(x," !important")},["".concat(n,"-item:not(").concat(n,"-item-selected):not(").concat(n,"-submenu-selected)")]:{["&:hover, > ".concat(n,"-submenu-title:hover")]:{color:h}},["&:not(".concat(n,"-horizontal)")]:{["".concat(n,"-item:not(").concat(n,"-item-selected)")]:{"&:hover":{backgroundColor:E},"&:active":{backgroundColor:z}},["".concat(n,"-submenu-title")]:{"&:hover":{backgroundColor:E},"&:active":{backgroundColor:z}}},["".concat(n,"-item-danger")]:{color:S,["&".concat(n,"-item:hover")]:{["&:not(".concat(n,"-item-selected):not(").concat(n,"-submenu-selected)")]:{color:C}},["&".concat(n,"-item:active")]:{background:B}},["".concat(n,"-item a")]:{"&, &:hover":{color:"inherit"}},["".concat(n,"-item-selected")]:{color:a,["&".concat(n,"-item-danger")]:{color:O},"a, a:hover":{color:"inherit"}},["& ".concat(n,"-item-selected")]:{backgroundColor:d,["&".concat(n,"-item-danger")]:{backgroundColor:k}},["&".concat(n,"-submenu > ").concat(n)]:{backgroundColor:N},["&".concat(n,"-popup > ").concat(n)]:{backgroundColor:j},["&".concat(n,"-submenu-popup > ").concat(n)]:{backgroundColor:j},["&".concat(n,"-horizontal")]:Object.assign(Object.assign({},"dark"===t?{borderBottom:0}:{}),{["> ".concat(n,"-item, > ").concat(n,"-submenu")]:{top:m,marginTop:e.calc(m).mul(-1).equal(),marginBottom:0,borderRadius:R,"&::after":{position:"absolute",insetInline:f,bottom:0,borderBottom:"".concat((0,w.bf)(s)," solid transparent"),transition:"border-color ".concat(p," ").concat(g),content:'""'},"&:hover, &-active, &-open":{background:Z,"&::after":{borderBottomWidth:s,borderBottomColor:T}},"&-selected":{color:T,backgroundColor:P,"&:hover":{backgroundColor:P},"&::after":{borderBottomWidth:s,borderBottomColor:T}}}}),["&".concat(n,"-root")]:{["&".concat(n,"-inline, &").concat(n,"-vertical")]:{borderInlineEnd:"".concat((0,w.bf)(m)," ").concat(y," ").concat(I)}},["&".concat(n,"-inline")]:{["".concat(n,"-sub").concat(n,"-inline")]:{background:i},["".concat(n,"-item")]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:"".concat((0,w.bf)(u)," solid ").concat(a),transform:"scaleY(0.0001)",opacity:0,transition:["transform ".concat(v," ").concat(b),"opacity ".concat(v," ").concat(b)].join(","),content:'""'},["&".concat(n,"-item-danger")]:{"&::after":{borderInlineEndColor:O}}},["".concat(n,"-selected, ").concat(n,"-item-selected")]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform ".concat(v," ").concat(g),"opacity ".concat(v," ").concat(g)].join(",")}}}}}};let P=e=>{let{componentCls:t,itemHeight:n,itemMarginInline:o,padding:a,menuArrowSize:c,marginXS:r,itemMarginBlock:l,itemWidth:i,itemPaddingInline:d}=e,s=e.calc(c).add(a).add(r).equal();return{["".concat(t,"-item")]:{position:"relative",overflow:"hidden"},["".concat(t,"-item, ").concat(t,"-submenu-title")]:{height:n,lineHeight:(0,w.bf)(n),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:o,marginBlock:l,width:i},["> ".concat(t,"-item,\n > ").concat(t,"-submenu > ").concat(t,"-submenu-title")]:{height:n,lineHeight:(0,w.bf)(n)},["".concat(t,"-item-group-list ").concat(t,"-submenu-title,\n ").concat(t,"-submenu-title")]:{paddingInlineEnd:s}}};var R=e=>{let{componentCls:t,iconCls:n,itemHeight:o,colorTextLightSolid:a,dropdownWidth:c,controlHeightLG:r,motionEaseOut:l,paddingXL:i,itemMarginInline:d,fontSizeLG:s,motionDurationFast:u,motionDurationSlow:m,paddingXS:p,boxShadowSecondary:g,collapsedWidth:b,collapsedIconSize:f}=e,v={height:o,lineHeight:(0,w.bf)(o),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({["&".concat(t,"-root")]:{boxShadow:"none"}},P(e))},["".concat(t,"-submenu-popup")]:{["".concat(t,"-vertical")]:Object.assign(Object.assign({},P(e)),{boxShadow:g})}},{["".concat(t,"-submenu-popup ").concat(t,"-vertical").concat(t,"-sub")]:{minWidth:c,maxHeight:"calc(100vh - ".concat((0,w.bf)(e.calc(r).mul(2.5).equal()),")"),padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{["".concat(t,"-inline")]:{width:"100%",["&".concat(t,"-root")]:{["".concat(t,"-item, ").concat(t,"-submenu-title")]:{display:"flex",alignItems:"center",transition:["border-color ".concat(m),"background ".concat(m),"padding ".concat(u," ").concat(l)].join(","),["> ".concat(t,"-title-content")]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},["".concat(t,"-sub").concat(t,"-inline")]:{padding:0,border:0,borderRadius:0,boxShadow:"none",["& > ".concat(t,"-submenu > ").concat(t,"-submenu-title")]:v,["& ".concat(t,"-item-group-title")]:{paddingInlineStart:i}},["".concat(t,"-item")]:v}},{["".concat(t,"-inline-collapsed")]:{width:b,["&".concat(t,"-root")]:{["".concat(t,"-item, ").concat(t,"-submenu ").concat(t,"-submenu-title")]:{["> ".concat(t,"-inline-collapsed-noicon")]:{fontSize:s,textAlign:"center"}}},["> ".concat(t,"-item,\n > ").concat(t,"-item-group > ").concat(t,"-item-group-list > ").concat(t,"-item,\n > ").concat(t,"-item-group > ").concat(t,"-item-group-list > ").concat(t,"-submenu > ").concat(t,"-submenu-title,\n > ").concat(t,"-submenu > ").concat(t,"-submenu-title")]:{insetInlineStart:0,paddingInline:"calc(50% - ".concat((0,w.bf)(e.calc(f).div(2).equal())," - ").concat((0,w.bf)(d),")"),textOverflow:"clip",["\n ".concat(t,"-submenu-arrow,\n ").concat(t,"-submenu-expand-icon\n ")]:{opacity:0},["".concat(t,"-item-icon, ").concat(n)]:{margin:0,fontSize:f,lineHeight:(0,w.bf)(o),"+ span":{display:"inline-block",opacity:0}}},["".concat(t,"-item-icon, ").concat(n)]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",["".concat(t,"-item-icon, ").concat(n)]:{display:"none"},"a, a:hover":{color:a}},["".concat(t,"-item-group-title")]:Object.assign(Object.assign({},C.vS),{paddingInline:p})}}]};let Z=e=>{let{componentCls:t,motionDurationSlow:n,motionDurationMid:o,motionEaseInOut:a,motionEaseOut:c,iconCls:r,iconSize:l,iconMarginInlineEnd:i}=e;return{["".concat(t,"-item, ").concat(t,"-submenu-title")]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:["border-color ".concat(n),"background ".concat(n),"padding calc(".concat(n," + 0.1s) ").concat(a)].join(","),["".concat(t,"-item-icon, ").concat(r)]:{minWidth:l,fontSize:l,transition:["font-size ".concat(o," ").concat(c),"margin ".concat(n," ").concat(a),"color ".concat(n)].join(","),"+ span":{marginInlineStart:i,opacity:1,transition:["opacity ".concat(n," ").concat(a),"margin ".concat(n),"color ".concat(n)].join(",")}},["".concat(t,"-item-icon")]:Object.assign({},(0,C.Ro)()),["&".concat(t,"-item-only-child")]:{["> ".concat(r,", > ").concat(t,"-item-icon")]:{marginInlineEnd:0}}},["".concat(t,"-item-disabled, ").concat(t,"-submenu-disabled")]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},["> ".concat(t,"-submenu-title")]:{color:"inherit !important",cursor:"not-allowed"}}}},M=e=>{let{componentCls:t,motionDurationSlow:n,motionEaseInOut:o,borderRadius:a,menuArrowSize:c,menuArrowOffset:r}=e;return{["".concat(t,"-submenu")]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:c,color:"currentcolor",transform:"translateY(-50%)",transition:"transform ".concat(n," ").concat(o,", opacity ").concat(n)},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(c).mul(.6).equal(),height:e.calc(c).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:a,transition:["background ".concat(n," ").concat(o),"transform ".concat(n," ").concat(o),"top ".concat(n," ").concat(o),"color ".concat(n," ").concat(o)].join(","),content:'""'},"&::before":{transform:"rotate(45deg) translateY(".concat((0,w.bf)(e.calc(r).mul(-1).equal()),")")},"&::after":{transform:"rotate(-45deg) translateY(".concat((0,w.bf)(r),")")}}}}},D=e=>{let{antCls:t,componentCls:n,fontSize:o,motionDurationSlow:a,motionDurationMid:c,motionEaseInOut:r,paddingXS:l,padding:i,colorSplit:d,lineWidth:s,zIndexPopup:u,borderRadiusLG:m,subMenuItemBorderRadius:p,menuArrowSize:g,menuArrowOffset:b,lineType:f,groupTitleLineHeight:v,groupTitleFontSize:h}=e;return[{"":{[n]:Object.assign(Object.assign({},(0,C.dF)()),{"&-hidden":{display:"none"}})},["".concat(n,"-submenu-hidden")]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,C.Wf)(e)),(0,C.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:o,lineHeight:0,listStyle:"none",outline:"none",transition:"width ".concat(a," cubic-bezier(0.2, 0, 0, 1) 0s"),"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",["".concat(n,"-item")]:{flex:"none"}},["".concat(n,"-item, ").concat(n,"-submenu, ").concat(n,"-submenu-title")]:{borderRadius:e.itemBorderRadius},["".concat(n,"-item-group-title")]:{padding:"".concat((0,w.bf)(l)," ").concat((0,w.bf)(i)),fontSize:h,lineHeight:v,transition:"all ".concat(a)},["&-horizontal ".concat(n,"-submenu")]:{transition:["border-color ".concat(a," ").concat(r),"background ".concat(a," ").concat(r)].join(",")},["".concat(n,"-submenu, ").concat(n,"-submenu-inline")]:{transition:["border-color ".concat(a," ").concat(r),"background ".concat(a," ").concat(r),"padding ".concat(c," ").concat(r)].join(",")},["".concat(n,"-submenu ").concat(n,"-sub")]:{cursor:"initial",transition:["background ".concat(a," ").concat(r),"padding ".concat(a," ").concat(r)].join(",")},["".concat(n,"-title-content")]:{transition:"color ".concat(a),"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},["> ".concat(t,"-typography-ellipsis-single-line")]:{display:"inline",verticalAlign:"unset"},["".concat(n,"-item-extra")]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},["".concat(n,"-item a")]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},["".concat(n,"-item-divider")]:{overflow:"hidden",lineHeight:0,borderColor:d,borderStyle:f,borderWidth:0,borderTopWidth:s,marginBlock:s,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Z(e)),{["".concat(n,"-item-group")]:{["".concat(n,"-item-group-list")]:{margin:0,padding:0,["".concat(n,"-item, ").concat(n,"-submenu-title")]:{paddingInline:"".concat((0,w.bf)(e.calc(o).mul(2).equal())," ").concat((0,w.bf)(i))}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:u,borderRadius:m,boxShadow:"none",transformOrigin:"0 0",["&".concat(n,"-submenu")]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},["> ".concat(n)]:Object.assign(Object.assign(Object.assign({borderRadius:m},Z(e)),M(e)),{["".concat(n,"-item, ").concat(n,"-submenu > ").concat(n,"-submenu-title")]:{borderRadius:p},["".concat(n,"-submenu-title::after")]:{transition:"transform ".concat(a," ").concat(r)}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),M(e)),{["&-inline-collapsed ".concat(n,"-submenu-arrow,\n &-inline ").concat(n,"-submenu-arrow")]:{"&::before":{transform:"rotate(-45deg) translateX(".concat((0,w.bf)(b),")")},"&::after":{transform:"rotate(45deg) translateX(".concat((0,w.bf)(e.calc(b).mul(-1).equal()),")")}},["".concat(n,"-submenu-open").concat(n,"-submenu-inline > ").concat(n,"-submenu-title > ").concat(n,"-submenu-arrow")]:{transform:"translateY(".concat((0,w.bf)(e.calc(g).mul(.2).mul(-1).equal()),")"),"&::after":{transform:"rotate(-45deg) translateX(".concat((0,w.bf)(e.calc(b).mul(-1).equal()),")")},"&::before":{transform:"rotate(45deg) translateX(".concat((0,w.bf)(b),")")}}})},{["".concat(t,"-layout-header")]:{[n]:{lineHeight:"inherit"}}}]},A=e=>{var t,n,o;let{colorPrimary:a,colorError:c,colorTextDisabled:r,colorErrorBg:l,colorText:i,colorTextDescription:d,colorBgContainer:s,colorFillAlter:u,colorFillContent:m,lineWidth:p,lineWidthBold:g,controlItemBgActive:b,colorBgTextHover:f,controlHeightLG:v,lineHeight:h,colorBgElevated:y,marginXXS:I,padding:x,fontSize:w,controlHeightSM:C,fontSizeLG:O,colorTextLightSolid:B,colorErrorHover:k}=e,j=null!==(t=e.activeBarWidth)&&void 0!==t?t:0,E=null!==(n=e.activeBarBorderWidth)&&void 0!==n?n:p,z=null!==(o=e.itemMarginInline)&&void 0!==o?o:e.marginXXS,N=new S.t(B).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:i,itemColor:i,colorItemTextHover:i,itemHoverColor:i,colorItemTextHoverHorizontal:a,horizontalItemHoverColor:a,colorGroupTitle:d,groupTitleColor:d,colorItemTextSelected:a,itemSelectedColor:a,subMenuItemSelectedColor:a,colorItemTextSelectedHorizontal:a,horizontalItemSelectedColor:a,colorItemBg:s,itemBg:s,colorItemBgHover:f,itemHoverBg:f,colorItemBgActive:m,itemActiveBg:b,colorSubItemBg:u,subMenuItemBg:u,colorItemBgSelected:b,itemSelectedBg:b,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:j,colorActiveBarHeight:g,activeBarHeight:g,colorActiveBarBorderSize:p,activeBarBorderWidth:E,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:c,dangerItemColor:c,colorDangerItemTextHover:c,dangerItemHoverColor:c,colorDangerItemTextSelected:c,dangerItemSelectedColor:c,colorDangerItemBgActive:l,dangerItemActiveBg:l,colorDangerItemBgSelected:l,dangerItemSelectedBg:l,itemMarginInline:z,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:v,groupTitleLineHeight:h,collapsedWidth:2*v,popupBg:y,itemMarginBlock:I,itemPaddingInline:x,horizontalLineHeight:"".concat(1.15*v,"px"),iconSize:w,iconMarginInlineEnd:C-w,collapsedIconSize:O,groupTitleFontSize:w,darkItemDisabledColor:new S.t(B).setA(.25).toRgbString(),darkItemColor:N,darkDangerItemColor:c,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:B,darkItemSelectedBg:a,darkDangerItemSelectedBg:c,darkItemHoverBg:"transparent",darkGroupTitleColor:N,darkItemHoverColor:B,darkDangerItemHoverColor:k,darkDangerItemSelectedColor:B,darkDangerItemActiveBg:c,itemWidth:j?"calc(100% + ".concat(E,"px)"):"calc(100% - ".concat(2*z,"px)")}};var W=n(62236),L=e=>{var t;let n;let{popupClassName:c,icon:r,title:l,theme:d}=e,u=o.useContext(b),{prefixCls:p,inlineCollapsed:g,theme:f}=u,v=(0,a.Xl)();if(r){let e=o.isValidElement(l)&&"span"===l.type;n=o.createElement(o.Fragment,null,(0,m.Tm)(r,{className:i()(o.isValidElement(r)?null===(t=r.props)||void 0===t?void 0:t.className:void 0,"".concat(p,"-item-icon"))}),e?l:o.createElement("span",{className:"".concat(p,"-title-content")},l))}else n=g&&!v.length&&l&&"string"==typeof l?o.createElement("div",{className:"".concat(p,"-inline-collapsed-noicon")},l.charAt(0)):o.createElement("span",{className:"".concat(p,"-title-content")},l);let h=o.useMemo(()=>Object.assign(Object.assign({},u),{firstLevel:!1}),[u]),[y]=(0,W.Cn)("Menu");return o.createElement(b.Provider,{value:h},o.createElement(a.Wd,Object.assign({},(0,s.Z)(e,["icon"]),{title:n,popupClassName:i()(p,c,"".concat(p,"-").concat(d||f)),popupStyle:Object.assign({zIndex:y},e.popupStyle)})))},G=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};function X(e){return null===e||!1===e}let _={item:I,submenu:L,divider:v},q=(0,o.forwardRef)((e,t)=>{var n;let c=o.useContext(x.Z),l=c||{},{getPrefixCls:f,getPopupContainer:v,direction:h,menu:y}=o.useContext(p.E_),I=f(),{prefixCls:w,className:S,style:C,theme:H="light",expandIcon:P,_internalDisableMenuItemTitleTooltip:Z,inlineCollapsed:M,siderCollapsed:W,rootClassName:L,mode:q,selectable:F,onClick:V,overflowedIndicatorPopupClassName:Y}=e,$=G(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),J=(0,s.Z)($,["collapsedWidth"]);null===(n=l.validator)||void 0===n||n.call(l,{mode:q});let Q=(0,d.Z)(function(){for(var e,t=arguments.length,n=Array(t),o=0;o1&&void 0!==arguments[1]?arguments[1]:e,n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return(0,j.I$)("Menu",e=>{let{colorBgElevated:t,controlHeightLG:n,fontSize:o,darkItemColor:a,darkDangerItemColor:c,darkItemBg:r,darkSubMenuItemBg:l,darkItemSelectedColor:i,darkItemSelectedBg:d,darkDangerItemSelectedBg:s,darkItemHoverBg:u,darkGroupTitleColor:m,darkItemHoverColor:p,darkItemDisabledColor:g,darkDangerItemHoverColor:b,darkDangerItemSelectedColor:f,darkDangerItemActiveBg:v,popupBg:h,darkPopupBg:y}=e,I=e.calc(o).div(7).mul(5).equal(),x=(0,E.IX)(e,{menuArrowSize:I,menuHorizontalHeight:e.calc(n).mul(1.15).equal(),menuArrowOffset:e.calc(I).mul(.25).equal(),menuSubMenuBg:t,calc:e.calc,popupBg:h}),w=(0,E.IX)(x,{itemColor:a,itemHoverColor:p,groupTitleColor:m,itemSelectedColor:i,subMenuItemSelectedColor:i,itemBg:r,popupBg:y,subMenuItemBg:l,itemActiveBg:"transparent",itemSelectedBg:d,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:u,itemDisabledColor:g,dangerItemColor:c,dangerItemHoverColor:b,dangerItemSelectedColor:f,dangerItemActiveBg:v,dangerItemSelectedBg:s,menuSubMenuBg:l,horizontalItemSelectedColor:i,horizontalItemSelectedBg:d});return[D(x),z(x),R(x),T(x,"light"),T(w,"dark"),N(x),(0,O.Z)(x),(0,B.oN)(x,"slide-up"),(0,B.oN)(x,"slide-down"),(0,k._y)(x,"zoom-big")]},A,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t)}(en,eo,!c),el=i()("".concat(en,"-").concat(H),null==y?void 0:y.className,S),ei=o.useMemo(()=>{var e,t;if("function"==typeof P||X(P))return P||null;if("function"==typeof l.expandIcon||X(l.expandIcon))return l.expandIcon||null;if("function"==typeof(null==y?void 0:y.expandIcon)||X(null==y?void 0:y.expandIcon))return(null==y?void 0:y.expandIcon)||null;let n=null!==(e=null!=P?P:null==l?void 0:l.expandIcon)&&void 0!==e?e:null==y?void 0:y.expandIcon;return(0,m.Tm)(n,{className:i()("".concat(en,"-submenu-expand-icon"),o.isValidElement(n)?null===(t=n.props)||void 0===t?void 0:t.className:void 0)})},[P,null==l?void 0:l.expandIcon,null==y?void 0:y.expandIcon,en]),ed=o.useMemo(()=>({prefixCls:en,inlineCollapsed:ee||!1,direction:h,firstLevel:!0,theme:H,mode:U,disableMenuItemTitleTooltip:Z}),[en,ee,h,Z,H]);return ea(o.createElement(x.Z.Provider,{value:null},o.createElement(b.Provider,{value:ed},o.createElement(a.ZP,Object.assign({getPopupContainer:v,overflowedIndicator:o.createElement(r.Z,null),overflowedIndicatorPopupClassName:i()(en,"".concat(en,"-").concat(H),Y),mode:U,selectable:K,onClick:Q},J,{inlineCollapsed:ee,style:Object.assign(Object.assign({},null==y?void 0:y.style),C),className:el,prefixCls:en,direction:h,defaultMotions:et,expandIcon:ei,ref:t,rootClassName:i()(L,ec,l.rootClassName,er,eo),_internalComponents:_})))))}),F=(0,o.forwardRef)((e,t)=>{let n=(0,o.useRef)(null),a=o.useContext(c.D);return(0,o.useImperativeHandle)(t,()=>({menu:n.current,focus:e=>{var t;null===(t=n.current)||void 0===t||t.focus(e)}})),o.createElement(q,Object.assign({ref:n},e,a))});F.Item=I,F.SubMenu=L,F.Divider=v,F.ItemGroup=a.BW;var V=F},58760:function(e,t,n){n.d(t,{Z:function(){return B}});var o=n(2265),a=n(36760),c=n.n(a),r=n(45287);function l(e){return["small","middle","large"].includes(e)}function i(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}var d=n(71744),s=n(77685),u=n(17691),m=n(99320);let p=e=>{let{componentCls:t,borderRadius:n,paddingSM:o,colorBorder:a,paddingXS:c,fontSizeLG:r,fontSizeSM:l,borderRadiusLG:i,borderRadiusSM:d,colorBgContainerDisabled:s,lineWidth:m}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:o,margin:0,background:s,borderWidth:m,borderStyle:"solid",borderColor:a,borderRadius:n,"&-large":{fontSize:r,borderRadius:i},"&-small":{paddingInline:c,borderRadius:d,fontSize:l},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,u.c)(e,{focus:!1})]}};var g=(0,m.I$)(["Space","Addon"],e=>[p(e)]),b=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let f=o.forwardRef((e,t)=>{let{className:n,children:a,style:r,prefixCls:l}=e,i=b(e,["className","children","style","prefixCls"]),{getPrefixCls:u,direction:m}=o.useContext(d.E_),p=u("space-addon",l),[f,v,h]=g(p),{compactItemClassnames:y,compactSize:I}=(0,s.ri)(p,m),x=c()(p,v,y,h,{["".concat(p,"-").concat(I)]:I},n);return f(o.createElement("div",Object.assign({ref:t,className:x,style:r},i),a))}),v=o.createContext({latestIndex:0}),h=v.Provider;var y=e=>{let{className:t,index:n,children:a,split:c,style:r}=e,{latestIndex:l}=o.useContext(v);return null==a?null:o.createElement(o.Fragment,null,o.createElement("div",{className:t,style:r},a),n{let{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},["".concat(t,"-item:empty")]:{display:"none"},["".concat(t,"-item > ").concat(n,"-badge-not-a-wrapper:only-child")]:{display:"block"}}}},w=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}};var S=(0,m.I$)("Space",e=>{let t=(0,I.IX)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[x(t),w(t)]},()=>({}),{resetStyle:!1}),C=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let O=o.forwardRef((e,t)=>{var n;let{getPrefixCls:a,direction:s,size:u,className:m,style:p,classNames:g,styles:b}=(0,d.dj)("space"),{size:f=null!=u?u:"small",align:v,className:I,rootClassName:x,children:w,direction:O="horizontal",prefixCls:B,split:k,style:j,wrap:E=!1,classNames:z,styles:N}=e,H=C(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[T,P]=Array.isArray(f)?f:[f,f],R=l(P),Z=l(T),M=i(P),D=i(T),A=(0,r.Z)(w,{keepEmpty:!0}),W=void 0===v&&"horizontal"===O?"center":v,L=a("space",B),[G,X,_]=S(L),q=c()(L,m,X,"".concat(L,"-").concat(O),{["".concat(L,"-rtl")]:"rtl"===s,["".concat(L,"-align-").concat(W)]:W,["".concat(L,"-gap-row-").concat(P)]:R,["".concat(L,"-gap-col-").concat(T)]:Z},I,x,_),F=c()("".concat(L,"-item"),null!==(n=null==z?void 0:z.item)&&void 0!==n?n:g.item),V=Object.assign(Object.assign({},b.item),null==N?void 0:N.item),Y=A.map((e,t)=>{let n=(null==e?void 0:e.key)||"".concat(F,"-").concat(t);return o.createElement(y,{className:F,key:n,index:t,split:k,style:V},e)}),$=o.useMemo(()=>({latestIndex:A.reduce((e,t,n)=>null!=t?n:e,0)}),[A]);if(0===A.length)return null;let J={};return E&&(J.flexWrap="wrap"),!Z&&D&&(J.columnGap=T),!R&&M&&(J.rowGap=P),G(o.createElement("div",Object.assign({ref:t,className:q,style:Object.assign(Object.assign(Object.assign({},J),p),j)},H),o.createElement(h,{value:$},Y)))});O.Compact=s.ZP,O.Addon=f;var B=O}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3871-be6e9adb966e0429.js b/litellm/proxy/_experimental/out/_next/static/chunks/3871-be6e9adb966e0429.js
new file mode 100644
index 00000000000..34879ac905f
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/3871-be6e9adb966e0429.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3871,1623],{69993:function(e,t,r){r.d(t,{Z:function(){return s}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},i=r(55015),s=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},47323:function(e,t,r){r.d(t,{Z:function(){return g}});var n=r(5853),o=r(2265),a=r(47187),i=r(7084),s=r(13241),l=r(1153),u=r(26898);let c={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},h={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},f=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,l.bM)(t,u.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,l.bM)(t,u.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,l.bM)(t,u.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,l.bM)(t,u.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,l.bM)(t,u.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,l.bM)(t,u.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,s.q)((0,l.bM)(t,u.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,l.bM)(t,u.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,l.bM)(t,u.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,l.bM)(t,u.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,s.q)((0,l.bM)(t,u.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},m=(0,l.fn)("Icon"),g=o.forwardRef((e,t)=>{let{icon:r,variant:u="simple",tooltip:g,size:p=i.u8.SM,color:b,className:y}=e,v=(0,n._T)(e,["icon","variant","tooltip","size","color","className"]),w=f(u,b),{tooltipProps:k,getReferenceProps:C}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,l.lq)([t,k.refs.setReference]),className:(0,s.q)(m("root"),"inline-flex shrink-0 items-center justify-center",w.bgColor,w.textColor,w.borderColor,w.ringColor,h[u].rounded,h[u].border,h[u].shadow,h[u].ring,c[p].paddingX,c[p].paddingY,y)},C,v),o.createElement(a.Z,Object.assign({text:g},k)),o.createElement(r,{className:(0,s.q)(m("icon"),"shrink-0",d[p].height,d[p].width)}))});g.displayName="Icon"},59341:function(e,t,r){r.d(t,{Z:function(){return Z}});var n=r(5853),o=r(71049),a=r(11323),i=r(2265),s=r(66797),l=r(40099),u=r(74275),c=r(59456),d=r(93980),h=r(65573),f=r(67561),m=r(87550),g=r(628),p=r(80281),b=r(31370),y=r(20131),v=r(38929),w=r(52307),k=r(52724),C=r(7935);let x=(0,i.createContext)(null);x.displayName="GroupContext";let M=i.Fragment,q=Object.assign((0,v.yV)(function(e,t){var r;let n=(0,i.useId)(),M=(0,p.Q)(),q=(0,m.B)(),{id:O=M||"headlessui-switch-".concat(n),disabled:E=q||!1,checked:j,defaultChecked:P,onChange:S,name:L,value:Z,form:D,autoFocus:N=!1,...R}=e,Q=(0,i.useContext)(x),[T,z]=(0,i.useState)(null),A=(0,i.useRef)(null),B=(0,f.T)(A,t,null===Q?null:Q.setSwitch,z),F=(0,u.L)(P),[K,H]=(0,l.q)(j,S,null!=F&&F),V=(0,c.G)(),[_,I]=(0,i.useState)(!1),X=(0,d.z)(()=>{I(!0),null==H||H(!K),V.nextFrame(()=>{I(!1)})}),G=(0,d.z)(e=>{if((0,b.P)(e.currentTarget))return e.preventDefault();e.preventDefault(),X()}),W=(0,d.z)(e=>{e.key===k.R.Space?(e.preventDefault(),X()):e.key===k.R.Enter&&(0,y.g)(e.currentTarget)}),Y=(0,d.z)(e=>e.preventDefault()),U=(0,C.wp)(),J=(0,w.zH)(),{isFocusVisible:$,focusProps:ee}=(0,o.F)({autoFocus:N}),{isHovered:et,hoverProps:er}=(0,a.X)({isDisabled:E}),{pressed:en,pressProps:eo}=(0,s.x)({disabled:E}),ea=(0,i.useMemo)(()=>({checked:K,disabled:E,hover:et,focus:$,active:en,autofocus:N,changing:_}),[K,et,$,en,E,_,N]),ei=(0,v.dG)({id:O,ref:B,role:"switch",type:(0,h.f)(e,T),tabIndex:-1===e.tabIndex?0:null!=(r=e.tabIndex)?r:0,"aria-checked":K,"aria-labelledby":U,"aria-describedby":J,disabled:E||void 0,autoFocus:N,onClick:G,onKeyUp:W,onKeyPress:Y},ee,er,eo),es=(0,i.useCallback)(()=>{if(void 0!==F)return null==H?void 0:H(F)},[H,F]),el=(0,v.L6)();return i.createElement(i.Fragment,null,null!=L&&i.createElement(g.Mt,{disabled:E,data:{[L]:Z||"on"},overrides:{type:"checkbox",checked:K},form:D,onReset:es}),el({ourProps:ei,theirProps:R,slot:ea,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,n]=(0,i.useState)(null),[o,a]=(0,C.bE)(),[s,l]=(0,w.fw)(),u=(0,i.useMemo)(()=>({switch:r,setSwitch:n}),[r,n]),c=(0,v.L6)();return i.createElement(l,{name:"Switch.Description",value:s},i.createElement(a,{name:"Switch.Label",value:o,props:{htmlFor:null==(t=u.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},i.createElement(x.Provider,{value:u},c({ourProps:{},theirProps:e,slot:{},defaultTag:M,name:"Switch.Group"}))))},Label:C.__,Description:w.dk});var O=r(44140),E=r(26898),j=r(13241),P=r(1153),S=r(47187);let L=(0,P.fn)("Switch"),Z=i.forwardRef((e,t)=>{let{checked:r,defaultChecked:o=!1,onChange:a,color:s,name:l,error:u,errorMessage:c,disabled:d,required:h,tooltip:f,id:m}=e,g=(0,n._T)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),p={bgColor:s?(0,P.bM)(s,E.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:s?(0,P.bM)(s,E.K.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[b,y]=(0,O.Z)(o,r),[v,w]=(0,i.useState)(!1),{tooltipProps:k,getReferenceProps:C}=(0,S.l)(300);return i.createElement("div",{className:"flex flex-row items-center justify-start"},i.createElement(S.Z,Object.assign({text:f},k)),i.createElement("div",Object.assign({ref:(0,P.lq)([t,k.refs.setReference]),className:(0,j.q)(L("root"),"flex flex-row relative h-5")},g,C),i.createElement("input",{type:"checkbox",className:(0,j.q)(L("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:l,required:h,checked:b,onChange:e=>{e.preventDefault()}}),i.createElement(q,{checked:b,onChange:e=>{y(e),null==a||a(e)},disabled:d,className:(0,j.q)(L("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",d?"cursor-not-allowed":""),onFocus:()=>w(!0),onBlur:()=>w(!1),id:m},i.createElement("span",{className:(0,j.q)(L("sr-only"),"sr-only")},"Switch ",b?"on":"off"),i.createElement("span",{"aria-hidden":"true",className:(0,j.q)(L("background"),b?p.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),i.createElement("span",{"aria-hidden":"true",className:(0,j.q)(L("round"),b?(0,j.q)(p.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",v?(0,j.q)("ring-2",p.ringColor):"")}))),u&&c?i.createElement("p",{className:(0,j.q)(L("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});Z.displayName="Switch"},49804:function(e,t,r){r.d(t,{Z:function(){return u}});var n=r(5853),o=r(13241),a=r(1153),i=r(2265),s=r(9496);let l=(0,a.fn)("Col"),u=i.forwardRef((e,t)=>{let{numColSpan:r=1,numColSpanSm:a,numColSpanMd:u,numColSpanLg:c,children:d,className:h}=e,f=(0,n._T)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),m=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return i.createElement("div",Object.assign({ref:t,className:(0,o.q)(l("root"),(()=>{let e=m(r,s.PT),t=m(a,s.SP),n=m(u,s.VS),i=m(c,s._w);return(0,o.q)(e,t,n,i)})(),h)},f),d)});u.displayName="Col"},94789:function(e,t,r){r.d(t,{Z:function(){return u}});var n=r(5853),o=r(2265),a=r(26898),i=r(13241),s=r(1153);let l=(0,s.fn)("Callout"),u=o.forwardRef((e,t)=>{let{title:r,icon:u,color:c,className:d,children:h}=e,f=(0,n._T)(e,["title","icon","color","className","children"]);return o.createElement("div",Object.assign({ref:t,className:(0,i.q)(l("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",c?(0,i.q)((0,s.bM)(c,a.K.background).bgColor,(0,s.bM)(c,a.K.darkBorder).borderColor,(0,s.bM)(c,a.K.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,i.q)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),d)},f),o.createElement("div",{className:(0,i.q)(l("header"),"flex items-start")},u?o.createElement(u,{className:(0,i.q)(l("icon"),"flex-none h-5 w-5 mr-1.5")}):null,o.createElement("h4",{className:(0,i.q)(l("title"),"font-semibold")},r)),o.createElement("p",{className:(0,i.q)(l("body"),"overflow-y-auto",h?"mt-2":"")},h))});u.displayName="Callout"},2651:function(e,t,r){r.d(t,{Z:function(){return v}});var n=r(93463),o=r(11938),a=r(70774),i=r(73602),s=r(91691),l=r(25119),u=r(37628),c=r(32417),d=r(4877),h=r(57943),f=r(12789),m=r(54558);let g=(e,t)=>new m.t(e).setA(t).toRgbString(),p=(e,t)=>new m.t(e).lighten(t).toHexString(),b=e=>{let t=(0,h.R_)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},y=(e,t)=>{let r=e||"#000",n=t||"#fff";return{colorBgBase:r,colorTextBase:n,colorText:g(n,.85),colorTextSecondary:g(n,.65),colorTextTertiary:g(n,.45),colorTextQuaternary:g(n,.25),colorFill:g(n,.18),colorFillSecondary:g(n,.12),colorFillTertiary:g(n,.08),colorFillQuaternary:g(n,.04),colorBgSolid:g(n,.95),colorBgSolidHover:g(n,1),colorBgSolidActive:g(n,.9),colorBgElevated:p(r,12),colorBgContainer:p(r,8),colorBgLayout:p(r,0),colorBgSpotlight:p(r,26),colorBgBlur:g(n,.04),colorBorder:p(r,26),colorBorderSecondary:p(r,19)}};var v={defaultSeed:l.u_.token,useToken:function(){let[e,t,r]=(0,s.ZP)();return{theme:e,token:t,hashId:r}},defaultAlgorithm:u.Z,darkAlgorithm:(e,t)=>{let r=Object.keys(a.M).map(t=>{let r=(0,h.R_)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,n,o)=>(e["".concat(t,"-").concat(o+1)]=r[o],e["".concat(t).concat(o+1)]=r[o],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),n=null!=t?t:(0,u.Z)(e),o=(0,f.Z)(e,{generateColorPalettes:b,generateNeutralColorPalettes:y});return Object.assign(Object.assign(Object.assign(Object.assign({},n),r),o),{colorPrimaryBg:o.colorPrimaryBorder,colorPrimaryBgHover:o.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let r=null!=t?t:(0,u.Z)(e),n=r.fontSizeSM,o=r.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),function(e){let{sizeUnit:t,sizeStep:r}=e,n=r-2;return{sizeXXL:t*(n+10),sizeXL:t*(n+6),sizeLG:t*(n+2),sizeMD:t*(n+2),sizeMS:t*(n+1),size:t*n,sizeSM:t*n,sizeXS:t*(n-1),sizeXXS:t*(n-1)}}(null!=t?t:e)),(0,d.Z)(n)),{controlHeight:o}),(0,c.Z)(Object.assign(Object.assign({},r),{controlHeight:o})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,n.jG)(e.algorithm):o.Z,r=Object.assign(Object.assign({},a.Z),null==e?void 0:e.token);return(0,n.t2)(r,{override:null==e?void 0:e.token},t,i.Z)},defaultConfig:l.u_,_internalContext:l.Mj}},15051:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},49322:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},99397:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},32489:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},10900:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});t.Z=o},91777:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});t.Z=o},47686:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});t.Z=o},58710:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=o},82182:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});t.Z=o},79814:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))});t.Z=o},2356:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});t.Z=o},93416:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});t.Z=o},77355:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=o},22452:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});t.Z=o},25327:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))});t.Z=o},49084:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});t.Z=o},3497:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"}))});t.Z=o},2894:function(e,t,r){r.d(t,{R:function(){return s},m:function(){return i}});var n=r(18238),o=r(7989),a=r(11255),i=class extends o.F{#e;#t;#r;#n;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#r=e.mutationCache,this.#t=[],this.state=e.state||s(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#r.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#o({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=(0,a.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});let n="pending"===this.state.status,o=!this.#n.canStart();try{if(n)t();else{this.#o({type:"pending",variables:e,isPaused:o}),await this.#r.config.onMutate?.(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#o({type:"pending",context:t,variables:e,isPaused:o})}let a=await this.#n.start();return await this.#r.config.onSuccess?.(a,e,this.state.context,this,r),await this.options.onSuccess?.(a,e,this.state.context,r),await this.#r.config.onSettled?.(a,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(a,null,e,this.state.context,r),this.#o({type:"success",data:a}),a}catch(t){try{throw await this.#r.config.onError?.(t,e,this.state.context,this,r),await this.options.onError?.(t,e,this.state.context,r),await this.#r.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,t,e,this.state.context,r),t}finally{this.#o({type:"error",error:t})}}finally{this.#r.runNext(this)}}#o(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),n.Vr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#r.notify({mutation:this,type:"updated",action:e})})}};function s(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},21623:function(e,t,r){r.d(t,{S:function(){return g}});var n=r(45345),o=r(21733),a=r(18238),i=r(24112),s=class extends i.l{constructor(e={}){super(),this.config=e,this.#a=new Map}#a;build(e,t,r){let a=t.queryKey,i=t.queryHash??(0,n.Rm)(a,t),s=this.get(i);return s||(s=new o.A({client:e,queryKey:a,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(a)}),this.add(s)),s}add(e){this.#a.has(e.queryHash)||(this.#a.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#a.get(e.queryHash);t&&(e.destroy(),t===e&&this.#a.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){a.Vr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#a.get(e)}getAll(){return[...this.#a.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,n._x)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,n._x)(e,t)):t}notify(e){a.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){a.Vr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){a.Vr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},l=r(2894),u=class extends i.l{constructor(e={}){super(),this.config=e,this.#i=new Set,this.#s=new Map,this.#l=0}#i;#s;#l;build(e,t,r){let n=new l.m({client:e,mutationCache:this,mutationId:++this.#l,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#i.add(e);let t=c(e);if("string"==typeof t){let r=this.#s.get(t);r?r.push(e):this.#s.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#i.delete(e)){let t=c(e);if("string"==typeof t){let r=this.#s.get(t);if(r){if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#s.delete(t)}}}this.notify({type:"removed",mutation:e})}canRun(e){let t=c(e);if("string"!=typeof t)return!0;{let r=this.#s.get(t),n=r?.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=c(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#s.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){a.Vr.batch(()=>{this.#i.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#i.clear(),this.#s.clear()})}getAll(){return Array.from(this.#i)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,n.X7)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,n.X7)(e,t))}notify(e){a.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return a.Vr.batch(()=>Promise.all(e.map(e=>e.continue().catch(n.ZT))))}};function c(e){return e.options.scope?.id}var d=r(87045),h=r(57853);function f(e){return{onFetch:(t,r)=>{let o=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],s=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},u=0,c=async()=>{let r=!1,c=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)})},d=(0,n.cG)(t.options,t.fetchOptions),h=async(e,o,a)=>{if(r)return Promise.reject();if(null==o&&e.pages.length)return Promise.resolve(e);let i=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:o,direction:a?"backward":"forward",meta:t.options.meta};return c(e),e})(),s=await d(i),{maxPages:l}=t.options,u=a?n.Ht:n.VX;return{pages:u(e.pages,s,l),pageParams:u(e.pageParams,o,l)}};if(a&&i.length){let e="backward"===a,t={pages:i,pageParams:s},r=(e?function(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}:m)(o,t);l=await h(t,r,e)}else{let t=e??i.length;do{let e=0===u?s[0]??o.initialPageParam:m(o,l);if(u>0&&null==e)break;l=await h(l,e),u++}while(ut.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function m(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}var g=class{#u;#r;#c;#d;#h;#f;#m;#g;constructor(e={}){this.#u=e.queryCache||new s,this.#r=e.mutationCache||new u,this.#c=e.defaultOptions||{},this.#d=new Map,this.#h=new Map,this.#f=0}mount(){this.#f++,1===this.#f&&(this.#m=d.j.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#u.onFocus())}),this.#g=h.N.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#u.onOnline())}))}unmount(){this.#f--,0===this.#f&&(this.#m?.(),this.#m=void 0,this.#g?.(),this.#g=void 0)}isFetching(e){return this.#u.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#r.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#u.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#u.build(this,t),o=r.state.data;return void 0===o?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,n.KC)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(e){return this.#u.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let o=this.defaultQueryOptions({queryKey:e}),a=this.#u.get(o.queryHash),i=a?.state.data,s=(0,n.SE)(t,i);if(void 0!==s)return this.#u.build(this,o).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return a.Vr.batch(()=>this.#u.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#u.get(t.queryHash)?.state}removeQueries(e){let t=this.#u;a.Vr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#u;return a.Vr.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(a.Vr.batch(()=>this.#u.findAll(e).map(e=>e.cancel(r)))).then(n.ZT).catch(n.ZT)}invalidateQueries(e,t={}){return a.Vr.batch(()=>(this.#u.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(a.Vr.batch(()=>this.#u.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(n.ZT)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(n.ZT)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#u.build(this,t);return r.isStaleByTime((0,n.KC)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(n.ZT).catch(n.ZT)}fetchInfiniteQuery(e){return e.behavior=f(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(n.ZT).catch(n.ZT)}ensureInfiniteQueryData(e){return e.behavior=f(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return h.N.isOnline()?this.#r.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#u}getMutationCache(){return this.#r}getDefaultOptions(){return this.#c}setDefaultOptions(e){this.#c=e}setQueryDefaults(e,t){this.#d.set((0,n.Ym)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#d.values()],r={};return t.forEach(t=>{(0,n.to)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#h.set((0,n.Ym)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#h.values()],r={};return t.forEach(t=>{(0,n.to)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,n.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===n.CN&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#c.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#u.clear(),this.#r.clear()}}},92668:function(e,t,r){r.d(t,{I:function(){return s}});var n=r(59121),o=r(31091),a=r(63497),i=r(99649);function s(e,t){let{years:r=0,months:s=0,weeks:l=0,days:u=0,hours:c=0,minutes:d=0,seconds:h=0}=t,f=(0,i.Q)(e),m=s||r?(0,o.z)(f,s+12*r):f,g=u||l?(0,n.E)(m,u+7*l):m;return(0,a.L)(e,g.getTime()+1e3*(h+60*(d+60*c)))}},59121:function(e,t,r){r.d(t,{E:function(){return a}});var n=r(99649),o=r(63497);function a(e,t){let r=(0,n.Q)(e);return isNaN(t)?(0,o.L)(e,NaN):(t&&r.setDate(r.getDate()+t),r)}},31091:function(e,t,r){r.d(t,{z:function(){return a}});var n=r(99649),o=r(63497);function a(e,t){let r=(0,n.Q)(e);if(isNaN(t))return(0,o.L)(e,NaN);if(!t)return r;let a=r.getDate(),i=(0,o.L)(e,r.getTime());return(i.setMonth(r.getMonth()+t+1,0),a>=i.getDate())?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}},63497:function(e,t,r){r.d(t,{L:function(){return n}});function n(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}},99649:function(e,t,r){r.d(t,{Q:function(){return n}});function n(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3885-e5f4fc4a4724e9b8.js b/litellm/proxy/_experimental/out/_next/static/chunks/3885-e5f4fc4a4724e9b8.js
new file mode 100644
index 00000000000..910260b210c
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/3885-e5f4fc4a4724e9b8.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3885],{46346:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zm-126 534.1H250.3l-53.8-409.4 139.8 86.1L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4zM512 509c-62.1 0-112.6 50.5-112.6 112.6S449.9 734.2 512 734.2s112.6-50.5 112.6-112.6S574.1 509 512 509zm0 160.9c-26.6 0-48.2-21.6-48.2-48.3 0-26.6 21.6-48.3 48.2-48.3s48.2 21.6 48.2 48.3c0 26.6-21.6 48.3-48.2 48.3z"}}]},name:"crown",theme:"outlined"},i=n(55015),c=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},4683:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"}}]},name:"github",theme:"outlined"},i=n(55015),c=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},40428:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"},i=n(55015),c=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},91870:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"},i=n(55015),c=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},45524:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"},i=n(55015),c=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},83884:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"},i=n(55015),c=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},57400:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z"}},{tag:"path",attrs:{d:"M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z"}}]},name:"safety",theme:"outlined"},i=n(55015),c=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},20949:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M409.4 128c-42.4 0-76.7 34.4-76.7 76.8 0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5h76.7v-76.8c0-42.3-34.3-76.7-76.7-76.8zm0 204.8H204.7c-42.4 0-76.7 34.4-76.7 76.8s34.4 76.8 76.7 76.8h204.6c42.4 0 76.7-34.4 76.7-76.8.1-42.4-34.3-76.8-76.6-76.8zM614 486.4c42.4 0 76.8-34.4 76.7-76.8V204.8c0-42.4-34.3-76.8-76.7-76.8-42.4 0-76.7 34.4-76.7 76.8v204.8c0 42.5 34.3 76.8 76.7 76.8zm281.4-76.8c0-42.4-34.4-76.8-76.7-76.8S742 367.2 742 409.6v76.8h76.7c42.3 0 76.7-34.4 76.7-76.8zm-76.8 128H614c-42.4 0-76.7 34.4-76.7 76.8 0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5h204.6c42.4 0 76.7-34.4 76.7-76.8.1-42.4-34.3-76.7-76.7-76.8zM614 742.4h-76.7v76.8c0 42.4 34.4 76.8 76.7 76.8 42.4 0 76.8-34.4 76.7-76.8.1-42.4-34.3-76.7-76.7-76.8zM409.4 537.6c-42.4 0-76.7 34.4-76.7 76.8v204.8c0 42.4 34.4 76.8 76.7 76.8 42.4 0 76.8-34.4 76.7-76.8V614.4c0-20.3-8.1-39.9-22.4-54.3a76.92 76.92 0 00-54.3-22.5zM128 614.4c0 20.3 8.1 39.9 22.4 54.3a76.74 76.74 0 0054.3 22.5c42.4 0 76.8-34.4 76.7-76.8v-76.8h-76.7c-42.3 0-76.7 34.4-76.7 76.8z"}}]},name:"slack",theme:"outlined"},i=n(55015),c=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},15883:function(e,t,n){n.d(t,{Z:function(){return c}});var r=n(1119),o=n(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},i=n(55015),c=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,r.Z)({},e,{ref:t,icon:a}))})},3810:function(e,t,n){n.d(t,{Z:function(){return I}});var r=n(2265),o=n(36760),a=n.n(o),i=n(18694),c=n(93350),l=n(53445),u=n(19722),s=n(6694),f=n(71744),d=n(93463),p=n(54558),h=n(12918),g=n(71140),m=n(99320);let _=e=>{let{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:o,calc:a}=e,i=a(r).sub(n).equal(),c=a(t).sub(n).equal();return{[o]:Object.assign(Object.assign({},(0,h.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:"".concat((0,d.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusSM,opacity:1,transition:"all ".concat(e.motionDurationMid),textAlign:"start",position:"relative",["&".concat(o,"-rtl")]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},["".concat(o,"-close-icon")]:{marginInlineStart:c,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),"&:hover":{color:e.colorTextHeading}},["&".concat(o,"-has-color")]:{borderColor:"transparent",["&, a, a:hover, ".concat(e.iconCls,"-close, ").concat(e.iconCls,"-close:hover")]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",["&:not(".concat(o,"-checkable-checked):hover")]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},["> ".concat(e.iconCls," + span, > span + ").concat(e.iconCls)]:{marginInlineStart:i}}),["".concat(o,"-borderless")]:{borderColor:"transparent",background:e.tagBorderlessBg}}},E=e=>{let{lineWidth:t,fontSizeIcon:n,calc:r}=e,o=e.fontSizeSM;return(0,g.IX)(e,{tagFontSize:o,tagLineHeight:(0,d.bf)(r(e.lineHeightSM).mul(o).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},b=e=>({defaultBg:new p.t(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var v=(0,m.I$)("Tag",e=>_(E(e)),b),R=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let y=r.forwardRef((e,t)=>{let{prefixCls:n,style:o,className:i,checked:c,children:l,icon:u,onChange:s,onClick:d}=e,p=R(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:h,tag:g}=r.useContext(f.E_),m=h("tag",n),[_,E,b]=v(m),y=a()(m,"".concat(m,"-checkable"),{["".concat(m,"-checkable-checked")]:c},null==g?void 0:g.className,i,E,b);return _(r.createElement("span",Object.assign({},p,{ref:t,style:Object.assign(Object.assign({},o),null==g?void 0:g.style),className:y,onClick:e=>{null==s||s(!c),null==d||d(e)}}),u,r.createElement("span",null,l)))});var S=n(18536);let P=e=>(0,S.Z)(e,(t,n)=>{let{textColor:r,lightBorderColor:o,lightColor:a,darkColor:i}=n;return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:r,background:a,borderColor:o,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}});var O=(0,m.bk)(["Tag","preset"],e=>P(E(e)),b);let C=(e,t,n)=>{let r="string"!=typeof n?n:n.charAt(0).toUpperCase()+n.slice(1);return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:e["color".concat(n)],background:e["color".concat(r,"Bg")],borderColor:e["color".concat(r,"Border")],["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}};var A=(0,m.bk)(["Tag","status"],e=>{let t=E(e);return[C(t,"success","Success"),C(t,"processing","Info"),C(t,"error","Error"),C(t,"warning","Warning")]},b),T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let N=r.forwardRef((e,t)=>{let{prefixCls:n,className:o,rootClassName:d,style:p,children:h,icon:g,color:m,onClose:_,bordered:E=!0,visible:b}=e,R=T(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:y,direction:S,tag:P}=r.useContext(f.E_),[C,N]=r.useState(!0),I=(0,i.Z)(R,["closeIcon","closable"]);r.useEffect(()=>{void 0!==b&&N(b)},[b]);let x=(0,c.o2)(m),w=(0,c.yT)(m),M=x||w,j=Object.assign(Object.assign({backgroundColor:m&&!M?m:void 0},null==P?void 0:P.style),p),L=y("tag",n),[k,D,z]=v(L),U=a()(L,null==P?void 0:P.className,{["".concat(L,"-").concat(m)]:M,["".concat(L,"-has-color")]:m&&!M,["".concat(L,"-hidden")]:!C,["".concat(L,"-rtl")]:"rtl"===S,["".concat(L,"-borderless")]:!E},o,d,D,z),H=e=>{e.stopPropagation(),null==_||_(e),e.defaultPrevented||N(!1)},[,B]=(0,l.b)((0,l.w)(e),(0,l.w)(P),{closable:!1,closeIconRender:e=>{let t=r.createElement("span",{className:"".concat(L,"-close-icon"),onClick:H},e);return(0,u.wm)(e,t,e=>({onClick:t=>{var n;null===(n=null==e?void 0:e.onClick)||void 0===n||n.call(e,t),H(t)},className:a()(null==e?void 0:e.className,"".concat(L,"-close-icon"))}))}}),F="function"==typeof R.onClick||h&&"a"===h.type,X=g||null,Z=X?r.createElement(r.Fragment,null,X,h&&r.createElement("span",null,h)):h,W=r.createElement("span",Object.assign({},I,{ref:t,className:U,style:j}),Z,B,x&&r.createElement(O,{key:"preset",prefixCls:L}),w&&r.createElement(A,{key:"status",prefixCls:L}));return k(F?r.createElement(s.Z,{component:"Tag"},W):W)});N.CheckableTag=y;var I=N},27648:function(e,t,n){n.d(t,{default:function(){return o.a}});var r=n(72972),o=n.n(r)},55449:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return r}}),n(33068);let r=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;ra?e.prefetch(t,o):e.prefetch(t,n,r))().catch(e=>{})}}function b(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let v=a.default.forwardRef(function(e,t){let n,r;let{href:l,as:_,children:v,prefetch:R=null,passHref:y,replace:S,shallow:P,scroll:O,locale:C,onClick:A,onMouseEnter:T,onTouchStart:N,legacyBehavior:I=!1,...x}=e;n=v,I&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let w=a.default.useContext(f.RouterContext),M=a.default.useContext(d.AppRouterContext),j=null!=w?w:M,L=!w,k=!1!==R,D=null===R?m.PrefetchKind.AUTO:m.PrefetchKind.FULL,{href:z,as:U}=a.default.useMemo(()=>{if(!w){let e=b(l);return{href:e,as:_?b(_):e}}let[e,t]=(0,i.resolveHref)(w,l,!0);return{href:e,as:_?(0,i.resolveHref)(w,_):t||e}},[w,l,_]),H=a.default.useRef(z),B=a.default.useRef(U);I&&(r=a.default.Children.only(n));let F=I?r&&"object"==typeof r&&r.ref:t,[X,Z,W]=(0,p.useIntersection)({rootMargin:"200px"}),G=a.default.useCallback(e=>{(B.current!==U||H.current!==z)&&(W(),B.current=U,H.current=z),X(e),F&&("function"==typeof F?F(e):"object"==typeof F&&(F.current=e))},[U,F,z,W,X]);a.default.useEffect(()=>{j&&Z&&k&&E(j,z,U,{locale:C},{kind:D},L)},[U,z,Z,C,k,null==w?void 0:w.locale,j,L,D]);let V={ref:G,onClick(e){I||"function"!=typeof A||A(e),I&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),j&&!e.defaultPrevented&&function(e,t,n,r,o,i,l,u,s){let{nodeName:f}=e.currentTarget;if("A"===f.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!s&&!(0,c.isLocalURL)(n)))return;e.preventDefault();let d=()=>{let e=null==l||l;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:i,locale:u,scroll:e}):t[o?"replace":"push"](r||n,{scroll:e})};s?a.default.startTransition(d):d()}(e,j,z,U,S,P,O,C,L)},onMouseEnter(e){I||"function"!=typeof T||T(e),I&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),j&&(k||!L)&&E(j,z,U,{locale:C,priority:!0,bypassPrefetchedCheck:!0},{kind:D},L)},onTouchStart:function(e){I||"function"!=typeof N||N(e),I&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),j&&(k||!L)&&E(j,z,U,{locale:C,priority:!0,bypassPrefetchedCheck:!0},{kind:D},L)}};if((0,u.isAbsoluteUrl)(U))V.href=U;else if(!I||y||"a"===r.type&&!("href"in r.props)){let e=void 0!==C?C:null==w?void 0:w.locale,t=(null==w?void 0:w.isLocaleDomain)&&(0,h.getDomainLocale)(U,e,null==w?void 0:w.locales,null==w?void 0:w.domainLocales);V.href=t||(0,g.addBasePath)((0,s.addLocale)(U,e,null==w?void 0:w.defaultLocale))}return I?a.default.cloneElement(r,V):(0,o.jsx)("a",{...x,...V,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},63515:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{cancelIdleCallback:function(){return r},requestIdleCallback:function(){return n}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25246:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});let r=n(48637),o=n(57497),a=n(17053),i=n(3987),c=n(33068),l=n(53552),u=n(86279),s=n(37205);function f(e,t,n){let f;let d="string"==typeof t?t:(0,o.formatWithValidation)(t),p=d.match(/^[a-zA-Z]{1,}:\/\//),h=p?d.slice(p[0].length):d;if((h.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+d+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,i.normalizeRepeatedSlashes)(h);d=(p?p[0]:"")+t}if(!(0,l.isLocalURL)(d))return n?[d]:d;try{f=new URL(d.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){f=new URL("/","http://n")}try{let e=new URL(d,f);e.pathname=(0,c.normalizePathTrailingSlash)(e.pathname);let t="";if((0,u.isDynamicRoute)(e.pathname)&&e.searchParams&&n){let n=(0,r.searchParamsToUrlQuery)(e.searchParams),{result:i,params:c}=(0,s.interpolateAs)(e.pathname,e.pathname,n);i&&(t=(0,o.formatWithValidation)({pathname:i,hash:e.hash,query:(0,a.omit)(n,c)}))}let i=e.origin===f.origin?e.href.slice(e.origin.length):e.href;return n?[i,t||i]:i}catch(e){return n?[d]:d}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},16081:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let r=n(2265),o=n(63515),a="function"==typeof IntersectionObserver,i=new Map,c=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,u=l||!a,[s,f]=(0,r.useState)(!1),d=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{d.current=e},[]);return(0,r.useEffect)(()=>{if(a){if(u||s)return;let e=d.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:o,elements:a}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=c.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=i.get(r)))return t;let o=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:o},c.push(n),i.set(n,t),t}(n);return a.set(e,t),o.observe(e),function(){if(a.delete(e),o.unobserve(e),0===a.size){o.disconnect(),i.delete(r);let e=c.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&c.splice(e,1)}}}(e,e=>e&&f(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!s){let e=(0,o.requestIdleCallback)(()=>f(!0));return()=>(0,o.cancelIdleCallback)(e)}},[u,n,t,s,d.current]),[p,s,(0,r.useCallback)(()=>{f(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},19259:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION_SUFFIX:function(){return l},APP_DIR_ALIAS:function(){return A},CACHE_ONE_YEAR:function(){return v},DOT_NEXT_ALIAS:function(){return O},ESLINT_DEFAULT_DIRS:function(){return W},GSP_NO_RETURNED_VALUE:function(){return U},GSSP_COMPONENT_MEMBER_ERROR:function(){return F},GSSP_NO_RETURNED_VALUE:function(){return H},INSTRUMENTATION_HOOK_FILENAME:function(){return S},MIDDLEWARE_FILENAME:function(){return R},MIDDLEWARE_LOCATION_REGEXP:function(){return y},NEXT_BODY_SUFFIX:function(){return f},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return b},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return h},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return g},NEXT_CACHE_SOFT_TAGS_HEADER:function(){return p},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return E},NEXT_CACHE_TAGS_HEADER:function(){return d},NEXT_CACHE_TAG_MAX_ITEMS:function(){return m},NEXT_CACHE_TAG_MAX_LENGTH:function(){return _},NEXT_DATA_SUFFIX:function(){return u},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return r},NEXT_META_SUFFIX:function(){return s},NEXT_QUERY_PARAM_PREFIX:function(){return n},NON_STANDARD_NODE_ENV:function(){return X},PAGES_DIR_ALIAS:function(){return P},PRERENDER_REVALIDATE_HEADER:function(){return o},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return a},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return M},ROOT_DIR_ALIAS:function(){return C},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return w},RSC_ACTION_ENCRYPTION_ALIAS:function(){return x},RSC_ACTION_PROXY_ALIAS:function(){return I},RSC_ACTION_VALIDATE_ALIAS:function(){return N},RSC_MOD_REF_PROXY_ALIAS:function(){return T},RSC_PREFETCH_SUFFIX:function(){return i},RSC_SUFFIX:function(){return c},SERVER_PROPS_EXPORT_ERROR:function(){return z},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return L},SERVER_PROPS_SSG_CONFLICT:function(){return k},SERVER_RUNTIME:function(){return G},SSG_FALLBACK_EXPORT_ERROR:function(){return Z},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return j},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return D},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return B},WEBPACK_LAYERS:function(){return Y},WEBPACK_RESOURCE_QUERIES:function(){return K}});let n="nxtP",r="nxtI",o="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",c=".rsc",l=".action",u=".json",s=".meta",f=".body",d="x-next-cache-tags",p="x-next-cache-soft-tags",h="x-next-revalidated-tags",g="x-next-revalidate-tag-token",m=128,_=256,E=1024,b="_N_T_",v=31536e3,R="middleware",y=`(?:src/)?${R}`,S="instrumentation",P="private-next-pages",O="private-dot-next",C="private-next-root-dir",A="private-next-app-dir",T="private-next-rsc-mod-ref-proxy",N="private-next-rsc-action-validate",I="private-next-rsc-server-reference",x="private-next-rsc-action-encryption",w="private-next-rsc-action-client-wrapper",M="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",j="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",L="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",k="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",D="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",z="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",U="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",H="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",B="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",F="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",X='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',Z="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",W=["app","pages","components","lib","src"],G={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},V={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"},Y={...V,GROUP:{serverOnly:[V.reactServerComponents,V.actionBrowser,V.appMetadataRoute,V.appRouteHandler,V.instrument],clientOnly:[V.serverSideRendering,V.appPagesBrowser],nonClientServerTarget:[V.middleware,V.api],app:[V.reactServerComponents,V.actionBrowser,V.appMetadataRoute,V.appRouteHandler,V.serverSideRendering,V.appPagesBrowser,V.shared,V.instrument]}},K={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}},90042:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return o}});let n=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function o(e){return n.test(e)?e.replace(r,"\\$&"):e}},25523:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return r}});let r=n(47043)._(n(2265)).default.createContext(null)},57497:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}});let r=n(53099)._(n(48637)),o=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:n}=e,a=e.protocol||"",i=e.pathname||"",c=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:n&&(u=t+(~n.indexOf(":")?"["+n+"]":n),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(r.urlQueryToSearchParams(l)));let s=e.search||l&&"?"+l||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||o.test(a))&&!1!==u?(u="//"+(u||""),i&&"/"!==i[0]&&(i="/"+i)):u||(u=""),c&&"#"!==c[0]&&(c="#"+c),s&&"?"!==s[0]&&(s="?"+s),""+a+u+(i=i.replace(/[?#]/g,encodeURIComponent))+(s=s.replace("#","%23"))+c}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return a(e)}},86279:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return o.isDynamicRoute}});let r=n(14777),o=n(38104)},37205:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return a}});let r=n(4199),o=n(9964);function a(e,t,n){let a="",i=(0,o.getRouteRegex)(e),c=i.groups,l=(t!==e?(0,r.getRouteMatcher)(i)(t):"")||n;a=e;let u=Object.keys(c);return u.every(e=>{let t=l[e]||"",{repeat:n,optional:r}=c[e],o="["+(n?"...":"")+e+"]";return r&&(o=(t?"":"/")+"["+o+"]"),n&&!Array.isArray(t)&&(t=[t]),(r||e in l)&&(a=a.replace(o,n?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(a=""),{params:u,result:a}}},38104:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return a}});let r=n(91182),o=/\/\[[^/]+?\](?=\/|$)/;function a(e){return(0,r.isInterceptionRouteAppPath)(e)&&(e=(0,r.extractInterceptionRouteInformation)(e).interceptedRoute),o.test(e)}},53552:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return a}});let r=n(3987),o=n(11283);function a(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,o.hasBasePath)(n.pathname)}catch(e){return!1}}},17053:function(e,t){function n(e,t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return n}})},48637:function(e,t){function n(e){let t={};return e.forEach((e,n)=>{void 0===t[n]?t[n]=e:Array.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]}),t}function r(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[n,o]=e;Array.isArray(o)?o.forEach(e=>t.append(n,r(e))):t.set(n,r(o))}),t}function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,n)=>e.append(n,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{assign:function(){return a},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return o}})},4199:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o}});let r=n(3987);function o(e){let{re:t,groups:n}=e;return e=>{let o=t.exec(e);if(!o)return!1;let a=e=>{try{return decodeURIComponent(e)}catch(e){throw new r.DecodeError("failed to decode param")}},i={};return Object.keys(n).forEach(e=>{let t=n[e],r=o[t.pos];void 0!==r&&(i[e]=~r.indexOf("/")?r.split("/").map(e=>a(e)):t.repeat?[a(r)]:a(r))}),i}}},9964:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getNamedMiddlewareRegex:function(){return p},getNamedRouteRegex:function(){return d},getRouteRegex:function(){return u},parseParameter:function(){return c}});let r=n(19259),o=n(91182),a=n(90042),i=n(26674);function c(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let n=e.startsWith("...");return n&&(e=e.slice(3)),{key:e,repeat:n,optional:t}}function l(e){let t=(0,i.removeTrailingSlash)(e).slice(1).split("/"),n={},r=1;return{parameterizedRoute:t.map(e=>{let t=o.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&i){let{key:e,optional:o,repeat:l}=c(i[1]);return n[e]={pos:r++,repeat:l,optional:o},"/"+(0,a.escapeStringRegexp)(t)+"([^/]+?)"}if(!i)return"/"+(0,a.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:o}=c(i[1]);return n[e]={pos:r++,repeat:t,optional:o},t?o?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:n}}function u(e){let{parameterizedRoute:t,groups:n}=l(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:n}}function s(e){let{interceptionMarker:t,getSafeRouteKey:n,segment:r,routeKeys:o,keyPrefix:i}=e,{key:l,optional:u,repeat:s}=c(r),f=l.replace(/\W/g,"");i&&(f=""+i+f);let d=!1;(0===f.length||f.length>30)&&(d=!0),isNaN(parseInt(f.slice(0,1)))||(d=!0),d&&(f=n()),i?o[f]=""+i+l:o[f]=l;let p=t?(0,a.escapeStringRegexp)(t):"";return s?u?"(?:/"+p+"(?<"+f+">.+?))?":"/"+p+"(?<"+f+">.+?)":"/"+p+"(?<"+f+">[^/]+?)"}function f(e,t){let n;let c=(0,i.removeTrailingSlash)(e).slice(1).split("/"),l=(n=0,()=>{let e="",t=++n;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),u={};return{namedParameterizedRoute:c.map(e=>{let n=o.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(n&&i){let[n]=e.split(i[0]);return s({getSafeRouteKey:l,interceptionMarker:n,segment:i[1],routeKeys:u,keyPrefix:t?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}return i?s({getSafeRouteKey:l,segment:i[1],routeKeys:u,keyPrefix:t?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,a.escapeStringRegexp)(e)}).join(""),routeKeys:u}}function d(e,t){let n=f(e,t);return{...u(e),namedRegex:"^"+n.namedParameterizedRoute+"(?:/)?$",routeKeys:n.routeKeys}}function p(e,t){let{parameterizedRoute:n}=l(e),{catchAll:r=!0}=t;if("/"===n)return{namedRegex:"^/"+(r?".*":"")+"$"};let{namedParameterizedRoute:o}=f(e,!1);return{namedRegex:"^"+o+(r?"(?:(/.*)?)":"")+"$"}}},14777:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class n{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let n=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');n.unshift(t)}return null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),n}_insert(e,t,r){if(0===e.length){this.placeholder=!1;return}if(r)throw Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let n=o.slice(1,-1),i=!1;if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1),i=!0),n.startsWith("...")&&(n=n.substring(3),r=!0),n.startsWith("[")||n.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+n+"').");if(n.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+n+"').");function a(e,n){if(null!==e&&e!==n)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+n+"').");t.forEach(e=>{if(e===n)throw Error('You cannot have the same slug name "'+n+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+n+'" differ only by non-word symbols within a single dynamic path')}),t.push(n)}if(r){if(i){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');a(this.optionalRestSlugName,n),this.optionalRestSlugName=n,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');a(this.restSlugName,n),this.restSlugName=n,o="[...]"}}else{if(i)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');a(this.slugName,n),this.slugName=n,o="[]"}}this.children.has(o)||this.children.set(o,new n),this.children.get(o)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(e){let t=new n;return e.forEach(e=>t.insert(e)),t.smoosh()}},3987:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return E},MissingStaticPage:function(){return _},NormalizeError:function(){return g},PageNotFoundError:function(){return m},SP:function(){return d},ST:function(){return p},WEB_VITALS:function(){return n},execOnce:function(){return r},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return c},isAbsoluteUrl:function(){return a},isResSent:function(){return u},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return s},stringifyError:function(){return b}});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function r(e){let t,n=!1;return function(){for(var r=arguments.length,o=Array(r),a=0;ao.test(e);function i(){let{protocol:e,hostname:t,port:n}=window.location;return e+"//"+t+(n?":"+n:"")}function c(){let{href:e}=window.location,t=i();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function u(e){return e.finished||e.headersSent}function s(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(n&&u(n))return r;if(!r)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+r+'" instead.');return r}let d="undefined"!=typeof performance,p=d&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class g extends Error{}class m extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class _ extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class E extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function b(e){return JSON.stringify({message:e.message,stack:e.stack})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3898-fc3dbf5a964ea4ca.js b/litellm/proxy/_experimental/out/_next/static/chunks/3898-fc3dbf5a964ea4ca.js
deleted file mode 100644
index 3ba818622aa..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/3898-fc3dbf5a964ea4ca.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3898],{51653:function(e,t,n){n.d(t,{Z:function(){return H}});var o=n(2265),a=n(8900),c=n(39725),l=n(49638),i=n(54537),r=n(55726),s=n(36760),d=n.n(s),m=n(66632),p=n(18242),b=n(28791),u=n(19722),g=n(71744),f=n(93463),y=n(12918),v=n(99320);let O=(e,t,n,o,a)=>({background:e,border:"".concat((0,f.bf)(o.lineWidth)," ").concat(o.lineType," ").concat(t),["".concat(a,"-icon")]:{color:n}}),h=e=>{let{componentCls:t,motionDurationSlow:n,marginXS:o,marginSM:a,fontSize:c,fontSizeLG:l,lineHeight:i,borderRadiusLG:r,motionEaseInOutCirc:s,withDescriptionIconSize:d,colorText:m,colorTextHeading:p,withDescriptionPadding:b,defaultPadding:u}=e;return{[t]:Object.assign(Object.assign({},(0,y.Wf)(e)),{position:"relative",display:"flex",alignItems:"center",padding:u,wordWrap:"break-word",borderRadius:r,["&".concat(t,"-rtl")]:{direction:"rtl"},["".concat(t,"-content")]:{flex:1,minWidth:0},["".concat(t,"-icon")]:{marginInlineEnd:o,lineHeight:0},"&-description":{display:"none",fontSize:c,lineHeight:i},"&-message":{color:p},["&".concat(t,"-motion-leave")]:{overflow:"hidden",opacity:1,transition:"max-height ".concat(n," ").concat(s,", opacity ").concat(n," ").concat(s,",\n padding-top ").concat(n," ").concat(s,", padding-bottom ").concat(n," ").concat(s,",\n margin-bottom ").concat(n," ").concat(s)},["&".concat(t,"-motion-leave-active")]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),["".concat(t,"-with-description")]:{alignItems:"flex-start",padding:b,["".concat(t,"-icon")]:{marginInlineEnd:a,fontSize:d,lineHeight:0},["".concat(t,"-message")]:{display:"block",marginBottom:o,color:p,fontSize:l},["".concat(t,"-description")]:{display:"block",color:m}},["".concat(t,"-banner")]:{marginBottom:0,border:"0 !important",borderRadius:0}}},j=e=>{let{componentCls:t,colorSuccess:n,colorSuccessBorder:o,colorSuccessBg:a,colorWarning:c,colorWarningBorder:l,colorWarningBg:i,colorError:r,colorErrorBorder:s,colorErrorBg:d,colorInfo:m,colorInfoBorder:p,colorInfoBg:b}=e;return{[t]:{"&-success":O(a,o,n,e,t),"&-info":O(b,p,m,e,t),"&-warning":O(i,l,c,e,t),"&-error":Object.assign(Object.assign({},O(d,s,r,e,t)),{["".concat(t,"-description > pre")]:{margin:0,padding:0}})}}},x=e=>{let{componentCls:t,iconCls:n,motionDurationMid:o,marginXS:a,fontSizeIcon:c,colorIcon:l,colorIconHover:i}=e;return{[t]:{"&-action":{marginInlineStart:a},["".concat(t,"-close-icon")]:{marginInlineStart:a,padding:0,overflow:"hidden",fontSize:c,lineHeight:(0,f.bf)(c),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",["".concat(n,"-close")]:{color:l,transition:"color ".concat(o),"&:hover":{color:i}}},"&-close-text":{color:l,transition:"color ".concat(o),"&:hover":{color:i}}}}};var E=(0,v.I$)("Alert",e=>[h(e),j(e),x(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:"".concat(e.paddingContentVerticalSM,"px ").concat(12,"px"),withDescriptionPadding:"".concat(e.paddingMD,"px ").concat(e.paddingContentHorizontalLG,"px")})),S=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let w={success:a.Z,info:r.Z,error:c.Z,warning:i.Z},C=e=>{let{icon:t,prefixCls:n,type:a}=e,c=w[a]||null;return t?(0,u.wm)(t,o.createElement("span",{className:"".concat(n,"-icon")},t),()=>({className:d()("".concat(n,"-icon"),t.props.className)})):o.createElement(c,{className:"".concat(n,"-icon")})},N=e=>{let{isClosable:t,prefixCls:n,closeIcon:a,handleClose:c,ariaProps:i}=e,r=!0===a||void 0===a?o.createElement(l.Z,null):a;return t?o.createElement("button",Object.assign({type:"button",onClick:c,className:"".concat(n,"-close-icon"),tabIndex:0},i),r):null},I=o.forwardRef((e,t)=>{let{description:n,prefixCls:a,message:c,banner:l,className:i,rootClassName:r,style:s,onMouseEnter:u,onMouseLeave:f,onClick:y,afterClose:v,showIcon:O,closable:h,closeText:j,closeIcon:x,action:w,id:I}=e,k=S(e,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[M,P]=o.useState(!1),Z=o.useRef(null);o.useImperativeHandle(t,()=>({nativeElement:Z.current}));let{getPrefixCls:z,direction:B,closable:L,closeIcon:H,className:W,style:R}=(0,g.dj)("alert"),T=z("alert",a),[G,X,D]=E(T),A=t=>{var n;P(!0),null===(n=e.onClose)||void 0===n||n.call(e,t)},_=o.useMemo(()=>void 0!==e.type?e.type:l?"warning":"info",[e.type,l]),F=o.useMemo(()=>"object"==typeof h&&!!h.closeIcon||!!j||("boolean"==typeof h?h:!1!==x&&null!=x||!!L),[j,x,h,L]),$=!!l&&void 0===O||O,Q=d()(T,"".concat(T,"-").concat(_),{["".concat(T,"-with-description")]:!!n,["".concat(T,"-no-icon")]:!$,["".concat(T,"-banner")]:!!l,["".concat(T,"-rtl")]:"rtl"===B},W,i,r,D,X),V=(0,p.Z)(k,{aria:!0,data:!0}),q=o.useMemo(()=>"object"==typeof h&&h.closeIcon?h.closeIcon:j||(void 0!==x?x:"object"==typeof L&&L.closeIcon?L.closeIcon:H),[x,h,L,j,H]),J=o.useMemo(()=>{let e=null!=h?h:L;if("object"==typeof e){let{closeIcon:t}=e;return S(e,["closeIcon"])}return{}},[h,L]);return G(o.createElement(m.ZP,{visible:!M,motionName:"".concat(T,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:v},(t,a)=>{let{className:l,style:i}=t;return o.createElement("div",Object.assign({id:I,ref:(0,b.sQ)(Z,a),"data-show":!M,className:d()(Q,l),style:Object.assign(Object.assign(Object.assign({},R),s),i),onMouseEnter:u,onMouseLeave:f,onClick:y,role:"alert"},V),$?o.createElement(C,{description:n,icon:e.icon,prefixCls:T,type:_}):null,o.createElement("div",{className:"".concat(T,"-content")},c?o.createElement("div",{className:"".concat(T,"-message")},c):null,n?o.createElement("div",{className:"".concat(T,"-description")},n):null),w?o.createElement("div",{className:"".concat(T,"-action")},w):null,o.createElement(N,{isClosable:F,prefixCls:T,closeIcon:q,handleClose:A,ariaProps:J}))}))});var k=n(76405),M=n(25049),P=n(24995),Z=n(63929),z=n(37977),B=n(41690);let L=function(e){function t(){var e,n,o;return(0,k.Z)(this,t),n=t,o=arguments,n=(0,P.Z)(n),(e=(0,z.Z)(this,(0,Z.Z)()?Reflect.construct(n,o||[],(0,P.Z)(this).constructor):n.apply(this,o))).state={error:void 0,info:{componentStack:""}},e}return(0,B.Z)(t,e),(0,M.Z)(t,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){let{message:e,description:t,id:n,children:a}=this.props,{error:c,info:l}=this.state,i=(null==l?void 0:l.componentStack)||null,r=void 0===e?(c||"").toString():e;return c?o.createElement(I,{id:n,type:"error",message:r,description:o.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},void 0===t?i:t)}):a}}])}(o.Component);I.ErrorBoundary=L;var H=I},76188:function(e,t,n){n.d(t,{Z:function(){return M}});var o=n(2265),a=n(36760),c=n.n(a),l=n(6543),i=n(71744),r=n(33759),s=n(28617),d={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1};let m=o.createContext({});var p=n(45287),b=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let u=e=>(0,p.Z)(e).map(e=>Object.assign(Object.assign({},null==e?void 0:e.props),{key:e.key}));var g=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n},f=(e,t)=>{let[n,a]=(0,o.useMemo)(()=>{let n,o,a,c;return n=[],o=[],a=!1,c=0,t.filter(e=>e).forEach(t=>{let{filled:l}=t,i=g(t,["filled"]);if(l){o.push(i),n.push(o),o=[],c=0;return}let r=e-c;(c+=t.span||1)>=e?(c>e?(a=!0,o.push(Object.assign(Object.assign({},i),{span:r}))):o.push(i),n.push(o),o=[],c=0):o.push(i)}),o.length>0&&n.push(o),[n=n.map(t=>{let n=t.reduce((e,t)=>e+(t.span||1),0);if(nnull!=e;var v=e=>{let{itemPrefixCls:t,component:n,span:a,className:l,style:i,labelStyle:r,contentStyle:s,bordered:d,label:p,content:b,colon:u,type:g,styles:f}=e,{classNames:v}=o.useContext(m),O=Object.assign(Object.assign({},r),null==f?void 0:f.label),h=Object.assign(Object.assign({},s),null==f?void 0:f.content);return d?o.createElement(n,{colSpan:a,style:i,className:c()(l,{["".concat(t,"-item-").concat(g)]:"label"===g||"content"===g,[null==v?void 0:v.label]:(null==v?void 0:v.label)&&"label"===g,[null==v?void 0:v.content]:(null==v?void 0:v.content)&&"content"===g})},y(p)&&o.createElement("span",{style:O},p),y(b)&&o.createElement("span",{style:h},b)):o.createElement(n,{colSpan:a,style:i,className:c()("".concat(t,"-item"),l)},o.createElement("div",{className:"".concat(t,"-item-container")},y(p)&&o.createElement("span",{style:O,className:c()("".concat(t,"-item-label"),null==v?void 0:v.label,{["".concat(t,"-item-no-colon")]:!u})},p),y(b)&&o.createElement("span",{style:h,className:c()("".concat(t,"-item-content"),null==v?void 0:v.content)},b)))};function O(e,t,n){let{colon:a,prefixCls:c,bordered:l}=t,{component:i,type:r,showLabel:s,showContent:d,labelStyle:m,contentStyle:p,styles:b}=n;return e.map((e,t)=>{let{label:n,children:u,prefixCls:g=c,className:f,style:y,labelStyle:O,contentStyle:h,span:j=1,key:x,styles:E}=e;return"string"==typeof i?o.createElement(v,{key:"".concat(r,"-").concat(x||t),className:f,style:y,styles:{label:Object.assign(Object.assign(Object.assign(Object.assign({},m),null==b?void 0:b.label),O),null==E?void 0:E.label),content:Object.assign(Object.assign(Object.assign(Object.assign({},p),null==b?void 0:b.content),h),null==E?void 0:E.content)},span:j,colon:a,component:i,itemPrefixCls:g,bordered:l,label:s?n:null,content:d?u:null,type:r}):[o.createElement(v,{key:"label-".concat(x||t),className:f,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},m),null==b?void 0:b.label),y),O),null==E?void 0:E.label),span:1,colon:a,component:i[0],itemPrefixCls:g,bordered:l,label:n,type:"label"}),o.createElement(v,{key:"content-".concat(x||t),className:f,style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p),null==b?void 0:b.content),y),h),null==E?void 0:E.content),span:2*j-1,component:i[1],itemPrefixCls:g,bordered:l,content:u,type:"content"})]})}var h=e=>{let t=o.useContext(m),{prefixCls:n,vertical:a,row:c,index:l,bordered:i}=e;return a?o.createElement(o.Fragment,null,o.createElement("tr",{key:"label-".concat(l),className:"".concat(n,"-row")},O(c,e,Object.assign({component:"th",type:"label",showLabel:!0},t))),o.createElement("tr",{key:"content-".concat(l),className:"".concat(n,"-row")},O(c,e,Object.assign({component:"td",type:"content",showContent:!0},t)))):o.createElement("tr",{key:l,className:"".concat(n,"-row")},O(c,e,Object.assign({component:i?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},t)))},j=n(93463),x=n(12918),E=n(99320),S=n(71140);let w=e=>{let{componentCls:t,labelBg:n}=e;return{["&".concat(t,"-bordered")]:{["> ".concat(t,"-view")]:{border:"".concat((0,j.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit),"> table":{tableLayout:"auto"},["".concat(t,"-row")]:{borderBottom:"".concat((0,j.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit),"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},["> ".concat(t,"-item-label, > ").concat(t,"-item-content")]:{padding:"".concat((0,j.bf)(e.padding)," ").concat((0,j.bf)(e.paddingLG)),borderInlineEnd:"".concat((0,j.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit),"&:last-child":{borderInlineEnd:"none"}},["> ".concat(t,"-item-label")]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:"none"}}}},["&".concat(t,"-middle")]:{["".concat(t,"-row")]:{["> ".concat(t,"-item-label, > ").concat(t,"-item-content")]:{padding:"".concat((0,j.bf)(e.paddingSM)," ").concat((0,j.bf)(e.paddingLG))}}},["&".concat(t,"-small")]:{["".concat(t,"-row")]:{["> ".concat(t,"-item-label, > ").concat(t,"-item-content")]:{padding:"".concat((0,j.bf)(e.paddingXS)," ").concat((0,j.bf)(e.padding))}}}}}},C=e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:o,itemPaddingEnd:a,colonMarginRight:c,colonMarginLeft:l,titleMarginBottom:i}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,x.Wf)(e)),w(e)),{"&-rtl":{direction:"rtl"},["".concat(t,"-header")]:{display:"flex",alignItems:"center",marginBottom:i},["".concat(t,"-title")]:Object.assign(Object.assign({},x.vS),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),["".concat(t,"-extra")]:{marginInlineStart:"auto",color:n,fontSize:e.fontSize},["".concat(t,"-view")]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},["".concat(t,"-row")]:{"> th, > td":{paddingBottom:o,paddingInlineEnd:a},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},["".concat(t,"-item-label")]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:"".concat((0,j.bf)(l)," ").concat((0,j.bf)(c))},["&".concat(t,"-item-no-colon::after")]:{content:'""'}},["".concat(t,"-item-no-label")]:{"&::after":{margin:0,content:'""'}},["".concat(t,"-item-content")]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},["".concat(t,"-item")]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",["".concat(t,"-item-label")]:{display:"inline-flex",alignItems:"baseline"},["".concat(t,"-item-content")]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-middle":{["".concat(t,"-row")]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{["".concat(t,"-row")]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}};var N=(0,E.I$)("Descriptions",e=>C((0,S.IX)(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText})),I=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let k=e=>{let{prefixCls:t,title:n,extra:a,column:p,colon:g=!0,bordered:y,layout:v,children:O,className:j,rootClassName:x,style:E,size:S,labelStyle:w,contentStyle:C,styles:k,items:M,classNames:P}=e,Z=I(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","styles","items","classNames"]),{getPrefixCls:z,direction:B,className:L,style:H,classNames:W,styles:R}=(0,i.dj)("descriptions"),T=z("descriptions",t),G=(0,s.Z)(),X=o.useMemo(()=>{var e;return"number"==typeof p?p:null!==(e=(0,l.m9)(G,Object.assign(Object.assign({},d),p)))&&void 0!==e?e:3},[G,p]),D=function(e,t,n){let a=o.useMemo(()=>t||u(n),[t,n]);return o.useMemo(()=>a.map(t=>{var{span:n}=t,o=b(t,["span"]);return"filled"===n?Object.assign(Object.assign({},o),{filled:!0}):Object.assign(Object.assign({},o),{span:"number"==typeof n?n:(0,l.m9)(e,n)})}),[a,e])}(G,M,O),A=(0,r.Z)(S),_=f(X,D),[F,$,Q]=N(T),V=o.useMemo(()=>({labelStyle:w,contentStyle:C,styles:{content:Object.assign(Object.assign({},R.content),null==k?void 0:k.content),label:Object.assign(Object.assign({},R.label),null==k?void 0:k.label)},classNames:{label:c()(W.label,null==P?void 0:P.label),content:c()(W.content,null==P?void 0:P.content)}}),[w,C,k,P,W,R]);return F(o.createElement(m.Provider,{value:V},o.createElement("div",Object.assign({className:c()(T,L,W.root,null==P?void 0:P.root,{["".concat(T,"-").concat(A)]:A&&"default"!==A,["".concat(T,"-bordered")]:!!y,["".concat(T,"-rtl")]:"rtl"===B},j,x,$,Q),style:Object.assign(Object.assign(Object.assign(Object.assign({},H),R.root),null==k?void 0:k.root),E)},Z),(n||a)&&o.createElement("div",{className:c()("".concat(T,"-header"),W.header,null==P?void 0:P.header),style:Object.assign(Object.assign({},R.header),null==k?void 0:k.header)},n&&o.createElement("div",{className:c()("".concat(T,"-title"),W.title,null==P?void 0:P.title),style:Object.assign(Object.assign({},R.title),null==k?void 0:k.title)},n),a&&o.createElement("div",{className:c()("".concat(T,"-extra"),W.extra,null==P?void 0:P.extra),style:Object.assign(Object.assign({},R.extra),null==k?void 0:k.extra)},a)),o.createElement("div",{className:"".concat(T,"-view")},o.createElement("table",null,o.createElement("tbody",null,_.map((e,t)=>o.createElement(h,{key:t,index:t,colon:g,prefixCls:T,vertical:"vertical"===v,bordered:y,row:e}))))))))};k.Item=e=>{let{children:t}=e;return t};var M=k}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3918-942eadaf4103218b.js b/litellm/proxy/_experimental/out/_next/static/chunks/3918-942eadaf4103218b.js
deleted file mode 100644
index 932cffd1d95..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/3918-942eadaf4103218b.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3918,5945,4851],{45246:function(e,t,n){n.d(t,{Z:function(){return i}});var a=n(1119),o=n(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},r=n(55015),i=o.forwardRef(function(e,t){return o.createElement(r.Z,(0,a.Z)({},e,{ref:t,icon:c}))})},34419:function(e,t,n){n.d(t,{Z:function(){return i}});var a=n(1119),o=n(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},r=n(55015),i=o.forwardRef(function(e,t){return o.createElement(r.Z,(0,a.Z)({},e,{ref:t,icon:c}))})},89245:function(e,t,n){n.d(t,{Z:function(){return i}});var a=n(1119),o=n(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},r=n(55015),i=o.forwardRef(function(e,t){return o.createElement(r.Z,(0,a.Z)({},e,{ref:t,icon:c}))})},78355:function(e,t,n){n.d(t,{Z:function(){return i}});var a=n(1119),o=n(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"},r=n(55015),i=o.forwardRef(function(e,t){return o.createElement(r.Z,(0,a.Z)({},e,{ref:t,icon:c}))})},8881:function(e,t,n){n.d(t,{Z:function(){return i}});var a=n(1119),o=n(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"},r=n(55015),i=o.forwardRef(function(e,t){return o.createElement(r.Z,(0,a.Z)({},e,{ref:t,icon:c}))})},5945:function(e,t,n){n.d(t,{Z:function(){return P}});var a=n(2265),o=n(36760),c=n.n(o),r=n(18694),i=n(71744),l=n(33759),s=n(50337),d=n(65869),u=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(e);ot.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n},p=e=>{var{prefixCls:t,className:n,hoverable:o=!0}=e,r=u(e,["prefixCls","className","hoverable"]);let{getPrefixCls:l}=a.useContext(i.E_),s=l("card",t),d=c()("".concat(s,"-grid"),n,{["".concat(s,"-grid-hoverable")]:o});return a.createElement("div",Object.assign({},r,{className:d}))},f=n(93463),m=n(12918),b=n(99320),g=n(71140);let v=e=>{let{antCls:t,componentCls:n,headerHeight:a,headerPadding:o,tabsMarginBottom:c}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:a,marginBottom:-1,padding:"0 ".concat((0,f.bf)(o)),color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:"".concat((0,f.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorderSecondary),borderRadius:"".concat((0,f.bf)(e.borderRadiusLG)," ").concat((0,f.bf)(e.borderRadiusLG)," 0 0")},(0,m.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},m.vS),{["\n > ".concat(n,"-typography,\n > ").concat(n,"-typography-edit-content\n ")]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),["".concat(t,"-tabs-top")]:{clear:"both",marginBottom:c,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:"".concat((0,f.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorderSecondary)}}})},h=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:a,lineWidth:o}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:"\n ".concat((0,f.bf)(o)," 0 0 0 ").concat(n,",\n 0 ").concat((0,f.bf)(o)," 0 0 ").concat(n,",\n ").concat((0,f.bf)(o)," ").concat((0,f.bf)(o)," 0 0 ").concat(n,",\n ").concat((0,f.bf)(o)," 0 0 0 ").concat(n," inset,\n 0 ").concat((0,f.bf)(o)," 0 0 ").concat(n," inset;\n "),transition:"all ".concat(e.motionDurationMid),"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:a}}},y=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:a,cardActionsIconSize:o,colorBorderSecondary:c,actionsBg:r}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:r,borderTop:"".concat((0,f.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(c),display:"flex",borderRadius:"0 0 ".concat((0,f.bf)(e.borderRadiusLG)," ").concat((0,f.bf)(e.borderRadiusLG))},(0,m.dF)()),{"& > li":{margin:a,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:"color ".concat(e.motionDurationMid)},["a:not(".concat(t,"-btn), > ").concat(n)]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,f.bf)(e.fontHeight),transition:"color ".concat(e.motionDurationMid),"&:hover":{color:e.colorPrimary}},["> ".concat(n)]:{fontSize:o,lineHeight:(0,f.bf)(e.calc(o).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:"".concat((0,f.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(c)}}})},x=e=>Object.assign(Object.assign({margin:"".concat((0,f.bf)(e.calc(e.marginXXS).mul(-1).equal())," 0"),display:"flex"},(0,m.dF)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},m.vS),"&-description":{color:e.colorTextDescription}}),O=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:a,bodyPadding:o}=e;return{["".concat(t,"-head")]:{padding:"0 ".concat((0,f.bf)(a)),background:n,"&-title":{fontSize:e.fontSize}},["".concat(t,"-body")]:{padding:"".concat((0,f.bf)(e.padding)," ").concat((0,f.bf)(o))}}},w=e=>{let{componentCls:t}=e;return{overflow:"hidden",["".concat(t,"-body")]:{userSelect:"none"}}},C=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:a,colorBorderSecondary:o,boxShadowTertiary:c,bodyPadding:r,extraColor:i}=e;return{[t]:Object.assign(Object.assign({},(0,m.Wf)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,["&:not(".concat(t,"-bordered)")]:{boxShadow:c},["".concat(t,"-head")]:v(e),["".concat(t,"-extra")]:{marginInlineStart:"auto",color:i,fontWeight:"normal",fontSize:e.fontSize},["".concat(t,"-body")]:{padding:r,borderRadius:"0 0 ".concat((0,f.bf)(e.borderRadiusLG)," ").concat((0,f.bf)(e.borderRadiusLG))},["".concat(t,"-grid")]:h(e),["".concat(t,"-cover")]:{"> *":{display:"block",width:"100%",borderRadius:"".concat((0,f.bf)(e.borderRadiusLG)," ").concat((0,f.bf)(e.borderRadiusLG)," 0 0")}},["".concat(t,"-actions")]:y(e),["".concat(t,"-meta")]:x(e)}),["".concat(t,"-bordered")]:{border:"".concat((0,f.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(o),["".concat(t,"-cover")]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},["".concat(t,"-hoverable")]:{cursor:"pointer",transition:"box-shadow ".concat(e.motionDurationMid,", border-color ").concat(e.motionDurationMid),"&:hover":{borderColor:"transparent",boxShadow:n}},["".concat(t,"-contain-grid")]:{borderRadius:"".concat((0,f.bf)(e.borderRadiusLG)," ").concat((0,f.bf)(e.borderRadiusLG)," 0 0 "),["".concat(t,"-body")]:{display:"flex",flexWrap:"wrap"},["&:not(".concat(t,"-loading) ").concat(t,"-body")]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},["".concat(t,"-contain-tabs")]:{["> div".concat(t,"-head")]:{minHeight:0,["".concat(t,"-head-title, ").concat(t,"-extra")]:{paddingTop:a}}},["".concat(t,"-type-inner")]:O(e),["".concat(t,"-loading")]:w(e),["".concat(t,"-rtl")]:{direction:"rtl"}}},E=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:a,headerHeightSM:o,headerFontSizeSM:c}=e;return{["".concat(t,"-small")]:{["> ".concat(t,"-head")]:{minHeight:o,padding:"0 ".concat((0,f.bf)(a)),fontSize:c,["> ".concat(t,"-head-wrapper")]:{["> ".concat(t,"-extra")]:{fontSize:e.fontSize}}},["> ".concat(t,"-body")]:{padding:n}},["".concat(t,"-small").concat(t,"-contain-tabs")]:{["> ".concat(t,"-head")]:{["".concat(t,"-head-title, ").concat(t,"-extra")]:{paddingTop:0,display:"flex",alignItems:"center"}}}}};var j=(0,b.I$)("Card",e=>{let t=(0,g.IX)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[C(t),E(t)]},e=>{var t,n;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:"".concat(e.paddingSM,"px 0"),tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!==(t=e.bodyPadding)&&void 0!==t?t:e.paddingLG,headerPadding:null!==(n=e.headerPadding)&&void 0!==n?n:e.paddingLG}}),S=n(56250),Z=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(e);ot.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};let k=e=>{let{actionClasses:t,actions:n=[],actionStyle:o}=e;return a.createElement("ul",{className:t,style:o},n.map((e,t)=>a.createElement("li",{style:{width:"".concat(100/n.length,"%")},key:"action-".concat(t)},a.createElement("span",null,e))))},I=a.forwardRef((e,t)=>{let n;let{prefixCls:o,className:u,rootClassName:f,style:m,extra:b,headStyle:g={},bodyStyle:v={},title:h,loading:y,bordered:x,variant:O,size:w,type:C,cover:E,actions:I,tabList:N,children:P,activeTabKey:z,defaultActiveTabKey:M,tabBarExtraContent:R,hoverable:L,tabProps:B={},classNames:H,styles:T}=e,W=Z(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:A,direction:G,card:K}=a.useContext(i.E_),[V]=(0,S.Z)("card",O,x),_=e=>{var t;return c()(null===(t=null==K?void 0:K.classNames)||void 0===t?void 0:t[e],null==H?void 0:H[e])},D=e=>{var t;return Object.assign(Object.assign({},null===(t=null==K?void 0:K.styles)||void 0===t?void 0:t[e]),null==T?void 0:T[e])},F=a.useMemo(()=>{let e=!1;return a.Children.forEach(P,t=>{(null==t?void 0:t.type)===p&&(e=!0)}),e},[P]),X=A("card",o),[q,$,Q]=j(X),U=a.createElement(s.Z,{loading:!0,active:!0,paragraph:{rows:4},title:!1},P),Y=void 0!==z,J=Object.assign(Object.assign({},B),{[Y?"activeKey":"defaultActiveKey"]:Y?z:M,tabBarExtraContent:R}),ee=(0,l.Z)(w),et=ee&&"default"!==ee?ee:"large",en=N?a.createElement(d.default,Object.assign({size:et},J,{className:"".concat(X,"-head-tabs"),onChange:t=>{var n;null===(n=e.onTabChange)||void 0===n||n.call(e,t)},items:N.map(e=>{var{tab:t}=e;return Object.assign({label:t},Z(e,["tab"]))})})):null;if(h||b||en){let e=c()("".concat(X,"-head"),_("header")),t=c()("".concat(X,"-head-title"),_("title")),o=c()("".concat(X,"-extra"),_("extra")),r=Object.assign(Object.assign({},g),D("header"));n=a.createElement("div",{className:e,style:r},a.createElement("div",{className:"".concat(X,"-head-wrapper")},h&&a.createElement("div",{className:t,style:D("title")},h),b&&a.createElement("div",{className:o,style:D("extra")},b)),en)}let ea=c()("".concat(X,"-cover"),_("cover")),eo=E?a.createElement("div",{className:ea,style:D("cover")},E):null,ec=c()("".concat(X,"-body"),_("body")),er=Object.assign(Object.assign({},v),D("body")),ei=a.createElement("div",{className:ec,style:er},y?U:P),el=c()("".concat(X,"-actions"),_("actions")),es=(null==I?void 0:I.length)?a.createElement(k,{actionClasses:el,actionStyle:D("actions"),actions:I}):null,ed=(0,r.Z)(W,["onTabChange"]),eu=c()(X,null==K?void 0:K.className,{["".concat(X,"-loading")]:y,["".concat(X,"-bordered")]:"borderless"!==V,["".concat(X,"-hoverable")]:L,["".concat(X,"-contain-grid")]:F,["".concat(X,"-contain-tabs")]:null==N?void 0:N.length,["".concat(X,"-").concat(ee)]:ee,["".concat(X,"-type-").concat(C)]:!!C,["".concat(X,"-rtl")]:"rtl"===G},u,f,$,Q),ep=Object.assign(Object.assign({},null==K?void 0:K.style),m);return q(a.createElement("div",Object.assign({ref:t},ed,{className:eu,style:ep}),n,eo,ei,es))});var N=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(e);ot.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};I.Grid=p,I.Meta=e=>{let{prefixCls:t,className:n,avatar:o,title:r,description:l}=e,s=N(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:d}=a.useContext(i.E_),u=d("card",t),p=c()("".concat(u,"-meta"),n),f=o?a.createElement("div",{className:"".concat(u,"-meta-avatar")},o):null,m=r?a.createElement("div",{className:"".concat(u,"-meta-title")},r):null,b=l?a.createElement("div",{className:"".concat(u,"-meta-description")},l):null,g=m||b?a.createElement("div",{className:"".concat(u,"-meta-detail")},m,b):null;return a.createElement("div",Object.assign({},s,{className:p}),f,g)};var P=I},69410:function(e,t,n){var a=n(54998);t.Z=a.Z},44851:function(e,t,n){n.d(t,{default:function(){return _}});var a=n(2265),o=n(77565),c=n(36760),r=n.n(c),i=n(1119),l=n(83145),s=n(26365),d=n(41154),u=n(50506),p=n(32559),f=n(6989),m=n(45287),b=n(31686),g=n(11993),v=n(66632),h=n(95814),y=a.forwardRef(function(e,t){var n=e.prefixCls,o=e.forceRender,c=e.className,i=e.style,l=e.children,d=e.isActive,u=e.role,p=e.classNames,f=e.styles,m=a.useState(d||o),b=(0,s.Z)(m,2),v=b[0],h=b[1];return(a.useEffect(function(){(o||d)&&h(!0)},[o,d]),v)?a.createElement("div",{ref:t,className:r()("".concat(n,"-content"),(0,g.Z)((0,g.Z)({},"".concat(n,"-content-active"),d),"".concat(n,"-content-inactive"),!d),c),style:i,role:u},a.createElement("div",{className:r()("".concat(n,"-content-box"),null==p?void 0:p.body),style:null==f?void 0:f.body},l)):null});y.displayName="PanelContent";var x=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],O=a.forwardRef(function(e,t){var n=e.showArrow,o=e.headerClass,c=e.isActive,l=e.onItemClick,s=e.forceRender,d=e.className,u=e.classNames,p=void 0===u?{}:u,m=e.styles,O=void 0===m?{}:m,w=e.prefixCls,C=e.collapsible,E=e.accordion,j=e.panelKey,S=e.extra,Z=e.header,k=e.expandIcon,I=e.openMotion,N=e.destroyInactivePanel,P=e.children,z=(0,f.Z)(e,x),M="disabled"===C,R=(0,g.Z)((0,g.Z)((0,g.Z)({onClick:function(){null==l||l(j)},onKeyDown:function(e){("Enter"===e.key||e.keyCode===h.Z.ENTER||e.which===h.Z.ENTER)&&(null==l||l(j))},role:E?"tab":"button"},"aria-expanded",c),"aria-disabled",M),"tabIndex",M?-1:0),L="function"==typeof k?k(e):a.createElement("i",{className:"arrow"}),B=L&&a.createElement("div",(0,i.Z)({className:"".concat(w,"-expand-icon")},["header","icon"].includes(C)?R:{}),L),H=r()("".concat(w,"-item"),(0,g.Z)((0,g.Z)({},"".concat(w,"-item-active"),c),"".concat(w,"-item-disabled"),M),d),T=r()(o,"".concat(w,"-header"),(0,g.Z)({},"".concat(w,"-collapsible-").concat(C),!!C),p.header),W=(0,b.Z)({className:T,style:O.header},["header","icon"].includes(C)?{}:R);return a.createElement("div",(0,i.Z)({},z,{ref:t,className:H}),a.createElement("div",W,(void 0===n||n)&&B,a.createElement("span",(0,i.Z)({className:"".concat(w,"-header-text")},"header"===C?R:{}),Z),null!=S&&"boolean"!=typeof S&&a.createElement("div",{className:"".concat(w,"-extra")},S)),a.createElement(v.ZP,(0,i.Z)({visible:c,leavedClassName:"".concat(w,"-content-hidden")},I,{forceRender:s,removeOnLeave:N}),function(e,t){var n=e.className,o=e.style;return a.createElement(y,{ref:t,prefixCls:w,className:n,classNames:p,style:o,styles:O,isActive:c,forceRender:s,role:E?"tabpanel":void 0},P)}))}),w=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],C=function(e,t){var n=t.prefixCls,o=t.accordion,c=t.collapsible,r=t.destroyInactivePanel,l=t.onItemClick,s=t.activeKey,d=t.openMotion,u=t.expandIcon;return e.map(function(e,t){var p=e.children,m=e.label,b=e.key,g=e.collapsible,v=e.onItemClick,h=e.destroyInactivePanel,y=(0,f.Z)(e,w),x=String(null!=b?b:t),C=null!=g?g:c,E=!1;return E=o?s[0]===x:s.indexOf(x)>-1,a.createElement(O,(0,i.Z)({},y,{prefixCls:n,key:x,panelKey:x,isActive:E,accordion:o,openMotion:d,expandIcon:u,header:m,collapsible:C,onItemClick:function(e){"disabled"!==C&&(l(e),null==v||v(e))},destroyInactivePanel:null!=h?h:r}),p)})},E=function(e,t,n){if(!e)return null;var o=n.prefixCls,c=n.accordion,r=n.collapsible,i=n.destroyInactivePanel,l=n.onItemClick,s=n.activeKey,d=n.openMotion,u=n.expandIcon,p=e.key||String(t),f=e.props,m=f.header,b=f.headerClass,g=f.destroyInactivePanel,v=f.collapsible,h=f.onItemClick,y=!1;y=c?s[0]===p:s.indexOf(p)>-1;var x=null!=v?v:r,O={key:p,panelKey:p,header:m,headerClass:b,isActive:y,prefixCls:o,destroyInactivePanel:null!=g?g:i,openMotion:d,accordion:c,children:e.props.children,onItemClick:function(e){"disabled"!==x&&(l(e),null==h||h(e))},expandIcon:u,collapsible:x};return"string"==typeof e.type?e:(Object.keys(O).forEach(function(e){void 0===O[e]&&delete O[e]}),a.cloneElement(e,O))},j=n(18242);function S(e){var t=e;if(!Array.isArray(t)){var n=(0,d.Z)(t);t="number"===n||"string"===n?[t]:[]}return t.map(function(e){return String(e)})}var Z=Object.assign(a.forwardRef(function(e,t){var n,o=e.prefixCls,c=void 0===o?"rc-collapse":o,d=e.destroyInactivePanel,f=e.style,b=e.accordion,g=e.className,v=e.children,h=e.collapsible,y=e.openMotion,x=e.expandIcon,O=e.activeKey,w=e.defaultActiveKey,Z=e.onChange,k=e.items,I=r()(c,g),N=(0,u.Z)([],{value:O,onChange:function(e){return null==Z?void 0:Z(e)},defaultValue:w,postState:S}),P=(0,s.Z)(N,2),z=P[0],M=P[1];(0,p.ZP)(!v,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var R=(n={prefixCls:c,accordion:b,openMotion:y,expandIcon:x,collapsible:h,destroyInactivePanel:void 0!==d&&d,onItemClick:function(e){return M(function(){return b?z[0]===e?[]:[e]:z.indexOf(e)>-1?z.filter(function(t){return t!==e}):[].concat((0,l.Z)(z),[e])})},activeKey:z},Array.isArray(k)?C(k,n):(0,m.Z)(v).map(function(e,t){return E(e,t,n)}));return a.createElement("div",(0,i.Z)({ref:t,className:I,style:f,role:b?"tablist":void 0},(0,j.Z)(e,{aria:!0,data:!0})),R)}),{Panel:O});Z.Panel;var k=n(18694),I=n(68710),N=n(19722),P=n(71744),z=n(33759);let M=a.forwardRef((e,t)=>{let{getPrefixCls:n}=a.useContext(P.E_),{prefixCls:o,className:c,showArrow:i=!0}=e,l=n("collapse",o),s=r()({["".concat(l,"-no-arrow")]:!i},c);return a.createElement(Z.Panel,Object.assign({ref:t},e,{prefixCls:l,className:s}))});var R=n(93463),L=n(12918),B=n(63074),H=n(99320),T=n(71140);let W=e=>{let{componentCls:t,contentBg:n,padding:a,headerBg:o,headerPadding:c,collapseHeaderPaddingSM:r,collapseHeaderPaddingLG:i,collapsePanelBorderRadius:l,lineWidth:s,lineType:d,colorBorder:u,colorText:p,colorTextHeading:f,colorTextDisabled:m,fontSizeLG:b,lineHeight:g,lineHeightLG:v,marginSM:h,paddingSM:y,paddingLG:x,paddingXS:O,motionDurationSlow:w,fontSizeIcon:C,contentPadding:E,fontHeight:j,fontHeightLG:S}=e,Z="".concat((0,R.bf)(s)," ").concat(d," ").concat(u);return{[t]:Object.assign(Object.assign({},(0,L.Wf)(e)),{backgroundColor:o,border:Z,borderRadius:l,"&-rtl":{direction:"rtl"},["& > ".concat(t,"-item")]:{borderBottom:Z,"&:first-child":{["\n &,\n & > ".concat(t,"-header")]:{borderRadius:"".concat((0,R.bf)(l)," ").concat((0,R.bf)(l)," 0 0")}},"&:last-child":{["\n &,\n & > ".concat(t,"-header")]:{borderRadius:"0 0 ".concat((0,R.bf)(l)," ").concat((0,R.bf)(l))}},["> ".concat(t,"-header")]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:c,color:f,lineHeight:g,cursor:"pointer",transition:"all ".concat(w,", visibility 0s")},(0,L.Qy)(e)),{["> ".concat(t,"-header-text")]:{flex:"auto"},["".concat(t,"-expand-icon")]:{height:j,display:"flex",alignItems:"center",paddingInlineEnd:h},["".concat(t,"-arrow")]:Object.assign(Object.assign({},(0,L.Ro)()),{fontSize:C,transition:"transform ".concat(w),svg:{transition:"transform ".concat(w)}}),["".concat(t,"-header-text")]:{marginInlineEnd:"auto"}}),["".concat(t,"-collapsible-header")]:{cursor:"default",["".concat(t,"-header-text")]:{flex:"none",cursor:"pointer"},["".concat(t,"-expand-icon")]:{cursor:"pointer"}},["".concat(t,"-collapsible-icon")]:{cursor:"unset",["".concat(t,"-expand-icon")]:{cursor:"pointer"}}},["".concat(t,"-content")]:{color:p,backgroundColor:n,borderTop:Z,["& > ".concat(t,"-content-box")]:{padding:E},"&-hidden":{display:"none"}},"&-small":{["> ".concat(t,"-item")]:{["> ".concat(t,"-header")]:{padding:r,paddingInlineStart:O,["> ".concat(t,"-expand-icon")]:{marginInlineStart:e.calc(y).sub(O).equal()}},["> ".concat(t,"-content > ").concat(t,"-content-box")]:{padding:y}}},"&-large":{["> ".concat(t,"-item")]:{fontSize:b,lineHeight:v,["> ".concat(t,"-header")]:{padding:i,paddingInlineStart:a,["> ".concat(t,"-expand-icon")]:{height:S,marginInlineStart:e.calc(x).sub(a).equal()}},["> ".concat(t,"-content > ").concat(t,"-content-box")]:{padding:x}}},["".concat(t,"-item:last-child")]:{borderBottom:0,["> ".concat(t,"-content")]:{borderRadius:"0 0 ".concat((0,R.bf)(l)," ").concat((0,R.bf)(l))}},["& ".concat(t,"-item-disabled > ").concat(t,"-header")]:{"\n &,\n & > .arrow\n ":{color:m,cursor:"not-allowed"}},["&".concat(t,"-icon-position-end")]:{["& > ".concat(t,"-item")]:{["> ".concat(t,"-header")]:{["".concat(t,"-expand-icon")]:{order:1,paddingInlineEnd:0,paddingInlineStart:h}}}}})}},A=e=>{let{componentCls:t}=e,n="> ".concat(t,"-item > ").concat(t,"-header ").concat(t,"-arrow");return{["".concat(t,"-rtl")]:{[n]:{transform:"rotate(180deg)"}}}},G=e=>{let{componentCls:t,headerBg:n,borderlessContentPadding:a,borderlessContentBg:o,colorBorder:c}=e;return{["".concat(t,"-borderless")]:{backgroundColor:n,border:0,["> ".concat(t,"-item")]:{borderBottom:"1px solid ".concat(c)},["\n > ".concat(t,"-item:last-child,\n > ").concat(t,"-item:last-child ").concat(t,"-header\n ")]:{borderRadius:0},["> ".concat(t,"-item:last-child")]:{borderBottom:0},["> ".concat(t,"-item > ").concat(t,"-content")]:{backgroundColor:o,borderTop:0},["> ".concat(t,"-item > ").concat(t,"-content > ").concat(t,"-content-box")]:{padding:a}}}},K=e=>{let{componentCls:t,paddingSM:n}=e;return{["".concat(t,"-ghost")]:{backgroundColor:"transparent",border:0,["> ".concat(t,"-item")]:{borderBottom:0,["> ".concat(t,"-content")]:{backgroundColor:"transparent",border:0,["> ".concat(t,"-content-box")]:{paddingBlock:n}}}}}};var V=(0,H.I$)("Collapse",e=>{let t=(0,T.IX)(e,{collapseHeaderPaddingSM:"".concat((0,R.bf)(e.paddingXS)," ").concat((0,R.bf)(e.paddingSM)),collapseHeaderPaddingLG:"".concat((0,R.bf)(e.padding)," ").concat((0,R.bf)(e.paddingLG)),collapsePanelBorderRadius:e.borderRadiusLG});return[W(t),G(t),K(t),A(t),(0,B.Z)(t)]},e=>({headerPadding:"".concat(e.paddingSM,"px ").concat(e.padding,"px"),headerBg:e.colorFillAlter,contentPadding:"".concat(e.padding,"px 16px"),contentBg:e.colorBgContainer,borderlessContentPadding:"".concat(e.paddingXXS,"px 16px ").concat(e.padding,"px"),borderlessContentBg:"transparent"})),_=Object.assign(a.forwardRef((e,t)=>{let{getPrefixCls:n,direction:c,expandIcon:i,className:l,style:s}=(0,P.dj)("collapse"),{prefixCls:d,className:u,rootClassName:p,style:f,bordered:b=!0,ghost:g,size:v,expandIconPosition:h="start",children:y,destroyInactivePanel:x,destroyOnHidden:O,expandIcon:w}=e,C=(0,z.Z)(e=>{var t;return null!==(t=null!=v?v:e)&&void 0!==t?t:"middle"}),E=n("collapse",d),j=n(),[S,M,R]=V(E),L=a.useMemo(()=>"left"===h?"start":"right"===h?"end":h,[h]),B=null!=w?w:i,H=a.useCallback(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="function"==typeof B?B(e):a.createElement(o.Z,{rotate:e.isActive?"rtl"===c?-90:90:void 0,"aria-label":e.isActive?"expanded":"collapsed"});return(0,N.Tm)(t,()=>{var e;return{className:r()(null===(e=t.props)||void 0===e?void 0:e.className,"".concat(E,"-arrow"))}})},[B,E,c]),T=r()("".concat(E,"-icon-position-").concat(L),{["".concat(E,"-borderless")]:!b,["".concat(E,"-rtl")]:"rtl"===c,["".concat(E,"-ghost")]:!!g,["".concat(E,"-").concat(C)]:"middle"!==C},l,u,p,M,R),W=a.useMemo(()=>Object.assign(Object.assign({},(0,I.Z)(j)),{motionAppear:!1,leavedClassName:"".concat(E,"-content-hidden")}),[j,E]),A=a.useMemo(()=>y?(0,m.Z)(y).map((e,t)=>{var n,a;let o=e.props;if(null==o?void 0:o.disabled){let c=null!==(n=e.key)&&void 0!==n?n:String(t),r=Object.assign(Object.assign({},(0,k.Z)(e.props,["disabled"])),{key:c,collapsible:null!==(a=o.collapsible)&&void 0!==a?a:"disabled"});return(0,N.Tm)(e,r)}return e}):null,[y]);return S(a.createElement(Z,Object.assign({ref:t,openMotion:W},(0,k.Z)(e,["rootClassName"]),{expandIcon:H,prefixCls:E,className:T,style:Object.assign(Object.assign({},s),f),destroyInactivePanel:null!=O?O:x}),A))}),{Panel:M})},867:function(e,t,n){n.d(t,{Z:function(){return j}});var a=n(2265),o=n(54537),c=n(36760),r=n.n(c),i=n(50506),l=n(18694),s=n(71744),d=n(79326),u=n(59367),p=n(92570),f=n(5545),m=n(51248),b=n(55274),g=n(37381),v=n(20435),h=n(99320);let y=e=>{let{componentCls:t,iconCls:n,antCls:a,zIndexPopup:o,colorText:c,colorWarning:r,marginXXS:i,marginXS:l,fontSize:s,fontWeightStrong:d,colorTextHeading:u}=e;return{[t]:{zIndex:o,["&".concat(a,"-popover")]:{fontSize:s},["".concat(t,"-message")]:{marginBottom:l,display:"flex",flexWrap:"nowrap",alignItems:"start",["> ".concat(t,"-message-icon ").concat(n)]:{color:r,fontSize:s,lineHeight:1,marginInlineEnd:l},["".concat(t,"-title")]:{fontWeight:d,color:u,"&:only-child":{fontWeight:"normal"}},["".concat(t,"-description")]:{marginTop:i,color:c}},["".concat(t,"-buttons")]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:l}}}}};var x=(0,h.I$)("Popconfirm",e=>y(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1}),O=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(e);ot.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};let w=e=>{let{prefixCls:t,okButtonProps:n,cancelButtonProps:c,title:r,description:i,cancelText:l,okText:d,okType:v="primary",icon:h=a.createElement(o.Z,null),showCancel:y=!0,close:x,onConfirm:O,onCancel:w,onPopupClick:C}=e,{getPrefixCls:E}=a.useContext(s.E_),[j]=(0,b.Z)("Popconfirm",g.Z.Popconfirm),S=(0,p.Z)(r),Z=(0,p.Z)(i);return a.createElement("div",{className:"".concat(t,"-inner-content"),onClick:C},a.createElement("div",{className:"".concat(t,"-message")},h&&a.createElement("span",{className:"".concat(t,"-message-icon")},h),a.createElement("div",{className:"".concat(t,"-message-text")},S&&a.createElement("div",{className:"".concat(t,"-title")},S),Z&&a.createElement("div",{className:"".concat(t,"-description")},Z))),a.createElement("div",{className:"".concat(t,"-buttons")},y&&a.createElement(f.ZP,Object.assign({onClick:w,size:"small"},c),l||(null==j?void 0:j.cancelText)),a.createElement(u.Z,{buttonProps:Object.assign(Object.assign({size:"small"},(0,m.nx)(v)),n),actionFn:O,close:x,prefixCls:E("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},d||(null==j?void 0:j.okText))))};var C=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(e);ot.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};let E=a.forwardRef((e,t)=>{var n,c;let{prefixCls:u,placement:p="top",trigger:f="click",okType:m="primary",icon:b=a.createElement(o.Z,null),children:g,overlayClassName:v,onOpenChange:h,onVisibleChange:y,overlayStyle:O,styles:E,classNames:j}=e,S=C(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:Z,className:k,style:I,classNames:N,styles:P}=(0,s.dj)("popconfirm"),[z,M]=(0,i.Z)(!1,{value:null!==(n=e.open)&&void 0!==n?n:e.visible,defaultValue:null!==(c=e.defaultOpen)&&void 0!==c?c:e.defaultVisible}),R=(e,t)=>{M(e,!0),null==y||y(e),null==h||h(e,t)},L=Z("popconfirm",u),B=r()(L,k,v,N.root,null==j?void 0:j.root),H=r()(N.body,null==j?void 0:j.body),[T]=x(L);return T(a.createElement(d.Z,Object.assign({},(0,l.Z)(S,["title"]),{trigger:f,placement:p,onOpenChange:(t,n)=>{let{disabled:a=!1}=e;a||R(t,n)},open:z,ref:t,classNames:{root:B,body:H},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},P.root),I),O),null==E?void 0:E.root),body:Object.assign(Object.assign({},P.body),null==E?void 0:E.body)},content:a.createElement(w,Object.assign({okType:m,icon:b},e,{prefixCls:L,close:e=>{R(!1,e)},onConfirm:t=>{var n;return null===(n=e.onConfirm)||void 0===n?void 0:n.call(void 0,t)},onCancel:t=>{var n;R(!1,t),null===(n=e.onCancel)||void 0===n||n.call(void 0,t)}})),"data-popover-inject":!0}),g))});E._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,placement:n,className:o,style:c}=e,i=O(e,["prefixCls","placement","className","style"]),{getPrefixCls:l}=a.useContext(s.E_),d=l("popconfirm",t),[u]=x(d);return u(a.createElement(v.ZP,{placement:n,className:r()(d,o),style:c,content:a.createElement(w,Object.assign({prefixCls:d},i))}))};var j=E},47451:function(e,t,n){var a=n(77774);t.Z=a.Z},87769:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(79205).Z)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},42208:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(79205).Z)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},3477:function(e,t,n){var a=n(2265);let o=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});t.Z=o},15731:function(e,t,n){var a=n(2265);let o=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=o},45589:function(e,t,n){var a=n(2265);let o=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"}))});t.Z=o},53410:function(e,t,n){var a=n(2265);let o=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});t.Z=o},91126:function(e,t,n){var a=n(2265);let o=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=o},3837:function(e,t,n){var a=n(2265);let o=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});t.Z=o}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4077-c4828a2983f3aa2b.js b/litellm/proxy/_experimental/out/_next/static/chunks/4077-c4828a2983f3aa2b.js
deleted file mode 100644
index 32b7beb9fae..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/4077-c4828a2983f3aa2b.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4077],{47323:function(t,o,e){e.d(o,{Z:function(){return b}});var n=e(5853),c=e(2265),i=e(47187),a=e(7084),r=e(13241),l=e(1153),s=e(26898);let d={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},m={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},g={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},p=(t,o)=>{switch(t){case"simple":return{textColor:o?(0,l.bM)(o,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:o?(0,l.bM)(o,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:o?(0,r.q)((0,l.bM)(o,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:o?(0,l.bM)(o,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:o?(0,r.q)((0,l.bM)(o,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:o?(0,l.bM)(o,s.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:o?(0,r.q)((0,l.bM)(o,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:o?(0,l.bM)(o,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:o?(0,r.q)((0,l.bM)(o,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:o?(0,l.bM)(o,s.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:o?(0,r.q)((0,l.bM)(o,s.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},u=(0,l.fn)("Icon"),b=c.forwardRef((t,o)=>{let{icon:e,variant:s="simple",tooltip:b,size:h=a.u8.SM,color:f,className:v}=t,C=(0,n._T)(t,["icon","variant","tooltip","size","color","className"]),S=p(s,f),{tooltipProps:k,getReferenceProps:y}=(0,i.l)();return c.createElement("span",Object.assign({ref:(0,l.lq)([o,k.refs.setReference]),className:(0,r.q)(u("root"),"inline-flex shrink-0 items-center justify-center",S.bgColor,S.textColor,S.borderColor,S.ringColor,g[s].rounded,g[s].border,g[s].shadow,g[s].ring,d[h].paddingX,d[h].paddingY,v)},y,C),c.createElement(i.Z,Object.assign({text:b},k)),c.createElement(e,{className:(0,r.q)(u("icon"),"shrink-0",m[h].height,m[h].width)}))});b.displayName="Icon"},15690:function(t,o,e){e.d(o,{default:function(){return F}});var n=e(2265),c=e(9738),i=e(49638),a=e(36760),r=e.n(a),l=e(1119),s=e(31686),d=e(11993),m=e(6989),g=e(95814),p=["className","prefixCls","style","active","status","iconPrefix","icon","wrapperStyle","stepNumber","disabled","description","title","subTitle","progressDot","stepIcon","tailContent","icons","stepIndex","onStepClick","onClick","render"];function u(t){return"string"==typeof t}var b=function(t){var o,e,c,i,a,b=t.className,h=t.prefixCls,f=t.style,v=t.active,C=t.status,S=t.iconPrefix,k=t.icon,y=(t.wrapperStyle,t.stepNumber),w=t.disabled,x=t.description,I=t.title,q=t.subTitle,O=t.progressDot,E=t.stepIcon,z=t.tailContent,T=t.icons,j=t.stepIndex,N=t.onStepClick,H=t.onClick,M=t.render,B=(0,m.Z)(t,p),W={};N&&!w&&(W.role="button",W.tabIndex=0,W.onClick=function(t){null==H||H(t),N(j)},W.onKeyDown=function(t){var o=t.which;(o===g.Z.ENTER||o===g.Z.SPACE)&&N(j)});var X=r()("".concat(h,"-item"),"".concat(h,"-item-").concat(C||"wait"),b,(a={},(0,d.Z)(a,"".concat(h,"-item-custom"),k),(0,d.Z)(a,"".concat(h,"-item-active"),v),(0,d.Z)(a,"".concat(h,"-item-disabled"),!0===w),a)),Z=(0,s.Z)({},f),P=n.createElement("div",(0,l.Z)({},B,{className:X,style:Z}),n.createElement("div",(0,l.Z)({onClick:H},W,{className:"".concat(h,"-item-container")}),n.createElement("div",{className:"".concat(h,"-item-tail")},z),n.createElement("div",{className:"".concat(h,"-item-icon")},(c=r()("".concat(h,"-icon"),"".concat(S,"icon"),(o={},(0,d.Z)(o,"".concat(S,"icon-").concat(k),k&&u(k)),(0,d.Z)(o,"".concat(S,"icon-check"),!k&&"finish"===C&&(T&&!T.finish||!T)),(0,d.Z)(o,"".concat(S,"icon-cross"),!k&&"error"===C&&(T&&!T.error||!T)),o)),i=n.createElement("span",{className:"".concat(h,"-icon-dot")}),e=O?"function"==typeof O?n.createElement("span",{className:"".concat(h,"-icon")},O(i,{index:y-1,status:C,title:I,description:x})):n.createElement("span",{className:"".concat(h,"-icon")},i):k&&!u(k)?n.createElement("span",{className:"".concat(h,"-icon")},k):T&&T.finish&&"finish"===C?n.createElement("span",{className:"".concat(h,"-icon")},T.finish):T&&T.error&&"error"===C?n.createElement("span",{className:"".concat(h,"-icon")},T.error):k||"finish"===C||"error"===C?n.createElement("span",{className:c}):n.createElement("span",{className:"".concat(h,"-icon")},y),E&&(e=E({index:y-1,status:C,title:I,description:x,node:e})),e)),n.createElement("div",{className:"".concat(h,"-item-content")},n.createElement("div",{className:"".concat(h,"-item-title")},I,q&&n.createElement("div",{title:"string"==typeof q?q:void 0,className:"".concat(h,"-item-subtitle")},q)),x&&n.createElement("div",{className:"".concat(h,"-item-description")},x))));return M&&(P=M(P)||null),P},h=["prefixCls","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","stepIcon","initial","icons","onChange","itemRender","items"];function f(t){var o,e=t.prefixCls,c=void 0===e?"rc-steps":e,i=t.style,a=void 0===i?{}:i,g=t.className,p=(t.children,t.direction),u=t.type,f=void 0===u?"default":u,v=t.labelPlacement,C=t.iconPrefix,S=void 0===C?"rc":C,k=t.status,y=void 0===k?"process":k,w=t.size,x=t.current,I=void 0===x?0:x,q=t.progressDot,O=t.stepIcon,E=t.initial,z=void 0===E?0:E,T=t.icons,j=t.onChange,N=t.itemRender,H=t.items,M=(0,m.Z)(t,h),B="inline"===f,W=B||void 0!==q&&q,X=B?"horizontal":void 0===p?"horizontal":p,Z=B?void 0:w,P=r()(c,"".concat(c,"-").concat(X),g,(o={},(0,d.Z)(o,"".concat(c,"-").concat(Z),Z),(0,d.Z)(o,"".concat(c,"-label-").concat(W?"vertical":void 0===v?"horizontal":v),"horizontal"===X),(0,d.Z)(o,"".concat(c,"-dot"),!!W),(0,d.Z)(o,"".concat(c,"-navigation"),"navigation"===f),(0,d.Z)(o,"".concat(c,"-inline"),B),o)),D=function(t){j&&I!==t&&j(t)};return n.createElement("div",(0,l.Z)({className:P,style:a},M),(void 0===H?[]:H).filter(function(t){return t}).map(function(t,o){var e=(0,s.Z)({},t),i=z+o;return"error"===y&&o===I-1&&(e.className="".concat(c,"-next-error")),e.status||(i===I?e.status=y:i{let{componentCls:o,customIconTop:e,customIconSize:n,customIconFontSize:c}=t;return{["".concat(o,"-item-custom")]:{["> ".concat(o,"-item-container > ").concat(o,"-item-icon")]:{height:"auto",background:"none",border:0,["> ".concat(o,"-icon")]:{top:e,width:n,height:n,fontSize:c,lineHeight:(0,w.bf)(n)}}},["&:not(".concat(o,"-vertical)")]:{["".concat(o,"-item-custom")]:{["".concat(o,"-item-icon")]:{width:"auto",background:"none"}}}}},E=t=>{let{componentCls:o}=t;return{["".concat(o,"-horizontal")]:{["".concat("".concat(o,"-item"),"-tail")]:{transform:"translateY(-50%)"}}}},z=t=>{let{componentCls:o,inlineDotSize:e,inlineTitleColor:n,inlineTailColor:c}=t,i=t.calc(t.paddingXS).add(t.lineWidth).equal(),a={["".concat(o,"-item-container ").concat(o,"-item-content ").concat(o,"-item-title")]:{color:n}};return{["&".concat(o,"-inline")]:{width:"auto",display:"inline-flex",["".concat(o,"-item")]:{flex:"none","&-container":{padding:"".concat((0,w.bf)(i)," ").concat((0,w.bf)(t.paddingXXS)," 0"),margin:"0 ".concat((0,w.bf)(t.calc(t.marginXXS).div(2).equal())),borderRadius:t.borderRadiusSM,cursor:"pointer",transition:"background-color ".concat(t.motionDurationMid),"&:hover":{background:t.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:e,height:e,marginInlineStart:"calc(50% - ".concat((0,w.bf)(t.calc(e).div(2).equal()),")"),["> ".concat(o,"-icon")]:{top:0},["".concat(o,"-icon-dot")]:{borderRadius:t.calc(t.fontSizeSM).div(4).equal(),"&::after":{display:"none"}}},"&-content":{width:"auto",marginTop:t.calc(t.marginXS).sub(t.lineWidth).equal()},"&-title":{color:n,fontSize:t.fontSizeSM,lineHeight:t.lineHeightSM,fontWeight:"normal",marginBottom:t.calc(t.marginXXS).div(2).equal()},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:t.calc(e).div(2).add(i).equal(),transform:"translateY(-50%)","&:after":{width:"100%",height:t.lineWidth,borderRadius:0,marginInlineStart:0,background:c}},["&:first-child ".concat(o,"-item-tail")]:{width:"50%",marginInlineStart:"50%"},["&:last-child ".concat(o,"-item-tail")]:{display:"block",width:"50%"},"&-wait":Object.assign({["".concat(o,"-item-icon ").concat(o,"-icon ").concat(o,"-icon-dot")]:{backgroundColor:t.colorBorderBg,border:"".concat((0,w.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(c)}},a),"&-finish":Object.assign({["".concat(o,"-item-tail::after")]:{backgroundColor:c},["".concat(o,"-item-icon ").concat(o,"-icon ").concat(o,"-icon-dot")]:{backgroundColor:c,border:"".concat((0,w.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(c)}},a),"&-error":a,"&-active, &-process":Object.assign({["".concat(o,"-item-icon")]:{width:e,height:e,marginInlineStart:"calc(50% - ".concat((0,w.bf)(t.calc(e).div(2).equal()),")"),top:0}},a),["&:not(".concat(o,"-item-active) > ").concat(o,"-item-container[role='button']:hover")]:{["".concat(o,"-item-title")]:{color:n}}}}}},T=t=>{let{componentCls:o,iconSize:e,lineHeight:n,iconSizeSM:c}=t;return{["&".concat(o,"-label-vertical")]:{["".concat(o,"-item")]:{overflow:"visible","&-tail":{marginInlineStart:t.calc(e).div(2).add(t.controlHeightLG).equal(),padding:"0 ".concat((0,w.bf)(t.paddingLG))},"&-content":{display:"block",width:t.calc(e).div(2).add(t.controlHeightLG).mul(2).equal(),marginTop:t.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:t.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:t.marginXXS,marginInlineStart:0,lineHeight:n}},["&".concat(o,"-small:not(").concat(o,"-dot)")]:{["".concat(o,"-item")]:{"&-icon":{marginInlineStart:t.calc(e).sub(c).div(2).add(t.controlHeightLG).equal()}}}}}},j=t=>{let{componentCls:o,navContentMaxWidth:e,navArrowColor:n,stepsNavActiveColor:c,motionDurationSlow:i}=t;return{["&".concat(o,"-navigation")]:{paddingTop:t.paddingSM,["&".concat(o,"-small")]:{["".concat(o,"-item")]:{"&-container":{marginInlineStart:t.calc(t.marginSM).mul(-1).equal()}}},["".concat(o,"-item")]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:t.calc(t.margin).mul(-1).equal(),paddingBottom:t.paddingSM,textAlign:"start",transition:"opacity ".concat(i),["".concat(o,"-item-content")]:{maxWidth:e},["".concat(o,"-item-title")]:Object.assign(Object.assign({maxWidth:"100%",paddingInlineEnd:0},x.vS),{"&::after":{display:"none"}})},["&:not(".concat(o,"-item-active)")]:{["".concat(o,"-item-container[role='button']")]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:"calc(50% - ".concat((0,w.bf)(t.calc(t.paddingSM).div(2).equal()),")"),insetInlineStart:"100%",display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,borderTop:"".concat((0,w.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(n),borderBottom:"none",borderInlineStart:"none",borderInlineEnd:"".concat((0,w.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(n),transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:t.lineWidthBold,backgroundColor:c,transition:"width ".concat(i,", inset-inline-start ").concat(i),transitionTimingFunction:"ease-out",content:'""'}},["".concat(o,"-item").concat(o,"-item-active::before")]:{insetInlineStart:0,width:"100%"}},["&".concat(o,"-navigation").concat(o,"-vertical")]:{["> ".concat(o,"-item")]:{marginInlineEnd:0,"&::before":{display:"none"},["&".concat(o,"-item-active::before")]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:t.calc(t.lineWidth).mul(3).equal(),height:"calc(100% - ".concat((0,w.bf)(t.marginLG),")")},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:t.calc(t.controlHeight).mul(.25).equal(),height:t.calc(t.controlHeight).mul(.25).equal(),marginBottom:t.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},"&:last-child":{"&::after":{display:"none"}},["> ".concat(o,"-item-container > ").concat(o,"-item-tail")]:{visibility:"hidden"}}},["&".concat(o,"-navigation").concat(o,"-horizontal")]:{["> ".concat(o,"-item > ").concat(o,"-item-container > ").concat(o,"-item-tail")]:{visibility:"hidden"}}}},N=t=>{let{antCls:o,componentCls:e,iconSize:n,iconSizeSM:c,processIconColor:i,marginXXS:a,lineWidthBold:r,lineWidth:l,paddingXXS:s}=t,d=t.calc(n).add(t.calc(r).mul(4).equal()).equal(),m=t.calc(c).add(t.calc(t.lineWidth).mul(4).equal()).equal();return{["&".concat(e,"-with-progress")]:{["".concat(e,"-item")]:{paddingTop:s,["&-process ".concat(e,"-item-container ").concat(e,"-item-icon ").concat(e,"-icon")]:{color:i}},["&".concat(e,"-vertical > ").concat(e,"-item ")]:{paddingInlineStart:s,["> ".concat(e,"-item-container > ").concat(e,"-item-tail")]:{top:a,insetInlineStart:t.calc(n).div(2).sub(l).add(s).equal()}},["&, &".concat(e,"-small")]:{["&".concat(e,"-horizontal ").concat(e,"-item:first-child")]:{paddingBottom:s,paddingInlineStart:s}},["&".concat(e,"-small").concat(e,"-vertical > ").concat(e,"-item > ").concat(e,"-item-container > ").concat(e,"-item-tail")]:{insetInlineStart:t.calc(c).div(2).sub(l).add(s).equal()},["&".concat(e,"-label-vertical ").concat(e,"-item ").concat(e,"-item-tail")]:{top:t.calc(n).div(2).add(s).equal()},["".concat(e,"-item-icon")]:{position:"relative",["".concat(o,"-progress")]:{position:"absolute",insetInlineStart:"50%",top:"50%",transform:"translate(-50%, -50%)","&-inner":{width:"".concat((0,w.bf)(d)," !important"),height:"".concat((0,w.bf)(d)," !important")}}},["&".concat(e,"-small")]:{["&".concat(e,"-label-vertical ").concat(e,"-item ").concat(e,"-item-tail")]:{top:t.calc(c).div(2).add(s).equal()},["".concat(e,"-item-icon ").concat(o,"-progress-inner")]:{width:"".concat((0,w.bf)(m)," !important"),height:"".concat((0,w.bf)(m)," !important")}}}}},H=t=>{let{componentCls:o,descriptionMaxWidth:e,lineHeight:n,dotCurrentSize:c,dotSize:i,motionDurationSlow:a}=t;return{["&".concat(o,"-dot, &").concat(o,"-dot").concat(o,"-small")]:{["".concat(o,"-item")]:{"&-title":{lineHeight:n},"&-tail":{top:t.calc(t.dotSize).sub(t.calc(t.lineWidth).mul(3).equal()).div(2).equal(),width:"100%",marginTop:0,marginBottom:0,marginInline:"".concat((0,w.bf)(t.calc(e).div(2).equal())," 0"),padding:0,"&::after":{width:"calc(100% - ".concat((0,w.bf)(t.calc(t.marginSM).mul(2).equal()),")"),height:t.calc(t.lineWidth).mul(3).equal(),marginInlineStart:t.marginSM}},"&-icon":{width:i,height:i,marginInlineStart:t.calc(t.descriptionMaxWidth).sub(i).div(2).equal(),paddingInlineEnd:0,lineHeight:(0,w.bf)(i),background:"transparent",border:0,["".concat(o,"-icon-dot")]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:"all ".concat(a),"&::after":{position:"absolute",top:t.calc(t.marginSM).mul(-1).equal(),insetInlineStart:t.calc(i).sub(t.calc(t.controlHeightLG).mul(1.5).equal()).div(2).equal(),width:t.calc(t.controlHeightLG).mul(1.5).equal(),height:t.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:e},["&-process ".concat(o,"-item-icon")]:{position:"relative",top:t.calc(i).sub(c).div(2).equal(),width:c,height:c,lineHeight:(0,w.bf)(c),background:"none",marginInlineStart:t.calc(t.descriptionMaxWidth).sub(c).div(2).equal()},["&-process ".concat(o,"-icon")]:{["&:first-child ".concat(o,"-icon-dot")]:{insetInlineStart:0}}}},["&".concat(o,"-vertical").concat(o,"-dot")]:{["".concat(o,"-item-icon")]:{marginTop:t.calc(t.controlHeight).sub(i).div(2).equal(),marginInlineStart:0,background:"none"},["".concat(o,"-item-process ").concat(o,"-item-icon")]:{marginTop:t.calc(t.controlHeight).sub(c).div(2).equal(),top:0,insetInlineStart:t.calc(i).sub(c).div(2).equal(),marginInlineStart:0},["".concat(o,"-item > ").concat(o,"-item-container > ").concat(o,"-item-tail")]:{top:t.calc(t.controlHeight).sub(i).div(2).equal(),insetInlineStart:0,margin:0,padding:"".concat((0,w.bf)(t.calc(i).add(t.paddingXS).equal())," 0 ").concat((0,w.bf)(t.paddingXS)),"&::after":{marginInlineStart:t.calc(i).sub(t.lineWidth).div(2).equal()}},["&".concat(o,"-small")]:{["".concat(o,"-item-icon")]:{marginTop:t.calc(t.controlHeightSM).sub(i).div(2).equal()},["".concat(o,"-item-process ").concat(o,"-item-icon")]:{marginTop:t.calc(t.controlHeightSM).sub(c).div(2).equal()},["".concat(o,"-item > ").concat(o,"-item-container > ").concat(o,"-item-tail")]:{top:t.calc(t.controlHeightSM).sub(i).div(2).equal()}},["".concat(o,"-item:first-child ").concat(o,"-icon-dot")]:{insetInlineStart:0},["".concat(o,"-item-content")]:{width:"inherit"}}}},M=t=>{let{componentCls:o}=t;return{["&".concat(o,"-rtl")]:{direction:"rtl",["".concat(o,"-item")]:{"&-subtitle":{float:"left"}},["&".concat(o,"-navigation")]:{["".concat(o,"-item::after")]:{transform:"rotate(-45deg)"}},["&".concat(o,"-vertical")]:{["> ".concat(o,"-item")]:{"&::after":{transform:"rotate(225deg)"},["".concat(o,"-item-icon")]:{float:"right"}}},["&".concat(o,"-dot")]:{["".concat(o,"-item-icon ").concat(o,"-icon-dot, &").concat(o,"-small ").concat(o,"-item-icon ").concat(o,"-icon-dot")]:{float:"right"}}}}},B=t=>{let{componentCls:o,iconSizeSM:e,fontSizeSM:n,fontSize:c,colorTextDescription:i}=t;return{["&".concat(o,"-small")]:{["&".concat(o,"-horizontal:not(").concat(o,"-label-vertical) ").concat(o,"-item")]:{paddingInlineStart:t.paddingSM,"&:first-child":{paddingInlineStart:0}},["".concat(o,"-item-icon")]:{width:e,height:e,marginTop:0,marginBottom:0,marginInline:"0 ".concat((0,w.bf)(t.marginXS)),fontSize:n,lineHeight:(0,w.bf)(e),textAlign:"center",borderRadius:e},["".concat(o,"-item-title")]:{paddingInlineEnd:t.paddingSM,fontSize:c,lineHeight:(0,w.bf)(e),"&::after":{top:t.calc(e).div(2).equal()}},["".concat(o,"-item-description")]:{color:i,fontSize:c},["".concat(o,"-item-tail")]:{top:t.calc(e).div(2).sub(t.paddingXXS).equal()},["".concat(o,"-item-custom ").concat(o,"-item-icon")]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,["> ".concat(o,"-icon")]:{fontSize:e,lineHeight:(0,w.bf)(e),transform:"none"}}}}},W=t=>{let{componentCls:o,iconSizeSM:e,iconSize:n}=t;return{["&".concat(o,"-vertical")]:{display:"flex",flexDirection:"column",["> ".concat(o,"-item")]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",["".concat(o,"-item-icon")]:{float:"left",marginInlineEnd:t.margin},["".concat(o,"-item-content")]:{display:"block",minHeight:t.calc(t.controlHeight).mul(1.5).equal(),overflow:"hidden"},["".concat(o,"-item-title")]:{lineHeight:(0,w.bf)(n)},["".concat(o,"-item-description")]:{paddingBottom:t.paddingSM}},["> ".concat(o,"-item > ").concat(o,"-item-container > ").concat(o,"-item-tail")]:{position:"absolute",top:0,insetInlineStart:t.calc(n).div(2).sub(t.lineWidth).equal(),width:t.lineWidth,height:"100%",padding:"".concat((0,w.bf)(t.calc(t.marginXXS).mul(1.5).add(n).equal())," 0 ").concat((0,w.bf)(t.calc(t.marginXXS).mul(1.5).equal())),"&::after":{width:t.lineWidth,height:"100%"}},["> ".concat(o,"-item:not(:last-child) > ").concat(o,"-item-container > ").concat(o,"-item-tail")]:{display:"block"},[" > ".concat(o,"-item > ").concat(o,"-item-container > ").concat(o,"-item-content > ").concat(o,"-item-title")]:{"&::after":{display:"none"}},["&".concat(o,"-small ").concat(o,"-item-container")]:{["".concat(o,"-item-tail")]:{position:"absolute",top:0,insetInlineStart:t.calc(e).div(2).sub(t.lineWidth).equal(),padding:"".concat((0,w.bf)(t.calc(t.marginXXS).mul(1.5).add(e).equal())," 0 ").concat((0,w.bf)(t.calc(t.marginXXS).mul(1.5).equal()))},["".concat(o,"-item-title")]:{lineHeight:(0,w.bf)(e)}}}}};let X=(t,o)=>{let e="".concat(o.componentCls,"-item"),n="".concat(t,"IconColor"),c="".concat(t,"TitleColor"),i="".concat(t,"DescriptionColor"),a="".concat(t,"TailColor"),r="".concat(t,"IconBgColor"),l="".concat(t,"IconBorderColor"),s="".concat(t,"DotColor");return{["".concat(e,"-").concat(t," ").concat(e,"-icon")]:{backgroundColor:o[r],borderColor:o[l],["> ".concat(o.componentCls,"-icon")]:{color:o[n],["".concat(o.componentCls,"-icon-dot")]:{background:o[s]}}},["".concat(e,"-").concat(t).concat(e,"-custom ").concat(e,"-icon")]:{["> ".concat(o.componentCls,"-icon")]:{color:o[s]}},["".concat(e,"-").concat(t," > ").concat(e,"-container > ").concat(e,"-content > ").concat(e,"-title")]:{color:o[c],"&::after":{backgroundColor:o[a]}},["".concat(e,"-").concat(t," > ").concat(e,"-container > ").concat(e,"-content > ").concat(e,"-description")]:{color:o[i]},["".concat(e,"-").concat(t," > ").concat(e,"-container > ").concat(e,"-tail::after")]:{backgroundColor:o[a]}}},Z=t=>{let{componentCls:o,motionDurationSlow:e}=t,n="".concat(o,"-item"),c="".concat(n,"-icon");return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",["> ".concat(n,"-container > ").concat(n,"-tail, > ").concat(n,"-container > ").concat(n,"-content > ").concat(n,"-title::after")]:{display:"none"}}},["".concat(n,"-container")]:{outline:"none",["&:focus-visible ".concat(c)]:(0,x.oN)(t)},["".concat(c,", ").concat(n,"-content")]:{display:"inline-block",verticalAlign:"top"},[c]:{width:t.iconSize,height:t.iconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:t.marginXS,fontSize:t.iconFontSize,fontFamily:t.fontFamily,lineHeight:(0,w.bf)(t.iconSize),textAlign:"center",borderRadius:t.iconSize,border:"".concat((0,w.bf)(t.lineWidth)," ").concat(t.lineType," transparent"),transition:"background-color ".concat(e,", border-color ").concat(e),["".concat(o,"-icon")]:{position:"relative",top:t.iconTop,color:t.colorPrimary,lineHeight:1}},["".concat(n,"-tail")]:{position:"absolute",top:t.calc(t.iconSize).div(2).equal(),insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:t.lineWidth,background:t.colorSplit,borderRadius:t.lineWidth,transition:"background ".concat(e),content:'""'}},["".concat(n,"-title")]:{position:"relative",display:"inline-block",paddingInlineEnd:t.padding,color:t.colorText,fontSize:t.fontSizeLG,lineHeight:(0,w.bf)(t.titleLineHeight),"&::after":{position:"absolute",top:t.calc(t.titleLineHeight).div(2).equal(),insetInlineStart:"100%",display:"block",width:9999,height:t.lineWidth,background:t.processTailColor,content:'""'}},["".concat(n,"-subtitle")]:{display:"inline",marginInlineStart:t.marginXS,color:t.colorTextDescription,fontWeight:"normal",fontSize:t.fontSize},["".concat(n,"-description")]:{color:t.colorTextDescription,fontSize:t.fontSize}},X("wait",t)),X("process",t)),{["".concat(n,"-process > ").concat(n,"-container > ").concat(n,"-title")]:{fontWeight:t.fontWeightStrong}}),X("finish",t)),X("error",t)),{["".concat(n).concat(o,"-next-error > ").concat(o,"-item-title::after")]:{background:t.colorError},["".concat(n,"-disabled")]:{cursor:"not-allowed"}})},P=t=>{let{componentCls:o,motionDurationSlow:e}=t;return{["& ".concat(o,"-item")]:{["&:not(".concat(o,"-item-active)")]:{["& > ".concat(o,"-item-container[role='button']")]:{cursor:"pointer",["".concat(o,"-item")]:{["&-title, &-subtitle, &-description, &-icon ".concat(o,"-icon")]:{transition:"color ".concat(e)}},"&:hover":{["".concat(o,"-item")]:{"&-title, &-subtitle, &-description":{color:t.colorPrimary}}}},["&:not(".concat(o,"-item-process)")]:{["& > ".concat(o,"-item-container[role='button']:hover")]:{["".concat(o,"-item")]:{"&-icon":{borderColor:t.colorPrimary,["".concat(o,"-icon")]:{color:t.colorPrimary}}}}}}},["&".concat(o,"-horizontal:not(").concat(o,"-label-vertical)")]:{["".concat(o,"-item")]:{paddingInlineStart:t.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},["&:last-child ".concat(o,"-item-title")]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:t.descriptionMaxWidth,whiteSpace:"normal"}}}}},D=t=>{let{componentCls:o}=t;return{[o]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,x.Wf)(t)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),Z(t)),P(t)),O(t)),B(t)),W(t)),E(t)),T(t)),H(t)),j(t)),M(t)),N(t)),z(t))}};var L=(0,I.I$)("Steps",t=>{let{colorTextDisabled:o,controlHeightLG:e,colorTextLightSolid:n,colorText:c,colorPrimary:i,colorTextDescription:a,colorTextQuaternary:r,colorError:l,colorBorderSecondary:s,colorSplit:d}=t;return D((0,q.IX)(t,{processIconColor:n,processTitleColor:c,processDescriptionColor:c,processIconBgColor:i,processIconBorderColor:i,processDotColor:i,processTailColor:d,waitTitleColor:a,waitDescriptionColor:a,waitTailColor:d,waitDotColor:o,finishIconColor:i,finishTitleColor:c,finishDescriptionColor:a,finishTailColor:i,finishDotColor:i,errorIconColor:n,errorTitleColor:l,errorDescriptionColor:l,errorTailColor:d,errorIconBgColor:l,errorIconBorderColor:l,errorDotColor:l,stepsNavActiveColor:i,stepsProgressSize:e,inlineDotSize:6,inlineTitleColor:r,inlineTailColor:s}))},t=>({titleLineHeight:t.controlHeight,customIconSize:t.controlHeight,customIconTop:0,customIconFontSize:t.controlHeightSM,iconSize:t.controlHeight,iconTop:-.5,iconFontSize:t.fontSize,iconSizeSM:t.fontSizeHeading3,dotSize:t.controlHeight/4,dotCurrentSize:t.controlHeightLG/4,navArrowColor:t.colorTextDisabled,navContentMaxWidth:"unset",descriptionMaxWidth:140,waitIconColor:t.wireframe?t.colorTextDisabled:t.colorTextLabel,waitIconBgColor:t.wireframe?t.colorBgContainer:t.colorFillContent,waitIconBorderColor:t.wireframe?t.colorTextDisabled:"transparent",finishIconBgColor:t.wireframe?t.colorBgContainer:t.controlItemBgActive,finishIconBorderColor:t.wireframe?t.colorPrimary:t.controlItemBgActive})),R=e(45287),A=function(t,o){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>o.indexOf(n)&&(e[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,n=Object.getOwnPropertySymbols(t);co.indexOf(n[c])&&Object.prototype.propertyIsEnumerable.call(t,n[c])&&(e[n[c]]=t[n[c]]);return e};let K=t=>{let{percent:o,size:e,className:a,rootClassName:l,direction:s,items:d,responsive:m=!0,current:g=0,children:p,style:u}=t,b=A(t,["percent","size","className","rootClassName","direction","items","responsive","current","children","style"]),{xs:h}=(0,S.Z)(m),{getPrefixCls:w,direction:x,className:I,style:q}=(0,v.dj)("steps"),O=n.useMemo(()=>m&&h?"vertical":s,[m,h,s]),E=(0,C.Z)(e),z=w("steps",t.prefixCls),[T,j,N]=L(z),H="inline"===t.type,M=w("",t.iconPrefix),B=d||(0,R.Z)(p).map(t=>{if(n.isValidElement(t)){let{props:o}=t;return Object.assign({},o)}return null}).filter(t=>t),W=H?void 0:o,X=Object.assign(Object.assign({},q),u),Z=r()(I,{["".concat(z,"-rtl")]:"rtl"===x,["".concat(z,"-with-progress")]:void 0!==W},a,l,j,N),P={finish:n.createElement(c.Z,{className:"".concat(z,"-finish-icon")}),error:n.createElement(i.Z,{className:"".concat(z,"-error-icon")})};return T(n.createElement(f,Object.assign({icons:P},b,{style:X,current:g,size:E,items:B,itemRender:H?(t,o)=>t.description?n.createElement(y.Z,{title:t.description},o):o:void 0,stepIcon:t=>{let{node:o,status:e}=t;return"process"===e&&void 0!==W?n.createElement("div",{className:"".concat(z,"-progress-icon")},n.createElement(k.Z,{type:"circle",percent:W,size:"small"===E?32:40,strokeWidth:4,format:()=>null}),o):o},direction:O,prefixCls:z,iconPrefix:M,className:Z})))};K.Step=f.Step;var F=K},3810:function(t,o,e){e.d(o,{Z:function(){return T}});var n=e(2265),c=e(36760),i=e.n(c),a=e(18694),r=e(93350),l=e(53445),s=e(19722),d=e(6694),m=e(71744),g=e(93463),p=e(54558),u=e(12918),b=e(71140),h=e(99320);let f=t=>{let{paddingXXS:o,lineWidth:e,tagPaddingHorizontal:n,componentCls:c,calc:i}=t,a=i(n).sub(e).equal(),r=i(o).sub(e).equal();return{[c]:Object.assign(Object.assign({},(0,u.Wf)(t)),{display:"inline-block",height:"auto",marginInlineEnd:t.marginXS,paddingInline:a,fontSize:t.tagFontSize,lineHeight:t.tagLineHeight,whiteSpace:"nowrap",background:t.defaultBg,border:"".concat((0,g.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorBorder),borderRadius:t.borderRadiusSM,opacity:1,transition:"all ".concat(t.motionDurationMid),textAlign:"start",position:"relative",["&".concat(c,"-rtl")]:{direction:"rtl"},"&, a, a:hover":{color:t.defaultColor},["".concat(c,"-close-icon")]:{marginInlineStart:r,fontSize:t.tagIconSize,color:t.colorIcon,cursor:"pointer",transition:"all ".concat(t.motionDurationMid),"&:hover":{color:t.colorTextHeading}},["&".concat(c,"-has-color")]:{borderColor:"transparent",["&, a, a:hover, ".concat(t.iconCls,"-close, ").concat(t.iconCls,"-close:hover")]:{color:t.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",["&:not(".concat(c,"-checkable-checked):hover")]:{color:t.colorPrimary,backgroundColor:t.colorFillSecondary},"&:active, &-checked":{color:t.colorTextLightSolid},"&-checked":{backgroundColor:t.colorPrimary,"&:hover":{backgroundColor:t.colorPrimaryHover}},"&:active":{backgroundColor:t.colorPrimaryActive}},"&-hidden":{display:"none"},["> ".concat(t.iconCls," + span, > span + ").concat(t.iconCls)]:{marginInlineStart:a}}),["".concat(c,"-borderless")]:{borderColor:"transparent",background:t.tagBorderlessBg}}},v=t=>{let{lineWidth:o,fontSizeIcon:e,calc:n}=t,c=t.fontSizeSM;return(0,b.IX)(t,{tagFontSize:c,tagLineHeight:(0,g.bf)(n(t.lineHeightSM).mul(c).equal()),tagIconSize:n(e).sub(n(o).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:t.defaultBg})},C=t=>({defaultBg:new p.t(t.colorFillQuaternary).onBackground(t.colorBgContainer).toHexString(),defaultColor:t.colorText});var S=(0,h.I$)("Tag",t=>f(v(t)),C),k=function(t,o){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>o.indexOf(n)&&(e[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,n=Object.getOwnPropertySymbols(t);co.indexOf(n[c])&&Object.prototype.propertyIsEnumerable.call(t,n[c])&&(e[n[c]]=t[n[c]]);return e};let y=n.forwardRef((t,o)=>{let{prefixCls:e,style:c,className:a,checked:r,children:l,icon:s,onChange:d,onClick:g}=t,p=k(t,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:u,tag:b}=n.useContext(m.E_),h=u("tag",e),[f,v,C]=S(h),y=i()(h,"".concat(h,"-checkable"),{["".concat(h,"-checkable-checked")]:r},null==b?void 0:b.className,a,v,C);return f(n.createElement("span",Object.assign({},p,{ref:o,style:Object.assign(Object.assign({},c),null==b?void 0:b.style),className:y,onClick:t=>{null==d||d(!r),null==g||g(t)}}),s,n.createElement("span",null,l)))});var w=e(18536);let x=t=>(0,w.Z)(t,(o,e)=>{let{textColor:n,lightBorderColor:c,lightColor:i,darkColor:a}=e;return{["".concat(t.componentCls).concat(t.componentCls,"-").concat(o)]:{color:n,background:i,borderColor:c,"&-inverse":{color:t.colorTextLightSolid,background:a,borderColor:a},["&".concat(t.componentCls,"-borderless")]:{borderColor:"transparent"}}}});var I=(0,h.bk)(["Tag","preset"],t=>x(v(t)),C);let q=(t,o,e)=>{let n="string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1);return{["".concat(t.componentCls).concat(t.componentCls,"-").concat(o)]:{color:t["color".concat(e)],background:t["color".concat(n,"Bg")],borderColor:t["color".concat(n,"Border")],["&".concat(t.componentCls,"-borderless")]:{borderColor:"transparent"}}}};var O=(0,h.bk)(["Tag","status"],t=>{let o=v(t);return[q(o,"success","Success"),q(o,"processing","Info"),q(o,"error","Error"),q(o,"warning","Warning")]},C),E=function(t,o){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>o.indexOf(n)&&(e[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,n=Object.getOwnPropertySymbols(t);co.indexOf(n[c])&&Object.prototype.propertyIsEnumerable.call(t,n[c])&&(e[n[c]]=t[n[c]]);return e};let z=n.forwardRef((t,o)=>{let{prefixCls:e,className:c,rootClassName:g,style:p,children:u,icon:b,color:h,onClose:f,bordered:v=!0,visible:C}=t,k=E(t,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:y,direction:w,tag:x}=n.useContext(m.E_),[q,z]=n.useState(!0),T=(0,a.Z)(k,["closeIcon","closable"]);n.useEffect(()=>{void 0!==C&&z(C)},[C]);let j=(0,r.o2)(h),N=(0,r.yT)(h),H=j||N,M=Object.assign(Object.assign({backgroundColor:h&&!H?h:void 0},null==x?void 0:x.style),p),B=y("tag",e),[W,X,Z]=S(B),P=i()(B,null==x?void 0:x.className,{["".concat(B,"-").concat(h)]:H,["".concat(B,"-has-color")]:h&&!H,["".concat(B,"-hidden")]:!q,["".concat(B,"-rtl")]:"rtl"===w,["".concat(B,"-borderless")]:!v},c,g,X,Z),D=t=>{t.stopPropagation(),null==f||f(t),t.defaultPrevented||z(!1)},[,L]=(0,l.b)((0,l.w)(t),(0,l.w)(x),{closable:!1,closeIconRender:t=>{let o=n.createElement("span",{className:"".concat(B,"-close-icon"),onClick:D},t);return(0,s.wm)(t,o,t=>({onClick:o=>{var e;null===(e=null==t?void 0:t.onClick)||void 0===e||e.call(t,o),D(o)},className:i()(null==t?void 0:t.className,"".concat(B,"-close-icon"))}))}}),R="function"==typeof k.onClick||u&&"a"===u.type,A=b||null,K=A?n.createElement(n.Fragment,null,A,u&&n.createElement("span",null,u)):u,F=n.createElement("span",Object.assign({},T,{ref:o,className:P,style:M}),K,L,j&&n.createElement(I,{key:"preset",prefixCls:B}),N&&n.createElement(O,{key:"status",prefixCls:B}));return W(R?n.createElement(d.Z,{component:"Tag"},F):F)});z.CheckableTag=y;var T=z},49084:function(t,o,e){var n=e(2265);let c=n.forwardRef(function(t,o){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:o},t),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});o.Z=c}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4341-3e3f04c866417786.js b/litellm/proxy/_experimental/out/_next/static/chunks/4341-3e3f04c866417786.js
new file mode 100644
index 00000000000..6f014bca9e5
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/4341-3e3f04c866417786.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4341],{47323:function(t,n,o){o.d(n,{Z:function(){return u}});var e=o(5853),i=o(2265),c=o(47187),a=o(7084),r=o(13241),l=o(1153),d=o(26898);let s={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},m={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},g={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},p=(t,n)=>{switch(t){case"simple":return{textColor:n?(0,l.bM)(n,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:n?(0,l.bM)(n,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:n?(0,r.q)((0,l.bM)(n,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:n?(0,l.bM)(n,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:n?(0,r.q)((0,l.bM)(n,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:n?(0,l.bM)(n,d.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:n?(0,r.q)((0,l.bM)(n,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:n?(0,l.bM)(n,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:n?(0,r.q)((0,l.bM)(n,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:n?(0,l.bM)(n,d.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:n?(0,r.q)((0,l.bM)(n,d.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},b=(0,l.fn)("Icon"),u=i.forwardRef((t,n)=>{let{icon:o,variant:d="simple",tooltip:u,size:h=a.u8.SM,color:f,className:v}=t,S=(0,e._T)(t,["icon","variant","tooltip","size","color","className"]),C=p(d,f),{tooltipProps:w,getReferenceProps:k}=(0,c.l)();return i.createElement("span",Object.assign({ref:(0,l.lq)([n,w.refs.setReference]),className:(0,r.q)(b("root"),"inline-flex shrink-0 items-center justify-center",C.bgColor,C.textColor,C.borderColor,C.ringColor,g[d].rounded,g[d].border,g[d].shadow,g[d].ring,s[h].paddingX,s[h].paddingY,v)},k,S),i.createElement(c.Z,Object.assign({text:u},w)),i.createElement(o,{className:(0,r.q)(b("icon"),"shrink-0",m[h].height,m[h].width)}))});u.displayName="Icon"},15690:function(t,n,o){o.d(n,{default:function(){return G}});var e=o(2265),i=o(9738),c=o(49638),a=o(36760),r=o.n(a),l=o(1119),d=o(31686),s=o(11993),m=o(6989),g=o(95814),p=["className","prefixCls","style","active","status","iconPrefix","icon","wrapperStyle","stepNumber","disabled","description","title","subTitle","progressDot","stepIcon","tailContent","icons","stepIndex","onStepClick","onClick","render"];function b(t){return"string"==typeof t}var u=function(t){var n,o,i,c,a,u=t.className,h=t.prefixCls,f=t.style,v=t.active,S=t.status,C=t.iconPrefix,w=t.icon,k=(t.wrapperStyle,t.stepNumber),I=t.disabled,x=t.description,y=t.title,q=t.subTitle,z=t.progressDot,E=t.stepIcon,T=t.tailContent,H=t.icons,N=t.stepIndex,O=t.onStepClick,M=t.onClick,j=t.render,W=(0,m.Z)(t,p),X={};O&&!I&&(X.role="button",X.tabIndex=0,X.onClick=function(t){null==M||M(t),O(N)},X.onKeyDown=function(t){var n=t.which;(n===g.Z.ENTER||n===g.Z.SPACE)&&O(N)});var Z=r()("".concat(h,"-item"),"".concat(h,"-item-").concat(S||"wait"),u,(a={},(0,s.Z)(a,"".concat(h,"-item-custom"),w),(0,s.Z)(a,"".concat(h,"-item-active"),v),(0,s.Z)(a,"".concat(h,"-item-disabled"),!0===I),a)),B=(0,d.Z)({},f),D=e.createElement("div",(0,l.Z)({},W,{className:Z,style:B}),e.createElement("div",(0,l.Z)({onClick:M},X,{className:"".concat(h,"-item-container")}),e.createElement("div",{className:"".concat(h,"-item-tail")},T),e.createElement("div",{className:"".concat(h,"-item-icon")},(i=r()("".concat(h,"-icon"),"".concat(C,"icon"),(n={},(0,s.Z)(n,"".concat(C,"icon-").concat(w),w&&b(w)),(0,s.Z)(n,"".concat(C,"icon-check"),!w&&"finish"===S&&(H&&!H.finish||!H)),(0,s.Z)(n,"".concat(C,"icon-cross"),!w&&"error"===S&&(H&&!H.error||!H)),n)),c=e.createElement("span",{className:"".concat(h,"-icon-dot")}),o=z?"function"==typeof z?e.createElement("span",{className:"".concat(h,"-icon")},z(c,{index:k-1,status:S,title:y,description:x})):e.createElement("span",{className:"".concat(h,"-icon")},c):w&&!b(w)?e.createElement("span",{className:"".concat(h,"-icon")},w):H&&H.finish&&"finish"===S?e.createElement("span",{className:"".concat(h,"-icon")},H.finish):H&&H.error&&"error"===S?e.createElement("span",{className:"".concat(h,"-icon")},H.error):w||"finish"===S||"error"===S?e.createElement("span",{className:i}):e.createElement("span",{className:"".concat(h,"-icon")},k),E&&(o=E({index:k-1,status:S,title:y,description:x,node:o})),o)),e.createElement("div",{className:"".concat(h,"-item-content")},e.createElement("div",{className:"".concat(h,"-item-title")},y,q&&e.createElement("div",{title:"string"==typeof q?q:void 0,className:"".concat(h,"-item-subtitle")},q)),x&&e.createElement("div",{className:"".concat(h,"-item-description")},x))));return j&&(D=j(D)||null),D},h=["prefixCls","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","stepIcon","initial","icons","onChange","itemRender","items"];function f(t){var n,o=t.prefixCls,i=void 0===o?"rc-steps":o,c=t.style,a=void 0===c?{}:c,g=t.className,p=(t.children,t.direction),b=t.type,f=void 0===b?"default":b,v=t.labelPlacement,S=t.iconPrefix,C=void 0===S?"rc":S,w=t.status,k=void 0===w?"process":w,I=t.size,x=t.current,y=void 0===x?0:x,q=t.progressDot,z=t.stepIcon,E=t.initial,T=void 0===E?0:E,H=t.icons,N=t.onChange,O=t.itemRender,M=t.items,j=(0,m.Z)(t,h),W="inline"===f,X=W||void 0!==q&&q,Z=W?"horizontal":void 0===p?"horizontal":p,B=W?void 0:I,D=r()(i,"".concat(i,"-").concat(Z),g,(n={},(0,s.Z)(n,"".concat(i,"-").concat(B),B),(0,s.Z)(n,"".concat(i,"-label-").concat(X?"vertical":void 0===v?"horizontal":v),"horizontal"===Z),(0,s.Z)(n,"".concat(i,"-dot"),!!X),(0,s.Z)(n,"".concat(i,"-navigation"),"navigation"===f),(0,s.Z)(n,"".concat(i,"-inline"),W),n)),P=function(t){N&&y!==t&&N(t)};return e.createElement("div",(0,l.Z)({className:D,style:a},j),(void 0===M?[]:M).filter(function(t){return t}).map(function(t,n){var o=(0,d.Z)({},t),c=T+n;return"error"===k&&n===y-1&&(o.className="".concat(i,"-next-error")),o.status||(c===y?o.status=k:c{let{componentCls:n,customIconTop:o,customIconSize:e,customIconFontSize:i}=t;return{["".concat(n,"-item-custom")]:{["> ".concat(n,"-item-container > ").concat(n,"-item-icon")]:{height:"auto",background:"none",border:0,["> ".concat(n,"-icon")]:{top:o,width:e,height:e,fontSize:i,lineHeight:(0,I.bf)(e)}}},["&:not(".concat(n,"-vertical)")]:{["".concat(n,"-item-custom")]:{["".concat(n,"-item-icon")]:{width:"auto",background:"none"}}}}},E=t=>{let{componentCls:n}=t;return{["".concat(n,"-horizontal")]:{["".concat("".concat(n,"-item"),"-tail")]:{transform:"translateY(-50%)"}}}},T=t=>{let{componentCls:n,inlineDotSize:o,inlineTitleColor:e,inlineTailColor:i}=t,c=t.calc(t.paddingXS).add(t.lineWidth).equal(),a={["".concat(n,"-item-container ").concat(n,"-item-content ").concat(n,"-item-title")]:{color:e}};return{["&".concat(n,"-inline")]:{width:"auto",display:"inline-flex",["".concat(n,"-item")]:{flex:"none","&-container":{padding:"".concat((0,I.bf)(c)," ").concat((0,I.bf)(t.paddingXXS)," 0"),margin:"0 ".concat((0,I.bf)(t.calc(t.marginXXS).div(2).equal())),borderRadius:t.borderRadiusSM,cursor:"pointer",transition:"background-color ".concat(t.motionDurationMid),"&:hover":{background:t.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:o,height:o,marginInlineStart:"calc(50% - ".concat((0,I.bf)(t.calc(o).div(2).equal()),")"),["> ".concat(n,"-icon")]:{top:0},["".concat(n,"-icon-dot")]:{borderRadius:t.calc(t.fontSizeSM).div(4).equal(),"&::after":{display:"none"}}},"&-content":{width:"auto",marginTop:t.calc(t.marginXS).sub(t.lineWidth).equal()},"&-title":{color:e,fontSize:t.fontSizeSM,lineHeight:t.lineHeightSM,fontWeight:"normal",marginBottom:t.calc(t.marginXXS).div(2).equal()},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:t.calc(o).div(2).add(c).equal(),transform:"translateY(-50%)","&:after":{width:"100%",height:t.lineWidth,borderRadius:0,marginInlineStart:0,background:i}},["&:first-child ".concat(n,"-item-tail")]:{width:"50%",marginInlineStart:"50%"},["&:last-child ".concat(n,"-item-tail")]:{display:"block",width:"50%"},"&-wait":Object.assign({["".concat(n,"-item-icon ").concat(n,"-icon ").concat(n,"-icon-dot")]:{backgroundColor:t.colorBorderBg,border:"".concat((0,I.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(i)}},a),"&-finish":Object.assign({["".concat(n,"-item-tail::after")]:{backgroundColor:i},["".concat(n,"-item-icon ").concat(n,"-icon ").concat(n,"-icon-dot")]:{backgroundColor:i,border:"".concat((0,I.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(i)}},a),"&-error":a,"&-active, &-process":Object.assign({["".concat(n,"-item-icon")]:{width:o,height:o,marginInlineStart:"calc(50% - ".concat((0,I.bf)(t.calc(o).div(2).equal()),")"),top:0}},a),["&:not(".concat(n,"-item-active) > ").concat(n,"-item-container[role='button']:hover")]:{["".concat(n,"-item-title")]:{color:e}}}}}},H=t=>{let{componentCls:n,iconSize:o,lineHeight:e,iconSizeSM:i}=t;return{["&".concat(n,"-label-vertical")]:{["".concat(n,"-item")]:{overflow:"visible","&-tail":{marginInlineStart:t.calc(o).div(2).add(t.controlHeightLG).equal(),padding:"0 ".concat((0,I.bf)(t.paddingLG))},"&-content":{display:"block",width:t.calc(o).div(2).add(t.controlHeightLG).mul(2).equal(),marginTop:t.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:t.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:t.marginXXS,marginInlineStart:0,lineHeight:e}},["&".concat(n,"-small:not(").concat(n,"-dot)")]:{["".concat(n,"-item")]:{"&-icon":{marginInlineStart:t.calc(o).sub(i).div(2).add(t.controlHeightLG).equal()}}}}}},N=t=>{let{componentCls:n,navContentMaxWidth:o,navArrowColor:e,stepsNavActiveColor:i,motionDurationSlow:c}=t;return{["&".concat(n,"-navigation")]:{paddingTop:t.paddingSM,["&".concat(n,"-small")]:{["".concat(n,"-item")]:{"&-container":{marginInlineStart:t.calc(t.marginSM).mul(-1).equal()}}},["".concat(n,"-item")]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:t.calc(t.margin).mul(-1).equal(),paddingBottom:t.paddingSM,textAlign:"start",transition:"opacity ".concat(c),["".concat(n,"-item-content")]:{maxWidth:o},["".concat(n,"-item-title")]:Object.assign(Object.assign({maxWidth:"100%",paddingInlineEnd:0},x.vS),{"&::after":{display:"none"}})},["&:not(".concat(n,"-item-active)")]:{["".concat(n,"-item-container[role='button']")]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:"calc(50% - ".concat((0,I.bf)(t.calc(t.paddingSM).div(2).equal()),")"),insetInlineStart:"100%",display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,borderTop:"".concat((0,I.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(e),borderBottom:"none",borderInlineStart:"none",borderInlineEnd:"".concat((0,I.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(e),transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:t.lineWidthBold,backgroundColor:i,transition:"width ".concat(c,", inset-inline-start ").concat(c),transitionTimingFunction:"ease-out",content:'""'}},["".concat(n,"-item").concat(n,"-item-active::before")]:{insetInlineStart:0,width:"100%"}},["&".concat(n,"-navigation").concat(n,"-vertical")]:{["> ".concat(n,"-item")]:{marginInlineEnd:0,"&::before":{display:"none"},["&".concat(n,"-item-active::before")]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:t.calc(t.lineWidth).mul(3).equal(),height:"calc(100% - ".concat((0,I.bf)(t.marginLG),")")},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:t.calc(t.controlHeight).mul(.25).equal(),height:t.calc(t.controlHeight).mul(.25).equal(),marginBottom:t.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},"&:last-child":{"&::after":{display:"none"}},["> ".concat(n,"-item-container > ").concat(n,"-item-tail")]:{visibility:"hidden"}}},["&".concat(n,"-navigation").concat(n,"-horizontal")]:{["> ".concat(n,"-item > ").concat(n,"-item-container > ").concat(n,"-item-tail")]:{visibility:"hidden"}}}},O=t=>{let{antCls:n,componentCls:o,iconSize:e,iconSizeSM:i,processIconColor:c,marginXXS:a,lineWidthBold:r,lineWidth:l,paddingXXS:d}=t,s=t.calc(e).add(t.calc(r).mul(4).equal()).equal(),m=t.calc(i).add(t.calc(t.lineWidth).mul(4).equal()).equal();return{["&".concat(o,"-with-progress")]:{["".concat(o,"-item")]:{paddingTop:d,["&-process ".concat(o,"-item-container ").concat(o,"-item-icon ").concat(o,"-icon")]:{color:c}},["&".concat(o,"-vertical > ").concat(o,"-item ")]:{paddingInlineStart:d,["> ".concat(o,"-item-container > ").concat(o,"-item-tail")]:{top:a,insetInlineStart:t.calc(e).div(2).sub(l).add(d).equal()}},["&, &".concat(o,"-small")]:{["&".concat(o,"-horizontal ").concat(o,"-item:first-child")]:{paddingBottom:d,paddingInlineStart:d}},["&".concat(o,"-small").concat(o,"-vertical > ").concat(o,"-item > ").concat(o,"-item-container > ").concat(o,"-item-tail")]:{insetInlineStart:t.calc(i).div(2).sub(l).add(d).equal()},["&".concat(o,"-label-vertical ").concat(o,"-item ").concat(o,"-item-tail")]:{top:t.calc(e).div(2).add(d).equal()},["".concat(o,"-item-icon")]:{position:"relative",["".concat(n,"-progress")]:{position:"absolute",insetInlineStart:"50%",top:"50%",transform:"translate(-50%, -50%)","&-inner":{width:"".concat((0,I.bf)(s)," !important"),height:"".concat((0,I.bf)(s)," !important")}}},["&".concat(o,"-small")]:{["&".concat(o,"-label-vertical ").concat(o,"-item ").concat(o,"-item-tail")]:{top:t.calc(i).div(2).add(d).equal()},["".concat(o,"-item-icon ").concat(n,"-progress-inner")]:{width:"".concat((0,I.bf)(m)," !important"),height:"".concat((0,I.bf)(m)," !important")}}}}},M=t=>{let{componentCls:n,descriptionMaxWidth:o,lineHeight:e,dotCurrentSize:i,dotSize:c,motionDurationSlow:a}=t;return{["&".concat(n,"-dot, &").concat(n,"-dot").concat(n,"-small")]:{["".concat(n,"-item")]:{"&-title":{lineHeight:e},"&-tail":{top:t.calc(t.dotSize).sub(t.calc(t.lineWidth).mul(3).equal()).div(2).equal(),width:"100%",marginTop:0,marginBottom:0,marginInline:"".concat((0,I.bf)(t.calc(o).div(2).equal())," 0"),padding:0,"&::after":{width:"calc(100% - ".concat((0,I.bf)(t.calc(t.marginSM).mul(2).equal()),")"),height:t.calc(t.lineWidth).mul(3).equal(),marginInlineStart:t.marginSM}},"&-icon":{width:c,height:c,marginInlineStart:t.calc(t.descriptionMaxWidth).sub(c).div(2).equal(),paddingInlineEnd:0,lineHeight:(0,I.bf)(c),background:"transparent",border:0,["".concat(n,"-icon-dot")]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:"all ".concat(a),"&::after":{position:"absolute",top:t.calc(t.marginSM).mul(-1).equal(),insetInlineStart:t.calc(c).sub(t.calc(t.controlHeightLG).mul(1.5).equal()).div(2).equal(),width:t.calc(t.controlHeightLG).mul(1.5).equal(),height:t.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:o},["&-process ".concat(n,"-item-icon")]:{position:"relative",top:t.calc(c).sub(i).div(2).equal(),width:i,height:i,lineHeight:(0,I.bf)(i),background:"none",marginInlineStart:t.calc(t.descriptionMaxWidth).sub(i).div(2).equal()},["&-process ".concat(n,"-icon")]:{["&:first-child ".concat(n,"-icon-dot")]:{insetInlineStart:0}}}},["&".concat(n,"-vertical").concat(n,"-dot")]:{["".concat(n,"-item-icon")]:{marginTop:t.calc(t.controlHeight).sub(c).div(2).equal(),marginInlineStart:0,background:"none"},["".concat(n,"-item-process ").concat(n,"-item-icon")]:{marginTop:t.calc(t.controlHeight).sub(i).div(2).equal(),top:0,insetInlineStart:t.calc(c).sub(i).div(2).equal(),marginInlineStart:0},["".concat(n,"-item > ").concat(n,"-item-container > ").concat(n,"-item-tail")]:{top:t.calc(t.controlHeight).sub(c).div(2).equal(),insetInlineStart:0,margin:0,padding:"".concat((0,I.bf)(t.calc(c).add(t.paddingXS).equal())," 0 ").concat((0,I.bf)(t.paddingXS)),"&::after":{marginInlineStart:t.calc(c).sub(t.lineWidth).div(2).equal()}},["&".concat(n,"-small")]:{["".concat(n,"-item-icon")]:{marginTop:t.calc(t.controlHeightSM).sub(c).div(2).equal()},["".concat(n,"-item-process ").concat(n,"-item-icon")]:{marginTop:t.calc(t.controlHeightSM).sub(i).div(2).equal()},["".concat(n,"-item > ").concat(n,"-item-container > ").concat(n,"-item-tail")]:{top:t.calc(t.controlHeightSM).sub(c).div(2).equal()}},["".concat(n,"-item:first-child ").concat(n,"-icon-dot")]:{insetInlineStart:0},["".concat(n,"-item-content")]:{width:"inherit"}}}},j=t=>{let{componentCls:n}=t;return{["&".concat(n,"-rtl")]:{direction:"rtl",["".concat(n,"-item")]:{"&-subtitle":{float:"left"}},["&".concat(n,"-navigation")]:{["".concat(n,"-item::after")]:{transform:"rotate(-45deg)"}},["&".concat(n,"-vertical")]:{["> ".concat(n,"-item")]:{"&::after":{transform:"rotate(225deg)"},["".concat(n,"-item-icon")]:{float:"right"}}},["&".concat(n,"-dot")]:{["".concat(n,"-item-icon ").concat(n,"-icon-dot, &").concat(n,"-small ").concat(n,"-item-icon ").concat(n,"-icon-dot")]:{float:"right"}}}}},W=t=>{let{componentCls:n,iconSizeSM:o,fontSizeSM:e,fontSize:i,colorTextDescription:c}=t;return{["&".concat(n,"-small")]:{["&".concat(n,"-horizontal:not(").concat(n,"-label-vertical) ").concat(n,"-item")]:{paddingInlineStart:t.paddingSM,"&:first-child":{paddingInlineStart:0}},["".concat(n,"-item-icon")]:{width:o,height:o,marginTop:0,marginBottom:0,marginInline:"0 ".concat((0,I.bf)(t.marginXS)),fontSize:e,lineHeight:(0,I.bf)(o),textAlign:"center",borderRadius:o},["".concat(n,"-item-title")]:{paddingInlineEnd:t.paddingSM,fontSize:i,lineHeight:(0,I.bf)(o),"&::after":{top:t.calc(o).div(2).equal()}},["".concat(n,"-item-description")]:{color:c,fontSize:i},["".concat(n,"-item-tail")]:{top:t.calc(o).div(2).sub(t.paddingXXS).equal()},["".concat(n,"-item-custom ").concat(n,"-item-icon")]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,["> ".concat(n,"-icon")]:{fontSize:o,lineHeight:(0,I.bf)(o),transform:"none"}}}}},X=t=>{let{componentCls:n,iconSizeSM:o,iconSize:e}=t;return{["&".concat(n,"-vertical")]:{display:"flex",flexDirection:"column",["> ".concat(n,"-item")]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",["".concat(n,"-item-icon")]:{float:"left",marginInlineEnd:t.margin},["".concat(n,"-item-content")]:{display:"block",minHeight:t.calc(t.controlHeight).mul(1.5).equal(),overflow:"hidden"},["".concat(n,"-item-title")]:{lineHeight:(0,I.bf)(e)},["".concat(n,"-item-description")]:{paddingBottom:t.paddingSM}},["> ".concat(n,"-item > ").concat(n,"-item-container > ").concat(n,"-item-tail")]:{position:"absolute",top:0,insetInlineStart:t.calc(e).div(2).sub(t.lineWidth).equal(),width:t.lineWidth,height:"100%",padding:"".concat((0,I.bf)(t.calc(t.marginXXS).mul(1.5).add(e).equal())," 0 ").concat((0,I.bf)(t.calc(t.marginXXS).mul(1.5).equal())),"&::after":{width:t.lineWidth,height:"100%"}},["> ".concat(n,"-item:not(:last-child) > ").concat(n,"-item-container > ").concat(n,"-item-tail")]:{display:"block"},[" > ".concat(n,"-item > ").concat(n,"-item-container > ").concat(n,"-item-content > ").concat(n,"-item-title")]:{"&::after":{display:"none"}},["&".concat(n,"-small ").concat(n,"-item-container")]:{["".concat(n,"-item-tail")]:{position:"absolute",top:0,insetInlineStart:t.calc(o).div(2).sub(t.lineWidth).equal(),padding:"".concat((0,I.bf)(t.calc(t.marginXXS).mul(1.5).add(o).equal())," 0 ").concat((0,I.bf)(t.calc(t.marginXXS).mul(1.5).equal()))},["".concat(n,"-item-title")]:{lineHeight:(0,I.bf)(o)}}}}};let Z=(t,n)=>{let o="".concat(n.componentCls,"-item"),e="".concat(t,"IconColor"),i="".concat(t,"TitleColor"),c="".concat(t,"DescriptionColor"),a="".concat(t,"TailColor"),r="".concat(t,"IconBgColor"),l="".concat(t,"IconBorderColor"),d="".concat(t,"DotColor");return{["".concat(o,"-").concat(t," ").concat(o,"-icon")]:{backgroundColor:n[r],borderColor:n[l],["> ".concat(n.componentCls,"-icon")]:{color:n[e],["".concat(n.componentCls,"-icon-dot")]:{background:n[d]}}},["".concat(o,"-").concat(t).concat(o,"-custom ").concat(o,"-icon")]:{["> ".concat(n.componentCls,"-icon")]:{color:n[d]}},["".concat(o,"-").concat(t," > ").concat(o,"-container > ").concat(o,"-content > ").concat(o,"-title")]:{color:n[i],"&::after":{backgroundColor:n[a]}},["".concat(o,"-").concat(t," > ").concat(o,"-container > ").concat(o,"-content > ").concat(o,"-description")]:{color:n[c]},["".concat(o,"-").concat(t," > ").concat(o,"-container > ").concat(o,"-tail::after")]:{backgroundColor:n[a]}}},B=t=>{let{componentCls:n,motionDurationSlow:o}=t,e="".concat(n,"-item"),i="".concat(e,"-icon");return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[e]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",["> ".concat(e,"-container > ").concat(e,"-tail, > ").concat(e,"-container > ").concat(e,"-content > ").concat(e,"-title::after")]:{display:"none"}}},["".concat(e,"-container")]:{outline:"none",["&:focus-visible ".concat(i)]:(0,x.oN)(t)},["".concat(i,", ").concat(e,"-content")]:{display:"inline-block",verticalAlign:"top"},[i]:{width:t.iconSize,height:t.iconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:t.marginXS,fontSize:t.iconFontSize,fontFamily:t.fontFamily,lineHeight:(0,I.bf)(t.iconSize),textAlign:"center",borderRadius:t.iconSize,border:"".concat((0,I.bf)(t.lineWidth)," ").concat(t.lineType," transparent"),transition:"background-color ".concat(o,", border-color ").concat(o),["".concat(n,"-icon")]:{position:"relative",top:t.iconTop,color:t.colorPrimary,lineHeight:1}},["".concat(e,"-tail")]:{position:"absolute",top:t.calc(t.iconSize).div(2).equal(),insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:t.lineWidth,background:t.colorSplit,borderRadius:t.lineWidth,transition:"background ".concat(o),content:'""'}},["".concat(e,"-title")]:{position:"relative",display:"inline-block",paddingInlineEnd:t.padding,color:t.colorText,fontSize:t.fontSizeLG,lineHeight:(0,I.bf)(t.titleLineHeight),"&::after":{position:"absolute",top:t.calc(t.titleLineHeight).div(2).equal(),insetInlineStart:"100%",display:"block",width:9999,height:t.lineWidth,background:t.processTailColor,content:'""'}},["".concat(e,"-subtitle")]:{display:"inline",marginInlineStart:t.marginXS,color:t.colorTextDescription,fontWeight:"normal",fontSize:t.fontSize},["".concat(e,"-description")]:{color:t.colorTextDescription,fontSize:t.fontSize}},Z("wait",t)),Z("process",t)),{["".concat(e,"-process > ").concat(e,"-container > ").concat(e,"-title")]:{fontWeight:t.fontWeightStrong}}),Z("finish",t)),Z("error",t)),{["".concat(e).concat(n,"-next-error > ").concat(n,"-item-title::after")]:{background:t.colorError},["".concat(e,"-disabled")]:{cursor:"not-allowed"}})},D=t=>{let{componentCls:n,motionDurationSlow:o}=t;return{["& ".concat(n,"-item")]:{["&:not(".concat(n,"-item-active)")]:{["& > ".concat(n,"-item-container[role='button']")]:{cursor:"pointer",["".concat(n,"-item")]:{["&-title, &-subtitle, &-description, &-icon ".concat(n,"-icon")]:{transition:"color ".concat(o)}},"&:hover":{["".concat(n,"-item")]:{"&-title, &-subtitle, &-description":{color:t.colorPrimary}}}},["&:not(".concat(n,"-item-process)")]:{["& > ".concat(n,"-item-container[role='button']:hover")]:{["".concat(n,"-item")]:{"&-icon":{borderColor:t.colorPrimary,["".concat(n,"-icon")]:{color:t.colorPrimary}}}}}}},["&".concat(n,"-horizontal:not(").concat(n,"-label-vertical)")]:{["".concat(n,"-item")]:{paddingInlineStart:t.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},["&:last-child ".concat(n,"-item-title")]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:t.descriptionMaxWidth,whiteSpace:"normal"}}}}},P=t=>{let{componentCls:n}=t;return{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,x.Wf)(t)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),B(t)),D(t)),z(t)),W(t)),X(t)),E(t)),H(t)),M(t)),N(t)),j(t)),O(t)),T(t))}};var L=(0,y.I$)("Steps",t=>{let{colorTextDisabled:n,controlHeightLG:o,colorTextLightSolid:e,colorText:i,colorPrimary:c,colorTextDescription:a,colorTextQuaternary:r,colorError:l,colorBorderSecondary:d,colorSplit:s}=t;return P((0,q.IX)(t,{processIconColor:e,processTitleColor:i,processDescriptionColor:i,processIconBgColor:c,processIconBorderColor:c,processDotColor:c,processTailColor:s,waitTitleColor:a,waitDescriptionColor:a,waitTailColor:s,waitDotColor:n,finishIconColor:c,finishTitleColor:i,finishDescriptionColor:a,finishTailColor:c,finishDotColor:c,errorIconColor:e,errorTitleColor:l,errorDescriptionColor:l,errorTailColor:s,errorIconBgColor:l,errorIconBorderColor:l,errorDotColor:l,stepsNavActiveColor:c,stepsProgressSize:o,inlineDotSize:6,inlineTitleColor:r,inlineTailColor:d}))},t=>({titleLineHeight:t.controlHeight,customIconSize:t.controlHeight,customIconTop:0,customIconFontSize:t.controlHeightSM,iconSize:t.controlHeight,iconTop:-.5,iconFontSize:t.fontSize,iconSizeSM:t.fontSizeHeading3,dotSize:t.controlHeight/4,dotCurrentSize:t.controlHeightLG/4,navArrowColor:t.colorTextDisabled,navContentMaxWidth:"unset",descriptionMaxWidth:140,waitIconColor:t.wireframe?t.colorTextDisabled:t.colorTextLabel,waitIconBgColor:t.wireframe?t.colorBgContainer:t.colorFillContent,waitIconBorderColor:t.wireframe?t.colorTextDisabled:"transparent",finishIconBgColor:t.wireframe?t.colorBgContainer:t.controlItemBgActive,finishIconBorderColor:t.wireframe?t.colorPrimary:t.controlItemBgActive})),R=o(45287),A=function(t,n){var o={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&0>n.indexOf(e)&&(o[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,e=Object.getOwnPropertySymbols(t);in.indexOf(e[i])&&Object.prototype.propertyIsEnumerable.call(t,e[i])&&(o[e[i]]=t[e[i]]);return o};let K=t=>{let{percent:n,size:o,className:a,rootClassName:l,direction:d,items:s,responsive:m=!0,current:g=0,children:p,style:b}=t,u=A(t,["percent","size","className","rootClassName","direction","items","responsive","current","children","style"]),{xs:h}=(0,C.Z)(m),{getPrefixCls:I,direction:x,className:y,style:q}=(0,v.dj)("steps"),z=e.useMemo(()=>m&&h?"vertical":d,[m,h,d]),E=(0,S.Z)(o),T=I("steps",t.prefixCls),[H,N,O]=L(T),M="inline"===t.type,j=I("",t.iconPrefix),W=s||(0,R.Z)(p).map(t=>{if(e.isValidElement(t)){let{props:n}=t;return Object.assign({},n)}return null}).filter(t=>t),X=M?void 0:n,Z=Object.assign(Object.assign({},q),b),B=r()(y,{["".concat(T,"-rtl")]:"rtl"===x,["".concat(T,"-with-progress")]:void 0!==X},a,l,N,O),D={finish:e.createElement(i.Z,{className:"".concat(T,"-finish-icon")}),error:e.createElement(c.Z,{className:"".concat(T,"-error-icon")})};return H(e.createElement(f,Object.assign({icons:D},u,{style:Z,current:g,size:E,items:W,itemRender:M?(t,n)=>t.description?e.createElement(k.Z,{title:t.description},n):n:void 0,stepIcon:t=>{let{node:n,status:o}=t;return"process"===o&&void 0!==X?e.createElement("div",{className:"".concat(T,"-progress-icon")},e.createElement(w.Z,{type:"circle",percent:X,size:"small"===E?32:40,strokeWidth:4,format:()=>null}),n):n},direction:z,prefixCls:T,iconPrefix:j,className:B})))};K.Step=f.Step;var G=K},49084:function(t,n,o){var e=o(2265);let i=e.forwardRef(function(t,n){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:n},t),e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});n.Z=i}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4750-3aeac3fa94708e1c.js b/litellm/proxy/_experimental/out/_next/static/chunks/4750-3aeac3fa94708e1c.js
deleted file mode 100644
index 1ecf2a0a723..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/4750-3aeac3fa94708e1c.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4750],{88009:function(t,e,n){n.d(e,{Z:function(){return o}});var a=n(1119),r=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"},s=n(55015),o=r.forwardRef(function(t,e){return r.createElement(s.Z,(0,a.Z)({},t,{ref:e,icon:i}))})},93750:function(t,e,n){n.d(e,{Z:function(){return o}});var a=n(1119),r=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"},s=n(55015),o=r.forwardRef(function(t,e){return r.createElement(s.Z,(0,a.Z)({},t,{ref:e,icon:i}))})},37527:function(t,e,n){n.d(e,{Z:function(){return o}});var a=n(1119),r=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z"}}]},name:"bank",theme:"outlined"},s=n(55015),o=r.forwardRef(function(t,e){return r.createElement(s.Z,(0,a.Z)({},t,{ref:e,icon:i}))})},9775:function(t,e,n){n.d(e,{Z:function(){return o}});var a=n(1119),r=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},s=n(55015),o=r.forwardRef(function(t,e){return r.createElement(s.Z,(0,a.Z)({},t,{ref:e,icon:i}))})},11429:function(t,e,n){n.d(e,{Z:function(){return o}});var a=n(1119),r=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"bg-colors",theme:"outlined"},s=n(55015),o=r.forwardRef(function(t,e){return r.createElement(s.Z,(0,a.Z)({},t,{ref:e,icon:i}))})},68208:function(t,e,n){n.d(e,{Z:function(){return o}});var a=n(1119),r=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"},s=n(55015),o=r.forwardRef(function(t,e){return r.createElement(s.Z,(0,a.Z)({},t,{ref:e,icon:i}))})},71916:function(t,e,n){n.d(e,{Z:function(){return o}});var a=n(1119),r=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"},s=n(55015),o=r.forwardRef(function(t,e){return r.createElement(s.Z,(0,a.Z)({},t,{ref:e,icon:i}))})},99458:function(t,e,n){n.d(e,{Z:function(){return o}});var a=n(1119),r=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"},s=n(55015),o=r.forwardRef(function(t,e){return r.createElement(s.Z,(0,a.Z)({},t,{ref:e,icon:i}))})},41169:function(t,e,n){n.d(e,{Z:function(){return o}});var a=n(1119),r=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z"}}]},name:"experiment",theme:"outlined"},s=n(55015),o=r.forwardRef(function(t,e){return r.createElement(s.Z,(0,a.Z)({},t,{ref:e,icon:i}))})},48231:function(t,e,n){n.d(e,{Z:function(){return o}});var a=n(1119),r=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z"}}]},name:"line-chart",theme:"outlined"},s=n(55015),o=r.forwardRef(function(t,e){return r.createElement(s.Z,(0,a.Z)({},t,{ref:e,icon:i}))})},28595:function(t,e,n){n.d(e,{Z:function(){return o}});var a=n(1119),r=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"},s=n(55015),o=r.forwardRef(function(t,e){return r.createElement(s.Z,(0,a.Z)({},t,{ref:e,icon:i}))})},41361:function(t,e,n){n.d(e,{Z:function(){return o}});var a=n(1119),r=n(2265),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"},s=n(55015),o=r.forwardRef(function(t,e){return r.createElement(s.Z,(0,a.Z)({},t,{ref:e,icon:i}))})},94789:function(t,e,n){n.d(e,{Z:function(){return u}});var a=n(5853),r=n(2265),i=n(26898),s=n(13241),o=n(1153);let c=(0,o.fn)("Callout"),u=r.forwardRef((t,e)=>{let{title:n,icon:u,color:h,className:l,children:d}=t,f=(0,a._T)(t,["title","icon","color","className","children"]);return r.createElement("div",Object.assign({ref:e,className:(0,s.q)(c("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",h?(0,s.q)((0,o.bM)(h,i.K.background).bgColor,(0,o.bM)(h,i.K.darkBorder).borderColor,(0,o.bM)(h,i.K.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,s.q)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),l)},f),r.createElement("div",{className:(0,s.q)(c("header"),"flex items-start")},u?r.createElement(u,{className:(0,s.q)(c("icon"),"flex-none h-5 w-5 mr-1.5")}):null,r.createElement("h4",{className:(0,s.q)(c("title"),"font-semibold")},n)),r.createElement("p",{className:(0,s.q)(c("body"),"overflow-y-auto",d?"mt-2":"")},d))});u.displayName="Callout"},13817:function(t,e,n){n.d(e,{default:function(){return x}});var a=n(83145),r=n(2265),i=n(36760),s=n.n(i),o=n(18694),c=n(71744),u=n(80856),h=n(45287),l=n(32186),d=n(25437),f=function(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&0>e.indexOf(a)&&(n[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,a=Object.getOwnPropertySymbols(t);re.indexOf(a[r])&&Object.prototype.propertyIsEnumerable.call(t,a[r])&&(n[a[r]]=t[a[r]]);return n};function m(t){let{suffixCls:e,tagName:n,displayName:a}=t;return t=>r.forwardRef((a,i)=>r.createElement(t,Object.assign({ref:i,suffixCls:e,tagName:n},a)))}let v=r.forwardRef((t,e)=>{let{prefixCls:n,suffixCls:a,className:i,tagName:o}=t,u=f(t,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:h}=r.useContext(c.E_),l=h("layout",n),[m,v,p]=(0,d.ZP)(l),y=a?"".concat(l,"-").concat(a):l;return m(r.createElement(o,Object.assign({className:s()(n||y,i,v,p),ref:e},u)))}),p=r.forwardRef((t,e)=>{let{direction:n}=r.useContext(c.E_),[i,m]=r.useState([]),{prefixCls:v,className:p,rootClassName:y,children:b,hasSider:g,tagName:Z,style:x}=t,M=f(t,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),w=(0,o.Z)(M,["suffixCls"]),{getPrefixCls:z,className:C,style:k}=(0,c.dj)("layout"),V=z("layout",v),H="boolean"==typeof g?g:!!i.length||(0,h.Z)(b).some(t=>t.type===l.Z),[R,E,O]=(0,d.ZP)(V),N=s()(V,{["".concat(V,"-has-sider")]:H,["".concat(V,"-rtl")]:"rtl"===n},C,p,y,E,O),S=r.useMemo(()=>({siderHook:{addSider:t=>{m(e=>[].concat((0,a.Z)(e),[t]))},removeSider:t=>{m(e=>e.filter(e=>e!==t))}}}),[]);return R(r.createElement(u.V.Provider,{value:S},r.createElement(Z,Object.assign({ref:e,className:N,style:Object.assign(Object.assign({},k),x)},w),b)))}),y=m({tagName:"div",displayName:"Layout"})(p),b=m({suffixCls:"header",tagName:"header",displayName:"Header"})(v),g=m({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(v),Z=m({suffixCls:"content",tagName:"main",displayName:"Content"})(v);y.Header=b,y.Footer=g,y.Content=Z,y.Sider=l.Z,y._InternalSiderContext=l.D;var x=y},40875:function(t,e,n){n.d(e,{Z:function(){return a}});let a=(0,n(79205).Z)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},22135:function(t,e,n){n.d(e,{Z:function(){return a}});let a=(0,n(79205).Z)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},51817:function(t,e,n){n.d(e,{Z:function(){return a}});let a=(0,n(79205).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},21047:function(t,e,n){n.d(e,{Z:function(){return a}});let a=(0,n(79205).Z)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},88906:function(t,e,n){n.d(e,{Z:function(){return a}});let a=(0,n(79205).Z)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]])},15868:function(t,e,n){n.d(e,{Z:function(){return a}});let a=(0,n(79205).Z)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])},18930:function(t,e,n){n.d(e,{Z:function(){return a}});let a=(0,n(79205).Z)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},70525:function(t,e,n){n.d(e,{Z:function(){return a}});let a=(0,n(79205).Z)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]])},76865:function(t,e,n){n.d(e,{Z:function(){return a}});let a=(0,n(79205).Z)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},49663:function(t,e,n){n.d(e,{Z:function(){return a}});let a=(0,n(79205).Z)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},95805:function(t,e,n){n.d(e,{Z:function(){return a}});let a=(0,n(79205).Z)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},2894:function(t,e,n){n.d(e,{R:function(){return o},m:function(){return s}});var a=n(18238),r=n(7989),i=n(11255),s=class extends r.F{#t;#e;#n;#a;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#e=[],this.state=t.state||o(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#r({type:"continue"})},n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=(0,i.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#r({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let a="pending"===this.state.status,r=!this.#a.canStart();try{if(a)e();else{this.#r({type:"pending",variables:t,isPaused:r}),await this.#n.config.onMutate?.(t,this,n);let e=await this.options.onMutate?.(t,n);e!==this.state.context&&this.#r({type:"pending",context:e,variables:t,isPaused:r})}let i=await this.#a.start();return await this.#n.config.onSuccess?.(i,t,this.state.context,this,n),await this.options.onSuccess?.(i,t,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,t,this.state.context,n),this.#r({type:"success",data:i}),i}catch(e){try{throw await this.#n.config.onError?.(e,t,this.state.context,this,n),await this.options.onError?.(e,t,this.state.context,n),await this.#n.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,e,t,this.state.context,n),e}finally{this.#r({type:"error",error:e})}}finally{this.#n.runNext(this)}}#r(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),a.Vr.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},21770:function(t,e,n){n.d(e,{D:function(){return h}});var a=n(2265),r=n(2894),i=n(18238),s=n(24112),o=n(45345),c=class extends s.l{#t;#i=void 0;#s;#o;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#c()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,o.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,o.Ym)(e.mutationKey)!==(0,o.Ym)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#c(),this.#u(t)}getCurrentResult(){return this.#i}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#c(),this.#u()}mutate(t,e){return this.#o=e,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(t)}#c(){let t=this.#s?.state??(0,r.R)();this.#i={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#u(t){i.Vr.batch(()=>{if(this.#o&&this.hasListeners()){let e=this.#i.variables,n=this.#i.context,a={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#o.onSuccess?.(t.data,e,n,a),this.#o.onSettled?.(t.data,null,e,n,a)):t?.type==="error"&&(this.#o.onError?.(t.error,e,n,a),this.#o.onSettled?.(void 0,t.error,e,n,a))}this.listeners.forEach(t=>{t(this.#i)})})}},u=n(29827);function h(t,e){let n=(0,u.NL)(e),[r]=a.useState(()=>new c(n,t));a.useEffect(()=>{r.setOptions(t)},[r,t]);let s=a.useSyncExternalStore(a.useCallback(t=>r.subscribe(i.Vr.batchCalls(t)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),h=a.useCallback((t,e)=>{r.mutate(t,e).catch(o.ZT)},[r]);if(s.error&&(0,o.L3)(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:h,mutateAsync:s.mutate}}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4891-a6a8811399a4a3df.js b/litellm/proxy/_experimental/out/_next/static/chunks/4891-a6a8811399a4a3df.js
deleted file mode 100644
index e328a821a88..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/4891-a6a8811399a4a3df.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4891],{47323:function(e,t,r){r.d(t,{Z:function(){return g}});var n=r(5853),o=r(2265),a=r(47187),l=r(7084),i=r(13241),d=r(1153),s=r(26898);let u={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},c={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},f=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,d.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,d.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.q)((0,d.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,d.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.q)((0,d.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,d.bM)(t,s.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,i.q)((0,d.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,d.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.q)((0,d.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,d.bM)(t,s.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,i.q)((0,d.bM)(t,s.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},p=(0,d.fn)("Icon"),g=o.forwardRef((e,t)=>{let{icon:r,variant:s="simple",tooltip:g,size:b=l.u8.SM,color:v,className:h}=e,k=(0,n._T)(e,["icon","variant","tooltip","size","color","className"]),w=f(s,v),{tooltipProps:x,getReferenceProps:E}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,d.lq)([t,x.refs.setReference]),className:(0,i.q)(p("root"),"inline-flex shrink-0 items-center justify-center",w.bgColor,w.textColor,w.borderColor,w.ringColor,m[s].rounded,m[s].border,m[s].shadow,m[s].ring,u[b].paddingX,u[b].paddingY,h)},E,k),o.createElement(a.Z,Object.assign({text:g},x)),o.createElement(r,{className:(0,i.q)(p("icon"),"shrink-0",c[b].height,c[b].width)}))});g.displayName="Icon"},87452:function(e,t,r){r.d(t,{Z:function(){return c},r:function(){return u}});var n=r(5853),o=r(91054);r(42698),r(64016);var a=r(8710);r(33232);var l=r(13241),i=r(1153),d=r(2265);let s=(0,i.fn)("Accordion"),u=(0,d.createContext)({isOpen:!1}),c=d.forwardRef((e,t)=>{var r;let{defaultOpen:i=!1,children:c,className:m}=e,f=(0,n._T)(e,["defaultOpen","children","className"]),p=null!==(r=(0,d.useContext)(a.Z))&&void 0!==r?r:(0,l.q)("rounded-tremor-default border");return d.createElement(o.pJ,Object.assign({as:"div",ref:t,className:(0,l.q)(s("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",p,m),defaultOpen:i},f),e=>{let{open:t}=e;return d.createElement(u.Provider,{value:{isOpen:t}},c)})});c.displayName="Accordion"},88829:function(e,t,r){r.d(t,{Z:function(){return d}});var n=r(5853),o=r(2265),a=r(91054),l=r(13241);let i=(0,r(1153).fn)("AccordionBody"),d=o.forwardRef((e,t)=>{let{children:r,className:d}=e,s=(0,n._T)(e,["children","className"]);return o.createElement(a.pJ.Panel,Object.assign({ref:t,className:(0,l.q)(i("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",d)},s),r)});d.displayName="AccordionBody"},72208:function(e,t,r){r.d(t,{Z:function(){return u}});var n=r(5853),o=r(2265),a=r(91054);let l=e=>{var t=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z"}))};var i=r(87452),d=r(13241);let s=(0,r(1153).fn)("AccordionHeader"),u=o.forwardRef((e,t)=>{let{children:r,className:u}=e,c=(0,n._T)(e,["children","className"]),{isOpen:m}=(0,o.useContext)(i.r);return o.createElement(a.pJ.Button,Object.assign({ref:t,className:(0,d.q)(s("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",u)},c),o.createElement("div",{className:(0,d.q)(s("children"),"flex flex-1 text-inherit mr-4")},r),o.createElement("div",null,o.createElement(l,{className:(0,d.q)(s("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",m?"transition-all":"transition-all -rotate-180")})))});u.displayName="AccordionHeader"},21626:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(5853),o=r(2265),a=r(13241);let l=(0,r(1153).fn)("Table"),i=o.forwardRef((e,t)=>{let{children:r,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement("div",{className:(0,a.q)(l("root"),"overflow-auto",i)},o.createElement("table",Object.assign({ref:t,className:(0,a.q)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},d),r))});i.displayName="Table"},97214:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(5853),o=r(2265),a=r(13241);let l=(0,r(1153).fn)("TableBody"),i=o.forwardRef((e,t)=>{let{children:r,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tbody",Object.assign({ref:t,className:(0,a.q)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},d),r))});i.displayName="TableBody"},28241:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(5853),o=r(2265),a=r(13241);let l=(0,r(1153).fn)("TableCell"),i=o.forwardRef((e,t)=>{let{children:r,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("td",Object.assign({ref:t,className:(0,a.q)(l("root"),"align-middle whitespace-nowrap text-left p-4",i)},d),r))});i.displayName="TableCell"},58834:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(5853),o=r(2265),a=r(13241);let l=(0,r(1153).fn)("TableHead"),i=o.forwardRef((e,t)=>{let{children:r,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("thead",Object.assign({ref:t,className:(0,a.q)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},d),r))});i.displayName="TableHead"},69552:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(5853),o=r(2265),a=r(13241);let l=(0,r(1153).fn)("TableHeaderCell"),i=o.forwardRef((e,t)=>{let{children:r,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("th",Object.assign({ref:t,className:(0,a.q)(l("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},d),r))});i.displayName="TableHeaderCell"},71876:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(5853),o=r(2265),a=r(13241);let l=(0,r(1153).fn)("TableRow"),i=o.forwardRef((e,t)=>{let{children:r,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tr",Object.assign({ref:t,className:(0,a.q)(l("row"),i)},d),r))});i.displayName="TableRow"},84264:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(26898),o=r(13241),a=r(1153),l=r(2265);let i=l.forwardRef((e,t)=>{let{color:r,className:i,children:d}=e;return l.createElement("p",{ref:t,className:(0,o.q)("text-tremor-default",r?(0,a.bM)(r,n.K.text).textColor:(0,o.q)("text-tremor-content","dark:text-dark-tremor-content"),i)},d)});i.displayName="Text"},86462:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});t.Z=o},44633:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});t.Z=o},3477:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});t.Z=o},53410:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});t.Z=o},91126:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=o},23628:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});t.Z=o},74998:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});t.Z=o},91054:function(e,t,r){let n,o;r.d(t,{pJ:function(){return j}});var a,l=r(71049),i=r(11323),d=r(2265),s=r(66797),u=r(93980),c=r(65573),m=r(67561),f=r(98218),p=r(33443),g=r(28294),b=r(31370),v=r(72468),h=r(5664),k=r(38929);let w=null!=(a=d.startTransition)?a:function(e){e()};var x=r(52724),E=((n=E||{})[n.Open=0]="Open",n[n.Closed=1]="Closed",n),C=((o=C||{})[o.ToggleDisclosure=0]="ToggleDisclosure",o[o.CloseDisclosure=1]="CloseDisclosure",o[o.SetButtonId=2]="SetButtonId",o[o.SetPanelId=3]="SetPanelId",o[o.SetButtonElement=4]="SetButtonElement",o[o.SetPanelElement=5]="SetPanelElement",o);let y={0:e=>({...e,disclosureState:(0,v.E)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId},4:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},5:(e,t)=>e.panelElement===t.element?e:{...e,panelElement:t.element}},N=(0,d.createContext)(null);function T(e){let t=(0,d.useContext)(N);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,T),t}return t}N.displayName="DisclosureContext";let S=(0,d.createContext)(null);S.displayName="DisclosureAPIContext";let M=(0,d.createContext)(null);function O(e,t){return(0,v.E)(t.type,y,e,t)}M.displayName="DisclosurePanelContext";let L=d.Fragment,P=k.VN.RenderStrategy|k.VN.Static,j=Object.assign((0,k.yV)(function(e,t){let{defaultOpen:r=!1,...n}=e,o=(0,d.useRef)(null),a=(0,m.T)(t,(0,m.h)(e=>{o.current=e},void 0===e.as||e.as===d.Fragment)),l=(0,d.useReducer)(O,{disclosureState:r?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:i,buttonId:s},c]=l,f=(0,u.z)(e=>{c({type:1});let t=(0,h.r)(o);if(!t||!s)return;let r=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(s):t.getElementById(s);null==r||r.focus()}),b=(0,d.useMemo)(()=>({close:f}),[f]),w=(0,d.useMemo)(()=>({open:0===i,close:f}),[i,f]),x=(0,k.L6)();return d.createElement(N.Provider,{value:l},d.createElement(S.Provider,{value:b},d.createElement(p.Z,{value:f},d.createElement(g.up,{value:(0,v.E)(i,{0:g.ZM.Open,1:g.ZM.Closed})},x({ourProps:{ref:a},theirProps:n,slot:w,defaultTag:L,name:"Disclosure"})))))}),{Button:(0,k.yV)(function(e,t){let r=(0,d.useId)(),{id:n="headlessui-disclosure-button-".concat(r),disabled:o=!1,autoFocus:a=!1,...f}=e,[p,g]=T("Disclosure.Button"),v=(0,d.useContext)(M),h=null!==v&&v===p.panelId,w=(0,d.useRef)(null),E=(0,m.T)(w,t,(0,u.z)(e=>{if(!h)return g({type:4,element:e})}));(0,d.useEffect)(()=>{if(!h)return g({type:2,buttonId:n}),()=>{g({type:2,buttonId:null})}},[n,g,h]);let C=(0,u.z)(e=>{var t;if(h){if(1===p.disclosureState)return;switch(e.key){case x.R.Space:case x.R.Enter:e.preventDefault(),e.stopPropagation(),g({type:0}),null==(t=p.buttonElement)||t.focus()}}else switch(e.key){case x.R.Space:case x.R.Enter:e.preventDefault(),e.stopPropagation(),g({type:0})}}),y=(0,u.z)(e=>{e.key===x.R.Space&&e.preventDefault()}),N=(0,u.z)(e=>{var t;(0,b.P)(e.currentTarget)||o||(h?(g({type:0}),null==(t=p.buttonElement)||t.focus()):g({type:0}))}),{isFocusVisible:S,focusProps:O}=(0,l.F)({autoFocus:a}),{isHovered:L,hoverProps:P}=(0,i.X)({isDisabled:o}),{pressed:j,pressProps:R}=(0,s.x)({disabled:o}),I=(0,d.useMemo)(()=>({open:0===p.disclosureState,hover:L,active:j,disabled:o,focus:S,autofocus:a}),[p,L,j,S,o,a]),F=(0,c.f)(e,p.buttonElement),Z=h?(0,k.dG)({ref:E,type:F,disabled:o||void 0,autoFocus:a,onKeyDown:C,onClick:N},O,P,R):(0,k.dG)({ref:E,id:n,type:F,"aria-expanded":0===p.disclosureState,"aria-controls":p.panelElement?p.panelId:void 0,disabled:o||void 0,autoFocus:a,onKeyDown:C,onKeyUp:y,onClick:N},O,P,R);return(0,k.L6)()({ourProps:Z,theirProps:f,slot:I,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,k.yV)(function(e,t){let r=(0,d.useId)(),{id:n="headlessui-disclosure-panel-".concat(r),transition:o=!1,...a}=e,[l,i]=T("Disclosure.Panel"),{close:s}=function e(t){let r=(0,d.useContext)(S);if(null===r){let r=Error("<".concat(t," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(r,e),r}return r}("Disclosure.Panel"),[c,p]=(0,d.useState)(null),b=(0,m.T)(t,(0,u.z)(e=>{w(()=>i({type:5,element:e}))}),p);(0,d.useEffect)(()=>(i({type:3,panelId:n}),()=>{i({type:3,panelId:null})}),[n,i]);let v=(0,g.oJ)(),[h,x]=(0,f.Y)(o,c,null!==v?(v&g.ZM.Open)===g.ZM.Open:0===l.disclosureState),E=(0,d.useMemo)(()=>({open:0===l.disclosureState,close:s}),[l.disclosureState,s]),C={ref:b,id:n,...(0,f.X)(x)},y=(0,k.L6)();return d.createElement(g.uu,null,d.createElement(M.Provider,{value:l.panelId},y({ourProps:C,theirProps:a,slot:E,defaultTag:"div",features:P,visible:h,name:"Disclosure.Panel"})))})})},98218:function(e,t,r){let n;r.d(t,{X:function(){return m},Y:function(){return f}});var o,a,l=r(2265),i=r(36933),d=r(59456),s=r(73389),u=r(40257);void 0!==u&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&(null==(o=null==u?void 0:u.env)?void 0:o.NODE_ENV)==="test"&&void 0===(null==(a=null==Element?void 0:Element.prototype)?void 0:a.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn("Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.\nPlease install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.\n\nExample usage:\n```js\nimport { mockAnimationsApi } from 'jsdom-testing-mocks'\nmockAnimationsApi()\n```"),[]});var c=((n=c||{})[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n);function m(e){let t={};for(let r in e)!0===e[r]&&(t["data-".concat(r)]="");return t}function f(e,t,r,n){let[o,a]=(0,l.useState)(r),{hasFlag:u,addFlag:c,removeFlag:m}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,r]=(0,l.useState)(e),n=(0,l.useCallback)(e=>r(e),[t]),o=(0,l.useCallback)(e=>r(t=>t|e),[t]),a=(0,l.useCallback)(e=>(t&e)===e,[t]);return{flags:t,setFlag:n,addFlag:o,hasFlag:a,removeFlag:(0,l.useCallback)(e=>r(t=>t&~e),[r]),toggleFlag:(0,l.useCallback)(e=>r(t=>t^e),[r])}}(e&&o?3:0),f=(0,l.useRef)(!1),p=(0,l.useRef)(!1),g=(0,d.G)();return(0,s.e)(()=>{var o;if(e){if(r&&a(!0),!t){r&&c(3);return}return null==(o=null==n?void 0:n.start)||o.call(n,r),function(e,t){let{prepare:r,run:n,done:o,inFlight:a}=t,l=(0,i.k)();return function(e,t){let{inFlight:r,prepare:n}=t;if(null!=r&&r.current){n();return}let o=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=o}(e,{prepare:r,inFlight:a}),l.nextFrame(()=>{n(),l.requestAnimationFrame(()=>{l.add(function(e,t){var r,n;let o=(0,i.k)();if(!e)return o.dispose;let a=!1;o.add(()=>{a=!0});let l=null!=(n=null==(r=e.getAnimations)?void 0:r.call(e).filter(e=>e instanceof CSSTransition))?n:[];return 0===l.length?t():Promise.allSettled(l.map(e=>e.finished)).then(()=>{a||t()}),o.dispose}(e,o))})}),l.dispose}(t,{inFlight:f,prepare(){p.current?p.current=!1:p.current=f.current,f.current=!0,p.current||(r?(c(3),m(4)):(c(4),m(2)))},run(){p.current?r?(m(3),c(4)):(m(4),c(3)):r?m(1):c(1)},done(){var e;p.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(f.current=!1,m(7),r||a(!1),null==(e=null==n?void 0:n.end)||e.call(n,r))}})}},[e,r,t,g]),e?[o,{closed:u(1),enter:u(2),leave:u(4),transition:u(2)||u(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}},33443:function(e,t,r){r.d(t,{Z:function(){return a}});var n=r(2265);let o=(0,n.createContext)(()=>{});function a(e){let{value:t,children:r}=e;return n.createElement(o.Provider,{value:t},r)}},28294:function(e,t,r){let n;r.d(t,{ZM:function(){return l},oJ:function(){return i},up:function(){return d},uu:function(){return s}});var o=r(2265);let a=(0,o.createContext)(null);a.displayName="OpenClosedContext";var l=((n=l||{})[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n);function i(){return(0,o.useContext)(a)}function d(e){let{value:t,children:r}=e;return o.createElement(a.Provider,{value:t},r)}function s(e){let{children:t}=e;return o.createElement(a.Provider,{value:null},t)}},31370:function(e,t,r){function n(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(null==t?void 0:t.getAttribute("disabled"))==="";return!(n&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(r))&&n}r.d(t,{P:function(){return n}})}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4934-d937980b64b5dd57.js b/litellm/proxy/_experimental/out/_next/static/chunks/4934-d937980b64b5dd57.js
new file mode 100644
index 00000000000..c74a97b48f1
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/4934-d937980b64b5dd57.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4934],{5540:function(e,t,o){o.d(t,{Z:function(){return l}});var n=o(1119),r=o(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},c=o(55015),l=r.forwardRef(function(e,t){return r.createElement(c.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},69993:function(e,t,o){o.d(t,{Z:function(){return l}});var n=o(1119),r=o(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},c=o(55015),l=r.forwardRef(function(e,t){return r.createElement(c.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},55322:function(e,t,o){o.d(t,{Z:function(){return l}});var n=o(1119),r=o(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},c=o(55015),l=r.forwardRef(function(e,t){return r.createElement(c.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},58630:function(e,t,o){o.d(t,{Z:function(){return l}});var n=o(1119),r=o(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"},c=o(55015),l=r.forwardRef(function(e,t){return r.createElement(c.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},59341:function(e,t,o){o.d(t,{Z:function(){return Z}});var n=o(5853),r=o(71049),a=o(11323),c=o(2265),l=o(66797),i=o(40099),s=o(74275),u=o(59456),d=o(93980),m=o(65573),g=o(67561),f=o(87550),b=o(628),p=o(80281),h=o(31370),v=o(20131),k=o(38929),w=o(52307),y=o(52724),C=o(7935);let O=(0,c.createContext)(null);O.displayName="GroupContext";let x=c.Fragment,j=Object.assign((0,k.yV)(function(e,t){var o;let n=(0,c.useId)(),x=(0,p.Q)(),j=(0,f.B)(),{id:S=x||"headlessui-switch-".concat(n),disabled:E=j||!1,checked:N,defaultChecked:M,onChange:z,name:B,value:Z,form:L,autoFocus:T=!1,...R}=e,P=(0,c.useContext)(O),[I,D]=(0,c.useState)(null),H=(0,c.useRef)(null),F=(0,g.T)(H,t,null===P?null:P.setSwitch,D),W=(0,s.L)(M),[q,A]=(0,i.q)(N,z,null!=W&&W),_=(0,u.G)(),[X,V]=(0,c.useState)(!1),Q=(0,d.z)(()=>{V(!0),null==A||A(!q),_.nextFrame(()=>{V(!1)})}),G=(0,d.z)(e=>{if((0,h.P)(e.currentTarget))return e.preventDefault();e.preventDefault(),Q()}),K=(0,d.z)(e=>{e.key===y.R.Space?(e.preventDefault(),Q()):e.key===y.R.Enter&&(0,v.g)(e.currentTarget)}),Y=(0,d.z)(e=>e.preventDefault()),$=(0,C.wp)(),U=(0,w.zH)(),{isFocusVisible:J,focusProps:ee}=(0,r.F)({autoFocus:T}),{isHovered:et,hoverProps:eo}=(0,a.X)({isDisabled:E}),{pressed:en,pressProps:er}=(0,l.x)({disabled:E}),ea=(0,c.useMemo)(()=>({checked:q,disabled:E,hover:et,focus:J,active:en,autofocus:T,changing:X}),[q,et,J,en,E,X,T]),ec=(0,k.dG)({id:S,ref:F,role:"switch",type:(0,m.f)(e,I),tabIndex:-1===e.tabIndex?0:null!=(o=e.tabIndex)?o:0,"aria-checked":q,"aria-labelledby":$,"aria-describedby":U,disabled:E||void 0,autoFocus:T,onClick:G,onKeyUp:K,onKeyPress:Y},ee,eo,er),el=(0,c.useCallback)(()=>{if(void 0!==W)return null==A?void 0:A(W)},[A,W]),ei=(0,k.L6)();return c.createElement(c.Fragment,null,null!=B&&c.createElement(b.Mt,{disabled:E,data:{[B]:Z||"on"},overrides:{type:"checkbox",checked:q},form:L,onReset:el}),ei({ourProps:ec,theirProps:R,slot:ea,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[o,n]=(0,c.useState)(null),[r,a]=(0,C.bE)(),[l,i]=(0,w.fw)(),s=(0,c.useMemo)(()=>({switch:o,setSwitch:n}),[o,n]),u=(0,k.L6)();return c.createElement(i,{name:"Switch.Description",value:l},c.createElement(a,{name:"Switch.Label",value:r,props:{htmlFor:null==(t=s.switch)?void 0:t.id,onClick(e){o&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),o.click(),o.focus({preventScroll:!0}))}}},c.createElement(O.Provider,{value:s},u({ourProps:{},theirProps:e,slot:{},defaultTag:x,name:"Switch.Group"}))))},Label:C.__,Description:w.dk});var S=o(44140),E=o(26898),N=o(13241),M=o(1153),z=o(47187);let B=(0,M.fn)("Switch"),Z=c.forwardRef((e,t)=>{let{checked:o,defaultChecked:r=!1,onChange:a,color:l,name:i,error:s,errorMessage:u,disabled:d,required:m,tooltip:g,id:f}=e,b=(0,n._T)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),p={bgColor:l?(0,M.bM)(l,E.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:l?(0,M.bM)(l,E.K.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[h,v]=(0,S.Z)(r,o),[k,w]=(0,c.useState)(!1),{tooltipProps:y,getReferenceProps:C}=(0,z.l)(300);return c.createElement("div",{className:"flex flex-row items-center justify-start"},c.createElement(z.Z,Object.assign({text:g},y)),c.createElement("div",Object.assign({ref:(0,M.lq)([t,y.refs.setReference]),className:(0,N.q)(B("root"),"flex flex-row relative h-5")},b,C),c.createElement("input",{type:"checkbox",className:(0,N.q)(B("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:i,required:m,checked:h,onChange:e=>{e.preventDefault()}}),c.createElement(j,{checked:h,onChange:e=>{v(e),null==a||a(e)},disabled:d,className:(0,N.q)(B("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",d?"cursor-not-allowed":""),onFocus:()=>w(!0),onBlur:()=>w(!1),id:f},c.createElement("span",{className:(0,N.q)(B("sr-only"),"sr-only")},"Switch ",h?"on":"off"),c.createElement("span",{"aria-hidden":"true",className:(0,N.q)(B("background"),h?p.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),c.createElement("span",{"aria-hidden":"true",className:(0,N.q)(B("round"),h?(0,N.q)(p.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",k?(0,N.q)("ring-2",p.ringColor):"")}))),s&&u?c.createElement("p",{className:(0,N.q)(B("errorMessage"),"text-sm text-red-500 mt-1 ")},u):null)});Z.displayName="Switch"},49804:function(e,t,o){o.d(t,{Z:function(){return s}});var n=o(5853),r=o(13241),a=o(1153),c=o(2265),l=o(9496);let i=(0,a.fn)("Col"),s=c.forwardRef((e,t)=>{let{numColSpan:o=1,numColSpanSm:a,numColSpanMd:s,numColSpanLg:u,children:d,className:m}=e,g=(0,n._T)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),f=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return c.createElement("div",Object.assign({ref:t,className:(0,r.q)(i("root"),(()=>{let e=f(o,l.PT),t=f(a,l.SP),n=f(s,l.VS),c=f(u,l._w);return(0,r.q)(e,t,n,c)})(),m)},g),d)});s.displayName="Col"},33866:function(e,t,o){o.d(t,{Z:function(){return L}});var n=o(2265),r=o(36760),a=o.n(r),c=o(66632),l=o(93350),i=o(19722),s=o(71744),u=o(93463),d=o(12918),m=o(18536),g=o(71140),f=o(99320);let b=new u.E4("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),p=new u.E4("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),h=new u.E4("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),v=new u.E4("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),k=new u.E4("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),w=new u.E4("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),y=e=>{let{componentCls:t,iconCls:o,antCls:n,badgeShadowSize:r,textFontSize:a,textFontSizeSM:c,statusSize:l,dotSize:i,textFontWeight:s,indicatorHeight:g,indicatorHeightSM:f,marginXS:y,calc:C}=e,O="".concat(n,"-scroll-number"),x=(0,m.Z)(e,(e,o)=>{let{darkColor:n}=o;return{["&".concat(t," ").concat(t,"-color-").concat(e)]:{background:n,["&:not(".concat(t,"-count)")]:{color:n},"a:hover &":{background:n}}}});return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,d.Wf)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,["".concat(t,"-count")]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:g,height:g,color:e.badgeTextColor,fontWeight:s,fontSize:a,lineHeight:(0,u.bf)(g),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:C(g).div(2).equal(),boxShadow:"0 0 0 ".concat((0,u.bf)(r)," ").concat(e.badgeShadowColor),transition:"background ".concat(e.motionDurationMid),a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},["".concat(t,"-count-sm")]:{minWidth:f,height:f,fontSize:c,lineHeight:(0,u.bf)(f),borderRadius:C(f).div(2).equal()},["".concat(t,"-multiple-words")]:{padding:"0 ".concat((0,u.bf)(e.paddingXS)),bdi:{unicodeBidi:"plaintext"}},["".concat(t,"-dot")]:{zIndex:e.indicatorZIndex,width:i,minWidth:i,height:i,background:e.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat((0,u.bf)(r)," ").concat(e.badgeShadowColor)},["".concat(t,"-count, ").concat(t,"-dot, ").concat(O,"-custom-component")]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",["&".concat(o,"-spin")]:{animationName:w,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&".concat(t,"-status")]:{lineHeight:"inherit",verticalAlign:"baseline",["".concat(t,"-status-dot")]:{position:"relative",top:-1,display:"inline-block",width:l,height:l,verticalAlign:"middle",borderRadius:"50%"},["".concat(t,"-status-success")]:{backgroundColor:e.colorSuccess},["".concat(t,"-status-processing")]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:r,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:b,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},["".concat(t,"-status-default")]:{backgroundColor:e.colorTextPlaceholder},["".concat(t,"-status-error")]:{backgroundColor:e.colorError},["".concat(t,"-status-warning")]:{backgroundColor:e.colorWarning},["".concat(t,"-status-text")]:{marginInlineStart:y,color:e.colorText,fontSize:e.fontSize}}}),x),{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:p,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["".concat(t,"-zoom-leave")]:{animationName:h,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["&".concat(t,"-not-a-wrapper")]:{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["".concat(t,"-zoom-leave")]:{animationName:k,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["&:not(".concat(t,"-status)")]:{verticalAlign:"middle"},["".concat(O,"-custom-component, ").concat(t,"-count")]:{transform:"none"},["".concat(O,"-custom-component, ").concat(O)]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[O]:{overflow:"hidden",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseOutBack),["".concat(O,"-only")]:{position:"relative",display:"inline-block",height:g,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",["> p".concat(O,"-only-unit")]:{height:g,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},["".concat(O,"-symbol")]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",["".concat(t,"-count, ").concat(t,"-dot, ").concat(O,"-custom-component")]:{transform:"translate(-50%, -50%)"}}})}},C=e=>{let{fontHeight:t,lineWidth:o,marginXS:n,colorBorderBg:r}=e,a=e.colorTextLightSolid,c=e.colorError,l=e.colorErrorHover;return(0,g.IX)(e,{badgeFontHeight:t,badgeShadowSize:o,badgeTextColor:a,badgeColor:c,badgeColorHover:l,badgeShadowColor:r,badgeProcessingDuration:"1.2s",badgeRibbonOffset:n,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},O=e=>{let{fontSize:t,lineHeight:o,fontSizeSM:n,lineWidth:r}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*o)-2*r,indicatorHeightSM:t,dotSize:n/2,textFontSize:n,textFontSizeSM:n,textFontWeight:"normal",statusSize:n/2}};var x=(0,f.I$)("Badge",e=>y(C(e)),O);let j=e=>{let{antCls:t,badgeFontHeight:o,marginXS:n,badgeRibbonOffset:r,calc:a}=e,c="".concat(t,"-ribbon"),l=(0,m.Z)(e,(e,t)=>{let{darkColor:o}=t;return{["&".concat(c,"-color-").concat(e)]:{background:o,color:o}}});return{["".concat(t,"-ribbon-wrapper")]:{position:"relative"},[c]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,d.Wf)(e)),{position:"absolute",top:n,padding:"0 ".concat((0,u.bf)(e.paddingXS)),color:e.colorPrimary,lineHeight:(0,u.bf)(o),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,["".concat(c,"-text")]:{color:e.badgeTextColor},["".concat(c,"-corner")]:{position:"absolute",top:"100%",width:r,height:r,color:"currentcolor",border:"".concat((0,u.bf)(a(r).div(2).equal())," solid"),transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),l),{["&".concat(c,"-placement-end")]:{insetInlineEnd:a(r).mul(-1).equal(),borderEndEndRadius:0,["".concat(c,"-corner")]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},["&".concat(c,"-placement-start")]:{insetInlineStart:a(r).mul(-1).equal(),borderEndStartRadius:0,["".concat(c,"-corner")]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}};var S=(0,f.I$)(["Badge","Ribbon"],e=>j(C(e)),O);let E=e=>{let t;let{prefixCls:o,value:r,current:c,offset:l=0}=e;return l&&(t={position:"absolute",top:"".concat(l,"00%"),left:0}),n.createElement("span",{style:t,className:a()("".concat(o,"-only-unit"),{current:c})},r)};var N=e=>{let t,o;let{prefixCls:r,count:a,value:c}=e,l=Number(c),i=Math.abs(a),[s,u]=n.useState(l),[d,m]=n.useState(i),g=()=>{u(l),m(i)};if(n.useEffect(()=>{let e=setTimeout(g,1e3);return()=>clearTimeout(e)},[l]),s===l||Number.isNaN(l)||Number.isNaN(s))t=[n.createElement(E,Object.assign({},e,{key:l,current:!0}))],o={transition:"none"};else{t=[];let r=l+10,a=[];for(let e=l;e<=r;e+=1)a.push(e);let c=de%10===s);t=(c<0?a.slice(0,u+1):a.slice(u)).map((t,o)=>n.createElement(E,Object.assign({},e,{key:t,value:t%10,offset:c<0?o-u:o,current:o===u}))),o={transform:"translateY(".concat(-function(e,t,o){let n=e,r=0;for(;(n+10)%10!==t;)n+=o,r+=o;return r}(s,l,c),"00%)")}}return n.createElement("span",{className:"".concat(r,"-only"),style:o,onTransitionEnd:g},t)},M=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);rt.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};let z=n.forwardRef((e,t)=>{let{prefixCls:o,count:r,className:c,motionClassName:l,style:u,title:d,show:m,component:g="sup",children:f}=e,b=M(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:p}=n.useContext(s.E_),h=p("scroll-number",o),v=Object.assign(Object.assign({},b),{"data-show":m,style:u,className:a()(h,c,l),title:d}),k=r;if(r&&Number(r)%1==0){let e=String(r).split("");k=n.createElement("bdi",null,e.map((t,o)=>n.createElement(N,{prefixCls:h,count:Number(r),value:t,key:e.length-o})))}return((null==u?void 0:u.borderColor)&&(v.style=Object.assign(Object.assign({},u),{boxShadow:"0 0 0 1px ".concat(u.borderColor," inset")})),f)?(0,i.Tm)(f,e=>({className:a()("".concat(h,"-custom-component"),null==e?void 0:e.className,l)})):n.createElement(g,Object.assign({},v,{ref:t}),k)});var B=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);rt.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};let Z=n.forwardRef((e,t)=>{var o,r,u,d,m;let{prefixCls:g,scrollNumberPrefixCls:f,children:b,status:p,text:h,color:v,count:k=null,overflowCount:w=99,dot:y=!1,size:C="default",title:O,offset:j,style:S,className:E,rootClassName:N,classNames:M,styles:Z,showZero:L=!1}=e,T=B(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:R,direction:P,badge:I}=n.useContext(s.E_),D=R("badge",g),[H,F,W]=x(D),q=k>w?"".concat(w,"+"):k,A="0"===q||0===q||"0"===h||0===h,_=null===k||A&&!L,X=(null!=p||null!=v)&&_,V=null!=p||!A,Q=y&&!A,G=Q?"":q,K=(0,n.useMemo)(()=>((null==G||""===G)&&(null==h||""===h)||A&&!L)&&!Q,[G,A,L,Q,h]),Y=(0,n.useRef)(k);K||(Y.current=k);let $=Y.current,U=(0,n.useRef)(G);K||(U.current=G);let J=U.current,ee=(0,n.useRef)(Q);K||(ee.current=Q);let et=(0,n.useMemo)(()=>{if(!j)return Object.assign(Object.assign({},null==I?void 0:I.style),S);let e={marginTop:j[1]};return"rtl"===P?e.left=Number.parseInt(j[0],10):e.right=-Number.parseInt(j[0],10),Object.assign(Object.assign(Object.assign({},e),null==I?void 0:I.style),S)},[P,j,S,null==I?void 0:I.style]),eo=null!=O?O:"string"==typeof $||"number"==typeof $?$:void 0,en=!K&&(0===h?L:!!h&&!0!==h),er=en?n.createElement("span",{className:"".concat(D,"-status-text")},h):null,ea=$&&"object"==typeof $?(0,i.Tm)($,e=>({style:Object.assign(Object.assign({},et),e.style)})):void 0,ec=(0,l.o2)(v,!1),el=a()(null==M?void 0:M.indicator,null===(o=null==I?void 0:I.classNames)||void 0===o?void 0:o.indicator,{["".concat(D,"-status-dot")]:X,["".concat(D,"-status-").concat(p)]:!!p,["".concat(D,"-color-").concat(v)]:ec}),ei={};v&&!ec&&(ei.color=v,ei.background=v);let es=a()(D,{["".concat(D,"-status")]:X,["".concat(D,"-not-a-wrapper")]:!b,["".concat(D,"-rtl")]:"rtl"===P},E,N,null==I?void 0:I.className,null===(r=null==I?void 0:I.classNames)||void 0===r?void 0:r.root,null==M?void 0:M.root,F,W);if(!b&&X&&(h||V||!_)){let e=et.color;return H(n.createElement("span",Object.assign({},T,{className:es,style:Object.assign(Object.assign(Object.assign({},null==Z?void 0:Z.root),null===(u=null==I?void 0:I.styles)||void 0===u?void 0:u.root),et)}),n.createElement("span",{className:el,style:Object.assign(Object.assign(Object.assign({},null==Z?void 0:Z.indicator),null===(d=null==I?void 0:I.styles)||void 0===d?void 0:d.indicator),ei)}),en&&n.createElement("span",{style:{color:e},className:"".concat(D,"-status-text")},h)))}return H(n.createElement("span",Object.assign({ref:t},T,{className:es,style:Object.assign(Object.assign({},null===(m=null==I?void 0:I.styles)||void 0===m?void 0:m.root),null==Z?void 0:Z.root)}),b,n.createElement(c.ZP,{visible:!K,motionName:"".concat(D,"-zoom"),motionAppear:!1,motionDeadline:1e3},e=>{var t,o;let{className:r}=e,c=R("scroll-number",f),l=ee.current,i=a()(null==M?void 0:M.indicator,null===(t=null==I?void 0:I.classNames)||void 0===t?void 0:t.indicator,{["".concat(D,"-dot")]:l,["".concat(D,"-count")]:!l,["".concat(D,"-count-sm")]:"small"===C,["".concat(D,"-multiple-words")]:!l&&J&&J.toString().length>1,["".concat(D,"-status-").concat(p)]:!!p,["".concat(D,"-color-").concat(v)]:ec}),s=Object.assign(Object.assign(Object.assign({},null==Z?void 0:Z.indicator),null===(o=null==I?void 0:I.styles)||void 0===o?void 0:o.indicator),et);return v&&!ec&&((s=s||{}).background=v),n.createElement(z,{prefixCls:c,show:!K,motionClassName:r,className:i,count:J,title:eo,style:s,key:"scrollNumber"},ea)}),er))});Z.Ribbon=e=>{let{className:t,prefixCls:o,style:r,color:c,children:i,text:u,placement:d="end",rootClassName:m}=e,{getPrefixCls:g,direction:f}=n.useContext(s.E_),b=g("ribbon",o),p="".concat(b,"-wrapper"),[h,v,k]=S(b,p),w=(0,l.o2)(c,!1),y=a()(b,"".concat(b,"-placement-").concat(d),{["".concat(b,"-rtl")]:"rtl"===f,["".concat(b,"-color-").concat(c)]:w},t),C={},O={};return c&&!w&&(C.background=c,O.color=c),h(n.createElement("div",{className:a()(p,m,v,k)},i,n.createElement("div",{className:a()(y,v),style:Object.assign(Object.assign({},C),r)},n.createElement("span",{className:"".concat(b,"-text")},u),n.createElement("div",{className:"".concat(b,"-corner"),style:O}))))};var L=Z},3810:function(e,t,o){o.d(t,{Z:function(){return z}});var n=o(2265),r=o(36760),a=o.n(r),c=o(18694),l=o(93350),i=o(53445),s=o(19722),u=o(6694),d=o(71744),m=o(93463),g=o(54558),f=o(12918),b=o(71140),p=o(99320);let h=e=>{let{paddingXXS:t,lineWidth:o,tagPaddingHorizontal:n,componentCls:r,calc:a}=e,c=a(n).sub(o).equal(),l=a(t).sub(o).equal();return{[r]:Object.assign(Object.assign({},(0,f.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:c,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:"".concat((0,m.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusSM,opacity:1,transition:"all ".concat(e.motionDurationMid),textAlign:"start",position:"relative",["&".concat(r,"-rtl")]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},["".concat(r,"-close-icon")]:{marginInlineStart:l,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),"&:hover":{color:e.colorTextHeading}},["&".concat(r,"-has-color")]:{borderColor:"transparent",["&, a, a:hover, ".concat(e.iconCls,"-close, ").concat(e.iconCls,"-close:hover")]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",["&:not(".concat(r,"-checkable-checked):hover")]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},["> ".concat(e.iconCls," + span, > span + ").concat(e.iconCls)]:{marginInlineStart:c}}),["".concat(r,"-borderless")]:{borderColor:"transparent",background:e.tagBorderlessBg}}},v=e=>{let{lineWidth:t,fontSizeIcon:o,calc:n}=e,r=e.fontSizeSM;return(0,b.IX)(e,{tagFontSize:r,tagLineHeight:(0,m.bf)(n(e.lineHeightSM).mul(r).equal()),tagIconSize:n(o).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},k=e=>({defaultBg:new g.t(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var w=(0,p.I$)("Tag",e=>h(v(e)),k),y=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);rt.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};let C=n.forwardRef((e,t)=>{let{prefixCls:o,style:r,className:c,checked:l,children:i,icon:s,onChange:u,onClick:m}=e,g=y(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:f,tag:b}=n.useContext(d.E_),p=f("tag",o),[h,v,k]=w(p),C=a()(p,"".concat(p,"-checkable"),{["".concat(p,"-checkable-checked")]:l},null==b?void 0:b.className,c,v,k);return h(n.createElement("span",Object.assign({},g,{ref:t,style:Object.assign(Object.assign({},r),null==b?void 0:b.style),className:C,onClick:e=>{null==u||u(!l),null==m||m(e)}}),s,n.createElement("span",null,i)))});var O=o(18536);let x=e=>(0,O.Z)(e,(t,o)=>{let{textColor:n,lightBorderColor:r,lightColor:a,darkColor:c}=o;return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:n,background:a,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:c,borderColor:c},["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}});var j=(0,p.bk)(["Tag","preset"],e=>x(v(e)),k);let S=(e,t,o)=>{let n="string"!=typeof o?o:o.charAt(0).toUpperCase()+o.slice(1);return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:e["color".concat(o)],background:e["color".concat(n,"Bg")],borderColor:e["color".concat(n,"Border")],["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}};var E=(0,p.bk)(["Tag","status"],e=>{let t=v(e);return[S(t,"success","Success"),S(t,"processing","Info"),S(t,"error","Error"),S(t,"warning","Warning")]},k),N=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);rt.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]]);return o};let M=n.forwardRef((e,t)=>{let{prefixCls:o,className:r,rootClassName:m,style:g,children:f,icon:b,color:p,onClose:h,bordered:v=!0,visible:k}=e,y=N(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:C,direction:O,tag:x}=n.useContext(d.E_),[S,M]=n.useState(!0),z=(0,c.Z)(y,["closeIcon","closable"]);n.useEffect(()=>{void 0!==k&&M(k)},[k]);let B=(0,l.o2)(p),Z=(0,l.yT)(p),L=B||Z,T=Object.assign(Object.assign({backgroundColor:p&&!L?p:void 0},null==x?void 0:x.style),g),R=C("tag",o),[P,I,D]=w(R),H=a()(R,null==x?void 0:x.className,{["".concat(R,"-").concat(p)]:L,["".concat(R,"-has-color")]:p&&!L,["".concat(R,"-hidden")]:!S,["".concat(R,"-rtl")]:"rtl"===O,["".concat(R,"-borderless")]:!v},r,m,I,D),F=e=>{e.stopPropagation(),null==h||h(e),e.defaultPrevented||M(!1)},[,W]=(0,i.b)((0,i.w)(e),(0,i.w)(x),{closable:!1,closeIconRender:e=>{let t=n.createElement("span",{className:"".concat(R,"-close-icon"),onClick:F},e);return(0,s.wm)(e,t,e=>({onClick:t=>{var o;null===(o=null==e?void 0:e.onClick)||void 0===o||o.call(e,t),F(t)},className:a()(null==e?void 0:e.className,"".concat(R,"-close-icon"))}))}}),q="function"==typeof y.onClick||f&&"a"===f.type,A=b||null,_=A?n.createElement(n.Fragment,null,A,f&&n.createElement("span",null,f)):f,X=n.createElement("span",Object.assign({},z,{ref:t,className:H,style:T}),_,W,B&&n.createElement(j,{key:"preset",prefixCls:R}),Z&&n.createElement(E,{key:"status",prefixCls:R}));return P(q?n.createElement(u.Z,{component:"Tag"},X):X)});M.CheckableTag=C;var z=M},2651:function(e,t,o){o.d(t,{Z:function(){return k}});var n=o(93463),r=o(11938),a=o(70774),c=o(73602),l=o(91691),i=o(25119),s=o(37628),u=o(32417),d=o(4877),m=o(57943),g=o(12789),f=o(54558);let b=(e,t)=>new f.t(e).setA(t).toRgbString(),p=(e,t)=>new f.t(e).lighten(t).toHexString(),h=e=>{let t=(0,m.R_)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},v=(e,t)=>{let o=e||"#000",n=t||"#fff";return{colorBgBase:o,colorTextBase:n,colorText:b(n,.85),colorTextSecondary:b(n,.65),colorTextTertiary:b(n,.45),colorTextQuaternary:b(n,.25),colorFill:b(n,.18),colorFillSecondary:b(n,.12),colorFillTertiary:b(n,.08),colorFillQuaternary:b(n,.04),colorBgSolid:b(n,.95),colorBgSolidHover:b(n,1),colorBgSolidActive:b(n,.9),colorBgElevated:p(o,12),colorBgContainer:p(o,8),colorBgLayout:p(o,0),colorBgSpotlight:p(o,26),colorBgBlur:b(n,.04),colorBorder:p(o,26),colorBorderSecondary:p(o,19)}};var k={defaultSeed:i.u_.token,useToken:function(){let[e,t,o]=(0,l.ZP)();return{theme:e,token:t,hashId:o}},defaultAlgorithm:s.Z,darkAlgorithm:(e,t)=>{let o=Object.keys(a.M).map(t=>{let o=(0,m.R_)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,n,r)=>(e["".concat(t,"-").concat(r+1)]=o[r],e["".concat(t).concat(r+1)]=o[r],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),n=null!=t?t:(0,s.Z)(e),r=(0,g.Z)(e,{generateColorPalettes:h,generateNeutralColorPalettes:v});return Object.assign(Object.assign(Object.assign(Object.assign({},n),o),r),{colorPrimaryBg:r.colorPrimaryBorder,colorPrimaryBgHover:r.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let o=null!=t?t:(0,s.Z)(e),n=o.fontSizeSM,r=o.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),function(e){let{sizeUnit:t,sizeStep:o}=e,n=o-2;return{sizeXXL:t*(n+10),sizeXL:t*(n+6),sizeLG:t*(n+2),sizeMD:t*(n+2),sizeMS:t*(n+1),size:t*n,sizeSM:t*n,sizeXS:t*(n-1),sizeXXS:t*(n-1)}}(null!=t?t:e)),(0,d.Z)(n)),{controlHeight:r}),(0,u.Z)(Object.assign(Object.assign({},o),{controlHeight:r})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,n.jG)(e.algorithm):r.Z,o=Object.assign(Object.assign({},a.Z),null==e?void 0:e.token);return(0,n.t2)(o,{override:null==e?void 0:e.token},t,c.Z)},defaultConfig:i.u_,_internalContext:i.Mj}},15051:function(e,t,o){o.d(t,{Z:function(){return n}});let n=(0,o(79205).Z)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},49322:function(e,t,o){o.d(t,{Z:function(){return n}});let n=(0,o(79205).Z)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},99397:function(e,t,o){o.d(t,{Z:function(){return n}});let n=(0,o(79205).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},32489:function(e,t,o){o.d(t,{Z:function(){return n}});let n=(0,o(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},10900:function(e,t,o){var n=o(2265);let r=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});t.Z=r},91777:function(e,t,o){var n=o(2265);let r=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});t.Z=r},47686:function(e,t,o){var n=o(2265);let r=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});t.Z=r},58710:function(e,t,o){var n=o(2265);let r=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=r},82182:function(e,t,o){var n=o(2265);let r=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});t.Z=r},79814:function(e,t,o){var n=o(2265);let r=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))});t.Z=r},93416:function(e,t,o){var n=o(2265);let r=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});t.Z=r},77355:function(e,t,o){var n=o(2265);let r=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=r},22452:function(e,t,o){var n=o(2265);let r=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});t.Z=r},25327:function(e,t,o){var n=o(2265);let r=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))});t.Z=r},49084:function(e,t,o){var n=o(2265);let r=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});t.Z=r},3497:function(e,t,o){var n=o(2265);let r=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"}))});t.Z=r},92668:function(e,t,o){o.d(t,{I:function(){return l}});var n=o(59121),r=o(31091),a=o(63497),c=o(99649);function l(e,t){let{years:o=0,months:l=0,weeks:i=0,days:s=0,hours:u=0,minutes:d=0,seconds:m=0}=t,g=(0,c.Q)(e),f=l||o?(0,r.z)(g,l+12*o):g,b=s||i?(0,n.E)(f,s+7*i):f;return(0,a.L)(e,b.getTime()+1e3*(m+60*(d+60*u)))}},59121:function(e,t,o){o.d(t,{E:function(){return a}});var n=o(99649),r=o(63497);function a(e,t){let o=(0,n.Q)(e);return isNaN(t)?(0,r.L)(e,NaN):(t&&o.setDate(o.getDate()+t),o)}},31091:function(e,t,o){o.d(t,{z:function(){return a}});var n=o(99649),r=o(63497);function a(e,t){let o=(0,n.Q)(e);if(isNaN(t))return(0,r.L)(e,NaN);if(!t)return o;let a=o.getDate(),c=(0,r.L)(e,o.getTime());return(c.setMonth(o.getMonth()+t+1,0),a>=c.getDate())?c:(o.setFullYear(c.getFullYear(),c.getMonth(),a),o)}},63497:function(e,t,o){o.d(t,{L:function(){return n}});function n(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}},99649:function(e,t,o){o.d(t,{Q:function(){return n}});function n(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/4951-59d280e876cbbf1f.js b/litellm/proxy/_experimental/out/_next/static/chunks/4951-59d280e876cbbf1f.js
deleted file mode 100644
index a3d263aae6e..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/4951-59d280e876cbbf1f.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4951,5945,1623],{47323:function(t,e,r){r.d(e,{Z:function(){return p}});var n=r(5853),a=r(2265),i=r(47187),o=r(7084),s=r(13241),c=r(1153),l=r(26898);let d={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},u={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},h={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},g=(t,e)=>{switch(t){case"simple":return{textColor:e?(0,c.bM)(e,l.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:e?(0,c.bM)(e,l.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,s.q)((0,c.bM)(e,l.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:e?(0,c.bM)(e,l.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,s.q)((0,c.bM)(e,l.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:e?(0,c.bM)(e,l.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:e?(0,s.q)((0,c.bM)(e,l.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:e?(0,c.bM)(e,l.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,s.q)((0,c.bM)(e,l.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:e?(0,c.bM)(e,l.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:e?(0,s.q)((0,c.bM)(e,l.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},f=(0,c.fn)("Icon"),p=a.forwardRef((t,e)=>{let{icon:r,variant:l="simple",tooltip:p,size:b=o.u8.SM,color:m,className:y}=t,v=(0,n._T)(t,["icon","variant","tooltip","size","color","className"]),x=g(l,m),{tooltipProps:C,getReferenceProps:w}=(0,i.l)();return a.createElement("span",Object.assign({ref:(0,c.lq)([e,C.refs.setReference]),className:(0,s.q)(f("root"),"inline-flex shrink-0 items-center justify-center",x.bgColor,x.textColor,x.borderColor,x.ringColor,h[l].rounded,h[l].border,h[l].shadow,h[l].ring,d[b].paddingX,d[b].paddingY,y)},w,v),a.createElement(i.Z,Object.assign({text:p},C)),a.createElement(r,{className:(0,s.q)(f("icon"),"shrink-0",u[b].height,u[b].width)}))});p.displayName="Icon"},16853:function(t,e,r){r.d(e,{Z:function(){return d}});var n=r(5853),a=r(96398),i=r(44140),o=r(2265),s=r(13241),c=r(1153);let l=(0,c.fn)("Textarea"),d=o.forwardRef((t,e)=>{let{value:r,defaultValue:d="",placeholder:u="Type...",error:h=!1,errorMessage:g,disabled:f=!1,className:p,onChange:b,onValueChange:m,autoHeight:y=!1}=t,v=(0,n._T)(t,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[x,C]=(0,i.Z)(d,r),w=(0,o.useRef)(null),O=(0,a.Uh)(x);return(0,o.useEffect)(()=>{let t=w.current;if(y&&t){t.style.height="60px";let e=t.scrollHeight;t.style.height=e+"px"}},[y,w,x]),o.createElement(o.Fragment,null,o.createElement("textarea",Object.assign({ref:(0,c.lq)([w,e]),value:x,placeholder:u,disabled:f,className:(0,s.q)(l("Textarea"),"w-full flex items-center outline-none rounded-tremor-default px-3 py-2 text-tremor-default focus:ring-2 transition duration-100 border","shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:shadow-dark-tremor-input focus:dark:border-dark-tremor-brand-subtle focus:dark:ring-dark-tremor-brand-muted",(0,a.um)(O,f,h),f?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",p),"data-testid":"text-area",onChange:t=>{null==b||b(t),C(t.target.value),null==m||m(t.target.value)}},v)),h&&g?o.createElement("p",{className:(0,s.q)(l("errorMessage"),"text-sm text-red-500 mt-1")},g):null)});d.displayName="Textarea"},5945:function(t,e,r){r.d(e,{Z:function(){return _}});var n=r(2265),a=r(36760),i=r.n(a),o=r(18694),s=r(71744),c=r(33759),l=r(50337),d=r(65869),u=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(t);ae.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]]);return r},h=t=>{var{prefixCls:e,className:r,hoverable:a=!0}=t,o=u(t,["prefixCls","className","hoverable"]);let{getPrefixCls:c}=n.useContext(s.E_),l=c("card",e),d=i()("".concat(l,"-grid"),r,{["".concat(l,"-grid-hoverable")]:a});return n.createElement("div",Object.assign({},o,{className:d}))},g=r(93463),f=r(12918),p=r(99320),b=r(71140);let m=t=>{let{antCls:e,componentCls:r,headerHeight:n,headerPadding:a,tabsMarginBottom:i}=t;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:n,marginBottom:-1,padding:"0 ".concat((0,g.bf)(a)),color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.headerFontSize,background:t.headerBg,borderBottom:"".concat((0,g.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorBorderSecondary),borderRadius:"".concat((0,g.bf)(t.borderRadiusLG)," ").concat((0,g.bf)(t.borderRadiusLG)," 0 0")},(0,f.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},f.vS),{["\n > ".concat(r,"-typography,\n > ").concat(r,"-typography-edit-content\n ")]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),["".concat(e,"-tabs-top")]:{clear:"both",marginBottom:i,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,"&-bar":{borderBottom:"".concat((0,g.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorBorderSecondary)}}})},y=t=>{let{cardPaddingBase:e,colorBorderSecondary:r,cardShadow:n,lineWidth:a}=t;return{width:"33.33%",padding:e,border:0,borderRadius:0,boxShadow:"\n ".concat((0,g.bf)(a)," 0 0 0 ").concat(r,",\n 0 ").concat((0,g.bf)(a)," 0 0 ").concat(r,",\n ").concat((0,g.bf)(a)," ").concat((0,g.bf)(a)," 0 0 ").concat(r,",\n ").concat((0,g.bf)(a)," 0 0 0 ").concat(r," inset,\n 0 ").concat((0,g.bf)(a)," 0 0 ").concat(r," inset;\n "),transition:"all ".concat(t.motionDurationMid),"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:n}}},v=t=>{let{componentCls:e,iconCls:r,actionsLiMargin:n,cardActionsIconSize:a,colorBorderSecondary:i,actionsBg:o}=t;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:o,borderTop:"".concat((0,g.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(i),display:"flex",borderRadius:"0 0 ".concat((0,g.bf)(t.borderRadiusLG)," ").concat((0,g.bf)(t.borderRadiusLG))},(0,f.dF)()),{"& > li":{margin:n,color:t.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:t.calc(t.cardActionsIconSize).mul(2).equal(),fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer","&:hover":{color:t.colorPrimary,transition:"color ".concat(t.motionDurationMid)},["a:not(".concat(e,"-btn), > ").concat(r)]:{display:"inline-block",width:"100%",color:t.colorIcon,lineHeight:(0,g.bf)(t.fontHeight),transition:"color ".concat(t.motionDurationMid),"&:hover":{color:t.colorPrimary}},["> ".concat(r)]:{fontSize:a,lineHeight:(0,g.bf)(t.calc(a).mul(t.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:"".concat((0,g.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(i)}}})},x=t=>Object.assign(Object.assign({margin:"".concat((0,g.bf)(t.calc(t.marginXXS).mul(-1).equal())," 0"),display:"flex"},(0,f.dF)()),{"&-avatar":{paddingInlineEnd:t.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:t.marginXS}},"&-title":Object.assign({color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG},f.vS),"&-description":{color:t.colorTextDescription}}),C=t=>{let{componentCls:e,colorFillAlter:r,headerPadding:n,bodyPadding:a}=t;return{["".concat(e,"-head")]:{padding:"0 ".concat((0,g.bf)(n)),background:r,"&-title":{fontSize:t.fontSize}},["".concat(e,"-body")]:{padding:"".concat((0,g.bf)(t.padding)," ").concat((0,g.bf)(a))}}},w=t=>{let{componentCls:e}=t;return{overflow:"hidden",["".concat(e,"-body")]:{userSelect:"none"}}},O=t=>{let{componentCls:e,cardShadow:r,cardHeadPadding:n,colorBorderSecondary:a,boxShadowTertiary:i,bodyPadding:o,extraColor:s}=t;return{[e]:Object.assign(Object.assign({},(0,f.Wf)(t)),{position:"relative",background:t.colorBgContainer,borderRadius:t.borderRadiusLG,["&:not(".concat(e,"-bordered)")]:{boxShadow:i},["".concat(e,"-head")]:m(t),["".concat(e,"-extra")]:{marginInlineStart:"auto",color:s,fontWeight:"normal",fontSize:t.fontSize},["".concat(e,"-body")]:{padding:o,borderRadius:"0 0 ".concat((0,g.bf)(t.borderRadiusLG)," ").concat((0,g.bf)(t.borderRadiusLG))},["".concat(e,"-grid")]:y(t),["".concat(e,"-cover")]:{"> *":{display:"block",width:"100%",borderRadius:"".concat((0,g.bf)(t.borderRadiusLG)," ").concat((0,g.bf)(t.borderRadiusLG)," 0 0")}},["".concat(e,"-actions")]:v(t),["".concat(e,"-meta")]:x(t)}),["".concat(e,"-bordered")]:{border:"".concat((0,g.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(a),["".concat(e,"-cover")]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},["".concat(e,"-hoverable")]:{cursor:"pointer",transition:"box-shadow ".concat(t.motionDurationMid,", border-color ").concat(t.motionDurationMid),"&:hover":{borderColor:"transparent",boxShadow:r}},["".concat(e,"-contain-grid")]:{borderRadius:"".concat((0,g.bf)(t.borderRadiusLG)," ").concat((0,g.bf)(t.borderRadiusLG)," 0 0 "),["".concat(e,"-body")]:{display:"flex",flexWrap:"wrap"},["&:not(".concat(e,"-loading) ").concat(e,"-body")]:{marginBlockStart:t.calc(t.lineWidth).mul(-1).equal(),marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),padding:0}},["".concat(e,"-contain-tabs")]:{["> div".concat(e,"-head")]:{minHeight:0,["".concat(e,"-head-title, ").concat(e,"-extra")]:{paddingTop:n}}},["".concat(e,"-type-inner")]:C(t),["".concat(e,"-loading")]:w(t),["".concat(e,"-rtl")]:{direction:"rtl"}}},k=t=>{let{componentCls:e,bodyPaddingSM:r,headerPaddingSM:n,headerHeightSM:a,headerFontSizeSM:i}=t;return{["".concat(e,"-small")]:{["> ".concat(e,"-head")]:{minHeight:a,padding:"0 ".concat((0,g.bf)(n)),fontSize:i,["> ".concat(e,"-head-wrapper")]:{["> ".concat(e,"-extra")]:{fontSize:t.fontSize}}},["> ".concat(e,"-body")]:{padding:r}},["".concat(e,"-small").concat(e,"-contain-tabs")]:{["> ".concat(e,"-head")]:{["".concat(e,"-head-title, ").concat(e,"-extra")]:{paddingTop:0,display:"flex",alignItems:"center"}}}}};var S=(0,p.I$)("Card",t=>{let e=(0,b.IX)(t,{cardShadow:t.boxShadowCard,cardHeadPadding:t.padding,cardPaddingBase:t.paddingLG,cardActionsIconSize:t.fontSize});return[O(e),k(e)]},t=>{var e,r;return{headerBg:"transparent",headerFontSize:t.fontSizeLG,headerFontSizeSM:t.fontSize,headerHeight:t.fontSizeLG*t.lineHeightLG+2*t.padding,headerHeightSM:t.fontSize*t.lineHeight+2*t.paddingXS,actionsBg:t.colorBgContainer,actionsLiMargin:"".concat(t.paddingSM,"px 0"),tabsMarginBottom:-t.padding-t.lineWidth,extraColor:t.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!==(e=t.bodyPadding)&&void 0!==e?e:t.paddingLG,headerPadding:null!==(r=t.headerPadding)&&void 0!==r?r:t.paddingLG}}),E=r(56250),P=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(t);ae.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]]);return r};let q=t=>{let{actionClasses:e,actions:r=[],actionStyle:a}=t;return n.createElement("ul",{className:e,style:a},r.map((t,e)=>n.createElement("li",{style:{width:"".concat(100/r.length,"%")},key:"action-".concat(e)},n.createElement("span",null,t))))},M=n.forwardRef((t,e)=>{let r;let{prefixCls:a,className:u,rootClassName:g,style:f,extra:p,headStyle:b={},bodyStyle:m={},title:y,loading:v,bordered:x,variant:C,size:w,type:O,cover:k,actions:M,tabList:j,children:_,activeTabKey:T,defaultActiveTabKey:R,tabBarExtraContent:N,hoverable:L,tabProps:Q={},classNames:D,styles:I}=t,z=P(t,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:A,direction:H,card:Z}=n.useContext(s.E_),[K]=(0,E.Z)("card",C,x),F=t=>{var e;return i()(null===(e=null==Z?void 0:Z.classNames)||void 0===e?void 0:e[t],null==D?void 0:D[t])},G=t=>{var e;return Object.assign(Object.assign({},null===(e=null==Z?void 0:Z.styles)||void 0===e?void 0:e[t]),null==I?void 0:I[t])},B=n.useMemo(()=>{let t=!1;return n.Children.forEach(_,e=>{(null==e?void 0:e.type)===h&&(t=!0)}),t},[_]),W=A("card",a),[V,X,Y]=S(W),U=n.createElement(l.Z,{loading:!0,active:!0,paragraph:{rows:4},title:!1},_),$=void 0!==T,J=Object.assign(Object.assign({},Q),{[$?"activeKey":"defaultActiveKey"]:$?T:R,tabBarExtraContent:N}),tt=(0,c.Z)(w),te=tt&&"default"!==tt?tt:"large",tr=j?n.createElement(d.default,Object.assign({size:te},J,{className:"".concat(W,"-head-tabs"),onChange:e=>{var r;null===(r=t.onTabChange)||void 0===r||r.call(t,e)},items:j.map(t=>{var{tab:e}=t;return Object.assign({label:e},P(t,["tab"]))})})):null;if(y||p||tr){let t=i()("".concat(W,"-head"),F("header")),e=i()("".concat(W,"-head-title"),F("title")),a=i()("".concat(W,"-extra"),F("extra")),o=Object.assign(Object.assign({},b),G("header"));r=n.createElement("div",{className:t,style:o},n.createElement("div",{className:"".concat(W,"-head-wrapper")},y&&n.createElement("div",{className:e,style:G("title")},y),p&&n.createElement("div",{className:a,style:G("extra")},p)),tr)}let tn=i()("".concat(W,"-cover"),F("cover")),ta=k?n.createElement("div",{className:tn,style:G("cover")},k):null,ti=i()("".concat(W,"-body"),F("body")),to=Object.assign(Object.assign({},m),G("body")),ts=n.createElement("div",{className:ti,style:to},v?U:_),tc=i()("".concat(W,"-actions"),F("actions")),tl=(null==M?void 0:M.length)?n.createElement(q,{actionClasses:tc,actionStyle:G("actions"),actions:M}):null,td=(0,o.Z)(z,["onTabChange"]),tu=i()(W,null==Z?void 0:Z.className,{["".concat(W,"-loading")]:v,["".concat(W,"-bordered")]:"borderless"!==K,["".concat(W,"-hoverable")]:L,["".concat(W,"-contain-grid")]:B,["".concat(W,"-contain-tabs")]:null==j?void 0:j.length,["".concat(W,"-").concat(tt)]:tt,["".concat(W,"-type-").concat(O)]:!!O,["".concat(W,"-rtl")]:"rtl"===H},u,g,X,Y),th=Object.assign(Object.assign({},null==Z?void 0:Z.style),f);return V(n.createElement("div",Object.assign({ref:e},td,{className:tu,style:th}),r,ta,ts,tl))});var j=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(t);ae.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]]);return r};M.Grid=h,M.Meta=t=>{let{prefixCls:e,className:r,avatar:a,title:o,description:c}=t,l=j(t,["prefixCls","className","avatar","title","description"]),{getPrefixCls:d}=n.useContext(s.E_),u=d("card",e),h=i()("".concat(u,"-meta"),r),g=a?n.createElement("div",{className:"".concat(u,"-meta-avatar")},a):null,f=o?n.createElement("div",{className:"".concat(u,"-meta-title")},o):null,p=c?n.createElement("div",{className:"".concat(u,"-meta-description")},c):null,b=f||p?n.createElement("div",{className:"".concat(u,"-meta-detail")},f,p):null;return n.createElement("div",Object.assign({},l,{className:h}),g,b)};var _=M},66344:function(t,e,r){r.d(e,{Z:function(){return n}});let n=(0,r(79205).Z)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},3577:function(t,e,r){r.d(e,{Z:function(){return n}});let n=(0,r(79205).Z)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]])},69076:function(t,e,r){r.d(e,{Z:function(){return n}});let n=(0,r(79205).Z)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},73247:function(t,e,r){r.d(e,{Z:function(){return n}});let n=(0,r(79205).Z)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},92369:function(t,e,r){r.d(e,{Z:function(){return n}});let n=(0,r(79205).Z)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},10900:function(t,e,r){var n=r(2265);let a=n.forwardRef(function(t,e){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.Z=a},15731:function(t,e,r){var n=r(2265);let a=n.forwardRef(function(t,e){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.Z=a},53410:function(t,e,r){var n=r(2265);let a=n.forwardRef(function(t,e){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.Z=a},49084:function(t,e,r){var n=r(2265);let a=n.forwardRef(function(t,e){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.Z=a},2894:function(t,e,r){r.d(e,{R:function(){return s},m:function(){return o}});var n=r(18238),a=r(7989),i=r(11255),o=class extends a.F{#t;#e;#r;#n;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#r=t.mutationCache,this.#e=[],this.state=t.state||s(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#r.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#a({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=(0,i.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});let n="pending"===this.state.status,a=!this.#n.canStart();try{if(n)e();else{this.#a({type:"pending",variables:t,isPaused:a}),await this.#r.config.onMutate?.(t,this,r);let e=await this.options.onMutate?.(t,r);e!==this.state.context&&this.#a({type:"pending",context:e,variables:t,isPaused:a})}let i=await this.#n.start();return await this.#r.config.onSuccess?.(i,t,this.state.context,this,r),await this.options.onSuccess?.(i,t,this.state.context,r),await this.#r.config.onSettled?.(i,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(i,null,t,this.state.context,r),this.#a({type:"success",data:i}),i}catch(e){try{throw await this.#r.config.onError?.(e,t,this.state.context,this,r),await this.options.onError?.(e,t,this.state.context,r),await this.#r.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,e,t,this.state.context,r),e}finally{this.#a({type:"error",error:e})}}finally{this.#r.runNext(this)}}#a(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),n.Vr.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#r.notify({mutation:this,type:"updated",action:t})})}};function s(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},21623:function(t,e,r){r.d(e,{S:function(){return p}});var n=r(45345),a=r(21733),i=r(18238),o=r(24112),s=class extends o.l{constructor(t={}){super(),this.config=t,this.#i=new Map}#i;build(t,e,r){let i=e.queryKey,o=e.queryHash??(0,n.Rm)(i,e),s=this.get(o);return s||(s=new a.A({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(e),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){this.#i.has(t.queryHash)||(this.#i.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){let e=this.#i.get(t.queryHash);e&&(t.destroy(),e===t&&this.#i.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){i.Vr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#i.get(t)}getAll(){return[...this.#i.values()]}find(t){let e={exact:!0,...t};return this.getAll().find(t=>(0,n._x)(e,t))}findAll(t={}){let e=this.getAll();return Object.keys(t).length>0?e.filter(e=>(0,n._x)(t,e)):e}notify(t){i.Vr.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){i.Vr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){i.Vr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},c=r(2894),l=class extends o.l{constructor(t={}){super(),this.config=t,this.#o=new Set,this.#s=new Map,this.#c=0}#o;#s;#c;build(t,e,r){let n=new c.m({client:t,mutationCache:this,mutationId:++this.#c,options:t.defaultMutationOptions(e),state:r});return this.add(n),n}add(t){this.#o.add(t);let e=d(t);if("string"==typeof e){let r=this.#s.get(e);r?r.push(t):this.#s.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#o.delete(t)){let e=d(t);if("string"==typeof e){let r=this.#s.get(e);if(r){if(r.length>1){let e=r.indexOf(t);-1!==e&&r.splice(e,1)}else r[0]===t&&this.#s.delete(e)}}}this.notify({type:"removed",mutation:t})}canRun(t){let e=d(t);if("string"!=typeof e)return!0;{let r=this.#s.get(e),n=r?.find(t=>"pending"===t.state.status);return!n||n===t}}runNext(t){let e=d(t);if("string"!=typeof e)return Promise.resolve();{let r=this.#s.get(e)?.find(e=>e!==t&&e.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){i.Vr.batch(()=>{this.#o.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#o.clear(),this.#s.clear()})}getAll(){return Array.from(this.#o)}find(t){let e={exact:!0,...t};return this.getAll().find(t=>(0,n.X7)(e,t))}findAll(t={}){return this.getAll().filter(e=>(0,n.X7)(t,e))}notify(t){i.Vr.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){let t=this.getAll().filter(t=>t.state.isPaused);return i.Vr.batch(()=>Promise.all(t.map(t=>t.continue().catch(n.ZT))))}};function d(t){return t.options.scope?.id}var u=r(87045),h=r(57853);function g(t){return{onFetch:(e,r)=>{let a=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,o=e.state.data?.pages||[],s=e.state.data?.pageParams||[],c={pages:[],pageParams:[]},l=0,d=async()=>{let r=!1,d=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(e.signal.aborted?r=!0:e.signal.addEventListener("abort",()=>{r=!0}),e.signal)})},u=(0,n.cG)(e.options,e.fetchOptions),h=async(t,a,i)=>{if(r)return Promise.reject();if(null==a&&t.pages.length)return Promise.resolve(t);let o=(()=>{let t={client:e.client,queryKey:e.queryKey,pageParam:a,direction:i?"backward":"forward",meta:e.options.meta};return d(t),t})(),s=await u(o),{maxPages:c}=e.options,l=i?n.Ht:n.VX;return{pages:l(t.pages,s,c),pageParams:l(t.pageParams,a,c)}};if(i&&o.length){let t="backward"===i,e={pages:o,pageParams:s},r=(t?function(t,{pages:e,pageParams:r}){return e.length>0?t.getPreviousPageParam?.(e[0],e,r[0],r):void 0}:f)(a,e);c=await h(e,r,t)}else{let e=t??o.length;do{let t=0===l?s[0]??a.initialPageParam:f(a,c);if(l>0&&null==t)break;c=await h(c,t),l++}while(le.options.persister?.(d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r):e.fetchFn=d}}}function f(t,{pages:e,pageParams:r}){let n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,r[n],r):void 0}var p=class{#l;#r;#d;#u;#h;#g;#f;#p;constructor(t={}){this.#l=t.queryCache||new s,this.#r=t.mutationCache||new l,this.#d=t.defaultOptions||{},this.#u=new Map,this.#h=new Map,this.#g=0}mount(){this.#g++,1===this.#g&&(this.#f=u.j.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#l.onFocus())}),this.#p=h.N.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#l.onOnline())}))}unmount(){this.#g--,0===this.#g&&(this.#f?.(),this.#f=void 0,this.#p?.(),this.#p=void 0)}isFetching(t){return this.#l.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#r.findAll({...t,status:"pending"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return this.#l.get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),r=this.#l.build(this,e),a=r.state.data;return void 0===a?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime((0,n.KC)(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(a))}getQueriesData(t){return this.#l.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,r){let a=this.defaultQueryOptions({queryKey:t}),i=this.#l.get(a.queryHash),o=i?.state.data,s=(0,n.SE)(e,o);if(void 0!==s)return this.#l.build(this,a).setData(s,{...r,manual:!0})}setQueriesData(t,e,r){return i.Vr.batch(()=>this.#l.findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,r)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return this.#l.get(e.queryHash)?.state}removeQueries(t){let e=this.#l;i.Vr.batch(()=>{e.findAll(t).forEach(t=>{e.remove(t)})})}resetQueries(t,e){let r=this.#l;return i.Vr.batch(()=>(r.findAll(t).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){let r={revert:!0,...e};return Promise.all(i.Vr.batch(()=>this.#l.findAll(t).map(t=>t.cancel(r)))).then(n.ZT).catch(n.ZT)}invalidateQueries(t,e={}){return i.Vr.batch(()=>(this.#l.findAll(t).forEach(t=>{t.invalidate()}),t?.refetchType==="none")?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e))}refetchQueries(t,e={}){let r={...e,cancelRefetch:e.cancelRefetch??!0};return Promise.all(i.Vr.batch(()=>this.#l.findAll(t).filter(t=>!t.isDisabled()&&!t.isStatic()).map(t=>{let e=t.fetch(void 0,r);return r.throwOnError||(e=e.catch(n.ZT)),"paused"===t.state.fetchStatus?Promise.resolve():e}))).then(n.ZT)}fetchQuery(t){let e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);let r=this.#l.build(this,e);return r.isStaleByTime((0,n.KC)(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(n.ZT).catch(n.ZT)}fetchInfiniteQuery(t){return t.behavior=g(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(n.ZT).catch(n.ZT)}ensureInfiniteQueryData(t){return t.behavior=g(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return h.N.isOnline()?this.#r.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#l}getMutationCache(){return this.#r}getDefaultOptions(){return this.#d}setDefaultOptions(t){this.#d=t}setQueryDefaults(t,e){this.#u.set((0,n.Ym)(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...this.#u.values()],r={};return e.forEach(e=>{(0,n.to)(t,e.queryKey)&&Object.assign(r,e.defaultOptions)}),r}setMutationDefaults(t,e){this.#h.set((0,n.Ym)(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...this.#h.values()],r={};return e.forEach(e=>{(0,n.to)(t,e.mutationKey)&&Object.assign(r,e.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;let e={...this.#d.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=(0,n.Rm)(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===n.CN&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#d.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#l.clear(),this.#r.clear()}}},19616:function(t,e,r){r.d(e,{G:function(){return o}});var n=r(2265);let a={enabled:!0,leading:!1,trailing:!0,wait:0,onExecute:()=>{}};class i{constructor(t,e){this.fn=t,this._canLeadingExecute=!0,this._isPending=!1,this._executionCount=0,this._options={...a,...e}}setOptions(t){return this._options={...this._options,...t},this._options.enabled||(this._isPending=!1),this._options}getOptions(){return this._options}maybeExecute(...t){this._options.leading&&this._canLeadingExecute&&(this.executeFunction(...t),this._canLeadingExecute=!1),(this._options.leading||this._options.trailing)&&(this._isPending=!0),this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=setTimeout(()=>{this._canLeadingExecute=!0,this._isPending=!1,this._options.trailing&&this.executeFunction(...t)},this._options.wait)}executeFunction(...t){this._options.enabled&&(this.fn(...t),this._executionCount++,this._options.onExecute(this))}cancel(){this._timeoutId&&(clearTimeout(this._timeoutId),this._canLeadingExecute=!0,this._isPending=!1)}getExecutionCount(){return this._executionCount}getIsPending(){return this._options.enabled&&this._isPending}}function o(t,e){let[r,a]=(0,n.useState)(t),o=function(t,e){let[r]=(0,n.useState)(()=>{var r;return Object.getOwnPropertyNames(Object.getPrototypeOf(r=new i(t,e))).filter(t=>"function"==typeof r[t]).reduce((t,e)=>{let n=r[e];return"function"==typeof n&&(t[e]=n.bind(r)),t},{})});return r.setOptions(e),r}(a,e);return[r,o.maybeExecute,o]}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5105-ea8985e1ca9e840a.js b/litellm/proxy/_experimental/out/_next/static/chunks/5188-c6270da3b1debeb8.js
similarity index 50%
rename from litellm/proxy/_experimental/out/_next/static/chunks/5105-ea8985e1ca9e840a.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/5188-c6270da3b1debeb8.js
index 233f50e3caa..a8bc5521734 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/5105-ea8985e1ca9e840a.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/5188-c6270da3b1debeb8.js
@@ -1 +1 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5105,4851],{37527:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(1119),o=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z"}}]},name:"bank",theme:"outlined"},c=n(55015),l=o.forwardRef(function(e,t){return o.createElement(c.Z,(0,a.Z)({},e,{ref:t,icon:r}))})},9775:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(1119),o=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},c=n(55015),l=o.forwardRef(function(e,t){return o.createElement(c.Z,(0,a.Z)({},e,{ref:t,icon:r}))})},49634:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(1119),o=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},c=n(55015),l=o.forwardRef(function(e,t){return o.createElement(c.Z,(0,a.Z)({},e,{ref:t,icon:r}))})},5540:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(1119),o=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},c=n(55015),l=o.forwardRef(function(e,t){return o.createElement(c.Z,(0,a.Z)({},e,{ref:t,icon:r}))})},64739:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(1119),o=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},c=n(55015),l=o.forwardRef(function(e,t){return o.createElement(c.Z,(0,a.Z)({},e,{ref:t,icon:r}))})},48231:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(1119),o=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z"}}]},name:"line-chart",theme:"outlined"},c=n(55015),l=o.forwardRef(function(e,t){return o.createElement(c.Z,(0,a.Z)({},e,{ref:t,icon:r}))})},69993:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(1119),o=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},c=n(55015),l=o.forwardRef(function(e,t){return o.createElement(c.Z,(0,a.Z)({},e,{ref:t,icon:r}))})},40312:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(1119),o=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z"}}]},name:"shopping-cart",theme:"outlined"},c=n(55015),l=o.forwardRef(function(e,t){return o.createElement(c.Z,(0,a.Z)({},e,{ref:t,icon:r}))})},71891:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(1119),o=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm62.6-651.7l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9zm60.16 186.23a48 48 0 1067.88-67.89 48 48 0 10-67.88 67.89zM889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z"}}]},name:"tags",theme:"outlined"},c=n(55015),l=o.forwardRef(function(e,t){return o.createElement(c.Z,(0,a.Z)({},e,{ref:t,icon:r}))})},41361:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(1119),o=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"},c=n(55015),l=o.forwardRef(function(e,t){return o.createElement(c.Z,(0,a.Z)({},e,{ref:t,icon:r}))})},59664:function(e,t,n){n.d(t,{Z:function(){return N}});var a=n(5853),o=n(2265),r=n(47625),c=n(93765),l=n(54061),i=n(97059),s=n(62994),d=n(25311),u=(0,c.z)({chartName:"LineChart",GraphicalChild:l.x,axisComponents:[{axisType:"xAxis",AxisComp:i.K},{axisType:"yAxis",AxisComp:s.B}],formatAxisMap:d.t9}),m=n(56940),p=n(26680),f=n(8147),b=n(22190),g=n(81889),v=n(65278),h=n(98593),y=n(92666),x=n(32644),k=n(7084),C=n(26898),w=n(13241),E=n(1153);let N=o.forwardRef((e,t)=>{let{data:n=[],categories:c=[],index:d,colors:N=C.s,valueFormatter:O=E.Cj,startEndOnly:Z=!1,showXAxis:j=!0,showYAxis:z=!0,yAxisWidth:S=56,intervalType:I="equidistantPreserveStart",animationDuration:M=900,showAnimation:R=!1,showTooltip:A=!0,showLegend:T=!0,showGridLines:L=!0,autoMinValue:B=!1,curveType:P="linear",minValue:H,maxValue:K,connectNulls:V=!1,allowDecimals:D=!0,noDataText:W,className:q,onValueChange:F,enableLegendSlider:G=!1,customTooltip:_,rotateLabelX:X,padding:Y=j||z?{left:20,right:20}:{left:0,right:0},tickGap:$=5,xAxisLabel:Q,yAxisLabel:J}=e,U=(0,a._T)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","padding","tickGap","xAxisLabel","yAxisLabel"]),[ee,et]=(0,o.useState)(60),[en,ea]=(0,o.useState)(void 0),[eo,er]=(0,o.useState)(void 0),ec=(0,x.me)(c,N),el=(0,x.i4)(B,H,K),ei=!!F;function es(e){ei&&(e===eo&&!en||(0,x.FB)(n,e)&&en&&en.dataKey===e?(er(void 0),null==F||F(null)):(er(e),null==F||F({eventType:"category",categoryClicked:e})),ea(void 0))}return o.createElement("div",Object.assign({ref:t,className:(0,w.q)("w-full h-80",q)},U),o.createElement(r.h,{className:"h-full w-full"},(null==n?void 0:n.length)?o.createElement(u,{data:n,onClick:ei&&(eo||en)?()=>{ea(void 0),er(void 0),null==F||F(null)}:void 0,margin:{bottom:Q?30:void 0,left:J?20:void 0,right:J?5:void 0,top:5}},L?o.createElement(m.q,{className:(0,w.q)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,o.createElement(i.K,{padding:Y,hide:!j,dataKey:d,interval:Z?"preserveStartEnd":I,tick:{transform:"translate(0, 6)"},ticks:Z?[n[0][d],n[n.length-1][d]]:void 0,fill:"",stroke:"",className:(0,w.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:$,angle:null==X?void 0:X.angle,dy:null==X?void 0:X.verticalShift,height:null==X?void 0:X.xAxisHeight},Q&&o.createElement(p._,{position:"insideBottom",offset:-20,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},Q)),o.createElement(s.B,{width:S,hide:!z,axisLine:!1,tickLine:!1,type:"number",domain:el,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,w.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:O,allowDecimals:D},J&&o.createElement(p._,{position:"insideLeft",style:{textAnchor:"middle"},angle:-90,offset:-15,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},J)),o.createElement(f.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:A?e=>{let{active:t,payload:n,label:a}=e;return _?o.createElement(_,{payload:null==n?void 0:n.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=ec.get(e.dataKey))&&void 0!==t?t:k.fr.Gray})}),active:t,label:a}):o.createElement(h.ZP,{active:t,payload:n,label:a,valueFormatter:O,categoryColors:ec})}:o.createElement(o.Fragment,null),position:{y:0}}),T?o.createElement(b.D,{verticalAlign:"top",height:ee,content:e=>{let{payload:t}=e;return(0,v.Z)({payload:t},ec,et,eo,ei?e=>es(e):void 0,G)}}):null,c.map(e=>{var t;return o.createElement(l.x,{className:(0,w.q)((0,E.bM)(null!==(t=ec.get(e))&&void 0!==t?t:k.fr.Gray,C.K.text).strokeColor),strokeOpacity:en||eo&&eo!==e?.3:1,activeDot:e=>{var t;let{cx:a,cy:r,stroke:c,strokeLinecap:l,strokeLinejoin:i,strokeWidth:s,dataKey:d}=e;return o.createElement(g.o,{className:(0,w.q)("stroke-tremor-background dark:stroke-dark-tremor-background",F?"cursor-pointer":"",(0,E.bM)(null!==(t=ec.get(d))&&void 0!==t?t:k.fr.Gray,C.K.text).fillColor),cx:a,cy:r,r:5,fill:"",stroke:c,strokeLinecap:l,strokeLinejoin:i,strokeWidth:s,onClick:(t,a)=>{a.stopPropagation(),ei&&(e.index===(null==en?void 0:en.index)&&e.dataKey===(null==en?void 0:en.dataKey)||(0,x.FB)(n,e.dataKey)&&eo&&eo===e.dataKey?(er(void 0),ea(void 0),null==F||F(null)):(er(e.dataKey),ea({index:e.index,dataKey:e.dataKey}),null==F||F(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var a;let{stroke:r,strokeLinecap:c,strokeLinejoin:l,strokeWidth:i,cx:s,cy:d,dataKey:u,index:m}=t;return(0,x.FB)(n,e)&&!(en||eo&&eo!==e)||(null==en?void 0:en.index)===m&&(null==en?void 0:en.dataKey)===e?o.createElement(g.o,{key:m,cx:s,cy:d,r:5,stroke:r,fill:"",strokeLinecap:c,strokeLinejoin:l,strokeWidth:i,className:(0,w.q)("stroke-tremor-background dark:stroke-dark-tremor-background",F?"cursor-pointer":"",(0,E.bM)(null!==(a=ec.get(u))&&void 0!==a?a:k.fr.Gray,C.K.text).fillColor)}):o.createElement(o.Fragment,{key:m})},key:e,name:e,type:P,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:R,animationDuration:M,connectNulls:V})}),F?c.map(e=>o.createElement(l.x,{className:(0,w.q)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:P,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:V,onClick:(e,t)=>{t.stopPropagation();let{name:n}=e;es(n)}})):null):o.createElement(y.Z,{noDataText:W})))});N.displayName="LineChart"},94789:function(e,t,n){n.d(t,{Z:function(){return s}});var a=n(5853),o=n(2265),r=n(26898),c=n(13241),l=n(1153);let i=(0,l.fn)("Callout"),s=o.forwardRef((e,t)=>{let{title:n,icon:s,color:d,className:u,children:m}=e,p=(0,a._T)(e,["title","icon","color","className","children"]);return o.createElement("div",Object.assign({ref:t,className:(0,c.q)(i("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",d?(0,c.q)((0,l.bM)(d,r.K.background).bgColor,(0,l.bM)(d,r.K.darkBorder).borderColor,(0,l.bM)(d,r.K.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,c.q)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),u)},p),o.createElement("div",{className:(0,c.q)(i("header"),"flex items-start")},s?o.createElement(s,{className:(0,c.q)(i("icon"),"flex-none h-5 w-5 mr-1.5")}):null,o.createElement("h4",{className:(0,c.q)(i("title"),"font-semibold")},n)),o.createElement("p",{className:(0,c.q)(i("body"),"overflow-y-auto",m?"mt-2":"")},m))});s.displayName="Callout"},35829:function(e,t,n){n.d(t,{Z:function(){return i}});var a=n(5853),o=n(26898),r=n(13241),c=n(1153),l=n(2265);let i=l.forwardRef((e,t)=>{let{color:n,children:i,className:s}=e,d=(0,a._T)(e,["color","children","className"]);return l.createElement("p",Object.assign({ref:t,className:(0,r.q)("font-semibold text-tremor-metric",n?(0,c.bM)(n,o.K.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",s)},d),i)});i.displayName="Metric"},33866:function(e,t,n){n.d(t,{Z:function(){return R}});var a=n(2265),o=n(36760),r=n.n(o),c=n(66632),l=n(93350),i=n(19722),s=n(71744),d=n(93463),u=n(12918),m=n(18536),p=n(71140),f=n(99320);let b=new d.E4("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),g=new d.E4("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),v=new d.E4("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),h=new d.E4("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),y=new d.E4("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),x=new d.E4("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),k=e=>{let{componentCls:t,iconCls:n,antCls:a,badgeShadowSize:o,textFontSize:r,textFontSizeSM:c,statusSize:l,dotSize:i,textFontWeight:s,indicatorHeight:p,indicatorHeightSM:f,marginXS:k,calc:C}=e,w="".concat(a,"-scroll-number"),E=(0,m.Z)(e,(e,n)=>{let{darkColor:a}=n;return{["&".concat(t," ").concat(t,"-color-").concat(e)]:{background:a,["&:not(".concat(t,"-count)")]:{color:a},"a:hover &":{background:a}}}});return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.Wf)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,["".concat(t,"-count")]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:p,height:p,color:e.badgeTextColor,fontWeight:s,fontSize:r,lineHeight:(0,d.bf)(p),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:C(p).div(2).equal(),boxShadow:"0 0 0 ".concat((0,d.bf)(o)," ").concat(e.badgeShadowColor),transition:"background ".concat(e.motionDurationMid),a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},["".concat(t,"-count-sm")]:{minWidth:f,height:f,fontSize:c,lineHeight:(0,d.bf)(f),borderRadius:C(f).div(2).equal()},["".concat(t,"-multiple-words")]:{padding:"0 ".concat((0,d.bf)(e.paddingXS)),bdi:{unicodeBidi:"plaintext"}},["".concat(t,"-dot")]:{zIndex:e.indicatorZIndex,width:i,minWidth:i,height:i,background:e.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat((0,d.bf)(o)," ").concat(e.badgeShadowColor)},["".concat(t,"-count, ").concat(t,"-dot, ").concat(w,"-custom-component")]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",["&".concat(n,"-spin")]:{animationName:x,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&".concat(t,"-status")]:{lineHeight:"inherit",verticalAlign:"baseline",["".concat(t,"-status-dot")]:{position:"relative",top:-1,display:"inline-block",width:l,height:l,verticalAlign:"middle",borderRadius:"50%"},["".concat(t,"-status-success")]:{backgroundColor:e.colorSuccess},["".concat(t,"-status-processing")]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:b,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},["".concat(t,"-status-default")]:{backgroundColor:e.colorTextPlaceholder},["".concat(t,"-status-error")]:{backgroundColor:e.colorError},["".concat(t,"-status-warning")]:{backgroundColor:e.colorWarning},["".concat(t,"-status-text")]:{marginInlineStart:k,color:e.colorText,fontSize:e.fontSize}}}),E),{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:g,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["".concat(t,"-zoom-leave")]:{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["&".concat(t,"-not-a-wrapper")]:{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:h,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["".concat(t,"-zoom-leave")]:{animationName:y,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["&:not(".concat(t,"-status)")]:{verticalAlign:"middle"},["".concat(w,"-custom-component, ").concat(t,"-count")]:{transform:"none"},["".concat(w,"-custom-component, ").concat(w)]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[w]:{overflow:"hidden",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseOutBack),["".concat(w,"-only")]:{position:"relative",display:"inline-block",height:p,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",["> p".concat(w,"-only-unit")]:{height:p,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},["".concat(w,"-symbol")]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",["".concat(t,"-count, ").concat(t,"-dot, ").concat(w,"-custom-component")]:{transform:"translate(-50%, -50%)"}}})}},C=e=>{let{fontHeight:t,lineWidth:n,marginXS:a,colorBorderBg:o}=e,r=e.colorTextLightSolid,c=e.colorError,l=e.colorErrorHover;return(0,p.IX)(e,{badgeFontHeight:t,badgeShadowSize:n,badgeTextColor:r,badgeColor:c,badgeColorHover:l,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:a,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},w=e=>{let{fontSize:t,lineHeight:n,fontSizeSM:a,lineWidth:o}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*n)-2*o,indicatorHeightSM:t,dotSize:a/2,textFontSize:a,textFontSizeSM:a,textFontWeight:"normal",statusSize:a/2}};var E=(0,f.I$)("Badge",e=>k(C(e)),w);let N=e=>{let{antCls:t,badgeFontHeight:n,marginXS:a,badgeRibbonOffset:o,calc:r}=e,c="".concat(t,"-ribbon"),l=(0,m.Z)(e,(e,t)=>{let{darkColor:n}=t;return{["&".concat(c,"-color-").concat(e)]:{background:n,color:n}}});return{["".concat(t,"-ribbon-wrapper")]:{position:"relative"},[c]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.Wf)(e)),{position:"absolute",top:a,padding:"0 ".concat((0,d.bf)(e.paddingXS)),color:e.colorPrimary,lineHeight:(0,d.bf)(n),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,["".concat(c,"-text")]:{color:e.badgeTextColor},["".concat(c,"-corner")]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:"".concat((0,d.bf)(r(o).div(2).equal())," solid"),transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),l),{["&".concat(c,"-placement-end")]:{insetInlineEnd:r(o).mul(-1).equal(),borderEndEndRadius:0,["".concat(c,"-corner")]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},["&".concat(c,"-placement-start")]:{insetInlineStart:r(o).mul(-1).equal(),borderEndStartRadius:0,["".concat(c,"-corner")]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}};var O=(0,f.I$)(["Badge","Ribbon"],e=>N(C(e)),w);let Z=e=>{let t;let{prefixCls:n,value:o,current:c,offset:l=0}=e;return l&&(t={position:"absolute",top:"".concat(l,"00%"),left:0}),a.createElement("span",{style:t,className:r()("".concat(n,"-only-unit"),{current:c})},o)};var j=e=>{let t,n;let{prefixCls:o,count:r,value:c}=e,l=Number(c),i=Math.abs(r),[s,d]=a.useState(l),[u,m]=a.useState(i),p=()=>{d(l),m(i)};if(a.useEffect(()=>{let e=setTimeout(p,1e3);return()=>clearTimeout(e)},[l]),s===l||Number.isNaN(l)||Number.isNaN(s))t=[a.createElement(Z,Object.assign({},e,{key:l,current:!0}))],n={transition:"none"};else{t=[];let o=l+10,r=[];for(let e=l;e<=o;e+=1)r.push(e);let c=ue%10===s);t=(c<0?r.slice(0,d+1):r.slice(d)).map((t,n)=>a.createElement(Z,Object.assign({},e,{key:t,value:t%10,offset:c<0?n-d:n,current:n===d}))),n={transform:"translateY(".concat(-function(e,t,n){let a=e,o=0;for(;(a+10)%10!==t;)a+=n,o+=n;return o}(s,l,c),"00%)")}}return a.createElement("span",{className:"".concat(o,"-only"),style:n,onTransitionEnd:p},t)},z=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(e);ot.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};let S=a.forwardRef((e,t)=>{let{prefixCls:n,count:o,className:c,motionClassName:l,style:d,title:u,show:m,component:p="sup",children:f}=e,b=z(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:g}=a.useContext(s.E_),v=g("scroll-number",n),h=Object.assign(Object.assign({},b),{"data-show":m,style:d,className:r()(v,c,l),title:u}),y=o;if(o&&Number(o)%1==0){let e=String(o).split("");y=a.createElement("bdi",null,e.map((t,n)=>a.createElement(j,{prefixCls:v,count:Number(o),value:t,key:e.length-n})))}return((null==d?void 0:d.borderColor)&&(h.style=Object.assign(Object.assign({},d),{boxShadow:"0 0 0 1px ".concat(d.borderColor," inset")})),f)?(0,i.Tm)(f,e=>({className:r()("".concat(v,"-custom-component"),null==e?void 0:e.className,l)})):a.createElement(p,Object.assign({},h,{ref:t}),y)});var I=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(e);ot.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};let M=a.forwardRef((e,t)=>{var n,o,d,u,m;let{prefixCls:p,scrollNumberPrefixCls:f,children:b,status:g,text:v,color:h,count:y=null,overflowCount:x=99,dot:k=!1,size:C="default",title:w,offset:N,style:O,className:Z,rootClassName:j,classNames:z,styles:M,showZero:R=!1}=e,A=I(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:T,direction:L,badge:B}=a.useContext(s.E_),P=T("badge",p),[H,K,V]=E(P),D=y>x?"".concat(x,"+"):y,W="0"===D||0===D||"0"===v||0===v,q=null===y||W&&!R,F=(null!=g||null!=h)&&q,G=null!=g||!W,_=k&&!W,X=_?"":D,Y=(0,a.useMemo)(()=>((null==X||""===X)&&(null==v||""===v)||W&&!R)&&!_,[X,W,R,_,v]),$=(0,a.useRef)(y);Y||($.current=y);let Q=$.current,J=(0,a.useRef)(X);Y||(J.current=X);let U=J.current,ee=(0,a.useRef)(_);Y||(ee.current=_);let et=(0,a.useMemo)(()=>{if(!N)return Object.assign(Object.assign({},null==B?void 0:B.style),O);let e={marginTop:N[1]};return"rtl"===L?e.left=Number.parseInt(N[0],10):e.right=-Number.parseInt(N[0],10),Object.assign(Object.assign(Object.assign({},e),null==B?void 0:B.style),O)},[L,N,O,null==B?void 0:B.style]),en=null!=w?w:"string"==typeof Q||"number"==typeof Q?Q:void 0,ea=!Y&&(0===v?R:!!v&&!0!==v),eo=ea?a.createElement("span",{className:"".concat(P,"-status-text")},v):null,er=Q&&"object"==typeof Q?(0,i.Tm)(Q,e=>({style:Object.assign(Object.assign({},et),e.style)})):void 0,ec=(0,l.o2)(h,!1),el=r()(null==z?void 0:z.indicator,null===(n=null==B?void 0:B.classNames)||void 0===n?void 0:n.indicator,{["".concat(P,"-status-dot")]:F,["".concat(P,"-status-").concat(g)]:!!g,["".concat(P,"-color-").concat(h)]:ec}),ei={};h&&!ec&&(ei.color=h,ei.background=h);let es=r()(P,{["".concat(P,"-status")]:F,["".concat(P,"-not-a-wrapper")]:!b,["".concat(P,"-rtl")]:"rtl"===L},Z,j,null==B?void 0:B.className,null===(o=null==B?void 0:B.classNames)||void 0===o?void 0:o.root,null==z?void 0:z.root,K,V);if(!b&&F&&(v||G||!q)){let e=et.color;return H(a.createElement("span",Object.assign({},A,{className:es,style:Object.assign(Object.assign(Object.assign({},null==M?void 0:M.root),null===(d=null==B?void 0:B.styles)||void 0===d?void 0:d.root),et)}),a.createElement("span",{className:el,style:Object.assign(Object.assign(Object.assign({},null==M?void 0:M.indicator),null===(u=null==B?void 0:B.styles)||void 0===u?void 0:u.indicator),ei)}),ea&&a.createElement("span",{style:{color:e},className:"".concat(P,"-status-text")},v)))}return H(a.createElement("span",Object.assign({ref:t},A,{className:es,style:Object.assign(Object.assign({},null===(m=null==B?void 0:B.styles)||void 0===m?void 0:m.root),null==M?void 0:M.root)}),b,a.createElement(c.ZP,{visible:!Y,motionName:"".concat(P,"-zoom"),motionAppear:!1,motionDeadline:1e3},e=>{var t,n;let{className:o}=e,c=T("scroll-number",f),l=ee.current,i=r()(null==z?void 0:z.indicator,null===(t=null==B?void 0:B.classNames)||void 0===t?void 0:t.indicator,{["".concat(P,"-dot")]:l,["".concat(P,"-count")]:!l,["".concat(P,"-count-sm")]:"small"===C,["".concat(P,"-multiple-words")]:!l&&U&&U.toString().length>1,["".concat(P,"-status-").concat(g)]:!!g,["".concat(P,"-color-").concat(h)]:ec}),s=Object.assign(Object.assign(Object.assign({},null==M?void 0:M.indicator),null===(n=null==B?void 0:B.styles)||void 0===n?void 0:n.indicator),et);return h&&!ec&&((s=s||{}).background=h),a.createElement(S,{prefixCls:c,show:!Y,motionClassName:o,className:i,count:U,title:en,style:s,key:"scrollNumber"},er)}),eo))});M.Ribbon=e=>{let{className:t,prefixCls:n,style:o,color:c,children:i,text:d,placement:u="end",rootClassName:m}=e,{getPrefixCls:p,direction:f}=a.useContext(s.E_),b=p("ribbon",n),g="".concat(b,"-wrapper"),[v,h,y]=O(b,g),x=(0,l.o2)(c,!1),k=r()(b,"".concat(b,"-placement-").concat(u),{["".concat(b,"-rtl")]:"rtl"===f,["".concat(b,"-color-").concat(c)]:x},t),C={},w={};return c&&!x&&(C.background=c,w.color=c),v(a.createElement("div",{className:r()(g,m,h,y)},i,a.createElement("div",{className:r()(k,h),style:Object.assign(Object.assign({},C),o)},a.createElement("span",{className:"".concat(b,"-text")},d),a.createElement("div",{className:"".concat(b,"-corner"),style:w}))))};var R=M},44851:function(e,t,n){n.d(t,{default:function(){return q}});var a=n(2265),o=n(77565),r=n(36760),c=n.n(r),l=n(1119),i=n(83145),s=n(26365),d=n(41154),u=n(50506),m=n(32559),p=n(6989),f=n(45287),b=n(31686),g=n(11993),v=n(66632),h=n(95814),y=a.forwardRef(function(e,t){var n=e.prefixCls,o=e.forceRender,r=e.className,l=e.style,i=e.children,d=e.isActive,u=e.role,m=e.classNames,p=e.styles,f=a.useState(d||o),b=(0,s.Z)(f,2),v=b[0],h=b[1];return(a.useEffect(function(){(o||d)&&h(!0)},[o,d]),v)?a.createElement("div",{ref:t,className:c()("".concat(n,"-content"),(0,g.Z)((0,g.Z)({},"".concat(n,"-content-active"),d),"".concat(n,"-content-inactive"),!d),r),style:l,role:u},a.createElement("div",{className:c()("".concat(n,"-content-box"),null==m?void 0:m.body),style:null==p?void 0:p.body},i)):null});y.displayName="PanelContent";var x=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],k=a.forwardRef(function(e,t){var n=e.showArrow,o=e.headerClass,r=e.isActive,i=e.onItemClick,s=e.forceRender,d=e.className,u=e.classNames,m=void 0===u?{}:u,f=e.styles,k=void 0===f?{}:f,C=e.prefixCls,w=e.collapsible,E=e.accordion,N=e.panelKey,O=e.extra,Z=e.header,j=e.expandIcon,z=e.openMotion,S=e.destroyInactivePanel,I=e.children,M=(0,p.Z)(e,x),R="disabled"===w,A=(0,g.Z)((0,g.Z)((0,g.Z)({onClick:function(){null==i||i(N)},onKeyDown:function(e){("Enter"===e.key||e.keyCode===h.Z.ENTER||e.which===h.Z.ENTER)&&(null==i||i(N))},role:E?"tab":"button"},"aria-expanded",r),"aria-disabled",R),"tabIndex",R?-1:0),T="function"==typeof j?j(e):a.createElement("i",{className:"arrow"}),L=T&&a.createElement("div",(0,l.Z)({className:"".concat(C,"-expand-icon")},["header","icon"].includes(w)?A:{}),T),B=c()("".concat(C,"-item"),(0,g.Z)((0,g.Z)({},"".concat(C,"-item-active"),r),"".concat(C,"-item-disabled"),R),d),P=c()(o,"".concat(C,"-header"),(0,g.Z)({},"".concat(C,"-collapsible-").concat(w),!!w),m.header),H=(0,b.Z)({className:P,style:k.header},["header","icon"].includes(w)?{}:A);return a.createElement("div",(0,l.Z)({},M,{ref:t,className:B}),a.createElement("div",H,(void 0===n||n)&&L,a.createElement("span",(0,l.Z)({className:"".concat(C,"-header-text")},"header"===w?A:{}),Z),null!=O&&"boolean"!=typeof O&&a.createElement("div",{className:"".concat(C,"-extra")},O)),a.createElement(v.ZP,(0,l.Z)({visible:r,leavedClassName:"".concat(C,"-content-hidden")},z,{forceRender:s,removeOnLeave:S}),function(e,t){var n=e.className,o=e.style;return a.createElement(y,{ref:t,prefixCls:C,className:n,classNames:m,style:o,styles:k,isActive:r,forceRender:s,role:E?"tabpanel":void 0},I)}))}),C=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],w=function(e,t){var n=t.prefixCls,o=t.accordion,r=t.collapsible,c=t.destroyInactivePanel,i=t.onItemClick,s=t.activeKey,d=t.openMotion,u=t.expandIcon;return e.map(function(e,t){var m=e.children,f=e.label,b=e.key,g=e.collapsible,v=e.onItemClick,h=e.destroyInactivePanel,y=(0,p.Z)(e,C),x=String(null!=b?b:t),w=null!=g?g:r,E=!1;return E=o?s[0]===x:s.indexOf(x)>-1,a.createElement(k,(0,l.Z)({},y,{prefixCls:n,key:x,panelKey:x,isActive:E,accordion:o,openMotion:d,expandIcon:u,header:f,collapsible:w,onItemClick:function(e){"disabled"!==w&&(i(e),null==v||v(e))},destroyInactivePanel:null!=h?h:c}),m)})},E=function(e,t,n){if(!e)return null;var o=n.prefixCls,r=n.accordion,c=n.collapsible,l=n.destroyInactivePanel,i=n.onItemClick,s=n.activeKey,d=n.openMotion,u=n.expandIcon,m=e.key||String(t),p=e.props,f=p.header,b=p.headerClass,g=p.destroyInactivePanel,v=p.collapsible,h=p.onItemClick,y=!1;y=r?s[0]===m:s.indexOf(m)>-1;var x=null!=v?v:c,k={key:m,panelKey:m,header:f,headerClass:b,isActive:y,prefixCls:o,destroyInactivePanel:null!=g?g:l,openMotion:d,accordion:r,children:e.props.children,onItemClick:function(e){"disabled"!==x&&(i(e),null==h||h(e))},expandIcon:u,collapsible:x};return"string"==typeof e.type?e:(Object.keys(k).forEach(function(e){void 0===k[e]&&delete k[e]}),a.cloneElement(e,k))},N=n(18242);function O(e){var t=e;if(!Array.isArray(t)){var n=(0,d.Z)(t);t="number"===n||"string"===n?[t]:[]}return t.map(function(e){return String(e)})}var Z=Object.assign(a.forwardRef(function(e,t){var n,o=e.prefixCls,r=void 0===o?"rc-collapse":o,d=e.destroyInactivePanel,p=e.style,b=e.accordion,g=e.className,v=e.children,h=e.collapsible,y=e.openMotion,x=e.expandIcon,k=e.activeKey,C=e.defaultActiveKey,Z=e.onChange,j=e.items,z=c()(r,g),S=(0,u.Z)([],{value:k,onChange:function(e){return null==Z?void 0:Z(e)},defaultValue:C,postState:O}),I=(0,s.Z)(S,2),M=I[0],R=I[1];(0,m.ZP)(!v,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var A=(n={prefixCls:r,accordion:b,openMotion:y,expandIcon:x,collapsible:h,destroyInactivePanel:void 0!==d&&d,onItemClick:function(e){return R(function(){return b?M[0]===e?[]:[e]:M.indexOf(e)>-1?M.filter(function(t){return t!==e}):[].concat((0,i.Z)(M),[e])})},activeKey:M},Array.isArray(j)?w(j,n):(0,f.Z)(v).map(function(e,t){return E(e,t,n)}));return a.createElement("div",(0,l.Z)({ref:t,className:z,style:p,role:b?"tablist":void 0},(0,N.Z)(e,{aria:!0,data:!0})),A)}),{Panel:k});Z.Panel;var j=n(18694),z=n(68710),S=n(19722),I=n(71744),M=n(33759);let R=a.forwardRef((e,t)=>{let{getPrefixCls:n}=a.useContext(I.E_),{prefixCls:o,className:r,showArrow:l=!0}=e,i=n("collapse",o),s=c()({["".concat(i,"-no-arrow")]:!l},r);return a.createElement(Z.Panel,Object.assign({ref:t},e,{prefixCls:i,className:s}))});var A=n(93463),T=n(12918),L=n(63074),B=n(99320),P=n(71140);let H=e=>{let{componentCls:t,contentBg:n,padding:a,headerBg:o,headerPadding:r,collapseHeaderPaddingSM:c,collapseHeaderPaddingLG:l,collapsePanelBorderRadius:i,lineWidth:s,lineType:d,colorBorder:u,colorText:m,colorTextHeading:p,colorTextDisabled:f,fontSizeLG:b,lineHeight:g,lineHeightLG:v,marginSM:h,paddingSM:y,paddingLG:x,paddingXS:k,motionDurationSlow:C,fontSizeIcon:w,contentPadding:E,fontHeight:N,fontHeightLG:O}=e,Z="".concat((0,A.bf)(s)," ").concat(d," ").concat(u);return{[t]:Object.assign(Object.assign({},(0,T.Wf)(e)),{backgroundColor:o,border:Z,borderRadius:i,"&-rtl":{direction:"rtl"},["& > ".concat(t,"-item")]:{borderBottom:Z,"&:first-child":{["\n &,\n & > ".concat(t,"-header")]:{borderRadius:"".concat((0,A.bf)(i)," ").concat((0,A.bf)(i)," 0 0")}},"&:last-child":{["\n &,\n & > ".concat(t,"-header")]:{borderRadius:"0 0 ".concat((0,A.bf)(i)," ").concat((0,A.bf)(i))}},["> ".concat(t,"-header")]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:r,color:p,lineHeight:g,cursor:"pointer",transition:"all ".concat(C,", visibility 0s")},(0,T.Qy)(e)),{["> ".concat(t,"-header-text")]:{flex:"auto"},["".concat(t,"-expand-icon")]:{height:N,display:"flex",alignItems:"center",paddingInlineEnd:h},["".concat(t,"-arrow")]:Object.assign(Object.assign({},(0,T.Ro)()),{fontSize:w,transition:"transform ".concat(C),svg:{transition:"transform ".concat(C)}}),["".concat(t,"-header-text")]:{marginInlineEnd:"auto"}}),["".concat(t,"-collapsible-header")]:{cursor:"default",["".concat(t,"-header-text")]:{flex:"none",cursor:"pointer"},["".concat(t,"-expand-icon")]:{cursor:"pointer"}},["".concat(t,"-collapsible-icon")]:{cursor:"unset",["".concat(t,"-expand-icon")]:{cursor:"pointer"}}},["".concat(t,"-content")]:{color:m,backgroundColor:n,borderTop:Z,["& > ".concat(t,"-content-box")]:{padding:E},"&-hidden":{display:"none"}},"&-small":{["> ".concat(t,"-item")]:{["> ".concat(t,"-header")]:{padding:c,paddingInlineStart:k,["> ".concat(t,"-expand-icon")]:{marginInlineStart:e.calc(y).sub(k).equal()}},["> ".concat(t,"-content > ").concat(t,"-content-box")]:{padding:y}}},"&-large":{["> ".concat(t,"-item")]:{fontSize:b,lineHeight:v,["> ".concat(t,"-header")]:{padding:l,paddingInlineStart:a,["> ".concat(t,"-expand-icon")]:{height:O,marginInlineStart:e.calc(x).sub(a).equal()}},["> ".concat(t,"-content > ").concat(t,"-content-box")]:{padding:x}}},["".concat(t,"-item:last-child")]:{borderBottom:0,["> ".concat(t,"-content")]:{borderRadius:"0 0 ".concat((0,A.bf)(i)," ").concat((0,A.bf)(i))}},["& ".concat(t,"-item-disabled > ").concat(t,"-header")]:{"\n &,\n & > .arrow\n ":{color:f,cursor:"not-allowed"}},["&".concat(t,"-icon-position-end")]:{["& > ".concat(t,"-item")]:{["> ".concat(t,"-header")]:{["".concat(t,"-expand-icon")]:{order:1,paddingInlineEnd:0,paddingInlineStart:h}}}}})}},K=e=>{let{componentCls:t}=e,n="> ".concat(t,"-item > ").concat(t,"-header ").concat(t,"-arrow");return{["".concat(t,"-rtl")]:{[n]:{transform:"rotate(180deg)"}}}},V=e=>{let{componentCls:t,headerBg:n,borderlessContentPadding:a,borderlessContentBg:o,colorBorder:r}=e;return{["".concat(t,"-borderless")]:{backgroundColor:n,border:0,["> ".concat(t,"-item")]:{borderBottom:"1px solid ".concat(r)},["\n > ".concat(t,"-item:last-child,\n > ").concat(t,"-item:last-child ").concat(t,"-header\n ")]:{borderRadius:0},["> ".concat(t,"-item:last-child")]:{borderBottom:0},["> ".concat(t,"-item > ").concat(t,"-content")]:{backgroundColor:o,borderTop:0},["> ".concat(t,"-item > ").concat(t,"-content > ").concat(t,"-content-box")]:{padding:a}}}},D=e=>{let{componentCls:t,paddingSM:n}=e;return{["".concat(t,"-ghost")]:{backgroundColor:"transparent",border:0,["> ".concat(t,"-item")]:{borderBottom:0,["> ".concat(t,"-content")]:{backgroundColor:"transparent",border:0,["> ".concat(t,"-content-box")]:{paddingBlock:n}}}}}};var W=(0,B.I$)("Collapse",e=>{let t=(0,P.IX)(e,{collapseHeaderPaddingSM:"".concat((0,A.bf)(e.paddingXS)," ").concat((0,A.bf)(e.paddingSM)),collapseHeaderPaddingLG:"".concat((0,A.bf)(e.padding)," ").concat((0,A.bf)(e.paddingLG)),collapsePanelBorderRadius:e.borderRadiusLG});return[H(t),V(t),D(t),K(t),(0,L.Z)(t)]},e=>({headerPadding:"".concat(e.paddingSM,"px ").concat(e.padding,"px"),headerBg:e.colorFillAlter,contentPadding:"".concat(e.padding,"px 16px"),contentBg:e.colorBgContainer,borderlessContentPadding:"".concat(e.paddingXXS,"px 16px ").concat(e.padding,"px"),borderlessContentBg:"transparent"})),q=Object.assign(a.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,expandIcon:l,className:i,style:s}=(0,I.dj)("collapse"),{prefixCls:d,className:u,rootClassName:m,style:p,bordered:b=!0,ghost:g,size:v,expandIconPosition:h="start",children:y,destroyInactivePanel:x,destroyOnHidden:k,expandIcon:C}=e,w=(0,M.Z)(e=>{var t;return null!==(t=null!=v?v:e)&&void 0!==t?t:"middle"}),E=n("collapse",d),N=n(),[O,R,A]=W(E),T=a.useMemo(()=>"left"===h?"start":"right"===h?"end":h,[h]),L=null!=C?C:l,B=a.useCallback(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="function"==typeof L?L(e):a.createElement(o.Z,{rotate:e.isActive?"rtl"===r?-90:90:void 0,"aria-label":e.isActive?"expanded":"collapsed"});return(0,S.Tm)(t,()=>{var e;return{className:c()(null===(e=t.props)||void 0===e?void 0:e.className,"".concat(E,"-arrow"))}})},[L,E,r]),P=c()("".concat(E,"-icon-position-").concat(T),{["".concat(E,"-borderless")]:!b,["".concat(E,"-rtl")]:"rtl"===r,["".concat(E,"-ghost")]:!!g,["".concat(E,"-").concat(w)]:"middle"!==w},i,u,m,R,A),H=a.useMemo(()=>Object.assign(Object.assign({},(0,z.Z)(N)),{motionAppear:!1,leavedClassName:"".concat(E,"-content-hidden")}),[N,E]),K=a.useMemo(()=>y?(0,f.Z)(y).map((e,t)=>{var n,a;let o=e.props;if(null==o?void 0:o.disabled){let r=null!==(n=e.key)&&void 0!==n?n:String(t),c=Object.assign(Object.assign({},(0,j.Z)(e.props,["disabled"])),{key:r,collapsible:null!==(a=o.collapsible)&&void 0!==a?a:"disabled"});return(0,S.Tm)(e,c)}return e}):null,[y]);return O(a.createElement(Z,Object.assign({ref:t,openMotion:H},(0,j.Z)(e,["rootClassName"]),{expandIcon:B,prefixCls:E,className:P,style:Object.assign(Object.assign({},s),p),destroyInactivePanel:null!=k?k:x}),K))}),{Panel:R})}}]);
\ No newline at end of file
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5188,4851],{37527:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z"}}]},name:"bank",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},9775:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},49634:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},5540:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},64739:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},48231:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z"}}]},name:"line-chart",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},69993:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},40312:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z"}}]},name:"shopping-cart",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},71891:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm62.6-651.7l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9zm60.16 186.23a48 48 0 1067.88-67.89 48 48 0 10-67.88 67.89zM889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z"}}]},name:"tags",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},41361:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},59664:function(e,t,n){n.d(t,{Z:function(){return O}});var o=n(5853),a=n(2265),r=n(47625),c=n(93765),l=n(54061),i=n(97059),s=n(62994),d=n(25311),u=(0,c.z)({chartName:"LineChart",GraphicalChild:l.x,axisComponents:[{axisType:"xAxis",AxisComp:i.K},{axisType:"yAxis",AxisComp:s.B}],formatAxisMap:d.t9}),m=n(56940),f=n(26680),b=n(8147),p=n(22190),g=n(81889),v=n(65278),h=n(98593),y=n(92666),x=n(32644),k=n(7084),C=n(26898),w=n(13241),E=n(1153);let O=a.forwardRef((e,t)=>{let{data:n=[],categories:c=[],index:d,colors:O=C.s,valueFormatter:N=E.Cj,startEndOnly:j=!1,showXAxis:Z=!0,showYAxis:S=!0,yAxisWidth:z=56,intervalType:I="equidistantPreserveStart",animationDuration:M=900,showAnimation:B=!1,showTooltip:T=!0,showLegend:A=!0,showGridLines:R=!0,autoMinValue:L=!1,curveType:P="linear",minValue:H,maxValue:K,connectNulls:V=!1,allowDecimals:D=!0,noDataText:F,className:W,onValueChange:q,enableLegendSlider:_=!1,customTooltip:X,rotateLabelX:G,padding:Y=Z||S?{left:20,right:20}:{left:0,right:0},tickGap:Q=5,xAxisLabel:$,yAxisLabel:J}=e,U=(0,o._T)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","padding","tickGap","xAxisLabel","yAxisLabel"]),[ee,et]=(0,a.useState)(60),[en,eo]=(0,a.useState)(void 0),[ea,er]=(0,a.useState)(void 0),ec=(0,x.me)(c,O),el=(0,x.i4)(L,H,K),ei=!!q;function es(e){ei&&(e===ea&&!en||(0,x.FB)(n,e)&&en&&en.dataKey===e?(er(void 0),null==q||q(null)):(er(e),null==q||q({eventType:"category",categoryClicked:e})),eo(void 0))}return a.createElement("div",Object.assign({ref:t,className:(0,w.q)("w-full h-80",W)},U),a.createElement(r.h,{className:"h-full w-full"},(null==n?void 0:n.length)?a.createElement(u,{data:n,onClick:ei&&(ea||en)?()=>{eo(void 0),er(void 0),null==q||q(null)}:void 0,margin:{bottom:$?30:void 0,left:J?20:void 0,right:J?5:void 0,top:5}},R?a.createElement(m.q,{className:(0,w.q)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,a.createElement(i.K,{padding:Y,hide:!Z,dataKey:d,interval:j?"preserveStartEnd":I,tick:{transform:"translate(0, 6)"},ticks:j?[n[0][d],n[n.length-1][d]]:void 0,fill:"",stroke:"",className:(0,w.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:Q,angle:null==G?void 0:G.angle,dy:null==G?void 0:G.verticalShift,height:null==G?void 0:G.xAxisHeight},$&&a.createElement(f._,{position:"insideBottom",offset:-20,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},$)),a.createElement(s.B,{width:z,hide:!S,axisLine:!1,tickLine:!1,type:"number",domain:el,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,w.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:N,allowDecimals:D},J&&a.createElement(f._,{position:"insideLeft",style:{textAnchor:"middle"},angle:-90,offset:-15,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},J)),a.createElement(b.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:T?e=>{let{active:t,payload:n,label:o}=e;return X?a.createElement(X,{payload:null==n?void 0:n.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=ec.get(e.dataKey))&&void 0!==t?t:k.fr.Gray})}),active:t,label:o}):a.createElement(h.ZP,{active:t,payload:n,label:o,valueFormatter:N,categoryColors:ec})}:a.createElement(a.Fragment,null),position:{y:0}}),A?a.createElement(p.D,{verticalAlign:"top",height:ee,content:e=>{let{payload:t}=e;return(0,v.Z)({payload:t},ec,et,ea,ei?e=>es(e):void 0,_)}}):null,c.map(e=>{var t;return a.createElement(l.x,{className:(0,w.q)((0,E.bM)(null!==(t=ec.get(e))&&void 0!==t?t:k.fr.Gray,C.K.text).strokeColor),strokeOpacity:en||ea&&ea!==e?.3:1,activeDot:e=>{var t;let{cx:o,cy:r,stroke:c,strokeLinecap:l,strokeLinejoin:i,strokeWidth:s,dataKey:d}=e;return a.createElement(g.o,{className:(0,w.q)("stroke-tremor-background dark:stroke-dark-tremor-background",q?"cursor-pointer":"",(0,E.bM)(null!==(t=ec.get(d))&&void 0!==t?t:k.fr.Gray,C.K.text).fillColor),cx:o,cy:r,r:5,fill:"",stroke:c,strokeLinecap:l,strokeLinejoin:i,strokeWidth:s,onClick:(t,o)=>{o.stopPropagation(),ei&&(e.index===(null==en?void 0:en.index)&&e.dataKey===(null==en?void 0:en.dataKey)||(0,x.FB)(n,e.dataKey)&&ea&&ea===e.dataKey?(er(void 0),eo(void 0),null==q||q(null)):(er(e.dataKey),eo({index:e.index,dataKey:e.dataKey}),null==q||q(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var o;let{stroke:r,strokeLinecap:c,strokeLinejoin:l,strokeWidth:i,cx:s,cy:d,dataKey:u,index:m}=t;return(0,x.FB)(n,e)&&!(en||ea&&ea!==e)||(null==en?void 0:en.index)===m&&(null==en?void 0:en.dataKey)===e?a.createElement(g.o,{key:m,cx:s,cy:d,r:5,stroke:r,fill:"",strokeLinecap:c,strokeLinejoin:l,strokeWidth:i,className:(0,w.q)("stroke-tremor-background dark:stroke-dark-tremor-background",q?"cursor-pointer":"",(0,E.bM)(null!==(o=ec.get(u))&&void 0!==o?o:k.fr.Gray,C.K.text).fillColor)}):a.createElement(a.Fragment,{key:m})},key:e,name:e,type:P,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:B,animationDuration:M,connectNulls:V})}),q?c.map(e=>a.createElement(l.x,{className:(0,w.q)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:P,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:V,onClick:(e,t)=>{t.stopPropagation();let{name:n}=e;es(n)}})):null):a.createElement(y.Z,{noDataText:F})))});O.displayName="LineChart"},94789:function(e,t,n){n.d(t,{Z:function(){return s}});var o=n(5853),a=n(2265),r=n(26898),c=n(13241),l=n(1153);let i=(0,l.fn)("Callout"),s=a.forwardRef((e,t)=>{let{title:n,icon:s,color:d,className:u,children:m}=e,f=(0,o._T)(e,["title","icon","color","className","children"]);return a.createElement("div",Object.assign({ref:t,className:(0,c.q)(i("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",d?(0,c.q)((0,l.bM)(d,r.K.background).bgColor,(0,l.bM)(d,r.K.darkBorder).borderColor,(0,l.bM)(d,r.K.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,c.q)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),u)},f),a.createElement("div",{className:(0,c.q)(i("header"),"flex items-start")},s?a.createElement(s,{className:(0,c.q)(i("icon"),"flex-none h-5 w-5 mr-1.5")}):null,a.createElement("h4",{className:(0,c.q)(i("title"),"font-semibold")},n)),a.createElement("p",{className:(0,c.q)(i("body"),"overflow-y-auto",m?"mt-2":"")},m))});s.displayName="Callout"},35829:function(e,t,n){n.d(t,{Z:function(){return i}});var o=n(5853),a=n(26898),r=n(13241),c=n(1153),l=n(2265);let i=l.forwardRef((e,t)=>{let{color:n,children:i,className:s}=e,d=(0,o._T)(e,["color","children","className"]);return l.createElement("p",Object.assign({ref:t,className:(0,r.q)("font-semibold text-tremor-metric",n?(0,c.bM)(n,a.K.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",s)},d),i)});i.displayName="Metric"},33866:function(e,t,n){n.d(t,{Z:function(){return B}});var o=n(2265),a=n(36760),r=n.n(a),c=n(66632),l=n(93350),i=n(19722),s=n(71744),d=n(93463),u=n(12918),m=n(18536),f=n(71140),b=n(99320);let p=new d.E4("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),g=new d.E4("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),v=new d.E4("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),h=new d.E4("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),y=new d.E4("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),x=new d.E4("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),k=e=>{let{componentCls:t,iconCls:n,antCls:o,badgeShadowSize:a,textFontSize:r,textFontSizeSM:c,statusSize:l,dotSize:i,textFontWeight:s,indicatorHeight:f,indicatorHeightSM:b,marginXS:k,calc:C}=e,w="".concat(o,"-scroll-number"),E=(0,m.Z)(e,(e,n)=>{let{darkColor:o}=n;return{["&".concat(t," ").concat(t,"-color-").concat(e)]:{background:o,["&:not(".concat(t,"-count)")]:{color:o},"a:hover &":{background:o}}}});return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.Wf)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,["".concat(t,"-count")]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:f,height:f,color:e.badgeTextColor,fontWeight:s,fontSize:r,lineHeight:(0,d.bf)(f),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:C(f).div(2).equal(),boxShadow:"0 0 0 ".concat((0,d.bf)(a)," ").concat(e.badgeShadowColor),transition:"background ".concat(e.motionDurationMid),a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},["".concat(t,"-count-sm")]:{minWidth:b,height:b,fontSize:c,lineHeight:(0,d.bf)(b),borderRadius:C(b).div(2).equal()},["".concat(t,"-multiple-words")]:{padding:"0 ".concat((0,d.bf)(e.paddingXS)),bdi:{unicodeBidi:"plaintext"}},["".concat(t,"-dot")]:{zIndex:e.indicatorZIndex,width:i,minWidth:i,height:i,background:e.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat((0,d.bf)(a)," ").concat(e.badgeShadowColor)},["".concat(t,"-count, ").concat(t,"-dot, ").concat(w,"-custom-component")]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",["&".concat(n,"-spin")]:{animationName:x,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&".concat(t,"-status")]:{lineHeight:"inherit",verticalAlign:"baseline",["".concat(t,"-status-dot")]:{position:"relative",top:-1,display:"inline-block",width:l,height:l,verticalAlign:"middle",borderRadius:"50%"},["".concat(t,"-status-success")]:{backgroundColor:e.colorSuccess},["".concat(t,"-status-processing")]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:a,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:p,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},["".concat(t,"-status-default")]:{backgroundColor:e.colorTextPlaceholder},["".concat(t,"-status-error")]:{backgroundColor:e.colorError},["".concat(t,"-status-warning")]:{backgroundColor:e.colorWarning},["".concat(t,"-status-text")]:{marginInlineStart:k,color:e.colorText,fontSize:e.fontSize}}}),E),{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:g,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["".concat(t,"-zoom-leave")]:{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["&".concat(t,"-not-a-wrapper")]:{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:h,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["".concat(t,"-zoom-leave")]:{animationName:y,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["&:not(".concat(t,"-status)")]:{verticalAlign:"middle"},["".concat(w,"-custom-component, ").concat(t,"-count")]:{transform:"none"},["".concat(w,"-custom-component, ").concat(w)]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[w]:{overflow:"hidden",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseOutBack),["".concat(w,"-only")]:{position:"relative",display:"inline-block",height:f,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",["> p".concat(w,"-only-unit")]:{height:f,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},["".concat(w,"-symbol")]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",["".concat(t,"-count, ").concat(t,"-dot, ").concat(w,"-custom-component")]:{transform:"translate(-50%, -50%)"}}})}},C=e=>{let{fontHeight:t,lineWidth:n,marginXS:o,colorBorderBg:a}=e,r=e.colorTextLightSolid,c=e.colorError,l=e.colorErrorHover;return(0,f.IX)(e,{badgeFontHeight:t,badgeShadowSize:n,badgeTextColor:r,badgeColor:c,badgeColorHover:l,badgeShadowColor:a,badgeProcessingDuration:"1.2s",badgeRibbonOffset:o,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},w=e=>{let{fontSize:t,lineHeight:n,fontSizeSM:o,lineWidth:a}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*n)-2*a,indicatorHeightSM:t,dotSize:o/2,textFontSize:o,textFontSizeSM:o,textFontWeight:"normal",statusSize:o/2}};var E=(0,b.I$)("Badge",e=>k(C(e)),w);let O=e=>{let{antCls:t,badgeFontHeight:n,marginXS:o,badgeRibbonOffset:a,calc:r}=e,c="".concat(t,"-ribbon"),l=(0,m.Z)(e,(e,t)=>{let{darkColor:n}=t;return{["&".concat(c,"-color-").concat(e)]:{background:n,color:n}}});return{["".concat(t,"-ribbon-wrapper")]:{position:"relative"},[c]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.Wf)(e)),{position:"absolute",top:o,padding:"0 ".concat((0,d.bf)(e.paddingXS)),color:e.colorPrimary,lineHeight:(0,d.bf)(n),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,["".concat(c,"-text")]:{color:e.badgeTextColor},["".concat(c,"-corner")]:{position:"absolute",top:"100%",width:a,height:a,color:"currentcolor",border:"".concat((0,d.bf)(r(a).div(2).equal())," solid"),transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),l),{["&".concat(c,"-placement-end")]:{insetInlineEnd:r(a).mul(-1).equal(),borderEndEndRadius:0,["".concat(c,"-corner")]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},["&".concat(c,"-placement-start")]:{insetInlineStart:r(a).mul(-1).equal(),borderEndStartRadius:0,["".concat(c,"-corner")]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}};var N=(0,b.I$)(["Badge","Ribbon"],e=>O(C(e)),w);let j=e=>{let t;let{prefixCls:n,value:a,current:c,offset:l=0}=e;return l&&(t={position:"absolute",top:"".concat(l,"00%"),left:0}),o.createElement("span",{style:t,className:r()("".concat(n,"-only-unit"),{current:c})},a)};var Z=e=>{let t,n;let{prefixCls:a,count:r,value:c}=e,l=Number(c),i=Math.abs(r),[s,d]=o.useState(l),[u,m]=o.useState(i),f=()=>{d(l),m(i)};if(o.useEffect(()=>{let e=setTimeout(f,1e3);return()=>clearTimeout(e)},[l]),s===l||Number.isNaN(l)||Number.isNaN(s))t=[o.createElement(j,Object.assign({},e,{key:l,current:!0}))],n={transition:"none"};else{t=[];let a=l+10,r=[];for(let e=l;e<=a;e+=1)r.push(e);let c=ue%10===s);t=(c<0?r.slice(0,d+1):r.slice(d)).map((t,n)=>o.createElement(j,Object.assign({},e,{key:t,value:t%10,offset:c<0?n-d:n,current:n===d}))),n={transform:"translateY(".concat(-function(e,t,n){let o=e,a=0;for(;(o+10)%10!==t;)o+=n,a+=n;return a}(s,l,c),"00%)")}}return o.createElement("span",{className:"".concat(a,"-only"),style:n,onTransitionEnd:f},t)},S=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let z=o.forwardRef((e,t)=>{let{prefixCls:n,count:a,className:c,motionClassName:l,style:d,title:u,show:m,component:f="sup",children:b}=e,p=S(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:g}=o.useContext(s.E_),v=g("scroll-number",n),h=Object.assign(Object.assign({},p),{"data-show":m,style:d,className:r()(v,c,l),title:u}),y=a;if(a&&Number(a)%1==0){let e=String(a).split("");y=o.createElement("bdi",null,e.map((t,n)=>o.createElement(Z,{prefixCls:v,count:Number(a),value:t,key:e.length-n})))}return((null==d?void 0:d.borderColor)&&(h.style=Object.assign(Object.assign({},d),{boxShadow:"0 0 0 1px ".concat(d.borderColor," inset")})),b)?(0,i.Tm)(b,e=>({className:r()("".concat(v,"-custom-component"),null==e?void 0:e.className,l)})):o.createElement(f,Object.assign({},h,{ref:t}),y)});var I=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let M=o.forwardRef((e,t)=>{var n,a,d,u,m;let{prefixCls:f,scrollNumberPrefixCls:b,children:p,status:g,text:v,color:h,count:y=null,overflowCount:x=99,dot:k=!1,size:C="default",title:w,offset:O,style:N,className:j,rootClassName:Z,classNames:S,styles:M,showZero:B=!1}=e,T=I(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:A,direction:R,badge:L}=o.useContext(s.E_),P=A("badge",f),[H,K,V]=E(P),D=y>x?"".concat(x,"+"):y,F="0"===D||0===D||"0"===v||0===v,W=null===y||F&&!B,q=(null!=g||null!=h)&&W,_=null!=g||!F,X=k&&!F,G=X?"":D,Y=(0,o.useMemo)(()=>((null==G||""===G)&&(null==v||""===v)||F&&!B)&&!X,[G,F,B,X,v]),Q=(0,o.useRef)(y);Y||(Q.current=y);let $=Q.current,J=(0,o.useRef)(G);Y||(J.current=G);let U=J.current,ee=(0,o.useRef)(X);Y||(ee.current=X);let et=(0,o.useMemo)(()=>{if(!O)return Object.assign(Object.assign({},null==L?void 0:L.style),N);let e={marginTop:O[1]};return"rtl"===R?e.left=Number.parseInt(O[0],10):e.right=-Number.parseInt(O[0],10),Object.assign(Object.assign(Object.assign({},e),null==L?void 0:L.style),N)},[R,O,N,null==L?void 0:L.style]),en=null!=w?w:"string"==typeof $||"number"==typeof $?$:void 0,eo=!Y&&(0===v?B:!!v&&!0!==v),ea=eo?o.createElement("span",{className:"".concat(P,"-status-text")},v):null,er=$&&"object"==typeof $?(0,i.Tm)($,e=>({style:Object.assign(Object.assign({},et),e.style)})):void 0,ec=(0,l.o2)(h,!1),el=r()(null==S?void 0:S.indicator,null===(n=null==L?void 0:L.classNames)||void 0===n?void 0:n.indicator,{["".concat(P,"-status-dot")]:q,["".concat(P,"-status-").concat(g)]:!!g,["".concat(P,"-color-").concat(h)]:ec}),ei={};h&&!ec&&(ei.color=h,ei.background=h);let es=r()(P,{["".concat(P,"-status")]:q,["".concat(P,"-not-a-wrapper")]:!p,["".concat(P,"-rtl")]:"rtl"===R},j,Z,null==L?void 0:L.className,null===(a=null==L?void 0:L.classNames)||void 0===a?void 0:a.root,null==S?void 0:S.root,K,V);if(!p&&q&&(v||_||!W)){let e=et.color;return H(o.createElement("span",Object.assign({},T,{className:es,style:Object.assign(Object.assign(Object.assign({},null==M?void 0:M.root),null===(d=null==L?void 0:L.styles)||void 0===d?void 0:d.root),et)}),o.createElement("span",{className:el,style:Object.assign(Object.assign(Object.assign({},null==M?void 0:M.indicator),null===(u=null==L?void 0:L.styles)||void 0===u?void 0:u.indicator),ei)}),eo&&o.createElement("span",{style:{color:e},className:"".concat(P,"-status-text")},v)))}return H(o.createElement("span",Object.assign({ref:t},T,{className:es,style:Object.assign(Object.assign({},null===(m=null==L?void 0:L.styles)||void 0===m?void 0:m.root),null==M?void 0:M.root)}),p,o.createElement(c.ZP,{visible:!Y,motionName:"".concat(P,"-zoom"),motionAppear:!1,motionDeadline:1e3},e=>{var t,n;let{className:a}=e,c=A("scroll-number",b),l=ee.current,i=r()(null==S?void 0:S.indicator,null===(t=null==L?void 0:L.classNames)||void 0===t?void 0:t.indicator,{["".concat(P,"-dot")]:l,["".concat(P,"-count")]:!l,["".concat(P,"-count-sm")]:"small"===C,["".concat(P,"-multiple-words")]:!l&&U&&U.toString().length>1,["".concat(P,"-status-").concat(g)]:!!g,["".concat(P,"-color-").concat(h)]:ec}),s=Object.assign(Object.assign(Object.assign({},null==M?void 0:M.indicator),null===(n=null==L?void 0:L.styles)||void 0===n?void 0:n.indicator),et);return h&&!ec&&((s=s||{}).background=h),o.createElement(z,{prefixCls:c,show:!Y,motionClassName:a,className:i,count:U,title:en,style:s,key:"scrollNumber"},er)}),ea))});M.Ribbon=e=>{let{className:t,prefixCls:n,style:a,color:c,children:i,text:d,placement:u="end",rootClassName:m}=e,{getPrefixCls:f,direction:b}=o.useContext(s.E_),p=f("ribbon",n),g="".concat(p,"-wrapper"),[v,h,y]=N(p,g),x=(0,l.o2)(c,!1),k=r()(p,"".concat(p,"-placement-").concat(u),{["".concat(p,"-rtl")]:"rtl"===b,["".concat(p,"-color-").concat(c)]:x},t),C={},w={};return c&&!x&&(C.background=c,w.color=c),v(o.createElement("div",{className:r()(g,m,h,y)},i,o.createElement("div",{className:r()(k,h),style:Object.assign(Object.assign({},C),a)},o.createElement("span",{className:"".concat(p,"-text")},d),o.createElement("div",{className:"".concat(p,"-corner"),style:w}))))};var B=M},44851:function(e,t,n){n.d(t,{default:function(){return W}});var o=n(2265),a=n(77565),r=n(36760),c=n.n(r),l=n(1119),i=n(83145),s=n(26365),d=n(41154),u=n(50506),m=n(32559),f=n(6989),b=n(45287),p=n(31686),g=n(11993),v=n(66632),h=n(95814),y=o.forwardRef(function(e,t){var n=e.prefixCls,a=e.forceRender,r=e.className,l=e.style,i=e.children,d=e.isActive,u=e.role,m=e.classNames,f=e.styles,b=o.useState(d||a),p=(0,s.Z)(b,2),v=p[0],h=p[1];return(o.useEffect(function(){(a||d)&&h(!0)},[a,d]),v)?o.createElement("div",{ref:t,className:c()("".concat(n,"-content"),(0,g.Z)((0,g.Z)({},"".concat(n,"-content-active"),d),"".concat(n,"-content-inactive"),!d),r),style:l,role:u},o.createElement("div",{className:c()("".concat(n,"-content-box"),null==m?void 0:m.body),style:null==f?void 0:f.body},i)):null});y.displayName="PanelContent";var x=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],k=o.forwardRef(function(e,t){var n=e.showArrow,a=e.headerClass,r=e.isActive,i=e.onItemClick,s=e.forceRender,d=e.className,u=e.classNames,m=void 0===u?{}:u,b=e.styles,k=void 0===b?{}:b,C=e.prefixCls,w=e.collapsible,E=e.accordion,O=e.panelKey,N=e.extra,j=e.header,Z=e.expandIcon,S=e.openMotion,z=e.destroyInactivePanel,I=e.children,M=(0,f.Z)(e,x),B="disabled"===w,T=(0,g.Z)((0,g.Z)((0,g.Z)({onClick:function(){null==i||i(O)},onKeyDown:function(e){("Enter"===e.key||e.keyCode===h.Z.ENTER||e.which===h.Z.ENTER)&&(null==i||i(O))},role:E?"tab":"button"},"aria-expanded",r),"aria-disabled",B),"tabIndex",B?-1:0),A="function"==typeof Z?Z(e):o.createElement("i",{className:"arrow"}),R=A&&o.createElement("div",(0,l.Z)({className:"".concat(C,"-expand-icon")},["header","icon"].includes(w)?T:{}),A),L=c()("".concat(C,"-item"),(0,g.Z)((0,g.Z)({},"".concat(C,"-item-active"),r),"".concat(C,"-item-disabled"),B),d),P=c()(a,"".concat(C,"-header"),(0,g.Z)({},"".concat(C,"-collapsible-").concat(w),!!w),m.header),H=(0,p.Z)({className:P,style:k.header},["header","icon"].includes(w)?{}:T);return o.createElement("div",(0,l.Z)({},M,{ref:t,className:L}),o.createElement("div",H,(void 0===n||n)&&R,o.createElement("span",(0,l.Z)({className:"".concat(C,"-header-text")},"header"===w?T:{}),j),null!=N&&"boolean"!=typeof N&&o.createElement("div",{className:"".concat(C,"-extra")},N)),o.createElement(v.ZP,(0,l.Z)({visible:r,leavedClassName:"".concat(C,"-content-hidden")},S,{forceRender:s,removeOnLeave:z}),function(e,t){var n=e.className,a=e.style;return o.createElement(y,{ref:t,prefixCls:C,className:n,classNames:m,style:a,styles:k,isActive:r,forceRender:s,role:E?"tabpanel":void 0},I)}))}),C=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],w=function(e,t){var n=t.prefixCls,a=t.accordion,r=t.collapsible,c=t.destroyInactivePanel,i=t.onItemClick,s=t.activeKey,d=t.openMotion,u=t.expandIcon;return e.map(function(e,t){var m=e.children,b=e.label,p=e.key,g=e.collapsible,v=e.onItemClick,h=e.destroyInactivePanel,y=(0,f.Z)(e,C),x=String(null!=p?p:t),w=null!=g?g:r,E=!1;return E=a?s[0]===x:s.indexOf(x)>-1,o.createElement(k,(0,l.Z)({},y,{prefixCls:n,key:x,panelKey:x,isActive:E,accordion:a,openMotion:d,expandIcon:u,header:b,collapsible:w,onItemClick:function(e){"disabled"!==w&&(i(e),null==v||v(e))},destroyInactivePanel:null!=h?h:c}),m)})},E=function(e,t,n){if(!e)return null;var a=n.prefixCls,r=n.accordion,c=n.collapsible,l=n.destroyInactivePanel,i=n.onItemClick,s=n.activeKey,d=n.openMotion,u=n.expandIcon,m=e.key||String(t),f=e.props,b=f.header,p=f.headerClass,g=f.destroyInactivePanel,v=f.collapsible,h=f.onItemClick,y=!1;y=r?s[0]===m:s.indexOf(m)>-1;var x=null!=v?v:c,k={key:m,panelKey:m,header:b,headerClass:p,isActive:y,prefixCls:a,destroyInactivePanel:null!=g?g:l,openMotion:d,accordion:r,children:e.props.children,onItemClick:function(e){"disabled"!==x&&(i(e),null==h||h(e))},expandIcon:u,collapsible:x};return"string"==typeof e.type?e:(Object.keys(k).forEach(function(e){void 0===k[e]&&delete k[e]}),o.cloneElement(e,k))},O=n(18242);function N(e){var t=e;if(!Array.isArray(t)){var n=(0,d.Z)(t);t="number"===n||"string"===n?[t]:[]}return t.map(function(e){return String(e)})}var j=Object.assign(o.forwardRef(function(e,t){var n,a=e.prefixCls,r=void 0===a?"rc-collapse":a,d=e.destroyInactivePanel,f=e.style,p=e.accordion,g=e.className,v=e.children,h=e.collapsible,y=e.openMotion,x=e.expandIcon,k=e.activeKey,C=e.defaultActiveKey,j=e.onChange,Z=e.items,S=c()(r,g),z=(0,u.Z)([],{value:k,onChange:function(e){return null==j?void 0:j(e)},defaultValue:C,postState:N}),I=(0,s.Z)(z,2),M=I[0],B=I[1];(0,m.ZP)(!v,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var T=(n={prefixCls:r,accordion:p,openMotion:y,expandIcon:x,collapsible:h,destroyInactivePanel:void 0!==d&&d,onItemClick:function(e){return B(function(){return p?M[0]===e?[]:[e]:M.indexOf(e)>-1?M.filter(function(t){return t!==e}):[].concat((0,i.Z)(M),[e])})},activeKey:M},Array.isArray(Z)?w(Z,n):(0,b.Z)(v).map(function(e,t){return E(e,t,n)}));return o.createElement("div",(0,l.Z)({ref:t,className:S,style:f,role:p?"tablist":void 0},(0,O.Z)(e,{aria:!0,data:!0})),T)}),{Panel:k});j.Panel;var Z=n(18694),S=n(68710),z=n(19722),I=n(71744),M=n(33759);let B=o.forwardRef((e,t)=>{let{getPrefixCls:n}=o.useContext(I.E_),{prefixCls:a,className:r,showArrow:l=!0}=e,i=n("collapse",a),s=c()({["".concat(i,"-no-arrow")]:!l},r);return o.createElement(j.Panel,Object.assign({ref:t},e,{prefixCls:i,className:s}))});var T=n(93463),A=n(12918),R=n(63074),L=n(99320),P=n(71140);let H=e=>{let{componentCls:t,contentBg:n,padding:o,headerBg:a,headerPadding:r,collapseHeaderPaddingSM:c,collapseHeaderPaddingLG:l,collapsePanelBorderRadius:i,lineWidth:s,lineType:d,colorBorder:u,colorText:m,colorTextHeading:f,colorTextDisabled:b,fontSizeLG:p,lineHeight:g,lineHeightLG:v,marginSM:h,paddingSM:y,paddingLG:x,paddingXS:k,motionDurationSlow:C,fontSizeIcon:w,contentPadding:E,fontHeight:O,fontHeightLG:N}=e,j="".concat((0,T.bf)(s)," ").concat(d," ").concat(u);return{[t]:Object.assign(Object.assign({},(0,A.Wf)(e)),{backgroundColor:a,border:j,borderRadius:i,"&-rtl":{direction:"rtl"},["& > ".concat(t,"-item")]:{borderBottom:j,"&:first-child":{["\n &,\n & > ".concat(t,"-header")]:{borderRadius:"".concat((0,T.bf)(i)," ").concat((0,T.bf)(i)," 0 0")}},"&:last-child":{["\n &,\n & > ".concat(t,"-header")]:{borderRadius:"0 0 ".concat((0,T.bf)(i)," ").concat((0,T.bf)(i))}},["> ".concat(t,"-header")]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:r,color:f,lineHeight:g,cursor:"pointer",transition:"all ".concat(C,", visibility 0s")},(0,A.Qy)(e)),{["> ".concat(t,"-header-text")]:{flex:"auto"},["".concat(t,"-expand-icon")]:{height:O,display:"flex",alignItems:"center",paddingInlineEnd:h},["".concat(t,"-arrow")]:Object.assign(Object.assign({},(0,A.Ro)()),{fontSize:w,transition:"transform ".concat(C),svg:{transition:"transform ".concat(C)}}),["".concat(t,"-header-text")]:{marginInlineEnd:"auto"}}),["".concat(t,"-collapsible-header")]:{cursor:"default",["".concat(t,"-header-text")]:{flex:"none",cursor:"pointer"},["".concat(t,"-expand-icon")]:{cursor:"pointer"}},["".concat(t,"-collapsible-icon")]:{cursor:"unset",["".concat(t,"-expand-icon")]:{cursor:"pointer"}}},["".concat(t,"-content")]:{color:m,backgroundColor:n,borderTop:j,["& > ".concat(t,"-content-box")]:{padding:E},"&-hidden":{display:"none"}},"&-small":{["> ".concat(t,"-item")]:{["> ".concat(t,"-header")]:{padding:c,paddingInlineStart:k,["> ".concat(t,"-expand-icon")]:{marginInlineStart:e.calc(y).sub(k).equal()}},["> ".concat(t,"-content > ").concat(t,"-content-box")]:{padding:y}}},"&-large":{["> ".concat(t,"-item")]:{fontSize:p,lineHeight:v,["> ".concat(t,"-header")]:{padding:l,paddingInlineStart:o,["> ".concat(t,"-expand-icon")]:{height:N,marginInlineStart:e.calc(x).sub(o).equal()}},["> ".concat(t,"-content > ").concat(t,"-content-box")]:{padding:x}}},["".concat(t,"-item:last-child")]:{borderBottom:0,["> ".concat(t,"-content")]:{borderRadius:"0 0 ".concat((0,T.bf)(i)," ").concat((0,T.bf)(i))}},["& ".concat(t,"-item-disabled > ").concat(t,"-header")]:{"\n &,\n & > .arrow\n ":{color:b,cursor:"not-allowed"}},["&".concat(t,"-icon-position-end")]:{["& > ".concat(t,"-item")]:{["> ".concat(t,"-header")]:{["".concat(t,"-expand-icon")]:{order:1,paddingInlineEnd:0,paddingInlineStart:h}}}}})}},K=e=>{let{componentCls:t}=e,n="> ".concat(t,"-item > ").concat(t,"-header ").concat(t,"-arrow");return{["".concat(t,"-rtl")]:{[n]:{transform:"rotate(180deg)"}}}},V=e=>{let{componentCls:t,headerBg:n,borderlessContentPadding:o,borderlessContentBg:a,colorBorder:r}=e;return{["".concat(t,"-borderless")]:{backgroundColor:n,border:0,["> ".concat(t,"-item")]:{borderBottom:"1px solid ".concat(r)},["\n > ".concat(t,"-item:last-child,\n > ").concat(t,"-item:last-child ").concat(t,"-header\n ")]:{borderRadius:0},["> ".concat(t,"-item:last-child")]:{borderBottom:0},["> ".concat(t,"-item > ").concat(t,"-content")]:{backgroundColor:a,borderTop:0},["> ".concat(t,"-item > ").concat(t,"-content > ").concat(t,"-content-box")]:{padding:o}}}},D=e=>{let{componentCls:t,paddingSM:n}=e;return{["".concat(t,"-ghost")]:{backgroundColor:"transparent",border:0,["> ".concat(t,"-item")]:{borderBottom:0,["> ".concat(t,"-content")]:{backgroundColor:"transparent",border:0,["> ".concat(t,"-content-box")]:{paddingBlock:n}}}}}};var F=(0,L.I$)("Collapse",e=>{let t=(0,P.IX)(e,{collapseHeaderPaddingSM:"".concat((0,T.bf)(e.paddingXS)," ").concat((0,T.bf)(e.paddingSM)),collapseHeaderPaddingLG:"".concat((0,T.bf)(e.padding)," ").concat((0,T.bf)(e.paddingLG)),collapsePanelBorderRadius:e.borderRadiusLG});return[H(t),V(t),D(t),K(t),(0,R.Z)(t)]},e=>({headerPadding:"".concat(e.paddingSM,"px ").concat(e.padding,"px"),headerBg:e.colorFillAlter,contentPadding:"".concat(e.padding,"px 16px"),contentBg:e.colorBgContainer,borderlessContentPadding:"".concat(e.paddingXXS,"px 16px ").concat(e.padding,"px"),borderlessContentBg:"transparent"})),W=Object.assign(o.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,expandIcon:l,className:i,style:s}=(0,I.dj)("collapse"),{prefixCls:d,className:u,rootClassName:m,style:f,bordered:p=!0,ghost:g,size:v,expandIconPosition:h="start",children:y,destroyInactivePanel:x,destroyOnHidden:k,expandIcon:C}=e,w=(0,M.Z)(e=>{var t;return null!==(t=null!=v?v:e)&&void 0!==t?t:"middle"}),E=n("collapse",d),O=n(),[N,B,T]=F(E),A=o.useMemo(()=>"left"===h?"start":"right"===h?"end":h,[h]),R=null!=C?C:l,L=o.useCallback(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="function"==typeof R?R(e):o.createElement(a.Z,{rotate:e.isActive?"rtl"===r?-90:90:void 0,"aria-label":e.isActive?"expanded":"collapsed"});return(0,z.Tm)(t,()=>{var e;return{className:c()(null===(e=t.props)||void 0===e?void 0:e.className,"".concat(E,"-arrow"))}})},[R,E,r]),P=c()("".concat(E,"-icon-position-").concat(A),{["".concat(E,"-borderless")]:!p,["".concat(E,"-rtl")]:"rtl"===r,["".concat(E,"-ghost")]:!!g,["".concat(E,"-").concat(w)]:"middle"!==w},i,u,m,B,T),H=o.useMemo(()=>Object.assign(Object.assign({},(0,S.Z)(O)),{motionAppear:!1,leavedClassName:"".concat(E,"-content-hidden")}),[O,E]),K=o.useMemo(()=>y?(0,b.Z)(y).map((e,t)=>{var n,o;let a=e.props;if(null==a?void 0:a.disabled){let r=null!==(n=e.key)&&void 0!==n?n:String(t),c=Object.assign(Object.assign({},(0,Z.Z)(e.props,["disabled"])),{key:r,collapsible:null!==(o=a.collapsible)&&void 0!==o?o:"disabled"});return(0,z.Tm)(e,c)}return e}):null,[y]);return N(o.createElement(j,Object.assign({ref:t,openMotion:H},(0,Z.Z)(e,["rootClassName"]),{expandIcon:L,prefixCls:E,className:P,style:Object.assign(Object.assign({},s),f),destroyInactivePanel:null!=k?k:x}),K))}),{Panel:B})},2651:function(e,t,n){n.d(t,{Z:function(){return y}});var o=n(93463),a=n(11938),r=n(70774),c=n(73602),l=n(91691),i=n(25119),s=n(37628),d=n(32417),u=n(4877),m=n(57943),f=n(12789),b=n(54558);let p=(e,t)=>new b.t(e).setA(t).toRgbString(),g=(e,t)=>new b.t(e).lighten(t).toHexString(),v=e=>{let t=(0,m.R_)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},h=(e,t)=>{let n=e||"#000",o=t||"#fff";return{colorBgBase:n,colorTextBase:o,colorText:p(o,.85),colorTextSecondary:p(o,.65),colorTextTertiary:p(o,.45),colorTextQuaternary:p(o,.25),colorFill:p(o,.18),colorFillSecondary:p(o,.12),colorFillTertiary:p(o,.08),colorFillQuaternary:p(o,.04),colorBgSolid:p(o,.95),colorBgSolidHover:p(o,1),colorBgSolidActive:p(o,.9),colorBgElevated:g(n,12),colorBgContainer:g(n,8),colorBgLayout:g(n,0),colorBgSpotlight:g(n,26),colorBgBlur:p(o,.04),colorBorder:g(n,26),colorBorderSecondary:g(n,19)}};var y={defaultSeed:i.u_.token,useToken:function(){let[e,t,n]=(0,l.ZP)();return{theme:e,token:t,hashId:n}},defaultAlgorithm:s.Z,darkAlgorithm:(e,t)=>{let n=Object.keys(r.M).map(t=>{let n=(0,m.R_)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,o,a)=>(e["".concat(t,"-").concat(a+1)]=n[a],e["".concat(t).concat(a+1)]=n[a],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),o=null!=t?t:(0,s.Z)(e),a=(0,f.Z)(e,{generateColorPalettes:v,generateNeutralColorPalettes:h});return Object.assign(Object.assign(Object.assign(Object.assign({},o),n),a),{colorPrimaryBg:a.colorPrimaryBorder,colorPrimaryBgHover:a.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let n=null!=t?t:(0,s.Z)(e),o=n.fontSizeSM,a=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),function(e){let{sizeUnit:t,sizeStep:n}=e,o=n-2;return{sizeXXL:t*(o+10),sizeXL:t*(o+6),sizeLG:t*(o+2),sizeMD:t*(o+2),sizeMS:t*(o+1),size:t*o,sizeSM:t*o,sizeXS:t*(o-1),sizeXXS:t*(o-1)}}(null!=t?t:e)),(0,u.Z)(o)),{controlHeight:a}),(0,d.Z)(Object.assign(Object.assign({},n),{controlHeight:a})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,o.jG)(e.algorithm):a.Z,n=Object.assign(Object.assign({},r.Z),null==e?void 0:e.token);return(0,o.t2)(n,{override:null==e?void 0:e.token},t,c.Z)},defaultConfig:i.u_,_internalContext:i.Mj}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5276-22fb90a28ebcab8b.js b/litellm/proxy/_experimental/out/_next/static/chunks/5276-22fb90a28ebcab8b.js
new file mode 100644
index 00000000000..1a53f7bde44
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/5276-22fb90a28ebcab8b.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5276],{44803:function(e,s,r){r.d(s,{Dx:function(){return a.Z},Zb:function(){return t.Z},xv:function(){return l.Z}});var t=r(12514),l=r(84264),a=r(96761)},48678:function(e,s,r){r.d(s,{d:function(){return e5},o:function(){return sr}});var t=r(57437),l=r(20347),a=r(67187),n=r(78489),i=r(12485),o=r(18135),c=r(35242),d=r(29706),u=r(77991),m=r(84264),x=r(96761),h=r(57840),p=r(37592),g=r(22116),j=r(76188),v=r(99981),f=r(2265),b=r(68474),y=r(11713),N=r(90246),_=r(19250),w=r(39760);let Z=(0,N.n)("mcpServerHealth"),C=e=>{let{accessToken:s}=(0,w.Z)();return(0,y.a)({queryKey:[...Z.lists(),{serverIds:e}],queryFn:async()=>await (0,_.fetchMCPServerHealth)(s,e),enabled:!!s,refetchInterval:3e4})};var S=r(9114),k=r(12322),A=r(10032),P=r(4260),M=r(15424),O=r(64504);let I={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",BASIC:"basic",OAUTH2:"oauth2"},T={SSE:"sse"},L=e=>(console.log(e),null==e)?T.SSE:e,E=e=>null==e?I.NONE:e;var z=r(12221),q=r(44851),U=r(33866),R=r(62670),V=r(58630),F=r(44803),B=e=>{let{value:s={},onChange:r,tools:l=[],disabled:a=!1}=e,n=(e,t)=>{let l={...s,tool_name_to_cost_per_query:{...s.tool_name_to_cost_per_query,[e]:t}};null==r||r(l)};return(0,t.jsx)(F.Zb,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,t.jsx)(R.Z,{className:"text-green-600"}),(0,t.jsx)(F.Dx,{children:"Cost Configuration"}),(0,t.jsx)(v.Z,{title:"Configure costs for this MCP server's tool calls. Set a default rate and per-tool overrides.",children:(0,t.jsx)(M.Z,{className:"text-gray-400"})})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Default Cost per Query ($)",(0,t.jsx)(v.Z,{title:"Default cost charged for each tool call to this server.",children:(0,t.jsx)(M.Z,{className:"ml-1 text-gray-400"})})]}),(0,t.jsx)(z.Z,{min:0,step:1e-4,precision:4,placeholder:"0.0000",value:s.default_cost_per_query,onChange:e=>{let t={...s,default_cost_per_query:e};null==r||r(t)},disabled:a,style:{width:"200px"},addonBefore:"$"}),(0,t.jsx)(F.xv,{className:"block mt-1 text-gray-500 text-sm",children:"Set a default cost for all tool calls to this server"})]}),l.length>0&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700",children:["Tool-Specific Costs ($)",(0,t.jsx)(v.Z,{title:"Override the default cost for specific tools. Leave blank to use the default rate.",children:(0,t.jsx)(M.Z,{className:"ml-1 text-gray-400"})})]}),(0,t.jsx)(q.default,{items:[{key:"1",label:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(V.Z,{className:"mr-2 text-blue-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Available Tools"}),(0,t.jsx)(U.Z,{count:l.length,style:{backgroundColor:"#52c41a",marginLeft:"8px"}})]}),children:(0,t.jsx)("div",{className:"space-y-3 max-h-64 overflow-y-auto",children:l.map((e,r)=>{var l;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(F.xv,{className:"font-medium text-gray-900",children:e.name}),e.description&&(0,t.jsx)(F.xv,{className:"text-gray-500 text-sm block mt-1",children:e.description})]}),(0,t.jsx)("div",{className:"ml-4",children:(0,t.jsx)(z.Z,{min:0,step:1e-4,precision:4,placeholder:"Use default",value:null===(l=s.tool_name_to_cost_per_query)||void 0===l?void 0:l[e.name],onChange:s=>n(e.name,s),disabled:a,style:{width:"120px"},addonBefore:"$"})})]},r)})})}]})]})]}),(s.default_cost_per_query||s.tool_name_to_cost_per_query&&Object.keys(s.tool_name_to_cost_per_query).length>0)&&(0,t.jsxs)("div",{className:"mt-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,t.jsx)(F.xv,{className:"text-blue-800 font-medium",children:"Cost Summary:"}),(0,t.jsxs)("div",{className:"mt-2 space-y-1",children:[s.default_cost_per_query&&(0,t.jsxs)(F.xv,{className:"text-blue-700",children:["• Default cost: $",s.default_cost_per_query.toFixed(4)," per query"]}),s.tool_name_to_cost_per_query&&Object.entries(s.tool_name_to_cost_per_query).map(e=>{let[s,r]=e;return null!=r&&(0,t.jsxs)(F.xv,{className:"text-blue-700",children:["• ",s,": $",r.toFixed(4)," per query"]},s)})]})]})]})})},D=r(10353),H=r(51653),K=r(5545),J=r(83669),G=r(29271),Y=r(89245);let W=e=>{var s,r;let{accessToken:t,oauthAccessToken:l,formValues:a,enabled:n=!0}=e,[i,o]=(0,f.useState)([]),[c,d]=(0,f.useState)(!1),[u,m]=(0,f.useState)(null),[x,h]=(0,f.useState)(null),[p,g]=(0,f.useState)(!1),j=a.auth_type===I.OAUTH2,v=!!(a.url&&a.transport&&a.auth_type&&t&&(!j||l)),b=JSON.stringify(null!==(s=a.static_headers)&&void 0!==s?s:{}),y=JSON.stringify(null!==(r=a.credentials)&&void 0!==r?r:{}),N=async()=>{if(t&&a.url&&(!j||l)){d(!0),m(null);try{let e=Array.isArray(a.static_headers)?a.static_headers.reduce((e,s)=>{var r;let t=null==s?void 0:null===(r=s.header)||void 0===r?void 0:r.trim();return t&&(e[t]=(null==s?void 0:s.value)!=null?String(s.value):""),e},{}):!Array.isArray(a.static_headers)&&a.static_headers&&"object"==typeof a.static_headers?Object.entries(a.static_headers).reduce((e,s)=>{let[r,t]=s;return r&&(e[r]=null!=t?String(t):""),e},{}):{},s=a.credentials&&"object"==typeof a.credentials?Object.entries(a.credentials).reduce((e,s)=>{let[r,t]=s;if(null==t||""===t)return e;if("scopes"===r){if(Array.isArray(t)){let s=t.filter(e=>null!=e&&""!==e);s.length>0&&(e[r]=s)}}else e[r]=t;return e},{}):void 0,r={server_id:a.server_id||"",server_name:a.server_name||"",url:a.url,transport:a.transport,auth_type:a.auth_type,authorization_url:a.authorization_url,token_url:a.token_url,registration_url:a.registration_url,mcp_info:a.mcp_info,static_headers:e};s&&Object.keys(s).length>0&&(r.credentials=s);let n=await (0,_.testMCPToolsListRequest)(t,r,l);if(n.tools&&!n.error)o(n.tools),m(null),h(null),n.tools.length>0&&!p&&g(!0);else{let e=n.message||"Failed to retrieve tools list";m(e),h(n.stack_trace||null),o([]),g(!1)}}catch(e){console.error("Tools fetch error:",e),m(e instanceof Error?e.message:String(e)),h(null),o([]),g(!1)}finally{d(!1)}}},w=()=>{o([]),m(null),h(null),g(!1)};return(0,f.useEffect)(()=>{n&&(v?N():w())},[a.url,a.transport,a.auth_type,t,n,l,v,b,y]),{tools:i,isLoadingTools:c,toolsError:u,toolsErrorStackTrace:x,hasShownSuccessMessage:p,canFetchTools:v,fetchTools:N,clearTools:w}};var $=e=>{let{accessToken:s,oauthAccessToken:r,formValues:l,onToolsLoaded:a}=e,{tools:n,isLoadingTools:i,toolsError:o,toolsErrorStackTrace:c,canFetchTools:d,fetchTools:u}=W({accessToken:s,oauthAccessToken:r,formValues:l,enabled:!0});return((0,f.useEffect)(()=>{null==a||a(n)},[n,a]),d||l.url)?(0,t.jsx)(F.Zb,{children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(J.Z,{className:"text-blue-600"}),(0,t.jsx)(F.Dx,{children:"Connection Status"})]}),!d&&l.url&&(0,t.jsxs)("div",{className:"text-center py-6 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(V.Z,{className:"text-2xl mb-2"}),(0,t.jsx)(F.xv,{children:"Complete required fields to test connection"}),(0,t.jsx)("br",{}),(0,t.jsx)(F.xv,{className:"text-sm",children:"Fill in URL, Transport, and Authentication to test MCP server connection"})]}),d&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-gray-700 font-medium",children:i?"Testing connection to MCP server...":n.length>0?"Connection successful":o?"Connection failed":"Ready to test connection"}),(0,t.jsx)("br",{}),(0,t.jsxs)(F.xv,{className:"text-gray-500 text-sm",children:["Server: ",l.url]})]}),i&&(0,t.jsxs)("div",{className:"flex items-center text-blue-600",children:[(0,t.jsx)(D.Z,{size:"small",className:"mr-2"}),(0,t.jsx)(F.xv,{className:"text-blue-600",children:"Connecting..."})]}),!i&&!o&&n.length>0&&(0,t.jsxs)("div",{className:"flex items-center text-green-600",children:[(0,t.jsx)(J.Z,{className:"mr-1"}),(0,t.jsx)(F.xv,{className:"text-green-600 font-medium",children:"Connected"})]}),o&&(0,t.jsxs)("div",{className:"flex items-center text-red-600",children:[(0,t.jsx)(G.Z,{className:"mr-1"}),(0,t.jsx)(F.xv,{className:"text-red-600 font-medium",children:"Failed"})]})]}),i&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,t.jsx)(D.Z,{size:"large"}),(0,t.jsx)(F.xv,{className:"ml-3",children:"Testing connection and loading tools..."})]}),o&&(0,t.jsx)(H.Z,{message:"Connection Failed",description:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{children:o}),c&&(0,t.jsx)(q.default,{items:[{key:"stack-trace",label:"Stack Trace",children:(0,t.jsx)("pre",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"12px",fontFamily:"monospace",margin:0,padding:"8px",backgroundColor:"#f5f5f5",borderRadius:"4px",maxHeight:"400px",overflow:"auto"},children:c})}],style:{marginTop:"12px"}})]}),type:"error",showIcon:!0,action:(0,t.jsx)(K.ZP,{icon:(0,t.jsx)(Y.Z,{}),onClick:u,size:"small",children:"Retry"})}),!i&&0===n.length&&!o&&(0,t.jsxs)("div",{className:"text-center py-6 text-gray-500 border rounded-lg border-dashed",children:[(0,t.jsx)(J.Z,{className:"text-2xl mb-2 text-green-500"}),(0,t.jsx)(F.xv,{className:"text-green-600 font-medium",children:"Connection successful!"}),(0,t.jsx)("br",{}),(0,t.jsx)(F.xv,{className:"text-gray-500",children:"No tools found for this MCP server"})]})]})]})}):null},Q=r(4156),X=e=>{let{accessToken:s,oauthAccessToken:r,formValues:l,allowedTools:a,existingAllowedTools:n,onAllowedToolsChange:i}=e,o=(0,f.useRef)(0),{tools:c,isLoadingTools:d,toolsError:u,canFetchTools:m}=W({accessToken:s,oauthAccessToken:r,formValues:l,enabled:!0});(0,f.useEffect)(()=>{if(c.length>0&&c.length!==o.current&&0===a.length){if(n&&n.length>0){let e=c.map(e=>e.name);i(n.filter(s=>e.includes(s)))}else i(c.map(e=>e.name))}o.current=c.length},[c,a.length,n,i]);let x=e=>{a.includes(e)?i(a.filter(s=>s!==e)):i([...a,e])};return m||l.url?(0,t.jsx)(F.Zb,{children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(V.Z,{className:"text-blue-600"}),(0,t.jsx)(F.Dx,{children:"Tool Configuration"}),c.length>0&&(0,t.jsx)(U.Z,{count:c.length,style:{backgroundColor:"#52c41a"}})]})}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(F.xv,{className:"text-blue-800 text-sm",children:[(0,t.jsx)("strong",{children:"Select which tools users can call:"})," Only checked tools will be available for users to invoke. Unchecked tools will be blocked from execution."]})}),d&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,t.jsx)(D.Z,{size:"large"}),(0,t.jsx)(F.xv,{className:"ml-3",children:"Loading tools..."})]}),u&&!d&&(0,t.jsxs)("div",{className:"text-center py-6 text-red-500 border rounded-lg border-dashed border-red-300 bg-red-50",children:[(0,t.jsx)(V.Z,{className:"text-2xl mb-2"}),(0,t.jsx)(F.xv,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)("br",{}),(0,t.jsx)(F.xv,{className:"text-sm text-red-500",children:u})]}),!d&&!u&&0===c.length&&m&&(0,t.jsxs)("div",{className:"text-center py-6 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(V.Z,{className:"text-2xl mb-2"}),(0,t.jsx)(F.xv,{children:"No tools available for configuration"}),(0,t.jsx)("br",{}),(0,t.jsx)(F.xv,{className:"text-sm",children:"Connect to an MCP server with tools to configure them"})]}),!m&&l.url&&(0,t.jsxs)("div",{className:"text-center py-6 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(V.Z,{className:"text-2xl mb-2"}),(0,t.jsx)(F.xv,{children:"Complete required fields to configure tools"}),(0,t.jsx)("br",{}),(0,t.jsx)(F.xv,{className:"text-sm",children:"Fill in URL, Transport, and Authentication to load available tools"})]}),!d&&!u&&c.length>0&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-green-50 rounded-lg border border-green-200 flex-1",children:[(0,t.jsx)(J.Z,{className:"text-green-600"}),(0,t.jsxs)(F.xv,{className:"text-green-700 font-medium",children:[a.length," of ",c.length," ",1===c.length?"tool":"tools"," enabled for user access"]})]}),(0,t.jsxs)("div",{className:"flex gap-2 ml-3",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{i(c.map(e=>e.name))},className:"px-3 py-1.5 text-sm text-blue-600 hover:text-blue-700 hover:bg-blue-50 rounded-md transition-colors",children:"Enable All"}),(0,t.jsx)("button",{type:"button",onClick:()=>{i([])},className:"px-3 py-1.5 text-sm text-gray-600 hover:text-gray-700 hover:bg-gray-100 rounded-md transition-colors",children:"Disable All"})]})]}),(0,t.jsx)("div",{className:"space-y-2",children:c.map((e,s)=>(0,t.jsx)("div",{className:"p-4 rounded-lg border transition-colors cursor-pointer ".concat(a.includes(e.name)?"bg-blue-50 border-blue-300 hover:border-blue-400":"bg-gray-50 border-gray-200 hover:border-gray-300"),onClick:()=>x(e.name),children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(Q.Z,{checked:a.includes(e.name),onChange:()=>x(e.name)}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(F.xv,{className:"font-medium text-gray-900",children:e.name}),(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs rounded-full font-medium ".concat(a.includes(e.name)?"bg-green-100 text-green-800":"bg-red-100 text-red-800"),children:a.includes(e.name)?"Enabled":"Disabled"})]}),e.description&&(0,t.jsx)(F.xv,{className:"text-gray-500 text-sm block mt-1",children:e.description}),(0,t.jsx)(F.xv,{className:"text-gray-400 text-xs block mt-1",children:a.includes(e.name)?"✓ Users can call this tool":"✗ Users cannot call this tool"})]})]})},s))})]})]})}):null},ee=e=>{let{isVisible:s}=e;return s?(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Stdio Configuration (JSON)",(0,t.jsx)(v.Z,{title:"Paste your stdio MCP server configuration in JSON format. You can use the full mcpServers structure from config.yaml or just the inner server configuration.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"stdio_config",rules:[{required:!0,message:"Please enter stdio configuration"},{validator:(e,s)=>{if(!s)return Promise.resolve();try{return JSON.parse(s),Promise.resolve()}catch(e){return Promise.reject("Please enter valid JSON")}}}],children:(0,t.jsx)(P.default.TextArea,{placeholder:'{\n "mcpServers": {\n "circleci-mcp-server": {\n "command": "npx",\n "args": ["-y", "@circleci/mcp-server-circleci"],\n "env": {\n "CIRCLECI_TOKEN": "your-circleci-token",\n "CIRCLECI_BASE_URL": "https://circleci.com"\n }\n }\n }\n}',rows:12,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 font-mono text-sm"})}):null},es=r(63709),er=r(58760),et=r(45246),el=r(96473);let{Panel:ea}=q.default;var en=e=>{var s;let{availableAccessGroups:r,mcpServer:l,searchValue:a,setSearchValue:n,getAccessGroupOptions:i}=e,o=A.Z.useFormInstance();return(0,f.useEffect)(()=>{if(l){if(l.extra_headers&&o.setFieldValue("extra_headers",l.extra_headers),l.static_headers){let e=Object.entries(l.static_headers).map(e=>{let[s,r]=e;return{header:s,value:null!=r?String(r):""}});o.setFieldValue("static_headers",e)}"boolean"==typeof l.allow_all_keys&&o.setFieldValue("allow_all_keys",l.allow_all_keys)}else o.setFieldValue("allow_all_keys",!1)},[l,o]),(0,t.jsx)(q.default,{className:"bg-gray-50 border border-gray-200 rounded-lg",expandIconPosition:"end",ghost:!1,children:(0,t.jsx)(ea,{header:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Permission Management / Access Control"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 ml-4",children:"Configure access permissions and security settings (Optional)"})]}),className:"border-0",children:(0,t.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Allow All LiteLLM Keys",(0,t.jsx)(v.Z,{title:"When enabled, every API key can access this MCP server.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:'Enable if this server should be "public" to all keys.'})]}),(0,t.jsx)(A.Z.Item,{name:"allow_all_keys",valuePropName:"checked",initialValue:null!==(s=null==l?void 0:l.allow_all_keys)&&void 0!==s&&s,className:"mb-0",children:(0,t.jsx)(es.Z,{})})]}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["MCP Access Groups",(0,t.jsx)(v.Z,{title:"Specify access groups for this MCP server. Users must be in at least one of these groups to access the server.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"mcp_access_groups",className:"mb-4",children:(0,t.jsx)(p.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"value",filterOption:(e,s)=>{var r;return(null!==(r=null==s?void 0:s.value)&&void 0!==r?r:"").toLowerCase().includes(e.toLowerCase())},onSearch:e=>n(e),tokenSeparators:[","],options:i(),maxTagCount:"responsive",allowClear:!0})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Extra Headers",(0,t.jsx)(v.Z,{title:"Forward custom headers from incoming requests to this MCP server (e.g., Authorization, X-Custom-Header, User-Agent)",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})}),(null==l?void 0:l.extra_headers)&&l.extra_headers.length>0&&(0,t.jsxs)("span",{className:"ml-2 text-xs bg-blue-100 text-blue-700 px-2 py-1 rounded-full",children:[l.extra_headers.length," configured"]})]}),name:"extra_headers",children:(0,t.jsx)(p.default,{mode:"tags",placeholder:(null==l?void 0:l.extra_headers)&&l.extra_headers.length>0?"Currently: ".concat(l.extra_headers.join(", ")):"Enter header names (e.g., Authorization, X-Custom-Header)",className:"rounded-lg",size:"large",tokenSeparators:[","],allowClear:!0})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Static Headers",(0,t.jsx)(v.Z,{title:"Send these key-value headers with every request to this MCP server.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),required:!1,children:(0,t.jsx)(A.Z.List,{name:"static_headers",children:(e,s)=>{let{add:r,remove:l}=s;return(0,t.jsxs)("div",{className:"space-y-3",children:[e.map(e=>{let{key:s,name:r,...a}=e;return(0,t.jsxs)(er.Z,{className:"flex w-full",align:"baseline",size:"middle",children:[(0,t.jsx)(A.Z.Item,{...a,name:[r,"header"],className:"flex-1",rules:[{required:!0,message:"Header name is required"}],children:(0,t.jsx)(P.default,{size:"large",allowClear:!0,className:"rounded-lg",placeholder:"Header name (e.g., X-API-Key)"})}),(0,t.jsx)(A.Z.Item,{...a,name:[r,"value"],className:"flex-1",rules:[{required:!0,message:"Header value is required"}],children:(0,t.jsx)(P.default,{size:"large",allowClear:!0,className:"rounded-lg",placeholder:"Header value"})}),(0,t.jsx)(et.Z,{onClick:()=>l(r),className:"text-gray-500 hover:text-red-500 cursor-pointer"})]},s)}),(0,t.jsx)(K.ZP,{type:"dashed",onClick:()=>r(),icon:(0,t.jsx)(el.Z,{}),block:!0,children:"Add Static Header"})]})}})})]})},"permissions")})};let ei=e=>{try{let s=e.indexOf("/mcp/");if(-1===s)return{token:null,baseUrl:e};let r=e.split("/mcp/");if(2!==r.length)return{token:null,baseUrl:e};let t=r[0]+"/mcp/",l=r[1];if(!l)return{token:null,baseUrl:e};return{token:l,baseUrl:t}}catch(s){return console.error("Error parsing MCP URL:",s),{token:null,baseUrl:e}}},eo=e=>{let{token:s,baseUrl:r}=ei(e);return s?r+"...":e},ec=e=>{let{token:s}=ei(e);return{maskedUrl:eo(e),hasToken:!!s}},ed=e=>e?/^https?:\/\/[^\s/$.?#].[^\s]*$/i.test(e)?Promise.resolve():Promise.reject("Please enter a valid URL (e.g., http://service-name.domain:1234/path or https://example.com)"):Promise.resolve(),eu=e=>e&&e.includes("-")?Promise.reject("Server name cannot contain '-' (hyphen). Please use '_' (underscore) instead."):Promise.resolve(),em=e=>{let s=new Uint8Array(e),r="";return s.forEach(e=>r+=String.fromCharCode(e)),btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},ex=()=>{let e=new Uint8Array(32);return window.crypto.getRandomValues(e),em(e.buffer)},eh=async e=>{let s=new TextEncoder().encode(e);return em(await window.crypto.subtle.digest("SHA-256",s))},ep=e=>{let{accessToken:s,getCredentials:r,getTemporaryPayload:t,onTokenReceived:l,onBeforeRedirect:a}=e,[n,i]=(0,f.useState)("idle"),[o,c]=(0,f.useState)(null),[d,u]=(0,f.useState)(null),m="litellm-mcp-oauth-flow-state",x="litellm-mcp-oauth-result",h="litellm-mcp-oauth-return-url",p=()=>{try{window.sessionStorage.removeItem(m),window.sessionStorage.removeItem(x),window.sessionStorage.removeItem(h)}catch(e){console.warn("Failed to clear OAuth storage",e)}},g=()=>{{let e=window.location.pathname||"",s=e.indexOf("/ui"),r=(s>=0?e.slice(0,s+3):"").replace(/\/+$/,"");return"".concat(window.location.origin).concat(r,"/mcp/oauth/callback")}},j=()=>g(),v=(0,f.useCallback)(async()=>{let e=r()||{};if(!s){c("Missing admin token"),S.Z.error("Access token missing. Please re-authenticate and try again.");return}let l=t();if(!l||!l.url||!l.transport){let e="Please complete server URL and transport before starting OAuth.";c(e),S.Z.error(e);return}try{var n,o,d;i("authorizing"),c(null);let r=await (0,_.cacheTemporaryMcpServer)(s,l),t=null==r?void 0:null===(n=r.server_id)||void 0===n?void 0:n.trim();if(!t)throw Error("Temporary MCP server identifier missing. Please retry.");let u={};if(!((null===(o=l.credentials)||void 0===o?void 0:o.client_id)&&(null===(d=l.credentials)||void 0===d?void 0:d.client_secret))){let e=await (0,_.registerMcpOAuthClient)(s,t,{client_name:l.alias||l.server_name||t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:l.credentials&&l.credentials.client_secret?"client_secret_post":"none"});u={clientId:null==e?void 0:e.client_id,clientSecret:null==e?void 0:e.client_secret}}let x=ex(),p=await eh(x),g=crypto.randomUUID(),v=u.clientId||e.client_id,f=Array.isArray(e.scopes)?e.scopes.filter(e=>e&&e.trim().length>0).join(" "):void 0,b=(0,_.buildMcpOAuthAuthorizeUrl)({serverId:t,clientId:v,redirectUri:j(),state:g,codeChallenge:p,scope:f}),y={state:g,codeVerifier:x,clientId:v,clientSecret:u.clientSecret||e.client_secret,serverId:t,redirectUri:j()};if(a)try{a()}catch(e){console.error("Failed to prepare for OAuth redirect",e)}try{window.sessionStorage.setItem(m,JSON.stringify(y)),window.sessionStorage.setItem(h,window.location.href)}catch(e){throw console.error("Unable to persist OAuth state",e),Error("Unable to access browser storage for OAuth. Please enable storage and retry.")}window.location.href=b}catch(s){console.error("Failed to start OAuth flow",s),i("error");let e=s instanceof Error?s.message:String(s);c(e),S.Z.error(e)}},[s,r,t,a]),b=(0,f.useCallback)(async()=>{let e=null,s=null;try{let r=window.sessionStorage.getItem(x);if(!r)return;e=JSON.parse(r),s=JSON.parse(window.sessionStorage.getItem(m)||"null")}catch(e){console.error("Failed to read OAuth session state",e),p(),c("Failed to resume OAuth flow. Please retry."),i("error"),S.Z.error("Failed to resume OAuth flow. Please retry.");return}if(e){window.sessionStorage.removeItem(x);try{if(!s||!s.state||!s.codeVerifier||!s.serverId)throw Error("Missing OAuth session state. Please retry.");if(!e.state||e.state!==s.state)throw Error("OAuth state mismatch. Please retry.");if(e.error)throw Error(e.error_description||e.error);if(!e.code)throw Error("Authorization code missing in callback.");i("exchanging");let r=await (0,_.exchangeMcpOAuthToken)({serverId:s.serverId,code:e.code,clientId:s.clientId,clientSecret:s.clientSecret,codeVerifier:s.codeVerifier,redirectUri:s.redirectUri});l(r),u(r),i("success"),c(null),S.Z.success("OAuth token retrieved successfully")}catch(s){console.error("OAuth flow failed",s);let e=s instanceof Error?s.message:String(s);c(e),i("error"),S.Z.error(e)}finally{p()}}},[l]);return(0,f.useEffect)(()=>{let e=!1;return(async()=>{e||await b()})(),()=>{e=!0}},[b]),{startOAuthFlow:v,status:n,error:o,tokenResponse:d}},eg="".concat("../ui/assets/logos/","mcp_logo.png"),ej=[I.API_KEY,I.BEARER_TOKEN,I.BASIC],ev=[...ej,I.OAUTH2],ef="litellm-mcp-oauth-create-state";var eb=e=>{var s;let{userRole:r,accessToken:a,onCreateSuccess:n,isModalVisible:i,setModalVisible:o,availableAccessGroups:c}=e,[d]=A.Z.useForm(),[u,m]=(0,f.useState)(!1),[x,h]=(0,f.useState)({}),[j,b]=(0,f.useState)({}),[y,N]=(0,f.useState)(null),[w,Z]=(0,f.useState)(!1),[C,k]=(0,f.useState)([]),[T,L]=(0,f.useState)([]),[E,z]=(0,f.useState)(""),[q,U]=(0,f.useState)(""),[R,V]=(0,f.useState)(null),F=j.auth_type,D=!!F&&ej.includes(F),H=F===I.OAUTH2,{startOAuthFlow:K,status:J,error:G,tokenResponse:Y}=ep({accessToken:a,getCredentials:()=>d.getFieldValue("credentials"),getTemporaryPayload:()=>{let e=d.getFieldsValue(!0),s=e.url,r=e.transport||E;if(!s||!r)return null;let t=Array.isArray(e.static_headers)?e.static_headers.reduce((e,s)=>{var r,t;let l=null==s?void 0:null===(r=s.header)||void 0===r?void 0:r.trim();return l&&(e[l]=null!==(t=null==s?void 0:s.value)&&void 0!==t?t:""),e},{}):{};return{server_id:void 0,server_name:e.server_name,alias:e.alias,description:e.description,url:s,transport:r,auth_type:I.OAUTH2,credentials:e.credentials,authorization_url:e.authorization_url,token_url:e.token_url,registration_url:e.registration_url,mcp_access_groups:e.mcp_access_groups,static_headers:t,command:e.command,args:e.args,env:e.env}},onTokenReceived:e=>{var s;V(null!==(s=null==e?void 0:e.access_token)&&void 0!==s?s:null)},onBeforeRedirect:()=>{try{let e=d.getFieldsValue(!0);window.sessionStorage.setItem(ef,JSON.stringify({modalVisible:i,formValues:e,transportType:E,costConfig:x,allowedTools:T,searchValue:q,aliasManuallyEdited:w}))}catch(e){console.warn("Failed to persist MCP create state",e)}}});f.useEffect(()=>{let e=window.sessionStorage.getItem(ef);if(e)try{var s;let r=JSON.parse(e);r.modalVisible&&o(!0);let t=(null===(s=r.formValues)||void 0===s?void 0:s.transport)||r.transportType||"";t&&z(t),r.formValues&&N({values:r.formValues,transport:t}),r.costConfig&&h(r.costConfig),r.allowedTools&&L(r.allowedTools),r.searchValue&&U(r.searchValue),"boolean"==typeof r.aliasManuallyEdited&&Z(r.aliasManuallyEdited)}catch(e){console.error("Failed to restore MCP create state",e)}finally{window.sessionStorage.removeItem(ef)}},[d,o]),f.useEffect(()=>{y&&(E||y.transport,(!y.transport||E)&&(d.setFieldsValue(y.values),b(y.values),N(null)))},[y,d,E]);let W=async e=>{m(!0);try{let{static_headers:s,stdio_config:r,credentials:t,allow_all_keys:l,...i}=e,c=i.mcp_access_groups,u=Array.isArray(s)?s.reduce((e,s)=>{var r,t;let l=null==s?void 0:null===(r=s.header)||void 0===r?void 0:r.trim();return l&&(e[l]=null!==(t=null==s?void 0:s.value)&&void 0!==t?t:""),e},{}):{},m=t&&"object"==typeof t?Object.entries(t).reduce((e,s)=>{let[r,t]=s;if(null==t||""===t)return e;if("scopes"===r){if(Array.isArray(t)){let s=t.filter(e=>null!=e&&""!==e);s.length>0&&(e[r]=s)}}else e[r]=t;return e},{}):void 0,p={};if(r&&"stdio"===E)try{let e=JSON.parse(r),s=e;if(e.mcpServers&&"object"==typeof e.mcpServers){let r=Object.keys(e.mcpServers);if(r.length>0){let t=r[0];s=e.mcpServers[t],i.server_name||(i.server_name=t.replace(/-/g,"_"))}}p={command:s.command,args:s.args,env:s.env},console.log("Parsed stdio config:",p)}catch(e){S.Z.fromBackend("Invalid JSON in stdio configuration");return}let g={...i,...p,stdio_config:void 0,mcp_info:{server_name:i.server_name||i.url,description:i.description,mcp_server_cost_info:Object.keys(x).length>0?x:null},mcp_access_groups:c,alias:i.alias,allowed_tools:T.length>0?T:null,allow_all_keys:!!l,static_headers:u};if(g.static_headers=u,i.auth_type&&ev.includes(i.auth_type)&&m&&Object.keys(m).length>0&&(g.credentials=m),console.log("Payload: ".concat(JSON.stringify(g))),null!=a){let e=await (0,_.createMCPServer)(a,g);S.Z.success("MCP Server created successfully"),d.resetFields(),h({}),k([]),L([]),Z(!1),o(!1),n(e)}}catch(e){S.Z.fromBackend("Error creating MCP Server: "+e)}finally{m(!1)}},Q=()=>{d.resetFields(),h({}),k([]),L([]),Z(!1),o(!1)};return(f.useEffect(()=>{if(!w&&j.server_name){let e=j.server_name.replace(/\s+/g,"_");d.setFieldsValue({alias:e}),b(s=>({...s,alias:e}))}},[j.server_name]),f.useEffect(()=>{i||b({})},[i]),(0,l.tY)(r))?(0,t.jsx)(g.Z,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,t.jsx)("img",{src:eg,alt:"MCP Logo",className:"w-8 h-8 object-contain",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"}}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New MCP Server"})]}),open:i,width:1e3,onCancel:Q,footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsxs)(A.Z,{form:d,onFinish:W,onValuesChange:(e,s)=>b(s),layout:"vertical",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["MCP Server Name",(0,t.jsx)(v.Z,{title:"Best practice: Use a descriptive name that indicates the server's purpose (e.g., 'GitHub_MCP', 'Email_Service'). Hyphens '-' are not allowed; use underscores '_' instead. Names must comply with SEP-986 and will be rejected if invalid (https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool-names).",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"server_name",rules:[{required:!1,message:"Please enter a server name"},{validator:(e,s)=>eu(s)}],children:(0,t.jsx)(O.o,{placeholder:"e.g., GitHub_MCP, Zapier_MCP, etc.",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Alias",(0,t.jsx)(v.Z,{title:"A short, unique identifier for this server. Defaults to the server name with spaces replaced by underscores.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"alias",rules:[{required:!1},{validator:(e,s)=>s&&s.includes("-")?Promise.reject("Alias cannot contain '-' (hyphen). Please use '_' (underscore) instead."):Promise.resolve()}],children:(0,t.jsx)(O.o,{placeholder:"e.g., GitHub_MCP, Zapier_MCP, etc.",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500",onChange:()=>Z(!0)})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Description"}),name:"description",rules:[{required:!1,message:"Please enter a server description!!!!!!!!!"}],children:(0,t.jsx)(O.o,{placeholder:"Brief description of what this server does",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Transport Type"}),name:"transport",rules:[{required:!0,message:"Please select a transport type"}],children:(0,t.jsxs)(p.default,{placeholder:"Select transport",className:"rounded-lg",size:"large",onChange:e=>{z(e),"stdio"===e?d.setFieldsValue({url:void 0,auth_type:void 0,credentials:void 0}):d.setFieldsValue({command:void 0,args:void 0,env:void 0})},value:E,children:[(0,t.jsx)(p.default.Option,{value:"http",children:"HTTP"}),(0,t.jsx)(p.default.Option,{value:"sse",children:"Server-Sent Events (SSE)"}),(0,t.jsx)(p.default.Option,{value:"stdio",children:"Standard Input/Output (stdio)"})]})}),"stdio"!==E&&(0,t.jsx)(A.Z.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"MCP Server URL"}),name:"url",rules:[{required:!0,message:"Please enter a server URL"},{validator:(e,s)=>ed(s)}],children:(0,t.jsx)(P.default,{placeholder:"https://your-mcp-server.com",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),"stdio"!==E&&(0,t.jsx)(A.Z.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Authentication"}),name:"auth_type",rules:[{required:!0,message:"Please select an auth type"}],children:(0,t.jsxs)(p.default,{placeholder:"Select auth type",className:"rounded-lg",size:"large",children:[(0,t.jsx)(p.default.Option,{value:"none",children:"None"}),(0,t.jsx)(p.default.Option,{value:"api_key",children:"API Key"}),(0,t.jsx)(p.default.Option,{value:"bearer_token",children:"Bearer Token"}),(0,t.jsx)(p.default.Option,{value:"basic",children:"Basic Auth"}),(0,t.jsx)(p.default.Option,{value:"oauth2",children:"OAuth"})]})}),"stdio"!==E&&D&&(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Value",(0,t.jsx)(v.Z,{title:"Token, password, or header value to send with each request for the selected auth type.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","auth_value"],rules:[{required:!0,message:"Please enter the authentication value"}],children:(0,t.jsx)(O.o,{type:"password",placeholder:"Enter token or secret",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),"stdio"!==E&&H&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client ID (optional)",(0,t.jsx)(v.Z,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_id"],children:(0,t.jsx)(O.o,{type:"password",placeholder:"Enter OAuth client ID",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client Secret (optional)",(0,t.jsx)(v.Z,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_secret"],children:(0,t.jsx)(O.o,{type:"password",placeholder:"Enter OAuth client secret",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Scopes (optional)",(0,t.jsx)(v.Z,{title:"Optional scopes requested during token exchange. Separate multiple scopes with enter or commas.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","scopes"],children:(0,t.jsx)(p.default,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authorization URL Override (optional)",(0,t.jsx)(v.Z,{title:"Optional override for the authorization endpoint.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"authorization_url",children:(0,t.jsx)(O.o,{placeholder:"https://example.com/oauth/authorize",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token URL Override (optional)",(0,t.jsx)(v.Z,{title:"Optional override for the token endpoint.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"token_url",children:(0,t.jsx)(O.o,{placeholder:"https://example.com/oauth/token",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Registration URL Override (optional)",(0,t.jsx)(v.Z,{title:"Optional orverride for the dynamic client registration endpoint.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"registration_url",children:(0,t.jsx)(O.o,{placeholder:"https://example.com/oauth/register",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsxs)("div",{className:"rounded-lg border border-dashed border-gray-300 p-4 space-y-2",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Use OAuth to fetch a fresh access token and temporarily save it in the session as the authentication value."}),(0,t.jsx)(O.z,{variant:"secondary",onClick:K,disabled:"authorizing"===J||"exchanging"===J,children:"authorizing"===J?"Waiting for authorization...":"exchanging"===J?"Exchanging authorization code...":"Authorize & Fetch Token"}),G&&(0,t.jsx)("p",{className:"text-sm text-red-500",children:G}),"success"===J&&(null==Y?void 0:Y.access_token)&&(0,t.jsxs)("p",{className:"text-sm text-green-600",children:["Token fetched. Expires in ",null!==(s=Y.expires_in)&&void 0!==s?s:"?"," seconds."]})]})]}),(0,t.jsx)(ee,{isVisible:"stdio"===E})]}),(0,t.jsx)("div",{className:"mt-8",children:(0,t.jsx)(en,{availableAccessGroups:c,mcpServer:null,searchValue:q,setSearchValue:U,getAccessGroupOptions:()=>{let e=c.map(e=>({value:e,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:e})]})}));return q&&!c.some(e=>e.toLowerCase().includes(q.toLowerCase()))&&e.push({value:q,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:q}),(0,t.jsx)("span",{className:"text-gray-400 text-xs ml-1",children:"create new group"})]})}),e}})}),(0,t.jsx)("div",{className:"mt-8 pt-6 border-t border-gray-200",children:(0,t.jsx)($,{accessToken:a,oauthAccessToken:R,formValues:j,onToolsLoaded:k})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(X,{accessToken:a,oauthAccessToken:R,formValues:j,allowedTools:T,existingAllowedTools:null,onAllowedToolsChange:L})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(B,{value:x,onChange:h,tools:C.filter(e=>T.includes(e.name)),disabled:!1})}),(0,t.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:[(0,t.jsx)(O.z,{variant:"secondary",onClick:Q,children:"Cancel"}),(0,t.jsx)(O.z,{variant:"primary",loading:u,children:u?"Creating...":"Add MCP Server"})]})]})})}):null},ey=r(5945),eN=r(64935),e_=r(30401),ew=r(78867),eZ=r(11239),eC=r(54001),eS=r(96137),ek=r(96362),eA=r(80221),eP=r(29202),eM=r(59872);let{Title:eO,Text:eI}=h.default,{Panel:eT}=q.default,eL=e=>{let{icon:s,title:r,description:l,children:a,serverName:n,accessGroups:i=["dev-group"]}=e,[o,c]=(0,f.useState)(!1),d=()=>{let e={"x-litellm-api-key":"Bearer YOUR_LITELLM_API_KEY"};if(o&&n){let s=[n.replace(/\s+/g,"_"),...i].join(",");e["x-mcp-servers"]=s}return e};return(0,t.jsxs)(ey.Z,{className:"border border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)("span",{className:"p-2 rounded-lg bg-gray-50",children:s}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eO,{level:5,className:"mb-0",children:r}),(0,t.jsx)(eI,{className:"text-gray-600",children:l})]})]}),n&&("Implementation Example"===r||"Configuration"===r)&&(0,t.jsxs)(A.Z.Item,{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(es.Z,{size:"small",checked:o,onChange:c}),(0,t.jsxs)(eI,{className:"text-sm",children:["Limit tools to specific MCP servers or MCP groups by passing the ",(0,t.jsx)("code",{children:"x-mcp-servers"})," header"]})]}),o&&(0,t.jsx)(H.Z,{className:"mt-2",type:"info",showIcon:!0,message:"Two Options",description:(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Option 1:"})," Get a specific server: ",(0,t.jsxs)("code",{children:['"',n.replace(/\s+/g,"_"),'"']})]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Option 2:"})," Get a group of MCPs: ",(0,t.jsx)("code",{children:'"dev-group"'})]}),(0,t.jsxs)("p",{className:"mt-2 text-sm text-gray-600",children:["You can also mix both: ",(0,t.jsx)("code",{children:'"Server1,dev-group"'})]})]})})]}),f.Children.map(a,e=>{if(f.isValidElement(e)&&e.props.hasOwnProperty("code")&&e.props.hasOwnProperty("copyKey")){let s=e.props.code;if(s&&s.includes('"headers":'))return f.cloneElement(e,{code:s.replace(/"headers":\s*{[^}]*}/,'"headers": '.concat(JSON.stringify(d(),null,8)))})}return e})]})};var eE=e=>{let{currentServerAccessGroups:s=[]}=e,r=(0,_.getProxyBaseUrl)(),[l,a]=(0,f.useState)({}),[n,h]=(0,f.useState)({openai:[],litellm:[],cursor:[],http:[]}),[p]=(0,f.useState)("Zapier_MCP"),g=async(e,s)=>{await (0,eM.vQ)(e)&&(a(e=>({...e,[s]:!0})),setTimeout(()=>{a(e=>({...e,[s]:!1}))},2e3))},j=e=>{let{code:s,copyKey:r,title:a,className:n=""}=e;return(0,t.jsxs)("div",{className:"relative group",children:[a&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(eN.Z,{size:16,className:"text-blue-600"}),(0,t.jsx)(eI,{strong:!0,className:"text-gray-700",children:a})]}),(0,t.jsxs)(ey.Z,{className:"bg-gray-50 border border-gray-200 relative ".concat(n),children:[(0,t.jsx)(K.ZP,{type:"text",size:"small",icon:l[r]?(0,t.jsx)(e_.Z,{size:12}):(0,t.jsx)(ew.Z,{size:12}),onClick:()=>g(s,r),className:"absolute top-2 right-2 z-10 transition-all duration-200 ".concat(l[r]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")}),(0,t.jsx)("pre",{className:"text-sm overflow-x-auto pr-10 text-gray-800 font-mono leading-relaxed",children:s})]})]})},v=e=>{let{step:s,title:r,children:l}=e;return(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)("div",{className:"w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-semibold",children:s})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(eI,{strong:!0,className:"text-gray-800 block mb-2",children:r}),l]})]})};return(0,t.jsx)("div",{children:(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Z,{className:"text-3xl font-bold text-gray-900 mb-3",children:"Connect to your MCP client"}),(0,t.jsx)(m.Z,{className:"text-lg text-gray-600",children:"Use tools directly from any MCP client with LiteLLM MCP. Enable your AI assistant to perform real-world tasks through a simple, secure connection."})]}),(0,t.jsxs)(o.Z,{className:"w-full",children:[(0,t.jsx)(c.Z,{className:"flex justify-start mt-8 mb-6",children:(0,t.jsxs)("div",{className:"flex bg-gray-100 p-1 rounded-lg",children:[(0,t.jsx)(i.Z,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(eN.Z,{size:18}),"OpenAI API"]})}),(0,t.jsx)(i.Z,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(eZ.Z,{size:18}),"LiteLLM Proxy"]})}),(0,t.jsx)(i.Z,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(eA.Z,{size:18}),"Cursor"]})}),(0,t.jsx)(i.Z,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(eP.Z,{size:18}),"Streamable HTTP"]})})]})}),(0,t.jsxs)(u.Z,{children:[(0,t.jsx)(d.Z,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-blue-50 to-indigo-50 p-6 rounded-lg border border-blue-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(eN.Z,{className:"text-blue-600",size:24}),(0,t.jsx)(eO,{level:4,className:"mb-0 text-blue-900",children:"OpenAI Responses API Integration"})]}),(0,t.jsx)(eI,{className:"text-blue-700",children:"Connect OpenAI Responses API to your LiteLLM MCP server for seamless tool integration"})]}),(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(eL,{icon:(0,t.jsx)(eC.Z,{className:"text-blue-600",size:16}),title:"API Key Setup",description:"Configure your OpenAI API key for authentication",children:(0,t.jsxs)(er.Z,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsxs)(eI,{children:["Get your API key from the"," ",(0,t.jsxs)("a",{href:"https://platform.openai.com/api-keys",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-700 inline-flex items-center gap-1",children:["OpenAI platform ",(0,t.jsx)(ek.Z,{size:12})]})]})}),(0,t.jsx)(j,{title:"Environment Variable",code:'export OPENAI_API_KEY="sk-..."',copyKey:"openai-env"})]})}),(0,t.jsx)(eL,{icon:(0,t.jsx)(eS.Z,{className:"text-blue-600",size:16}),title:"MCP Server Information",description:"Connection details for your LiteLLM MCP server",children:(0,t.jsx)(j,{title:"Server URL",code:"".concat(r,"/mcp"),copyKey:"openai-server-url"})}),(0,t.jsx)(eL,{icon:(0,t.jsx)(eN.Z,{className:"text-blue-600",size:16}),title:"Implementation Example",description:"Complete cURL example for using the Responses API",serverName:"Zapier Gmail",accessGroups:["dev-group"],children:(0,t.jsx)(j,{code:'curl --location \'https://api.openai.com/v1/responses\' \\\n--header \'Content-Type: application/json\' \\\n--header "Authorization: Bearer $OPENAI_API_KEY" \\\n--data \'{\n "model": "gpt-4.1",\n "tools": [\n {\n "type": "mcp",\n "server_label": "litellm",\n "server_url": "'.concat(r,'/mcp",\n "require_approval": "never",\n "headers": {\n "x-litellm-api-key": "Bearer YOUR_LITELLM_API_KEY",\n "x-mcp-servers": "Zapier_MCP,dev-group"\n }\n }\n ],\n "input": "Run available tools",\n "tool_choice": "required"\n}\''),copyKey:"openai-curl",className:"text-xs"})})]})]}),{})}),(0,t.jsx)(d.Z,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-emerald-50 to-green-50 p-6 rounded-lg border border-emerald-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(eZ.Z,{className:"text-emerald-600",size:24}),(0,t.jsx)(eO,{level:4,className:"mb-0 text-emerald-900",children:"LiteLLM Proxy API Integration"})]}),(0,t.jsx)(eI,{className:"text-emerald-700",children:"Connect to LiteLLM Proxy Responses API for seamless tool integration with multiple model providers"})]}),(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(eL,{icon:(0,t.jsx)(eC.Z,{className:"text-emerald-600",size:16}),title:"Virtual Key Setup",description:"Configure your LiteLLM Proxy Virtual Key for authentication",children:(0,t.jsxs)(er.Z,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsx)(eI,{children:"Get your Virtual Key from your LiteLLM Proxy dashboard or contact your administrator"})}),(0,t.jsx)(j,{title:"Environment Variable",code:'export LITELLM_API_KEY="sk-..."',copyKey:"litellm-env"})]})}),(0,t.jsx)(eL,{icon:(0,t.jsx)(eS.Z,{className:"text-emerald-600",size:16}),title:"MCP Server Information",description:"Connection details for your LiteLLM MCP server",children:(0,t.jsx)(j,{title:"Server URL",code:"".concat(r,"/mcp"),copyKey:"litellm-server-url"})}),(0,t.jsx)(eL,{icon:(0,t.jsx)(eN.Z,{className:"text-emerald-600",size:16}),title:"Implementation Example",description:"Complete cURL example for using the LiteLLM Proxy Responses API",serverName:p,accessGroups:["dev-group"],children:(0,t.jsx)(j,{code:"curl --location '".concat(r,'/v1/responses\' \\\n--header \'Content-Type: application/json\' \\\n--header "Authorization: Bearer $LITELLM_VIRTUAL_KEY" \\\n--data \'{\n "model": "gpt-4",\n "tools": [\n {\n "type": "mcp",\n "server_label": "litellm",\n "server_url": "').concat(r,'/mcp",\n "require_approval": "never",\n "headers": {\n "x-litellm-api-key": "Bearer YOUR_LITELLM_VIRTUAL_KEY",\n "x-mcp-servers": "Zapier_MCP,dev-group"\n }\n }\n ],\n "input": "Run available tools",\n "tool_choice": "required"\n}\''),copyKey:"litellm-curl",className:"text-xs"})})]})]}),{})}),(0,t.jsx)(d.Z,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-purple-50 to-blue-50 p-6 rounded-lg border border-purple-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(eA.Z,{className:"text-purple-600",size:24}),(0,t.jsx)(eO,{level:4,className:"mb-0 text-purple-900",children:"Cursor IDE Integration"})]}),(0,t.jsx)(eI,{className:"text-purple-700",children:"Use tools directly from Cursor IDE with LiteLLM MCP. Enable your AI assistant to perform real-world tasks without leaving your coding environment."})]}),(0,t.jsxs)(ey.Z,{className:"border border-gray-200",children:[(0,t.jsx)(eO,{level:5,className:"mb-4 text-gray-800",children:"Setup Instructions"}),(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(v,{step:1,title:"Open Cursor Settings",children:(0,t.jsxs)(eI,{className:"text-gray-600",children:["Use the keyboard shortcut ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"⇧+⌘+J"})," (Mac) or"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Ctrl+Shift+J"})," (Windows/Linux)"]})}),(0,t.jsx)(v,{step:2,title:"Navigate to MCP Tools",children:(0,t.jsx)(eI,{className:"text-gray-600",children:'Go to the "MCP Tools" tab and click "New MCP Server"'})}),(0,t.jsxs)(v,{step:3,title:"Add Configuration",children:[(0,t.jsxs)(eI,{className:"text-gray-600 mb-3",children:["Copy the JSON configuration below and paste it into Cursor, then save with"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Cmd+S"})," or"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Ctrl+S"})]}),(0,t.jsx)(eL,{icon:(0,t.jsx)(eN.Z,{className:"text-purple-600",size:16}),title:"Configuration",description:"Cursor MCP configuration",serverName:"Zapier Gmail",accessGroups:["dev-group"],children:(0,t.jsx)(j,{code:'{\n "mcpServers": {\n "Zapier_MCP": {\n "url": "'.concat(r,'/mcp",\n "headers": {\n "x-litellm-api-key": "Bearer YOUR_LITELLM_API_KEY",\n "x-mcp-servers": "Zapier_MCP,dev-group"\n }\n }\n }\n}'),copyKey:"cursor-config",className:"text-xs"})})]})]})]})]}),{})}),(0,t.jsx)(d.Z,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-green-50 to-teal-50 p-6 rounded-lg border border-green-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(eP.Z,{className:"text-green-600",size:24}),(0,t.jsx)(eO,{level:4,className:"mb-0 text-green-900",children:"Streamable HTTP Transport"})]}),(0,t.jsx)(eI,{className:"text-green-700",children:"Connect to LiteLLM MCP using HTTP transport. Compatible with any MCP client that supports HTTP streaming."})]}),(0,t.jsx)(eL,{icon:(0,t.jsx)(eP.Z,{className:"text-green-600",size:16}),title:"Universal MCP Connection",description:"Use this URL with any MCP client that supports HTTP transport",children:(0,t.jsxs)(er.Z,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsx)(eI,{children:"Each MCP client supports different transports. Refer to your client documentation to determine the appropriate transport method."})}),(0,t.jsx)(j,{title:"Server URL",code:"".concat(r,"/mcp"),copyKey:"http-server-url"}),(0,t.jsx)(j,{title:"Headers Configuration",code:JSON.stringify({"x-litellm-api-key":"Bearer YOUR_LITELLM_API_KEY"},null,2),copyKey:"http-headers"}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(K.ZP,{type:"link",className:"p-0 h-auto text-blue-600 hover:text-blue-700",href:"https://modelcontextprotocol.io/docs/concepts/transports",icon:(0,t.jsx)(ek.Z,{size:14}),children:"Learn more about MCP transports"})})]})})]}),{})})]})]})]})})},ez=r(58927),eq=r(53410),eU=r(74998);let eR=(e,s,r,l,a)=>[{accessorKey:"server_id",header:"Server ID",cell:e=>{let{row:r}=e;return(0,t.jsxs)("button",{onClick:()=>s(r.original.server_id),className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",children:[r.original.server_id.slice(0,7),"..."]})}},{accessorKey:"server_name",header:"Name"},{accessorKey:"alias",header:"Alias"},{id:"url",header:"URL",cell:e=>{let{row:s}=e,{maskedUrl:r}=ec(s.original.url);return(0,t.jsx)("span",{className:"font-mono text-sm",children:r})}},{accessorKey:"transport",header:"Transport",cell:e=>{let{getValue:s}=e;return(0,t.jsx)("span",{children:(s()||"http").toUpperCase()})}},{accessorKey:"auth_type",header:"Auth Type",cell:e=>{let{getValue:s}=e;return(0,t.jsx)("span",{children:s()||"none"})}},{id:"health_status",header:"Health Status",cell:e=>{let{row:s}=e,r=s.original,l=r.status||"unknown",n=r.last_health_check,i=r.health_check_error;if(a)return(0,t.jsxs)("div",{className:"flex items-center text-gray-500",children:[(0,t.jsxs)("svg",{className:"animate-spin h-4 w-4 mr-1",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),(0,t.jsx)("span",{className:"text-xs",children:"Loading..."})]});let o=(0,t.jsxs)("div",{className:"max-w-xs",children:[(0,t.jsxs)("div",{className:"font-semibold mb-1",children:["Health Status: ",l]}),n&&(0,t.jsxs)("div",{className:"text-xs mb-1",children:["Last Check: ",new Date(n).toLocaleString()]}),i&&(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("div",{className:"font-medium text-red-400 mb-1",children:"Error:"}),(0,t.jsx)("div",{className:"break-words",children:i})]}),!n&&!i&&(0,t.jsx)("div",{className:"text-xs text-gray-400",children:"No health check data available"})]});return(0,t.jsx)(v.Z,{title:o,placement:"top",children:(0,t.jsxs)("button",{className:"font-mono text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[10ch] ".concat((e=>{switch(e){case"healthy":return"text-green-500 bg-green-50 hover:bg-green-100";case"unhealthy":return"text-red-500 bg-red-50 hover:bg-red-100";default:return"text-gray-500 bg-gray-50 hover:bg-gray-100"}})(l)),children:[(0,t.jsx)("span",{className:"mr-1",children:"●"}),l.charAt(0).toUpperCase()+l.slice(1)]})})}},{id:"mcp_access_groups",header:"Access Groups",cell:e=>{let{row:s}=e,r=s.original.mcp_access_groups;if(Array.isArray(r)&&r.length>0&&"string"==typeof r[0]){let e=r.join(", ");return(0,t.jsx)(v.Z,{title:e,children:(0,t.jsx)("span",{className:"max-w-[200px] truncate block",children:e.length>30?"".concat(e.slice(0,30),"..."):e})})}return(0,t.jsx)("span",{className:"text-gray-400 italic",children:"None"})}},{header:"Created At",accessorKey:"created_at",sortingFn:"datetime",cell:e=>{let{row:s}=e,r=s.original;return(0,t.jsx)("span",{className:"text-xs",children:r.created_at?new Date(r.created_at).toLocaleDateString():"-"})}},{header:"Updated At",accessorKey:"updated_at",sortingFn:"datetime",cell:e=>{let{row:s}=e,r=s.original;return(0,t.jsx)("span",{className:"text-xs",children:r.updated_at?new Date(r.updated_at).toLocaleDateString():"-"})}},{id:"actions",header:"Actions",cell:e=>{let{row:s}=e;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(v.Z,{title:"Edit MCP Server",children:(0,t.jsx)(ez.J,{icon:eq.Z,size:"sm",onClick:()=>r(s.original.server_id),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(v.Z,{title:"Delete MCP Server",children:(0,t.jsx)(ez.J,{icon:eU.Z,size:"sm",onClick:()=>l(s.original.server_id),className:"cursor-pointer hover:text-red-600"})})]})}}];var eV=r(10900),eF=r(82376),eB=r(71437),eD=r(12514),eH=r(67101),eK=r(47323),eJ=r(49566);let eG=[I.API_KEY,I.BEARER_TOKEN,I.BASIC],eY=[...eG,I.OAUTH2],eW="litellm-mcp-oauth-edit-state";var e$=e=>{var s;let{mcpServer:r,accessToken:l,onCancel:a,onSuccess:m,availableAccessGroups:x}=e,[h]=A.Z.useForm(),[g,j]=(0,f.useState)({}),[b,y]=(0,f.useState)([]),[N,w]=(0,f.useState)(!1),[Z,C]=(0,f.useState)(""),[k,P]=(0,f.useState)(!1),[O,T]=(0,f.useState)([]),[L,E]=(0,f.useState)(null),z=A.Z.useWatch("auth_type",h),q=!!z&&eG.includes(z),U=z===I.OAUTH2,[R,V]=(0,f.useState)(null),{startOAuthFlow:F,status:D,error:H,tokenResponse:J}=ep({accessToken:l,getCredentials:()=>h.getFieldValue("credentials"),getTemporaryPayload:()=>{let e=h.getFieldsValue(!0),s=e.url||r.url,t=e.transport||r.transport;if(!s||!t)return null;let l=Array.isArray(e.static_headers)?e.static_headers.reduce((e,s)=>{var r,t;let l=null==s?void 0:null===(r=s.header)||void 0===r?void 0:r.trim();return l&&(e[l]=null!==(t=null==s?void 0:s.value)&&void 0!==t?t:""),e},{}):{};return{server_id:r.server_id,server_name:e.server_name||r.server_name||r.alias,alias:e.alias||r.alias,description:e.description||r.description,url:s,transport:t,auth_type:I.OAUTH2,credentials:e.credentials,mcp_access_groups:e.mcp_access_groups||r.mcp_access_groups,static_headers:l,command:e.command,args:e.args,env:e.env}},onTokenReceived:e=>{var s;V(null!==(s=null==e?void 0:e.access_token)&&void 0!==s?s:null)},onBeforeRedirect:()=>{try{let e=h.getFieldsValue(!0);window.sessionStorage.setItem(eW,JSON.stringify({serverId:r.server_id,formValues:e,costConfig:g,allowedTools:O,searchValue:Z,aliasManuallyEdited:k}))}catch(e){console.warn("Failed to persist MCP edit state",e)}}}),G=f.useMemo(()=>r.static_headers?Object.entries(r.static_headers).map(e=>{let[s,r]=e;return{header:s,value:null!=r?String(r):""}}):[],[r.static_headers]),Y=f.useMemo(()=>({...r,static_headers:G}),[r,G]);(0,f.useEffect)(()=>{var e;(null===(e=r.mcp_info)||void 0===e?void 0:e.mcp_server_cost_info)&&j(r.mcp_info.mcp_server_cost_info)},[r]),(0,f.useEffect)(()=>{r.allowed_tools&&T(r.allowed_tools)},[r]),(0,f.useEffect)(()=>{let e=window.sessionStorage.getItem(eW);if(e)try{let s=JSON.parse(e);if(!s||s.serverId!==r.server_id)return;s.formValues&&E({...r,...s.formValues}),s.costConfig&&j(s.costConfig),s.allowedTools&&T(s.allowedTools),s.searchValue&&C(s.searchValue),"boolean"==typeof s.aliasManuallyEdited&&P(s.aliasManuallyEdited)}catch(e){console.error("Failed to restore MCP edit state",e)}finally{window.sessionStorage.removeItem(eW)}},[h,r]),(0,f.useEffect)(()=>{if(!L)return;let e=L.transport||r.transport;if(e&&e!==h.getFieldValue("transport")){h.setFieldsValue({transport:e});return}h.setFieldsValue(L),E(null)},[L,h,r.transport]),(0,f.useEffect)(()=>{if(r.mcp_access_groups){let e=r.mcp_access_groups.map(e=>"string"==typeof e?e:e.name||String(e));h.setFieldValue("mcp_access_groups",e)}},[r]),(0,f.useEffect)(()=>{W()},[r,l,R]);let W=async()=>{if(l&&r.url&&(r.auth_type!==I.OAUTH2||R)){w(!0);try{let e={server_id:r.server_id,server_name:r.server_name,url:r.url,transport:r.transport,auth_type:r.auth_type,mcp_info:r.mcp_info,authorization_url:r.authorization_url,token_url:r.token_url,registration_url:r.registration_url},s=await (0,_.testMCPToolsListRequest)(l,e,R);s.tools&&!s.error?y(s.tools):(console.error("Failed to fetch tools:",s.message),y([]))}catch(e){console.error("Tools fetch error:",e),y([])}finally{w(!1)}}},$=async e=>{if(l)try{let{static_headers:s,credentials:t,allow_all_keys:a,...n}=e,i=(n.mcp_access_groups||[]).map(e=>"string"==typeof e?e:e.name||String(e)),o=Array.isArray(s)?s.reduce((e,s)=>{var r,t;let l=null==s?void 0:null===(r=s.header)||void 0===r?void 0:r.trim();return l&&(e[l]=null!==(t=null==s?void 0:s.value)&&void 0!==t?t:""),e},{}):{},c=t&&"object"==typeof t?Object.entries(t).reduce((e,s)=>{let[r,t]=s;if(null==t||""===t)return e;if("scopes"===r){if(Array.isArray(t)){let s=t.filter(e=>null!=e&&""!==e);s.length>0&&(e[r]=s)}}else e[r]=t;return e},{}):void 0,d={...n,server_id:r.server_id,mcp_info:{server_name:n.server_name||n.url,description:n.description,mcp_server_cost_info:Object.keys(g).length>0?g:null},mcp_access_groups:i,alias:n.alias,extra_headers:n.extra_headers||[],allowed_tools:O.length>0?O:null,disallowed_tools:n.disallowed_tools||[],static_headers:o,allow_all_keys:!!(null!=a?a:r.allow_all_keys)};n.auth_type&&eY.includes(n.auth_type)&&c&&Object.keys(c).length>0&&(d.credentials=c);let u=await (0,_.updateMCPServer)(l,d);S.Z.success("MCP Server updated successfully"),m(u)}catch(e){S.Z.fromBackend("Failed to update MCP Server"+((null==e?void 0:e.message)?": ".concat(e.message):""))}};return(0,t.jsxs)(o.Z,{children:[(0,t.jsxs)(c.Z,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(i.Z,{children:"Server Configuration"}),(0,t.jsx)(i.Z,{children:"Cost Configuration"})]}),(0,t.jsxs)(u.Z,{className:"mt-6",children:[(0,t.jsx)(d.Z,{children:(0,t.jsxs)(A.Z,{form:h,onFinish:$,initialValues:Y,layout:"vertical",children:[(0,t.jsx)(A.Z.Item,{label:"MCP Server Name",name:"server_name",rules:[{validator:(e,s)=>eu(s)}],children:(0,t.jsx)(eJ.Z,{})}),(0,t.jsx)(A.Z.Item,{label:"Alias",name:"alias",rules:[{validator:(e,s)=>eu(s)}],children:(0,t.jsx)(eJ.Z,{onChange:()=>P(!0)})}),(0,t.jsx)(A.Z.Item,{label:"Description",name:"description",children:(0,t.jsx)(eJ.Z,{})}),(0,t.jsx)(A.Z.Item,{label:"MCP Server URL",name:"url",rules:[{required:!0,message:"Please enter a server URL"},{validator:(e,s)=>ed(s)}],children:(0,t.jsx)(eJ.Z,{})}),(0,t.jsx)(A.Z.Item,{label:"Transport Type",name:"transport",rules:[{required:!0}],children:(0,t.jsxs)(p.default,{children:[(0,t.jsx)(p.default.Option,{value:"sse",children:"Server-Sent Events (SSE)"}),(0,t.jsx)(p.default.Option,{value:"http",children:"HTTP"})]})}),(0,t.jsx)(A.Z.Item,{label:"Authentication",name:"auth_type",rules:[{required:!0}],children:(0,t.jsxs)(p.default,{children:[(0,t.jsx)(p.default.Option,{value:"none",children:"None"}),(0,t.jsx)(p.default.Option,{value:"api_key",children:"API Key"}),(0,t.jsx)(p.default.Option,{value:"bearer_token",children:"Bearer Token"}),(0,t.jsx)(p.default.Option,{value:"basic",children:"Basic Auth"}),(0,t.jsx)(p.default.Option,{value:"oauth2",children:"OAuth"})]})}),q&&(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Value",(0,t.jsx)(v.Z,{title:"Token, password, or header value to send with each request for the selected auth type.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","auth_value"],rules:[{validator:(e,s)=>s&&"string"==typeof s&&""===s.trim()?Promise.reject(Error("Authentication value cannot be empty")):Promise.resolve()}],children:(0,t.jsx)(eJ.Z,{type:"password",placeholder:"Enter token or secret (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),U&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client ID (optional)",(0,t.jsx)(v.Z,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_id"],children:(0,t.jsx)(eJ.Z,{type:"password",placeholder:"Enter OAuth client ID (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client Secret (optional)",(0,t.jsx)(v.Z,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_secret"],children:(0,t.jsx)(eJ.Z,{type:"password",placeholder:"Enter OAuth client secret (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Scopes (optional)",(0,t.jsx)(v.Z,{title:"Add scopes to override the default scope list used for this MCP server.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","scopes"],children:(0,t.jsx)(p.default,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authorization URL Override (optional)",(0,t.jsx)(v.Z,{title:"Optional override for the authorization endpoint.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"authorization_url",children:(0,t.jsx)(eJ.Z,{placeholder:"https://example.com/oauth/authorize",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token URL Override (optional)",(0,t.jsx)(v.Z,{title:"Optional override for the token endpoint.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"token_url",children:(0,t.jsx)(eJ.Z,{placeholder:"https://example.com/oauth/token",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Registration URL Override (optional)",(0,t.jsx)(v.Z,{title:"Optional override for the dynamic client registration endpoint.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"registration_url",children:(0,t.jsx)(eJ.Z,{placeholder:"https://example.com/oauth/register",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsxs)("div",{className:"rounded-lg border border-dashed border-gray-300 p-4 space-y-2",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Use OAuth to fetch a fresh access token and temporarily save it in the session as the authentication value."}),(0,t.jsx)(n.Z,{variant:"secondary",onClick:F,disabled:"authorizing"===D||"exchanging"===D,children:"authorizing"===D?"Waiting for authorization...":"exchanging"===D?"Exchanging authorization code...":"Authorize & Fetch Token"}),H&&(0,t.jsx)("p",{className:"text-sm text-red-500",children:H}),"success"===D&&(null==J?void 0:J.access_token)&&(0,t.jsxs)("p",{className:"text-sm text-green-600",children:["Token fetched. Expires in ",null!==(s=J.expires_in)&&void 0!==s?s:"?"," seconds."]})]})]}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(en,{availableAccessGroups:x,mcpServer:r,searchValue:Z,setSearchValue:C,getAccessGroupOptions:()=>{let e=x.map(e=>({value:e,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:e})]})}));return Z&&!x.some(e=>e.toLowerCase().includes(Z.toLowerCase()))&&e.push({value:Z,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:Z}),(0,t.jsx)("span",{className:"text-gray-400 text-xs ml-1",children:"create new group"})]})}),e}})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(X,{accessToken:l,oauthAccessToken:R,formValues:{server_id:r.server_id,server_name:r.server_name,url:r.url,transport:r.transport,auth_type:r.auth_type,mcp_info:r.mcp_info},allowedTools:O,existingAllowedTools:r.allowed_tools||null,onAllowedToolsChange:T})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(K.ZP,{onClick:a,children:"Cancel"}),(0,t.jsx)(n.Z,{type:"submit",children:"Save Changes"})]})]})}),(0,t.jsx)(d.Z,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(B,{value:g,onChange:j,tools:b,disabled:N}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(K.ZP,{onClick:a,children:"Cancel"}),(0,t.jsx)(n.Z,{onClick:()=>h.submit(),children:"Save Changes"})]})]})})]})]})},eQ=r(92280),eX=e=>{let{costConfig:s}=e,r=(null==s?void 0:s.default_cost_per_query)!==void 0&&(null==s?void 0:s.default_cost_per_query)!==null,l=(null==s?void 0:s.tool_name_to_cost_per_query)&&Object.keys(s.tool_name_to_cost_per_query).length>0;return r||l?(0,t.jsx)("div",{className:"mt-6 pt-6 border-t border-gray-200",children:(0,t.jsxs)("div",{className:"space-y-4",children:[r&&(null==s?void 0:s.default_cost_per_query)!==void 0&&(null==s?void 0:s.default_cost_per_query)!==null&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eQ.x,{className:"font-medium",children:"Default Cost per Query"}),(0,t.jsxs)("div",{className:"text-green-600 font-mono",children:["$",s.default_cost_per_query.toFixed(4)]})]}),l&&(null==s?void 0:s.tool_name_to_cost_per_query)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eQ.x,{className:"font-medium",children:"Tool-Specific Costs"}),(0,t.jsx)("div",{className:"mt-2 space-y-2",children:Object.entries(s.tool_name_to_cost_per_query).map(e=>{let[s,r]=e;return null!=r&&(0,t.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,t.jsx)(eQ.x,{className:"font-medium",children:s}),(0,t.jsxs)(eQ.x,{className:"text-green-600 font-mono",children:["$",r.toFixed(4)," per query"]})]},s)})})]}),(0,t.jsxs)("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,t.jsx)(eQ.x,{className:"text-blue-800 font-medium",children:"Cost Summary:"}),(0,t.jsxs)("div",{className:"mt-2 space-y-1",children:[r&&(null==s?void 0:s.default_cost_per_query)!==void 0&&(null==s?void 0:s.default_cost_per_query)!==null&&(0,t.jsxs)(eQ.x,{className:"text-blue-700",children:["• Default cost: $",s.default_cost_per_query.toFixed(4)," per query"]}),l&&(null==s?void 0:s.tool_name_to_cost_per_query)&&(0,t.jsxs)(eQ.x,{className:"text-blue-700",children:["• ",Object.keys(s.tool_name_to_cost_per_query).length," tool(s) with custom pricing"]})]})]})]})}):(0,t.jsx)("div",{className:"mt-6 pt-6 border-t border-gray-200",children:(0,t.jsx)("div",{className:"space-y-4",children:(0,t.jsx)("div",{className:"p-4 bg-gray-50 border border-gray-200 rounded-lg",children:(0,t.jsx)(eQ.x,{className:"text-gray-600",children:"No cost configuration set for this server. Tool calls will be charged at $0.00 per tool call."})})})})};let e0=e=>{var s,r,l,a,h;let{mcpServer:p,onBack:g,isEditing:j,isProxyAdmin:v,accessToken:b,userRole:y,userID:N,availableAccessGroups:_}=e,[w,Z]=(0,f.useState)(j),[C,S]=(0,f.useState)(!1),[k,A]=(0,f.useState)({}),[P,M]=(0,f.useState)(0),{maskedUrl:O,hasToken:I}=ec(p.url),T=(e,s)=>I?s?e:O:e,z=async(e,s)=>{await (0,eM.vQ)(e)&&(A(e=>({...e,[s]:!0})),setTimeout(()=>{A(e=>({...e,[s]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4 max-w-full",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Z,{icon:eV.Z,variant:"light",className:"mb-4",onClick:g,children:"Back to All Servers"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(x.Z,{children:p.server_name}),(0,t.jsx)(K.ZP,{type:"text",size:"small",icon:k["mcp-server_name"]?(0,t.jsx)(e_.Z,{size:12}):(0,t.jsx)(ew.Z,{size:12}),onClick:()=>z(p.server_name,"mcp-server_name"),className:"left-2 z-10 transition-all duration-200 ".concat(k["mcp-server_name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")}),p.alias&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"ml-4 text-gray-500",children:"Alias:"}),(0,t.jsx)("span",{className:"ml-1 font-mono text-blue-600",children:p.alias}),(0,t.jsx)(K.ZP,{type:"text",size:"small",icon:k["mcp-alias"]?(0,t.jsx)(e_.Z,{size:12}):(0,t.jsx)(ew.Z,{size:12}),onClick:()=>z(p.alias,"mcp-alias"),className:"left-2 z-10 transition-all duration-200 ".concat(k["mcp-alias"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(m.Z,{className:"text-gray-500 font-mono",children:p.server_id}),(0,t.jsx)(K.ZP,{type:"text",size:"small",icon:k["mcp-server-id"]?(0,t.jsx)(e_.Z,{size:12}):(0,t.jsx)(ew.Z,{size:12}),onClick:()=>z(p.server_id,"mcp-server-id"),className:"left-2 z-10 transition-all duration-200 ".concat(k["mcp-server-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]})}),(0,t.jsxs)(o.Z,{index:P,onIndexChange:M,children:[(0,t.jsx)(c.Z,{className:"mb-4",children:[(0,t.jsx)(i.Z,{children:"Overview"},"overview"),(0,t.jsx)(i.Z,{children:"MCP Tools"},"tools"),...v?[(0,t.jsx)(i.Z,{children:"Settings"},"settings")]:[]]}),(0,t.jsxs)(u.Z,{children:[(0,t.jsxs)(d.Z,{children:[(0,t.jsxs)(eH.Z,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(eD.Z,{children:[(0,t.jsx)(m.Z,{children:"Transport"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(x.Z,{children:L(null!==(a=p.transport)&&void 0!==a?a:void 0)})})]}),(0,t.jsxs)(eD.Z,{children:[(0,t.jsx)(m.Z,{children:"Auth Type"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(m.Z,{children:E(null!==(h=p.auth_type)&&void 0!==h?h:void 0)})})]}),(0,t.jsxs)(eD.Z,{children:[(0,t.jsx)(m.Z,{children:"Host Url"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)(m.Z,{className:"break-all overflow-wrap-anywhere",children:T(p.url,C)}),I&&(0,t.jsx)("button",{onClick:()=>S(!C),className:"p-1 hover:bg-gray-100 rounded",children:(0,t.jsx)(eK.Z,{icon:C?eF.Z:eB.Z,size:"sm",className:"text-gray-500"})})]})]})]}),(0,t.jsxs)(eD.Z,{className:"mt-2",children:[(0,t.jsx)(x.Z,{children:"Cost Configuration"}),(0,t.jsx)(eX,{costConfig:null===(s=p.mcp_info)||void 0===s?void 0:s.mcp_server_cost_info})]})]}),(0,t.jsx)(d.Z,{children:(0,t.jsx)(sr,{serverId:p.server_id,accessToken:b,auth_type:p.auth_type,userRole:y,userID:N,serverAlias:p.alias})}),(0,t.jsx)(d.Z,{children:(0,t.jsxs)(eD.Z,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(x.Z,{children:"MCP Server Settings"}),w?null:(0,t.jsx)(n.Z,{variant:"light",onClick:()=>Z(!0),children:"Edit Settings"})]}),w?(0,t.jsx)(e$,{mcpServer:p,accessToken:b,onCancel:()=>Z(!1),onSuccess:e=>{Z(!1),g()},availableAccessGroups:_}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Server Name"}),(0,t.jsx)("div",{children:p.server_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Alias"}),(0,t.jsx)("div",{children:p.alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Description"}),(0,t.jsx)("div",{children:p.description})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"URL"}),(0,t.jsxs)("div",{className:"font-mono break-all overflow-wrap-anywhere max-w-full flex items-center gap-2",children:[T(p.url,C),I&&(0,t.jsx)("button",{onClick:()=>S(!C),className:"p-1 hover:bg-gray-100 rounded",children:(0,t.jsx)(eK.Z,{icon:C?eF.Z:eB.Z,size:"sm",className:"text-gray-500"})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Transport"}),(0,t.jsx)("div",{children:L(p.transport)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Extra Headers"}),(0,t.jsx)("div",{children:null===(r=p.extra_headers)||void 0===r?void 0:r.join(", ")})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Auth Type"}),(0,t.jsx)("div",{children:E(p.auth_type)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Allow All LiteLLM Keys"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[p.allow_all_keys?(0,t.jsx)("span",{className:"px-2 py-1 bg-green-50 text-green-700 rounded-md text-sm",children:"Enabled"}):(0,t.jsx)("span",{className:"px-2 py-1 bg-gray-100 text-gray-600 rounded-md text-sm",children:"Disabled"}),p.allow_all_keys&&(0,t.jsx)(m.Z,{className:"text-xs text-gray-500",children:"All keys can access this MCP server"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Access Groups"}),(0,t.jsx)("div",{children:p.mcp_access_groups&&p.mcp_access_groups.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:p.mcp_access_groups.map((e,s)=>{var r;return(0,t.jsx)("span",{className:"px-2 py-1 bg-gray-100 rounded-md text-sm",children:"string"==typeof e?e:null!==(r=null==e?void 0:e.name)&&void 0!==r?r:""},s)})}):(0,t.jsx)(m.Z,{className:"text-gray-500",children:"No access groups defined"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Allowed Tools"}),(0,t.jsx)("div",{children:p.allowed_tools&&p.allowed_tools.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:p.allowed_tools.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-50 border border-blue-200 rounded-md text-sm",children:e},s))}):(0,t.jsx)(m.Z,{className:"text-gray-500",children:"All tools enabled"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Cost Configuration"}),(0,t.jsx)(eX,{costConfig:null===(l=p.mcp_info)||void 0===l?void 0:l.mcp_server_cost_info})]})]})]})})]})]})]})},{Text:e2,Title:e1}=h.default,{Option:e4}=p.default;var e5=e=>{let{accessToken:s,userRole:r,userID:h}=e,{data:y,isLoading:N,refetch:w}=(0,b.F)(),{data:Z,isLoading:A}=C((0,f.useMemo)(()=>null==y?void 0:y.map(e=>e.server_id),[y])),P=(0,f.useMemo)(()=>{if(!y)return[];if(!Z)return y;let e=new Map(Z.map(e=>[e.server_id,e.status]));return y.map(s=>{let r=e.get(s.server_id);return{...s,status:r||s.status}})},[y,Z]);f.useEffect(()=>{y&&(console.log("MCP Servers fetched:",y),y.forEach(e=>{console.log("Server: ".concat(e.server_name||e.server_id)),console.log(" allowed_tools:",e.allowed_tools)}))},[y]);let[M,O]=(0,f.useState)(null),[I,T]=(0,f.useState)(!1),[L,E]=(0,f.useState)(null),[z,q]=(0,f.useState)(!1),[U,R]=(0,f.useState)("all"),[V,F]=(0,f.useState)("all"),[B,D]=(0,f.useState)([]),[H,K]=(0,f.useState)(!1),[J,G]=(0,f.useState)(!1),Y="Internal User"===r;(0,f.useEffect)(()=>{try{let e=window.sessionStorage.getItem("litellm-mcp-oauth-edit-state");if(!e)return;let s=JSON.parse(e);(null==s?void 0:s.serverId)&&(E(s.serverId),q(!0))}catch(e){console.error("Failed to restore MCP edit view state",e)}},[]);let W=f.useMemo(()=>{if(!P)return[];let e=new Set,s=[];return P.forEach(r=>{r.teams&&r.teams.forEach(r=>{let t=r.team_id;e.has(t)||(e.add(t),s.push(r))})}),s},[P]),$=f.useMemo(()=>P?Array.from(new Set(P.flatMap(e=>e.mcp_access_groups).filter(e=>null!=e))):[],[P]),Q=(0,f.useCallback)((e,s)=>{if(!P)return D([]);let r=P;if("personal"===e){D([]);return}"all"!==e&&(r=r.filter(s=>{var r;return null===(r=s.teams)||void 0===r?void 0:r.some(s=>s.team_id===e)})),"all"!==s&&(r=r.filter(e=>{var r;return null===(r=e.mcp_access_groups)||void 0===r?void 0:r.some(e=>"string"==typeof e?e===s:e&&e.name===s)})),D(r)},[P]);(0,f.useEffect)(()=>{Q(U,V)},[P,U,V,Q]);let X=f.useMemo(()=>eR(null!=r?r:"",e=>{E(e),q(!1)},e=>{E(e),q(!0)},ee,A),[r,A]);function ee(e){O(e),T(!0)}let es=async()=>{if(null!=M&&null!=s)try{G(!0),await (0,_.deleteMCPServer)(s,M),S.Z.success("Deleted MCP Server successfully"),w()}catch(e){console.error("Error deleting the mcp server:",e)}finally{G(!1),T(!1),O(null)}},er=M?(y||[]).find(e=>e.server_id===M):null,et=f.useMemo(()=>B.find(e=>e.server_id===L)||{server_id:"",server_name:"",alias:"",url:"",transport:"",auth_type:"",created_at:"",created_by:"",updated_at:"",updated_by:""},[B,L]),el=f.useCallback(()=>{q(!1),E(null),w()},[w]);return s&&r&&h?(0,t.jsxs)("div",{className:"w-full h-full p-6",children:[(0,t.jsx)(g.Z,{open:I,title:"Delete MCP Server?",onOk:es,okText:J?"Deleting...":"Delete",onCancel:()=>{T(!1),O(null)},cancelText:"Cancel",cancelButtonProps:{disabled:J},okButtonProps:{danger:!0},confirmLoading:J,children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(e2,{children:"Are you sure you want to delete this MCP Server? This action cannot be undone."}),er&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-red-50 rounded-lg border border-red-200",children:[(0,t.jsx)(e1,{level:5,className:"mb-3 text-gray-900",children:"Server Information"}),(0,t.jsxs)(j.Z,{column:1,size:"small",children:[er.server_name&&(0,t.jsx)(j.Z.Item,{label:(0,t.jsx)("span",{className:"font-semibold text-gray-700",children:"Server Name"}),children:(0,t.jsx)(e2,{className:"text-sm",children:er.server_name})}),er.alias&&(0,t.jsx)(j.Z.Item,{label:(0,t.jsx)("span",{className:"font-semibold text-gray-700",children:"Alias"}),children:(0,t.jsx)(e2,{className:"text-sm",children:er.alias})}),(0,t.jsx)(j.Z.Item,{label:(0,t.jsx)("span",{className:"font-semibold text-gray-700",children:"Server ID"}),children:(0,t.jsx)(e2,{code:!0,className:"text-sm",children:er.server_id})}),(0,t.jsx)(j.Z.Item,{label:(0,t.jsx)("span",{className:"font-semibold text-gray-700",children:"URL"}),children:(0,t.jsx)(e2,{code:!0,className:"text-sm",children:er.url})})]})]})]})}),(0,t.jsx)(eb,{userRole:r,accessToken:s,onCreateSuccess:e=>{D(s=>[...s,e]),K(!1)},isModalVisible:H,setModalVisible:K,availableAccessGroups:$}),(0,t.jsx)(x.Z,{children:"MCP Servers"}),(0,t.jsx)(m.Z,{className:"text-tremor-content mt-2",children:"Configure and manage your MCP servers"}),(0,l.tY)(r)&&(0,t.jsx)(n.Z,{className:"mt-4 mb-4",onClick:()=>K(!0),children:"+ Add New MCP Server"}),(0,t.jsxs)(o.Z,{className:"w-full h-full",children:[(0,t.jsx)(c.Z,{className:"flex justify-between mt-2 w-full items-center",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(i.Z,{children:"All Servers"}),(0,t.jsx)(i.Z,{children:"Connect"})]})}),(0,t.jsxs)(u.Z,{children:[(0,t.jsx)(d.Z,{children:L?(0,t.jsx)(e0,{mcpServer:et,onBack:el,isProxyAdmin:(0,l.tY)(r),isEditing:z,accessToken:s,userID:h,userRole:r,availableAccessGroups:$},L):(0,t.jsxs)("div",{className:"w-full h-full",children:[(0,t.jsx)("div",{className:"w-full px-6",children:(0,t.jsx)("div",{className:"flex flex-col space-y-4",children:(0,t.jsx)("div",{className:"flex items-center justify-between bg-gray-50 rounded-lg p-4 border-2 border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(m.Z,{className:"text-lg font-semibold text-gray-900",children:"Current Team:"}),(0,t.jsxs)(p.default,{value:U,onChange:e=>{R(e),Q(e,V)},style:{width:300},children:[(0,t.jsx)(e4,{value:"all",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:Y?"All Available Servers":"All Servers"})]})}),(0,t.jsx)(e4,{value:"personal",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:"Personal"})]})}),W.map(e=>(0,t.jsx)(e4,{value:e.team_id,children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:e.team_alias||e.team_id})]})},e.team_id))]}),(0,t.jsxs)(m.Z,{className:"text-lg font-semibold text-gray-900 ml-6",children:["Access Group:",(0,t.jsx)(v.Z,{title:"An MCP Access Group is a set of users or teams that have permission to access specific MCP servers. Use access groups to control and organize who can connect to which servers.",children:(0,t.jsx)(a.Z,{style:{marginLeft:4,color:"#888"}})})]}),(0,t.jsxs)(p.default,{value:V,onChange:e=>{F(e),Q(U,e)},style:{width:300},children:[(0,t.jsx)(e4,{value:"all",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:"All Access Groups"})]})}),$.map(e=>(0,t.jsx)(e4,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:e})]})},e))]})]})})})}),(0,t.jsx)("div",{className:"w-full px-6 mt-6",children:(0,t.jsx)(k.w,{data:B,columns:X,renderSubComponent:()=>(0,t.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:N,noDataMessage:"No MCP servers configured",loadingMessage:"\uD83D\uDE85 Loading MCP servers..."})})]})}),(0,t.jsx)(d.Z,{children:(0,t.jsx)(eE,{})})]})]})]}):(console.log("Missing required authentication parameters",{accessToken:s,userRole:r,userID:h}),(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))},e6=r(21770);let e3=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);function e7(e){if(!e)return[];if(Array.isArray(e))return e.map(e=>e8(e)).filter(e=>void 0!==e);let s=e8(e);return void 0===s?[]:[s]}function e8(e,s){if(!e)return;let r=void 0!==s?s:e.default;if("object"===e.type){let s=e3(r)?{...r}:{};return e.properties&&Object.entries(e.properties).forEach(e=>{let[r,t]=e;s[r]=e8(t,s[r])}),s}if("array"===e.type){if(Array.isArray(r)){let s=e.items;if(!s)return r;if(0===r.length){let e=e7(s);return e.length?e:r}return Array.isArray(s)?r.map((e,r)=>{var t;return e8(null!==(t=s[r])&&void 0!==t?t:s[s.length-1],e)}):r.map(e=>e8(s,e))}return void 0!==r?r:e7(e.items)}if(void 0!==r)return r;switch(e.type){case"integer":case"number":return 0;case"boolean":return!1;default:return""}}let e9=e=>{let s=e8(e);if("object"===e.type||"array"===e.type){let r="array"===e.type?[]:{};return JSON.stringify(null!=s?s:r,null,2)}return s};function se(e){let{tool:s,onSubmit:r,isLoading:l,result:a,error:n,onClose:i}=e,[o]=A.Z.useForm(),[c,d]=f.useState("formatted"),[u,m]=f.useState(null),[x,h]=f.useState(null),p=f.useMemo(()=>"string"==typeof s.inputSchema?{type:"object",properties:{input:{type:"string",description:"Input for this tool"}},required:["input"]}:s.inputSchema,[s.inputSchema]),g=f.useMemo(()=>p.properties&&p.properties.params&&"object"===p.properties.params.type&&p.properties.params.properties?{type:"object",properties:p.properties.params.properties,required:p.properties.params.required||[]}:p,[p]);f.useEffect(()=>{if(o.resetFields(),!g.properties)return;let e={};Object.entries(g.properties).forEach(s=>{let[r,t]=s;e[r]=e9(t)}),o.setFieldsValue(e)},[o,g,s]),f.useEffect(()=>{u&&(a||n)&&h(Date.now()-u)},[a,n,u]);let j=async e=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{let s=document.createElement("textarea");s.value=e,s.style.position="fixed",s.style.opacity="0",document.body.appendChild(s),s.focus(),s.select();let r=document.execCommand("copy");if(document.body.removeChild(s),!r)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},b=async()=>{await j(JSON.stringify(a,null,2))?S.Z.success("Result copied to clipboard"):S.Z.fromBackend("Failed to copy result")},y=async()=>{await j(s.name)?S.Z.success("Tool name copied to clipboard"):S.Z.fromBackend("Failed to copy tool name")};return(0,t.jsxs)("div",{className:"space-y-4 h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[s.mcp_info.logo_url&&(0,t.jsx)("img",{src:s.mcp_info.logo_url,alt:"".concat(s.mcp_info.server_name," logo"),className:"w-6 h-6 object-contain"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Tool:"}),(0,t.jsxs)("div",{className:"group inline-flex items-center space-x-1 bg-slate-50 hover:bg-slate-100 px-3 py-1 rounded-md cursor-pointer transition-colors border border-slate-200",onClick:y,title:"Click to copy tool name",children:[(0,t.jsx)("span",{className:"font-mono text-slate-700 font-medium text-sm",children:s.name}),(0,t.jsx)("svg",{className:"w-3 h-3 text-slate-400 group-hover:text-slate-600 transition-colors",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})]})]}),(0,t.jsx)("p",{className:"text-xs text-gray-600",children:s.description}),(0,t.jsxs)("p",{className:"text-xs text-gray-500",children:["Provider: ",s.mcp_info.server_name]})]})]}),(0,t.jsx)(O.z,{onClick:i,variant:"light",size:"sm",className:"text-gray-500 hover:text-gray-700",children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 h-full",children:[(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"border-b border-gray-100 px-4 py-2",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Input Parameters"}),(0,t.jsx)(v.Z,{title:"Configure the input parameters for this tool call",children:(0,t.jsx)(M.Z,{className:"text-gray-400 hover:text-gray-600"})})]})}),(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)(A.Z,{form:o,onFinish:e=>{m(Date.now()),h(null);let s={};Object.entries(e).forEach(e=>{var r;let[t,l]=e,a=null===(r=g.properties)||void 0===r?void 0:r[t];if(a&&null!=l&&""!==l)switch(a.type){case"boolean":s[t]="true"===l||!0===l;break;case"number":case"integer":{let e=Number(l);s[t]=Number.isNaN(e)?l:"integer"===a.type?Math.trunc(e):e;break}case"object":case"array":try{let e="string"==typeof l?JSON.parse(l):l,r="object"===a.type&&null!==e&&"object"==typeof e&&!Array.isArray(e),n="array"===a.type&&Array.isArray(e);"object"===a.type&&r||"array"===a.type&&n?s[t]=e:s[t]=l}catch(e){s[t]=l}break;case"string":s[t]=String(l);break;default:s[t]=l}else null!=l&&""!==l&&(s[t]=l)}),r(p.properties&&p.properties.params&&"object"===p.properties.params.type&&p.properties.params.properties?{params:s}:s)},layout:"vertical",className:"space-y-3",children:["string"==typeof s.inputSchema?(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Input ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),name:"input",rules:[{required:!0,message:"Please enter input for this tool"}],className:"mb-3",children:(0,t.jsx)(O.o,{placeholder:"Enter input for this tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})}):void 0===g.properties?(0,t.jsx)("div",{className:"text-center py-6 bg-gray-50 rounded-lg border border-gray-200",children:(0,t.jsxs)("div",{className:"max-w-sm mx-auto",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900 mb-1",children:"No Parameters Required"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"This tool can be called without any input parameters."})]})}):(0,t.jsx)("div",{className:"space-y-3",children:Object.entries(g.properties).map(e=>{var r,l,a,n;let[i,o]=e,c=e9(o),d="".concat(s.name,"-").concat(i);return(0,t.jsxs)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:[i," ",(null===(r=g.required)||void 0===r?void 0:r.includes(i))&&(0,t.jsx)("span",{className:"text-red-500",children:"*"}),o.description&&(0,t.jsx)(v.Z,{title:o.description,children:(0,t.jsx)(M.Z,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:i,initialValue:c,rules:[{required:null===(l=g.required)||void 0===l?void 0:l.includes(i),message:"Please enter ".concat(i)},..."object"===o.type||"array"===o.type?[{validator:(e,s)=>{var r;if((null==s||""===s)&&!(null===(r=g.required)||void 0===r?void 0:r.includes(i)))return Promise.resolve();try{let e="string"==typeof s?JSON.parse(s):s,r="object"===o.type&&null!==e&&"object"==typeof e&&!Array.isArray(e),t="array"===o.type&&Array.isArray(e);if("object"===o.type&&r||"array"===o.type&&t)return Promise.resolve();return Promise.reject(Error("object"===o.type?"Please enter a JSON object":"Please enter a JSON array"))}catch(e){return Promise.reject(Error("Invalid JSON"))}}}]:[]],className:"mb-3",children:["string"===o.type&&o.enum&&(0,t.jsxs)("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors",defaultValue:null!=c?c:"",children:[!(null===(a=g.required)||void 0===a?void 0:a.includes(i))&&(0,t.jsxs)("option",{value:"",children:["Select ",i]}),o.enum.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),"string"===o.type&&!o.enum&&(0,t.jsx)(O.o,{placeholder:o.description||"Enter ".concat(i),defaultValue:null!=c?c:"",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"}),("number"===o.type||"integer"===o.type)&&(0,t.jsx)("input",{type:"number",step:"integer"===o.type?1:"any",placeholder:o.description||"Enter ".concat(i),defaultValue:null!=c?c:0,className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors"}),"boolean"===o.type&&(0,t.jsxs)("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors",defaultValue:(null!=c&&c).toString(),children:[!(null===(n=g.required)||void 0===n?void 0:n.includes(i))&&(0,t.jsxs)("option",{value:"",children:["Select ",i]}),(0,t.jsx)("option",{value:"true",children:"True"}),(0,t.jsx)("option",{value:"false",children:"False"})]}),("object"===o.type||"array"===o.type)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("textarea",{rows:"object"===o.type?6:4,placeholder:o.description||("object"===o.type?"Enter JSON object for ".concat(i):"Enter JSON array for ".concat(i)),defaultValue:null!=c?c:"object"===o.type?"{}":"[]",spellCheck:!1,"data-testid":"textarea-".concat(i),className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm font-mono"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"object"===o.type?"Provide a valid JSON object.":"Provide a valid JSON array."})]})]},d)})}),(0,t.jsx)("div",{className:"pt-3 border-t border-gray-100",children:(0,t.jsx)(O.z,{onClick:()=>o.submit(),disabled:l,variant:"primary",className:"w-full",loading:l,children:l?"Calling Tool...":a||n?"Call Again":"Call Tool"})})]})})]}),(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"border-b border-gray-100 px-4 py-2",children:(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Tool Result"})}),(0,t.jsx)("div",{className:"p-4",children:a||n||l?(0,t.jsxs)("div",{className:"space-y-3",children:[a&&!l&&!n&&(0,t.jsx)("div",{className:"p-2 bg-green-50 border border-green-200 rounded-lg",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("svg",{className:"h-4 w-4 text-green-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)("h4",{className:"text-xs font-medium text-green-900",children:"Tool executed successfully"}),null!==x&&(0,t.jsxs)("span",{className:"text-xs text-green-600 ml-1",children:["• ",(x/1e3).toFixed(2),"s"]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,t.jsxs)("div",{className:"flex bg-white rounded border border-green-300 p-0.5",children:[(0,t.jsx)("button",{onClick:()=>d("formatted"),className:"px-2 py-1 text-xs font-medium rounded transition-colors ".concat("formatted"===c?"bg-green-100 text-green-800":"text-green-600 hover:text-green-800"),children:"Formatted"}),(0,t.jsx)("button",{onClick:()=>d("json"),className:"px-2 py-1 text-xs font-medium rounded transition-colors ".concat("json"===c?"bg-green-100 text-green-800":"text-green-600 hover:text-green-800"),children:"JSON"})]}),(0,t.jsx)("button",{onClick:b,className:"p-1 hover:bg-green-100 rounded text-green-700",title:"Copy response",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})]})]})}),(0,t.jsxs)("div",{className:"max-h-96 overflow-y-auto",children:[l&&(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center h-48 text-gray-500",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-gray-200"}),(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-blue-600 border-t-transparent absolute top-0"})]}),(0,t.jsx)("p",{className:"text-sm font-medium mt-3",children:"Calling tool..."}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Please wait while we process your request"})]}),n&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3",children:(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)("svg",{className:"h-4 w-4 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-red-900",children:"Tool Call Failed"}),null!==x&&(0,t.jsxs)("span",{className:"text-xs text-red-600",children:["• ",(x/1e3).toFixed(2),"s"]})]}),(0,t.jsx)("div",{className:"bg-white border border-red-200 rounded p-2 max-h-48 overflow-y-auto",children:(0,t.jsx)("pre",{className:"text-xs whitespace-pre-wrap text-red-700 font-mono",children:n.message})})]})]})}),a&&!l&&!n&&(0,t.jsx)("div",{className:"space-y-3",children:"formatted"===c?a.map((e,s)=>(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:["text"===e.type&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Text Response"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsx)("div",{className:"bg-white rounded border border-gray-200 max-h-64 overflow-y-auto",children:(0,t.jsx)("div",{className:"p-3 space-y-2",children:e.text.split("\n\n").map((e,s)=>{if(""===e.trim())return null;if(e.startsWith("##")){let r=e.replace(/^#+\s/,"");return(0,t.jsx)("div",{className:"border-b border-gray-200 pb-1 mb-2",children:(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:r})},s)}let r=/(https?:\/\/[^\s\)]+)/g;if(r.test(e)){let l=e.split(r);return(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded p-2",children:(0,t.jsx)("div",{className:"text-xs text-gray-700 leading-relaxed whitespace-pre-wrap",children:l.map((e,s)=>r.test(e)?(0,t.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline break-all",children:e},s):e)})},s)}return e.includes("Score:")?(0,t.jsx)("div",{className:"bg-green-50 border-l-4 border-green-400 p-2 rounded-r",children:(0,t.jsx)("p",{className:"text-xs text-green-800 font-medium whitespace-pre-wrap",children:e})},s):(0,t.jsx)("div",{className:"bg-gray-50 rounded p-2 border border-gray-200",children:(0,t.jsx)("div",{className:"text-xs text-gray-700 leading-relaxed whitespace-pre-wrap font-mono",children:e})},s)}).filter(Boolean)})})})]}),"image"===e.type&&e.url&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Image Response"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsx)("div",{className:"bg-gray-50 rounded p-3 border border-gray-200",children:(0,t.jsx)("img",{src:e.url,alt:"Tool result",className:"max-w-full h-auto rounded shadow-sm"})})})]}),"embedded_resource"===e.type&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Embedded Resource"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2 p-3 bg-blue-50 border border-blue-200 rounded",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)("svg",{className:"h-5 w-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("p",{className:"text-xs font-medium text-blue-900",children:["Resource Type: ",e.resource_type]}),e.url&&(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-xs text-blue-600 hover:text-blue-800 hover:underline mt-1 transition-colors",children:["View Resource",(0,t.jsxs)("svg",{className:"ml-1 h-3 w-3",fill:"currentColor",viewBox:"0 0 20 20",children:[(0,t.jsx)("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),(0,t.jsx)("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"})]})]})]})]})})]})]},s)):(0,t.jsx)("div",{className:"bg-white rounded border border-gray-200",children:(0,t.jsx)("div",{className:"p-3 overflow-auto max-h-80 bg-gray-50",children:(0,t.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all text-gray-800",children:JSON.stringify(a,null,2)})})})})]})]}):(0,t.jsx)("div",{className:"flex flex-col justify-center items-center h-48 text-gray-500",children:(0,t.jsxs)("div",{className:"text-center max-w-sm",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900 mb-1",children:"Ready to Call Tool"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 leading-relaxed",children:'Configure the input parameters and click "Call Tool" to see the results here.'})]})})})]})]})]})}var ss=r(69993),sr=e=>{let{serverId:s,accessToken:r,auth_type:l,userRole:a,userID:n,serverAlias:i}=e,[o,c]=(0,f.useState)(null),[d,u]=(0,f.useState)(null),[m,x]=(0,f.useState)(null),{data:h,isLoading:p,error:g}=(0,y.a)({queryKey:["mcpTools",s],queryFn:()=>{if(!r)throw Error("Access Token required");return(0,_.listMCPTools)(r,s)},enabled:!!r,staleTime:3e4}),{mutate:j,isPending:v}=(0,e6.D)({mutationFn:async e=>{if(!r)throw Error("Access Token required");try{return await (0,_.callMCPTool)(r,s,e.tool.name,e.arguments)}catch(e){throw e}},onSuccess:e=>{u(e.content),x(null)},onError:e=>{x(e),u(null)}}),b=(null==h?void 0:h.tools)||[];return(0,t.jsx)("div",{className:"w-full h-screen p-4 bg-white",children:(0,t.jsx)(F.Zb,{className:"w-full rounded-xl shadow-md overflow-hidden",children:(0,t.jsxs)("div",{className:"flex h-auto w-full gap-4",children:[(0,t.jsxs)("div",{className:"w-1/4 p-4 bg-gray-50 flex flex-col",children:[(0,t.jsx)(F.Dx,{className:"text-xl font-semibold mb-6 mt-2",children:"MCP Tools"}),(0,t.jsx)("div",{className:"flex flex-col flex-1",children:(0,t.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,t.jsxs)(F.xv,{className:"font-medium block mb-3 text-gray-700 flex items-center",children:[(0,t.jsx)(V.Z,{className:"mr-2"})," Available Tools",b.length>0&&(0,t.jsx)("span",{className:"ml-2 bg-blue-100 text-blue-800 text-xs font-medium px-2 py-0.5 rounded-full",children:b.length})]}),p&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 bg-white border border-gray-200 rounded-lg",children:[(0,t.jsxs)("div",{className:"relative mb-3",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-gray-200"}),(0,t.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-blue-600 border-t-transparent absolute top-0"})]}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700",children:"Loading tools..."})]}),(null==h?void 0:h.error)&&!p&&!b.length&&(0,t.jsx)("div",{className:"p-3 text-xs text-red-800 rounded-lg bg-red-50 border border-red-200",children:(0,t.jsxs)("p",{className:"font-medium",children:["Error: ",h.message]})}),!p&&!(null==h?void 0:h.error)&&(!b||0===b.length)&&(0,t.jsxs)("div",{className:"p-4 text-center bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"mx-auto w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center mb-2",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 8.172V5L8 4z"})})}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700 mb-1",children:"No tools available"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"No tools found for this server"})]}),!p&&!(null==h?void 0:h.error)&&b.length>0&&(0,t.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto min-h-0 mcp-tools-scrollable",style:{maxHeight:"400px",scrollbarWidth:"auto",scrollbarColor:"#cbd5e0 #f7fafc"},children:b.map(e=>(0,t.jsxs)("div",{className:"border rounded-lg p-3 cursor-pointer transition-all hover:shadow-sm ".concat((null==o?void 0:o.name)===e.name?"border-blue-500 bg-blue-50 ring-1 ring-blue-200":"border-gray-200 bg-white hover:border-gray-300"),onClick:()=>{c(e),u(null),x(null)},children:[(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[e.mcp_info.logo_url&&(0,t.jsx)("img",{src:e.mcp_info.logo_url,alt:"".concat(e.mcp_info.server_name," logo"),className:"w-4 h-4 object-contain flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"font-mono text-xs font-medium text-gray-900 truncate",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 truncate",children:e.mcp_info.server_name}),(0,t.jsx)("p",{className:"text-xs text-gray-600 mt-1 line-clamp-2 leading-relaxed",children:e.description})]})]}),(null==o?void 0:o.name)===e.name&&(0,t.jsx)("div",{className:"mt-2 pt-2 border-t border-blue-200",children:(0,t.jsxs)("div",{className:"flex items-center text-xs font-medium text-blue-700",children:[(0,t.jsx)("svg",{className:"w-3 h-3 mr-1",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Selected"]})})]},e.name))})]})})]}),(0,t.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,t.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,t.jsx)(F.Dx,{className:"text-xl font-semibold mb-0",children:"Tool Testing Playground"})}),(0,t.jsx)("div",{className:"flex-1 overflow-auto p-4",children:o?(0,t.jsx)("div",{className:"h-full",children:(0,t.jsx)(se,{tool:o,onSubmit:e=>{j({tool:o,arguments:e})},result:d,error:m,isLoading:v,onClose:()=>c(null)})}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(ss.Z,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)(F.xv,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select a Tool to Test"}),(0,t.jsx)(F.xv,{className:"text-center text-gray-500 max-w-md",children:"Choose a tool from the left sidebar to start testing its functionality with custom inputs."})]})})]})]})})})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5276-8bb0b1938bb0f21f.js b/litellm/proxy/_experimental/out/_next/static/chunks/5276-8bb0b1938bb0f21f.js
deleted file mode 100644
index e212fcfc2c0..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/5276-8bb0b1938bb0f21f.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5276],{44803:function(e,s,r){r.d(s,{Dx:function(){return a.Z},Zb:function(){return t.Z},xv:function(){return l.Z}});var t=r(12514),l=r(84264),a=r(96761)},48678:function(e,s,r){r.d(s,{d:function(){return e5},o:function(){return sr}});var t=r(57437),l=r(20347),a=r(67187),n=r(78489),i=r(12485),o=r(18135),c=r(35242),d=r(29706),u=r(77991),m=r(84264),x=r(96761),h=r(57840),p=r(37592),g=r(22116),j=r(76188),v=r(99981),f=r(2265),b=r(68474),y=r(11713),N=r(90246),_=r(19250),w=r(39760);let Z=(0,N.n)("mcpServerHealth"),C=e=>{let{accessToken:s}=(0,w.Z)();return(0,y.a)({queryKey:[...Z.lists(),{serverIds:e}],queryFn:async()=>await (0,_.fetchMCPServerHealth)(s,e),enabled:!!s,refetchInterval:3e4})};var S=r(9114),k=r(12322),A=r(10032),P=r(4260),M=r(15424),O=r(64504);let I={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",BASIC:"basic",OAUTH2:"oauth2"},T={SSE:"sse"},L=e=>(console.log(e),null==e)?T.SSE:e,E=e=>null==e?I.NONE:e;var z=r(19015),q=r(44851),U=r(33866),R=r(62670),V=r(58630),F=r(44803),B=e=>{let{value:s={},onChange:r,tools:l=[],disabled:a=!1}=e,n=(e,t)=>{let l={...s,tool_name_to_cost_per_query:{...s.tool_name_to_cost_per_query,[e]:t}};null==r||r(l)};return(0,t.jsx)(F.Zb,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,t.jsx)(R.Z,{className:"text-green-600"}),(0,t.jsx)(F.Dx,{children:"Cost Configuration"}),(0,t.jsx)(v.Z,{title:"Configure costs for this MCP server's tool calls. Set a default rate and per-tool overrides.",children:(0,t.jsx)(M.Z,{className:"text-gray-400"})})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Default Cost per Query ($)",(0,t.jsx)(v.Z,{title:"Default cost charged for each tool call to this server.",children:(0,t.jsx)(M.Z,{className:"ml-1 text-gray-400"})})]}),(0,t.jsx)(z.Z,{min:0,step:1e-4,precision:4,placeholder:"0.0000",value:s.default_cost_per_query,onChange:e=>{let t={...s,default_cost_per_query:e};null==r||r(t)},disabled:a,style:{width:"200px"},addonBefore:"$"}),(0,t.jsx)(F.xv,{className:"block mt-1 text-gray-500 text-sm",children:"Set a default cost for all tool calls to this server"})]}),l.length>0&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("label",{className:"block text-sm font-medium text-gray-700",children:["Tool-Specific Costs ($)",(0,t.jsx)(v.Z,{title:"Override the default cost for specific tools. Leave blank to use the default rate.",children:(0,t.jsx)(M.Z,{className:"ml-1 text-gray-400"})})]}),(0,t.jsx)(q.default,{items:[{key:"1",label:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(V.Z,{className:"mr-2 text-blue-500"}),(0,t.jsx)("span",{className:"font-medium",children:"Available Tools"}),(0,t.jsx)(U.Z,{count:l.length,style:{backgroundColor:"#52c41a",marginLeft:"8px"}})]}),children:(0,t.jsx)("div",{className:"space-y-3 max-h-64 overflow-y-auto",children:l.map((e,r)=>{var l;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(F.xv,{className:"font-medium text-gray-900",children:e.name}),e.description&&(0,t.jsx)(F.xv,{className:"text-gray-500 text-sm block mt-1",children:e.description})]}),(0,t.jsx)("div",{className:"ml-4",children:(0,t.jsx)(z.Z,{min:0,step:1e-4,precision:4,placeholder:"Use default",value:null===(l=s.tool_name_to_cost_per_query)||void 0===l?void 0:l[e.name],onChange:s=>n(e.name,s),disabled:a,style:{width:"120px"},addonBefore:"$"})})]},r)})})}]})]})]}),(s.default_cost_per_query||s.tool_name_to_cost_per_query&&Object.keys(s.tool_name_to_cost_per_query).length>0)&&(0,t.jsxs)("div",{className:"mt-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,t.jsx)(F.xv,{className:"text-blue-800 font-medium",children:"Cost Summary:"}),(0,t.jsxs)("div",{className:"mt-2 space-y-1",children:[s.default_cost_per_query&&(0,t.jsxs)(F.xv,{className:"text-blue-700",children:["• Default cost: $",s.default_cost_per_query.toFixed(4)," per query"]}),s.tool_name_to_cost_per_query&&Object.entries(s.tool_name_to_cost_per_query).map(e=>{let[s,r]=e;return null!=r&&(0,t.jsxs)(F.xv,{className:"text-blue-700",children:["• ",s,": $",r.toFixed(4)," per query"]},s)})]})]})]})})},D=r(10353),H=r(51653),K=r(5545),J=r(83669),G=r(29271),Y=r(89245);let W=e=>{var s,r;let{accessToken:t,oauthAccessToken:l,formValues:a,enabled:n=!0}=e,[i,o]=(0,f.useState)([]),[c,d]=(0,f.useState)(!1),[u,m]=(0,f.useState)(null),[x,h]=(0,f.useState)(null),[p,g]=(0,f.useState)(!1),j=a.auth_type===I.OAUTH2,v=!!(a.url&&a.transport&&a.auth_type&&t&&(!j||l)),b=JSON.stringify(null!==(s=a.static_headers)&&void 0!==s?s:{}),y=JSON.stringify(null!==(r=a.credentials)&&void 0!==r?r:{}),N=async()=>{if(t&&a.url&&(!j||l)){d(!0),m(null);try{let e=Array.isArray(a.static_headers)?a.static_headers.reduce((e,s)=>{var r;let t=null==s?void 0:null===(r=s.header)||void 0===r?void 0:r.trim();return t&&(e[t]=(null==s?void 0:s.value)!=null?String(s.value):""),e},{}):!Array.isArray(a.static_headers)&&a.static_headers&&"object"==typeof a.static_headers?Object.entries(a.static_headers).reduce((e,s)=>{let[r,t]=s;return r&&(e[r]=null!=t?String(t):""),e},{}):{},s=a.credentials&&"object"==typeof a.credentials?Object.entries(a.credentials).reduce((e,s)=>{let[r,t]=s;if(null==t||""===t)return e;if("scopes"===r){if(Array.isArray(t)){let s=t.filter(e=>null!=e&&""!==e);s.length>0&&(e[r]=s)}}else e[r]=t;return e},{}):void 0,r={server_id:a.server_id||"",server_name:a.server_name||"",url:a.url,transport:a.transport,auth_type:a.auth_type,authorization_url:a.authorization_url,token_url:a.token_url,registration_url:a.registration_url,mcp_info:a.mcp_info,static_headers:e};s&&Object.keys(s).length>0&&(r.credentials=s);let n=await (0,_.testMCPToolsListRequest)(t,r,l);if(n.tools&&!n.error)o(n.tools),m(null),h(null),n.tools.length>0&&!p&&g(!0);else{let e=n.message||"Failed to retrieve tools list";m(e),h(n.stack_trace||null),o([]),g(!1)}}catch(e){console.error("Tools fetch error:",e),m(e instanceof Error?e.message:String(e)),h(null),o([]),g(!1)}finally{d(!1)}}},w=()=>{o([]),m(null),h(null),g(!1)};return(0,f.useEffect)(()=>{n&&(v?N():w())},[a.url,a.transport,a.auth_type,t,n,l,v,b,y]),{tools:i,isLoadingTools:c,toolsError:u,toolsErrorStackTrace:x,hasShownSuccessMessage:p,canFetchTools:v,fetchTools:N,clearTools:w}};var $=e=>{let{accessToken:s,oauthAccessToken:r,formValues:l,onToolsLoaded:a}=e,{tools:n,isLoadingTools:i,toolsError:o,toolsErrorStackTrace:c,canFetchTools:d,fetchTools:u}=W({accessToken:s,oauthAccessToken:r,formValues:l,enabled:!0});return((0,f.useEffect)(()=>{null==a||a(n)},[n,a]),d||l.url)?(0,t.jsx)(F.Zb,{children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(J.Z,{className:"text-blue-600"}),(0,t.jsx)(F.Dx,{children:"Connection Status"})]}),!d&&l.url&&(0,t.jsxs)("div",{className:"text-center py-6 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(V.Z,{className:"text-2xl mb-2"}),(0,t.jsx)(F.xv,{children:"Complete required fields to test connection"}),(0,t.jsx)("br",{}),(0,t.jsx)(F.xv,{className:"text-sm",children:"Fill in URL, Transport, and Authentication to test MCP server connection"})]}),d&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(F.xv,{className:"text-gray-700 font-medium",children:i?"Testing connection to MCP server...":n.length>0?"Connection successful":o?"Connection failed":"Ready to test connection"}),(0,t.jsx)("br",{}),(0,t.jsxs)(F.xv,{className:"text-gray-500 text-sm",children:["Server: ",l.url]})]}),i&&(0,t.jsxs)("div",{className:"flex items-center text-blue-600",children:[(0,t.jsx)(D.Z,{size:"small",className:"mr-2"}),(0,t.jsx)(F.xv,{className:"text-blue-600",children:"Connecting..."})]}),!i&&!o&&n.length>0&&(0,t.jsxs)("div",{className:"flex items-center text-green-600",children:[(0,t.jsx)(J.Z,{className:"mr-1"}),(0,t.jsx)(F.xv,{className:"text-green-600 font-medium",children:"Connected"})]}),o&&(0,t.jsxs)("div",{className:"flex items-center text-red-600",children:[(0,t.jsx)(G.Z,{className:"mr-1"}),(0,t.jsx)(F.xv,{className:"text-red-600 font-medium",children:"Failed"})]})]}),i&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,t.jsx)(D.Z,{size:"large"}),(0,t.jsx)(F.xv,{className:"ml-3",children:"Testing connection and loading tools..."})]}),o&&(0,t.jsx)(H.Z,{message:"Connection Failed",description:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{children:o}),c&&(0,t.jsx)(q.default,{items:[{key:"stack-trace",label:"Stack Trace",children:(0,t.jsx)("pre",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"12px",fontFamily:"monospace",margin:0,padding:"8px",backgroundColor:"#f5f5f5",borderRadius:"4px",maxHeight:"400px",overflow:"auto"},children:c})}],style:{marginTop:"12px"}})]}),type:"error",showIcon:!0,action:(0,t.jsx)(K.ZP,{icon:(0,t.jsx)(Y.Z,{}),onClick:u,size:"small",children:"Retry"})}),!i&&0===n.length&&!o&&(0,t.jsxs)("div",{className:"text-center py-6 text-gray-500 border rounded-lg border-dashed",children:[(0,t.jsx)(J.Z,{className:"text-2xl mb-2 text-green-500"}),(0,t.jsx)(F.xv,{className:"text-green-600 font-medium",children:"Connection successful!"}),(0,t.jsx)("br",{}),(0,t.jsx)(F.xv,{className:"text-gray-500",children:"No tools found for this MCP server"})]})]})]})}):null},Q=r(4156),X=e=>{let{accessToken:s,oauthAccessToken:r,formValues:l,allowedTools:a,existingAllowedTools:n,onAllowedToolsChange:i}=e,o=(0,f.useRef)(0),{tools:c,isLoadingTools:d,toolsError:u,canFetchTools:m}=W({accessToken:s,oauthAccessToken:r,formValues:l,enabled:!0});(0,f.useEffect)(()=>{if(c.length>0&&c.length!==o.current&&0===a.length){if(n&&n.length>0){let e=c.map(e=>e.name);i(n.filter(s=>e.includes(s)))}else i(c.map(e=>e.name))}o.current=c.length},[c,a.length,n,i]);let x=e=>{a.includes(e)?i(a.filter(s=>s!==e)):i([...a,e])};return m||l.url?(0,t.jsx)(F.Zb,{children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex items-center justify-between",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(V.Z,{className:"text-blue-600"}),(0,t.jsx)(F.Dx,{children:"Tool Configuration"}),c.length>0&&(0,t.jsx)(U.Z,{count:c.length,style:{backgroundColor:"#52c41a"}})]})}),(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3",children:(0,t.jsxs)(F.xv,{className:"text-blue-800 text-sm",children:[(0,t.jsx)("strong",{children:"Select which tools users can call:"})," Only checked tools will be available for users to invoke. Unchecked tools will be blocked from execution."]})}),d&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,t.jsx)(D.Z,{size:"large"}),(0,t.jsx)(F.xv,{className:"ml-3",children:"Loading tools..."})]}),u&&!d&&(0,t.jsxs)("div",{className:"text-center py-6 text-red-500 border rounded-lg border-dashed border-red-300 bg-red-50",children:[(0,t.jsx)(V.Z,{className:"text-2xl mb-2"}),(0,t.jsx)(F.xv,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)("br",{}),(0,t.jsx)(F.xv,{className:"text-sm text-red-500",children:u})]}),!d&&!u&&0===c.length&&m&&(0,t.jsxs)("div",{className:"text-center py-6 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(V.Z,{className:"text-2xl mb-2"}),(0,t.jsx)(F.xv,{children:"No tools available for configuration"}),(0,t.jsx)("br",{}),(0,t.jsx)(F.xv,{className:"text-sm",children:"Connect to an MCP server with tools to configure them"})]}),!m&&l.url&&(0,t.jsxs)("div",{className:"text-center py-6 text-gray-400 border rounded-lg border-dashed",children:[(0,t.jsx)(V.Z,{className:"text-2xl mb-2"}),(0,t.jsx)(F.xv,{children:"Complete required fields to configure tools"}),(0,t.jsx)("br",{}),(0,t.jsx)(F.xv,{className:"text-sm",children:"Fill in URL, Transport, and Authentication to load available tools"})]}),!d&&!u&&c.length>0&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-green-50 rounded-lg border border-green-200 flex-1",children:[(0,t.jsx)(J.Z,{className:"text-green-600"}),(0,t.jsxs)(F.xv,{className:"text-green-700 font-medium",children:[a.length," of ",c.length," ",1===c.length?"tool":"tools"," enabled for user access"]})]}),(0,t.jsxs)("div",{className:"flex gap-2 ml-3",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{i(c.map(e=>e.name))},className:"px-3 py-1.5 text-sm text-blue-600 hover:text-blue-700 hover:bg-blue-50 rounded-md transition-colors",children:"Enable All"}),(0,t.jsx)("button",{type:"button",onClick:()=>{i([])},className:"px-3 py-1.5 text-sm text-gray-600 hover:text-gray-700 hover:bg-gray-100 rounded-md transition-colors",children:"Disable All"})]})]}),(0,t.jsx)("div",{className:"space-y-2",children:c.map((e,s)=>(0,t.jsx)("div",{className:"p-4 rounded-lg border transition-colors cursor-pointer ".concat(a.includes(e.name)?"bg-blue-50 border-blue-300 hover:border-blue-400":"bg-gray-50 border-gray-200 hover:border-gray-300"),onClick:()=>x(e.name),children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(Q.Z,{checked:a.includes(e.name),onChange:()=>x(e.name)}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(F.xv,{className:"font-medium text-gray-900",children:e.name}),(0,t.jsx)("span",{className:"px-2 py-0.5 text-xs rounded-full font-medium ".concat(a.includes(e.name)?"bg-green-100 text-green-800":"bg-red-100 text-red-800"),children:a.includes(e.name)?"Enabled":"Disabled"})]}),e.description&&(0,t.jsx)(F.xv,{className:"text-gray-500 text-sm block mt-1",children:e.description}),(0,t.jsx)(F.xv,{className:"text-gray-400 text-xs block mt-1",children:a.includes(e.name)?"✓ Users can call this tool":"✗ Users cannot call this tool"})]})]})},s))})]})]})}):null},ee=e=>{let{isVisible:s}=e;return s?(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Stdio Configuration (JSON)",(0,t.jsx)(v.Z,{title:"Paste your stdio MCP server configuration in JSON format. You can use the full mcpServers structure from config.yaml or just the inner server configuration.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"stdio_config",rules:[{required:!0,message:"Please enter stdio configuration"},{validator:(e,s)=>{if(!s)return Promise.resolve();try{return JSON.parse(s),Promise.resolve()}catch(e){return Promise.reject("Please enter valid JSON")}}}],children:(0,t.jsx)(P.default.TextArea,{placeholder:'{\n "mcpServers": {\n "circleci-mcp-server": {\n "command": "npx",\n "args": ["-y", "@circleci/mcp-server-circleci"],\n "env": {\n "CIRCLECI_TOKEN": "your-circleci-token",\n "CIRCLECI_BASE_URL": "https://circleci.com"\n }\n }\n }\n}',rows:12,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 font-mono text-sm"})}):null},es=r(63709),er=r(58760),et=r(45246),el=r(96473);let{Panel:ea}=q.default;var en=e=>{var s;let{availableAccessGroups:r,mcpServer:l,searchValue:a,setSearchValue:n,getAccessGroupOptions:i}=e,o=A.Z.useFormInstance();return(0,f.useEffect)(()=>{if(l){if(l.extra_headers&&o.setFieldValue("extra_headers",l.extra_headers),l.static_headers){let e=Object.entries(l.static_headers).map(e=>{let[s,r]=e;return{header:s,value:null!=r?String(r):""}});o.setFieldValue("static_headers",e)}"boolean"==typeof l.allow_all_keys&&o.setFieldValue("allow_all_keys",l.allow_all_keys)}else o.setFieldValue("allow_all_keys",!1)},[l,o]),(0,t.jsx)(q.default,{className:"bg-gray-50 border border-gray-200 rounded-lg",expandIconPosition:"end",ghost:!1,children:(0,t.jsx)(ea,{header:(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Permission Management / Access Control"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 ml-4",children:"Configure access permissions and security settings (Optional)"})]}),className:"border-0",children:(0,t.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Allow All LiteLLM Keys",(0,t.jsx)(v.Z,{title:"When enabled, every API key can access this MCP server.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:'Enable if this server should be "public" to all keys.'})]}),(0,t.jsx)(A.Z.Item,{name:"allow_all_keys",valuePropName:"checked",initialValue:null!==(s=null==l?void 0:l.allow_all_keys)&&void 0!==s&&s,className:"mb-0",children:(0,t.jsx)(es.Z,{})})]}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["MCP Access Groups",(0,t.jsx)(v.Z,{title:"Specify access groups for this MCP server. Users must be in at least one of these groups to access the server.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"mcp_access_groups",className:"mb-4",children:(0,t.jsx)(p.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"value",filterOption:(e,s)=>{var r;return(null!==(r=null==s?void 0:s.value)&&void 0!==r?r:"").toLowerCase().includes(e.toLowerCase())},onSearch:e=>n(e),tokenSeparators:[","],options:i(),maxTagCount:"responsive",allowClear:!0})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Extra Headers",(0,t.jsx)(v.Z,{title:"Forward custom headers from incoming requests to this MCP server (e.g., Authorization, X-Custom-Header, User-Agent)",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})}),(null==l?void 0:l.extra_headers)&&l.extra_headers.length>0&&(0,t.jsxs)("span",{className:"ml-2 text-xs bg-blue-100 text-blue-700 px-2 py-1 rounded-full",children:[l.extra_headers.length," configured"]})]}),name:"extra_headers",children:(0,t.jsx)(p.default,{mode:"tags",placeholder:(null==l?void 0:l.extra_headers)&&l.extra_headers.length>0?"Currently: ".concat(l.extra_headers.join(", ")):"Enter header names (e.g., Authorization, X-Custom-Header)",className:"rounded-lg",size:"large",tokenSeparators:[","],allowClear:!0})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Static Headers",(0,t.jsx)(v.Z,{title:"Send these key-value headers with every request to this MCP server.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),required:!1,children:(0,t.jsx)(A.Z.List,{name:"static_headers",children:(e,s)=>{let{add:r,remove:l}=s;return(0,t.jsxs)("div",{className:"space-y-3",children:[e.map(e=>{let{key:s,name:r,...a}=e;return(0,t.jsxs)(er.Z,{className:"flex w-full",align:"baseline",size:"middle",children:[(0,t.jsx)(A.Z.Item,{...a,name:[r,"header"],className:"flex-1",rules:[{required:!0,message:"Header name is required"}],children:(0,t.jsx)(P.default,{size:"large",allowClear:!0,className:"rounded-lg",placeholder:"Header name (e.g., X-API-Key)"})}),(0,t.jsx)(A.Z.Item,{...a,name:[r,"value"],className:"flex-1",rules:[{required:!0,message:"Header value is required"}],children:(0,t.jsx)(P.default,{size:"large",allowClear:!0,className:"rounded-lg",placeholder:"Header value"})}),(0,t.jsx)(et.Z,{onClick:()=>l(r),className:"text-gray-500 hover:text-red-500 cursor-pointer"})]},s)}),(0,t.jsx)(K.ZP,{type:"dashed",onClick:()=>r(),icon:(0,t.jsx)(el.Z,{}),block:!0,children:"Add Static Header"})]})}})})]})},"permissions")})};let ei=e=>{try{let s=e.indexOf("/mcp/");if(-1===s)return{token:null,baseUrl:e};let r=e.split("/mcp/");if(2!==r.length)return{token:null,baseUrl:e};let t=r[0]+"/mcp/",l=r[1];if(!l)return{token:null,baseUrl:e};return{token:l,baseUrl:t}}catch(s){return console.error("Error parsing MCP URL:",s),{token:null,baseUrl:e}}},eo=e=>{let{token:s,baseUrl:r}=ei(e);return s?r+"...":e},ec=e=>{let{token:s}=ei(e);return{maskedUrl:eo(e),hasToken:!!s}},ed=e=>e?/^https?:\/\/[^\s/$.?#].[^\s]*$/i.test(e)?Promise.resolve():Promise.reject("Please enter a valid URL (e.g., http://service-name.domain:1234/path or https://example.com)"):Promise.resolve(),eu=e=>e&&e.includes("-")?Promise.reject("Server name cannot contain '-' (hyphen). Please use '_' (underscore) instead."):Promise.resolve(),em=e=>{let s=new Uint8Array(e),r="";return s.forEach(e=>r+=String.fromCharCode(e)),btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},ex=()=>{let e=new Uint8Array(32);return window.crypto.getRandomValues(e),em(e.buffer)},eh=async e=>{let s=new TextEncoder().encode(e);return em(await window.crypto.subtle.digest("SHA-256",s))},ep=e=>{let{accessToken:s,getCredentials:r,getTemporaryPayload:t,onTokenReceived:l,onBeforeRedirect:a}=e,[n,i]=(0,f.useState)("idle"),[o,c]=(0,f.useState)(null),[d,u]=(0,f.useState)(null),m="litellm-mcp-oauth-flow-state",x="litellm-mcp-oauth-result",h="litellm-mcp-oauth-return-url",p=()=>{try{window.sessionStorage.removeItem(m),window.sessionStorage.removeItem(x),window.sessionStorage.removeItem(h)}catch(e){console.warn("Failed to clear OAuth storage",e)}},g=()=>{{let e=window.location.pathname||"",s=e.indexOf("/ui"),r=(s>=0?e.slice(0,s+3):"").replace(/\/+$/,"");return"".concat(window.location.origin).concat(r,"/mcp/oauth/callback")}},j=()=>g(),v=(0,f.useCallback)(async()=>{let e=r()||{};if(!s){c("Missing admin token"),S.Z.error("Access token missing. Please re-authenticate and try again.");return}let l=t();if(!l||!l.url||!l.transport){let e="Please complete server URL and transport before starting OAuth.";c(e),S.Z.error(e);return}try{var n,o,d;i("authorizing"),c(null);let r=await (0,_.cacheTemporaryMcpServer)(s,l),t=null==r?void 0:null===(n=r.server_id)||void 0===n?void 0:n.trim();if(!t)throw Error("Temporary MCP server identifier missing. Please retry.");let u={};if(!((null===(o=l.credentials)||void 0===o?void 0:o.client_id)&&(null===(d=l.credentials)||void 0===d?void 0:d.client_secret))){let e=await (0,_.registerMcpOAuthClient)(s,t,{client_name:l.alias||l.server_name||t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:l.credentials&&l.credentials.client_secret?"client_secret_post":"none"});u={clientId:null==e?void 0:e.client_id,clientSecret:null==e?void 0:e.client_secret}}let x=ex(),p=await eh(x),g=crypto.randomUUID(),v=u.clientId||e.client_id,f=Array.isArray(e.scopes)?e.scopes.filter(e=>e&&e.trim().length>0).join(" "):void 0,b=(0,_.buildMcpOAuthAuthorizeUrl)({serverId:t,clientId:v,redirectUri:j(),state:g,codeChallenge:p,scope:f}),y={state:g,codeVerifier:x,clientId:v,clientSecret:u.clientSecret||e.client_secret,serverId:t,redirectUri:j()};if(a)try{a()}catch(e){console.error("Failed to prepare for OAuth redirect",e)}try{window.sessionStorage.setItem(m,JSON.stringify(y)),window.sessionStorage.setItem(h,window.location.href)}catch(e){throw console.error("Unable to persist OAuth state",e),Error("Unable to access browser storage for OAuth. Please enable storage and retry.")}window.location.href=b}catch(s){console.error("Failed to start OAuth flow",s),i("error");let e=s instanceof Error?s.message:String(s);c(e),S.Z.error(e)}},[s,r,t,a]),b=(0,f.useCallback)(async()=>{let e=null,s=null;try{let r=window.sessionStorage.getItem(x);if(!r)return;e=JSON.parse(r),s=JSON.parse(window.sessionStorage.getItem(m)||"null")}catch(e){console.error("Failed to read OAuth session state",e),p(),c("Failed to resume OAuth flow. Please retry."),i("error"),S.Z.error("Failed to resume OAuth flow. Please retry.");return}if(e){window.sessionStorage.removeItem(x);try{if(!s||!s.state||!s.codeVerifier||!s.serverId)throw Error("Missing OAuth session state. Please retry.");if(!e.state||e.state!==s.state)throw Error("OAuth state mismatch. Please retry.");if(e.error)throw Error(e.error_description||e.error);if(!e.code)throw Error("Authorization code missing in callback.");i("exchanging");let r=await (0,_.exchangeMcpOAuthToken)({serverId:s.serverId,code:e.code,clientId:s.clientId,clientSecret:s.clientSecret,codeVerifier:s.codeVerifier,redirectUri:s.redirectUri});l(r),u(r),i("success"),c(null),S.Z.success("OAuth token retrieved successfully")}catch(s){console.error("OAuth flow failed",s);let e=s instanceof Error?s.message:String(s);c(e),i("error"),S.Z.error(e)}finally{p()}}},[l]);return(0,f.useEffect)(()=>{let e=!1;return(async()=>{e||await b()})(),()=>{e=!0}},[b]),{startOAuthFlow:v,status:n,error:o,tokenResponse:d}},eg="".concat("../ui/assets/logos/","mcp_logo.png"),ej=[I.API_KEY,I.BEARER_TOKEN,I.BASIC],ev=[...ej,I.OAUTH2],ef="litellm-mcp-oauth-create-state";var eb=e=>{var s;let{userRole:r,accessToken:a,onCreateSuccess:n,isModalVisible:i,setModalVisible:o,availableAccessGroups:c}=e,[d]=A.Z.useForm(),[u,m]=(0,f.useState)(!1),[x,h]=(0,f.useState)({}),[j,b]=(0,f.useState)({}),[y,N]=(0,f.useState)(null),[w,Z]=(0,f.useState)(!1),[C,k]=(0,f.useState)([]),[T,L]=(0,f.useState)([]),[E,z]=(0,f.useState)(""),[q,U]=(0,f.useState)(""),[R,V]=(0,f.useState)(null),F=j.auth_type,D=!!F&&ej.includes(F),H=F===I.OAUTH2,{startOAuthFlow:K,status:J,error:G,tokenResponse:Y}=ep({accessToken:a,getCredentials:()=>d.getFieldValue("credentials"),getTemporaryPayload:()=>{let e=d.getFieldsValue(!0),s=e.url,r=e.transport||E;if(!s||!r)return null;let t=Array.isArray(e.static_headers)?e.static_headers.reduce((e,s)=>{var r,t;let l=null==s?void 0:null===(r=s.header)||void 0===r?void 0:r.trim();return l&&(e[l]=null!==(t=null==s?void 0:s.value)&&void 0!==t?t:""),e},{}):{};return{server_id:void 0,server_name:e.server_name,alias:e.alias,description:e.description,url:s,transport:r,auth_type:I.OAUTH2,credentials:e.credentials,authorization_url:e.authorization_url,token_url:e.token_url,registration_url:e.registration_url,mcp_access_groups:e.mcp_access_groups,static_headers:t,command:e.command,args:e.args,env:e.env}},onTokenReceived:e=>{var s;V(null!==(s=null==e?void 0:e.access_token)&&void 0!==s?s:null)},onBeforeRedirect:()=>{try{let e=d.getFieldsValue(!0);window.sessionStorage.setItem(ef,JSON.stringify({modalVisible:i,formValues:e,transportType:E,costConfig:x,allowedTools:T,searchValue:q,aliasManuallyEdited:w}))}catch(e){console.warn("Failed to persist MCP create state",e)}}});f.useEffect(()=>{let e=window.sessionStorage.getItem(ef);if(e)try{var s;let r=JSON.parse(e);r.modalVisible&&o(!0);let t=(null===(s=r.formValues)||void 0===s?void 0:s.transport)||r.transportType||"";t&&z(t),r.formValues&&N({values:r.formValues,transport:t}),r.costConfig&&h(r.costConfig),r.allowedTools&&L(r.allowedTools),r.searchValue&&U(r.searchValue),"boolean"==typeof r.aliasManuallyEdited&&Z(r.aliasManuallyEdited)}catch(e){console.error("Failed to restore MCP create state",e)}finally{window.sessionStorage.removeItem(ef)}},[d,o]),f.useEffect(()=>{y&&(E||y.transport,(!y.transport||E)&&(d.setFieldsValue(y.values),b(y.values),N(null)))},[y,d,E]);let W=async e=>{m(!0);try{let{static_headers:s,stdio_config:r,credentials:t,allow_all_keys:l,...i}=e,c=i.mcp_access_groups,u=Array.isArray(s)?s.reduce((e,s)=>{var r,t;let l=null==s?void 0:null===(r=s.header)||void 0===r?void 0:r.trim();return l&&(e[l]=null!==(t=null==s?void 0:s.value)&&void 0!==t?t:""),e},{}):{},m=t&&"object"==typeof t?Object.entries(t).reduce((e,s)=>{let[r,t]=s;if(null==t||""===t)return e;if("scopes"===r){if(Array.isArray(t)){let s=t.filter(e=>null!=e&&""!==e);s.length>0&&(e[r]=s)}}else e[r]=t;return e},{}):void 0,p={};if(r&&"stdio"===E)try{let e=JSON.parse(r),s=e;if(e.mcpServers&&"object"==typeof e.mcpServers){let r=Object.keys(e.mcpServers);if(r.length>0){let t=r[0];s=e.mcpServers[t],i.server_name||(i.server_name=t.replace(/-/g,"_"))}}p={command:s.command,args:s.args,env:s.env},console.log("Parsed stdio config:",p)}catch(e){S.Z.fromBackend("Invalid JSON in stdio configuration");return}let g={...i,...p,stdio_config:void 0,mcp_info:{server_name:i.server_name||i.url,description:i.description,mcp_server_cost_info:Object.keys(x).length>0?x:null},mcp_access_groups:c,alias:i.alias,allowed_tools:T.length>0?T:null,allow_all_keys:!!l,static_headers:u};if(g.static_headers=u,i.auth_type&&ev.includes(i.auth_type)&&m&&Object.keys(m).length>0&&(g.credentials=m),console.log("Payload: ".concat(JSON.stringify(g))),null!=a){let e=await (0,_.createMCPServer)(a,g);S.Z.success("MCP Server created successfully"),d.resetFields(),h({}),k([]),L([]),Z(!1),o(!1),n(e)}}catch(e){S.Z.fromBackend("Error creating MCP Server: "+e)}finally{m(!1)}},Q=()=>{d.resetFields(),h({}),k([]),L([]),Z(!1),o(!1)};return(f.useEffect(()=>{if(!w&&j.server_name){let e=j.server_name.replace(/\s+/g,"_");d.setFieldsValue({alias:e}),b(s=>({...s,alias:e}))}},[j.server_name]),f.useEffect(()=>{i||b({})},[i]),(0,l.tY)(r))?(0,t.jsx)(g.Z,{title:(0,t.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,t.jsx)("img",{src:eg,alt:"MCP Logo",className:"w-8 h-8 object-contain",style:{height:"20px",width:"20px",marginRight:"8px",objectFit:"contain"}}),(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New MCP Server"})]}),open:i,width:1e3,onCancel:Q,footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsxs)(A.Z,{form:d,onFinish:W,onValuesChange:(e,s)=>b(s),layout:"vertical",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["MCP Server Name",(0,t.jsx)(v.Z,{title:"Best practice: Use a descriptive name that indicates the server's purpose (e.g., 'GitHub_MCP', 'Email_Service'). Hyphens '-' are not allowed; use underscores '_' instead. Names must comply with SEP-986 and will be rejected if invalid (https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool-names).",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"server_name",rules:[{required:!1,message:"Please enter a server name"},{validator:(e,s)=>eu(s)}],children:(0,t.jsx)(O.o,{placeholder:"e.g., GitHub_MCP, Zapier_MCP, etc.",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Alias",(0,t.jsx)(v.Z,{title:"A short, unique identifier for this server. Defaults to the server name with spaces replaced by underscores.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"alias",rules:[{required:!1},{validator:(e,s)=>s&&s.includes("-")?Promise.reject("Alias cannot contain '-' (hyphen). Please use '_' (underscore) instead."):Promise.resolve()}],children:(0,t.jsx)(O.o,{placeholder:"e.g., GitHub_MCP, Zapier_MCP, etc.",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500",onChange:()=>Z(!0)})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Description"}),name:"description",rules:[{required:!1,message:"Please enter a server description!!!!!!!!!"}],children:(0,t.jsx)(O.o,{placeholder:"Brief description of what this server does",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Transport Type"}),name:"transport",rules:[{required:!0,message:"Please select a transport type"}],children:(0,t.jsxs)(p.default,{placeholder:"Select transport",className:"rounded-lg",size:"large",onChange:e=>{z(e),"stdio"===e?d.setFieldsValue({url:void 0,auth_type:void 0,credentials:void 0}):d.setFieldsValue({command:void 0,args:void 0,env:void 0})},value:E,children:[(0,t.jsx)(p.default.Option,{value:"http",children:"HTTP"}),(0,t.jsx)(p.default.Option,{value:"sse",children:"Server-Sent Events (SSE)"}),(0,t.jsx)(p.default.Option,{value:"stdio",children:"Standard Input/Output (stdio)"})]})}),"stdio"!==E&&(0,t.jsx)(A.Z.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"MCP Server URL"}),name:"url",rules:[{required:!0,message:"Please enter a server URL"},{validator:(e,s)=>ed(s)}],children:(0,t.jsx)(P.default,{placeholder:"https://your-mcp-server.com",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),"stdio"!==E&&(0,t.jsx)(A.Z.Item,{label:(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Authentication"}),name:"auth_type",rules:[{required:!0,message:"Please select an auth type"}],children:(0,t.jsxs)(p.default,{placeholder:"Select auth type",className:"rounded-lg",size:"large",children:[(0,t.jsx)(p.default.Option,{value:"none",children:"None"}),(0,t.jsx)(p.default.Option,{value:"api_key",children:"API Key"}),(0,t.jsx)(p.default.Option,{value:"bearer_token",children:"Bearer Token"}),(0,t.jsx)(p.default.Option,{value:"basic",children:"Basic Auth"}),(0,t.jsx)(p.default.Option,{value:"oauth2",children:"OAuth"})]})}),"stdio"!==E&&D&&(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Value",(0,t.jsx)(v.Z,{title:"Token, password, or header value to send with each request for the selected auth type.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","auth_value"],rules:[{required:!0,message:"Please enter the authentication value"}],children:(0,t.jsx)(O.o,{type:"password",placeholder:"Enter token or secret",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),"stdio"!==E&&H&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client ID (optional)",(0,t.jsx)(v.Z,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_id"],children:(0,t.jsx)(O.o,{type:"password",placeholder:"Enter OAuth client ID",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client Secret (optional)",(0,t.jsx)(v.Z,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_secret"],children:(0,t.jsx)(O.o,{type:"password",placeholder:"Enter OAuth client secret",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Scopes (optional)",(0,t.jsx)(v.Z,{title:"Optional scopes requested during token exchange. Separate multiple scopes with enter or commas.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","scopes"],children:(0,t.jsx)(p.default,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authorization URL Override (optional)",(0,t.jsx)(v.Z,{title:"Optional override for the authorization endpoint.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"authorization_url",children:(0,t.jsx)(O.o,{placeholder:"https://example.com/oauth/authorize",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token URL Override (optional)",(0,t.jsx)(v.Z,{title:"Optional override for the token endpoint.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"token_url",children:(0,t.jsx)(O.o,{placeholder:"https://example.com/oauth/token",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Registration URL Override (optional)",(0,t.jsx)(v.Z,{title:"Optional orverride for the dynamic client registration endpoint.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"registration_url",children:(0,t.jsx)(O.o,{placeholder:"https://example.com/oauth/register",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsxs)("div",{className:"rounded-lg border border-dashed border-gray-300 p-4 space-y-2",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Use OAuth to fetch a fresh access token and temporarily save it in the session as the authentication value."}),(0,t.jsx)(O.z,{variant:"secondary",onClick:K,disabled:"authorizing"===J||"exchanging"===J,children:"authorizing"===J?"Waiting for authorization...":"exchanging"===J?"Exchanging authorization code...":"Authorize & Fetch Token"}),G&&(0,t.jsx)("p",{className:"text-sm text-red-500",children:G}),"success"===J&&(null==Y?void 0:Y.access_token)&&(0,t.jsxs)("p",{className:"text-sm text-green-600",children:["Token fetched. Expires in ",null!==(s=Y.expires_in)&&void 0!==s?s:"?"," seconds."]})]})]}),(0,t.jsx)(ee,{isVisible:"stdio"===E})]}),(0,t.jsx)("div",{className:"mt-8",children:(0,t.jsx)(en,{availableAccessGroups:c,mcpServer:null,searchValue:q,setSearchValue:U,getAccessGroupOptions:()=>{let e=c.map(e=>({value:e,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:e})]})}));return q&&!c.some(e=>e.toLowerCase().includes(q.toLowerCase()))&&e.push({value:q,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:q}),(0,t.jsx)("span",{className:"text-gray-400 text-xs ml-1",children:"create new group"})]})}),e}})}),(0,t.jsx)("div",{className:"mt-8 pt-6 border-t border-gray-200",children:(0,t.jsx)($,{accessToken:a,oauthAccessToken:R,formValues:j,onToolsLoaded:k})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(X,{accessToken:a,oauthAccessToken:R,formValues:j,allowedTools:T,existingAllowedTools:null,onAllowedToolsChange:L})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(B,{value:x,onChange:h,tools:C.filter(e=>T.includes(e.name)),disabled:!1})}),(0,t.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:[(0,t.jsx)(O.z,{variant:"secondary",onClick:Q,children:"Cancel"}),(0,t.jsx)(O.z,{variant:"primary",loading:u,children:u?"Creating...":"Add MCP Server"})]})]})})}):null},ey=r(5945),eN=r(64935),e_=r(30401),ew=r(78867),eZ=r(11239),eC=r(54001),eS=r(96137),ek=r(96362),eA=r(80221),eP=r(29202),eM=r(59872);let{Title:eO,Text:eI}=h.default,{Panel:eT}=q.default,eL=e=>{let{icon:s,title:r,description:l,children:a,serverName:n,accessGroups:i=["dev"]}=e,[o,c]=(0,f.useState)(!1),d=()=>{let e={"x-litellm-api-key":"Bearer YOUR_LITELLM_API_KEY"};if(o&&n){let s=[n.replace(/\s+/g,"_"),...i].join(",");e["x-mcp-servers"]=[s]}return e};return(0,t.jsxs)(ey.Z,{className:"border border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)("span",{className:"p-2 rounded-lg bg-gray-50",children:s}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eO,{level:5,className:"mb-0",children:r}),(0,t.jsx)(eI,{className:"text-gray-600",children:l})]})]}),n&&("Implementation Example"===r||"Configuration"===r)&&(0,t.jsxs)(A.Z.Item,{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(es.Z,{size:"small",checked:o,onChange:c}),(0,t.jsxs)(eI,{className:"text-sm",children:["Limit tools to specific MCP servers or MCP groups by passing the ",(0,t.jsx)("code",{children:"x-mcp-servers"})," header"]})]}),o&&(0,t.jsx)(H.Z,{className:"mt-2",type:"info",showIcon:!0,message:"Two Options",description:(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Option 1:"})," Get a specific server: ",(0,t.jsxs)("code",{children:['["',n.replace(/\s+/g,"_"),'"]']})]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Option 2:"})," Get a group of MCPs: ",(0,t.jsx)("code",{children:'["dev-group"]'})]}),(0,t.jsxs)("p",{className:"mt-2 text-sm text-gray-600",children:["You can also mix both: ",(0,t.jsx)("code",{children:'["Server1,dev-group"]'})]})]})})]}),f.Children.map(a,e=>{if(f.isValidElement(e)&&e.props.hasOwnProperty("code")&&e.props.hasOwnProperty("copyKey")){let s=e.props.code;if(s&&s.includes('"headers":'))return f.cloneElement(e,{code:s.replace(/"headers":\s*{[^}]*}/,'"headers": '.concat(JSON.stringify(d(),null,8)))})}return e})]})};var eE=e=>{let{currentServerAccessGroups:s=[]}=e,r=(0,_.getProxyBaseUrl)(),[l,a]=(0,f.useState)({}),[n,h]=(0,f.useState)({openai:[],litellm:[],cursor:[],http:[]}),[p]=(0,f.useState)("Zapier_MCP"),g=async(e,s)=>{await (0,eM.vQ)(e)&&(a(e=>({...e,[s]:!0})),setTimeout(()=>{a(e=>({...e,[s]:!1}))},2e3))},j=e=>{let{code:s,copyKey:r,title:a,className:n=""}=e;return(0,t.jsxs)("div",{className:"relative group",children:[a&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(eN.Z,{size:16,className:"text-blue-600"}),(0,t.jsx)(eI,{strong:!0,className:"text-gray-700",children:a})]}),(0,t.jsxs)(ey.Z,{className:"bg-gray-50 border border-gray-200 relative ".concat(n),children:[(0,t.jsx)(K.ZP,{type:"text",size:"small",icon:l[r]?(0,t.jsx)(e_.Z,{size:12}):(0,t.jsx)(ew.Z,{size:12}),onClick:()=>g(s,r),className:"absolute top-2 right-2 z-10 transition-all duration-200 ".concat(l[r]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")}),(0,t.jsx)("pre",{className:"text-sm overflow-x-auto pr-10 text-gray-800 font-mono leading-relaxed",children:s})]})]})},v=e=>{let{step:s,title:r,children:l}=e;return(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)("div",{className:"w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-semibold",children:s})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(eI,{strong:!0,className:"text-gray-800 block mb-2",children:r}),l]})]})};return(0,t.jsx)("div",{children:(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Z,{className:"text-3xl font-bold text-gray-900 mb-3",children:"Connect to your MCP client"}),(0,t.jsx)(m.Z,{className:"text-lg text-gray-600",children:"Use tools directly from any MCP client with LiteLLM MCP. Enable your AI assistant to perform real-world tasks through a simple, secure connection."})]}),(0,t.jsxs)(o.Z,{className:"w-full",children:[(0,t.jsx)(c.Z,{className:"flex justify-start mt-8 mb-6",children:(0,t.jsxs)("div",{className:"flex bg-gray-100 p-1 rounded-lg",children:[(0,t.jsx)(i.Z,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(eN.Z,{size:18}),"OpenAI API"]})}),(0,t.jsx)(i.Z,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(eZ.Z,{size:18}),"LiteLLM Proxy"]})}),(0,t.jsx)(i.Z,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(eA.Z,{size:18}),"Cursor"]})}),(0,t.jsx)(i.Z,{className:"px-6 py-3 rounded-md transition-all duration-200",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(eP.Z,{size:18}),"Streamable HTTP"]})})]})}),(0,t.jsxs)(u.Z,{children:[(0,t.jsx)(d.Z,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-blue-50 to-indigo-50 p-6 rounded-lg border border-blue-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(eN.Z,{className:"text-blue-600",size:24}),(0,t.jsx)(eO,{level:4,className:"mb-0 text-blue-900",children:"OpenAI Responses API Integration"})]}),(0,t.jsx)(eI,{className:"text-blue-700",children:"Connect OpenAI Responses API to your LiteLLM MCP server for seamless tool integration"})]}),(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(eL,{icon:(0,t.jsx)(eC.Z,{className:"text-blue-600",size:16}),title:"API Key Setup",description:"Configure your OpenAI API key for authentication",children:(0,t.jsxs)(er.Z,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsxs)(eI,{children:["Get your API key from the"," ",(0,t.jsxs)("a",{href:"https://platform.openai.com/api-keys",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-700 inline-flex items-center gap-1",children:["OpenAI platform ",(0,t.jsx)(ek.Z,{size:12})]})]})}),(0,t.jsx)(j,{title:"Environment Variable",code:'export OPENAI_API_KEY="sk-..."',copyKey:"openai-env"})]})}),(0,t.jsx)(eL,{icon:(0,t.jsx)(eS.Z,{className:"text-blue-600",size:16}),title:"MCP Server Information",description:"Connection details for your LiteLLM MCP server",children:(0,t.jsx)(j,{title:"Server URL",code:"".concat(r,"/mcp"),copyKey:"openai-server-url"})}),(0,t.jsx)(eL,{icon:(0,t.jsx)(eN.Z,{className:"text-blue-600",size:16}),title:"Implementation Example",description:"Complete cURL example for using the Responses API",serverName:"Zapier Gmail",accessGroups:["dev"],children:(0,t.jsx)(j,{code:'curl --location \'https://api.openai.com/v1/responses\' \\\n--header \'Content-Type: application/json\' \\\n--header "Authorization: Bearer $OPENAI_API_KEY" \\\n--data \'{\n "model": "gpt-4.1",\n "tools": [\n {\n "type": "mcp",\n "server_label": "litellm",\n "server_url": "'.concat(r,'/mcp",\n "require_approval": "never",\n "headers": {\n "x-litellm-api-key": "Bearer YOUR_LITELLM_API_KEY",\n "x-mcp-servers": ["Zapier_MCP,dev"]\n }\n }\n ],\n "input": "Run available tools",\n "tool_choice": "required"\n}\''),copyKey:"openai-curl",className:"text-xs"})})]})]}),{})}),(0,t.jsx)(d.Z,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-emerald-50 to-green-50 p-6 rounded-lg border border-emerald-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(eZ.Z,{className:"text-emerald-600",size:24}),(0,t.jsx)(eO,{level:4,className:"mb-0 text-emerald-900",children:"LiteLLM Proxy API Integration"})]}),(0,t.jsx)(eI,{className:"text-emerald-700",children:"Connect to LiteLLM Proxy Responses API for seamless tool integration with multiple model providers"})]}),(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(eL,{icon:(0,t.jsx)(eC.Z,{className:"text-emerald-600",size:16}),title:"Virtual Key Setup",description:"Configure your LiteLLM Proxy Virtual Key for authentication",children:(0,t.jsxs)(er.Z,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsx)(eI,{children:"Get your Virtual Key from your LiteLLM Proxy dashboard or contact your administrator"})}),(0,t.jsx)(j,{title:"Environment Variable",code:'export LITELLM_API_KEY="sk-..."',copyKey:"litellm-env"})]})}),(0,t.jsx)(eL,{icon:(0,t.jsx)(eS.Z,{className:"text-emerald-600",size:16}),title:"MCP Server Information",description:"Connection details for your LiteLLM MCP server",children:(0,t.jsx)(j,{title:"Server URL",code:"".concat(r,"/mcp"),copyKey:"litellm-server-url"})}),(0,t.jsx)(eL,{icon:(0,t.jsx)(eN.Z,{className:"text-emerald-600",size:16}),title:"Implementation Example",description:"Complete cURL example for using the LiteLLM Proxy Responses API",serverName:p,accessGroups:["dev"],children:(0,t.jsx)(j,{code:"curl --location '".concat(r,'/v1/responses\' \\\n--header \'Content-Type: application/json\' \\\n--header "Authorization: Bearer $LITELLM_VIRTUAL_KEY" \\\n--data \'{\n "model": "gpt-4",\n "tools": [\n {\n "type": "mcp",\n "server_label": "litellm",\n "server_url": "').concat(r,'/mcp",\n "require_approval": "never",\n "headers": {\n "x-litellm-api-key": "Bearer YOUR_LITELLM_VIRTUAL_KEY",\n "x-mcp-servers": ["Zapier_MCP,dev"]\n }\n }\n ],\n "input": "Run available tools",\n "tool_choice": "required"\n}\''),copyKey:"litellm-curl",className:"text-xs"})})]})]}),{})}),(0,t.jsx)(d.Z,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-purple-50 to-blue-50 p-6 rounded-lg border border-purple-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(eA.Z,{className:"text-purple-600",size:24}),(0,t.jsx)(eO,{level:4,className:"mb-0 text-purple-900",children:"Cursor IDE Integration"})]}),(0,t.jsx)(eI,{className:"text-purple-700",children:"Use tools directly from Cursor IDE with LiteLLM MCP. Enable your AI assistant to perform real-world tasks without leaving your coding environment."})]}),(0,t.jsxs)(ey.Z,{className:"border border-gray-200",children:[(0,t.jsx)(eO,{level:5,className:"mb-4 text-gray-800",children:"Setup Instructions"}),(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsx)(v,{step:1,title:"Open Cursor Settings",children:(0,t.jsxs)(eI,{className:"text-gray-600",children:["Use the keyboard shortcut ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"⇧+⌘+J"})," (Mac) or"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Ctrl+Shift+J"})," (Windows/Linux)"]})}),(0,t.jsx)(v,{step:2,title:"Navigate to MCP Tools",children:(0,t.jsx)(eI,{className:"text-gray-600",children:'Go to the "MCP Tools" tab and click "New MCP Server"'})}),(0,t.jsxs)(v,{step:3,title:"Add Configuration",children:[(0,t.jsxs)(eI,{className:"text-gray-600 mb-3",children:["Copy the JSON configuration below and paste it into Cursor, then save with"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Cmd+S"})," or"," ",(0,t.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded",children:"Ctrl+S"})]}),(0,t.jsx)(eL,{icon:(0,t.jsx)(eN.Z,{className:"text-purple-600",size:16}),title:"Configuration",description:"Cursor MCP configuration",serverName:"Zapier Gmail",accessGroups:["dev"],children:(0,t.jsx)(j,{code:'{\n "mcpServers": {\n "Zapier_MCP": {\n "url": "'.concat(r,'/mcp",\n "headers": {\n "x-litellm-api-key": "Bearer YOUR_LITELLM_API_KEY",\n "x-mcp-servers": ["Zapier_MCP,dev"]\n }\n }\n }\n}'),copyKey:"cursor-config",className:"text-xs"})})]})]})]})]}),{})}),(0,t.jsx)(d.Z,{className:"mt-6",children:(0,t.jsx)(()=>(0,t.jsxs)(er.Z,{direction:"vertical",size:"large",className:"w-full",children:[(0,t.jsxs)("div",{className:"bg-gradient-to-r from-green-50 to-teal-50 p-6 rounded-lg border border-green-100",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(eP.Z,{className:"text-green-600",size:24}),(0,t.jsx)(eO,{level:4,className:"mb-0 text-green-900",children:"Streamable HTTP Transport"})]}),(0,t.jsx)(eI,{className:"text-green-700",children:"Connect to LiteLLM MCP using HTTP transport. Compatible with any MCP client that supports HTTP streaming."})]}),(0,t.jsx)(eL,{icon:(0,t.jsx)(eP.Z,{className:"text-green-600",size:16}),title:"Universal MCP Connection",description:"Use this URL with any MCP client that supports HTTP transport",children:(0,t.jsxs)(er.Z,{direction:"vertical",size:"middle",className:"w-full",children:[(0,t.jsx)("div",{children:(0,t.jsx)(eI,{children:"Each MCP client supports different transports. Refer to your client documentation to determine the appropriate transport method."})}),(0,t.jsx)(j,{title:"Server URL",code:"".concat(r,"/mcp"),copyKey:"http-server-url"}),(0,t.jsx)(j,{title:"Headers Configuration",code:JSON.stringify({"x-litellm-api-key":"Bearer YOUR_LITELLM_API_KEY"},null,2),copyKey:"http-headers"}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(K.ZP,{type:"link",className:"p-0 h-auto text-blue-600 hover:text-blue-700",href:"https://modelcontextprotocol.io/docs/concepts/transports",icon:(0,t.jsx)(ek.Z,{size:14}),children:"Learn more about MCP transports"})})]})})]}),{})})]})]})]})})},ez=r(58927),eq=r(53410),eU=r(74998);let eR=(e,s,r,l,a)=>[{accessorKey:"server_id",header:"Server ID",cell:e=>{let{row:r}=e;return(0,t.jsxs)("button",{onClick:()=>s(r.original.server_id),className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",children:[r.original.server_id.slice(0,7),"..."]})}},{accessorKey:"server_name",header:"Name"},{accessorKey:"alias",header:"Alias"},{id:"url",header:"URL",cell:e=>{let{row:s}=e,{maskedUrl:r}=ec(s.original.url);return(0,t.jsx)("span",{className:"font-mono text-sm",children:r})}},{accessorKey:"transport",header:"Transport",cell:e=>{let{getValue:s}=e;return(0,t.jsx)("span",{children:(s()||"http").toUpperCase()})}},{accessorKey:"auth_type",header:"Auth Type",cell:e=>{let{getValue:s}=e;return(0,t.jsx)("span",{children:s()||"none"})}},{id:"health_status",header:"Health Status",cell:e=>{let{row:s}=e,r=s.original,l=r.status||"unknown",n=r.last_health_check,i=r.health_check_error;if(a)return(0,t.jsxs)("div",{className:"flex items-center text-gray-500",children:[(0,t.jsxs)("svg",{className:"animate-spin h-4 w-4 mr-1",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),(0,t.jsx)("span",{className:"text-xs",children:"Loading..."})]});let o=(0,t.jsxs)("div",{className:"max-w-xs",children:[(0,t.jsxs)("div",{className:"font-semibold mb-1",children:["Health Status: ",l]}),n&&(0,t.jsxs)("div",{className:"text-xs mb-1",children:["Last Check: ",new Date(n).toLocaleString()]}),i&&(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsx)("div",{className:"font-medium text-red-400 mb-1",children:"Error:"}),(0,t.jsx)("div",{className:"break-words",children:i})]}),!n&&!i&&(0,t.jsx)("div",{className:"text-xs text-gray-400",children:"No health check data available"})]});return(0,t.jsx)(v.Z,{title:o,placement:"top",children:(0,t.jsxs)("button",{className:"font-mono text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[10ch] ".concat((e=>{switch(e){case"healthy":return"text-green-500 bg-green-50 hover:bg-green-100";case"unhealthy":return"text-red-500 bg-red-50 hover:bg-red-100";default:return"text-gray-500 bg-gray-50 hover:bg-gray-100"}})(l)),children:[(0,t.jsx)("span",{className:"mr-1",children:"●"}),l.charAt(0).toUpperCase()+l.slice(1)]})})}},{id:"mcp_access_groups",header:"Access Groups",cell:e=>{let{row:s}=e,r=s.original.mcp_access_groups;if(Array.isArray(r)&&r.length>0&&"string"==typeof r[0]){let e=r.join(", ");return(0,t.jsx)(v.Z,{title:e,children:(0,t.jsx)("span",{className:"max-w-[200px] truncate block",children:e.length>30?"".concat(e.slice(0,30),"..."):e})})}return(0,t.jsx)("span",{className:"text-gray-400 italic",children:"None"})}},{header:"Created At",accessorKey:"created_at",sortingFn:"datetime",cell:e=>{let{row:s}=e,r=s.original;return(0,t.jsx)("span",{className:"text-xs",children:r.created_at?new Date(r.created_at).toLocaleDateString():"-"})}},{header:"Updated At",accessorKey:"updated_at",sortingFn:"datetime",cell:e=>{let{row:s}=e,r=s.original;return(0,t.jsx)("span",{className:"text-xs",children:r.updated_at?new Date(r.updated_at).toLocaleDateString():"-"})}},{id:"actions",header:"Actions",cell:e=>{let{row:s}=e;return(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(v.Z,{title:"Edit MCP Server",children:(0,t.jsx)(ez.J,{icon:eq.Z,size:"sm",onClick:()=>r(s.original.server_id),className:"cursor-pointer hover:text-blue-600"})}),(0,t.jsx)(v.Z,{title:"Delete MCP Server",children:(0,t.jsx)(ez.J,{icon:eU.Z,size:"sm",onClick:()=>l(s.original.server_id),className:"cursor-pointer hover:text-red-600"})})]})}}];var eV=r(10900),eF=r(82376),eB=r(71437),eD=r(12514),eH=r(67101),eK=r(47323),eJ=r(49566);let eG=[I.API_KEY,I.BEARER_TOKEN,I.BASIC],eY=[...eG,I.OAUTH2],eW="litellm-mcp-oauth-edit-state";var e$=e=>{var s;let{mcpServer:r,accessToken:l,onCancel:a,onSuccess:m,availableAccessGroups:x}=e,[h]=A.Z.useForm(),[g,j]=(0,f.useState)({}),[b,y]=(0,f.useState)([]),[N,w]=(0,f.useState)(!1),[Z,C]=(0,f.useState)(""),[k,P]=(0,f.useState)(!1),[O,T]=(0,f.useState)([]),[L,E]=(0,f.useState)(null),z=A.Z.useWatch("auth_type",h),q=!!z&&eG.includes(z),U=z===I.OAUTH2,[R,V]=(0,f.useState)(null),{startOAuthFlow:F,status:D,error:H,tokenResponse:J}=ep({accessToken:l,getCredentials:()=>h.getFieldValue("credentials"),getTemporaryPayload:()=>{let e=h.getFieldsValue(!0),s=e.url||r.url,t=e.transport||r.transport;if(!s||!t)return null;let l=Array.isArray(e.static_headers)?e.static_headers.reduce((e,s)=>{var r,t;let l=null==s?void 0:null===(r=s.header)||void 0===r?void 0:r.trim();return l&&(e[l]=null!==(t=null==s?void 0:s.value)&&void 0!==t?t:""),e},{}):{};return{server_id:r.server_id,server_name:e.server_name||r.server_name||r.alias,alias:e.alias||r.alias,description:e.description||r.description,url:s,transport:t,auth_type:I.OAUTH2,credentials:e.credentials,mcp_access_groups:e.mcp_access_groups||r.mcp_access_groups,static_headers:l,command:e.command,args:e.args,env:e.env}},onTokenReceived:e=>{var s;V(null!==(s=null==e?void 0:e.access_token)&&void 0!==s?s:null)},onBeforeRedirect:()=>{try{let e=h.getFieldsValue(!0);window.sessionStorage.setItem(eW,JSON.stringify({serverId:r.server_id,formValues:e,costConfig:g,allowedTools:O,searchValue:Z,aliasManuallyEdited:k}))}catch(e){console.warn("Failed to persist MCP edit state",e)}}}),G=f.useMemo(()=>r.static_headers?Object.entries(r.static_headers).map(e=>{let[s,r]=e;return{header:s,value:null!=r?String(r):""}}):[],[r.static_headers]),Y=f.useMemo(()=>({...r,static_headers:G}),[r,G]);(0,f.useEffect)(()=>{var e;(null===(e=r.mcp_info)||void 0===e?void 0:e.mcp_server_cost_info)&&j(r.mcp_info.mcp_server_cost_info)},[r]),(0,f.useEffect)(()=>{r.allowed_tools&&T(r.allowed_tools)},[r]),(0,f.useEffect)(()=>{let e=window.sessionStorage.getItem(eW);if(e)try{let s=JSON.parse(e);if(!s||s.serverId!==r.server_id)return;s.formValues&&E({...r,...s.formValues}),s.costConfig&&j(s.costConfig),s.allowedTools&&T(s.allowedTools),s.searchValue&&C(s.searchValue),"boolean"==typeof s.aliasManuallyEdited&&P(s.aliasManuallyEdited)}catch(e){console.error("Failed to restore MCP edit state",e)}finally{window.sessionStorage.removeItem(eW)}},[h,r]),(0,f.useEffect)(()=>{if(!L)return;let e=L.transport||r.transport;if(e&&e!==h.getFieldValue("transport")){h.setFieldsValue({transport:e});return}h.setFieldsValue(L),E(null)},[L,h,r.transport]),(0,f.useEffect)(()=>{if(r.mcp_access_groups){let e=r.mcp_access_groups.map(e=>"string"==typeof e?e:e.name||String(e));h.setFieldValue("mcp_access_groups",e)}},[r]),(0,f.useEffect)(()=>{W()},[r,l,R]);let W=async()=>{if(l&&r.url&&(r.auth_type!==I.OAUTH2||R)){w(!0);try{let e={server_id:r.server_id,server_name:r.server_name,url:r.url,transport:r.transport,auth_type:r.auth_type,mcp_info:r.mcp_info,authorization_url:r.authorization_url,token_url:r.token_url,registration_url:r.registration_url},s=await (0,_.testMCPToolsListRequest)(l,e,R);s.tools&&!s.error?y(s.tools):(console.error("Failed to fetch tools:",s.message),y([]))}catch(e){console.error("Tools fetch error:",e),y([])}finally{w(!1)}}},$=async e=>{if(l)try{let{static_headers:s,credentials:t,allow_all_keys:a,...n}=e,i=(n.mcp_access_groups||[]).map(e=>"string"==typeof e?e:e.name||String(e)),o=Array.isArray(s)?s.reduce((e,s)=>{var r,t;let l=null==s?void 0:null===(r=s.header)||void 0===r?void 0:r.trim();return l&&(e[l]=null!==(t=null==s?void 0:s.value)&&void 0!==t?t:""),e},{}):{},c=t&&"object"==typeof t?Object.entries(t).reduce((e,s)=>{let[r,t]=s;if(null==t||""===t)return e;if("scopes"===r){if(Array.isArray(t)){let s=t.filter(e=>null!=e&&""!==e);s.length>0&&(e[r]=s)}}else e[r]=t;return e},{}):void 0,d={...n,server_id:r.server_id,mcp_info:{server_name:n.server_name||n.url,description:n.description,mcp_server_cost_info:Object.keys(g).length>0?g:null},mcp_access_groups:i,alias:n.alias,extra_headers:n.extra_headers||[],allowed_tools:O.length>0?O:null,disallowed_tools:n.disallowed_tools||[],static_headers:o,allow_all_keys:!!(null!=a?a:r.allow_all_keys)};n.auth_type&&eY.includes(n.auth_type)&&c&&Object.keys(c).length>0&&(d.credentials=c);let u=await (0,_.updateMCPServer)(l,d);S.Z.success("MCP Server updated successfully"),m(u)}catch(e){S.Z.fromBackend("Failed to update MCP Server"+((null==e?void 0:e.message)?": ".concat(e.message):""))}};return(0,t.jsxs)(o.Z,{children:[(0,t.jsxs)(c.Z,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(i.Z,{children:"Server Configuration"}),(0,t.jsx)(i.Z,{children:"Cost Configuration"})]}),(0,t.jsxs)(u.Z,{className:"mt-6",children:[(0,t.jsx)(d.Z,{children:(0,t.jsxs)(A.Z,{form:h,onFinish:$,initialValues:Y,layout:"vertical",children:[(0,t.jsx)(A.Z.Item,{label:"MCP Server Name",name:"server_name",rules:[{validator:(e,s)=>eu(s)}],children:(0,t.jsx)(eJ.Z,{})}),(0,t.jsx)(A.Z.Item,{label:"Alias",name:"alias",rules:[{validator:(e,s)=>eu(s)}],children:(0,t.jsx)(eJ.Z,{onChange:()=>P(!0)})}),(0,t.jsx)(A.Z.Item,{label:"Description",name:"description",children:(0,t.jsx)(eJ.Z,{})}),(0,t.jsx)(A.Z.Item,{label:"MCP Server URL",name:"url",rules:[{required:!0,message:"Please enter a server URL"},{validator:(e,s)=>ed(s)}],children:(0,t.jsx)(eJ.Z,{})}),(0,t.jsx)(A.Z.Item,{label:"Transport Type",name:"transport",rules:[{required:!0}],children:(0,t.jsxs)(p.default,{children:[(0,t.jsx)(p.default.Option,{value:"sse",children:"Server-Sent Events (SSE)"}),(0,t.jsx)(p.default.Option,{value:"http",children:"HTTP"})]})}),(0,t.jsx)(A.Z.Item,{label:"Authentication",name:"auth_type",rules:[{required:!0}],children:(0,t.jsxs)(p.default,{children:[(0,t.jsx)(p.default.Option,{value:"none",children:"None"}),(0,t.jsx)(p.default.Option,{value:"api_key",children:"API Key"}),(0,t.jsx)(p.default.Option,{value:"bearer_token",children:"Bearer Token"}),(0,t.jsx)(p.default.Option,{value:"basic",children:"Basic Auth"}),(0,t.jsx)(p.default.Option,{value:"oauth2",children:"OAuth"})]})}),q&&(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Value",(0,t.jsx)(v.Z,{title:"Token, password, or header value to send with each request for the selected auth type.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","auth_value"],rules:[{validator:(e,s)=>s&&"string"==typeof s&&""===s.trim()?Promise.reject(Error("Authentication value cannot be empty")):Promise.resolve()}],children:(0,t.jsx)(eJ.Z,{type:"password",placeholder:"Enter token or secret (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),U&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client ID (optional)",(0,t.jsx)(v.Z,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_id"],children:(0,t.jsx)(eJ.Z,{type:"password",placeholder:"Enter OAuth client ID (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Client Secret (optional)",(0,t.jsx)(v.Z,{title:"Provide only if your MCP server cannot handle dynamic client registration.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","client_secret"],children:(0,t.jsx)(eJ.Z,{type:"password",placeholder:"Enter OAuth client secret (leave blank to keep existing)",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["OAuth Scopes (optional)",(0,t.jsx)(v.Z,{title:"Add scopes to override the default scope list used for this MCP server.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:["credentials","scopes"],children:(0,t.jsx)(p.default,{mode:"tags",tokenSeparators:[","],placeholder:"Add scopes",className:"rounded-lg",size:"large"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authorization URL Override (optional)",(0,t.jsx)(v.Z,{title:"Optional override for the authorization endpoint.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"authorization_url",children:(0,t.jsx)(eJ.Z,{placeholder:"https://example.com/oauth/authorize",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Token URL Override (optional)",(0,t.jsx)(v.Z,{title:"Optional override for the token endpoint.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"token_url",children:(0,t.jsx)(eJ.Z,{placeholder:"https://example.com/oauth/token",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Registration URL Override (optional)",(0,t.jsx)(v.Z,{title:"Optional override for the dynamic client registration endpoint.",children:(0,t.jsx)(M.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"registration_url",children:(0,t.jsx)(eJ.Z,{placeholder:"https://example.com/oauth/register",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,t.jsxs)("div",{className:"rounded-lg border border-dashed border-gray-300 p-4 space-y-2",children:[(0,t.jsx)("p",{className:"text-sm text-gray-600",children:"Use OAuth to fetch a fresh access token and temporarily save it in the session as the authentication value."}),(0,t.jsx)(n.Z,{variant:"secondary",onClick:F,disabled:"authorizing"===D||"exchanging"===D,children:"authorizing"===D?"Waiting for authorization...":"exchanging"===D?"Exchanging authorization code...":"Authorize & Fetch Token"}),H&&(0,t.jsx)("p",{className:"text-sm text-red-500",children:H}),"success"===D&&(null==J?void 0:J.access_token)&&(0,t.jsxs)("p",{className:"text-sm text-green-600",children:["Token fetched. Expires in ",null!==(s=J.expires_in)&&void 0!==s?s:"?"," seconds."]})]})]}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(en,{availableAccessGroups:x,mcpServer:r,searchValue:Z,setSearchValue:C,getAccessGroupOptions:()=>{let e=x.map(e=>({value:e,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:e})]})}));return Z&&!x.some(e=>e.toLowerCase().includes(Z.toLowerCase()))&&e.push({value:Z,label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:Z}),(0,t.jsx)("span",{className:"text-gray-400 text-xs ml-1",children:"create new group"})]})}),e}})}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(X,{accessToken:l,oauthAccessToken:R,formValues:{server_id:r.server_id,server_name:r.server_name,url:r.url,transport:r.transport,auth_type:r.auth_type,mcp_info:r.mcp_info},allowedTools:O,existingAllowedTools:r.allowed_tools||null,onAllowedToolsChange:T})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(K.ZP,{onClick:a,children:"Cancel"}),(0,t.jsx)(n.Z,{type:"submit",children:"Save Changes"})]})]})}),(0,t.jsx)(d.Z,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(B,{value:g,onChange:j,tools:b,disabled:N}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(K.ZP,{onClick:a,children:"Cancel"}),(0,t.jsx)(n.Z,{onClick:()=>h.submit(),children:"Save Changes"})]})]})})]})]})},eQ=r(92280),eX=e=>{let{costConfig:s}=e,r=(null==s?void 0:s.default_cost_per_query)!==void 0&&(null==s?void 0:s.default_cost_per_query)!==null,l=(null==s?void 0:s.tool_name_to_cost_per_query)&&Object.keys(s.tool_name_to_cost_per_query).length>0;return r||l?(0,t.jsx)("div",{className:"mt-6 pt-6 border-t border-gray-200",children:(0,t.jsxs)("div",{className:"space-y-4",children:[r&&(null==s?void 0:s.default_cost_per_query)!==void 0&&(null==s?void 0:s.default_cost_per_query)!==null&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eQ.x,{className:"font-medium",children:"Default Cost per Query"}),(0,t.jsxs)("div",{className:"text-green-600 font-mono",children:["$",s.default_cost_per_query.toFixed(4)]})]}),l&&(null==s?void 0:s.tool_name_to_cost_per_query)&&(0,t.jsxs)("div",{children:[(0,t.jsx)(eQ.x,{className:"font-medium",children:"Tool-Specific Costs"}),(0,t.jsx)("div",{className:"mt-2 space-y-2",children:Object.entries(s.tool_name_to_cost_per_query).map(e=>{let[s,r]=e;return null!=r&&(0,t.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,t.jsx)(eQ.x,{className:"font-medium",children:s}),(0,t.jsxs)(eQ.x,{className:"text-green-600 font-mono",children:["$",r.toFixed(4)," per query"]})]},s)})})]}),(0,t.jsxs)("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,t.jsx)(eQ.x,{className:"text-blue-800 font-medium",children:"Cost Summary:"}),(0,t.jsxs)("div",{className:"mt-2 space-y-1",children:[r&&(null==s?void 0:s.default_cost_per_query)!==void 0&&(null==s?void 0:s.default_cost_per_query)!==null&&(0,t.jsxs)(eQ.x,{className:"text-blue-700",children:["• Default cost: $",s.default_cost_per_query.toFixed(4)," per query"]}),l&&(null==s?void 0:s.tool_name_to_cost_per_query)&&(0,t.jsxs)(eQ.x,{className:"text-blue-700",children:["• ",Object.keys(s.tool_name_to_cost_per_query).length," tool(s) with custom pricing"]})]})]})]})}):(0,t.jsx)("div",{className:"mt-6 pt-6 border-t border-gray-200",children:(0,t.jsx)("div",{className:"space-y-4",children:(0,t.jsx)("div",{className:"p-4 bg-gray-50 border border-gray-200 rounded-lg",children:(0,t.jsx)(eQ.x,{className:"text-gray-600",children:"No cost configuration set for this server. Tool calls will be charged at $0.00 per tool call."})})})})};let e0=e=>{var s,r,l,a,h;let{mcpServer:p,onBack:g,isEditing:j,isProxyAdmin:v,accessToken:b,userRole:y,userID:N,availableAccessGroups:_}=e,[w,Z]=(0,f.useState)(j),[C,S]=(0,f.useState)(!1),[k,A]=(0,f.useState)({}),[P,M]=(0,f.useState)(0),{maskedUrl:O,hasToken:I}=ec(p.url),T=(e,s)=>I?s?e:O:e,z=async(e,s)=>{await (0,eM.vQ)(e)&&(A(e=>({...e,[s]:!0})),setTimeout(()=>{A(e=>({...e,[s]:!1}))},2e3))};return(0,t.jsxs)("div",{className:"p-4 max-w-full",children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(n.Z,{icon:eV.Z,variant:"light",className:"mb-4",onClick:g,children:"Back to All Servers"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(x.Z,{children:p.server_name}),(0,t.jsx)(K.ZP,{type:"text",size:"small",icon:k["mcp-server_name"]?(0,t.jsx)(e_.Z,{size:12}):(0,t.jsx)(ew.Z,{size:12}),onClick:()=>z(p.server_name,"mcp-server_name"),className:"left-2 z-10 transition-all duration-200 ".concat(k["mcp-server_name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")}),p.alias&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"ml-4 text-gray-500",children:"Alias:"}),(0,t.jsx)("span",{className:"ml-1 font-mono text-blue-600",children:p.alias}),(0,t.jsx)(K.ZP,{type:"text",size:"small",icon:k["mcp-alias"]?(0,t.jsx)(e_.Z,{size:12}):(0,t.jsx)(ew.Z,{size:12}),onClick:()=>z(p.alias,"mcp-alias"),className:"left-2 z-10 transition-all duration-200 ".concat(k["mcp-alias"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,t.jsx)(m.Z,{className:"text-gray-500 font-mono",children:p.server_id}),(0,t.jsx)(K.ZP,{type:"text",size:"small",icon:k["mcp-server-id"]?(0,t.jsx)(e_.Z,{size:12}):(0,t.jsx)(ew.Z,{size:12}),onClick:()=>z(p.server_id,"mcp-server-id"),className:"left-2 z-10 transition-all duration-200 ".concat(k["mcp-server-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]})}),(0,t.jsxs)(o.Z,{index:P,onIndexChange:M,children:[(0,t.jsx)(c.Z,{className:"mb-4",children:[(0,t.jsx)(i.Z,{children:"Overview"},"overview"),(0,t.jsx)(i.Z,{children:"MCP Tools"},"tools"),...v?[(0,t.jsx)(i.Z,{children:"Settings"},"settings")]:[]]}),(0,t.jsxs)(u.Z,{children:[(0,t.jsxs)(d.Z,{children:[(0,t.jsxs)(eH.Z,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(eD.Z,{children:[(0,t.jsx)(m.Z,{children:"Transport"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(x.Z,{children:L(null!==(a=p.transport)&&void 0!==a?a:void 0)})})]}),(0,t.jsxs)(eD.Z,{children:[(0,t.jsx)(m.Z,{children:"Auth Type"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(m.Z,{children:E(null!==(h=p.auth_type)&&void 0!==h?h:void 0)})})]}),(0,t.jsxs)(eD.Z,{children:[(0,t.jsx)(m.Z,{children:"Host Url"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,t.jsx)(m.Z,{className:"break-all overflow-wrap-anywhere",children:T(p.url,C)}),I&&(0,t.jsx)("button",{onClick:()=>S(!C),className:"p-1 hover:bg-gray-100 rounded",children:(0,t.jsx)(eK.Z,{icon:C?eF.Z:eB.Z,size:"sm",className:"text-gray-500"})})]})]})]}),(0,t.jsxs)(eD.Z,{className:"mt-2",children:[(0,t.jsx)(x.Z,{children:"Cost Configuration"}),(0,t.jsx)(eX,{costConfig:null===(s=p.mcp_info)||void 0===s?void 0:s.mcp_server_cost_info})]})]}),(0,t.jsx)(d.Z,{children:(0,t.jsx)(sr,{serverId:p.server_id,accessToken:b,auth_type:p.auth_type,userRole:y,userID:N,serverAlias:p.alias})}),(0,t.jsx)(d.Z,{children:(0,t.jsxs)(eD.Z,{children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(x.Z,{children:"MCP Server Settings"}),w?null:(0,t.jsx)(n.Z,{variant:"light",onClick:()=>Z(!0),children:"Edit Settings"})]}),w?(0,t.jsx)(e$,{mcpServer:p,accessToken:b,onCancel:()=>Z(!1),onSuccess:e=>{Z(!1),g()},availableAccessGroups:_}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Server Name"}),(0,t.jsx)("div",{children:p.server_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Alias"}),(0,t.jsx)("div",{children:p.alias})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Description"}),(0,t.jsx)("div",{children:p.description})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"URL"}),(0,t.jsxs)("div",{className:"font-mono break-all overflow-wrap-anywhere max-w-full flex items-center gap-2",children:[T(p.url,C),I&&(0,t.jsx)("button",{onClick:()=>S(!C),className:"p-1 hover:bg-gray-100 rounded",children:(0,t.jsx)(eK.Z,{icon:C?eF.Z:eB.Z,size:"sm",className:"text-gray-500"})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Transport"}),(0,t.jsx)("div",{children:L(p.transport)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Extra Headers"}),(0,t.jsx)("div",{children:null===(r=p.extra_headers)||void 0===r?void 0:r.join(", ")})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Auth Type"}),(0,t.jsx)("div",{children:E(p.auth_type)})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Allow All LiteLLM Keys"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[p.allow_all_keys?(0,t.jsx)("span",{className:"px-2 py-1 bg-green-50 text-green-700 rounded-md text-sm",children:"Enabled"}):(0,t.jsx)("span",{className:"px-2 py-1 bg-gray-100 text-gray-600 rounded-md text-sm",children:"Disabled"}),p.allow_all_keys&&(0,t.jsx)(m.Z,{className:"text-xs text-gray-500",children:"All keys can access this MCP server"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Access Groups"}),(0,t.jsx)("div",{children:p.mcp_access_groups&&p.mcp_access_groups.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:p.mcp_access_groups.map((e,s)=>{var r;return(0,t.jsx)("span",{className:"px-2 py-1 bg-gray-100 rounded-md text-sm",children:"string"==typeof e?e:null!==(r=null==e?void 0:e.name)&&void 0!==r?r:""},s)})}):(0,t.jsx)(m.Z,{className:"text-gray-500",children:"No access groups defined"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Allowed Tools"}),(0,t.jsx)("div",{children:p.allowed_tools&&p.allowed_tools.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:p.allowed_tools.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-50 border border-blue-200 rounded-md text-sm",children:e},s))}):(0,t.jsx)(m.Z,{className:"text-gray-500",children:"All tools enabled"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(m.Z,{className:"font-medium",children:"Cost Configuration"}),(0,t.jsx)(eX,{costConfig:null===(l=p.mcp_info)||void 0===l?void 0:l.mcp_server_cost_info})]})]})]})})]})]})]})},{Text:e2,Title:e1}=h.default,{Option:e4}=p.default;var e5=e=>{let{accessToken:s,userRole:r,userID:h}=e,{data:y,isLoading:N,refetch:w}=(0,b.F)(),{data:Z,isLoading:A}=C((0,f.useMemo)(()=>null==y?void 0:y.map(e=>e.server_id),[y])),P=(0,f.useMemo)(()=>{if(!y)return[];if(!Z)return y;let e=new Map(Z.map(e=>[e.server_id,e.status]));return y.map(s=>{let r=e.get(s.server_id);return{...s,status:r||s.status}})},[y,Z]);f.useEffect(()=>{y&&(console.log("MCP Servers fetched:",y),y.forEach(e=>{console.log("Server: ".concat(e.server_name||e.server_id)),console.log(" allowed_tools:",e.allowed_tools)}))},[y]);let[M,O]=(0,f.useState)(null),[I,T]=(0,f.useState)(!1),[L,E]=(0,f.useState)(null),[z,q]=(0,f.useState)(!1),[U,R]=(0,f.useState)("all"),[V,F]=(0,f.useState)("all"),[B,D]=(0,f.useState)([]),[H,K]=(0,f.useState)(!1),[J,G]=(0,f.useState)(!1),Y="Internal User"===r;(0,f.useEffect)(()=>{try{let e=window.sessionStorage.getItem("litellm-mcp-oauth-edit-state");if(!e)return;let s=JSON.parse(e);(null==s?void 0:s.serverId)&&(E(s.serverId),q(!0))}catch(e){console.error("Failed to restore MCP edit view state",e)}},[]);let W=f.useMemo(()=>{if(!P)return[];let e=new Set,s=[];return P.forEach(r=>{r.teams&&r.teams.forEach(r=>{let t=r.team_id;e.has(t)||(e.add(t),s.push(r))})}),s},[P]),$=f.useMemo(()=>P?Array.from(new Set(P.flatMap(e=>e.mcp_access_groups).filter(e=>null!=e))):[],[P]),Q=(0,f.useCallback)((e,s)=>{if(!P)return D([]);let r=P;if("personal"===e){D([]);return}"all"!==e&&(r=r.filter(s=>{var r;return null===(r=s.teams)||void 0===r?void 0:r.some(s=>s.team_id===e)})),"all"!==s&&(r=r.filter(e=>{var r;return null===(r=e.mcp_access_groups)||void 0===r?void 0:r.some(e=>"string"==typeof e?e===s:e&&e.name===s)})),D(r)},[P]);(0,f.useEffect)(()=>{Q(U,V)},[P,U,V,Q]);let X=f.useMemo(()=>eR(null!=r?r:"",e=>{E(e),q(!1)},e=>{E(e),q(!0)},ee,A),[r,A]);function ee(e){O(e),T(!0)}let es=async()=>{if(null!=M&&null!=s)try{G(!0),await (0,_.deleteMCPServer)(s,M),S.Z.success("Deleted MCP Server successfully"),w()}catch(e){console.error("Error deleting the mcp server:",e)}finally{G(!1),T(!1),O(null)}},er=M?(y||[]).find(e=>e.server_id===M):null,et=f.useMemo(()=>B.find(e=>e.server_id===L)||{server_id:"",server_name:"",alias:"",url:"",transport:"",auth_type:"",created_at:"",created_by:"",updated_at:"",updated_by:""},[B,L]),el=f.useCallback(()=>{q(!1),E(null),w()},[w]);return s&&r&&h?(0,t.jsxs)("div",{className:"w-full h-full p-6",children:[(0,t.jsx)(g.Z,{open:I,title:"Delete MCP Server?",onOk:es,okText:J?"Deleting...":"Delete",onCancel:()=>{T(!1),O(null)},cancelText:"Cancel",cancelButtonProps:{disabled:J},okButtonProps:{danger:!0},confirmLoading:J,children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(e2,{children:"Are you sure you want to delete this MCP Server? This action cannot be undone."}),er&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-red-50 rounded-lg border border-red-200",children:[(0,t.jsx)(e1,{level:5,className:"mb-3 text-gray-900",children:"Server Information"}),(0,t.jsxs)(j.Z,{column:1,size:"small",children:[er.server_name&&(0,t.jsx)(j.Z.Item,{label:(0,t.jsx)("span",{className:"font-semibold text-gray-700",children:"Server Name"}),children:(0,t.jsx)(e2,{className:"text-sm",children:er.server_name})}),er.alias&&(0,t.jsx)(j.Z.Item,{label:(0,t.jsx)("span",{className:"font-semibold text-gray-700",children:"Alias"}),children:(0,t.jsx)(e2,{className:"text-sm",children:er.alias})}),(0,t.jsx)(j.Z.Item,{label:(0,t.jsx)("span",{className:"font-semibold text-gray-700",children:"Server ID"}),children:(0,t.jsx)(e2,{code:!0,className:"text-sm",children:er.server_id})}),(0,t.jsx)(j.Z.Item,{label:(0,t.jsx)("span",{className:"font-semibold text-gray-700",children:"URL"}),children:(0,t.jsx)(e2,{code:!0,className:"text-sm",children:er.url})})]})]})]})}),(0,t.jsx)(eb,{userRole:r,accessToken:s,onCreateSuccess:e=>{D(s=>[...s,e]),K(!1)},isModalVisible:H,setModalVisible:K,availableAccessGroups:$}),(0,t.jsx)(x.Z,{children:"MCP Servers"}),(0,t.jsx)(m.Z,{className:"text-tremor-content mt-2",children:"Configure and manage your MCP servers"}),(0,l.tY)(r)&&(0,t.jsx)(n.Z,{className:"mt-4 mb-4",onClick:()=>K(!0),children:"+ Add New MCP Server"}),(0,t.jsxs)(o.Z,{className:"w-full h-full",children:[(0,t.jsx)(c.Z,{className:"flex justify-between mt-2 w-full items-center",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(i.Z,{children:"All Servers"}),(0,t.jsx)(i.Z,{children:"Connect"})]})}),(0,t.jsxs)(u.Z,{children:[(0,t.jsx)(d.Z,{children:L?(0,t.jsx)(e0,{mcpServer:et,onBack:el,isProxyAdmin:(0,l.tY)(r),isEditing:z,accessToken:s,userID:h,userRole:r,availableAccessGroups:$},L):(0,t.jsxs)("div",{className:"w-full h-full",children:[(0,t.jsx)("div",{className:"w-full px-6",children:(0,t.jsx)("div",{className:"flex flex-col space-y-4",children:(0,t.jsx)("div",{className:"flex items-center justify-between bg-gray-50 rounded-lg p-4 border-2 border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(m.Z,{className:"text-lg font-semibold text-gray-900",children:"Current Team:"}),(0,t.jsxs)(p.default,{value:U,onChange:e=>{R(e),Q(e,V)},style:{width:300},children:[(0,t.jsx)(e4,{value:"all",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:Y?"All Available Servers":"All Servers"})]})}),(0,t.jsx)(e4,{value:"personal",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:"Personal"})]})}),W.map(e=>(0,t.jsx)(e4,{value:e.team_id,children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:e.team_alias||e.team_id})]})},e.team_id))]}),(0,t.jsxs)(m.Z,{className:"text-lg font-semibold text-gray-900 ml-6",children:["Access Group:",(0,t.jsx)(v.Z,{title:"An MCP Access Group is a set of users or teams that have permission to access specific MCP servers. Use access groups to control and organize who can connect to which servers.",children:(0,t.jsx)(a.Z,{style:{marginLeft:4,color:"#888"}})})]}),(0,t.jsxs)(p.default,{value:V,onChange:e=>{F(e),Q(U,e)},style:{width:300},children:[(0,t.jsx)(e4,{value:"all",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:"All Access Groups"})]})}),$.map(e=>(0,t.jsx)(e4,{value:e,children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{className:"font-medium",children:e})]})},e))]})]})})})}),(0,t.jsx)("div",{className:"w-full px-6 mt-6",children:(0,t.jsx)(k.w,{data:B,columns:X,renderSubComponent:()=>(0,t.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:N,noDataMessage:"No MCP servers configured",loadingMessage:"\uD83D\uDE85 Loading MCP servers..."})})]})}),(0,t.jsx)(d.Z,{children:(0,t.jsx)(eE,{})})]})]})]}):(console.log("Missing required authentication parameters",{accessToken:s,userRole:r,userID:h}),(0,t.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))},e6=r(21770);let e3=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);function e7(e){if(!e)return[];if(Array.isArray(e))return e.map(e=>e8(e)).filter(e=>void 0!==e);let s=e8(e);return void 0===s?[]:[s]}function e8(e,s){if(!e)return;let r=void 0!==s?s:e.default;if("object"===e.type){let s=e3(r)?{...r}:{};return e.properties&&Object.entries(e.properties).forEach(e=>{let[r,t]=e;s[r]=e8(t,s[r])}),s}if("array"===e.type){if(Array.isArray(r)){let s=e.items;if(!s)return r;if(0===r.length){let e=e7(s);return e.length?e:r}return Array.isArray(s)?r.map((e,r)=>{var t;return e8(null!==(t=s[r])&&void 0!==t?t:s[s.length-1],e)}):r.map(e=>e8(s,e))}return void 0!==r?r:e7(e.items)}if(void 0!==r)return r;switch(e.type){case"integer":case"number":return 0;case"boolean":return!1;default:return""}}let e9=e=>{let s=e8(e);if("object"===e.type||"array"===e.type){let r="array"===e.type?[]:{};return JSON.stringify(null!=s?s:r,null,2)}return s};function se(e){let{tool:s,onSubmit:r,isLoading:l,result:a,error:n,onClose:i}=e,[o]=A.Z.useForm(),[c,d]=f.useState("formatted"),[u,m]=f.useState(null),[x,h]=f.useState(null),p=f.useMemo(()=>"string"==typeof s.inputSchema?{type:"object",properties:{input:{type:"string",description:"Input for this tool"}},required:["input"]}:s.inputSchema,[s.inputSchema]),g=f.useMemo(()=>p.properties&&p.properties.params&&"object"===p.properties.params.type&&p.properties.params.properties?{type:"object",properties:p.properties.params.properties,required:p.properties.params.required||[]}:p,[p]);f.useEffect(()=>{if(o.resetFields(),!g.properties)return;let e={};Object.entries(g.properties).forEach(s=>{let[r,t]=s;e[r]=e9(t)}),o.setFieldsValue(e)},[o,g,s]),f.useEffect(()=>{u&&(a||n)&&h(Date.now()-u)},[a,n,u]);let j=async e=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{let s=document.createElement("textarea");s.value=e,s.style.position="fixed",s.style.opacity="0",document.body.appendChild(s),s.focus(),s.select();let r=document.execCommand("copy");if(document.body.removeChild(s),!r)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},b=async()=>{await j(JSON.stringify(a,null,2))?S.Z.success("Result copied to clipboard"):S.Z.fromBackend("Failed to copy result")},y=async()=>{await j(s.name)?S.Z.success("Tool name copied to clipboard"):S.Z.fromBackend("Failed to copy tool name")};return(0,t.jsxs)("div",{className:"space-y-4 h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between pb-3 border-b border-gray-200",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[s.mcp_info.logo_url&&(0,t.jsx)("img",{src:s.mcp_info.logo_url,alt:"".concat(s.mcp_info.server_name," logo"),className:"w-6 h-6 object-contain"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Test Tool:"}),(0,t.jsxs)("div",{className:"group inline-flex items-center space-x-1 bg-slate-50 hover:bg-slate-100 px-3 py-1 rounded-md cursor-pointer transition-colors border border-slate-200",onClick:y,title:"Click to copy tool name",children:[(0,t.jsx)("span",{className:"font-mono text-slate-700 font-medium text-sm",children:s.name}),(0,t.jsx)("svg",{className:"w-3 h-3 text-slate-400 group-hover:text-slate-600 transition-colors",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})]})]}),(0,t.jsx)("p",{className:"text-xs text-gray-600",children:s.description}),(0,t.jsxs)("p",{className:"text-xs text-gray-500",children:["Provider: ",s.mcp_info.server_name]})]})]}),(0,t.jsx)(O.z,{onClick:i,variant:"light",size:"sm",className:"text-gray-500 hover:text-gray-700",children:(0,t.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 h-full",children:[(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"border-b border-gray-100 px-4 py-2",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Input Parameters"}),(0,t.jsx)(v.Z,{title:"Configure the input parameters for this tool call",children:(0,t.jsx)(M.Z,{className:"text-gray-400 hover:text-gray-600"})})]})}),(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)(A.Z,{form:o,onFinish:e=>{m(Date.now()),h(null);let s={};Object.entries(e).forEach(e=>{var r;let[t,l]=e,a=null===(r=g.properties)||void 0===r?void 0:r[t];if(a&&null!=l&&""!==l)switch(a.type){case"boolean":s[t]="true"===l||!0===l;break;case"number":case"integer":{let e=Number(l);s[t]=Number.isNaN(e)?l:"integer"===a.type?Math.trunc(e):e;break}case"object":case"array":try{let e="string"==typeof l?JSON.parse(l):l,r="object"===a.type&&null!==e&&"object"==typeof e&&!Array.isArray(e),n="array"===a.type&&Array.isArray(e);"object"===a.type&&r||"array"===a.type&&n?s[t]=e:s[t]=l}catch(e){s[t]=l}break;case"string":s[t]=String(l);break;default:s[t]=l}else null!=l&&""!==l&&(s[t]=l)}),r(p.properties&&p.properties.params&&"object"===p.properties.params.type&&p.properties.params.properties?{params:s}:s)},layout:"vertical",className:"space-y-3",children:["string"==typeof s.inputSchema?(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsx)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Input ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),name:"input",rules:[{required:!0,message:"Please enter input for this tool"}],className:"mb-3",children:(0,t.jsx)(O.o,{placeholder:"Enter input for this tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})}):void 0===g.properties?(0,t.jsx)("div",{className:"text-center py-6 bg-gray-50 rounded-lg border border-gray-200",children:(0,t.jsxs)("div",{className:"max-w-sm mx-auto",children:[(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900 mb-1",children:"No Parameters Required"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"This tool can be called without any input parameters."})]})}):(0,t.jsx)("div",{className:"space-y-3",children:Object.entries(g.properties).map(e=>{var r,l,a,n;let[i,o]=e,c=e9(o),d="".concat(s.name,"-").concat(i);return(0,t.jsxs)(A.Z.Item,{label:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:[i," ",(null===(r=g.required)||void 0===r?void 0:r.includes(i))&&(0,t.jsx)("span",{className:"text-red-500",children:"*"}),o.description&&(0,t.jsx)(v.Z,{title:o.description,children:(0,t.jsx)(M.Z,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:i,initialValue:c,rules:[{required:null===(l=g.required)||void 0===l?void 0:l.includes(i),message:"Please enter ".concat(i)},..."object"===o.type||"array"===o.type?[{validator:(e,s)=>{var r;if((null==s||""===s)&&!(null===(r=g.required)||void 0===r?void 0:r.includes(i)))return Promise.resolve();try{let e="string"==typeof s?JSON.parse(s):s,r="object"===o.type&&null!==e&&"object"==typeof e&&!Array.isArray(e),t="array"===o.type&&Array.isArray(e);if("object"===o.type&&r||"array"===o.type&&t)return Promise.resolve();return Promise.reject(Error("object"===o.type?"Please enter a JSON object":"Please enter a JSON array"))}catch(e){return Promise.reject(Error("Invalid JSON"))}}}]:[]],className:"mb-3",children:["string"===o.type&&o.enum&&(0,t.jsxs)("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors",defaultValue:null!=c?c:"",children:[!(null===(a=g.required)||void 0===a?void 0:a.includes(i))&&(0,t.jsxs)("option",{value:"",children:["Select ",i]}),o.enum.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),"string"===o.type&&!o.enum&&(0,t.jsx)(O.o,{placeholder:o.description||"Enter ".concat(i),defaultValue:null!=c?c:"",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"}),("number"===o.type||"integer"===o.type)&&(0,t.jsx)("input",{type:"number",step:"integer"===o.type?1:"any",placeholder:o.description||"Enter ".concat(i),defaultValue:null!=c?c:0,className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors"}),"boolean"===o.type&&(0,t.jsxs)("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm transition-colors",defaultValue:(null!=c&&c).toString(),children:[!(null===(n=g.required)||void 0===n?void 0:n.includes(i))&&(0,t.jsxs)("option",{value:"",children:["Select ",i]}),(0,t.jsx)("option",{value:"true",children:"True"}),(0,t.jsx)("option",{value:"false",children:"False"})]}),("object"===o.type||"array"===o.type)&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("textarea",{rows:"object"===o.type?6:4,placeholder:o.description||("object"===o.type?"Enter JSON object for ".concat(i):"Enter JSON array for ".concat(i)),defaultValue:null!=c?c:"object"===o.type?"{}":"[]",spellCheck:!1,"data-testid":"textarea-".concat(i),className:"w-full px-3 py-2 border border-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm font-mono"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"object"===o.type?"Provide a valid JSON object.":"Provide a valid JSON array."})]})]},d)})}),(0,t.jsx)("div",{className:"pt-3 border-t border-gray-100",children:(0,t.jsx)(O.z,{onClick:()=>o.submit(),disabled:l,variant:"primary",className:"w-full",loading:l,children:l?"Calling Tool...":a||n?"Call Again":"Call Tool"})})]})})]}),(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"border-b border-gray-100 px-4 py-2",children:(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:"Tool Result"})}),(0,t.jsx)("div",{className:"p-4",children:a||n||l?(0,t.jsxs)("div",{className:"space-y-3",children:[a&&!l&&!n&&(0,t.jsx)("div",{className:"p-2 bg-green-50 border border-green-200 rounded-lg",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("svg",{className:"h-4 w-4 text-green-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,t.jsx)("h4",{className:"text-xs font-medium text-green-900",children:"Tool executed successfully"}),null!==x&&(0,t.jsxs)("span",{className:"text-xs text-green-600 ml-1",children:["• ",(x/1e3).toFixed(2),"s"]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,t.jsxs)("div",{className:"flex bg-white rounded border border-green-300 p-0.5",children:[(0,t.jsx)("button",{onClick:()=>d("formatted"),className:"px-2 py-1 text-xs font-medium rounded transition-colors ".concat("formatted"===c?"bg-green-100 text-green-800":"text-green-600 hover:text-green-800"),children:"Formatted"}),(0,t.jsx)("button",{onClick:()=>d("json"),className:"px-2 py-1 text-xs font-medium rounded transition-colors ".concat("json"===c?"bg-green-100 text-green-800":"text-green-600 hover:text-green-800"),children:"JSON"})]}),(0,t.jsx)("button",{onClick:b,className:"p-1 hover:bg-green-100 rounded text-green-700",title:"Copy response",children:(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})]})]})}),(0,t.jsxs)("div",{className:"max-h-96 overflow-y-auto",children:[l&&(0,t.jsxs)("div",{className:"flex flex-col justify-center items-center h-48 text-gray-500",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-gray-200"}),(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-blue-600 border-t-transparent absolute top-0"})]}),(0,t.jsx)("p",{className:"text-sm font-medium mt-3",children:"Calling tool..."}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Please wait while we process your request"})]}),n&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3",children:(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)("svg",{className:"h-4 w-4 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-red-900",children:"Tool Call Failed"}),null!==x&&(0,t.jsxs)("span",{className:"text-xs text-red-600",children:["• ",(x/1e3).toFixed(2),"s"]})]}),(0,t.jsx)("div",{className:"bg-white border border-red-200 rounded p-2 max-h-48 overflow-y-auto",children:(0,t.jsx)("pre",{className:"text-xs whitespace-pre-wrap text-red-700 font-mono",children:n.message})})]})]})}),a&&!l&&!n&&(0,t.jsx)("div",{className:"space-y-3",children:"formatted"===c?a.map((e,s)=>(0,t.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:["text"===e.type&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Text Response"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsx)("div",{className:"bg-white rounded border border-gray-200 max-h-64 overflow-y-auto",children:(0,t.jsx)("div",{className:"p-3 space-y-2",children:e.text.split("\n\n").map((e,s)=>{if(""===e.trim())return null;if(e.startsWith("##")){let r=e.replace(/^#+\s/,"");return(0,t.jsx)("div",{className:"border-b border-gray-200 pb-1 mb-2",children:(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-900",children:r})},s)}let r=/(https?:\/\/[^\s\)]+)/g;if(r.test(e)){let l=e.split(r);return(0,t.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded p-2",children:(0,t.jsx)("div",{className:"text-xs text-gray-700 leading-relaxed whitespace-pre-wrap",children:l.map((e,s)=>r.test(e)?(0,t.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline break-all",children:e},s):e)})},s)}return e.includes("Score:")?(0,t.jsx)("div",{className:"bg-green-50 border-l-4 border-green-400 p-2 rounded-r",children:(0,t.jsx)("p",{className:"text-xs text-green-800 font-medium whitespace-pre-wrap",children:e})},s):(0,t.jsx)("div",{className:"bg-gray-50 rounded p-2 border border-gray-200",children:(0,t.jsx)("div",{className:"text-xs text-gray-700 leading-relaxed whitespace-pre-wrap font-mono",children:e})},s)}).filter(Boolean)})})})]}),"image"===e.type&&e.url&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Image Response"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsx)("div",{className:"bg-gray-50 rounded p-3 border border-gray-200",children:(0,t.jsx)("img",{src:e.url,alt:"Tool result",className:"max-w-full h-auto rounded shadow-sm"})})})]}),"embedded_resource"===e.type&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"bg-gray-50 px-3 py-1 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-xs font-medium text-gray-700 uppercase tracking-wide",children:"Embedded Resource"})}),(0,t.jsx)("div",{className:"p-3",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2 p-3 bg-blue-50 border border-blue-200 rounded",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsx)("svg",{className:"h-5 w-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("p",{className:"text-xs font-medium text-blue-900",children:["Resource Type: ",e.resource_type]}),e.url&&(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-xs text-blue-600 hover:text-blue-800 hover:underline mt-1 transition-colors",children:["View Resource",(0,t.jsxs)("svg",{className:"ml-1 h-3 w-3",fill:"currentColor",viewBox:"0 0 20 20",children:[(0,t.jsx)("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),(0,t.jsx)("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"})]})]})]})]})})]})]},s)):(0,t.jsx)("div",{className:"bg-white rounded border border-gray-200",children:(0,t.jsx)("div",{className:"p-3 overflow-auto max-h-80 bg-gray-50",children:(0,t.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all text-gray-800",children:JSON.stringify(a,null,2)})})})})]})]}):(0,t.jsx)("div",{className:"flex flex-col justify-center items-center h-48 text-gray-500",children:(0,t.jsxs)("div",{className:"text-center max-w-sm",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),(0,t.jsx)("h4",{className:"text-sm font-medium text-gray-900 mb-1",children:"Ready to Call Tool"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 leading-relaxed",children:'Configure the input parameters and click "Call Tool" to see the results here.'})]})})})]})]})]})}var ss=r(69993),sr=e=>{let{serverId:s,accessToken:r,auth_type:l,userRole:a,userID:n,serverAlias:i}=e,[o,c]=(0,f.useState)(null),[d,u]=(0,f.useState)(null),[m,x]=(0,f.useState)(null),{data:h,isLoading:p,error:g}=(0,y.a)({queryKey:["mcpTools",s],queryFn:()=>{if(!r)throw Error("Access Token required");return(0,_.listMCPTools)(r,s)},enabled:!!r,staleTime:3e4}),{mutate:j,isPending:v}=(0,e6.D)({mutationFn:async e=>{if(!r)throw Error("Access Token required");try{return await (0,_.callMCPTool)(r,s,e.tool.name,e.arguments)}catch(e){throw e}},onSuccess:e=>{u(e.content),x(null)},onError:e=>{x(e),u(null)}}),b=(null==h?void 0:h.tools)||[];return(0,t.jsx)("div",{className:"w-full h-screen p-4 bg-white",children:(0,t.jsx)(F.Zb,{className:"w-full rounded-xl shadow-md overflow-hidden",children:(0,t.jsxs)("div",{className:"flex h-auto w-full gap-4",children:[(0,t.jsxs)("div",{className:"w-1/4 p-4 bg-gray-50 flex flex-col",children:[(0,t.jsx)(F.Dx,{className:"text-xl font-semibold mb-6 mt-2",children:"MCP Tools"}),(0,t.jsx)("div",{className:"flex flex-col flex-1",children:(0,t.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,t.jsxs)(F.xv,{className:"font-medium block mb-3 text-gray-700 flex items-center",children:[(0,t.jsx)(V.Z,{className:"mr-2"})," Available Tools",b.length>0&&(0,t.jsx)("span",{className:"ml-2 bg-blue-100 text-blue-800 text-xs font-medium px-2 py-0.5 rounded-full",children:b.length})]}),p&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 bg-white border border-gray-200 rounded-lg",children:[(0,t.jsxs)("div",{className:"relative mb-3",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-gray-200"}),(0,t.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-blue-600 border-t-transparent absolute top-0"})]}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700",children:"Loading tools..."})]}),(null==h?void 0:h.error)&&!p&&!b.length&&(0,t.jsx)("div",{className:"p-3 text-xs text-red-800 rounded-lg bg-red-50 border border-red-200",children:(0,t.jsxs)("p",{className:"font-medium",children:["Error: ",h.message]})}),!p&&!(null==h?void 0:h.error)&&(!b||0===b.length)&&(0,t.jsxs)("div",{className:"p-4 text-center bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"mx-auto w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center mb-2",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 8.172V5L8 4z"})})}),(0,t.jsx)("p",{className:"text-xs font-medium text-gray-700 mb-1",children:"No tools available"}),(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"No tools found for this server"})]}),!p&&!(null==h?void 0:h.error)&&b.length>0&&(0,t.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto min-h-0 mcp-tools-scrollable",style:{maxHeight:"400px",scrollbarWidth:"auto",scrollbarColor:"#cbd5e0 #f7fafc"},children:b.map(e=>(0,t.jsxs)("div",{className:"border rounded-lg p-3 cursor-pointer transition-all hover:shadow-sm ".concat((null==o?void 0:o.name)===e.name?"border-blue-500 bg-blue-50 ring-1 ring-blue-200":"border-gray-200 bg-white hover:border-gray-300"),onClick:()=>{c(e),u(null),x(null)},children:[(0,t.jsxs)("div",{className:"flex items-start space-x-2",children:[e.mcp_info.logo_url&&(0,t.jsx)("img",{src:e.mcp_info.logo_url,alt:"".concat(e.mcp_info.server_name," logo"),className:"w-4 h-4 object-contain flex-shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h4",{className:"font-mono text-xs font-medium text-gray-900 truncate",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-gray-500 truncate",children:e.mcp_info.server_name}),(0,t.jsx)("p",{className:"text-xs text-gray-600 mt-1 line-clamp-2 leading-relaxed",children:e.description})]})]}),(null==o?void 0:o.name)===e.name&&(0,t.jsx)("div",{className:"mt-2 pt-2 border-t border-blue-200",children:(0,t.jsxs)("div",{className:"flex items-center text-xs font-medium text-blue-700",children:[(0,t.jsx)("svg",{className:"w-3 h-3 mr-1",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Selected"]})})]},e.name))})]})})]}),(0,t.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,t.jsx)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:(0,t.jsx)(F.Dx,{className:"text-xl font-semibold mb-0",children:"Tool Testing Playground"})}),(0,t.jsx)("div",{className:"flex-1 overflow-auto p-4",children:o?(0,t.jsx)("div",{className:"h-full",children:(0,t.jsx)(se,{tool:o,onSubmit:e=>{j({tool:o,arguments:e})},result:d,error:m,isLoading:v,onClose:()=>c(null)})}):(0,t.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,t.jsx)(ss.Z,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,t.jsx)(F.xv,{className:"text-lg font-medium text-gray-600 mb-2",children:"Select a Tool to Test"}),(0,t.jsx)(F.xv,{className:"text-center text-gray-500 max-w-md",children:"Choose a tool from the left sidebar to start testing its functionality with custom inputs."})]})})]})]})})})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/536-8fae454c1d779890.js b/litellm/proxy/_experimental/out/_next/static/chunks/536-8fae454c1d779890.js
new file mode 100644
index 00000000000..f21033b1d69
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/536-8fae454c1d779890.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[536],{51653:function(e,t,n){n.d(t,{Z:function(){return T}});var o=n(2265),a=n(8900),c=n(39725),r=n(49638),i=n(54537),l=n(55726),s=n(36760),d=n.n(s),b=n(66632),p=n(18242),g=n(28791),m=n(19722),u=n(71744),f=n(93463),h=n(12918),y=n(99320);let v=(e,t,n,o,a)=>({background:e,border:"".concat((0,f.bf)(o.lineWidth)," ").concat(o.lineType," ").concat(t),["".concat(a,"-icon")]:{color:n}}),S=e=>{let{componentCls:t,motionDurationSlow:n,marginXS:o,marginSM:a,fontSize:c,fontSizeLG:r,lineHeight:i,borderRadiusLG:l,motionEaseInOutCirc:s,withDescriptionIconSize:d,colorText:b,colorTextHeading:p,withDescriptionPadding:g,defaultPadding:m}=e;return{[t]:Object.assign(Object.assign({},(0,h.Wf)(e)),{position:"relative",display:"flex",alignItems:"center",padding:m,wordWrap:"break-word",borderRadius:l,["&".concat(t,"-rtl")]:{direction:"rtl"},["".concat(t,"-content")]:{flex:1,minWidth:0},["".concat(t,"-icon")]:{marginInlineEnd:o,lineHeight:0},"&-description":{display:"none",fontSize:c,lineHeight:i},"&-message":{color:p},["&".concat(t,"-motion-leave")]:{overflow:"hidden",opacity:1,transition:"max-height ".concat(n," ").concat(s,", opacity ").concat(n," ").concat(s,",\n padding-top ").concat(n," ").concat(s,", padding-bottom ").concat(n," ").concat(s,",\n margin-bottom ").concat(n," ").concat(s)},["&".concat(t,"-motion-leave-active")]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),["".concat(t,"-with-description")]:{alignItems:"flex-start",padding:g,["".concat(t,"-icon")]:{marginInlineEnd:a,fontSize:d,lineHeight:0},["".concat(t,"-message")]:{display:"block",marginBottom:o,color:p,fontSize:r},["".concat(t,"-description")]:{display:"block",color:b}},["".concat(t,"-banner")]:{marginBottom:0,border:"0 !important",borderRadius:0}}},O=e=>{let{componentCls:t,colorSuccess:n,colorSuccessBorder:o,colorSuccessBg:a,colorWarning:c,colorWarningBorder:r,colorWarningBg:i,colorError:l,colorErrorBorder:s,colorErrorBg:d,colorInfo:b,colorInfoBorder:p,colorInfoBg:g}=e;return{[t]:{"&-success":v(a,o,n,e,t),"&-info":v(g,p,b,e,t),"&-warning":v(i,r,c,e,t),"&-error":Object.assign(Object.assign({},v(d,s,l,e,t)),{["".concat(t,"-description > pre")]:{margin:0,padding:0}})}}},x=e=>{let{componentCls:t,iconCls:n,motionDurationMid:o,marginXS:a,fontSizeIcon:c,colorIcon:r,colorIconHover:i}=e;return{[t]:{"&-action":{marginInlineStart:a},["".concat(t,"-close-icon")]:{marginInlineStart:a,padding:0,overflow:"hidden",fontSize:c,lineHeight:(0,f.bf)(c),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",["".concat(n,"-close")]:{color:r,transition:"color ".concat(o),"&:hover":{color:i}}},"&-close-text":{color:r,transition:"color ".concat(o),"&:hover":{color:i}}}}};var j=(0,y.I$)("Alert",e=>[S(e),O(e),x(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:"".concat(e.paddingContentVerticalSM,"px ").concat(12,"px"),withDescriptionPadding:"".concat(e.paddingMD,"px ").concat(e.paddingContentHorizontalLG,"px")})),E=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let w={success:a.Z,info:l.Z,error:c.Z,warning:i.Z},C=e=>{let{icon:t,prefixCls:n,type:a}=e,c=w[a]||null;return t?(0,m.wm)(t,o.createElement("span",{className:"".concat(n,"-icon")},t),()=>({className:d()("".concat(n,"-icon"),t.props.className)})):o.createElement(c,{className:"".concat(n,"-icon")})},I=e=>{let{isClosable:t,prefixCls:n,closeIcon:a,handleClose:c,ariaProps:i}=e,l=!0===a||void 0===a?o.createElement(r.Z,null):a;return t?o.createElement("button",Object.assign({type:"button",onClick:c,className:"".concat(n,"-close-icon"),tabIndex:0},i),l):null},N=o.forwardRef((e,t)=>{let{description:n,prefixCls:a,message:c,banner:r,className:i,rootClassName:l,style:s,onMouseEnter:m,onMouseLeave:f,onClick:h,afterClose:y,showIcon:v,closable:S,closeText:O,closeIcon:x,action:w,id:N}=e,z=E(e,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[P,k]=o.useState(!1),L=o.useRef(null);o.useImperativeHandle(t,()=>({nativeElement:L.current}));let{getPrefixCls:H,direction:M,closable:R,closeIcon:T,className:B,style:G}=(0,u.dj)("alert"),W=H("alert",a),[Z,D,A]=j(W),_=t=>{var n;k(!0),null===(n=e.onClose)||void 0===n||n.call(e,t)},F=o.useMemo(()=>void 0!==e.type?e.type:r?"warning":"info",[e.type,r]),X=o.useMemo(()=>"object"==typeof S&&!!S.closeIcon||!!O||("boolean"==typeof S?S:!1!==x&&null!=x||!!R),[O,x,S,R]),q=!!r&&void 0===v||v,K=d()(W,"".concat(W,"-").concat(F),{["".concat(W,"-with-description")]:!!n,["".concat(W,"-no-icon")]:!q,["".concat(W,"-banner")]:!!r,["".concat(W,"-rtl")]:"rtl"===M},B,i,l,A,D),$=(0,p.Z)(z,{aria:!0,data:!0}),Q=o.useMemo(()=>"object"==typeof S&&S.closeIcon?S.closeIcon:O||(void 0!==x?x:"object"==typeof R&&R.closeIcon?R.closeIcon:T),[x,S,R,O,T]),V=o.useMemo(()=>{let e=null!=S?S:R;if("object"==typeof e){let{closeIcon:t}=e;return E(e,["closeIcon"])}return{}},[S,R]);return Z(o.createElement(b.ZP,{visible:!P,motionName:"".concat(W,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:y},(t,a)=>{let{className:r,style:i}=t;return o.createElement("div",Object.assign({id:N,ref:(0,g.sQ)(L,a),"data-show":!P,className:d()(K,r),style:Object.assign(Object.assign(Object.assign({},G),s),i),onMouseEnter:m,onMouseLeave:f,onClick:h,role:"alert"},$),q?o.createElement(C,{description:n,icon:e.icon,prefixCls:W,type:F}):null,o.createElement("div",{className:"".concat(W,"-content")},c?o.createElement("div",{className:"".concat(W,"-message")},c):null,n?o.createElement("div",{className:"".concat(W,"-description")},n):null),w?o.createElement("div",{className:"".concat(W,"-action")},w):null,o.createElement(I,{isClosable:X,prefixCls:W,closeIcon:Q,handleClose:_,ariaProps:V}))}))});var z=n(76405),P=n(25049),k=n(24995),L=n(63929),H=n(37977),M=n(41690);let R=function(e){function t(){var e,n,o;return(0,z.Z)(this,t),n=t,o=arguments,n=(0,k.Z)(n),(e=(0,H.Z)(this,(0,L.Z)()?Reflect.construct(n,o||[],(0,k.Z)(this).constructor):n.apply(this,o))).state={error:void 0,info:{componentStack:""}},e}return(0,M.Z)(t,e),(0,P.Z)(t,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){let{message:e,description:t,id:n,children:a}=this.props,{error:c,info:r}=this.state,i=(null==r?void 0:r.componentStack)||null,l=void 0===e?(c||"").toString():e;return c?o.createElement(N,{id:n,type:"error",message:l,description:o.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},void 0===t?i:t)}):a}}])}(o.Component);N.ErrorBoundary=R;var T=N},5945:function(e,t,n){n.d(t,{Z:function(){return k}});var o=n(2265),a=n(36760),c=n.n(a),r=n(18694),i=n(71744),l=n(33759),s=n(50337),d=n(65869),b=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n},p=e=>{var{prefixCls:t,className:n,hoverable:a=!0}=e,r=b(e,["prefixCls","className","hoverable"]);let{getPrefixCls:l}=o.useContext(i.E_),s=l("card",t),d=c()("".concat(s,"-grid"),n,{["".concat(s,"-grid-hoverable")]:a});return o.createElement("div",Object.assign({},r,{className:d}))},g=n(93463),m=n(12918),u=n(99320),f=n(71140);let h=e=>{let{antCls:t,componentCls:n,headerHeight:o,headerPadding:a,tabsMarginBottom:c}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:o,marginBottom:-1,padding:"0 ".concat((0,g.bf)(a)),color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:"".concat((0,g.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorderSecondary),borderRadius:"".concat((0,g.bf)(e.borderRadiusLG)," ").concat((0,g.bf)(e.borderRadiusLG)," 0 0")},(0,m.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},m.vS),{["\n > ".concat(n,"-typography,\n > ").concat(n,"-typography-edit-content\n ")]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),["".concat(t,"-tabs-top")]:{clear:"both",marginBottom:c,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:"".concat((0,g.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorderSecondary)}}})},y=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:o,lineWidth:a}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:"\n ".concat((0,g.bf)(a)," 0 0 0 ").concat(n,",\n 0 ").concat((0,g.bf)(a)," 0 0 ").concat(n,",\n ").concat((0,g.bf)(a)," ").concat((0,g.bf)(a)," 0 0 ").concat(n,",\n ").concat((0,g.bf)(a)," 0 0 0 ").concat(n," inset,\n 0 ").concat((0,g.bf)(a)," 0 0 ").concat(n," inset;\n "),transition:"all ".concat(e.motionDurationMid),"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:o}}},v=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:o,cardActionsIconSize:a,colorBorderSecondary:c,actionsBg:r}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:r,borderTop:"".concat((0,g.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(c),display:"flex",borderRadius:"0 0 ".concat((0,g.bf)(e.borderRadiusLG)," ").concat((0,g.bf)(e.borderRadiusLG))},(0,m.dF)()),{"& > li":{margin:o,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:"color ".concat(e.motionDurationMid)},["a:not(".concat(t,"-btn), > ").concat(n)]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,g.bf)(e.fontHeight),transition:"color ".concat(e.motionDurationMid),"&:hover":{color:e.colorPrimary}},["> ".concat(n)]:{fontSize:a,lineHeight:(0,g.bf)(e.calc(a).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:"".concat((0,g.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(c)}}})},S=e=>Object.assign(Object.assign({margin:"".concat((0,g.bf)(e.calc(e.marginXXS).mul(-1).equal())," 0"),display:"flex"},(0,m.dF)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},m.vS),"&-description":{color:e.colorTextDescription}}),O=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:o,bodyPadding:a}=e;return{["".concat(t,"-head")]:{padding:"0 ".concat((0,g.bf)(o)),background:n,"&-title":{fontSize:e.fontSize}},["".concat(t,"-body")]:{padding:"".concat((0,g.bf)(e.padding)," ").concat((0,g.bf)(a))}}},x=e=>{let{componentCls:t}=e;return{overflow:"hidden",["".concat(t,"-body")]:{userSelect:"none"}}},j=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:o,colorBorderSecondary:a,boxShadowTertiary:c,bodyPadding:r,extraColor:i}=e;return{[t]:Object.assign(Object.assign({},(0,m.Wf)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,["&:not(".concat(t,"-bordered)")]:{boxShadow:c},["".concat(t,"-head")]:h(e),["".concat(t,"-extra")]:{marginInlineStart:"auto",color:i,fontWeight:"normal",fontSize:e.fontSize},["".concat(t,"-body")]:{padding:r,borderRadius:"0 0 ".concat((0,g.bf)(e.borderRadiusLG)," ").concat((0,g.bf)(e.borderRadiusLG))},["".concat(t,"-grid")]:y(e),["".concat(t,"-cover")]:{"> *":{display:"block",width:"100%",borderRadius:"".concat((0,g.bf)(e.borderRadiusLG)," ").concat((0,g.bf)(e.borderRadiusLG)," 0 0")}},["".concat(t,"-actions")]:v(e),["".concat(t,"-meta")]:S(e)}),["".concat(t,"-bordered")]:{border:"".concat((0,g.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(a),["".concat(t,"-cover")]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},["".concat(t,"-hoverable")]:{cursor:"pointer",transition:"box-shadow ".concat(e.motionDurationMid,", border-color ").concat(e.motionDurationMid),"&:hover":{borderColor:"transparent",boxShadow:n}},["".concat(t,"-contain-grid")]:{borderRadius:"".concat((0,g.bf)(e.borderRadiusLG)," ").concat((0,g.bf)(e.borderRadiusLG)," 0 0 "),["".concat(t,"-body")]:{display:"flex",flexWrap:"wrap"},["&:not(".concat(t,"-loading) ").concat(t,"-body")]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},["".concat(t,"-contain-tabs")]:{["> div".concat(t,"-head")]:{minHeight:0,["".concat(t,"-head-title, ").concat(t,"-extra")]:{paddingTop:o}}},["".concat(t,"-type-inner")]:O(e),["".concat(t,"-loading")]:x(e),["".concat(t,"-rtl")]:{direction:"rtl"}}},E=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:o,headerHeightSM:a,headerFontSizeSM:c}=e;return{["".concat(t,"-small")]:{["> ".concat(t,"-head")]:{minHeight:a,padding:"0 ".concat((0,g.bf)(o)),fontSize:c,["> ".concat(t,"-head-wrapper")]:{["> ".concat(t,"-extra")]:{fontSize:e.fontSize}}},["> ".concat(t,"-body")]:{padding:n}},["".concat(t,"-small").concat(t,"-contain-tabs")]:{["> ".concat(t,"-head")]:{["".concat(t,"-head-title, ").concat(t,"-extra")]:{paddingTop:0,display:"flex",alignItems:"center"}}}}};var w=(0,u.I$)("Card",e=>{let t=(0,f.IX)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[j(t),E(t)]},e=>{var t,n;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:"".concat(e.paddingSM,"px 0"),tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!==(t=e.bodyPadding)&&void 0!==t?t:e.paddingLG,headerPadding:null!==(n=e.headerPadding)&&void 0!==n?n:e.paddingLG}}),C=n(56250),I=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let N=e=>{let{actionClasses:t,actions:n=[],actionStyle:a}=e;return o.createElement("ul",{className:t,style:a},n.map((e,t)=>o.createElement("li",{style:{width:"".concat(100/n.length,"%")},key:"action-".concat(t)},o.createElement("span",null,e))))},z=o.forwardRef((e,t)=>{let n;let{prefixCls:a,className:b,rootClassName:g,style:m,extra:u,headStyle:f={},bodyStyle:h={},title:y,loading:v,bordered:S,variant:O,size:x,type:j,cover:E,actions:z,tabList:P,children:k,activeTabKey:L,defaultActiveTabKey:H,tabBarExtraContent:M,hoverable:R,tabProps:T={},classNames:B,styles:G}=e,W=I(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:Z,direction:D,card:A}=o.useContext(i.E_),[_]=(0,C.Z)("card",O,S),F=e=>{var t;return c()(null===(t=null==A?void 0:A.classNames)||void 0===t?void 0:t[e],null==B?void 0:B[e])},X=e=>{var t;return Object.assign(Object.assign({},null===(t=null==A?void 0:A.styles)||void 0===t?void 0:t[e]),null==G?void 0:G[e])},q=o.useMemo(()=>{let e=!1;return o.Children.forEach(k,t=>{(null==t?void 0:t.type)===p&&(e=!0)}),e},[k]),K=Z("card",a),[$,Q,V]=w(K),J=o.createElement(s.Z,{loading:!0,active:!0,paragraph:{rows:4},title:!1},k),U=void 0!==L,Y=Object.assign(Object.assign({},T),{[U?"activeKey":"defaultActiveKey"]:U?L:H,tabBarExtraContent:M}),ee=(0,l.Z)(x),et=ee&&"default"!==ee?ee:"large",en=P?o.createElement(d.default,Object.assign({size:et},Y,{className:"".concat(K,"-head-tabs"),onChange:t=>{var n;null===(n=e.onTabChange)||void 0===n||n.call(e,t)},items:P.map(e=>{var{tab:t}=e;return Object.assign({label:t},I(e,["tab"]))})})):null;if(y||u||en){let e=c()("".concat(K,"-head"),F("header")),t=c()("".concat(K,"-head-title"),F("title")),a=c()("".concat(K,"-extra"),F("extra")),r=Object.assign(Object.assign({},f),X("header"));n=o.createElement("div",{className:e,style:r},o.createElement("div",{className:"".concat(K,"-head-wrapper")},y&&o.createElement("div",{className:t,style:X("title")},y),u&&o.createElement("div",{className:a,style:X("extra")},u)),en)}let eo=c()("".concat(K,"-cover"),F("cover")),ea=E?o.createElement("div",{className:eo,style:X("cover")},E):null,ec=c()("".concat(K,"-body"),F("body")),er=Object.assign(Object.assign({},h),X("body")),ei=o.createElement("div",{className:ec,style:er},v?J:k),el=c()("".concat(K,"-actions"),F("actions")),es=(null==z?void 0:z.length)?o.createElement(N,{actionClasses:el,actionStyle:X("actions"),actions:z}):null,ed=(0,r.Z)(W,["onTabChange"]),eb=c()(K,null==A?void 0:A.className,{["".concat(K,"-loading")]:v,["".concat(K,"-bordered")]:"borderless"!==_,["".concat(K,"-hoverable")]:R,["".concat(K,"-contain-grid")]:q,["".concat(K,"-contain-tabs")]:null==P?void 0:P.length,["".concat(K,"-").concat(ee)]:ee,["".concat(K,"-type-").concat(j)]:!!j,["".concat(K,"-rtl")]:"rtl"===D},b,g,Q,V),ep=Object.assign(Object.assign({},null==A?void 0:A.style),m);return $(o.createElement("div",Object.assign({ref:t},ed,{className:eb,style:ep}),n,ea,ei,es))});var P=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};z.Grid=p,z.Meta=e=>{let{prefixCls:t,className:n,avatar:a,title:r,description:l}=e,s=P(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:d}=o.useContext(i.E_),b=d("card",t),p=c()("".concat(b,"-meta"),n),g=a?o.createElement("div",{className:"".concat(b,"-meta-avatar")},a):null,m=r?o.createElement("div",{className:"".concat(b,"-meta-title")},r):null,u=l?o.createElement("div",{className:"".concat(b,"-meta-description")},l):null,f=m||u?o.createElement("div",{className:"".concat(b,"-meta-detail")},m,u):null;return o.createElement("div",Object.assign({},s,{className:p}),g,f)};var k=z}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2901-b2d9f739800f0159.js b/litellm/proxy/_experimental/out/_next/static/chunks/5510-99fb91d9d17e6ab4.js
similarity index 84%
rename from litellm/proxy/_experimental/out/_next/static/chunks/2901-b2d9f739800f0159.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/5510-99fb91d9d17e6ab4.js
index f1a72862f1b..697e50527ae 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/2901-b2d9f739800f0159.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/5510-99fb91d9d17e6ab4.js
@@ -1 +1 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2901],{78489:function(r,e,t){t.d(e,{Z:function(){return N}});var o=t(5853),n=t(47187),a=t(2265);let l=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],d=r=>({_s:r,status:l[r],isEnter:r<3,isMounted:6!==r,isResolved:2===r||r>4}),s=r=>r?6:5,i=(r,e)=>{switch(r){case 1:case 0:return 2;case 4:case 3:return s(e)}},c=r=>"object"==typeof r?[r.enter,r.exit]:[r,r],m=(r,e)=>setTimeout(()=>{isNaN(document.body.offsetTop)||r(e+1)},0),g=(r,e,t,o,n)=>{clearTimeout(o.current);let a=d(r);e(a),t.current=a,n&&n({current:a})},p=({enter:r=!0,exit:e=!0,preEnter:t,preExit:o,timeout:n,initialEntered:l,mountOnEnter:p,unmountOnExit:u,onStateChange:b}={})=>{let[h,f]=(0,a.useState)(()=>d(l?2:s(p))),x=(0,a.useRef)(h),k=(0,a.useRef)(),[C,v]=c(n),w=(0,a.useCallback)(()=>{let r=i(x.current._s,u);r&&g(r,f,x,k,b)},[b,u]);return[h,(0,a.useCallback)(n=>{let a=r=>{switch(g(r,f,x,k,b),r){case 1:C>=0&&(k.current=setTimeout(w,C));break;case 4:v>=0&&(k.current=setTimeout(w,v));break;case 0:case 3:k.current=m(a,r)}},l=x.current.isEnter;"boolean"!=typeof n&&(n=!l),n?l||a(r?t?0:1:2):l&&a(e?o?3:4:s(u))},[w,b,r,e,t,o,C,v,u]),w]};var u=t(7084),b=t(13241),h=t(1153);let f=r=>{var e=(0,o._T)(r,[]);return a.createElement("svg",Object.assign({},e,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.createElement("path",{d:"M18.364 5.636L16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364z"}))};var x=t(26898);let k={xs:{height:"h-4",width:"w-4"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-6",width:"w-6"},xl:{height:"h-6",width:"w-6"}},C=r=>"light"!==r?{xs:{paddingX:"px-2.5",paddingY:"py-1.5",fontSize:"text-xs"},sm:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-sm"},md:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-md"},lg:{paddingX:"px-4",paddingY:"py-2.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-3",fontSize:"text-xl"}}:{xs:{paddingX:"",paddingY:"",fontSize:"text-xs"},sm:{paddingX:"",paddingY:"",fontSize:"text-sm"},md:{paddingX:"",paddingY:"",fontSize:"text-md"},lg:{paddingX:"",paddingY:"",fontSize:"text-lg"},xl:{paddingX:"",paddingY:"",fontSize:"text-xl"}},v=(r,e)=>{switch(r){case"primary":return{textColor:e?(0,h.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:e?(0,h.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:e?(0,h.bM)(e,x.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:e?(0,h.bM)(e,x.K.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:e?(0,h.bM)(e,x.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:e?(0,h.bM)(e,x.K.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:e?(0,h.bM)(e,x.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:e?(0,h.bM)(e,x.K.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,h.bM)("transparent").bgColor,hoverBgColor:e?(0,b.q)((0,h.bM)(e,x.K.background).hoverBgColor,"hover:bg-opacity-20 dark:hover:bg-opacity-20"):"hover:bg-tremor-brand-faint dark:hover:bg-dark-tremor-brand-faint",borderColor:e?(0,h.bM)(e,x.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:e?(0,h.bM)(e,x.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:e?(0,h.bM)(e,x.K.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,h.bM)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},w=(0,h.fn)("Button"),S=r=>{let{loading:e,iconSize:t,iconPosition:o,Icon:n,needMargin:l,transitionStatus:d}=r,s=l?o===u.zS.Left?(0,b.q)("-ml-1","mr-1.5"):(0,b.q)("-mr-1","ml-1.5"):"",i=(0,b.q)("w-0 h-0"),c={default:i,entering:i,entered:t,exiting:t,exited:i};return e?a.createElement(f,{className:(0,b.q)(w("icon"),"animate-spin shrink-0",s,c.default,c[d]),style:{transition:"width 150ms"}}):a.createElement(n,{className:(0,b.q)(w("icon"),"shrink-0",t,s)})},N=a.forwardRef((r,e)=>{let{icon:t,iconPosition:l=u.zS.Left,size:d=u.u8.SM,color:s,variant:i="primary",disabled:c,loading:m=!1,loadingText:g,children:f,tooltip:x,className:N}=r,y=(0,o._T)(r,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),M=m||c,E=void 0!==t||m,T=m&&g,q=!(!f&&!T),z=(0,b.q)(k[d].height,k[d].width),_="light"!==i?(0,b.q)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",B=v(i,s),I=C(i)[d],{tooltipProps:K,getReferenceProps:R}=(0,n.l)(300),[j,O]=p({timeout:50});return(0,a.useEffect)(()=>{O(m)},[m]),a.createElement("button",Object.assign({ref:(0,h.lq)([e,K.refs.setReference]),className:(0,b.q)(w("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",_,I.paddingX,I.paddingY,I.fontSize,B.textColor,B.bgColor,B.borderColor,B.hoverBorderColor,M?"opacity-50 cursor-not-allowed":(0,b.q)(v(i,s).hoverTextColor,v(i,s).hoverBgColor,v(i,s).hoverBorderColor),N),disabled:M},R,y),a.createElement(n.Z,Object.assign({text:x},K)),E&&l!==u.zS.Right?a.createElement(S,{loading:m,iconSize:z,iconPosition:l,Icon:t,transitionStatus:j.status,needMargin:q}):null,T||f?a.createElement("span",{className:(0,b.q)(w("text"),"text-tremor-default whitespace-nowrap")},T?g:f):null,E&&l===u.zS.Right?a.createElement(S,{loading:m,iconSize:z,iconPosition:l,Icon:t,transitionStatus:j.status,needMargin:q}):null)});N.displayName="Button"},12514:function(r,e,t){t.d(e,{Z:function(){return m}});var o=t(5853),n=t(2265),a=t(7084),l=t(26898),d=t(13241),s=t(1153);let i=(0,s.fn)("Card"),c=r=>{if(!r)return"";switch(r){case a.zS.Left:return"border-l-4";case a.m.Top:return"border-t-4";case a.zS.Right:return"border-r-4";case a.m.Bottom:return"border-b-4";default:return""}},m=n.forwardRef((r,e)=>{let{decoration:t="",decorationColor:a,children:m,className:g}=r,p=(0,o._T)(r,["decoration","decorationColor","children","className"]);return n.createElement("div",Object.assign({ref:e,className:(0,d.q)(i("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",a?(0,s.bM)(a,l.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",c(t),g)},p),m)});m.displayName="Card"},49804:function(r,e,t){t.d(e,{Z:function(){return i}});var o=t(5853),n=t(13241),a=t(1153),l=t(2265),d=t(9496);let s=(0,a.fn)("Col"),i=l.forwardRef((r,e)=>{let{numColSpan:t=1,numColSpanSm:a,numColSpanMd:i,numColSpanLg:c,children:m,className:g}=r,p=(0,o._T)(r,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),u=(r,e)=>r&&Object.keys(e).includes(String(r))?e[r]:"";return l.createElement("div",Object.assign({ref:e,className:(0,n.q)(s("root"),(()=>{let r=u(t,d.PT),e=u(a,d.SP),o=u(i,d.VS),l=u(c,d._w);return(0,n.q)(r,e,o,l)})(),g)},p),m)});i.displayName="Col"},67101:function(r,e,t){t.d(e,{Z:function(){return c}});var o=t(5853),n=t(13241),a=t(1153),l=t(2265),d=t(9496);let s=(0,a.fn)("Grid"),i=(r,e)=>r&&Object.keys(e).includes(String(r))?e[r]:"",c=l.forwardRef((r,e)=>{let{numItems:t=1,numItemsSm:a,numItemsMd:c,numItemsLg:m,children:g,className:p}=r,u=(0,o._T)(r,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),b=i(t,d._m),h=i(a,d.LH),f=i(c,d.l5),x=i(m,d.N4),k=(0,n.q)(b,h,f,x);return l.createElement("div",Object.assign({ref:e,className:(0,n.q)(s("root"),"grid",k,p)},u),g)});c.displayName="Grid"},9496:function(r,e,t){t.d(e,{LH:function(){return n},N4:function(){return l},PT:function(){return d},SP:function(){return s},VS:function(){return i},_m:function(){return o},_w:function(){return c},l5:function(){return a}});let o={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},n={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},a={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},l={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},d={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},s={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},i={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},c={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"}},94789:function(r,e,t){t.d(e,{Z:function(){return i}});var o=t(5853),n=t(2265),a=t(26898),l=t(13241),d=t(1153);let s=(0,d.fn)("Callout"),i=n.forwardRef((r,e)=>{let{title:t,icon:i,color:c,className:m,children:g}=r,p=(0,o._T)(r,["title","icon","color","className","children"]);return n.createElement("div",Object.assign({ref:e,className:(0,l.q)(s("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",c?(0,l.q)((0,d.bM)(c,a.K.background).bgColor,(0,d.bM)(c,a.K.darkBorder).borderColor,(0,d.bM)(c,a.K.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,l.q)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),m)},p),n.createElement("div",{className:(0,l.q)(s("header"),"flex items-start")},i?n.createElement(i,{className:(0,l.q)(s("icon"),"flex-none h-5 w-5 mr-1.5")}):null,n.createElement("h4",{className:(0,l.q)(s("title"),"font-semibold")},t)),n.createElement("p",{className:(0,l.q)(s("body"),"overflow-y-auto",g?"mt-2":"")},g))});i.displayName="Callout"},84264:function(r,e,t){t.d(e,{Z:function(){return d}});var o=t(26898),n=t(13241),a=t(1153),l=t(2265);let d=l.forwardRef((r,e)=>{let{color:t,className:d,children:s}=r;return l.createElement("p",{ref:e,className:(0,n.q)("text-tremor-default",t?(0,a.bM)(t,o.K.text).textColor:(0,n.q)("text-tremor-content","dark:text-dark-tremor-content"),d)},s)});d.displayName="Text"},96761:function(r,e,t){t.d(e,{Z:function(){return s}});var o=t(5853),n=t(26898),a=t(13241),l=t(1153),d=t(2265);let s=d.forwardRef((r,e)=>{let{color:t,children:s,className:i}=r,c=(0,o._T)(r,["color","children","className"]);return d.createElement("p",Object.assign({ref:e,className:(0,a.q)("font-medium text-tremor-title",t?(0,l.bM)(t,n.K.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",i)},c),s)});s.displayName="Title"},14474:function(r,e,t){t.d(e,{o:function(){return n}});class o extends Error{}function n(r,e){let t;if("string"!=typeof r)throw new o("Invalid token specified: must be a string");e||(e={});let n=!0===e.header?0:1,a=r.split(".")[n];if("string"!=typeof a)throw new o(`Invalid token specified: missing part #${n+1}`);try{t=function(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw Error("base64 string is not of the correct length")}try{var t;return t=e,decodeURIComponent(atob(t).replace(/(.)/g,(r,e)=>{let t=e.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t}))}catch(r){return atob(e)}}(a)}catch(r){throw new o(`Invalid token specified: invalid base64 for part #${n+1} (${r.message})`)}try{return JSON.parse(t)}catch(r){throw new o(`Invalid token specified: invalid json for part #${n+1} (${r.message})`)}}o.prototype.name="InvalidTokenError"}}]);
\ No newline at end of file
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5510],{78489:function(r,e,t){t.d(e,{Z:function(){return N}});var o=t(5853),n=t(47187),a=t(2265);let l=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],d=r=>({_s:r,status:l[r],isEnter:r<3,isMounted:6!==r,isResolved:2===r||r>4}),s=r=>r?6:5,i=(r,e)=>{switch(r){case 1:case 0:return 2;case 4:case 3:return s(e)}},c=r=>"object"==typeof r?[r.enter,r.exit]:[r,r],m=(r,e)=>setTimeout(()=>{isNaN(document.body.offsetTop)||r(e+1)},0),g=(r,e,t,o,n)=>{clearTimeout(o.current);let a=d(r);e(a),t.current=a,n&&n({current:a})},p=({enter:r=!0,exit:e=!0,preEnter:t,preExit:o,timeout:n,initialEntered:l,mountOnEnter:p,unmountOnExit:u,onStateChange:b}={})=>{let[h,f]=(0,a.useState)(()=>d(l?2:s(p))),x=(0,a.useRef)(h),k=(0,a.useRef)(),[C,v]=c(n),w=(0,a.useCallback)(()=>{let r=i(x.current._s,u);r&&g(r,f,x,k,b)},[b,u]);return[h,(0,a.useCallback)(n=>{let a=r=>{switch(g(r,f,x,k,b),r){case 1:C>=0&&(k.current=setTimeout(w,C));break;case 4:v>=0&&(k.current=setTimeout(w,v));break;case 0:case 3:k.current=m(a,r)}},l=x.current.isEnter;"boolean"!=typeof n&&(n=!l),n?l||a(r?t?0:1:2):l&&a(e?o?3:4:s(u))},[w,b,r,e,t,o,C,v,u]),w]};var u=t(7084),b=t(13241),h=t(1153);let f=r=>{var e=(0,o._T)(r,[]);return a.createElement("svg",Object.assign({},e,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.createElement("path",{d:"M18.364 5.636L16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364z"}))};var x=t(26898);let k={xs:{height:"h-4",width:"w-4"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-6",width:"w-6"},xl:{height:"h-6",width:"w-6"}},C=r=>"light"!==r?{xs:{paddingX:"px-2.5",paddingY:"py-1.5",fontSize:"text-xs"},sm:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-sm"},md:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-md"},lg:{paddingX:"px-4",paddingY:"py-2.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-3",fontSize:"text-xl"}}:{xs:{paddingX:"",paddingY:"",fontSize:"text-xs"},sm:{paddingX:"",paddingY:"",fontSize:"text-sm"},md:{paddingX:"",paddingY:"",fontSize:"text-md"},lg:{paddingX:"",paddingY:"",fontSize:"text-lg"},xl:{paddingX:"",paddingY:"",fontSize:"text-xl"}},v=(r,e)=>{switch(r){case"primary":return{textColor:e?(0,h.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:e?(0,h.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:e?(0,h.bM)(e,x.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:e?(0,h.bM)(e,x.K.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:e?(0,h.bM)(e,x.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:e?(0,h.bM)(e,x.K.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:e?(0,h.bM)(e,x.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:e?(0,h.bM)(e,x.K.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,h.bM)("transparent").bgColor,hoverBgColor:e?(0,b.q)((0,h.bM)(e,x.K.background).hoverBgColor,"hover:bg-opacity-20 dark:hover:bg-opacity-20"):"hover:bg-tremor-brand-faint dark:hover:bg-dark-tremor-brand-faint",borderColor:e?(0,h.bM)(e,x.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:e?(0,h.bM)(e,x.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:e?(0,h.bM)(e,x.K.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,h.bM)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},w=(0,h.fn)("Button"),S=r=>{let{loading:e,iconSize:t,iconPosition:o,Icon:n,needMargin:l,transitionStatus:d}=r,s=l?o===u.zS.Left?(0,b.q)("-ml-1","mr-1.5"):(0,b.q)("-mr-1","ml-1.5"):"",i=(0,b.q)("w-0 h-0"),c={default:i,entering:i,entered:t,exiting:t,exited:i};return e?a.createElement(f,{className:(0,b.q)(w("icon"),"animate-spin shrink-0",s,c.default,c[d]),style:{transition:"width 150ms"}}):a.createElement(n,{className:(0,b.q)(w("icon"),"shrink-0",t,s)})},N=a.forwardRef((r,e)=>{let{icon:t,iconPosition:l=u.zS.Left,size:d=u.u8.SM,color:s,variant:i="primary",disabled:c,loading:m=!1,loadingText:g,children:f,tooltip:x,className:N}=r,M=(0,o._T)(r,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),y=m||c,q=void 0!==t||m,E=m&&g,T=!(!f&&!E),z=(0,b.q)(k[d].height,k[d].width),B="light"!==i?(0,b.q)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",_=v(i,s),K=C(i)[d],{tooltipProps:R,getReferenceProps:j}=(0,n.l)(300),[I,P]=p({timeout:50});return(0,a.useEffect)(()=>{P(m)},[m]),a.createElement("button",Object.assign({ref:(0,h.lq)([e,R.refs.setReference]),className:(0,b.q)(w("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",B,K.paddingX,K.paddingY,K.fontSize,_.textColor,_.bgColor,_.borderColor,_.hoverBorderColor,y?"opacity-50 cursor-not-allowed":(0,b.q)(v(i,s).hoverTextColor,v(i,s).hoverBgColor,v(i,s).hoverBorderColor),N),disabled:y},j,M),a.createElement(n.Z,Object.assign({text:x},R)),q&&l!==u.zS.Right?a.createElement(S,{loading:m,iconSize:z,iconPosition:l,Icon:t,transitionStatus:I.status,needMargin:T}):null,E||f?a.createElement("span",{className:(0,b.q)(w("text"),"text-tremor-default whitespace-nowrap")},E?g:f):null,q&&l===u.zS.Right?a.createElement(S,{loading:m,iconSize:z,iconPosition:l,Icon:t,transitionStatus:I.status,needMargin:T}):null)});N.displayName="Button"},12514:function(r,e,t){t.d(e,{Z:function(){return m}});var o=t(5853),n=t(2265),a=t(7084),l=t(26898),d=t(13241),s=t(1153);let i=(0,s.fn)("Card"),c=r=>{if(!r)return"";switch(r){case a.zS.Left:return"border-l-4";case a.m.Top:return"border-t-4";case a.zS.Right:return"border-r-4";case a.m.Bottom:return"border-b-4";default:return""}},m=n.forwardRef((r,e)=>{let{decoration:t="",decorationColor:a,children:m,className:g}=r,p=(0,o._T)(r,["decoration","decorationColor","children","className"]);return n.createElement("div",Object.assign({ref:e,className:(0,d.q)(i("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",a?(0,s.bM)(a,l.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",c(t),g)},p),m)});m.displayName="Card"},49804:function(r,e,t){t.d(e,{Z:function(){return i}});var o=t(5853),n=t(13241),a=t(1153),l=t(2265),d=t(9496);let s=(0,a.fn)("Col"),i=l.forwardRef((r,e)=>{let{numColSpan:t=1,numColSpanSm:a,numColSpanMd:i,numColSpanLg:c,children:m,className:g}=r,p=(0,o._T)(r,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),u=(r,e)=>r&&Object.keys(e).includes(String(r))?e[r]:"";return l.createElement("div",Object.assign({ref:e,className:(0,n.q)(s("root"),(()=>{let r=u(t,d.PT),e=u(a,d.SP),o=u(i,d.VS),l=u(c,d._w);return(0,n.q)(r,e,o,l)})(),g)},p),m)});i.displayName="Col"},67101:function(r,e,t){t.d(e,{Z:function(){return c}});var o=t(5853),n=t(13241),a=t(1153),l=t(2265),d=t(9496);let s=(0,a.fn)("Grid"),i=(r,e)=>r&&Object.keys(e).includes(String(r))?e[r]:"",c=l.forwardRef((r,e)=>{let{numItems:t=1,numItemsSm:a,numItemsMd:c,numItemsLg:m,children:g,className:p}=r,u=(0,o._T)(r,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),b=i(t,d._m),h=i(a,d.LH),f=i(c,d.l5),x=i(m,d.N4),k=(0,n.q)(b,h,f,x);return l.createElement("div",Object.assign({ref:e,className:(0,n.q)(s("root"),"grid",k,p)},u),g)});c.displayName="Grid"},9496:function(r,e,t){t.d(e,{LH:function(){return n},N4:function(){return l},PT:function(){return d},SP:function(){return s},VS:function(){return i},_m:function(){return o},_w:function(){return c},l5:function(){return a}});let o={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},n={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},a={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},l={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},d={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},s={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},i={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},c={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"}},94789:function(r,e,t){t.d(e,{Z:function(){return i}});var o=t(5853),n=t(2265),a=t(26898),l=t(13241),d=t(1153);let s=(0,d.fn)("Callout"),i=n.forwardRef((r,e)=>{let{title:t,icon:i,color:c,className:m,children:g}=r,p=(0,o._T)(r,["title","icon","color","className","children"]);return n.createElement("div",Object.assign({ref:e,className:(0,l.q)(s("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",c?(0,l.q)((0,d.bM)(c,a.K.background).bgColor,(0,d.bM)(c,a.K.darkBorder).borderColor,(0,d.bM)(c,a.K.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,l.q)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),m)},p),n.createElement("div",{className:(0,l.q)(s("header"),"flex items-start")},i?n.createElement(i,{className:(0,l.q)(s("icon"),"flex-none h-5 w-5 mr-1.5")}):null,n.createElement("h4",{className:(0,l.q)(s("title"),"font-semibold")},t)),n.createElement("p",{className:(0,l.q)(s("body"),"overflow-y-auto",g?"mt-2":"")},g))});i.displayName="Callout"},84264:function(r,e,t){t.d(e,{Z:function(){return d}});var o=t(26898),n=t(13241),a=t(1153),l=t(2265);let d=l.forwardRef((r,e)=>{let{color:t,className:d,children:s}=r;return l.createElement("p",{ref:e,className:(0,n.q)("text-tremor-default",t?(0,a.bM)(t,o.K.text).textColor:(0,n.q)("text-tremor-content","dark:text-dark-tremor-content"),d)},s)});d.displayName="Text"},96761:function(r,e,t){t.d(e,{Z:function(){return s}});var o=t(5853),n=t(26898),a=t(13241),l=t(1153),d=t(2265);let s=d.forwardRef((r,e)=>{let{color:t,children:s,className:i}=r,c=(0,o._T)(r,["color","children","className"]);return d.createElement("p",Object.assign({ref:e,className:(0,a.q)("font-medium text-tremor-title",t?(0,l.bM)(t,n.K.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",i)},c),s)});s.displayName="Title"}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5518-0926d5b7250ad191.js b/litellm/proxy/_experimental/out/_next/static/chunks/5518-0926d5b7250ad191.js
deleted file mode 100644
index da3737cbef8..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/5518-0926d5b7250ad191.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5518],{63134:function(e,t,n){n.d(t,{Z:function(){return q}});var a=n(2265),o=n(36760),c=n.n(o),i=n(31686),l=n(26365),r=n(28036),s=n(27380),d=a.createContext(null),m=a.createContext({}),u=n(11993),p=n(1119),f=n(66632),g=n(95814),v=n(18242),b=n(6989),h=n(28791),y=["prefixCls","className","containerRef"],x=function(e){var t=e.prefixCls,n=e.className,o=e.containerRef,i=(0,b.Z)(e,y),l=a.useContext(m).panel,r=(0,h.x1)(l,o);return a.createElement("div",(0,p.Z)({className:c()("".concat(t,"-content"),n),role:"dialog",ref:r},(0,v.Z)(e,{aria:!0}),{"aria-modal":"true"},i))},k=n(32559);function w(e){return"string"==typeof e&&String(Number(e))===e?((0,k.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var S={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"},C=a.forwardRef(function(e,t){var n,o,r,s=e.prefixCls,m=e.open,b=e.placement,h=e.inline,y=e.push,k=e.forceRender,C=e.autoFocus,E=e.keyboard,O=e.classNames,N=e.rootClassName,j=e.rootStyle,Z=e.zIndex,I=e.className,z=e.id,M=e.style,D=e.motion,H=e.width,P=e.height,R=e.children,B=e.mask,W=e.maskClosable,L=e.maskMotion,_=e.maskClassName,T=e.maskStyle,X=e.afterOpenChange,K=e.onClose,V=e.onMouseEnter,A=e.onMouseOver,F=e.onMouseLeave,U=e.onClick,G=e.onKeyDown,Y=e.onKeyUp,q=e.styles,J=e.drawerRender,Q=a.useRef(),$=a.useRef(),ee=a.useRef();a.useImperativeHandle(t,function(){return Q.current}),a.useEffect(function(){if(m&&C){var e;null===(e=Q.current)||void 0===e||e.focus({preventScroll:!0})}},[m]);var et=a.useState(!1),en=(0,l.Z)(et,2),ea=en[0],eo=en[1],ec=a.useContext(d),ei=null!==(n=null!==(o=null===(r="boolean"==typeof y?y?{}:{distance:0}:y||{})||void 0===r?void 0:r.distance)&&void 0!==o?o:null==ec?void 0:ec.pushDistance)&&void 0!==n?n:180,el=a.useMemo(function(){return{pushDistance:ei,push:function(){eo(!0)},pull:function(){eo(!1)}}},[ei]);a.useEffect(function(){var e,t;m?null==ec||null===(e=ec.push)||void 0===e||e.call(ec):null==ec||null===(t=ec.pull)||void 0===t||t.call(ec)},[m]),a.useEffect(function(){return function(){var e;null==ec||null===(e=ec.pull)||void 0===e||e.call(ec)}},[]);var er=a.createElement(f.ZP,(0,p.Z)({key:"mask"},L,{visible:B&&m}),function(e,t){var n=e.className,o=e.style;return a.createElement("div",{className:c()("".concat(s,"-mask"),n,null==O?void 0:O.mask,_),style:(0,i.Z)((0,i.Z)((0,i.Z)({},o),T),null==q?void 0:q.mask),onClick:W&&m?K:void 0,ref:t})}),es="function"==typeof D?D(b):D,ed={};if(ea&&ei)switch(b){case"top":ed.transform="translateY(".concat(ei,"px)");break;case"bottom":ed.transform="translateY(".concat(-ei,"px)");break;case"left":ed.transform="translateX(".concat(ei,"px)");break;default:ed.transform="translateX(".concat(-ei,"px)")}"left"===b||"right"===b?ed.width=w(H):ed.height=w(P);var em={onMouseEnter:V,onMouseOver:A,onMouseLeave:F,onClick:U,onKeyDown:G,onKeyUp:Y},eu=a.createElement(f.ZP,(0,p.Z)({key:"panel"},es,{visible:m,forceRender:k,onVisibleChanged:function(e){null==X||X(e)},removeOnLeave:!1,leavedClassName:"".concat(s,"-content-wrapper-hidden")}),function(t,n){var o=t.className,l=t.style,r=a.createElement(x,(0,p.Z)({id:z,containerRef:n,prefixCls:s,className:c()(I,null==O?void 0:O.content),style:(0,i.Z)((0,i.Z)({},M),null==q?void 0:q.content)},(0,v.Z)(e,{aria:!0}),em),R);return a.createElement("div",(0,p.Z)({className:c()("".concat(s,"-content-wrapper"),null==O?void 0:O.wrapper,o),style:(0,i.Z)((0,i.Z)((0,i.Z)({},ed),l),null==q?void 0:q.wrapper)},(0,v.Z)(e,{data:!0})),J?J(r):r)}),ep=(0,i.Z)({},j);return Z&&(ep.zIndex=Z),a.createElement(d.Provider,{value:el},a.createElement("div",{className:c()(s,"".concat(s,"-").concat(b),N,(0,u.Z)((0,u.Z)({},"".concat(s,"-open"),m),"".concat(s,"-inline"),h)),style:ep,tabIndex:-1,ref:Q,onKeyDown:function(e){var t,n,a=e.keyCode,o=e.shiftKey;switch(a){case g.Z.TAB:a===g.Z.TAB&&(o||document.activeElement!==ee.current?o&&document.activeElement===$.current&&(null===(n=ee.current)||void 0===n||n.focus({preventScroll:!0})):null===(t=$.current)||void 0===t||t.focus({preventScroll:!0}));break;case g.Z.ESC:K&&E&&(e.stopPropagation(),K(e))}}},er,a.createElement("div",{tabIndex:0,ref:$,style:S,"aria-hidden":"true","data-sentinel":"start"}),eu,a.createElement("div",{tabIndex:0,ref:ee,style:S,"aria-hidden":"true","data-sentinel":"end"})))}),E=function(e){var t=e.open,n=e.prefixCls,o=e.placement,c=e.autoFocus,d=e.keyboard,u=e.width,p=e.mask,f=void 0===p||p,g=e.maskClosable,v=e.getContainer,b=e.forceRender,h=e.afterOpenChange,y=e.destroyOnClose,x=e.onMouseEnter,k=e.onMouseOver,w=e.onMouseLeave,S=e.onClick,E=e.onKeyDown,O=e.onKeyUp,N=e.panelRef,j=a.useState(!1),Z=(0,l.Z)(j,2),I=Z[0],z=Z[1],M=a.useState(!1),D=(0,l.Z)(M,2),H=D[0],P=D[1];(0,s.Z)(function(){P(!0)},[]);var R=!!H&&void 0!==t&&t,B=a.useRef(),W=a.useRef();(0,s.Z)(function(){R&&(W.current=document.activeElement)},[R]);var L=a.useMemo(function(){return{panel:N}},[N]);if(!b&&!I&&!R&&y)return null;var _=(0,i.Z)((0,i.Z)({},e),{},{open:R,prefixCls:void 0===n?"rc-drawer":n,placement:void 0===o?"right":o,autoFocus:void 0===c||c,keyboard:void 0===d||d,width:void 0===u?378:u,mask:f,maskClosable:void 0===g||g,inline:!1===v,afterOpenChange:function(e){var t,n;z(e),null==h||h(e),e||!W.current||null!==(t=B.current)&&void 0!==t&&t.contains(W.current)||null===(n=W.current)||void 0===n||n.focus({preventScroll:!0})},ref:B},{onMouseEnter:x,onMouseOver:k,onMouseLeave:w,onClick:S,onKeyDown:E,onKeyUp:O});return a.createElement(m.Provider,{value:L},a.createElement(r.Z,{open:R||b||I,autoDestroy:!1,getContainer:v,autoLock:f&&(R||I)},a.createElement(C,_)))},O=n(92491),N=n(391),j=n(62236),Z=n(68710),I=n(95140),z=n(71744),M=n(19248),D=n(53445),H=n(50337),P=e=>{var t,n,o,i,l,r;let s;let{prefixCls:d,ariaId:m,title:u,footer:p,extra:f,closable:g,loading:v,onClose:b,headerStyle:h,bodyStyle:y,footerStyle:x,children:k,classNames:w,styles:S}=e,C=(0,z.dj)("drawer");s=!1===g?void 0:void 0===g||!0===g?"start":(null==g?void 0:g.placement)==="end"?"end":"start";let E=a.useCallback(e=>a.createElement("button",{type:"button",onClick:b,className:c()("".concat(d,"-close"),{["".concat(d,"-close-").concat(s)]:"end"===s})},e),[b,d,s]),[O,N]=(0,D.b)((0,D.w)(e),(0,D.w)(C),{closable:!0,closeIconRender:E});return a.createElement(a.Fragment,null,u||O?a.createElement("div",{style:Object.assign(Object.assign(Object.assign({},null===(o=C.styles)||void 0===o?void 0:o.header),h),null==S?void 0:S.header),className:c()("".concat(d,"-header"),{["".concat(d,"-header-close-only")]:O&&!u&&!f},null===(i=C.classNames)||void 0===i?void 0:i.header,null==w?void 0:w.header)},a.createElement("div",{className:"".concat(d,"-header-title")},"start"===s&&N,u&&a.createElement("div",{className:"".concat(d,"-title"),id:m},u)),f&&a.createElement("div",{className:"".concat(d,"-extra")},f),"end"===s&&N):null,a.createElement("div",{className:c()("".concat(d,"-body"),null==w?void 0:w.body,null===(t=C.classNames)||void 0===t?void 0:t.body),style:Object.assign(Object.assign(Object.assign({},null===(n=C.styles)||void 0===n?void 0:n.body),y),null==S?void 0:S.body)},v?a.createElement(H.Z,{active:!0,title:!1,paragraph:{rows:5},className:"".concat(d,"-body-skeleton")}):k),p?a.createElement("div",{className:c()("".concat(d,"-footer"),null===(l=C.classNames)||void 0===l?void 0:l.footer,null==w?void 0:w.footer),style:Object.assign(Object.assign(Object.assign({},null===(r=C.styles)||void 0===r?void 0:r.footer),x),null==S?void 0:S.footer)},p):null)},R=n(93463),B=n(12918),W=n(99320),L=n(71140);let _=e=>{let t="100%";return({left:"translateX(-".concat(t,")"),right:"translateX(".concat(t,")"),top:"translateY(-".concat(t,")"),bottom:"translateY(".concat(t,")")})[e]},T=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),X=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:"all ".concat(t)}}},T({opacity:e},{opacity:1})),K=(e,t)=>[X(.7,t),T({transform:_(e)},{transform:"none"})];var V=e=>{let{componentCls:t,motionDurationSlow:n}=e;return{[t]:{["".concat(t,"-mask-motion")]:X(0,n),["".concat(t,"-panel-motion")]:["left","right","top","bottom"].reduce((e,t)=>Object.assign(Object.assign({},e),{["&-".concat(t)]:K(t,n)}),{})}}};let A=e=>{let{borderRadiusSM:t,componentCls:n,zIndexPopup:a,colorBgMask:o,colorBgElevated:c,motionDurationSlow:i,motionDurationMid:l,paddingXS:r,padding:s,paddingLG:d,fontSizeLG:m,lineHeightLG:u,lineWidth:p,lineType:f,colorSplit:g,marginXS:v,colorIcon:b,colorIconHover:h,colorBgTextHover:y,colorBgTextActive:x,colorText:k,fontWeightStrong:w,footerPaddingBlock:S,footerPaddingInline:C,calc:E}=e,O="".concat(n,"-content-wrapper");return{[n]:{position:"fixed",inset:0,zIndex:a,pointerEvents:"none",color:k,"&-pure":{position:"relative",background:c,display:"flex",flexDirection:"column",["&".concat(n,"-left")]:{boxShadow:e.boxShadowDrawerLeft},["&".concat(n,"-right")]:{boxShadow:e.boxShadowDrawerRight},["&".concat(n,"-top")]:{boxShadow:e.boxShadowDrawerUp},["&".concat(n,"-bottom")]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},["".concat(n,"-mask")]:{position:"absolute",inset:0,zIndex:a,background:o,pointerEvents:"auto"},[O]:{position:"absolute",zIndex:a,maxWidth:"100vw",transition:"all ".concat(i),"&-hidden":{display:"none"}},["&-left > ".concat(O)]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},["&-right > ".concat(O)]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},["&-top > ".concat(O)]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},["&-bottom > ".concat(O)]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},["".concat(n,"-content")]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:c,pointerEvents:"auto"},["".concat(n,"-header")]:{display:"flex",flex:0,alignItems:"center",padding:"".concat((0,R.bf)(s)," ").concat((0,R.bf)(d)),fontSize:m,lineHeight:u,borderBottom:"".concat((0,R.bf)(p)," ").concat(f," ").concat(g),"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},["".concat(n,"-extra")]:{flex:"none"},["".concat(n,"-close")]:Object.assign({display:"inline-flex",width:E(m).add(r).equal(),height:E(m).add(r).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:b,fontWeight:w,fontSize:m,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:"all ".concat(l),textRendering:"auto",["&".concat(n,"-close-end")]:{marginInlineStart:v},["&:not(".concat(n,"-close-end)")]:{marginInlineEnd:v},"&:hover":{color:h,backgroundColor:y,textDecoration:"none"},"&:active":{backgroundColor:x}},(0,B.Qy)(e)),["".concat(n,"-title")]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:m,lineHeight:u},["".concat(n,"-body")]:{flex:1,minWidth:0,minHeight:0,padding:d,overflow:"auto",["".concat(n,"-body-skeleton")]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},["".concat(n,"-footer")]:{flexShrink:0,padding:"".concat((0,R.bf)(S)," ").concat((0,R.bf)(C)),borderTop:"".concat((0,R.bf)(p)," ").concat(f," ").concat(g)},"&-rtl":{direction:"rtl"}}}};var F=(0,W.I$)("Drawer",e=>{let t=(0,L.IX)(e,{});return[A(t),V(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding})),U=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(e);ot.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};let G={distance:180},Y=e=>{let{rootClassName:t,width:n,height:o,size:i="default",mask:l=!0,push:r=G,open:s,afterOpenChange:d,onClose:m,prefixCls:u,getContainer:p,panelRef:f=null,style:g,className:v,"aria-labelledby":b,visible:y,afterVisibleChange:x,maskStyle:k,drawerStyle:w,contentWrapperStyle:S,destroyOnClose:C,destroyOnHidden:D}=e,H=U(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),R=(0,O.Z)(),B=H.title?R:void 0,{getPopupContainer:W,getPrefixCls:L,direction:_,className:T,style:X,classNames:K,styles:V}=(0,z.dj)("drawer"),A=L("drawer",u),[Y,q,J]=F(A),Q=c()({"no-mask":!l,["".concat(A,"-rtl")]:"rtl"===_},t,q,J),$=a.useMemo(()=>null!=n?n:"large"===i?736:378,[n,i]),ee=a.useMemo(()=>null!=o?o:"large"===i?736:378,[o,i]),et={motionName:(0,Z.m)(A,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},en=(0,M.H)(),ea=(0,h.sQ)(f,en),[eo,ec]=(0,j.Cn)("Drawer",H.zIndex),{classNames:ei={},styles:el={}}=H;return Y(a.createElement(N.Z,{form:!0,space:!0},a.createElement(I.Z.Provider,{value:ec},a.createElement(E,Object.assign({prefixCls:A,onClose:m,maskMotion:et,motion:e=>({motionName:(0,Z.m)(A,"panel-motion-".concat(e)),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500})},H,{classNames:{mask:c()(ei.mask,K.mask),content:c()(ei.content,K.content),wrapper:c()(ei.wrapper,K.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},el.mask),k),V.mask),content:Object.assign(Object.assign(Object.assign({},el.content),w),V.content),wrapper:Object.assign(Object.assign(Object.assign({},el.wrapper),S),V.wrapper)},open:null!=s?s:y,mask:l,push:r,width:$,height:ee,style:Object.assign(Object.assign({},X),g),className:c()(T,v),rootClassName:Q,getContainer:void 0===p&&W?()=>W(document.body):p,afterOpenChange:null!=d?d:x,panelRef:ea,zIndex:eo,"aria-labelledby":null!=b?b:B,destroyOnClose:null!=D?D:C}),a.createElement(P,Object.assign({prefixCls:A},H,{ariaId:B,onClose:m}))))))};Y._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,style:n,className:o,placement:i="right"}=e,l=U(e,["prefixCls","style","className","placement"]),{getPrefixCls:r}=a.useContext(z.E_),s=r("drawer",t),[d,m,u]=F(s),p=c()(s,"".concat(s,"-pure"),"".concat(s,"-").concat(i),m,u,o);return d(a.createElement("div",{className:p,style:n},a.createElement(P,Object.assign({prefixCls:s},l))))};var q=Y},35631:function(e,t,n){n.d(t,{Z:function(){return z}});var a=n(83145),o=n(2265),c=n(36760),i=n.n(c),l=n(53253),r=n(6543),s=n(71744),d=n(91086),m=n(33759),u=n(77774),p=n(28617),f=n(40049),g=n(10353);let v=o.createContext({});v.Consumer;var b=n(19722),h=n(54998),y=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(e);ot.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};let x=o.forwardRef((e,t)=>{let n;let{prefixCls:a,children:c,actions:l,extra:r,styles:d,className:m,classNames:u,colStyle:p}=e,f=y(e,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:g,itemLayout:x}=(0,o.useContext)(v),{getPrefixCls:k,list:w}=(0,o.useContext)(s.E_),S=e=>{var t,n;return i()(null===(n=null===(t=null==w?void 0:w.item)||void 0===t?void 0:t.classNames)||void 0===n?void 0:n[e],null==u?void 0:u[e])},C=e=>{var t,n;return Object.assign(Object.assign({},null===(n=null===(t=null==w?void 0:w.item)||void 0===t?void 0:t.styles)||void 0===n?void 0:n[e]),null==d?void 0:d[e])},E=k("list",a),O=l&&l.length>0&&o.createElement("ul",{className:i()("".concat(E,"-item-action"),S("actions")),key:"actions",style:C("actions")},l.map((e,t)=>o.createElement("li",{key:"".concat(E,"-item-action-").concat(t)},e,t!==l.length-1&&o.createElement("em",{className:"".concat(E,"-item-action-split")})))),N=o.createElement(g?"div":"li",Object.assign({},f,g?{}:{ref:t},{className:i()("".concat(E,"-item"),{["".concat(E,"-item-no-flex")]:!("vertical"===x?!!r:(n=!1,o.Children.forEach(c,e=>{"string"==typeof e&&(n=!0)}),!(n&&o.Children.count(c)>1)))},m)}),"vertical"===x&&r?[o.createElement("div",{className:"".concat(E,"-item-main"),key:"content"},c,O),o.createElement("div",{className:i()("".concat(E,"-item-extra"),S("extra")),key:"extra",style:C("extra")},r)]:[c,O,(0,b.Tm)(r,{key:"extra"})]);return g?o.createElement(h.Z,{ref:t,flex:1,style:p},N):N});x.Meta=e=>{var{prefixCls:t,className:n,avatar:a,title:c,description:l}=e,r=y(e,["prefixCls","className","avatar","title","description"]);let{getPrefixCls:d}=(0,o.useContext)(s.E_),m=d("list",t),u=i()("".concat(m,"-item-meta"),n),p=o.createElement("div",{className:"".concat(m,"-item-meta-content")},c&&o.createElement("h4",{className:"".concat(m,"-item-meta-title")},c),l&&o.createElement("div",{className:"".concat(m,"-item-meta-description")},l));return o.createElement("div",Object.assign({},r,{className:u}),a&&o.createElement("div",{className:"".concat(m,"-item-meta-avatar")},a),(c||l)&&p)};var k=n(93463),w=n(12918),S=n(99320),C=n(71140);let E=e=>{let{listBorderedCls:t,componentCls:n,paddingLG:a,margin:o,itemPaddingSM:c,itemPaddingLG:i,marginLG:l,borderRadiusLG:r}=e,s=(0,k.bf)(e.calc(r).sub(e.lineWidth).equal());return{[t]:{border:"".concat((0,k.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:r,["".concat(n,"-header")]:{borderRadius:"".concat(s," ").concat(s," 0 0")},["".concat(n,"-footer")]:{borderRadius:"0 0 ".concat(s," ").concat(s)},["".concat(n,"-header,").concat(n,"-footer,").concat(n,"-item")]:{paddingInline:a},["".concat(n,"-pagination")]:{margin:"".concat((0,k.bf)(o)," ").concat((0,k.bf)(l))}},["".concat(t).concat(n,"-sm")]:{["".concat(n,"-item,").concat(n,"-header,").concat(n,"-footer")]:{padding:c}},["".concat(t).concat(n,"-lg")]:{["".concat(n,"-item,").concat(n,"-header,").concat(n,"-footer")]:{padding:i}}}},O=e=>{let{componentCls:t,screenSM:n,screenMD:a,marginLG:o,marginSM:c,margin:i}=e;return{["@media screen and (max-width:".concat(a,"px)")]:{[t]:{["".concat(t,"-item")]:{["".concat(t,"-item-action")]:{marginInlineStart:o}}},["".concat(t,"-vertical")]:{["".concat(t,"-item")]:{["".concat(t,"-item-extra")]:{marginInlineStart:o}}}},["@media screen and (max-width: ".concat(n,"px)")]:{[t]:{["".concat(t,"-item")]:{flexWrap:"wrap",["".concat(t,"-action")]:{marginInlineStart:c}}},["".concat(t,"-vertical")]:{["".concat(t,"-item")]:{flexWrap:"wrap-reverse",["".concat(t,"-item-main")]:{minWidth:e.contentWidth},["".concat(t,"-item-extra")]:{margin:"auto auto ".concat((0,k.bf)(i))}}}}}},N=e=>{let{componentCls:t,antCls:n,controlHeight:a,minHeight:o,paddingSM:c,marginLG:i,padding:l,itemPadding:r,colorPrimary:s,itemPaddingSM:d,itemPaddingLG:m,paddingXS:u,margin:p,colorText:f,colorTextDescription:g,motionDurationSlow:v,lineWidth:b,headerBg:h,footerBg:y,emptyTextPadding:x,metaMarginBottom:S,avatarMarginRight:C,titleMarginBottom:E,descriptionFontSize:O}=e;return{[t]:Object.assign(Object.assign({},(0,w.Wf)(e)),{position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},["".concat(t,"-header")]:{background:h},["".concat(t,"-footer")]:{background:y},["".concat(t,"-header, ").concat(t,"-footer")]:{paddingBlock:c},["".concat(t,"-pagination")]:{marginBlockStart:i,["".concat(n,"-pagination-options")]:{textAlign:"start"}},["".concat(t,"-spin")]:{minHeight:o,textAlign:"center"},["".concat(t,"-items")]:{margin:0,padding:0,listStyle:"none"},["".concat(t,"-item")]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:r,color:f,["".concat(t,"-item-meta")]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",["".concat(t,"-item-meta-avatar")]:{marginInlineEnd:C},["".concat(t,"-item-meta-content")]:{flex:"1 0",width:0,color:f},["".concat(t,"-item-meta-title")]:{margin:"0 0 ".concat((0,k.bf)(e.marginXXS)," 0"),color:f,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:f,transition:"all ".concat(v),"&:hover":{color:s}}},["".concat(t,"-item-meta-description")]:{color:g,fontSize:O,lineHeight:e.lineHeight}},["".concat(t,"-item-action")]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:"0 ".concat((0,k.bf)(u)),color:g,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},["".concat(t,"-item-action-split")]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:b,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},["".concat(t,"-empty")]:{padding:"".concat((0,k.bf)(l)," 0"),color:g,fontSize:e.fontSizeSM,textAlign:"center"},["".concat(t,"-empty-text")]:{padding:x,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},["".concat(t,"-item-no-flex")]:{display:"block"}}),["".concat(t,"-grid ").concat(n,"-col > ").concat(t,"-item")]:{display:"block",maxWidth:"100%",marginBlockEnd:p,paddingBlock:0,borderBlockEnd:"none"},["".concat(t,"-vertical ").concat(t,"-item")]:{alignItems:"initial",["".concat(t,"-item-main")]:{display:"block",flex:1},["".concat(t,"-item-extra")]:{marginInlineStart:i},["".concat(t,"-item-meta")]:{marginBlockEnd:S,["".concat(t,"-item-meta-title")]:{marginBlockStart:0,marginBlockEnd:E,color:f,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},["".concat(t,"-item-action")]:{marginBlockStart:l,marginInlineStart:"auto","> li":{padding:"0 ".concat((0,k.bf)(l)),"&:first-child":{paddingInlineStart:0}}}},["".concat(t,"-split ").concat(t,"-item")]:{borderBlockEnd:"".concat((0,k.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit),"&:last-child":{borderBlockEnd:"none"}},["".concat(t,"-split ").concat(t,"-header")]:{borderBlockEnd:"".concat((0,k.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)},["".concat(t,"-split").concat(t,"-empty ").concat(t,"-footer")]:{borderTop:"".concat((0,k.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)},["".concat(t,"-loading ").concat(t,"-spin-nested-loading")]:{minHeight:a},["".concat(t,"-split").concat(t,"-something-after-last-item ").concat(n,"-spin-container > ").concat(t,"-items > ").concat(t,"-item:last-child")]:{borderBlockEnd:"".concat((0,k.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)},["".concat(t,"-lg ").concat(t,"-item")]:{padding:m},["".concat(t,"-sm ").concat(t,"-item")]:{padding:d},["".concat(t,":not(").concat(t,"-vertical)")]:{["".concat(t,"-item-no-flex")]:{["".concat(t,"-item-action")]:{float:"right"}}}}};var j=(0,S.I$)("List",e=>{let t=(0,C.IX)(e,{listBorderedCls:"".concat(e.componentCls,"-bordered"),minHeight:e.controlHeightLG});return[N(t),E(t),O(t)]},e=>({contentWidth:220,itemPadding:"".concat((0,k.bf)(e.paddingContentVertical)," 0"),itemPaddingSM:"".concat((0,k.bf)(e.paddingContentVerticalSM)," ").concat((0,k.bf)(e.paddingContentHorizontal)),itemPaddingLG:"".concat((0,k.bf)(e.paddingContentVerticalLG)," ").concat((0,k.bf)(e.paddingContentHorizontalLG)),headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize})),Z=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(e);ot.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};let I=o.forwardRef(function(e,t){let{pagination:n=!1,prefixCls:c,bordered:b=!1,split:h=!0,className:y,rootClassName:x,style:k,children:w,itemLayout:S,loadMore:C,grid:E,dataSource:O=[],size:N,header:I,footer:z,loading:M=!1,rowKey:D,renderItem:H,locale:P}=e,R=Z(e,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),B=n&&"object"==typeof n?n:{},[W,L]=o.useState(B.defaultCurrent||1),[_,T]=o.useState(B.defaultPageSize||10),{getPrefixCls:X,direction:K,className:V,style:A}=(0,s.dj)("list"),{renderEmpty:F}=o.useContext(s.E_),U=e=>(t,a)=>{var o;L(t),T(a),n&&(null===(o=null==n?void 0:n[e])||void 0===o||o.call(n,t,a))},G=U("onChange"),Y=U("onShowSizeChange"),q=!!(C||n||z),J=X("list",c),[Q,$,ee]=j(J),et=M;"boolean"==typeof et&&(et={spinning:et});let en=!!(null==et?void 0:et.spinning),ea=(0,m.Z)(N),eo="";switch(ea){case"large":eo="lg";break;case"small":eo="sm"}let ec=i()(J,{["".concat(J,"-vertical")]:"vertical"===S,["".concat(J,"-").concat(eo)]:eo,["".concat(J,"-split")]:h,["".concat(J,"-bordered")]:b,["".concat(J,"-loading")]:en,["".concat(J,"-grid")]:!!E,["".concat(J,"-something-after-last-item")]:q,["".concat(J,"-rtl")]:"rtl"===K},V,y,x,$,ee),ei=(0,l.Z)({current:1,total:0,position:"bottom"},{total:O.length,current:W,pageSize:_},n||{}),el=Math.ceil(ei.total/ei.pageSize);ei.current=Math.min(ei.current,el);let er=n&&o.createElement("div",{className:i()("".concat(J,"-pagination"))},o.createElement(f.Z,Object.assign({align:"end"},ei,{onChange:G,onShowSizeChange:Y}))),es=(0,a.Z)(O);n&&O.length>(ei.current-1)*ei.pageSize&&(es=(0,a.Z)(O).splice((ei.current-1)*ei.pageSize,ei.pageSize));let ed=Object.keys(E||{}).some(e=>["xs","sm","md","lg","xl","xxl"].includes(e)),em=(0,p.Z)(ed),eu=o.useMemo(()=>{for(let e=0;e{if(!E)return;let e=eu&&E[eu]?E[eu]:E.column;if(e)return{width:"".concat(100/e,"%"),maxWidth:"".concat(100/e,"%")}},[JSON.stringify(E),eu]),ef=en&&o.createElement("div",{style:{minHeight:53}});if(es.length>0){let e=es.map((e,t)=>{let n;return H?((n="function"==typeof D?D(e):D?e[D]:e.key)||(n="list-item-".concat(t)),o.createElement(o.Fragment,{key:n},H(e,t))):null});ef=E?o.createElement(u.Z,{gutter:E.gutter},o.Children.map(e,e=>o.createElement("div",{key:null==e?void 0:e.key,style:ep},e))):o.createElement("ul",{className:"".concat(J,"-items")},e)}else w||en||(ef=o.createElement("div",{className:"".concat(J,"-empty-text")},(null==P?void 0:P.emptyText)||(null==F?void 0:F("List"))||o.createElement(d.Z,{componentName:"List"})));let eg=ei.position,ev=o.useMemo(()=>({grid:E,itemLayout:S}),[JSON.stringify(E),S]);return Q(o.createElement(v.Provider,{value:ev},o.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},A),k),className:ec},R),("top"===eg||"both"===eg)&&er,I&&o.createElement("div",{className:"".concat(J,"-header")},I),o.createElement(g.Z,Object.assign({},et),ef,w),z&&o.createElement("div",{className:"".concat(J,"-footer")},z),C||("bottom"===eg||"both"===eg)&&er)))});I.Item=x;var z=I},32660:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(79205).Z)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},91723:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(79205).Z)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},41905:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(79205).Z)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]])},83229:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(79205).Z)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},98728:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(79205).Z)("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},27413:function(e,t,n){n.d(t,{Z:function(){return a}});let a=(0,n(79205).Z)("trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]])}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5631-586d726ad939cea0.js b/litellm/proxy/_experimental/out/_next/static/chunks/5631-586d726ad939cea0.js
new file mode 100644
index 00000000000..38c1cd65550
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/5631-586d726ad939cea0.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5631],{35631:function(t,e,n){n.d(e,{Z:function(){return I}});var a=n(83145),c=n(2265),o=n(36760),i=n.n(o),l=n(53253),r=n(6543),s=n(71744),d=n(91086),m=n(33759),g=n(77774),p=n(28617),f=n(40049),u=n(10353);let h=c.createContext({});h.Consumer;var b=n(19722),y=n(54998),v=function(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&0>e.indexOf(a)&&(n[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,a=Object.getOwnPropertySymbols(t);ce.indexOf(a[c])&&Object.prototype.propertyIsEnumerable.call(t,a[c])&&(n[a[c]]=t[a[c]]);return n};let S=c.forwardRef((t,e)=>{let n;let{prefixCls:a,children:o,actions:l,extra:r,styles:d,className:m,classNames:g,colStyle:p}=t,f=v(t,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:u,itemLayout:S}=(0,c.useContext)(h),{getPrefixCls:x,list:E}=(0,c.useContext)(s.E_),k=t=>{var e,n;return i()(null===(n=null===(e=null==E?void 0:E.item)||void 0===e?void 0:e.classNames)||void 0===n?void 0:n[t],null==g?void 0:g[t])},C=t=>{var e,n;return Object.assign(Object.assign({},null===(n=null===(e=null==E?void 0:E.item)||void 0===e?void 0:e.styles)||void 0===n?void 0:n[t]),null==d?void 0:d[t])},O=x("list",a),N=l&&l.length>0&&c.createElement("ul",{className:i()("".concat(O,"-item-action"),k("actions")),key:"actions",style:C("actions")},l.map((t,e)=>c.createElement("li",{key:"".concat(O,"-item-action-").concat(e)},t,e!==l.length-1&&c.createElement("em",{className:"".concat(O,"-item-action-split")})))),z=c.createElement(u?"div":"li",Object.assign({},f,u?{}:{ref:e},{className:i()("".concat(O,"-item"),{["".concat(O,"-item-no-flex")]:!("vertical"===S?!!r:(n=!1,c.Children.forEach(o,t=>{"string"==typeof t&&(n=!0)}),!(n&&c.Children.count(o)>1)))},m)}),"vertical"===S&&r?[c.createElement("div",{className:"".concat(O,"-item-main"),key:"content"},o,N),c.createElement("div",{className:i()("".concat(O,"-item-extra"),k("extra")),key:"extra",style:C("extra")},r)]:[o,N,(0,b.Tm)(r,{key:"extra"})]);return u?c.createElement(y.Z,{ref:e,flex:1,style:p},z):z});S.Meta=t=>{var{prefixCls:e,className:n,avatar:a,title:o,description:l}=t,r=v(t,["prefixCls","className","avatar","title","description"]);let{getPrefixCls:d}=(0,c.useContext)(s.E_),m=d("list",e),g=i()("".concat(m,"-item-meta"),n),p=c.createElement("div",{className:"".concat(m,"-item-meta-content")},o&&c.createElement("h4",{className:"".concat(m,"-item-meta-title")},o),l&&c.createElement("div",{className:"".concat(m,"-item-meta-description")},l));return c.createElement("div",Object.assign({},r,{className:g}),a&&c.createElement("div",{className:"".concat(m,"-item-meta-avatar")},a),(o||l)&&p)};var x=n(93463),E=n(12918),k=n(99320),C=n(71140);let O=t=>{let{listBorderedCls:e,componentCls:n,paddingLG:a,margin:c,itemPaddingSM:o,itemPaddingLG:i,marginLG:l,borderRadiusLG:r}=t,s=(0,x.bf)(t.calc(r).sub(t.lineWidth).equal());return{[e]:{border:"".concat((0,x.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorBorder),borderRadius:r,["".concat(n,"-header")]:{borderRadius:"".concat(s," ").concat(s," 0 0")},["".concat(n,"-footer")]:{borderRadius:"0 0 ".concat(s," ").concat(s)},["".concat(n,"-header,").concat(n,"-footer,").concat(n,"-item")]:{paddingInline:a},["".concat(n,"-pagination")]:{margin:"".concat((0,x.bf)(c)," ").concat((0,x.bf)(l))}},["".concat(e).concat(n,"-sm")]:{["".concat(n,"-item,").concat(n,"-header,").concat(n,"-footer")]:{padding:o}},["".concat(e).concat(n,"-lg")]:{["".concat(n,"-item,").concat(n,"-header,").concat(n,"-footer")]:{padding:i}}}},N=t=>{let{componentCls:e,screenSM:n,screenMD:a,marginLG:c,marginSM:o,margin:i}=t;return{["@media screen and (max-width:".concat(a,"px)")]:{[e]:{["".concat(e,"-item")]:{["".concat(e,"-item-action")]:{marginInlineStart:c}}},["".concat(e,"-vertical")]:{["".concat(e,"-item")]:{["".concat(e,"-item-extra")]:{marginInlineStart:c}}}},["@media screen and (max-width: ".concat(n,"px)")]:{[e]:{["".concat(e,"-item")]:{flexWrap:"wrap",["".concat(e,"-action")]:{marginInlineStart:o}}},["".concat(e,"-vertical")]:{["".concat(e,"-item")]:{flexWrap:"wrap-reverse",["".concat(e,"-item-main")]:{minWidth:t.contentWidth},["".concat(e,"-item-extra")]:{margin:"auto auto ".concat((0,x.bf)(i))}}}}}},z=t=>{let{componentCls:e,antCls:n,controlHeight:a,minHeight:c,paddingSM:o,marginLG:i,padding:l,itemPadding:r,colorPrimary:s,itemPaddingSM:d,itemPaddingLG:m,paddingXS:g,margin:p,colorText:f,colorTextDescription:u,motionDurationSlow:h,lineWidth:b,headerBg:y,footerBg:v,emptyTextPadding:S,metaMarginBottom:k,avatarMarginRight:C,titleMarginBottom:O,descriptionFontSize:N}=t;return{[e]:Object.assign(Object.assign({},(0,E.Wf)(t)),{position:"relative","--rc-virtual-list-scrollbar-bg":t.colorSplit,"*":{outline:"none"},["".concat(e,"-header")]:{background:y},["".concat(e,"-footer")]:{background:v},["".concat(e,"-header, ").concat(e,"-footer")]:{paddingBlock:o},["".concat(e,"-pagination")]:{marginBlockStart:i,["".concat(n,"-pagination-options")]:{textAlign:"start"}},["".concat(e,"-spin")]:{minHeight:c,textAlign:"center"},["".concat(e,"-items")]:{margin:0,padding:0,listStyle:"none"},["".concat(e,"-item")]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:r,color:f,["".concat(e,"-item-meta")]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",["".concat(e,"-item-meta-avatar")]:{marginInlineEnd:C},["".concat(e,"-item-meta-content")]:{flex:"1 0",width:0,color:f},["".concat(e,"-item-meta-title")]:{margin:"0 0 ".concat((0,x.bf)(t.marginXXS)," 0"),color:f,fontSize:t.fontSize,lineHeight:t.lineHeight,"> a":{color:f,transition:"all ".concat(h),"&:hover":{color:s}}},["".concat(e,"-item-meta-description")]:{color:u,fontSize:N,lineHeight:t.lineHeight}},["".concat(e,"-item-action")]:{flex:"0 0 auto",marginInlineStart:t.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:"0 ".concat((0,x.bf)(g)),color:u,fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},["".concat(e,"-item-action-split")]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:b,height:t.calc(t.fontHeight).sub(t.calc(t.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:t.colorSplit}}},["".concat(e,"-empty")]:{padding:"".concat((0,x.bf)(l)," 0"),color:u,fontSize:t.fontSizeSM,textAlign:"center"},["".concat(e,"-empty-text")]:{padding:S,color:t.colorTextDisabled,fontSize:t.fontSize,textAlign:"center"},["".concat(e,"-item-no-flex")]:{display:"block"}}),["".concat(e,"-grid ").concat(n,"-col > ").concat(e,"-item")]:{display:"block",maxWidth:"100%",marginBlockEnd:p,paddingBlock:0,borderBlockEnd:"none"},["".concat(e,"-vertical ").concat(e,"-item")]:{alignItems:"initial",["".concat(e,"-item-main")]:{display:"block",flex:1},["".concat(e,"-item-extra")]:{marginInlineStart:i},["".concat(e,"-item-meta")]:{marginBlockEnd:k,["".concat(e,"-item-meta-title")]:{marginBlockStart:0,marginBlockEnd:O,color:f,fontSize:t.fontSizeLG,lineHeight:t.lineHeightLG}},["".concat(e,"-item-action")]:{marginBlockStart:l,marginInlineStart:"auto","> li":{padding:"0 ".concat((0,x.bf)(l)),"&:first-child":{paddingInlineStart:0}}}},["".concat(e,"-split ").concat(e,"-item")]:{borderBlockEnd:"".concat((0,x.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorSplit),"&:last-child":{borderBlockEnd:"none"}},["".concat(e,"-split ").concat(e,"-header")]:{borderBlockEnd:"".concat((0,x.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorSplit)},["".concat(e,"-split").concat(e,"-empty ").concat(e,"-footer")]:{borderTop:"".concat((0,x.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorSplit)},["".concat(e,"-loading ").concat(e,"-spin-nested-loading")]:{minHeight:a},["".concat(e,"-split").concat(e,"-something-after-last-item ").concat(n,"-spin-container > ").concat(e,"-items > ").concat(e,"-item:last-child")]:{borderBlockEnd:"".concat((0,x.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorSplit)},["".concat(e,"-lg ").concat(e,"-item")]:{padding:m},["".concat(e,"-sm ").concat(e,"-item")]:{padding:d},["".concat(e,":not(").concat(e,"-vertical)")]:{["".concat(e,"-item-no-flex")]:{["".concat(e,"-item-action")]:{float:"right"}}}}};var j=(0,k.I$)("List",t=>{let e=(0,C.IX)(t,{listBorderedCls:"".concat(t.componentCls,"-bordered"),minHeight:t.controlHeightLG});return[z(e),O(e),N(e)]},t=>({contentWidth:220,itemPadding:"".concat((0,x.bf)(t.paddingContentVertical)," 0"),itemPaddingSM:"".concat((0,x.bf)(t.paddingContentVerticalSM)," ").concat((0,x.bf)(t.paddingContentHorizontal)),itemPaddingLG:"".concat((0,x.bf)(t.paddingContentVerticalLG)," ").concat((0,x.bf)(t.paddingContentHorizontalLG)),headerBg:"transparent",footerBg:"transparent",emptyTextPadding:t.padding,metaMarginBottom:t.padding,avatarMarginRight:t.padding,titleMarginBottom:t.paddingSM,descriptionFontSize:t.fontSize})),w=function(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&0>e.indexOf(a)&&(n[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,a=Object.getOwnPropertySymbols(t);ce.indexOf(a[c])&&Object.prototype.propertyIsEnumerable.call(t,a[c])&&(n[a[c]]=t[a[c]]);return n};let B=c.forwardRef(function(t,e){let{pagination:n=!1,prefixCls:o,bordered:b=!1,split:y=!0,className:v,rootClassName:S,style:x,children:E,itemLayout:k,loadMore:C,grid:O,dataSource:N=[],size:z,header:B,footer:I,loading:H=!1,rowKey:W,renderItem:M,locale:P}=t,L=w(t,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),Z=n&&"object"==typeof n?n:{},[T,X]=c.useState(Z.defaultCurrent||1),[_,G]=c.useState(Z.defaultPageSize||10),{getPrefixCls:R,direction:A,className:V,style:q}=(0,s.dj)("list"),{renderEmpty:F}=c.useContext(s.E_),J=t=>(e,a)=>{var c;X(e),G(a),n&&(null===(c=null==n?void 0:n[t])||void 0===c||c.call(n,e,a))},D=J("onChange"),K=J("onShowSizeChange"),Y=!!(C||n||I),$=R("list",o),[Q,U,tt]=j($),te=H;"boolean"==typeof te&&(te={spinning:te});let tn=!!(null==te?void 0:te.spinning),ta=(0,m.Z)(z),tc="";switch(ta){case"large":tc="lg";break;case"small":tc="sm"}let to=i()($,{["".concat($,"-vertical")]:"vertical"===k,["".concat($,"-").concat(tc)]:tc,["".concat($,"-split")]:y,["".concat($,"-bordered")]:b,["".concat($,"-loading")]:tn,["".concat($,"-grid")]:!!O,["".concat($,"-something-after-last-item")]:Y,["".concat($,"-rtl")]:"rtl"===A},V,v,S,U,tt),ti=(0,l.Z)({current:1,total:0,position:"bottom"},{total:N.length,current:T,pageSize:_},n||{}),tl=Math.ceil(ti.total/ti.pageSize);ti.current=Math.min(ti.current,tl);let tr=n&&c.createElement("div",{className:i()("".concat($,"-pagination"))},c.createElement(f.Z,Object.assign({align:"end"},ti,{onChange:D,onShowSizeChange:K}))),ts=(0,a.Z)(N);n&&N.length>(ti.current-1)*ti.pageSize&&(ts=(0,a.Z)(N).splice((ti.current-1)*ti.pageSize,ti.pageSize));let td=Object.keys(O||{}).some(t=>["xs","sm","md","lg","xl","xxl"].includes(t)),tm=(0,p.Z)(td),tg=c.useMemo(()=>{for(let t=0;t{if(!O)return;let t=tg&&O[tg]?O[tg]:O.column;if(t)return{width:"".concat(100/t,"%"),maxWidth:"".concat(100/t,"%")}},[JSON.stringify(O),tg]),tf=tn&&c.createElement("div",{style:{minHeight:53}});if(ts.length>0){let t=ts.map((t,e)=>{let n;return M?((n="function"==typeof W?W(t):W?t[W]:t.key)||(n="list-item-".concat(e)),c.createElement(c.Fragment,{key:n},M(t,e))):null});tf=O?c.createElement(g.Z,{gutter:O.gutter},c.Children.map(t,t=>c.createElement("div",{key:null==t?void 0:t.key,style:tp},t))):c.createElement("ul",{className:"".concat($,"-items")},t)}else E||tn||(tf=c.createElement("div",{className:"".concat($,"-empty-text")},(null==P?void 0:P.emptyText)||(null==F?void 0:F("List"))||c.createElement(d.Z,{componentName:"List"})));let tu=ti.position,th=c.useMemo(()=>({grid:O,itemLayout:k}),[JSON.stringify(O),k]);return Q(c.createElement(h.Provider,{value:th},c.createElement("div",Object.assign({ref:e,style:Object.assign(Object.assign({},q),x),className:to},L),("top"===tu||"both"===tu)&&tr,B&&c.createElement("div",{className:"".concat($,"-header")},B),c.createElement(u.Z,Object.assign({},te),tf,E),I&&c.createElement("div",{className:"".concat($,"-footer")},I),C||("bottom"===tu||"both"===tu)&&tr)))});B.Item=S;var I=B}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5720-a8df9dd74eea4daa.js b/litellm/proxy/_experimental/out/_next/static/chunks/5720-a8df9dd74eea4daa.js
new file mode 100644
index 00000000000..2f96fd8c3f0
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/5720-a8df9dd74eea4daa.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5720,4851,1623],{61340:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var a=n(1119),o=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"},s=n(55015),i=o.forwardRef(function(e,t){return o.createElement(s.Z,(0,a.Z)({},e,{ref:t,icon:r}))})},35829:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var a=n(5853),o=n(26898),r=n(13241),s=n(1153),i=n(2265);let l=i.forwardRef((e,t)=>{let{color:n,children:l,className:c}=e,u=(0,a._T)(e,["color","children","className"]);return i.createElement("p",Object.assign({ref:t,className:(0,r.q)("font-semibold text-tremor-metric",n?(0,s.bM)(n,o.K.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",c)},u),l)});l.displayName="Metric"},44851:function(e,t,n){"use strict";n.d(t,{default:function(){return B}});var a=n(2265),o=n(77565),r=n(36760),s=n.n(r),i=n(1119),l=n(83145),c=n(26365),u=n(41154),d=n(50506),h=n(32559),p=n(6989),f=n(45287),m=n(31686),b=n(11993),v=n(66632),y=n(95814),g=a.forwardRef(function(e,t){var n=e.prefixCls,o=e.forceRender,r=e.className,i=e.style,l=e.children,u=e.isActive,d=e.role,h=e.classNames,p=e.styles,f=a.useState(u||o),m=(0,c.Z)(f,2),v=m[0],y=m[1];return(a.useEffect(function(){(o||u)&&y(!0)},[o,u]),v)?a.createElement("div",{ref:t,className:s()("".concat(n,"-content"),(0,b.Z)((0,b.Z)({},"".concat(n,"-content-active"),u),"".concat(n,"-content-inactive"),!u),r),style:i,role:d},a.createElement("div",{className:s()("".concat(n,"-content-box"),null==h?void 0:h.body),style:null==p?void 0:p.body},l)):null});g.displayName="PanelContent";var x=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],C=a.forwardRef(function(e,t){var n=e.showArrow,o=e.headerClass,r=e.isActive,l=e.onItemClick,c=e.forceRender,u=e.className,d=e.classNames,h=void 0===d?{}:d,f=e.styles,C=void 0===f?{}:f,w=e.prefixCls,O=e.collapsible,E=e.accordion,k=e.panelKey,N=e.extra,S=e.header,I=e.expandIcon,Z=e.openMotion,M=e.destroyInactivePanel,P=e.children,R=(0,p.Z)(e,x),j="disabled"===O,D=(0,b.Z)((0,b.Z)((0,b.Z)({onClick:function(){null==l||l(k)},onKeyDown:function(e){("Enter"===e.key||e.keyCode===y.Z.ENTER||e.which===y.Z.ENTER)&&(null==l||l(k))},role:E?"tab":"button"},"aria-expanded",r),"aria-disabled",j),"tabIndex",j?-1:0),q="function"==typeof I?I(e):a.createElement("i",{className:"arrow"}),A=q&&a.createElement("div",(0,i.Z)({className:"".concat(w,"-expand-icon")},["header","icon"].includes(O)?D:{}),q),K=s()("".concat(w,"-item"),(0,b.Z)((0,b.Z)({},"".concat(w,"-item-active"),r),"".concat(w,"-item-disabled"),j),u),_=s()(o,"".concat(w,"-header"),(0,b.Z)({},"".concat(w,"-collapsible-").concat(O),!!O),h.header),F=(0,m.Z)({className:_,style:C.header},["header","icon"].includes(O)?{}:D);return a.createElement("div",(0,i.Z)({},R,{ref:t,className:K}),a.createElement("div",F,(void 0===n||n)&&A,a.createElement("span",(0,i.Z)({className:"".concat(w,"-header-text")},"header"===O?D:{}),S),null!=N&&"boolean"!=typeof N&&a.createElement("div",{className:"".concat(w,"-extra")},N)),a.createElement(v.ZP,(0,i.Z)({visible:r,leavedClassName:"".concat(w,"-content-hidden")},Z,{forceRender:c,removeOnLeave:M}),function(e,t){var n=e.className,o=e.style;return a.createElement(g,{ref:t,prefixCls:w,className:n,classNames:h,style:o,styles:C,isActive:r,forceRender:c,role:E?"tabpanel":void 0},P)}))}),w=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],O=function(e,t){var n=t.prefixCls,o=t.accordion,r=t.collapsible,s=t.destroyInactivePanel,l=t.onItemClick,c=t.activeKey,u=t.openMotion,d=t.expandIcon;return e.map(function(e,t){var h=e.children,f=e.label,m=e.key,b=e.collapsible,v=e.onItemClick,y=e.destroyInactivePanel,g=(0,p.Z)(e,w),x=String(null!=m?m:t),O=null!=b?b:r,E=!1;return E=o?c[0]===x:c.indexOf(x)>-1,a.createElement(C,(0,i.Z)({},g,{prefixCls:n,key:x,panelKey:x,isActive:E,accordion:o,openMotion:u,expandIcon:d,header:f,collapsible:O,onItemClick:function(e){"disabled"!==O&&(l(e),null==v||v(e))},destroyInactivePanel:null!=y?y:s}),h)})},E=function(e,t,n){if(!e)return null;var o=n.prefixCls,r=n.accordion,s=n.collapsible,i=n.destroyInactivePanel,l=n.onItemClick,c=n.activeKey,u=n.openMotion,d=n.expandIcon,h=e.key||String(t),p=e.props,f=p.header,m=p.headerClass,b=p.destroyInactivePanel,v=p.collapsible,y=p.onItemClick,g=!1;g=r?c[0]===h:c.indexOf(h)>-1;var x=null!=v?v:s,C={key:h,panelKey:h,header:f,headerClass:m,isActive:g,prefixCls:o,destroyInactivePanel:null!=b?b:i,openMotion:u,accordion:r,children:e.props.children,onItemClick:function(e){"disabled"!==x&&(l(e),null==y||y(e))},expandIcon:d,collapsible:x};return"string"==typeof e.type?e:(Object.keys(C).forEach(function(e){void 0===C[e]&&delete C[e]}),a.cloneElement(e,C))},k=n(18242);function N(e){var t=e;if(!Array.isArray(t)){var n=(0,u.Z)(t);t="number"===n||"string"===n?[t]:[]}return t.map(function(e){return String(e)})}var S=Object.assign(a.forwardRef(function(e,t){var n,o=e.prefixCls,r=void 0===o?"rc-collapse":o,u=e.destroyInactivePanel,p=e.style,m=e.accordion,b=e.className,v=e.children,y=e.collapsible,g=e.openMotion,x=e.expandIcon,C=e.activeKey,w=e.defaultActiveKey,S=e.onChange,I=e.items,Z=s()(r,b),M=(0,d.Z)([],{value:C,onChange:function(e){return null==S?void 0:S(e)},defaultValue:w,postState:N}),P=(0,c.Z)(M,2),R=P[0],j=P[1];(0,h.ZP)(!v,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var D=(n={prefixCls:r,accordion:m,openMotion:g,expandIcon:x,collapsible:y,destroyInactivePanel:void 0!==u&&u,onItemClick:function(e){return j(function(){return m?R[0]===e?[]:[e]:R.indexOf(e)>-1?R.filter(function(t){return t!==e}):[].concat((0,l.Z)(R),[e])})},activeKey:R},Array.isArray(I)?O(I,n):(0,f.Z)(v).map(function(e,t){return E(e,t,n)}));return a.createElement("div",(0,i.Z)({ref:t,className:Z,style:p,role:m?"tablist":void 0},(0,k.Z)(e,{aria:!0,data:!0})),D)}),{Panel:C});S.Panel;var I=n(18694),Z=n(68710),M=n(19722),P=n(71744),R=n(33759);let j=a.forwardRef((e,t)=>{let{getPrefixCls:n}=a.useContext(P.E_),{prefixCls:o,className:r,showArrow:i=!0}=e,l=n("collapse",o),c=s()({["".concat(l,"-no-arrow")]:!i},r);return a.createElement(S.Panel,Object.assign({ref:t},e,{prefixCls:l,className:c}))});var D=n(93463),q=n(12918),A=n(63074),K=n(99320),_=n(71140);let F=e=>{let{componentCls:t,contentBg:n,padding:a,headerBg:o,headerPadding:r,collapseHeaderPaddingSM:s,collapseHeaderPaddingLG:i,collapsePanelBorderRadius:l,lineWidth:c,lineType:u,colorBorder:d,colorText:h,colorTextHeading:p,colorTextDisabled:f,fontSizeLG:m,lineHeight:b,lineHeightLG:v,marginSM:y,paddingSM:g,paddingLG:x,paddingXS:C,motionDurationSlow:w,fontSizeIcon:O,contentPadding:E,fontHeight:k,fontHeightLG:N}=e,S="".concat((0,D.bf)(c)," ").concat(u," ").concat(d);return{[t]:Object.assign(Object.assign({},(0,q.Wf)(e)),{backgroundColor:o,border:S,borderRadius:l,"&-rtl":{direction:"rtl"},["& > ".concat(t,"-item")]:{borderBottom:S,"&:first-child":{["\n &,\n & > ".concat(t,"-header")]:{borderRadius:"".concat((0,D.bf)(l)," ").concat((0,D.bf)(l)," 0 0")}},"&:last-child":{["\n &,\n & > ".concat(t,"-header")]:{borderRadius:"0 0 ".concat((0,D.bf)(l)," ").concat((0,D.bf)(l))}},["> ".concat(t,"-header")]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:r,color:p,lineHeight:b,cursor:"pointer",transition:"all ".concat(w,", visibility 0s")},(0,q.Qy)(e)),{["> ".concat(t,"-header-text")]:{flex:"auto"},["".concat(t,"-expand-icon")]:{height:k,display:"flex",alignItems:"center",paddingInlineEnd:y},["".concat(t,"-arrow")]:Object.assign(Object.assign({},(0,q.Ro)()),{fontSize:O,transition:"transform ".concat(w),svg:{transition:"transform ".concat(w)}}),["".concat(t,"-header-text")]:{marginInlineEnd:"auto"}}),["".concat(t,"-collapsible-header")]:{cursor:"default",["".concat(t,"-header-text")]:{flex:"none",cursor:"pointer"},["".concat(t,"-expand-icon")]:{cursor:"pointer"}},["".concat(t,"-collapsible-icon")]:{cursor:"unset",["".concat(t,"-expand-icon")]:{cursor:"pointer"}}},["".concat(t,"-content")]:{color:h,backgroundColor:n,borderTop:S,["& > ".concat(t,"-content-box")]:{padding:E},"&-hidden":{display:"none"}},"&-small":{["> ".concat(t,"-item")]:{["> ".concat(t,"-header")]:{padding:s,paddingInlineStart:C,["> ".concat(t,"-expand-icon")]:{marginInlineStart:e.calc(g).sub(C).equal()}},["> ".concat(t,"-content > ").concat(t,"-content-box")]:{padding:g}}},"&-large":{["> ".concat(t,"-item")]:{fontSize:m,lineHeight:v,["> ".concat(t,"-header")]:{padding:i,paddingInlineStart:a,["> ".concat(t,"-expand-icon")]:{height:N,marginInlineStart:e.calc(x).sub(a).equal()}},["> ".concat(t,"-content > ").concat(t,"-content-box")]:{padding:x}}},["".concat(t,"-item:last-child")]:{borderBottom:0,["> ".concat(t,"-content")]:{borderRadius:"0 0 ".concat((0,D.bf)(l)," ").concat((0,D.bf)(l))}},["& ".concat(t,"-item-disabled > ").concat(t,"-header")]:{"\n &,\n & > .arrow\n ":{color:f,cursor:"not-allowed"}},["&".concat(t,"-icon-position-end")]:{["& > ".concat(t,"-item")]:{["> ".concat(t,"-header")]:{["".concat(t,"-expand-icon")]:{order:1,paddingInlineEnd:0,paddingInlineStart:y}}}}})}},Q=e=>{let{componentCls:t}=e,n="> ".concat(t,"-item > ").concat(t,"-header ").concat(t,"-arrow");return{["".concat(t,"-rtl")]:{[n]:{transform:"rotate(180deg)"}}}},V=e=>{let{componentCls:t,headerBg:n,borderlessContentPadding:a,borderlessContentBg:o,colorBorder:r}=e;return{["".concat(t,"-borderless")]:{backgroundColor:n,border:0,["> ".concat(t,"-item")]:{borderBottom:"1px solid ".concat(r)},["\n > ".concat(t,"-item:last-child,\n > ").concat(t,"-item:last-child ").concat(t,"-header\n ")]:{borderRadius:0},["> ".concat(t,"-item:last-child")]:{borderBottom:0},["> ".concat(t,"-item > ").concat(t,"-content")]:{backgroundColor:o,borderTop:0},["> ".concat(t,"-item > ").concat(t,"-content > ").concat(t,"-content-box")]:{padding:a}}}},T=e=>{let{componentCls:t,paddingSM:n}=e;return{["".concat(t,"-ghost")]:{backgroundColor:"transparent",border:0,["> ".concat(t,"-item")]:{borderBottom:0,["> ".concat(t,"-content")]:{backgroundColor:"transparent",border:0,["> ".concat(t,"-content-box")]:{paddingBlock:n}}}}}};var L=(0,K.I$)("Collapse",e=>{let t=(0,_.IX)(e,{collapseHeaderPaddingSM:"".concat((0,D.bf)(e.paddingXS)," ").concat((0,D.bf)(e.paddingSM)),collapseHeaderPaddingLG:"".concat((0,D.bf)(e.padding)," ").concat((0,D.bf)(e.paddingLG)),collapsePanelBorderRadius:e.borderRadiusLG});return[F(t),V(t),T(t),Q(t),(0,A.Z)(t)]},e=>({headerPadding:"".concat(e.paddingSM,"px ").concat(e.padding,"px"),headerBg:e.colorFillAlter,contentPadding:"".concat(e.padding,"px 16px"),contentBg:e.colorBgContainer,borderlessContentPadding:"".concat(e.paddingXXS,"px 16px ").concat(e.padding,"px"),borderlessContentBg:"transparent"})),B=Object.assign(a.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,expandIcon:i,className:l,style:c}=(0,P.dj)("collapse"),{prefixCls:u,className:d,rootClassName:h,style:p,bordered:m=!0,ghost:b,size:v,expandIconPosition:y="start",children:g,destroyInactivePanel:x,destroyOnHidden:C,expandIcon:w}=e,O=(0,R.Z)(e=>{var t;return null!==(t=null!=v?v:e)&&void 0!==t?t:"middle"}),E=n("collapse",u),k=n(),[N,j,D]=L(E),q=a.useMemo(()=>"left"===y?"start":"right"===y?"end":y,[y]),A=null!=w?w:i,K=a.useCallback(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="function"==typeof A?A(e):a.createElement(o.Z,{rotate:e.isActive?"rtl"===r?-90:90:void 0,"aria-label":e.isActive?"expanded":"collapsed"});return(0,M.Tm)(t,()=>{var e;return{className:s()(null===(e=t.props)||void 0===e?void 0:e.className,"".concat(E,"-arrow"))}})},[A,E,r]),_=s()("".concat(E,"-icon-position-").concat(q),{["".concat(E,"-borderless")]:!m,["".concat(E,"-rtl")]:"rtl"===r,["".concat(E,"-ghost")]:!!b,["".concat(E,"-").concat(O)]:"middle"!==O},l,d,h,j,D),F=a.useMemo(()=>Object.assign(Object.assign({},(0,Z.Z)(k)),{motionAppear:!1,leavedClassName:"".concat(E,"-content-hidden")}),[k,E]),Q=a.useMemo(()=>g?(0,f.Z)(g).map((e,t)=>{var n,a;let o=e.props;if(null==o?void 0:o.disabled){let r=null!==(n=e.key)&&void 0!==n?n:String(t),s=Object.assign(Object.assign({},(0,I.Z)(e.props,["disabled"])),{key:r,collapsible:null!==(a=o.collapsible)&&void 0!==a?a:"disabled"});return(0,M.Tm)(e,s)}return e}):null,[g]);return N(a.createElement(S,Object.assign({ref:t,openMotion:F},(0,I.Z)(e,["rootClassName"]),{expandIcon:K,prefixCls:E,className:_,style:Object.assign(Object.assign({},c),p),destroyInactivePanel:null!=C?C:x}),Q))}),{Panel:j})},63134:function(e,t,n){"use strict";n.d(t,{Z:function(){return W}});var a=n(2265),o=n(36760),r=n.n(o),s=n(31686),i=n(26365),l=n(28036),c=n(27380),u=a.createContext(null),d=a.createContext({}),h=n(11993),p=n(1119),f=n(66632),m=n(95814),b=n(18242),v=n(6989),y=n(28791),g=["prefixCls","className","containerRef"],x=function(e){var t=e.prefixCls,n=e.className,o=e.containerRef,s=(0,v.Z)(e,g),i=a.useContext(d).panel,l=(0,y.x1)(i,o);return a.createElement("div",(0,p.Z)({className:r()("".concat(t,"-content"),n),role:"dialog",ref:l},(0,b.Z)(e,{aria:!0}),{"aria-modal":"true"},s))},C=n(32559);function w(e){return"string"==typeof e&&String(Number(e))===e?((0,C.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var O={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"},E=a.forwardRef(function(e,t){var n,o,l,c=e.prefixCls,d=e.open,v=e.placement,y=e.inline,g=e.push,C=e.forceRender,E=e.autoFocus,k=e.keyboard,N=e.classNames,S=e.rootClassName,I=e.rootStyle,Z=e.zIndex,M=e.className,P=e.id,R=e.style,j=e.motion,D=e.width,q=e.height,A=e.children,K=e.mask,_=e.maskClosable,F=e.maskMotion,Q=e.maskClassName,V=e.maskStyle,T=e.afterOpenChange,L=e.onClose,B=e.onMouseEnter,z=e.onMouseOver,H=e.onMouseLeave,X=e.onClick,G=e.onKeyDown,U=e.onKeyUp,W=e.styles,Y=e.drawerRender,J=a.useRef(),$=a.useRef(),ee=a.useRef();a.useImperativeHandle(t,function(){return J.current}),a.useEffect(function(){if(d&&E){var e;null===(e=J.current)||void 0===e||e.focus({preventScroll:!0})}},[d]);var et=a.useState(!1),en=(0,i.Z)(et,2),ea=en[0],eo=en[1],er=a.useContext(u),es=null!==(n=null!==(o=null===(l="boolean"==typeof g?g?{}:{distance:0}:g||{})||void 0===l?void 0:l.distance)&&void 0!==o?o:null==er?void 0:er.pushDistance)&&void 0!==n?n:180,ei=a.useMemo(function(){return{pushDistance:es,push:function(){eo(!0)},pull:function(){eo(!1)}}},[es]);a.useEffect(function(){var e,t;d?null==er||null===(e=er.push)||void 0===e||e.call(er):null==er||null===(t=er.pull)||void 0===t||t.call(er)},[d]),a.useEffect(function(){return function(){var e;null==er||null===(e=er.pull)||void 0===e||e.call(er)}},[]);var el=a.createElement(f.ZP,(0,p.Z)({key:"mask"},F,{visible:K&&d}),function(e,t){var n=e.className,o=e.style;return a.createElement("div",{className:r()("".concat(c,"-mask"),n,null==N?void 0:N.mask,Q),style:(0,s.Z)((0,s.Z)((0,s.Z)({},o),V),null==W?void 0:W.mask),onClick:_&&d?L:void 0,ref:t})}),ec="function"==typeof j?j(v):j,eu={};if(ea&&es)switch(v){case"top":eu.transform="translateY(".concat(es,"px)");break;case"bottom":eu.transform="translateY(".concat(-es,"px)");break;case"left":eu.transform="translateX(".concat(es,"px)");break;default:eu.transform="translateX(".concat(-es,"px)")}"left"===v||"right"===v?eu.width=w(D):eu.height=w(q);var ed={onMouseEnter:B,onMouseOver:z,onMouseLeave:H,onClick:X,onKeyDown:G,onKeyUp:U},eh=a.createElement(f.ZP,(0,p.Z)({key:"panel"},ec,{visible:d,forceRender:C,onVisibleChanged:function(e){null==T||T(e)},removeOnLeave:!1,leavedClassName:"".concat(c,"-content-wrapper-hidden")}),function(t,n){var o=t.className,i=t.style,l=a.createElement(x,(0,p.Z)({id:P,containerRef:n,prefixCls:c,className:r()(M,null==N?void 0:N.content),style:(0,s.Z)((0,s.Z)({},R),null==W?void 0:W.content)},(0,b.Z)(e,{aria:!0}),ed),A);return a.createElement("div",(0,p.Z)({className:r()("".concat(c,"-content-wrapper"),null==N?void 0:N.wrapper,o),style:(0,s.Z)((0,s.Z)((0,s.Z)({},eu),i),null==W?void 0:W.wrapper)},(0,b.Z)(e,{data:!0})),Y?Y(l):l)}),ep=(0,s.Z)({},I);return Z&&(ep.zIndex=Z),a.createElement(u.Provider,{value:ei},a.createElement("div",{className:r()(c,"".concat(c,"-").concat(v),S,(0,h.Z)((0,h.Z)({},"".concat(c,"-open"),d),"".concat(c,"-inline"),y)),style:ep,tabIndex:-1,ref:J,onKeyDown:function(e){var t,n,a=e.keyCode,o=e.shiftKey;switch(a){case m.Z.TAB:a===m.Z.TAB&&(o||document.activeElement!==ee.current?o&&document.activeElement===$.current&&(null===(n=ee.current)||void 0===n||n.focus({preventScroll:!0})):null===(t=$.current)||void 0===t||t.focus({preventScroll:!0}));break;case m.Z.ESC:L&&k&&(e.stopPropagation(),L(e))}}},el,a.createElement("div",{tabIndex:0,ref:$,style:O,"aria-hidden":"true","data-sentinel":"start"}),eh,a.createElement("div",{tabIndex:0,ref:ee,style:O,"aria-hidden":"true","data-sentinel":"end"})))}),k=function(e){var t=e.open,n=e.prefixCls,o=e.placement,r=e.autoFocus,u=e.keyboard,h=e.width,p=e.mask,f=void 0===p||p,m=e.maskClosable,b=e.getContainer,v=e.forceRender,y=e.afterOpenChange,g=e.destroyOnClose,x=e.onMouseEnter,C=e.onMouseOver,w=e.onMouseLeave,O=e.onClick,k=e.onKeyDown,N=e.onKeyUp,S=e.panelRef,I=a.useState(!1),Z=(0,i.Z)(I,2),M=Z[0],P=Z[1],R=a.useState(!1),j=(0,i.Z)(R,2),D=j[0],q=j[1];(0,c.Z)(function(){q(!0)},[]);var A=!!D&&void 0!==t&&t,K=a.useRef(),_=a.useRef();(0,c.Z)(function(){A&&(_.current=document.activeElement)},[A]);var F=a.useMemo(function(){return{panel:S}},[S]);if(!v&&!M&&!A&&g)return null;var Q=(0,s.Z)((0,s.Z)({},e),{},{open:A,prefixCls:void 0===n?"rc-drawer":n,placement:void 0===o?"right":o,autoFocus:void 0===r||r,keyboard:void 0===u||u,width:void 0===h?378:h,mask:f,maskClosable:void 0===m||m,inline:!1===b,afterOpenChange:function(e){var t,n;P(e),null==y||y(e),e||!_.current||null!==(t=K.current)&&void 0!==t&&t.contains(_.current)||null===(n=_.current)||void 0===n||n.focus({preventScroll:!0})},ref:K},{onMouseEnter:x,onMouseOver:C,onMouseLeave:w,onClick:O,onKeyDown:k,onKeyUp:N});return a.createElement(d.Provider,{value:F},a.createElement(l.Z,{open:A||v||M,autoDestroy:!1,getContainer:b,autoLock:f&&(A||M)},a.createElement(E,Q)))},N=n(92491),S=n(391),I=n(62236),Z=n(68710),M=n(95140),P=n(71744),R=n(19248),j=n(53445),D=n(50337),q=e=>{var t,n,o,s,i,l;let c;let{prefixCls:u,ariaId:d,title:h,footer:p,extra:f,closable:m,loading:b,onClose:v,headerStyle:y,bodyStyle:g,footerStyle:x,children:C,classNames:w,styles:O}=e,E=(0,P.dj)("drawer");c=!1===m?void 0:void 0===m||!0===m?"start":(null==m?void 0:m.placement)==="end"?"end":"start";let k=a.useCallback(e=>a.createElement("button",{type:"button",onClick:v,className:r()("".concat(u,"-close"),{["".concat(u,"-close-").concat(c)]:"end"===c})},e),[v,u,c]),[N,S]=(0,j.b)((0,j.w)(e),(0,j.w)(E),{closable:!0,closeIconRender:k});return a.createElement(a.Fragment,null,h||N?a.createElement("div",{style:Object.assign(Object.assign(Object.assign({},null===(o=E.styles)||void 0===o?void 0:o.header),y),null==O?void 0:O.header),className:r()("".concat(u,"-header"),{["".concat(u,"-header-close-only")]:N&&!h&&!f},null===(s=E.classNames)||void 0===s?void 0:s.header,null==w?void 0:w.header)},a.createElement("div",{className:"".concat(u,"-header-title")},"start"===c&&S,h&&a.createElement("div",{className:"".concat(u,"-title"),id:d},h)),f&&a.createElement("div",{className:"".concat(u,"-extra")},f),"end"===c&&S):null,a.createElement("div",{className:r()("".concat(u,"-body"),null==w?void 0:w.body,null===(t=E.classNames)||void 0===t?void 0:t.body),style:Object.assign(Object.assign(Object.assign({},null===(n=E.styles)||void 0===n?void 0:n.body),g),null==O?void 0:O.body)},b?a.createElement(D.Z,{active:!0,title:!1,paragraph:{rows:5},className:"".concat(u,"-body-skeleton")}):C),p?a.createElement("div",{className:r()("".concat(u,"-footer"),null===(i=E.classNames)||void 0===i?void 0:i.footer,null==w?void 0:w.footer),style:Object.assign(Object.assign(Object.assign({},null===(l=E.styles)||void 0===l?void 0:l.footer),x),null==O?void 0:O.footer)},p):null)},A=n(93463),K=n(12918),_=n(99320),F=n(71140);let Q=e=>{let t="100%";return({left:"translateX(-".concat(t,")"),right:"translateX(".concat(t,")"),top:"translateY(-".concat(t,")"),bottom:"translateY(".concat(t,")")})[e]},V=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),T=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:"all ".concat(t)}}},V({opacity:e},{opacity:1})),L=(e,t)=>[T(.7,t),V({transform:Q(e)},{transform:"none"})];var B=e=>{let{componentCls:t,motionDurationSlow:n}=e;return{[t]:{["".concat(t,"-mask-motion")]:T(0,n),["".concat(t,"-panel-motion")]:["left","right","top","bottom"].reduce((e,t)=>Object.assign(Object.assign({},e),{["&-".concat(t)]:L(t,n)}),{})}}};let z=e=>{let{borderRadiusSM:t,componentCls:n,zIndexPopup:a,colorBgMask:o,colorBgElevated:r,motionDurationSlow:s,motionDurationMid:i,paddingXS:l,padding:c,paddingLG:u,fontSizeLG:d,lineHeightLG:h,lineWidth:p,lineType:f,colorSplit:m,marginXS:b,colorIcon:v,colorIconHover:y,colorBgTextHover:g,colorBgTextActive:x,colorText:C,fontWeightStrong:w,footerPaddingBlock:O,footerPaddingInline:E,calc:k}=e,N="".concat(n,"-content-wrapper");return{[n]:{position:"fixed",inset:0,zIndex:a,pointerEvents:"none",color:C,"&-pure":{position:"relative",background:r,display:"flex",flexDirection:"column",["&".concat(n,"-left")]:{boxShadow:e.boxShadowDrawerLeft},["&".concat(n,"-right")]:{boxShadow:e.boxShadowDrawerRight},["&".concat(n,"-top")]:{boxShadow:e.boxShadowDrawerUp},["&".concat(n,"-bottom")]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},["".concat(n,"-mask")]:{position:"absolute",inset:0,zIndex:a,background:o,pointerEvents:"auto"},[N]:{position:"absolute",zIndex:a,maxWidth:"100vw",transition:"all ".concat(s),"&-hidden":{display:"none"}},["&-left > ".concat(N)]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},["&-right > ".concat(N)]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},["&-top > ".concat(N)]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},["&-bottom > ".concat(N)]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},["".concat(n,"-content")]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:r,pointerEvents:"auto"},["".concat(n,"-header")]:{display:"flex",flex:0,alignItems:"center",padding:"".concat((0,A.bf)(c)," ").concat((0,A.bf)(u)),fontSize:d,lineHeight:h,borderBottom:"".concat((0,A.bf)(p)," ").concat(f," ").concat(m),"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},["".concat(n,"-extra")]:{flex:"none"},["".concat(n,"-close")]:Object.assign({display:"inline-flex",width:k(d).add(l).equal(),height:k(d).add(l).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:v,fontWeight:w,fontSize:d,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:"all ".concat(i),textRendering:"auto",["&".concat(n,"-close-end")]:{marginInlineStart:b},["&:not(".concat(n,"-close-end)")]:{marginInlineEnd:b},"&:hover":{color:y,backgroundColor:g,textDecoration:"none"},"&:active":{backgroundColor:x}},(0,K.Qy)(e)),["".concat(n,"-title")]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:h},["".concat(n,"-body")]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:"auto",["".concat(n,"-body-skeleton")]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},["".concat(n,"-footer")]:{flexShrink:0,padding:"".concat((0,A.bf)(O)," ").concat((0,A.bf)(E)),borderTop:"".concat((0,A.bf)(p)," ").concat(f," ").concat(m)},"&-rtl":{direction:"rtl"}}}};var H=(0,_.I$)("Drawer",e=>{let t=(0,F.IX)(e,{});return[z(t),B(t)]},e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding})),X=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(e);ot.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};let G={distance:180},U=e=>{let{rootClassName:t,width:n,height:o,size:s="default",mask:i=!0,push:l=G,open:c,afterOpenChange:u,onClose:d,prefixCls:h,getContainer:p,panelRef:f=null,style:m,className:b,"aria-labelledby":v,visible:g,afterVisibleChange:x,maskStyle:C,drawerStyle:w,contentWrapperStyle:O,destroyOnClose:E,destroyOnHidden:j}=e,D=X(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),A=(0,N.Z)(),K=D.title?A:void 0,{getPopupContainer:_,getPrefixCls:F,direction:Q,className:V,style:T,classNames:L,styles:B}=(0,P.dj)("drawer"),z=F("drawer",h),[U,W,Y]=H(z),J=r()({"no-mask":!i,["".concat(z,"-rtl")]:"rtl"===Q},t,W,Y),$=a.useMemo(()=>null!=n?n:"large"===s?736:378,[n,s]),ee=a.useMemo(()=>null!=o?o:"large"===s?736:378,[o,s]),et={motionName:(0,Z.m)(z,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},en=(0,R.H)(),ea=(0,y.sQ)(f,en),[eo,er]=(0,I.Cn)("Drawer",D.zIndex),{classNames:es={},styles:ei={}}=D;return U(a.createElement(S.Z,{form:!0,space:!0},a.createElement(M.Z.Provider,{value:er},a.createElement(k,Object.assign({prefixCls:z,onClose:d,maskMotion:et,motion:e=>({motionName:(0,Z.m)(z,"panel-motion-".concat(e)),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500})},D,{classNames:{mask:r()(es.mask,L.mask),content:r()(es.content,L.content),wrapper:r()(es.wrapper,L.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},ei.mask),C),B.mask),content:Object.assign(Object.assign(Object.assign({},ei.content),w),B.content),wrapper:Object.assign(Object.assign(Object.assign({},ei.wrapper),O),B.wrapper)},open:null!=c?c:g,mask:i,push:l,width:$,height:ee,style:Object.assign(Object.assign({},T),m),className:r()(V,b),rootClassName:J,getContainer:void 0===p&&_?()=>_(document.body):p,afterOpenChange:null!=u?u:x,panelRef:ea,zIndex:eo,"aria-labelledby":null!=v?v:K,destroyOnClose:null!=j?j:E}),a.createElement(q,Object.assign({prefixCls:z},D,{ariaId:K,onClose:d}))))))};U._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,style:n,className:o,placement:s="right"}=e,i=X(e,["prefixCls","style","className","placement"]),{getPrefixCls:l}=a.useContext(P.E_),c=l("drawer",t),[u,d,h]=H(c),p=r()(c,"".concat(c,"-pure"),"".concat(c,"-").concat(s),d,h,o);return u(a.createElement("div",{className:p,style:n},a.createElement(q,Object.assign({prefixCls:c},i))))};var W=U},86669:function(e,t,n){"use strict";n.d(t,{gc:function(){return x},jF:function(){return y}});var a=n(2265);let o=e=>"boolean"==typeof e||e instanceof Boolean,r=e=>"number"==typeof e||e instanceof Number,s=e=>"bigint"==typeof e||e instanceof BigInt,i=e=>!!e&&e instanceof Date,l=e=>"string"==typeof e||e instanceof String,c=e=>Array.isArray(e),u=e=>"object"==typeof e&&null!==e,d=e=>!!e&&e instanceof Object&&"function"==typeof e;function h(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function p(e){let{field:t,value:n,data:o,lastElement:r,openBracket:s,closeBracket:i,level:l,style:c,shouldExpandNode:u,clickToExpandNode:d,outerRef:p,beforeExpandChange:f}=e,m=(0,a.useRef)(!1),[b,y]=(0,a.useState)(()=>u(l,n,t)),g=(0,a.useRef)(null);(0,a.useEffect)(()=>{m.current?y(u(l,n,t)):m.current=!0},[u]);let x=(0,a.useId)();if(0===o.length)return function(e){let{field:t,openBracket:n,closeBracket:o,lastElement:r,style:s}=e;return(0,a.createElement)("div",{className:s.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&(0,a.createElement)("span",{className:s.label},h(t,s.quotesForFieldNames),":"),(0,a.createElement)("span",{className:s.punctuation},n),(0,a.createElement)("span",{className:s.punctuation},o),!r&&(0,a.createElement)("span",{className:s.punctuation},","))}({field:t,openBracket:s,closeBracket:i,lastElement:r,style:c});let C=b?c.collapseIcon:c.expandIcon,w=b?c.ariaLables.collapseJson:c.ariaLables.expandJson,O=l+1,E=o.length-1,k=e=>{b!==e&&(!f||f({level:l,value:n,field:t,newExpandValue:e}))&&y(e)},N=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),k("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t="ArrowUp"===e.key?-1:1;if(!p.current)return;let n=p.current.querySelectorAll("[role=button]"),a=-1;for(let e=0;e{var e;k(!b);let t=g.current;if(!t)return;let n=null===(e=p.current)||void 0===e?void 0:e.querySelector('[role=button][tabindex="0"]');n&&(n.tabIndex=-1),t.tabIndex=0,t.focus()};return(0,a.createElement)("div",{className:c.basicChildStyle,role:"treeitem","aria-expanded":b,"aria-selected":void 0},(0,a.createElement)("span",{className:C,onClick:S,onKeyDown:N,role:"button","aria-label":w,"aria-expanded":b,"aria-controls":b?x:void 0,ref:g,tabIndex:0===l?0:-1}),(t||""===t)&&(d?(0,a.createElement)("span",{className:c.clickableLabel,onClick:S,onKeyDown:N},h(t,c.quotesForFieldNames),":"):(0,a.createElement)("span",{className:c.label},h(t,c.quotesForFieldNames),":")),(0,a.createElement)("span",{className:c.punctuation},s),b?(0,a.createElement)("ul",{id:x,role:"group",className:c.childFieldsContainer},o.map((e,t)=>(0,a.createElement)(v,{key:e[0]||t,field:e[0],value:e[1],style:c,lastElement:t===E,level:O,shouldExpandNode:u,clickToExpandNode:d,beforeExpandChange:f,outerRef:p}))):(0,a.createElement)("span",{className:c.collapsedContent,onClick:S,onKeyDown:N}),(0,a.createElement)("span",{className:c.punctuation},i),!r&&(0,a.createElement)("span",{className:c.punctuation},","))}function f(e){let{field:t,value:n,style:a,lastElement:o,shouldExpandNode:r,clickToExpandNode:s,level:i,outerRef:l,beforeExpandChange:c}=e;return p({field:t,value:n,lastElement:o||!1,level:i,openBracket:"{",closeBracket:"}",style:a,shouldExpandNode:r,clickToExpandNode:s,data:Object.keys(n).map(e=>[e,n[e]]),outerRef:l,beforeExpandChange:c})}function m(e){let{field:t,value:n,style:a,lastElement:o,level:r,shouldExpandNode:s,clickToExpandNode:i,outerRef:l,beforeExpandChange:c}=e;return p({field:t,value:n,lastElement:o||!1,level:r,openBracket:"[",closeBracket:"]",style:a,shouldExpandNode:s,clickToExpandNode:i,data:n.map(e=>[void 0,e]),outerRef:l,beforeExpandChange:c})}function b(e){let t,{field:n,value:c,style:u,lastElement:p}=e,f=u.otherValue;if(null===c)t="null",f=u.nullValue;else if(void 0===c)t="undefined",f=u.undefinedValue;else if(l(c)){var m;m=!u.noQuotesForStringValues,t=u.stringifyStringValues?JSON.stringify(c):m?`"${c}"`:c,f=u.stringValue}else o(c)?(t=c?"true":"false",f=u.booleanValue):r(c)?(t=c.toString(),f=u.numberValue):s(c)?(t=`${c.toString()}n`,f=u.numberValue):t=i(c)?c.toISOString():d(c)?"function() { }":c.toString();return(0,a.createElement)("div",{className:u.basicChildStyle,role:"treeitem","aria-selected":void 0},(n||""===n)&&(0,a.createElement)("span",{className:u.label},h(n,u.quotesForFieldNames),":"),(0,a.createElement)("span",{className:f},t),!p&&(0,a.createElement)("span",{className:u.punctuation},","))}function v(e){let t=e.value;return c(t)?(0,a.createElement)(m,Object.assign({},e)):!u(t)||i(t)||d(t)?(0,a.createElement)(b,Object.assign({},e)):(0,a.createElement)(f,Object.assign({},e))}let y={container:"_2IvMF _GzYRV",basicChildStyle:"_2bkNM",childFieldsContainer:"_1BXBN",label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:{collapseJson:"collapse JSON",expandJson:"expand JSON"},stringifyStringValues:!1},g=()=>!0,x=e=>{let{data:t,style:n=y,shouldExpandNode:o=g,clickToExpandNode:r=!1,beforeExpandChange:s,compactTopLevel:i,...l}=e,c=(0,a.useRef)(null);return(0,a.createElement)("div",Object.assign({"aria-label":"JSON view"},l,{className:n.container,ref:c,role:"tree"}),i&&u(t)?Object.entries(t).map(e=>{let[t,i]=e;return(0,a.createElement)(v,{key:t,field:t,value:i,style:{...y,...n},lastElement:!0,level:1,shouldExpandNode:o,clickToExpandNode:r,beforeExpandChange:s,outerRef:c})}):(0,a.createElement)(v,{value:t,style:{...y,...n},lastElement:!0,level:0,shouldExpandNode:o,clickToExpandNode:r,outerRef:c,beforeExpandChange:s}))}},52621:function(){},2356:function(e,t,n){"use strict";var a=n(2265);let o=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});t.Z=o},2894:function(e,t,n){"use strict";n.d(t,{R:function(){return i},m:function(){return s}});var a=n(18238),o=n(7989),r=n(11255),s=class extends o.F{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||i(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#o({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=(0,r.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let a="pending"===this.state.status,o=!this.#a.canStart();try{if(a)t();else{this.#o({type:"pending",variables:e,isPaused:o}),await this.#n.config.onMutate?.(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#o({type:"pending",context:t,variables:e,isPaused:o})}let r=await this.#a.start();return await this.#n.config.onSuccess?.(r,e,this.state.context,this,n),await this.options.onSuccess?.(r,e,this.state.context,n),await this.#n.config.onSettled?.(r,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(r,null,e,this.state.context,n),this.#o({type:"success",data:r}),r}catch(t){try{throw await this.#n.config.onError?.(t,e,this.state.context,this,n),await this.options.onError?.(t,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,t,e,this.state.context,n),t}finally{this.#o({type:"error",error:t})}}finally{this.#n.runNext(this)}}#o(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),a.Vr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function i(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},21623:function(e,t,n){"use strict";n.d(t,{S:function(){return m}});var a=n(45345),o=n(21733),r=n(18238),s=n(24112),i=class extends s.l{constructor(e={}){super(),this.config=e,this.#r=new Map}#r;build(e,t,n){let r=t.queryKey,s=t.queryHash??(0,a.Rm)(r,t),i=this.get(s);return i||(i=new o.A({client:e,queryKey:r,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}add(e){this.#r.has(e.queryHash)||(this.#r.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#r.get(e.queryHash);t&&(e.destroy(),t===e&&this.#r.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){r.Vr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#r.get(e)}getAll(){return[...this.#r.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,a._x)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,a._x)(e,t)):t}notify(e){r.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){r.Vr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){r.Vr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},l=n(2894),c=class extends s.l{constructor(e={}){super(),this.config=e,this.#s=new Set,this.#i=new Map,this.#l=0}#s;#i;#l;build(e,t,n){let a=new l.m({client:e,mutationCache:this,mutationId:++this.#l,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){this.#s.add(e);let t=u(e);if("string"==typeof t){let n=this.#i.get(t);n?n.push(e):this.#i.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#s.delete(e)){let t=u(e);if("string"==typeof t){let n=this.#i.get(t);if(n){if(n.length>1){let t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#i.delete(t)}}}this.notify({type:"removed",mutation:e})}canRun(e){let t=u(e);if("string"!=typeof t)return!0;{let n=this.#i.get(t),a=n?.find(e=>"pending"===e.state.status);return!a||a===e}}runNext(e){let t=u(e);if("string"!=typeof t)return Promise.resolve();{let n=this.#i.get(t)?.find(t=>t!==e&&t.state.isPaused);return n?.continue()??Promise.resolve()}}clear(){r.Vr.batch(()=>{this.#s.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#s.clear(),this.#i.clear()})}getAll(){return Array.from(this.#s)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,a.X7)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,a.X7)(e,t))}notify(e){r.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return r.Vr.batch(()=>Promise.all(e.map(e=>e.continue().catch(a.ZT))))}};function u(e){return e.options.scope?.id}var d=n(87045),h=n(57853);function p(e){return{onFetch:(t,n)=>{let o=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],i=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},c=0,u=async()=>{let n=!1,u=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",()=>{n=!0}),t.signal)})},d=(0,a.cG)(t.options,t.fetchOptions),h=async(e,o,r)=>{if(n)return Promise.reject();if(null==o&&e.pages.length)return Promise.resolve(e);let s=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:o,direction:r?"backward":"forward",meta:t.options.meta};return u(e),e})(),i=await d(s),{maxPages:l}=t.options,c=r?a.Ht:a.VX;return{pages:c(e.pages,i,l),pageParams:c(e.pageParams,o,l)}};if(r&&s.length){let e="backward"===r,t={pages:s,pageParams:i},n=(e?function(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}:f)(o,t);l=await h(t,n,e)}else{let t=e??s.length;do{let e=0===c?i[0]??o.initialPageParam:f(o,l);if(c>0&&null==e)break;l=await h(l,e),c++}while(ct.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function f(e,{pages:t,pageParams:n}){let a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}var m=class{#c;#n;#u;#d;#h;#p;#f;#m;constructor(e={}){this.#c=e.queryCache||new i,this.#n=e.mutationCache||new c,this.#u=e.defaultOptions||{},this.#d=new Map,this.#h=new Map,this.#p=0}mount(){this.#p++,1===this.#p&&(this.#f=d.j.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#c.onFocus())}),this.#m=h.N.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#c.onOnline())}))}unmount(){this.#p--,0===this.#p&&(this.#f?.(),this.#f=void 0,this.#m?.(),this.#m=void 0)}isFetching(e){return this.#c.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#c.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#c.build(this,t),o=n.state.data;return void 0===o?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime((0,a.KC)(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(e){return this.#c.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let o=this.defaultQueryOptions({queryKey:e}),r=this.#c.get(o.queryHash),s=r?.state.data,i=(0,a.SE)(t,s);if(void 0!==i)return this.#c.build(this,o).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return r.Vr.batch(()=>this.#c.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#c.get(t.queryHash)?.state}removeQueries(e){let t=this.#c;r.Vr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#c;return r.Vr.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t};return Promise.all(r.Vr.batch(()=>this.#c.findAll(e).map(e=>e.cancel(n)))).then(a.ZT).catch(a.ZT)}invalidateQueries(e,t={}){return r.Vr.batch(()=>(this.#c.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(r.Vr.batch(()=>this.#c.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(a.ZT)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(a.ZT)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let n=this.#c.build(this,t);return n.isStaleByTime((0,a.KC)(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(a.ZT).catch(a.ZT)}fetchInfiniteQuery(e){return e.behavior=p(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(a.ZT).catch(a.ZT)}ensureInfiniteQueryData(e){return e.behavior=p(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return h.N.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#c}getMutationCache(){return this.#n}getDefaultOptions(){return this.#u}setDefaultOptions(e){this.#u=e}setQueryDefaults(e,t){this.#d.set((0,a.Ym)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#d.values()],n={};return t.forEach(t=>{(0,a.to)(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#h.set((0,a.Ym)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#h.values()],n={};return t.forEach(t=>{(0,a.to)(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#u.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,a.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===a.CN&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#u.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#c.clear(),this.#n.clear()}}},21770:function(e,t,n){"use strict";n.d(t,{D:function(){return u}});var a=n(2265),o=n(2894),r=n(18238),s=n(24112),i=n(45345),l=class extends s.l{#e;#b=void 0;#v;#y;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#g()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,i.VS)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#v,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,i.Ym)(t.mutationKey)!==(0,i.Ym)(this.options.mutationKey)?this.reset():this.#v?.state.status==="pending"&&this.#v.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#v?.removeObserver(this)}onMutationUpdate(e){this.#g(),this.#x(e)}getCurrentResult(){return this.#b}reset(){this.#v?.removeObserver(this),this.#v=void 0,this.#g(),this.#x()}mutate(e,t){return this.#y=t,this.#v?.removeObserver(this),this.#v=this.#e.getMutationCache().build(this.#e,this.options),this.#v.addObserver(this),this.#v.execute(e)}#g(){let e=this.#v?.state??(0,o.R)();this.#b={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#x(e){r.Vr.batch(()=>{if(this.#y&&this.hasListeners()){let t=this.#b.variables,n=this.#b.context,a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type==="success"?(this.#y.onSuccess?.(e.data,t,n,a),this.#y.onSettled?.(e.data,null,t,n,a)):e?.type==="error"&&(this.#y.onError?.(e.error,t,n,a),this.#y.onSettled?.(void 0,e.error,t,n,a))}this.listeners.forEach(e=>{e(this.#b)})})}},c=n(29827);function u(e,t){let n=(0,c.NL)(t),[o]=a.useState(()=>new l(n,e));a.useEffect(()=>{o.setOptions(e)},[o,e]);let s=a.useSyncExternalStore(a.useCallback(e=>o.subscribe(r.Vr.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),u=a.useCallback((e,t)=>{o.mutate(e,t).catch(i.ZT)},[o]);if(s.error&&(0,i.L3)(o.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:u,mutateAsync:s.mutate}}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5736-9031c5108cb49a26.js b/litellm/proxy/_experimental/out/_next/static/chunks/5736-9031c5108cb49a26.js
new file mode 100644
index 00000000000..020455bd857
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/5736-9031c5108cb49a26.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5736,1070,5631],{88009:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},93750:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M296 250c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm184 144H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 458H208V148h560v320c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm440-88H728v-36.6c46.3-13.8 80-56.6 80-107.4 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 50.7 33.7 93.6 80 107.4V764H520c-8.8 0-16 7.2-16 16v152c0 8.8 7.2 16 16 16h352c8.8 0 16-7.2 16-16V780c0-8.8-7.2-16-16-16zM646 620c0-27.6 22.4-50 50-50s50 22.4 50 50-22.4 50-50 50-50-22.4-50-50zm180 266H566v-60h260v60z"}}]},name:"audit",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},37527:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M894 462c30.9 0 43.8-39.7 18.7-58L530.8 126.2a31.81 31.81 0 00-37.6 0L111.3 404c-25.1 18.2-12.2 58 18.8 58H192v374h-72c-4.4 0-8 3.6-8 8v52c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-52c0-4.4-3.6-8-8-8h-72V462h62zM512 196.7l271.1 197.2H240.9L512 196.7zM264 462h117v374H264V462zm189 0h117v374H453V462zm307 374H642V462h118v374z"}}]},name:"bank",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},9775:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},11429:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M766.4 744.3c43.7 0 79.4-36.2 79.4-80.5 0-53.5-79.4-140.8-79.4-140.8S687 610.3 687 663.8c0 44.3 35.7 80.5 79.4 80.5zm-377.1-44.1c7.1 7.1 18.6 7.1 25.6 0l256.1-256c7.1-7.1 7.1-18.6 0-25.6l-256-256c-.6-.6-1.3-1.2-2-1.7l-78.2-78.2a9.11 9.11 0 00-12.8 0l-48 48a9.11 9.11 0 000 12.8l67.2 67.2-207.8 207.9c-7.1 7.1-7.1 18.6 0 25.6l255.9 256zm12.9-448.6l178.9 178.9H223.4l178.8-178.9zM904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8z"}}]},name:"bg-colors",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},68208:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},71916:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-260 72h96v209.9L621.5 312 572 347.4V136zm220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3a15.9 15.9 0 0022.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z"}}]},name:"book",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},49634:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},99458:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},41169:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 472a40 40 0 1080 0 40 40 0 10-80 0zm367 352.9L696.3 352V178H768v-68H256v68h71.7v174L145 824.9c-2.8 7.4-4.3 15.2-4.3 23.1 0 35.3 28.7 64 64 64h614.6c7.9 0 15.7-1.5 23.1-4.3 33-12.7 49.4-49.8 36.6-82.8zM395.7 364.7V180h232.6v184.7L719.2 600c-20.7-5.3-42.1-8-63.9-8-61.2 0-119.2 21.5-165.3 60a188.78 188.78 0 01-121.3 43.9c-32.7 0-64.1-8.3-91.8-23.7l118.8-307.5zM210.5 844l41.7-107.8c35.7 18.1 75.4 27.8 116.6 27.8 61.2 0 119.2-21.5 165.3-60 33.9-28.2 76.3-43.9 121.3-43.9 35 0 68.4 9.5 97.6 27.1L813.5 844h-603z"}}]},name:"experiment",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},60216:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0010.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 00-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"}}]},name:"file-excel",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},10798:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z"}}]},name:"filter",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},64739:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},46783:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},48231:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6a8.03 8.03 0 00-11.3 0l-230 229.9L461.4 404a8.03 8.03 0 00-11.3 0L266.3 586.7a8.03 8.03 0 000 11.3l39.5 39.7z"}}]},name:"line-chart",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},45246:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},28595:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},34419:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},89245:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},78355:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},23907:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},40312:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z"}}]},name:"shopping-cart",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},8881:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},41361:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),a=n(2265),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"},c=n(55015),l=a.forwardRef(function(e,t){return a.createElement(c.Z,(0,o.Z)({},e,{ref:t,icon:r}))})},59664:function(e,t,n){n.d(t,{Z:function(){return z}});var o=n(5853),a=n(2265),r=n(47625),c=n(93765),l=n(54061),i=n(97059),s=n(62994),d=n(25311),u=(0,c.z)({chartName:"LineChart",GraphicalChild:l.x,axisComponents:[{axisType:"xAxis",AxisComp:i.K},{axisType:"yAxis",AxisComp:s.B}],formatAxisMap:d.t9}),m=n(56940),h=n(26680),f=n(8147),p=n(22190),g=n(81889),v=n(65278),k=n(98593),b=n(92666),y=n(32644),x=n(7084),w=n(26898),Z=n(13241),E=n(1153);let z=a.forwardRef((e,t)=>{let{data:n=[],categories:c=[],index:d,colors:z=w.s,valueFormatter:M=E.Cj,startEndOnly:C=!1,showXAxis:O=!0,showYAxis:j=!0,yAxisWidth:S=56,intervalType:H="equidistantPreserveStart",animationDuration:N=900,showAnimation:L=!1,showTooltip:V=!0,showLegend:B=!0,showGridLines:R=!0,autoMinValue:T=!1,curveType:q="linear",minValue:A,maxValue:_,connectNulls:P=!1,allowDecimals:I=!0,noDataText:W,className:F,onValueChange:K,enableLegendSlider:D=!1,customTooltip:G,rotateLabelX:X,padding:Y=O||j?{left:20,right:20}:{left:0,right:0},tickGap:$=5,xAxisLabel:J,yAxisLabel:U}=e,Q=(0,o._T)(e,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","intervalType","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","noDataText","className","onValueChange","enableLegendSlider","customTooltip","rotateLabelX","padding","tickGap","xAxisLabel","yAxisLabel"]),[ee,et]=(0,a.useState)(60),[en,eo]=(0,a.useState)(void 0),[ea,er]=(0,a.useState)(void 0),ec=(0,y.me)(c,z),el=(0,y.i4)(T,A,_),ei=!!K;function es(e){ei&&(e===ea&&!en||(0,y.FB)(n,e)&&en&&en.dataKey===e?(er(void 0),null==K||K(null)):(er(e),null==K||K({eventType:"category",categoryClicked:e})),eo(void 0))}return a.createElement("div",Object.assign({ref:t,className:(0,Z.q)("w-full h-80",F)},Q),a.createElement(r.h,{className:"h-full w-full"},(null==n?void 0:n.length)?a.createElement(u,{data:n,onClick:ei&&(ea||en)?()=>{eo(void 0),er(void 0),null==K||K(null)}:void 0,margin:{bottom:J?30:void 0,left:U?20:void 0,right:U?5:void 0,top:5}},R?a.createElement(m.q,{className:(0,Z.q)("stroke-1","stroke-tremor-border","dark:stroke-dark-tremor-border"),horizontal:!0,vertical:!1}):null,a.createElement(i.K,{padding:Y,hide:!O,dataKey:d,interval:C?"preserveStartEnd":H,tick:{transform:"translate(0, 6)"},ticks:C?[n[0][d],n[n.length-1][d]]:void 0,fill:"",stroke:"",className:(0,Z.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickLine:!1,axisLine:!1,minTickGap:$,angle:null==X?void 0:X.angle,dy:null==X?void 0:X.verticalShift,height:null==X?void 0:X.xAxisHeight},J&&a.createElement(h._,{position:"insideBottom",offset:-20,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},J)),a.createElement(s.B,{width:S,hide:!j,axisLine:!1,tickLine:!1,type:"number",domain:el,tick:{transform:"translate(-3, 0)"},fill:"",stroke:"",className:(0,Z.q)("text-tremor-label","fill-tremor-content","dark:fill-dark-tremor-content"),tickFormatter:M,allowDecimals:I},U&&a.createElement(h._,{position:"insideLeft",style:{textAnchor:"middle"},angle:-90,offset:-15,className:"fill-tremor-content-emphasis text-tremor-default font-medium dark:fill-dark-tremor-content-emphasis"},U)),a.createElement(f.u,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:V?e=>{let{active:t,payload:n,label:o}=e;return G?a.createElement(G,{payload:null==n?void 0:n.map(e=>{var t;return Object.assign(Object.assign({},e),{color:null!==(t=ec.get(e.dataKey))&&void 0!==t?t:x.fr.Gray})}),active:t,label:o}):a.createElement(k.ZP,{active:t,payload:n,label:o,valueFormatter:M,categoryColors:ec})}:a.createElement(a.Fragment,null),position:{y:0}}),B?a.createElement(p.D,{verticalAlign:"top",height:ee,content:e=>{let{payload:t}=e;return(0,v.Z)({payload:t},ec,et,ea,ei?e=>es(e):void 0,D)}}):null,c.map(e=>{var t;return a.createElement(l.x,{className:(0,Z.q)((0,E.bM)(null!==(t=ec.get(e))&&void 0!==t?t:x.fr.Gray,w.K.text).strokeColor),strokeOpacity:en||ea&&ea!==e?.3:1,activeDot:e=>{var t;let{cx:o,cy:r,stroke:c,strokeLinecap:l,strokeLinejoin:i,strokeWidth:s,dataKey:d}=e;return a.createElement(g.o,{className:(0,Z.q)("stroke-tremor-background dark:stroke-dark-tremor-background",K?"cursor-pointer":"",(0,E.bM)(null!==(t=ec.get(d))&&void 0!==t?t:x.fr.Gray,w.K.text).fillColor),cx:o,cy:r,r:5,fill:"",stroke:c,strokeLinecap:l,strokeLinejoin:i,strokeWidth:s,onClick:(t,o)=>{o.stopPropagation(),ei&&(e.index===(null==en?void 0:en.index)&&e.dataKey===(null==en?void 0:en.dataKey)||(0,y.FB)(n,e.dataKey)&&ea&&ea===e.dataKey?(er(void 0),eo(void 0),null==K||K(null)):(er(e.dataKey),eo({index:e.index,dataKey:e.dataKey}),null==K||K(Object.assign({eventType:"dot",categoryClicked:e.dataKey},e.payload))))}})},dot:t=>{var o;let{stroke:r,strokeLinecap:c,strokeLinejoin:l,strokeWidth:i,cx:s,cy:d,dataKey:u,index:m}=t;return(0,y.FB)(n,e)&&!(en||ea&&ea!==e)||(null==en?void 0:en.index)===m&&(null==en?void 0:en.dataKey)===e?a.createElement(g.o,{key:m,cx:s,cy:d,r:5,stroke:r,fill:"",strokeLinecap:c,strokeLinejoin:l,strokeWidth:i,className:(0,Z.q)("stroke-tremor-background dark:stroke-dark-tremor-background",K?"cursor-pointer":"",(0,E.bM)(null!==(o=ec.get(u))&&void 0!==o?o:x.fr.Gray,w.K.text).fillColor)}):a.createElement(a.Fragment,{key:m})},key:e,name:e,type:q,dataKey:e,stroke:"",strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",isAnimationActive:L,animationDuration:N,connectNulls:P})}),K?c.map(e=>a.createElement(l.x,{className:(0,Z.q)("cursor-pointer"),strokeOpacity:0,key:e,name:e,type:q,dataKey:e,stroke:"transparent",fill:"transparent",legendType:"none",tooltipType:"none",strokeWidth:12,connectNulls:P,onClick:(e,t)=>{t.stopPropagation();let{name:n}=e;es(n)}})):null):a.createElement(b.Z,{noDataText:W})))});z.displayName="LineChart"},16853:function(e,t,n){n.d(t,{Z:function(){return d}});var o=n(5853),a=n(96398),r=n(44140),c=n(2265),l=n(13241),i=n(1153);let s=(0,i.fn)("Textarea"),d=c.forwardRef((e,t)=>{let{value:n,defaultValue:d="",placeholder:u="Type...",error:m=!1,errorMessage:h,disabled:f=!1,className:p,onChange:g,onValueChange:v,autoHeight:k=!1}=e,b=(0,o._T)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[y,x]=(0,r.Z)(d,n),w=(0,c.useRef)(null),Z=(0,a.Uh)(y);return(0,c.useEffect)(()=>{let e=w.current;if(k&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[k,w,y]),c.createElement(c.Fragment,null,c.createElement("textarea",Object.assign({ref:(0,i.lq)([w,t]),value:y,placeholder:u,disabled:f,className:(0,l.q)(s("Textarea"),"w-full flex items-center outline-none rounded-tremor-default px-3 py-2 text-tremor-default focus:ring-2 transition duration-100 border","shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:shadow-dark-tremor-input focus:dark:border-dark-tremor-brand-subtle focus:dark:ring-dark-tremor-brand-muted",(0,a.um)(Z,f,m),f?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",p),"data-testid":"text-area",onChange:e=>{null==g||g(e),x(e.target.value),null==v||v(e.target.value)}},b)),m&&h?c.createElement("p",{className:(0,l.q)(s("errorMessage"),"text-sm text-red-500 mt-1")},h):null)});d.displayName="Textarea"},94789:function(e,t,n){n.d(t,{Z:function(){return s}});var o=n(5853),a=n(2265),r=n(26898),c=n(13241),l=n(1153);let i=(0,l.fn)("Callout"),s=a.forwardRef((e,t)=>{let{title:n,icon:s,color:d,className:u,children:m}=e,h=(0,o._T)(e,["title","icon","color","className","children"]);return a.createElement("div",Object.assign({ref:t,className:(0,c.q)(i("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",d?(0,c.q)((0,l.bM)(d,r.K.background).bgColor,(0,l.bM)(d,r.K.darkBorder).borderColor,(0,l.bM)(d,r.K.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,c.q)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),u)},h),a.createElement("div",{className:(0,c.q)(i("header"),"flex items-start")},s?a.createElement(s,{className:(0,c.q)(i("icon"),"flex-none h-5 w-5 mr-1.5")}):null,a.createElement("h4",{className:(0,c.q)(i("title"),"font-semibold")},n)),a.createElement("p",{className:(0,c.q)(i("body"),"overflow-y-auto",m?"mt-2":"")},m))});s.displayName="Callout"},96889:function(e,t,n){n.d(t,{Z:function(){return d}});var o=n(5853),a=n(2265),r=n(26898),c=n(13241),l=n(1153);let i=(0,l.fn)("BarList");function s(e,t){let{data:n=[],color:s,valueFormatter:d=l.Cj,showAnimation:u=!1,onValueChange:m,sortOrder:h="descending",className:f}=e,p=(0,o._T)(e,["data","color","valueFormatter","showAnimation","onValueChange","sortOrder","className"]),g=m?"button":"div",v=a.useMemo(()=>"none"===h?n:[...n].sort((e,t)=>"ascending"===h?e.value-t.value:t.value-e.value),[n,h]),k=a.useMemo(()=>{let e=Math.max(...v.map(e=>e.value),0);return v.map(t=>0===t.value?0:Math.max(t.value/e*100,2))},[v]);return a.createElement("div",Object.assign({ref:t,className:(0,c.q)(i("root"),"flex justify-between space-x-6",f),"aria-sort":h},p),a.createElement("div",{className:(0,c.q)(i("bars"),"relative w-full space-y-1.5")},v.map((e,t)=>{var n,o,d;let h=e.icon;return a.createElement(g,{key:null!==(n=e.key)&&void 0!==n?n:t,onClick:()=>{null==m||m(e)},className:(0,c.q)(i("bar"),"group w-full flex items-center rounded-tremor-small",m?["cursor-pointer","hover:bg-tremor-background-muted dark:hover:bg-dark-tremor-background-subtle/40"]:"")},a.createElement("div",{className:(0,c.q)("flex items-center rounded transition-all bg-opacity-40","h-8",e.color||s?[(0,l.bM)(null!==(o=e.color)&&void 0!==o?o:s,r.K.background).bgColor,m?"group-hover:bg-opacity-30":""]:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle/60",!m||e.color||s?"":"group-hover:bg-tremor-brand-subtle/30 group-hover:dark:bg-dark-tremor-brand-subtle/70",t===v.length-1?"mb-0":"",u?"duration-500":""),style:{width:"".concat(k[t],"%"),transition:u?"all 1s":""}},a.createElement("div",{className:(0,c.q)("absolute left-2 pr-4 flex max-w-full")},h?a.createElement(h,{className:(0,c.q)(i("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,e.href?a.createElement("a",{href:e.href,target:null!==(d=e.target)&&void 0!==d?d:"_blank",rel:"noreferrer",className:(0,c.q)(i("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default",m?"cursor-pointer":"","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis"),onClick:e=>e.stopPropagation()},e.name):a.createElement("p",{className:(0,c.q)(i("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name))))})),a.createElement("div",{className:i("labels")},v.map((e,t)=>{var n;return a.createElement("div",{key:null!==(n=e.key)&&void 0!==n?n:t,className:(0,c.q)(i("labelWrapper"),"flex justify-end items-center","h-8",t===v.length-1?"mb-0":"mb-1.5")},a.createElement("p",{className:(0,c.q)(i("labelText"),"whitespace-nowrap leading-none truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},d(e.value)))})))}s.displayName="BarList";let d=a.forwardRef(s)},69410:function(e,t,n){var o=n(54998);t.Z=o.Z},13817:function(e,t,n){n.d(t,{default:function(){return x}});var o=n(83145),a=n(2265),r=n(36760),c=n.n(r),l=n(18694),i=n(71744),s=n(80856),d=n(45287),u=n(32186),m=n(25437),h=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};function f(e){let{suffixCls:t,tagName:n,displayName:o}=e;return e=>a.forwardRef((o,r)=>a.createElement(e,Object.assign({ref:r,suffixCls:t,tagName:n},o)))}let p=a.forwardRef((e,t)=>{let{prefixCls:n,suffixCls:o,className:r,tagName:l}=e,s=h(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:d}=a.useContext(i.E_),u=d("layout",n),[f,p,g]=(0,m.ZP)(u),v=o?"".concat(u,"-").concat(o):u;return f(a.createElement(l,Object.assign({className:c()(n||v,r,p,g),ref:t},s)))}),g=a.forwardRef((e,t)=>{let{direction:n}=a.useContext(i.E_),[r,f]=a.useState([]),{prefixCls:p,className:g,rootClassName:v,children:k,hasSider:b,tagName:y,style:x}=e,w=h(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Z=(0,l.Z)(w,["suffixCls"]),{getPrefixCls:E,className:z,style:M}=(0,i.dj)("layout"),C=E("layout",p),O="boolean"==typeof b?b:!!r.length||(0,d.Z)(k).some(e=>e.type===u.Z),[j,S,H]=(0,m.ZP)(C),N=c()(C,{["".concat(C,"-has-sider")]:O,["".concat(C,"-rtl")]:"rtl"===n},z,g,v,S,H),L=a.useMemo(()=>({siderHook:{addSider:e=>{f(t=>[].concat((0,o.Z)(t),[e]))},removeSider:e=>{f(t=>t.filter(t=>t!==e))}}}),[]);return j(a.createElement(s.V.Provider,{value:L},a.createElement(y,Object.assign({ref:t,className:N,style:Object.assign(Object.assign({},M),x)},Z),k)))}),v=f({tagName:"div",displayName:"Layout"})(g),k=f({suffixCls:"header",tagName:"header",displayName:"Header"})(p),b=f({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(p),y=f({suffixCls:"content",tagName:"main",displayName:"Content"})(p);v.Header=k,v.Footer=b,v.Content=y,v.Sider=u.Z,v._InternalSiderContext=u.D;var x=v},35631:function(e,t,n){n.d(t,{Z:function(){return H}});var o=n(83145),a=n(2265),r=n(36760),c=n.n(r),l=n(53253),i=n(6543),s=n(71744),d=n(91086),u=n(33759),m=n(77774),h=n(28617),f=n(40049),p=n(10353);let g=a.createContext({});g.Consumer;var v=n(19722),k=n(54998),b=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let y=a.forwardRef((e,t)=>{let n;let{prefixCls:o,children:r,actions:l,extra:i,styles:d,className:u,classNames:m,colStyle:h}=e,f=b(e,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:p,itemLayout:y}=(0,a.useContext)(g),{getPrefixCls:x,list:w}=(0,a.useContext)(s.E_),Z=e=>{var t,n;return c()(null===(n=null===(t=null==w?void 0:w.item)||void 0===t?void 0:t.classNames)||void 0===n?void 0:n[e],null==m?void 0:m[e])},E=e=>{var t,n;return Object.assign(Object.assign({},null===(n=null===(t=null==w?void 0:w.item)||void 0===t?void 0:t.styles)||void 0===n?void 0:n[e]),null==d?void 0:d[e])},z=x("list",o),M=l&&l.length>0&&a.createElement("ul",{className:c()("".concat(z,"-item-action"),Z("actions")),key:"actions",style:E("actions")},l.map((e,t)=>a.createElement("li",{key:"".concat(z,"-item-action-").concat(t)},e,t!==l.length-1&&a.createElement("em",{className:"".concat(z,"-item-action-split")})))),C=a.createElement(p?"div":"li",Object.assign({},f,p?{}:{ref:t},{className:c()("".concat(z,"-item"),{["".concat(z,"-item-no-flex")]:!("vertical"===y?!!i:(n=!1,a.Children.forEach(r,e=>{"string"==typeof e&&(n=!0)}),!(n&&a.Children.count(r)>1)))},u)}),"vertical"===y&&i?[a.createElement("div",{className:"".concat(z,"-item-main"),key:"content"},r,M),a.createElement("div",{className:c()("".concat(z,"-item-extra"),Z("extra")),key:"extra",style:E("extra")},i)]:[r,M,(0,v.Tm)(i,{key:"extra"})]);return p?a.createElement(k.Z,{ref:t,flex:1,style:h},C):C});y.Meta=e=>{var{prefixCls:t,className:n,avatar:o,title:r,description:l}=e,i=b(e,["prefixCls","className","avatar","title","description"]);let{getPrefixCls:d}=(0,a.useContext)(s.E_),u=d("list",t),m=c()("".concat(u,"-item-meta"),n),h=a.createElement("div",{className:"".concat(u,"-item-meta-content")},r&&a.createElement("h4",{className:"".concat(u,"-item-meta-title")},r),l&&a.createElement("div",{className:"".concat(u,"-item-meta-description")},l));return a.createElement("div",Object.assign({},i,{className:m}),o&&a.createElement("div",{className:"".concat(u,"-item-meta-avatar")},o),(r||l)&&h)};var x=n(93463),w=n(12918),Z=n(99320),E=n(71140);let z=e=>{let{listBorderedCls:t,componentCls:n,paddingLG:o,margin:a,itemPaddingSM:r,itemPaddingLG:c,marginLG:l,borderRadiusLG:i}=e,s=(0,x.bf)(e.calc(i).sub(e.lineWidth).equal());return{[t]:{border:"".concat((0,x.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:i,["".concat(n,"-header")]:{borderRadius:"".concat(s," ").concat(s," 0 0")},["".concat(n,"-footer")]:{borderRadius:"0 0 ".concat(s," ").concat(s)},["".concat(n,"-header,").concat(n,"-footer,").concat(n,"-item")]:{paddingInline:o},["".concat(n,"-pagination")]:{margin:"".concat((0,x.bf)(a)," ").concat((0,x.bf)(l))}},["".concat(t).concat(n,"-sm")]:{["".concat(n,"-item,").concat(n,"-header,").concat(n,"-footer")]:{padding:r}},["".concat(t).concat(n,"-lg")]:{["".concat(n,"-item,").concat(n,"-header,").concat(n,"-footer")]:{padding:c}}}},M=e=>{let{componentCls:t,screenSM:n,screenMD:o,marginLG:a,marginSM:r,margin:c}=e;return{["@media screen and (max-width:".concat(o,"px)")]:{[t]:{["".concat(t,"-item")]:{["".concat(t,"-item-action")]:{marginInlineStart:a}}},["".concat(t,"-vertical")]:{["".concat(t,"-item")]:{["".concat(t,"-item-extra")]:{marginInlineStart:a}}}},["@media screen and (max-width: ".concat(n,"px)")]:{[t]:{["".concat(t,"-item")]:{flexWrap:"wrap",["".concat(t,"-action")]:{marginInlineStart:r}}},["".concat(t,"-vertical")]:{["".concat(t,"-item")]:{flexWrap:"wrap-reverse",["".concat(t,"-item-main")]:{minWidth:e.contentWidth},["".concat(t,"-item-extra")]:{margin:"auto auto ".concat((0,x.bf)(c))}}}}}},C=e=>{let{componentCls:t,antCls:n,controlHeight:o,minHeight:a,paddingSM:r,marginLG:c,padding:l,itemPadding:i,colorPrimary:s,itemPaddingSM:d,itemPaddingLG:u,paddingXS:m,margin:h,colorText:f,colorTextDescription:p,motionDurationSlow:g,lineWidth:v,headerBg:k,footerBg:b,emptyTextPadding:y,metaMarginBottom:Z,avatarMarginRight:E,titleMarginBottom:z,descriptionFontSize:M}=e;return{[t]:Object.assign(Object.assign({},(0,w.Wf)(e)),{position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},["".concat(t,"-header")]:{background:k},["".concat(t,"-footer")]:{background:b},["".concat(t,"-header, ").concat(t,"-footer")]:{paddingBlock:r},["".concat(t,"-pagination")]:{marginBlockStart:c,["".concat(n,"-pagination-options")]:{textAlign:"start"}},["".concat(t,"-spin")]:{minHeight:a,textAlign:"center"},["".concat(t,"-items")]:{margin:0,padding:0,listStyle:"none"},["".concat(t,"-item")]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:i,color:f,["".concat(t,"-item-meta")]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",["".concat(t,"-item-meta-avatar")]:{marginInlineEnd:E},["".concat(t,"-item-meta-content")]:{flex:"1 0",width:0,color:f},["".concat(t,"-item-meta-title")]:{margin:"0 0 ".concat((0,x.bf)(e.marginXXS)," 0"),color:f,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:f,transition:"all ".concat(g),"&:hover":{color:s}}},["".concat(t,"-item-meta-description")]:{color:p,fontSize:M,lineHeight:e.lineHeight}},["".concat(t,"-item-action")]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:"0 ".concat((0,x.bf)(m)),color:p,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},["".concat(t,"-item-action-split")]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:v,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},["".concat(t,"-empty")]:{padding:"".concat((0,x.bf)(l)," 0"),color:p,fontSize:e.fontSizeSM,textAlign:"center"},["".concat(t,"-empty-text")]:{padding:y,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},["".concat(t,"-item-no-flex")]:{display:"block"}}),["".concat(t,"-grid ").concat(n,"-col > ").concat(t,"-item")]:{display:"block",maxWidth:"100%",marginBlockEnd:h,paddingBlock:0,borderBlockEnd:"none"},["".concat(t,"-vertical ").concat(t,"-item")]:{alignItems:"initial",["".concat(t,"-item-main")]:{display:"block",flex:1},["".concat(t,"-item-extra")]:{marginInlineStart:c},["".concat(t,"-item-meta")]:{marginBlockEnd:Z,["".concat(t,"-item-meta-title")]:{marginBlockStart:0,marginBlockEnd:z,color:f,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},["".concat(t,"-item-action")]:{marginBlockStart:l,marginInlineStart:"auto","> li":{padding:"0 ".concat((0,x.bf)(l)),"&:first-child":{paddingInlineStart:0}}}},["".concat(t,"-split ").concat(t,"-item")]:{borderBlockEnd:"".concat((0,x.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit),"&:last-child":{borderBlockEnd:"none"}},["".concat(t,"-split ").concat(t,"-header")]:{borderBlockEnd:"".concat((0,x.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)},["".concat(t,"-split").concat(t,"-empty ").concat(t,"-footer")]:{borderTop:"".concat((0,x.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)},["".concat(t,"-loading ").concat(t,"-spin-nested-loading")]:{minHeight:o},["".concat(t,"-split").concat(t,"-something-after-last-item ").concat(n,"-spin-container > ").concat(t,"-items > ").concat(t,"-item:last-child")]:{borderBlockEnd:"".concat((0,x.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorSplit)},["".concat(t,"-lg ").concat(t,"-item")]:{padding:u},["".concat(t,"-sm ").concat(t,"-item")]:{padding:d},["".concat(t,":not(").concat(t,"-vertical)")]:{["".concat(t,"-item-no-flex")]:{["".concat(t,"-item-action")]:{float:"right"}}}}};var O=(0,Z.I$)("List",e=>{let t=(0,E.IX)(e,{listBorderedCls:"".concat(e.componentCls,"-bordered"),minHeight:e.controlHeightLG});return[C(t),z(t),M(t)]},e=>({contentWidth:220,itemPadding:"".concat((0,x.bf)(e.paddingContentVertical)," 0"),itemPaddingSM:"".concat((0,x.bf)(e.paddingContentVerticalSM)," ").concat((0,x.bf)(e.paddingContentHorizontal)),itemPaddingLG:"".concat((0,x.bf)(e.paddingContentVerticalLG)," ").concat((0,x.bf)(e.paddingContentHorizontalLG)),headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize})),j=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let S=a.forwardRef(function(e,t){let{pagination:n=!1,prefixCls:r,bordered:v=!1,split:k=!0,className:b,rootClassName:y,style:x,children:w,itemLayout:Z,loadMore:E,grid:z,dataSource:M=[],size:C,header:S,footer:H,loading:N=!1,rowKey:L,renderItem:V,locale:B}=e,R=j(e,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),T=n&&"object"==typeof n?n:{},[q,A]=a.useState(T.defaultCurrent||1),[_,P]=a.useState(T.defaultPageSize||10),{getPrefixCls:I,direction:W,className:F,style:K}=(0,s.dj)("list"),{renderEmpty:D}=a.useContext(s.E_),G=e=>(t,o)=>{var a;A(t),P(o),n&&(null===(a=null==n?void 0:n[e])||void 0===a||a.call(n,t,o))},X=G("onChange"),Y=G("onShowSizeChange"),$=!!(E||n||H),J=I("list",r),[U,Q,ee]=O(J),et=N;"boolean"==typeof et&&(et={spinning:et});let en=!!(null==et?void 0:et.spinning),eo=(0,u.Z)(C),ea="";switch(eo){case"large":ea="lg";break;case"small":ea="sm"}let er=c()(J,{["".concat(J,"-vertical")]:"vertical"===Z,["".concat(J,"-").concat(ea)]:ea,["".concat(J,"-split")]:k,["".concat(J,"-bordered")]:v,["".concat(J,"-loading")]:en,["".concat(J,"-grid")]:!!z,["".concat(J,"-something-after-last-item")]:$,["".concat(J,"-rtl")]:"rtl"===W},F,b,y,Q,ee),ec=(0,l.Z)({current:1,total:0,position:"bottom"},{total:M.length,current:q,pageSize:_},n||{}),el=Math.ceil(ec.total/ec.pageSize);ec.current=Math.min(ec.current,el);let ei=n&&a.createElement("div",{className:c()("".concat(J,"-pagination"))},a.createElement(f.Z,Object.assign({align:"end"},ec,{onChange:X,onShowSizeChange:Y}))),es=(0,o.Z)(M);n&&M.length>(ec.current-1)*ec.pageSize&&(es=(0,o.Z)(M).splice((ec.current-1)*ec.pageSize,ec.pageSize));let ed=Object.keys(z||{}).some(e=>["xs","sm","md","lg","xl","xxl"].includes(e)),eu=(0,h.Z)(ed),em=a.useMemo(()=>{for(let e=0;e{if(!z)return;let e=em&&z[em]?z[em]:z.column;if(e)return{width:"".concat(100/e,"%"),maxWidth:"".concat(100/e,"%")}},[JSON.stringify(z),em]),ef=en&&a.createElement("div",{style:{minHeight:53}});if(es.length>0){let e=es.map((e,t)=>{let n;return V?((n="function"==typeof L?L(e):L?e[L]:e.key)||(n="list-item-".concat(t)),a.createElement(a.Fragment,{key:n},V(e,t))):null});ef=z?a.createElement(m.Z,{gutter:z.gutter},a.Children.map(e,e=>a.createElement("div",{key:null==e?void 0:e.key,style:eh},e))):a.createElement("ul",{className:"".concat(J,"-items")},e)}else w||en||(ef=a.createElement("div",{className:"".concat(J,"-empty-text")},(null==B?void 0:B.emptyText)||(null==D?void 0:D("List"))||a.createElement(d.Z,{componentName:"List"})));let ep=ec.position,eg=a.useMemo(()=>({grid:z,itemLayout:Z}),[JSON.stringify(z),Z]);return U(a.createElement(g.Provider,{value:eg},a.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},K),x),className:er},R),("top"===ep||"both"===ep)&&ei,S&&a.createElement("div",{className:"".concat(J,"-header")},S),a.createElement(p.Z,Object.assign({},et),ef,w),H&&a.createElement("div",{className:"".concat(J,"-footer")},H),E||("bottom"===ep||"both"===ep)&&ei)))});S.Item=y;var H=S},867:function(e,t,n){n.d(t,{Z:function(){return z}});var o=n(2265),a=n(54537),r=n(36760),c=n.n(r),l=n(50506),i=n(18694),s=n(71744),d=n(79326),u=n(59367),m=n(92570),h=n(5545),f=n(51248),p=n(55274),g=n(37381),v=n(20435),k=n(99320);let b=e=>{let{componentCls:t,iconCls:n,antCls:o,zIndexPopup:a,colorText:r,colorWarning:c,marginXXS:l,marginXS:i,fontSize:s,fontWeightStrong:d,colorTextHeading:u}=e;return{[t]:{zIndex:a,["&".concat(o,"-popover")]:{fontSize:s},["".concat(t,"-message")]:{marginBottom:i,display:"flex",flexWrap:"nowrap",alignItems:"start",["> ".concat(t,"-message-icon ").concat(n)]:{color:c,fontSize:s,lineHeight:1,marginInlineEnd:i},["".concat(t,"-title")]:{fontWeight:d,color:u,"&:only-child":{fontWeight:"normal"}},["".concat(t,"-description")]:{marginTop:l,color:r}},["".concat(t,"-buttons")]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:i}}}}};var y=(0,k.I$)("Popconfirm",e=>b(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1}),x=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let w=e=>{let{prefixCls:t,okButtonProps:n,cancelButtonProps:r,title:c,description:l,cancelText:i,okText:d,okType:v="primary",icon:k=o.createElement(a.Z,null),showCancel:b=!0,close:y,onConfirm:x,onCancel:w,onPopupClick:Z}=e,{getPrefixCls:E}=o.useContext(s.E_),[z]=(0,p.Z)("Popconfirm",g.Z.Popconfirm),M=(0,m.Z)(c),C=(0,m.Z)(l);return o.createElement("div",{className:"".concat(t,"-inner-content"),onClick:Z},o.createElement("div",{className:"".concat(t,"-message")},k&&o.createElement("span",{className:"".concat(t,"-message-icon")},k),o.createElement("div",{className:"".concat(t,"-message-text")},M&&o.createElement("div",{className:"".concat(t,"-title")},M),C&&o.createElement("div",{className:"".concat(t,"-description")},C))),o.createElement("div",{className:"".concat(t,"-buttons")},b&&o.createElement(h.ZP,Object.assign({onClick:w,size:"small"},r),i||(null==z?void 0:z.cancelText)),o.createElement(u.Z,{buttonProps:Object.assign(Object.assign({size:"small"},(0,f.nx)(v)),n),actionFn:x,close:y,prefixCls:E("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},d||(null==z?void 0:z.okText))))};var Z=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let E=o.forwardRef((e,t)=>{var n,r;let{prefixCls:u,placement:m="top",trigger:h="click",okType:f="primary",icon:p=o.createElement(a.Z,null),children:g,overlayClassName:v,onOpenChange:k,onVisibleChange:b,overlayStyle:x,styles:E,classNames:z}=e,M=Z(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:C,className:O,style:j,classNames:S,styles:H}=(0,s.dj)("popconfirm"),[N,L]=(0,l.Z)(!1,{value:null!==(n=e.open)&&void 0!==n?n:e.visible,defaultValue:null!==(r=e.defaultOpen)&&void 0!==r?r:e.defaultVisible}),V=(e,t)=>{L(e,!0),null==b||b(e),null==k||k(e,t)},B=C("popconfirm",u),R=c()(B,O,v,S.root,null==z?void 0:z.root),T=c()(S.body,null==z?void 0:z.body),[q]=y(B);return q(o.createElement(d.Z,Object.assign({},(0,i.Z)(M,["title"]),{trigger:h,placement:m,onOpenChange:(t,n)=>{let{disabled:o=!1}=e;o||V(t,n)},open:N,ref:t,classNames:{root:R,body:T},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},H.root),j),x),null==E?void 0:E.root),body:Object.assign(Object.assign({},H.body),null==E?void 0:E.body)},content:o.createElement(w,Object.assign({okType:f,icon:p},e,{prefixCls:B,close:e=>{V(!1,e)},onConfirm:t=>{var n;return null===(n=e.onConfirm)||void 0===n?void 0:n.call(void 0,t)},onCancel:t=>{var n;V(!1,t),null===(n=e.onCancel)||void 0===n||n.call(void 0,t)}})),"data-popover-inject":!0}),g))});E._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,placement:n,className:a,style:r}=e,l=x(e,["prefixCls","placement","className","style"]),{getPrefixCls:i}=o.useContext(s.E_),d=i("popconfirm",t),[u]=y(d);return u(o.createElement(v.ZP,{placement:n,className:c()(d,a),style:r,content:o.createElement(w,Object.assign({prefixCls:d},l))}))};var z=E},47451:function(e,t,n){var o=n(77774);t.Z=o.Z},45235:function(e,t,n){n.d(t,{Z:function(){return E}});var o=n(2265),a=n(74126),r=n(53346),c=n(19722),l=n(36760),i=n.n(l),s=n(18242),d=n(71744),u=n(50337),m=e=>{let t;let{value:n,formatter:a,precision:r,decimalSeparator:c,groupSeparator:l="",prefixCls:i}=e;if("function"==typeof a)t=a(n);else{let e=String(n),a=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(a&&"-"!==e){let e=a[1],n=a[2]||"0",s=a[4]||"";n=n.replace(/\B(?=(\d{3})+(?!\d))/g,l),"number"==typeof r&&(s=s.padEnd(r,"0").slice(0,r>0?r:0)),s&&(s="".concat(c).concat(s)),t=[o.createElement("span",{key:"int",className:"".concat(i,"-content-value-int")},e,n),s&&o.createElement("span",{key:"decimal",className:"".concat(i,"-content-value-decimal")},s)]}else t=e}return o.createElement("span",{className:"".concat(i,"-content-value")},t)},h=n(12918),f=n(99320),p=n(71140);let g=e=>{let{componentCls:t,marginXXS:n,padding:o,colorTextDescription:a,titleFontSize:r,colorTextHeading:c,contentFontSize:l,fontFamily:i}=e;return{[t]:Object.assign(Object.assign({},(0,h.Wf)(e)),{["".concat(t,"-title")]:{marginBottom:n,color:a,fontSize:r},["".concat(t,"-skeleton")]:{paddingTop:o},["".concat(t,"-content")]:{color:c,fontSize:l,fontFamily:i,["".concat(t,"-content-value")]:{display:"inline-block",direction:"ltr"},["".concat(t,"-content-prefix, ").concat(t,"-content-suffix")]:{display:"inline-block"},["".concat(t,"-content-prefix")]:{marginInlineEnd:n},["".concat(t,"-content-suffix")]:{marginInlineStart:n}}})}};var v=(0,f.I$)("Statistic",e=>g((0,p.IX)(e,{})),e=>{let{fontSizeHeading3:t,fontSize:n}=e;return{titleFontSize:n,contentFontSize:t}}),k=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let b=o.forwardRef((e,t)=>{let{prefixCls:n,className:a,rootClassName:r,style:c,valueStyle:l,value:h=0,title:f,valueRender:p,prefix:g,suffix:b,loading:y=!1,formatter:x,precision:w,decimalSeparator:Z=".",groupSeparator:E=",",onMouseEnter:z,onMouseLeave:M}=e,C=k(e,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:O,direction:j,className:S,style:H}=(0,d.dj)("statistic"),N=O("statistic",n),[L,V,B]=v(N),R=o.createElement(m,{decimalSeparator:Z,groupSeparator:E,prefixCls:N,formatter:x,precision:w,value:h}),T=i()(N,{["".concat(N,"-rtl")]:"rtl"===j},S,a,r,V,B),q=o.useRef(null);o.useImperativeHandle(t,()=>({nativeElement:q.current}));let A=(0,s.Z)(C,{aria:!0,data:!0});return L(o.createElement("div",Object.assign({},A,{ref:q,className:T,style:Object.assign(Object.assign({},H),c),onMouseEnter:z,onMouseLeave:M}),f&&o.createElement("div",{className:"".concat(N,"-title")},f),o.createElement(u.Z,{paragraph:!1,loading:y,className:"".concat(N,"-skeleton"),active:!0},o.createElement("div",{style:l,className:"".concat(N,"-content")},g&&o.createElement("span",{className:"".concat(N,"-content-prefix")},g),p?p(R):R,b&&o.createElement("span",{className:"".concat(N,"-content-suffix")},b)))))}),y=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];var x=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n},w=e=>{let{value:t,format:n="HH:mm:ss",onChange:l,onFinish:i,type:s}=e,d=x(e,["value","format","onChange","onFinish","type"]),u="countdown"===s,[m,h]=o.useState(null),f=(0,a.zX)(()=>{let e=Date.now(),n=new Date(t).getTime();return h({}),null==l||l(u?n-e:e-n),!u||!(n{let e;let t=()=>{e=(0,r.Z)(()=>{f()&&t()})};return t(),()=>r.Z.cancel(e)},[t,u]),o.useEffect(()=>{h({})},[]),o.createElement(b,Object.assign({},d,{value:t,valueRender:e=>(0,c.Tm)(e,{title:void 0}),formatter:(e,t)=>m?function(e,t,n){let{format:o=""}=t,a=new Date(e).getTime(),r=Date.now();return function(e,t){let n=e,o=/\[[^\]]*]/g,a=(t.match(o)||[]).map(e=>e.slice(1,-1)),r=t.replace(o,"[]"),c=y.reduce((e,t)=>{let[o,a]=t;if(e.includes(o)){let t=Math.floor(n/a);return n-=t*a,e.replace(RegExp("".concat(o,"+"),"g"),e=>{let n=e.length;return t.toString().padStart(n,"0")})}return e},r),l=0;return c.replace(o,()=>{let e=a[l];return l+=1,e})}(n?Math.max(a-r,0):Math.max(r-a,0),o)}(e,Object.assign(Object.assign({},t),{format:n}),u):"-"}))},Z=o.memo(e=>o.createElement(w,Object.assign({},e,{type:"countdown"})));b.Timer=w,b.Countdown=Z;var E=b},32660:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},76858:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},82222:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},40875:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},22135:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},41671:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},66344:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},5136:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]])},91723:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},64935:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]])},96362:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},87769:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},42208:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},3577:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]])},29202:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},41905:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]])},33245:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},54001:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]])},51817:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},11:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},21047:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},33276:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},69076:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},83229:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},73247:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},96137:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},98728:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},88906:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]])},15868:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])},80221:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]])},18930:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},27413:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]])},70525:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]])},76865:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},17689:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},49663:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},79862:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("user-round",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]])},92369:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},95805:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},11239:function(e,t,n){n.d(t,{Z:function(){return o}});let o=(0,n(79205).Z)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},1479:function(e,t){t.Z={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}}},82422:function(e,t,n){var o=n(2265);let a=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))});t.Z=a},51853:function(e,t,n){var o=n(2265);let a=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});t.Z=a},3477:function(e,t,n){var o=n(2265);let a=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});t.Z=a},71437:function(e,t,n){var o=n(2265);let a=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"}))});t.Z=a},82376:function(e,t,n){var o=n(2265);let a=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"}))});t.Z=a},15731:function(e,t,n){var o=n(2265);let a=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=a},45589:function(e,t,n){var o=n(2265);let a=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"}))});t.Z=a},53410:function(e,t,n){var o=n(2265);let a=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});t.Z=a},91126:function(e,t,n){var o=n(2265);let a=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=a},17732:function(e,t,n){var o=n(2265);let a=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))});t.Z=a},3837:function(e,t,n){var o=n(2265);let a=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});t.Z=a},19616:function(e,t,n){n.d(t,{G:function(){return c}});var o=n(2265);let a={enabled:!0,leading:!1,trailing:!0,wait:0,onExecute:()=>{}};class r{constructor(e,t){this.fn=e,this._canLeadingExecute=!0,this._isPending=!1,this._executionCount=0,this._options={...a,...t}}setOptions(e){return this._options={...this._options,...e},this._options.enabled||(this._isPending=!1),this._options}getOptions(){return this._options}maybeExecute(...e){this._options.leading&&this._canLeadingExecute&&(this.executeFunction(...e),this._canLeadingExecute=!1),(this._options.leading||this._options.trailing)&&(this._isPending=!0),this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=setTimeout(()=>{this._canLeadingExecute=!0,this._isPending=!1,this._options.trailing&&this.executeFunction(...e)},this._options.wait)}executeFunction(...e){this._options.enabled&&(this.fn(...e),this._executionCount++,this._options.onExecute(this))}cancel(){this._timeoutId&&(clearTimeout(this._timeoutId),this._canLeadingExecute=!0,this._isPending=!1)}getExecutionCount(){return this._executionCount}getIsPending(){return this._options.enabled&&this._isPending}}function c(e,t){let[n,a]=(0,o.useState)(e),c=function(e,t){let[n]=(0,o.useState)(()=>{var n;return Object.getOwnPropertyNames(Object.getPrototypeOf(n=new r(e,t))).filter(e=>"function"==typeof n[e]).reduce((e,t)=>{let o=n[t];return"function"==typeof o&&(e[t]=o.bind(n)),e},{})});return n.setOptions(t),n}(a,t);return[n,c.maybeExecute,c]}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5767-b9e6413b33909bd8.js b/litellm/proxy/_experimental/out/_next/static/chunks/5767-b9e6413b33909bd8.js
deleted file mode 100644
index 2b988dfb330..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/5767-b9e6413b33909bd8.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5767,1623],{69993:function(e,t,r){r.d(t,{Z:function(){return s}});var n=r(1119),a=r(2265),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},i=r(55015),s=a.forwardRef(function(e,t){return a.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:o}))})},47323:function(e,t,r){r.d(t,{Z:function(){return p}});var n=r(5853),a=r(2265),o=r(47187),i=r(7084),s=r(13241),u=r(1153),l=r(26898);let c={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},h={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},f=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,u.bM)(t,l.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,u.bM)(t,l.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,u.bM)(t,l.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,u.bM)(t,l.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,u.bM)(t,l.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,u.bM)(t,l.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,s.q)((0,u.bM)(t,l.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,u.bM)(t,l.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,u.bM)(t,l.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,u.bM)(t,l.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,s.q)((0,u.bM)(t,l.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},m=(0,u.fn)("Icon"),p=a.forwardRef((e,t)=>{let{icon:r,variant:l="simple",tooltip:p,size:g=i.u8.SM,color:b,className:y}=e,v=(0,n._T)(e,["icon","variant","tooltip","size","color","className"]),w=f(l,b),{tooltipProps:k,getReferenceProps:C}=(0,o.l)();return a.createElement("span",Object.assign({ref:(0,u.lq)([t,k.refs.setReference]),className:(0,s.q)(m("root"),"inline-flex shrink-0 items-center justify-center",w.bgColor,w.textColor,w.borderColor,w.ringColor,h[l].rounded,h[l].border,h[l].shadow,h[l].ring,c[g].paddingX,c[g].paddingY,y)},C,v),a.createElement(o.Z,Object.assign({text:p},k)),a.createElement(r,{className:(0,s.q)(m("icon"),"shrink-0",d[g].height,d[g].width)}))});p.displayName="Icon"},59341:function(e,t,r){r.d(t,{Z:function(){return N}});var n=r(5853),a=r(71049),o=r(11323),i=r(2265),s=r(66797),u=r(40099),l=r(74275),c=r(59456),d=r(93980),h=r(65573),f=r(67561),m=r(87550),p=r(628),g=r(80281),b=r(31370),y=r(20131),v=r(38929),w=r(52307),k=r(52724),C=r(7935);let x=(0,i.createContext)(null);x.displayName="GroupContext";let M=i.Fragment,q=Object.assign((0,v.yV)(function(e,t){var r;let n=(0,i.useId)(),M=(0,g.Q)(),q=(0,m.B)(),{id:E=M||"headlessui-switch-".concat(n),disabled:O=q||!1,checked:P,defaultChecked:j,onChange:L,name:S,value:N,form:D,autoFocus:R=!1,...Q}=e,Z=(0,i.useContext)(x),[K,T]=(0,i.useState)(null),A=(0,i.useRef)(null),F=(0,f.T)(A,t,null===Z?null:Z.setSwitch,T),z=(0,l.L)(j),[V,H]=(0,u.q)(P,L,null!=z&&z),B=(0,c.G)(),[I,_]=(0,i.useState)(!1),W=(0,d.z)(()=>{_(!0),null==H||H(!V),B.nextFrame(()=>{_(!1)})}),G=(0,d.z)(e=>{if((0,b.P)(e.currentTarget))return e.preventDefault();e.preventDefault(),W()}),X=(0,d.z)(e=>{e.key===k.R.Space?(e.preventDefault(),W()):e.key===k.R.Enter&&(0,y.g)(e.currentTarget)}),Y=(0,d.z)(e=>e.preventDefault()),U=(0,C.wp)(),J=(0,w.zH)(),{isFocusVisible:$,focusProps:ee}=(0,a.F)({autoFocus:R}),{isHovered:et,hoverProps:er}=(0,o.X)({isDisabled:O}),{pressed:en,pressProps:ea}=(0,s.x)({disabled:O}),eo=(0,i.useMemo)(()=>({checked:V,disabled:O,hover:et,focus:$,active:en,autofocus:R,changing:I}),[V,et,$,en,O,I,R]),ei=(0,v.dG)({id:E,ref:F,role:"switch",type:(0,h.f)(e,K),tabIndex:-1===e.tabIndex?0:null!=(r=e.tabIndex)?r:0,"aria-checked":V,"aria-labelledby":U,"aria-describedby":J,disabled:O||void 0,autoFocus:R,onClick:G,onKeyUp:X,onKeyPress:Y},ee,er,ea),es=(0,i.useCallback)(()=>{if(void 0!==z)return null==H?void 0:H(z)},[H,z]),eu=(0,v.L6)();return i.createElement(i.Fragment,null,null!=S&&i.createElement(p.Mt,{disabled:O,data:{[S]:N||"on"},overrides:{type:"checkbox",checked:V},form:D,onReset:es}),eu({ourProps:ei,theirProps:Q,slot:eo,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,n]=(0,i.useState)(null),[a,o]=(0,C.bE)(),[s,u]=(0,w.fw)(),l=(0,i.useMemo)(()=>({switch:r,setSwitch:n}),[r,n]),c=(0,v.L6)();return i.createElement(u,{name:"Switch.Description",value:s},i.createElement(o,{name:"Switch.Label",value:a,props:{htmlFor:null==(t=l.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},i.createElement(x.Provider,{value:l},c({ourProps:{},theirProps:e,slot:{},defaultTag:M,name:"Switch.Group"}))))},Label:C.__,Description:w.dk});var E=r(44140),O=r(26898),P=r(13241),j=r(1153),L=r(47187);let S=(0,j.fn)("Switch"),N=i.forwardRef((e,t)=>{let{checked:r,defaultChecked:a=!1,onChange:o,color:s,name:u,error:l,errorMessage:c,disabled:d,required:h,tooltip:f,id:m}=e,p=(0,n._T)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),g={bgColor:s?(0,j.bM)(s,O.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:s?(0,j.bM)(s,O.K.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[b,y]=(0,E.Z)(a,r),[v,w]=(0,i.useState)(!1),{tooltipProps:k,getReferenceProps:C}=(0,L.l)(300);return i.createElement("div",{className:"flex flex-row items-center justify-start"},i.createElement(L.Z,Object.assign({text:f},k)),i.createElement("div",Object.assign({ref:(0,j.lq)([t,k.refs.setReference]),className:(0,P.q)(S("root"),"flex flex-row relative h-5")},p,C),i.createElement("input",{type:"checkbox",className:(0,P.q)(S("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:u,required:h,checked:b,onChange:e=>{e.preventDefault()}}),i.createElement(q,{checked:b,onChange:e=>{y(e),null==o||o(e)},disabled:d,className:(0,P.q)(S("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",d?"cursor-not-allowed":""),onFocus:()=>w(!0),onBlur:()=>w(!1),id:m},i.createElement("span",{className:(0,P.q)(S("sr-only"),"sr-only")},"Switch ",b?"on":"off"),i.createElement("span",{"aria-hidden":"true",className:(0,P.q)(S("background"),b?g.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),i.createElement("span",{"aria-hidden":"true",className:(0,P.q)(S("round"),b?(0,P.q)(g.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",v?(0,P.q)("ring-2",g.ringColor):"")}))),l&&c?i.createElement("p",{className:(0,P.q)(S("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});N.displayName="Switch"},49804:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(5853),a=r(13241),o=r(1153),i=r(2265),s=r(9496);let u=(0,o.fn)("Col"),l=i.forwardRef((e,t)=>{let{numColSpan:r=1,numColSpanSm:o,numColSpanMd:l,numColSpanLg:c,children:d,className:h}=e,f=(0,n._T)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),m=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return i.createElement("div",Object.assign({ref:t,className:(0,a.q)(u("root"),(()=>{let e=m(r,s.PT),t=m(o,s.SP),n=m(l,s.VS),i=m(c,s._w);return(0,a.q)(e,t,n,i)})(),h)},f),d)});l.displayName="Col"},94789:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(5853),a=r(2265),o=r(26898),i=r(13241),s=r(1153);let u=(0,s.fn)("Callout"),l=a.forwardRef((e,t)=>{let{title:r,icon:l,color:c,className:d,children:h}=e,f=(0,n._T)(e,["title","icon","color","className","children"]);return a.createElement("div",Object.assign({ref:t,className:(0,i.q)(u("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",c?(0,i.q)((0,s.bM)(c,o.K.background).bgColor,(0,s.bM)(c,o.K.darkBorder).borderColor,(0,s.bM)(c,o.K.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,i.q)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),d)},f),a.createElement("div",{className:(0,i.q)(u("header"),"flex items-start")},l?a.createElement(l,{className:(0,i.q)(u("icon"),"flex-none h-5 w-5 mr-1.5")}):null,a.createElement("h4",{className:(0,i.q)(u("title"),"font-semibold")},r)),a.createElement("p",{className:(0,i.q)(u("body"),"overflow-y-auto",h?"mt-2":"")},h))});l.displayName="Callout"},15051:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},49322:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},99397:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},32489:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},10900:function(e,t,r){var n=r(2265);let a=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});t.Z=a},91777:function(e,t,r){var n=r(2265);let a=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});t.Z=a},47686:function(e,t,r){var n=r(2265);let a=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});t.Z=a},58710:function(e,t,r){var n=r(2265);let a=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=a},82182:function(e,t,r){var n=r(2265);let a=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});t.Z=a},79814:function(e,t,r){var n=r(2265);let a=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))});t.Z=a},2356:function(e,t,r){var n=r(2265);let a=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});t.Z=a},93416:function(e,t,r){var n=r(2265);let a=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});t.Z=a},77355:function(e,t,r){var n=r(2265);let a=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=a},22452:function(e,t,r){var n=r(2265);let a=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});t.Z=a},25327:function(e,t,r){var n=r(2265);let a=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))});t.Z=a},49084:function(e,t,r){var n=r(2265);let a=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});t.Z=a},3497:function(e,t,r){var n=r(2265);let a=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"}))});t.Z=a},2894:function(e,t,r){r.d(t,{R:function(){return s},m:function(){return i}});var n=r(18238),a=r(7989),o=r(11255),i=class extends a.F{#e;#t;#r;#n;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#r=e.mutationCache,this.#t=[],this.state=e.state||s(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#r.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#a({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=(0,o.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#a({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});let n="pending"===this.state.status,a=!this.#n.canStart();try{if(n)t();else{this.#a({type:"pending",variables:e,isPaused:a}),await this.#r.config.onMutate?.(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:a})}let o=await this.#n.start();return await this.#r.config.onSuccess?.(o,e,this.state.context,this,r),await this.options.onSuccess?.(o,e,this.state.context,r),await this.#r.config.onSettled?.(o,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(o,null,e,this.state.context,r),this.#a({type:"success",data:o}),o}catch(t){try{throw await this.#r.config.onError?.(t,e,this.state.context,this,r),await this.options.onError?.(t,e,this.state.context,r),await this.#r.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,t,e,this.state.context,r),t}finally{this.#a({type:"error",error:t})}}finally{this.#r.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),n.Vr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#r.notify({mutation:this,type:"updated",action:e})})}};function s(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},21623:function(e,t,r){r.d(t,{S:function(){return p}});var n=r(45345),a=r(21733),o=r(18238),i=r(24112),s=class extends i.l{constructor(e={}){super(),this.config=e,this.#o=new Map}#o;build(e,t,r){let o=t.queryKey,i=t.queryHash??(0,n.Rm)(o,t),s=this.get(i);return s||(s=new a.A({client:e,queryKey:o,queryHash:i,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(o)}),this.add(s)),s}add(e){this.#o.has(e.queryHash)||(this.#o.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#o.get(e.queryHash);t&&(e.destroy(),t===e&&this.#o.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){o.Vr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#o.get(e)}getAll(){return[...this.#o.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,n._x)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,n._x)(e,t)):t}notify(e){o.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){o.Vr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){o.Vr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},u=r(2894),l=class extends i.l{constructor(e={}){super(),this.config=e,this.#i=new Set,this.#s=new Map,this.#u=0}#i;#s;#u;build(e,t,r){let n=new u.m({client:e,mutationCache:this,mutationId:++this.#u,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#i.add(e);let t=c(e);if("string"==typeof t){let r=this.#s.get(t);r?r.push(e):this.#s.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#i.delete(e)){let t=c(e);if("string"==typeof t){let r=this.#s.get(t);if(r){if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#s.delete(t)}}}this.notify({type:"removed",mutation:e})}canRun(e){let t=c(e);if("string"!=typeof t)return!0;{let r=this.#s.get(t),n=r?.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=c(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#s.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){o.Vr.batch(()=>{this.#i.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#i.clear(),this.#s.clear()})}getAll(){return Array.from(this.#i)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,n.X7)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,n.X7)(e,t))}notify(e){o.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return o.Vr.batch(()=>Promise.all(e.map(e=>e.continue().catch(n.ZT))))}};function c(e){return e.options.scope?.id}var d=r(87045),h=r(57853);function f(e){return{onFetch:(t,r)=>{let a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],s=t.state.data?.pageParams||[],u={pages:[],pageParams:[]},l=0,c=async()=>{let r=!1,c=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)})},d=(0,n.cG)(t.options,t.fetchOptions),h=async(e,a,o)=>{if(r)return Promise.reject();if(null==a&&e.pages.length)return Promise.resolve(e);let i=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:a,direction:o?"backward":"forward",meta:t.options.meta};return c(e),e})(),s=await d(i),{maxPages:u}=t.options,l=o?n.Ht:n.VX;return{pages:l(e.pages,s,u),pageParams:l(e.pageParams,a,u)}};if(o&&i.length){let e="backward"===o,t={pages:i,pageParams:s},r=(e?function(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}:m)(a,t);u=await h(t,r,e)}else{let t=e??i.length;do{let e=0===l?s[0]??a.initialPageParam:m(a,u);if(l>0&&null==e)break;u=await h(u,e),l++}while(lt.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function m(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}var p=class{#l;#r;#c;#d;#h;#f;#m;#p;constructor(e={}){this.#l=e.queryCache||new s,this.#r=e.mutationCache||new l,this.#c=e.defaultOptions||{},this.#d=new Map,this.#h=new Map,this.#f=0}mount(){this.#f++,1===this.#f&&(this.#m=d.j.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#l.onFocus())}),this.#p=h.N.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#l.onOnline())}))}unmount(){this.#f--,0===this.#f&&(this.#m?.(),this.#m=void 0,this.#p?.(),this.#p=void 0)}isFetching(e){return this.#l.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#r.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#l.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#l.build(this,t),a=r.state.data;return void 0===a?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,n.KC)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#l.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let a=this.defaultQueryOptions({queryKey:e}),o=this.#l.get(a.queryHash),i=o?.state.data,s=(0,n.SE)(t,i);if(void 0!==s)return this.#l.build(this,a).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return o.Vr.batch(()=>this.#l.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#l.get(t.queryHash)?.state}removeQueries(e){let t=this.#l;o.Vr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#l;return o.Vr.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(o.Vr.batch(()=>this.#l.findAll(e).map(e=>e.cancel(r)))).then(n.ZT).catch(n.ZT)}invalidateQueries(e,t={}){return o.Vr.batch(()=>(this.#l.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(o.Vr.batch(()=>this.#l.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(n.ZT)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(n.ZT)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#l.build(this,t);return r.isStaleByTime((0,n.KC)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(n.ZT).catch(n.ZT)}fetchInfiniteQuery(e){return e.behavior=f(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(n.ZT).catch(n.ZT)}ensureInfiniteQueryData(e){return e.behavior=f(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return h.N.isOnline()?this.#r.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#l}getMutationCache(){return this.#r}getDefaultOptions(){return this.#c}setDefaultOptions(e){this.#c=e}setQueryDefaults(e,t){this.#d.set((0,n.Ym)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#d.values()],r={};return t.forEach(t=>{(0,n.to)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#h.set((0,n.Ym)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#h.values()],r={};return t.forEach(t=>{(0,n.to)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,n.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===n.CN&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#c.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#l.clear(),this.#r.clear()}}},92668:function(e,t,r){r.d(t,{I:function(){return s}});var n=r(59121),a=r(31091),o=r(63497),i=r(99649);function s(e,t){let{years:r=0,months:s=0,weeks:u=0,days:l=0,hours:c=0,minutes:d=0,seconds:h=0}=t,f=(0,i.Q)(e),m=s||r?(0,a.z)(f,s+12*r):f,p=l||u?(0,n.E)(m,l+7*u):m;return(0,o.L)(e,p.getTime()+1e3*(h+60*(d+60*c)))}},59121:function(e,t,r){r.d(t,{E:function(){return o}});var n=r(99649),a=r(63497);function o(e,t){let r=(0,n.Q)(e);return isNaN(t)?(0,a.L)(e,NaN):(t&&r.setDate(r.getDate()+t),r)}},31091:function(e,t,r){r.d(t,{z:function(){return o}});var n=r(99649),a=r(63497);function o(e,t){let r=(0,n.Q)(e);if(isNaN(t))return(0,a.L)(e,NaN);if(!t)return r;let o=r.getDate(),i=(0,a.L)(e,r.getTime());return(i.setMonth(r.getMonth()+t+1,0),o>=i.getDate())?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}},63497:function(e,t,r){r.d(t,{L:function(){return n}});function n(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}},99649:function(e,t,r){r.d(t,{Q:function(){return n}});function n(e){let t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5869-aa0b3213b1b23ec5.js b/litellm/proxy/_experimental/out/_next/static/chunks/5869-a383009914cbdb01.js
similarity index 100%
rename from litellm/proxy/_experimental/out/_next/static/chunks/5869-aa0b3213b1b23ec5.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/5869-a383009914cbdb01.js
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5945-93803bbcb1abfaaf.js b/litellm/proxy/_experimental/out/_next/static/chunks/5945-93803bbcb1abfaaf.js
deleted file mode 100644
index f7bf7f0d6bc..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/5945-93803bbcb1abfaaf.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5945],{5945:function(e,t,a){a.d(t,{Z:function(){return T}});var n=a(2265),o=a(36760),c=a.n(o),r=a(18694),i=a(71744),l=a(33759),d=a(50337),s=a(65869),b=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]]);return a},g=e=>{var{prefixCls:t,className:a,hoverable:o=!0}=e,r=b(e,["prefixCls","className","hoverable"]);let{getPrefixCls:l}=n.useContext(i.E_),d=l("card",t),s=c()("".concat(d,"-grid"),a,{["".concat(d,"-grid-hoverable")]:o});return n.createElement("div",Object.assign({},r,{className:s}))},p=a(93463),u=a(12918),f=a(99320),m=a(71140);let h=e=>{let{antCls:t,componentCls:a,headerHeight:n,headerPadding:o,tabsMarginBottom:c}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:n,marginBottom:-1,padding:"0 ".concat((0,p.bf)(o)),color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:"".concat((0,p.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorderSecondary),borderRadius:"".concat((0,p.bf)(e.borderRadiusLG)," ").concat((0,p.bf)(e.borderRadiusLG)," 0 0")},(0,u.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},u.vS),{["\n > ".concat(a,"-typography,\n > ").concat(a,"-typography-edit-content\n ")]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),["".concat(t,"-tabs-top")]:{clear:"both",marginBottom:c,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:"".concat((0,p.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorderSecondary)}}})},y=e=>{let{cardPaddingBase:t,colorBorderSecondary:a,cardShadow:n,lineWidth:o}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:"\n ".concat((0,p.bf)(o)," 0 0 0 ").concat(a,",\n 0 ").concat((0,p.bf)(o)," 0 0 ").concat(a,",\n ").concat((0,p.bf)(o)," ").concat((0,p.bf)(o)," 0 0 ").concat(a,",\n ").concat((0,p.bf)(o)," 0 0 0 ").concat(a," inset,\n 0 ").concat((0,p.bf)(o)," 0 0 ").concat(a," inset;\n "),transition:"all ".concat(e.motionDurationMid),"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:n}}},v=e=>{let{componentCls:t,iconCls:a,actionsLiMargin:n,cardActionsIconSize:o,colorBorderSecondary:c,actionsBg:r}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:r,borderTop:"".concat((0,p.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(c),display:"flex",borderRadius:"0 0 ".concat((0,p.bf)(e.borderRadiusLG)," ").concat((0,p.bf)(e.borderRadiusLG))},(0,u.dF)()),{"& > li":{margin:n,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:"color ".concat(e.motionDurationMid)},["a:not(".concat(t,"-btn), > ").concat(a)]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,p.bf)(e.fontHeight),transition:"color ".concat(e.motionDurationMid),"&:hover":{color:e.colorPrimary}},["> ".concat(a)]:{fontSize:o,lineHeight:(0,p.bf)(e.calc(o).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:"".concat((0,p.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(c)}}})},S=e=>Object.assign(Object.assign({margin:"".concat((0,p.bf)(e.calc(e.marginXXS).mul(-1).equal())," 0"),display:"flex"},(0,u.dF)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},u.vS),"&-description":{color:e.colorTextDescription}}),O=e=>{let{componentCls:t,colorFillAlter:a,headerPadding:n,bodyPadding:o}=e;return{["".concat(t,"-head")]:{padding:"0 ".concat((0,p.bf)(n)),background:a,"&-title":{fontSize:e.fontSize}},["".concat(t,"-body")]:{padding:"".concat((0,p.bf)(e.padding)," ").concat((0,p.bf)(o))}}},x=e=>{let{componentCls:t}=e;return{overflow:"hidden",["".concat(t,"-body")]:{userSelect:"none"}}},j=e=>{let{componentCls:t,cardShadow:a,cardHeadPadding:n,colorBorderSecondary:o,boxShadowTertiary:c,bodyPadding:r,extraColor:i}=e;return{[t]:Object.assign(Object.assign({},(0,u.Wf)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,["&:not(".concat(t,"-bordered)")]:{boxShadow:c},["".concat(t,"-head")]:h(e),["".concat(t,"-extra")]:{marginInlineStart:"auto",color:i,fontWeight:"normal",fontSize:e.fontSize},["".concat(t,"-body")]:{padding:r,borderRadius:"0 0 ".concat((0,p.bf)(e.borderRadiusLG)," ").concat((0,p.bf)(e.borderRadiusLG))},["".concat(t,"-grid")]:y(e),["".concat(t,"-cover")]:{"> *":{display:"block",width:"100%",borderRadius:"".concat((0,p.bf)(e.borderRadiusLG)," ").concat((0,p.bf)(e.borderRadiusLG)," 0 0")}},["".concat(t,"-actions")]:v(e),["".concat(t,"-meta")]:S(e)}),["".concat(t,"-bordered")]:{border:"".concat((0,p.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(o),["".concat(t,"-cover")]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},["".concat(t,"-hoverable")]:{cursor:"pointer",transition:"box-shadow ".concat(e.motionDurationMid,", border-color ").concat(e.motionDurationMid),"&:hover":{borderColor:"transparent",boxShadow:a}},["".concat(t,"-contain-grid")]:{borderRadius:"".concat((0,p.bf)(e.borderRadiusLG)," ").concat((0,p.bf)(e.borderRadiusLG)," 0 0 "),["".concat(t,"-body")]:{display:"flex",flexWrap:"wrap"},["&:not(".concat(t,"-loading) ").concat(t,"-body")]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},["".concat(t,"-contain-tabs")]:{["> div".concat(t,"-head")]:{minHeight:0,["".concat(t,"-head-title, ").concat(t,"-extra")]:{paddingTop:n}}},["".concat(t,"-type-inner")]:O(e),["".concat(t,"-loading")]:x(e),["".concat(t,"-rtl")]:{direction:"rtl"}}},E=e=>{let{componentCls:t,bodyPaddingSM:a,headerPaddingSM:n,headerHeightSM:o,headerFontSizeSM:c}=e;return{["".concat(t,"-small")]:{["> ".concat(t,"-head")]:{minHeight:o,padding:"0 ".concat((0,p.bf)(n)),fontSize:c,["> ".concat(t,"-head-wrapper")]:{["> ".concat(t,"-extra")]:{fontSize:e.fontSize}}},["> ".concat(t,"-body")]:{padding:a}},["".concat(t,"-small").concat(t,"-contain-tabs")]:{["> ".concat(t,"-head")]:{["".concat(t,"-head-title, ").concat(t,"-extra")]:{paddingTop:0,display:"flex",alignItems:"center"}}}}};var w=(0,f.I$)("Card",e=>{let t=(0,m.IX)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[j(t),E(t)]},e=>{var t,a;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:"".concat(e.paddingSM,"px 0"),tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!==(t=e.bodyPadding)&&void 0!==t?t:e.paddingLG,headerPadding:null!==(a=e.headerPadding)&&void 0!==a?a:e.paddingLG}}),z=a(56250),N=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]]);return a};let C=e=>{let{actionClasses:t,actions:a=[],actionStyle:o}=e;return n.createElement("ul",{className:t,style:o},a.map((e,t)=>n.createElement("li",{style:{width:"".concat(100/a.length,"%")},key:"action-".concat(t)},n.createElement("span",null,e))))},L=n.forwardRef((e,t)=>{let a;let{prefixCls:o,className:b,rootClassName:p,style:u,extra:f,headStyle:m={},bodyStyle:h={},title:y,loading:v,bordered:S,variant:O,size:x,type:j,cover:E,actions:L,tabList:P,children:T,activeTabKey:G,defaultActiveTabKey:R,tabBarExtraContent:I,hoverable:B,tabProps:W={},classNames:H,styles:k}=e,M=N(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:D,direction:_,card:F}=n.useContext(i.E_),[q]=(0,z.Z)("card",O,S),A=e=>{var t;return c()(null===(t=null==F?void 0:F.classNames)||void 0===t?void 0:t[e],null==H?void 0:H[e])},X=e=>{var t;return Object.assign(Object.assign({},null===(t=null==F?void 0:F.styles)||void 0===t?void 0:t[e]),null==k?void 0:k[e])},Z=n.useMemo(()=>{let e=!1;return n.Children.forEach(T,t=>{(null==t?void 0:t.type)===g&&(e=!0)}),e},[T]),K=D("card",o),[$,J,Q]=w(K),U=n.createElement(d.Z,{loading:!0,active:!0,paragraph:{rows:4},title:!1},T),V=void 0!==G,Y=Object.assign(Object.assign({},W),{[V?"activeKey":"defaultActiveKey"]:V?G:R,tabBarExtraContent:I}),ee=(0,l.Z)(x),et=ee&&"default"!==ee?ee:"large",ea=P?n.createElement(s.default,Object.assign({size:et},Y,{className:"".concat(K,"-head-tabs"),onChange:t=>{var a;null===(a=e.onTabChange)||void 0===a||a.call(e,t)},items:P.map(e=>{var{tab:t}=e;return Object.assign({label:t},N(e,["tab"]))})})):null;if(y||f||ea){let e=c()("".concat(K,"-head"),A("header")),t=c()("".concat(K,"-head-title"),A("title")),o=c()("".concat(K,"-extra"),A("extra")),r=Object.assign(Object.assign({},m),X("header"));a=n.createElement("div",{className:e,style:r},n.createElement("div",{className:"".concat(K,"-head-wrapper")},y&&n.createElement("div",{className:t,style:X("title")},y),f&&n.createElement("div",{className:o,style:X("extra")},f)),ea)}let en=c()("".concat(K,"-cover"),A("cover")),eo=E?n.createElement("div",{className:en,style:X("cover")},E):null,ec=c()("".concat(K,"-body"),A("body")),er=Object.assign(Object.assign({},h),X("body")),ei=n.createElement("div",{className:ec,style:er},v?U:T),el=c()("".concat(K,"-actions"),A("actions")),ed=(null==L?void 0:L.length)?n.createElement(C,{actionClasses:el,actionStyle:X("actions"),actions:L}):null,es=(0,r.Z)(M,["onTabChange"]),eb=c()(K,null==F?void 0:F.className,{["".concat(K,"-loading")]:v,["".concat(K,"-bordered")]:"borderless"!==q,["".concat(K,"-hoverable")]:B,["".concat(K,"-contain-grid")]:Z,["".concat(K,"-contain-tabs")]:null==P?void 0:P.length,["".concat(K,"-").concat(ee)]:ee,["".concat(K,"-type-").concat(j)]:!!j,["".concat(K,"-rtl")]:"rtl"===_},b,p,J,Q),eg=Object.assign(Object.assign({},null==F?void 0:F.style),u);return $(n.createElement("div",Object.assign({ref:t},es,{className:eb,style:eg}),a,eo,ei,ed))});var P=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]]);return a};L.Grid=g,L.Meta=e=>{let{prefixCls:t,className:a,avatar:o,title:r,description:l}=e,d=P(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:s}=n.useContext(i.E_),b=s("card",t),g=c()("".concat(b,"-meta"),a),p=o?n.createElement("div",{className:"".concat(b,"-meta-avatar")},o):null,u=r?n.createElement("div",{className:"".concat(b,"-meta-title")},r):null,f=l?n.createElement("div",{className:"".concat(b,"-meta-description")},l):null,m=u||f?n.createElement("div",{className:"".concat(b,"-meta-detail")},u,f):null;return n.createElement("div",Object.assign({},d,{className:g}),p,m)};var T=L}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/5992-243bba762148af9b.js b/litellm/proxy/_experimental/out/_next/static/chunks/5992-ee986583db978ba0.js
similarity index 99%
rename from litellm/proxy/_experimental/out/_next/static/chunks/5992-243bba762148af9b.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/5992-ee986583db978ba0.js
index a464e6bc3db..a3c4b42ad3f 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/5992-243bba762148af9b.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/5992-ee986583db978ba0.js
@@ -1 +1 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5992],{19046:function(e,t,s){s.d(t,{Dx:function(){return n.Z},Zb:function(){return r.Z},oi:function(){return o.Z},xv:function(){return l.Z},zx:function(){return a.Z}});var a=s(78489),r=s(12514),l=s(84264),o=s(49566),n=s(96761)},88712:function(e,t,s){var a=s(57437);s(2265);var r=s(33145),l=s(66830),o=s(50010);t.Z=e=>{let{message:t}=e;if(!(0,l.br)(t))return null;let s="string"==typeof t.content&&t.content.includes("[PDF attached]");return(0,a.jsx)("div",{className:"mb-2",children:s?(0,a.jsx)("div",{className:"w-64 h-32 rounded-md border border-gray-200 bg-red-50 flex items-center justify-center",children:(0,a.jsx)(o.Z,{style:{fontSize:"48px",color:"#dc2626"}})}):(0,a.jsx)(r.default,{src:t.imagePreviewUrl||"",alt:"User uploaded image",width:256,height:200,className:"max-w-64 rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"200px",width:"auto",height:"auto"}})})}},27930:function(e,t,s){var a=s(57437);s(2265);var r=s(65319),l=s(99981),o=s(53508);let{Dragger:n}=r.default;t.Z=e=>{let{chatUploadedImage:t,chatImagePreviewUrl:s,onImageUpload:r,onRemoveImage:i}=e;return(0,a.jsx)(a.Fragment,{children:!t&&(0,a.jsx)(n,{beforeUpload:r,accept:"image/*,.pdf",showUploadList:!1,className:"inline-block",style:{padding:0,border:"none",background:"none"},children:(0,a.jsx)(l.Z,{title:"Attach image or PDF",children:(0,a.jsx)("button",{type:"button",className:"flex items-center justify-center w-8 h-8 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors",children:(0,a.jsx)(o.Z,{style:{fontSize:"16px"}})})})})})}},66830:function(e,t,s){s.d(t,{Hk:function(){return l},Sn:function(){return r},br:function(){return o}});let a=e=>new Promise((t,s)=>{let a=new FileReader;a.onload=()=>{t(a.result)},a.onerror=s,a.readAsDataURL(e)}),r=async(e,t)=>({role:"user",content:[{type:"text",text:e},{type:"image_url",image_url:{url:await a(t)}}]}),l=(e,t,s,a)=>{let r="";t&&a&&(r=a.toLowerCase().endsWith(".pdf")?"[PDF attached]":"[Image attached]");let l={role:"user",content:t?"".concat(e," ").concat(r):e};return t&&s&&(l.imagePreviewUrl=s),l},o=e=>"user"===e.role&&"string"==typeof e.content&&(e.content.includes("[Image attached]")||e.content.includes("[PDF attached]"))&&!!e.imagePreviewUrl},25992:function(e,t,s){s.d(t,{Z:function(){return e6}});var a=s(57437),r=s(61935),l=s(92403),o=s(55322),n=s(62272),i=s(26430),c=s(12660),d=s(25980),m=s(69993),u=s(71891),x=s(58630),g=s(15424),p=s(44625),h=s(57400),f=s(11894),v=s(15883),b=s(99890),y=s(26349),j=s(50010),N=s(79276),w=s(19046),S=s(4260),_=s(65319),k=s(57840),P=s(37592),C=s(5545),A=s(79326),I=s(99981),E=s(10353),Z=s(22116),T=s(2265),L=s(62831),R=s(17906),O=s(94263),U=s(93837),M=s(9309),K=s(67479),D=s(87972),B=s(9114),z=s(19250),H=s(99020),F=s(97415),G=s(26832),W=s(85498);async function J(e,t,s,a){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],l=arguments.length>5?arguments[5]:void 0,o=arguments.length>6?arguments[6]:void 0,n=arguments.length>7?arguments[7]:void 0,i=arguments.length>8?arguments[8]:void 0,c=arguments.length>9?arguments[9]:void 0,d=arguments.length>10?arguments[10]:void 0,m=arguments.length>11?arguments[11]:void 0,u=arguments.length>12?arguments[12]:void 0,x=(arguments.length>13&&arguments[13],arguments.length>14?arguments[14]:void 0);if(!a)throw Error("Virtual Key is required");console.log=function(){};let g=x||(0,z.getProxyBaseUrl)(),p={};r&&r.length>0&&(p["x-litellm-tags"]=r.join(","));let h=new W.ZP({apiKey:a,baseURL:g,dangerouslyAllowBrowser:!0,defaultHeaders:p});try{let a=Date.now(),r=!1,x={model:s,messages:e.map(e=>({role:e.role,content:e.content})),stream:!0,max_tokens:1024,litellm_trace_id:c};for await(let e of(d&&(x.vector_store_ids=d),m&&(x.guardrails=m),u&&(x.policies=u),h.messages.stream(x,{signal:l}))){if(console.log("Stream event:",e),"content_block_delta"===e.type){let l=e.delta;if(!r){r=!0;let e=Date.now()-a;console.log("First token received! Time:",e,"ms"),n&&n(e)}"text_delta"===l.type?t("assistant",l.text,s):"reasoning_delta"===l.type&&o&&o(l.text)}if("message_delta"===e.type&&e.usage&&i){let t=e.usage;console.log("Usage data found:",t);let s={completionTokens:t.output_tokens,promptTokens:t.input_tokens,totalTokens:t.input_tokens+t.output_tokens};i(s)}}}catch(e){throw(null==l?void 0:l.aborted)?console.log("Anthropic messages request was cancelled"):B.Z.fromBackend("Error occurred while generating model response. Please try again. Error: ".concat(e)),e}}var q=s(7271);async function V(e,t,s,a,r,l,o,n,i,c){console.log=function(){},console.log("isLocal:",!1);let d=c||(0,z.getProxyBaseUrl)(),m=new q.ZP.OpenAI({apiKey:r,baseURL:d,dangerouslyAllowBrowser:!0,defaultHeaders:l&&l.length>0?{"x-litellm-tags":l.join(",")}:void 0});try{let r=await m.audio.speech.create({model:a,input:e,voice:t,...n?{response_format:n}:{},...i?{speed:i}:{}},{signal:o}),l=await r.blob(),c=URL.createObjectURL(l);s(c,a)}catch(e){throw(null==o?void 0:o.aborted)?console.log("Audio speech request was cancelled"):B.Z.fromBackend("Error occurred while generating speech. Please try again. Error: ".concat(e)),e}}async function Y(e,t,s,a,r,l,o,n,i,c,d){console.log=function(){},console.log("isLocal:",!1);let m=d||(0,z.getProxyBaseUrl)(),u=new q.ZP.OpenAI({apiKey:a,baseURL:m,dangerouslyAllowBrowser:!0,defaultHeaders:r&&r.length>0?{"x-litellm-tags":r.join(",")}:void 0});try{console.log("Processing audio file for transcription:",e.name);let a=await u.audio.transcriptions.create({model:s,file:e,...o?{language:o}:{},...n?{prompt:n}:{},...i?{response_format:i}:{},...void 0!==c?{temperature:c}:{}},{signal:l});if(console.log("Transcription response:",a),a&&a.text)t(a.text,s),B.Z.success("Audio transcribed successfully");else throw Error("No transcription text in response")}catch(e){if(console.error("Error making audio transcription request:",e),null==l?void 0:l.aborted)console.log("Audio transcription request was cancelled");else{var x;let t="Failed to transcribe audio";(null==e?void 0:null===(x=e.error)||void 0===x?void 0:x.message)?t=e.error.message:(null==e?void 0:e.message)&&(t=e.message),B.Z.fromBackend("Audio transcription failed: ".concat(t))}throw e}}var X=s(95459);async function $(e,t,s,a,r,l){if(!a)throw Error("Virtual Key is required");console.log=function(){};let o=l||(0,z.getProxyBaseUrl)(),n={};r&&r.length>0&&(n["x-litellm-tags"]=r.join(","));try{var i,c,d;let r=o.endsWith("/")?o.slice(0,-1):o,l=await fetch("".concat(r,"/embeddings"),{method:"POST",headers:{"Content-Type":"application/json",[(0,z.getGlobalLitellmHeaderName)()]:"Bearer ".concat(a),...n},body:JSON.stringify({model:s,input:e})});if(!l.ok){let e=await l.text();throw Error(e||"Request failed with status ".concat(l.status))}let m=await l.json(),u=null==m?void 0:null===(c=m.data)||void 0===c?void 0:null===(i=c[0])||void 0===i?void 0:i.embedding;if(!u)throw Error("No embedding returned from server");t(JSON.stringify(u),null!==(d=null==m?void 0:m.model)&&void 0!==d?d:s)}catch(e){throw B.Z.fromBackend("Error occurred while making embeddings request. Please try again. Error: ".concat(e)),e}}var Q=s(91643),ee=s(10703);async function et(e,t,s,a,r,l,o,n){console.log=function(){},console.log("isLocal:",!1);let i=n||(0,z.getProxyBaseUrl)(),c=new q.ZP.OpenAI({apiKey:r,baseURL:i,dangerouslyAllowBrowser:!0,defaultHeaders:l&&l.length>0?{"x-litellm-tags":l.join(",")}:void 0});try{let r=Array.isArray(e)?e:[e],l=[];for(let e=0;e1&&B.Z.success("Successfully processed ".concat(l.length," images"))}catch(e){if(console.error("Error making image edit request:",e),null==o?void 0:o.aborted)console.log("Image edits request was cancelled");else{var d;let t="Failed to edit image(s)";(null==e?void 0:null===(d=e.error)||void 0===d?void 0:d.message)?t=e.error.message:(null==e?void 0:e.message)&&(t=e.message),B.Z.fromBackend("Image edit failed: ".concat(t))}throw e}}async function es(e,t,s,a,r,l,o){console.log=function(){},console.log("isLocal:",!1);let n=o||(0,z.getProxyBaseUrl)(),i=new q.ZP.OpenAI({apiKey:a,baseURL:n,dangerouslyAllowBrowser:!0,defaultHeaders:r&&r.length>0?{"x-litellm-tags":r.join(",")}:void 0});try{let a=await i.images.generate({model:s,prompt:e},{signal:l});if(console.log(a.data),a.data&&a.data[0]){if(a.data[0].url)t(a.data[0].url,s);else if(a.data[0].b64_json){let e=a.data[0].b64_json;t("data:image/png;base64,".concat(e),s)}else throw Error("No image data found in response")}else throw Error("Invalid response format")}catch(e){throw(null==l?void 0:l.aborted)?console.log("Image generation request was cancelled"):B.Z.fromBackend("Error occurred while generating image. Please try again. Error: ".concat(e)),e}}async function ea(e,t,s,a){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],l=arguments.length>5?arguments[5]:void 0,o=arguments.length>6?arguments[6]:void 0,n=arguments.length>7?arguments[7]:void 0,i=arguments.length>8?arguments[8]:void 0,c=arguments.length>9?arguments[9]:void 0,d=arguments.length>10?arguments[10]:void 0,m=arguments.length>11?arguments[11]:void 0,u=arguments.length>12?arguments[12]:void 0,x=arguments.length>13?arguments[13]:void 0,g=arguments.length>14?arguments[14]:void 0,p=arguments.length>15?arguments[15]:void 0,h=arguments.length>16?arguments[16]:void 0,f=arguments.length>17?arguments[17]:void 0,v=arguments.length>18?arguments[18]:void 0,b=arguments.length>19?arguments[19]:void 0,y=arguments.length>20?arguments[20]:void 0,j=arguments.length>21?arguments[21]:void 0;if(!a)throw Error("Virtual Key is required");if(!s||""===s.trim())throw Error("Model is required. Please select a model before sending a request.");console.log=function(){};let N=b||(0,z.getProxyBaseUrl)(),w={};r&&r.length>0&&(w["x-litellm-tags"]=r.join(","));let S=new q.ZP.OpenAI({apiKey:a,baseURL:N,dangerouslyAllowBrowser:!0,defaultHeaders:w});try{let a=Date.now(),r=!1,b=e.map(e=>(Array.isArray(e.content),{role:e.role,content:e.content,type:"message"})),N=[];x&&x.length>0&&(x.includes("__all__")?N.push({type:"mcp",server_label:"litellm",server_url:"litellm_proxy/mcp",require_approval:"never"}):x.forEach(e=>{let t=null==y?void 0:y.find(t=>t.server_id===e),s=(null==t?void 0:t.alias)||(null==t?void 0:t.server_name)||e,a=(null==j?void 0:j[e])||[];N.push({type:"mcp",server_label:"litellm",server_url:"litellm_proxy/mcp/".concat(s),require_approval:"never",...a.length>0?{allowed_tools:a}:{}})})),f&&N.push({type:"code_interpreter",container:{type:"auto"}});let w=await S.responses.create({model:s,input:b,stream:!0,litellm_trace_id:c,...g?{previous_response_id:g}:{},...d?{vector_store_ids:d}:{},...m?{guardrails:m}:{},...u?{policies:u}:{},...N.length>0?{tools:N,tool_choice:"auto"}:{}},{signal:l}),Z="",T={code:"",containerId:""};for await(let e of w)if(console.log("Response event:",e),"object"==typeof e&&null!==e){var _,k,P,C,A,I,E;if(((null===(_=e.type)||void 0===_?void 0:_.startsWith("response.mcp_"))||"response.output_item.done"===e.type&&((null===(k=e.item)||void 0===k?void 0:k.type)==="mcp_list_tools"||(null===(P=e.item)||void 0===P?void 0:P.type)==="mcp_call"))&&(console.log("MCP event received:",e),h)){let t={type:e.type,sequence_number:e.sequence_number,output_index:e.output_index,item_id:e.item_id||(null===(I=e.item)||void 0===I?void 0:I.id),item:e.item,delta:e.delta,arguments:e.arguments,timestamp:Date.now()};h(t)}if("response.output_item.done"===e.type&&(null===(C=e.item)||void 0===C?void 0:C.type)==="mcp_call"&&(null===(A=e.item)||void 0===A?void 0:A.name)&&(Z=e.item.name,console.log("MCP tool used:",Z)),T=function(e,t){var s;return"response.output_item.done"===e.type&&(null===(s=e.item)||void 0===s?void 0:s.type)==="code_interpreter_call"?(console.log("Code interpreter call completed:",e.item),{code:e.item.code||"",containerId:e.item.container_id||""}):t}(e,T),!function(e,t,s){var a,r;if("response.output_item.done"===e.type&&(null===(a=e.item)||void 0===a?void 0:a.type)==="message"&&(null===(r=e.item)||void 0===r?void 0:r.content)&&s){for(let a of e.item.content)if("output_text"===a.type&&a.annotations){let e=a.annotations.filter(e=>"container_file_citation"===e.type);(e.length>0||t.code)&&s({code:t.code,containerId:t.containerId,annotations:e})}}}(e,T,v),"response.role.delta"===e.type)continue;if("response.output_text.delta"===e.type&&"string"==typeof e.delta){let l=e.delta;if(console.log("Text delta",l),l.trim().length>0&&(t("assistant",l,s),!r)){r=!0;let e=Date.now()-a;console.log("First token received! Time:",e,"ms"),n&&n(e)}}if("response.reasoning.delta"===e.type&&"delta"in e){let t=e.delta;"string"==typeof t&&o&&o(t)}if("response.completed"===e.type&&"response"in e){let t=e.response,s=t.usage;if(console.log("Usage data:",s),console.log("Response completed event:",t),t.id&&p&&(console.log("Response ID for session management:",t.id),p(t.id)),s&&i){console.log("Usage data:",s);let e={completionTokens:s.output_tokens,promptTokens:s.input_tokens,totalTokens:s.total_tokens};(null===(E=s.completion_tokens_details)||void 0===E?void 0:E.reasoning_tokens)&&(e.reasoningTokens=s.completion_tokens_details.reasoning_tokens),i(e,Z)}}}return w}catch(e){throw(null==l?void 0:l.aborted)?console.log("Responses API request was cancelled"):B.Z.fromBackend("Error occurred while generating model response. Please try again. Error: ".concat(e)),e}}var er=s(83669),el=s(29271),eo=s(5540),en=s(38434),ei=s(23639),ec=s(70464),ed=s(77565);let em=e=>{switch(e){case"completed":return(0,a.jsx)(er.Z,{className:"text-green-500"});case"working":case"submitted":return(0,a.jsx)(r.Z,{className:"text-blue-500"});case"failed":case"canceled":return(0,a.jsx)(el.Z,{className:"text-red-500"});default:return(0,a.jsx)(eo.Z,{className:"text-gray-500"})}},eu=e=>{switch(e){case"completed":return"bg-green-100 text-green-700";case"working":case"submitted":return"bg-blue-100 text-blue-700";case"failed":case"canceled":return"bg-red-100 text-red-700";default:return"bg-gray-100 text-gray-700"}},ex=e=>{if(!e)return null;try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch(t){return e}},eg=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return e?e.length>t?"".concat(e.substring(0,t),"…"):e:null},ep=e=>{navigator.clipboard.writeText(e)};var eh=e=>{let{a2aMetadata:t,timeToFirstToken:s,totalLatency:r}=e,[l,o]=(0,T.useState)(!1);if(!t&&!s&&!r)return null;let{taskId:i,contextId:c,status:d,metadata:u}=t||{},x=ex(null==d?void 0:d.timestamp);return(0,a.jsxs)("div",{className:"a2a-metrics mt-3 pt-2 border-t border-gray-200 text-xs",children:[(0,a.jsxs)("div",{className:"flex items-center mb-2 text-gray-600",children:[(0,a.jsx)(m.Z,{className:"mr-1.5 text-blue-500"}),(0,a.jsx)("span",{className:"font-medium text-gray-700",children:"A2A Metadata"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-gray-500 ml-4",children:[(null==d?void 0:d.state)&&(0,a.jsxs)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ".concat(eu(d.state)),children:[em(d.state),(0,a.jsx)("span",{className:"ml-1 capitalize",children:d.state})]}),x&&(0,a.jsx)(I.Z,{title:null==d?void 0:d.timestamp,children:(0,a.jsxs)("span",{className:"flex items-center",children:[(0,a.jsx)(eo.Z,{className:"mr-1"}),x]})}),void 0!==r&&(0,a.jsx)(I.Z,{title:"Total latency",children:(0,a.jsxs)("span",{className:"flex items-center text-blue-600",children:[(0,a.jsx)(eo.Z,{className:"mr-1"}),(r/1e3).toFixed(2),"s"]})}),void 0!==s&&(0,a.jsx)(I.Z,{title:"Time to first token",children:(0,a.jsxs)("span",{className:"flex items-center text-green-600",children:["TTFT: ",(s/1e3).toFixed(2),"s"]})})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-gray-500 ml-4 mt-1.5",children:[i&&(0,a.jsx)(I.Z,{title:"Click to copy: ".concat(i),children:(0,a.jsxs)("span",{className:"flex items-center cursor-pointer hover:text-gray-700",onClick:()=>ep(i),children:[(0,a.jsx)(en.Z,{className:"mr-1"}),"Task: ",eg(i),(0,a.jsx)(ei.Z,{className:"ml-1 text-gray-400 hover:text-gray-600"})]})}),c&&(0,a.jsx)(I.Z,{title:"Click to copy: ".concat(c),children:(0,a.jsxs)("span",{className:"flex items-center cursor-pointer hover:text-gray-700",onClick:()=>ep(c),children:[(0,a.jsx)(n.Z,{className:"mr-1"}),"Session: ",eg(c),(0,a.jsx)(ei.Z,{className:"ml-1 text-gray-400 hover:text-gray-600"})]})}),(u||(null==d?void 0:d.message))&&(0,a.jsxs)(C.ZP,{type:"text",size:"small",className:"text-xs text-blue-500 hover:text-blue-700 p-0 h-auto",onClick:()=>o(!l),children:[l?(0,a.jsx)(ec.Z,{}):(0,a.jsx)(ed.Z,{}),(0,a.jsx)("span",{className:"ml-1",children:"Details"})]})]}),l&&(0,a.jsxs)("div",{className:"mt-2 ml-4 p-3 bg-gray-50 rounded-md text-gray-600 border border-gray-200",children:[(null==d?void 0:d.message)&&(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("span",{className:"font-medium text-gray-700",children:"Status Message:"}),(0,a.jsx)("span",{className:"ml-2",children:d.message})]}),i&&(0,a.jsxs)("div",{className:"mb-1.5 flex items-center",children:[(0,a.jsx)("span",{className:"font-medium text-gray-700 w-24",children:"Task ID:"}),(0,a.jsx)("code",{className:"ml-2 px-2 py-1 bg-white border border-gray-200 rounded text-xs font-mono",children:i}),(0,a.jsx)(ei.Z,{className:"ml-2 cursor-pointer text-gray-400 hover:text-blue-500",onClick:()=>ep(i)})]}),c&&(0,a.jsxs)("div",{className:"mb-1.5 flex items-center",children:[(0,a.jsx)("span",{className:"font-medium text-gray-700 w-24",children:"Session ID:"}),(0,a.jsx)("code",{className:"ml-2 px-2 py-1 bg-white border border-gray-200 rounded text-xs font-mono",children:c}),(0,a.jsx)(ei.Z,{className:"ml-2 cursor-pointer text-gray-400 hover:text-blue-500",onClick:()=>ep(c)})]}),u&&Object.keys(u).length>0&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("span",{className:"font-medium text-gray-700",children:"Custom Metadata:"}),(0,a.jsx)("pre",{className:"mt-1.5 p-2 bg-white border border-gray-200 rounded text-xs font-mono overflow-x-auto whitespace-pre-wrap",children:JSON.stringify(u,null,2)})]})]})]})},ef=s(92280),ev=s(4156),eb=s(19015),ey=s(85847),ej=e=>{let{temperature:t=1,maxTokens:s=2048,useAdvancedParams:r,onTemperatureChange:l,onMaxTokensChange:o,onUseAdvancedParamsChange:n}=e,[i,c]=(0,T.useState)(!1),d=void 0!==r?r:i,[m,u]=(0,T.useState)(t),[x,p]=(0,T.useState)(s);(0,T.useEffect)(()=>{u(t)},[t]),(0,T.useEffect)(()=>{p(s)},[s]);let h=e=>{let t=null!=e?e:1;u(t),null==l||l(t)},f=e=>{let t=null!=e?e:1e3;p(t),null==o||o(t)},v=d?"text-gray-700":"text-gray-400",b=e=>{n?n(e):c(e)};return(0,a.jsxs)("div",{className:"space-y-4 p-4 w-80",children:[(0,a.jsx)(ev.Z,{checked:d,onChange:e=>b(e.target.checked),children:(0,a.jsx)("span",{className:"font-medium",children:"Use Advanced Parameters"})}),(0,a.jsxs)("div",{className:"space-y-4 transition-opacity duration-200",style:{opacity:d?1:.4},children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(ef.x,{className:"text-sm ".concat(v),children:"Temperature"}),(0,a.jsx)(I.Z,{title:"Controls randomness. Lower values make output more deterministic, higher values more creative.",children:(0,a.jsx)(g.Z,{className:"text-xs ".concat(v," cursor-help")})})]}),(0,a.jsx)(eb.Z,{min:0,max:2,step:.1,value:m,onChange:h,disabled:!d,precision:1,className:"w-20"})]}),(0,a.jsx)(ey.Z,{min:0,max:2,step:.1,value:m,onChange:h,disabled:!d,marks:{0:"0",1:"1.0",2:"2.0"}})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(ef.x,{className:"text-sm ".concat(v),children:"Max Tokens"}),(0,a.jsx)(I.Z,{title:"Maximum number of tokens to generate in the response.",children:(0,a.jsx)(g.Z,{className:"text-xs ".concat(v," cursor-help")})})]}),(0,a.jsx)(eb.Z,{min:1,max:32768,step:1,value:x,onChange:f,disabled:!d})]}),(0,a.jsx)(ey.Z,{min:1,max:32768,step:1,value:x,onChange:f,disabled:!d,marks:{1:"1",32768:"32768"}})]})]})]})},eN=e=>{let{message:t}=e;return t.isAudio&&"string"==typeof t.content?(0,a.jsx)("div",{className:"mb-2",children:(0,a.jsx)("audio",{controls:!0,src:t.content,className:"max-w-full",style:{maxWidth:"500px"},children:"Your browser does not support the audio element."})}):null},ew=s(8443);let eS={ALLOY:"Alloy - Professional and confident",ASH:"Ash - Casual and relaxed",BALAD:"Ballad - Smooth and melodic",CORAL:"Coral - Warm and engaging",ECHO:"Echo - Friendly and conversational",FABLE:"Fable - Wise and measured",NOVA:"Nova - Friendly and conversational",ONYX:"Onyx - Deep and authoritative",SAGE:"Sage - Wise and measured",SHIMMER:"Shimmer - Bright and cheerful"},e_=Object.entries({ALLOY:"alloy",ASH:"ash",BALAD:"ballad",CORAL:"coral",ECHO:"echo",FABLE:"fable",NOVA:"nova",ONYX:"onyx",SAGE:"sage",SHIMMER:"shimmer"}).map(e=>{let[t,s]=e;return{value:s,label:eS[t]}}),ek=[{value:ew.KP.CHAT,label:"/v1/chat/completions"},{value:ew.KP.RESPONSES,label:"/v1/responses"},{value:ew.KP.ANTHROPIC_MESSAGES,label:"/v1/messages"},{value:ew.KP.IMAGE,label:"/v1/images/generations"},{value:ew.KP.IMAGE_EDITS,label:"/v1/images/edits"},{value:ew.KP.EMBEDDINGS,label:"/v1/embeddings"},{value:ew.KP.SPEECH,label:"/v1/audio/speech"},{value:ew.KP.TRANSCRIPTION,label:"/v1/audio/transcriptions"},{value:ew.KP.A2A_AGENTS,label:"/v1/a2a/message/send"}];var eP=s(88712),eC=s(27930),eA=s(66830),eI=s(44851),eE=s(41589),eZ=s(73879),eT=e=>{let{code:t,containerId:s,annotations:l=[],accessToken:o}=e,[n,i]=(0,T.useState)({}),[c,d]=(0,T.useState)({}),m=(0,z.getProxyBaseUrl)();(0,T.useEffect)(()=>{let e=async()=>{for(let r of l){var e,t,s,a;if(((null===(e=r.filename)||void 0===e?void 0:e.toLowerCase().endsWith(".png"))||(null===(t=r.filename)||void 0===t?void 0:t.toLowerCase().endsWith(".jpg"))||(null===(s=r.filename)||void 0===s?void 0:s.toLowerCase().endsWith(".jpeg"))||(null===(a=r.filename)||void 0===a?void 0:a.toLowerCase().endsWith(".gif")))&&r.container_id&&r.file_id){d(e=>({...e,[r.file_id]:!0}));try{let e=await fetch("".concat(m,"/v1/containers/").concat(r.container_id,"/files/").concat(r.file_id,"/content"),{headers:{[(0,z.getGlobalLitellmHeaderName)()]:"Bearer ".concat(o)}});if(e.ok){let t=await e.blob(),s=URL.createObjectURL(t);i(e=>({...e,[r.file_id]:s}))}}catch(e){console.error("Error fetching image:",e)}finally{d(e=>({...e,[r.file_id]:!1}))}}}};return l.length>0&&o&&e(),()=>{Object.values(n).forEach(e=>URL.revokeObjectURL(e))}},[l,o,m]);let u=async e=>{try{let t=await fetch("".concat(m,"/v1/containers/").concat(e.container_id,"/files/").concat(e.file_id,"/content"),{headers:{[(0,z.getGlobalLitellmHeaderName)()]:"Bearer ".concat(o)}});if(t.ok){let s=await t.blob(),a=URL.createObjectURL(s),r=document.createElement("a");r.href=a,r.download=e.filename||"file_".concat(e.file_id),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(a)}}catch(e){console.error("Error downloading file:",e)}},x=l.filter(e=>{var t,s,a,r;return(null===(t=e.filename)||void 0===t?void 0:t.toLowerCase().endsWith(".png"))||(null===(s=e.filename)||void 0===s?void 0:s.toLowerCase().endsWith(".jpg"))||(null===(a=e.filename)||void 0===a?void 0:a.toLowerCase().endsWith(".jpeg"))||(null===(r=e.filename)||void 0===r?void 0:r.toLowerCase().endsWith(".gif"))}),g=l.filter(e=>{var t,s,a,r;return!(null===(t=e.filename)||void 0===t?void 0:t.toLowerCase().endsWith(".png"))&&!(null===(s=e.filename)||void 0===s?void 0:s.toLowerCase().endsWith(".jpg"))&&!(null===(a=e.filename)||void 0===a?void 0:a.toLowerCase().endsWith(".jpeg"))&&!(null===(r=e.filename)||void 0===r?void 0:r.toLowerCase().endsWith(".gif"))});return t||0!==l.length?(0,a.jsxs)("div",{className:"mt-3 space-y-3",children:[t&&(0,a.jsx)(eI.default,{size:"small",items:[{key:"code",label:(0,a.jsxs)("span",{className:"flex items-center gap-2 text-sm text-gray-600",children:[(0,a.jsx)(f.Z,{})," Python Code Executed"]}),children:(0,a.jsx)(R.Z,{language:"python",style:O.Z,customStyle:{margin:0,borderRadius:"6px",fontSize:"12px",maxHeight:"300px",overflow:"auto"},children:t})}]}),x.map(e=>(0,a.jsx)("div",{className:"rounded-lg border border-gray-200 overflow-hidden",children:c[e.file_id]?(0,a.jsxs)("div",{className:"flex items-center justify-center p-8 bg-gray-50",children:[(0,a.jsx)(E.Z,{indicator:(0,a.jsx)(r.Z,{spin:!0})}),(0,a.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:"Loading image..."})]}):n[e.file_id]?(0,a.jsxs)("div",{children:[(0,a.jsx)("img",{src:n[e.file_id],alt:e.filename||"Generated chart",className:"max-w-full",style:{maxHeight:"400px"}}),(0,a.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 bg-gray-50 border-t border-gray-200",children:[(0,a.jsxs)("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[(0,a.jsx)(eE.Z,{})," ",e.filename]}),(0,a.jsxs)("button",{onClick:()=>u(e),className:"text-xs text-blue-500 hover:text-blue-700 flex items-center gap-1",children:[(0,a.jsx)(eZ.Z,{})," Download"]})]})]}):(0,a.jsx)("div",{className:"flex items-center justify-center p-4 bg-gray-50",children:(0,a.jsx)("span",{className:"text-sm text-gray-400",children:"Image not available"})})},e.file_id)),g.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:g.map(e=>(0,a.jsxs)("button",{onClick:()=>u(e),className:"flex items-center gap-2 px-3 py-2 bg-gray-50 border border-gray-200 rounded-lg hover:bg-gray-100 transition-colors",children:[(0,a.jsx)(en.Z,{className:"text-blue-500"}),(0,a.jsx)("span",{className:"text-sm",children:e.filename}),(0,a.jsx)(eZ.Z,{className:"text-gray-400"})]},e.file_id))})]}):null},eL=s(42264),eR=s(63709);let eO=e=>{if(!e)return!1;let t=e.toLowerCase();return t.startsWith("openai/")||t.startsWith("gpt-")||t.startsWith("o1")||t.startsWith("o3")||t.includes("openai")};var eU=e=>{let{enabled:t,onEnabledChange:s,selectedModel:r,disabled:l=!1}=e,o=eO(r);return(0,a.jsxs)("div",{className:"border border-gray-200 rounded-lg p-3 bg-gradient-to-r from-blue-50 to-purple-50",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(f.Z,{className:"text-blue-500"}),(0,a.jsx)(ef.x,{className:"font-medium text-gray-700",children:"Code Interpreter"}),(0,a.jsx)(I.Z,{title:"Run Python code to generate files, charts, and analyze data. Container is created automatically.",children:(0,a.jsx)(g.Z,{className:"text-gray-400 text-xs"})})]}),(0,a.jsx)(eR.Z,{checked:t&&o,onChange:e=>{if(e&&!o){eL.ZP.warning("Code Interpreter is only available for OpenAI models");return}s(e)},disabled:l||!o,size:"small",className:t&&o?"bg-blue-500":""})]}),!o&&(0,a.jsx)("div",{className:"mt-2 pt-2 border-t border-gray-200",children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)(el.Z,{className:"text-amber-500 mt-0.5"}),(0,a.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,a.jsx)("span",{children:"Code Interpreter is currently only supported for OpenAI models. "}),(0,a.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new?template=feature_request.yml",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Request support for other providers"})]})]})})]})},eM=s(82971),eK=e=>{let{endpointType:t,onEndpointChange:s,className:r}=e;return(0,a.jsx)("div",{className:r,children:(0,a.jsx)(P.default,{showSearch:!0,value:t,style:{width:"100%"},onChange:s,options:ek,className:"rounded-md",filterOption:(e,t)=>{var s,a;return(null!==(s=null==t?void 0:t.label)&&void 0!==s?s:"").toLowerCase().includes(e.toLowerCase())||(null!==(a=null==t?void 0:t.value)&&void 0!==a?a:"").toLowerCase().includes(e.toLowerCase())}})})},eD=s(29),eB=s.n(eD);let{Text:ez}=k.default,{Panel:eH}=eI.default;var eF=e=>{var t,s;let{events:r,className:l}=e;if(console.log("MCPEventsDisplay: Received events:",r),!r||0===r.length)return console.log("MCPEventsDisplay: No events, returning null"),null;let o=r.find(e=>{var t;return"response.output_item.done"===e.type&&(null===(t=e.item)||void 0===t?void 0:t.type)==="mcp_list_tools"&&e.item.tools&&e.item.tools.length>0}),n=r.filter(e=>{var t;return"response.output_item.done"===e.type&&(null===(t=e.item)||void 0===t?void 0:t.type)==="mcp_call"});return(console.log("MCPEventsDisplay: toolsEvent:",o),console.log("MCPEventsDisplay: mcpCallEvents:",n),o||0!==n.length)?(0,a.jsxs)("div",{className:"jsx-32b14b04f420f3ac "+"mcp-events-display ".concat(l||""),children:[(0,a.jsx)(eB(),{id:"32b14b04f420f3ac",children:'.openai-mcp-tools.jsx-32b14b04f420f3ac{position:relative;margin:0;padding:0}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse.jsx-32b14b04f420f3ac{background:transparent!important;border:none!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-item.jsx-32b14b04f420f3ac{border:none!important;background:transparent!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-header.jsx-32b14b04f420f3ac{padding:0 0 0 20px!important;background:transparent!important;border:none!important;font-size:14px!important;color:#9ca3af!important;font-weight:400!important;line-height:20px!important;min-height:20px!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-header.jsx-32b14b04f420f3ac:hover{background:transparent!important;color:#6b7280!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-content.jsx-32b14b04f420f3ac{border:none!important;background:transparent!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-content-box.jsx-32b14b04f420f3ac{padding:4px 0 0 20px!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-expand-icon.jsx-32b14b04f420f3ac{position:absolute!important;left:2px!important;top:2px!important;color:#9ca3af!important;font-size:10px!important;width:16px!important;height:16px!important;display:-webkit-box!important;display:-webkit-flex!important;display:-moz-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-align:center!important;-webkit-align-items:center!important;-moz-box-align:center!important;-ms-flex-align:center!important;align-items:center!important;-webkit-box-pack:center!important;-webkit-justify-content:center!important;-moz-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-expand-icon.jsx-32b14b04f420f3ac:hover{color:#6b7280!important}.openai-vertical-line.jsx-32b14b04f420f3ac{position:absolute;left:9px;top:18px;bottom:0;width:.5px;background-color:#f3f4f6;opacity:.8}.tool-item.jsx-32b14b04f420f3ac{font-family:ui-monospace,SFMono-Regular,"SF Mono",Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13px;color:#4b5563;line-height:18px;padding:0;margin:0;background:white;position:relative;z-index:1}.mcp-section.jsx-32b14b04f420f3ac{margin-bottom:12px;background:white;position:relative;z-index:1}.mcp-section.jsx-32b14b04f420f3ac:last-child{margin-bottom:0}.mcp-section-header.jsx-32b14b04f420f3ac{font-size:13px;color:#6b7280;font-weight:500;margin-bottom:4px}.mcp-code-block.jsx-32b14b04f420f3ac{background:#f9fafb;border:1px solid#f3f4f6;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;padding:8px;font-size:12px}.mcp-json.jsx-32b14b04f420f3ac{font-family:ui-monospace,SFMono-Regular,"SF Mono",Monaco,Consolas,"Liberation Mono","Courier New",monospace;color:#374151;margin:0;white-space:pre-wrap;word-wrap:break-word}.mcp-approved.jsx-32b14b04f420f3ac{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;font-size:13px;color:#6b7280}.mcp-checkmark.jsx-32b14b04f420f3ac{color:#10b981;margin-right:6px;font-weight:bold}.mcp-response-content.jsx-32b14b04f420f3ac{font-size:13px;color:#374151;line-height:1.5;white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,"SF Mono",Monaco,Consolas,"Liberation Mono","Courier New",monospace}'}),(0,a.jsxs)("div",{className:"jsx-32b14b04f420f3ac openai-mcp-tools",children:[(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac openai-vertical-line"}),(0,a.jsxs)(eI.default,{ghost:!0,size:"small",expandIconPosition:"start",defaultActiveKey:o?["list-tools"]:n.map((e,t)=>"mcp-call-".concat(t)),children:[o&&(0,a.jsx)(eH,{header:"List tools",children:(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac",children:null===(s=o.item)||void 0===s?void 0:null===(t=s.tools)||void 0===t?void 0:t.map((e,t)=>(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac tool-item",children:e.name},t))})},"list-tools"),n.map((e,t)=>{var s,r,l;return(0,a.jsx)(eH,{header:(null===(s=e.item)||void 0===s?void 0:s.name)||"Tool call",children:(0,a.jsxs)("div",{className:"jsx-32b14b04f420f3ac",children:[(0,a.jsxs)("div",{className:"jsx-32b14b04f420f3ac mcp-section",children:[(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-section-header",children:"Request"}),(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-code-block",children:(null===(r=e.item)||void 0===r?void 0:r.arguments)&&(0,a.jsx)("pre",{className:"jsx-32b14b04f420f3ac mcp-json",children:(()=>{try{return JSON.stringify(JSON.parse(e.item.arguments),null,2)}catch(t){return e.item.arguments}})()})})]}),(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-section",children:(0,a.jsxs)("div",{className:"jsx-32b14b04f420f3ac mcp-approved",children:[(0,a.jsx)("span",{className:"jsx-32b14b04f420f3ac mcp-checkmark",children:"✓"})," Approved"]})}),(null===(l=e.item)||void 0===l?void 0:l.output)&&(0,a.jsxs)("div",{className:"jsx-32b14b04f420f3ac mcp-section",children:[(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-section-header",children:"Response"}),(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-response-content",children:e.item.output})]})]})},"mcp-call-".concat(t))})]})]})]}):(console.log("MCPEventsDisplay: No valid events found, returning null"),null)},eG=s(94331),eW=s(38398);let eJ=e=>new Promise((t,s)=>{let a=new FileReader;a.onload=()=>{t(a.result.split(",")[1])},a.onerror=s,a.readAsDataURL(e)}),eq=async(e,t)=>{let s=await eJ(t),a=t.type||(t.name.toLowerCase().endsWith(".pdf")?"application/pdf":"image/jpeg");return{role:"user",content:[{type:"input_text",text:e},{type:"input_image",image_url:"data:".concat(a,";base64,").concat(s)}]}},eV=(e,t,s,a)=>{let r="";t&&a&&(r=a.toLowerCase().endsWith(".pdf")?"[PDF attached]":"[Image attached]");let l={role:"user",content:t?"".concat(e," ").concat(r):e};return t&&s&&(l.imagePreviewUrl=s),l},eY=e=>"user"===e.role&&"string"==typeof e.content&&(e.content.includes("[Image attached]")||e.content.includes("[PDF attached]"))&&!!e.imagePreviewUrl;var eX=e=>{let{message:t}=e;if(!eY(t))return null;let s="string"==typeof t.content&&t.content.includes("[PDF attached]");return(0,a.jsx)("div",{className:"mb-2",children:s?(0,a.jsx)("div",{className:"w-64 h-32 rounded-md border border-gray-200 bg-red-50 flex items-center justify-center",children:(0,a.jsx)(j.Z,{style:{fontSize:"48px",color:"#dc2626"}})}):(0,a.jsx)("img",{src:t.imagePreviewUrl,alt:"User uploaded image",className:"max-w-64 rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"200px"}})})},e$=s(53508);let{Dragger:eQ}=_.default;var e0=e=>{let{responsesUploadedImage:t,responsesImagePreviewUrl:s,onImageUpload:r,onRemoveImage:l}=e;return(0,a.jsx)(a.Fragment,{children:!t&&(0,a.jsx)(eQ,{beforeUpload:r,accept:"image/*,.pdf",showUploadList:!1,className:"inline-block",style:{padding:0,border:"none",background:"none"},children:(0,a.jsx)(I.Z,{title:"Attach image or PDF",children:(0,a.jsx)("button",{type:"button",className:"flex items-center justify-center w-8 h-8 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors",children:(0,a.jsx)(e$.Z,{style:{fontSize:"16px"}})})})})})},e2=s(33152),e1=e=>{let{endpointType:t,responsesSessionId:s,useApiSessionManagement:r,onToggleSessionManagement:l}=e;return t!==ew.KP.RESPONSES?null:(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Session Management"}),(0,a.jsx)(I.Z,{title:"Choose between LiteLLM API session management (using previous_response_id) or UI-based session management (using chat history)",children:(0,a.jsx)(g.Z,{className:"text-gray-400",style:{fontSize:"12px"}})})]}),(0,a.jsx)(eR.Z,{checked:r,onChange:l,checkedChildren:"API",unCheckedChildren:"UI",size:"small"})]}),(0,a.jsxs)("div",{className:"text-xs p-2 rounded-md ".concat(s?"bg-green-50 text-green-700 border border-green-200":"bg-blue-50 text-blue-700 border border-blue-200"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(g.Z,{style:{fontSize:"12px"}}),(()=>{if(!s)return r?"API Session: Ready":"UI Session: Ready";let e=r?"Response ID":"UI Session",t=s.slice(0,10);return"".concat(e,": ").concat(t,"...")})()]}),s&&(0,a.jsx)(I.Z,{title:(0,a.jsxs)("div",{className:"text-xs",children:[(0,a.jsx)("div",{className:"mb-1",children:"Copy response ID to continue session:"}),(0,a.jsx)("div",{className:"bg-gray-800 text-gray-100 p-2 rounded font-mono text-xs whitespace-pre-wrap",children:'curl -X POST "your-proxy-url/v1/responses" \\\n -H "Authorization: Bearer your-api-key" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "model": "your-model",\n "input": [{"role": "user", "content": "your message", "type": "message"}],\n "previous_response_id": "'.concat(s,'",\n "stream": true\n }\'')})]}),overlayStyle:{maxWidth:"500px"},children:(0,a.jsx)("button",{onClick:()=>{s&&(navigator.clipboard.writeText(s),B.Z.success("Response ID copied to clipboard!"))},className:"ml-2 p-1 hover:bg-green-100 rounded transition-colors",children:(0,a.jsx)(ei.Z,{style:{fontSize:"12px"}})})})]}),(0,a.jsx)("div",{className:"text-xs opacity-75 mt-1",children:s?r?"LiteLLM API session active - context maintained server-side":"UI session active - context maintained client-side":r?"LiteLLM will manage session using previous_response_id":"UI will manage session using chat history"})]})]})};let{TextArea:e4}=S.default,{Dragger:e3}=_.default,e5=new Set([ew.KP.CHAT,ew.KP.RESPONSES]);var e6=e=>{let{accessToken:t,token:s,userRole:S,userID:_,disabledPersonalKeyCreation:W,proxySettings:q}=e,[er,el]=(0,T.useState)([]),[eo,en]=(0,T.useState)(()=>{let e=sessionStorage.getItem("selectedMCPServers");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedMCPServers from sessionStorage",e),[]}}),[ei,ec]=(0,T.useState)(!1),[ed,em]=(0,T.useState)({}),[eu,ex]=(0,T.useState)(()=>{let e=sessionStorage.getItem("mcpServerToolRestrictions");try{return e?JSON.parse(e):{}}catch(e){return console.error("Error parsing mcpServerToolRestrictions from sessionStorage",e),{}}}),[eg,ep]=(0,T.useState)(()=>{let e=sessionStorage.getItem("apiKeySource");if(e)try{return JSON.parse(e)}catch(e){console.error("Error parsing apiKeySource from sessionStorage",e)}return W?"custom":"session"}),[ef,ev]=(0,T.useState)(()=>sessionStorage.getItem("apiKey")||""),[eb,ey]=(0,T.useState)(()=>sessionStorage.getItem("customProxyBaseUrl")||""),[eS,ek]=(0,T.useState)(""),[eI,eE]=(0,T.useState)(()=>{try{let e=sessionStorage.getItem("chatHistory");return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing chatHistory from sessionStorage",e),[]}}),[eZ,eL]=(0,T.useState)(void 0),[eR,eO]=(0,T.useState)(!1),[eD,eB]=(0,T.useState)([]),[ez,eH]=(0,T.useState)([]),[eJ,eY]=(0,T.useState)(void 0),e$=(0,T.useRef)(null),[eQ,e6]=(0,T.useState)(()=>sessionStorage.getItem("endpointType")||ew.KP.CHAT),[e7,e8]=(0,T.useState)(!1),e9=(0,T.useRef)(null),[te,tt]=(0,T.useState)(()=>{let e=sessionStorage.getItem("selectedTags");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedTags from sessionStorage",e),[]}}),[ts,ta]=(0,T.useState)(()=>{let e=sessionStorage.getItem("selectedVoice");if(!e)return"alloy";try{return JSON.parse(e)}catch(t){return e}}),[tr,tl]=(0,T.useState)(()=>{let e=sessionStorage.getItem("selectedVectorStores");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedVectorStores from sessionStorage",e),[]}}),[to,tn]=(0,T.useState)(()=>{let e=sessionStorage.getItem("selectedGuardrails");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedGuardrails from sessionStorage",e),[]}}),[ti,tc]=(0,T.useState)(()=>{let e=sessionStorage.getItem("selectedPolicies");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedPolicies from sessionStorage",e),[]}}),[td,tm]=(0,T.useState)(()=>sessionStorage.getItem("messageTraceId")||null),[tu,tx]=(0,T.useState)(()=>sessionStorage.getItem("responsesSessionId")||null),[tg,tp]=(0,T.useState)(()=>{let e=sessionStorage.getItem("useApiSessionManagement");return!e||JSON.parse(e)}),[th,tf]=(0,T.useState)([]),[tv,tb]=(0,T.useState)([]),[ty,tj]=(0,T.useState)(null),[tN,tw]=(0,T.useState)(null),[tS,t_]=(0,T.useState)(null),[tk,tP]=(0,T.useState)(null),[tC,tA]=(0,T.useState)(null),[tI,tE]=(0,T.useState)(!1),[tZ,tT]=(0,T.useState)(""),[tL,tR]=(0,T.useState)("openai"),[tO,tU]=(0,T.useState)([]),[tM,tK]=(0,T.useState)(1),[tD,tB]=(0,T.useState)(2048),[tz,tH]=(0,T.useState)(!1),tF=function(){let[e,t]=(0,T.useState)(()=>{let e=sessionStorage.getItem("codeInterpreterEnabled");return!!e&&JSON.parse(e)}),[s,a]=(0,T.useState)(null),r=(0,T.useCallback)(e=>{t(e),sessionStorage.setItem("codeInterpreterEnabled",JSON.stringify(e))},[]),l=(0,T.useCallback)(()=>{a(null)},[]),o=(0,T.useCallback)(()=>{r(!e)},[e,r]);return{enabled:e,result:s,setEnabled:r,setResult:a,clearResult:l,toggle:o}}(),tG=(0,T.useRef)(null),tW=async()=>{let e="session"===eg?t:ef;if(e){ec(!0);try{let t=await (0,z.fetchMCPServers)(e);el(Array.isArray(t)?t:t.data||[])}catch(e){console.error("Error fetching MCP servers:",e)}finally{ec(!1)}}},tJ=async e=>{let s="session"===eg?t:ef;if(s&&!ed[e])try{let t=await (0,z.listMCPTools)(s,e);em(s=>({...s,[e]:t.tools||[]}))}catch(t){console.error("Error fetching tools for server ".concat(e,":"),t)}};(0,T.useEffect)(()=>{tI&&tT((0,eM.L)({apiKeySource:eg,accessToken:t,apiKey:ef,inputMessage:eS,chatHistory:eI,selectedTags:te,selectedVectorStores:tr,selectedGuardrails:to,selectedPolicies:ti,selectedMCPServers:eo,mcpServers:er,mcpServerToolRestrictions:eu,endpointType:eQ,selectedModel:eZ,selectedSdk:tL,selectedVoice:ts,proxySettings:q}))},[tI,tL,eg,t,ef,eS,eI,te,tr,to,ti,eo,er,eu,eQ,eZ,q]),(0,T.useEffect)(()=>{let e=setTimeout(()=>{sessionStorage.setItem("chatHistory",JSON.stringify(eI))},500);return()=>{clearTimeout(e)}},[eI]),(0,T.useEffect)(()=>{sessionStorage.setItem("apiKeySource",JSON.stringify(eg)),sessionStorage.setItem("apiKey",ef),sessionStorage.setItem("endpointType",eQ),sessionStorage.setItem("selectedTags",JSON.stringify(te)),sessionStorage.setItem("selectedVectorStores",JSON.stringify(tr)),sessionStorage.setItem("selectedGuardrails",JSON.stringify(to)),sessionStorage.setItem("selectedPolicies",JSON.stringify(ti)),sessionStorage.setItem("selectedMCPServers",JSON.stringify(eo)),sessionStorage.setItem("mcpServerToolRestrictions",JSON.stringify(eu)),sessionStorage.setItem("selectedVoice",ts),sessionStorage.removeItem("selectedMCPTools"),eZ?sessionStorage.setItem("selectedModel",eZ):sessionStorage.removeItem("selectedModel"),td?sessionStorage.setItem("messageTraceId",td):sessionStorage.removeItem("messageTraceId"),tu?sessionStorage.setItem("responsesSessionId",tu):sessionStorage.removeItem("responsesSessionId"),sessionStorage.setItem("useApiSessionManagement",JSON.stringify(tg))},[eg,ef,eZ,eQ,te,tr,to,ti,td,tu,tg,eo,eu,ts]),(0,T.useEffect)(()=>{let e="session"===eg?t:ef;if(!e||!s||!S||!_){console.log("userApiKey or token or userRole or userID is missing = ",e,s,S,_);return}(async()=>{try{if(!e){console.log("userApiKey is missing");return}let t=await (0,ee.p)(e);console.log("Fetched models:",t),eB(t);let s=t.some(e=>e.model_group===eZ);t.length&&s||eL(void 0)}catch(e){console.error("Error fetching model info:",e)}})(),tW()},[t,_,S,eg,ef,s]),(0,T.useEffect)(()=>{let e="session"===eg?t:ef;e&&eQ===ew.KP.A2A_AGENTS&&(async()=>{try{let t=await (0,Q.o)(e,eb||void 0);eH(t),eJ&&!t.some(e=>e.agent_name===eJ)&&eY(void 0)}catch(e){console.error("Error fetching agents:",e)}})()},[t,eg,ef,eQ,eb,eJ]),(0,T.useEffect)(()=>{tG.current&&setTimeout(()=>{var e;null===(e=tG.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end"})},100)},[eI]);let tq=(e,t,s)=>{console.log("updateTextUI called with:",e,t,s),eE(a=>{let r=a[a.length-1];if(!r||r.role!==e||r.isImage||r.isAudio)return[...a,{role:e,content:t,model:s}];{var l;let e={...r,content:r.content+t,model:null!==(l=r.model)&&void 0!==l?l:s};return[...a.slice(0,-1),e]}})},tV=e=>{eE(t=>{let s=t[t.length-1];return!s||"assistant"!==s.role||s.isImage||s.isAudio?t.length>0&&"user"===t[t.length-1].role?[...t,{role:"assistant",content:"",reasoningContent:e}]:t:[...t.slice(0,t.length-1),{...s,reasoningContent:(s.reasoningContent||"")+e}]})},tY=e=>{console.log("updateTimingData called with:",e),eE(t=>{let s=t[t.length-1];if(console.log("Current last message:",s),s&&"assistant"===s.role){console.log("Updating assistant message with timeToFirstToken:",e);let a=[...t.slice(0,t.length-1),{...s,timeToFirstToken:e}];return console.log("Updated chat history:",a),a}return s&&"user"===s.role?(console.log("Creating new assistant message with timeToFirstToken:",e),[...t,{role:"assistant",content:"",timeToFirstToken:e}]):(console.log("No appropriate message found to update timing"),t)})},tX=(e,t)=>{console.log("Received usage data:",e),eE(s=>{let a=s[s.length-1];if(a&&"assistant"===a.role){console.log("Updating message with usage data:",e);let r={...a,usage:e,toolName:t};return console.log("Updated message:",r),[...s.slice(0,s.length-1),r]}return s})},t$=e=>{console.log("Received A2A metadata:",e),eE(t=>{let s=t[t.length-1];if(s&&"assistant"===s.role){let a={...s,a2aMetadata:e};return[...t.slice(0,t.length-1),a]}return t})},tQ=e=>{eE(t=>{let s=t[t.length-1];return s&&"assistant"===s.role?[...t.slice(0,t.length-1),{...s,totalLatency:e}]:t})},t0=e=>{console.log("Received search results:",e),eE(t=>{let s=t[t.length-1];if(s&&"assistant"===s.role){console.log("Updating message with search results");let a={...s,searchResults:e};return[...t.slice(0,t.length-1),a]}return t})},t2=e=>{console.log("Received response ID for session management:",e),tg&&tx(e)},t1=e=>{console.log("ChatUI: Received MCP event:",e),tU(t=>{if(e.item_id&&t.some(t=>t.item_id===e.item_id&&t.type===e.type&&(t.sequence_number===e.sequence_number||void 0===t.sequence_number&&void 0===e.sequence_number)))return console.log("ChatUI: Duplicate MCP event, skipping"),t;let s=[...t,e];return console.log("ChatUI: Updated MCP events:",s),s})},t4=(e,t)=>{eE(s=>[...s,{role:"assistant",content:e,model:t,isImage:!0}])},t3=(e,t)=>{eE(s=>[...s,{role:"assistant",content:(0,M.aS)(e,100),model:t,isEmbeddings:!0}])},t5=(e,t)=>{eE(s=>[...s,{role:"assistant",content:e,model:t,isAudio:!0}])},t6=(e,t)=>{eE(s=>{let a=s[s.length-1];if(!a||"assistant"!==a.role||a.isImage||a.isAudio)return[...s,{role:"assistant",content:"",model:t,image:{url:e,detail:"auto"}}];{var r;let l={...a,image:{url:e,detail:"auto"},model:null!==(r=a.model)&&void 0!==r?r:t};return[...s.slice(0,-1),l]}})},t7=e=>{tf(t=>[...t,e]);let t=URL.createObjectURL(e);return tb(e=>[...e,t]),!1},t8=e=>{tv[e]&&URL.revokeObjectURL(tv[e]),tf(t=>t.filter((t,s)=>s!==e)),tb(t=>t.filter((t,s)=>s!==e))},t9=()=>{tv.forEach(e=>{URL.revokeObjectURL(e)}),tf([]),tb([])},se=()=>{tN&&URL.revokeObjectURL(tN),tj(null),tw(null)},st=()=>{tk&&URL.revokeObjectURL(tk),t_(null),tP(null)},ss=()=>{tA(null)},sa=async()=>{let e;if(""===eS.trim()&&eQ!==ew.KP.TRANSCRIPTION)return;if(eQ===ew.KP.IMAGE_EDITS&&0===th.length){B.Z.fromBackend("Please upload at least one image for editing");return}if(eQ===ew.KP.TRANSCRIPTION&&!tC){B.Z.fromBackend("Please upload an audio file for transcription");return}if(eQ===ew.KP.A2A_AGENTS&&!eJ){B.Z.fromBackend("Please select an agent to send a message");return}if([ew.KP.CHAT,ew.KP.IMAGE,ew.KP.SPEECH,ew.KP.IMAGE_EDITS,ew.KP.RESPONSES,ew.KP.ANTHROPIC_MESSAGES,ew.KP.EMBEDDINGS,ew.KP.TRANSCRIPTION].includes(eQ)&&!eZ){B.Z.fromBackend("Please select a model before sending a request");return}if(!s||!S||!_)return;let a="session"===eg?t:ef;if(!a){B.Z.fromBackend("Please provide a Virtual Key or select Current UI Session");return}e9.current=new AbortController;let r=e9.current.signal;if(eQ===ew.KP.RESPONSES&&ty)try{e=await eq(eS,ty)}catch(e){B.Z.fromBackend("Failed to process image. Please try again.");return}else if(eQ===ew.KP.CHAT&&tS)try{e=await (0,eA.Sn)(eS,tS)}catch(e){B.Z.fromBackend("Failed to process image. Please try again.");return}else e={role:"user",content:eS};let l=td||(0,U.Z)();td||tm(l),eE([...eI,eQ===ew.KP.RESPONSES&&ty?eV(eS,!0,tN||void 0,ty.name):eQ===ew.KP.CHAT&&tS?(0,eA.Hk)(eS,!0,tk||void 0,tS.name):eQ===ew.KP.TRANSCRIPTION&&tC?eV(eS?"\uD83C\uDFB5 Audio file: ".concat(tC.name,"\nPrompt: ").concat(eS):"\uD83C\uDFB5 Audio file: ".concat(tC.name),!1):eV(eS,!1)]),tU([]),tF.clearResult(),e8(!0);try{if(eZ){if(eQ===ew.KP.CHAT){let t=[...eI.filter(e=>!e.isImage&&!e.isAudio).map(e=>{let{role:t,content:s}=e;return{role:t,content:"string"==typeof s?s:""}}),e];await (0,X.n)(t,(e,t)=>tq("assistant",e,t),eZ,a,te,r,tV,tY,tX,l,tr.length>0?tr:void 0,to.length>0?to:void 0,ti.length>0?ti:void 0,eo,t6,t0,tz?tM:void 0,tz?tD:void 0,tQ,eb||void 0,er,eu,t1)}else if(eQ===ew.KP.IMAGE)await es(eS,(e,t)=>t4(e,t),eZ,a,te,r,eb||void 0);else if(eQ===ew.KP.SPEECH)await V(eS,ts,(e,t)=>t5(e,t),eZ||"",a,te,r,void 0,void 0,eb||void 0);else if(eQ===ew.KP.IMAGE_EDITS)th.length>0&&await et(1===th.length?th[0]:th,eS,(e,t)=>t4(e,t),eZ,a,te,r,eb||void 0);else if(eQ===ew.KP.RESPONSES){let t;t=tg&&tu?[e]:[...eI.filter(e=>!e.isImage&&!e.isAudio).map(e=>{let{role:t,content:s}=e;return{role:t,content:s}}),e],await ea(t,(e,t,s)=>tq(e,t,s),eZ,a,te,r,tV,tY,tX,l,tr.length>0?tr:void 0,to.length>0?to:void 0,ti.length>0?ti:void 0,eo,tg?tu:null,t2,t1,tF.enabled,tF.setResult,eb||void 0,er,eu)}else if(eQ===ew.KP.ANTHROPIC_MESSAGES){let t=[...eI.filter(e=>!e.isImage&&!e.isAudio).map(e=>{let{role:t,content:s}=e;return{role:t,content:s}}),e];await J(t,(e,t,s)=>tq(e,t,s),eZ,a,te,r,tV,tY,tX,l,tr.length>0?tr:void 0,to.length>0?to:void 0,ti.length>0?ti:void 0,eo,eb||void 0)}else eQ===ew.KP.EMBEDDINGS?await $(eS,(e,t)=>t3(e,t),eZ,a,te,eb||void 0):eQ===ew.KP.TRANSCRIPTION&&tC&&await Y(tC,(e,t)=>tq("assistant",e,t),eZ,a,te,r,void 0,void 0,void 0,void 0,eb||void 0)}eQ===ew.KP.A2A_AGENTS&&eJ&&await (0,G.O)(eJ,eS,(e,t)=>tq("assistant",e,t),a,r,tY,tQ,t$,eb||void 0)}catch(e){r.aborted?console.log("Request was cancelled"):(console.error("Error fetching response",e),tq("assistant","Error fetching response:"+e))}finally{e8(!1),e9.current=null,eQ===ew.KP.IMAGE_EDITS&&t9(),eQ===ew.KP.RESPONSES&&ty&&se(),eQ===ew.KP.CHAT&&tS&&st(),eQ===ew.KP.TRANSCRIPTION&&tC&&ss()}ek("")};if(S&&"Admin Viewer"===S){let{Title:e,Paragraph:t}=k.default;return(0,a.jsxs)("div",{children:[(0,a.jsx)(e,{level:1,children:"Access Denied"}),(0,a.jsx)(t,{children:"Ask your proxy admin for access to test models"})]})}let sr=(0,a.jsx)(r.Z,{style:{fontSize:24},spin:!0});return(0,a.jsxs)("div",{className:"w-full p-4 pb-0 bg-white",children:[(0,a.jsx)(w.Zb,{className:"w-full rounded-xl shadow-md overflow-hidden",children:(0,a.jsxs)("div",{className:"flex h-[80vh] w-full gap-4",children:[(0,a.jsxs)("div",{className:"w-1/4 p-4 bg-gray-50 overflow-y-auto",children:[(0,a.jsx)(w.Dx,{className:"text-xl font-semibold mb-6 mt-2",children:"Configurations"}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(l.Z,{className:"mr-2"})," Virtual Key Source"]}),(0,a.jsx)(P.default,{disabled:W,value:eg,style:{width:"100%"},onChange:e=>{ep(e)},options:[{value:"session",label:"Current UI Session"},{value:"custom",label:"Virtual Key"}],className:"rounded-md"}),"custom"===eg&&(0,a.jsx)(w.oi,{className:"mt-2",placeholder:"Enter custom Virtual Key",type:"password",onValueChange:ev,value:ef,icon:l.Z})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)(w.xv,{className:"font-medium block text-gray-700 flex items-center",children:[(0,a.jsx)(o.Z,{className:"mr-2"})," Custom Proxy Base URL"]}),(null==q?void 0:q.LITELLM_UI_API_DOC_BASE_URL)&&!eb&&(0,a.jsx)(C.ZP,{type:"link",size:"small",icon:(0,a.jsx)(n.Z,{}),onClick:()=>{ey(q.LITELLM_UI_API_DOC_BASE_URL||""),sessionStorage.setItem("customProxyBaseUrl",q.LITELLM_UI_API_DOC_BASE_URL||"")},className:"text-gray-500 hover:text-gray-700",children:"Fill"}),eb&&(0,a.jsx)(C.ZP,{type:"link",size:"small",icon:(0,a.jsx)(i.Z,{}),onClick:()=>{ey(""),sessionStorage.removeItem("customProxyBaseUrl")},className:"text-gray-500 hover:text-gray-700",children:"Clear"})]}),(0,a.jsx)(w.oi,{placeholder:"Optional: Enter custom proxy URL (e.g., http://localhost:5000)",onValueChange:e=>{ey(e),sessionStorage.setItem("customProxyBaseUrl",e)},value:eb,icon:c.Z}),eb&&(0,a.jsxs)(w.xv,{className:"text-xs text-gray-500 mt-1",children:["API calls will be sent to: ",eb]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(c.Z,{className:"mr-2"})," Endpoint Type"]}),(0,a.jsx)(eK,{endpointType:eQ,onEndpointChange:e=>{e6(e),eL(void 0),eY(void 0),eO(!1);try{sessionStorage.removeItem("selectedModel"),sessionStorage.removeItem("selectedAgent")}catch(e){}},className:"mb-4"}),eQ===ew.KP.SPEECH&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(d.Z,{className:"mr-2"}),"Voice"]}),(0,a.jsx)(P.default,{value:ts,onChange:e=>{ta(e),sessionStorage.setItem("selectedVoice",e)},style:{width:"100%"},className:"rounded-md",options:e_})]}),(0,a.jsx)(e1,{endpointType:eQ,responsesSessionId:tu,useApiSessionManagement:tg,onToggleSessionManagement:e=>{tp(e),e||tx(null)}})]}),eQ!==ew.KP.A2A_AGENTS&&(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center justify-between",children:[(0,a.jsxs)("span",{className:"flex items-center",children:[(0,a.jsx)(m.Z,{className:"mr-2"})," Select Model"]}),(()=>{if(!eZ||"custom"===eZ)return!1;let e=eD.find(e=>e.model_group===eZ);return!!e&&(!e.mode||"chat"===e.mode)})()?(0,a.jsx)(A.Z,{content:(0,a.jsx)(ej,{temperature:tM,maxTokens:tD,useAdvancedParams:tz,onTemperatureChange:tK,onMaxTokensChange:tB,onUseAdvancedParamsChange:tH}),title:"Model Settings",trigger:"click",placement:"right",children:(0,a.jsx)(C.ZP,{type:"text",size:"small",icon:(0,a.jsx)(o.Z,{}),className:"text-gray-500 hover:text-gray-700"})}):(0,a.jsx)(I.Z,{title:"Advanced parameters are only supported for chat models currently",children:(0,a.jsx)(C.ZP,{type:"text",size:"small",icon:(0,a.jsx)(o.Z,{}),className:"text-gray-300 cursor-not-allowed",disabled:!0})})]}),(0,a.jsx)(P.default,{value:eZ,placeholder:"Select a Model",onChange:e=>{console.log("selected ".concat(e)),eL(e),eO("custom"===e)},options:[{value:"custom",label:"Enter custom model",key:"custom"},...Array.from(new Set(eD.filter(e=>{if(!e.mode)return!0;let t=(0,ew.vf)(e.mode);return eQ===ew.KP.RESPONSES||eQ===ew.KP.ANTHROPIC_MESSAGES?t===eQ||t===ew.KP.CHAT:eQ===ew.KP.IMAGE_EDITS?t===eQ||t===ew.KP.IMAGE:t===eQ}).map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t}))],style:{width:"100%"},showSearch:!0,className:"rounded-md"}),eR&&(0,a.jsx)(w.oi,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{e$.current&&clearTimeout(e$.current),e$.current=setTimeout(()=>{eL(e)},500)}})]}),eQ===ew.KP.A2A_AGENTS&&(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(m.Z,{className:"mr-2"})," Select Agent"]}),(0,a.jsx)(P.default,{value:eJ,placeholder:"Select an Agent",onChange:e=>eY(e),options:ez.map(e=>({value:e.agent_name,label:e.agent_name||e.agent_id,key:e.agent_id})),style:{width:"100%"},showSearch:!0,className:"rounded-md",optionLabelProp:"label",children:ez.map(e=>{var t;return(0,a.jsx)(P.default.Option,{value:e.agent_name,label:e.agent_name||e.agent_id,children:(0,a.jsxs)("div",{className:"flex flex-col py-1",children:[(0,a.jsx)("span",{className:"font-medium",children:e.agent_name||e.agent_id}),(null===(t=e.agent_card_params)||void 0===t?void 0:t.description)&&(0,a.jsx)("span",{className:"text-xs text-gray-500 mt-1",children:e.agent_card_params.description})]})},e.agent_id)})}),0===ez.length&&(0,a.jsx)(w.xv,{className:"text-xs text-gray-500 mt-2 block",children:"No agents found. Create agents via /v1/agents endpoint."})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(u.Z,{className:"mr-2"})," Tags"]}),(0,a.jsx)(H.Z,{value:te,onChange:tt,className:"mb-4",accessToken:t||""})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(x.Z,{className:"mr-2"})," MCP Servers",(0,a.jsx)(I.Z,{className:"ml-1",title:"Select MCP servers to use in your conversation.",children:(0,a.jsx)(g.Z,{})})]}),(0,a.jsxs)(P.default,{mode:"multiple",style:{width:"100%"},placeholder:"Select MCP servers",value:eo,onChange:e=>{e.includes("__all__")?(en(["__all__"]),ex({})):(en(e),ex(t=>{let s={...t};return Object.keys(s).forEach(t=>{e.includes(t)||delete s[t]}),s}),e.forEach(e=>{ed[e]||tJ(e)}))},loading:ei,className:"mb-2",allowClear:!0,optionLabelProp:"label",disabled:!e5.has(eQ),maxTagCount:"responsive",children:[(0,a.jsx)(P.default.Option,{value:"__all__",label:"All MCP Servers",children:(0,a.jsxs)("div",{className:"flex flex-col py-1",children:[(0,a.jsx)("span",{className:"font-medium",children:"All MCP Servers"}),(0,a.jsx)("span",{className:"text-xs text-gray-500 mt-1",children:"Use all available MCP servers"})]})},"__all__"),er.map(e=>(0,a.jsx)(P.default.Option,{value:e.server_id,label:e.alias||e.server_name||e.server_id,disabled:eo.includes("__all__"),children:(0,a.jsxs)("div",{className:"flex flex-col py-1",children:[(0,a.jsx)("span",{className:"font-medium",children:e.alias||e.server_name||e.server_id}),e.description&&(0,a.jsx)("span",{className:"text-xs text-gray-500 mt-1",children:e.description})]})},e.server_id))]}),eo.length>0&&!eo.includes("__all__")&&e5.has(eQ)&&(0,a.jsx)("div",{className:"mt-3 space-y-2",children:eo.map(e=>{let t=er.find(t=>t.server_id===e),s=ed[e]||[];return 0===s.length?null:(0,a.jsxs)("div",{className:"border rounded p-2",children:[(0,a.jsxs)(w.xv,{className:"text-xs text-gray-600 mb-1",children:["Limit tools for ",(null==t?void 0:t.alias)||(null==t?void 0:t.server_name)||e,":"]}),(0,a.jsx)(P.default,{mode:"multiple",size:"small",style:{width:"100%"},placeholder:"All tools (default)",value:eu[e]||[],onChange:t=>{ex(s=>({...s,[e]:t}))},options:s.map(e=>({value:e.name,label:e.name})),maxTagCount:2})]},e)})})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(p.Z,{className:"mr-2"})," Vector Store",(0,a.jsx)(I.Z,{className:"ml-1",title:(0,a.jsxs)("span",{children:["Select vector store(s) to use for this LLM API call. You can set up your vector store"," ",(0,a.jsx)("a",{href:"?page=vector-stores",style:{color:"#1890ff"},children:"here"}),"."]}),children:(0,a.jsx)(g.Z,{})})]}),(0,a.jsx)(F.Z,{value:tr,onChange:tl,className:"mb-4",accessToken:t||""})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(h.Z,{className:"mr-2"})," Guardrails",(0,a.jsx)(I.Z,{className:"ml-1",title:(0,a.jsxs)("span",{children:["Select guardrail(s) to use for this LLM API call. You can set up your guardrails"," ",(0,a.jsx)("a",{href:"?page=guardrails",style:{color:"#1890ff"},children:"here"}),"."]}),children:(0,a.jsx)(g.Z,{})})]}),(0,a.jsx)(K.Z,{value:to,onChange:tn,className:"mb-4",accessToken:t||""})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(h.Z,{className:"mr-2"})," Policies",(0,a.jsx)(I.Z,{className:"ml-1",title:(0,a.jsxs)("span",{children:["Select policy/policies to apply to this LLM API call. Policies define which guardrails are applied based on conditions. You can set up your policies"," ",(0,a.jsx)("a",{href:"?page=policies",style:{color:"#1890ff"},children:"here"}),"."]}),children:(0,a.jsx)(g.Z,{})})]}),(0,a.jsx)(D.Z,{value:ti,onChange:tc,className:"mb-4",accessToken:t||""})]}),eQ===ew.KP.RESPONSES&&(0,a.jsx)("div",{children:(0,a.jsx)(eU,{accessToken:"session"===eg?t||"":ef,enabled:tF.enabled,onEnabledChange:tF.setEnabled,selectedContainerId:null,onContainerChange:()=>{},selectedModel:eZ||""})})]})]}),(0,a.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,a.jsxs)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:[(0,a.jsx)(w.Dx,{className:"text-xl font-semibold mb-0",children:"Test Key"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(w.zx,{onClick:()=>{eI.forEach(e=>{e.isAudio&&"string"==typeof e.content&&URL.revokeObjectURL(e.content)}),eE([]),tm(null),tx(null),tU([]),t9(),se(),st(),ss(),sessionStorage.removeItem("chatHistory"),sessionStorage.removeItem("messageTraceId"),sessionStorage.removeItem("responsesSessionId"),B.Z.success("Chat history cleared.")},className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:i.Z,children:"Clear Chat"}),(0,a.jsx)(w.zx,{onClick:()=>tE(!0),className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:f.Z,children:"Get Code"})]})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-auto p-4 pb-0",children:[0===eI.length&&(0,a.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,a.jsx)(m.Z,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,a.jsx)(w.xv,{children:"Start a conversation, generate an image, or handle audio"})]}),eI.map((e,s)=>(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"mb-4 ".concat("user"===e.role?"text-right":"text-left"),children:(0,a.jsxs)("div",{className:"inline-block max-w-[80%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"user"===e.role?"#f0f8ff":"#ffffff",border:"user"===e.role?"1px solid #e6f0fa":"1px solid #f0f0f0",textAlign:"left"},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:"user"===e.role?"#e6f0fa":"#f5f5f5"},children:"user"===e.role?(0,a.jsx)(v.Z,{style:{fontSize:"12px",color:"#2563eb"}}):(0,a.jsx)(m.Z,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,a.jsx)("strong",{className:"text-sm capitalize",children:e.role}),"assistant"===e.role&&e.model&&(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:e.model})]}),e.reasoningContent&&(0,a.jsx)(eG.Z,{reasoningContent:e.reasoningContent}),"assistant"===e.role&&s===eI.length-1&&tO.length>0&&(eQ===ew.KP.RESPONSES||eQ===ew.KP.CHAT)&&(0,a.jsx)("div",{className:"mb-3",children:(0,a.jsx)(eF,{events:tO})}),"assistant"===e.role&&e.searchResults&&(0,a.jsx)(e2.J,{searchResults:e.searchResults}),"assistant"===e.role&&s===eI.length-1&&tF.result&&eQ===ew.KP.RESPONSES&&(0,a.jsx)(eT,{code:tF.result.code,containerId:tF.result.containerId,annotations:tF.result.annotations,accessToken:"session"===eg?t||"":ef}),(0,a.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:[e.isImage?(0,a.jsx)("img",{src:"string"==typeof e.content?e.content:"",alt:"Generated image",className:"max-w-full rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"500px"}}):e.isAudio?(0,a.jsx)(eN,{message:e}):(0,a.jsxs)(a.Fragment,{children:[eQ===ew.KP.RESPONSES&&(0,a.jsx)(eX,{message:e}),eQ===ew.KP.CHAT&&(0,a.jsx)(eP.Z,{message:e}),(0,a.jsx)(L.UG,{components:{code(e){let{node:t,inline:s,className:r,children:l,...o}=e,n=/language-(\w+)/.exec(r||"");return!s&&n?(0,a.jsx)(R.Z,{style:O.Z,language:n[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...o,children:String(l).replace(/\n$/,"")}):(0,a.jsx)("code",{className:"".concat(r," px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono"),style:{wordBreak:"break-word"},...o,children:l})},pre:e=>{let{node:t,...s}=e;return(0,a.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...s})}},children:"string"==typeof e.content?e.content:""}),e.image&&(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)("img",{src:e.image.url,alt:"Generated image",className:"max-w-full rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"500px"}})})]}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&!e.a2aMetadata&&(0,a.jsx)(eW.Z,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage,toolName:e.toolName}),"assistant"===e.role&&e.a2aMetadata&&(0,a.jsx)(eh,{a2aMetadata:e.a2aMetadata,timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency})]})]})})},s)),e7&&tO.length>0&&(eQ===ew.KP.RESPONSES||eQ===ew.KP.CHAT)&&eI.length>0&&"user"===eI[eI.length-1].role&&(0,a.jsx)("div",{className:"text-left mb-4",children:(0,a.jsxs)("div",{className:"inline-block max-w-[80%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"#ffffff",border:"1px solid #f0f0f0",textAlign:"left"},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:"#f5f5f5"},children:(0,a.jsx)(m.Z,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,a.jsx)("strong",{className:"text-sm capitalize",children:"Assistant"})]}),(0,a.jsx)(eF,{events:tO})]})}),e7&&(0,a.jsx)("div",{className:"flex justify-center items-center my-4",children:(0,a.jsx)(E.Z,{indicator:sr})}),(0,a.jsx)("div",{ref:tG,style:{height:"1px"}})]}),(0,a.jsxs)("div",{className:"p-4 border-t border-gray-200 bg-white",children:[eQ===ew.KP.IMAGE_EDITS&&(0,a.jsx)("div",{className:"mb-4",children:0===th.length?(0,a.jsxs)(e3,{beforeUpload:t7,accept:"image/*",showUploadList:!1,children:[(0,a.jsx)("p",{className:"ant-upload-drag-icon",children:(0,a.jsx)(b.Z,{style:{fontSize:"24px",color:"#666"}})}),(0,a.jsx)("p",{className:"ant-upload-text text-sm",children:"Click or drag images to upload"}),(0,a.jsx)("p",{className:"ant-upload-hint text-xs text-gray-500",children:"Support for PNG, JPG, JPEG formats. Multiple images supported."})]}):(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[th.map((e,t)=>(0,a.jsxs)("div",{className:"relative inline-block",children:[(0,a.jsx)("img",{src:tv[t]||"",alt:"Upload preview ".concat(t+1),className:"max-w-32 max-h-32 rounded-md border border-gray-200 object-cover"}),(0,a.jsx)("button",{className:"absolute top-1 right-1 bg-white shadow-sm border border-gray-200 rounded px-1 py-1 text-red-500 hover:bg-red-50 text-xs",onClick:()=>t8(t),children:(0,a.jsx)(y.Z,{})})]},t)),(0,a.jsxs)("div",{className:"flex items-center justify-center w-32 h-32 border-2 border-dashed border-gray-300 rounded-md hover:border-gray-400 cursor-pointer",onClick:()=>{var e;return null===(e=document.getElementById("additional-image-upload"))||void 0===e?void 0:e.click()},children:[(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(b.Z,{style:{fontSize:"24px",color:"#666"}}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Add more"})]}),(0,a.jsx)("input",{id:"additional-image-upload",type:"file",accept:"image/*",multiple:!0,style:{display:"none"},onChange:e=>{Array.from(e.target.files||[]).forEach(e=>t7(e))}})]})]})}),eQ===ew.KP.TRANSCRIPTION&&(0,a.jsx)("div",{className:"mb-4",children:tC?(0,a.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-1",children:[(0,a.jsx)(d.Z,{style:{fontSize:"20px",color:"#666"}}),(0,a.jsx)("span",{className:"text-sm font-medium",children:tC.name}),(0,a.jsxs)("span",{className:"text-xs text-gray-500",children:["(",(tC.size/1024/1024).toFixed(2)," MB)"]})]}),(0,a.jsxs)("button",{className:"bg-white shadow-sm border border-gray-200 rounded px-2 py-1 text-red-500 hover:bg-red-50 text-xs",onClick:ss,children:[(0,a.jsx)(y.Z,{})," Remove"]})]}):(0,a.jsxs)(e3,{beforeUpload:e=>(tA(e),!1),accept:"audio/*,.mp3,.mp4,.mpeg,.mpga,.m4a,.wav,.webm",showUploadList:!1,children:[(0,a.jsx)("p",{className:"ant-upload-drag-icon",children:(0,a.jsx)(d.Z,{style:{fontSize:"24px",color:"#666"}})}),(0,a.jsx)("p",{className:"ant-upload-text text-sm",children:"Click or drag audio file to upload"}),(0,a.jsx)("p",{className:"ant-upload-hint text-xs text-gray-500",children:"Support for MP3, MP4, MPEG, MPGA, M4A, WAV, WEBM formats. Max file size: 25 MB."})]})}),eQ===ew.KP.RESPONSES&&ty&&(0,a.jsx)("div",{className:"mb-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsx)("div",{className:"relative inline-block",children:ty.name.toLowerCase().endsWith(".pdf")?(0,a.jsx)("div",{className:"w-10 h-10 rounded-md bg-red-500 flex items-center justify-center",children:(0,a.jsx)(j.Z,{style:{fontSize:"16px",color:"white"}})}):(0,a.jsx)("img",{src:tN||"",alt:"Upload preview",className:"w-10 h-10 rounded-md border border-gray-200 object-cover"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:ty.name}),(0,a.jsx)("div",{className:"text-xs text-gray-500",children:ty.name.toLowerCase().endsWith(".pdf")?"PDF":"Image"})]}),(0,a.jsx)("button",{className:"flex items-center justify-center w-6 h-6 text-gray-400 hover:text-gray-600 hover:bg-gray-200 rounded-full transition-colors",onClick:se,children:(0,a.jsx)(y.Z,{style:{fontSize:"12px"}})})]})}),eQ===ew.KP.CHAT&&tS&&(0,a.jsx)("div",{className:"mb-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsx)("div",{className:"relative inline-block",children:tS.name.toLowerCase().endsWith(".pdf")?(0,a.jsx)("div",{className:"w-10 h-10 rounded-md bg-red-500 flex items-center justify-center",children:(0,a.jsx)(j.Z,{style:{fontSize:"16px",color:"white"}})}):(0,a.jsx)("img",{src:tk||"",alt:"Upload preview",className:"w-10 h-10 rounded-md border border-gray-200 object-cover"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:tS.name}),(0,a.jsx)("div",{className:"text-xs text-gray-500",children:tS.name.toLowerCase().endsWith(".pdf")?"PDF":"Image"})]}),(0,a.jsx)("button",{className:"flex items-center justify-center w-6 h-6 text-gray-400 hover:text-gray-600 hover:bg-gray-200 rounded-full transition-colors",onClick:st,children:(0,a.jsx)(y.Z,{style:{fontSize:"12px"}})})]})}),eQ===ew.KP.RESPONSES&&tF.enabled&&(0,a.jsxs)("div",{className:"mb-2 space-y-2",children:[(0,a.jsxs)("div",{className:"px-3 py-2 bg-gradient-to-r from-blue-50 to-purple-50 rounded-lg border border-blue-200 flex items-center justify-between",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:e7?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.Z,{className:"text-blue-500",spin:!0}),(0,a.jsx)("span",{className:"text-sm text-blue-700 font-medium",children:"Running Python code..."})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.Z,{className:"text-blue-500"}),(0,a.jsx)("span",{className:"text-sm text-blue-700 font-medium",children:"Code Interpreter Active"})]})}),(0,a.jsx)("button",{className:"text-xs text-blue-500 hover:text-blue-700",onClick:()=>tF.setEnabled(!1),children:"Disable"})]}),!e7&&(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:["Generate sample sales data CSV and create a chart","Create a PNG bar chart comparing AI gateway providers including LiteLLM","Generate a CSV of LLM pricing data and visualize it as a line chart"].map((e,t)=>(0,a.jsx)("button",{className:"text-xs px-3 py-1.5 bg-white border border-gray-200 rounded-full hover:bg-blue-50 hover:border-blue-300 hover:text-blue-600 transition-colors",onClick:()=>ek(e),children:e},t))})]}),0===eI.length&&!e7&&(0,a.jsx)("div",{className:"flex items-center gap-2 mb-3 overflow-x-auto",children:(eQ===ew.KP.A2A_AGENTS?["What can you help me with?","Tell me about yourself","What tasks can you perform?"]:["Write me a poem","Explain quantum computing","Draft a polite email requesting a meeting"]).map(e=>(0,a.jsx)("button",{type:"button",className:"shrink-0 rounded-full border border-gray-200 px-3 py-1 text-xs font-medium text-gray-600 transition-colors hover:bg-blue-50 hover:border-blue-300 hover:text-blue-600 cursor-pointer",onClick:()=>ek(e),children:e},e))}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center flex-1 bg-white border border-gray-300 rounded-xl px-3 py-1 min-h-[44px]",children:[(0,a.jsxs)("div",{className:"flex-shrink-0 mr-2 flex items-center gap-1",children:[eQ===ew.KP.RESPONSES&&!ty&&(0,a.jsx)(e0,{responsesUploadedImage:ty,responsesImagePreviewUrl:tN,onImageUpload:e=>(tj(e),tw(URL.createObjectURL(e)),!1),onRemoveImage:se}),eQ===ew.KP.CHAT&&!tS&&(0,a.jsx)(eC.Z,{chatUploadedImage:tS,chatImagePreviewUrl:tk,onImageUpload:e=>(t_(e),tP(URL.createObjectURL(e)),!1),onRemoveImage:st}),eQ===ew.KP.RESPONSES&&(0,a.jsx)(I.Z,{title:tF.enabled?"Code Interpreter enabled (click to disable)":"Enable Code Interpreter",children:(0,a.jsx)("button",{className:"p-1.5 rounded-md transition-colors ".concat(tF.enabled?"bg-blue-100 text-blue-600":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"),onClick:()=>{tF.toggle(),tF.enabled||B.Z.success("Code Interpreter enabled!")},children:(0,a.jsx)(f.Z,{style:{fontSize:"16px"}})})})]}),(0,a.jsx)(e4,{value:eS,onChange:e=>ek(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),sa())},placeholder:eQ===ew.KP.CHAT||eQ===ew.KP.EMBEDDINGS||eQ===ew.KP.RESPONSES||eQ===ew.KP.ANTHROPIC_MESSAGES?"Type your message... (Shift+Enter for new line)":eQ===ew.KP.A2A_AGENTS?"Send a message to the A2A agent...":eQ===ew.KP.IMAGE_EDITS?"Describe how you want to edit the image...":eQ===ew.KP.SPEECH?"Enter text to convert to speech...":eQ===ew.KP.TRANSCRIPTION?"Optional: Add context or prompt for transcription...":"Describe the image you want to generate...",disabled:e7,className:"flex-1",autoSize:{minRows:1,maxRows:4},style:{resize:"none",border:"none",boxShadow:"none",background:"transparent",padding:"4px 0",fontSize:"14px",lineHeight:"20px"}}),(0,a.jsx)(w.zx,{onClick:sa,disabled:e7||(eQ===ew.KP.TRANSCRIPTION?!tC:!eS.trim()),className:"flex-shrink-0 ml-2 !w-8 !h-8 !min-w-8 !p-0 !rounded-full !bg-blue-600 hover:!bg-blue-700 disabled:!bg-gray-300 !border-none !text-white disabled:!text-gray-500 !flex !items-center !justify-center",children:(0,a.jsx)(N.Z,{style:{fontSize:"14px"}})})]}),e7&&(0,a.jsx)(w.zx,{onClick:()=>{e9.current&&(e9.current.abort(),e9.current=null,e8(!1),B.Z.info("Request cancelled"))},className:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200",icon:y.Z,children:"Cancel"})]})]})]})]})}),(0,a.jsxs)(Z.Z,{title:"Generated Code",visible:tI,onCancel:()=>tE(!1),footer:null,width:800,children:[(0,a.jsxs)("div",{className:"flex justify-between items-end my-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(w.xv,{className:"font-medium block mb-1 text-gray-700",children:"SDK Type"}),(0,a.jsx)(P.default,{value:tL,onChange:e=>tR(e),style:{width:150},options:[{value:"openai",label:"OpenAI SDK"},{value:"azure",label:"Azure SDK"}]})]}),(0,a.jsx)(C.ZP,{onClick:()=>{navigator.clipboard.writeText(tZ),B.Z.success("Copied to clipboard!")},children:"Copy to Clipboard"})]}),(0,a.jsx)(R.Z,{language:"python",style:O.Z,wrapLines:!0,wrapLongLines:!0,className:"rounded-md",customStyle:{maxHeight:"60vh",overflowY:"auto"},children:tZ})]})]})}},94331:function(e,t,s){var a=s(57437),r=s(2265),l=s(5545),o=s(62831),n=s(17906),i=s(94263),c=s(83322),d=s(70464),m=s(77565);t.Z=e=>{let{reasoningContent:t}=e,[s,u]=(0,r.useState)(!0);return t?(0,a.jsxs)("div",{className:"reasoning-content mt-1 mb-2",children:[(0,a.jsxs)(l.ZP,{type:"text",className:"flex items-center text-xs text-gray-500 hover:text-gray-700",onClick:()=>u(!s),icon:(0,a.jsx)(c.Z,{}),children:[s?"Hide reasoning":"Show reasoning",s?(0,a.jsx)(d.Z,{className:"ml-1"}):(0,a.jsx)(m.Z,{className:"ml-1"})]}),s&&(0,a.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-700",children:(0,a.jsx)(o.UG,{components:{code(e){let{node:t,inline:s,className:r,children:l,...o}=e,c=/language-(\w+)/.exec(r||"");return!s&&c?(0,a.jsx)(n.Z,{style:i.Z,language:c[1],PreTag:"div",className:"rounded-md my-2",...o,children:String(l).replace(/\n$/,"")}):(0,a.jsx)("code",{className:"".concat(r," px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono"),...o,children:l})}},children:t})})]}):null}},38398:function(e,t,s){var a=s(57437);s(2265);var r=s(99981),l=s(5540),o=s(71282),n=s(11741),i=s(83322),c=s(16601),d=s(62670),m=s(58630);t.Z=e=>{let{timeToFirstToken:t,totalLatency:s,usage:u,toolName:x}=e;return t||s||u?(0,a.jsxs)("div",{className:"response-metrics mt-2 pt-2 border-t border-gray-100 text-xs text-gray-500 flex flex-wrap gap-3",children:[void 0!==t&&(0,a.jsx)(r.Z,{title:"Time to first token",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(l.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["TTFT: ",(t/1e3).toFixed(2),"s"]})]})}),void 0!==s&&(0,a.jsx)(r.Z,{title:"Total latency",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(l.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Total Latency: ",(s/1e3).toFixed(2),"s"]})]})}),(null==u?void 0:u.promptTokens)!==void 0&&(0,a.jsx)(r.Z,{title:"Prompt tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(o.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["In: ",u.promptTokens]})]})}),(null==u?void 0:u.completionTokens)!==void 0&&(0,a.jsx)(r.Z,{title:"Completion tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(n.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Out: ",u.completionTokens]})]})}),(null==u?void 0:u.reasoningTokens)!==void 0&&(0,a.jsx)(r.Z,{title:"Reasoning tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(i.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Reasoning: ",u.reasoningTokens]})]})}),(null==u?void 0:u.totalTokens)!==void 0&&(0,a.jsx)(r.Z,{title:"Total tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(c.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Total: ",u.totalTokens]})]})}),(null==u?void 0:u.cost)!==void 0&&(0,a.jsx)(r.Z,{title:"Cost",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(d.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["$",u.cost.toFixed(6)]})]})}),x&&(0,a.jsx)(r.Z,{title:"Tool used",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(m.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Tool: ",x]})]})})]}):null}},33152:function(e,t,s){s.d(t,{J:function(){return d}});var a=s(57437),r=s(2265),l=s(5545),o=s(44625),n=s(70464),i=s(77565),c=s(38434);function d(e){let{searchResults:t}=e,[s,d]=(0,r.useState)(!0),[m,u]=(0,r.useState)({});if(!t||0===t.length)return null;let x=(e,t)=>{let s="".concat(e,"-").concat(t);u(e=>({...e,[s]:!e[s]}))},g=t.reduce((e,t)=>e+t.data.length,0);return(0,a.jsxs)("div",{className:"search-results-content mt-1 mb-2",children:[(0,a.jsxs)(l.ZP,{type:"text",className:"flex items-center text-xs text-gray-500 hover:text-gray-700",onClick:()=>d(!s),icon:(0,a.jsx)(o.Z,{}),children:[s?"Hide sources":"Show sources (".concat(g,")"),s?(0,a.jsx)(n.Z,{className:"ml-1"}):(0,a.jsx)(i.Z,{className:"ml-1"})]}),s&&(0,a.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md text-sm",children:(0,a.jsx)("div",{className:"space-y-3",children:t.map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"text-xs text-gray-600 mb-2 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-medium",children:"Query:"}),(0,a.jsxs)("span",{className:"italic",children:['"',e.search_query,'"']}),(0,a.jsx)("span",{className:"text-gray-400",children:"•"}),(0,a.jsxs)("span",{className:"text-gray-500",children:[e.data.length," result",1!==e.data.length?"s":""]})]}),(0,a.jsx)("div",{className:"space-y-2",children:e.data.map((e,s)=>{let r=m["".concat(t,"-").concat(s)]||!1;return(0,a.jsxs)("div",{className:"border border-gray-200 rounded-md overflow-hidden bg-white",children:[(0,a.jsx)("div",{className:"flex items-center justify-between p-2 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>x(t,s),children:(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,a.jsx)("svg",{className:"w-4 h-4 text-gray-400 transition-transform flex-shrink-0 ".concat(r?"transform rotate-90":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,a.jsx)(c.Z,{className:"text-gray-400 flex-shrink-0",style:{fontSize:"12px"}}),(0,a.jsx)("span",{className:"text-xs font-medium text-gray-700 truncate",children:e.filename||e.file_id||"Result ".concat(s+1)}),(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-blue-100 text-blue-700 font-mono flex-shrink-0",children:e.score.toFixed(3)})]})}),r&&(0,a.jsx)("div",{className:"border-t border-gray-200 bg-white",children:(0,a.jsxs)("div",{className:"p-3 space-y-2",children:[e.content.map((e,t)=>(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"text-xs font-mono bg-gray-50 p-2 rounded text-gray-800 whitespace-pre-wrap break-words",children:e.text})},t)),e.attributes&&Object.keys(e.attributes).length>0&&(0,a.jsxs)("div",{className:"mt-2 pt-2 border-t border-gray-100",children:[(0,a.jsx)("div",{className:"text-xs text-gray-500 mb-1 font-medium",children:"Metadata:"}),(0,a.jsx)("div",{className:"space-y-1",children:Object.entries(e.attributes).map(e=>{let[t,s]=e;return(0,a.jsxs)("div",{className:"text-xs flex gap-2",children:[(0,a.jsxs)("span",{className:"text-gray-500 font-medium",children:[t,":"]}),(0,a.jsx)("span",{className:"text-gray-700 font-mono break-all",children:String(s)})]},t)})})]})]})})]},s)})})]},t))})})]})}},26832:function(e,t,s){s.d(t,{O:function(){return o},m:function(){return n}});var a=s(93837),r=s(19250);let l=e=>{if(!e)return;let t={};if(e.id&&(t.taskId=e.id),e.contextId&&(t.contextId=e.contextId),e.status){var s;if(t.status={state:e.status.state,timestamp:e.status.timestamp},null===(s=e.status.message)||void 0===s?void 0:s.parts){let s=e.status.message.parts.filter(e=>"text"===e.kind&&e.text).map(e=>e.text).join(" ");s&&(t.status.message=s)}}return e.metadata&&"object"==typeof e.metadata&&(t.metadata=e.metadata),Object.keys(t).length>0?t:void 0},o=async(e,t,s,o,n,i,c,d,m)=>{let u=m||(0,r.getProxyBaseUrl)(),x=u?"".concat(u,"/a2a/").concat(e,"/message/send"):"/a2a/".concat(e,"/message/send"),g=(0,a.Z)(),p=(0,a.Z)().replace(/-/g,""),h=performance.now();try{var f,v,b;let a=await fetch(x,{method:"POST",headers:{[(0,r.getGlobalLitellmHeaderName)()]:"Bearer ".concat(o),"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:g,method:"message/send",params:{message:{kind:"message",messageId:p,role:"user",parts:[{kind:"text",text:t}]}}}),signal:n}),m=performance.now()-h;if(i&&i(m),!a.ok){let e=await a.json();throw Error((null===(f=e.error)||void 0===f?void 0:f.message)||e.detail||"HTTP ".concat(a.status))}let u=await a.json(),y=performance.now()-h;if(c&&c(y),u.error)throw Error(u.error.message);let j=u.result;if(j){let t="",a=l(j);if(a&&d&&d(a),j.artifacts&&Array.isArray(j.artifacts)){for(let e of j.artifacts)if(e.parts&&Array.isArray(e.parts))for(let s of e.parts)"text"===s.kind&&s.text&&(t+=s.text)}else if(j.parts&&Array.isArray(j.parts))for(let e of j.parts)"text"===e.kind&&e.text&&(t+=e.text);else if(null===(b=j.status)||void 0===b?void 0:null===(v=b.message)||void 0===v?void 0:v.parts)for(let e of j.status.message.parts)"text"===e.kind&&e.text&&(t+=e.text);t?s(t,"a2a_agent/".concat(e)):(console.warn("Could not extract text from A2A response, showing raw JSON:",j),s(JSON.stringify(j,null,2),"a2a_agent/".concat(e)))}}catch(e){if(null==n?void 0:n.aborted){console.log("A2A request was cancelled");return}throw console.error("A2A send message error:",e),e}},n=async(e,t,s,o,n,i,c,d,m)=>{let u;let x=m||(0,r.getProxyBaseUrl)(),g=x?"".concat(x,"/a2a/").concat(e):"/a2a/".concat(e),p=(0,a.Z)(),h=(0,a.Z)().replace(/-/g,""),f=performance.now(),v=!1,b="";try{var y,j;let a=await fetch(g,{method:"POST",headers:{[(0,r.getGlobalLitellmHeaderName)()]:"Bearer ".concat(o),"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:p,method:"message/stream",params:{message:{kind:"message",messageId:h,role:"user",parts:[{kind:"text",text:t}]}}}),signal:n});if(!a.ok){let e=await a.json();throw Error((null===(j=e.error)||void 0===j?void 0:j.message)||e.detail||"HTTP ".concat(a.status))}let m=null===(y=a.body)||void 0===y?void 0:y.getReader();if(!m)throw Error("No response body");let x=new TextDecoder,N="",w=!1;for(;!w;){let t=await m.read();w=t.done;let a=t.value;if(w)break;let r=(N+=x.decode(a,{stream:!0})).split("\n");for(let t of(N=r.pop()||"",r))if(t.trim())try{let a=JSON.parse(t);if(!v){v=!0;let e=performance.now()-f;i&&i(e)}let r=a.result;if(r){let t=l(r);t&&(u={...u,...t});let a=r.kind;if("artifact-update"===a&&r.artifact){let t=r.artifact;if(t.parts&&Array.isArray(t.parts))for(let a of t.parts)"text"===a.kind&&a.text&&(b+=a.text,s(b,"a2a_agent/".concat(e)))}else if(r.artifacts&&Array.isArray(r.artifacts)){for(let t of r.artifacts)if(t.parts&&Array.isArray(t.parts))for(let a of t.parts)"text"===a.kind&&a.text&&(b+=a.text,s(b,"a2a_agent/".concat(e)))}else if("status-update"===a);else if(r.parts&&Array.isArray(r.parts))for(let t of r.parts)"text"===t.kind&&t.text&&(b+=t.text,s(b,"a2a_agent/".concat(e)))}if(a.error){let e=a.error.message||"Unknown A2A error";throw Error(e)}}catch(e){if(e instanceof Error&&e.message&&!e.message.includes("JSON"))throw e;t.trim().length>0&&console.warn("Failed to parse A2A streaming chunk:",t,e)}}let S=performance.now()-f;c&&c(S),u&&d&&d(u)}catch(e){if(null==n?void 0:n.aborted){console.log("A2A streaming request was cancelled");return}throw console.error("A2A stream message error:",e),e}}},95459:function(e,t,s){s.d(t,{n:function(){return l}});var a=s(7271),r=s(19250);async function l(e,t,s,l,o,n,i,c,d,m,u,x,g,p,h,f,v,b,y,j,N,w,S){console.log=function(){},console.log("isLocal:",!1);let _=j||(0,r.getProxyBaseUrl)(),k={};o&&o.length>0&&(k["x-litellm-tags"]=o.join(","));let P=new a.ZP.OpenAI({apiKey:l,baseURL:_,dangerouslyAllowBrowser:!0,defaultHeaders:k});try{let a;let r=Date.now(),l=!1,o={},j=!1,_=[];for await(let y of(p&&p.length>0&&(p.includes("__all__")?_.push({type:"mcp",server_label:"litellm",server_url:"litellm_proxy/mcp",require_approval:"never"}):p.forEach(e=>{let t=null==N?void 0:N.find(t=>t.server_id===e),s=(null==t?void 0:t.alias)||(null==t?void 0:t.server_name)||e,a=(null==w?void 0:w[e])||[];_.push({type:"mcp",server_label:"litellm",server_url:"litellm_proxy/mcp/".concat(s),require_approval:"never",...a.length>0?{allowed_tools:a}:{}})})),await P.chat.completions.create({model:s,stream:!0,stream_options:{include_usage:!0},litellm_trace_id:m,messages:e,...u?{vector_store_ids:u}:{},...x?{guardrails:x}:{},...g?{policies:g}:{},..._.length>0?{tools:_,tool_choice:"auto"}:{},...void 0!==v?{temperature:v}:{},...void 0!==b?{max_tokens:b}:{}},{signal:n}))){var C,A,I,E,Z,T,L,R,O;console.log("Stream chunk:",y);let e=null===(C=y.choices[0])||void 0===C?void 0:C.delta;if(console.log("Delta content:",null===(I=y.choices[0])||void 0===I?void 0:null===(A=I.delta)||void 0===A?void 0:A.content),console.log("Delta reasoning content:",null==e?void 0:e.reasoning_content),!l&&((null===(Z=y.choices[0])||void 0===Z?void 0:null===(E=Z.delta)||void 0===E?void 0:E.content)||e&&e.reasoning_content)&&(l=!0,a=Date.now()-r,console.log("First token received! Time:",a,"ms"),c?(console.log("Calling onTimingData with:",a),c(a)):console.log("onTimingData callback is not defined!")),null===(L=y.choices[0])||void 0===L?void 0:null===(T=L.delta)||void 0===T?void 0:T.content){let e=y.choices[0].delta.content;t(e,y.model)}if(e&&e.image&&h&&(console.log("Image generated:",e.image),h(e.image.url,y.model)),e&&e.reasoning_content){let t=e.reasoning_content;i&&i(t)}if(e&&(null===(R=e.provider_specific_fields)||void 0===R?void 0:R.search_results)&&f&&(console.log("Search results found:",e.provider_specific_fields.search_results),f(e.provider_specific_fields.search_results)),e&&e.provider_specific_fields){let t=e.provider_specific_fields;if(t.mcp_list_tools&&!o.mcp_list_tools&&(o.mcp_list_tools=t.mcp_list_tools,S&&!j)){j=!0;let e={type:"response.output_item.done",item_id:"mcp_list_tools",item:{type:"mcp_list_tools",tools:t.mcp_list_tools.map(e=>{var t,s,a;return{name:(null===(t=e.function)||void 0===t?void 0:t.name)||e.name||"",description:(null===(s=e.function)||void 0===s?void 0:s.description)||e.description||"",input_schema:(null===(a=e.function)||void 0===a?void 0:a.parameters)||e.input_schema||{}}})},timestamp:Date.now()};S(e),console.log("MCP list_tools event sent:",e)}t.mcp_tool_calls&&(o.mcp_tool_calls=t.mcp_tool_calls),t.mcp_call_results&&(o.mcp_call_results=t.mcp_call_results),(t.mcp_list_tools||t.mcp_tool_calls||t.mcp_call_results)&&console.log("MCP metadata found in chunk:",{mcp_list_tools:t.mcp_list_tools?"present":"absent",mcp_tool_calls:t.mcp_tool_calls?"present":"absent",mcp_call_results:t.mcp_call_results?"present":"absent"})}if(y.usage&&d){console.log("Usage data found:",y.usage);let e={completionTokens:y.usage.completion_tokens,promptTokens:y.usage.prompt_tokens,totalTokens:y.usage.total_tokens};(null===(O=y.usage.completion_tokens_details)||void 0===O?void 0:O.reasoning_tokens)&&(e.reasoningTokens=y.usage.completion_tokens_details.reasoning_tokens),void 0!==y.usage.cost&&null!==y.usage.cost&&(e.cost=parseFloat(y.usage.cost)),d(e)}}S&&(o.mcp_tool_calls||o.mcp_call_results)&&o.mcp_tool_calls&&o.mcp_tool_calls.length>0&&o.mcp_tool_calls.forEach((e,t)=>{var s,a,r,l;let n=(null===(s=e.function)||void 0===s?void 0:s.name)||e.name||"",i=(null===(a=e.function)||void 0===a?void 0:a.arguments)||e.arguments||"{}",c=(null===(r=o.mcp_call_results)||void 0===r?void 0:r.find(t=>t.tool_call_id===e.id||t.tool_call_id===e.call_id))||(null===(l=o.mcp_call_results)||void 0===l?void 0:l[t]),d={type:"response.output_item.done",item:{type:"mcp_call",name:n,arguments:"string"==typeof i?i:JSON.stringify(i),output:(null==c?void 0:c.result)?"string"==typeof c.result?c.result:JSON.stringify(c.result):void 0},item_id:e.id||e.call_id,timestamp:Date.now()};S(d),console.log("MCP call event sent:",d)});let k=Date.now();y&&y(k-r)}catch(e){throw(null==n?void 0:n.aborted)&&console.log("Chat completion request was cancelled"),e}}},91643:function(e,t,s){s.d(t,{o:function(){return r}});var a=s(19250);let r=async(e,t)=>{try{let s=t||(0,a.getProxyBaseUrl)(),r=await fetch(s?"".concat(s,"/v1/agents"):"/v1/agents",{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.json();throw Error(e.detail||"Failed to fetch agents")}let l=await r.json();return console.log("Fetched agents:",l),l.sort((e,t)=>{let s=e.agent_name||e.agent_id,a=t.agent_name||t.agent_id;return s.localeCompare(a)}),l}catch(e){throw console.error("Error fetching agents:",e),e}}},99020:function(e,t,s){var a=s(57437),r=s(2265),l=s(37592),o=s(19250);t.Z=e=>{let{onChange:t,value:s,className:n,accessToken:i}=e,[c,d]=(0,r.useState)([]),[m,u]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(i)try{let e=await (0,o.tagListCall)(i);console.log("List tags response:",e),d(Object.values(e))}catch(e){console.error("Error fetching tags:",e)}finally{u(!1)}})()},[i]),(0,a.jsx)(l.default,{mode:"tags",showSearch:!0,placeholder:"Select or create tags",onChange:t,value:s,loading:m,className:n,options:c.map(e=>({label:e.name,value:e.name,title:e.description||e.name})),optionFilterProp:"label",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"}})}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5992],{19046:function(e,t,s){s.d(t,{Dx:function(){return n.Z},Zb:function(){return r.Z},oi:function(){return o.Z},xv:function(){return l.Z},zx:function(){return a.Z}});var a=s(78489),r=s(12514),l=s(84264),o=s(49566),n=s(96761)},88712:function(e,t,s){var a=s(57437);s(2265);var r=s(33145),l=s(66830),o=s(50010);t.Z=e=>{let{message:t}=e;if(!(0,l.br)(t))return null;let s="string"==typeof t.content&&t.content.includes("[PDF attached]");return(0,a.jsx)("div",{className:"mb-2",children:s?(0,a.jsx)("div",{className:"w-64 h-32 rounded-md border border-gray-200 bg-red-50 flex items-center justify-center",children:(0,a.jsx)(o.Z,{style:{fontSize:"48px",color:"#dc2626"}})}):(0,a.jsx)(r.default,{src:t.imagePreviewUrl||"",alt:"User uploaded image",width:256,height:200,className:"max-w-64 rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"200px",width:"auto",height:"auto"}})})}},27930:function(e,t,s){var a=s(57437);s(2265);var r=s(65319),l=s(99981),o=s(53508);let{Dragger:n}=r.default;t.Z=e=>{let{chatUploadedImage:t,chatImagePreviewUrl:s,onImageUpload:r,onRemoveImage:i}=e;return(0,a.jsx)(a.Fragment,{children:!t&&(0,a.jsx)(n,{beforeUpload:r,accept:"image/*,.pdf",showUploadList:!1,className:"inline-block",style:{padding:0,border:"none",background:"none"},children:(0,a.jsx)(l.Z,{title:"Attach image or PDF",children:(0,a.jsx)("button",{type:"button",className:"flex items-center justify-center w-8 h-8 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors",children:(0,a.jsx)(o.Z,{style:{fontSize:"16px"}})})})})})}},66830:function(e,t,s){s.d(t,{Hk:function(){return l},Sn:function(){return r},br:function(){return o}});let a=e=>new Promise((t,s)=>{let a=new FileReader;a.onload=()=>{t(a.result)},a.onerror=s,a.readAsDataURL(e)}),r=async(e,t)=>({role:"user",content:[{type:"text",text:e},{type:"image_url",image_url:{url:await a(t)}}]}),l=(e,t,s,a)=>{let r="";t&&a&&(r=a.toLowerCase().endsWith(".pdf")?"[PDF attached]":"[Image attached]");let l={role:"user",content:t?"".concat(e," ").concat(r):e};return t&&s&&(l.imagePreviewUrl=s),l},o=e=>"user"===e.role&&"string"==typeof e.content&&(e.content.includes("[Image attached]")||e.content.includes("[PDF attached]"))&&!!e.imagePreviewUrl},25992:function(e,t,s){s.d(t,{Z:function(){return e6}});var a=s(57437),r=s(61935),l=s(92403),o=s(55322),n=s(62272),i=s(26430),c=s(12660),d=s(25980),m=s(69993),u=s(71891),x=s(58630),g=s(15424),p=s(44625),h=s(57400),f=s(11894),v=s(15883),b=s(99890),y=s(26349),j=s(50010),N=s(79276),w=s(19046),S=s(4260),_=s(65319),k=s(57840),P=s(37592),C=s(5545),A=s(79326),I=s(99981),E=s(10353),Z=s(22116),T=s(2265),L=s(62831),R=s(17906),O=s(94263),U=s(93837),M=s(9309),K=s(67479),D=s(87972),B=s(9114),z=s(19250),H=s(99020),F=s(97415),G=s(26832),W=s(85498);async function J(e,t,s,a){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],l=arguments.length>5?arguments[5]:void 0,o=arguments.length>6?arguments[6]:void 0,n=arguments.length>7?arguments[7]:void 0,i=arguments.length>8?arguments[8]:void 0,c=arguments.length>9?arguments[9]:void 0,d=arguments.length>10?arguments[10]:void 0,m=arguments.length>11?arguments[11]:void 0,u=arguments.length>12?arguments[12]:void 0,x=(arguments.length>13&&arguments[13],arguments.length>14?arguments[14]:void 0);if(!a)throw Error("Virtual Key is required");console.log=function(){};let g=x||(0,z.getProxyBaseUrl)(),p={};r&&r.length>0&&(p["x-litellm-tags"]=r.join(","));let h=new W.ZP({apiKey:a,baseURL:g,dangerouslyAllowBrowser:!0,defaultHeaders:p});try{let a=Date.now(),r=!1,x={model:s,messages:e.map(e=>({role:e.role,content:e.content})),stream:!0,max_tokens:1024,litellm_trace_id:c};for await(let e of(d&&(x.vector_store_ids=d),m&&(x.guardrails=m),u&&(x.policies=u),h.messages.stream(x,{signal:l}))){if(console.log("Stream event:",e),"content_block_delta"===e.type){let l=e.delta;if(!r){r=!0;let e=Date.now()-a;console.log("First token received! Time:",e,"ms"),n&&n(e)}"text_delta"===l.type?t("assistant",l.text,s):"reasoning_delta"===l.type&&o&&o(l.text)}if("message_delta"===e.type&&e.usage&&i){let t=e.usage;console.log("Usage data found:",t);let s={completionTokens:t.output_tokens,promptTokens:t.input_tokens,totalTokens:t.input_tokens+t.output_tokens};i(s)}}}catch(e){throw(null==l?void 0:l.aborted)?console.log("Anthropic messages request was cancelled"):B.Z.fromBackend("Error occurred while generating model response. Please try again. Error: ".concat(e)),e}}var q=s(7271);async function V(e,t,s,a,r,l,o,n,i,c){console.log=function(){},console.log("isLocal:",!1);let d=c||(0,z.getProxyBaseUrl)(),m=new q.ZP.OpenAI({apiKey:r,baseURL:d,dangerouslyAllowBrowser:!0,defaultHeaders:l&&l.length>0?{"x-litellm-tags":l.join(",")}:void 0});try{let r=await m.audio.speech.create({model:a,input:e,voice:t,...n?{response_format:n}:{},...i?{speed:i}:{}},{signal:o}),l=await r.blob(),c=URL.createObjectURL(l);s(c,a)}catch(e){throw(null==o?void 0:o.aborted)?console.log("Audio speech request was cancelled"):B.Z.fromBackend("Error occurred while generating speech. Please try again. Error: ".concat(e)),e}}async function Y(e,t,s,a,r,l,o,n,i,c,d){console.log=function(){},console.log("isLocal:",!1);let m=d||(0,z.getProxyBaseUrl)(),u=new q.ZP.OpenAI({apiKey:a,baseURL:m,dangerouslyAllowBrowser:!0,defaultHeaders:r&&r.length>0?{"x-litellm-tags":r.join(",")}:void 0});try{console.log("Processing audio file for transcription:",e.name);let a=await u.audio.transcriptions.create({model:s,file:e,...o?{language:o}:{},...n?{prompt:n}:{},...i?{response_format:i}:{},...void 0!==c?{temperature:c}:{}},{signal:l});if(console.log("Transcription response:",a),a&&a.text)t(a.text,s),B.Z.success("Audio transcribed successfully");else throw Error("No transcription text in response")}catch(e){if(console.error("Error making audio transcription request:",e),null==l?void 0:l.aborted)console.log("Audio transcription request was cancelled");else{var x;let t="Failed to transcribe audio";(null==e?void 0:null===(x=e.error)||void 0===x?void 0:x.message)?t=e.error.message:(null==e?void 0:e.message)&&(t=e.message),B.Z.fromBackend("Audio transcription failed: ".concat(t))}throw e}}var X=s(95459);async function $(e,t,s,a,r,l){if(!a)throw Error("Virtual Key is required");console.log=function(){};let o=l||(0,z.getProxyBaseUrl)(),n={};r&&r.length>0&&(n["x-litellm-tags"]=r.join(","));try{var i,c,d;let r=o.endsWith("/")?o.slice(0,-1):o,l=await fetch("".concat(r,"/embeddings"),{method:"POST",headers:{"Content-Type":"application/json",[(0,z.getGlobalLitellmHeaderName)()]:"Bearer ".concat(a),...n},body:JSON.stringify({model:s,input:e})});if(!l.ok){let e=await l.text();throw Error(e||"Request failed with status ".concat(l.status))}let m=await l.json(),u=null==m?void 0:null===(c=m.data)||void 0===c?void 0:null===(i=c[0])||void 0===i?void 0:i.embedding;if(!u)throw Error("No embedding returned from server");t(JSON.stringify(u),null!==(d=null==m?void 0:m.model)&&void 0!==d?d:s)}catch(e){throw B.Z.fromBackend("Error occurred while making embeddings request. Please try again. Error: ".concat(e)),e}}var Q=s(91643),ee=s(10703);async function et(e,t,s,a,r,l,o,n){console.log=function(){},console.log("isLocal:",!1);let i=n||(0,z.getProxyBaseUrl)(),c=new q.ZP.OpenAI({apiKey:r,baseURL:i,dangerouslyAllowBrowser:!0,defaultHeaders:l&&l.length>0?{"x-litellm-tags":l.join(",")}:void 0});try{let r=Array.isArray(e)?e:[e],l=[];for(let e=0;e1&&B.Z.success("Successfully processed ".concat(l.length," images"))}catch(e){if(console.error("Error making image edit request:",e),null==o?void 0:o.aborted)console.log("Image edits request was cancelled");else{var d;let t="Failed to edit image(s)";(null==e?void 0:null===(d=e.error)||void 0===d?void 0:d.message)?t=e.error.message:(null==e?void 0:e.message)&&(t=e.message),B.Z.fromBackend("Image edit failed: ".concat(t))}throw e}}async function es(e,t,s,a,r,l,o){console.log=function(){},console.log("isLocal:",!1);let n=o||(0,z.getProxyBaseUrl)(),i=new q.ZP.OpenAI({apiKey:a,baseURL:n,dangerouslyAllowBrowser:!0,defaultHeaders:r&&r.length>0?{"x-litellm-tags":r.join(",")}:void 0});try{let a=await i.images.generate({model:s,prompt:e},{signal:l});if(console.log(a.data),a.data&&a.data[0]){if(a.data[0].url)t(a.data[0].url,s);else if(a.data[0].b64_json){let e=a.data[0].b64_json;t("data:image/png;base64,".concat(e),s)}else throw Error("No image data found in response")}else throw Error("Invalid response format")}catch(e){throw(null==l?void 0:l.aborted)?console.log("Image generation request was cancelled"):B.Z.fromBackend("Error occurred while generating image. Please try again. Error: ".concat(e)),e}}async function ea(e,t,s,a){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],l=arguments.length>5?arguments[5]:void 0,o=arguments.length>6?arguments[6]:void 0,n=arguments.length>7?arguments[7]:void 0,i=arguments.length>8?arguments[8]:void 0,c=arguments.length>9?arguments[9]:void 0,d=arguments.length>10?arguments[10]:void 0,m=arguments.length>11?arguments[11]:void 0,u=arguments.length>12?arguments[12]:void 0,x=arguments.length>13?arguments[13]:void 0,g=arguments.length>14?arguments[14]:void 0,p=arguments.length>15?arguments[15]:void 0,h=arguments.length>16?arguments[16]:void 0,f=arguments.length>17?arguments[17]:void 0,v=arguments.length>18?arguments[18]:void 0,b=arguments.length>19?arguments[19]:void 0,y=arguments.length>20?arguments[20]:void 0,j=arguments.length>21?arguments[21]:void 0;if(!a)throw Error("Virtual Key is required");if(!s||""===s.trim())throw Error("Model is required. Please select a model before sending a request.");console.log=function(){};let N=b||(0,z.getProxyBaseUrl)(),w={};r&&r.length>0&&(w["x-litellm-tags"]=r.join(","));let S=new q.ZP.OpenAI({apiKey:a,baseURL:N,dangerouslyAllowBrowser:!0,defaultHeaders:w});try{let a=Date.now(),r=!1,b=e.map(e=>(Array.isArray(e.content),{role:e.role,content:e.content,type:"message"})),N=[];x&&x.length>0&&(x.includes("__all__")?N.push({type:"mcp",server_label:"litellm",server_url:"litellm_proxy/mcp",require_approval:"never"}):x.forEach(e=>{let t=null==y?void 0:y.find(t=>t.server_id===e),s=(null==t?void 0:t.alias)||(null==t?void 0:t.server_name)||e,a=(null==j?void 0:j[e])||[];N.push({type:"mcp",server_label:"litellm",server_url:"litellm_proxy/mcp/".concat(s),require_approval:"never",...a.length>0?{allowed_tools:a}:{}})})),f&&N.push({type:"code_interpreter",container:{type:"auto"}});let w=await S.responses.create({model:s,input:b,stream:!0,litellm_trace_id:c,...g?{previous_response_id:g}:{},...d?{vector_store_ids:d}:{},...m?{guardrails:m}:{},...u?{policies:u}:{},...N.length>0?{tools:N,tool_choice:"auto"}:{}},{signal:l}),Z="",T={code:"",containerId:""};for await(let e of w)if(console.log("Response event:",e),"object"==typeof e&&null!==e){var _,k,P,C,A,I,E;if(((null===(_=e.type)||void 0===_?void 0:_.startsWith("response.mcp_"))||"response.output_item.done"===e.type&&((null===(k=e.item)||void 0===k?void 0:k.type)==="mcp_list_tools"||(null===(P=e.item)||void 0===P?void 0:P.type)==="mcp_call"))&&(console.log("MCP event received:",e),h)){let t={type:e.type,sequence_number:e.sequence_number,output_index:e.output_index,item_id:e.item_id||(null===(I=e.item)||void 0===I?void 0:I.id),item:e.item,delta:e.delta,arguments:e.arguments,timestamp:Date.now()};h(t)}if("response.output_item.done"===e.type&&(null===(C=e.item)||void 0===C?void 0:C.type)==="mcp_call"&&(null===(A=e.item)||void 0===A?void 0:A.name)&&(Z=e.item.name,console.log("MCP tool used:",Z)),T=function(e,t){var s;return"response.output_item.done"===e.type&&(null===(s=e.item)||void 0===s?void 0:s.type)==="code_interpreter_call"?(console.log("Code interpreter call completed:",e.item),{code:e.item.code||"",containerId:e.item.container_id||""}):t}(e,T),!function(e,t,s){var a,r;if("response.output_item.done"===e.type&&(null===(a=e.item)||void 0===a?void 0:a.type)==="message"&&(null===(r=e.item)||void 0===r?void 0:r.content)&&s){for(let a of e.item.content)if("output_text"===a.type&&a.annotations){let e=a.annotations.filter(e=>"container_file_citation"===e.type);(e.length>0||t.code)&&s({code:t.code,containerId:t.containerId,annotations:e})}}}(e,T,v),"response.role.delta"===e.type)continue;if("response.output_text.delta"===e.type&&"string"==typeof e.delta){let l=e.delta;if(console.log("Text delta",l),l.trim().length>0&&(t("assistant",l,s),!r)){r=!0;let e=Date.now()-a;console.log("First token received! Time:",e,"ms"),n&&n(e)}}if("response.reasoning.delta"===e.type&&"delta"in e){let t=e.delta;"string"==typeof t&&o&&o(t)}if("response.completed"===e.type&&"response"in e){let t=e.response,s=t.usage;if(console.log("Usage data:",s),console.log("Response completed event:",t),t.id&&p&&(console.log("Response ID for session management:",t.id),p(t.id)),s&&i){console.log("Usage data:",s);let e={completionTokens:s.output_tokens,promptTokens:s.input_tokens,totalTokens:s.total_tokens};(null===(E=s.completion_tokens_details)||void 0===E?void 0:E.reasoning_tokens)&&(e.reasoningTokens=s.completion_tokens_details.reasoning_tokens),i(e,Z)}}}return w}catch(e){throw(null==l?void 0:l.aborted)?console.log("Responses API request was cancelled"):B.Z.fromBackend("Error occurred while generating model response. Please try again. Error: ".concat(e)),e}}var er=s(83669),el=s(29271),eo=s(5540),en=s(38434),ei=s(23639),ec=s(70464),ed=s(77565);let em=e=>{switch(e){case"completed":return(0,a.jsx)(er.Z,{className:"text-green-500"});case"working":case"submitted":return(0,a.jsx)(r.Z,{className:"text-blue-500"});case"failed":case"canceled":return(0,a.jsx)(el.Z,{className:"text-red-500"});default:return(0,a.jsx)(eo.Z,{className:"text-gray-500"})}},eu=e=>{switch(e){case"completed":return"bg-green-100 text-green-700";case"working":case"submitted":return"bg-blue-100 text-blue-700";case"failed":case"canceled":return"bg-red-100 text-red-700";default:return"bg-gray-100 text-gray-700"}},ex=e=>{if(!e)return null;try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch(t){return e}},eg=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return e?e.length>t?"".concat(e.substring(0,t),"…"):e:null},ep=e=>{navigator.clipboard.writeText(e)};var eh=e=>{let{a2aMetadata:t,timeToFirstToken:s,totalLatency:r}=e,[l,o]=(0,T.useState)(!1);if(!t&&!s&&!r)return null;let{taskId:i,contextId:c,status:d,metadata:u}=t||{},x=ex(null==d?void 0:d.timestamp);return(0,a.jsxs)("div",{className:"a2a-metrics mt-3 pt-2 border-t border-gray-200 text-xs",children:[(0,a.jsxs)("div",{className:"flex items-center mb-2 text-gray-600",children:[(0,a.jsx)(m.Z,{className:"mr-1.5 text-blue-500"}),(0,a.jsx)("span",{className:"font-medium text-gray-700",children:"A2A Metadata"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-gray-500 ml-4",children:[(null==d?void 0:d.state)&&(0,a.jsxs)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ".concat(eu(d.state)),children:[em(d.state),(0,a.jsx)("span",{className:"ml-1 capitalize",children:d.state})]}),x&&(0,a.jsx)(I.Z,{title:null==d?void 0:d.timestamp,children:(0,a.jsxs)("span",{className:"flex items-center",children:[(0,a.jsx)(eo.Z,{className:"mr-1"}),x]})}),void 0!==r&&(0,a.jsx)(I.Z,{title:"Total latency",children:(0,a.jsxs)("span",{className:"flex items-center text-blue-600",children:[(0,a.jsx)(eo.Z,{className:"mr-1"}),(r/1e3).toFixed(2),"s"]})}),void 0!==s&&(0,a.jsx)(I.Z,{title:"Time to first token",children:(0,a.jsxs)("span",{className:"flex items-center text-green-600",children:["TTFT: ",(s/1e3).toFixed(2),"s"]})})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-gray-500 ml-4 mt-1.5",children:[i&&(0,a.jsx)(I.Z,{title:"Click to copy: ".concat(i),children:(0,a.jsxs)("span",{className:"flex items-center cursor-pointer hover:text-gray-700",onClick:()=>ep(i),children:[(0,a.jsx)(en.Z,{className:"mr-1"}),"Task: ",eg(i),(0,a.jsx)(ei.Z,{className:"ml-1 text-gray-400 hover:text-gray-600"})]})}),c&&(0,a.jsx)(I.Z,{title:"Click to copy: ".concat(c),children:(0,a.jsxs)("span",{className:"flex items-center cursor-pointer hover:text-gray-700",onClick:()=>ep(c),children:[(0,a.jsx)(n.Z,{className:"mr-1"}),"Session: ",eg(c),(0,a.jsx)(ei.Z,{className:"ml-1 text-gray-400 hover:text-gray-600"})]})}),(u||(null==d?void 0:d.message))&&(0,a.jsxs)(C.ZP,{type:"text",size:"small",className:"text-xs text-blue-500 hover:text-blue-700 p-0 h-auto",onClick:()=>o(!l),children:[l?(0,a.jsx)(ec.Z,{}):(0,a.jsx)(ed.Z,{}),(0,a.jsx)("span",{className:"ml-1",children:"Details"})]})]}),l&&(0,a.jsxs)("div",{className:"mt-2 ml-4 p-3 bg-gray-50 rounded-md text-gray-600 border border-gray-200",children:[(null==d?void 0:d.message)&&(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("span",{className:"font-medium text-gray-700",children:"Status Message:"}),(0,a.jsx)("span",{className:"ml-2",children:d.message})]}),i&&(0,a.jsxs)("div",{className:"mb-1.5 flex items-center",children:[(0,a.jsx)("span",{className:"font-medium text-gray-700 w-24",children:"Task ID:"}),(0,a.jsx)("code",{className:"ml-2 px-2 py-1 bg-white border border-gray-200 rounded text-xs font-mono",children:i}),(0,a.jsx)(ei.Z,{className:"ml-2 cursor-pointer text-gray-400 hover:text-blue-500",onClick:()=>ep(i)})]}),c&&(0,a.jsxs)("div",{className:"mb-1.5 flex items-center",children:[(0,a.jsx)("span",{className:"font-medium text-gray-700 w-24",children:"Session ID:"}),(0,a.jsx)("code",{className:"ml-2 px-2 py-1 bg-white border border-gray-200 rounded text-xs font-mono",children:c}),(0,a.jsx)(ei.Z,{className:"ml-2 cursor-pointer text-gray-400 hover:text-blue-500",onClick:()=>ep(c)})]}),u&&Object.keys(u).length>0&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("span",{className:"font-medium text-gray-700",children:"Custom Metadata:"}),(0,a.jsx)("pre",{className:"mt-1.5 p-2 bg-white border border-gray-200 rounded text-xs font-mono overflow-x-auto whitespace-pre-wrap",children:JSON.stringify(u,null,2)})]})]})]})},ef=s(92280),ev=s(4156),eb=s(12221),ey=s(85847),ej=e=>{let{temperature:t=1,maxTokens:s=2048,useAdvancedParams:r,onTemperatureChange:l,onMaxTokensChange:o,onUseAdvancedParamsChange:n}=e,[i,c]=(0,T.useState)(!1),d=void 0!==r?r:i,[m,u]=(0,T.useState)(t),[x,p]=(0,T.useState)(s);(0,T.useEffect)(()=>{u(t)},[t]),(0,T.useEffect)(()=>{p(s)},[s]);let h=e=>{let t=null!=e?e:1;u(t),null==l||l(t)},f=e=>{let t=null!=e?e:1e3;p(t),null==o||o(t)},v=d?"text-gray-700":"text-gray-400",b=e=>{n?n(e):c(e)};return(0,a.jsxs)("div",{className:"space-y-4 p-4 w-80",children:[(0,a.jsx)(ev.Z,{checked:d,onChange:e=>b(e.target.checked),children:(0,a.jsx)("span",{className:"font-medium",children:"Use Advanced Parameters"})}),(0,a.jsxs)("div",{className:"space-y-4 transition-opacity duration-200",style:{opacity:d?1:.4},children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(ef.x,{className:"text-sm ".concat(v),children:"Temperature"}),(0,a.jsx)(I.Z,{title:"Controls randomness. Lower values make output more deterministic, higher values more creative.",children:(0,a.jsx)(g.Z,{className:"text-xs ".concat(v," cursor-help")})})]}),(0,a.jsx)(eb.Z,{min:0,max:2,step:.1,value:m,onChange:h,disabled:!d,precision:1,className:"w-20"})]}),(0,a.jsx)(ey.Z,{min:0,max:2,step:.1,value:m,onChange:h,disabled:!d,marks:{0:"0",1:"1.0",2:"2.0"}})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(ef.x,{className:"text-sm ".concat(v),children:"Max Tokens"}),(0,a.jsx)(I.Z,{title:"Maximum number of tokens to generate in the response.",children:(0,a.jsx)(g.Z,{className:"text-xs ".concat(v," cursor-help")})})]}),(0,a.jsx)(eb.Z,{min:1,max:32768,step:1,value:x,onChange:f,disabled:!d})]}),(0,a.jsx)(ey.Z,{min:1,max:32768,step:1,value:x,onChange:f,disabled:!d,marks:{1:"1",32768:"32768"}})]})]})]})},eN=e=>{let{message:t}=e;return t.isAudio&&"string"==typeof t.content?(0,a.jsx)("div",{className:"mb-2",children:(0,a.jsx)("audio",{controls:!0,src:t.content,className:"max-w-full",style:{maxWidth:"500px"},children:"Your browser does not support the audio element."})}):null},ew=s(8443);let eS={ALLOY:"Alloy - Professional and confident",ASH:"Ash - Casual and relaxed",BALAD:"Ballad - Smooth and melodic",CORAL:"Coral - Warm and engaging",ECHO:"Echo - Friendly and conversational",FABLE:"Fable - Wise and measured",NOVA:"Nova - Friendly and conversational",ONYX:"Onyx - Deep and authoritative",SAGE:"Sage - Wise and measured",SHIMMER:"Shimmer - Bright and cheerful"},e_=Object.entries({ALLOY:"alloy",ASH:"ash",BALAD:"ballad",CORAL:"coral",ECHO:"echo",FABLE:"fable",NOVA:"nova",ONYX:"onyx",SAGE:"sage",SHIMMER:"shimmer"}).map(e=>{let[t,s]=e;return{value:s,label:eS[t]}}),ek=[{value:ew.KP.CHAT,label:"/v1/chat/completions"},{value:ew.KP.RESPONSES,label:"/v1/responses"},{value:ew.KP.ANTHROPIC_MESSAGES,label:"/v1/messages"},{value:ew.KP.IMAGE,label:"/v1/images/generations"},{value:ew.KP.IMAGE_EDITS,label:"/v1/images/edits"},{value:ew.KP.EMBEDDINGS,label:"/v1/embeddings"},{value:ew.KP.SPEECH,label:"/v1/audio/speech"},{value:ew.KP.TRANSCRIPTION,label:"/v1/audio/transcriptions"},{value:ew.KP.A2A_AGENTS,label:"/v1/a2a/message/send"}];var eP=s(88712),eC=s(27930),eA=s(66830),eI=s(44851),eE=s(41589),eZ=s(73879),eT=e=>{let{code:t,containerId:s,annotations:l=[],accessToken:o}=e,[n,i]=(0,T.useState)({}),[c,d]=(0,T.useState)({}),m=(0,z.getProxyBaseUrl)();(0,T.useEffect)(()=>{let e=async()=>{for(let r of l){var e,t,s,a;if(((null===(e=r.filename)||void 0===e?void 0:e.toLowerCase().endsWith(".png"))||(null===(t=r.filename)||void 0===t?void 0:t.toLowerCase().endsWith(".jpg"))||(null===(s=r.filename)||void 0===s?void 0:s.toLowerCase().endsWith(".jpeg"))||(null===(a=r.filename)||void 0===a?void 0:a.toLowerCase().endsWith(".gif")))&&r.container_id&&r.file_id){d(e=>({...e,[r.file_id]:!0}));try{let e=await fetch("".concat(m,"/v1/containers/").concat(r.container_id,"/files/").concat(r.file_id,"/content"),{headers:{[(0,z.getGlobalLitellmHeaderName)()]:"Bearer ".concat(o)}});if(e.ok){let t=await e.blob(),s=URL.createObjectURL(t);i(e=>({...e,[r.file_id]:s}))}}catch(e){console.error("Error fetching image:",e)}finally{d(e=>({...e,[r.file_id]:!1}))}}}};return l.length>0&&o&&e(),()=>{Object.values(n).forEach(e=>URL.revokeObjectURL(e))}},[l,o,m]);let u=async e=>{try{let t=await fetch("".concat(m,"/v1/containers/").concat(e.container_id,"/files/").concat(e.file_id,"/content"),{headers:{[(0,z.getGlobalLitellmHeaderName)()]:"Bearer ".concat(o)}});if(t.ok){let s=await t.blob(),a=URL.createObjectURL(s),r=document.createElement("a");r.href=a,r.download=e.filename||"file_".concat(e.file_id),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(a)}}catch(e){console.error("Error downloading file:",e)}},x=l.filter(e=>{var t,s,a,r;return(null===(t=e.filename)||void 0===t?void 0:t.toLowerCase().endsWith(".png"))||(null===(s=e.filename)||void 0===s?void 0:s.toLowerCase().endsWith(".jpg"))||(null===(a=e.filename)||void 0===a?void 0:a.toLowerCase().endsWith(".jpeg"))||(null===(r=e.filename)||void 0===r?void 0:r.toLowerCase().endsWith(".gif"))}),g=l.filter(e=>{var t,s,a,r;return!(null===(t=e.filename)||void 0===t?void 0:t.toLowerCase().endsWith(".png"))&&!(null===(s=e.filename)||void 0===s?void 0:s.toLowerCase().endsWith(".jpg"))&&!(null===(a=e.filename)||void 0===a?void 0:a.toLowerCase().endsWith(".jpeg"))&&!(null===(r=e.filename)||void 0===r?void 0:r.toLowerCase().endsWith(".gif"))});return t||0!==l.length?(0,a.jsxs)("div",{className:"mt-3 space-y-3",children:[t&&(0,a.jsx)(eI.default,{size:"small",items:[{key:"code",label:(0,a.jsxs)("span",{className:"flex items-center gap-2 text-sm text-gray-600",children:[(0,a.jsx)(f.Z,{})," Python Code Executed"]}),children:(0,a.jsx)(R.Z,{language:"python",style:O.Z,customStyle:{margin:0,borderRadius:"6px",fontSize:"12px",maxHeight:"300px",overflow:"auto"},children:t})}]}),x.map(e=>(0,a.jsx)("div",{className:"rounded-lg border border-gray-200 overflow-hidden",children:c[e.file_id]?(0,a.jsxs)("div",{className:"flex items-center justify-center p-8 bg-gray-50",children:[(0,a.jsx)(E.Z,{indicator:(0,a.jsx)(r.Z,{spin:!0})}),(0,a.jsx)("span",{className:"ml-2 text-sm text-gray-500",children:"Loading image..."})]}):n[e.file_id]?(0,a.jsxs)("div",{children:[(0,a.jsx)("img",{src:n[e.file_id],alt:e.filename||"Generated chart",className:"max-w-full",style:{maxHeight:"400px"}}),(0,a.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 bg-gray-50 border-t border-gray-200",children:[(0,a.jsxs)("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[(0,a.jsx)(eE.Z,{})," ",e.filename]}),(0,a.jsxs)("button",{onClick:()=>u(e),className:"text-xs text-blue-500 hover:text-blue-700 flex items-center gap-1",children:[(0,a.jsx)(eZ.Z,{})," Download"]})]})]}):(0,a.jsx)("div",{className:"flex items-center justify-center p-4 bg-gray-50",children:(0,a.jsx)("span",{className:"text-sm text-gray-400",children:"Image not available"})})},e.file_id)),g.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:g.map(e=>(0,a.jsxs)("button",{onClick:()=>u(e),className:"flex items-center gap-2 px-3 py-2 bg-gray-50 border border-gray-200 rounded-lg hover:bg-gray-100 transition-colors",children:[(0,a.jsx)(en.Z,{className:"text-blue-500"}),(0,a.jsx)("span",{className:"text-sm",children:e.filename}),(0,a.jsx)(eZ.Z,{className:"text-gray-400"})]},e.file_id))})]}):null},eL=s(42264),eR=s(63709);let eO=e=>{if(!e)return!1;let t=e.toLowerCase();return t.startsWith("openai/")||t.startsWith("gpt-")||t.startsWith("o1")||t.startsWith("o3")||t.includes("openai")};var eU=e=>{let{enabled:t,onEnabledChange:s,selectedModel:r,disabled:l=!1}=e,o=eO(r);return(0,a.jsxs)("div",{className:"border border-gray-200 rounded-lg p-3 bg-gradient-to-r from-blue-50 to-purple-50",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(f.Z,{className:"text-blue-500"}),(0,a.jsx)(ef.x,{className:"font-medium text-gray-700",children:"Code Interpreter"}),(0,a.jsx)(I.Z,{title:"Run Python code to generate files, charts, and analyze data. Container is created automatically.",children:(0,a.jsx)(g.Z,{className:"text-gray-400 text-xs"})})]}),(0,a.jsx)(eR.Z,{checked:t&&o,onChange:e=>{if(e&&!o){eL.ZP.warning("Code Interpreter is only available for OpenAI models");return}s(e)},disabled:l||!o,size:"small",className:t&&o?"bg-blue-500":""})]}),!o&&(0,a.jsx)("div",{className:"mt-2 pt-2 border-t border-gray-200",children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)(el.Z,{className:"text-amber-500 mt-0.5"}),(0,a.jsxs)("div",{className:"text-xs text-gray-600",children:[(0,a.jsx)("span",{children:"Code Interpreter is currently only supported for OpenAI models. "}),(0,a.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues/new?template=feature_request.yml",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline",children:"Request support for other providers"})]})]})})]})},eM=s(82971),eK=e=>{let{endpointType:t,onEndpointChange:s,className:r}=e;return(0,a.jsx)("div",{className:r,children:(0,a.jsx)(P.default,{showSearch:!0,value:t,style:{width:"100%"},onChange:s,options:ek,className:"rounded-md",filterOption:(e,t)=>{var s,a;return(null!==(s=null==t?void 0:t.label)&&void 0!==s?s:"").toLowerCase().includes(e.toLowerCase())||(null!==(a=null==t?void 0:t.value)&&void 0!==a?a:"").toLowerCase().includes(e.toLowerCase())}})})},eD=s(29),eB=s.n(eD);let{Text:ez}=k.default,{Panel:eH}=eI.default;var eF=e=>{var t,s;let{events:r,className:l}=e;if(console.log("MCPEventsDisplay: Received events:",r),!r||0===r.length)return console.log("MCPEventsDisplay: No events, returning null"),null;let o=r.find(e=>{var t;return"response.output_item.done"===e.type&&(null===(t=e.item)||void 0===t?void 0:t.type)==="mcp_list_tools"&&e.item.tools&&e.item.tools.length>0}),n=r.filter(e=>{var t;return"response.output_item.done"===e.type&&(null===(t=e.item)||void 0===t?void 0:t.type)==="mcp_call"});return(console.log("MCPEventsDisplay: toolsEvent:",o),console.log("MCPEventsDisplay: mcpCallEvents:",n),o||0!==n.length)?(0,a.jsxs)("div",{className:"jsx-32b14b04f420f3ac "+"mcp-events-display ".concat(l||""),children:[(0,a.jsx)(eB(),{id:"32b14b04f420f3ac",children:'.openai-mcp-tools.jsx-32b14b04f420f3ac{position:relative;margin:0;padding:0}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse.jsx-32b14b04f420f3ac{background:transparent!important;border:none!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-item.jsx-32b14b04f420f3ac{border:none!important;background:transparent!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-header.jsx-32b14b04f420f3ac{padding:0 0 0 20px!important;background:transparent!important;border:none!important;font-size:14px!important;color:#9ca3af!important;font-weight:400!important;line-height:20px!important;min-height:20px!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-header.jsx-32b14b04f420f3ac:hover{background:transparent!important;color:#6b7280!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-content.jsx-32b14b04f420f3ac{border:none!important;background:transparent!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-content-box.jsx-32b14b04f420f3ac{padding:4px 0 0 20px!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-expand-icon.jsx-32b14b04f420f3ac{position:absolute!important;left:2px!important;top:2px!important;color:#9ca3af!important;font-size:10px!important;width:16px!important;height:16px!important;display:-webkit-box!important;display:-webkit-flex!important;display:-moz-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-align:center!important;-webkit-align-items:center!important;-moz-box-align:center!important;-ms-flex-align:center!important;align-items:center!important;-webkit-box-pack:center!important;-webkit-justify-content:center!important;-moz-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important}.openai-mcp-tools.jsx-32b14b04f420f3ac .ant-collapse-expand-icon.jsx-32b14b04f420f3ac:hover{color:#6b7280!important}.openai-vertical-line.jsx-32b14b04f420f3ac{position:absolute;left:9px;top:18px;bottom:0;width:.5px;background-color:#f3f4f6;opacity:.8}.tool-item.jsx-32b14b04f420f3ac{font-family:ui-monospace,SFMono-Regular,"SF Mono",Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:13px;color:#4b5563;line-height:18px;padding:0;margin:0;background:white;position:relative;z-index:1}.mcp-section.jsx-32b14b04f420f3ac{margin-bottom:12px;background:white;position:relative;z-index:1}.mcp-section.jsx-32b14b04f420f3ac:last-child{margin-bottom:0}.mcp-section-header.jsx-32b14b04f420f3ac{font-size:13px;color:#6b7280;font-weight:500;margin-bottom:4px}.mcp-code-block.jsx-32b14b04f420f3ac{background:#f9fafb;border:1px solid#f3f4f6;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;padding:8px;font-size:12px}.mcp-json.jsx-32b14b04f420f3ac{font-family:ui-monospace,SFMono-Regular,"SF Mono",Monaco,Consolas,"Liberation Mono","Courier New",monospace;color:#374151;margin:0;white-space:pre-wrap;word-wrap:break-word}.mcp-approved.jsx-32b14b04f420f3ac{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;font-size:13px;color:#6b7280}.mcp-checkmark.jsx-32b14b04f420f3ac{color:#10b981;margin-right:6px;font-weight:bold}.mcp-response-content.jsx-32b14b04f420f3ac{font-size:13px;color:#374151;line-height:1.5;white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,"SF Mono",Monaco,Consolas,"Liberation Mono","Courier New",monospace}'}),(0,a.jsxs)("div",{className:"jsx-32b14b04f420f3ac openai-mcp-tools",children:[(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac openai-vertical-line"}),(0,a.jsxs)(eI.default,{ghost:!0,size:"small",expandIconPosition:"start",defaultActiveKey:o?["list-tools"]:n.map((e,t)=>"mcp-call-".concat(t)),children:[o&&(0,a.jsx)(eH,{header:"List tools",children:(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac",children:null===(s=o.item)||void 0===s?void 0:null===(t=s.tools)||void 0===t?void 0:t.map((e,t)=>(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac tool-item",children:e.name},t))})},"list-tools"),n.map((e,t)=>{var s,r,l;return(0,a.jsx)(eH,{header:(null===(s=e.item)||void 0===s?void 0:s.name)||"Tool call",children:(0,a.jsxs)("div",{className:"jsx-32b14b04f420f3ac",children:[(0,a.jsxs)("div",{className:"jsx-32b14b04f420f3ac mcp-section",children:[(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-section-header",children:"Request"}),(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-code-block",children:(null===(r=e.item)||void 0===r?void 0:r.arguments)&&(0,a.jsx)("pre",{className:"jsx-32b14b04f420f3ac mcp-json",children:(()=>{try{return JSON.stringify(JSON.parse(e.item.arguments),null,2)}catch(t){return e.item.arguments}})()})})]}),(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-section",children:(0,a.jsxs)("div",{className:"jsx-32b14b04f420f3ac mcp-approved",children:[(0,a.jsx)("span",{className:"jsx-32b14b04f420f3ac mcp-checkmark",children:"✓"})," Approved"]})}),(null===(l=e.item)||void 0===l?void 0:l.output)&&(0,a.jsxs)("div",{className:"jsx-32b14b04f420f3ac mcp-section",children:[(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-section-header",children:"Response"}),(0,a.jsx)("div",{className:"jsx-32b14b04f420f3ac mcp-response-content",children:e.item.output})]})]})},"mcp-call-".concat(t))})]})]})]}):(console.log("MCPEventsDisplay: No valid events found, returning null"),null)},eG=s(94331),eW=s(38398);let eJ=e=>new Promise((t,s)=>{let a=new FileReader;a.onload=()=>{t(a.result.split(",")[1])},a.onerror=s,a.readAsDataURL(e)}),eq=async(e,t)=>{let s=await eJ(t),a=t.type||(t.name.toLowerCase().endsWith(".pdf")?"application/pdf":"image/jpeg");return{role:"user",content:[{type:"input_text",text:e},{type:"input_image",image_url:"data:".concat(a,";base64,").concat(s)}]}},eV=(e,t,s,a)=>{let r="";t&&a&&(r=a.toLowerCase().endsWith(".pdf")?"[PDF attached]":"[Image attached]");let l={role:"user",content:t?"".concat(e," ").concat(r):e};return t&&s&&(l.imagePreviewUrl=s),l},eY=e=>"user"===e.role&&"string"==typeof e.content&&(e.content.includes("[Image attached]")||e.content.includes("[PDF attached]"))&&!!e.imagePreviewUrl;var eX=e=>{let{message:t}=e;if(!eY(t))return null;let s="string"==typeof t.content&&t.content.includes("[PDF attached]");return(0,a.jsx)("div",{className:"mb-2",children:s?(0,a.jsx)("div",{className:"w-64 h-32 rounded-md border border-gray-200 bg-red-50 flex items-center justify-center",children:(0,a.jsx)(j.Z,{style:{fontSize:"48px",color:"#dc2626"}})}):(0,a.jsx)("img",{src:t.imagePreviewUrl,alt:"User uploaded image",className:"max-w-64 rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"200px"}})})},e$=s(53508);let{Dragger:eQ}=_.default;var e0=e=>{let{responsesUploadedImage:t,responsesImagePreviewUrl:s,onImageUpload:r,onRemoveImage:l}=e;return(0,a.jsx)(a.Fragment,{children:!t&&(0,a.jsx)(eQ,{beforeUpload:r,accept:"image/*,.pdf",showUploadList:!1,className:"inline-block",style:{padding:0,border:"none",background:"none"},children:(0,a.jsx)(I.Z,{title:"Attach image or PDF",children:(0,a.jsx)("button",{type:"button",className:"flex items-center justify-center w-8 h-8 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors",children:(0,a.jsx)(e$.Z,{style:{fontSize:"16px"}})})})})})},e2=s(33152),e1=e=>{let{endpointType:t,responsesSessionId:s,useApiSessionManagement:r,onToggleSessionManagement:l}=e;return t!==ew.KP.RESPONSES?null:(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Session Management"}),(0,a.jsx)(I.Z,{title:"Choose between LiteLLM API session management (using previous_response_id) or UI-based session management (using chat history)",children:(0,a.jsx)(g.Z,{className:"text-gray-400",style:{fontSize:"12px"}})})]}),(0,a.jsx)(eR.Z,{checked:r,onChange:l,checkedChildren:"API",unCheckedChildren:"UI",size:"small"})]}),(0,a.jsxs)("div",{className:"text-xs p-2 rounded-md ".concat(s?"bg-green-50 text-green-700 border border-green-200":"bg-blue-50 text-blue-700 border border-blue-200"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(g.Z,{style:{fontSize:"12px"}}),(()=>{if(!s)return r?"API Session: Ready":"UI Session: Ready";let e=r?"Response ID":"UI Session",t=s.slice(0,10);return"".concat(e,": ").concat(t,"...")})()]}),s&&(0,a.jsx)(I.Z,{title:(0,a.jsxs)("div",{className:"text-xs",children:[(0,a.jsx)("div",{className:"mb-1",children:"Copy response ID to continue session:"}),(0,a.jsx)("div",{className:"bg-gray-800 text-gray-100 p-2 rounded font-mono text-xs whitespace-pre-wrap",children:'curl -X POST "your-proxy-url/v1/responses" \\\n -H "Authorization: Bearer your-api-key" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "model": "your-model",\n "input": [{"role": "user", "content": "your message", "type": "message"}],\n "previous_response_id": "'.concat(s,'",\n "stream": true\n }\'')})]}),overlayStyle:{maxWidth:"500px"},children:(0,a.jsx)("button",{onClick:()=>{s&&(navigator.clipboard.writeText(s),B.Z.success("Response ID copied to clipboard!"))},className:"ml-2 p-1 hover:bg-green-100 rounded transition-colors",children:(0,a.jsx)(ei.Z,{style:{fontSize:"12px"}})})})]}),(0,a.jsx)("div",{className:"text-xs opacity-75 mt-1",children:s?r?"LiteLLM API session active - context maintained server-side":"UI session active - context maintained client-side":r?"LiteLLM will manage session using previous_response_id":"UI will manage session using chat history"})]})]})};let{TextArea:e4}=S.default,{Dragger:e3}=_.default,e5=new Set([ew.KP.CHAT,ew.KP.RESPONSES]);var e6=e=>{let{accessToken:t,token:s,userRole:S,userID:_,disabledPersonalKeyCreation:W,proxySettings:q}=e,[er,el]=(0,T.useState)([]),[eo,en]=(0,T.useState)(()=>{let e=sessionStorage.getItem("selectedMCPServers");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedMCPServers from sessionStorage",e),[]}}),[ei,ec]=(0,T.useState)(!1),[ed,em]=(0,T.useState)({}),[eu,ex]=(0,T.useState)(()=>{let e=sessionStorage.getItem("mcpServerToolRestrictions");try{return e?JSON.parse(e):{}}catch(e){return console.error("Error parsing mcpServerToolRestrictions from sessionStorage",e),{}}}),[eg,ep]=(0,T.useState)(()=>{let e=sessionStorage.getItem("apiKeySource");if(e)try{return JSON.parse(e)}catch(e){console.error("Error parsing apiKeySource from sessionStorage",e)}return W?"custom":"session"}),[ef,ev]=(0,T.useState)(()=>sessionStorage.getItem("apiKey")||""),[eb,ey]=(0,T.useState)(()=>sessionStorage.getItem("customProxyBaseUrl")||""),[eS,ek]=(0,T.useState)(""),[eI,eE]=(0,T.useState)(()=>{try{let e=sessionStorage.getItem("chatHistory");return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing chatHistory from sessionStorage",e),[]}}),[eZ,eL]=(0,T.useState)(void 0),[eR,eO]=(0,T.useState)(!1),[eD,eB]=(0,T.useState)([]),[ez,eH]=(0,T.useState)([]),[eJ,eY]=(0,T.useState)(void 0),e$=(0,T.useRef)(null),[eQ,e6]=(0,T.useState)(()=>sessionStorage.getItem("endpointType")||ew.KP.CHAT),[e7,e8]=(0,T.useState)(!1),e9=(0,T.useRef)(null),[te,tt]=(0,T.useState)(()=>{let e=sessionStorage.getItem("selectedTags");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedTags from sessionStorage",e),[]}}),[ts,ta]=(0,T.useState)(()=>{let e=sessionStorage.getItem("selectedVoice");if(!e)return"alloy";try{return JSON.parse(e)}catch(t){return e}}),[tr,tl]=(0,T.useState)(()=>{let e=sessionStorage.getItem("selectedVectorStores");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedVectorStores from sessionStorage",e),[]}}),[to,tn]=(0,T.useState)(()=>{let e=sessionStorage.getItem("selectedGuardrails");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedGuardrails from sessionStorage",e),[]}}),[ti,tc]=(0,T.useState)(()=>{let e=sessionStorage.getItem("selectedPolicies");try{return e?JSON.parse(e):[]}catch(e){return console.error("Error parsing selectedPolicies from sessionStorage",e),[]}}),[td,tm]=(0,T.useState)(()=>sessionStorage.getItem("messageTraceId")||null),[tu,tx]=(0,T.useState)(()=>sessionStorage.getItem("responsesSessionId")||null),[tg,tp]=(0,T.useState)(()=>{let e=sessionStorage.getItem("useApiSessionManagement");return!e||JSON.parse(e)}),[th,tf]=(0,T.useState)([]),[tv,tb]=(0,T.useState)([]),[ty,tj]=(0,T.useState)(null),[tN,tw]=(0,T.useState)(null),[tS,t_]=(0,T.useState)(null),[tk,tP]=(0,T.useState)(null),[tC,tA]=(0,T.useState)(null),[tI,tE]=(0,T.useState)(!1),[tZ,tT]=(0,T.useState)(""),[tL,tR]=(0,T.useState)("openai"),[tO,tU]=(0,T.useState)([]),[tM,tK]=(0,T.useState)(1),[tD,tB]=(0,T.useState)(2048),[tz,tH]=(0,T.useState)(!1),tF=function(){let[e,t]=(0,T.useState)(()=>{let e=sessionStorage.getItem("codeInterpreterEnabled");return!!e&&JSON.parse(e)}),[s,a]=(0,T.useState)(null),r=(0,T.useCallback)(e=>{t(e),sessionStorage.setItem("codeInterpreterEnabled",JSON.stringify(e))},[]),l=(0,T.useCallback)(()=>{a(null)},[]),o=(0,T.useCallback)(()=>{r(!e)},[e,r]);return{enabled:e,result:s,setEnabled:r,setResult:a,clearResult:l,toggle:o}}(),tG=(0,T.useRef)(null),tW=async()=>{let e="session"===eg?t:ef;if(e){ec(!0);try{let t=await (0,z.fetchMCPServers)(e);el(Array.isArray(t)?t:t.data||[])}catch(e){console.error("Error fetching MCP servers:",e)}finally{ec(!1)}}},tJ=async e=>{let s="session"===eg?t:ef;if(s&&!ed[e])try{let t=await (0,z.listMCPTools)(s,e);em(s=>({...s,[e]:t.tools||[]}))}catch(t){console.error("Error fetching tools for server ".concat(e,":"),t)}};(0,T.useEffect)(()=>{tI&&tT((0,eM.L)({apiKeySource:eg,accessToken:t,apiKey:ef,inputMessage:eS,chatHistory:eI,selectedTags:te,selectedVectorStores:tr,selectedGuardrails:to,selectedPolicies:ti,selectedMCPServers:eo,mcpServers:er,mcpServerToolRestrictions:eu,endpointType:eQ,selectedModel:eZ,selectedSdk:tL,selectedVoice:ts,proxySettings:q}))},[tI,tL,eg,t,ef,eS,eI,te,tr,to,ti,eo,er,eu,eQ,eZ,q]),(0,T.useEffect)(()=>{let e=setTimeout(()=>{sessionStorage.setItem("chatHistory",JSON.stringify(eI))},500);return()=>{clearTimeout(e)}},[eI]),(0,T.useEffect)(()=>{sessionStorage.setItem("apiKeySource",JSON.stringify(eg)),sessionStorage.setItem("apiKey",ef),sessionStorage.setItem("endpointType",eQ),sessionStorage.setItem("selectedTags",JSON.stringify(te)),sessionStorage.setItem("selectedVectorStores",JSON.stringify(tr)),sessionStorage.setItem("selectedGuardrails",JSON.stringify(to)),sessionStorage.setItem("selectedPolicies",JSON.stringify(ti)),sessionStorage.setItem("selectedMCPServers",JSON.stringify(eo)),sessionStorage.setItem("mcpServerToolRestrictions",JSON.stringify(eu)),sessionStorage.setItem("selectedVoice",ts),sessionStorage.removeItem("selectedMCPTools"),eZ?sessionStorage.setItem("selectedModel",eZ):sessionStorage.removeItem("selectedModel"),td?sessionStorage.setItem("messageTraceId",td):sessionStorage.removeItem("messageTraceId"),tu?sessionStorage.setItem("responsesSessionId",tu):sessionStorage.removeItem("responsesSessionId"),sessionStorage.setItem("useApiSessionManagement",JSON.stringify(tg))},[eg,ef,eZ,eQ,te,tr,to,ti,td,tu,tg,eo,eu,ts]),(0,T.useEffect)(()=>{let e="session"===eg?t:ef;if(!e||!s||!S||!_){console.log("userApiKey or token or userRole or userID is missing = ",e,s,S,_);return}(async()=>{try{if(!e){console.log("userApiKey is missing");return}let t=await (0,ee.p)(e);console.log("Fetched models:",t),eB(t);let s=t.some(e=>e.model_group===eZ);t.length&&s||eL(void 0)}catch(e){console.error("Error fetching model info:",e)}})(),tW()},[t,_,S,eg,ef,s]),(0,T.useEffect)(()=>{let e="session"===eg?t:ef;e&&eQ===ew.KP.A2A_AGENTS&&(async()=>{try{let t=await (0,Q.o)(e,eb||void 0);eH(t),eJ&&!t.some(e=>e.agent_name===eJ)&&eY(void 0)}catch(e){console.error("Error fetching agents:",e)}})()},[t,eg,ef,eQ,eb,eJ]),(0,T.useEffect)(()=>{tG.current&&setTimeout(()=>{var e;null===(e=tG.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end"})},100)},[eI]);let tq=(e,t,s)=>{console.log("updateTextUI called with:",e,t,s),eE(a=>{let r=a[a.length-1];if(!r||r.role!==e||r.isImage||r.isAudio)return[...a,{role:e,content:t,model:s}];{var l;let e={...r,content:r.content+t,model:null!==(l=r.model)&&void 0!==l?l:s};return[...a.slice(0,-1),e]}})},tV=e=>{eE(t=>{let s=t[t.length-1];return!s||"assistant"!==s.role||s.isImage||s.isAudio?t.length>0&&"user"===t[t.length-1].role?[...t,{role:"assistant",content:"",reasoningContent:e}]:t:[...t.slice(0,t.length-1),{...s,reasoningContent:(s.reasoningContent||"")+e}]})},tY=e=>{console.log("updateTimingData called with:",e),eE(t=>{let s=t[t.length-1];if(console.log("Current last message:",s),s&&"assistant"===s.role){console.log("Updating assistant message with timeToFirstToken:",e);let a=[...t.slice(0,t.length-1),{...s,timeToFirstToken:e}];return console.log("Updated chat history:",a),a}return s&&"user"===s.role?(console.log("Creating new assistant message with timeToFirstToken:",e),[...t,{role:"assistant",content:"",timeToFirstToken:e}]):(console.log("No appropriate message found to update timing"),t)})},tX=(e,t)=>{console.log("Received usage data:",e),eE(s=>{let a=s[s.length-1];if(a&&"assistant"===a.role){console.log("Updating message with usage data:",e);let r={...a,usage:e,toolName:t};return console.log("Updated message:",r),[...s.slice(0,s.length-1),r]}return s})},t$=e=>{console.log("Received A2A metadata:",e),eE(t=>{let s=t[t.length-1];if(s&&"assistant"===s.role){let a={...s,a2aMetadata:e};return[...t.slice(0,t.length-1),a]}return t})},tQ=e=>{eE(t=>{let s=t[t.length-1];return s&&"assistant"===s.role?[...t.slice(0,t.length-1),{...s,totalLatency:e}]:t})},t0=e=>{console.log("Received search results:",e),eE(t=>{let s=t[t.length-1];if(s&&"assistant"===s.role){console.log("Updating message with search results");let a={...s,searchResults:e};return[...t.slice(0,t.length-1),a]}return t})},t2=e=>{console.log("Received response ID for session management:",e),tg&&tx(e)},t1=e=>{console.log("ChatUI: Received MCP event:",e),tU(t=>{if(e.item_id&&t.some(t=>t.item_id===e.item_id&&t.type===e.type&&(t.sequence_number===e.sequence_number||void 0===t.sequence_number&&void 0===e.sequence_number)))return console.log("ChatUI: Duplicate MCP event, skipping"),t;let s=[...t,e];return console.log("ChatUI: Updated MCP events:",s),s})},t4=(e,t)=>{eE(s=>[...s,{role:"assistant",content:e,model:t,isImage:!0}])},t3=(e,t)=>{eE(s=>[...s,{role:"assistant",content:(0,M.aS)(e,100),model:t,isEmbeddings:!0}])},t5=(e,t)=>{eE(s=>[...s,{role:"assistant",content:e,model:t,isAudio:!0}])},t6=(e,t)=>{eE(s=>{let a=s[s.length-1];if(!a||"assistant"!==a.role||a.isImage||a.isAudio)return[...s,{role:"assistant",content:"",model:t,image:{url:e,detail:"auto"}}];{var r;let l={...a,image:{url:e,detail:"auto"},model:null!==(r=a.model)&&void 0!==r?r:t};return[...s.slice(0,-1),l]}})},t7=e=>{tf(t=>[...t,e]);let t=URL.createObjectURL(e);return tb(e=>[...e,t]),!1},t8=e=>{tv[e]&&URL.revokeObjectURL(tv[e]),tf(t=>t.filter((t,s)=>s!==e)),tb(t=>t.filter((t,s)=>s!==e))},t9=()=>{tv.forEach(e=>{URL.revokeObjectURL(e)}),tf([]),tb([])},se=()=>{tN&&URL.revokeObjectURL(tN),tj(null),tw(null)},st=()=>{tk&&URL.revokeObjectURL(tk),t_(null),tP(null)},ss=()=>{tA(null)},sa=async()=>{let e;if(""===eS.trim()&&eQ!==ew.KP.TRANSCRIPTION)return;if(eQ===ew.KP.IMAGE_EDITS&&0===th.length){B.Z.fromBackend("Please upload at least one image for editing");return}if(eQ===ew.KP.TRANSCRIPTION&&!tC){B.Z.fromBackend("Please upload an audio file for transcription");return}if(eQ===ew.KP.A2A_AGENTS&&!eJ){B.Z.fromBackend("Please select an agent to send a message");return}if([ew.KP.CHAT,ew.KP.IMAGE,ew.KP.SPEECH,ew.KP.IMAGE_EDITS,ew.KP.RESPONSES,ew.KP.ANTHROPIC_MESSAGES,ew.KP.EMBEDDINGS,ew.KP.TRANSCRIPTION].includes(eQ)&&!eZ){B.Z.fromBackend("Please select a model before sending a request");return}if(!s||!S||!_)return;let a="session"===eg?t:ef;if(!a){B.Z.fromBackend("Please provide a Virtual Key or select Current UI Session");return}e9.current=new AbortController;let r=e9.current.signal;if(eQ===ew.KP.RESPONSES&&ty)try{e=await eq(eS,ty)}catch(e){B.Z.fromBackend("Failed to process image. Please try again.");return}else if(eQ===ew.KP.CHAT&&tS)try{e=await (0,eA.Sn)(eS,tS)}catch(e){B.Z.fromBackend("Failed to process image. Please try again.");return}else e={role:"user",content:eS};let l=td||(0,U.Z)();td||tm(l),eE([...eI,eQ===ew.KP.RESPONSES&&ty?eV(eS,!0,tN||void 0,ty.name):eQ===ew.KP.CHAT&&tS?(0,eA.Hk)(eS,!0,tk||void 0,tS.name):eQ===ew.KP.TRANSCRIPTION&&tC?eV(eS?"\uD83C\uDFB5 Audio file: ".concat(tC.name,"\nPrompt: ").concat(eS):"\uD83C\uDFB5 Audio file: ".concat(tC.name),!1):eV(eS,!1)]),tU([]),tF.clearResult(),e8(!0);try{if(eZ){if(eQ===ew.KP.CHAT){let t=[...eI.filter(e=>!e.isImage&&!e.isAudio).map(e=>{let{role:t,content:s}=e;return{role:t,content:"string"==typeof s?s:""}}),e];await (0,X.n)(t,(e,t)=>tq("assistant",e,t),eZ,a,te,r,tV,tY,tX,l,tr.length>0?tr:void 0,to.length>0?to:void 0,ti.length>0?ti:void 0,eo,t6,t0,tz?tM:void 0,tz?tD:void 0,tQ,eb||void 0,er,eu,t1)}else if(eQ===ew.KP.IMAGE)await es(eS,(e,t)=>t4(e,t),eZ,a,te,r,eb||void 0);else if(eQ===ew.KP.SPEECH)await V(eS,ts,(e,t)=>t5(e,t),eZ||"",a,te,r,void 0,void 0,eb||void 0);else if(eQ===ew.KP.IMAGE_EDITS)th.length>0&&await et(1===th.length?th[0]:th,eS,(e,t)=>t4(e,t),eZ,a,te,r,eb||void 0);else if(eQ===ew.KP.RESPONSES){let t;t=tg&&tu?[e]:[...eI.filter(e=>!e.isImage&&!e.isAudio).map(e=>{let{role:t,content:s}=e;return{role:t,content:s}}),e],await ea(t,(e,t,s)=>tq(e,t,s),eZ,a,te,r,tV,tY,tX,l,tr.length>0?tr:void 0,to.length>0?to:void 0,ti.length>0?ti:void 0,eo,tg?tu:null,t2,t1,tF.enabled,tF.setResult,eb||void 0,er,eu)}else if(eQ===ew.KP.ANTHROPIC_MESSAGES){let t=[...eI.filter(e=>!e.isImage&&!e.isAudio).map(e=>{let{role:t,content:s}=e;return{role:t,content:s}}),e];await J(t,(e,t,s)=>tq(e,t,s),eZ,a,te,r,tV,tY,tX,l,tr.length>0?tr:void 0,to.length>0?to:void 0,ti.length>0?ti:void 0,eo,eb||void 0)}else eQ===ew.KP.EMBEDDINGS?await $(eS,(e,t)=>t3(e,t),eZ,a,te,eb||void 0):eQ===ew.KP.TRANSCRIPTION&&tC&&await Y(tC,(e,t)=>tq("assistant",e,t),eZ,a,te,r,void 0,void 0,void 0,void 0,eb||void 0)}eQ===ew.KP.A2A_AGENTS&&eJ&&await (0,G.O)(eJ,eS,(e,t)=>tq("assistant",e,t),a,r,tY,tQ,t$,eb||void 0)}catch(e){r.aborted?console.log("Request was cancelled"):(console.error("Error fetching response",e),tq("assistant","Error fetching response:"+e))}finally{e8(!1),e9.current=null,eQ===ew.KP.IMAGE_EDITS&&t9(),eQ===ew.KP.RESPONSES&&ty&&se(),eQ===ew.KP.CHAT&&tS&&st(),eQ===ew.KP.TRANSCRIPTION&&tC&&ss()}ek("")};if(S&&"Admin Viewer"===S){let{Title:e,Paragraph:t}=k.default;return(0,a.jsxs)("div",{children:[(0,a.jsx)(e,{level:1,children:"Access Denied"}),(0,a.jsx)(t,{children:"Ask your proxy admin for access to test models"})]})}let sr=(0,a.jsx)(r.Z,{style:{fontSize:24},spin:!0});return(0,a.jsxs)("div",{className:"w-full p-4 pb-0 bg-white",children:[(0,a.jsx)(w.Zb,{className:"w-full rounded-xl shadow-md overflow-hidden",children:(0,a.jsxs)("div",{className:"flex h-[80vh] w-full gap-4",children:[(0,a.jsxs)("div",{className:"w-1/4 p-4 bg-gray-50 overflow-y-auto",children:[(0,a.jsx)(w.Dx,{className:"text-xl font-semibold mb-6 mt-2",children:"Configurations"}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(l.Z,{className:"mr-2"})," Virtual Key Source"]}),(0,a.jsx)(P.default,{disabled:W,value:eg,style:{width:"100%"},onChange:e=>{ep(e)},options:[{value:"session",label:"Current UI Session"},{value:"custom",label:"Virtual Key"}],className:"rounded-md"}),"custom"===eg&&(0,a.jsx)(w.oi,{className:"mt-2",placeholder:"Enter custom Virtual Key",type:"password",onValueChange:ev,value:ef,icon:l.Z})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)(w.xv,{className:"font-medium block text-gray-700 flex items-center",children:[(0,a.jsx)(o.Z,{className:"mr-2"})," Custom Proxy Base URL"]}),(null==q?void 0:q.LITELLM_UI_API_DOC_BASE_URL)&&!eb&&(0,a.jsx)(C.ZP,{type:"link",size:"small",icon:(0,a.jsx)(n.Z,{}),onClick:()=>{ey(q.LITELLM_UI_API_DOC_BASE_URL||""),sessionStorage.setItem("customProxyBaseUrl",q.LITELLM_UI_API_DOC_BASE_URL||"")},className:"text-gray-500 hover:text-gray-700",children:"Fill"}),eb&&(0,a.jsx)(C.ZP,{type:"link",size:"small",icon:(0,a.jsx)(i.Z,{}),onClick:()=>{ey(""),sessionStorage.removeItem("customProxyBaseUrl")},className:"text-gray-500 hover:text-gray-700",children:"Clear"})]}),(0,a.jsx)(w.oi,{placeholder:"Optional: Enter custom proxy URL (e.g., http://localhost:5000)",onValueChange:e=>{ey(e),sessionStorage.setItem("customProxyBaseUrl",e)},value:eb,icon:c.Z}),eb&&(0,a.jsxs)(w.xv,{className:"text-xs text-gray-500 mt-1",children:["API calls will be sent to: ",eb]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(c.Z,{className:"mr-2"})," Endpoint Type"]}),(0,a.jsx)(eK,{endpointType:eQ,onEndpointChange:e=>{e6(e),eL(void 0),eY(void 0),eO(!1);try{sessionStorage.removeItem("selectedModel"),sessionStorage.removeItem("selectedAgent")}catch(e){}},className:"mb-4"}),eQ===ew.KP.SPEECH&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(d.Z,{className:"mr-2"}),"Voice"]}),(0,a.jsx)(P.default,{value:ts,onChange:e=>{ta(e),sessionStorage.setItem("selectedVoice",e)},style:{width:"100%"},className:"rounded-md",options:e_})]}),(0,a.jsx)(e1,{endpointType:eQ,responsesSessionId:tu,useApiSessionManagement:tg,onToggleSessionManagement:e=>{tp(e),e||tx(null)}})]}),eQ!==ew.KP.A2A_AGENTS&&(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center justify-between",children:[(0,a.jsxs)("span",{className:"flex items-center",children:[(0,a.jsx)(m.Z,{className:"mr-2"})," Select Model"]}),(()=>{if(!eZ||"custom"===eZ)return!1;let e=eD.find(e=>e.model_group===eZ);return!!e&&(!e.mode||"chat"===e.mode)})()?(0,a.jsx)(A.Z,{content:(0,a.jsx)(ej,{temperature:tM,maxTokens:tD,useAdvancedParams:tz,onTemperatureChange:tK,onMaxTokensChange:tB,onUseAdvancedParamsChange:tH}),title:"Model Settings",trigger:"click",placement:"right",children:(0,a.jsx)(C.ZP,{type:"text",size:"small",icon:(0,a.jsx)(o.Z,{}),className:"text-gray-500 hover:text-gray-700"})}):(0,a.jsx)(I.Z,{title:"Advanced parameters are only supported for chat models currently",children:(0,a.jsx)(C.ZP,{type:"text",size:"small",icon:(0,a.jsx)(o.Z,{}),className:"text-gray-300 cursor-not-allowed",disabled:!0})})]}),(0,a.jsx)(P.default,{value:eZ,placeholder:"Select a Model",onChange:e=>{console.log("selected ".concat(e)),eL(e),eO("custom"===e)},options:[{value:"custom",label:"Enter custom model",key:"custom"},...Array.from(new Set(eD.filter(e=>{if(!e.mode)return!0;let t=(0,ew.vf)(e.mode);return eQ===ew.KP.RESPONSES||eQ===ew.KP.ANTHROPIC_MESSAGES?t===eQ||t===ew.KP.CHAT:eQ===ew.KP.IMAGE_EDITS?t===eQ||t===ew.KP.IMAGE:t===eQ}).map(e=>e.model_group))).map((e,t)=>({value:e,label:e,key:t}))],style:{width:"100%"},showSearch:!0,className:"rounded-md"}),eR&&(0,a.jsx)(w.oi,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{e$.current&&clearTimeout(e$.current),e$.current=setTimeout(()=>{eL(e)},500)}})]}),eQ===ew.KP.A2A_AGENTS&&(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(m.Z,{className:"mr-2"})," Select Agent"]}),(0,a.jsx)(P.default,{value:eJ,placeholder:"Select an Agent",onChange:e=>eY(e),options:ez.map(e=>({value:e.agent_name,label:e.agent_name||e.agent_id,key:e.agent_id})),style:{width:"100%"},showSearch:!0,className:"rounded-md",optionLabelProp:"label",children:ez.map(e=>{var t;return(0,a.jsx)(P.default.Option,{value:e.agent_name,label:e.agent_name||e.agent_id,children:(0,a.jsxs)("div",{className:"flex flex-col py-1",children:[(0,a.jsx)("span",{className:"font-medium",children:e.agent_name||e.agent_id}),(null===(t=e.agent_card_params)||void 0===t?void 0:t.description)&&(0,a.jsx)("span",{className:"text-xs text-gray-500 mt-1",children:e.agent_card_params.description})]})},e.agent_id)})}),0===ez.length&&(0,a.jsx)(w.xv,{className:"text-xs text-gray-500 mt-2 block",children:"No agents found. Create agents via /v1/agents endpoint."})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(u.Z,{className:"mr-2"})," Tags"]}),(0,a.jsx)(H.Z,{value:te,onChange:tt,className:"mb-4",accessToken:t||""})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(x.Z,{className:"mr-2"})," MCP Servers",(0,a.jsx)(I.Z,{className:"ml-1",title:"Select MCP servers to use in your conversation.",children:(0,a.jsx)(g.Z,{})})]}),(0,a.jsxs)(P.default,{mode:"multiple",style:{width:"100%"},placeholder:"Select MCP servers",value:eo,onChange:e=>{e.includes("__all__")?(en(["__all__"]),ex({})):(en(e),ex(t=>{let s={...t};return Object.keys(s).forEach(t=>{e.includes(t)||delete s[t]}),s}),e.forEach(e=>{ed[e]||tJ(e)}))},loading:ei,className:"mb-2",allowClear:!0,optionLabelProp:"label",disabled:!e5.has(eQ),maxTagCount:"responsive",children:[(0,a.jsx)(P.default.Option,{value:"__all__",label:"All MCP Servers",children:(0,a.jsxs)("div",{className:"flex flex-col py-1",children:[(0,a.jsx)("span",{className:"font-medium",children:"All MCP Servers"}),(0,a.jsx)("span",{className:"text-xs text-gray-500 mt-1",children:"Use all available MCP servers"})]})},"__all__"),er.map(e=>(0,a.jsx)(P.default.Option,{value:e.server_id,label:e.alias||e.server_name||e.server_id,disabled:eo.includes("__all__"),children:(0,a.jsxs)("div",{className:"flex flex-col py-1",children:[(0,a.jsx)("span",{className:"font-medium",children:e.alias||e.server_name||e.server_id}),e.description&&(0,a.jsx)("span",{className:"text-xs text-gray-500 mt-1",children:e.description})]})},e.server_id))]}),eo.length>0&&!eo.includes("__all__")&&e5.has(eQ)&&(0,a.jsx)("div",{className:"mt-3 space-y-2",children:eo.map(e=>{let t=er.find(t=>t.server_id===e),s=ed[e]||[];return 0===s.length?null:(0,a.jsxs)("div",{className:"border rounded p-2",children:[(0,a.jsxs)(w.xv,{className:"text-xs text-gray-600 mb-1",children:["Limit tools for ",(null==t?void 0:t.alias)||(null==t?void 0:t.server_name)||e,":"]}),(0,a.jsx)(P.default,{mode:"multiple",size:"small",style:{width:"100%"},placeholder:"All tools (default)",value:eu[e]||[],onChange:t=>{ex(s=>({...s,[e]:t}))},options:s.map(e=>({value:e.name,label:e.name})),maxTagCount:2})]},e)})})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(p.Z,{className:"mr-2"})," Vector Store",(0,a.jsx)(I.Z,{className:"ml-1",title:(0,a.jsxs)("span",{children:["Select vector store(s) to use for this LLM API call. You can set up your vector store"," ",(0,a.jsx)("a",{href:"?page=vector-stores",style:{color:"#1890ff"},children:"here"}),"."]}),children:(0,a.jsx)(g.Z,{})})]}),(0,a.jsx)(F.Z,{value:tr,onChange:tl,className:"mb-4",accessToken:t||""})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(h.Z,{className:"mr-2"})," Guardrails",(0,a.jsx)(I.Z,{className:"ml-1",title:(0,a.jsxs)("span",{children:["Select guardrail(s) to use for this LLM API call. You can set up your guardrails"," ",(0,a.jsx)("a",{href:"?page=guardrails",style:{color:"#1890ff"},children:"here"}),"."]}),children:(0,a.jsx)(g.Z,{})})]}),(0,a.jsx)(K.Z,{value:to,onChange:tn,className:"mb-4",accessToken:t||""})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.xv,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(h.Z,{className:"mr-2"})," Policies",(0,a.jsx)(I.Z,{className:"ml-1",title:(0,a.jsxs)("span",{children:["Select policy/policies to apply to this LLM API call. Policies define which guardrails are applied based on conditions. You can set up your policies"," ",(0,a.jsx)("a",{href:"?page=policies",style:{color:"#1890ff"},children:"here"}),"."]}),children:(0,a.jsx)(g.Z,{})})]}),(0,a.jsx)(D.Z,{value:ti,onChange:tc,className:"mb-4",accessToken:t||""})]}),eQ===ew.KP.RESPONSES&&(0,a.jsx)("div",{children:(0,a.jsx)(eU,{accessToken:"session"===eg?t||"":ef,enabled:tF.enabled,onEnabledChange:tF.setEnabled,selectedContainerId:null,onContainerChange:()=>{},selectedModel:eZ||""})})]})]}),(0,a.jsxs)("div",{className:"w-3/4 flex flex-col bg-white",children:[(0,a.jsxs)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:[(0,a.jsx)(w.Dx,{className:"text-xl font-semibold mb-0",children:"Test Key"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(w.zx,{onClick:()=>{eI.forEach(e=>{e.isAudio&&"string"==typeof e.content&&URL.revokeObjectURL(e.content)}),eE([]),tm(null),tx(null),tU([]),t9(),se(),st(),ss(),sessionStorage.removeItem("chatHistory"),sessionStorage.removeItem("messageTraceId"),sessionStorage.removeItem("responsesSessionId"),B.Z.success("Chat history cleared.")},className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:i.Z,children:"Clear Chat"}),(0,a.jsx)(w.zx,{onClick:()=>tE(!0),className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:f.Z,children:"Get Code"})]})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-auto p-4 pb-0",children:[0===eI.length&&(0,a.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,a.jsx)(m.Z,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,a.jsx)(w.xv,{children:"Start a conversation, generate an image, or handle audio"})]}),eI.map((e,s)=>(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"mb-4 ".concat("user"===e.role?"text-right":"text-left"),children:(0,a.jsxs)("div",{className:"inline-block max-w-[80%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"user"===e.role?"#f0f8ff":"#ffffff",border:"user"===e.role?"1px solid #e6f0fa":"1px solid #f0f0f0",textAlign:"left"},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:"user"===e.role?"#e6f0fa":"#f5f5f5"},children:"user"===e.role?(0,a.jsx)(v.Z,{style:{fontSize:"12px",color:"#2563eb"}}):(0,a.jsx)(m.Z,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,a.jsx)("strong",{className:"text-sm capitalize",children:e.role}),"assistant"===e.role&&e.model&&(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:e.model})]}),e.reasoningContent&&(0,a.jsx)(eG.Z,{reasoningContent:e.reasoningContent}),"assistant"===e.role&&s===eI.length-1&&tO.length>0&&(eQ===ew.KP.RESPONSES||eQ===ew.KP.CHAT)&&(0,a.jsx)("div",{className:"mb-3",children:(0,a.jsx)(eF,{events:tO})}),"assistant"===e.role&&e.searchResults&&(0,a.jsx)(e2.J,{searchResults:e.searchResults}),"assistant"===e.role&&s===eI.length-1&&tF.result&&eQ===ew.KP.RESPONSES&&(0,a.jsx)(eT,{code:tF.result.code,containerId:tF.result.containerId,annotations:tF.result.annotations,accessToken:"session"===eg?t||"":ef}),(0,a.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:[e.isImage?(0,a.jsx)("img",{src:"string"==typeof e.content?e.content:"",alt:"Generated image",className:"max-w-full rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"500px"}}):e.isAudio?(0,a.jsx)(eN,{message:e}):(0,a.jsxs)(a.Fragment,{children:[eQ===ew.KP.RESPONSES&&(0,a.jsx)(eX,{message:e}),eQ===ew.KP.CHAT&&(0,a.jsx)(eP.Z,{message:e}),(0,a.jsx)(L.UG,{components:{code(e){let{node:t,inline:s,className:r,children:l,...o}=e,n=/language-(\w+)/.exec(r||"");return!s&&n?(0,a.jsx)(R.Z,{style:O.Z,language:n[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...o,children:String(l).replace(/\n$/,"")}):(0,a.jsx)("code",{className:"".concat(r," px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono"),style:{wordBreak:"break-word"},...o,children:l})},pre:e=>{let{node:t,...s}=e;return(0,a.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...s})}},children:"string"==typeof e.content?e.content:""}),e.image&&(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)("img",{src:e.image.url,alt:"Generated image",className:"max-w-full rounded-md border border-gray-200 shadow-sm",style:{maxHeight:"500px"}})})]}),"assistant"===e.role&&(e.timeToFirstToken||e.totalLatency||e.usage)&&!e.a2aMetadata&&(0,a.jsx)(eW.Z,{timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency,usage:e.usage,toolName:e.toolName}),"assistant"===e.role&&e.a2aMetadata&&(0,a.jsx)(eh,{a2aMetadata:e.a2aMetadata,timeToFirstToken:e.timeToFirstToken,totalLatency:e.totalLatency})]})]})})},s)),e7&&tO.length>0&&(eQ===ew.KP.RESPONSES||eQ===ew.KP.CHAT)&&eI.length>0&&"user"===eI[eI.length-1].role&&(0,a.jsx)("div",{className:"text-left mb-4",children:(0,a.jsxs)("div",{className:"inline-block max-w-[80%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"#ffffff",border:"1px solid #f0f0f0",textAlign:"left"},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:"#f5f5f5"},children:(0,a.jsx)(m.Z,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,a.jsx)("strong",{className:"text-sm capitalize",children:"Assistant"})]}),(0,a.jsx)(eF,{events:tO})]})}),e7&&(0,a.jsx)("div",{className:"flex justify-center items-center my-4",children:(0,a.jsx)(E.Z,{indicator:sr})}),(0,a.jsx)("div",{ref:tG,style:{height:"1px"}})]}),(0,a.jsxs)("div",{className:"p-4 border-t border-gray-200 bg-white",children:[eQ===ew.KP.IMAGE_EDITS&&(0,a.jsx)("div",{className:"mb-4",children:0===th.length?(0,a.jsxs)(e3,{beforeUpload:t7,accept:"image/*",showUploadList:!1,children:[(0,a.jsx)("p",{className:"ant-upload-drag-icon",children:(0,a.jsx)(b.Z,{style:{fontSize:"24px",color:"#666"}})}),(0,a.jsx)("p",{className:"ant-upload-text text-sm",children:"Click or drag images to upload"}),(0,a.jsx)("p",{className:"ant-upload-hint text-xs text-gray-500",children:"Support for PNG, JPG, JPEG formats. Multiple images supported."})]}):(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[th.map((e,t)=>(0,a.jsxs)("div",{className:"relative inline-block",children:[(0,a.jsx)("img",{src:tv[t]||"",alt:"Upload preview ".concat(t+1),className:"max-w-32 max-h-32 rounded-md border border-gray-200 object-cover"}),(0,a.jsx)("button",{className:"absolute top-1 right-1 bg-white shadow-sm border border-gray-200 rounded px-1 py-1 text-red-500 hover:bg-red-50 text-xs",onClick:()=>t8(t),children:(0,a.jsx)(y.Z,{})})]},t)),(0,a.jsxs)("div",{className:"flex items-center justify-center w-32 h-32 border-2 border-dashed border-gray-300 rounded-md hover:border-gray-400 cursor-pointer",onClick:()=>{var e;return null===(e=document.getElementById("additional-image-upload"))||void 0===e?void 0:e.click()},children:[(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(b.Z,{style:{fontSize:"24px",color:"#666"}}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Add more"})]}),(0,a.jsx)("input",{id:"additional-image-upload",type:"file",accept:"image/*",multiple:!0,style:{display:"none"},onChange:e=>{Array.from(e.target.files||[]).forEach(e=>t7(e))}})]})]})}),eQ===ew.KP.TRANSCRIPTION&&(0,a.jsx)("div",{className:"mb-4",children:tC?(0,a.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-1",children:[(0,a.jsx)(d.Z,{style:{fontSize:"20px",color:"#666"}}),(0,a.jsx)("span",{className:"text-sm font-medium",children:tC.name}),(0,a.jsxs)("span",{className:"text-xs text-gray-500",children:["(",(tC.size/1024/1024).toFixed(2)," MB)"]})]}),(0,a.jsxs)("button",{className:"bg-white shadow-sm border border-gray-200 rounded px-2 py-1 text-red-500 hover:bg-red-50 text-xs",onClick:ss,children:[(0,a.jsx)(y.Z,{})," Remove"]})]}):(0,a.jsxs)(e3,{beforeUpload:e=>(tA(e),!1),accept:"audio/*,.mp3,.mp4,.mpeg,.mpga,.m4a,.wav,.webm",showUploadList:!1,children:[(0,a.jsx)("p",{className:"ant-upload-drag-icon",children:(0,a.jsx)(d.Z,{style:{fontSize:"24px",color:"#666"}})}),(0,a.jsx)("p",{className:"ant-upload-text text-sm",children:"Click or drag audio file to upload"}),(0,a.jsx)("p",{className:"ant-upload-hint text-xs text-gray-500",children:"Support for MP3, MP4, MPEG, MPGA, M4A, WAV, WEBM formats. Max file size: 25 MB."})]})}),eQ===ew.KP.RESPONSES&&ty&&(0,a.jsx)("div",{className:"mb-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsx)("div",{className:"relative inline-block",children:ty.name.toLowerCase().endsWith(".pdf")?(0,a.jsx)("div",{className:"w-10 h-10 rounded-md bg-red-500 flex items-center justify-center",children:(0,a.jsx)(j.Z,{style:{fontSize:"16px",color:"white"}})}):(0,a.jsx)("img",{src:tN||"",alt:"Upload preview",className:"w-10 h-10 rounded-md border border-gray-200 object-cover"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:ty.name}),(0,a.jsx)("div",{className:"text-xs text-gray-500",children:ty.name.toLowerCase().endsWith(".pdf")?"PDF":"Image"})]}),(0,a.jsx)("button",{className:"flex items-center justify-center w-6 h-6 text-gray-400 hover:text-gray-600 hover:bg-gray-200 rounded-full transition-colors",onClick:se,children:(0,a.jsx)(y.Z,{style:{fontSize:"12px"}})})]})}),eQ===ew.KP.CHAT&&tS&&(0,a.jsx)("div",{className:"mb-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsx)("div",{className:"relative inline-block",children:tS.name.toLowerCase().endsWith(".pdf")?(0,a.jsx)("div",{className:"w-10 h-10 rounded-md bg-red-500 flex items-center justify-center",children:(0,a.jsx)(j.Z,{style:{fontSize:"16px",color:"white"}})}):(0,a.jsx)("img",{src:tk||"",alt:"Upload preview",className:"w-10 h-10 rounded-md border border-gray-200 object-cover"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-900 truncate",children:tS.name}),(0,a.jsx)("div",{className:"text-xs text-gray-500",children:tS.name.toLowerCase().endsWith(".pdf")?"PDF":"Image"})]}),(0,a.jsx)("button",{className:"flex items-center justify-center w-6 h-6 text-gray-400 hover:text-gray-600 hover:bg-gray-200 rounded-full transition-colors",onClick:st,children:(0,a.jsx)(y.Z,{style:{fontSize:"12px"}})})]})}),eQ===ew.KP.RESPONSES&&tF.enabled&&(0,a.jsxs)("div",{className:"mb-2 space-y-2",children:[(0,a.jsxs)("div",{className:"px-3 py-2 bg-gradient-to-r from-blue-50 to-purple-50 rounded-lg border border-blue-200 flex items-center justify-between",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:e7?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.Z,{className:"text-blue-500",spin:!0}),(0,a.jsx)("span",{className:"text-sm text-blue-700 font-medium",children:"Running Python code..."})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.Z,{className:"text-blue-500"}),(0,a.jsx)("span",{className:"text-sm text-blue-700 font-medium",children:"Code Interpreter Active"})]})}),(0,a.jsx)("button",{className:"text-xs text-blue-500 hover:text-blue-700",onClick:()=>tF.setEnabled(!1),children:"Disable"})]}),!e7&&(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:["Generate sample sales data CSV and create a chart","Create a PNG bar chart comparing AI gateway providers including LiteLLM","Generate a CSV of LLM pricing data and visualize it as a line chart"].map((e,t)=>(0,a.jsx)("button",{className:"text-xs px-3 py-1.5 bg-white border border-gray-200 rounded-full hover:bg-blue-50 hover:border-blue-300 hover:text-blue-600 transition-colors",onClick:()=>ek(e),children:e},t))})]}),0===eI.length&&!e7&&(0,a.jsx)("div",{className:"flex items-center gap-2 mb-3 overflow-x-auto",children:(eQ===ew.KP.A2A_AGENTS?["What can you help me with?","Tell me about yourself","What tasks can you perform?"]:["Write me a poem","Explain quantum computing","Draft a polite email requesting a meeting"]).map(e=>(0,a.jsx)("button",{type:"button",className:"shrink-0 rounded-full border border-gray-200 px-3 py-1 text-xs font-medium text-gray-600 transition-colors hover:bg-blue-50 hover:border-blue-300 hover:text-blue-600 cursor-pointer",onClick:()=>ek(e),children:e},e))}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center flex-1 bg-white border border-gray-300 rounded-xl px-3 py-1 min-h-[44px]",children:[(0,a.jsxs)("div",{className:"flex-shrink-0 mr-2 flex items-center gap-1",children:[eQ===ew.KP.RESPONSES&&!ty&&(0,a.jsx)(e0,{responsesUploadedImage:ty,responsesImagePreviewUrl:tN,onImageUpload:e=>(tj(e),tw(URL.createObjectURL(e)),!1),onRemoveImage:se}),eQ===ew.KP.CHAT&&!tS&&(0,a.jsx)(eC.Z,{chatUploadedImage:tS,chatImagePreviewUrl:tk,onImageUpload:e=>(t_(e),tP(URL.createObjectURL(e)),!1),onRemoveImage:st}),eQ===ew.KP.RESPONSES&&(0,a.jsx)(I.Z,{title:tF.enabled?"Code Interpreter enabled (click to disable)":"Enable Code Interpreter",children:(0,a.jsx)("button",{className:"p-1.5 rounded-md transition-colors ".concat(tF.enabled?"bg-blue-100 text-blue-600":"text-gray-400 hover:text-gray-600 hover:bg-gray-100"),onClick:()=>{tF.toggle(),tF.enabled||B.Z.success("Code Interpreter enabled!")},children:(0,a.jsx)(f.Z,{style:{fontSize:"16px"}})})})]}),(0,a.jsx)(e4,{value:eS,onChange:e=>ek(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),sa())},placeholder:eQ===ew.KP.CHAT||eQ===ew.KP.EMBEDDINGS||eQ===ew.KP.RESPONSES||eQ===ew.KP.ANTHROPIC_MESSAGES?"Type your message... (Shift+Enter for new line)":eQ===ew.KP.A2A_AGENTS?"Send a message to the A2A agent...":eQ===ew.KP.IMAGE_EDITS?"Describe how you want to edit the image...":eQ===ew.KP.SPEECH?"Enter text to convert to speech...":eQ===ew.KP.TRANSCRIPTION?"Optional: Add context or prompt for transcription...":"Describe the image you want to generate...",disabled:e7,className:"flex-1",autoSize:{minRows:1,maxRows:4},style:{resize:"none",border:"none",boxShadow:"none",background:"transparent",padding:"4px 0",fontSize:"14px",lineHeight:"20px"}}),(0,a.jsx)(w.zx,{onClick:sa,disabled:e7||(eQ===ew.KP.TRANSCRIPTION?!tC:!eS.trim()),className:"flex-shrink-0 ml-2 !w-8 !h-8 !min-w-8 !p-0 !rounded-full !bg-blue-600 hover:!bg-blue-700 disabled:!bg-gray-300 !border-none !text-white disabled:!text-gray-500 !flex !items-center !justify-center",children:(0,a.jsx)(N.Z,{style:{fontSize:"14px"}})})]}),e7&&(0,a.jsx)(w.zx,{onClick:()=>{e9.current&&(e9.current.abort(),e9.current=null,e8(!1),B.Z.info("Request cancelled"))},className:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200",icon:y.Z,children:"Cancel"})]})]})]})]})}),(0,a.jsxs)(Z.Z,{title:"Generated Code",visible:tI,onCancel:()=>tE(!1),footer:null,width:800,children:[(0,a.jsxs)("div",{className:"flex justify-between items-end my-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(w.xv,{className:"font-medium block mb-1 text-gray-700",children:"SDK Type"}),(0,a.jsx)(P.default,{value:tL,onChange:e=>tR(e),style:{width:150},options:[{value:"openai",label:"OpenAI SDK"},{value:"azure",label:"Azure SDK"}]})]}),(0,a.jsx)(C.ZP,{onClick:()=>{navigator.clipboard.writeText(tZ),B.Z.success("Copied to clipboard!")},children:"Copy to Clipboard"})]}),(0,a.jsx)(R.Z,{language:"python",style:O.Z,wrapLines:!0,wrapLongLines:!0,className:"rounded-md",customStyle:{maxHeight:"60vh",overflowY:"auto"},children:tZ})]})]})}},94331:function(e,t,s){var a=s(57437),r=s(2265),l=s(5545),o=s(62831),n=s(17906),i=s(94263),c=s(83322),d=s(70464),m=s(77565);t.Z=e=>{let{reasoningContent:t}=e,[s,u]=(0,r.useState)(!0);return t?(0,a.jsxs)("div",{className:"reasoning-content mt-1 mb-2",children:[(0,a.jsxs)(l.ZP,{type:"text",className:"flex items-center text-xs text-gray-500 hover:text-gray-700",onClick:()=>u(!s),icon:(0,a.jsx)(c.Z,{}),children:[s?"Hide reasoning":"Show reasoning",s?(0,a.jsx)(d.Z,{className:"ml-1"}):(0,a.jsx)(m.Z,{className:"ml-1"})]}),s&&(0,a.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-700",children:(0,a.jsx)(o.UG,{components:{code(e){let{node:t,inline:s,className:r,children:l,...o}=e,c=/language-(\w+)/.exec(r||"");return!s&&c?(0,a.jsx)(n.Z,{style:i.Z,language:c[1],PreTag:"div",className:"rounded-md my-2",...o,children:String(l).replace(/\n$/,"")}):(0,a.jsx)("code",{className:"".concat(r," px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono"),...o,children:l})}},children:t})})]}):null}},38398:function(e,t,s){var a=s(57437);s(2265);var r=s(99981),l=s(5540),o=s(71282),n=s(11741),i=s(83322),c=s(16601),d=s(62670),m=s(58630);t.Z=e=>{let{timeToFirstToken:t,totalLatency:s,usage:u,toolName:x}=e;return t||s||u?(0,a.jsxs)("div",{className:"response-metrics mt-2 pt-2 border-t border-gray-100 text-xs text-gray-500 flex flex-wrap gap-3",children:[void 0!==t&&(0,a.jsx)(r.Z,{title:"Time to first token",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(l.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["TTFT: ",(t/1e3).toFixed(2),"s"]})]})}),void 0!==s&&(0,a.jsx)(r.Z,{title:"Total latency",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(l.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Total Latency: ",(s/1e3).toFixed(2),"s"]})]})}),(null==u?void 0:u.promptTokens)!==void 0&&(0,a.jsx)(r.Z,{title:"Prompt tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(o.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["In: ",u.promptTokens]})]})}),(null==u?void 0:u.completionTokens)!==void 0&&(0,a.jsx)(r.Z,{title:"Completion tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(n.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Out: ",u.completionTokens]})]})}),(null==u?void 0:u.reasoningTokens)!==void 0&&(0,a.jsx)(r.Z,{title:"Reasoning tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(i.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Reasoning: ",u.reasoningTokens]})]})}),(null==u?void 0:u.totalTokens)!==void 0&&(0,a.jsx)(r.Z,{title:"Total tokens",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(c.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Total: ",u.totalTokens]})]})}),(null==u?void 0:u.cost)!==void 0&&(0,a.jsx)(r.Z,{title:"Cost",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(d.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["$",u.cost.toFixed(6)]})]})}),x&&(0,a.jsx)(r.Z,{title:"Tool used",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(m.Z,{className:"mr-1"}),(0,a.jsxs)("span",{children:["Tool: ",x]})]})})]}):null}},33152:function(e,t,s){s.d(t,{J:function(){return d}});var a=s(57437),r=s(2265),l=s(5545),o=s(44625),n=s(70464),i=s(77565),c=s(38434);function d(e){let{searchResults:t}=e,[s,d]=(0,r.useState)(!0),[m,u]=(0,r.useState)({});if(!t||0===t.length)return null;let x=(e,t)=>{let s="".concat(e,"-").concat(t);u(e=>({...e,[s]:!e[s]}))},g=t.reduce((e,t)=>e+t.data.length,0);return(0,a.jsxs)("div",{className:"search-results-content mt-1 mb-2",children:[(0,a.jsxs)(l.ZP,{type:"text",className:"flex items-center text-xs text-gray-500 hover:text-gray-700",onClick:()=>d(!s),icon:(0,a.jsx)(o.Z,{}),children:[s?"Hide sources":"Show sources (".concat(g,")"),s?(0,a.jsx)(n.Z,{className:"ml-1"}):(0,a.jsx)(i.Z,{className:"ml-1"})]}),s&&(0,a.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md text-sm",children:(0,a.jsx)("div",{className:"space-y-3",children:t.map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"text-xs text-gray-600 mb-2 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-medium",children:"Query:"}),(0,a.jsxs)("span",{className:"italic",children:['"',e.search_query,'"']}),(0,a.jsx)("span",{className:"text-gray-400",children:"•"}),(0,a.jsxs)("span",{className:"text-gray-500",children:[e.data.length," result",1!==e.data.length?"s":""]})]}),(0,a.jsx)("div",{className:"space-y-2",children:e.data.map((e,s)=>{let r=m["".concat(t,"-").concat(s)]||!1;return(0,a.jsxs)("div",{className:"border border-gray-200 rounded-md overflow-hidden bg-white",children:[(0,a.jsx)("div",{className:"flex items-center justify-between p-2 cursor-pointer hover:bg-gray-50 transition-colors",onClick:()=>x(t,s),children:(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,a.jsx)("svg",{className:"w-4 h-4 text-gray-400 transition-transform flex-shrink-0 ".concat(r?"transform rotate-90":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,a.jsx)(c.Z,{className:"text-gray-400 flex-shrink-0",style:{fontSize:"12px"}}),(0,a.jsx)("span",{className:"text-xs font-medium text-gray-700 truncate",children:e.filename||e.file_id||"Result ".concat(s+1)}),(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-blue-100 text-blue-700 font-mono flex-shrink-0",children:e.score.toFixed(3)})]})}),r&&(0,a.jsx)("div",{className:"border-t border-gray-200 bg-white",children:(0,a.jsxs)("div",{className:"p-3 space-y-2",children:[e.content.map((e,t)=>(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"text-xs font-mono bg-gray-50 p-2 rounded text-gray-800 whitespace-pre-wrap break-words",children:e.text})},t)),e.attributes&&Object.keys(e.attributes).length>0&&(0,a.jsxs)("div",{className:"mt-2 pt-2 border-t border-gray-100",children:[(0,a.jsx)("div",{className:"text-xs text-gray-500 mb-1 font-medium",children:"Metadata:"}),(0,a.jsx)("div",{className:"space-y-1",children:Object.entries(e.attributes).map(e=>{let[t,s]=e;return(0,a.jsxs)("div",{className:"text-xs flex gap-2",children:[(0,a.jsxs)("span",{className:"text-gray-500 font-medium",children:[t,":"]}),(0,a.jsx)("span",{className:"text-gray-700 font-mono break-all",children:String(s)})]},t)})})]})]})})]},s)})})]},t))})})]})}},26832:function(e,t,s){s.d(t,{O:function(){return o},m:function(){return n}});var a=s(93837),r=s(19250);let l=e=>{if(!e)return;let t={};if(e.id&&(t.taskId=e.id),e.contextId&&(t.contextId=e.contextId),e.status){var s;if(t.status={state:e.status.state,timestamp:e.status.timestamp},null===(s=e.status.message)||void 0===s?void 0:s.parts){let s=e.status.message.parts.filter(e=>"text"===e.kind&&e.text).map(e=>e.text).join(" ");s&&(t.status.message=s)}}return e.metadata&&"object"==typeof e.metadata&&(t.metadata=e.metadata),Object.keys(t).length>0?t:void 0},o=async(e,t,s,o,n,i,c,d,m)=>{let u=m||(0,r.getProxyBaseUrl)(),x=u?"".concat(u,"/a2a/").concat(e,"/message/send"):"/a2a/".concat(e,"/message/send"),g=(0,a.Z)(),p=(0,a.Z)().replace(/-/g,""),h=performance.now();try{var f,v,b;let a=await fetch(x,{method:"POST",headers:{[(0,r.getGlobalLitellmHeaderName)()]:"Bearer ".concat(o),"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:g,method:"message/send",params:{message:{kind:"message",messageId:p,role:"user",parts:[{kind:"text",text:t}]}}}),signal:n}),m=performance.now()-h;if(i&&i(m),!a.ok){let e=await a.json();throw Error((null===(f=e.error)||void 0===f?void 0:f.message)||e.detail||"HTTP ".concat(a.status))}let u=await a.json(),y=performance.now()-h;if(c&&c(y),u.error)throw Error(u.error.message);let j=u.result;if(j){let t="",a=l(j);if(a&&d&&d(a),j.artifacts&&Array.isArray(j.artifacts)){for(let e of j.artifacts)if(e.parts&&Array.isArray(e.parts))for(let s of e.parts)"text"===s.kind&&s.text&&(t+=s.text)}else if(j.parts&&Array.isArray(j.parts))for(let e of j.parts)"text"===e.kind&&e.text&&(t+=e.text);else if(null===(b=j.status)||void 0===b?void 0:null===(v=b.message)||void 0===v?void 0:v.parts)for(let e of j.status.message.parts)"text"===e.kind&&e.text&&(t+=e.text);t?s(t,"a2a_agent/".concat(e)):(console.warn("Could not extract text from A2A response, showing raw JSON:",j),s(JSON.stringify(j,null,2),"a2a_agent/".concat(e)))}}catch(e){if(null==n?void 0:n.aborted){console.log("A2A request was cancelled");return}throw console.error("A2A send message error:",e),e}},n=async(e,t,s,o,n,i,c,d,m)=>{let u;let x=m||(0,r.getProxyBaseUrl)(),g=x?"".concat(x,"/a2a/").concat(e):"/a2a/".concat(e),p=(0,a.Z)(),h=(0,a.Z)().replace(/-/g,""),f=performance.now(),v=!1,b="";try{var y,j;let a=await fetch(g,{method:"POST",headers:{[(0,r.getGlobalLitellmHeaderName)()]:"Bearer ".concat(o),"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:p,method:"message/stream",params:{message:{kind:"message",messageId:h,role:"user",parts:[{kind:"text",text:t}]}}}),signal:n});if(!a.ok){let e=await a.json();throw Error((null===(j=e.error)||void 0===j?void 0:j.message)||e.detail||"HTTP ".concat(a.status))}let m=null===(y=a.body)||void 0===y?void 0:y.getReader();if(!m)throw Error("No response body");let x=new TextDecoder,N="",w=!1;for(;!w;){let t=await m.read();w=t.done;let a=t.value;if(w)break;let r=(N+=x.decode(a,{stream:!0})).split("\n");for(let t of(N=r.pop()||"",r))if(t.trim())try{let a=JSON.parse(t);if(!v){v=!0;let e=performance.now()-f;i&&i(e)}let r=a.result;if(r){let t=l(r);t&&(u={...u,...t});let a=r.kind;if("artifact-update"===a&&r.artifact){let t=r.artifact;if(t.parts&&Array.isArray(t.parts))for(let a of t.parts)"text"===a.kind&&a.text&&(b+=a.text,s(b,"a2a_agent/".concat(e)))}else if(r.artifacts&&Array.isArray(r.artifacts)){for(let t of r.artifacts)if(t.parts&&Array.isArray(t.parts))for(let a of t.parts)"text"===a.kind&&a.text&&(b+=a.text,s(b,"a2a_agent/".concat(e)))}else if("status-update"===a);else if(r.parts&&Array.isArray(r.parts))for(let t of r.parts)"text"===t.kind&&t.text&&(b+=t.text,s(b,"a2a_agent/".concat(e)))}if(a.error){let e=a.error.message||"Unknown A2A error";throw Error(e)}}catch(e){if(e instanceof Error&&e.message&&!e.message.includes("JSON"))throw e;t.trim().length>0&&console.warn("Failed to parse A2A streaming chunk:",t,e)}}let S=performance.now()-f;c&&c(S),u&&d&&d(u)}catch(e){if(null==n?void 0:n.aborted){console.log("A2A streaming request was cancelled");return}throw console.error("A2A stream message error:",e),e}}},95459:function(e,t,s){s.d(t,{n:function(){return l}});var a=s(7271),r=s(19250);async function l(e,t,s,l,o,n,i,c,d,m,u,x,g,p,h,f,v,b,y,j,N,w,S){console.log=function(){},console.log("isLocal:",!1);let _=j||(0,r.getProxyBaseUrl)(),k={};o&&o.length>0&&(k["x-litellm-tags"]=o.join(","));let P=new a.ZP.OpenAI({apiKey:l,baseURL:_,dangerouslyAllowBrowser:!0,defaultHeaders:k});try{let a;let r=Date.now(),l=!1,o={},j=!1,_=[];for await(let y of(p&&p.length>0&&(p.includes("__all__")?_.push({type:"mcp",server_label:"litellm",server_url:"litellm_proxy/mcp",require_approval:"never"}):p.forEach(e=>{let t=null==N?void 0:N.find(t=>t.server_id===e),s=(null==t?void 0:t.alias)||(null==t?void 0:t.server_name)||e,a=(null==w?void 0:w[e])||[];_.push({type:"mcp",server_label:"litellm",server_url:"litellm_proxy/mcp/".concat(s),require_approval:"never",...a.length>0?{allowed_tools:a}:{}})})),await P.chat.completions.create({model:s,stream:!0,stream_options:{include_usage:!0},litellm_trace_id:m,messages:e,...u?{vector_store_ids:u}:{},...x?{guardrails:x}:{},...g?{policies:g}:{},..._.length>0?{tools:_,tool_choice:"auto"}:{},...void 0!==v?{temperature:v}:{},...void 0!==b?{max_tokens:b}:{}},{signal:n}))){var C,A,I,E,Z,T,L,R,O;console.log("Stream chunk:",y);let e=null===(C=y.choices[0])||void 0===C?void 0:C.delta;if(console.log("Delta content:",null===(I=y.choices[0])||void 0===I?void 0:null===(A=I.delta)||void 0===A?void 0:A.content),console.log("Delta reasoning content:",null==e?void 0:e.reasoning_content),!l&&((null===(Z=y.choices[0])||void 0===Z?void 0:null===(E=Z.delta)||void 0===E?void 0:E.content)||e&&e.reasoning_content)&&(l=!0,a=Date.now()-r,console.log("First token received! Time:",a,"ms"),c?(console.log("Calling onTimingData with:",a),c(a)):console.log("onTimingData callback is not defined!")),null===(L=y.choices[0])||void 0===L?void 0:null===(T=L.delta)||void 0===T?void 0:T.content){let e=y.choices[0].delta.content;t(e,y.model)}if(e&&e.image&&h&&(console.log("Image generated:",e.image),h(e.image.url,y.model)),e&&e.reasoning_content){let t=e.reasoning_content;i&&i(t)}if(e&&(null===(R=e.provider_specific_fields)||void 0===R?void 0:R.search_results)&&f&&(console.log("Search results found:",e.provider_specific_fields.search_results),f(e.provider_specific_fields.search_results)),e&&e.provider_specific_fields){let t=e.provider_specific_fields;if(t.mcp_list_tools&&!o.mcp_list_tools&&(o.mcp_list_tools=t.mcp_list_tools,S&&!j)){j=!0;let e={type:"response.output_item.done",item_id:"mcp_list_tools",item:{type:"mcp_list_tools",tools:t.mcp_list_tools.map(e=>{var t,s,a;return{name:(null===(t=e.function)||void 0===t?void 0:t.name)||e.name||"",description:(null===(s=e.function)||void 0===s?void 0:s.description)||e.description||"",input_schema:(null===(a=e.function)||void 0===a?void 0:a.parameters)||e.input_schema||{}}})},timestamp:Date.now()};S(e),console.log("MCP list_tools event sent:",e)}t.mcp_tool_calls&&(o.mcp_tool_calls=t.mcp_tool_calls),t.mcp_call_results&&(o.mcp_call_results=t.mcp_call_results),(t.mcp_list_tools||t.mcp_tool_calls||t.mcp_call_results)&&console.log("MCP metadata found in chunk:",{mcp_list_tools:t.mcp_list_tools?"present":"absent",mcp_tool_calls:t.mcp_tool_calls?"present":"absent",mcp_call_results:t.mcp_call_results?"present":"absent"})}if(y.usage&&d){console.log("Usage data found:",y.usage);let e={completionTokens:y.usage.completion_tokens,promptTokens:y.usage.prompt_tokens,totalTokens:y.usage.total_tokens};(null===(O=y.usage.completion_tokens_details)||void 0===O?void 0:O.reasoning_tokens)&&(e.reasoningTokens=y.usage.completion_tokens_details.reasoning_tokens),void 0!==y.usage.cost&&null!==y.usage.cost&&(e.cost=parseFloat(y.usage.cost)),d(e)}}S&&(o.mcp_tool_calls||o.mcp_call_results)&&o.mcp_tool_calls&&o.mcp_tool_calls.length>0&&o.mcp_tool_calls.forEach((e,t)=>{var s,a,r,l;let n=(null===(s=e.function)||void 0===s?void 0:s.name)||e.name||"",i=(null===(a=e.function)||void 0===a?void 0:a.arguments)||e.arguments||"{}",c=(null===(r=o.mcp_call_results)||void 0===r?void 0:r.find(t=>t.tool_call_id===e.id||t.tool_call_id===e.call_id))||(null===(l=o.mcp_call_results)||void 0===l?void 0:l[t]),d={type:"response.output_item.done",item:{type:"mcp_call",name:n,arguments:"string"==typeof i?i:JSON.stringify(i),output:(null==c?void 0:c.result)?"string"==typeof c.result?c.result:JSON.stringify(c.result):void 0},item_id:e.id||e.call_id,timestamp:Date.now()};S(d),console.log("MCP call event sent:",d)});let k=Date.now();y&&y(k-r)}catch(e){throw(null==n?void 0:n.aborted)&&console.log("Chat completion request was cancelled"),e}}},91643:function(e,t,s){s.d(t,{o:function(){return r}});var a=s(19250);let r=async(e,t)=>{try{let s=t||(0,a.getProxyBaseUrl)(),r=await fetch(s?"".concat(s,"/v1/agents"):"/v1/agents",{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!r.ok){let e=await r.json();throw Error(e.detail||"Failed to fetch agents")}let l=await r.json();return console.log("Fetched agents:",l),l.sort((e,t)=>{let s=e.agent_name||e.agent_id,a=t.agent_name||t.agent_id;return s.localeCompare(a)}),l}catch(e){throw console.error("Error fetching agents:",e),e}}},99020:function(e,t,s){var a=s(57437),r=s(2265),l=s(37592),o=s(19250);t.Z=e=>{let{onChange:t,value:s,className:n,accessToken:i}=e,[c,d]=(0,r.useState)([]),[m,u]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(i)try{let e=await (0,o.tagListCall)(i);console.log("List tags response:",e),d(Object.values(e))}catch(e){console.error("Error fetching tags:",e)}finally{u(!1)}})()},[i]),(0,a.jsx)(l.default,{mode:"tags",showSearch:!0,placeholder:"Select or create tags",onChange:t,value:s,loading:m,className:n,options:c.map(e=>({label:e.name,value:e.name,title:e.description||e.name})),optionFilterProp:"label",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"}})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6057-4eacff4874db3ebb.js b/litellm/proxy/_experimental/out/_next/static/chunks/6057-4eacff4874db3ebb.js
new file mode 100644
index 00000000000..a9d42a207a0
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/6057-4eacff4874db3ebb.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6057],{41649:function(e,t,r){r.d(t,{Z:function(){return g}});var o=r(5853),n=r(2265),a=r(47187),l=r(7084),c=r(26898),i=r(13241),d=r(1153);let s={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},u={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},b=(0,d.fn)("Badge"),g=n.forwardRef((e,t)=>{let{color:r,icon:g,size:p=l.u8.SM,tooltip:h,className:f,children:m}=e,k=(0,o._T)(e,["color","icon","size","tooltip","className","children"]),v=g||null,{tooltipProps:x,getReferenceProps:C}=(0,a.l)();return n.createElement("span",Object.assign({ref:(0,d.lq)([t,x.refs.setReference]),className:(0,i.q)(b("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",r?(0,i.q)((0,d.bM)(r,c.K.background).bgColor,(0,d.bM)(r,c.K.iconText).textColor,(0,d.bM)(r,c.K.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,i.q)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),s[p].paddingX,s[p].paddingY,s[p].fontSize,f)},C,k),n.createElement(a.Z,Object.assign({text:h},x)),v?n.createElement(v,{className:(0,i.q)(b("icon"),"shrink-0 -ml-1 mr-1.5",u[p].height,u[p].width)}):null,n.createElement("span",{className:(0,i.q)(b("text"),"whitespace-nowrap")},m))});g.displayName="Badge"},47323:function(e,t,r){r.d(t,{Z:function(){return h}});var o=r(5853),n=r(2265),a=r(47187),l=r(7084),c=r(13241),i=r(1153),d=r(26898);let s={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},u={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},b={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},g=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,i.bM)(t,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,i.bM)(t,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,c.q)((0,i.bM)(t,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,i.bM)(t,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,c.q)((0,i.bM)(t,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,i.bM)(t,d.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,c.q)((0,i.bM)(t,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,i.bM)(t,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,c.q)((0,i.bM)(t,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,i.bM)(t,d.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,c.q)((0,i.bM)(t,d.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},p=(0,i.fn)("Icon"),h=n.forwardRef((e,t)=>{let{icon:r,variant:d="simple",tooltip:h,size:f=l.u8.SM,color:m,className:k}=e,v=(0,o._T)(e,["icon","variant","tooltip","size","color","className"]),x=g(d,m),{tooltipProps:C,getReferenceProps:w}=(0,a.l)();return n.createElement("span",Object.assign({ref:(0,i.lq)([t,C.refs.setReference]),className:(0,c.q)(p("root"),"inline-flex shrink-0 items-center justify-center",x.bgColor,x.textColor,x.borderColor,x.ringColor,b[d].rounded,b[d].border,b[d].shadow,b[d].ring,s[f].paddingX,s[f].paddingY,k)},w,v),n.createElement(a.Z,Object.assign({text:h},C)),n.createElement(r,{className:(0,c.q)(p("icon"),"shrink-0",u[f].height,u[f].width)}))});h.displayName="Icon"},16853:function(e,t,r){r.d(t,{Z:function(){return s}});var o=r(5853),n=r(96398),a=r(44140),l=r(2265),c=r(13241),i=r(1153);let d=(0,i.fn)("Textarea"),s=l.forwardRef((e,t)=>{let{value:r,defaultValue:s="",placeholder:u="Type...",error:b=!1,errorMessage:g,disabled:p=!1,className:h,onChange:f,onValueChange:m,autoHeight:k=!1}=e,v=(0,o._T)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[x,C]=(0,a.Z)(s,r),w=(0,l.useRef)(null),y=(0,n.Uh)(x);return(0,l.useEffect)(()=>{let e=w.current;if(k&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[k,w,x]),l.createElement(l.Fragment,null,l.createElement("textarea",Object.assign({ref:(0,i.lq)([w,t]),value:x,placeholder:u,disabled:p,className:(0,c.q)(d("Textarea"),"w-full flex items-center outline-none rounded-tremor-default px-3 py-2 text-tremor-default focus:ring-2 transition duration-100 border","shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:shadow-dark-tremor-input focus:dark:border-dark-tremor-brand-subtle focus:dark:ring-dark-tremor-brand-muted",(0,n.um)(y,p,b),p?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",h),"data-testid":"text-area",onChange:e=>{null==f||f(e),C(e.target.value),null==m||m(e.target.value)}},v)),b&&g?l.createElement("p",{className:(0,c.q)(d("errorMessage"),"text-sm text-red-500 mt-1")},g):null)});s.displayName="Textarea"},44140:function(e,t,r){r.d(t,{Z:function(){return n}});var o=r(2265);let n=(e,t)=>{let r=void 0!==t,[n,a]=(0,o.useState)(e);return[r?t:n,e=>{r||a(e)}]}},66531:function(e,t,r){r.d(t,{Z:function(){return a}});var o=r(2265),n=r(53346);function a(e){let t=o.useRef(null),r=()=>{n.Z.cancel(t.current),t.current=null};return[()=>{r(),t.current=(0,n.Z)(()=>{t.current=null})},o=>{t.current&&(o.stopPropagation(),r()),null==e||e(o)}]}},23496:function(e,t,r){r.d(t,{Z:function(){return m}});var o=r(2265),n=r(36760),a=r.n(n),l=r(71744),c=r(33759),i=r(93463),d=r(12918),s=r(99320),u=r(71140);let b=e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{["&".concat(t)]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},g=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:o,lineWidth:n,textPaddingInline:a,orientationMargin:l,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},(0,d.Wf)(e)),{borderBlockStart:"".concat((0,i.bf)(n)," solid ").concat(o),"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:"".concat((0,i.bf)(n)," solid ").concat(o)},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:"".concat((0,i.bf)(e.marginLG)," 0")},["&-horizontal".concat(t,"-with-text")]:{display:"flex",alignItems:"center",margin:"".concat((0,i.bf)(e.dividerHorizontalWithTextGutterMargin)," 0"),color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:"0 ".concat(o),"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:"".concat((0,i.bf)(n)," solid transparent"),borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},["&-horizontal".concat(t,"-with-text-start")]:{"&::before":{width:"calc(".concat(l," * 100%)")},"&::after":{width:"calc(100% - ".concat(l," * 100%)")}},["&-horizontal".concat(t,"-with-text-end")]:{"&::before":{width:"calc(100% - ".concat(l," * 100%)")},"&::after":{width:"calc(".concat(l," * 100%)")}},["".concat(t,"-inner-text")]:{display:"inline-block",paddingBlock:0,paddingInline:a},"&-dashed":{background:"none",borderColor:o,borderStyle:"dashed",borderWidth:"".concat((0,i.bf)(n)," 0 0")},["&-horizontal".concat(t,"-with-text").concat(t,"-dashed")]:{"&::before, &::after":{borderStyle:"dashed none none"}},["&-vertical".concat(t,"-dashed")]:{borderInlineStartWidth:n,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:o,borderStyle:"dotted",borderWidth:"".concat((0,i.bf)(n)," 0 0")},["&-horizontal".concat(t,"-with-text").concat(t,"-dotted")]:{"&::before, &::after":{borderStyle:"dotted none none"}},["&-vertical".concat(t,"-dotted")]:{borderInlineStartWidth:n,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},["&-plain".concat(t,"-with-text")]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},["&-horizontal".concat(t,"-with-text-start").concat(t,"-no-default-orientation-margin-start")]:{"&::before":{width:0},"&::after":{width:"100%"},["".concat(t,"-inner-text")]:{paddingInlineStart:r}},["&-horizontal".concat(t,"-with-text-end").concat(t,"-no-default-orientation-margin-end")]:{"&::before":{width:"100%"},"&::after":{width:0},["".concat(t,"-inner-text")]:{paddingInlineEnd:r}}})}};var p=(0,s.I$)("Divider",e=>{let t=(0,u.IX)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[g(t),b(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),h=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let f={small:"sm",middle:"md"};var m=e=>{let{getPrefixCls:t,direction:r,className:n,style:i}=(0,l.dj)("divider"),{prefixCls:d,type:s="horizontal",orientation:u="center",orientationMargin:b,className:g,rootClassName:m,children:k,dashed:v,variant:x="solid",plain:C,style:w,size:y}=e,S=h(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),O=t("divider",d),[E,j,B]=p(O),z=f[(0,c.Z)(y)],I=!!k,M=o.useMemo(()=>"left"===u?"rtl"===r?"end":"start":"right"===u?"rtl"===r?"start":"end":u,[r,u]),N="start"===M&&null!=b,Z="end"===M&&null!=b,R=a()(O,n,j,B,"".concat(O,"-").concat(s),{["".concat(O,"-with-text")]:I,["".concat(O,"-with-text-").concat(M)]:I,["".concat(O,"-dashed")]:!!v,["".concat(O,"-").concat(x)]:"solid"!==x,["".concat(O,"-plain")]:!!C,["".concat(O,"-rtl")]:"rtl"===r,["".concat(O,"-no-default-orientation-margin-start")]:N,["".concat(O,"-no-default-orientation-margin-end")]:Z,["".concat(O,"-").concat(z)]:!!z},g,m),P=o.useMemo(()=>"number"==typeof b?b:/^\d+$/.test(b)?Number(b):b,[b]);return E(o.createElement("div",Object.assign({className:R,style:Object.assign(Object.assign({},i),w)},S,{role:"separator"}),k&&"vertical"!==s&&o.createElement("span",{className:"".concat(O,"-inner-text"),style:{marginInlineStart:N?P:void 0,marginInlineEnd:Z?P:void 0}},k)))}},29967:function(e,t,r){r.d(t,{ZP:function(){return L}});var o=r(2265),n=r(36760),a=r.n(n),l=r(92491),c=r(50506),i=r(18242),d=r(71744),s=r(64024),u=r(33759);let b=o.createContext(null),g=b.Provider,p=o.createContext(null),h=p.Provider;var f=r(20873),m=r(28791),k=r(6694),v=r(34709),x=r(66531),C=r(86586),w=r(39109),y=r(93463),S=r(12918),O=r(99320),E=r(71140);let j=e=>{let{componentCls:t,antCls:r}=e,o="".concat(t,"-group");return{[o]:Object.assign(Object.assign({},(0,S.Wf)(e)),{display:"inline-block",fontSize:0,["&".concat(o,"-rtl")]:{direction:"rtl"},["&".concat(o,"-block")]:{display:"flex"},["".concat(r,"-badge ").concat(r,"-badge-count")]:{zIndex:1},["> ".concat(r,"-badge:not(:first-child) > ").concat(r,"-button-wrapper")]:{borderInlineStart:"none"}})}},B=e=>{let{componentCls:t,wrapperMarginInlineEnd:r,colorPrimary:o,radioSize:n,motionDurationSlow:a,motionDurationMid:l,motionEaseInOutCirc:c,colorBgContainer:i,colorBorder:d,lineWidth:s,colorBgContainerDisabled:u,colorTextDisabled:b,paddingXS:g,dotColorDisabled:p,lineType:h,radioColor:f,radioBgColor:m,calc:k}=e,v="".concat(t,"-inner"),x=k(n).sub(k(4).mul(2)),C=k(1).mul(n).equal({unit:!0});return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({},(0,S.Wf)(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:r,cursor:"pointer","&:last-child":{marginInlineEnd:0},["&".concat(t,"-wrapper-rtl")]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},["".concat(t,"-checked::after")]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:"".concat((0,y.bf)(s)," ").concat(h," ").concat(o),borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},(0,S.Wf)(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),["".concat(t,"-wrapper:hover &,\n &:hover ").concat(v)]:{borderColor:o},["".concat(t,"-input:focus-visible + ").concat(v)]:(0,S.oN)(e),["".concat(t,":hover::after, ").concat(t,"-wrapper:hover &::after")]:{visibility:"visible"},["".concat(t,"-inner")]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:C,height:C,marginBlockStart:k(1).mul(n).div(-2).equal({unit:!0}),marginInlineStart:k(1).mul(n).div(-2).equal({unit:!0}),backgroundColor:f,borderBlockStart:0,borderInlineStart:0,borderRadius:C,transform:"scale(0)",opacity:0,transition:"all ".concat(a," ").concat(c),content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:C,height:C,backgroundColor:i,borderColor:d,borderStyle:"solid",borderWidth:s,borderRadius:"50%",transition:"all ".concat(l)},["".concat(t,"-input")]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},["".concat(t,"-checked")]:{[v]:{borderColor:o,backgroundColor:m,"&::after":{transform:"scale(".concat(e.calc(e.dotSize).div(n).equal(),")"),opacity:1,transition:"all ".concat(a," ").concat(c)}}},["".concat(t,"-disabled")]:{cursor:"not-allowed",[v]:{backgroundColor:u,borderColor:d,cursor:"not-allowed","&::after":{backgroundColor:p}},["".concat(t,"-input")]:{cursor:"not-allowed"},["".concat(t,"-disabled + span")]:{color:b,cursor:"not-allowed"},["&".concat(t,"-checked")]:{[v]:{"&::after":{transform:"scale(".concat(k(x).div(n).equal(),")")}}}},["span".concat(t," + *")]:{paddingInlineStart:g,paddingInlineEnd:g}})}},z=e=>{let{buttonColor:t,controlHeight:r,componentCls:o,lineWidth:n,lineType:a,colorBorder:l,motionDurationMid:c,buttonPaddingInline:i,fontSize:d,buttonBg:s,fontSizeLG:u,controlHeightLG:b,controlHeightSM:g,paddingXS:p,borderRadius:h,borderRadiusSM:f,borderRadiusLG:m,buttonCheckedBg:k,buttonSolidCheckedColor:v,colorTextDisabled:x,colorBgContainerDisabled:C,buttonCheckedBgDisabled:w,buttonCheckedColorDisabled:O,colorPrimary:E,colorPrimaryHover:j,colorPrimaryActive:B,buttonSolidCheckedBg:z,buttonSolidCheckedHoverBg:I,buttonSolidCheckedActiveBg:M,calc:N}=e;return{["".concat(o,"-button-wrapper")]:{position:"relative",display:"inline-block",height:r,margin:0,paddingInline:i,paddingBlock:0,color:t,fontSize:d,lineHeight:(0,y.bf)(N(r).sub(N(n).mul(2)).equal()),background:s,border:"".concat((0,y.bf)(n)," ").concat(a," ").concat(l),borderBlockStartWidth:N(n).add(.02).equal(),borderInlineEndWidth:n,cursor:"pointer",transition:["color ".concat(c),"background ".concat(c),"box-shadow ".concat(c)].join(","),a:{color:t},["> ".concat(o,"-button")]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:last-child)":{marginInlineEnd:N(n).mul(-1).equal()},"&:first-child":{borderInlineStart:"".concat((0,y.bf)(n)," ").concat(a," ").concat(l),borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},["".concat(o,"-group-large &")]:{height:b,fontSize:u,lineHeight:(0,y.bf)(N(b).sub(N(n).mul(2)).equal()),"&:first-child":{borderStartStartRadius:m,borderEndStartRadius:m},"&:last-child":{borderStartEndRadius:m,borderEndEndRadius:m}},["".concat(o,"-group-small &")]:{height:g,paddingInline:N(p).sub(n).equal(),paddingBlock:0,lineHeight:(0,y.bf)(N(g).sub(N(n).mul(2)).equal()),"&:first-child":{borderStartStartRadius:f,borderEndStartRadius:f},"&:last-child":{borderStartEndRadius:f,borderEndEndRadius:f}},"&:hover":{position:"relative",color:E},"&:has(:focus-visible)":(0,S.oN)(e),["".concat(o,"-inner, input[type='checkbox'], input[type='radio']")]:{width:0,height:0,opacity:0,pointerEvents:"none"},["&-checked:not(".concat(o,"-button-wrapper-disabled)")]:{zIndex:1,color:E,background:k,borderColor:E,"&::before":{backgroundColor:E},"&:first-child":{borderColor:E},"&:hover":{color:j,borderColor:j,"&::before":{backgroundColor:j}},"&:active":{color:B,borderColor:B,"&::before":{backgroundColor:B}}},["".concat(o,"-group-solid &-checked:not(").concat(o,"-button-wrapper-disabled)")]:{color:v,background:z,borderColor:z,"&:hover":{color:v,background:I,borderColor:I},"&:active":{color:v,background:M,borderColor:M}},"&-disabled":{color:x,backgroundColor:C,borderColor:l,cursor:"not-allowed","&:first-child, &:hover":{color:x,backgroundColor:C,borderColor:l}},["&-disabled".concat(o,"-button-wrapper-checked")]:{color:O,backgroundColor:w,borderColor:l,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}};var I=(0,O.I$)("Radio",e=>{let{controlOutline:t,controlOutlineWidth:r}=e,o="0 0 0 ".concat((0,y.bf)(r)," ").concat(t),n=(0,E.IX)(e,{radioFocusShadow:o,radioButtonFocusShadow:o});return[j(n),B(n),z(n)]},e=>{let{wireframe:t,padding:r,marginXS:o,lineWidth:n,fontSizeLG:a,colorText:l,colorBgContainer:c,colorTextDisabled:i,controlItemBgActiveDisabled:d,colorTextLightSolid:s,colorPrimary:u,colorPrimaryHover:b,colorPrimaryActive:g,colorWhite:p}=e;return{radioSize:a,dotSize:t?a-8:a-(4+n)*2,dotColorDisabled:i,buttonSolidCheckedColor:s,buttonSolidCheckedBg:u,buttonSolidCheckedHoverBg:b,buttonSolidCheckedActiveBg:g,buttonBg:c,buttonCheckedBg:c,buttonColor:l,buttonCheckedBgDisabled:d,buttonCheckedColorDisabled:i,buttonPaddingInline:r-n,wrapperMarginInlineEnd:o,radioColor:t?u:p,radioBgColor:t?c:u}},{unitless:{radioSize:!0,dotSize:!0}}),M=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let N=o.forwardRef((e,t)=>{var r,n;let l=o.useContext(b),c=o.useContext(p),{getPrefixCls:i,direction:u,radio:g}=o.useContext(d.E_),h=o.useRef(null),y=(0,m.sQ)(t,h),{isFormItemInput:S}=o.useContext(w.aM),{prefixCls:O,className:E,rootClassName:j,children:B,style:z,title:N}=e,Z=M(e,["prefixCls","className","rootClassName","children","style","title"]),R=i("radio",O),P="button"===((null==l?void 0:l.optionType)||c),T=P?"".concat(R,"-button"):R,q=(0,s.Z)(R),[L,H,W]=I(R,q),X=Object.assign({},Z),_=o.useContext(C.Z);l&&(X.name=l.name,X.onChange=t=>{var r,o;null===(r=e.onChange)||void 0===r||r.call(e,t),null===(o=null==l?void 0:l.onChange)||void 0===o||o.call(l,t)},X.checked=e.value===l.value,X.disabled=null!==(r=X.disabled)&&void 0!==r?r:l.disabled),X.disabled=null!==(n=X.disabled)&&void 0!==n?n:_;let A=a()("".concat(T,"-wrapper"),{["".concat(T,"-wrapper-checked")]:X.checked,["".concat(T,"-wrapper-disabled")]:X.disabled,["".concat(T,"-wrapper-rtl")]:"rtl"===u,["".concat(T,"-wrapper-in-form-item")]:S,["".concat(T,"-wrapper-block")]:!!(null==l?void 0:l.block)},null==g?void 0:g.className,E,j,H,W,q),[K,Y]=(0,x.Z)(X.onClick);return L(o.createElement(k.Z,{component:"Radio",disabled:X.disabled},o.createElement("label",{className:A,style:Object.assign(Object.assign({},null==g?void 0:g.style),z),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:N,onClick:K},o.createElement(f.Z,Object.assign({},X,{className:a()(X.className,{[v.A]:!P}),type:"radio",prefixCls:T,ref:y,onClick:Y})),void 0!==B?o.createElement("span",{className:"".concat(T,"-label")},B):null)))});var Z=r(29487);let R=o.forwardRef((e,t)=>{let{getPrefixCls:r,direction:n}=o.useContext(d.E_),{name:b}=o.useContext(w.aM),p=(0,l.Z)((0,Z.S)(b)),{prefixCls:h,className:f,rootClassName:m,options:k,buttonStyle:v="outline",disabled:x,children:C,size:y,style:S,id:O,optionType:E,name:j=p,defaultValue:B,value:z,block:M=!1,onChange:R,onMouseEnter:P,onMouseLeave:T,onFocus:q,onBlur:L}=e,[H,W]=(0,c.Z)(B,{value:z}),X=o.useCallback(t=>{let r=t.target.value;"value"in e||W(r),r!==H&&(null==R||R(t))},[H,W,R]),_=r("radio",h),A="".concat(_,"-group"),K=(0,s.Z)(_),[Y,D,F]=I(_,K),G=C;k&&k.length>0&&(G=k.map(e=>"string"==typeof e||"number"==typeof e?o.createElement(N,{key:e.toString(),prefixCls:_,disabled:x,value:e,checked:H===e},e):o.createElement(N,{key:"radio-group-value-options-".concat(e.value),prefixCls:_,disabled:e.disabled||x,value:e.value,checked:H===e.value,title:e.title,style:e.style,className:e.className,id:e.id,required:e.required},e.label)));let V=(0,u.Z)(y),Q=a()(A,"".concat(A,"-").concat(v),{["".concat(A,"-").concat(V)]:V,["".concat(A,"-rtl")]:"rtl"===n,["".concat(A,"-block")]:M},f,m,D,F,K),$=o.useMemo(()=>({onChange:X,value:H,disabled:x,name:j,optionType:E,block:M}),[X,H,x,j,E,M]);return Y(o.createElement("div",Object.assign({},(0,i.Z)(e,{aria:!0,data:!0}),{className:Q,style:S,onMouseEnter:P,onMouseLeave:T,onFocus:q,onBlur:L,id:O,ref:t}),o.createElement(g,{value:$},G)))});var P=o.memo(R),T=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r},q=o.forwardRef((e,t)=>{let{getPrefixCls:r}=o.useContext(d.E_),{prefixCls:n}=e,a=T(e,["prefixCls"]),l=r("radio",n);return o.createElement(h,{value:"button"},o.createElement(N,Object.assign({prefixCls:l},a,{type:"radio",ref:t})))});N.Button=q,N.Group=P,N.__ANT_RADIO=!0;var L=N},3810:function(e,t,r){r.d(t,{Z:function(){return I}});var o=r(2265),n=r(36760),a=r.n(n),l=r(18694),c=r(93350),i=r(53445),d=r(19722),s=r(6694),u=r(71744),b=r(93463),g=r(54558),p=r(12918),h=r(71140),f=r(99320);let m=e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:o,componentCls:n,calc:a}=e,l=a(o).sub(r).equal(),c=a(t).sub(r).equal();return{[n]:Object.assign(Object.assign({},(0,p.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:"".concat((0,b.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusSM,opacity:1,transition:"all ".concat(e.motionDurationMid),textAlign:"start",position:"relative",["&".concat(n,"-rtl")]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},["".concat(n,"-close-icon")]:{marginInlineStart:c,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),"&:hover":{color:e.colorTextHeading}},["&".concat(n,"-has-color")]:{borderColor:"transparent",["&, a, a:hover, ".concat(e.iconCls,"-close, ").concat(e.iconCls,"-close:hover")]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",["&:not(".concat(n,"-checkable-checked):hover")]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},["> ".concat(e.iconCls," + span, > span + ").concat(e.iconCls)]:{marginInlineStart:l}}),["".concat(n,"-borderless")]:{borderColor:"transparent",background:e.tagBorderlessBg}}},k=e=>{let{lineWidth:t,fontSizeIcon:r,calc:o}=e,n=e.fontSizeSM;return(0,h.IX)(e,{tagFontSize:n,tagLineHeight:(0,b.bf)(o(e.lineHeightSM).mul(n).equal()),tagIconSize:o(r).sub(o(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},v=e=>({defaultBg:new g.t(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var x=(0,f.I$)("Tag",e=>m(k(e)),v),C=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let w=o.forwardRef((e,t)=>{let{prefixCls:r,style:n,className:l,checked:c,children:i,icon:d,onChange:s,onClick:b}=e,g=C(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:p,tag:h}=o.useContext(u.E_),f=p("tag",r),[m,k,v]=x(f),w=a()(f,"".concat(f,"-checkable"),{["".concat(f,"-checkable-checked")]:c},null==h?void 0:h.className,l,k,v);return m(o.createElement("span",Object.assign({},g,{ref:t,style:Object.assign(Object.assign({},n),null==h?void 0:h.style),className:w,onClick:e=>{null==s||s(!c),null==b||b(e)}}),d,o.createElement("span",null,i)))});var y=r(18536);let S=e=>(0,y.Z)(e,(t,r)=>{let{textColor:o,lightBorderColor:n,lightColor:a,darkColor:l}=r;return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:o,background:a,borderColor:n,"&-inverse":{color:e.colorTextLightSolid,background:l,borderColor:l},["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}});var O=(0,f.bk)(["Tag","preset"],e=>S(k(e)),v);let E=(e,t,r)=>{let o="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:e["color".concat(r)],background:e["color".concat(o,"Bg")],borderColor:e["color".concat(o,"Border")],["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}};var j=(0,f.bk)(["Tag","status"],e=>{let t=k(e);return[E(t,"success","Success"),E(t,"processing","Info"),E(t,"error","Error"),E(t,"warning","Warning")]},v),B=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let z=o.forwardRef((e,t)=>{let{prefixCls:r,className:n,rootClassName:b,style:g,children:p,icon:h,color:f,onClose:m,bordered:k=!0,visible:v}=e,C=B(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:w,direction:y,tag:S}=o.useContext(u.E_),[E,z]=o.useState(!0),I=(0,l.Z)(C,["closeIcon","closable"]);o.useEffect(()=>{void 0!==v&&z(v)},[v]);let M=(0,c.o2)(f),N=(0,c.yT)(f),Z=M||N,R=Object.assign(Object.assign({backgroundColor:f&&!Z?f:void 0},null==S?void 0:S.style),g),P=w("tag",r),[T,q,L]=x(P),H=a()(P,null==S?void 0:S.className,{["".concat(P,"-").concat(f)]:Z,["".concat(P,"-has-color")]:f&&!Z,["".concat(P,"-hidden")]:!E,["".concat(P,"-rtl")]:"rtl"===y,["".concat(P,"-borderless")]:!k},n,b,q,L),W=e=>{e.stopPropagation(),null==m||m(e),e.defaultPrevented||z(!1)},[,X]=(0,i.b)((0,i.w)(e),(0,i.w)(S),{closable:!1,closeIconRender:e=>{let t=o.createElement("span",{className:"".concat(P,"-close-icon"),onClick:W},e);return(0,d.wm)(e,t,e=>({onClick:t=>{var r;null===(r=null==e?void 0:e.onClick)||void 0===r||r.call(e,t),W(t)},className:a()(null==e?void 0:e.className,"".concat(P,"-close-icon"))}))}}),_="function"==typeof C.onClick||p&&"a"===p.type,A=h||null,K=A?o.createElement(o.Fragment,null,A,p&&o.createElement("span",null,p)):p,Y=o.createElement("span",Object.assign({},I,{ref:t,className:H,style:R}),K,X,M&&o.createElement(O,{key:"preset",prefixCls:P}),N&&o.createElement(j,{key:"status",prefixCls:P}));return T(_?o.createElement(s.Z,{component:"Tag"},Y):Y)});z.CheckableTag=w;var I=z},2651:function(e,t,r){r.d(t,{Z:function(){return v}});var o=r(93463),n=r(11938),a=r(70774),l=r(73602),c=r(91691),i=r(25119),d=r(37628),s=r(32417),u=r(4877),b=r(57943),g=r(12789),p=r(54558);let h=(e,t)=>new p.t(e).setA(t).toRgbString(),f=(e,t)=>new p.t(e).lighten(t).toHexString(),m=e=>{let t=(0,b.R_)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},k=(e,t)=>{let r=e||"#000",o=t||"#fff";return{colorBgBase:r,colorTextBase:o,colorText:h(o,.85),colorTextSecondary:h(o,.65),colorTextTertiary:h(o,.45),colorTextQuaternary:h(o,.25),colorFill:h(o,.18),colorFillSecondary:h(o,.12),colorFillTertiary:h(o,.08),colorFillQuaternary:h(o,.04),colorBgSolid:h(o,.95),colorBgSolidHover:h(o,1),colorBgSolidActive:h(o,.9),colorBgElevated:f(r,12),colorBgContainer:f(r,8),colorBgLayout:f(r,0),colorBgSpotlight:f(r,26),colorBgBlur:h(o,.04),colorBorder:f(r,26),colorBorderSecondary:f(r,19)}};var v={defaultSeed:i.u_.token,useToken:function(){let[e,t,r]=(0,c.ZP)();return{theme:e,token:t,hashId:r}},defaultAlgorithm:d.Z,darkAlgorithm:(e,t)=>{let r=Object.keys(a.M).map(t=>{let r=(0,b.R_)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,o,n)=>(e["".concat(t,"-").concat(n+1)]=r[n],e["".concat(t).concat(n+1)]=r[n],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),o=null!=t?t:(0,d.Z)(e),n=(0,g.Z)(e,{generateColorPalettes:m,generateNeutralColorPalettes:k});return Object.assign(Object.assign(Object.assign(Object.assign({},o),r),n),{colorPrimaryBg:n.colorPrimaryBorder,colorPrimaryBgHover:n.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let r=null!=t?t:(0,d.Z)(e),o=r.fontSizeSM,n=r.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),function(e){let{sizeUnit:t,sizeStep:r}=e,o=r-2;return{sizeXXL:t*(o+10),sizeXL:t*(o+6),sizeLG:t*(o+2),sizeMD:t*(o+2),sizeMS:t*(o+1),size:t*o,sizeSM:t*o,sizeXS:t*(o-1),sizeXXS:t*(o-1)}}(null!=t?t:e)),(0,u.Z)(o)),{controlHeight:n}),(0,s.Z)(Object.assign(Object.assign({},r),{controlHeight:n})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,o.jG)(e.algorithm):n.Z,r=Object.assign(Object.assign({},a.Z),null==e?void 0:e.token);return(0,o.t2)(r,{override:null==e?void 0:e.token},t,l.Z)},defaultConfig:i.u_,_internalContext:i.Mj}},20873:function(e,t,r){var o=r(1119),n=r(31686),a=r(11993),l=r(26365),c=r(6989),i=r(36760),d=r.n(i),s=r(50506),u=r(2265),b=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],g=(0,u.forwardRef)(function(e,t){var r=e.prefixCls,i=void 0===r?"rc-checkbox":r,g=e.className,p=e.style,h=e.checked,f=e.disabled,m=e.defaultChecked,k=e.type,v=void 0===k?"checkbox":k,x=e.title,C=e.onChange,w=(0,c.Z)(e,b),y=(0,u.useRef)(null),S=(0,u.useRef)(null),O=(0,s.Z)(void 0!==m&&m,{value:h}),E=(0,l.Z)(O,2),j=E[0],B=E[1];(0,u.useImperativeHandle)(t,function(){return{focus:function(e){var t;null===(t=y.current)||void 0===t||t.focus(e)},blur:function(){var e;null===(e=y.current)||void 0===e||e.blur()},input:y.current,nativeElement:S.current}});var z=d()(i,g,(0,a.Z)((0,a.Z)({},"".concat(i,"-checked"),j),"".concat(i,"-disabled"),f));return u.createElement("span",{className:z,title:x,style:p,ref:S},u.createElement("input",(0,o.Z)({},w,{className:"".concat(i,"-input"),ref:y,onChange:function(t){f||("checked"in e||B(t.target.checked),null==C||C({target:(0,n.Z)((0,n.Z)({},e),{},{type:v,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:f,checked:!!j,type:v})),u.createElement("span",{className:"".concat(i,"-inner")}))});t.Z=g},10900:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});t.Z=n},86462:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});t.Z=n},44633:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});t.Z=n},93416:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});t.Z=n},49084:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});t.Z=n},74998:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});t.Z=n}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6213-20bb5f06094f361d.js b/litellm/proxy/_experimental/out/_next/static/chunks/6213-20bb5f06094f361d.js
deleted file mode 100644
index 79f8751f3f5..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/6213-20bb5f06094f361d.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6213],{36213:function(e,t,r){r.d(t,{Z:function(){return eS}});var s,l,a=r(57437),o=r(2265),n=r(78489),i=r(49804),c=r(67101),d=r(47323),m=r(12485),x=r(18135),u=r(35242),h=r(29706),p=r(77991),v=r(84264),g=r(23628),j=r(19250),f=r(44633),y=r(86462),_=r(49084),b=r(71594),N=r(24525),w=r(19130),S=r(99981),Z=r(39957),C=r(42673),k=e=>{let{data:t,onView:r,onEdit:s,onDelete:l}=e,[n,i]=o.useState([{id:"created_at",desc:!0}]),c=[{header:"Vector Store ID",accessorKey:"vector_store_id",cell:e=>{let{row:t}=e,s=t.original;return(0,a.jsx)("button",{onClick:()=>r(s.vector_store_id),className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",children:s.vector_store_id.length>15?"".concat(s.vector_store_id.slice(0,15),"..."):s.vector_store_id})}},{header:"Name",accessorKey:"vector_store_name",cell:e=>{let{row:t}=e,r=t.original;return(0,a.jsx)(S.Z,{title:r.vector_store_name,children:(0,a.jsx)("span",{className:"text-xs",children:r.vector_store_name||"-"})})}},{header:"Description",accessorKey:"vector_store_description",cell:e=>{let{row:t}=e,r=t.original;return(0,a.jsx)(S.Z,{title:r.vector_store_description,children:(0,a.jsx)("span",{className:"text-xs",children:r.vector_store_description||"-"})})}},{header:"Files",accessorKey:"vector_store_metadata",cell:e=>{var t;let{row:r}=e,s=(null===(t=r.original.vector_store_metadata)||void 0===t?void 0:t.ingested_files)||[];if(0===s.length)return(0,a.jsx)("span",{className:"text-xs text-gray-400",children:"-"});let l=s.map(e=>e.filename||e.file_url||"Unknown").join(", "),o=1===s.length?s[0].filename||s[0].file_url||"1 file":"".concat(s.length," files");return(0,a.jsx)(S.Z,{title:l,children:(0,a.jsx)("span",{className:"text-xs text-blue-600",children:o})})}},{header:"Provider",accessorKey:"custom_llm_provider",cell:e=>{let{row:t}=e,r=t.original,{displayName:s,logo:l}=(0,C.dr)(r.custom_llm_provider);return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[l&&(0,a.jsx)("img",{src:l,alt:s,className:"h-4 w-4"}),(0,a.jsx)("span",{className:"text-xs",children:s})]})}},{header:"Created At",accessorKey:"created_at",sortingFn:"datetime",cell:e=>{let{row:t}=e,r=t.original;return(0,a.jsx)("span",{className:"text-xs",children:new Date(r.created_at).toLocaleDateString()})}},{header:"Updated At",accessorKey:"updated_at",sortingFn:"datetime",cell:e=>{let{row:t}=e,r=t.original;return(0,a.jsx)("span",{className:"text-xs",children:new Date(r.updated_at).toLocaleDateString()})}},{id:"actions",header:"",cell:e=>{let{row:t}=e,r=t.original;return(0,a.jsxs)("div",{className:"flex space-x-2",children:[(0,a.jsx)(Z.Z,{variant:"Edit",tooltipText:"Edit vector store",onClick:()=>s(r.vector_store_id)}),(0,a.jsx)(Z.Z,{variant:"Delete",tooltipText:"Delete vector store",onClick:()=>l(r.vector_store_id)})]})}}],d=(0,b.b7)({data:t,columns:c,state:{sorting:n},onSortingChange:i,getCoreRowModel:(0,N.sC)(),getSortedRowModel:(0,N.tj)(),enableSorting:!0});return(0,a.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)(w.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,a.jsx)(w.ss,{children:d.getHeaderGroups().map(e=>(0,a.jsx)(w.SC,{children:e.headers.map(e=>(0,a.jsx)(w.xs,{className:"py-1 h-8 ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""),onClick:e.column.getToggleSortingHandler(),children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,b.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,a.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,a.jsx)(f.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,a.jsx)(y.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,a.jsx)(_.Z,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,a.jsx)(w.RM,{children:d.getRowModel().rows.length>0?d.getRowModel().rows.map(e=>(0,a.jsx)(w.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,a.jsx)(w.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""),children:(0,b.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,a.jsx)(w.SC,{children:(0,a.jsx)(w.pj,{colSpan:c.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:"No vector stores found"})})})})})]})})})},I=r(64504),A=r(10032),E=r(22116),L=r(37592),V=r(51653),D=r(4260),P=r(15424);(s=l||(l={})).Bedrock="Amazon Bedrock",s.S3Vectors="Amazon S3 Vectors",s.PgVector="PostgreSQL pgvector (LiteLLM Connector)",s.VertexRagEngine="Vertex AI RAG Engine",s.OpenAI="OpenAI",s.Azure="Azure OpenAI",s.Milvus="Milvus";let z={Bedrock:"bedrock",PgVector:"pg_vector",VertexRagEngine:"vertex_ai",OpenAI:"openai",Azure:"azure",Milvus:"milvus",S3Vectors:"s3_vectors"},O="../ui/assets/logos/",T={"Amazon Bedrock":"".concat(O,"bedrock.svg"),"PostgreSQL pgvector (LiteLLM Connector)":"".concat(O,"postgresql.svg"),"Vertex AI RAG Engine":"".concat(O,"google.svg"),OpenAI:"".concat(O,"openai_small.svg"),"Azure OpenAI":"".concat(O,"microsoft_azure.svg"),Milvus:"".concat(O,"milvus.svg"),"Amazon S3 Vectors":"".concat(O,"s3_vector.png")},q={bedrock:[],pg_vector:[{name:"api_base",label:"API Base",tooltip:"Enter the base URL of your deployed litellm-pgvector server (e.g., http://your-server:8000)",placeholder:"http://your-deployed-server:8000",required:!0,type:"text"},{name:"api_key",label:"API Key",tooltip:"Enter the API key from your deployed litellm-pgvector server",placeholder:"your-deployed-api-key",required:!0,type:"password"}],vertex_rag_engine:[],openai:[{name:"api_key",label:"API Key",tooltip:"Enter your OpenAI API key",placeholder:"sk-...",required:!0,type:"password"}],azure:[{name:"api_key",label:"API Key",tooltip:"Enter your Azure OpenAI API key",placeholder:"your-azure-api-key",required:!0,type:"password"},{name:"api_base",label:"API Base",tooltip:"Enter your Azure OpenAI endpoint (e.g., https://your-resource.openai.azure.com/)",placeholder:"https://your-resource.openai.azure.com/",required:!0,type:"text"}],milvus:[{name:"api_key",label:"API Key",tooltip:"To obtain a token, you should use a colon (:) to concatenate the username and password that you use to access your Milvus instance (e.g., username:password)",placeholder:"username:password or api key",required:!0,type:"password"},{name:"api_base",label:"API Base",tooltip:"Enter your Milvus endpoint (e.g., https://your-milvus-endpoint.com/)",placeholder:"https://your-milvus-endpoint.com/",required:!0,type:"text"},{name:"embedding_model",label:"Embedding Model",tooltip:"Select the embedding model to use",placeholder:"text-embedding-3-small",required:!0,type:"select"}],s3_vectors:[{name:"vector_bucket_name",label:"Vector Bucket Name",tooltip:"S3 bucket name for vector storage (will be auto-created if it doesn't exist)",placeholder:"my-vector-bucket",required:!0,type:"text"},{name:"index_name",label:"Index Name",tooltip:"Name for the vector index (optional, will be auto-generated if not provided)",placeholder:"my-vector-index",required:!1,type:"text"},{name:"aws_region_name",label:"AWS Region",tooltip:"AWS region where the S3 bucket is located (e.g., us-west-2)",placeholder:"us-west-2",required:!0,type:"text"},{name:"embedding_model",label:"Embedding Model",tooltip:"Select the embedding model to use for vector generation",placeholder:"text-embedding-3-small",required:!0,type:"select"}]},B=e=>q[e]||[];var M=r(10703),R=r(9114),F=e=>{let{isVisible:t,onCancel:r,onSuccess:s,accessToken:n,credentials:i}=e,[c]=A.Z.useForm(),[d,m]=(0,o.useState)("{}"),[x,u]=(0,o.useState)("bedrock"),[h,p]=(0,o.useState)([]);(0,o.useEffect)(()=>{n&&(async()=>{try{let e=await (0,M.p)(n);e.length>0&&p(e)}catch(e){console.error("Error fetching model info:",e)}})()},[n]);let v=async e=>{if(n)try{let t={};try{t=d.trim()?JSON.parse(d):{}}catch(e){R.Z.fromBackend("Invalid JSON in metadata field");return}let r={vector_store_id:e.vector_store_id,custom_llm_provider:e.custom_llm_provider,vector_store_name:e.vector_store_name,vector_store_description:e.vector_store_description,vector_store_metadata:t,litellm_credential_name:e.litellm_credential_name},l=B(e.custom_llm_provider).reduce((t,r)=>(t[r.name]=e[r.name],t),{});r.litellm_params=l,await (0,j.vectorStoreCreateCall)(n,r),R.Z.success("Vector store created successfully"),c.resetFields(),m("{}"),s()}catch(e){console.error("Error creating vector store:",e),R.Z.fromBackend("Error creating vector store: "+e)}},g=()=>{c.resetFields(),m("{}"),u("bedrock"),r()};return(0,a.jsx)(E.Z,{title:"Add New Vector Store",visible:t,width:1e3,footer:null,onCancel:g,children:(0,a.jsxs)(A.Z,{form:c,onFinish:v,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Provider"," ",(0,a.jsx)(S.Z,{title:"Select the provider for this vector store",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),name:"custom_llm_provider",rules:[{required:!0,message:"Please select a provider"}],initialValue:"bedrock",children:(0,a.jsx)(L.default,{onChange:e=>u(e),children:Object.entries(l).map(e=>{let[t,r]=e;return(0,a.jsx)(L.default.Option,{value:z[t],children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("img",{src:T[r],alt:"".concat(t," logo"),className:"w-5 h-5",onError:e=>{let t=e.target,s=t.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=r.charAt(0),s.replaceChild(e,t)}}}),(0,a.jsx)("span",{children:r})]})},t)})})}),"pg_vector"===x&&(0,a.jsx)(V.Z,{message:"PG Vector Setup Required",description:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{children:"LiteLLM provides a server to connect to PG Vector. To use this provider:"}),(0,a.jsxs)("ol",{style:{marginLeft:"16px",marginTop:"8px"},children:[(0,a.jsxs)("li",{children:["Deploy the litellm-pgvector server from:"," ",(0,a.jsx)("a",{href:"https://github.com/BerriAI/litellm-pgvector",target:"_blank",rel:"noopener noreferrer",children:"https://github.com/BerriAI/litellm-pgvector"})]}),(0,a.jsx)("li",{children:"Configure your PostgreSQL database with pgvector extension"}),(0,a.jsx)("li",{children:"Start the server and note the API base URL and API key"}),(0,a.jsx)("li",{children:"Enter those details in the fields below"})]})]}),type:"info",showIcon:!0,style:{marginBottom:"16px"}}),"vertex_rag_engine"===x&&(0,a.jsx)(V.Z,{message:"Vertex AI RAG Engine Setup",description:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{children:"To use Vertex AI RAG Engine:"}),(0,a.jsxs)("ol",{style:{marginLeft:"16px",marginTop:"8px"},children:[(0,a.jsxs)("li",{children:["Set up your Vertex AI RAG Engine corpus following the guide:"," ",(0,a.jsx)("a",{href:"https://cloud.google.com/vertex-ai/generative-ai/docs/rag-engine/rag-overview",target:"_blank",rel:"noopener noreferrer",children:"Vertex AI RAG Engine Overview"})]}),(0,a.jsx)("li",{children:"Create a corpus in your Google Cloud project"}),(0,a.jsx)("li",{children:"Note the corpus ID from the Vertex AI console"}),(0,a.jsx)("li",{children:"Enter the corpus ID in the Vector Store ID field below"})]})]}),type:"info",showIcon:!0,style:{marginBottom:"16px"}}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Vector Store ID"," ",(0,a.jsx)(S.Z,{title:"Enter the vector store ID from your api provider",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),name:"vector_store_id",rules:[{required:!0,message:"Please input the vector store ID from your api provider"}],children:(0,a.jsx)(I.o,{placeholder:"vertex_rag_engine"===x?"6917529027641081856 (Get corpus ID from Vertex AI console)":"Enter vector store ID from your provider"})}),B(x).map(e=>{if("select"===e.type){let t=h.filter(e=>"embedding"===e.mode).map(e=>({value:e.model_group,label:e.model_group}));return(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:[e.label," ",(0,a.jsx)(S.Z,{title:e.tooltip,children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),name:e.name,rules:e.required?[{required:!0,message:"Please select the ".concat(e.label.toLowerCase())}]:[],children:(0,a.jsx)(L.default,{placeholder:e.placeholder,showSearch:!0,filterOption:(e,t)=>{var r;return(null!==(r=null==t?void 0:t.label)&&void 0!==r?r:"").toLowerCase().includes(e.toLowerCase())},options:t,style:{width:"100%"}})},e.name)}return(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:[e.label," ",(0,a.jsx)(S.Z,{title:e.tooltip,children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),name:e.name,rules:e.required?[{required:!0,message:"Please input the ".concat(e.label.toLowerCase())}]:[],children:(0,a.jsx)(I.o,{type:e.type||"text",placeholder:e.placeholder})},e.name)}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Vector Store Name"," ",(0,a.jsx)(S.Z,{title:"Custom name you want to give to the vector store, this name will be rendered on the LiteLLM UI",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),name:"vector_store_name",children:(0,a.jsx)(I.o,{})}),(0,a.jsx)(A.Z.Item,{label:"Description",name:"vector_store_description",children:(0,a.jsx)(D.default.TextArea,{rows:4})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Existing Credentials"," ",(0,a.jsx)(S.Z,{title:"Optionally select API provider credentials for this vector store eg. Bedrock API KEY",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),name:"litellm_credential_name",children:(0,a.jsx)(L.default,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,t)=>{var r;return(null!==(r=null==t?void 0:t.label)&&void 0!==r?r:"").toLowerCase().includes(e.toLowerCase())},options:[{value:null,label:"None"},...i.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Metadata"," ",(0,a.jsx)(S.Z,{title:"JSON metadata for the vector store (optional)",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),children:(0,a.jsx)(D.default.TextArea,{rows:4,value:d,onChange:e=>m(e.target.value),placeholder:'{"key": "value"}'})}),(0,a.jsxs)("div",{className:"flex justify-end space-x-3",children:[(0,a.jsx)(I.z,{onClick:g,variant:"secondary",children:"Cancel"}),(0,a.jsx)(I.z,{variant:"primary",type:"submit",children:"Create"})]})]})})},K=r(21609),U=r(64748),G=r(5545),J=r(10900),W=r(57840),X=r(42264),Q=r(5945),H=r(23496),Y=r(10353),$=r(44625),ee=r(70464),et=r(77565),er=r(61935),es=r(23907);let{TextArea:el}=D.default,{Text:ea,Title:eo}=W.default,en=e=>{let{vectorStoreId:t,accessToken:r,className:s=""}=e,[l,n]=(0,o.useState)(""),[i,c]=(0,o.useState)(!1),[d,m]=(0,o.useState)([]),[x,u]=(0,o.useState)({}),h=async()=>{if(!l.trim()){X.ZP.warning("Please enter a search query");return}c(!0);try{let e=await (0,j.vectorStoreSearchCall)(r,t,l),s={query:l,response:e,timestamp:Date.now()};m(e=>[s,...e]),n("")}catch(e){console.error("Error searching vector store:",e),R.Z.fromBackend("Failed to search vector store")}finally{c(!1)}},p=e=>new Date(e).toLocaleString(),v=(e,t)=>{let r="".concat(e,"-").concat(t);u(e=>({...e,[r]:!e[r]}))};return(0,a.jsx)(Q.Z,{className:"w-full rounded-xl shadow-md",children:(0,a.jsxs)("div",{className:"flex flex-col h-[600px]",children:[(0,a.jsxs)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)($.Z,{className:"mr-2 text-blue-500"}),(0,a.jsx)(eo,{level:4,className:"mb-0",children:"Test Vector Store"})]}),d.length>0&&(0,a.jsx)(G.ZP,{onClick:()=>{m([]),u({}),R.Z.success("Search history cleared")},size:"small",children:"Clear History"})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-auto p-4 pb-0",children:[0===d.length?(0,a.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,a.jsx)($.Z,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,a.jsx)(ea,{children:"Test your vector store by entering a search query below"})]}):(0,a.jsx)("div",{className:"space-y-4",children:d.map((e,t)=>{var r;return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-right",children:(0,a.jsxs)("div",{className:"inline-block max-w-[80%] rounded-lg shadow-sm p-3 bg-blue-50 border border-blue-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("strong",{className:"text-sm",children:"Query"}),(0,a.jsx)("span",{className:"text-xs text-gray-500",children:p(e.timestamp)})]}),(0,a.jsx)("div",{className:"text-left",children:e.query})]})}),(0,a.jsx)("div",{className:"text-left",children:(0,a.jsxs)("div",{className:"inline-block max-w-[80%] rounded-lg shadow-sm p-3 bg-white border border-gray-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,a.jsx)($.Z,{className:"text-green-500"}),(0,a.jsx)("strong",{className:"text-sm",children:"Vector Store Results"}),e.response&&(0,a.jsxs)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600",children:[(null===(r=e.response.data)||void 0===r?void 0:r.length)||0," results"]})]}),e.response&&e.response.data&&e.response.data.length>0?(0,a.jsx)("div",{className:"space-y-3",children:e.response.data.map((e,r)=>{let s=x["".concat(t,"-").concat(r)]||!1;return(0,a.jsxs)("div",{className:"border rounded-lg overflow-hidden bg-gray-50",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center p-3 cursor-pointer hover:bg-gray-100 transition-colors",onClick:()=>v(t,r),children:[(0,a.jsxs)("div",{className:"flex items-center",children:[s?(0,a.jsx)(ee.Z,{className:"text-gray-500 mr-2"}):(0,a.jsx)(et.Z,{className:"text-gray-500 mr-2"}),(0,a.jsxs)("span",{className:"font-medium text-sm",children:["Result ",r+1]}),!s&&e.content&&e.content[0]&&(0,a.jsxs)("span",{className:"ml-2 text-xs text-gray-500 truncate max-w-md",children:["- ",e.content[0].text.substring(0,100),"..."]})]}),(0,a.jsxs)("span",{className:"text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded",children:["Score: ",e.score.toFixed(4)]})]}),s&&(0,a.jsxs)("div",{className:"border-t bg-white p-3",children:[e.content&&e.content.map((e,t)=>(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsxs)("div",{className:"text-xs text-gray-500 mb-1",children:["Content (",e.type,")"]}),(0,a.jsx)("div",{className:"text-sm bg-gray-50 p-3 rounded border text-gray-800 max-h-40 overflow-y-auto",children:e.text})]},t)),(e.file_id||e.filename||e.attributes)&&(0,a.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:[(0,a.jsx)("div",{className:"text-xs text-gray-500 mb-2 font-medium",children:"Metadata"}),(0,a.jsxs)("div",{className:"space-y-2 text-xs",children:[e.file_id&&(0,a.jsxs)("div",{className:"bg-gray-50 p-2 rounded",children:[(0,a.jsx)("span",{className:"font-medium",children:"File ID:"})," ",e.file_id]}),e.filename&&(0,a.jsxs)("div",{className:"bg-gray-50 p-2 rounded",children:[(0,a.jsx)("span",{className:"font-medium",children:"Filename:"})," ",e.filename]}),e.attributes&&Object.keys(e.attributes).length>0&&(0,a.jsxs)("div",{className:"bg-gray-50 p-2 rounded",children:[(0,a.jsx)("span",{className:"font-medium block mb-1",children:"Attributes:"}),(0,a.jsx)("pre",{className:"text-xs bg-white p-2 rounded border overflow-x-auto",children:JSON.stringify(e.attributes,null,2)})]})]})]})]})]},r)})}):(0,a.jsx)("div",{className:"text-gray-500 text-sm",children:"No results found"})]})}),tn(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),h())},placeholder:"Enter your search query... (Shift+Enter for new line)",disabled:i,autoSize:{minRows:1,maxRows:4},style:{resize:"none"}})}),(0,a.jsx)(G.ZP,{type:"primary",onClick:h,disabled:i||!l.trim(),icon:(0,a.jsx)(es.Z,{}),loading:i,children:"Search"})]})})]})})};var ei=e=>{let{vectorStoreId:t,onClose:r,accessToken:s,is_admin:l,editVectorStore:n}=e,[i]=A.Z.useForm(),[c,d]=(0,o.useState)(null),[m,x]=(0,o.useState)(n),[u,h]=(0,o.useState)("{}"),[p,v]=(0,o.useState)([]),[g,f]=(0,o.useState)("details"),y=async()=>{if(s)try{let e=await (0,j.vectorStoreInfoCall)(s,t);if(e&&e.vector_store){if(d(e.vector_store),e.vector_store.vector_store_metadata){let t="string"==typeof e.vector_store.vector_store_metadata?JSON.parse(e.vector_store.vector_store_metadata):e.vector_store.vector_store_metadata;h(JSON.stringify(t,null,2))}n&&i.setFieldsValue({vector_store_id:e.vector_store.vector_store_id,custom_llm_provider:e.vector_store.custom_llm_provider,vector_store_name:e.vector_store.vector_store_name,vector_store_description:e.vector_store.vector_store_description})}}catch(e){console.error("Error fetching vector store details:",e),R.Z.fromBackend("Error fetching vector store details: "+e)}},_=async()=>{if(s)try{let e=await (0,j.credentialListCall)(s);console.log("List credentials response:",e),v(e.credentials||[])}catch(e){console.error("Error fetching credentials:",e)}};(0,o.useEffect)(()=>{y(),_()},[t,s]);let b=async e=>{if(s)try{let t={};try{t=u?JSON.parse(u):{}}catch(e){R.Z.fromBackend("Invalid JSON in metadata field");return}let r={vector_store_id:e.vector_store_id,custom_llm_provider:e.custom_llm_provider,vector_store_name:e.vector_store_name,vector_store_description:e.vector_store_description,vector_store_metadata:t};await (0,j.vectorStoreUpdateCall)(s,r),R.Z.success("Vector store updated successfully"),x(!1),y()}catch(e){console.error("Error updating vector store:",e),R.Z.fromBackend("Error updating vector store: "+e)}};return c?(0,a.jsxs)("div",{className:"p-4 max-w-full",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(U.zx,{icon:J.Z,variant:"light",className:"mb-4",onClick:r,children:"Back to Vector Stores"}),(0,a.jsxs)(U.Dx,{children:["Vector Store ID: ",c.vector_store_id]}),(0,a.jsx)(U.xv,{className:"text-gray-500",children:c.vector_store_description||"No description"})]}),l&&!m&&(0,a.jsx)(U.zx,{onClick:()=>x(!0),children:"Edit Vector Store"})]}),(0,a.jsxs)(U.v0,{children:[(0,a.jsxs)(U.td,{className:"mb-6",children:[(0,a.jsx)(U.OK,{children:"Details"}),(0,a.jsx)(U.OK,{children:"Test Vector Store"})]}),(0,a.jsxs)(U.nP,{children:[(0,a.jsx)(U.x4,{children:m?(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,a.jsx)(U.Dx,{children:"Edit Vector Store"})}),(0,a.jsx)(U.Zb,{children:(0,a.jsxs)(A.Z,{form:i,onFinish:b,layout:"vertical",initialValues:c,children:[(0,a.jsx)(A.Z.Item,{label:"Vector Store ID",name:"vector_store_id",rules:[{required:!0,message:"Please input a vector store ID"}],children:(0,a.jsx)(D.default,{disabled:!0})}),(0,a.jsx)(A.Z.Item,{label:"Vector Store Name",name:"vector_store_name",children:(0,a.jsx)(D.default,{})}),(0,a.jsx)(A.Z.Item,{label:"Description",name:"vector_store_description",children:(0,a.jsx)(D.default.TextArea,{rows:4})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Provider"," ",(0,a.jsx)(S.Z,{title:"Select the provider for this vector store",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),name:"custom_llm_provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,a.jsx)(L.default,{children:Object.entries(C.Cl).map(e=>{let[t,r]=e;return"Bedrock"===t?(0,a.jsx)(L.default.Option,{value:C.fK[t],children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("img",{src:C.cd[r],alt:"".concat(t," logo"),className:"w-5 h-5",onError:e=>{let t=e.target,s=t.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=r.charAt(0),s.replaceChild(e,t)}}}),(0,a.jsx)("span",{children:r})]})},t):null})})}),(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(U.xv,{className:"text-sm text-gray-500 mb-2",children:"Either select existing credentials OR enter provider credentials below"})}),(0,a.jsx)(A.Z.Item,{label:"Existing Credentials",name:"litellm_credential_name",children:(0,a.jsx)(L.default,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,t)=>{var r;return(null!==(r=null==t?void 0:t.label)&&void 0!==r?r:"").toLowerCase().includes(e.toLowerCase())},options:[{value:null,label:"None"},...p.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}),(0,a.jsxs)("div",{className:"flex items-center my-4",children:[(0,a.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,a.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"OR"}),(0,a.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Metadata"," ",(0,a.jsx)(S.Z,{title:"JSON metadata for the vector store",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),children:(0,a.jsx)(D.default.TextArea,{rows:4,value:u,onChange:e=>h(e.target.value),placeholder:'{"key": "value"}'})}),(0,a.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,a.jsx)(G.ZP,{onClick:()=>x(!1),children:"Cancel"}),(0,a.jsx)(G.ZP,{type:"primary",htmlType:"submit",children:"Save Changes"})]})]})})]}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,a.jsx)(U.Dx,{children:"Vector Store Details"}),l&&(0,a.jsx)(U.zx,{onClick:()=>x(!0),children:"Edit Vector Store"})]}),(0,a.jsx)(U.Zb,{children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(U.xv,{className:"font-medium",children:"ID"}),(0,a.jsx)(U.xv,{children:c.vector_store_id})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(U.xv,{className:"font-medium",children:"Name"}),(0,a.jsx)(U.xv,{children:c.vector_store_name||"-"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(U.xv,{className:"font-medium",children:"Description"}),(0,a.jsx)(U.xv,{children:c.vector_store_description||"-"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(U.xv,{className:"font-medium",children:"Provider"}),(0,a.jsx)("div",{className:"flex items-center space-x-2 mt-1",children:(()=>{let e=c.custom_llm_provider||"bedrock",{displayName:t,logo:r}=(()=>{let t=Object.keys(C.fK).find(t=>C.fK[t].toLowerCase()===e.toLowerCase());if(!t)return{displayName:e,logo:""};let r=C.Cl[t],s=C.cd[r];return{displayName:r,logo:s}})();return(0,a.jsxs)(a.Fragment,{children:[r&&(0,a.jsx)("img",{src:r,alt:"".concat(t," logo"),className:"w-5 h-5",onError:e=>{let r=e.target,s=r.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=t.charAt(0),s.replaceChild(e,r)}}}),(0,a.jsx)(U.Ct,{color:"blue",children:t})]})})()})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(U.xv,{className:"font-medium",children:"Metadata"}),(0,a.jsx)("div",{className:"bg-gray-50 p-3 rounded mt-2 font-mono text-xs overflow-auto max-h-48",children:(0,a.jsx)("pre",{children:u})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(U.xv,{className:"font-medium",children:"Created"}),(0,a.jsx)(U.xv,{children:c.created_at?new Date(c.created_at).toLocaleString():"-"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(U.xv,{className:"font-medium",children:"Last Updated"}),(0,a.jsx)(U.xv,{children:c.updated_at?new Date(c.updated_at).toLocaleString():"-"})]})]})})]})}),(0,a.jsx)(U.x4,{children:(0,a.jsx)(en,{vectorStoreId:c.vector_store_id,accessToken:s||""})})]})]})]}):(0,a.jsx)("div",{children:"Loading..."})},ec=r(44803),ed=r(65319),em=r(46783),ex=r(33866),eu=r(56609),eh=r(6520),ep=r(23639),ev=r(26349),eg=e=>{let{documents:t,onRemove:r}=e,s=e=>{navigator.clipboard.writeText(e),X.ZP.success("Document ID copied to clipboard")},l=e=>{let t={uploading:{color:"blue",text:"Uploading"},done:{color:"green",text:"Ready"},error:{color:"red",text:"Error"},removed:{color:"default",text:"Removed"}}[e];return(0,a.jsx)(ex.Z,{color:t.color,text:t.text})},o=e=>{if(!e)return"-";let t=e/1024;return t<1024?"".concat(t.toFixed(2)," KB"):"".concat((t/1024).toFixed(2)," MB")};return(0,a.jsx)(eu.Z,{dataSource:t,columns:[{title:"Name",dataIndex:"name",key:"name",render:(e,t)=>(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{className:"text-sm",children:e}),t.size&&(0,a.jsxs)("span",{className:"text-xs text-gray-400",children:["(",o(t.size),")"]})]})},{title:"Status",dataIndex:"status",key:"status",width:150,render:e=>l(e)},{title:"Actions",key:"actions",width:120,render:(e,t)=>(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(S.Z,{title:"View details",children:(0,a.jsx)(eh.Z,{className:"cursor-pointer text-gray-600 hover:text-blue-500",onClick:()=>console.log("View",t)})}),(0,a.jsx)(S.Z,{title:"Copy ID",children:(0,a.jsx)(ep.Z,{className:"cursor-pointer text-gray-600 hover:text-blue-500",onClick:()=>s(t.uid)})}),(0,a.jsx)(S.Z,{title:"Remove",children:(0,a.jsx)(ev.Z,{className:"cursor-pointer text-gray-600 hover:text-red-500",onClick:()=>r(t.uid)})})]})}],rowKey:"uid",pagination:!1,locale:{emptyText:"No documents uploaded yet. Upload documents above to get started."},size:"small"})},ej=e=>{let{accessToken:t,providerParams:r,onParamsChange:s}=e,[l,n]=(0,o.useState)([]),[i,c]=(0,o.useState)(!1);(0,o.useEffect)(()=>{t&&(async()=>{c(!0);try{let e=(await (0,M.p)(t)).filter(e=>"embedding"===e.mode);n(e)}catch(e){console.error("Error fetching embedding models:",e)}finally{c(!1)}})()},[t]);let d=(e,t)=>{s({...r,[e]:t})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(V.Z,{message:"AWS S3 Vectors Setup",description:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{children:"AWS S3 Vectors allows you to store and query vector embeddings directly in S3:"}),(0,a.jsxs)("ul",{style:{marginLeft:"16px",marginTop:"8px"},children:[(0,a.jsx)("li",{children:"Vector buckets and indexes will be automatically created if they don't exist"}),(0,a.jsx)("li",{children:"Vector dimensions are auto-detected from your selected embedding model"}),(0,a.jsx)("li",{children:"Ensure your AWS credentials have permissions for S3 Vectors operations"}),(0,a.jsxs)("li",{children:["Learn more:"," ",(0,a.jsx)("a",{href:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vector-buckets.html",target:"_blank",rel:"noopener noreferrer",children:"AWS S3 Vectors Documentation"})]})]})]}),type:"info",showIcon:!0,style:{marginBottom:"16px"}}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Vector Bucket Name"," ",(0,a.jsx)(S.Z,{title:"S3 bucket name for vector storage (must be at least 3 characters, lowercase letters, numbers, hyphens, and periods only)",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),required:!0,validateStatus:r.vector_bucket_name&&r.vector_bucket_name.length<3?"error":void 0,help:r.vector_bucket_name&&r.vector_bucket_name.length<3?"Bucket name must be at least 3 characters":void 0,children:(0,a.jsx)(D.default,{value:r.vector_bucket_name||"",onChange:e=>d("vector_bucket_name",e.target.value),placeholder:"my-vector-bucket (min 3 chars)",size:"large",className:"rounded-md"})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Index Name"," ",(0,a.jsx)(S.Z,{title:"Name for the vector index (optional, will be auto-generated if not provided). If provided, must be at least 3 characters.",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),validateStatus:r.index_name&&r.index_name.length>0&&r.index_name.length<3?"error":void 0,help:r.index_name&&r.index_name.length>0&&r.index_name.length<3?"Index name must be at least 3 characters if provided":void 0,children:(0,a.jsx)(D.default,{value:r.index_name||"",onChange:e=>d("index_name",e.target.value),placeholder:"my-vector-index (optional, min 3 chars)",size:"large",className:"rounded-md"})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["AWS Region"," ",(0,a.jsx)(S.Z,{title:"AWS region where the S3 bucket is located (e.g., us-west-2)",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),required:!0,children:(0,a.jsx)(D.default,{value:r.aws_region_name||"",onChange:e=>d("aws_region_name",e.target.value),placeholder:"us-west-2",size:"large",className:"rounded-md"})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Embedding Model"," ",(0,a.jsx)(S.Z,{title:"Select the embedding model to use for vector generation",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),required:!0,children:(0,a.jsx)(L.default,{value:r.embedding_model||void 0,onChange:e=>d("embedding_model",e),placeholder:"Select an embedding model",size:"large",showSearch:!0,loading:i,filterOption:(e,t)=>{var r;return(null!==(r=null==t?void 0:t.label)&&void 0!==r?r:"").toLowerCase().includes(e.toLowerCase())},options:l.map(e=>({value:e.model_group,label:e.model_group})),style:{width:"100%"}})})]})};let{Dragger:ef}=ed.default;var ey=e=>{var t;let{accessToken:r,onSuccess:s}=e,[n]=A.Z.useForm(),[i,c]=(0,o.useState)([]),[d,m]=(0,o.useState)(!1),[x,u]=(0,o.useState)("bedrock"),[h,p]=(0,o.useState)(""),[v,g]=(0,o.useState)(""),[f,y]=(0,o.useState)([]),[_,b]=(0,o.useState)({}),N={name:"file",multiple:!0,accept:".pdf,.txt,.docx,.md,.doc",beforeUpload:e=>{if(!["application/pdf","text/plain","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","text/markdown"].includes(e.type))return X.ZP.error("".concat(e.name," is not a supported file type. Please upload PDF, TXT, DOCX, or MD files.")),ed.default.LIST_IGNORE;if(!(e.size/1024/1024<50))return X.ZP.error("".concat(e.name," must be smaller than 50MB!")),ed.default.LIST_IGNORE;let t={uid:e.uid,name:e.name,status:"done",size:e.size,type:e.type,originFileObj:e};return c(e=>[...e,t]),!1},onRemove:e=>{c(t=>t.filter(t=>t.uid!==e.uid))},fileList:i.map(e=>({uid:e.uid,name:e.name,status:e.status,size:e.size})),showUploadList:!1},w=async()=>{let e;if(0===i.length){X.ZP.warning("Please upload at least one document");return}if(!x){X.ZP.warning("Please select a provider");return}for(let e of B(x).filter(e=>e.required))if(!_[e.name]){X.ZP.warning("Please provide ".concat(e.label));return}if("s3_vectors"===x){if(_.vector_bucket_name&&_.vector_bucket_name.length<3){X.ZP.warning("Vector bucket name must be at least 3 characters");return}if(_.index_name&&_.index_name.length>0&&_.index_name.length<3){X.ZP.warning("Index name must be at least 3 characters if provided");return}}if(!r){X.ZP.error("No access token available");return}m(!0);let t=[];try{for(let s of i)if(s.originFileObj){c(e=>e.map(e=>e.uid===s.uid?{...e,status:"uploading"}:e));try{let l=await (0,j.ragIngestCall)(r,s.originFileObj,x,e,h||void 0,v||void 0,_);!e&&l.vector_store_id&&(e=l.vector_store_id),t.push(l),c(e=>e.map(e=>e.uid===s.uid?{...e,status:"done"}:e))}catch(e){throw console.error("Error ingesting ".concat(s.name,":"),e),c(e=>e.map(e=>e.uid===s.uid?{...e,status:"error"}:e)),e}}y(t),R.Z.success("Successfully created vector store with ".concat(t.length," document(s). Vector Store ID: ").concat(e)),s&&e&&s(e),setTimeout(()=>{c([]),y([])},3e3)}catch(e){console.error("Error creating vector store:",e),R.Z.fromBackend("Failed to create vector store: ".concat(e))}finally{m(!1)}};return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(ec.Dx,{children:"Create Vector Store"}),(0,a.jsx)(ec.xv,{className:"text-gray-500",children:"Upload documents and select a provider to create a new vector store with embedded content."})]}),(0,a.jsxs)(ec.Zb,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)(ec.xv,{className:"font-medium",children:"Step 1: Upload Documents"}),(0,a.jsx)(ec.xv,{className:"text-sm text-gray-500 block mt-1",children:"Upload one or more documents (PDF, TXT, DOCX, MD). Maximum file size: 50MB per file."})]}),(0,a.jsxs)(ef,{...N,children:[(0,a.jsx)("p",{className:"ant-upload-drag-icon",children:(0,a.jsx)(em.Z,{style:{fontSize:"48px",color:"#1890ff"}})}),(0,a.jsx)("p",{className:"ant-upload-text",children:"Click or drag files to this area to upload"}),(0,a.jsx)("p",{className:"ant-upload-hint",children:"Support for single or bulk upload. Supported formats: PDF, TXT, DOCX, MD"})]})]}),i.length>0&&(0,a.jsxs)(ec.Zb,{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsxs)(ec.xv,{className:"font-medium",children:["Uploaded Documents (",i.length,")"]})}),(0,a.jsx)(eg,{documents:i,onRemove:e=>{c(t=>t.filter(t=>t.uid!==e))}})]}),(0,a.jsx)(ec.Zb,{children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(ec.xv,{className:"font-medium",children:"Step 2: Configure Vector Store"}),(0,a.jsx)(ec.xv,{className:"text-sm text-gray-500 block mt-1",children:"Choose the provider and optionally provide a name and description for your vector store."})]}),(0,a.jsxs)(A.Z,{form:n,layout:"vertical",children:[(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Vector Store Name"," ",(0,a.jsx)(S.Z,{title:"Optional: Give your vector store a meaningful name",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),children:(0,a.jsx)(D.default,{value:h,onChange:e=>p(e.target.value),placeholder:"e.g., Product Documentation, Customer Support KB",size:"large",className:"rounded-md"})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Description"," ",(0,a.jsx)(S.Z,{title:"Optional: Describe what this vector store contains",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),children:(0,a.jsx)(D.default.TextArea,{value:v,onChange:e=>g(e.target.value),placeholder:"e.g., Contains all product documentation and user guides",rows:2,size:"large",className:"rounded-md"})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Provider"," ",(0,a.jsx)(S.Z,{title:"Select the provider for embedding and vector store operations",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),required:!0,children:(0,a.jsx)(L.default,{value:x,onChange:u,placeholder:"Select a provider",size:"large",style:{width:"100%"},children:Object.entries(l).map(e=>{let[t,r]=e;return(0,a.jsx)(L.default.Option,{value:z[t],children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("img",{src:T[r],alt:"".concat(t," logo"),className:"w-5 h-5",onError:e=>{let t=e.target,s=t.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=r.charAt(0),s.replaceChild(e,t)}}}),(0,a.jsx)("span",{children:r})]})},t)})})}),"s3_vectors"===x&&(0,a.jsx)(ej,{accessToken:r,providerParams:_,onParamsChange:b}),"s3_vectors"!==x&&B(x).map(e=>"select"===e.type?(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:[e.label," ",(0,a.jsx)(S.Z,{title:e.tooltip,children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),required:e.required,children:(0,a.jsx)(D.default,{value:_[e.name]||"",onChange:t=>b(r=>({...r,[e.name]:t.target.value})),placeholder:e.placeholder,size:"large",className:"rounded-md"})},e.name):(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:[e.label," ",(0,a.jsx)(S.Z,{title:e.tooltip,children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),required:e.required,children:(0,a.jsx)(D.default,{type:"password"===e.type?"password":"text",value:_[e.name]||"",onChange:t=>b(r=>({...r,[e.name]:t.target.value})),placeholder:e.placeholder,size:"large",className:"rounded-md"})},e.name))]}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)(G.ZP,{type:"primary",size:"large",onClick:w,loading:d,disabled:0===i.length||!x,children:d?"Creating Vector Store...":"Create Vector Store"})})]})}),f.length>0&&(0,a.jsx)(V.Z,{message:"Vector Store Created Successfully",description:(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Vector Store ID:"})," ",null===(t=f[0])||void 0===t?void 0:t.vector_store_id]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Documents Ingested:"})," ",f.length]})]}),type:"success",showIcon:!0,closable:!0})]})};let{Text:e_,Title:eb}=W.default;var eN=e=>{let{accessToken:t,vectorStores:r}=e,[s,l]=(0,o.useState)(r.length>0?r[0].vector_store_id:void 0);return t?0===r.length?(0,a.jsx)(Q.Z,{children:(0,a.jsx)("div",{className:"text-center py-8",children:(0,a.jsx)(e_,{type:"secondary",children:"No vector stores available. Create one first to test it."})})}):(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(Q.Z,{children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(eb,{level:5,children:"Select Vector Store"}),(0,a.jsx)(e_,{type:"secondary",children:"Choose a vector store to test search queries against"})]}),(0,a.jsx)(L.default,{value:s,onChange:l,placeholder:"Select a vector store",size:"large",style:{width:"100%"},showSearch:!0,optionFilterProp:"children",children:r.map(e=>(0,a.jsx)(L.default.Option,{value:e.vector_store_id,children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"font-medium",children:e.vector_store_name||e.vector_store_id}),e.vector_store_name&&(0,a.jsx)("span",{className:"text-xs text-gray-500 font-mono",children:e.vector_store_id})]})},e.vector_store_id))})]})}),s&&(0,a.jsx)(en,{vectorStoreId:s,accessToken:t})]}):(0,a.jsx)(Q.Z,{children:(0,a.jsx)(e_,{type:"secondary",children:"Access token is required to test vector stores."})})},ew=r(20347),eS=e=>{let{accessToken:t,userID:r,userRole:s}=e,[l,f]=(0,o.useState)([]),[y,_]=(0,o.useState)(!1),[b,N]=(0,o.useState)(!1),[w,S]=(0,o.useState)(null),[Z,C]=(0,o.useState)(""),[I,A]=(0,o.useState)([]),[E,L]=(0,o.useState)(null),[V,D]=(0,o.useState)(!1),[P,z]=(0,o.useState)(!1),O=async()=>{if(t)try{let e=await (0,j.vectorStoreListCall)(t);console.log("List vector stores response:",e),f(e.data||[])}catch(e){console.error("Error fetching vector stores:",e),R.Z.fromBackend("Error fetching vector stores: "+e)}},T=async()=>{if(t)try{let e=await (0,j.credentialListCall)(t);console.log("List credentials response:",e),A(e.credentials||[])}catch(e){console.error("Error fetching credentials:",e),R.Z.fromBackend("Error fetching credentials: "+e)}},q=async e=>{S(e),N(!0)},B=async()=>{if(t&&w){z(!0);try{await (0,j.vectorStoreDeleteCall)(t,w),R.Z.success("Vector store deleted successfully"),O()}catch(e){console.error("Error deleting vector store:",e),R.Z.fromBackend("Error deleting vector store: "+e)}finally{z(!1),N(!1),S(null)}}};return(0,o.useEffect)(()=>{O(),T()},[t]),E?(0,a.jsx)("div",{className:"w-full h-full",children:(0,a.jsx)(ei,{vectorStoreId:E,onClose:()=>{L(null),D(!1),O()},accessToken:t,is_admin:(0,ew.tY)(s||""),editVectorStore:V})}):(0,a.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,a.jsxs)("div",{className:"gap-2 p-8 h-[75vh] w-full mt-2",children:[(0,a.jsxs)("div",{className:"flex justify-between mt-2 w-full items-center mb-4",children:[(0,a.jsx)("h1",{children:"Vector Store Management"}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[Z&&(0,a.jsxs)(v.Z,{children:["Last Refreshed: ",Z]}),(0,a.jsx)(d.Z,{icon:g.Z,variant:"shadow",size:"xs",className:"self-center cursor-pointer",onClick:()=>{O(),T(),C(new Date().toLocaleString())}})]})]}),(0,a.jsx)(v.Z,{className:"mb-4",children:(0,a.jsx)("p",{children:"You can use vector stores to store and retrieve LLM embeddings."})}),(0,a.jsxs)(x.Z,{children:[(0,a.jsxs)(u.Z,{className:"mb-6",children:[(0,a.jsx)(m.Z,{children:"Create Vector Store"}),(0,a.jsx)(m.Z,{children:"Manage Vector Stores"}),(0,a.jsx)(m.Z,{children:"Test Vector Store"})]}),(0,a.jsxs)(p.Z,{children:[(0,a.jsx)(h.Z,{children:(0,a.jsx)(ey,{accessToken:t,onSuccess:e=>{console.log("Vector store created:",e),O()}})}),(0,a.jsxs)(h.Z,{children:[(0,a.jsx)(n.Z,{className:"mb-4",onClick:()=>_(!0),children:"+ Add Vector Store"}),(0,a.jsx)(c.Z,{numItems:1,className:"gap-2 pt-2 pb-2 w-full mt-2",children:(0,a.jsx)(i.Z,{numColSpan:1,children:(0,a.jsx)(k,{data:l,onView:e=>{L(e),D(!1)},onEdit:e=>{L(e),D(!0)},onDelete:q})})})]}),(0,a.jsx)(h.Z,{children:(0,a.jsx)(eN,{accessToken:t,vectorStores:l})})]})]}),(0,a.jsx)(F,{isVisible:y,onCancel:()=>_(!1),onSuccess:()=>{_(!1),O()},accessToken:t,credentials:I}),(0,a.jsx)(K.Z,{isOpen:b,title:"Delete Vector Store",message:"Are you sure you want to delete this vector store? This action cannot be undone.",resourceInformationTitle:"Vector Store Information",resourceInformation:[{label:"Vector Store ID",value:w,code:!0}],onCancel:()=>N(!1),onOk:B,confirmLoading:P})]})})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6213-6c1fab5854e4401f.js b/litellm/proxy/_experimental/out/_next/static/chunks/6213-6c1fab5854e4401f.js
new file mode 100644
index 00000000000..8013aaa1f7f
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/6213-6c1fab5854e4401f.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6213],{36213:function(e,t,r){r.d(t,{Z:function(){return eS}});var s,l,a=r(57437),o=r(2265),n=r(78489),i=r(49804),c=r(67101),d=r(47323),m=r(12485),x=r(18135),u=r(35242),h=r(29706),p=r(77991),v=r(84264),g=r(23628),j=r(19250),f=r(44633),y=r(86462),_=r(49084),b=r(71594),N=r(24525),w=r(19130),S=r(99981),Z=r(39957),C=r(42673),k=e=>{let{data:t,onView:r,onEdit:s,onDelete:l}=e,[n,i]=o.useState([{id:"created_at",desc:!0}]),c=[{header:"Vector Store ID",accessorKey:"vector_store_id",cell:e=>{let{row:t}=e,s=t.original;return(0,a.jsx)("button",{onClick:()=>r(s.vector_store_id),className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",children:s.vector_store_id.length>15?"".concat(s.vector_store_id.slice(0,15),"..."):s.vector_store_id})}},{header:"Name",accessorKey:"vector_store_name",cell:e=>{let{row:t}=e,r=t.original;return(0,a.jsx)(S.Z,{title:r.vector_store_name,children:(0,a.jsx)("span",{className:"text-xs",children:r.vector_store_name||"-"})})}},{header:"Description",accessorKey:"vector_store_description",cell:e=>{let{row:t}=e,r=t.original;return(0,a.jsx)(S.Z,{title:r.vector_store_description,children:(0,a.jsx)("span",{className:"text-xs",children:r.vector_store_description||"-"})})}},{header:"Files",accessorKey:"vector_store_metadata",cell:e=>{var t;let{row:r}=e,s=(null===(t=r.original.vector_store_metadata)||void 0===t?void 0:t.ingested_files)||[];if(0===s.length)return(0,a.jsx)("span",{className:"text-xs text-gray-400",children:"-"});let l=s.map(e=>e.filename||e.file_url||"Unknown").join(", "),o=1===s.length?s[0].filename||s[0].file_url||"1 file":"".concat(s.length," files");return(0,a.jsx)(S.Z,{title:l,children:(0,a.jsx)("span",{className:"text-xs text-blue-600",children:o})})}},{header:"Provider",accessorKey:"custom_llm_provider",cell:e=>{let{row:t}=e,r=t.original,{displayName:s,logo:l}=(0,C.dr)(r.custom_llm_provider);return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[l&&(0,a.jsx)("img",{src:l,alt:s,className:"h-4 w-4"}),(0,a.jsx)("span",{className:"text-xs",children:s})]})}},{header:"Created At",accessorKey:"created_at",sortingFn:"datetime",cell:e=>{let{row:t}=e,r=t.original;return(0,a.jsx)("span",{className:"text-xs",children:new Date(r.created_at).toLocaleDateString()})}},{header:"Updated At",accessorKey:"updated_at",sortingFn:"datetime",cell:e=>{let{row:t}=e,r=t.original;return(0,a.jsx)("span",{className:"text-xs",children:new Date(r.updated_at).toLocaleDateString()})}},{id:"actions",header:"",cell:e=>{let{row:t}=e,r=t.original;return(0,a.jsxs)("div",{className:"flex space-x-2",children:[(0,a.jsx)(Z.Z,{variant:"Edit",tooltipText:"Edit vector store",onClick:()=>s(r.vector_store_id)}),(0,a.jsx)(Z.Z,{variant:"Delete",tooltipText:"Delete vector store",onClick:()=>l(r.vector_store_id)})]})}}],d=(0,b.b7)({data:t,columns:c,state:{sorting:n},onSortingChange:i,getCoreRowModel:(0,N.sC)(),getSortedRowModel:(0,N.tj)(),enableSorting:!0});return(0,a.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)(w.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,a.jsx)(w.ss,{children:d.getHeaderGroups().map(e=>(0,a.jsx)(w.SC,{children:e.headers.map(e=>(0,a.jsx)(w.xs,{className:"py-1 h-8 ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""),onClick:e.column.getToggleSortingHandler(),children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,b.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&(0,a.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,a.jsx)(f.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,a.jsx)(y.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,a.jsx)(_.Z,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,a.jsx)(w.RM,{children:d.getRowModel().rows.length>0?d.getRowModel().rows.map(e=>(0,a.jsx)(w.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,a.jsx)(w.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":""),children:(0,b.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,a.jsx)(w.SC,{children:(0,a.jsx)(w.pj,{colSpan:c.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:"No vector stores found"})})})})})]})})})},I=r(64504),A=r(10032),E=r(22116),L=r(37592),V=r(51653),D=r(4260),P=r(15424);(s=l||(l={})).Bedrock="Amazon Bedrock",s.S3Vectors="Amazon S3 Vectors",s.PgVector="PostgreSQL pgvector (LiteLLM Connector)",s.VertexRagEngine="Vertex AI RAG Engine",s.OpenAI="OpenAI",s.Azure="Azure OpenAI",s.Milvus="Milvus";let z={Bedrock:"bedrock",PgVector:"pg_vector",VertexRagEngine:"vertex_ai",OpenAI:"openai",Azure:"azure",Milvus:"milvus",S3Vectors:"s3_vectors"},O="../ui/assets/logos/",T={"Amazon Bedrock":"".concat(O,"bedrock.svg"),"PostgreSQL pgvector (LiteLLM Connector)":"".concat(O,"postgresql.svg"),"Vertex AI RAG Engine":"".concat(O,"google.svg"),OpenAI:"".concat(O,"openai_small.svg"),"Azure OpenAI":"".concat(O,"microsoft_azure.svg"),Milvus:"".concat(O,"milvus.svg"),"Amazon S3 Vectors":"".concat(O,"s3_vector.png")},q={bedrock:[],pg_vector:[{name:"api_base",label:"API Base",tooltip:"Enter the base URL of your deployed litellm-pgvector server (e.g., http://your-server:8000)",placeholder:"http://your-deployed-server:8000",required:!0,type:"text"},{name:"api_key",label:"API Key",tooltip:"Enter the API key from your deployed litellm-pgvector server",placeholder:"your-deployed-api-key",required:!0,type:"password"}],vertex_rag_engine:[],openai:[{name:"api_key",label:"API Key",tooltip:"Enter your OpenAI API key",placeholder:"sk-...",required:!0,type:"password"}],azure:[{name:"api_key",label:"API Key",tooltip:"Enter your Azure OpenAI API key",placeholder:"your-azure-api-key",required:!0,type:"password"},{name:"api_base",label:"API Base",tooltip:"Enter your Azure OpenAI endpoint (e.g., https://your-resource.openai.azure.com/)",placeholder:"https://your-resource.openai.azure.com/",required:!0,type:"text"}],milvus:[{name:"api_key",label:"API Key",tooltip:"To obtain a token, you should use a colon (:) to concatenate the username and password that you use to access your Milvus instance (e.g., username:password)",placeholder:"username:password or api key",required:!0,type:"password"},{name:"api_base",label:"API Base",tooltip:"Enter your Milvus endpoint (e.g., https://your-milvus-endpoint.com/)",placeholder:"https://your-milvus-endpoint.com/",required:!0,type:"text"},{name:"embedding_model",label:"Embedding Model",tooltip:"Select the embedding model to use",placeholder:"text-embedding-3-small",required:!0,type:"select"}],s3_vectors:[{name:"vector_bucket_name",label:"Vector Bucket Name",tooltip:"S3 bucket name for vector storage (will be auto-created if it doesn't exist)",placeholder:"my-vector-bucket",required:!0,type:"text"},{name:"index_name",label:"Index Name",tooltip:"Name for the vector index (optional, will be auto-generated if not provided)",placeholder:"my-vector-index",required:!1,type:"text"},{name:"aws_region_name",label:"AWS Region",tooltip:"AWS region where the S3 bucket is located (e.g., us-west-2)",placeholder:"us-west-2",required:!0,type:"text"},{name:"embedding_model",label:"Embedding Model",tooltip:"Select the embedding model to use for vector generation",placeholder:"text-embedding-3-small",required:!0,type:"select"}]},B=e=>q[e]||[];var M=r(10703),R=r(9114),F=e=>{let{isVisible:t,onCancel:r,onSuccess:s,accessToken:n,credentials:i}=e,[c]=A.Z.useForm(),[d,m]=(0,o.useState)("{}"),[x,u]=(0,o.useState)("bedrock"),[h,p]=(0,o.useState)([]);(0,o.useEffect)(()=>{n&&(async()=>{try{let e=await (0,M.p)(n);e.length>0&&p(e)}catch(e){console.error("Error fetching model info:",e)}})()},[n]);let v=async e=>{if(n)try{let t={};try{t=d.trim()?JSON.parse(d):{}}catch(e){R.Z.fromBackend("Invalid JSON in metadata field");return}let r={vector_store_id:e.vector_store_id,custom_llm_provider:e.custom_llm_provider,vector_store_name:e.vector_store_name,vector_store_description:e.vector_store_description,vector_store_metadata:t,litellm_credential_name:e.litellm_credential_name},l=B(e.custom_llm_provider).reduce((t,r)=>("milvus"===e.custom_llm_provider&&"embedding_model"===r.name?t.litellm_embedding_model=e[r.name]:t[r.name]=e[r.name],t),{});r.litellm_params=l,await (0,j.vectorStoreCreateCall)(n,r),R.Z.success("Vector store created successfully"),c.resetFields(),m("{}"),s()}catch(e){console.error("Error creating vector store:",e),R.Z.fromBackend("Error creating vector store: "+e)}},g=()=>{c.resetFields(),m("{}"),u("bedrock"),r()};return(0,a.jsx)(E.Z,{title:"Add New Vector Store",visible:t,width:1e3,footer:null,onCancel:g,children:(0,a.jsxs)(A.Z,{form:c,onFinish:v,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Provider"," ",(0,a.jsx)(S.Z,{title:"Select the provider for this vector store",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),name:"custom_llm_provider",rules:[{required:!0,message:"Please select a provider"}],initialValue:"bedrock",children:(0,a.jsx)(L.default,{onChange:e=>u(e),children:Object.entries(l).map(e=>{let[t,r]=e;return(0,a.jsx)(L.default.Option,{value:z[t],children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("img",{src:T[r],alt:"".concat(t," logo"),className:"w-5 h-5",onError:e=>{let t=e.target,s=t.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=r.charAt(0),s.replaceChild(e,t)}}}),(0,a.jsx)("span",{children:r})]})},t)})})}),"pg_vector"===x&&(0,a.jsx)(V.Z,{message:"PG Vector Setup Required",description:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{children:"LiteLLM provides a server to connect to PG Vector. To use this provider:"}),(0,a.jsxs)("ol",{style:{marginLeft:"16px",marginTop:"8px"},children:[(0,a.jsxs)("li",{children:["Deploy the litellm-pgvector server from:"," ",(0,a.jsx)("a",{href:"https://github.com/BerriAI/litellm-pgvector",target:"_blank",rel:"noopener noreferrer",children:"https://github.com/BerriAI/litellm-pgvector"})]}),(0,a.jsx)("li",{children:"Configure your PostgreSQL database with pgvector extension"}),(0,a.jsx)("li",{children:"Start the server and note the API base URL and API key"}),(0,a.jsx)("li",{children:"Enter those details in the fields below"})]})]}),type:"info",showIcon:!0,style:{marginBottom:"16px"}}),"vertex_rag_engine"===x&&(0,a.jsx)(V.Z,{message:"Vertex AI RAG Engine Setup",description:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{children:"To use Vertex AI RAG Engine:"}),(0,a.jsxs)("ol",{style:{marginLeft:"16px",marginTop:"8px"},children:[(0,a.jsxs)("li",{children:["Set up your Vertex AI RAG Engine corpus following the guide:"," ",(0,a.jsx)("a",{href:"https://cloud.google.com/vertex-ai/generative-ai/docs/rag-engine/rag-overview",target:"_blank",rel:"noopener noreferrer",children:"Vertex AI RAG Engine Overview"})]}),(0,a.jsx)("li",{children:"Create a corpus in your Google Cloud project"}),(0,a.jsx)("li",{children:"Note the corpus ID from the Vertex AI console"}),(0,a.jsx)("li",{children:"Enter the corpus ID in the Vector Store ID field below"})]})]}),type:"info",showIcon:!0,style:{marginBottom:"16px"}}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Vector Store ID"," ",(0,a.jsx)(S.Z,{title:"Enter the vector store ID from your api provider",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),name:"vector_store_id",rules:[{required:!0,message:"Please input the vector store ID from your api provider"}],children:(0,a.jsx)(I.o,{placeholder:"vertex_rag_engine"===x?"6917529027641081856 (Get corpus ID from Vertex AI console)":"Enter vector store ID from your provider"})}),B(x).map(e=>{if("select"===e.type){let t=h.filter(e=>"embedding"===e.mode||null===e.mode).map(e=>({value:e.model_group,label:e.model_group}));return(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:[e.label," ",(0,a.jsx)(S.Z,{title:e.tooltip,children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),name:e.name,rules:e.required?[{required:!0,message:"Please select the ".concat(e.label.toLowerCase())}]:[],children:(0,a.jsx)(L.default,{placeholder:e.placeholder,showSearch:!0,filterOption:(e,t)=>{var r;return(null!==(r=null==t?void 0:t.label)&&void 0!==r?r:"").toLowerCase().includes(e.toLowerCase())},options:t,style:{width:"100%"}})},e.name)}return(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:[e.label," ",(0,a.jsx)(S.Z,{title:e.tooltip,children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),name:e.name,rules:e.required?[{required:!0,message:"Please input the ".concat(e.label.toLowerCase())}]:[],children:(0,a.jsx)(I.o,{type:e.type||"text",placeholder:e.placeholder})},e.name)}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Vector Store Name"," ",(0,a.jsx)(S.Z,{title:"Custom name you want to give to the vector store, this name will be rendered on the LiteLLM UI",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),name:"vector_store_name",children:(0,a.jsx)(I.o,{})}),(0,a.jsx)(A.Z.Item,{label:"Description",name:"vector_store_description",children:(0,a.jsx)(D.default.TextArea,{rows:4})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Existing Credentials"," ",(0,a.jsx)(S.Z,{title:"Optionally select API provider credentials for this vector store eg. Bedrock API KEY",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),name:"litellm_credential_name",children:(0,a.jsx)(L.default,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,t)=>{var r;return(null!==(r=null==t?void 0:t.label)&&void 0!==r?r:"").toLowerCase().includes(e.toLowerCase())},options:[{value:null,label:"None"},...i.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Metadata"," ",(0,a.jsx)(S.Z,{title:"JSON metadata for the vector store (optional)",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),children:(0,a.jsx)(D.default.TextArea,{rows:4,value:d,onChange:e=>m(e.target.value),placeholder:'{"key": "value"}'})}),(0,a.jsxs)("div",{className:"flex justify-end space-x-3",children:[(0,a.jsx)(I.z,{onClick:g,variant:"secondary",children:"Cancel"}),(0,a.jsx)(I.z,{variant:"primary",type:"submit",children:"Create"})]})]})})},K=r(21609),U=r(64748),G=r(5545),J=r(10900),W=r(57840),X=r(42264),Q=r(5945),H=r(23496),Y=r(10353),$=r(44625),ee=r(70464),et=r(77565),er=r(61935),es=r(23907);let{TextArea:el}=D.default,{Text:ea,Title:eo}=W.default,en=e=>{let{vectorStoreId:t,accessToken:r,className:s=""}=e,[l,n]=(0,o.useState)(""),[i,c]=(0,o.useState)(!1),[d,m]=(0,o.useState)([]),[x,u]=(0,o.useState)({}),h=async()=>{if(!l.trim()){X.ZP.warning("Please enter a search query");return}c(!0);try{let e=await (0,j.vectorStoreSearchCall)(r,t,l),s={query:l,response:e,timestamp:Date.now()};m(e=>[s,...e]),n("")}catch(e){console.error("Error searching vector store:",e),R.Z.fromBackend("Failed to search vector store")}finally{c(!1)}},p=e=>new Date(e).toLocaleString(),v=(e,t)=>{let r="".concat(e,"-").concat(t);u(e=>({...e,[r]:!e[r]}))};return(0,a.jsx)(Q.Z,{className:"w-full rounded-xl shadow-md",children:(0,a.jsxs)("div",{className:"flex flex-col h-[600px]",children:[(0,a.jsxs)("div",{className:"p-4 border-b border-gray-200 flex justify-between items-center",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)($.Z,{className:"mr-2 text-blue-500"}),(0,a.jsx)(eo,{level:4,className:"mb-0",children:"Test Vector Store"})]}),d.length>0&&(0,a.jsx)(G.ZP,{onClick:()=>{m([]),u({}),R.Z.success("Search history cleared")},size:"small",children:"Clear History"})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-auto p-4 pb-0",children:[0===d.length?(0,a.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,a.jsx)($.Z,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,a.jsx)(ea,{children:"Test your vector store by entering a search query below"})]}):(0,a.jsx)("div",{className:"space-y-4",children:d.map((e,t)=>{var r;return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-right",children:(0,a.jsxs)("div",{className:"inline-block max-w-[80%] rounded-lg shadow-sm p-3 bg-blue-50 border border-blue-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("strong",{className:"text-sm",children:"Query"}),(0,a.jsx)("span",{className:"text-xs text-gray-500",children:p(e.timestamp)})]}),(0,a.jsx)("div",{className:"text-left",children:e.query})]})}),(0,a.jsx)("div",{className:"text-left",children:(0,a.jsxs)("div",{className:"inline-block max-w-[80%] rounded-lg shadow-sm p-3 bg-white border border-gray-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,a.jsx)($.Z,{className:"text-green-500"}),(0,a.jsx)("strong",{className:"text-sm",children:"Vector Store Results"}),e.response&&(0,a.jsxs)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600",children:[(null===(r=e.response.data)||void 0===r?void 0:r.length)||0," results"]})]}),e.response&&e.response.data&&e.response.data.length>0?(0,a.jsx)("div",{className:"space-y-3",children:e.response.data.map((e,r)=>{let s=x["".concat(t,"-").concat(r)]||!1;return(0,a.jsxs)("div",{className:"border rounded-lg overflow-hidden bg-gray-50",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center p-3 cursor-pointer hover:bg-gray-100 transition-colors",onClick:()=>v(t,r),children:[(0,a.jsxs)("div",{className:"flex items-center",children:[s?(0,a.jsx)(ee.Z,{className:"text-gray-500 mr-2"}):(0,a.jsx)(et.Z,{className:"text-gray-500 mr-2"}),(0,a.jsxs)("span",{className:"font-medium text-sm",children:["Result ",r+1]}),!s&&e.content&&e.content[0]&&(0,a.jsxs)("span",{className:"ml-2 text-xs text-gray-500 truncate max-w-md",children:["- ",e.content[0].text.substring(0,100),"..."]})]}),(0,a.jsxs)("span",{className:"text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded",children:["Score: ",e.score.toFixed(4)]})]}),s&&(0,a.jsxs)("div",{className:"border-t bg-white p-3",children:[e.content&&e.content.map((e,t)=>(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsxs)("div",{className:"text-xs text-gray-500 mb-1",children:["Content (",e.type,")"]}),(0,a.jsx)("div",{className:"text-sm bg-gray-50 p-3 rounded border text-gray-800 max-h-40 overflow-y-auto",children:e.text})]},t)),(e.file_id||e.filename||e.attributes)&&(0,a.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:[(0,a.jsx)("div",{className:"text-xs text-gray-500 mb-2 font-medium",children:"Metadata"}),(0,a.jsxs)("div",{className:"space-y-2 text-xs",children:[e.file_id&&(0,a.jsxs)("div",{className:"bg-gray-50 p-2 rounded",children:[(0,a.jsx)("span",{className:"font-medium",children:"File ID:"})," ",e.file_id]}),e.filename&&(0,a.jsxs)("div",{className:"bg-gray-50 p-2 rounded",children:[(0,a.jsx)("span",{className:"font-medium",children:"Filename:"})," ",e.filename]}),e.attributes&&Object.keys(e.attributes).length>0&&(0,a.jsxs)("div",{className:"bg-gray-50 p-2 rounded",children:[(0,a.jsx)("span",{className:"font-medium block mb-1",children:"Attributes:"}),(0,a.jsx)("pre",{className:"text-xs bg-white p-2 rounded border overflow-x-auto",children:JSON.stringify(e.attributes,null,2)})]})]})]})]})]},r)})}):(0,a.jsx)("div",{className:"text-gray-500 text-sm",children:"No results found"})]})}),tn(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),h())},placeholder:"Enter your search query... (Shift+Enter for new line)",disabled:i,autoSize:{minRows:1,maxRows:4},style:{resize:"none"}})}),(0,a.jsx)(G.ZP,{type:"primary",onClick:h,disabled:i||!l.trim(),icon:(0,a.jsx)(es.Z,{}),loading:i,children:"Search"})]})})]})})};var ei=e=>{let{vectorStoreId:t,onClose:r,accessToken:s,is_admin:l,editVectorStore:n}=e,[i]=A.Z.useForm(),[c,d]=(0,o.useState)(null),[m,x]=(0,o.useState)(n),[u,h]=(0,o.useState)("{}"),[p,v]=(0,o.useState)([]),[g,f]=(0,o.useState)("details"),y=async()=>{if(s)try{let e=await (0,j.vectorStoreInfoCall)(s,t);if(e&&e.vector_store){if(d(e.vector_store),e.vector_store.vector_store_metadata){let t="string"==typeof e.vector_store.vector_store_metadata?JSON.parse(e.vector_store.vector_store_metadata):e.vector_store.vector_store_metadata;h(JSON.stringify(t,null,2))}n&&i.setFieldsValue({vector_store_id:e.vector_store.vector_store_id,custom_llm_provider:e.vector_store.custom_llm_provider,vector_store_name:e.vector_store.vector_store_name,vector_store_description:e.vector_store.vector_store_description})}}catch(e){console.error("Error fetching vector store details:",e),R.Z.fromBackend("Error fetching vector store details: "+e)}},_=async()=>{if(s)try{let e=await (0,j.credentialListCall)(s);console.log("List credentials response:",e),v(e.credentials||[])}catch(e){console.error("Error fetching credentials:",e)}};(0,o.useEffect)(()=>{y(),_()},[t,s]);let b=async e=>{if(s)try{let t={};try{t=u?JSON.parse(u):{}}catch(e){R.Z.fromBackend("Invalid JSON in metadata field");return}let r={vector_store_id:e.vector_store_id,custom_llm_provider:e.custom_llm_provider,vector_store_name:e.vector_store_name,vector_store_description:e.vector_store_description,vector_store_metadata:t};await (0,j.vectorStoreUpdateCall)(s,r),R.Z.success("Vector store updated successfully"),x(!1),y()}catch(e){console.error("Error updating vector store:",e),R.Z.fromBackend("Error updating vector store: "+e)}};return c?(0,a.jsxs)("div",{className:"p-4 max-w-full",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(U.zx,{icon:J.Z,variant:"light",className:"mb-4",onClick:r,children:"Back to Vector Stores"}),(0,a.jsxs)(U.Dx,{children:["Vector Store ID: ",c.vector_store_id]}),(0,a.jsx)(U.xv,{className:"text-gray-500",children:c.vector_store_description||"No description"})]}),l&&!m&&(0,a.jsx)(U.zx,{onClick:()=>x(!0),children:"Edit Vector Store"})]}),(0,a.jsxs)(U.v0,{children:[(0,a.jsxs)(U.td,{className:"mb-6",children:[(0,a.jsx)(U.OK,{children:"Details"}),(0,a.jsx)(U.OK,{children:"Test Vector Store"})]}),(0,a.jsxs)(U.nP,{children:[(0,a.jsx)(U.x4,{children:m?(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,a.jsx)(U.Dx,{children:"Edit Vector Store"})}),(0,a.jsx)(U.Zb,{children:(0,a.jsxs)(A.Z,{form:i,onFinish:b,layout:"vertical",initialValues:c,children:[(0,a.jsx)(A.Z.Item,{label:"Vector Store ID",name:"vector_store_id",rules:[{required:!0,message:"Please input a vector store ID"}],children:(0,a.jsx)(D.default,{disabled:!0})}),(0,a.jsx)(A.Z.Item,{label:"Vector Store Name",name:"vector_store_name",children:(0,a.jsx)(D.default,{})}),(0,a.jsx)(A.Z.Item,{label:"Description",name:"vector_store_description",children:(0,a.jsx)(D.default.TextArea,{rows:4})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Provider"," ",(0,a.jsx)(S.Z,{title:"Select the provider for this vector store",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),name:"custom_llm_provider",rules:[{required:!0,message:"Please select a provider"}],children:(0,a.jsx)(L.default,{children:Object.entries(C.Cl).map(e=>{let[t,r]=e;return"Bedrock"===t?(0,a.jsx)(L.default.Option,{value:C.fK[t],children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("img",{src:C.cd[r],alt:"".concat(t," logo"),className:"w-5 h-5",onError:e=>{let t=e.target,s=t.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=r.charAt(0),s.replaceChild(e,t)}}}),(0,a.jsx)("span",{children:r})]})},t):null})})}),(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(U.xv,{className:"text-sm text-gray-500 mb-2",children:"Either select existing credentials OR enter provider credentials below"})}),(0,a.jsx)(A.Z.Item,{label:"Existing Credentials",name:"litellm_credential_name",children:(0,a.jsx)(L.default,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,t)=>{var r;return(null!==(r=null==t?void 0:t.label)&&void 0!==r?r:"").toLowerCase().includes(e.toLowerCase())},options:[{value:null,label:"None"},...p.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}),(0,a.jsxs)("div",{className:"flex items-center my-4",children:[(0,a.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,a.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"OR"}),(0,a.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Metadata"," ",(0,a.jsx)(S.Z,{title:"JSON metadata for the vector store",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),children:(0,a.jsx)(D.default.TextArea,{rows:4,value:u,onChange:e=>h(e.target.value),placeholder:'{"key": "value"}'})}),(0,a.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,a.jsx)(G.ZP,{onClick:()=>x(!1),children:"Cancel"}),(0,a.jsx)(G.ZP,{type:"primary",htmlType:"submit",children:"Save Changes"})]})]})})]}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,a.jsx)(U.Dx,{children:"Vector Store Details"}),l&&(0,a.jsx)(U.zx,{onClick:()=>x(!0),children:"Edit Vector Store"})]}),(0,a.jsx)(U.Zb,{children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(U.xv,{className:"font-medium",children:"ID"}),(0,a.jsx)(U.xv,{children:c.vector_store_id})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(U.xv,{className:"font-medium",children:"Name"}),(0,a.jsx)(U.xv,{children:c.vector_store_name||"-"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(U.xv,{className:"font-medium",children:"Description"}),(0,a.jsx)(U.xv,{children:c.vector_store_description||"-"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(U.xv,{className:"font-medium",children:"Provider"}),(0,a.jsx)("div",{className:"flex items-center space-x-2 mt-1",children:(()=>{let e=c.custom_llm_provider||"bedrock",{displayName:t,logo:r}=(()=>{let t=Object.keys(C.fK).find(t=>C.fK[t].toLowerCase()===e.toLowerCase());if(!t)return{displayName:e,logo:""};let r=C.Cl[t],s=C.cd[r];return{displayName:r,logo:s}})();return(0,a.jsxs)(a.Fragment,{children:[r&&(0,a.jsx)("img",{src:r,alt:"".concat(t," logo"),className:"w-5 h-5",onError:e=>{let r=e.target,s=r.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=t.charAt(0),s.replaceChild(e,r)}}}),(0,a.jsx)(U.Ct,{color:"blue",children:t})]})})()})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(U.xv,{className:"font-medium",children:"Metadata"}),(0,a.jsx)("div",{className:"bg-gray-50 p-3 rounded mt-2 font-mono text-xs overflow-auto max-h-48",children:(0,a.jsx)("pre",{children:u})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(U.xv,{className:"font-medium",children:"Created"}),(0,a.jsx)(U.xv,{children:c.created_at?new Date(c.created_at).toLocaleString():"-"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(U.xv,{className:"font-medium",children:"Last Updated"}),(0,a.jsx)(U.xv,{children:c.updated_at?new Date(c.updated_at).toLocaleString():"-"})]})]})})]})}),(0,a.jsx)(U.x4,{children:(0,a.jsx)(en,{vectorStoreId:c.vector_store_id,accessToken:s||""})})]})]})]}):(0,a.jsx)("div",{children:"Loading..."})},ec=r(44803),ed=r(65319),em=r(46783),ex=r(33866),eu=r(56609),eh=r(6520),ep=r(23639),ev=r(26349),eg=e=>{let{documents:t,onRemove:r}=e,s=e=>{navigator.clipboard.writeText(e),X.ZP.success("Document ID copied to clipboard")},l=e=>{let t={uploading:{color:"blue",text:"Uploading"},done:{color:"green",text:"Ready"},error:{color:"red",text:"Error"},removed:{color:"default",text:"Removed"}}[e];return(0,a.jsx)(ex.Z,{color:t.color,text:t.text})},o=e=>{if(!e)return"-";let t=e/1024;return t<1024?"".concat(t.toFixed(2)," KB"):"".concat((t/1024).toFixed(2)," MB")};return(0,a.jsx)(eu.Z,{dataSource:t,columns:[{title:"Name",dataIndex:"name",key:"name",render:(e,t)=>(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{className:"text-sm",children:e}),t.size&&(0,a.jsxs)("span",{className:"text-xs text-gray-400",children:["(",o(t.size),")"]})]})},{title:"Status",dataIndex:"status",key:"status",width:150,render:e=>l(e)},{title:"Actions",key:"actions",width:120,render:(e,t)=>(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(S.Z,{title:"View details",children:(0,a.jsx)(eh.Z,{className:"cursor-pointer text-gray-600 hover:text-blue-500",onClick:()=>console.log("View",t)})}),(0,a.jsx)(S.Z,{title:"Copy ID",children:(0,a.jsx)(ep.Z,{className:"cursor-pointer text-gray-600 hover:text-blue-500",onClick:()=>s(t.uid)})}),(0,a.jsx)(S.Z,{title:"Remove",children:(0,a.jsx)(ev.Z,{className:"cursor-pointer text-gray-600 hover:text-red-500",onClick:()=>r(t.uid)})})]})}],rowKey:"uid",pagination:!1,locale:{emptyText:"No documents uploaded yet. Upload documents above to get started."},size:"small"})},ej=e=>{let{accessToken:t,providerParams:r,onParamsChange:s}=e,[l,n]=(0,o.useState)([]),[i,c]=(0,o.useState)(!1);(0,o.useEffect)(()=>{t&&(async()=>{c(!0);try{let e=(await (0,M.p)(t)).filter(e=>"embedding"===e.mode);n(e)}catch(e){console.error("Error fetching embedding models:",e)}finally{c(!1)}})()},[t]);let d=(e,t)=>{s({...r,[e]:t})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(V.Z,{message:"AWS S3 Vectors Setup",description:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{children:"AWS S3 Vectors allows you to store and query vector embeddings directly in S3:"}),(0,a.jsxs)("ul",{style:{marginLeft:"16px",marginTop:"8px"},children:[(0,a.jsx)("li",{children:"Vector buckets and indexes will be automatically created if they don't exist"}),(0,a.jsx)("li",{children:"Vector dimensions are auto-detected from your selected embedding model"}),(0,a.jsx)("li",{children:"Ensure your AWS credentials have permissions for S3 Vectors operations"}),(0,a.jsxs)("li",{children:["Learn more:"," ",(0,a.jsx)("a",{href:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vector-buckets.html",target:"_blank",rel:"noopener noreferrer",children:"AWS S3 Vectors Documentation"})]})]})]}),type:"info",showIcon:!0,style:{marginBottom:"16px"}}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Vector Bucket Name"," ",(0,a.jsx)(S.Z,{title:"S3 bucket name for vector storage (must be at least 3 characters, lowercase letters, numbers, hyphens, and periods only)",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),required:!0,validateStatus:r.vector_bucket_name&&r.vector_bucket_name.length<3?"error":void 0,help:r.vector_bucket_name&&r.vector_bucket_name.length<3?"Bucket name must be at least 3 characters":void 0,children:(0,a.jsx)(D.default,{value:r.vector_bucket_name||"",onChange:e=>d("vector_bucket_name",e.target.value),placeholder:"my-vector-bucket (min 3 chars)",size:"large",className:"rounded-md"})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Index Name"," ",(0,a.jsx)(S.Z,{title:"Name for the vector index (optional, will be auto-generated if not provided). If provided, must be at least 3 characters.",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),validateStatus:r.index_name&&r.index_name.length>0&&r.index_name.length<3?"error":void 0,help:r.index_name&&r.index_name.length>0&&r.index_name.length<3?"Index name must be at least 3 characters if provided":void 0,children:(0,a.jsx)(D.default,{value:r.index_name||"",onChange:e=>d("index_name",e.target.value),placeholder:"my-vector-index (optional, min 3 chars)",size:"large",className:"rounded-md"})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["AWS Region"," ",(0,a.jsx)(S.Z,{title:"AWS region where the S3 bucket is located (e.g., us-west-2)",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),required:!0,children:(0,a.jsx)(D.default,{value:r.aws_region_name||"",onChange:e=>d("aws_region_name",e.target.value),placeholder:"us-west-2",size:"large",className:"rounded-md"})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Embedding Model"," ",(0,a.jsx)(S.Z,{title:"Select the embedding model to use for vector generation",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),required:!0,children:(0,a.jsx)(L.default,{value:r.embedding_model||void 0,onChange:e=>d("embedding_model",e),placeholder:"Select an embedding model",size:"large",showSearch:!0,loading:i,filterOption:(e,t)=>{var r;return(null!==(r=null==t?void 0:t.label)&&void 0!==r?r:"").toLowerCase().includes(e.toLowerCase())},options:l.map(e=>({value:e.model_group,label:e.model_group})),style:{width:"100%"}})})]})};let{Dragger:ef}=ed.default;var ey=e=>{var t;let{accessToken:r,onSuccess:s}=e,[n]=A.Z.useForm(),[i,c]=(0,o.useState)([]),[d,m]=(0,o.useState)(!1),[x,u]=(0,o.useState)("bedrock"),[h,p]=(0,o.useState)(""),[v,g]=(0,o.useState)(""),[f,y]=(0,o.useState)([]),[_,b]=(0,o.useState)({}),N={name:"file",multiple:!0,accept:".pdf,.txt,.docx,.md,.doc",beforeUpload:e=>{if(!["application/pdf","text/plain","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","text/markdown"].includes(e.type))return X.ZP.error("".concat(e.name," is not a supported file type. Please upload PDF, TXT, DOCX, or MD files.")),ed.default.LIST_IGNORE;if(!(e.size/1024/1024<50))return X.ZP.error("".concat(e.name," must be smaller than 50MB!")),ed.default.LIST_IGNORE;let t={uid:e.uid,name:e.name,status:"done",size:e.size,type:e.type,originFileObj:e};return c(e=>[...e,t]),!1},onRemove:e=>{c(t=>t.filter(t=>t.uid!==e.uid))},fileList:i.map(e=>({uid:e.uid,name:e.name,status:e.status,size:e.size})),showUploadList:!1},w=async()=>{let e;if(0===i.length){X.ZP.warning("Please upload at least one document");return}if(!x){X.ZP.warning("Please select a provider");return}for(let e of B(x).filter(e=>e.required))if(!_[e.name]){X.ZP.warning("Please provide ".concat(e.label));return}if("s3_vectors"===x){if(_.vector_bucket_name&&_.vector_bucket_name.length<3){X.ZP.warning("Vector bucket name must be at least 3 characters");return}if(_.index_name&&_.index_name.length>0&&_.index_name.length<3){X.ZP.warning("Index name must be at least 3 characters if provided");return}}if(!r){X.ZP.error("No access token available");return}m(!0);let t=[];try{for(let s of i)if(s.originFileObj){c(e=>e.map(e=>e.uid===s.uid?{...e,status:"uploading"}:e));try{let l=await (0,j.ragIngestCall)(r,s.originFileObj,x,e,h||void 0,v||void 0,_);!e&&l.vector_store_id&&(e=l.vector_store_id),t.push(l),c(e=>e.map(e=>e.uid===s.uid?{...e,status:"done"}:e))}catch(e){throw console.error("Error ingesting ".concat(s.name,":"),e),c(e=>e.map(e=>e.uid===s.uid?{...e,status:"error"}:e)),e}}y(t),R.Z.success("Successfully created vector store with ".concat(t.length," document(s). Vector Store ID: ").concat(e)),s&&e&&s(e),setTimeout(()=>{c([]),y([])},3e3)}catch(e){console.error("Error creating vector store:",e),R.Z.fromBackend("Failed to create vector store: ".concat(e))}finally{m(!1)}};return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(ec.Dx,{children:"Create Vector Store"}),(0,a.jsx)(ec.xv,{className:"text-gray-500",children:"Upload documents and select a provider to create a new vector store with embedded content."})]}),(0,a.jsxs)(ec.Zb,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)(ec.xv,{className:"font-medium",children:"Step 1: Upload Documents"}),(0,a.jsx)(ec.xv,{className:"text-sm text-gray-500 block mt-1",children:"Upload one or more documents (PDF, TXT, DOCX, MD). Maximum file size: 50MB per file."})]}),(0,a.jsxs)(ef,{...N,children:[(0,a.jsx)("p",{className:"ant-upload-drag-icon",children:(0,a.jsx)(em.Z,{style:{fontSize:"48px",color:"#1890ff"}})}),(0,a.jsx)("p",{className:"ant-upload-text",children:"Click or drag files to this area to upload"}),(0,a.jsx)("p",{className:"ant-upload-hint",children:"Support for single or bulk upload. Supported formats: PDF, TXT, DOCX, MD"})]})]}),i.length>0&&(0,a.jsxs)(ec.Zb,{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsxs)(ec.xv,{className:"font-medium",children:["Uploaded Documents (",i.length,")"]})}),(0,a.jsx)(eg,{documents:i,onRemove:e=>{c(t=>t.filter(t=>t.uid!==e))}})]}),(0,a.jsx)(ec.Zb,{children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(ec.xv,{className:"font-medium",children:"Step 2: Configure Vector Store"}),(0,a.jsx)(ec.xv,{className:"text-sm text-gray-500 block mt-1",children:"Choose the provider and optionally provide a name and description for your vector store."})]}),(0,a.jsxs)(A.Z,{form:n,layout:"vertical",children:[(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Vector Store Name"," ",(0,a.jsx)(S.Z,{title:"Optional: Give your vector store a meaningful name",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),children:(0,a.jsx)(D.default,{value:h,onChange:e=>p(e.target.value),placeholder:"e.g., Product Documentation, Customer Support KB",size:"large",className:"rounded-md"})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Description"," ",(0,a.jsx)(S.Z,{title:"Optional: Describe what this vector store contains",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),children:(0,a.jsx)(D.default.TextArea,{value:v,onChange:e=>g(e.target.value),placeholder:"e.g., Contains all product documentation and user guides",rows:2,size:"large",className:"rounded-md"})}),(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:["Provider"," ",(0,a.jsx)(S.Z,{title:"Select the provider for embedding and vector store operations",children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),required:!0,children:(0,a.jsx)(L.default,{value:x,onChange:u,placeholder:"Select a provider",size:"large",style:{width:"100%"},children:Object.entries(l).map(e=>{let[t,r]=e;return(0,a.jsx)(L.default.Option,{value:z[t],children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("img",{src:T[r],alt:"".concat(t," logo"),className:"w-5 h-5",onError:e=>{let t=e.target,s=t.parentElement;if(s){let e=document.createElement("div");e.className="w-5 h-5 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=r.charAt(0),s.replaceChild(e,t)}}}),(0,a.jsx)("span",{children:r})]})},t)})})}),"s3_vectors"===x&&(0,a.jsx)(ej,{accessToken:r,providerParams:_,onParamsChange:b}),"s3_vectors"!==x&&B(x).map(e=>"select"===e.type?(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:[e.label," ",(0,a.jsx)(S.Z,{title:e.tooltip,children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),required:e.required,children:(0,a.jsx)(D.default,{value:_[e.name]||"",onChange:t=>b(r=>({...r,[e.name]:t.target.value})),placeholder:e.placeholder,size:"large",className:"rounded-md"})},e.name):(0,a.jsx)(A.Z.Item,{label:(0,a.jsxs)("span",{children:[e.label," ",(0,a.jsx)(S.Z,{title:e.tooltip,children:(0,a.jsx)(P.Z,{style:{marginLeft:"4px"}})})]}),required:e.required,children:(0,a.jsx)(D.default,{type:"password"===e.type?"password":"text",value:_[e.name]||"",onChange:t=>b(r=>({...r,[e.name]:t.target.value})),placeholder:e.placeholder,size:"large",className:"rounded-md"})},e.name))]}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)(G.ZP,{type:"primary",size:"large",onClick:w,loading:d,disabled:0===i.length||!x,children:d?"Creating Vector Store...":"Create Vector Store"})})]})}),f.length>0&&(0,a.jsx)(V.Z,{message:"Vector Store Created Successfully",description:(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Vector Store ID:"})," ",null===(t=f[0])||void 0===t?void 0:t.vector_store_id]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Documents Ingested:"})," ",f.length]})]}),type:"success",showIcon:!0,closable:!0})]})};let{Text:e_,Title:eb}=W.default;var eN=e=>{let{accessToken:t,vectorStores:r}=e,[s,l]=(0,o.useState)(r.length>0?r[0].vector_store_id:void 0);return t?0===r.length?(0,a.jsx)(Q.Z,{children:(0,a.jsx)("div",{className:"text-center py-8",children:(0,a.jsx)(e_,{type:"secondary",children:"No vector stores available. Create one first to test it."})})}):(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(Q.Z,{children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(eb,{level:5,children:"Select Vector Store"}),(0,a.jsx)(e_,{type:"secondary",children:"Choose a vector store to test search queries against"})]}),(0,a.jsx)(L.default,{value:s,onChange:l,placeholder:"Select a vector store",size:"large",style:{width:"100%"},showSearch:!0,optionFilterProp:"children",children:r.map(e=>(0,a.jsx)(L.default.Option,{value:e.vector_store_id,children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"font-medium",children:e.vector_store_name||e.vector_store_id}),e.vector_store_name&&(0,a.jsx)("span",{className:"text-xs text-gray-500 font-mono",children:e.vector_store_id})]})},e.vector_store_id))})]})}),s&&(0,a.jsx)(en,{vectorStoreId:s,accessToken:t})]}):(0,a.jsx)(Q.Z,{children:(0,a.jsx)(e_,{type:"secondary",children:"Access token is required to test vector stores."})})},ew=r(20347),eS=e=>{let{accessToken:t,userID:r,userRole:s}=e,[l,f]=(0,o.useState)([]),[y,_]=(0,o.useState)(!1),[b,N]=(0,o.useState)(!1),[w,S]=(0,o.useState)(null),[Z,C]=(0,o.useState)(""),[I,A]=(0,o.useState)([]),[E,L]=(0,o.useState)(null),[V,D]=(0,o.useState)(!1),[P,z]=(0,o.useState)(!1),O=async()=>{if(t)try{let e=await (0,j.vectorStoreListCall)(t);console.log("List vector stores response:",e),f(e.data||[])}catch(e){console.error("Error fetching vector stores:",e),R.Z.fromBackend("Error fetching vector stores: "+e)}},T=async()=>{if(t)try{let e=await (0,j.credentialListCall)(t);console.log("List credentials response:",e),A(e.credentials||[])}catch(e){console.error("Error fetching credentials:",e),R.Z.fromBackend("Error fetching credentials: "+e)}},q=async e=>{S(e),N(!0)},B=async()=>{if(t&&w){z(!0);try{await (0,j.vectorStoreDeleteCall)(t,w),R.Z.success("Vector store deleted successfully"),O()}catch(e){console.error("Error deleting vector store:",e),R.Z.fromBackend("Error deleting vector store: "+e)}finally{z(!1),N(!1),S(null)}}};return(0,o.useEffect)(()=>{O(),T()},[t]),E?(0,a.jsx)("div",{className:"w-full h-full",children:(0,a.jsx)(ei,{vectorStoreId:E,onClose:()=>{L(null),D(!1),O()},accessToken:t,is_admin:(0,ew.tY)(s||""),editVectorStore:V})}):(0,a.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,a.jsxs)("div",{className:"gap-2 p-8 h-[75vh] w-full mt-2",children:[(0,a.jsxs)("div",{className:"flex justify-between mt-2 w-full items-center mb-4",children:[(0,a.jsx)("h1",{children:"Vector Store Management"}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[Z&&(0,a.jsxs)(v.Z,{children:["Last Refreshed: ",Z]}),(0,a.jsx)(d.Z,{icon:g.Z,variant:"shadow",size:"xs",className:"self-center cursor-pointer",onClick:()=>{O(),T(),C(new Date().toLocaleString())}})]})]}),(0,a.jsx)(v.Z,{className:"mb-4",children:(0,a.jsx)("p",{children:"You can use vector stores to store and retrieve LLM embeddings."})}),(0,a.jsxs)(x.Z,{children:[(0,a.jsxs)(u.Z,{className:"mb-6",children:[(0,a.jsx)(m.Z,{children:"Create Vector Store"}),(0,a.jsx)(m.Z,{children:"Manage Vector Stores"}),(0,a.jsx)(m.Z,{children:"Test Vector Store"})]}),(0,a.jsxs)(p.Z,{children:[(0,a.jsx)(h.Z,{children:(0,a.jsx)(ey,{accessToken:t,onSuccess:e=>{console.log("Vector store created:",e),O()}})}),(0,a.jsxs)(h.Z,{children:[(0,a.jsx)(n.Z,{className:"mb-4",onClick:()=>_(!0),children:"+ Add Vector Store"}),(0,a.jsx)(c.Z,{numItems:1,className:"gap-2 pt-2 pb-2 w-full mt-2",children:(0,a.jsx)(i.Z,{numColSpan:1,children:(0,a.jsx)(k,{data:l,onView:e=>{L(e),D(!1)},onEdit:e=>{L(e),D(!0)},onDelete:q})})})]}),(0,a.jsx)(h.Z,{children:(0,a.jsx)(eN,{accessToken:t,vectorStores:l})})]})]}),(0,a.jsx)(F,{isVisible:y,onCancel:()=>_(!1),onSuccess:()=>{_(!1),O()},accessToken:t,credentials:I}),(0,a.jsx)(K.Z,{isOpen:b,title:"Delete Vector Store",message:"Are you sure you want to delete this vector store? This action cannot be undone.",resourceInformationTitle:"Vector Store Information",resourceInformation:[{label:"Vector Store ID",value:w,code:!0}],onCancel:()=>N(!1),onOk:B,confirmLoading:P})]})})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6276-841bc8541051bc36.js b/litellm/proxy/_experimental/out/_next/static/chunks/6276-841bc8541051bc36.js
deleted file mode 100644
index 99e90e6d14a..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/6276-841bc8541051bc36.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6276],{29271:function(e,r,t){t.d(r,{Z:function(){return c}});var o=t(1119),n=t(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},l=t(55015),c=n.forwardRef(function(e,r){return n.createElement(l.Z,(0,o.Z)({},e,{ref:r,icon:a}))})},41649:function(e,r,t){t.d(r,{Z:function(){return b}});var o=t(5853),n=t(2265),a=t(47187),l=t(7084),c=t(26898),i=t(13241),d=t(1153);let s={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},u={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},g=(0,d.fn)("Badge"),b=n.forwardRef((e,r)=>{let{color:t,icon:b,size:m=l.u8.SM,tooltip:h,className:p,children:f}=e,k=(0,o._T)(e,["color","icon","size","tooltip","className","children"]),x=b||null,{tooltipProps:v,getReferenceProps:w}=(0,a.l)();return n.createElement("span",Object.assign({ref:(0,d.lq)([r,v.refs.setReference]),className:(0,i.q)(g("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",t?(0,i.q)((0,d.bM)(t,c.K.background).bgColor,(0,d.bM)(t,c.K.iconText).textColor,(0,d.bM)(t,c.K.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,i.q)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),s[m].paddingX,s[m].paddingY,s[m].fontSize,p)},w,k),n.createElement(a.Z,Object.assign({text:h},v)),x?n.createElement(x,{className:(0,i.q)(g("icon"),"shrink-0 -ml-1 mr-1.5",u[m].height,u[m].width)}):null,n.createElement("span",{className:(0,i.q)(g("text"),"whitespace-nowrap")},f))});b.displayName="Badge"},47323:function(e,r,t){t.d(r,{Z:function(){return h}});var o=t(5853),n=t(2265),a=t(47187),l=t(7084),c=t(13241),i=t(1153),d=t(26898);let s={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},u={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},g={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},b=(e,r)=>{switch(e){case"simple":return{textColor:r?(0,i.bM)(r,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:r?(0,i.bM)(r,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,c.q)((0,i.bM)(r,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:r?(0,i.bM)(r,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,c.q)((0,i.bM)(r,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:r?(0,i.bM)(r,d.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:r?(0,c.q)((0,i.bM)(r,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:r?(0,i.bM)(r,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,c.q)((0,i.bM)(r,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:r?(0,i.bM)(r,d.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:r?(0,c.q)((0,i.bM)(r,d.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},m=(0,i.fn)("Icon"),h=n.forwardRef((e,r)=>{let{icon:t,variant:d="simple",tooltip:h,size:p=l.u8.SM,color:f,className:k}=e,x=(0,o._T)(e,["icon","variant","tooltip","size","color","className"]),v=b(d,f),{tooltipProps:w,getReferenceProps:C}=(0,a.l)();return n.createElement("span",Object.assign({ref:(0,i.lq)([r,w.refs.setReference]),className:(0,c.q)(m("root"),"inline-flex shrink-0 items-center justify-center",v.bgColor,v.textColor,v.borderColor,v.ringColor,g[d].rounded,g[d].border,g[d].shadow,g[d].ring,s[p].paddingX,s[p].paddingY,k)},C,x),n.createElement(a.Z,Object.assign({text:h},w)),n.createElement(t,{className:(0,c.q)(m("icon"),"shrink-0",u[p].height,u[p].width)}))});h.displayName="Icon"},16853:function(e,r,t){t.d(r,{Z:function(){return s}});var o=t(5853),n=t(96398),a=t(44140),l=t(2265),c=t(13241),i=t(1153);let d=(0,i.fn)("Textarea"),s=l.forwardRef((e,r)=>{let{value:t,defaultValue:s="",placeholder:u="Type...",error:g=!1,errorMessage:b,disabled:m=!1,className:h,onChange:p,onValueChange:f,autoHeight:k=!1}=e,x=(0,o._T)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[v,w]=(0,a.Z)(s,t),C=(0,l.useRef)(null),y=(0,n.Uh)(v);return(0,l.useEffect)(()=>{let e=C.current;if(k&&e){e.style.height="60px";let r=e.scrollHeight;e.style.height=r+"px"}},[k,C,v]),l.createElement(l.Fragment,null,l.createElement("textarea",Object.assign({ref:(0,i.lq)([C,r]),value:v,placeholder:u,disabled:m,className:(0,c.q)(d("Textarea"),"w-full flex items-center outline-none rounded-tremor-default px-3 py-2 text-tremor-default focus:ring-2 transition duration-100 border","shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:shadow-dark-tremor-input focus:dark:border-dark-tremor-brand-subtle focus:dark:ring-dark-tremor-brand-muted",(0,n.um)(y,m,g),m?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",h),"data-testid":"text-area",onChange:e=>{null==p||p(e),w(e.target.value),null==f||f(e.target.value)}},x)),g&&b?l.createElement("p",{className:(0,c.q)(d("errorMessage"),"text-sm text-red-500 mt-1")},b):null)});s.displayName="Textarea"},44140:function(e,r,t){t.d(r,{Z:function(){return n}});var o=t(2265);let n=(e,r)=>{let t=void 0!==r,[n,a]=(0,o.useState)(e);return[t?r:n,e=>{t||a(e)}]}},66531:function(e,r,t){t.d(r,{Z:function(){return a}});var o=t(2265),n=t(53346);function a(e){let r=o.useRef(null),t=()=>{n.Z.cancel(r.current),r.current=null};return[()=>{t(),r.current=(0,n.Z)(()=>{r.current=null})},o=>{r.current&&(o.stopPropagation(),t()),null==e||e(o)}]}},23496:function(e,r,t){t.d(r,{Z:function(){return f}});var o=t(2265),n=t(36760),a=t.n(n),l=t(71744),c=t(33759),i=t(93463),d=t(12918),s=t(99320),u=t(71140);let g=e=>{let{componentCls:r}=e;return{[r]:{"&-horizontal":{["&".concat(r)]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},b=e=>{let{componentCls:r,sizePaddingEdgeHorizontal:t,colorSplit:o,lineWidth:n,textPaddingInline:a,orientationMargin:l,verticalMarginInline:c}=e;return{[r]:Object.assign(Object.assign({},(0,d.Wf)(e)),{borderBlockStart:"".concat((0,i.bf)(n)," solid ").concat(o),"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:"".concat((0,i.bf)(n)," solid ").concat(o)},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:"".concat((0,i.bf)(e.marginLG)," 0")},["&-horizontal".concat(r,"-with-text")]:{display:"flex",alignItems:"center",margin:"".concat((0,i.bf)(e.dividerHorizontalWithTextGutterMargin)," 0"),color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:"0 ".concat(o),"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:"".concat((0,i.bf)(n)," solid transparent"),borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},["&-horizontal".concat(r,"-with-text-start")]:{"&::before":{width:"calc(".concat(l," * 100%)")},"&::after":{width:"calc(100% - ".concat(l," * 100%)")}},["&-horizontal".concat(r,"-with-text-end")]:{"&::before":{width:"calc(100% - ".concat(l," * 100%)")},"&::after":{width:"calc(".concat(l," * 100%)")}},["".concat(r,"-inner-text")]:{display:"inline-block",paddingBlock:0,paddingInline:a},"&-dashed":{background:"none",borderColor:o,borderStyle:"dashed",borderWidth:"".concat((0,i.bf)(n)," 0 0")},["&-horizontal".concat(r,"-with-text").concat(r,"-dashed")]:{"&::before, &::after":{borderStyle:"dashed none none"}},["&-vertical".concat(r,"-dashed")]:{borderInlineStartWidth:n,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:o,borderStyle:"dotted",borderWidth:"".concat((0,i.bf)(n)," 0 0")},["&-horizontal".concat(r,"-with-text").concat(r,"-dotted")]:{"&::before, &::after":{borderStyle:"dotted none none"}},["&-vertical".concat(r,"-dotted")]:{borderInlineStartWidth:n,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},["&-plain".concat(r,"-with-text")]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},["&-horizontal".concat(r,"-with-text-start").concat(r,"-no-default-orientation-margin-start")]:{"&::before":{width:0},"&::after":{width:"100%"},["".concat(r,"-inner-text")]:{paddingInlineStart:t}},["&-horizontal".concat(r,"-with-text-end").concat(r,"-no-default-orientation-margin-end")]:{"&::before":{width:"100%"},"&::after":{width:0},["".concat(r,"-inner-text")]:{paddingInlineEnd:t}}})}};var m=(0,s.I$)("Divider",e=>{let r=(0,u.IX)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[b(r),g(r)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),h=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>r.indexOf(o)&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nr.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(t[o[n]]=e[o[n]]);return t};let p={small:"sm",middle:"md"};var f=e=>{let{getPrefixCls:r,direction:t,className:n,style:i}=(0,l.dj)("divider"),{prefixCls:d,type:s="horizontal",orientation:u="center",orientationMargin:g,className:b,rootClassName:f,children:k,dashed:x,variant:v="solid",plain:w,style:C,size:y}=e,E=h(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),S=r("divider",d),[O,j,z]=m(S),M=p[(0,c.Z)(y)],N=!!k,B=o.useMemo(()=>"left"===u?"rtl"===t?"end":"start":"right"===u?"rtl"===t?"start":"end":u,[t,u]),Z="start"===B&&null!=g,I="end"===B&&null!=g,P=a()(S,n,j,z,"".concat(S,"-").concat(s),{["".concat(S,"-with-text")]:N,["".concat(S,"-with-text-").concat(B)]:N,["".concat(S,"-dashed")]:!!x,["".concat(S,"-").concat(v)]:"solid"!==v,["".concat(S,"-plain")]:!!w,["".concat(S,"-rtl")]:"rtl"===t,["".concat(S,"-no-default-orientation-margin-start")]:Z,["".concat(S,"-no-default-orientation-margin-end")]:I,["".concat(S,"-").concat(M)]:!!M},b,f),R=o.useMemo(()=>"number"==typeof g?g:/^\d+$/.test(g)?Number(g):g,[g]);return O(o.createElement("div",Object.assign({className:P,style:Object.assign(Object.assign({},i),C)},E,{role:"separator"}),k&&"vertical"!==s&&o.createElement("span",{className:"".concat(S,"-inner-text"),style:{marginInlineStart:Z?R:void 0,marginInlineEnd:I?R:void 0}},k)))}},3810:function(e,r,t){t.d(r,{Z:function(){return N}});var o=t(2265),n=t(36760),a=t.n(n),l=t(18694),c=t(93350),i=t(53445),d=t(19722),s=t(6694),u=t(71744),g=t(93463),b=t(54558),m=t(12918),h=t(71140),p=t(99320);let f=e=>{let{paddingXXS:r,lineWidth:t,tagPaddingHorizontal:o,componentCls:n,calc:a}=e,l=a(o).sub(t).equal(),c=a(r).sub(t).equal();return{[n]:Object.assign(Object.assign({},(0,m.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:"".concat((0,g.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusSM,opacity:1,transition:"all ".concat(e.motionDurationMid),textAlign:"start",position:"relative",["&".concat(n,"-rtl")]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},["".concat(n,"-close-icon")]:{marginInlineStart:c,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),"&:hover":{color:e.colorTextHeading}},["&".concat(n,"-has-color")]:{borderColor:"transparent",["&, a, a:hover, ".concat(e.iconCls,"-close, ").concat(e.iconCls,"-close:hover")]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",["&:not(".concat(n,"-checkable-checked):hover")]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},["> ".concat(e.iconCls," + span, > span + ").concat(e.iconCls)]:{marginInlineStart:l}}),["".concat(n,"-borderless")]:{borderColor:"transparent",background:e.tagBorderlessBg}}},k=e=>{let{lineWidth:r,fontSizeIcon:t,calc:o}=e,n=e.fontSizeSM;return(0,h.IX)(e,{tagFontSize:n,tagLineHeight:(0,g.bf)(o(e.lineHeightSM).mul(n).equal()),tagIconSize:o(t).sub(o(r).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},x=e=>({defaultBg:new b.t(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var v=(0,p.I$)("Tag",e=>f(k(e)),x),w=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>r.indexOf(o)&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nr.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(t[o[n]]=e[o[n]]);return t};let C=o.forwardRef((e,r)=>{let{prefixCls:t,style:n,className:l,checked:c,children:i,icon:d,onChange:s,onClick:g}=e,b=w(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:m,tag:h}=o.useContext(u.E_),p=m("tag",t),[f,k,x]=v(p),C=a()(p,"".concat(p,"-checkable"),{["".concat(p,"-checkable-checked")]:c},null==h?void 0:h.className,l,k,x);return f(o.createElement("span",Object.assign({},b,{ref:r,style:Object.assign(Object.assign({},n),null==h?void 0:h.style),className:C,onClick:e=>{null==s||s(!c),null==g||g(e)}}),d,o.createElement("span",null,i)))});var y=t(18536);let E=e=>(0,y.Z)(e,(r,t)=>{let{textColor:o,lightBorderColor:n,lightColor:a,darkColor:l}=t;return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(r)]:{color:o,background:a,borderColor:n,"&-inverse":{color:e.colorTextLightSolid,background:l,borderColor:l},["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}});var S=(0,p.bk)(["Tag","preset"],e=>E(k(e)),x);let O=(e,r,t)=>{let o="string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1);return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(r)]:{color:e["color".concat(t)],background:e["color".concat(o,"Bg")],borderColor:e["color".concat(o,"Border")],["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}};var j=(0,p.bk)(["Tag","status"],e=>{let r=k(e);return[O(r,"success","Success"),O(r,"processing","Info"),O(r,"error","Error"),O(r,"warning","Warning")]},x),z=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>r.indexOf(o)&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nr.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(t[o[n]]=e[o[n]]);return t};let M=o.forwardRef((e,r)=>{let{prefixCls:t,className:n,rootClassName:g,style:b,children:m,icon:h,color:p,onClose:f,bordered:k=!0,visible:x}=e,w=z(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:C,direction:y,tag:E}=o.useContext(u.E_),[O,M]=o.useState(!0),N=(0,l.Z)(w,["closeIcon","closable"]);o.useEffect(()=>{void 0!==x&&M(x)},[x]);let B=(0,c.o2)(p),Z=(0,c.yT)(p),I=B||Z,P=Object.assign(Object.assign({backgroundColor:p&&!I?p:void 0},null==E?void 0:E.style),b),R=C("tag",t),[T,L,q]=v(R),W=a()(R,null==E?void 0:E.className,{["".concat(R,"-").concat(p)]:I,["".concat(R,"-has-color")]:p&&!I,["".concat(R,"-hidden")]:!O,["".concat(R,"-rtl")]:"rtl"===y,["".concat(R,"-borderless")]:!k},n,g,L,q),H=e=>{e.stopPropagation(),null==f||f(e),e.defaultPrevented||M(!1)},[,X]=(0,i.b)((0,i.w)(e),(0,i.w)(E),{closable:!1,closeIconRender:e=>{let r=o.createElement("span",{className:"".concat(R,"-close-icon"),onClick:H},e);return(0,d.wm)(e,r,e=>({onClick:r=>{var t;null===(t=null==e?void 0:e.onClick)||void 0===t||t.call(e,r),H(r)},className:a()(null==e?void 0:e.className,"".concat(R,"-close-icon"))}))}}),K="function"==typeof w.onClick||m&&"a"===m.type,Y=h||null,_=Y?o.createElement(o.Fragment,null,Y,m&&o.createElement("span",null,m)):m,V=o.createElement("span",Object.assign({},N,{ref:r,className:W,style:P}),_,X,B&&o.createElement(S,{key:"preset",prefixCls:R}),Z&&o.createElement(j,{key:"status",prefixCls:R}));return T(K?o.createElement(s.Z,{component:"Tag"},V):V)});M.CheckableTag=C;var N=M},20873:function(e,r,t){var o=t(1119),n=t(31686),a=t(11993),l=t(26365),c=t(6989),i=t(36760),d=t.n(i),s=t(50506),u=t(2265),g=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],b=(0,u.forwardRef)(function(e,r){var t=e.prefixCls,i=void 0===t?"rc-checkbox":t,b=e.className,m=e.style,h=e.checked,p=e.disabled,f=e.defaultChecked,k=e.type,x=void 0===k?"checkbox":k,v=e.title,w=e.onChange,C=(0,c.Z)(e,g),y=(0,u.useRef)(null),E=(0,u.useRef)(null),S=(0,s.Z)(void 0!==f&&f,{value:h}),O=(0,l.Z)(S,2),j=O[0],z=O[1];(0,u.useImperativeHandle)(r,function(){return{focus:function(e){var r;null===(r=y.current)||void 0===r||r.focus(e)},blur:function(){var e;null===(e=y.current)||void 0===e||e.blur()},input:y.current,nativeElement:E.current}});var M=d()(i,b,(0,a.Z)((0,a.Z)({},"".concat(i,"-checked"),j),"".concat(i,"-disabled"),p));return u.createElement("span",{className:M,title:v,style:m,ref:E},u.createElement("input",(0,o.Z)({},C,{className:"".concat(i,"-input"),ref:y,onChange:function(r){p||("checked"in e||z(r.target.checked),null==w||w({target:(0,n.Z)((0,n.Z)({},e),{},{type:x,checked:r.target.checked}),stopPropagation:function(){r.stopPropagation()},preventDefault:function(){r.preventDefault()},nativeEvent:r.nativeEvent}))},disabled:p,checked:!!j,type:x})),u.createElement("span",{className:"".concat(i,"-inner")}))});r.Z=b},10900:function(e,r,t){var o=t(2265);let n=o.forwardRef(function(e,r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});r.Z=n},86462:function(e,r,t){var o=t(2265);let n=o.forwardRef(function(e,r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});r.Z=n},44633:function(e,r,t){var o=t(2265);let n=o.forwardRef(function(e,r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});r.Z=n},93416:function(e,r,t){var o=t(2265);let n=o.forwardRef(function(e,r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});r.Z=n},49084:function(e,r,t){var o=t(2265);let n=o.forwardRef(function(e,r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});r.Z=n},74998:function(e,r,t){var o=t(2265);let n=o.forwardRef(function(e,r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});r.Z=n}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6399-3ed249931e03bab9.js b/litellm/proxy/_experimental/out/_next/static/chunks/6399-3ed249931e03bab9.js
new file mode 100644
index 00000000000..e8bae810485
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/6399-3ed249931e03bab9.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6399],{12579:function(e,t,s){s.d(t,{RM:function(){return a.Z},SC:function(){return c.Z},iA:function(){return r.Z},pj:function(){return l.Z},ss:function(){return o.Z},xs:function(){return i.Z},zx:function(){return n.Z}});var n=s(78489),r=s(21626),a=s(97214),l=s(28241),o=s(58834),i=s(69552),c=s(71876)},56399:function(e,t,s){s.d(t,{Z:function(){return eQ}});var n=s(57437),r=s(2265),a=s(16312),l=s(22116),o=s(19250),i=s(12579),c=s(74998),d=s(44633),m=s(86462),p=s(49084),x=s(99981),u=s(23639),h=s(71594),g=s(24525),v=s(42673);let f=e=>{let t=new Set,s=/\{\{(\w+)\}\}/g;if(e.messages.forEach(e=>{let n;for(;null!==(n=s.exec(e.content));)t.add(n[1])}),e.developerMessage){let n;for(;null!==(n=s.exec(e.developerMessage));)t.add(n[1])}return Array.from(t)},j=e=>{let t=f(e),s="---\nmodel: ".concat(e.model,"\n");return void 0!==e.config.temperature&&(s+="temperature: ".concat(e.config.temperature,"\n")),void 0!==e.config.max_tokens&&(s+="max_tokens: ".concat(e.config.max_tokens,"\n")),void 0!==e.config.top_p&&(s+="top_p: ".concat(e.config.top_p,"\n")),s+="input:\n schema:\n",t.forEach(e=>{s+=" ".concat(e,": string\n")}),s+="output:\n format: text\n",e.tools&&e.tools.length>0&&(s+="tools:\n",e.tools.forEach(e=>{let t=JSON.parse(e.json);s+=" - ".concat(JSON.stringify(t),"\n")})),s+="---\n\n",e.developerMessage&&""!==e.developerMessage.trim()&&(s+="Developer: ".concat(e.developerMessage.trim(),"\n\n")),e.messages.forEach(e=>{let t=e.role.charAt(0).toUpperCase()+e.role.slice(1);s+="".concat(t,": ").concat(e.content,"\n\n")}),s.trim()},y=e=>{let t=Number(e);return Number.isFinite(t)?t:void 0},b=e=>{let t=[],s=!1;for(let a of e){let e=a.trim();if(!s){("tools:"===e||e.startsWith("tools:"))&&(s=!0);continue}if(a.length>0&&!/^\s/.test(a)&&"-"!==e&&!e.startsWith("-"))break;let l=e.match(/^-+\s*(.+)$/);if(!l)continue;let o=l[1].trim();if(o)try{var n,r;let e=JSON.parse(o);t.push({name:(null==e?void 0:null===(n=e.function)||void 0===n?void 0:n.name)||"Unnamed Tool",description:(null==e?void 0:null===(r=e.function)||void 0===r?void 0:r.description)||"",json:JSON.stringify(e,null,2)})}catch(e){}}return t},N=e=>{let t={config:{},tools:[]},s=e.split("\n");for(let e of(t.tools=b(s),s)){let s=e.trim();if(!s||s.startsWith("input:")||s.startsWith("output:")||s.startsWith("schema:")||s.startsWith("format:")||s.startsWith("tools:")||s.startsWith("-"))continue;let n=s.indexOf(":");if(n<=0)continue;let r=s.substring(0,n).trim(),a=s.substring(n+1).trim();if("model"===r){t.model=a;continue}"temperature"===r&&(t.config.temperature=y(a)),"max_tokens"===r&&(t.config.max_tokens=y(a)),"top_p"===r&&(t.config.top_p=y(a))}return t},w=e=>{let t=/^(System|Developer|User|Assistant):(?:\s(.*)|\s*)$/,s=[],n="",r=null,a=[],l=()=>{if(!r)return;let e=a.join("\n").trim();"developer"===r?e&&(n=n?"".concat(n,"\n\n").concat(e):e):e?s.push({role:r,content:e}):s.push({role:r,content:""})};for(let s of e.split("\n")){let e=s.match(t);if(e){var o;l(),r=e[1].toLowerCase(),a=[null!==(o=e[2])&&void 0!==o?o:""];continue}r&&a.push(s)}return l(),{developerMessage:n,messages:s}},_=e=>{var t,s,n;let r=(null==e?void 0:null===(s=e.prompt_spec)||void 0===s?void 0:null===(t=s.litellm_params)||void 0===t?void 0:t.dotprompt_content)||"";if(!r)throw Error("No dotprompt_content found in API response");let a=r.split("---");if(a.length<3)throw Error("Invalid dotprompt format");let l=a[1],o=a.slice(2).join("---").trim(),i=N(l),c=w(o),d=(null==e?void 0:null===(n=e.prompt_spec)||void 0===n?void 0:n.prompt_id)||"Unnamed Prompt";return{name:k(d)||d,model:i.model||"gpt-4o",config:i.config,tools:i.tools,developerMessage:c.developerMessage,messages:c.messages.length>0?c.messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}]}},C=e=>{if(!e)return"1";let t=e.match(/[._-]v(\d+)$/);return t?t[1]:"1"},k=e=>e?e.replace(/[._-]v\d+$/,""):"",S=e=>{let t;if(!e)return{};let s={},n=/\{\{(\w+)\}\}/g;for(;null!==(t=n.exec(e));){let e=t[1];s[e]||(s[e]="example_".concat(e))}return s},Z=e=>(null==e?void 0:e.prompt_id)||"",P=e=>{var t;let s=Z(e);return(null==e?void 0:null===(t=e.litellm_params)||void 0===t?void 0:t.prompt_id)||s},T=e=>(null==e?void 0:e.version)?String(e.version):C(P(e)),D=e=>{try{var t;let s=e.litellm_params;if(null==s?void 0:s.dotprompt_content){let e=s.dotprompt_content.match(/model:\s*([^\n]+)/);if(e)return e[1].trim()}if(null==s?void 0:null===(t=s.prompt_data)||void 0===t?void 0:t.model)return s.prompt_data.model;if(null==s?void 0:s.model)return s.model;return null}catch(e){return console.error("Error extracting model:",e),null}},E=(e,t)=>{if(!e)return null;let s=t.get(e);return s&&s.providers&&s.providers.length>0?s.providers[0]:null};var O=e=>{let{promptsList:t,isLoading:s,onPromptClick:a,onDeleteClick:l,accessToken:f,isAdmin:j}=e,[y,b]=(0,r.useState)([{id:"created_at",desc:!0}]),[N,w]=(0,r.useState)(new Map);(0,r.useEffect)(()=>{(async()=>{if(f)try{let e=await (0,o.modelHubCall)(f);if(null==e?void 0:e.data){let t=new Map;e.data.forEach(e=>{t.set(e.model_group,e)}),w(t)}}catch(e){console.error("Error fetching model hub data:",e)}})()},[f]);let _=e=>e?new Date(e).toLocaleString():"-",C=e=>{navigator.clipboard.writeText(e)},k=[{header:"Prompt ID",accessorKey:"prompt_id",cell:e=>{let t=String(e.getValue()||""),s=t.length>25?"".concat(t.slice(0,25),"..."):t;return(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(x.Z,{title:t,children:(0,n.jsx)(i.zx,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate min-w-[220px] justify-start",onClick:()=>e.getValue()&&(null==a?void 0:a(e.getValue())),children:s})}),(0,n.jsx)(x.Z,{title:"Copy prompt ID",children:(0,n.jsx)(u.Z,{onClick:e=>{e.stopPropagation(),C(t)},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Model",accessorKey:"model",cell:e=>{let{row:t}=e,s=D(t.original);if(!s)return(0,n.jsx)("span",{className:"text-xs text-gray-400",children:"-"});let r=E(s,N),{logo:a}=(0,v.dr)(r||"");return(0,n.jsx)(x.Z,{title:s,children:(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:r&&a?(0,n.jsx)("img",{src:a,alt:"".concat(r," logo"),className:"w-4 h-4",onError:e=>{let t=e.currentTarget,s=t.parentElement;if(s&&s.contains(t))try{let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=(null==r?void 0:r.charAt(0))||"-",s.replaceChild(e,t)}catch(e){console.error("Failed to replace provider logo fallback:",e)}}}):(0,n.jsx)("div",{className:"w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",children:"-"})}),(0,n.jsx)("span",{className:"max-w-[15ch] truncate block",children:s})]})})}},{header:"Created At",accessorKey:"created_at",cell:e=>{let{row:t}=e,s=t.original;return(0,n.jsx)(x.Z,{title:s.created_at,children:(0,n.jsx)("span",{className:"text-xs",children:_(s.created_at)})})}},{header:"Updated At",accessorKey:"updated_at",cell:e=>{let{row:t}=e,s=t.original;return(0,n.jsx)(x.Z,{title:s.updated_at,children:(0,n.jsx)("span",{className:"text-xs",children:_(s.updated_at)})})}},{header:"Type",accessorKey:"prompt_info.prompt_type",cell:e=>{let{row:t}=e,s=t.original;return(0,n.jsx)(x.Z,{title:s.prompt_info.prompt_type,children:(0,n.jsx)("span",{className:"text-xs",children:s.prompt_info.prompt_type})})}},...j?[{header:"Actions",id:"actions",enableSorting:!1,cell:e=>{let{row:t}=e,s=t.original,r=s.prompt_id||"Unknown Prompt";return(0,n.jsx)("div",{className:"flex items-center gap-1",children:(0,n.jsx)(x.Z,{title:"Delete prompt",children:(0,n.jsx)(i.zx,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),null==l||l(s.prompt_id,r)},icon:c.Z,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],S=(0,h.b7)({data:t,columns:k,state:{sorting:y},onSortingChange:b,getCoreRowModel:(0,g.sC)(),getSortedRowModel:(0,g.tj)(),enableSorting:!0});return(0,n.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,n.jsx)("div",{className:"overflow-x-auto",children:(0,n.jsxs)(i.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,n.jsx)(i.ss,{children:S.getHeaderGroups().map(e=>(0,n.jsx)(i.SC,{children:e.headers.map(e=>(0,n.jsx)(i.xs,{className:"py-1 h-8",onClick:e.column.getToggleSortingHandler(),children:(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,h.ie)(e.column.columnDef.header,e.getContext())}),(0,n.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,n.jsx)(d.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,n.jsx)(m.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,n.jsx)(p.Z,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,n.jsx)(i.RM,{children:s?(0,n.jsx)(i.SC,{children:(0,n.jsx)(i.pj,{colSpan:k.length,className:"h-8 text-center",children:(0,n.jsx)("div",{className:"text-center text-gray-500",children:(0,n.jsx)("p",{children:"Loading..."})})})}):t.length>0?S.getRowModel().rows.map(e=>(0,n.jsx)(i.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,n.jsx)(i.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,h.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,n.jsx)(i.SC,{children:(0,n.jsx)(i.pj,{colSpan:k.length,className:"h-8 text-center",children:(0,n.jsx)("div",{className:"text-center text-gray-500",children:(0,n.jsx)("p",{children:"No prompts found"})})})})})]})})})},z=s(84717),A=s(5545),I=s(10900),L=s(93416),M=s(59872),F=s(30401),B=s(78867),R=s(9114),J=s(37592),U=s(65869),V=s(11894),W=s(19431),K=s(17906),H=s(94263),q=e=>{let{promptId:t,model:s,promptVariables:a={},accessToken:o,version:i="1",proxySettings:c}=e,[d,m]=(0,r.useState)(!1),[p,x]=(0,r.useState)("curl"),[u,h]=(0,r.useState)("basic"),[g,v]=(0,r.useState)(""),f=window.location.origin,j=null==c?void 0:c.LITELLM_UI_API_DOC_BASE_URL;j&&j.trim()?f=j:(null==c?void 0:c.PROXY_BASE_URL)&&(f=c.PROXY_BASE_URL);let y=o||"sk-1234",b=()=>{let e=Object.keys(a).length>0;if("curl"===p)return"basic"===u?"curl -X POST '".concat(f,"/chat/completions' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer ").concat(y,'\' \\\n -d \'{\n "model": "').concat(s,'",\n "prompt_id": "').concat(t,'"').concat(e?',\n "prompt_variables": '.concat(JSON.stringify(a,null,6).replace(/\n/g,"\n ")):"","\n }' | jq"):"messages"===u?"curl -X POST '".concat(f,"/chat/completions' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer ").concat(y,'\' \\\n -d \'{\n "model": "').concat(s,'",\n "prompt_id": "').concat(t,'"').concat(e?',\n "prompt_variables": '.concat(JSON.stringify(a,null,6).replace(/\n/g,"\n ")):"",',\n "messages": [\n {\n "role": "user",\n "content": "hi"\n }\n ]\n }\' | jq'):"curl -X POST '".concat(f,"/chat/completions' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer ").concat(y,'\' \\\n -d \'{\n "model": "').concat(s,'",\n "prompt_id": "').concat(t,'",\n "prompt_version": ').concat(i,',\n "messages": [\n {\n "role": "user",\n "content": "Who are u"\n }\n ]\n }\' | jq');if("python"===p){let n='import openai\n\nclient = openai.OpenAI(\n api_key="'.concat(y,'",\n base_url="').concat(f,'"\n)\n');return"basic"===u?"".concat(n,'\nresponse = client.chat.completions.create(\n model="').concat(s,'",\n extra_body={\n "prompt_id": "').concat(t,'"').concat(e?',\n "prompt_variables": '.concat(JSON.stringify(a,null,8).replace(/\n/g,"\n ")):"","\n }\n)\n\nprint(response)"):"messages"===u?"".concat(n,'\nresponse = client.chat.completions.create(\n model="').concat(s,'",\n messages=[\n {"role": "user", "content": "hi"}\n ],\n extra_body={\n "prompt_id": "').concat(t,'"').concat(e?',\n "prompt_variables": '.concat(JSON.stringify(a,null,8).replace(/\n/g,"\n ")):"","\n }\n)\n\nprint(response)"):"".concat(n,'\nresponse = client.chat.completions.create(\n model="').concat(s,'",\n messages=[\n {"role": "user", "content": "Who are u"}\n ],\n extra_body={\n "prompt_id": "').concat(t,'",\n "prompt_version": ').concat(i,"\n }\n)\n\nprint(response)")}{let n="import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: \"".concat(y,'",\n baseURL: "').concat(f,'"\n});\n');return"basic"===u?"".concat(n,'\nasync function main() {\n const response = await client.chat.completions.create({\n model: "').concat(s,'",\n ').concat(e?'prompt_id: "'.concat(t,'",\n prompt_variables: ').concat(JSON.stringify(a,null,8).replace(/\n/g,"\n ")):'prompt_id: "'.concat(t,'"'),"\n });\n \n console.log(response);\n}\n\nmain();"):"messages"===u?"".concat(n,'\nasync function main() {\n const response = await client.chat.completions.create({\n model: "').concat(s,'",\n messages: [\n { role: "user", content: "hi" }\n ],\n ').concat(e?'prompt_id: "'.concat(t,'",\n prompt_variables: ').concat(JSON.stringify(a,null,8).replace(/\n/g,"\n ")):'prompt_id: "'.concat(t,'"'),"\n });\n \n console.log(response);\n}\n\nmain();"):"".concat(n,'\nasync function main() {\n const response = await client.chat.completions.create({\n model: "').concat(s,'",\n messages: [\n { role: "user", content: "Who are u" }\n ],\n prompt_id: "').concat(t,'",\n prompt_version: ').concat(i,"\n });\n \n console.log(response);\n}\n\nmain();")}};return r.useEffect(()=>{d&&v(b())},[d,p,u,t,s,a]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(W.z,{variant:"secondary",icon:V.Z,onClick:()=>{m(!0)},children:"Get Code"}),(0,n.jsxs)(l.Z,{title:"Generated Code",open:d,onCancel:()=>{m(!1)},footer:null,width:800,children:[(0,n.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(W.x,{className:"font-medium block mb-1 text-gray-700",children:"Language"}),(0,n.jsx)(J.default,{value:p,onChange:e=>x(e),style:{width:180},options:[{value:"curl",label:"cURL"},{value:"python",label:"Python (OpenAI SDK)"},{value:"javascript",label:"JavaScript (OpenAI SDK)"}]})]}),(0,n.jsx)(A.ZP,{onClick:()=>{navigator.clipboard.writeText(g),R.Z.success("Copied to clipboard!")},children:"Copy to Clipboard"})]}),(0,n.jsx)(U.default,{activeKey:u,onChange:h,items:[{label:"Basic",key:"basic"},{label:"With Messages",key:"messages"},{label:"With Version",key:"version"}]}),(0,n.jsx)(K.Z,{language:"curl"===p?"bash":"python"===p?"python":"javascript",style:H.Z,wrapLines:!0,wrapLongLines:!0,className:"rounded-md mt-0",customStyle:{maxHeight:"60vh",overflowY:"auto",marginTop:0,borderTopLeftRadius:0,borderTopRightRadius:0},children:g})]})]})},G=e=>{var t,s,a;let{promptId:i,onClose:d,accessToken:m,isAdmin:p,onDelete:x,onEdit:u}=e,[h,g]=(0,r.useState)(null),[v,f]=(0,r.useState)(null),[j,y]=(0,r.useState)(null),[b,N]=(0,r.useState)(!0),[w,_]=(0,r.useState)({}),[C,k]=(0,r.useState)(!1),[P,E]=(0,r.useState)(!1),O=async()=>{try{if(N(!0),!m)return;let e=await (0,o.getPromptInfo)(m,i);g(e.prompt_spec),f(e.raw_prompt_template),y(e)}catch(e){R.Z.fromBackend("Failed to load prompt information"),console.error("Error fetching prompt info:",e)}finally{N(!1)}};if((0,r.useEffect)(()=>{O()},[i,m]),b)return(0,n.jsx)("div",{className:"p-4",children:"Loading..."});if(!h)return(0,n.jsx)("div",{className:"p-4",children:"Prompt not found"});let J=e=>e?new Date(e).toLocaleString():"-",U=async(e,t)=>{await (0,M.vQ)(e)&&(_(e=>({...e,[t]:!0})),setTimeout(()=>{_(e=>({...e,[t]:!1}))},2e3))},V=async()=>{if(m&&h){E(!0);try{await (0,o.deletePromptCall)(m,K),R.Z.success('Prompt "'.concat(K,'" deleted successfully')),null==x||x(),d()}catch(e){console.error("Error deleting prompt:",e),R.Z.fromBackend("Failed to delete prompt")}finally{E(!1),k(!1)}}},W=h&&D(h)||"gpt-4o",K=Z(h),H=T(h);return(0,n.jsxs)("div",{className:"p-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(z.zx,{icon:I.Z,variant:"light",onClick:d,className:"mb-4",children:"Back to Prompts"}),(0,n.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(z.Dx,{children:"Prompt Details"}),(0,n.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,n.jsx)(z.xv,{className:"text-gray-500 font-mono",children:K}),(0,n.jsx)(A.ZP,{type:"text",size:"small",icon:w["prompt-id"]?(0,n.jsx)(F.Z,{size:12}):(0,n.jsx)(B.Z,{size:12}),onClick:()=>U(K,"prompt-id"),className:"left-2 z-10 transition-all duration-200 ".concat(w["prompt-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(q,{promptId:K,model:W,promptVariables:S(null==v?void 0:v.content),accessToken:m,version:H}),(0,n.jsx)(z.zx,{icon:L.Z,variant:"primary",onClick:()=>null==u?void 0:u(j),className:"flex items-center",children:"Prompt Studio"}),p&&(0,n.jsx)(z.zx,{icon:c.Z,variant:"secondary",onClick:()=>{k(!0)},className:"flex items-center",children:"Delete Prompt"})]})]})]}),(0,n.jsxs)(z.v0,{children:[(0,n.jsxs)(z.td,{className:"mb-4",children:[(0,n.jsx)(z.OK,{children:"Overview"},"overview"),v?(0,n.jsx)(z.OK,{children:"Prompt Template"},"prompt-template"):(0,n.jsx)(n.Fragment,{}),p?(0,n.jsx)(z.OK,{children:"Details"},"details"):(0,n.jsx)(n.Fragment,{}),(0,n.jsx)(z.OK,{children:"Raw JSON"},"raw-json")]}),(0,n.jsxs)(z.nP,{children:[(0,n.jsxs)(z.x4,{children:[(0,n.jsxs)(z.rj,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,n.jsxs)(z.Zb,{children:[(0,n.jsx)(z.xv,{children:"Prompt ID"}),(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)(z.Dx,{className:"font-mono text-sm",children:K})})]}),(0,n.jsxs)(z.Zb,{children:[(0,n.jsx)(z.xv,{children:"Version"}),(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)(z.Dx,{children:H}),(0,n.jsxs)(z.Ct,{color:"blue",className:"mt-1",children:["v",H]})]})]}),(0,n.jsxs)(z.Zb,{children:[(0,n.jsx)(z.xv,{children:"Prompt Type"}),(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)(z.Dx,{children:(null===(t=h.prompt_info)||void 0===t?void 0:t.prompt_type)||"-"}),(0,n.jsx)(z.Ct,{color:"blue",className:"mt-1",children:(null===(s=h.prompt_info)||void 0===s?void 0:s.prompt_type)||"Unknown"})]})]}),(0,n.jsxs)(z.Zb,{children:[(0,n.jsx)(z.xv,{children:"Created At"}),(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)(z.Dx,{children:J(h.created_at)}),(0,n.jsxs)(z.xv,{children:["Last Updated: ",J(h.updated_at)]})]})]})]}),h.litellm_params&&Object.keys(h.litellm_params).length>0&&(0,n.jsxs)(z.Zb,{className:"mt-6",children:[(0,n.jsx)(z.xv,{className:"font-medium",children:"LiteLLM Parameters"}),(0,n.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md",children:(0,n.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(h.litellm_params,null,2)})})]})]}),v&&(0,n.jsx)(z.x4,{children:(0,n.jsxs)(z.Zb,{children:[(0,n.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,n.jsx)(z.Dx,{children:"Prompt Template"}),(0,n.jsx)(A.ZP,{type:"text",size:"small",icon:w["prompt-content"]?(0,n.jsx)(F.Z,{size:16}):(0,n.jsx)(B.Z,{size:16}),onClick:()=>U(v.content,"prompt-content"),className:"transition-all duration-200 ".concat(w["prompt-content"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"),children:w["prompt-content"]?"Copied!":"Copy Content"})]}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(z.xv,{className:"font-medium",children:"Template ID"}),(0,n.jsx)("div",{className:"font-mono text-sm bg-gray-50 p-2 rounded",children:v.litellm_prompt_id})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(z.xv,{className:"font-medium",children:"Content"}),(0,n.jsx)("div",{className:"mt-2 p-4 bg-gray-50 rounded-md border overflow-auto max-h-96",children:(0,n.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:v.content})})]}),v.metadata&&Object.keys(v.metadata).length>0&&(0,n.jsxs)("div",{children:[(0,n.jsx)(z.xv,{className:"font-medium",children:"Template Metadata"}),(0,n.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,n.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap overflow-auto max-h-64",children:JSON.stringify(v.metadata,null,2)})})]})]})]})}),p&&(0,n.jsx)(z.x4,{children:(0,n.jsxs)(z.Zb,{children:[(0,n.jsx)(z.Dx,{className:"mb-4",children:"Prompt Details"}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(z.xv,{className:"font-medium",children:"Prompt ID"}),(0,n.jsx)("div",{className:"font-mono text-sm bg-gray-50 p-2 rounded",children:K})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(z.xv,{className:"font-medium",children:"Prompt Type"}),(0,n.jsx)("div",{children:(null===(a=h.prompt_info)||void 0===a?void 0:a.prompt_type)||"-"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(z.xv,{className:"font-medium",children:"Created At"}),(0,n.jsx)("div",{children:J(h.created_at)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(z.xv,{className:"font-medium",children:"Last Updated"}),(0,n.jsx)("div",{children:J(h.updated_at)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(z.xv,{className:"font-medium",children:"LiteLLM Parameters"}),(0,n.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,n.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap overflow-auto max-h-96",children:JSON.stringify(h.litellm_params,null,2)})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(z.xv,{className:"font-medium",children:"Prompt Info"}),(0,n.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,n.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(h.prompt_info,null,2)})})]})]})]})}),(0,n.jsx)(z.x4,{children:(0,n.jsxs)(z.Zb,{children:[(0,n.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,n.jsx)(z.Dx,{children:"Raw API Response"}),(0,n.jsx)(A.ZP,{type:"text",size:"small",icon:w["raw-json"]?(0,n.jsx)(F.Z,{size:16}):(0,n.jsx)(B.Z,{size:16}),onClick:()=>U(JSON.stringify(j,null,2),"raw-json"),className:"transition-all duration-200 ".concat(w["raw-json"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"),children:w["raw-json"]?"Copied!":"Copy JSON"})]}),(0,n.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border overflow-auto",children:(0,n.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(j,null,2)})})]})})]})]}),(0,n.jsxs)(l.Z,{title:"Delete Prompt",open:C,onOk:V,onCancel:()=>{k(!1)},confirmLoading:P,okText:"Delete",okButtonProps:{danger:!0},children:[(0,n.jsxs)("p",{children:["Are you sure you want to delete prompt: ",(0,n.jsx)("strong",{children:K}),"?"]}),(0,n.jsx)("p",{children:"This action cannot be undone."})]})]})},X=s(10032),Y=s(23496),$=s(65319),Q=s(31283),ee=s(3632);let{Option:et}=J.default;var es=e=>{let{visible:t,onClose:s,accessToken:a,onSuccess:i}=e,[c]=X.Z.useForm(),[d,m]=(0,r.useState)(!1),[p,x]=(0,r.useState)([]),[u,h]=(0,r.useState)("dotprompt"),g=()=>{c.resetFields(),x([]),h("dotprompt"),s()},v=async()=>{try{let e=await c.validateFields();if(console.log("values: ",e),!a){R.Z.fromBackend("Access token is required");return}if("dotprompt"===u&&0===p.length){R.Z.fromBackend("Please upload a .prompt file");return}m(!0);let t={};if("dotprompt"===u&&p.length>0){let s=p[0].originFileObj;try{let n=await (0,o.convertPromptFileToJson)(a,s);console.log("Conversion result:",n),t={prompt_id:e.prompt_id,litellm_params:{prompt_integration:"dotprompt",prompt_id:n.prompt_id,prompt_data:n.json_data},prompt_info:{prompt_type:"db"}}}catch(e){console.error("Error converting prompt file:",e),R.Z.fromBackend("Failed to convert prompt file to JSON"),m(!1);return}}try{await (0,o.createPromptCall)(a,t),R.Z.success("Prompt created successfully!"),g(),i()}catch(e){console.error("Error creating prompt:",e),R.Z.fromBackend("Failed to create prompt")}}catch(e){console.error("Form validation error:",e)}finally{m(!1)}};return(0,n.jsx)(l.Z,{title:"Add New Prompt",open:t,onCancel:g,footer:[(0,n.jsx)(A.ZP,{onClick:g,children:"Cancel"},"cancel"),(0,n.jsx)(A.ZP,{loading:d,onClick:v,children:"Create Prompt"},"submit")],width:600,children:(0,n.jsxs)(X.Z,{form:c,layout:"vertical",requiredMark:!1,children:[(0,n.jsx)(X.Z.Item,{label:"Prompt ID",name:"prompt_id",rules:[{required:!0,message:"Please enter a prompt ID"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Prompt ID can only contain letters, numbers, underscores, and hyphens"}],children:(0,n.jsx)(Q.o,{placeholder:"Enter unique prompt ID (e.g., my_prompt_id)"})}),(0,n.jsx)(X.Z.Item,{label:"Prompt Integration",name:"prompt_integration",initialValue:"dotprompt",children:(0,n.jsx)(J.default,{value:u,onChange:h,children:(0,n.jsx)(et,{value:"dotprompt",children:"dotprompt"})})}),"dotprompt"===u&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Y.Z,{}),(0,n.jsxs)(X.Z.Item,{label:"Prompt File",extra:"Upload a .prompt file that follows the Dotprompt specification",children:[(0,n.jsx)($.default,{beforeUpload:e=>(e.name.endsWith(".prompt")||R.Z.fromBackend("Please upload a .prompt file"),!1),fileList:p,onChange:e=>{let{fileList:t}=e;x(t.slice(-1))},onRemove:()=>{x([])},children:(0,n.jsx)(A.ZP,{icon:(0,n.jsx)(ee.Z,{}),children:"Select .prompt File"})}),p.length>0&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-600",children:["Selected: ",p[0].name]})]})]})]})})},en=e=>{let{visible:t,initialJson:s,onSave:a,onClose:o}=e,[i,c]=(0,r.useState)(s||'{\n "type": "function",\n "function": {\n "name": "get_current_weather",\n "description": "Get the current weather in a given location",\n "parameters": {\n "type": "object",\n "properties": {\n "location": {\n "type": "string",\n "description": "The city and state, e.g. San Francisco, CA"\n },\n "unit": {\n "type": "string",\n "enum": ["celsius", "fahrenheit"]\n }\n },\n "required": ["location"]\n }\n }\n}'),[d,m]=(0,r.useState)(null),p=()=>{m(null),o()};return(0,n.jsx)(l.Z,{title:(0,n.jsx)("div",{className:"flex items-center justify-between",children:(0,n.jsx)("span",{className:"text-lg font-medium",children:"Add Tool"})}),open:t,onCancel:p,width:800,footer:[(0,n.jsx)(A.ZP,{onClick:p,children:"Cancel"},"cancel"),(0,n.jsx)(A.ZP,{type:"primary",onClick:()=>{try{JSON.parse(i),m(null),a(i)}catch(e){m("Invalid JSON format. Please check your syntax.")}},children:"Add"},"save")],children:(0,n.jsxs)("div",{className:"space-y-3",children:[d&&(0,n.jsx)("div",{className:"p-3 bg-red-50 border border-red-200 rounded text-red-600 text-sm",children:d}),(0,n.jsx)("textarea",{value:i,onChange:e=>c(e.target.value),className:"w-full min-h-[400px] px-4 py-3 border border-gray-300 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none",placeholder:"Paste your tool JSON here..."})]})})},er=s(4260),ea=s(32660),el=s(91723),eo=s(83229),ei=e=>{let{promptName:t,onNameChange:s,onBack:r,onSave:l,isSaving:o,editMode:i=!1,onShowHistory:c,version:d,promptModel:m="gpt-4o",promptVariables:p={},accessToken:x,proxySettings:u}=e;return(0,n.jsxs)("div",{className:"bg-white border-b border-gray-200 px-6 py-3 flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,n.jsx)(a.z,{icon:ea.Z,variant:"light",onClick:r,size:"xs",children:"Back"}),(0,n.jsx)(er.default,{value:t,onChange:e=>s(e.target.value),className:"text-base font-medium border-none shadow-none",style:{width:"200px"}}),d&&(0,n.jsx)("span",{className:"px-2 py-0.5 text-xs bg-blue-100 text-blue-700 rounded font-medium",children:d}),(0,n.jsx)("span",{className:"px-2 py-0.5 text-xs bg-gray-100 text-gray-600 rounded",children:"Draft"}),(0,n.jsx)("span",{className:"text-xs text-gray-400",children:"Unsaved changes"})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsx)(q,{promptId:t,model:m,promptVariables:p,accessToken:x,version:(null==d?void 0:d.replace("v",""))||"1",proxySettings:u}),i&&c&&(0,n.jsx)(a.z,{icon:el.Z,variant:"secondary",onClick:c,children:"History"}),(0,n.jsx)(a.z,{icon:eo.Z,onClick:l,loading:o,disabled:o,children:i?"Update":"Save"})]})]})},ec=s(92280),ed=s(98728),em=s(76593),ep=e=>{let{model:t,temperature:s=1,maxTokens:a=1e3,accessToken:l,onModelChange:o,onTemperatureChange:i,onMaxTokensChange:c}=e,[d,m]=(0,r.useState)(!1);return(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:"w-[300px]",children:(0,n.jsx)(em.Z,{accessToken:l||"",value:t,onChange:o,showLabel:!1})}),(0,n.jsxs)("button",{onClick:()=>m(!d),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50",children:[(0,n.jsx)(ed.Z,{size:16}),(0,n.jsx)("span",{children:"Parameters"})]}),d&&(0,n.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-30",children:(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow-xl p-6 w-96",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsx)("h3",{className:"text-lg font-semibold",children:"Model Parameters"}),(0,n.jsx)("button",{onClick:()=>m(!1),className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{children:(0,n.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,n.jsx)(ec.x,{className:"text-sm text-gray-700",children:"Temperature"}),(0,n.jsx)(er.default,{type:"number",size:"small",min:0,max:2,step:.1,value:s,onChange:e=>i(parseFloat(e.target.value)||0),className:"w-20"})]})}),(0,n.jsx)("div",{children:(0,n.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,n.jsx)(ec.x,{className:"text-sm text-gray-700",children:"Max Tokens"}),(0,n.jsx)(er.default,{type:"number",size:"small",min:1,max:32768,value:a,onChange:e=>c(parseInt(e.target.value)||1e3),className:"w-24"})]})})]})]})})]})},ex=s(78801),eu=s(99397),eh=s(27413),eg=e=>{let{tools:t,onAddTool:s,onEditTool:r,onRemoveTool:a}=e;return(0,n.jsxs)(ex.Z,{className:"p-3",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,n.jsx)(ex.x,{className:"text-sm font-medium",children:"Tools"}),(0,n.jsxs)("button",{onClick:s,className:"text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,n.jsx)(eu.Z,{size:14,className:"mr-1"}),"Add"]})]}),0===t.length?(0,n.jsx)(ex.x,{className:"text-gray-500 text-xs",children:"No tools added"}):(0,n.jsx)("div",{className:"space-y-2",children:t.map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center justify-between p-2 bg-gray-50 border border-gray-200 rounded",children:[(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)("div",{className:"font-medium text-xs truncate",children:e.name}),(0,n.jsx)("div",{className:"text-xs text-gray-500 truncate",children:e.description})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-1 ml-2",children:[(0,n.jsx)("button",{onClick:()=>r(t),className:"text-xs text-blue-600 hover:text-blue-700",children:"Edit"}),(0,n.jsx)("button",{onClick:()=>a(t),className:"text-gray-400 hover:text-red-500",children:(0,n.jsx)(eh.Z,{size:14})})]})]},t))})]})},ev=s(79326),ef=s(3810),ej=s(13377);let{TextArea:ey}=er.default;var eb=e=>{let{value:t,onChange:s,placeholder:a,rows:l=4,className:o}=e,[i,c]=(0,r.useState)(null),[d,m]=(0,r.useState)(""),p=()=>{d.trim()&&i&&(s(t.substring(0,i.start)+"{{".concat(d,"}}")+t.substring(i.end)),c(null),m(""))},x=(()=>{let e;let s=/\{\{(\w+)\}\}/g,n=[];for(;null!==(e=s.exec(t));)n.push({name:e[1],start:e.index,end:e.index+e[0].length});return n})();return(0,n.jsxs)("div",{className:"variable-textarea-container ".concat(o),children:[(0,n.jsx)("style",{children:"\n .variable-highlight-text {\n color: #f97316;\n background-color: #fff7ed;\n border-radius: 4px;\n padding: 0 2px;\n border: 1px solid #fed7aa;\n font-family: monospace;\n }\n "}),(0,n.jsx)(ey,{value:t,onChange:e=>s(e.target.value),placeholder:a,rows:l,className:"font-sans"}),x.length>0&&(0,n.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 items-center",children:[(0,n.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Detected variables:"}),x.map((e,t)=>(0,n.jsx)(ev.Z,{content:(0,n.jsxs)("div",{className:"p-2",style:{minWidth:"200px"},children:[(0,n.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"Edit variable name"}),(0,n.jsx)(er.default,{size:"small",value:d,onChange:e=>m(e.target.value),onPressEnter:p,placeholder:"Variable name",autoFocus:!0}),(0,n.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,n.jsx)("button",{onClick:p,className:"text-xs px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Save"}),(0,n.jsx)("button",{onClick:()=>{c(null),m("")},className:"text-xs px-2 py-1 bg-gray-200 text-gray-700 rounded hover:bg-gray-300",children:"Cancel"})]})]}),open:(null==i?void 0:i.start)===e.start,onOpenChange:e=>{e||(c(null),m(""))},trigger:"click",children:(0,n.jsx)(ef.Z,{color:"orange",className:"cursor-pointer hover:opacity-80 transition-all m-0",icon:(0,n.jsx)(ej.Z,{}),onClick:()=>{c({oldName:e.name,start:e.start,end:e.end}),m(e.name)},children:e.name})},"".concat(e.start,"-").concat(t)))]})]})},eN=e=>{let{value:t,onChange:s}=e;return(0,n.jsxs)(ex.Z,{className:"p-3",children:[(0,n.jsx)(ex.x,{className:"block mb-2 text-sm font-medium",children:"Developer message"}),(0,n.jsx)(ex.x,{className:"text-gray-500 text-xs mb-2",children:"Optional system instructions for the model"}),(0,n.jsx)(eb,{value:t,onChange:s,rows:3,placeholder:"e.g., You are a helpful assistant..."})]})},ew=s(41905);let{Option:e_}=J.default;var eC=e=>{let{messages:t,onAddMessage:s,onUpdateMessage:a,onRemoveMessage:l,onMoveMessage:o}=e,[i,c]=(0,r.useState)(null),[d,m]=(0,r.useState)(null),p=e=>{c(e)},x=(e,t)=>{e.preventDefault(),m(t)},u=(e,t)=>{e.preventDefault(),null!==i&&i!==t&&o(i,t),c(null),m(null)},h=()=>{c(null),m(null)};return(0,n.jsxs)(ex.Z,{className:"p-3",children:[(0,n.jsxs)("div",{className:"mb-2",children:[(0,n.jsx)(ex.x,{className:"text-sm font-medium",children:"Prompt messages"}),(0,n.jsxs)(ex.x,{className:"text-gray-500 text-xs mt-1",children:["Use ",(0,n.jsx)("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"{{variable}}"})," syntax for template variables"]})]}),(0,n.jsx)("div",{className:"space-y-2",children:t.map((e,s)=>(0,n.jsxs)("div",{draggable:!0,onDragStart:()=>p(s),onDragOver:e=>x(e,s),onDrop:e=>u(e,s),onDragEnd:h,className:"border border-gray-300 rounded overflow-hidden bg-white transition-all ".concat(i===s?"opacity-50":""," ").concat(d===s&&i!==s?"border-blue-500 border-2":""),children:[(0,n.jsxs)("div",{className:"bg-gray-50 px-2 py-1.5 border-b border-gray-300 flex items-center justify-between",children:[(0,n.jsxs)(J.default,{value:e.role,onChange:e=>a(s,"role",e),style:{width:100},size:"small",bordered:!1,children:[(0,n.jsx)(e_,{value:"user",children:"User"}),(0,n.jsx)(e_,{value:"assistant",children:"Assistant"}),(0,n.jsx)(e_,{value:"system",children:"System"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[t.length>1&&(0,n.jsx)("button",{onClick:()=>l(s),className:"text-gray-400 hover:text-red-500",children:(0,n.jsx)(eh.Z,{size:14})}),(0,n.jsx)("div",{className:"cursor-grab active:cursor-grabbing text-gray-400 hover:text-gray-600",children:(0,n.jsx)(ew.Z,{size:16})})]})]}),(0,n.jsx)("div",{className:"p-2",children:(0,n.jsx)(eb,{value:e.content,onChange:e=>a(s,"content",e),rows:3,placeholder:"Enter prompt content..."})})]},s))}),(0,n.jsxs)("button",{onClick:s,className:"mt-2 text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,n.jsx)(eu.Z,{size:14,className:"mr-1"}),"Add message"]})]})},ek=s(26430);let eS=(e,t)=>{let[s,n]=(0,r.useState)(!1),[a,l]=(0,r.useState)([]),[i,c]=(0,r.useState)(""),[d,m]=(0,r.useState)({}),[p,x]=(0,r.useState)(!1),[u,h]=(0,r.useState)(null),g=(0,r.useRef)(null),v=f(e),y=v.every(e=>d[e]&&""!==d[e].trim()),b=()=>{g.current&&setTimeout(()=>{var e;null===(e=g.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end"})},100)};(0,r.useEffect)(()=>{b()},[a]);let N=async()=>{let s;if(!t){R.Z.fromBackend("Access token is required");return}if(v.length>0&&!y){R.Z.fromBackend("Please fill in all template variables");return}if(!i.trim())return;!p&&v.length>0&&x(!0);let r={role:"user",content:i};l(e=>[...e,r]),c("");let m=new AbortController;h(m),n(!0);let u=Date.now();try{let n,r;let c=j(e),p=(0,o.getProxyBaseUrl)(),x={dotprompt_content:c};0===a.length?x.prompt_variables=d:x.conversation_history=[...a.map(e=>({role:e.role,content:e.content})),{role:"user",content:i}];let h=await fetch("".concat(p,"/prompts/test"),{method:"POST",headers:{[(0,o.getGlobalLitellmHeaderName)()]:"Bearer ".concat(t),"Content-Type":"application/json"},body:JSON.stringify(x),signal:m.signal});if(!h.ok){let e=await h.text();throw Error("HTTP error! status: ".concat(h.status,", ").concat(e))}if(!h.body)throw Error("No response body");let v=h.body.getReader(),y=new TextDecoder,N="";for(l(e=>[...e,{role:"assistant",content:""}]);;){let{done:e,value:t}=await v.read();if(e)break;for(let e of y.decode(t).split("\n"))if(e.startsWith("data: ")){let t=e.slice(6);if("[DONE]"===t)continue;try{var g,f,b;let e=JSON.parse(t);!n&&e.model&&(n=e.model),e.usage&&(r=e.usage);let a=null===(b=e.choices)||void 0===b?void 0:null===(f=b[0])||void 0===f?void 0:null===(g=f.delta)||void 0===g?void 0:g.content;a&&(s||(s=Date.now()-u),N+=a,l(e=>{let t=[...e];return t[t.length-1]={role:"assistant",content:N,model:n,timeToFirstToken:s},t}))}catch(e){console.error("Error parsing chunk:",e)}}}let w=Date.now()-u;l(e=>{let t=[...e];return t[t.length-1]={...t[t.length-1],totalLatency:w,usage:r},t})}catch(e){"AbortError"===e.name?console.log("Request was cancelled"):(console.error("Error testing prompt:",e),l(t=>{let s=t[t.length-1];return s&&"assistant"===s.role&&""===s.content?[...t.slice(0,-1),{role:"assistant",content:"Error: ".concat(e.message)}]:[...t,{role:"assistant",content:"Error: ".concat(e.message)}]}))}finally{n(!1),h(null)}};return{isLoading:s,messages:a,inputMessage:i,variables:d,variablesFilled:p,extractedVariables:v,allVariablesFilled:y,messagesEndRef:g,setInputMessage:c,handleSendMessage:N,handleCancelRequest:()=>{u&&(u.abort(),h(null),n(!1),R.Z.info("Request cancelled"))},handleClearConversation:()=>{l([]),x(!1),R.Z.success("Chat history cleared.")},handleKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),N())},handleVariableChange:(e,t)=>{m({...d,[e]:t})}}};var eZ=e=>{let{extractedVariables:t,variables:s,onVariableChange:r}=e;return 0===t.length?null:(0,n.jsxs)("div",{className:"p-4 border-b border-gray-200 bg-blue-50",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Fill in template variables to start testing"}),(0,n.jsx)("div",{className:"space-y-2",children:t.map(e=>(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-xs text-gray-600 mb-1 font-medium",children:["{{",e,"}}"]}),(0,n.jsx)(er.default,{value:s[e]||"",onChange:t=>r(e,t.target.value),placeholder:"Enter value for ".concat(e),size:"small"})]},e))})]})},eP=s(61935),eT=s(10353),eD=s(69993),eE=e=>{let{hasVariables:t}=e;return(0,n.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,n.jsx)(eD.Z,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,n.jsx)("span",{className:"text-base",children:t?"Fill in the variables above, then type a message to start testing":"Type a message below to start testing your prompt"})]})},eO=s(15883),ez=s(62831),eA=s(38398),eI=e=>{let{message:t}=e;return(0,n.jsx)("div",{className:"mb-4 flex ".concat("user"===t.role?"justify-end":"justify-start"),children:(0,n.jsxs)("div",{className:"max-w-[85%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"user"===t.role?"#f0f8ff":"#ffffff",border:"user"===t.role?"1px solid #e6f0fa":"1px solid #f0f0f0"},children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,n.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:"user"===t.role?"#e6f0fa":"#f5f5f5"},children:"user"===t.role?(0,n.jsx)(eO.Z,{style:{fontSize:"12px",color:"#2563eb"}}):(0,n.jsx)(eD.Z,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,n.jsx)("strong",{className:"text-sm capitalize",children:t.role}),"assistant"===t.role&&t.model&&(0,n.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:t.model})]}),(0,n.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:["assistant"===t.role?(0,n.jsx)(ez.UG,{components:{code(e){let{node:t,inline:s,className:r,children:a,...l}=e,o=/language-(\w+)/.exec(r||"");return!s&&o?(0,n.jsx)(K.Z,{style:H.Z,language:o[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...l,children:String(a).replace(/\n$/,"")}):(0,n.jsx)("code",{className:"".concat(r," px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono"),style:{wordBreak:"break-word"},...l,children:a})},pre:e=>{let{node:t,...s}=e;return(0,n.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...s})}},children:t.content}):(0,n.jsx)("div",{className:"whitespace-pre-wrap",children:t.content}),"assistant"===t.role&&(t.timeToFirstToken||t.totalLatency||t.usage)&&(0,n.jsx)(eA.Z,{timeToFirstToken:t.timeToFirstToken,totalLatency:t.totalLatency,usage:t.usage})]})]})})},eL=e=>{let{messages:t,isLoading:s,hasVariables:r,messagesEndRef:a}=e,l=(0,n.jsx)(eP.Z,{style:{fontSize:24},spin:!0});return(0,n.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 pb-0",children:[0===t.length&&(0,n.jsx)(eE,{hasVariables:r}),t.map((e,t)=>(0,n.jsx)(eI,{message:e},t)),s&&(0,n.jsx)("div",{className:"flex justify-center items-center my-4",children:(0,n.jsx)(eT.Z,{indicator:l})}),(0,n.jsx)("div",{ref:a,style:{height:"1px"}})]})},eM=e=>{let{extractedVariables:t,variables:s}=e,r=t.filter(e=>!s[e]||""===s[e].trim());return 0===r.length?null:(0,n.jsx)("div",{className:"mb-3 p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,n.jsxs)("div",{className:"flex items-start gap-2",children:[(0,n.jsx)("span",{className:"text-yellow-600 text-sm",children:"⚠️"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("p",{className:"text-sm text-yellow-800 font-medium mb-1",children:"Please fill in all template variables above"}),(0,n.jsxs)("p",{className:"text-xs text-yellow-700",children:["Missing: ",r.map(e=>"{{".concat(e,"}}")).join(", ")]})]})]})})},eF=s(79276);let{TextArea:eB}=er.default;var eR=e=>{let{inputMessage:t,isLoading:s,isDisabled:r,onInputChange:l,onSend:o,onKeyDown:i,onCancel:c}=e;return(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsxs)("div",{className:"flex items-center flex-1 bg-white border border-gray-300 rounded-xl px-3 py-1 min-h-[44px]",children:[(0,n.jsx)(eB,{value:t,onChange:e=>l(e.target.value),onKeyDown:i,placeholder:"Type your message... (Shift+Enter for new line)",disabled:s,className:"flex-1",autoSize:{minRows:1,maxRows:4},style:{resize:"none",border:"none",boxShadow:"none",background:"transparent",padding:"4px 0",fontSize:"14px",lineHeight:"20px"}}),(0,n.jsx)(a.z,{onClick:o,disabled:r,className:"flex-shrink-0 ml-2 !w-8 !h-8 !min-w-8 !p-0 !rounded-full !bg-blue-600 hover:!bg-blue-700 disabled:!bg-gray-300 !border-none !text-white disabled:!text-gray-500 !flex !items-center !justify-center",children:(0,n.jsx)(eF.Z,{style:{fontSize:"14px"}})})]}),s&&(0,n.jsx)(a.z,{onClick:c,className:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200",children:"Cancel"})]})},eJ=e=>{let{prompt:t,accessToken:s}=e,{isLoading:r,messages:l,inputMessage:o,variables:i,variablesFilled:c,extractedVariables:d,allVariablesFilled:m,messagesEndRef:p,setInputMessage:x,handleSendMessage:u,handleCancelRequest:h,handleClearConversation:g,handleKeyDown:v,handleVariableChange:f}=eS(t,s);return(0,n.jsxs)("div",{className:"flex flex-col h-full bg-white",children:[!c&&(0,n.jsx)(eZ,{extractedVariables:d,variables:i,onVariableChange:f}),l.length>0&&(0,n.jsx)("div",{className:"p-3 border-b border-gray-200 bg-white flex justify-end",children:(0,n.jsx)(a.z,{onClick:g,className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:ek.Z,children:"Clear Chat"})}),(0,n.jsx)(eL,{messages:l,isLoading:r,hasVariables:d.length>0,messagesEndRef:p}),(0,n.jsxs)("div",{className:"p-4 border-t border-gray-200 bg-white",children:[(0,n.jsx)(eM,{extractedVariables:d,variables:i}),(0,n.jsx)(eR,{inputMessage:o,isLoading:r,isDisabled:r||!o.trim()||d.length>0&&!m,onInputChange:x,onSend:u,onKeyDown:v,onCancel:h})]})]})},eU=e=>{let{visible:t,promptName:s,isSaving:r,onNameChange:a,onPublish:o,onCancel:i}=e;return(0,n.jsx)(l.Z,{title:"Publish Prompt",open:t,onCancel:i,footer:[(0,n.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,n.jsx)(W.z,{variant:"secondary",onClick:i,children:"Cancel"}),(0,n.jsx)(W.z,{onClick:o,loading:r,children:"Publish"})]},"footer")],children:(0,n.jsxs)("div",{className:"py-4",children:[(0,n.jsx)(W.x,{className:"mb-2",children:"Name"}),(0,n.jsx)(er.default,{value:s,onChange:e=>a(e.target.value),placeholder:"Enter prompt name",onPressEnter:o,autoFocus:!0}),(0,n.jsx)(W.x,{className:"text-gray-500 text-xs mt-2",children:"Published prompts can be used in API calls and are versioned for easy tracking."})]})})},eV=e=>{let{prompt:t}=e,s=j(t);return(0,n.jsxs)("div",{className:"p-6",children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Generated .prompt file"}),(0,n.jsx)("p",{className:"text-xs text-gray-500",children:"This is the dotprompt format that will be saved to the database"})]}),(0,n.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto",children:(0,n.jsx)("pre",{className:"text-sm text-gray-900 font-mono whitespace-pre-wrap",children:s})})]})},eW=s(57840),eK=s(63134),eH=s(50337),eq=s(35631);let{Text:eG}=eW.default;var eX=e=>{let{isOpen:t,onClose:s,accessToken:a,promptId:l,activeVersionId:i,onSelectVersion:c}=e,[d,m]=(0,r.useState)([]),[p,x]=(0,r.useState)(!1);(0,r.useEffect)(()=>{t&&a&&l&&u()},[t,a,l]);let u=async()=>{x(!0);try{let e=l.includes(".v")?l.split(".v")[0]:l,t=await (0,o.getPromptVersions)(a,e);m(t.prompts)}catch(e){console.error("Error fetching prompt versions:",e)}finally{x(!1)}},h=e=>{var t;if(e.version)return"v".concat(e.version);let s=(null===(t=e.litellm_params)||void 0===t?void 0:t.prompt_id)||e.prompt_id;return s.includes(".v")?"v".concat(s.split(".v")[1]):s.includes("_v")?"v".concat(s.split("_v")[1]):"v1"},g=e=>e?new Date(e).toLocaleString():"-";return(0,n.jsx)(eK.Z,{title:"Version History",placement:"right",onClose:s,open:t,width:400,mask:!1,maskClosable:!1,children:p?(0,n.jsx)(eH.Z,{active:!0,paragraph:{rows:4}}):0===d.length?(0,n.jsx)("div",{className:"text-center py-8 text-gray-500",children:"No version history available."}):(0,n.jsx)(eq.Z,{dataSource:d,renderItem:(e,t)=>{var s;let r=e.version||parseInt(h(e).replace("v","")),a=null;i&&(i.includes(".v")?a=parseInt(i.split(".v")[1]):i.includes("_v")&&(a=parseInt(i.split("_v")[1])));let l=a?r===a:0===t;return(0,n.jsxs)("div",{className:"mb-4 p-4 rounded-lg border cursor-pointer transition-all hover:shadow-md ".concat(l?"border-blue-500 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300"),onClick:()=>null==c?void 0:c(e),children:[(0,n.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(ef.Z,{className:"m-0",children:h(e)}),0===t&&(0,n.jsx)(ef.Z,{color:"blue",className:"m-0",children:"Latest"})]}),l&&(0,n.jsx)(ef.Z,{color:"green",className:"m-0",children:"Active"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)(eG,{className:"text-sm text-gray-600 font-medium",children:g(e.created_at)}),(0,n.jsx)(eG,{type:"secondary",className:"text-xs",children:(null===(s=e.prompt_info)||void 0===s?void 0:s.prompt_type)==="db"?"Saved to Database":"Config Prompt"})]})]},"".concat(e.prompt_id,"-v").concat(e.version||r))}})})},eY=e=>{var t;let{onClose:s,onSuccess:a,accessToken:l,initialPromptData:i}=e,[c,d]=(0,r.useState)((()=>{if(i)try{return _(i)}catch(e){console.error("Error parsing existing prompt:",e),R.Z.fromBackend("Failed to parse prompt data")}return{name:"New prompt",model:"gpt-4o",config:{temperature:1,max_tokens:1e3},tools:[],developerMessage:"",messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}]}})()),[m,p]=(0,r.useState)(!!i),[x,u]=(0,r.useState)(!1),[h,g]=(0,r.useState)((()=>{var e;if(!(null==i?void 0:i.prompt_spec))return;let t=i.prompt_spec.prompt_id,s=i.prompt_spec.version||(null===(e=i.prompt_spec.litellm_params)||void 0===e?void 0:e.prompt_id);return"number"==typeof s?"".concat(t,".v").concat(s):"string"==typeof s&&(s.includes(".v")||s.includes("_v"))?s:t})()),[v,f]=(0,r.useState)(!1),[y,b]=(0,r.useState)(!1),[N,w]=(0,r.useState)(null),[C,k]=(0,r.useState)(!1),[S,Z]=(0,r.useState)("pretty"),P=e=>{void 0!==e?w(e):w(null),f(!0)},T=async()=>{if(!l){R.Z.fromBackend("Access token is required");return}if(!c.name||""===c.name.trim()){R.Z.fromBackend("Please enter a valid prompt name");return}k(!0);try{var e;let t=c.name.replace(/[^a-zA-Z0-9_-]/g,"_").toLowerCase(),n=j(c),r={prompt_id:t,litellm_params:{prompt_integration:"dotprompt",prompt_id:t,dotprompt_content:n},prompt_info:{prompt_type:"db"}};m&&(null==i?void 0:null===(e=i.prompt_spec)||void 0===e?void 0:e.prompt_id)?(await (0,o.updatePromptCall)(l,i.prompt_spec.prompt_id,r),R.Z.success("Prompt updated successfully!")):(await (0,o.createPromptCall)(l,r),R.Z.success("Prompt created successfully!")),a(),s()}catch(e){console.error("Error saving prompt:",e),R.Z.fromBackend(m?"Failed to update prompt":"Failed to save prompt")}finally{k(!1),b(!1)}},D=h&&h.includes(".v")?"v".concat(h.split(".v")[1]):null;return(0,n.jsxs)("div",{className:"flex h-full bg-white",children:[(0,n.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,n.jsx)(ei,{promptName:c.name,onNameChange:e=>d({...c,name:e}),onBack:s,onSave:()=>{c.name&&""!==c.name.trim()&&"New prompt"!==c.name?T():b(!0)},isSaving:C,editMode:m,onShowHistory:()=>u(!0),version:D,promptModel:c.model,promptVariables:(()=>{let e;let t={},s=[c.developerMessage,...c.messages.map(e=>e.content)].join(" "),n=/\{\{(\w+)\}\}/g;for(;null!==(e=n.exec(s));){let s=e[1];t[s]||(t[s]="example_".concat(s))}return t})(),accessToken:l}),(0,n.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,n.jsxs)("div",{className:"w-1/2 overflow-y-auto bg-white border-r border-gray-200 flex-shrink-0",children:[(0,n.jsxs)("div",{className:"border-b border-gray-200 bg-white px-6 py-4 flex items-center gap-3",children:[(0,n.jsx)(ep,{model:c.model,temperature:c.config.temperature,maxTokens:c.config.max_tokens,accessToken:l,onModelChange:e=>d({...c,model:e}),onTemperatureChange:e=>d({...c,config:{...c.config,temperature:e}}),onMaxTokensChange:e=>d({...c,config:{...c.config,max_tokens:e}})}),(0,n.jsxs)("div",{className:"ml-auto inline-flex items-center bg-gray-200 rounded-full p-0.5",children:[(0,n.jsx)("button",{className:"px-3 py-1 text-xs font-medium rounded-full transition-colors ".concat("pretty"===S?"bg-white text-gray-900 shadow-sm":"text-gray-600"),onClick:()=>Z("pretty"),children:"PRETTY"}),(0,n.jsx)("button",{className:"px-3 py-1 text-xs font-medium rounded-full transition-colors ".concat("dotprompt"===S?"bg-white text-gray-900 shadow-sm":"text-gray-600"),onClick:()=>Z("dotprompt"),children:"DOTPROMPT"})]})]}),"pretty"===S?(0,n.jsxs)("div",{className:"p-6 space-y-4 pb-20",children:[(0,n.jsx)(eg,{tools:c.tools,onAddTool:()=>P(),onEditTool:P,onRemoveTool:e=>{d({...c,tools:c.tools.filter((t,s)=>s!==e)})}}),(0,n.jsx)(eN,{value:c.developerMessage,onChange:e=>d({...c,developerMessage:e})}),(0,n.jsx)(eC,{messages:c.messages,onAddMessage:()=>{d({...c,messages:[...c.messages,{role:"user",content:""}]})},onUpdateMessage:(e,t,s)=>{let n=[...c.messages];n[e][t]=s,d({...c,messages:n})},onRemoveMessage:e=>{c.messages.length>1&&d({...c,messages:c.messages.filter((t,s)=>s!==e)})},onMoveMessage:(e,t)=>{let s=[...c.messages],[n]=s.splice(e,1);s.splice(t,0,n),d({...c,messages:s})}})]}):(0,n.jsx)(eV,{prompt:c})]}),(0,n.jsx)("div",{className:"w-1/2 flex-shrink-0",children:(0,n.jsx)(eJ,{prompt:c,accessToken:l})})]})]}),(0,n.jsx)(eU,{visible:y,promptName:c.name,isSaving:C,onNameChange:e=>d({...c,name:e}),onPublish:T,onCancel:()=>b(!1)}),v&&(0,n.jsx)(en,{visible:v,initialJson:null!==N?c.tools[N].json:"",onSave:e=>{try{var t,s;let n=JSON.parse(e),r={name:(null===(t=n.function)||void 0===t?void 0:t.name)||"Unnamed Tool",description:(null===(s=n.function)||void 0===s?void 0:s.description)||"",json:e};if(null!==N){let e=[...c.tools];e[N]=r,d({...c,tools:e})}else d({...c,tools:[...c.tools,r]});f(!1),w(null)}catch(e){R.Z.fromBackend("Invalid JSON format")}},onClose:()=>{f(!1),w(null)}}),(0,n.jsx)(eX,{isOpen:x,onClose:()=>u(!1),accessToken:l,promptId:(null==i?void 0:null===(t=i.prompt_spec)||void 0===t?void 0:t.prompt_id)||c.name,activeVersionId:h,onSelectVersion:e=>{try{let t=_({prompt_spec:e});d(t);let s=e.version||1;g("".concat(e.prompt_id,".v").concat(s))}catch(e){console.error("Error loading version:",e),R.Z.fromBackend("Failed to load prompt version")}}})]})},e$=s(20347),eQ=e=>{let{accessToken:t,userRole:s}=e,[i,c]=(0,r.useState)([]),[d,m]=(0,r.useState)(!1),[p,x]=(0,r.useState)(null),[u,h]=(0,r.useState)(!1),[g,v]=(0,r.useState)(!1),[f,j]=(0,r.useState)(null),[y,b]=(0,r.useState)(!1),[N,w]=(0,r.useState)(null),_=!!s&&(0,e$.tY)(s),C=async()=>{if(t){m(!0);try{let e=await (0,o.getPromptsList)(t);console.log("prompts: ".concat(JSON.stringify(e))),c(e.prompts)}catch(e){console.error("Error fetching prompts:",e)}finally{m(!1)}}};(0,r.useEffect)(()=>{C()},[t]);let k=()=>{C(),v(!1),j(null),x(null)},S=async()=>{if(N&&t){b(!0);try{await (0,o.deletePromptCall)(t,N.id),R.Z.success('Prompt "'.concat(N.name,'" deleted successfully')),C()}catch(e){console.error("Error deleting prompt:",e),R.Z.fromBackend("Failed to delete prompt")}finally{b(!1),w(null)}}};return(0,n.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[g?(0,n.jsx)(eY,{onClose:()=>{v(!1),j(null)},onSuccess:k,accessToken:t,initialPromptData:f}):p?(0,n.jsx)(G,{promptId:p,onClose:()=>x(null),accessToken:t,isAdmin:_,onDelete:C,onEdit:e=>{j(e),v(!0)}}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(a.z,{onClick:()=>{p&&x(null),j(null),v(!0)},disabled:!t,children:"+ Add New Prompt"}),(0,n.jsx)(a.z,{onClick:()=>{p&&x(null),h(!0)},disabled:!t,variant:"secondary",children:"Upload .prompt File"})]})}),(0,n.jsx)(O,{promptsList:i,isLoading:d,onPromptClick:e=>{x(e)},onDeleteClick:(e,t)=>{w({id:e,name:t})},accessToken:t,isAdmin:_})]}),(0,n.jsx)(es,{visible:u,onClose:()=>{h(!1)},accessToken:t,onSuccess:k}),N&&(0,n.jsxs)(l.Z,{title:"Delete Prompt",open:null!==N,onOk:S,onCancel:()=>{w(null)},confirmLoading:y,okText:"Delete",okButtonProps:{danger:!0},children:[(0,n.jsxs)("p",{children:["Are you sure you want to delete prompt: ",N.name," ?"]}),(0,n.jsx)("p",{children:"This action cannot be undone."})]})]})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6399-9e22a1275286c0df.js b/litellm/proxy/_experimental/out/_next/static/chunks/6399-9e22a1275286c0df.js
deleted file mode 100644
index 81308d73901..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/6399-9e22a1275286c0df.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6399],{12579:function(e,t,s){s.d(t,{RM:function(){return a.Z},SC:function(){return c.Z},iA:function(){return r.Z},pj:function(){return l.Z},ss:function(){return o.Z},xs:function(){return i.Z},zx:function(){return n.Z}});var n=s(78489),r=s(21626),a=s(97214),l=s(28241),o=s(58834),i=s(69552),c=s(71876)},56399:function(e,t,s){s.d(t,{Z:function(){return eG}});var n=s(57437),r=s(2265),a=s(16312),l=s(22116),o=s(19250),i=s(12579),c=s(74998),d=s(44633),m=s(86462),p=s(49084),x=s(99981),u=s(23639),h=s(71594),g=s(24525),v=s(42673);let f=e=>{let t=new Set,s=/\{\{(\w+)\}\}/g;if(e.messages.forEach(e=>{let n;for(;null!==(n=s.exec(e.content));)t.add(n[1])}),e.developerMessage){let n;for(;null!==(n=s.exec(e.developerMessage));)t.add(n[1])}return Array.from(t)},j=e=>{let t=f(e),s="---\nmodel: ".concat(e.model,"\n");return void 0!==e.config.temperature&&(s+="temperature: ".concat(e.config.temperature,"\n")),void 0!==e.config.max_tokens&&(s+="max_tokens: ".concat(e.config.max_tokens,"\n")),void 0!==e.config.top_p&&(s+="top_p: ".concat(e.config.top_p,"\n")),s+="input:\n schema:\n",t.forEach(e=>{s+=" ".concat(e,": string\n")}),s+="output:\n format: text\n",e.tools&&e.tools.length>0&&(s+="tools:\n",e.tools.forEach(e=>{let t=JSON.parse(e.json);s+=" - ".concat(JSON.stringify(t),"\n")})),s+="---\n\n",e.developerMessage&&""!==e.developerMessage.trim()&&(s+="Developer: ".concat(e.developerMessage.trim(),"\n\n")),e.messages.forEach(e=>{let t=e.role.charAt(0).toUpperCase()+e.role.slice(1);s+="".concat(t,": ").concat(e.content,"\n\n")}),s.trim()},b=e=>{var t,s,n;let r=(null==e?void 0:null===(s=e.prompt_spec)||void 0===s?void 0:null===(t=s.litellm_params)||void 0===t?void 0:t.dotprompt_content)||"";if(!r)throw Error("No dotprompt_content found in API response");let a=r.split("---");if(a.length<3)throw Error("Invalid dotprompt format");let l=a[1],o=a.slice(2).join("---").trim(),i={};l.split("\n").forEach(e=>{let t=e.trim();if(t&&!t.startsWith("input:")&&!t.startsWith("output:")&&!t.startsWith("schema:")&&!t.startsWith("format:")){let e=t.indexOf(":");if(e>0){let s=t.substring(0,e).trim(),n=t.substring(e+1).trim();"temperature"===s||"max_tokens"===s||"top_p"===s?i[s]=parseFloat(n):"model"===s&&(i[s]=n)}}});let c="",d=[],m=o.split("\n"),p=null,x="";for(let e of m)e.startsWith("Developer:")?c=e.substring(10).trim():e.startsWith("User:")?(p&&x&&d.push({role:p,content:x.trim()}),p="user",x=e.substring(5).trim()):e.startsWith("Assistant:")?(p&&x&&d.push({role:p,content:x.trim()}),p="assistant",x=e.substring(10).trim()):e.trim()&&p&&(x+="\n"+e.trim());p&&x&&d.push({role:p,content:x.trim()});let u=(null==e?void 0:null===(n=e.prompt_spec)||void 0===n?void 0:n.prompt_id)||"Unnamed Prompt";return{name:N(u)||u,model:i.model||"gpt-4o",config:{temperature:i.temperature,max_tokens:i.max_tokens,top_p:i.top_p},tools:[],developerMessage:c,messages:d.length>0?d:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}]}},y=e=>{if(!e)return"1";let t=e.match(/[._-]v(\d+)$/);return t?t[1]:"1"},N=e=>e?e.replace(/[._-]v\d+$/,""):"",w=e=>{let t;if(!e)return{};let s={},n=/\{\{(\w+)\}\}/g;for(;null!==(t=n.exec(e));){let e=t[1];s[e]||(s[e]="example_".concat(e))}return s},_=e=>(null==e?void 0:e.prompt_id)||"",C=e=>{var t;let s=_(e);return(null==e?void 0:null===(t=e.litellm_params)||void 0===t?void 0:t.prompt_id)||s},k=e=>(null==e?void 0:e.version)?String(e.version):y(C(e)),S=e=>{try{var t;let s=e.litellm_params;if(null==s?void 0:s.dotprompt_content){let e=s.dotprompt_content.match(/model:\s*([^\n]+)/);if(e)return e[1].trim()}if(null==s?void 0:null===(t=s.prompt_data)||void 0===t?void 0:t.model)return s.prompt_data.model;if(null==s?void 0:s.model)return s.model;return null}catch(e){return console.error("Error extracting model:",e),null}},Z=(e,t)=>{if(!e)return null;let s=t.get(e);return s&&s.providers&&s.providers.length>0?s.providers[0]:null};var P=e=>{let{promptsList:t,isLoading:s,onPromptClick:a,onDeleteClick:l,accessToken:f,isAdmin:j}=e,[b,y]=(0,r.useState)([{id:"created_at",desc:!0}]),[N,w]=(0,r.useState)(new Map);(0,r.useEffect)(()=>{(async()=>{if(f)try{let e=await (0,o.modelHubCall)(f);if(null==e?void 0:e.data){let t=new Map;e.data.forEach(e=>{t.set(e.model_group,e)}),w(t)}}catch(e){console.error("Error fetching model hub data:",e)}})()},[f]);let _=e=>e?new Date(e).toLocaleString():"-",C=e=>{navigator.clipboard.writeText(e)},k=[{header:"Prompt ID",accessorKey:"prompt_id",cell:e=>{let t=String(e.getValue()||""),s=t.length>25?"".concat(t.slice(0,25),"..."):t;return(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(x.Z,{title:t,children:(0,n.jsx)(i.zx,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate min-w-[220px] justify-start",onClick:()=>e.getValue()&&(null==a?void 0:a(e.getValue())),children:s})}),(0,n.jsx)(x.Z,{title:"Copy prompt ID",children:(0,n.jsx)(u.Z,{onClick:e=>{e.stopPropagation(),C(t)},className:"cursor-pointer text-gray-500 hover:text-blue-500 text-xs"})})]})}},{header:"Model",accessorKey:"model",cell:e=>{let{row:t}=e,s=S(t.original);if(!s)return(0,n.jsx)("span",{className:"text-xs text-gray-400",children:"-"});let r=Z(s,N),{logo:a}=(0,v.dr)(r||"");return(0,n.jsx)(x.Z,{title:s,children:(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:r&&a?(0,n.jsx)("img",{src:a,alt:"".concat(r," logo"),className:"w-4 h-4",onError:e=>{let t=e.currentTarget,s=t.parentElement;if(s&&s.contains(t))try{let e=document.createElement("div");e.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",e.textContent=(null==r?void 0:r.charAt(0))||"-",s.replaceChild(e,t)}catch(e){console.error("Failed to replace provider logo fallback:",e)}}}):(0,n.jsx)("div",{className:"w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",children:"-"})}),(0,n.jsx)("span",{className:"max-w-[15ch] truncate block",children:s})]})})}},{header:"Created At",accessorKey:"created_at",cell:e=>{let{row:t}=e,s=t.original;return(0,n.jsx)(x.Z,{title:s.created_at,children:(0,n.jsx)("span",{className:"text-xs",children:_(s.created_at)})})}},{header:"Updated At",accessorKey:"updated_at",cell:e=>{let{row:t}=e,s=t.original;return(0,n.jsx)(x.Z,{title:s.updated_at,children:(0,n.jsx)("span",{className:"text-xs",children:_(s.updated_at)})})}},{header:"Type",accessorKey:"prompt_info.prompt_type",cell:e=>{let{row:t}=e,s=t.original;return(0,n.jsx)(x.Z,{title:s.prompt_info.prompt_type,children:(0,n.jsx)("span",{className:"text-xs",children:s.prompt_info.prompt_type})})}},...j?[{header:"Actions",id:"actions",enableSorting:!1,cell:e=>{let{row:t}=e,s=t.original,r=s.prompt_id||"Unknown Prompt";return(0,n.jsx)("div",{className:"flex items-center gap-1",children:(0,n.jsx)(x.Z,{title:"Delete prompt",children:(0,n.jsx)(i.zx,{size:"xs",variant:"light",color:"red",onClick:e=>{e.stopPropagation(),null==l||l(s.prompt_id,r)},icon:c.Z,className:"text-red-500 hover:text-red-700 hover:bg-red-50"})})})}}]:[]],P=(0,h.b7)({data:t,columns:k,state:{sorting:b},onSortingChange:y,getCoreRowModel:(0,g.sC)(),getSortedRowModel:(0,g.tj)(),enableSorting:!0});return(0,n.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,n.jsx)("div",{className:"overflow-x-auto",children:(0,n.jsxs)(i.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,n.jsx)(i.ss,{children:P.getHeaderGroups().map(e=>(0,n.jsx)(i.SC,{children:e.headers.map(e=>(0,n.jsx)(i.xs,{className:"py-1 h-8",onClick:e.column.getToggleSortingHandler(),children:(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,h.ie)(e.column.columnDef.header,e.getContext())}),(0,n.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,n.jsx)(d.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,n.jsx)(m.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,n.jsx)(p.Z,{className:"h-4 w-4 text-gray-400"})})]})},e.id))},e.id))}),(0,n.jsx)(i.RM,{children:s?(0,n.jsx)(i.SC,{children:(0,n.jsx)(i.pj,{colSpan:k.length,className:"h-8 text-center",children:(0,n.jsx)("div",{className:"text-center text-gray-500",children:(0,n.jsx)("p",{children:"Loading..."})})})}):t.length>0?P.getRowModel().rows.map(e=>(0,n.jsx)(i.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,n.jsx)(i.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,h.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,n.jsx)(i.SC,{children:(0,n.jsx)(i.pj,{colSpan:k.length,className:"h-8 text-center",children:(0,n.jsx)("div",{className:"text-center text-gray-500",children:(0,n.jsx)("p",{children:"No prompts found"})})})})})]})})})},T=s(84717),D=s(5545),E=s(10900),z=s(93416),O=s(59872),A=s(30401),I=s(78867),L=s(9114),M=s(37592),F=s(65869),B=s(11894),R=s(19431),J=s(17906),U=s(94263),V=e=>{let{promptId:t,model:s,promptVariables:a={},accessToken:o,version:i="1",proxySettings:c}=e,[d,m]=(0,r.useState)(!1),[p,x]=(0,r.useState)("curl"),[u,h]=(0,r.useState)("basic"),[g,v]=(0,r.useState)(""),f=window.location.origin,j=null==c?void 0:c.LITELLM_UI_API_DOC_BASE_URL;j&&j.trim()?f=j:(null==c?void 0:c.PROXY_BASE_URL)&&(f=c.PROXY_BASE_URL);let b=o||"sk-1234",y=()=>{let e=Object.keys(a).length>0;if("curl"===p)return"basic"===u?"curl -X POST '".concat(f,"/chat/completions' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer ").concat(b,'\' \\\n -d \'{\n "model": "').concat(s,'",\n "prompt_id": "').concat(t,'"').concat(e?',\n "prompt_variables": '.concat(JSON.stringify(a,null,6).replace(/\n/g,"\n ")):"","\n }' | jq"):"messages"===u?"curl -X POST '".concat(f,"/chat/completions' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer ").concat(b,'\' \\\n -d \'{\n "model": "').concat(s,'",\n "prompt_id": "').concat(t,'"').concat(e?',\n "prompt_variables": '.concat(JSON.stringify(a,null,6).replace(/\n/g,"\n ")):"",',\n "messages": [\n {\n "role": "user",\n "content": "hi"\n }\n ]\n }\' | jq'):"curl -X POST '".concat(f,"/chat/completions' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer ").concat(b,'\' \\\n -d \'{\n "model": "').concat(s,'",\n "prompt_id": "').concat(t,'",\n "prompt_version": ').concat(i,',\n "messages": [\n {\n "role": "user",\n "content": "Who are u"\n }\n ]\n }\' | jq');if("python"===p){let n='import openai\n\nclient = openai.OpenAI(\n api_key="'.concat(b,'",\n base_url="').concat(f,'"\n)\n');return"basic"===u?"".concat(n,'\nresponse = client.chat.completions.create(\n model="').concat(s,'",\n extra_body={\n "prompt_id": "').concat(t,'"').concat(e?',\n "prompt_variables": '.concat(JSON.stringify(a,null,8).replace(/\n/g,"\n ")):"","\n }\n)\n\nprint(response)"):"messages"===u?"".concat(n,'\nresponse = client.chat.completions.create(\n model="').concat(s,'",\n messages=[\n {"role": "user", "content": "hi"}\n ],\n extra_body={\n "prompt_id": "').concat(t,'"').concat(e?',\n "prompt_variables": '.concat(JSON.stringify(a,null,8).replace(/\n/g,"\n ")):"","\n }\n)\n\nprint(response)"):"".concat(n,'\nresponse = client.chat.completions.create(\n model="').concat(s,'",\n messages=[\n {"role": "user", "content": "Who are u"}\n ],\n extra_body={\n "prompt_id": "').concat(t,'",\n "prompt_version": ').concat(i,"\n }\n)\n\nprint(response)")}{let n="import OpenAI from 'openai';\n\nconst client = new OpenAI({\n apiKey: \"".concat(b,'",\n baseURL: "').concat(f,'"\n});\n');return"basic"===u?"".concat(n,'\nasync function main() {\n const response = await client.chat.completions.create({\n model: "').concat(s,'",\n ').concat(e?'prompt_id: "'.concat(t,'",\n prompt_variables: ').concat(JSON.stringify(a,null,8).replace(/\n/g,"\n ")):'prompt_id: "'.concat(t,'"'),"\n });\n \n console.log(response);\n}\n\nmain();"):"messages"===u?"".concat(n,'\nasync function main() {\n const response = await client.chat.completions.create({\n model: "').concat(s,'",\n messages: [\n { role: "user", content: "hi" }\n ],\n ').concat(e?'prompt_id: "'.concat(t,'",\n prompt_variables: ').concat(JSON.stringify(a,null,8).replace(/\n/g,"\n ")):'prompt_id: "'.concat(t,'"'),"\n });\n \n console.log(response);\n}\n\nmain();"):"".concat(n,'\nasync function main() {\n const response = await client.chat.completions.create({\n model: "').concat(s,'",\n messages: [\n { role: "user", content: "Who are u" }\n ],\n prompt_id: "').concat(t,'",\n prompt_version: ').concat(i,"\n });\n \n console.log(response);\n}\n\nmain();")}};return r.useEffect(()=>{d&&v(y())},[d,p,u,t,s,a]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(R.z,{variant:"secondary",icon:B.Z,onClick:()=>{m(!0)},children:"Get Code"}),(0,n.jsxs)(l.Z,{title:"Generated Code",open:d,onCancel:()=>{m(!1)},footer:null,width:800,children:[(0,n.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(R.x,{className:"font-medium block mb-1 text-gray-700",children:"Language"}),(0,n.jsx)(M.default,{value:p,onChange:e=>x(e),style:{width:180},options:[{value:"curl",label:"cURL"},{value:"python",label:"Python (OpenAI SDK)"},{value:"javascript",label:"JavaScript (OpenAI SDK)"}]})]}),(0,n.jsx)(D.ZP,{onClick:()=>{navigator.clipboard.writeText(g),L.Z.success("Copied to clipboard!")},children:"Copy to Clipboard"})]}),(0,n.jsx)(F.default,{activeKey:u,onChange:h,items:[{label:"Basic",key:"basic"},{label:"With Messages",key:"messages"},{label:"With Version",key:"version"}]}),(0,n.jsx)(J.Z,{language:"curl"===p?"bash":"python"===p?"python":"javascript",style:U.Z,wrapLines:!0,wrapLongLines:!0,className:"rounded-md mt-0",customStyle:{maxHeight:"60vh",overflowY:"auto",marginTop:0,borderTopLeftRadius:0,borderTopRightRadius:0},children:g})]})]})},W=e=>{var t,s,a;let{promptId:i,onClose:d,accessToken:m,isAdmin:p,onDelete:x,onEdit:u}=e,[h,g]=(0,r.useState)(null),[v,f]=(0,r.useState)(null),[j,b]=(0,r.useState)(null),[y,N]=(0,r.useState)(!0),[C,Z]=(0,r.useState)({}),[P,M]=(0,r.useState)(!1),[F,B]=(0,r.useState)(!1),R=async()=>{try{if(N(!0),!m)return;let e=await (0,o.getPromptInfo)(m,i);g(e.prompt_spec),f(e.raw_prompt_template),b(e)}catch(e){L.Z.fromBackend("Failed to load prompt information"),console.error("Error fetching prompt info:",e)}finally{N(!1)}};if((0,r.useEffect)(()=>{R()},[i,m]),y)return(0,n.jsx)("div",{className:"p-4",children:"Loading..."});if(!h)return(0,n.jsx)("div",{className:"p-4",children:"Prompt not found"});let J=e=>e?new Date(e).toLocaleString():"-",U=async(e,t)=>{await (0,O.vQ)(e)&&(Z(e=>({...e,[t]:!0})),setTimeout(()=>{Z(e=>({...e,[t]:!1}))},2e3))},W=async()=>{if(m&&h){B(!0);try{await (0,o.deletePromptCall)(m,H),L.Z.success('Prompt "'.concat(H,'" deleted successfully')),null==x||x(),d()}catch(e){console.error("Error deleting prompt:",e),L.Z.fromBackend("Failed to delete prompt")}finally{B(!1),M(!1)}}},K=h&&S(h)||"gpt-4o",H=_(h),q=k(h);return(0,n.jsxs)("div",{className:"p-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(T.zx,{icon:E.Z,variant:"light",onClick:d,className:"mb-4",children:"Back to Prompts"}),(0,n.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(T.Dx,{children:"Prompt Details"}),(0,n.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,n.jsx)(T.xv,{className:"text-gray-500 font-mono",children:H}),(0,n.jsx)(D.ZP,{type:"text",size:"small",icon:C["prompt-id"]?(0,n.jsx)(A.Z,{size:12}):(0,n.jsx)(I.Z,{size:12}),onClick:()=>U(H,"prompt-id"),className:"left-2 z-10 transition-all duration-200 ".concat(C["prompt-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(V,{promptId:H,model:K,promptVariables:w(null==v?void 0:v.content),accessToken:m,version:q}),(0,n.jsx)(T.zx,{icon:z.Z,variant:"primary",onClick:()=>null==u?void 0:u(j),className:"flex items-center",children:"Prompt Studio"}),p&&(0,n.jsx)(T.zx,{icon:c.Z,variant:"secondary",onClick:()=>{M(!0)},className:"flex items-center",children:"Delete Prompt"})]})]})]}),(0,n.jsxs)(T.v0,{children:[(0,n.jsxs)(T.td,{className:"mb-4",children:[(0,n.jsx)(T.OK,{children:"Overview"},"overview"),v?(0,n.jsx)(T.OK,{children:"Prompt Template"},"prompt-template"):(0,n.jsx)(n.Fragment,{}),p?(0,n.jsx)(T.OK,{children:"Details"},"details"):(0,n.jsx)(n.Fragment,{}),(0,n.jsx)(T.OK,{children:"Raw JSON"},"raw-json")]}),(0,n.jsxs)(T.nP,{children:[(0,n.jsxs)(T.x4,{children:[(0,n.jsxs)(T.rj,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,n.jsxs)(T.Zb,{children:[(0,n.jsx)(T.xv,{children:"Prompt ID"}),(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)(T.Dx,{className:"font-mono text-sm",children:H})})]}),(0,n.jsxs)(T.Zb,{children:[(0,n.jsx)(T.xv,{children:"Version"}),(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)(T.Dx,{children:q}),(0,n.jsxs)(T.Ct,{color:"blue",className:"mt-1",children:["v",q]})]})]}),(0,n.jsxs)(T.Zb,{children:[(0,n.jsx)(T.xv,{children:"Prompt Type"}),(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)(T.Dx,{children:(null===(t=h.prompt_info)||void 0===t?void 0:t.prompt_type)||"-"}),(0,n.jsx)(T.Ct,{color:"blue",className:"mt-1",children:(null===(s=h.prompt_info)||void 0===s?void 0:s.prompt_type)||"Unknown"})]})]}),(0,n.jsxs)(T.Zb,{children:[(0,n.jsx)(T.xv,{children:"Created At"}),(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)(T.Dx,{children:J(h.created_at)}),(0,n.jsxs)(T.xv,{children:["Last Updated: ",J(h.updated_at)]})]})]})]}),h.litellm_params&&Object.keys(h.litellm_params).length>0&&(0,n.jsxs)(T.Zb,{className:"mt-6",children:[(0,n.jsx)(T.xv,{className:"font-medium",children:"LiteLLM Parameters"}),(0,n.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md",children:(0,n.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(h.litellm_params,null,2)})})]})]}),v&&(0,n.jsx)(T.x4,{children:(0,n.jsxs)(T.Zb,{children:[(0,n.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,n.jsx)(T.Dx,{children:"Prompt Template"}),(0,n.jsx)(D.ZP,{type:"text",size:"small",icon:C["prompt-content"]?(0,n.jsx)(A.Z,{size:16}):(0,n.jsx)(I.Z,{size:16}),onClick:()=>U(v.content,"prompt-content"),className:"transition-all duration-200 ".concat(C["prompt-content"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"),children:C["prompt-content"]?"Copied!":"Copy Content"})]}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(T.xv,{className:"font-medium",children:"Template ID"}),(0,n.jsx)("div",{className:"font-mono text-sm bg-gray-50 p-2 rounded",children:v.litellm_prompt_id})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(T.xv,{className:"font-medium",children:"Content"}),(0,n.jsx)("div",{className:"mt-2 p-4 bg-gray-50 rounded-md border overflow-auto max-h-96",children:(0,n.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:v.content})})]}),v.metadata&&Object.keys(v.metadata).length>0&&(0,n.jsxs)("div",{children:[(0,n.jsx)(T.xv,{className:"font-medium",children:"Template Metadata"}),(0,n.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,n.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap overflow-auto max-h-64",children:JSON.stringify(v.metadata,null,2)})})]})]})]})}),p&&(0,n.jsx)(T.x4,{children:(0,n.jsxs)(T.Zb,{children:[(0,n.jsx)(T.Dx,{className:"mb-4",children:"Prompt Details"}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(T.xv,{className:"font-medium",children:"Prompt ID"}),(0,n.jsx)("div",{className:"font-mono text-sm bg-gray-50 p-2 rounded",children:H})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(T.xv,{className:"font-medium",children:"Prompt Type"}),(0,n.jsx)("div",{children:(null===(a=h.prompt_info)||void 0===a?void 0:a.prompt_type)||"-"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(T.xv,{className:"font-medium",children:"Created At"}),(0,n.jsx)("div",{children:J(h.created_at)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(T.xv,{className:"font-medium",children:"Last Updated"}),(0,n.jsx)("div",{children:J(h.updated_at)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(T.xv,{className:"font-medium",children:"LiteLLM Parameters"}),(0,n.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,n.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap overflow-auto max-h-96",children:JSON.stringify(h.litellm_params,null,2)})})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(T.xv,{className:"font-medium",children:"Prompt Info"}),(0,n.jsx)("div",{className:"mt-2 p-3 bg-gray-50 rounded-md border",children:(0,n.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(h.prompt_info,null,2)})})]})]})]})}),(0,n.jsx)(T.x4,{children:(0,n.jsxs)(T.Zb,{children:[(0,n.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,n.jsx)(T.Dx,{children:"Raw API Response"}),(0,n.jsx)(D.ZP,{type:"text",size:"small",icon:C["raw-json"]?(0,n.jsx)(A.Z,{size:16}):(0,n.jsx)(I.Z,{size:16}),onClick:()=>U(JSON.stringify(j,null,2),"raw-json"),className:"transition-all duration-200 ".concat(C["raw-json"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"),children:C["raw-json"]?"Copied!":"Copy JSON"})]}),(0,n.jsx)("div",{className:"p-4 bg-gray-50 rounded-md border overflow-auto",children:(0,n.jsx)("pre",{className:"text-xs text-gray-800 whitespace-pre-wrap",children:JSON.stringify(j,null,2)})})]})})]})]}),(0,n.jsxs)(l.Z,{title:"Delete Prompt",open:P,onOk:W,onCancel:()=>{M(!1)},confirmLoading:F,okText:"Delete",okButtonProps:{danger:!0},children:[(0,n.jsxs)("p",{children:["Are you sure you want to delete prompt: ",(0,n.jsx)("strong",{children:H}),"?"]}),(0,n.jsx)("p",{children:"This action cannot be undone."})]})]})},K=s(10032),H=s(23496),q=s(65319),G=s(31283),X=s(3632);let{Option:Y}=M.default;var $=e=>{let{visible:t,onClose:s,accessToken:a,onSuccess:i}=e,[c]=K.Z.useForm(),[d,m]=(0,r.useState)(!1),[p,x]=(0,r.useState)([]),[u,h]=(0,r.useState)("dotprompt"),g=()=>{c.resetFields(),x([]),h("dotprompt"),s()},v=async()=>{try{let e=await c.validateFields();if(console.log("values: ",e),!a){L.Z.fromBackend("Access token is required");return}if("dotprompt"===u&&0===p.length){L.Z.fromBackend("Please upload a .prompt file");return}m(!0);let t={};if("dotprompt"===u&&p.length>0){let s=p[0].originFileObj;try{let n=await (0,o.convertPromptFileToJson)(a,s);console.log("Conversion result:",n),t={prompt_id:e.prompt_id,litellm_params:{prompt_integration:"dotprompt",prompt_id:n.prompt_id,prompt_data:n.json_data},prompt_info:{prompt_type:"db"}}}catch(e){console.error("Error converting prompt file:",e),L.Z.fromBackend("Failed to convert prompt file to JSON"),m(!1);return}}try{await (0,o.createPromptCall)(a,t),L.Z.success("Prompt created successfully!"),g(),i()}catch(e){console.error("Error creating prompt:",e),L.Z.fromBackend("Failed to create prompt")}}catch(e){console.error("Form validation error:",e)}finally{m(!1)}};return(0,n.jsx)(l.Z,{title:"Add New Prompt",open:t,onCancel:g,footer:[(0,n.jsx)(D.ZP,{onClick:g,children:"Cancel"},"cancel"),(0,n.jsx)(D.ZP,{loading:d,onClick:v,children:"Create Prompt"},"submit")],width:600,children:(0,n.jsxs)(K.Z,{form:c,layout:"vertical",requiredMark:!1,children:[(0,n.jsx)(K.Z.Item,{label:"Prompt ID",name:"prompt_id",rules:[{required:!0,message:"Please enter a prompt ID"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Prompt ID can only contain letters, numbers, underscores, and hyphens"}],children:(0,n.jsx)(G.o,{placeholder:"Enter unique prompt ID (e.g., my_prompt_id)"})}),(0,n.jsx)(K.Z.Item,{label:"Prompt Integration",name:"prompt_integration",initialValue:"dotprompt",children:(0,n.jsx)(M.default,{value:u,onChange:h,children:(0,n.jsx)(Y,{value:"dotprompt",children:"dotprompt"})})}),"dotprompt"===u&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(H.Z,{}),(0,n.jsxs)(K.Z.Item,{label:"Prompt File",extra:"Upload a .prompt file that follows the Dotprompt specification",children:[(0,n.jsx)(q.default,{beforeUpload:e=>(e.name.endsWith(".prompt")||L.Z.fromBackend("Please upload a .prompt file"),!1),fileList:p,onChange:e=>{let{fileList:t}=e;x(t.slice(-1))},onRemove:()=>{x([])},children:(0,n.jsx)(D.ZP,{icon:(0,n.jsx)(X.Z,{}),children:"Select .prompt File"})}),p.length>0&&(0,n.jsxs)("div",{className:"mt-2 text-sm text-gray-600",children:["Selected: ",p[0].name]})]})]})]})})},Q=e=>{let{visible:t,initialJson:s,onSave:a,onClose:o}=e,[i,c]=(0,r.useState)(s||'{\n "type": "function",\n "function": {\n "name": "get_current_weather",\n "description": "Get the current weather in a given location",\n "parameters": {\n "type": "object",\n "properties": {\n "location": {\n "type": "string",\n "description": "The city and state, e.g. San Francisco, CA"\n },\n "unit": {\n "type": "string",\n "enum": ["celsius", "fahrenheit"]\n }\n },\n "required": ["location"]\n }\n }\n}'),[d,m]=(0,r.useState)(null),p=()=>{m(null),o()};return(0,n.jsx)(l.Z,{title:(0,n.jsx)("div",{className:"flex items-center justify-between",children:(0,n.jsx)("span",{className:"text-lg font-medium",children:"Add Tool"})}),open:t,onCancel:p,width:800,footer:[(0,n.jsx)(D.ZP,{onClick:p,children:"Cancel"},"cancel"),(0,n.jsx)(D.ZP,{type:"primary",onClick:()=>{try{JSON.parse(i),m(null),a(i)}catch(e){m("Invalid JSON format. Please check your syntax.")}},children:"Add"},"save")],children:(0,n.jsxs)("div",{className:"space-y-3",children:[d&&(0,n.jsx)("div",{className:"p-3 bg-red-50 border border-red-200 rounded text-red-600 text-sm",children:d}),(0,n.jsx)("textarea",{value:i,onChange:e=>c(e.target.value),className:"w-full min-h-[400px] px-4 py-3 border border-gray-300 rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-blue-500 resize-none",placeholder:"Paste your tool JSON here..."})]})})},ee=s(4260),et=s(32660),es=s(91723),en=s(83229),er=e=>{let{promptName:t,onNameChange:s,onBack:r,onSave:l,isSaving:o,editMode:i=!1,onShowHistory:c,version:d,promptModel:m="gpt-4o",promptVariables:p={},accessToken:x,proxySettings:u}=e;return(0,n.jsxs)("div",{className:"bg-white border-b border-gray-200 px-6 py-3 flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,n.jsx)(a.z,{icon:et.Z,variant:"light",onClick:r,size:"xs",children:"Back"}),(0,n.jsx)(ee.default,{value:t,onChange:e=>s(e.target.value),className:"text-base font-medium border-none shadow-none",style:{width:"200px"}}),d&&(0,n.jsx)("span",{className:"px-2 py-0.5 text-xs bg-blue-100 text-blue-700 rounded font-medium",children:d}),(0,n.jsx)("span",{className:"px-2 py-0.5 text-xs bg-gray-100 text-gray-600 rounded",children:"Draft"}),(0,n.jsx)("span",{className:"text-xs text-gray-400",children:"Unsaved changes"})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsx)(V,{promptId:t,model:m,promptVariables:p,accessToken:x,version:(null==d?void 0:d.replace("v",""))||"1",proxySettings:u}),i&&c&&(0,n.jsx)(a.z,{icon:es.Z,variant:"secondary",onClick:c,children:"History"}),(0,n.jsx)(a.z,{icon:en.Z,onClick:l,loading:o,disabled:o,children:i?"Update":"Save"})]})]})},ea=s(92280),el=s(98728),eo=s(76593),ei=e=>{let{model:t,temperature:s=1,maxTokens:a=1e3,accessToken:l,onModelChange:o,onTemperatureChange:i,onMaxTokensChange:c}=e,[d,m]=(0,r.useState)(!1);return(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:"w-[300px]",children:(0,n.jsx)(eo.Z,{accessToken:l||"",value:t,onChange:o,showLabel:!1})}),(0,n.jsxs)("button",{onClick:()=>m(!d),className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50",children:[(0,n.jsx)(el.Z,{size:16}),(0,n.jsx)("span",{children:"Parameters"})]}),d&&(0,n.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-30",children:(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow-xl p-6 w-96",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsx)("h3",{className:"text-lg font-semibold",children:"Model Parameters"}),(0,n.jsx)("button",{onClick:()=>m(!1),className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{children:(0,n.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,n.jsx)(ea.x,{className:"text-sm text-gray-700",children:"Temperature"}),(0,n.jsx)(ee.default,{type:"number",size:"small",min:0,max:2,step:.1,value:s,onChange:e=>i(parseFloat(e.target.value)||0),className:"w-20"})]})}),(0,n.jsx)("div",{children:(0,n.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,n.jsx)(ea.x,{className:"text-sm text-gray-700",children:"Max Tokens"}),(0,n.jsx)(ee.default,{type:"number",size:"small",min:1,max:32768,value:a,onChange:e=>c(parseInt(e.target.value)||1e3),className:"w-24"})]})})]})]})})]})},ec=s(78801),ed=s(99397),em=s(27413),ep=e=>{let{tools:t,onAddTool:s,onEditTool:r,onRemoveTool:a}=e;return(0,n.jsxs)(ec.Z,{className:"p-3",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,n.jsx)(ec.x,{className:"text-sm font-medium",children:"Tools"}),(0,n.jsxs)("button",{onClick:s,className:"text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,n.jsx)(ed.Z,{size:14,className:"mr-1"}),"Add"]})]}),0===t.length?(0,n.jsx)(ec.x,{className:"text-gray-500 text-xs",children:"No tools added"}):(0,n.jsx)("div",{className:"space-y-2",children:t.map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center justify-between p-2 bg-gray-50 border border-gray-200 rounded",children:[(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsx)("div",{className:"font-medium text-xs truncate",children:e.name}),(0,n.jsx)("div",{className:"text-xs text-gray-500 truncate",children:e.description})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-1 ml-2",children:[(0,n.jsx)("button",{onClick:()=>r(t),className:"text-xs text-blue-600 hover:text-blue-700",children:"Edit"}),(0,n.jsx)("button",{onClick:()=>a(t),className:"text-gray-400 hover:text-red-500",children:(0,n.jsx)(em.Z,{size:14})})]})]},t))})]})},ex=s(79326),eu=s(3810),eh=s(13377);let{TextArea:eg}=ee.default;var ev=e=>{let{value:t,onChange:s,placeholder:a,rows:l=4,className:o}=e,[i,c]=(0,r.useState)(null),[d,m]=(0,r.useState)(""),p=()=>{d.trim()&&i&&(s(t.substring(0,i.start)+"{{".concat(d,"}}")+t.substring(i.end)),c(null),m(""))},x=(()=>{let e;let s=/\{\{(\w+)\}\}/g,n=[];for(;null!==(e=s.exec(t));)n.push({name:e[1],start:e.index,end:e.index+e[0].length});return n})();return(0,n.jsxs)("div",{className:"variable-textarea-container ".concat(o),children:[(0,n.jsx)("style",{children:"\n .variable-highlight-text {\n color: #f97316;\n background-color: #fff7ed;\n border-radius: 4px;\n padding: 0 2px;\n border: 1px solid #fed7aa;\n font-family: monospace;\n }\n "}),(0,n.jsx)(eg,{value:t,onChange:e=>s(e.target.value),placeholder:a,rows:l,className:"font-sans"}),x.length>0&&(0,n.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 items-center",children:[(0,n.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Detected variables:"}),x.map((e,t)=>(0,n.jsx)(ex.Z,{content:(0,n.jsxs)("div",{className:"p-2",style:{minWidth:"200px"},children:[(0,n.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"Edit variable name"}),(0,n.jsx)(ee.default,{size:"small",value:d,onChange:e=>m(e.target.value),onPressEnter:p,placeholder:"Variable name",autoFocus:!0}),(0,n.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,n.jsx)("button",{onClick:p,className:"text-xs px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Save"}),(0,n.jsx)("button",{onClick:()=>{c(null),m("")},className:"text-xs px-2 py-1 bg-gray-200 text-gray-700 rounded hover:bg-gray-300",children:"Cancel"})]})]}),open:(null==i?void 0:i.start)===e.start,onOpenChange:e=>{e||(c(null),m(""))},trigger:"click",children:(0,n.jsx)(eu.Z,{color:"orange",className:"cursor-pointer hover:opacity-80 transition-all m-0",icon:(0,n.jsx)(eh.Z,{}),onClick:()=>{c({oldName:e.name,start:e.start,end:e.end}),m(e.name)},children:e.name})},"".concat(e.start,"-").concat(t)))]})]})},ef=e=>{let{value:t,onChange:s}=e;return(0,n.jsxs)(ec.Z,{className:"p-3",children:[(0,n.jsx)(ec.x,{className:"block mb-2 text-sm font-medium",children:"Developer message"}),(0,n.jsx)(ec.x,{className:"text-gray-500 text-xs mb-2",children:"Optional system instructions for the model"}),(0,n.jsx)(ev,{value:t,onChange:s,rows:3,placeholder:"e.g., You are a helpful assistant..."})]})},ej=s(41905);let{Option:eb}=M.default;var ey=e=>{let{messages:t,onAddMessage:s,onUpdateMessage:a,onRemoveMessage:l,onMoveMessage:o}=e,[i,c]=(0,r.useState)(null),[d,m]=(0,r.useState)(null),p=e=>{c(e)},x=(e,t)=>{e.preventDefault(),m(t)},u=(e,t)=>{e.preventDefault(),null!==i&&i!==t&&o(i,t),c(null),m(null)},h=()=>{c(null),m(null)};return(0,n.jsxs)(ec.Z,{className:"p-3",children:[(0,n.jsxs)("div",{className:"mb-2",children:[(0,n.jsx)(ec.x,{className:"text-sm font-medium",children:"Prompt messages"}),(0,n.jsxs)(ec.x,{className:"text-gray-500 text-xs mt-1",children:["Use ",(0,n.jsx)("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"{{variable}}"})," syntax for template variables"]})]}),(0,n.jsx)("div",{className:"space-y-2",children:t.map((e,s)=>(0,n.jsxs)("div",{draggable:!0,onDragStart:()=>p(s),onDragOver:e=>x(e,s),onDrop:e=>u(e,s),onDragEnd:h,className:"border border-gray-300 rounded overflow-hidden bg-white transition-all ".concat(i===s?"opacity-50":""," ").concat(d===s&&i!==s?"border-blue-500 border-2":""),children:[(0,n.jsxs)("div",{className:"bg-gray-50 px-2 py-1.5 border-b border-gray-300 flex items-center justify-between",children:[(0,n.jsxs)(M.default,{value:e.role,onChange:e=>a(s,"role",e),style:{width:100},size:"small",bordered:!1,children:[(0,n.jsx)(eb,{value:"user",children:"User"}),(0,n.jsx)(eb,{value:"assistant",children:"Assistant"}),(0,n.jsx)(eb,{value:"system",children:"System"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[t.length>1&&(0,n.jsx)("button",{onClick:()=>l(s),className:"text-gray-400 hover:text-red-500",children:(0,n.jsx)(em.Z,{size:14})}),(0,n.jsx)("div",{className:"cursor-grab active:cursor-grabbing text-gray-400 hover:text-gray-600",children:(0,n.jsx)(ej.Z,{size:16})})]})]}),(0,n.jsx)("div",{className:"p-2",children:(0,n.jsx)(ev,{value:e.content,onChange:e=>a(s,"content",e),rows:3,placeholder:"Enter prompt content..."})})]},s))}),(0,n.jsxs)("button",{onClick:s,className:"mt-2 text-xs text-blue-600 hover:text-blue-700 flex items-center",children:[(0,n.jsx)(ed.Z,{size:14,className:"mr-1"}),"Add message"]})]})},eN=s(26430);let ew=(e,t)=>{let[s,n]=(0,r.useState)(!1),[a,l]=(0,r.useState)([]),[i,c]=(0,r.useState)(""),[d,m]=(0,r.useState)({}),[p,x]=(0,r.useState)(!1),[u,h]=(0,r.useState)(null),g=(0,r.useRef)(null),v=f(e),b=v.every(e=>d[e]&&""!==d[e].trim()),y=()=>{g.current&&setTimeout(()=>{var e;null===(e=g.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"end"})},100)};(0,r.useEffect)(()=>{y()},[a]);let N=async()=>{let s;if(!t){L.Z.fromBackend("Access token is required");return}if(v.length>0&&!b){L.Z.fromBackend("Please fill in all template variables");return}if(!i.trim())return;!p&&v.length>0&&x(!0);let r={role:"user",content:i};l(e=>[...e,r]),c("");let m=new AbortController;h(m),n(!0);let u=Date.now();try{let n,r;let c=j(e),p=(0,o.getProxyBaseUrl)(),x={dotprompt_content:c};0===a.length?x.prompt_variables=d:x.conversation_history=[...a.map(e=>({role:e.role,content:e.content})),{role:"user",content:i}];let h=await fetch("".concat(p,"/prompts/test"),{method:"POST",headers:{[(0,o.getGlobalLitellmHeaderName)()]:"Bearer ".concat(t),"Content-Type":"application/json"},body:JSON.stringify(x),signal:m.signal});if(!h.ok){let e=await h.text();throw Error("HTTP error! status: ".concat(h.status,", ").concat(e))}if(!h.body)throw Error("No response body");let v=h.body.getReader(),b=new TextDecoder,N="";for(l(e=>[...e,{role:"assistant",content:""}]);;){let{done:e,value:t}=await v.read();if(e)break;for(let e of b.decode(t).split("\n"))if(e.startsWith("data: ")){let t=e.slice(6);if("[DONE]"===t)continue;try{var g,f,y;let e=JSON.parse(t);!n&&e.model&&(n=e.model),e.usage&&(r=e.usage);let a=null===(y=e.choices)||void 0===y?void 0:null===(f=y[0])||void 0===f?void 0:null===(g=f.delta)||void 0===g?void 0:g.content;a&&(s||(s=Date.now()-u),N+=a,l(e=>{let t=[...e];return t[t.length-1]={role:"assistant",content:N,model:n,timeToFirstToken:s},t}))}catch(e){console.error("Error parsing chunk:",e)}}}let w=Date.now()-u;l(e=>{let t=[...e];return t[t.length-1]={...t[t.length-1],totalLatency:w,usage:r},t})}catch(e){"AbortError"===e.name?console.log("Request was cancelled"):(console.error("Error testing prompt:",e),l(t=>{let s=t[t.length-1];return s&&"assistant"===s.role&&""===s.content?[...t.slice(0,-1),{role:"assistant",content:"Error: ".concat(e.message)}]:[...t,{role:"assistant",content:"Error: ".concat(e.message)}]}))}finally{n(!1),h(null)}};return{isLoading:s,messages:a,inputMessage:i,variables:d,variablesFilled:p,extractedVariables:v,allVariablesFilled:b,messagesEndRef:g,setInputMessage:c,handleSendMessage:N,handleCancelRequest:()=>{u&&(u.abort(),h(null),n(!1),L.Z.info("Request cancelled"))},handleClearConversation:()=>{l([]),x(!1),L.Z.success("Chat history cleared.")},handleKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),N())},handleVariableChange:(e,t)=>{m({...d,[e]:t})}}};var e_=e=>{let{extractedVariables:t,variables:s,onVariableChange:r}=e;return 0===t.length?null:(0,n.jsxs)("div",{className:"p-4 border-b border-gray-200 bg-blue-50",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Fill in template variables to start testing"}),(0,n.jsx)("div",{className:"space-y-2",children:t.map(e=>(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-xs text-gray-600 mb-1 font-medium",children:["{{",e,"}}"]}),(0,n.jsx)(ee.default,{value:s[e]||"",onChange:t=>r(e,t.target.value),placeholder:"Enter value for ".concat(e),size:"small"})]},e))})]})},eC=s(61935),ek=s(10353),eS=s(69993),eZ=e=>{let{hasVariables:t}=e;return(0,n.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[(0,n.jsx)(eS.Z,{style:{fontSize:"48px",marginBottom:"16px"}}),(0,n.jsx)("span",{className:"text-base",children:t?"Fill in the variables above, then type a message to start testing":"Type a message below to start testing your prompt"})]})},eP=s(15883),eT=s(62831),eD=s(38398),eE=e=>{let{message:t}=e;return(0,n.jsx)("div",{className:"mb-4 flex ".concat("user"===t.role?"justify-end":"justify-start"),children:(0,n.jsxs)("div",{className:"max-w-[85%] rounded-lg shadow-sm p-3.5 px-4",style:{backgroundColor:"user"===t.role?"#f0f8ff":"#ffffff",border:"user"===t.role?"1px solid #e6f0fa":"1px solid #f0f0f0"},children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,n.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded-full mr-1",style:{backgroundColor:"user"===t.role?"#e6f0fa":"#f5f5f5"},children:"user"===t.role?(0,n.jsx)(eP.Z,{style:{fontSize:"12px",color:"#2563eb"}}):(0,n.jsx)(eS.Z,{style:{fontSize:"12px",color:"#4b5563"}})}),(0,n.jsx)("strong",{className:"text-sm capitalize",children:t.role}),"assistant"===t.role&&t.model&&(0,n.jsx)("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-100 text-gray-600 font-normal",children:t.model})]}),(0,n.jsxs)("div",{className:"whitespace-pre-wrap break-words max-w-full message-content",style:{wordWrap:"break-word",overflowWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},children:["assistant"===t.role?(0,n.jsx)(eT.UG,{components:{code(e){let{node:t,inline:s,className:r,children:a,...l}=e,o=/language-(\w+)/.exec(r||"");return!s&&o?(0,n.jsx)(J.Z,{style:U.Z,language:o[1],PreTag:"div",className:"rounded-md my-2",wrapLines:!0,wrapLongLines:!0,...l,children:String(a).replace(/\n$/,"")}):(0,n.jsx)("code",{className:"".concat(r," px-1.5 py-0.5 rounded bg-gray-100 text-sm font-mono"),style:{wordBreak:"break-word"},...l,children:a})},pre:e=>{let{node:t,...s}=e;return(0,n.jsx)("pre",{style:{overflowX:"auto",maxWidth:"100%"},...s})}},children:t.content}):(0,n.jsx)("div",{className:"whitespace-pre-wrap",children:t.content}),"assistant"===t.role&&(t.timeToFirstToken||t.totalLatency||t.usage)&&(0,n.jsx)(eD.Z,{timeToFirstToken:t.timeToFirstToken,totalLatency:t.totalLatency,usage:t.usage})]})]})})},ez=e=>{let{messages:t,isLoading:s,hasVariables:r,messagesEndRef:a}=e,l=(0,n.jsx)(eC.Z,{style:{fontSize:24},spin:!0});return(0,n.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 pb-0",children:[0===t.length&&(0,n.jsx)(eZ,{hasVariables:r}),t.map((e,t)=>(0,n.jsx)(eE,{message:e},t)),s&&(0,n.jsx)("div",{className:"flex justify-center items-center my-4",children:(0,n.jsx)(ek.Z,{indicator:l})}),(0,n.jsx)("div",{ref:a,style:{height:"1px"}})]})},eO=e=>{let{extractedVariables:t,variables:s}=e,r=t.filter(e=>!s[e]||""===s[e].trim());return 0===r.length?null:(0,n.jsx)("div",{className:"mb-3 p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,n.jsxs)("div",{className:"flex items-start gap-2",children:[(0,n.jsx)("span",{className:"text-yellow-600 text-sm",children:"⚠️"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("p",{className:"text-sm text-yellow-800 font-medium mb-1",children:"Please fill in all template variables above"}),(0,n.jsxs)("p",{className:"text-xs text-yellow-700",children:["Missing: ",r.map(e=>"{{".concat(e,"}}")).join(", ")]})]})]})})},eA=s(79276);let{TextArea:eI}=ee.default;var eL=e=>{let{inputMessage:t,isLoading:s,isDisabled:r,onInputChange:l,onSend:o,onKeyDown:i,onCancel:c}=e;return(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsxs)("div",{className:"flex items-center flex-1 bg-white border border-gray-300 rounded-xl px-3 py-1 min-h-[44px]",children:[(0,n.jsx)(eI,{value:t,onChange:e=>l(e.target.value),onKeyDown:i,placeholder:"Type your message... (Shift+Enter for new line)",disabled:s,className:"flex-1",autoSize:{minRows:1,maxRows:4},style:{resize:"none",border:"none",boxShadow:"none",background:"transparent",padding:"4px 0",fontSize:"14px",lineHeight:"20px"}}),(0,n.jsx)(a.z,{onClick:o,disabled:r,className:"flex-shrink-0 ml-2 !w-8 !h-8 !min-w-8 !p-0 !rounded-full !bg-blue-600 hover:!bg-blue-700 disabled:!bg-gray-300 !border-none !text-white disabled:!text-gray-500 !flex !items-center !justify-center",children:(0,n.jsx)(eA.Z,{style:{fontSize:"14px"}})})]}),s&&(0,n.jsx)(a.z,{onClick:c,className:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200",children:"Cancel"})]})},eM=e=>{let{prompt:t,accessToken:s}=e,{isLoading:r,messages:l,inputMessage:o,variables:i,variablesFilled:c,extractedVariables:d,allVariablesFilled:m,messagesEndRef:p,setInputMessage:x,handleSendMessage:u,handleCancelRequest:h,handleClearConversation:g,handleKeyDown:v,handleVariableChange:f}=ew(t,s);return(0,n.jsxs)("div",{className:"flex flex-col h-full bg-white",children:[!c&&(0,n.jsx)(e_,{extractedVariables:d,variables:i,onVariableChange:f}),l.length>0&&(0,n.jsx)("div",{className:"p-3 border-b border-gray-200 bg-white flex justify-end",children:(0,n.jsx)(a.z,{onClick:g,className:"bg-gray-100 hover:bg-gray-200 text-gray-700 border-gray-300",icon:eN.Z,children:"Clear Chat"})}),(0,n.jsx)(ez,{messages:l,isLoading:r,hasVariables:d.length>0,messagesEndRef:p}),(0,n.jsxs)("div",{className:"p-4 border-t border-gray-200 bg-white",children:[(0,n.jsx)(eO,{extractedVariables:d,variables:i}),(0,n.jsx)(eL,{inputMessage:o,isLoading:r,isDisabled:r||!o.trim()||d.length>0&&!m,onInputChange:x,onSend:u,onKeyDown:v,onCancel:h})]})]})},eF=e=>{let{visible:t,promptName:s,isSaving:r,onNameChange:a,onPublish:o,onCancel:i}=e;return(0,n.jsx)(l.Z,{title:"Publish Prompt",open:t,onCancel:i,footer:[(0,n.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,n.jsx)(R.z,{variant:"secondary",onClick:i,children:"Cancel"}),(0,n.jsx)(R.z,{onClick:o,loading:r,children:"Publish"})]},"footer")],children:(0,n.jsxs)("div",{className:"py-4",children:[(0,n.jsx)(R.x,{className:"mb-2",children:"Name"}),(0,n.jsx)(ee.default,{value:s,onChange:e=>a(e.target.value),placeholder:"Enter prompt name",onPressEnter:o,autoFocus:!0}),(0,n.jsx)(R.x,{className:"text-gray-500 text-xs mt-2",children:"Published prompts can be used in API calls and are versioned for easy tracking."})]})})},eB=e=>{let{prompt:t}=e,s=j(t);return(0,n.jsxs)("div",{className:"p-6",children:[(0,n.jsxs)("div",{className:"mb-4",children:[(0,n.jsx)("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Generated .prompt file"}),(0,n.jsx)("p",{className:"text-xs text-gray-500",children:"This is the dotprompt format that will be saved to the database"})]}),(0,n.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto",children:(0,n.jsx)("pre",{className:"text-sm text-gray-900 font-mono whitespace-pre-wrap",children:s})})]})},eR=s(57840),eJ=s(63134),eU=s(50337),eV=s(35631);let{Text:eW}=eR.default;var eK=e=>{let{isOpen:t,onClose:s,accessToken:a,promptId:l,activeVersionId:i,onSelectVersion:c}=e,[d,m]=(0,r.useState)([]),[p,x]=(0,r.useState)(!1);(0,r.useEffect)(()=>{t&&a&&l&&u()},[t,a,l]);let u=async()=>{x(!0);try{let e=l.includes(".v")?l.split(".v")[0]:l,t=await (0,o.getPromptVersions)(a,e);m(t.prompts)}catch(e){console.error("Error fetching prompt versions:",e)}finally{x(!1)}},h=e=>{var t;if(e.version)return"v".concat(e.version);let s=(null===(t=e.litellm_params)||void 0===t?void 0:t.prompt_id)||e.prompt_id;return s.includes(".v")?"v".concat(s.split(".v")[1]):s.includes("_v")?"v".concat(s.split("_v")[1]):"v1"},g=e=>e?new Date(e).toLocaleString():"-";return(0,n.jsx)(eJ.Z,{title:"Version History",placement:"right",onClose:s,open:t,width:400,mask:!1,maskClosable:!1,children:p?(0,n.jsx)(eU.Z,{active:!0,paragraph:{rows:4}}):0===d.length?(0,n.jsx)("div",{className:"text-center py-8 text-gray-500",children:"No version history available."}):(0,n.jsx)(eV.Z,{dataSource:d,renderItem:(e,t)=>{var s;let r=e.version||parseInt(h(e).replace("v","")),a=null;i&&(i.includes(".v")?a=parseInt(i.split(".v")[1]):i.includes("_v")&&(a=parseInt(i.split("_v")[1])));let l=a?r===a:0===t;return(0,n.jsxs)("div",{className:"mb-4 p-4 rounded-lg border cursor-pointer transition-all hover:shadow-md ".concat(l?"border-blue-500 bg-blue-50":"border-gray-200 bg-white hover:border-blue-300"),onClick:()=>null==c?void 0:c(e),children:[(0,n.jsxs)("div",{className:"flex justify-between items-start mb-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(eu.Z,{className:"m-0",children:h(e)}),0===t&&(0,n.jsx)(eu.Z,{color:"blue",className:"m-0",children:"Latest"})]}),l&&(0,n.jsx)(eu.Z,{color:"green",className:"m-0",children:"Active"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)(eW,{className:"text-sm text-gray-600 font-medium",children:g(e.created_at)}),(0,n.jsx)(eW,{type:"secondary",className:"text-xs",children:(null===(s=e.prompt_info)||void 0===s?void 0:s.prompt_type)==="db"?"Saved to Database":"Config Prompt"})]})]},"".concat(e.prompt_id,"-v").concat(e.version||r))}})})},eH=e=>{var t;let{onClose:s,onSuccess:a,accessToken:l,initialPromptData:i}=e,[c,d]=(0,r.useState)((()=>{if(i)try{return b(i)}catch(e){console.error("Error parsing existing prompt:",e),L.Z.fromBackend("Failed to parse prompt data")}return{name:"New prompt",model:"gpt-4o",config:{temperature:1,max_tokens:1e3},tools:[],developerMessage:"",messages:[{role:"user",content:"Enter task specifics. Use {{template_variables}} for dynamic inputs"}]}})()),[m,p]=(0,r.useState)(!!i),[x,u]=(0,r.useState)(!1),[h,g]=(0,r.useState)((()=>{var e;if(!(null==i?void 0:i.prompt_spec))return;let t=i.prompt_spec.prompt_id,s=i.prompt_spec.version||(null===(e=i.prompt_spec.litellm_params)||void 0===e?void 0:e.prompt_id);return"number"==typeof s?"".concat(t,".v").concat(s):"string"==typeof s&&(s.includes(".v")||s.includes("_v"))?s:t})()),[v,f]=(0,r.useState)(!1),[y,N]=(0,r.useState)(!1),[w,_]=(0,r.useState)(null),[C,k]=(0,r.useState)(!1),[S,Z]=(0,r.useState)("pretty"),P=e=>{void 0!==e?_(e):_(null),f(!0)},T=async()=>{if(!l){L.Z.fromBackend("Access token is required");return}if(!c.name||""===c.name.trim()){L.Z.fromBackend("Please enter a valid prompt name");return}k(!0);try{var e;let t=c.name.replace(/[^a-zA-Z0-9_-]/g,"_").toLowerCase(),n=j(c),r={prompt_id:t,litellm_params:{prompt_integration:"dotprompt",prompt_id:t,dotprompt_content:n},prompt_info:{prompt_type:"db"}};m&&(null==i?void 0:null===(e=i.prompt_spec)||void 0===e?void 0:e.prompt_id)?(await (0,o.updatePromptCall)(l,i.prompt_spec.prompt_id,r),L.Z.success("Prompt updated successfully!")):(await (0,o.createPromptCall)(l,r),L.Z.success("Prompt created successfully!")),a(),s()}catch(e){console.error("Error saving prompt:",e),L.Z.fromBackend(m?"Failed to update prompt":"Failed to save prompt")}finally{k(!1),N(!1)}},D=h&&h.includes(".v")?"v".concat(h.split(".v")[1]):null;return(0,n.jsxs)("div",{className:"flex h-full bg-white",children:[(0,n.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,n.jsx)(er,{promptName:c.name,onNameChange:e=>d({...c,name:e}),onBack:s,onSave:()=>{c.name&&""!==c.name.trim()&&"New prompt"!==c.name?T():N(!0)},isSaving:C,editMode:m,onShowHistory:()=>u(!0),version:D,promptModel:c.model,promptVariables:(()=>{let e;let t={},s=[c.developerMessage,...c.messages.map(e=>e.content)].join(" "),n=/\{\{(\w+)\}\}/g;for(;null!==(e=n.exec(s));){let s=e[1];t[s]||(t[s]="example_".concat(s))}return t})(),accessToken:l}),(0,n.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,n.jsxs)("div",{className:"w-1/2 overflow-y-auto bg-white border-r border-gray-200 flex-shrink-0",children:[(0,n.jsxs)("div",{className:"border-b border-gray-200 bg-white px-6 py-4 flex items-center gap-3",children:[(0,n.jsx)(ei,{model:c.model,temperature:c.config.temperature,maxTokens:c.config.max_tokens,accessToken:l,onModelChange:e=>d({...c,model:e}),onTemperatureChange:e=>d({...c,config:{...c.config,temperature:e}}),onMaxTokensChange:e=>d({...c,config:{...c.config,max_tokens:e}})}),(0,n.jsxs)("div",{className:"ml-auto inline-flex items-center bg-gray-200 rounded-full p-0.5",children:[(0,n.jsx)("button",{className:"px-3 py-1 text-xs font-medium rounded-full transition-colors ".concat("pretty"===S?"bg-white text-gray-900 shadow-sm":"text-gray-600"),onClick:()=>Z("pretty"),children:"PRETTY"}),(0,n.jsx)("button",{className:"px-3 py-1 text-xs font-medium rounded-full transition-colors ".concat("dotprompt"===S?"bg-white text-gray-900 shadow-sm":"text-gray-600"),onClick:()=>Z("dotprompt"),children:"DOTPROMPT"})]})]}),"pretty"===S?(0,n.jsxs)("div",{className:"p-6 space-y-4 pb-20",children:[(0,n.jsx)(ep,{tools:c.tools,onAddTool:()=>P(),onEditTool:P,onRemoveTool:e=>{d({...c,tools:c.tools.filter((t,s)=>s!==e)})}}),(0,n.jsx)(ef,{value:c.developerMessage,onChange:e=>d({...c,developerMessage:e})}),(0,n.jsx)(ey,{messages:c.messages,onAddMessage:()=>{d({...c,messages:[...c.messages,{role:"user",content:""}]})},onUpdateMessage:(e,t,s)=>{let n=[...c.messages];n[e][t]=s,d({...c,messages:n})},onRemoveMessage:e=>{c.messages.length>1&&d({...c,messages:c.messages.filter((t,s)=>s!==e)})},onMoveMessage:(e,t)=>{let s=[...c.messages],[n]=s.splice(e,1);s.splice(t,0,n),d({...c,messages:s})}})]}):(0,n.jsx)(eB,{prompt:c})]}),(0,n.jsx)("div",{className:"w-1/2 flex-shrink-0",children:(0,n.jsx)(eM,{prompt:c,accessToken:l})})]})]}),(0,n.jsx)(eF,{visible:y,promptName:c.name,isSaving:C,onNameChange:e=>d({...c,name:e}),onPublish:T,onCancel:()=>N(!1)}),v&&(0,n.jsx)(Q,{visible:v,initialJson:null!==w?c.tools[w].json:"",onSave:e=>{try{var t,s;let n=JSON.parse(e),r={name:(null===(t=n.function)||void 0===t?void 0:t.name)||"Unnamed Tool",description:(null===(s=n.function)||void 0===s?void 0:s.description)||"",json:e};if(null!==w){let e=[...c.tools];e[w]=r,d({...c,tools:e})}else d({...c,tools:[...c.tools,r]});f(!1),_(null)}catch(e){L.Z.fromBackend("Invalid JSON format")}},onClose:()=>{f(!1),_(null)}}),(0,n.jsx)(eK,{isOpen:x,onClose:()=>u(!1),accessToken:l,promptId:(null==i?void 0:null===(t=i.prompt_spec)||void 0===t?void 0:t.prompt_id)||c.name,activeVersionId:h,onSelectVersion:e=>{try{let t=b({prompt_spec:e});d(t);let s=e.version||1;g("".concat(e.prompt_id,".v").concat(s))}catch(e){console.error("Error loading version:",e),L.Z.fromBackend("Failed to load prompt version")}}})]})},eq=s(20347),eG=e=>{let{accessToken:t,userRole:s}=e,[i,c]=(0,r.useState)([]),[d,m]=(0,r.useState)(!1),[p,x]=(0,r.useState)(null),[u,h]=(0,r.useState)(!1),[g,v]=(0,r.useState)(!1),[f,j]=(0,r.useState)(null),[b,y]=(0,r.useState)(!1),[N,w]=(0,r.useState)(null),_=!!s&&(0,eq.tY)(s),C=async()=>{if(t){m(!0);try{let e=await (0,o.getPromptsList)(t);console.log("prompts: ".concat(JSON.stringify(e))),c(e.prompts)}catch(e){console.error("Error fetching prompts:",e)}finally{m(!1)}}};(0,r.useEffect)(()=>{C()},[t]);let k=()=>{C(),v(!1),j(null),x(null)},S=async()=>{if(N&&t){y(!0);try{await (0,o.deletePromptCall)(t,N.id),L.Z.success('Prompt "'.concat(N.name,'" deleted successfully')),C()}catch(e){console.error("Error deleting prompt:",e),L.Z.fromBackend("Failed to delete prompt")}finally{y(!1),w(null)}}};return(0,n.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[g?(0,n.jsx)(eH,{onClose:()=>{v(!1),j(null)},onSuccess:k,accessToken:t,initialPromptData:f}):p?(0,n.jsx)(W,{promptId:p,onClose:()=>x(null),accessToken:t,isAdmin:_,onDelete:C,onEdit:e=>{j(e),v(!0)}}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(a.z,{onClick:()=>{p&&x(null),j(null),v(!0)},disabled:!t,children:"+ Add New Prompt"}),(0,n.jsx)(a.z,{onClick:()=>{p&&x(null),h(!0)},disabled:!t,variant:"secondary",children:"Upload .prompt File"})]})}),(0,n.jsx)(P,{promptsList:i,isLoading:d,onPromptClick:e=>{x(e)},onDeleteClick:(e,t)=>{w({id:e,name:t})},accessToken:t,isAdmin:_})]}),(0,n.jsx)($,{visible:u,onClose:()=>{h(!1)},accessToken:t,onSuccess:k}),N&&(0,n.jsxs)(l.Z,{title:"Delete Prompt",open:null!==N,onOk:S,onCancel:()=>{w(null)},confirmLoading:b,okText:"Delete",okButtonProps:{danger:!0},children:[(0,n.jsxs)("p",{children:["Are you sure you want to delete prompt: ",N.name," ?"]}),(0,n.jsx)("p",{children:"This action cannot be undone."})]})]})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6609-707213b617f85369.js b/litellm/proxy/_experimental/out/_next/static/chunks/6609-707213b617f85369.js
deleted file mode 100644
index 5ef3d33ed21..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/6609-707213b617f85369.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6609],{56609:function(e,t,n){n.d(t,{Z:function(){return oj}});var o=n(2265),r={},a="rc-table-internal-hook",l=n(26365),c=n(58525),i=n(27380),d=n(16671),s=n(54887);function u(e){var t=o.createContext(void 0);return{Context:t,Provider:function(e){var n=e.value,r=e.children,a=o.useRef(n);a.current=n;var c=o.useState(function(){return{getValue:function(){return a.current},listeners:new Set}}),d=(0,l.Z)(c,1)[0];return(0,i.Z)(function(){(0,s.unstable_batchedUpdates)(function(){d.listeners.forEach(function(e){e(n)})})},[n]),o.createElement(t.Provider,{value:d},r)},defaultValue:e}}function f(e,t){var n=(0,c.Z)("function"==typeof t?t:function(e){if(void 0===t)return e;if(!Array.isArray(t))return e[t];var n={};return t.forEach(function(t){n[t]=e[t]}),n}),r=o.useContext(null==e?void 0:e.Context),a=r||{},s=a.listeners,u=a.getValue,f=o.useRef();f.current=n(r?u():null==e?void 0:e.defaultValue);var p=o.useState({}),m=(0,l.Z)(p,2)[1];return(0,i.Z)(function(){if(r)return s.add(e),function(){s.delete(e)};function e(e){var t=n(e);(0,d.Z)(f.current,t,!0)||m({})}},[r]),f.current}var p=n(1119),m=n(28791);function h(){var e=o.createContext(null);function t(){return o.useContext(e)}return{makeImmutable:function(n,r){var a=(0,m.Yr)(n),l=function(l,c){var i=a?{ref:c}:{},d=o.useRef(0),s=o.useRef(l);return null!==t()?o.createElement(n,(0,p.Z)({},l,i)):((!r||r(s.current,l))&&(d.current+=1),s.current=l,o.createElement(e.Provider,{value:d.current},o.createElement(n,(0,p.Z)({},l,i))))};return a?o.forwardRef(l):l},responseImmutable:function(e,n){var r=(0,m.Yr)(e),a=function(n,a){return t(),o.createElement(e,(0,p.Z)({},n,r?{ref:a}:{}))};return r?o.memo(o.forwardRef(a),n):o.memo(a,n)},useImmutableMark:t}}var v=h();v.makeImmutable,v.responseImmutable,v.useImmutableMark;var g=h(),y=g.makeImmutable,b=g.responseImmutable,x=g.useImmutableMark,w=u(),E=n(41154),k=n(31686),C=n(11993),S=n(36760),Z=n.n(S),N=n(6397),K=n(16847),O=n(32559),I=o.createContext({renderWithProps:!1});function R(e){var t=[],n={};return e.forEach(function(e){for(var o=e||{},r=o.key,a=o.dataIndex,l=r||(null==a?[]:Array.isArray(a)?a:[a]).join("-")||"RC_TABLE_KEY";n[l];)l="".concat(l,"_next");n[l]=!0,t.push(l)}),t}var P=n(74126),T=function(e){var t,n=e.ellipsis,r=e.rowType,a=e.children,l=!0===n?{showTitle:!0}:n;return l&&(l.showTitle||"header"===r)&&("string"==typeof a||"number"==typeof a?t=a.toString():o.isValidElement(a)&&"string"==typeof a.props.children&&(t=a.props.children)),t},M=o.memo(function(e){var t,n,r,a,c,i,s,u,m,h,v=e.component,g=e.children,y=e.ellipsis,b=e.scope,S=e.prefixCls,O=e.className,R=e.align,M=e.record,D=e.render,L=e.dataIndex,j=e.renderIndex,B=e.shouldCellUpdate,H=e.index,z=e.rowType,A=e.colSpan,W=e.rowSpan,_=e.fixLeft,F=e.fixRight,q=e.firstFixLeft,V=e.lastFixLeft,X=e.firstFixRight,U=e.lastFixRight,G=e.appendNode,Y=e.additionalProps,$=void 0===Y?{}:Y,J=e.isSticky,Q="".concat(S,"-cell"),ee=f(w,["supportSticky","allColumnsFixedLeft","rowHoverable"]),et=ee.supportSticky,en=ee.allColumnsFixedLeft,eo=ee.rowHoverable,er=(t=o.useContext(I),n=x(),(0,N.Z)(function(){if(null!=g)return[g];var e=null==L||""===L?[]:Array.isArray(L)?L:[L],n=(0,K.Z)(M,e),r=n,a=void 0;if(D){var l=D(n,M,j);!l||"object"!==(0,E.Z)(l)||Array.isArray(l)||o.isValidElement(l)?r=l:(r=l.children,a=l.props,t.renderWithProps=!0)}return[r,a]},[n,M,g,L,D,j],function(e,n){if(B){var o=(0,l.Z)(e,2)[1];return B((0,l.Z)(n,2)[1],o)}return!!t.renderWithProps||!(0,d.Z)(e,n,!0)})),ea=(0,l.Z)(er,2),el=ea[0],ec=ea[1],ei={},ed="number"==typeof _&&et,es="number"==typeof F&&et;ed&&(ei.position="sticky",ei.left=_),es&&(ei.position="sticky",ei.right=F);var eu=null!==(r=null!==(a=null!==(c=null==ec?void 0:ec.colSpan)&&void 0!==c?c:$.colSpan)&&void 0!==a?a:A)&&void 0!==r?r:1,ef=null!==(i=null!==(s=null!==(u=null==ec?void 0:ec.rowSpan)&&void 0!==u?u:$.rowSpan)&&void 0!==s?s:W)&&void 0!==i?i:1,ep=f(w,function(e){var t,n;return[(t=ef||1,n=e.hoverStartRow,H<=e.hoverEndRow&&H+t-1>=n),e.onHover]}),em=(0,l.Z)(ep,2),eh=em[0],ev=em[1],eg=(0,P.zX)(function(e){var t;M&&ev(H,H+ef-1),null==$||null===(t=$.onMouseEnter)||void 0===t||t.call($,e)}),ey=(0,P.zX)(function(e){var t;M&&ev(-1,-1),null==$||null===(t=$.onMouseLeave)||void 0===t||t.call($,e)});if(0===eu||0===ef)return null;var eb=null!==(m=$.title)&&void 0!==m?m:T({rowType:z,ellipsis:y,children:el}),ex=Z()(Q,O,(h={},(0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)(h,"".concat(Q,"-fix-left"),ed&&et),"".concat(Q,"-fix-left-first"),q&&et),"".concat(Q,"-fix-left-last"),V&&et),"".concat(Q,"-fix-left-all"),V&&en&&et),"".concat(Q,"-fix-right"),es&&et),"".concat(Q,"-fix-right-first"),X&&et),"".concat(Q,"-fix-right-last"),U&&et),"".concat(Q,"-ellipsis"),y),"".concat(Q,"-with-append"),G),"".concat(Q,"-fix-sticky"),(ed||es)&&J&&et),(0,C.Z)(h,"".concat(Q,"-row-hover"),!ec&&eh)),$.className,null==ec?void 0:ec.className),ew={};R&&(ew.textAlign=R);var eE=(0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)({},null==ec?void 0:ec.style),ei),ew),$.style),ek=el;return"object"!==(0,E.Z)(ek)||Array.isArray(ek)||o.isValidElement(ek)||(ek=null),y&&(V||X)&&(ek=o.createElement("span",{className:"".concat(Q,"-content")},ek)),o.createElement(v,(0,p.Z)({},ec,$,{className:ex,style:eE,title:eb,scope:b,onMouseEnter:eo?eg:void 0,onMouseLeave:eo?ey:void 0,colSpan:1!==eu?eu:null,rowSpan:1!==ef?ef:null}),G,ek)});function D(e,t,n,o,r){var a,l,c=n[e]||{},i=n[t]||{};"left"===c.fixed?a=o.left["rtl"===r?t:e]:"right"===i.fixed&&(l=o.right["rtl"===r?e:t]);var d=!1,s=!1,u=!1,f=!1,p=n[t+1],m=n[e-1],h=p&&!p.fixed||m&&!m.fixed||n.every(function(e){return"left"===e.fixed});return"rtl"===r?void 0!==a?f=!(m&&"left"===m.fixed)&&h:void 0!==l&&(u=!(p&&"right"===p.fixed)&&h):void 0!==a?d=!(p&&"left"===p.fixed)&&h:void 0!==l&&(s=!(m&&"right"===m.fixed)&&h),{fixLeft:a,fixRight:l,lastFixLeft:d,firstFixRight:s,lastFixRight:u,firstFixLeft:f,isSticky:o.isSticky}}var L=o.createContext({}),j=n(6989),B=["children"];function H(e){return e.children}H.Row=function(e){var t=e.children,n=(0,j.Z)(e,B);return o.createElement("tr",n,t)},H.Cell=function(e){var t=e.className,n=e.index,r=e.children,a=e.colSpan,l=void 0===a?1:a,c=e.rowSpan,i=e.align,d=f(w,["prefixCls","direction"]),s=d.prefixCls,u=d.direction,m=o.useContext(L),h=m.scrollColumnIndex,v=m.stickyOffsets,g=m.flattenColumns,y=n+l-1+1===h?l+1:l,b=D(n,n+y-1,g,v,u);return o.createElement(M,(0,p.Z)({className:t,index:n,component:"td",prefixCls:s,record:null,dataIndex:null,align:i,colSpan:y,rowSpan:c,render:function(){return r}},b))};var z=b(function(e){var t=e.children,n=e.stickyOffsets,r=e.flattenColumns,a=f(w,"prefixCls"),l=r.length-1,c=r[l],i=o.useMemo(function(){return{stickyOffsets:n,flattenColumns:r,scrollColumnIndex:null!=c&&c.scrollbar?l:null}},[c,r,l,n]);return o.createElement(L.Provider,{value:i},o.createElement("tfoot",{className:"".concat(a,"-summary")},t))}),A=n(31474),W=n(10281),_=n(3208),F=n(18242);function q(e,t,n,r){return o.useMemo(function(){if(null!=n&&n.size){for(var o=[],a=0;a<(null==e?void 0:e.length);a+=1)!function e(t,n,o,r,a,l,c){var i=l(n,c);t.push({record:n,indent:o,index:c,rowKey:i});var d=null==a?void 0:a.has(i);if(n&&Array.isArray(n[r])&&d)for(var s=0;s1?n-1:0),r=1;r5&&void 0!==arguments[5]?arguments[5]:[],d=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=e.record,u=e.prefixCls,f=e.columnsKey,p=e.fixedInfoList,m=e.expandIconColumnIndex,h=e.nestExpandable,v=e.indentSize,g=e.expandIcon,y=e.expanded,b=e.hasNestChildren,x=e.onTriggerExpand,w=e.expandable,E=e.expandedKeys,k=f[n],C=p[n];n===(m||0)&&h&&(c=o.createElement(o.Fragment,null,o.createElement("span",{style:{paddingLeft:"".concat(v*r,"px")},className:"".concat(u,"-row-indent indent-level-").concat(r)}),g({prefixCls:u,expanded:y,expandable:b,record:s,onExpand:x})));var S=(null===(l=t.onCell)||void 0===l?void 0:l.call(t,s,a))||{};if(d){var Z=S.rowSpan,N=void 0===Z?1:Z;if(w&&N&&n=1)),style:(0,k.Z)((0,k.Z)({},r),null==E?void 0:E.style)}),b.map(function(e,t){var n=e.render,r=e.dataIndex,i=e.className,s=Y(g,e,t,u,l,d,null==v?void 0:v.offset),f=s.key,b=s.fixedInfo,x=s.appendCellNode,w=s.additionalCellProps;return o.createElement(M,(0,p.Z)({className:i,ellipsis:e.ellipsis,align:e.align,scope:e.rowScope,component:e.rowScope?h:m,prefixCls:y,key:f,record:a,index:l,renderIndex:c,dataIndex:r,render:n,shouldCellUpdate:e.shouldCellUpdate},b,{appendNode:x,additionalProps:w}))}));if(N&&(K.current||S)){var R=w(a,l,u+1,S);t=o.createElement(X,{expanded:S,className:Z()("".concat(y,"-expanded-row"),"".concat(y,"-expanded-row-level-").concat(u+1),O),prefixCls:y,component:f,cellComponent:m,colSpan:v?v.colSpan:b.length,stickyOffset:null==v?void 0:v.sticky,isEmpty:!1},R)}return o.createElement(o.Fragment,null,I,t)});function J(e){var t=e.columnKey,n=e.onColumnResize,r=e.prefixCls,a=e.title,l=o.useRef();return(0,i.Z)(function(){l.current&&n(t,l.current.offsetWidth)},[]),o.createElement(A.Z,{data:t},o.createElement("th",{ref:l,className:"".concat(r,"-measure-cell")},o.createElement("div",{className:"".concat(r,"-measure-cell-content")},a||"\xa0")))}var Q=n(2857);function ee(e){var t=e.prefixCls,n=e.columnsKey,r=e.onColumnResize,a=e.columns,l=o.useRef(null),c=f(w,["measureRowRender"]).measureRowRender,i=o.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),ref:l,tabIndex:-1},o.createElement(A.Z.Collection,{onBatchResize:function(e){(0,Q.Z)(l.current)&&e.forEach(function(e){r(e.data,e.size.offsetWidth)})}},n.map(function(e){var n=a.find(function(t){return t.key===e}),l=null==n?void 0:n.title,c=o.isValidElement(l)?o.cloneElement(l,{ref:null}):l;return o.createElement(J,{prefixCls:t,key:e,columnKey:e,onColumnResize:r,title:c})})));return c?c(i):i}var et=b(function(e){var t,n=e.data,r=e.measureColumnWidth,a=f(w,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),l=a.prefixCls,c=a.getComponent,i=a.onColumnResize,d=a.flattenColumns,s=a.getRowKey,u=a.expandedKeys,p=a.childrenColumnName,m=a.emptyNode,h=a.expandedRowOffset,v=void 0===h?0:h,g=a.colWidths,y=q(n,p,u,s),b=o.useMemo(function(){return y.map(function(e){return e.rowKey})},[y]),x=o.useRef({renderWithProps:!1}),E=o.useMemo(function(){for(var e=d.length-v,t=0,n=0;n=0;d-=1){var s=t[d],u=n&&n[d],m=void 0,h=void 0;if(u&&(m=u[eo],"auto"===a&&(h=u.minWidth)),s||h||m||i){var v=m||{},g=(v.columnType,(0,j.Z)(v,er));l.unshift(o.createElement("col",(0,p.Z)({key:d,style:{width:s,minWidth:h}},g))),i=!0}}return l.length>0?o.createElement("colgroup",null,l):null},el=n(83145),ec=["className","noData","columns","flattenColumns","colWidths","colGroup","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","scrollX","tableLayout","onScroll","children"],ei=o.forwardRef(function(e,t){var n=e.className,r=e.noData,a=e.columns,l=e.flattenColumns,c=e.colWidths,i=e.colGroup,d=e.columCount,s=e.stickyOffsets,u=e.direction,p=e.fixHeader,h=e.stickyTopOffset,v=e.stickyBottomOffset,g=e.stickyClassName,y=e.scrollX,b=e.tableLayout,x=e.onScroll,E=e.children,S=(0,j.Z)(e,ec),N=f(w,["prefixCls","scrollbarSize","isSticky","getComponent"]),K=N.prefixCls,O=N.scrollbarSize,I=N.isSticky,R=(0,N.getComponent)(["header","table"],"table"),P=I&&!p?0:O,T=o.useRef(null),M=o.useCallback(function(e){(0,m.mH)(t,e),(0,m.mH)(T,e)},[]);o.useEffect(function(){function e(e){var t=e.currentTarget,n=e.deltaX;n&&(x({currentTarget:t,scrollLeft:t.scrollLeft+n}),e.preventDefault())}var t=T.current;return null==t||t.addEventListener("wheel",e,{passive:!1}),function(){null==t||t.removeEventListener("wheel",e)}},[]);var D=l[l.length-1],L={fixed:D?D.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(K,"-cell-scrollbar")}}},B=(0,o.useMemo)(function(){return P?[].concat((0,el.Z)(a),[L]):a},[P,a]),H=(0,o.useMemo)(function(){return P?[].concat((0,el.Z)(l),[L]):l},[P,l]),z=(0,o.useMemo)(function(){var e=s.right,t=s.left;return(0,k.Z)((0,k.Z)({},s),{},{left:"rtl"===u?[].concat((0,el.Z)(t.map(function(e){return e+P})),[0]):t,right:"rtl"===u?e:[].concat((0,el.Z)(e.map(function(e){return e+P})),[0]),isSticky:I})},[P,s,I]),A=(0,o.useMemo)(function(){for(var e=[],t=0;t1?"colgroup":"col":null,ellipsis:l.ellipsis,align:l.align,component:c,prefixCls:u,key:h[t]},i,{additionalProps:n,rowType:"header"}))}))},eu=b(function(e){var t=e.stickyOffsets,n=e.columns,r=e.flattenColumns,a=e.onHeaderRow,l=f(w,["prefixCls","getComponent"]),c=l.prefixCls,i=l.getComponent,d=o.useMemo(function(){return function(e){var t=[];!function e(n,o){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[r]=t[r]||[];var a=o;return n.filter(Boolean).map(function(n){var o={key:n.key,className:n.className||"",children:n.title,column:n,colStart:a},l=1,c=n.children;return c&&c.length>0&&(l=e(c,a,r+1).reduce(function(e,t){return e+t},0),o.hasSubColumns=!0),"colSpan"in n&&(l=n.colSpan),"rowSpan"in n&&(o.rowSpan=n.rowSpan),o.colSpan=l,o.colEnd=o.colStart+l-1,t[r].push(o),a+=l,l})}(e,0);for(var n=t.length,o=function(e){t[e].forEach(function(t){("rowSpan"in t)||t.hasSubColumns||(t.rowSpan=n-e)})},r=0;r1&&void 0!==arguments[1]?arguments[1]:"";return"number"==typeof t?t:t.endsWith("%")?e*parseFloat(t)/100:null}var em=["children"],eh=["fixed"];function ev(e){return(0,ef.Z)(e).filter(function(e){return o.isValidElement(e)}).map(function(e){var t=e.key,n=e.props,o=n.children,r=(0,j.Z)(n,em),a=(0,k.Z)({key:t},r);return o&&(a.children=ev(o)),a})}function eg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key";return e.filter(function(e){return e&&"object"===(0,E.Z)(e)}).reduce(function(e,n,o){var r=n.fixed,a=!0===r?"left":r,l="".concat(t,"-").concat(o),c=n.children;return c&&c.length>0?[].concat((0,el.Z)(e),(0,el.Z)(eg(c,l).map(function(e){var t;return(0,k.Z)((0,k.Z)({},e),{},{fixed:null!==(t=e.fixed)&&void 0!==t?t:a})}))):[].concat((0,el.Z)(e),[(0,k.Z)((0,k.Z)({key:l},n),{},{fixed:a})])},[])}var ey=function(e,t){var n=e.prefixCls,a=e.columns,c=e.children,i=e.expandable,d=e.expandedKeys,s=e.columnTitle,u=e.getRowKey,f=e.onTriggerExpand,p=e.expandIcon,m=e.rowExpandable,h=e.expandIconColumnIndex,v=e.expandedRowOffset,g=void 0===v?0:v,y=e.direction,b=e.expandRowByClick,x=e.columnWidth,w=e.fixed,S=e.scrollWidth,Z=e.clientWidth,N=o.useMemo(function(){return function e(t){return t.filter(function(e){return e&&"object"===(0,E.Z)(e)&&!e.hidden}).map(function(t){var n=t.children;return n&&n.length>0?(0,k.Z)((0,k.Z)({},t),{},{children:e(n)}):t})}((a||ev(c)||[]).slice())},[a,c]),K=o.useMemo(function(){if(i){var e,t=N.slice();if(!t.includes(r)){var a=h||0,l=0===a&&"right"===w?N.length:a;l>=0&&t.splice(l,0,r)}var c=t.indexOf(r);t=t.filter(function(e,t){return e!==r||t===c});var v=N[c];e=w||(v?v.fixed:null);var y=(0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)({},eo,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",s),"fixed",e),"className","".concat(n,"-row-expand-icon-cell")),"width",x),"render",function(e,t,r){var a=u(t,r),l=p({prefixCls:n,expanded:d.has(a),expandable:!m||m(t),record:t,onExpand:f});return b?o.createElement("span",{onClick:function(e){return e.stopPropagation()}},l):l});return t.map(function(e,t){var n=e===r?y:e;return t=0;t-=1){var n=I[t].fixed;if("left"===n||!0===n){e=t;break}}if(e>=0)for(var o=0;o<=e;o+=1){var r=I[o].fixed;if("left"!==r&&!0!==r)return!0}var a=I.findIndex(function(e){return"right"===e.fixed});if(a>=0){for(var l=a;l0){var e=0,t=0;I.forEach(function(n){var o=ep(S,n.width);o?e+=o:t+=1});var n=Math.max(S,Z),o=Math.max(n-e,t),r=t,a=o/t,l=0,c=I.map(function(e){var t=(0,k.Z)({},e),n=ep(S,t.width);if(n)t.width=n;else{var c=Math.floor(a);t.width=1===r?o:c,o-=c,r-=1}return l+=t.width,t});if(l=n-h})})}})},z=function(e){I(function(t){return(0,k.Z)((0,k.Z)({},t),{},{scrollLeft:b?e/b*x:0})})};return(o.useImperativeHandle(t,function(){return{setScrollLeft:z,checkScrollBarVisible:H}}),o.useEffect(function(){var e=ew(document.body,"mouseup",j,!1),t=ew(document.body,"mousemove",B,!1);return H(),function(){e.remove(),t.remove()}},[E,M]),o.useEffect(function(){if(p.current){for(var e=[],t=(0,ek.bn)(p.current);t;)e.push(t),t=t.parentElement;return e.forEach(function(e){return e.addEventListener("scroll",H,!1)}),window.addEventListener("resize",H,!1),window.addEventListener("scroll",H,!1),v.addEventListener("scroll",H,!1),function(){e.forEach(function(e){return e.removeEventListener("scroll",H)}),window.removeEventListener("resize",H),window.removeEventListener("scroll",H),v.removeEventListener("scroll",H)}}},[v]),o.useEffect(function(){O.isHiddenScrollBar||I(function(e){var t=p.current;return t?(0,k.Z)((0,k.Z)({},e),{},{scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}):e})},[O.isHiddenScrollBar]),b<=x||!E||O.isHiddenScrollBar)?null:o.createElement("div",{style:{height:(0,_.Z)(),width:x,bottom:h},className:"".concat(y,"-sticky-scroll")},o.createElement("div",{onMouseDown:function(e){e.persist(),R.current.delta=e.pageX-O.scrollLeft,R.current.x=0,D(!0),e.preventDefault()},ref:S,className:Z()("".concat(y,"-sticky-scroll-bar"),(0,C.Z)({},"".concat(y,"-sticky-scroll-bar-active"),M)),style:{width:"".concat(E,"px"),transform:"translate3d(".concat(O.scrollLeft,"px, 0, 0)")}}))}),eZ="rc-table",eN=[],eK={};function eO(){return"No Data"}var eI=o.forwardRef(function(e,t){var n,r=(0,k.Z)({rowKey:"key",prefixCls:eZ,emptyText:eO},e),s=r.prefixCls,u=r.className,f=r.rowClassName,m=r.style,h=r.data,v=r.rowKey,g=r.scroll,y=r.tableLayout,b=r.direction,x=r.title,S=r.footer,O=r.summary,I=r.caption,P=r.id,T=r.showHeader,M=r.components,L=r.emptyText,B=r.onRow,q=r.onHeaderRow,V=r.measureRowRender,X=r.onScroll,G=r.internalHooks,Y=r.transformColumns,$=r.internalRefs,J=r.tailor,Q=r.getContainerWidth,ee=r.sticky,eo=r.rowHoverable,er=void 0===eo||eo,ec=h||eN,ei=!!ec.length,es=G===a,ef=o.useCallback(function(e,t){return(0,K.Z)(M,e)||t},[M]),ep=o.useMemo(function(){return"function"==typeof v?v:function(e){return e&&e[v]}},[v]),em=ef(["body"]),eh=(tU=o.useState(-1),tY=(tG=(0,l.Z)(tU,2))[0],t$=tG[1],tJ=o.useState(-1),t0=(tQ=(0,l.Z)(tJ,2))[0],t1=tQ[1],[tY,t0,o.useCallback(function(e,t){t$(e),t1(t)},[])]),ev=(0,l.Z)(eh,3),eg=ev[0],ew=ev[1],eE=ev[2],eC=(t8=(t3=r.expandable,t4=(0,j.Z)(r,en),!1===(t2="expandable"in r?(0,k.Z)((0,k.Z)({},t4),t3):t4).showExpandColumn&&(t2.expandIconColumnIndex=-1),t2).expandIcon,t6=t2.expandedRowKeys,t5=t2.defaultExpandedRowKeys,t7=t2.defaultExpandAllRows,t9=t2.expandedRowRender,ne=t2.onExpand,nt=t2.onExpandedRowsChange,nn=t2.childrenColumnName||"children",no=o.useMemo(function(){return t9?"row":!!(r.expandable&&r.internalHooks===a&&r.expandable.__PARENT_RENDER_ICON__||ec.some(function(e){return e&&"object"===(0,E.Z)(e)&&e[nn]}))&&"nest"},[!!t9,ec]),nr=o.useState(function(){if(t5)return t5;if(t7){var e;return e=[],function t(n){(n||[]).forEach(function(n,o){e.push(ep(n,o)),t(n[nn])})}(ec),e}return[]}),nl=(na=(0,l.Z)(nr,2))[0],nc=na[1],ni=o.useMemo(function(){return new Set(t6||nl||[])},[t6,nl]),nd=o.useCallback(function(e){var t,n=ep(e,ec.indexOf(e)),o=ni.has(n);o?(ni.delete(n),t=(0,el.Z)(ni)):t=[].concat((0,el.Z)(ni),[n]),nc(t),ne&&ne(!o,e),nt&&nt(t)},[ep,ni,ec,ne,nt]),[t2,no,ni,t8||U,nn,nd]),eI=(0,l.Z)(eC,6),eR=eI[0],eP=eI[1],eT=eI[2],eM=eI[3],eD=eI[4],eL=eI[5],ej=null==g?void 0:g.x,eB=o.useState(0),eH=(0,l.Z)(eB,2),ez=eH[0],eA=eH[1],eW=ey((0,k.Z)((0,k.Z)((0,k.Z)({},r),eR),{},{expandable:!!eR.expandedRowRender,columnTitle:eR.columnTitle,expandedKeys:eT,getRowKey:ep,onTriggerExpand:eL,expandIcon:eM,expandIconColumnIndex:eR.expandIconColumnIndex,direction:b,scrollWidth:es&&J&&"number"==typeof ej?ej:null,clientWidth:ez}),es?Y:null),e_=(0,l.Z)(eW,4),eF=e_[0],eq=e_[1],eV=e_[2],eX=e_[3],eU=null!=eV?eV:ej,eG=o.useMemo(function(){return{columns:eF,flattenColumns:eq}},[eF,eq]),eY=o.useRef(),e$=o.useRef(),eJ=o.useRef(),eQ=o.useRef();o.useImperativeHandle(t,function(){return{nativeElement:eY.current,scrollTo:function(e){var t;if(eJ.current instanceof HTMLElement){var n=e.index,o=e.top,r=e.key;if("number"!=typeof o||Number.isNaN(o)){var a,l,c=null!=r?r:ep(ec[n]);null===(l=eJ.current.querySelector('[data-row-key="'.concat(c,'"]')))||void 0===l||l.scrollIntoView()}else null===(a=eJ.current)||void 0===a||a.scrollTo({top:o})}else null!==(t=eJ.current)&&void 0!==t&&t.scrollTo&&eJ.current.scrollTo(e)}}});var e0=o.useRef(),e1=o.useState(!1),e2=(0,l.Z)(e1,2),e3=e2[0],e4=e2[1],e8=o.useState(!1),e6=(0,l.Z)(e8,2),e5=e6[0],e7=e6[1],e9=o.useState(new Map),te=(0,l.Z)(e9,2),tt=te[0],tn=te[1],to=R(eq).map(function(e){return tt.get(e)}),tr=o.useMemo(function(){return to},[to.join("_")]),ta=(0,o.useMemo)(function(){var e=eq.length,t=function(e,t,n){for(var o=[],r=0,a=e;a!==t;a+=n)o.push(r),eq[a].fixed&&(r+=tr[a]||0);return o},n=t(0,e,1),o=t(e-1,-1,-1).reverse();return"rtl"===b?{left:o,right:n}:{left:n,right:o}},[tr,eq,b]),tl=g&&null!=g.y,tc=g&&null!=eU||!!eR.fixed,ti=tc&&eq.some(function(e){return e.fixed}),td=o.useRef(),ts=(nf=void 0===(nu=(ns="object"===(0,E.Z)(ee)?ee:{}).offsetHeader)?0:nu,nm=void 0===(np=ns.offsetSummary)?0:np,nv=void 0===(nh=ns.offsetScroll)?0:nh,ny=(void 0===(ng=ns.getContainer)?function(){return eb}:ng)()||eb,nb=!!ee,o.useMemo(function(){return{isSticky:nb,stickyClassName:nb?"".concat(s,"-sticky-holder"):"",offsetHeader:nf,offsetSummary:nm,offsetScroll:nv,container:ny}},[nb,nv,nf,nm,s,ny])),tu=ts.isSticky,tf=ts.offsetHeader,tp=ts.offsetSummary,tm=ts.offsetScroll,th=ts.stickyClassName,tv=ts.container,tg=o.useMemo(function(){return null==O?void 0:O(ec)},[O,ec]),ty=(tl||tu)&&o.isValidElement(tg)&&tg.type===H&&tg.props.fixed;tl&&(nw={overflowY:ei?"scroll":"auto",maxHeight:g.y}),tc&&(nx={overflowX:"auto"},tl||(nw={overflowY:"hidden"}),nE={width:!0===eU?"auto":eU,minWidth:"100%"});var tb=o.useCallback(function(e,t){tn(function(n){if(n.get(e)!==t){var o=new Map(n);return o.set(e,t),o}return n})},[]),tx=function(e){var t=(0,o.useRef)(null),n=(0,o.useRef)();function r(){window.clearTimeout(n.current)}return(0,o.useEffect)(function(){return r},[]),[function(e){t.current=e,r(),n.current=window.setTimeout(function(){t.current=null,n.current=void 0},100)},function(){return t.current}]}(0),tw=(0,l.Z)(tx,2),tE=tw[0],tk=tw[1];function tC(e,t){t&&("function"==typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e,t.scrollLeft!==e&&setTimeout(function(){t.scrollLeft=e},0)))}var tS=(0,c.Z)(function(e){var t,n=e.currentTarget,o=e.scrollLeft,r="rtl"===b,a="number"==typeof o?o:n.scrollLeft,l=n||eK;tk()&&tk()!==l||(tE(l),tC(a,e$.current),tC(a,eJ.current),tC(a,e0.current),tC(a,null===(t=td.current)||void 0===t?void 0:t.setScrollLeft));var c=n||e$.current;if(c){var i=es&&J&&"number"==typeof eU?eU:c.scrollWidth,d=c.clientWidth;if(i===d){e4(!1),e7(!1);return}r?(e4(-a0)):(e4(a>0),e7(a1?x-D:0,pointerEvents:"auto"}),j=o.useMemo(function(){return h?T<=1:0===R||0===T||T>1},[T,R,h]);j?L.visibility="hidden":h&&(L.height=null==v?void 0:v(T));var B={};return(0===T||0===R)&&(B.rowSpan=1,B.colSpan=1),o.createElement(M,(0,p.Z)({className:Z()(b,m),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:i,prefixCls:n.prefixCls,key:C,record:s,index:c,renderIndex:d,dataIndex:y,render:j?function(){return null}:g,shouldCellUpdate:r.shouldCellUpdate},S,{appendNode:N,additionalProps:(0,k.Z)((0,k.Z)({},K),{},{style:L},B)}))},eL=["data","index","className","rowKey","style","extra","getHeight"],ej=b(o.forwardRef(function(e,t){var n,r=e.data,a=e.index,l=e.className,c=e.rowKey,i=e.style,d=e.extra,s=e.getHeight,u=(0,j.Z)(e,eL),m=r.record,h=r.indent,v=r.index,g=f(w,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),y=g.scrollX,b=g.flattenColumns,x=g.prefixCls,E=g.fixColumn,S=g.componentWidth,N=f(eT,["getComponent"]).getComponent,K=V(m,c,a,h),O=N(["body","row"],"div"),I=N(["body","cell"],"div"),R=K.rowSupportExpand,P=K.expanded,T=K.rowProps,D=K.expandedRowRender,L=K.expandedRowClassName;if(R&&P){var B=D(m,a,h+1,P),H=G(L,m,a,h),z={};E&&(z={style:(0,C.Z)({},"--virtual-width","".concat(S,"px"))});var A="".concat(x,"-expanded-row-cell");n=o.createElement(O,{className:Z()("".concat(x,"-expanded-row"),"".concat(x,"-expanded-row-level-").concat(h+1),H)},o.createElement(M,{component:I,prefixCls:x,className:Z()(A,(0,C.Z)({},"".concat(A,"-fixed"),E)),additionalProps:z},B))}var W=(0,k.Z)((0,k.Z)({},i),{},{width:y});d&&(W.position="absolute",W.pointerEvents="none");var _=o.createElement(O,(0,p.Z)({},T,u,{"data-row-key":c,ref:R?null:t,className:Z()(l,"".concat(x,"-row"),null==T?void 0:T.className,(0,C.Z)({},"".concat(x,"-row-extra"),d)),style:(0,k.Z)((0,k.Z)({},W),null==T?void 0:T.style)}),b.map(function(e,t){return o.createElement(eD,{key:t,component:I,rowInfo:K,column:e,colIndex:t,indent:h,index:a,renderIndex:v,record:m,inverse:d,getHeight:s})}));return R?o.createElement("div",{ref:t},_,n):_})),eB=b(o.forwardRef(function(e,t){var n=e.data,r=e.onScroll,a=f(w,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),c=a.flattenColumns,i=a.onColumnResize,d=a.getRowKey,s=a.expandedKeys,u=a.prefixCls,p=a.childrenColumnName,m=a.scrollX,h=a.direction,v=f(eT),g=v.sticky,y=v.scrollY,b=v.listItemHeight,x=v.getComponent,k=v.onScroll,C=o.useRef(),S=q(n,p,s,d),Z=o.useMemo(function(){var e=0;return c.map(function(t){var n=t.width,o=t.minWidth,r=t.key,a=Math.max(n||0,o||0);return e+=a,[r,a,e]})},[c]),N=o.useMemo(function(){return Z.map(function(e){return e[2]})},[Z]);o.useEffect(function(){Z.forEach(function(e){var t=(0,l.Z)(e,2);i(t[0],t[1])})},[Z]),o.useImperativeHandle(t,function(){var e,t={scrollTo:function(e){var t;null===(t=C.current)||void 0===t||t.scrollTo(e)},nativeElement:null===(e=C.current)||void 0===e?void 0:e.nativeElement};return Object.defineProperty(t,"scrollLeft",{get:function(){var e;return(null===(e=C.current)||void 0===e?void 0:e.getScrollInfo().x)||0},set:function(e){var t;null===(t=C.current)||void 0===t||t.scrollTo({left:e})}}),Object.defineProperty(t,"scrollTop",{get:function(){var e;return(null===(e=C.current)||void 0===e?void 0:e.getScrollInfo().y)||0},set:function(e){var t;null===(t=C.current)||void 0===t||t.scrollTo({top:e})}}),t});var K=function(e,t){var n=null===(r=S[t])||void 0===r?void 0:r.record,o=e.onCell;if(o){var r,a,l=o(n,t);return null!==(a=null==l?void 0:l.rowSpan)&&void 0!==a?a:1}return 1},O=o.useMemo(function(){return{columnsOffset:N}},[N]),I="".concat(u,"-tbody"),R=x(["body","wrapper"]),P={};return g&&(P.position="sticky",P.bottom=0,"object"===(0,E.Z)(g)&&g.offsetScroll&&(P.bottom=g.offsetScroll)),o.createElement(eM.Provider,{value:O},o.createElement(eP.Z,{fullHeight:!1,ref:C,prefixCls:"".concat(I,"-virtual"),styles:{horizontalScrollBar:P},className:I,height:y,itemHeight:b||24,data:S,itemKey:function(e){return d(e.record)},component:R,scrollWidth:m,direction:h,onVirtualScroll:function(e){var t,n=e.x;r({currentTarget:null===(t=C.current)||void 0===t?void 0:t.nativeElement,scrollLeft:n})},onScroll:k,extraRender:function(e){var t=e.start,n=e.end,r=e.getSize,a=e.offsetY;if(n<0)return null;for(var l=c.filter(function(e){return 0===K(e,t)}),i=t,s=function(e){if(!(l=l.filter(function(t){return 0===K(t,e)})).length)return i=e,1},u=t;u>=0&&!s(u);u-=1);for(var f=c.filter(function(e){return 1!==K(e,n)}),p=n,m=function(e){if(!(f=f.filter(function(t){return 1!==K(t,e)})).length)return p=Math.max(e-1,n),1},h=n;h1})&&v.push(e)},y=i;y<=p;y+=1)if(g(y))continue;return v.map(function(e){var t=S[e],n=d(t.record,e),l=r(n);return o.createElement(ej,{key:e,data:t,rowKey:n,index:e,style:{top:-a+l.top},extra:!0,getHeight:function(t){var o=e+t-1,a=r(n,d(S[o].record,o));return a.bottom-a.top}})})}},function(e,t,n){var r=d(e.record,t);return o.createElement(ej,{data:e,rowKey:r,index:t,style:n.style})}))})),eH=function(e,t){var n=t.ref,r=t.onScroll;return o.createElement(eB,{ref:n,data:e,onScroll:r})},ez=o.forwardRef(function(e,t){var n=e.data,r=e.columns,l=e.scroll,c=e.sticky,i=e.prefixCls,d=void 0===i?eZ:i,s=e.className,u=e.listItemHeight,f=e.components,m=e.onScroll,h=l||{},v=h.x,g=h.y;"number"!=typeof v&&(v=1),"number"!=typeof g&&(g=500);var y=(0,P.zX)(function(e,t){return(0,K.Z)(f,e)||t}),b=(0,P.zX)(m),x=o.useMemo(function(){return{sticky:c,scrollY:g,listItemHeight:u,getComponent:y,onScroll:b}},[c,g,u,y,b]);return o.createElement(eT.Provider,{value:x},o.createElement(eR,(0,p.Z)({},e,{className:Z()(s,"".concat(d,"-virtual")),scroll:(0,k.Z)((0,k.Z)({},l),{},{x:v}),components:(0,k.Z)((0,k.Z)({},f),{},{body:null!=n&&n.length?eH:void 0}),columns:r,internalHooks:a,tailor:!0,ref:t})))});y(ez,void 0);var eA=n(70464),eW=o.createContext(null),e_=o.createContext({}),eF=o.memo(function(e){for(var t=e.prefixCls,n=e.level,r=e.isStart,a=e.isEnd,l="".concat(t,"-indent-unit"),c=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:null;return n.map(function(d,s){for(var u,f=eX(o?o.pos:"0",s),p=eU(d[a],f),m=0;m1&&void 0!==arguments[1]?arguments[1]:{},f=u.initWrapper,p=u.processEntity,m=u.onProcessFinished,h=u.externalGetKey,v=u.childrenPropName,g=u.fieldNames,y=arguments.length>2?arguments[2]:void 0,b={},x={},w={posEntities:b,keyEntities:x};return f&&(w=f(w)||w),t=function(e){var t=e.node,n=e.index,o=e.pos,r=e.key,a=e.parentPos,l=e.level,c={node:t,nodes:e.nodes,index:n,key:r,pos:o,level:l},i=eU(r,o);b[o]=c,x[i]=c,c.parent=b[a],c.parent&&(c.parent.children=c.parent.children||[],c.parent.children.push(c)),p&&p(c,w)},n={externalGetKey:h||y,childrenPropName:v,fieldNames:g},a=(r=("object"===(0,E.Z)(n)?n:{externalGetKey:n})||{}).childrenPropName,l=r.externalGetKey,i=(c=eG(r.fieldNames)).key,d=c.children,s=a||d,l?"string"==typeof l?o=function(e){return e[l]}:"function"==typeof l&&(o=function(e){return l(e)}):o=function(e,t){return eU(e[i],t)},function n(r,a,l,c){var i=r?r[s]:e,d=r?eX(l.pos,a):"0",u=r?[].concat((0,el.Z)(c),[r]):[];if(r){var f=o(r,d);t({node:r,index:a,pos:d,key:f,parentPos:l.node?l.pos:null,level:l.level+1,nodes:u})}i&&i.forEach(function(e,t){n(e,t,{node:r,pos:d,level:l?l.level+1:-1},u)})}(null),m&&m(w),w}function eQ(e,t){var n=t.expandedKeys,o=t.selectedKeys,r=t.loadedKeys,a=t.loadingKeys,l=t.checkedKeys,c=t.halfCheckedKeys,i=t.dragOverNodeKey,d=t.dropPosition,s=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==o.indexOf(e),loaded:-1!==r.indexOf(e),loading:-1!==a.indexOf(e),checked:-1!==l.indexOf(e),halfChecked:-1!==c.indexOf(e),pos:String(s?s.pos:""),dragOver:i===e&&0===d,dragOverGapTop:i===e&&-1===d,dragOverGapBottom:i===e&&1===d}}function e0(e){var t=e.data,n=e.expanded,o=e.selected,r=e.checked,a=e.loaded,l=e.loading,c=e.halfChecked,i=e.dragOver,d=e.dragOverGapTop,s=e.dragOverGapBottom,u=e.pos,f=e.active,p=e.eventKey,m=(0,k.Z)((0,k.Z)({},t),{},{expanded:n,selected:o,checked:r,loaded:a,loading:l,halfChecked:c,dragOver:i,dragOverGapTop:d,dragOverGapBottom:s,pos:u,active:f,key:p});return"props"in m||Object.defineProperty(m,"props",{get:function(){return(0,O.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}var e1=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],e2="open",e3="close",e4=function(e){var t,n,r,a=e.eventKey,c=e.className,i=e.style,d=e.dragOver,s=e.dragOverGapTop,u=e.dragOverGapBottom,f=e.isLeaf,m=e.isStart,h=e.isEnd,v=e.expanded,g=e.selected,y=e.checked,b=e.halfChecked,x=e.loading,w=e.domRef,E=e.active,S=e.data,N=e.onMouseMove,K=e.selectable,O=(0,j.Z)(e,e1),I=o.useContext(eW),R=o.useContext(e_),P=o.useRef(null),T=o.useState(!1),M=(0,l.Z)(T,2),D=M[0],L=M[1],B=!!(I.disabled||e.disabled||null!==(t=R.nodeDisabled)&&void 0!==t&&t.call(R,S)),H=o.useMemo(function(){return!!I.checkable&&!1!==e.checkable&&I.checkable},[I.checkable,e.checkable]),z=function(t){B||I.onNodeSelect(t,e0(e))},A=function(t){B||!H||e.disableCheckbox||I.onNodeCheck(t,e0(e),!y)},W=o.useMemo(function(){return"boolean"==typeof K?K:I.selectable},[K,I.selectable]),_=function(t){I.onNodeClick(t,e0(e)),W?z(t):A(t)},q=function(t){I.onNodeDoubleClick(t,e0(e))},V=function(t){I.onNodeMouseEnter(t,e0(e))},X=function(t){I.onNodeMouseLeave(t,e0(e))},U=function(t){I.onNodeContextMenu(t,e0(e))},G=o.useMemo(function(){return!!(I.draggable&&(!I.draggable.nodeDraggable||I.draggable.nodeDraggable(S)))},[I.draggable,S]),Y=function(t){x||I.onNodeExpand(t,e0(e))},$=o.useMemo(function(){return!!((I.keyEntities[a]||{}).children||[]).length},[I.keyEntities,a]),J=o.useMemo(function(){return!1!==f&&(f||!I.loadData&&!$||I.loadData&&e.loaded&&!$)},[f,I.loadData,$,e.loaded]);o.useEffect(function(){!x&&("function"!=typeof I.loadData||!v||J||e.loaded||I.onNodeLoad(e0(e)))},[x,I.loadData,I.onNodeLoad,v,J,e]);var Q=o.useMemo(function(){var e;return null!==(e=I.draggable)&&void 0!==e&&e.icon?o.createElement("span",{className:"".concat(I.prefixCls,"-draggable-icon")},I.draggable.icon):null},[I.draggable]),ee=function(t){var n=e.switcherIcon||I.switcherIcon;return"function"==typeof n?n((0,k.Z)((0,k.Z)({},e),{},{isLeaf:t})):n},et=o.useMemo(function(){if(!H)return null;var t="boolean"!=typeof H?H:null;return o.createElement("span",{className:Z()("".concat(I.prefixCls,"-checkbox"),(0,C.Z)((0,C.Z)((0,C.Z)({},"".concat(I.prefixCls,"-checkbox-checked"),y),"".concat(I.prefixCls,"-checkbox-indeterminate"),!y&&b),"".concat(I.prefixCls,"-checkbox-disabled"),B||e.disableCheckbox)),onClick:A,role:"checkbox","aria-checked":b?"mixed":y,"aria-disabled":B||e.disableCheckbox,"aria-label":"Select ".concat("string"==typeof e.title?e.title:"tree node")},t)},[H,y,b,B,e.disableCheckbox,e.title]),en=o.useMemo(function(){return J?null:v?e2:e3},[J,v]),eo=o.useMemo(function(){return o.createElement("span",{className:Z()("".concat(I.prefixCls,"-iconEle"),"".concat(I.prefixCls,"-icon__").concat(en||"docu"),(0,C.Z)({},"".concat(I.prefixCls,"-icon_loading"),x))})},[I.prefixCls,en,x]),er=o.useMemo(function(){var t=!!I.draggable;return!e.disabled&&t&&I.dragOverNodeKey===a?I.dropIndicatorRender({dropPosition:I.dropPosition,dropLevelOffset:I.dropLevelOffset,indent:I.indent,prefixCls:I.prefixCls,direction:I.direction}):null},[I.dropPosition,I.dropLevelOffset,I.indent,I.prefixCls,I.direction,I.draggable,I.dragOverNodeKey,I.dropIndicatorRender]),ea=o.useMemo(function(){var t,n,r=e.title,a=void 0===r?"---":r,l="".concat(I.prefixCls,"-node-content-wrapper");if(I.showIcon){var c=e.icon||I.icon;t=c?o.createElement("span",{className:Z()("".concat(I.prefixCls,"-iconEle"),"".concat(I.prefixCls,"-icon__customize"))},"function"==typeof c?c(e):c):eo}else I.loadData&&x&&(t=eo);return n="function"==typeof a?a(S):I.titleRender?I.titleRender(S):a,o.createElement("span",{ref:P,title:"string"==typeof a?a:"",className:Z()(l,"".concat(l,"-").concat(en||"normal"),(0,C.Z)({},"".concat(I.prefixCls,"-node-selected"),!B&&(g||D))),onMouseEnter:V,onMouseLeave:X,onContextMenu:U,onClick:_,onDoubleClick:q},t,o.createElement("span",{className:"".concat(I.prefixCls,"-title")},n),er)},[I.prefixCls,I.showIcon,e,I.icon,eo,I.titleRender,S,en,V,X,U,_,q]),el=(0,F.Z)(O,{aria:!0,data:!0}),ec=(I.keyEntities[a]||{}).level,ei=h[h.length-1],ed=!B&&G,es=I.draggingNodeKey===a;return o.createElement("div",(0,p.Z)({ref:w,role:"treeitem","aria-expanded":f?void 0:v,className:Z()(c,"".concat(I.prefixCls,"-treenode"),(r={},(0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)(r,"".concat(I.prefixCls,"-treenode-disabled"),B),"".concat(I.prefixCls,"-treenode-switcher-").concat(v?"open":"close"),!f),"".concat(I.prefixCls,"-treenode-checkbox-checked"),y),"".concat(I.prefixCls,"-treenode-checkbox-indeterminate"),b),"".concat(I.prefixCls,"-treenode-selected"),g),"".concat(I.prefixCls,"-treenode-loading"),x),"".concat(I.prefixCls,"-treenode-active"),E),"".concat(I.prefixCls,"-treenode-leaf-last"),ei),"".concat(I.prefixCls,"-treenode-draggable"),G),"dragging",es),(0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)(r,"drop-target",I.dropTargetKey===a),"drop-container",I.dropContainerKey===a),"drag-over",!B&&d),"drag-over-gap-top",!B&&s),"drag-over-gap-bottom",!B&&u),"filter-node",null===(n=I.filterTreeNode)||void 0===n?void 0:n.call(I,e0(e))),"".concat(I.prefixCls,"-treenode-leaf"),J))),style:i,draggable:ed,onDragStart:ed?function(t){t.stopPropagation(),L(!0),I.onNodeDragStart(t,e);try{t.dataTransfer.setData("text/plain","")}catch(e){}}:void 0,onDragEnter:G?function(t){t.preventDefault(),t.stopPropagation(),I.onNodeDragEnter(t,e)}:void 0,onDragOver:G?function(t){t.preventDefault(),t.stopPropagation(),I.onNodeDragOver(t,e)}:void 0,onDragLeave:G?function(t){t.stopPropagation(),I.onNodeDragLeave(t,e)}:void 0,onDrop:G?function(t){t.preventDefault(),t.stopPropagation(),L(!1),I.onNodeDrop(t,e)}:void 0,onDragEnd:G?function(t){t.stopPropagation(),L(!1),I.onNodeDragEnd(t,e)}:void 0,onMouseMove:N},void 0!==K?{"aria-selected":!!K}:void 0,el),o.createElement(eF,{prefixCls:I.prefixCls,level:ec,isStart:m,isEnd:h}),Q,function(){if(J){var e=ee(!0);return!1!==e?o.createElement("span",{className:Z()("".concat(I.prefixCls,"-switcher"),"".concat(I.prefixCls,"-switcher-noop"))},e):null}var t=ee(!1);return!1!==t?o.createElement("span",{onClick:Y,className:Z()("".concat(I.prefixCls,"-switcher"),"".concat(I.prefixCls,"-switcher_").concat(v?e2:e3))},t):null}(),et,ea)};function e8(e,t){if(!e)return[];var n=e.slice(),o=n.indexOf(t);return o>=0&&n.splice(o,1),n}function e6(e,t){var n=(e||[]).slice();return -1===n.indexOf(t)&&n.push(t),n}function e5(e){return e.split("-")}function e7(e,t,n,o,r,a,l,c,i,d){var s,u,f=e.clientX,p=e.clientY,m=e.target.getBoundingClientRect(),h=m.top,v=m.height,g=(("rtl"===d?-1:1)*(((null==r?void 0:r.x)||0)-f)-12)/o,y=i.filter(function(e){var t;return null===(t=c[e])||void 0===t||null===(t=t.children)||void 0===t?void 0:t.length}),b=c[n.eventKey];if(p-1.5?a({dragNode:N,dropNode:K,dropPosition:1})?C=1:O=!1:a({dragNode:N,dropNode:K,dropPosition:0})?C=0:a({dragNode:N,dropNode:K,dropPosition:1})?C=1:O=!1:a({dragNode:N,dropNode:K,dropPosition:1})?C=1:O=!1,{dropPosition:C,dropLevelOffset:S,dropTargetKey:b.key,dropTargetPos:b.pos,dragOverNodeKey:k,dropContainerKey:0===C?null:(null===(u=b.parent)||void 0===u?void 0:u.key)||null,dropAllowed:O}}function e9(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function te(e){var t;if(!e)return null;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==(0,E.Z)(e))return(0,O.ZP)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function tt(e,t){var n=new Set;return(e||[]).forEach(function(e){!function e(o){if(!n.has(o)){var r=t[o];if(r){n.add(o);var a=r.parent;!r.node.disabled&&a&&e(a.key)}}}(e)}),(0,el.Z)(n)}function tn(e,t){var n=new Set;return e.forEach(function(e){t.has(e)||n.add(e)}),n}function to(e){var t=e||{},n=t.disabled,o=t.disableCheckbox,r=t.checkable;return!!(n||o)||!1===r}function tr(e,t,n,o){var r,a=[];r=o||to;var l=new Set(e.filter(function(e){var t=!!n[e];return t||a.push(e),t})),c=new Map,i=0;return Object.keys(n).forEach(function(e){var t=n[e],o=t.level,r=c.get(o);r||(r=new Set,c.set(o,r)),r.add(t),i=Math.max(i,o)}),(0,O.ZP)(!a.length,"Tree missing follow keys: ".concat(a.slice(0,100).map(function(e){return"'".concat(e,"'")}).join(", "))),!0===t?function(e,t,n,o){for(var r=new Set(e),a=new Set,l=0;l<=n;l+=1)(t.get(l)||new Set).forEach(function(e){var t=e.key,n=e.node,a=e.children,l=void 0===a?[]:a;r.has(t)&&!o(n)&&l.filter(function(e){return!o(e.node)}).forEach(function(e){r.add(e.key)})});for(var c=new Set,i=n;i>=0;i-=1)(t.get(i)||new Set).forEach(function(e){var t=e.parent;if(!(o(e.node)||!e.parent||c.has(e.parent.key))){if(o(e.parent.node)){c.add(t.key);return}var n=!0,l=!1;(t.children||[]).filter(function(e){return!o(e.node)}).forEach(function(e){var t=e.key,o=r.has(t);n&&!o&&(n=!1),!l&&(o||a.has(t))&&(l=!0)}),n&&r.add(t.key),l&&a.add(t.key),c.add(t.key)}});return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(tn(a,r))}}(l,c,i,r):function(e,t,n,o,r){for(var a=new Set(e),l=new Set(t),c=0;c<=o;c+=1)(n.get(c)||new Set).forEach(function(e){var t=e.key,n=e.node,o=e.children,c=void 0===o?[]:o;a.has(t)||l.has(t)||r(n)||c.filter(function(e){return!r(e.node)}).forEach(function(e){a.delete(e.key)})});l=new Set;for(var i=new Set,d=o;d>=0;d-=1)(n.get(d)||new Set).forEach(function(e){var t=e.parent;if(!(r(e.node)||!e.parent||i.has(e.parent.key))){if(r(e.parent.node)){i.add(t.key);return}var n=!0,o=!1;(t.children||[]).filter(function(e){return!r(e.node)}).forEach(function(e){var t=e.key,r=a.has(t);n&&!r&&(n=!1),!o&&(r||l.has(t))&&(o=!0)}),n||a.delete(t.key),o&&l.add(t.key),i.add(t.key)}});return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(tn(l,a))}}(l,t.halfCheckedKeys,c,i,r)}e4.isTreeNode=1;var ta=n(50506);let tl=e=>{let[t,n]=(0,o.useState)(null);return[(0,o.useCallback)((o,r,a)=>{let l=null!=t?t:o,c=Math.max(l||0,o),i=r.slice(Math.min(l||0,o),c+1).map(e),d=i.some(e=>!a.has(e)),s=[];return i.forEach(e=>{d?(a.has(e)||s.push(e),a.add(e)):(a.delete(e),s.push(e))}),n(d?c:null),s},[t]),n]};var tc=n(13613),ti=n(4156),td=n(73705),ts=n(29967);let tu={},tf="SELECT_ALL",tp="SELECT_INVERT",tm="SELECT_NONE",th=[],tv=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(t||[]).forEach(t=>{n.push(t),t&&"object"==typeof t&&e in t&&tv(e,t[e],n)}),n};var tg=(e,t)=>{let{preserveSelectedRowKeys:n,selectedRowKeys:r,defaultSelectedRowKeys:a,getCheckboxProps:l,getTitleCheckboxProps:c,onChange:i,onSelect:d,onSelectAll:s,onSelectInvert:u,onSelectNone:f,onSelectMultiple:p,columnWidth:m,type:h,selections:v,fixed:g,renderCell:y,hideSelectAll:b,checkStrictly:x=!0}=t||{},{prefixCls:w,data:E,pageData:k,getRecordByKey:C,getRowKey:S,expandType:N,childrenColumnName:K,locale:O,getPopupContainer:I}=e,R=(0,tc.ln)("Table"),[P,T]=tl(e=>e),[M,D]=(0,ta.Z)(r||a||th,{value:r}),L=o.useRef(new Map),j=(0,o.useCallback)(e=>{if(n){let t=new Map;e.forEach(e=>{let n=C(e);!n&&L.current.has(e)&&(n=L.current.get(e)),t.set(e,n)}),L.current=t}},[C,n]);o.useEffect(()=>{j(M)},[M]);let B=(0,o.useMemo)(()=>tv(K,k),[K,k]),{keyEntities:H}=(0,o.useMemo)(()=>{if(x)return{keyEntities:null};let e=E;if(n){let t=new Set(B.map((e,t)=>S(e,t))),n=Array.from(L.current).reduce((e,n)=>{let[o,r]=n;return t.has(o)?e:e.concat(r)},[]);e=[].concat((0,el.Z)(e),(0,el.Z)(n))}return eJ(e,{externalGetKey:S,childrenPropName:K})},[E,S,x,K,n,B]),z=(0,o.useMemo)(()=>{let e=new Map;return B.forEach((t,n)=>{let o=S(t,n),r=(l?l(t):null)||{};e.set(o,r)}),e},[B,S,l]),A=(0,o.useCallback)(e=>{let t;let n=S(e);return!!(null==(t=z.has(n)?z.get(S(e)):l?l(e):void 0)?void 0:t.disabled)},[z,S]),[W,_]=(0,o.useMemo)(()=>{if(x)return[M||[],[]];let{checkedKeys:e,halfCheckedKeys:t}=tr(M,!0,H,A);return[e||[],t]},[M,x,H,A]),F=(0,o.useMemo)(()=>new Set("radio"===h?W.slice(0,1):W),[W,h]),q=(0,o.useMemo)(()=>"radio"===h?new Set:new Set(_),[_,h]);o.useEffect(()=>{t||D(th)},[!!t]);let V=(0,o.useCallback)((e,t)=>{let o,r;j(e),n?(o=e,r=e.map(e=>L.current.get(e))):(o=[],r=[],e.forEach(e=>{let t=C(e);void 0!==t&&(o.push(e),r.push(t))})),D(o),null==i||i(o,r,{type:t})},[D,C,i,n]),X=(0,o.useCallback)((e,t,n,o)=>{if(d){let r=n.map(e=>C(e));d(C(e),t,r,o)}V(n,"single")},[d,C,V]),U=(0,o.useMemo)(()=>!v||b?null:(!0===v?[tf,tp,tm]:v).map(e=>e===tf?{key:"all",text:O.selectionAll,onSelect(){V(E.map((e,t)=>S(e,t)).filter(e=>{let t=z.get(e);return!(null==t?void 0:t.disabled)||F.has(e)}),"all")}}:e===tp?{key:"invert",text:O.selectInvert,onSelect(){let e=new Set(F);k.forEach((t,n)=>{let o=S(t,n),r=z.get(o);(null==r?void 0:r.disabled)||(e.has(o)?e.delete(o):e.add(o))});let t=Array.from(e);u&&(R.deprecated(!1,"onSelectInvert","onChange"),u(t)),V(t,"invert")}}:e===tm?{key:"none",text:O.selectNone,onSelect(){null==f||f(),V(Array.from(F).filter(e=>{let t=z.get(e);return null==t?void 0:t.disabled}),"none")}}:e).map(e=>Object.assign(Object.assign({},e),{onSelect:function(){for(var t,n=arguments.length,o=Array(n),r=0;r{var n;let r,a,l;if(!t)return e.filter(e=>e!==tu);let i=(0,el.Z)(e),d=new Set(F),u=B.map(S).filter(e=>!z.get(e).disabled),f=u.every(e=>d.has(e)),E=u.some(e=>d.has(e)),k=()=>{let e=[];f?u.forEach(t=>{d.delete(t),e.push(t)}):u.forEach(t=>{d.has(t)||(d.add(t),e.push(t))});let t=Array.from(d);null==s||s(!f,t.map(e=>C(e)),e.map(e=>C(e))),V(t,"all"),T(null)};if("radio"!==h){let e;if(U){let t={getPopupContainer:I,items:U.map((e,t)=>{let{key:n,text:o,onSelect:r}=e;return{key:null!=n?n:t,onClick:()=>{null==r||r(u)},label:o}})};e=o.createElement("div",{className:"".concat(w,"-selection-extra")},o.createElement(td.Z,{menu:t,getPopupContainer:I},o.createElement("span",null,o.createElement(eA.Z,null))))}let t=B.map((e,t)=>{let n=S(e,t),o=z.get(n)||{};return Object.assign({checked:d.has(n)},o)}).filter(e=>{let{disabled:t}=e;return t}),n=!!t.length&&t.length===B.length,l=n&&t.every(e=>{let{checked:t}=e;return t}),i=n&&t.some(e=>{let{checked:t}=e;return t}),s=(null==c?void 0:c())||{},{onChange:p,disabled:m}=s;a=o.createElement(ti.Z,Object.assign({"aria-label":e?"Custom selection":"Select all"},s,{checked:n?l:!!B.length&&f,indeterminate:n?!l&&i:!f&&E,onChange:e=>{k(),null==p||p(e)},disabled:null!=m?m:0===B.length||n,skipGroup:!0})),r=!b&&o.createElement("div",{className:"".concat(w,"-selection")},a,e)}if(l="radio"===h?(e,t,n)=>{let r=S(t,n),a=d.has(r),l=z.get(r);return{node:o.createElement(ts.ZP,Object.assign({},l,{checked:a,onClick:e=>{var t;e.stopPropagation(),null===(t=null==l?void 0:l.onClick)||void 0===t||t.call(l,e)},onChange:e=>{var t;d.has(r)||X(r,!0,[r],e.nativeEvent),null===(t=null==l?void 0:l.onChange)||void 0===t||t.call(l,e)}})),checked:a}}:(e,t,n)=>{var r;let a;let l=S(t,n),c=d.has(l),i=q.has(l),s=z.get(l);return a="nest"===N?i:null!==(r=null==s?void 0:s.indeterminate)&&void 0!==r?r:i,{node:o.createElement(ti.Z,Object.assign({},s,{indeterminate:a,checked:c,skipGroup:!0,onClick:e=>{var t;e.stopPropagation(),null===(t=null==s?void 0:s.onClick)||void 0===t||t.call(s,e)},onChange:e=>{var t;let{nativeEvent:n}=e,{shiftKey:o}=n,r=u.indexOf(l),a=W.some(e=>u.includes(e));if(o&&x&&a){let e=P(r,u,d),t=Array.from(d);null==p||p(!c,t.map(e=>C(e)),e.map(e=>C(e))),V(t,"multiple")}else if(x){let e=c?e8(W,l):e6(W,l);X(l,!c,e,n)}else{let{checkedKeys:e,halfCheckedKeys:t}=tr([].concat((0,el.Z)(W),[l]),!0,H,A),o=e;if(c){let n=new Set(e);n.delete(l),o=tr(Array.from(n),{checked:!1,halfCheckedKeys:t},H,A).checkedKeys}X(l,!c,o,n)}c?T(null):T(r),null===(t=null==s?void 0:s.onChange)||void 0===t||t.call(s,e)}})),checked:c}},!i.includes(tu)){if(0===i.findIndex(e=>{var t;return(null===(t=e[eo])||void 0===t?void 0:t.columnType)==="EXPAND_COLUMN"})){let[e,...t]=i;i=[e,tu].concat((0,el.Z)(t))}else i=[tu].concat((0,el.Z)(i))}let K=i.indexOf(tu),O=(i=i.filter((e,t)=>e!==tu||t===K))[K-1],R=i[K+1],M=g;void 0===M&&((null==R?void 0:R.fixed)!==void 0?M=R.fixed:(null==O?void 0:O.fixed)!==void 0&&(M=O.fixed)),M&&O&&(null===(n=O[eo])||void 0===n?void 0:n.columnType)==="EXPAND_COLUMN"&&void 0===O.fixed&&(O.fixed=M);let D=Z()("".concat(w,"-selection-col"),{["".concat(w,"-selection-col-with-dropdown")]:v&&"checkbox"===h}),L={fixed:M,width:m,className:"".concat(w,"-selection-column"),title:(null==t?void 0:t.columnTitle)?"function"==typeof t.columnTitle?t.columnTitle(a):t.columnTitle:r,render:(e,t,n)=>{let{node:o,checked:r}=l(e,t,n);return y?y(r,t,n,o):o},onCell:t.onCell,align:t.align,[eo]:{className:D}};return i.map(e=>e===tu?L:e)},[S,B,t,W,F,q,m,U,N,z,p,X,A]),F]};let ty=(e,t)=>(0,o.useImperativeHandle)(e,()=>{let e=t(),{nativeElement:n}=e;return"undefined"!=typeof Proxy?new Proxy(n,{get:(t,n)=>e[n]?e[n]:Reflect.get(t,n)}):(n._antProxy=n._antProxy||{},Object.keys(e).forEach(t=>{if(!(t in n._antProxy)){let o=n[t];n._antProxy[t]=o,n[t]=e[t]}}),n)});function tb(e){return null!=e&&e===e.window}var tx=e=>{var t,n;if("undefined"==typeof window)return 0;let o=0;return tb(e)?o=e.pageYOffset:e instanceof Document?o=e.documentElement.scrollTop:e instanceof HTMLElement?o=e.scrollTop:e&&(o=e.scrollTop),e&&!tb(e)&&"number"!=typeof o&&(o=null===(n=(null!==(t=e.ownerDocument)&&void 0!==t?t:e).documentElement)||void 0===n?void 0:n.scrollTop),o},tw=n(18310),tE=n(71744),tk=n(91086),tC=n(64024),tS=n(33759),tZ=n(28617),tN=n(37381),tK=n(40049),tO=n(10353),tI=n(91691);let tR=(e,t)=>"key"in e&&void 0!==e.key&&null!==e.key?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function tP(e,t){return t?"".concat(t,"-").concat(e):"".concat(e)}let tT=(e,t)=>"function"==typeof e?e(t):e,tM=(e,t)=>{let n=tT(e,t);return"[object Object]"===Object.prototype.toString.call(n)?"":n};var tD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},tL=n(55015),tj=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:tD}))}),tB=n(53253),tH=n(51646);let tz=e=>{let t=o.useRef(e),[,n]=(0,tH.N)();return[()=>t.current,e=>{t.current=e,n()}]};var tA=n(5545),tW=n(85180),t_=n(60985),tF=n(88208),tq=n(76405),tV=n(25049),tX=n(63496),tU=n(41690),tG=n(15900),tY=n(95814);function t$(e){if(null==e)throw TypeError("Cannot destructure "+e)}var tJ=n(66632),tQ=function(e,t){var n=o.useState(!1),r=(0,l.Z)(n,2),a=r[0],c=r[1];(0,i.Z)(function(){if(a)return e(),function(){t()}},[a]),(0,i.Z)(function(){return c(!0),function(){c(!1)}},[])},t0=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],t1=o.forwardRef(function(e,t){var n=e.className,r=e.style,a=e.motion,c=e.motionNodes,d=e.motionType,s=e.onMotionStart,u=e.onMotionEnd,f=e.active,m=e.treeNodeRequiredProps,h=(0,j.Z)(e,t0),v=o.useState(!0),g=(0,l.Z)(v,2),y=g[0],b=g[1],x=o.useContext(eW).prefixCls,w=c&&"hide"!==d;(0,i.Z)(function(){c&&w!==y&&b(w)},[c]);var E=o.useRef(!1),k=function(){c&&!E.current&&(E.current=!0,u())};return(tQ(function(){c&&s()},k),c)?o.createElement(tJ.ZP,(0,p.Z)({ref:t,visible:y},a,{motionAppear:"show"===d,onVisibleChanged:function(e){w===e&&k()}}),function(e,t){var n=e.className,r=e.style;return o.createElement("div",{ref:t,className:Z()("".concat(x,"-treenode-motion"),n),style:r},c.map(function(e){var t=Object.assign({},(t$(e.data),e.data)),n=e.title,r=e.key,a=e.isStart,l=e.isEnd;delete t.children;var c=eQ(r,m);return o.createElement(e4,(0,p.Z)({},t,c,{title:n,active:f,data:e.data,key:r,isStart:a,isEnd:l}))}))}):o.createElement(e4,(0,p.Z)({domRef:t,className:n,style:r},h,{active:f}))});function t2(e,t,n){var o=e.findIndex(function(e){return e.key===n}),r=e[o+1],a=t.findIndex(function(e){return e.key===n});if(r){var l=t.findIndex(function(e){return e.key===r.key});return t.slice(a+1,l)}return t.slice(a+1)}var t3=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],t4={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},t8=function(){},t6="RC_TREE_MOTION_".concat(Math.random()),t5={key:t6},t7={key:t6,level:0,index:0,pos:"0",node:t5,nodes:[t5]},t9={parent:null,children:[],pos:t7.pos,data:t5,title:null,key:t6,isStart:[],isEnd:[]};function ne(e,t,n,o){return!1!==t&&n?e.slice(0,Math.ceil(n/o)+1):e}function nt(e){return eU(e.key,e.pos)}var nn=o.forwardRef(function(e,t){var n=e.prefixCls,r=e.data,a=(e.selectable,e.checkable,e.expandedKeys),c=e.selectedKeys,d=e.checkedKeys,s=e.loadedKeys,u=e.loadingKeys,f=e.halfCheckedKeys,m=e.keyEntities,h=e.disabled,v=e.dragging,g=e.dragOverNodeKey,y=e.dropPosition,b=e.motion,x=e.height,w=e.itemHeight,E=e.virtual,k=e.scrollWidth,C=e.focusable,S=e.activeItem,Z=e.focused,N=e.tabIndex,K=e.onKeyDown,O=e.onFocus,I=e.onBlur,R=e.onActiveChange,P=e.onListChangeStart,T=e.onListChangeEnd,M=(0,j.Z)(e,t3),D=o.useRef(null),L=o.useRef(null);o.useImperativeHandle(t,function(){return{scrollTo:function(e){D.current.scrollTo(e)},getIndentWidth:function(){return L.current.offsetWidth}}});var B=o.useState(a),H=(0,l.Z)(B,2),z=H[0],A=H[1],W=o.useState(r),_=(0,l.Z)(W,2),F=_[0],q=_[1],V=o.useState(r),X=(0,l.Z)(V,2),U=X[0],G=X[1],Y=o.useState([]),$=(0,l.Z)(Y,2),J=$[0],Q=$[1],ee=o.useState(null),et=(0,l.Z)(ee,2),en=et[0],eo=et[1],er=o.useRef(r);function ea(){var e=er.current;q(e),G(e),Q([]),eo(null),T()}er.current=r,(0,i.Z)(function(){A(a);var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.length,o=t.length;if(1!==Math.abs(n-o))return{add:!1,key:null};function r(e,t){var n=new Map;e.forEach(function(e){n.set(e,!0)});var o=t.filter(function(e){return!n.has(e)});return 1===o.length?o[0]:null}return n ").concat(t);return t}(S)),o.createElement("div",null,o.createElement("input",{style:t4,disabled:!1===C||h,tabIndex:!1!==C?N:null,onKeyDown:K,onFocus:O,onBlur:I,value:"",onChange:t8,"aria-label":"for screen reader"})),o.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},o.createElement("div",{className:"".concat(n,"-indent")},o.createElement("div",{ref:L,className:"".concat(n,"-indent-unit")}))),o.createElement(eP.Z,(0,p.Z)({},M,{data:el,itemKey:nt,height:x,fullHeight:!1,virtual:E,itemHeight:w,scrollWidth:k,prefixCls:"".concat(n,"-list"),ref:D,role:"tree",onVisibleChange:function(e){e.every(function(e){return nt(e)!==t6})&&ea()}}),function(e){var t=e.pos,n=Object.assign({},(t$(e.data),e.data)),r=e.title,a=e.key,l=e.isStart,c=e.isEnd,i=eU(a,t);delete n.key,delete n.children;var d=eQ(i,ec);return o.createElement(t1,(0,p.Z)({},n,d,{title:r,active:!!S&&a===S.key,pos:t,data:e.data,isStart:l,isEnd:c,motion:b,motionNodes:a===t6?J:null,motionType:en,onMotionStart:P,onMotionEnd:ea,treeNodeRequiredProps:ec,onMouseMove:function(){R(null)}}))}))}),no=function(e){(0,tU.Z)(n,e);var t=(0,tG.Z)(n);function n(){var e;(0,tq.Z)(this,n);for(var r=arguments.length,a=Array(r),l=0;l0&&void 0!==arguments[0]?arguments[0]:[];t.forEach(function(t){var n=t.key,r=t.children;o.push(n),e(r)})}(l[i].children),o),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(d),window.addEventListener("dragend",e.onWindowDragEnd),null==c||c({event:t,node:e0(n)})}),(0,C.Z)((0,tX.Z)(e),"onNodeDragEnter",function(t,n){var o=e.state,r=o.expandedKeys,a=o.keyEntities,l=o.dragChildrenKeys,c=o.flattenNodes,i=o.indent,d=e.props,s=d.onDragEnter,u=d.onExpand,f=d.allowDrop,p=d.direction,m=n.pos,h=n.eventKey;if(e.currentMouseOverDroppableNodeKey!==h&&(e.currentMouseOverDroppableNodeKey=h),!e.dragNodeProps){e.resetDragState();return}var v=e7(t,e.dragNodeProps,n,i,e.dragStartMousePosition,f,c,a,r,p),g=v.dropPosition,y=v.dropLevelOffset,b=v.dropTargetKey,x=v.dropContainerKey,w=v.dropTargetPos,E=v.dropAllowed,k=v.dragOverNodeKey;if(l.includes(b)||!E||(e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach(function(t){clearTimeout(e.delayedDragEnterLogic[t])}),e.dragNodeProps.eventKey!==n.eventKey&&(t.persist(),e.delayedDragEnterLogic[m]=window.setTimeout(function(){if(null!==e.state.draggingNodeKey){var o=(0,el.Z)(r),l=a[n.eventKey];l&&(l.children||[]).length&&(o=e6(r,n.eventKey)),e.props.hasOwnProperty("expandedKeys")||e.setExpandedKeys(o),null==u||u(o,{node:e0(n),expanded:!0,nativeEvent:t.nativeEvent})}},800)),e.dragNodeProps.eventKey===b&&0===y)){e.resetDragState();return}e.setState({dragOverNodeKey:k,dropPosition:g,dropLevelOffset:y,dropTargetKey:b,dropContainerKey:x,dropTargetPos:w,dropAllowed:E}),null==s||s({event:t,node:e0(n),expandedKeys:r})}),(0,C.Z)((0,tX.Z)(e),"onNodeDragOver",function(t,n){var o=e.state,r=o.dragChildrenKeys,a=o.flattenNodes,l=o.keyEntities,c=o.expandedKeys,i=o.indent,d=e.props,s=d.onDragOver,u=d.allowDrop,f=d.direction;if(e.dragNodeProps){var p=e7(t,e.dragNodeProps,n,i,e.dragStartMousePosition,u,a,l,c,f),m=p.dropPosition,h=p.dropLevelOffset,v=p.dropTargetKey,g=p.dropContainerKey,y=p.dropTargetPos,b=p.dropAllowed,x=p.dragOverNodeKey;!r.includes(v)&&b&&(e.dragNodeProps.eventKey===v&&0===h?null===e.state.dropPosition&&null===e.state.dropLevelOffset&&null===e.state.dropTargetKey&&null===e.state.dropContainerKey&&null===e.state.dropTargetPos&&!1===e.state.dropAllowed&&null===e.state.dragOverNodeKey||e.resetDragState():m===e.state.dropPosition&&h===e.state.dropLevelOffset&&v===e.state.dropTargetKey&&g===e.state.dropContainerKey&&y===e.state.dropTargetPos&&b===e.state.dropAllowed&&x===e.state.dragOverNodeKey||e.setState({dropPosition:m,dropLevelOffset:h,dropTargetKey:v,dropContainerKey:g,dropTargetPos:y,dropAllowed:b,dragOverNodeKey:x}),null==s||s({event:t,node:e0(n)}))}}),(0,C.Z)((0,tX.Z)(e),"onNodeDragLeave",function(t,n){e.currentMouseOverDroppableNodeKey!==n.eventKey||t.currentTarget.contains(t.relatedTarget)||(e.resetDragState(),e.currentMouseOverDroppableNodeKey=null);var o=e.props.onDragLeave;null==o||o({event:t,node:e0(n)})}),(0,C.Z)((0,tX.Z)(e),"onWindowDragEnd",function(t){e.onNodeDragEnd(t,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)}),(0,C.Z)((0,tX.Z)(e),"onNodeDragEnd",function(t,n){var o=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),null==o||o({event:t,node:e0(n)}),e.dragNodeProps=null,window.removeEventListener("dragend",e.onWindowDragEnd)}),(0,C.Z)((0,tX.Z)(e),"onNodeDrop",function(t,n){var o,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=e.state,l=a.dragChildrenKeys,c=a.dropPosition,i=a.dropTargetKey,d=a.dropTargetPos;if(a.dropAllowed){var s=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),null!==i){var u=(0,k.Z)((0,k.Z)({},eQ(i,e.getTreeNodeRequiredProps())),{},{active:(null===(o=e.getActiveItem())||void 0===o?void 0:o.key)===i,data:e.state.keyEntities[i].node}),f=l.includes(i);(0,O.ZP)(!f,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var p=e5(d),m={event:t,node:e0(u),dragNode:e.dragNodeProps?e0(e.dragNodeProps):null,dragNodesKeys:[e.dragNodeProps.eventKey].concat(l),dropToGap:0!==c,dropPosition:c+Number(p[p.length-1])};r||null==s||s(m),e.dragNodeProps=null}}}),(0,C.Z)((0,tX.Z)(e),"cleanDragState",function(){null!==e.state.draggingNodeKey&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null}),(0,C.Z)((0,tX.Z)(e),"triggerExpandActionExpand",function(t,n){var o=e.state,r=o.expandedKeys,a=o.flattenNodes,l=n.expanded,c=n.key;if(!n.isLeaf&&!t.shiftKey&&!t.metaKey&&!t.ctrlKey){var i=a.filter(function(e){return e.key===c})[0],d=e0((0,k.Z)((0,k.Z)({},eQ(c,e.getTreeNodeRequiredProps())),{},{data:i.data}));e.setExpandedKeys(l?e8(r,c):e6(r,c)),e.onNodeExpand(t,d)}}),(0,C.Z)((0,tX.Z)(e),"onNodeClick",function(t,n){var o=e.props,r=o.onClick;"click"===o.expandAction&&e.triggerExpandActionExpand(t,n),null==r||r(t,n)}),(0,C.Z)((0,tX.Z)(e),"onNodeDoubleClick",function(t,n){var o=e.props,r=o.onDoubleClick;"doubleClick"===o.expandAction&&e.triggerExpandActionExpand(t,n),null==r||r(t,n)}),(0,C.Z)((0,tX.Z)(e),"onNodeSelect",function(t,n){var o=e.state.selectedKeys,r=e.state,a=r.keyEntities,l=r.fieldNames,c=e.props,i=c.onSelect,d=c.multiple,s=n.selected,u=n[l.key],f=!s,p=(o=f?d?e6(o,u):[u]:e8(o,u)).map(function(e){var t=a[e];return t?t.node:null}).filter(Boolean);e.setUncontrolledState({selectedKeys:o}),null==i||i(o,{event:"select",selected:f,node:n,selectedNodes:p,nativeEvent:t.nativeEvent})}),(0,C.Z)((0,tX.Z)(e),"onNodeCheck",function(t,n,o){var r,a=e.state,l=a.keyEntities,c=a.checkedKeys,i=a.halfCheckedKeys,d=e.props,s=d.checkStrictly,u=d.onCheck,f=n.key,p={event:"check",node:n,checked:o,nativeEvent:t.nativeEvent};if(s){var m=o?e6(c,f):e8(c,f);r={checked:m,halfChecked:e8(i,f)},p.checkedNodes=m.map(function(e){return l[e]}).filter(Boolean).map(function(e){return e.node}),e.setUncontrolledState({checkedKeys:m})}else{var h=tr([].concat((0,el.Z)(c),[f]),!0,l),v=h.checkedKeys,g=h.halfCheckedKeys;if(!o){var y=new Set(v);y.delete(f);var b=tr(Array.from(y),{checked:!1,halfCheckedKeys:g},l);v=b.checkedKeys,g=b.halfCheckedKeys}r=v,p.checkedNodes=[],p.checkedNodesPositions=[],p.halfCheckedKeys=g,v.forEach(function(e){var t=l[e];if(t){var n=t.node,o=t.pos;p.checkedNodes.push(n),p.checkedNodesPositions.push({node:n,pos:o})}}),e.setUncontrolledState({checkedKeys:v},!1,{halfCheckedKeys:g})}null==u||u(r,p)}),(0,C.Z)((0,tX.Z)(e),"onNodeLoad",function(t){var n,o=t.key,r=e.state.keyEntities[o];if(null==r||null===(n=r.children)||void 0===n||!n.length){var a=new Promise(function(n,r){e.setState(function(a){var l=a.loadedKeys,c=a.loadingKeys,i=void 0===c?[]:c,d=e.props,s=d.loadData,u=d.onLoad;return!s||(void 0===l?[]:l).includes(o)||i.includes(o)?null:(s(t).then(function(){var r=e6(e.state.loadedKeys,o);null==u||u(r,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:r}),e.setState(function(e){return{loadingKeys:e8(e.loadingKeys,o)}}),n()}).catch(function(t){if(e.setState(function(e){return{loadingKeys:e8(e.loadingKeys,o)}}),e.loadingRetryTimes[o]=(e.loadingRetryTimes[o]||0)+1,e.loadingRetryTimes[o]>=10){var a=e.state.loadedKeys;(0,O.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:e6(a,o)}),n()}r(t)}),{loadingKeys:e6(i,o)})})});return a.catch(function(){}),a}}),(0,C.Z)((0,tX.Z)(e),"onNodeMouseEnter",function(t,n){var o=e.props.onMouseEnter;null==o||o({event:t,node:n})}),(0,C.Z)((0,tX.Z)(e),"onNodeMouseLeave",function(t,n){var o=e.props.onMouseLeave;null==o||o({event:t,node:n})}),(0,C.Z)((0,tX.Z)(e),"onNodeContextMenu",function(t,n){var o=e.props.onRightClick;o&&(t.preventDefault(),o({event:t,node:n}))}),(0,C.Z)((0,tX.Z)(e),"onFocus",function(){var t=e.props.onFocus;e.setState({focused:!0});for(var n=arguments.length,o=Array(n),r=0;r1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.destroyed){var r=!1,a=!0,l={};Object.keys(t).forEach(function(n){if(e.props.hasOwnProperty(n)){a=!1;return}r=!0,l[n]=t[n]}),r&&(!n||a)&&e.setState((0,k.Z)((0,k.Z)({},l),o))}}),(0,C.Z)((0,tX.Z)(e),"scrollTo",function(t){e.listRef.current.scrollTo(t)}),e}return(0,tV.Z)(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var e=this.props,t=e.activeKey,n=e.itemScrollOffset;void 0!==t&&t!==this.state.activeKey&&(this.setState({activeKey:t}),null!==t&&this.scrollTo({key:t,offset:void 0===n?0:n}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var e,t=this.state,n=t.focused,r=t.flattenNodes,a=t.keyEntities,l=t.draggingNodeKey,c=t.activeKey,i=t.dropLevelOffset,d=t.dropContainerKey,s=t.dropTargetKey,u=t.dropPosition,f=t.dragOverNodeKey,m=t.indent,h=this.props,v=h.prefixCls,g=h.className,y=h.style,b=h.showLine,x=h.focusable,w=h.tabIndex,k=h.selectable,S=h.showIcon,N=h.icon,K=h.switcherIcon,O=h.draggable,I=h.checkable,R=h.checkStrictly,P=h.disabled,T=h.motion,M=h.loadData,D=h.filterTreeNode,L=h.height,j=h.itemHeight,B=h.scrollWidth,H=h.virtual,z=h.titleRender,A=h.dropIndicatorRender,W=h.onContextMenu,_=h.onScroll,q=h.direction,V=h.rootClassName,X=h.rootStyle,U=(0,F.Z)(this.props,{aria:!0,data:!0});O&&(e="object"===(0,E.Z)(O)?O:"function"==typeof O?{nodeDraggable:O}:{});var G={prefixCls:v,selectable:k,showIcon:S,icon:N,switcherIcon:K,draggable:e,draggingNodeKey:l,checkable:I,checkStrictly:R,disabled:P,keyEntities:a,dropLevelOffset:i,dropContainerKey:d,dropTargetKey:s,dropPosition:u,dragOverNodeKey:f,indent:m,direction:q,dropIndicatorRender:A,loadData:M,filterTreeNode:D,titleRender:z,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return o.createElement(eW.Provider,{value:G},o.createElement("div",{className:Z()(v,g,V,(0,C.Z)((0,C.Z)((0,C.Z)({},"".concat(v,"-show-line"),b),"".concat(v,"-focused"),n),"".concat(v,"-active-focused"),null!==c)),style:X},o.createElement(nn,(0,p.Z)({ref:this.listRef,prefixCls:v,style:y,data:r,disabled:P,selectable:k,checkable:!!I,motion:T,dragging:null!==l,height:L,itemHeight:j,virtual:H,focusable:x,focused:n,tabIndex:void 0===w?0:w,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:W,onScroll:_,scrollWidth:B},this.getTreeNodeRequiredProps(),U))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,o,r=t.prevProps,a={prevProps:e};function l(t){return!r&&e.hasOwnProperty(t)||r&&r[t]!==e[t]}var c=t.fieldNames;if(l("fieldNames")&&(c=eG(e.fieldNames),a.fieldNames=c),l("treeData")?n=e.treeData:l("children")&&((0,O.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=eY(e.children)),n){a.treeData=n;var i=eJ(n,{fieldNames:c});a.keyEntities=(0,k.Z)((0,C.Z)({},t6,t7),i.keyEntities)}var d=a.keyEntities||t.keyEntities;if(l("expandedKeys")||r&&l("autoExpandParent"))a.expandedKeys=e.autoExpandParent||!r&&e.defaultExpandParent?tt(e.expandedKeys,d):e.expandedKeys;else if(!r&&e.defaultExpandAll){var s=(0,k.Z)({},d);delete s[t6];var u=[];Object.keys(s).forEach(function(e){var t=s[e];t.children&&t.children.length&&u.push(t.key)}),a.expandedKeys=u}else!r&&e.defaultExpandedKeys&&(a.expandedKeys=e.autoExpandParent||e.defaultExpandParent?tt(e.defaultExpandedKeys,d):e.defaultExpandedKeys);if(a.expandedKeys||delete a.expandedKeys,n||a.expandedKeys){var f=e$(n||t.treeData,a.expandedKeys||t.expandedKeys,c);a.flattenNodes=f}if(e.selectable&&(l("selectedKeys")?a.selectedKeys=e9(e.selectedKeys,e):!r&&e.defaultSelectedKeys&&(a.selectedKeys=e9(e.defaultSelectedKeys,e))),e.checkable&&(l("checkedKeys")?o=te(e.checkedKeys)||{}:!r&&e.defaultCheckedKeys?o=te(e.defaultCheckedKeys)||{}:n&&(o=te(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),o)){var p=o,m=p.checkedKeys,h=void 0===m?[]:m,v=p.halfCheckedKeys,g=void 0===v?[]:v;if(!e.checkStrictly){var y=tr(h,!0,d);h=y.checkedKeys,g=y.halfCheckedKeys}a.checkedKeys=h,a.halfCheckedKeys=g}return l("loadedKeys")&&(a.loadedKeys=e.loadedKeys),a}}]),n}(o.Component);(0,C.Z)(no,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:function(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,a={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case -1:a.top=0,a.left=-n*r;break;case 1:a.bottom=0,a.left=-n*r;break;case 0:a.bottom=0,a.left=r}return o.createElement("div",{style:a})},allowDrop:function(){return!0},expandAction:!1}),(0,C.Z)(no,"TreeNode",e4);var nr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},na=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:nr}))}),nl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},nc=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:nl}))}),ni={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},nd=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:ni}))}),ns={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},nu=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:ns}))}),nf=n(68710),np=n(86586),nm=n(93463),nh=n(23159),nv=n(12918),ng=n(63074),ny=n(71140),nb=n(99320);let nx=e=>{let{treeCls:t,treeNodeCls:n,directoryNodeSelectedBg:o,directoryNodeSelectedColor:r,motionDurationMid:a,borderRadius:l,controlItemBgHover:c}=e;return{["".concat(t).concat(t,"-directory ").concat(n)]:{["".concat(t,"-node-content-wrapper")]:{position:"static",["&:has(".concat(t,"-drop-indicator)")]:{position:"relative"},["> *:not(".concat(t,"-drop-indicator)")]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:"background-color ".concat(a),content:'""',borderRadius:l},"&:hover:before":{background:c}},["".concat(t,"-switcher, ").concat(t,"-checkbox, ").concat(t,"-draggable-icon")]:{zIndex:1},"&-selected":{background:o,borderRadius:l,["".concat(t,"-switcher, ").concat(t,"-draggable-icon")]:{color:r},["".concat(t,"-node-content-wrapper")]:{color:r,background:"transparent","&, &:hover":{color:r},"&:before, &:hover:before":{background:o}}}}}},nw=new nm.E4("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),nE=(e,t)=>({[".".concat(e,"-switcher-icon")]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:"transform ".concat(t.motionDurationSlow)}}}),nk=(e,t)=>({[".".concat(e,"-drop-indicator")]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:"".concat((0,nm.bf)(t.lineWidthBold)," solid ").concat(t.colorPrimary),borderRadius:"50%",content:'""'}}}),nC=(e,t)=>{let{treeCls:n,treeNodeCls:o,treeNodePadding:r,titleHeight:a,indentSize:l,nodeSelectedBg:c,nodeHoverBg:i,colorTextQuaternary:d,controlItemBgActiveDisabled:s}=t;return{[n]:Object.assign(Object.assign({},(0,nv.Wf)(t)),{"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:"background-color ".concat(t.motionDurationSlow),"&-rtl":{direction:"rtl"},["&".concat(n,"-rtl ").concat(n,"-switcher_close ").concat(n,"-switcher-icon svg")]:{transform:"rotate(90deg)"},["&-focused:not(:hover):not(".concat(n,"-active-focused)")]:(0,nv.oN)(t),["".concat(n,"-list-holder-inner")]:{alignItems:"flex-start"},["&".concat(n,"-block-node")]:{["".concat(n,"-list-holder-inner")]:{alignItems:"stretch",["".concat(n,"-node-content-wrapper")]:{flex:"auto"},["".concat(o,".dragging:after")]:{position:"absolute",inset:0,border:"1px solid ".concat(t.colorPrimary),opacity:0,animationName:nw,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[o]:{display:"flex",alignItems:"flex-start",marginBottom:r,lineHeight:(0,nm.bf)(a),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:r},["&-disabled ".concat(n,"-node-content-wrapper")]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},["".concat(n,"-checkbox-disabled + ").concat(n,"-node-selected,&").concat(o,"-disabled").concat(o,"-selected ").concat(n,"-node-content-wrapper")]:{backgroundColor:s},["".concat(n,"-checkbox-disabled")]:{pointerEvents:"unset"},["&:not(".concat(o,"-disabled)")]:{["".concat(n,"-node-content-wrapper")]:{"&:hover":{color:t.nodeHoverColor}}},["&-active ".concat(n,"-node-content-wrapper")]:{background:t.controlItemBgHover},["&:not(".concat(o,"-disabled).filter-node ").concat(n,"-title")]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",["".concat(n,"-draggable-icon")]:{flexShrink:0,width:a,textAlign:"center",visibility:"visible",color:d},["&".concat(o,"-disabled ").concat(n,"-draggable-icon")]:{visibility:"hidden"}}},["".concat(n,"-indent")]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:l}},["".concat(n,"-draggable-icon")]:{visibility:"hidden"},["".concat(n,"-switcher, ").concat(n,"-checkbox")]:{marginInlineEnd:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},["".concat(n,"-switcher")]:Object.assign(Object.assign({},nE(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:a,textAlign:"center",cursor:"pointer",userSelect:"none",transition:"all ".concat(t.motionDurationSlow),"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:a,height:a,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:"all ".concat(t.motionDurationSlow)},["&:not(".concat(n,"-switcher-noop):hover:before")]:{backgroundColor:t.colorBgTextHover},["&_close ".concat(n,"-switcher-icon svg")]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(r).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:"1px solid ".concat(t.colorBorder),content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(a).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:"1px solid ".concat(t.colorBorder),content:'""'}}}),["".concat(n,"-node-content-wrapper")]:Object.assign(Object.assign({position:"relative",minHeight:a,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:"all ".concat(t.motionDurationMid,", border 0s, line-height 0s, box-shadow 0s")},nk(e,t)),{"&:hover":{backgroundColor:i},["&".concat(n,"-node-selected")]:{color:t.nodeSelectedColor,backgroundColor:c},["".concat(n,"-iconEle")]:{display:"inline-block",width:a,height:a,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),["".concat(n,"-unselectable ").concat(n,"-node-content-wrapper:hover")]:{backgroundColor:"transparent"},["".concat(o,".drop-container > [draggable]")]:{boxShadow:"0 0 0 2px ".concat(t.colorPrimary)},"&-show-line":{["".concat(n,"-indent-unit")]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(r).mul(-1).equal(),borderInlineEnd:"1px solid ".concat(t.colorBorder),content:'""'},"&-end:before":{display:"none"}},["".concat(n,"-switcher")]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},["".concat(o,"-leaf-last ").concat(n,"-switcher-leaf-line:before")]:{top:"auto !important",bottom:"auto !important",height:"".concat((0,nm.bf)(t.calc(a).div(2).equal())," !important")}})}},nS=function(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=".".concat(e),r=t.calc(t.paddingXS).div(2).equal(),a=(0,ny.IX)(t,{treeCls:o,treeNodeCls:"".concat(o,"-treenode"),treeNodePadding:r});return[nC(e,a),n&&nx(a)].filter(Boolean)},nZ=e=>{let{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:o}=e;return{titleHeight:t,indentSize:t,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:o,nodeSelectedColor:e.colorText}};var nN=(0,nb.I$)("Tree",(e,t)=>{let{prefixCls:n}=t;return[{[e.componentCls]:(0,nh.C2)("".concat(n,"-checkbox"),e)},nS(n,e),(0,ng.Z)(e)]},e=>{let{colorTextLightSolid:t,colorPrimary:n}=e;return Object.assign(Object.assign({},nZ(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:n})}),nK=function(e){let{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:a,direction:l="ltr"}=e,c="ltr"===l?"left":"right",i={[c]:-n*a+4,["ltr"===l?"right":"left"]:0};switch(t){case -1:i.top=-3;break;case 1:i.bottom=-3;break;default:i.bottom=-3,i[c]=a+4}return o.createElement("div",{style:i,className:"".concat(r,"-drop-indicator")})},nO={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},nI=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:nO}))}),nR=n(61935),nP={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},nT=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:nP}))}),nM={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},nD=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:nM}))}),nL=n(19722),nj=e=>{var t,n;let r;let{prefixCls:a,switcherIcon:l,treeNodeProps:c,showLine:i,switcherLoadingIcon:d}=e,{isLeaf:s,expanded:u,loading:f}=c;if(f)return o.isValidElement(d)?d:o.createElement(nR.Z,{className:"".concat(a,"-switcher-loading-icon")});if(i&&"object"==typeof i&&(r=i.showLeafIcon),s){if(!i)return null;if("boolean"!=typeof r&&r){let e="function"==typeof r?r(c):r;return o.isValidElement(e)?(0,nL.Tm)(e,{className:Z()(null===(t=e.props)||void 0===t?void 0:t.className,"".concat(a,"-switcher-line-custom-icon"))}):e}return r?o.createElement(na,{className:"".concat(a,"-switcher-line-icon")}):o.createElement("span",{className:"".concat(a,"-switcher-leaf-line")})}let p="".concat(a,"-switcher-icon"),m="function"==typeof l?l(c):l;return o.isValidElement(m)?(0,nL.Tm)(m,{className:Z()(null===(n=m.props)||void 0===n?void 0:n.className,p)}):void 0!==m?m:i?u?o.createElement(nT,{className:"".concat(a,"-switcher-line-icon")}):o.createElement(nD,{className:"".concat(a,"-switcher-line-icon")}):o.createElement(nI,{className:p})};let nB=o.forwardRef((e,t)=>{var n;let{getPrefixCls:r,direction:a,virtual:l,tree:c}=o.useContext(tE.E_),{prefixCls:i,className:d,showIcon:s=!1,showLine:u,switcherIcon:f,switcherLoadingIcon:p,blockNode:m=!1,children:h,checkable:v=!1,selectable:g=!0,draggable:y,disabled:b,motion:x,style:w}=e,E=r("tree",i),k=r(),C=o.useContext(np.Z),S=null!=b?b:C,N=null!=x?x:Object.assign(Object.assign({},(0,nf.Z)(k)),{motionAppear:!1}),K=Object.assign(Object.assign({},e),{checkable:v,selectable:g,showIcon:s,motion:N,blockNode:m,disabled:S,showLine:!!u,dropIndicatorRender:nK}),[O,I,R]=nN(E),[,P]=(0,tI.ZP)(),T=P.paddingXS/2+((null===(n=P.Tree)||void 0===n?void 0:n.titleHeight)||P.controlHeightSM),M=o.useMemo(()=>{if(!y)return!1;let e={};switch(typeof y){case"function":e.nodeDraggable=y;break;case"object":e=Object.assign({},y)}return!1!==e.icon&&(e.icon=e.icon||o.createElement(nu,null)),e},[y]);return O(o.createElement(no,Object.assign({itemHeight:T,ref:t,virtual:l},K,{style:Object.assign(Object.assign({},null==c?void 0:c.style),w),prefixCls:E,className:Z()({["".concat(E,"-icon-hide")]:!s,["".concat(E,"-block-node")]:m,["".concat(E,"-unselectable")]:!g,["".concat(E,"-rtl")]:"rtl"===a,["".concat(E,"-disabled")]:S},null==c?void 0:c.className,d,I,R),direction:a,checkable:v?o.createElement("span",{className:"".concat(E,"-checkbox-inner")}):v,selectable:g,switcherIcon:e=>o.createElement(nj,{prefixCls:E,switcherIcon:f,switcherLoadingIcon:p,treeNodeProps:e,showLine:u}),draggable:M}),h))});function nH(e,t,n){let{key:o,children:r}=n;e.forEach(function(e){let a=e[o],l=e[r];!1!==t(a,e)&&nH(l||[],t,n)})}var nz=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);rt.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n};function nA(e){let{isLeaf:t,expanded:n}=e;return t?o.createElement(na,null):n?o.createElement(nc,null):o.createElement(nd,null)}function nW(e){let{treeData:t,children:n}=e;return t||eY(n)}let n_=o.forwardRef((e,t)=>{var{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:a}=e,l=nz(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);let c=o.useRef(null),i=o.useRef(null),d=()=>{let{keyEntities:e}=eJ(nW(l),{fieldNames:l.fieldNames});return n?Object.keys(e):r?tt(l.expandedKeys||a||[],e):l.expandedKeys||a||[]},[s,u]=o.useState(l.selectedKeys||l.defaultSelectedKeys||[]),[f,p]=o.useState(()=>d());o.useEffect(()=>{"selectedKeys"in l&&u(l.selectedKeys)},[l.selectedKeys]),o.useEffect(()=>{"expandedKeys"in l&&p(l.expandedKeys)},[l.expandedKeys]);let{getPrefixCls:m,direction:h}=o.useContext(tE.E_),{prefixCls:v,className:g,showIcon:y=!0,expandAction:b="click"}=l,x=nz(l,["prefixCls","className","showIcon","expandAction"]),w=m("tree",v),E=Z()("".concat(w,"-directory"),{["".concat(w,"-directory-rtl")]:"rtl"===h},g);return o.createElement(nB,Object.assign({icon:nA,ref:t,blockNode:!0},x,{showIcon:y,expandAction:b,prefixCls:w,className:E,expandedKeys:f,selectedKeys:s,onSelect:(e,t)=>{var n;let o;let{multiple:r,fieldNames:a}=l,{node:d,nativeEvent:s}=t,{key:p=""}=d,m=nW(l),h=Object.assign(Object.assign({},t),{selected:!0}),v=(null==s?void 0:s.ctrlKey)||(null==s?void 0:s.metaKey),g=null==s?void 0:s.shiftKey;r&&v?(o=e,c.current=p,i.current=o):r&&g?o=Array.from(new Set([].concat((0,el.Z)(i.current||[]),(0,el.Z)(function(e){let{treeData:t,expandedKeys:n,startKey:o,endKey:r,fieldNames:a}=e,l=[],c=0;return o&&o===r?[o]:o&&r?(nH(t,e=>{if(2===c)return!1;if(e===o||e===r){if(l.push(e),0===c)c=1;else if(1===c)return c=2,!1}else 1===c&&l.push(e);return n.includes(e)},eG(a)),l):[]}({treeData:m,expandedKeys:f,startKey:p,endKey:c.current,fieldNames:a}))))):(o=[p],c.current=p,i.current=o),h.selectedNodes=function(e,t,n){let o=(0,el.Z)(t),r=[];return nH(e,(e,t)=>{let n=o.indexOf(e);return -1!==n&&(r.push(t),o.splice(n,1)),!!o.length},eG(n)),r}(m,o,a),null===(n=l.onSelect)||void 0===n||n.call(l,o,h),"selectedKeys"in l||u(o)},onExpand:(e,t)=>{var n;return"expandedKeys"in l||p(e),null===(n=l.onExpand)||void 0===n?void 0:n.call(l,e,t)}}))});nB.DirectoryTree=n_,nB.TreeNode=e4;var nF=n(29436),nq=n(39454),nV=e=>{let{value:t,filterSearch:n,tablePrefixCls:r,locale:a,onChange:l}=e;return n?o.createElement("div",{className:"".concat(r,"-filter-dropdown-search")},o.createElement(nq.Z,{prefix:o.createElement(nF.Z,null),placeholder:a.filterSearchPlaceholder,onChange:l,value:t,htmlSize:1,className:"".concat(r,"-filter-dropdown-search-input")})):null};let nX=e=>{let{keyCode:t}=e;t===tY.Z.ENTER&&e.stopPropagation()},nU=o.forwardRef((e,t)=>o.createElement("div",{className:e.className,onClick:e=>e.stopPropagation(),onKeyDown:nX,ref:t},e.children));function nG(e){let t=[];return(e||[]).forEach(e=>{let{value:n,children:o}=e;t.push(n),o&&(t=[].concat((0,el.Z)(t),(0,el.Z)(nG(o))))}),t}function nY(e,t){return("string"==typeof t||"number"==typeof t)&&(null==t?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()))}var n$=e=>{var t,n,r,a;let l,c;let{tablePrefixCls:i,prefixCls:s,column:u,dropdownPrefixCls:f,columnKey:p,filterOnClose:m,filterMultiple:h,filterMode:v="menu",filterSearch:g=!1,filterState:y,triggerFilter:b,locale:x,children:w,getPopupContainer:E,rootClassName:k}=e,{filterResetToDefaultFilteredValue:C,defaultFilteredValue:S,filterDropdownProps:N={},filterDropdownOpen:K,filterDropdownVisible:O,onFilterDropdownVisibleChange:I,onFilterDropdownOpenChange:R}=u,[P,T]=o.useState(!1),M=!!(y&&((null===(t=y.filteredKeys)||void 0===t?void 0:t.length)||y.forceFiltered)),D=e=>{var t;T(e),null===(t=N.onOpenChange)||void 0===t||t.call(N,e),null==R||R(e),null==I||I(e)},L=null!==(a=null!==(r=null!==(n=N.open)&&void 0!==n?n:K)&&void 0!==r?r:O)&&void 0!==a?a:P,j=null==y?void 0:y.filteredKeys,[B,H]=tz(j||[]),z=e=>{let{selectedKeys:t}=e;H(t)},A=(e,t)=>{let{node:n,checked:o}=t;h?z({selectedKeys:e}):z({selectedKeys:o&&n.key?[n.key]:[]})};o.useEffect(()=>{P&&z({selectedKeys:j||[]})},[j]);let[W,_]=o.useState([]),F=e=>{_(e)},[q,V]=o.useState(""),X=e=>{let{value:t}=e.target;V(t)};o.useEffect(()=>{P||V("")},[P]);let U=e=>{let t=(null==e?void 0:e.length)?e:null;if(null===t&&(!y||!y.filteredKeys)||(0,d.Z)(t,null==y?void 0:y.filteredKeys,!0))return null;b({column:u,key:p,filteredKeys:t})},G=()=>{D(!1),U(B())},Y=function(){let{confirm:e,closeDropdown:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{confirm:!1,closeDropdown:!1};e&&U([]),t&&D(!1),V(""),C?H((S||[]).map(e=>String(e))):H([])},$=Z()({["".concat(f,"-menu-without-submenu")]:!(u.filters||[]).some(e=>{let{children:t}=e;return t})}),J=e=>{e.target.checked?H(nG(null==u?void 0:u.filters).map(e=>String(e))):H([])},Q=e=>{let{filters:t}=e;return(t||[]).map((e,t)=>{let n=String(e.value),o={title:e.text,key:void 0!==e.value?n:String(t)};return e.children&&(o.children=Q({filters:e.children})),o})},ee=e=>{var t;return Object.assign(Object.assign({},e),{text:e.title,value:e.key,children:(null===(t=e.children)||void 0===t?void 0:t.map(e=>ee(e)))||[]})},{direction:et,renderEmpty:en}=o.useContext(tE.E_);if("function"==typeof u.filterDropdown)l=u.filterDropdown({prefixCls:"".concat(f,"-custom"),setSelectedKeys:e=>z({selectedKeys:e}),selectedKeys:B(),confirm:function(){let{closeDropdown:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{closeDropdown:!0};e&&D(!1),U(B())},clearFilters:Y,filters:u.filters,visible:L,close:()=>{D(!1)}});else if(u.filterDropdown)l=u.filterDropdown;else{let e=B()||[];l=o.createElement(o.Fragment,null,(()=>{var t,n;let r=null!==(t=null==en?void 0:en("Table.filter"))&&void 0!==t?t:o.createElement(tW.Z,{image:tW.Z.PRESENTED_IMAGE_SIMPLE,description:x.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if(0===(u.filters||[]).length)return r;if("tree"===v)return o.createElement(o.Fragment,null,o.createElement(nV,{filterSearch:g,value:q,onChange:X,tablePrefixCls:i,locale:x}),o.createElement("div",{className:"".concat(i,"-filter-dropdown-tree")},h?o.createElement(ti.Z,{checked:e.length===nG(u.filters).length,indeterminate:e.length>0&&e.length"function"==typeof g?g(q,ee(e)):nY(q,e.title):void 0})));let a=function e(t){let{filters:n,prefixCls:r,filteredKeys:a,filterMultiple:l,searchValue:c,filterSearch:i}=t;return n.map((t,n)=>{let d=String(t.value);if(t.children)return{key:d||n,label:t.text,popupClassName:"".concat(r,"-dropdown-submenu"),children:e({filters:t.children,prefixCls:r,filteredKeys:a,filterMultiple:l,searchValue:c,filterSearch:i})};let s=l?ti.Z:ts.ZP,u={key:void 0!==t.value?d:n,label:o.createElement(o.Fragment,null,o.createElement(s,{checked:a.includes(d)}),o.createElement("span",null,t.text))};return c.trim()?"function"==typeof i?i(c,t)?u:null:nY(c,t.text)?u:null:u})}({filters:u.filters||[],filterSearch:g,prefixCls:s,filteredKeys:B(),filterMultiple:h,searchValue:q}),l=a.every(e=>null===e);return o.createElement(o.Fragment,null,o.createElement(nV,{filterSearch:g,value:q,onChange:X,tablePrefixCls:i,locale:x}),l?r:o.createElement(t_.Z,{selectable:!0,multiple:h,prefixCls:"".concat(f,"-menu"),className:$,onSelect:z,onDeselect:z,selectedKeys:e,getPopupContainer:E,openKeys:W,onOpenChange:F,items:a}))})(),o.createElement("div",{className:"".concat(s,"-dropdown-btns")},o.createElement(tA.ZP,{type:"link",size:"small",disabled:C?(0,d.Z)((S||[]).map(e=>String(e)),e,!0):0===e.length,onClick:()=>Y()},x.filterReset),o.createElement(tA.ZP,{type:"primary",size:"small",onClick:G},x.filterConfirm)))}u.filterDropdown&&(l=o.createElement(tF.J,{selectable:void 0},l)),l=o.createElement(nU,{className:"".concat(s,"-dropdown")},l);let eo=(0,tB.Z)({trigger:["click"],placement:"rtl"===et?"bottomLeft":"bottomRight",children:(c="function"==typeof u.filterIcon?u.filterIcon(M):u.filterIcon?u.filterIcon:o.createElement(tj,null),o.createElement("span",{role:"button",tabIndex:-1,className:Z()("".concat(s,"-trigger"),{active:M}),onClick:e=>{e.stopPropagation()}},c)),getPopupContainer:E},Object.assign(Object.assign({},N),{rootClassName:Z()(k,N.rootClassName),open:L,onOpenChange:(e,t)=>{"trigger"===t.source&&(e&&void 0!==j&&H(j||[]),D(e),e||u.filterDropdown||!m||G())},popupRender:()=>"function"==typeof(null==N?void 0:N.dropdownRender)?N.dropdownRender(l):l}));return o.createElement("div",{className:"".concat(s,"-column")},o.createElement("span",{className:"".concat(i,"-column-title")},w),o.createElement(td.Z,Object.assign({},eo)))};let nJ=(e,t,n)=>{let o=[];return(e||[]).forEach((e,r)=>{var a;let l=tP(r,n),c=void 0!==e.filterDropdown;if(e.filters||c||"onFilter"in e){if("filteredValue"in e){let t=e.filteredValue;c||(t=null!==(a=null==t?void 0:t.map(String))&&void 0!==a?a:t),o.push({column:e,key:tR(e,l),filteredKeys:t,forceFiltered:e.filtered})}else o.push({column:e,key:tR(e,l),filteredKeys:t&&e.defaultFilteredValue?e.defaultFilteredValue:void 0,forceFiltered:e.filtered})}"children"in e&&(o=[].concat((0,el.Z)(o),(0,el.Z)(nJ(e.children,t,l))))}),o},nQ=e=>{let t={};return e.forEach(e=>{let{key:n,filteredKeys:o,column:r}=e,{filters:a,filterDropdown:l}=r;if(l)t[n]=o||null;else if(Array.isArray(o)){let e=nG(a);t[n]=e.filter(e=>o.includes(String(e)))}else t[n]=null}),t},n0=(e,t,n)=>t.reduce((e,o)=>{let{column:{onFilter:r,filters:a},filteredKeys:l}=o;return r&&l&&l.length?e.map(e=>Object.assign({},e)).filter(e=>l.some(o=>{let l=nG(a),c=l.findIndex(e=>String(e)===String(o)),i=-1!==c?l[c]:o;return e[n]&&(e[n]=n0(e[n],t,n)),r(i,e)})):e},e),n1=e=>e.flatMap(e=>"children"in e?[e].concat((0,el.Z)(n1(e.children||[]))):[e]);var n2=e=>{let{prefixCls:t,dropdownPrefixCls:n,mergedColumns:r,onFilterChange:a,getPopupContainer:l,locale:c,rootClassName:i}=e;(0,tc.ln)("Table");let d=o.useMemo(()=>n1(r||[]),[r]),[s,u]=o.useState(()=>nJ(d,!0)),f=o.useMemo(()=>{let e=nJ(d,!1);if(0===e.length)return e;let t=!0;if(e.forEach(e=>{let{filteredKeys:n}=e;void 0!==n&&(t=!1)}),t){let e=(d||[]).map((e,t)=>tR(e,tP(t)));return s.filter(t=>{let{key:n}=t;return e.includes(n)}).map(t=>{let n=d[e.indexOf(t.key)];return Object.assign(Object.assign({},t),{column:Object.assign(Object.assign({},t.column),n),forceFiltered:n.filtered})})}return e},[d,s]),p=o.useMemo(()=>nQ(f),[f]),m=e=>{let t=f.filter(t=>{let{key:n}=t;return n!==e.key});t.push(e),u(t),a(nQ(t),t)};return[e=>(function e(t,n,r,a,l,c,i,d,s){return r.map((r,u)=>{let f=tP(u,d),{filterOnClose:p=!0,filterMultiple:m=!0,filterMode:h,filterSearch:v}=r,g=r;if(g.filters||g.filterDropdown){let e=tR(g,f),d=a.find(t=>{let{key:n}=t;return e===n});g=Object.assign(Object.assign({},g),{title:a=>o.createElement(n$,{tablePrefixCls:t,prefixCls:"".concat(t,"-filter"),dropdownPrefixCls:n,column:g,columnKey:e,filterState:d,filterOnClose:p,filterMultiple:m,filterMode:h,filterSearch:v,triggerFilter:c,locale:l,getPopupContainer:i,rootClassName:s},tT(r.title,a))})}return"children"in g&&(g=Object.assign(Object.assign({},g),{children:e(t,n,g.children,a,l,c,i,f,s)})),g})})(t,n,e,f,c,m,l,void 0,i),f,p]},n3=(e,t,n)=>{let r=o.useRef({});return[function(o){var a;if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let o=new Map;!function e(r){r.forEach((r,a)=>{let l=n(r,a);o.set(l,r),r&&"object"==typeof r&&t in r&&e(r[t]||[])})}(e),r.current={data:e,childrenColumnName:t,kvMap:o,getRowKey:n}}return null===(a=r.current.kvMap)||void 0===a?void 0:a.get(o)}]},n4=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);rt.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n},n8=function(e,t,n){let r=n&&"object"==typeof n?n:{},{total:a=0}=r,l=n4(r,["total"]),[c,i]=(0,o.useState)(()=>({current:"defaultCurrent"in l?l.defaultCurrent:1,pageSize:"defaultPageSize"in l?l.defaultPageSize:10})),d=(0,tB.Z)(c,l,{total:a>0?a:e}),s=Math.ceil((a||e)/d.pageSize);d.current>s&&(d.current=s||1);let u=(e,t)=>{i({current:null!=e?e:1,pageSize:t||d.pageSize})};return!1===n?[{},()=>{}]:[Object.assign(Object.assign({},d),{onChange:(e,o)=>{var r;n&&(null===(r=n.onChange)||void 0===r||r.call(n,e,o)),u(e,o),t(e,o||(null==d?void 0:d.pageSize))}}),u]},n6={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},n5=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:n6}))}),n7={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},n9=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:n7}))}),oe=n(99981);let ot="ascend",on="descend",oo=e=>"object"==typeof e.sorter&&"number"==typeof e.sorter.multiple&&e.sorter.multiple,or=e=>"function"==typeof e?e:!!e&&"object"==typeof e&&!!e.compare&&e.compare,oa=(e,t)=>t?e[e.indexOf(t)+1]:e[0],ol=(e,t,n)=>{let o=[],r=(e,t)=>{o.push({column:e,key:tR(e,t),multiplePriority:oo(e),sortOrder:e.sortOrder})};return(e||[]).forEach((e,a)=>{let l=tP(a,n);e.children?("sortOrder"in e&&r(e,l),o=[].concat((0,el.Z)(o),(0,el.Z)(ol(e.children,t,l)))):e.sorter&&("sortOrder"in e?r(e,l):t&&e.defaultSortOrder&&o.push({column:e,key:tR(e,l),multiplePriority:oo(e),sortOrder:e.defaultSortOrder}))}),o},oc=(e,t,n,r,a,l,c,i)=>(t||[]).map((t,d)=>{let s=tP(d,i),u=t;if(u.sorter){let i;let d=u.sortDirections||a,f=void 0===u.showSorterTooltip?c:u.showSorterTooltip,p=tR(u,s),m=n.find(e=>{let{key:t}=e;return t===p}),h=m?m.sortOrder:null,v=oa(d,h);if(t.sortIcon)i=t.sortIcon({sortOrder:h});else{let t=d.includes(ot)&&o.createElement(n9,{className:Z()("".concat(e,"-column-sorter-up"),{active:h===ot})}),n=d.includes(on)&&o.createElement(n5,{className:Z()("".concat(e,"-column-sorter-down"),{active:h===on})});i=o.createElement("span",{className:Z()("".concat(e,"-column-sorter"),{["".concat(e,"-column-sorter-full")]:!!(t&&n)})},o.createElement("span",{className:"".concat(e,"-column-sorter-inner"),"aria-hidden":"true"},t,n))}let{cancelSort:g,triggerAsc:y,triggerDesc:b}=l||{},x=g;v===on?x=b:v===ot&&(x=y);let w="object"==typeof f?Object.assign({title:x},f):{title:x};u=Object.assign(Object.assign({},u),{className:Z()(u.className,{["".concat(e,"-column-sort")]:h}),title:n=>{let r="".concat(e,"-column-sorters"),a=o.createElement("span",{className:"".concat(e,"-column-title")},tT(t.title,n)),l=o.createElement("div",{className:r},a,i);return f?"boolean"!=typeof f&&(null==f?void 0:f.target)==="sorter-icon"?o.createElement("div",{className:Z()(r,"".concat(r,"-tooltip-target-sorter"))},a,o.createElement(oe.Z,Object.assign({},w),i)):o.createElement(oe.Z,Object.assign({},w),l):l},onHeaderCell:n=>{var o;let a=(null===(o=t.onHeaderCell)||void 0===o?void 0:o.call(t,n))||{},l=a.onClick,c=a.onKeyDown;a.onClick=e=>{r({column:t,key:p,sortOrder:v,multiplePriority:oo(t)}),null==l||l(e)},a.onKeyDown=e=>{e.keyCode===tY.Z.ENTER&&(r({column:t,key:p,sortOrder:v,multiplePriority:oo(t)}),null==c||c(e))};let i=tM(t.title,{}),d=null==i?void 0:i.toString();return h&&(a["aria-sort"]="ascend"===h?"ascending":"descending"),a["aria-label"]=d||"",a.className=Z()(a.className,"".concat(e,"-column-has-sorters")),a.tabIndex=0,t.ellipsis&&(a.title=(null!=i?i:"").toString()),a}})}return"children"in u&&(u=Object.assign(Object.assign({},u),{children:oc(e,u.children,n,r,a,l,c,s)})),u}),oi=e=>{let{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}},od=e=>{let t=e.filter(e=>{let{sortOrder:t}=e;return t}).map(oi);if(0===t.length&&e.length){let t=e.length-1;return Object.assign(Object.assign({},oi(e[t])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},os=(e,t,n)=>{let o=t.slice().sort((e,t)=>t.multiplePriority-e.multiplePriority),r=e.slice(),a=o.filter(e=>{let{column:{sorter:t},sortOrder:n}=e;return or(t)&&n});return a.length?r.sort((e,t)=>{for(let n=0;n{let o=e[n];return o?Object.assign(Object.assign({},e),{[n]:os(o,t,n)}):e}):r};var ou=e=>{let{prefixCls:t,mergedColumns:n,sortDirections:r,tableLocale:a,showSorterTooltip:l,onSorterChange:c}=e,[i,d]=o.useState(()=>ol(n,!0)),s=(e,t)=>{let n=[];return e.forEach((e,o)=>{let r=tP(o,t);if(n.push(tR(e,r)),Array.isArray(e.children)){let t=s(e.children,r);n.push.apply(n,(0,el.Z)(t))}}),n},u=o.useMemo(()=>{let e=!0,t=ol(n,!1);if(!t.length){let e=s(n);return i.filter(t=>{let{key:n}=t;return e.includes(n)})}let o=[];function r(t){e?o.push(t):o.push(Object.assign(Object.assign({},t),{sortOrder:null}))}let a=null;return t.forEach(t=>{null===a?(r(t),t.sortOrder&&(!1===t.multiplePriority?e=!1:a=!0)):(a&&!1!==t.multiplePriority||(e=!1),r(t))}),o},[n,i]),f=o.useMemo(()=>{var e,t;let n=u.map(e=>{let{column:t,sortOrder:n}=e;return{column:t,order:n}});return{sortColumns:n,sortColumn:null===(e=n[0])||void 0===e?void 0:e.column,sortOrder:null===(t=n[0])||void 0===t?void 0:t.order}},[u]),p=e=>{let t;d(t=!1!==e.multiplePriority&&u.length&&!1!==u[0].multiplePriority?[].concat((0,el.Z)(u.filter(t=>{let{key:n}=t;return n!==e.key})),[e]):[e]),c(od(t),t)};return[e=>oc(t,e,u,p,r,a,l),u,f,()=>od(u)]};let of=(e,t)=>e.map(e=>{let n=Object.assign({},e);return n.title=tT(e.title,t),"children"in n&&(n.children=of(n.children,t)),n});var op=e=>[o.useCallback(t=>of(t,e),[e])];let om=y(eI,(e,t)=>{let{_renderTimes:n}=e,{_renderTimes:o}=t;return n!==o}),oh=y(ez,(e,t)=>{let{_renderTimes:n}=e,{_renderTimes:o}=t;return n!==o});var ov=n(54558),og=e=>{let{componentCls:t,lineWidth:n,lineType:o,tableBorderColor:r,tableHeaderBg:a,tablePaddingVertical:l,tablePaddingHorizontal:c,calc:i}=e,d="".concat((0,nm.bf)(n)," ").concat(o," ").concat(r),s=(e,o,r)=>({["&".concat(t,"-").concat(e)]:{["> ".concat(t,"-container")]:{["> ".concat(t,"-content, > ").concat(t,"-body")]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{["> ".concat(t,"-expanded-row-fixed")]:{margin:"".concat((0,nm.bf)(i(o).mul(-1).equal()),"\n ").concat((0,nm.bf)(i(i(r).add(n)).mul(-1).equal()))}}}}}});return{["".concat(t,"-wrapper")]:{["".concat(t).concat(t,"-bordered")]:Object.assign(Object.assign(Object.assign({["> ".concat(t,"-title")]:{border:d,borderBottom:0},["> ".concat(t,"-container")]:{borderInlineStart:d,borderTop:d,["\n > ".concat(t,"-content,\n > ").concat(t,"-header,\n > ").concat(t,"-body,\n > ").concat(t,"-summary\n ")]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:d},"> thead":{"> tr:not(:last-child) > th":{borderBottom:d},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{["> ".concat(t,"-cell-fix-right-first::after")]:{borderInlineEnd:d}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{["> ".concat(t,"-expanded-row-fixed")]:{margin:"".concat((0,nm.bf)(i(l).mul(-1).equal())," ").concat((0,nm.bf)(i(i(c).add(n)).mul(-1).equal())),"&::after":{position:"absolute",top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:d,content:'""'}}}}}},["&".concat(t,"-scroll-horizontal")]:{["> ".concat(t,"-container > ").concat(t,"-body")]:{"> table > tbody":{["\n > tr".concat(t,"-expanded-row,\n > tr").concat(t,"-placeholder\n ")]:{"> th, > td":{borderInlineEnd:0}}}}}},s("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),s("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{["> ".concat(t,"-footer")]:{border:d,borderTop:0}}),["".concat(t,"-cell")]:{["".concat(t,"-container:first-child")]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:"0 ".concat((0,nm.bf)(n)," 0 ").concat((0,nm.bf)(n)," ").concat(a)}},["".concat(t,"-bordered ").concat(t,"-cell-scrollbar")]:{borderInlineEnd:d}}}},oy=e=>{let{componentCls:t}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-cell-ellipsis")]:Object.assign(Object.assign({},nv.vS),{wordBreak:"keep-all",["\n &".concat(t,"-cell-fix-left-last,\n &").concat(t,"-cell-fix-right-first\n ")]:{overflow:"visible",["".concat(t,"-cell-content")]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},["".concat(t,"-column-title")]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},ob=e=>{let{componentCls:t}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-tbody > tr").concat(t,"-placeholder")]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},ox=e=>{let{componentCls:t,antCls:n,motionDurationSlow:o,lineWidth:r,paddingXS:a,lineType:l,tableBorderColor:c,tableExpandIconBg:i,tableExpandColumnWidth:d,borderRadius:s,tablePaddingVertical:u,tablePaddingHorizontal:f,tableExpandedRowBg:p,paddingXXS:m,expandIconMarginTop:h,expandIconSize:v,expandIconHalfInner:g,expandIconScale:y,calc:b}=e,x="".concat((0,nm.bf)(r)," ").concat(l," ").concat(c),w=b(m).sub(r).equal();return{["".concat(t,"-wrapper")]:{["".concat(t,"-expand-icon-col")]:{width:d},["".concat(t,"-row-expand-icon-cell")]:{textAlign:"center",["".concat(t,"-row-expand-icon")]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},["".concat(t,"-row-indent")]:{height:1,float:"left"},["".concat(t,"-row-expand-icon")]:Object.assign(Object.assign({},(0,nv.Nd)(e)),{position:"relative",float:"left",width:v,height:v,color:"inherit",lineHeight:(0,nm.bf)(v),background:i,border:x,borderRadius:s,transform:"scale(".concat(y,")"),"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:"transform ".concat(o," ease-out"),content:'""'},"&::before":{top:g,insetInlineEnd:w,insetInlineStart:w,height:r},"&::after":{top:w,bottom:w,insetInlineStart:g,width:r,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),["".concat(t,"-row-indent + ").concat(t,"-row-expand-icon")]:{marginTop:h,marginInlineEnd:a},["tr".concat(t,"-expanded-row")]:{"&, &:hover":{"> th, > td":{background:p}},["".concat(n,"-descriptions-view")]:{display:"flex",table:{flex:"auto",width:"100%"}}},["".concat(t,"-expanded-row-fixed")]:{position:"relative",margin:"".concat((0,nm.bf)(b(u).mul(-1).equal())," ").concat((0,nm.bf)(b(f).mul(-1).equal())),padding:"".concat((0,nm.bf)(u)," ").concat((0,nm.bf)(f))}}}},ow=e=>{let{componentCls:t,antCls:n,iconCls:o,tableFilterDropdownWidth:r,tableFilterDropdownSearchWidth:a,paddingXXS:l,paddingXS:c,colorText:i,lineWidth:d,lineType:s,tableBorderColor:u,headerIconColor:f,fontSizeSM:p,tablePaddingHorizontal:m,borderRadius:h,motionDurationSlow:v,colorIcon:g,colorPrimary:y,tableHeaderFilterActiveBg:b,colorTextDisabled:x,tableFilterDropdownBg:w,tableFilterDropdownHeight:E,controlItemBgHover:k,controlItemBgActive:C,boxShadowSecondary:S,filterDropdownMenuBg:Z,calc:N}=e,K="".concat(n,"-dropdown"),O="".concat(t,"-filter-dropdown"),I="".concat(n,"-tree"),R="".concat((0,nm.bf)(d)," ").concat(s," ").concat(u);return[{["".concat(t,"-wrapper")]:{["".concat(t,"-filter-column")]:{display:"flex",justifyContent:"space-between"},["".concat(t,"-filter-trigger")]:{position:"relative",display:"flex",alignItems:"center",marginBlock:N(l).mul(-1).equal(),marginInline:"".concat((0,nm.bf)(l)," ").concat((0,nm.bf)(N(m).div(2).mul(-1).equal())),padding:"0 ".concat((0,nm.bf)(l)),color:f,fontSize:p,borderRadius:h,cursor:"pointer",transition:"all ".concat(v),"&:hover":{color:g,background:b},"&.active":{color:y}}}},{["".concat(n,"-dropdown")]:{[O]:Object.assign(Object.assign({},(0,nv.Wf)(e)),{minWidth:r,backgroundColor:w,borderRadius:h,boxShadow:S,overflow:"hidden",["".concat(K,"-menu")]:{maxHeight:E,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:Z,"&:empty::after":{display:"block",padding:"".concat((0,nm.bf)(c)," 0"),color:x,fontSize:p,textAlign:"center",content:'"Not Found"'}},["".concat(O,"-tree")]:{paddingBlock:"".concat((0,nm.bf)(c)," 0"),paddingInline:c,[I]:{padding:0},["".concat(I,"-treenode ").concat(I,"-node-content-wrapper:hover")]:{backgroundColor:k},["".concat(I,"-treenode-checkbox-checked ").concat(I,"-node-content-wrapper")]:{"&, &:hover":{backgroundColor:C}}},["".concat(O,"-search")]:{padding:c,borderBottom:R,"&-input":{input:{minWidth:a},[o]:{color:x}}},["".concat(O,"-checkall")]:{width:"100%",marginBottom:l,marginInlineStart:l},["".concat(O,"-btns")]:{display:"flex",justifyContent:"space-between",padding:"".concat((0,nm.bf)(N(c).sub(d).equal())," ").concat((0,nm.bf)(c)),overflow:"hidden",borderTop:R}})}},{["".concat(n,"-dropdown ").concat(O,", ").concat(O,"-submenu")]:{["".concat(n,"-checkbox-wrapper + span")]:{paddingInlineStart:c,color:i},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},oE=e=>{let{componentCls:t,lineWidth:n,colorSplit:o,motionDurationSlow:r,zIndexTableFixed:a,tableBg:l,zIndexTableSticky:c,calc:i}=e;return{["".concat(t,"-wrapper")]:{["\n ".concat(t,"-cell-fix-left,\n ").concat(t,"-cell-fix-right\n ")]:{position:"sticky !important",zIndex:a,background:l},["\n ".concat(t,"-cell-fix-left-first::after,\n ").concat(t,"-cell-fix-left-last::after\n ")]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:i(n).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:"box-shadow ".concat(r),content:'""',pointerEvents:"none",willChange:"transform"},["".concat(t,"-cell-fix-left-all::after")]:{display:"none"},["\n ".concat(t,"-cell-fix-right-first::after,\n ").concat(t,"-cell-fix-right-last::after\n ")]:{position:"absolute",top:0,bottom:i(n).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:"box-shadow ".concat(r),content:'""',pointerEvents:"none"},["".concat(t,"-container")]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:i(c).add(1).equal({unit:!1}),width:30,transition:"box-shadow ".concat(r),content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},["".concat(t,"-ping-left")]:{["&:not(".concat(t,"-has-fix-left) ").concat(t,"-container::before")]:{boxShadow:"inset 10px 0 8px -8px ".concat(o)},["\n ".concat(t,"-cell-fix-left-first::after,\n ").concat(t,"-cell-fix-left-last::after\n ")]:{boxShadow:"inset 10px 0 8px -8px ".concat(o)},["".concat(t,"-cell-fix-left-last::before")]:{backgroundColor:"transparent !important"}},["".concat(t,"-ping-right")]:{["&:not(".concat(t,"-has-fix-right) ").concat(t,"-container::after")]:{boxShadow:"inset -10px 0 8px -8px ".concat(o)},["\n ".concat(t,"-cell-fix-right-first::after,\n ").concat(t,"-cell-fix-right-last::after\n ")]:{boxShadow:"inset -10px 0 8px -8px ".concat(o)}},["".concat(t,"-fixed-column-gapped")]:{["\n ".concat(t,"-cell-fix-left-first::after,\n ").concat(t,"-cell-fix-left-last::after,\n ").concat(t,"-cell-fix-right-first::after,\n ").concat(t,"-cell-fix-right-last::after\n ")]:{boxShadow:"none"}}}}},ok=e=>{let{componentCls:t,antCls:n,margin:o}=e;return{["".concat(t,"-wrapper ").concat(t,"-pagination").concat(n,"-pagination")]:{margin:"".concat((0,nm.bf)(o)," 0")}}},oC=e=>{let{componentCls:t,tableRadius:n}=e;return{["".concat(t,"-wrapper")]:{[t]:{["".concat(t,"-title, ").concat(t,"-header")]:{borderRadius:"".concat((0,nm.bf)(n)," ").concat((0,nm.bf)(n)," 0 0")},["".concat(t,"-title + ").concat(t,"-container")]:{borderStartStartRadius:0,borderStartEndRadius:0,["".concat(t,"-header, table")]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:"0 0 ".concat((0,nm.bf)(n)," ").concat((0,nm.bf)(n))}}}}},oS=e=>{let{componentCls:t}=e;return{["".concat(t,"-wrapper-rtl")]:{direction:"rtl",table:{direction:"rtl"},["".concat(t,"-pagination-left")]:{justifyContent:"flex-end"},["".concat(t,"-pagination-right")]:{justifyContent:"flex-start"},["".concat(t,"-row-expand-icon")]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},["".concat(t,"-container")]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},["".concat(t,"-row-indent")]:{float:"right"}}}}},oZ=e=>{let{componentCls:t,antCls:n,iconCls:o,fontSizeIcon:r,padding:a,paddingXS:l,headerIconColor:c,headerIconHoverColor:i,tableSelectionColumnWidth:d,tableSelectedRowBg:s,tableSelectedRowHoverBg:u,tableRowHoverBg:f,tablePaddingHorizontal:p,calc:m}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-selection-col")]:{width:d,["&".concat(t,"-selection-col-with-dropdown")]:{width:m(d).add(r).add(m(a).div(4)).equal()}},["".concat(t,"-bordered ").concat(t,"-selection-col")]:{width:m(d).add(m(l).mul(2)).equal(),["&".concat(t,"-selection-col-with-dropdown")]:{width:m(d).add(r).add(m(a).div(4)).add(m(l).mul(2)).equal()}},["\n table tr th".concat(t,"-selection-column,\n table tr td").concat(t,"-selection-column,\n ").concat(t,"-selection-column\n ")]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",["".concat(n,"-radio-wrapper")]:{marginInlineEnd:0}},["table tr th".concat(t,"-selection-column").concat(t,"-cell-fix-left")]:{zIndex:m(e.zIndexTableFixed).add(1).equal({unit:!1})},["table tr th".concat(t,"-selection-column::after")]:{backgroundColor:"transparent !important"},["".concat(t,"-selection")]:{position:"relative",display:"inline-flex",flexDirection:"column"},["".concat(t,"-selection-extra")]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),marginInlineStart:"100%",paddingInlineStart:(0,nm.bf)(m(p).div(4).equal()),[o]:{color:c,fontSize:r,verticalAlign:"baseline","&:hover":{color:i}}},["".concat(t,"-tbody")]:{["".concat(t,"-row")]:{["&".concat(t,"-row-selected")]:{["> ".concat(t,"-cell")]:{background:s,"&-row-hover":{background:u}}},["> ".concat(t,"-cell-row-hover")]:{background:f}}}}}},oN=e=>{let{componentCls:t,tableExpandColumnWidth:n,calc:o}=e,r=(e,r,a,l)=>({["".concat(t).concat(t,"-").concat(e)]:{fontSize:l,["\n ".concat(t,"-title,\n ").concat(t,"-footer,\n ").concat(t,"-cell,\n ").concat(t,"-thead > tr > th,\n ").concat(t,"-tbody > tr > th,\n ").concat(t,"-tbody > tr > td,\n tfoot > tr > th,\n tfoot > tr > td\n ")]:{padding:"".concat((0,nm.bf)(r)," ").concat((0,nm.bf)(a))},["".concat(t,"-filter-trigger")]:{marginInlineEnd:(0,nm.bf)(o(a).div(2).mul(-1).equal())},["".concat(t,"-expanded-row-fixed")]:{margin:"".concat((0,nm.bf)(o(r).mul(-1).equal())," ").concat((0,nm.bf)(o(a).mul(-1).equal()))},["".concat(t,"-tbody")]:{["".concat(t,"-wrapper:only-child ").concat(t)]:{marginBlock:(0,nm.bf)(o(r).mul(-1).equal()),marginInline:"".concat((0,nm.bf)(o(n).sub(a).equal())," ").concat((0,nm.bf)(o(a).mul(-1).equal()))}},["".concat(t,"-selection-extra")]:{paddingInlineStart:(0,nm.bf)(o(a).div(4).equal())}}});return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({},r("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),r("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},oK=e=>{let{componentCls:t,marginXXS:n,fontSizeIcon:o,headerIconColor:r,headerIconHoverColor:a}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-thead th").concat(t,"-column-has-sorters")]:{outline:"none",cursor:"pointer",transition:"all ".concat(e.motionDurationSlow,", left 0s"),"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},["\n &".concat(t,"-cell-fix-left:hover,\n &").concat(t,"-cell-fix-right:hover\n ")]:{background:e.tableFixedHeaderSortActiveBg}},["".concat(t,"-thead th").concat(t,"-column-sort")]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},["td".concat(t,"-column-sort")]:{background:e.tableBodySortBg},["".concat(t,"-column-title")]:{position:"relative",zIndex:1,flex:1,minWidth:0},["".concat(t,"-column-sorters")]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},["".concat(t,"-column-sorters-tooltip-target-sorter")]:{"&::after":{content:"none"}},["".concat(t,"-column-sorter")]:{marginInlineStart:n,color:r,fontSize:0,transition:"color ".concat(e.motionDurationSlow),"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:o,"&.active":{color:e.colorPrimary}},["".concat(t,"-column-sorter-up + ").concat(t,"-column-sorter-down")]:{marginTop:"-0.3em"}},["".concat(t,"-column-sorters:hover ").concat(t,"-column-sorter")]:{color:a}}}},oO=e=>{let{componentCls:t,opacityLoading:n,tableScrollThumbBg:o,tableScrollThumbBgHover:r,tableScrollThumbSize:a,tableScrollBg:l,zIndexTableSticky:c,stickyScrollBarBorderRadius:i,lineWidth:d,lineType:s,tableBorderColor:u}=e,f="".concat((0,nm.bf)(d)," ").concat(s," ").concat(u);return{["".concat(t,"-wrapper")]:{["".concat(t,"-sticky")]:{"&-holder":{position:"sticky",zIndex:c,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:"".concat((0,nm.bf)(a)," !important"),zIndex:c,display:"flex",alignItems:"center",background:l,borderTop:f,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:a,backgroundColor:o,borderRadius:i,transition:"all ".concat(e.motionDurationSlow,", transform 0s"),position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:r}}}}}}},oI=e=>{let{componentCls:t,lineWidth:n,tableBorderColor:o,calc:r}=e,a="".concat((0,nm.bf)(n)," ").concat(e.lineType," ").concat(o);return{["".concat(t,"-wrapper")]:{["".concat(t,"-summary")]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},["div".concat(t,"-summary")]:{boxShadow:"0 ".concat((0,nm.bf)(r(n).mul(-1).equal())," 0 ").concat(o)}}}},oR=e=>{let{componentCls:t,motionDurationMid:n,lineWidth:o,lineType:r,tableBorderColor:a,calc:l}=e,c="".concat((0,nm.bf)(o)," ").concat(r," ").concat(a),i="".concat(t,"-expanded-row-cell");return{["".concat(t,"-wrapper")]:{["".concat(t,"-tbody-virtual")]:{["".concat(t,"-tbody-virtual-holder-inner")]:{["\n & > ".concat(t,"-row, \n & > div:not(").concat(t,"-row) > ").concat(t,"-row\n ")]:{display:"flex",boxSizing:"border-box",width:"100%"}},["".concat(t,"-cell")]:{borderBottom:c,transition:"background ".concat(n)},["".concat(t,"-expanded-row")]:{["".concat(i).concat(i,"-fixed")]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:"calc(var(--virtual-width) - ".concat((0,nm.bf)(o),")"),borderInlineEnd:"none"}}},["".concat(t,"-bordered")]:{["".concat(t,"-tbody-virtual")]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:c,position:"absolute"},["".concat(t,"-cell")]:{borderInlineEnd:c,["&".concat(t,"-cell-fix-right-first:before")]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:l(o).mul(-1).equal(),borderInlineStart:c}}},["&".concat(t,"-virtual")]:{["".concat(t,"-placeholder ").concat(t,"-cell")]:{borderInlineEnd:c,borderBottom:c}}}}}};let oP=e=>{let{componentCls:t,fontWeightStrong:n,tablePaddingVertical:o,tablePaddingHorizontal:r,tableExpandColumnWidth:a,lineWidth:l,lineType:c,tableBorderColor:i,tableFontSize:d,tableBg:s,tableRadius:u,tableHeaderTextColor:f,motionDurationMid:p,tableHeaderBg:m,tableHeaderCellSplitColor:h,tableFooterTextColor:v,tableFooterBg:g,calc:y}=e,b="".concat((0,nm.bf)(l)," ").concat(c," ").concat(i);return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},(0,nv.dF)()),{[t]:Object.assign(Object.assign({},(0,nv.Wf)(e)),{fontSize:d,background:s,borderRadius:"".concat((0,nm.bf)(u)," ").concat((0,nm.bf)(u)," 0 0"),scrollbarColor:"".concat(e.tableScrollThumbBg," ").concat(e.tableScrollBg)}),table:{width:"100%",textAlign:"start",borderRadius:"".concat((0,nm.bf)(u)," ").concat((0,nm.bf)(u)," 0 0"),borderCollapse:"separate",borderSpacing:0},["\n ".concat(t,"-cell,\n ").concat(t,"-thead > tr > th,\n ").concat(t,"-tbody > tr > th,\n ").concat(t,"-tbody > tr > td,\n tfoot > tr > th,\n tfoot > tr > td\n ")]:{position:"relative",padding:"".concat((0,nm.bf)(o)," ").concat((0,nm.bf)(r)),overflowWrap:"break-word"},["".concat(t,"-title")]:{padding:"".concat((0,nm.bf)(o)," ").concat((0,nm.bf)(r))},["".concat(t,"-thead")]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:f,fontWeight:n,textAlign:"start",background:m,borderBottom:b,transition:"background ".concat(p," ease"),"&[colspan]:not([colspan='1'])":{textAlign:"center"},["&:not(:last-child):not(".concat(t,"-selection-column):not(").concat(t,"-row-expand-icon-cell):not([colspan])::before")]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:h,transform:"translateY(-50%)",transition:"background-color ".concat(p),content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},["".concat(t,"-tbody")]:{"> tr":{"> th, > td":{transition:"background ".concat(p,", border-color ").concat(p),borderBottom:b,["\n > ".concat(t,"-wrapper:only-child,\n > ").concat(t,"-expanded-row-fixed > ").concat(t,"-wrapper:only-child\n ")]:{[t]:{marginBlock:(0,nm.bf)(y(o).mul(-1).equal()),marginInline:"".concat((0,nm.bf)(y(a).sub(r).equal()),"\n ").concat((0,nm.bf)(y(r).mul(-1).equal())),["".concat(t,"-tbody > tr:last-child > td")]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:f,fontWeight:n,textAlign:"start",background:m,borderBottom:b,transition:"background ".concat(p," ease")},["& > ".concat(t,"-measure-cell")]:{paddingBlock:"0 !important",borderBlock:"0 !important",["".concat(t,"-measure-cell-content")]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},["".concat(t,"-footer")]:{padding:"".concat((0,nm.bf)(o)," ").concat((0,nm.bf)(r)),color:v,background:g}})}};var oT=(0,nb.I$)("Table",e=>{let{colorTextHeading:t,colorSplit:n,colorBgContainer:o,controlInteractiveSize:r,headerBg:a,headerColor:l,headerSortActiveBg:c,headerSortHoverBg:i,bodySortBg:d,rowHoverBg:s,rowSelectedBg:u,rowSelectedHoverBg:f,rowExpandedBg:p,cellPaddingBlock:m,cellPaddingInline:h,cellPaddingBlockMD:v,cellPaddingInlineMD:g,cellPaddingBlockSM:y,cellPaddingInlineSM:b,borderColor:x,footerBg:w,footerColor:E,headerBorderRadius:k,cellFontSize:C,cellFontSizeMD:S,cellFontSizeSM:Z,headerSplitColor:N,fixedHeaderSortActiveBg:K,headerFilterHoverBg:O,filterDropdownBg:I,expandIconBg:R,selectionColumnWidth:P,stickyScrollBarBg:T,calc:M}=e,D=(0,ny.IX)(e,{tableFontSize:C,tableBg:o,tableRadius:k,tablePaddingVertical:m,tablePaddingHorizontal:h,tablePaddingVerticalMiddle:v,tablePaddingHorizontalMiddle:g,tablePaddingVerticalSmall:y,tablePaddingHorizontalSmall:b,tableBorderColor:x,tableHeaderTextColor:l,tableHeaderBg:a,tableFooterTextColor:E,tableFooterBg:w,tableHeaderCellSplitColor:N,tableHeaderSortBg:c,tableHeaderSortHoverBg:i,tableBodySortBg:d,tableFixedHeaderSortActiveBg:K,tableHeaderFilterActiveBg:O,tableFilterDropdownBg:I,tableRowHoverBg:s,tableSelectedRowBg:u,tableSelectedRowHoverBg:f,zIndexTableFixed:2,zIndexTableSticky:M(2).add(1).equal({unit:!1}),tableFontSizeMiddle:S,tableFontSizeSmall:Z,tableSelectionColumnWidth:P,tableExpandIconBg:R,tableExpandColumnWidth:M(r).add(M(e.padding).mul(2)).equal(),tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:T,tableScrollThumbBgHover:t,tableScrollBg:n});return[oP(D),ok(D),oI(D),oK(D),ow(D),og(D),oC(D),ox(D),oI(D),ob(D),oZ(D),oE(D),oO(D),oy(D),oN(D),oS(D),oR(D)]},e=>{let{colorFillAlter:t,colorBgContainer:n,colorTextHeading:o,colorFillSecondary:r,colorFillContent:a,controlItemBgActive:l,controlItemBgActiveHover:c,padding:i,paddingSM:d,paddingXS:s,colorBorderSecondary:u,borderRadiusLG:f,controlHeight:p,colorTextPlaceholder:m,fontSize:h,fontSizeSM:v,lineHeight:g,lineWidth:y,colorIcon:b,colorIconHover:x,opacityLoading:w,controlInteractiveSize:E}=e,k=new ov.t(r).onBackground(n).toHexString(),C=new ov.t(a).onBackground(n).toHexString(),S=new ov.t(t).onBackground(n).toHexString(),Z=new ov.t(b),N=new ov.t(x),K=E/2-y,O=2*K+3*y;return{headerBg:S,headerColor:o,headerSortActiveBg:k,headerSortHoverBg:C,bodySortBg:S,rowHoverBg:S,rowSelectedBg:l,rowSelectedHoverBg:c,rowExpandedBg:t,cellPaddingBlock:i,cellPaddingInline:i,cellPaddingBlockMD:d,cellPaddingInlineMD:s,cellPaddingBlockSM:s,cellPaddingInlineSM:s,borderColor:u,headerBorderRadius:f,footerBg:S,footerColor:o,cellFontSize:h,cellFontSizeMD:h,cellFontSizeSM:h,headerSplitColor:u,fixedHeaderSortActiveBg:k,headerFilterHoverBg:a,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:p,stickyScrollBarBg:m,stickyScrollBarBorderRadius:100,expandIconMarginTop:(h*g-3*y)/2-Math.ceil((1.4*v-3*y)/2),headerIconColor:Z.clone().setA(Z.a*w).toRgbString(),headerIconHoverColor:N.clone().setA(N.a*w).toRgbString(),expandIconHalfInner:K,expandIconSize:O,expandIconScale:E/O}},{unitless:{expandIconScale:!0}});let oM=[];var oD=o.forwardRef((e,t)=>{var n,r;let{prefixCls:l,className:c,rootClassName:i,style:d,size:s,bordered:u,dropdownPrefixCls:f,dataSource:p,pagination:m,rowSelection:h,rowKey:v="key",rowClassName:g,columns:y,children:b,childrenColumnName:x,onChange:w,getPopupContainer:E,loading:k,expandIcon:C,expandable:S,expandedRowRender:N,expandIconColumnIndex:K,indentSize:O,scroll:I,sortDirections:R,locale:P,showSorterTooltip:T={target:"full-header"},virtual:M}=e;(0,tc.ln)("Table");let D=o.useMemo(()=>y||ev(b),[y,b]),L=o.useMemo(()=>D.some(e=>e.responsive),[D]),j=(0,tZ.Z)(L),B=o.useMemo(()=>{let e=new Set(Object.keys(j).filter(e=>j[e]));return D.filter(t=>!t.responsive||t.responsive.some(t=>e.has(t)))},[D,j]),H=(0,eq.Z)(e,["className","style","columns"]),{locale:z=tN.Z,direction:A,table:W,renderEmpty:_,getPrefixCls:F,getPopupContainer:q}=o.useContext(tE.E_),V=(0,tS.Z)(s),X=Object.assign(Object.assign({},z.Table),P),U=p||oM,G=F("table",l),Y=F("dropdown",f),[,$]=(0,tI.ZP)(),J=(0,tC.Z)(G),[Q,ee,et]=oT(G,J),en=Object.assign(Object.assign({childrenColumnName:x,expandIconColumnIndex:K},S),{expandIcon:null!==(n=null==S?void 0:S.expandIcon)&&void 0!==n?n:null===(r=null==W?void 0:W.expandable)||void 0===r?void 0:r.expandIcon}),{childrenColumnName:eo="children"}=en,er=o.useMemo(()=>U.some(e=>null==e?void 0:e[eo])?"nest":N||(null==S?void 0:S.expandedRowRender)?"row":null,[U]),ea={body:o.useRef(null)},el=o.useRef(null),ec=o.useRef(null);ty(t,()=>Object.assign(Object.assign({},ec.current),{nativeElement:el.current}));let ei=o.useMemo(()=>"function"==typeof v?v:e=>null==e?void 0:e[v],[v]),[ed]=n3(U,eo,ei),es={},eu=function(e,t){var n,o,r,a;let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],c=Object.assign(Object.assign({},es),e);l&&(null===(n=es.resetPagination)||void 0===n||n.call(es),(null===(o=c.pagination)||void 0===o?void 0:o.current)&&(c.pagination.current=1),m&&(null===(r=m.onChange)||void 0===r||r.call(m,1,null===(a=c.pagination)||void 0===a?void 0:a.pageSize))),I&&!1!==I.scrollToFirstRowOnChange&&ea.body.current&&function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{getContainer:n=()=>window,callback:o,duration:r=450}=t,a=n(),l=tx(a),c=Date.now(),i=()=>{let t=Date.now()-c,n=function(e,t,n,o){let r=n-t;return(e/=o/2)<1?r/2*e*e*e+t:r/2*((e-=2)*e*e+2)+t}(t>r?r:t,l,e,r);tb(a)?a.scrollTo(window.pageXOffset,n):a instanceof Document||"HTMLDocument"===a.constructor.name?a.documentElement.scrollTop=n:a.scrollTop=n,tea.body.current}),null==w||w(c.pagination,c.filters,c.sorter,{currentDataSource:n0(os(U,c.sorterStates,eo),c.filterStates,eo),action:t})},[ef,ep,em,eh]=ou({prefixCls:G,mergedColumns:B,onSorterChange:(e,t)=>{eu({sorter:e,sorterStates:t},"sort",!1)},sortDirections:R||["ascend","descend"],tableLocale:X,showSorterTooltip:T}),eg=o.useMemo(()=>os(U,ep,eo),[U,ep]);es.sorter=eh(),es.sorterStates=ep;let[ey,eb,ex]=n2({prefixCls:G,locale:X,dropdownPrefixCls:Y,mergedColumns:B,onFilterChange:(e,t)=>{eu({filters:e,filterStates:t},"filter",!0)},getPopupContainer:E||q,rootClassName:Z()(i,J)}),ew=n0(eg,eb,eo);es.filters=ex,es.filterStates=eb;let[ek]=op(o.useMemo(()=>{let e={};return Object.keys(ex).forEach(t=>{null!==ex[t]&&(e[t]=ex[t])}),Object.assign(Object.assign({},em),{filters:e})},[em,ex])),[eC,eS]=n8(ew.length,(e,t)=>{eu({pagination:Object.assign(Object.assign({},es.pagination),{current:e,pageSize:t})},"paginate")},m);es.pagination=!1===m?{}:function(e,t){let n={current:e.current,pageSize:e.pageSize};return Object.keys(t&&"object"==typeof t?t:{}).forEach(t=>{let o=e[t];"function"!=typeof o&&(n[t]=o)}),n}(eC,m),es.resetPagination=eS;let eZ=o.useMemo(()=>{if(!1===m||!eC.pageSize)return ew;let{current:e=1,total:t,pageSize:n=10}=eC;return ew.lengthn?ew.slice((e-1)*n,e*n):ew:ew.slice((e-1)*n,e*n)},[!!m,ew,null==eC?void 0:eC.current,null==eC?void 0:eC.pageSize,null==eC?void 0:eC.total]),[eN,eK]=tg({prefixCls:G,data:ew,pageData:eZ,getRowKey:ei,getRecordByKey:ed,expandType:er,childrenColumnName:eo,locale:X,getPopupContainer:E||q},h);en.__PARENT_RENDER_ICON__=en.expandIcon,en.expandIcon=en.expandIcon||C||(e=>{let{prefixCls:t,onExpand:n,record:r,expanded:a,expandable:l}=e,c="".concat(t,"-row-expand-icon");return o.createElement("button",{type:"button",onClick:e=>{n(r,e),e.stopPropagation()},className:Z()(c,{["".concat(c,"-spaced")]:!l,["".concat(c,"-expanded")]:l&&a,["".concat(c,"-collapsed")]:l&&!a}),"aria-label":a?X.collapse:X.expand,"aria-expanded":a})}),"nest"===er&&void 0===en.expandIconColumnIndex?en.expandIconColumnIndex=h?1:0:en.expandIconColumnIndex>0&&h&&(en.expandIconColumnIndex-=1),"number"!=typeof en.indentSize&&(en.indentSize="number"==typeof O?O:15);let eO=o.useCallback(e=>ek(eN(ey(ef(e)))),[ef,ey,eN]),eI=o.useMemo(()=>"boolean"==typeof k?{spinning:k}:"object"==typeof k&&null!==k?Object.assign({spinning:!0},k):void 0,[k]),eR=Z()(et,J,"".concat(G,"-wrapper"),null==W?void 0:W.className,{["".concat(G,"-wrapper-rtl")]:"rtl"===A},c,i,ee),eP=Object.assign(Object.assign({},null==W?void 0:W.style),d),eT=o.useMemo(()=>(null==eI?void 0:eI.spinning)&&U===oM?null:void 0!==(null==P?void 0:P.emptyText)?P.emptyText:(null==_?void 0:_("Table"))||o.createElement(tk.Z,{componentName:"Table"}),[null==eI?void 0:eI.spinning,U,null==P?void 0:P.emptyText,_]),eM={},eD=o.useMemo(()=>{let{fontSize:e,lineHeight:t,lineWidth:n,padding:o,paddingXS:r,paddingSM:a}=$,l=Math.floor(e*t);switch(V){case"middle":return 2*a+l+n;case"small":return 2*r+l+n;default:return 2*o+l+n}},[$,V]);M&&(eM.listItemHeight=eD);let{top:eL,bottom:ej}=(()=>{if(!1===m||!(null==eC?void 0:eC.total))return{};let e=()=>eC.size||("small"===V||"middle"===V?"small":void 0),t=t=>o.createElement(tK.Z,Object.assign({},eC,{align:eC.align||("left"===t?"start":"right"===t?"end":t),className:Z()("".concat(G,"-pagination"),eC.className),size:e()})),n="rtl"===A?"left":"right",r=eC.position;if(null===r||!Array.isArray(r))return{bottom:t(n)};let a=r.find(e=>"string"==typeof e&&e.toLowerCase().includes("top")),l=r.find(e=>"string"==typeof e&&e.toLowerCase().includes("bottom")),c=r.every(e=>"none"==="".concat(e)),i=a?a.toLowerCase().replace("top",""):"",d=l?l.toLowerCase().replace("bottom",""):"";return{top:i?t(i):void 0,bottom:d?t(d):a||l||c?void 0:t(n)}})();return Q(o.createElement("div",{ref:el,className:eR,style:eP},o.createElement(tO.Z,Object.assign({spinning:!1},eI),eL,o.createElement(M?oh:om,Object.assign({},eM,H,{ref:ec,columns:B,direction:A,expandable:en,prefixCls:G,className:Z()({["".concat(G,"-middle")]:"middle"===V,["".concat(G,"-small")]:"small"===V,["".concat(G,"-bordered")]:u,["".concat(G,"-empty")]:0===U.length},et,J,ee),data:eZ,rowKey:ei,rowClassName:(e,t,n)=>{let o;return o="function"==typeof g?Z()(g(e,t,n)):Z()(g),Z()({["".concat(G,"-row-selected")]:eK.has(ei(e,t))},o)},emptyText:eT,internalHooks:a,internalRefs:ea,transformColumns:eO,getContainerWidth:(e,t)=>{let n=e.querySelector(".".concat(G,"-container")),o=t;if(n){let e=getComputedStyle(n);o=t-Number.parseInt(e.borderLeftWidth,10)-Number.parseInt(e.borderRightWidth,10)}return o},measureRowRender:e=>o.createElement(tw.ZP,{getPopupContainer:e=>e},e)})),ej)))});let oL=o.forwardRef((e,t)=>{let n=o.useRef(0);return n.current+=1,o.createElement(oD,Object.assign({},e,{ref:t,_renderTimes:n.current}))});oL.SELECTION_COLUMN=tu,oL.EXPAND_COLUMN=r,oL.SELECTION_ALL=tf,oL.SELECTION_INVERT=tp,oL.SELECTION_NONE=tm,oL.Column=e=>null,oL.ColumnGroup=e=>null,oL.Summary=H;var oj=oL}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6609-a69ca4ee5a2c4a9d.js b/litellm/proxy/_experimental/out/_next/static/chunks/6609-a69ca4ee5a2c4a9d.js
new file mode 100644
index 00000000000..cbc1a9f4000
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/6609-a69ca4ee5a2c4a9d.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6609],{29967:function(e,t,n){n.d(t,{ZP:function(){return B}});var o=n(2265),r=n(36760),a=n.n(r),l=n(92491),c=n(50506),i=n(18242),d=n(71744),s=n(64024),u=n(33759);let f=o.createContext(null),p=f.Provider,m=o.createContext(null),h=m.Provider;var v=n(20873),g=n(28791),b=n(6694),y=n(34709),x=n(66531),w=n(86586),k=n(39109),C=n(93463),E=n(12918),S=n(99320),Z=n(71140);let N=e=>{let{componentCls:t,antCls:n}=e,o="".concat(t,"-group");return{[o]:Object.assign(Object.assign({},(0,E.Wf)(e)),{display:"inline-block",fontSize:0,["&".concat(o,"-rtl")]:{direction:"rtl"},["&".concat(o,"-block")]:{display:"flex"},["".concat(n,"-badge ").concat(n,"-badge-count")]:{zIndex:1},["> ".concat(n,"-badge:not(:first-child) > ").concat(n,"-button-wrapper")]:{borderInlineStart:"none"}})}},K=e=>{let{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:o,radioSize:r,motionDurationSlow:a,motionDurationMid:l,motionEaseInOutCirc:c,colorBgContainer:i,colorBorder:d,lineWidth:s,colorBgContainerDisabled:u,colorTextDisabled:f,paddingXS:p,dotColorDisabled:m,lineType:h,radioColor:v,radioBgColor:g,calc:b}=e,y="".concat(t,"-inner"),x=b(r).sub(b(4).mul(2)),w=b(1).mul(r).equal({unit:!0});return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({},(0,E.Wf)(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer","&:last-child":{marginInlineEnd:0},["&".concat(t,"-wrapper-rtl")]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},["".concat(t,"-checked::after")]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:"".concat((0,C.bf)(s)," ").concat(h," ").concat(o),borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},(0,E.Wf)(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),["".concat(t,"-wrapper:hover &,\n &:hover ").concat(y)]:{borderColor:o},["".concat(t,"-input:focus-visible + ").concat(y)]:(0,E.oN)(e),["".concat(t,":hover::after, ").concat(t,"-wrapper:hover &::after")]:{visibility:"visible"},["".concat(t,"-inner")]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:w,height:w,marginBlockStart:b(1).mul(r).div(-2).equal({unit:!0}),marginInlineStart:b(1).mul(r).div(-2).equal({unit:!0}),backgroundColor:v,borderBlockStart:0,borderInlineStart:0,borderRadius:w,transform:"scale(0)",opacity:0,transition:"all ".concat(a," ").concat(c),content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:w,height:w,backgroundColor:i,borderColor:d,borderStyle:"solid",borderWidth:s,borderRadius:"50%",transition:"all ".concat(l)},["".concat(t,"-input")]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},["".concat(t,"-checked")]:{[y]:{borderColor:o,backgroundColor:g,"&::after":{transform:"scale(".concat(e.calc(e.dotSize).div(r).equal(),")"),opacity:1,transition:"all ".concat(a," ").concat(c)}}},["".concat(t,"-disabled")]:{cursor:"not-allowed",[y]:{backgroundColor:u,borderColor:d,cursor:"not-allowed","&::after":{backgroundColor:m}},["".concat(t,"-input")]:{cursor:"not-allowed"},["".concat(t,"-disabled + span")]:{color:f,cursor:"not-allowed"},["&".concat(t,"-checked")]:{[y]:{"&::after":{transform:"scale(".concat(b(x).div(r).equal(),")")}}}},["span".concat(t," + *")]:{paddingInlineStart:p,paddingInlineEnd:p}})}},O=e=>{let{buttonColor:t,controlHeight:n,componentCls:o,lineWidth:r,lineType:a,colorBorder:l,motionDurationMid:c,buttonPaddingInline:i,fontSize:d,buttonBg:s,fontSizeLG:u,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:h,borderRadiusSM:v,borderRadiusLG:g,buttonCheckedBg:b,buttonSolidCheckedColor:y,colorTextDisabled:x,colorBgContainerDisabled:w,buttonCheckedBgDisabled:k,buttonCheckedColorDisabled:S,colorPrimary:Z,colorPrimaryHover:N,colorPrimaryActive:K,buttonSolidCheckedBg:O,buttonSolidCheckedHoverBg:I,buttonSolidCheckedActiveBg:R,calc:P}=e;return{["".concat(o,"-button-wrapper")]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:i,paddingBlock:0,color:t,fontSize:d,lineHeight:(0,C.bf)(P(n).sub(P(r).mul(2)).equal()),background:s,border:"".concat((0,C.bf)(r)," ").concat(a," ").concat(l),borderBlockStartWidth:P(r).add(.02).equal(),borderInlineEndWidth:r,cursor:"pointer",transition:["color ".concat(c),"background ".concat(c),"box-shadow ".concat(c)].join(","),a:{color:t},["> ".concat(o,"-button")]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:last-child)":{marginInlineEnd:P(r).mul(-1).equal()},"&:first-child":{borderInlineStart:"".concat((0,C.bf)(r)," ").concat(a," ").concat(l),borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},["".concat(o,"-group-large &")]:{height:f,fontSize:u,lineHeight:(0,C.bf)(P(f).sub(P(r).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},["".concat(o,"-group-small &")]:{height:p,paddingInline:P(m).sub(r).equal(),paddingBlock:0,lineHeight:(0,C.bf)(P(p).sub(P(r).mul(2)).equal()),"&:first-child":{borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v}},"&:hover":{position:"relative",color:Z},"&:has(:focus-visible)":(0,E.oN)(e),["".concat(o,"-inner, input[type='checkbox'], input[type='radio']")]:{width:0,height:0,opacity:0,pointerEvents:"none"},["&-checked:not(".concat(o,"-button-wrapper-disabled)")]:{zIndex:1,color:Z,background:b,borderColor:Z,"&::before":{backgroundColor:Z},"&:first-child":{borderColor:Z},"&:hover":{color:N,borderColor:N,"&::before":{backgroundColor:N}},"&:active":{color:K,borderColor:K,"&::before":{backgroundColor:K}}},["".concat(o,"-group-solid &-checked:not(").concat(o,"-button-wrapper-disabled)")]:{color:y,background:O,borderColor:O,"&:hover":{color:y,background:I,borderColor:I},"&:active":{color:y,background:R,borderColor:R}},"&-disabled":{color:x,backgroundColor:w,borderColor:l,cursor:"not-allowed","&:first-child, &:hover":{color:x,backgroundColor:w,borderColor:l}},["&-disabled".concat(o,"-button-wrapper-checked")]:{color:S,backgroundColor:k,borderColor:l,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}};var I=(0,S.I$)("Radio",e=>{let{controlOutline:t,controlOutlineWidth:n}=e,o="0 0 0 ".concat((0,C.bf)(n)," ").concat(t),r=(0,Z.IX)(e,{radioFocusShadow:o,radioButtonFocusShadow:o});return[N(r),K(r),O(r)]},e=>{let{wireframe:t,padding:n,marginXS:o,lineWidth:r,fontSizeLG:a,colorText:l,colorBgContainer:c,colorTextDisabled:i,controlItemBgActiveDisabled:d,colorTextLightSolid:s,colorPrimary:u,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e;return{radioSize:a,dotSize:t?a-8:a-(4+r)*2,dotColorDisabled:i,buttonSolidCheckedColor:s,buttonSolidCheckedBg:u,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:c,buttonCheckedBg:c,buttonColor:l,buttonCheckedBgDisabled:d,buttonCheckedColorDisabled:i,buttonPaddingInline:n-r,wrapperMarginInlineEnd:o,radioColor:t?u:m,radioBgColor:t?c:u}},{unitless:{radioSize:!0,dotSize:!0}}),R=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);rt.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n};let P=o.forwardRef((e,t)=>{var n,r;let l=o.useContext(f),c=o.useContext(m),{getPrefixCls:i,direction:u,radio:p}=o.useContext(d.E_),h=o.useRef(null),C=(0,g.sQ)(t,h),{isFormItemInput:E}=o.useContext(k.aM),{prefixCls:S,className:Z,rootClassName:N,children:K,style:O,title:P}=e,M=R(e,["prefixCls","className","rootClassName","children","style","title"]),T=i("radio",S),D="button"===((null==l?void 0:l.optionType)||c),L=D?"".concat(T,"-button"):T,j=(0,s.Z)(T),[B,H,z]=I(T,j),A=Object.assign({},M),W=o.useContext(w.Z);l&&(A.name=l.name,A.onChange=t=>{var n,o;null===(n=e.onChange)||void 0===n||n.call(e,t),null===(o=null==l?void 0:l.onChange)||void 0===o||o.call(l,t)},A.checked=e.value===l.value,A.disabled=null!==(n=A.disabled)&&void 0!==n?n:l.disabled),A.disabled=null!==(r=A.disabled)&&void 0!==r?r:W;let _=a()("".concat(L,"-wrapper"),{["".concat(L,"-wrapper-checked")]:A.checked,["".concat(L,"-wrapper-disabled")]:A.disabled,["".concat(L,"-wrapper-rtl")]:"rtl"===u,["".concat(L,"-wrapper-in-form-item")]:E,["".concat(L,"-wrapper-block")]:!!(null==l?void 0:l.block)},null==p?void 0:p.className,Z,N,H,z,j),[F,q]=(0,x.Z)(A.onClick);return B(o.createElement(b.Z,{component:"Radio",disabled:A.disabled},o.createElement("label",{className:_,style:Object.assign(Object.assign({},null==p?void 0:p.style),O),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:P,onClick:F},o.createElement(v.Z,Object.assign({},A,{className:a()(A.className,{[y.A]:!D}),type:"radio",prefixCls:L,ref:C,onClick:q})),void 0!==K?o.createElement("span",{className:"".concat(L,"-label")},K):null)))});var M=n(29487);let T=o.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r}=o.useContext(d.E_),{name:f}=o.useContext(k.aM),m=(0,l.Z)((0,M.S)(f)),{prefixCls:h,className:v,rootClassName:g,options:b,buttonStyle:y="outline",disabled:x,children:w,size:C,style:E,id:S,optionType:Z,name:N=m,defaultValue:K,value:O,block:R=!1,onChange:T,onMouseEnter:D,onMouseLeave:L,onFocus:j,onBlur:B}=e,[H,z]=(0,c.Z)(K,{value:O}),A=o.useCallback(t=>{let n=t.target.value;"value"in e||z(n),n!==H&&(null==T||T(t))},[H,z,T]),W=n("radio",h),_="".concat(W,"-group"),F=(0,s.Z)(W),[q,V,X]=I(W,F),U=w;b&&b.length>0&&(U=b.map(e=>"string"==typeof e||"number"==typeof e?o.createElement(P,{key:e.toString(),prefixCls:W,disabled:x,value:e,checked:H===e},e):o.createElement(P,{key:"radio-group-value-options-".concat(e.value),prefixCls:W,disabled:e.disabled||x,value:e.value,checked:H===e.value,title:e.title,style:e.style,className:e.className,id:e.id,required:e.required},e.label)));let G=(0,u.Z)(C),Y=a()(_,"".concat(_,"-").concat(y),{["".concat(_,"-").concat(G)]:G,["".concat(_,"-rtl")]:"rtl"===r,["".concat(_,"-block")]:R},v,g,V,X,F),$=o.useMemo(()=>({onChange:A,value:H,disabled:x,name:N,optionType:Z,block:R}),[A,H,x,N,Z,R]);return q(o.createElement("div",Object.assign({},(0,i.Z)(e,{aria:!0,data:!0}),{className:Y,style:E,onMouseEnter:D,onMouseLeave:L,onFocus:j,onBlur:B,id:S,ref:t}),o.createElement(p,{value:$},U)))});var D=o.memo(T),L=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);rt.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n},j=o.forwardRef((e,t)=>{let{getPrefixCls:n}=o.useContext(d.E_),{prefixCls:r}=e,a=L(e,["prefixCls"]),l=n("radio",r);return o.createElement(h,{value:"button"},o.createElement(P,Object.assign({prefixCls:l},a,{type:"radio",ref:t})))});P.Button=j,P.Group=D,P.__ANT_RADIO=!0;var B=P},56609:function(e,t,n){n.d(t,{Z:function(){return oj}});var o=n(2265),r={},a="rc-table-internal-hook",l=n(26365),c=n(58525),i=n(27380),d=n(16671),s=n(54887);function u(e){var t=o.createContext(void 0);return{Context:t,Provider:function(e){var n=e.value,r=e.children,a=o.useRef(n);a.current=n;var c=o.useState(function(){return{getValue:function(){return a.current},listeners:new Set}}),d=(0,l.Z)(c,1)[0];return(0,i.Z)(function(){(0,s.unstable_batchedUpdates)(function(){d.listeners.forEach(function(e){e(n)})})},[n]),o.createElement(t.Provider,{value:d},r)},defaultValue:e}}function f(e,t){var n=(0,c.Z)("function"==typeof t?t:function(e){if(void 0===t)return e;if(!Array.isArray(t))return e[t];var n={};return t.forEach(function(t){n[t]=e[t]}),n}),r=o.useContext(null==e?void 0:e.Context),a=r||{},s=a.listeners,u=a.getValue,f=o.useRef();f.current=n(r?u():null==e?void 0:e.defaultValue);var p=o.useState({}),m=(0,l.Z)(p,2)[1];return(0,i.Z)(function(){if(r)return s.add(e),function(){s.delete(e)};function e(e){var t=n(e);(0,d.Z)(f.current,t,!0)||m({})}},[r]),f.current}var p=n(1119),m=n(28791);function h(){var e=o.createContext(null);function t(){return o.useContext(e)}return{makeImmutable:function(n,r){var a=(0,m.Yr)(n),l=function(l,c){var i=a?{ref:c}:{},d=o.useRef(0),s=o.useRef(l);return null!==t()?o.createElement(n,(0,p.Z)({},l,i)):((!r||r(s.current,l))&&(d.current+=1),s.current=l,o.createElement(e.Provider,{value:d.current},o.createElement(n,(0,p.Z)({},l,i))))};return a?o.forwardRef(l):l},responseImmutable:function(e,n){var r=(0,m.Yr)(e),a=function(n,a){return t(),o.createElement(e,(0,p.Z)({},n,r?{ref:a}:{}))};return r?o.memo(o.forwardRef(a),n):o.memo(a,n)},useImmutableMark:t}}var v=h();v.makeImmutable,v.responseImmutable,v.useImmutableMark;var g=h(),b=g.makeImmutable,y=g.responseImmutable,x=g.useImmutableMark,w=u(),k=n(41154),C=n(31686),E=n(11993),S=n(36760),Z=n.n(S),N=n(6397),K=n(16847),O=n(32559),I=o.createContext({renderWithProps:!1});function R(e){var t=[],n={};return e.forEach(function(e){for(var o=e||{},r=o.key,a=o.dataIndex,l=r||(null==a?[]:Array.isArray(a)?a:[a]).join("-")||"RC_TABLE_KEY";n[l];)l="".concat(l,"_next");n[l]=!0,t.push(l)}),t}var P=n(74126),M=function(e){var t,n=e.ellipsis,r=e.rowType,a=e.children,l=!0===n?{showTitle:!0}:n;return l&&(l.showTitle||"header"===r)&&("string"==typeof a||"number"==typeof a?t=a.toString():o.isValidElement(a)&&"string"==typeof a.props.children&&(t=a.props.children)),t},T=o.memo(function(e){var t,n,r,a,c,i,s,u,m,h,v=e.component,g=e.children,b=e.ellipsis,y=e.scope,S=e.prefixCls,O=e.className,R=e.align,T=e.record,D=e.render,L=e.dataIndex,j=e.renderIndex,B=e.shouldCellUpdate,H=e.index,z=e.rowType,A=e.colSpan,W=e.rowSpan,_=e.fixLeft,F=e.fixRight,q=e.firstFixLeft,V=e.lastFixLeft,X=e.firstFixRight,U=e.lastFixRight,G=e.appendNode,Y=e.additionalProps,$=void 0===Y?{}:Y,J=e.isSticky,Q="".concat(S,"-cell"),ee=f(w,["supportSticky","allColumnsFixedLeft","rowHoverable"]),et=ee.supportSticky,en=ee.allColumnsFixedLeft,eo=ee.rowHoverable,er=(t=o.useContext(I),n=x(),(0,N.Z)(function(){if(null!=g)return[g];var e=null==L||""===L?[]:Array.isArray(L)?L:[L],n=(0,K.Z)(T,e),r=n,a=void 0;if(D){var l=D(n,T,j);!l||"object"!==(0,k.Z)(l)||Array.isArray(l)||o.isValidElement(l)?r=l:(r=l.children,a=l.props,t.renderWithProps=!0)}return[r,a]},[n,T,g,L,D,j],function(e,n){if(B){var o=(0,l.Z)(e,2)[1];return B((0,l.Z)(n,2)[1],o)}return!!t.renderWithProps||!(0,d.Z)(e,n,!0)})),ea=(0,l.Z)(er,2),el=ea[0],ec=ea[1],ei={},ed="number"==typeof _&&et,es="number"==typeof F&&et;ed&&(ei.position="sticky",ei.left=_),es&&(ei.position="sticky",ei.right=F);var eu=null!==(r=null!==(a=null!==(c=null==ec?void 0:ec.colSpan)&&void 0!==c?c:$.colSpan)&&void 0!==a?a:A)&&void 0!==r?r:1,ef=null!==(i=null!==(s=null!==(u=null==ec?void 0:ec.rowSpan)&&void 0!==u?u:$.rowSpan)&&void 0!==s?s:W)&&void 0!==i?i:1,ep=f(w,function(e){var t,n;return[(t=ef||1,n=e.hoverStartRow,H<=e.hoverEndRow&&H+t-1>=n),e.onHover]}),em=(0,l.Z)(ep,2),eh=em[0],ev=em[1],eg=(0,P.zX)(function(e){var t;T&&ev(H,H+ef-1),null==$||null===(t=$.onMouseEnter)||void 0===t||t.call($,e)}),eb=(0,P.zX)(function(e){var t;T&&ev(-1,-1),null==$||null===(t=$.onMouseLeave)||void 0===t||t.call($,e)});if(0===eu||0===ef)return null;var ey=null!==(m=$.title)&&void 0!==m?m:M({rowType:z,ellipsis:b,children:el}),ex=Z()(Q,O,(h={},(0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)(h,"".concat(Q,"-fix-left"),ed&&et),"".concat(Q,"-fix-left-first"),q&&et),"".concat(Q,"-fix-left-last"),V&&et),"".concat(Q,"-fix-left-all"),V&&en&&et),"".concat(Q,"-fix-right"),es&&et),"".concat(Q,"-fix-right-first"),X&&et),"".concat(Q,"-fix-right-last"),U&&et),"".concat(Q,"-ellipsis"),b),"".concat(Q,"-with-append"),G),"".concat(Q,"-fix-sticky"),(ed||es)&&J&&et),(0,E.Z)(h,"".concat(Q,"-row-hover"),!ec&&eh)),$.className,null==ec?void 0:ec.className),ew={};R&&(ew.textAlign=R);var ek=(0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)({},null==ec?void 0:ec.style),ei),ew),$.style),eC=el;return"object"!==(0,k.Z)(eC)||Array.isArray(eC)||o.isValidElement(eC)||(eC=null),b&&(V||X)&&(eC=o.createElement("span",{className:"".concat(Q,"-content")},eC)),o.createElement(v,(0,p.Z)({},ec,$,{className:ex,style:ek,title:ey,scope:y,onMouseEnter:eo?eg:void 0,onMouseLeave:eo?eb:void 0,colSpan:1!==eu?eu:null,rowSpan:1!==ef?ef:null}),G,eC)});function D(e,t,n,o,r){var a,l,c=n[e]||{},i=n[t]||{};"left"===c.fixed?a=o.left["rtl"===r?t:e]:"right"===i.fixed&&(l=o.right["rtl"===r?e:t]);var d=!1,s=!1,u=!1,f=!1,p=n[t+1],m=n[e-1],h=p&&!p.fixed||m&&!m.fixed||n.every(function(e){return"left"===e.fixed});return"rtl"===r?void 0!==a?f=!(m&&"left"===m.fixed)&&h:void 0!==l&&(u=!(p&&"right"===p.fixed)&&h):void 0!==a?d=!(p&&"left"===p.fixed)&&h:void 0!==l&&(s=!(m&&"right"===m.fixed)&&h),{fixLeft:a,fixRight:l,lastFixLeft:d,firstFixRight:s,lastFixRight:u,firstFixLeft:f,isSticky:o.isSticky}}var L=o.createContext({}),j=n(6989),B=["children"];function H(e){return e.children}H.Row=function(e){var t=e.children,n=(0,j.Z)(e,B);return o.createElement("tr",n,t)},H.Cell=function(e){var t=e.className,n=e.index,r=e.children,a=e.colSpan,l=void 0===a?1:a,c=e.rowSpan,i=e.align,d=f(w,["prefixCls","direction"]),s=d.prefixCls,u=d.direction,m=o.useContext(L),h=m.scrollColumnIndex,v=m.stickyOffsets,g=m.flattenColumns,b=n+l-1+1===h?l+1:l,y=D(n,n+b-1,g,v,u);return o.createElement(T,(0,p.Z)({className:t,index:n,component:"td",prefixCls:s,record:null,dataIndex:null,align:i,colSpan:b,rowSpan:c,render:function(){return r}},y))};var z=y(function(e){var t=e.children,n=e.stickyOffsets,r=e.flattenColumns,a=f(w,"prefixCls"),l=r.length-1,c=r[l],i=o.useMemo(function(){return{stickyOffsets:n,flattenColumns:r,scrollColumnIndex:null!=c&&c.scrollbar?l:null}},[c,r,l,n]);return o.createElement(L.Provider,{value:i},o.createElement("tfoot",{className:"".concat(a,"-summary")},t))}),A=n(31474),W=n(10281),_=n(3208),F=n(18242);function q(e,t,n,r){return o.useMemo(function(){if(null!=n&&n.size){for(var o=[],a=0;a<(null==e?void 0:e.length);a+=1)!function e(t,n,o,r,a,l,c){var i=l(n,c);t.push({record:n,indent:o,index:c,rowKey:i});var d=null==a?void 0:a.has(i);if(n&&Array.isArray(n[r])&&d)for(var s=0;s1?n-1:0),r=1;r5&&void 0!==arguments[5]?arguments[5]:[],d=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=e.record,u=e.prefixCls,f=e.columnsKey,p=e.fixedInfoList,m=e.expandIconColumnIndex,h=e.nestExpandable,v=e.indentSize,g=e.expandIcon,b=e.expanded,y=e.hasNestChildren,x=e.onTriggerExpand,w=e.expandable,k=e.expandedKeys,C=f[n],E=p[n];n===(m||0)&&h&&(c=o.createElement(o.Fragment,null,o.createElement("span",{style:{paddingLeft:"".concat(v*r,"px")},className:"".concat(u,"-row-indent indent-level-").concat(r)}),g({prefixCls:u,expanded:b,expandable:y,record:s,onExpand:x})));var S=(null===(l=t.onCell)||void 0===l?void 0:l.call(t,s,a))||{};if(d){var Z=S.rowSpan,N=void 0===Z?1:Z;if(w&&N&&n=1)),style:(0,C.Z)((0,C.Z)({},r),null==k?void 0:k.style)}),y.map(function(e,t){var n=e.render,r=e.dataIndex,i=e.className,s=Y(g,e,t,u,l,d,null==v?void 0:v.offset),f=s.key,y=s.fixedInfo,x=s.appendCellNode,w=s.additionalCellProps;return o.createElement(T,(0,p.Z)({className:i,ellipsis:e.ellipsis,align:e.align,scope:e.rowScope,component:e.rowScope?h:m,prefixCls:b,key:f,record:a,index:l,renderIndex:c,dataIndex:r,render:n,shouldCellUpdate:e.shouldCellUpdate},y,{appendNode:x,additionalProps:w}))}));if(N&&(K.current||S)){var R=w(a,l,u+1,S);t=o.createElement(X,{expanded:S,className:Z()("".concat(b,"-expanded-row"),"".concat(b,"-expanded-row-level-").concat(u+1),O),prefixCls:b,component:f,cellComponent:m,colSpan:v?v.colSpan:y.length,stickyOffset:null==v?void 0:v.sticky,isEmpty:!1},R)}return o.createElement(o.Fragment,null,I,t)});function J(e){var t=e.columnKey,n=e.onColumnResize,r=e.prefixCls,a=e.title,l=o.useRef();return(0,i.Z)(function(){l.current&&n(t,l.current.offsetWidth)},[]),o.createElement(A.Z,{data:t},o.createElement("th",{ref:l,className:"".concat(r,"-measure-cell")},o.createElement("div",{className:"".concat(r,"-measure-cell-content")},a||"\xa0")))}var Q=n(2857);function ee(e){var t=e.prefixCls,n=e.columnsKey,r=e.onColumnResize,a=e.columns,l=o.useRef(null),c=f(w,["measureRowRender"]).measureRowRender,i=o.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),ref:l,tabIndex:-1},o.createElement(A.Z.Collection,{onBatchResize:function(e){(0,Q.Z)(l.current)&&e.forEach(function(e){r(e.data,e.size.offsetWidth)})}},n.map(function(e){var n=a.find(function(t){return t.key===e}),l=null==n?void 0:n.title,c=o.isValidElement(l)?o.cloneElement(l,{ref:null}):l;return o.createElement(J,{prefixCls:t,key:e,columnKey:e,onColumnResize:r,title:c})})));return c?c(i):i}var et=y(function(e){var t,n=e.data,r=e.measureColumnWidth,a=f(w,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),l=a.prefixCls,c=a.getComponent,i=a.onColumnResize,d=a.flattenColumns,s=a.getRowKey,u=a.expandedKeys,p=a.childrenColumnName,m=a.emptyNode,h=a.expandedRowOffset,v=void 0===h?0:h,g=a.colWidths,b=q(n,p,u,s),y=o.useMemo(function(){return b.map(function(e){return e.rowKey})},[b]),x=o.useRef({renderWithProps:!1}),k=o.useMemo(function(){for(var e=d.length-v,t=0,n=0;n=0;d-=1){var s=t[d],u=n&&n[d],m=void 0,h=void 0;if(u&&(m=u[eo],"auto"===a&&(h=u.minWidth)),s||h||m||i){var v=m||{},g=(v.columnType,(0,j.Z)(v,er));l.unshift(o.createElement("col",(0,p.Z)({key:d,style:{width:s,minWidth:h}},g))),i=!0}}return l.length>0?o.createElement("colgroup",null,l):null},el=n(83145),ec=["className","noData","columns","flattenColumns","colWidths","colGroup","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","scrollX","tableLayout","onScroll","children"],ei=o.forwardRef(function(e,t){var n=e.className,r=e.noData,a=e.columns,l=e.flattenColumns,c=e.colWidths,i=e.colGroup,d=e.columCount,s=e.stickyOffsets,u=e.direction,p=e.fixHeader,h=e.stickyTopOffset,v=e.stickyBottomOffset,g=e.stickyClassName,b=e.scrollX,y=e.tableLayout,x=e.onScroll,k=e.children,S=(0,j.Z)(e,ec),N=f(w,["prefixCls","scrollbarSize","isSticky","getComponent"]),K=N.prefixCls,O=N.scrollbarSize,I=N.isSticky,R=(0,N.getComponent)(["header","table"],"table"),P=I&&!p?0:O,M=o.useRef(null),T=o.useCallback(function(e){(0,m.mH)(t,e),(0,m.mH)(M,e)},[]);o.useEffect(function(){function e(e){var t=e.currentTarget,n=e.deltaX;n&&(x({currentTarget:t,scrollLeft:t.scrollLeft+n}),e.preventDefault())}var t=M.current;return null==t||t.addEventListener("wheel",e,{passive:!1}),function(){null==t||t.removeEventListener("wheel",e)}},[]);var D=l[l.length-1],L={fixed:D?D.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(K,"-cell-scrollbar")}}},B=(0,o.useMemo)(function(){return P?[].concat((0,el.Z)(a),[L]):a},[P,a]),H=(0,o.useMemo)(function(){return P?[].concat((0,el.Z)(l),[L]):l},[P,l]),z=(0,o.useMemo)(function(){var e=s.right,t=s.left;return(0,C.Z)((0,C.Z)({},s),{},{left:"rtl"===u?[].concat((0,el.Z)(t.map(function(e){return e+P})),[0]):t,right:"rtl"===u?e:[].concat((0,el.Z)(e.map(function(e){return e+P})),[0]),isSticky:I})},[P,s,I]),A=(0,o.useMemo)(function(){for(var e=[],t=0;t1?"colgroup":"col":null,ellipsis:l.ellipsis,align:l.align,component:c,prefixCls:u,key:h[t]},i,{additionalProps:n,rowType:"header"}))}))},eu=y(function(e){var t=e.stickyOffsets,n=e.columns,r=e.flattenColumns,a=e.onHeaderRow,l=f(w,["prefixCls","getComponent"]),c=l.prefixCls,i=l.getComponent,d=o.useMemo(function(){return function(e){var t=[];!function e(n,o){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[r]=t[r]||[];var a=o;return n.filter(Boolean).map(function(n){var o={key:n.key,className:n.className||"",children:n.title,column:n,colStart:a},l=1,c=n.children;return c&&c.length>0&&(l=e(c,a,r+1).reduce(function(e,t){return e+t},0),o.hasSubColumns=!0),"colSpan"in n&&(l=n.colSpan),"rowSpan"in n&&(o.rowSpan=n.rowSpan),o.colSpan=l,o.colEnd=o.colStart+l-1,t[r].push(o),a+=l,l})}(e,0);for(var n=t.length,o=function(e){t[e].forEach(function(t){("rowSpan"in t)||t.hasSubColumns||(t.rowSpan=n-e)})},r=0;r1&&void 0!==arguments[1]?arguments[1]:"";return"number"==typeof t?t:t.endsWith("%")?e*parseFloat(t)/100:null}var em=["children"],eh=["fixed"];function ev(e){return(0,ef.Z)(e).filter(function(e){return o.isValidElement(e)}).map(function(e){var t=e.key,n=e.props,o=n.children,r=(0,j.Z)(n,em),a=(0,C.Z)({key:t},r);return o&&(a.children=ev(o)),a})}function eg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key";return e.filter(function(e){return e&&"object"===(0,k.Z)(e)}).reduce(function(e,n,o){var r=n.fixed,a=!0===r?"left":r,l="".concat(t,"-").concat(o),c=n.children;return c&&c.length>0?[].concat((0,el.Z)(e),(0,el.Z)(eg(c,l).map(function(e){var t;return(0,C.Z)((0,C.Z)({},e),{},{fixed:null!==(t=e.fixed)&&void 0!==t?t:a})}))):[].concat((0,el.Z)(e),[(0,C.Z)((0,C.Z)({key:l},n),{},{fixed:a})])},[])}var eb=function(e,t){var n=e.prefixCls,a=e.columns,c=e.children,i=e.expandable,d=e.expandedKeys,s=e.columnTitle,u=e.getRowKey,f=e.onTriggerExpand,p=e.expandIcon,m=e.rowExpandable,h=e.expandIconColumnIndex,v=e.expandedRowOffset,g=void 0===v?0:v,b=e.direction,y=e.expandRowByClick,x=e.columnWidth,w=e.fixed,S=e.scrollWidth,Z=e.clientWidth,N=o.useMemo(function(){return function e(t){return t.filter(function(e){return e&&"object"===(0,k.Z)(e)&&!e.hidden}).map(function(t){var n=t.children;return n&&n.length>0?(0,C.Z)((0,C.Z)({},t),{},{children:e(n)}):t})}((a||ev(c)||[]).slice())},[a,c]),K=o.useMemo(function(){if(i){var e,t=N.slice();if(!t.includes(r)){var a=h||0,l=0===a&&"right"===w?N.length:a;l>=0&&t.splice(l,0,r)}var c=t.indexOf(r);t=t.filter(function(e,t){return e!==r||t===c});var v=N[c];e=w||(v?v.fixed:null);var b=(0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)({},eo,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",s),"fixed",e),"className","".concat(n,"-row-expand-icon-cell")),"width",x),"render",function(e,t,r){var a=u(t,r),l=p({prefixCls:n,expanded:d.has(a),expandable:!m||m(t),record:t,onExpand:f});return y?o.createElement("span",{onClick:function(e){return e.stopPropagation()}},l):l});return t.map(function(e,t){var n=e===r?b:e;return t=0;t-=1){var n=I[t].fixed;if("left"===n||!0===n){e=t;break}}if(e>=0)for(var o=0;o<=e;o+=1){var r=I[o].fixed;if("left"!==r&&!0!==r)return!0}var a=I.findIndex(function(e){return"right"===e.fixed});if(a>=0){for(var l=a;l0){var e=0,t=0;I.forEach(function(n){var o=ep(S,n.width);o?e+=o:t+=1});var n=Math.max(S,Z),o=Math.max(n-e,t),r=t,a=o/t,l=0,c=I.map(function(e){var t=(0,C.Z)({},e),n=ep(S,t.width);if(n)t.width=n;else{var c=Math.floor(a);t.width=1===r?o:c,o-=c,r-=1}return l+=t.width,t});if(l=n-h})})}})},z=function(e){I(function(t){return(0,C.Z)((0,C.Z)({},t),{},{scrollLeft:y?e/y*x:0})})};return(o.useImperativeHandle(t,function(){return{setScrollLeft:z,checkScrollBarVisible:H}}),o.useEffect(function(){var e=ew(document.body,"mouseup",j,!1),t=ew(document.body,"mousemove",B,!1);return H(),function(){e.remove(),t.remove()}},[k,T]),o.useEffect(function(){if(p.current){for(var e=[],t=(0,eC.bn)(p.current);t;)e.push(t),t=t.parentElement;return e.forEach(function(e){return e.addEventListener("scroll",H,!1)}),window.addEventListener("resize",H,!1),window.addEventListener("scroll",H,!1),v.addEventListener("scroll",H,!1),function(){e.forEach(function(e){return e.removeEventListener("scroll",H)}),window.removeEventListener("resize",H),window.removeEventListener("scroll",H),v.removeEventListener("scroll",H)}}},[v]),o.useEffect(function(){O.isHiddenScrollBar||I(function(e){var t=p.current;return t?(0,C.Z)((0,C.Z)({},e),{},{scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}):e})},[O.isHiddenScrollBar]),y<=x||!k||O.isHiddenScrollBar)?null:o.createElement("div",{style:{height:(0,_.Z)(),width:x,bottom:h},className:"".concat(b,"-sticky-scroll")},o.createElement("div",{onMouseDown:function(e){e.persist(),R.current.delta=e.pageX-O.scrollLeft,R.current.x=0,D(!0),e.preventDefault()},ref:S,className:Z()("".concat(b,"-sticky-scroll-bar"),(0,E.Z)({},"".concat(b,"-sticky-scroll-bar-active"),T)),style:{width:"".concat(k,"px"),transform:"translate3d(".concat(O.scrollLeft,"px, 0, 0)")}}))}),eZ="rc-table",eN=[],eK={};function eO(){return"No Data"}var eI=o.forwardRef(function(e,t){var n,r=(0,C.Z)({rowKey:"key",prefixCls:eZ,emptyText:eO},e),s=r.prefixCls,u=r.className,f=r.rowClassName,m=r.style,h=r.data,v=r.rowKey,g=r.scroll,b=r.tableLayout,y=r.direction,x=r.title,S=r.footer,O=r.summary,I=r.caption,P=r.id,M=r.showHeader,T=r.components,L=r.emptyText,B=r.onRow,q=r.onHeaderRow,V=r.measureRowRender,X=r.onScroll,G=r.internalHooks,Y=r.transformColumns,$=r.internalRefs,J=r.tailor,Q=r.getContainerWidth,ee=r.sticky,eo=r.rowHoverable,er=void 0===eo||eo,ec=h||eN,ei=!!ec.length,es=G===a,ef=o.useCallback(function(e,t){return(0,K.Z)(T,e)||t},[T]),ep=o.useMemo(function(){return"function"==typeof v?v:function(e){return e&&e[v]}},[v]),em=ef(["body"]),eh=(tU=o.useState(-1),tY=(tG=(0,l.Z)(tU,2))[0],t$=tG[1],tJ=o.useState(-1),t0=(tQ=(0,l.Z)(tJ,2))[0],t1=tQ[1],[tY,t0,o.useCallback(function(e,t){t$(e),t1(t)},[])]),ev=(0,l.Z)(eh,3),eg=ev[0],ew=ev[1],ek=ev[2],eE=(t8=(t3=r.expandable,t4=(0,j.Z)(r,en),!1===(t2="expandable"in r?(0,C.Z)((0,C.Z)({},t4),t3):t4).showExpandColumn&&(t2.expandIconColumnIndex=-1),t2).expandIcon,t6=t2.expandedRowKeys,t5=t2.defaultExpandedRowKeys,t7=t2.defaultExpandAllRows,t9=t2.expandedRowRender,ne=t2.onExpand,nt=t2.onExpandedRowsChange,nn=t2.childrenColumnName||"children",no=o.useMemo(function(){return t9?"row":!!(r.expandable&&r.internalHooks===a&&r.expandable.__PARENT_RENDER_ICON__||ec.some(function(e){return e&&"object"===(0,k.Z)(e)&&e[nn]}))&&"nest"},[!!t9,ec]),nr=o.useState(function(){if(t5)return t5;if(t7){var e;return e=[],function t(n){(n||[]).forEach(function(n,o){e.push(ep(n,o)),t(n[nn])})}(ec),e}return[]}),nl=(na=(0,l.Z)(nr,2))[0],nc=na[1],ni=o.useMemo(function(){return new Set(t6||nl||[])},[t6,nl]),nd=o.useCallback(function(e){var t,n=ep(e,ec.indexOf(e)),o=ni.has(n);o?(ni.delete(n),t=(0,el.Z)(ni)):t=[].concat((0,el.Z)(ni),[n]),nc(t),ne&&ne(!o,e),nt&&nt(t)},[ep,ni,ec,ne,nt]),[t2,no,ni,t8||U,nn,nd]),eI=(0,l.Z)(eE,6),eR=eI[0],eP=eI[1],eM=eI[2],eT=eI[3],eD=eI[4],eL=eI[5],ej=null==g?void 0:g.x,eB=o.useState(0),eH=(0,l.Z)(eB,2),ez=eH[0],eA=eH[1],eW=eb((0,C.Z)((0,C.Z)((0,C.Z)({},r),eR),{},{expandable:!!eR.expandedRowRender,columnTitle:eR.columnTitle,expandedKeys:eM,getRowKey:ep,onTriggerExpand:eL,expandIcon:eT,expandIconColumnIndex:eR.expandIconColumnIndex,direction:y,scrollWidth:es&&J&&"number"==typeof ej?ej:null,clientWidth:ez}),es?Y:null),e_=(0,l.Z)(eW,4),eF=e_[0],eq=e_[1],eV=e_[2],eX=e_[3],eU=null!=eV?eV:ej,eG=o.useMemo(function(){return{columns:eF,flattenColumns:eq}},[eF,eq]),eY=o.useRef(),e$=o.useRef(),eJ=o.useRef(),eQ=o.useRef();o.useImperativeHandle(t,function(){return{nativeElement:eY.current,scrollTo:function(e){var t;if(eJ.current instanceof HTMLElement){var n=e.index,o=e.top,r=e.key;if("number"!=typeof o||Number.isNaN(o)){var a,l,c=null!=r?r:ep(ec[n]);null===(l=eJ.current.querySelector('[data-row-key="'.concat(c,'"]')))||void 0===l||l.scrollIntoView()}else null===(a=eJ.current)||void 0===a||a.scrollTo({top:o})}else null!==(t=eJ.current)&&void 0!==t&&t.scrollTo&&eJ.current.scrollTo(e)}}});var e0=o.useRef(),e1=o.useState(!1),e2=(0,l.Z)(e1,2),e3=e2[0],e4=e2[1],e8=o.useState(!1),e6=(0,l.Z)(e8,2),e5=e6[0],e7=e6[1],e9=o.useState(new Map),te=(0,l.Z)(e9,2),tt=te[0],tn=te[1],to=R(eq).map(function(e){return tt.get(e)}),tr=o.useMemo(function(){return to},[to.join("_")]),ta=(0,o.useMemo)(function(){var e=eq.length,t=function(e,t,n){for(var o=[],r=0,a=e;a!==t;a+=n)o.push(r),eq[a].fixed&&(r+=tr[a]||0);return o},n=t(0,e,1),o=t(e-1,-1,-1).reverse();return"rtl"===y?{left:o,right:n}:{left:n,right:o}},[tr,eq,y]),tl=g&&null!=g.y,tc=g&&null!=eU||!!eR.fixed,ti=tc&&eq.some(function(e){return e.fixed}),td=o.useRef(),ts=(nf=void 0===(nu=(ns="object"===(0,k.Z)(ee)?ee:{}).offsetHeader)?0:nu,nm=void 0===(np=ns.offsetSummary)?0:np,nv=void 0===(nh=ns.offsetScroll)?0:nh,nb=(void 0===(ng=ns.getContainer)?function(){return ey}:ng)()||ey,ny=!!ee,o.useMemo(function(){return{isSticky:ny,stickyClassName:ny?"".concat(s,"-sticky-holder"):"",offsetHeader:nf,offsetSummary:nm,offsetScroll:nv,container:nb}},[ny,nv,nf,nm,s,nb])),tu=ts.isSticky,tf=ts.offsetHeader,tp=ts.offsetSummary,tm=ts.offsetScroll,th=ts.stickyClassName,tv=ts.container,tg=o.useMemo(function(){return null==O?void 0:O(ec)},[O,ec]),tb=(tl||tu)&&o.isValidElement(tg)&&tg.type===H&&tg.props.fixed;tl&&(nw={overflowY:ei?"scroll":"auto",maxHeight:g.y}),tc&&(nx={overflowX:"auto"},tl||(nw={overflowY:"hidden"}),nk={width:!0===eU?"auto":eU,minWidth:"100%"});var ty=o.useCallback(function(e,t){tn(function(n){if(n.get(e)!==t){var o=new Map(n);return o.set(e,t),o}return n})},[]),tx=function(e){var t=(0,o.useRef)(null),n=(0,o.useRef)();function r(){window.clearTimeout(n.current)}return(0,o.useEffect)(function(){return r},[]),[function(e){t.current=e,r(),n.current=window.setTimeout(function(){t.current=null,n.current=void 0},100)},function(){return t.current}]}(0),tw=(0,l.Z)(tx,2),tk=tw[0],tC=tw[1];function tE(e,t){t&&("function"==typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e,t.scrollLeft!==e&&setTimeout(function(){t.scrollLeft=e},0)))}var tS=(0,c.Z)(function(e){var t,n=e.currentTarget,o=e.scrollLeft,r="rtl"===y,a="number"==typeof o?o:n.scrollLeft,l=n||eK;tC()&&tC()!==l||(tk(l),tE(a,e$.current),tE(a,eJ.current),tE(a,e0.current),tE(a,null===(t=td.current)||void 0===t?void 0:t.setScrollLeft));var c=n||e$.current;if(c){var i=es&&J&&"number"==typeof eU?eU:c.scrollWidth,d=c.clientWidth;if(i===d){e4(!1),e7(!1);return}r?(e4(-a0)):(e4(a>0),e7(a1?x-D:0,pointerEvents:"auto"}),j=o.useMemo(function(){return h?M<=1:0===R||0===M||M>1},[M,R,h]);j?L.visibility="hidden":h&&(L.height=null==v?void 0:v(M));var B={};return(0===M||0===R)&&(B.rowSpan=1,B.colSpan=1),o.createElement(T,(0,p.Z)({className:Z()(y,m),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:i,prefixCls:n.prefixCls,key:E,record:s,index:c,renderIndex:d,dataIndex:b,render:j?function(){return null}:g,shouldCellUpdate:r.shouldCellUpdate},S,{appendNode:N,additionalProps:(0,C.Z)((0,C.Z)({},K),{},{style:L},B)}))},eL=["data","index","className","rowKey","style","extra","getHeight"],ej=y(o.forwardRef(function(e,t){var n,r=e.data,a=e.index,l=e.className,c=e.rowKey,i=e.style,d=e.extra,s=e.getHeight,u=(0,j.Z)(e,eL),m=r.record,h=r.indent,v=r.index,g=f(w,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),b=g.scrollX,y=g.flattenColumns,x=g.prefixCls,k=g.fixColumn,S=g.componentWidth,N=f(eM,["getComponent"]).getComponent,K=V(m,c,a,h),O=N(["body","row"],"div"),I=N(["body","cell"],"div"),R=K.rowSupportExpand,P=K.expanded,M=K.rowProps,D=K.expandedRowRender,L=K.expandedRowClassName;if(R&&P){var B=D(m,a,h+1,P),H=G(L,m,a,h),z={};k&&(z={style:(0,E.Z)({},"--virtual-width","".concat(S,"px"))});var A="".concat(x,"-expanded-row-cell");n=o.createElement(O,{className:Z()("".concat(x,"-expanded-row"),"".concat(x,"-expanded-row-level-").concat(h+1),H)},o.createElement(T,{component:I,prefixCls:x,className:Z()(A,(0,E.Z)({},"".concat(A,"-fixed"),k)),additionalProps:z},B))}var W=(0,C.Z)((0,C.Z)({},i),{},{width:b});d&&(W.position="absolute",W.pointerEvents="none");var _=o.createElement(O,(0,p.Z)({},M,u,{"data-row-key":c,ref:R?null:t,className:Z()(l,"".concat(x,"-row"),null==M?void 0:M.className,(0,E.Z)({},"".concat(x,"-row-extra"),d)),style:(0,C.Z)((0,C.Z)({},W),null==M?void 0:M.style)}),y.map(function(e,t){return o.createElement(eD,{key:t,component:I,rowInfo:K,column:e,colIndex:t,indent:h,index:a,renderIndex:v,record:m,inverse:d,getHeight:s})}));return R?o.createElement("div",{ref:t},_,n):_})),eB=y(o.forwardRef(function(e,t){var n=e.data,r=e.onScroll,a=f(w,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),c=a.flattenColumns,i=a.onColumnResize,d=a.getRowKey,s=a.expandedKeys,u=a.prefixCls,p=a.childrenColumnName,m=a.scrollX,h=a.direction,v=f(eM),g=v.sticky,b=v.scrollY,y=v.listItemHeight,x=v.getComponent,C=v.onScroll,E=o.useRef(),S=q(n,p,s,d),Z=o.useMemo(function(){var e=0;return c.map(function(t){var n=t.width,o=t.minWidth,r=t.key,a=Math.max(n||0,o||0);return e+=a,[r,a,e]})},[c]),N=o.useMemo(function(){return Z.map(function(e){return e[2]})},[Z]);o.useEffect(function(){Z.forEach(function(e){var t=(0,l.Z)(e,2);i(t[0],t[1])})},[Z]),o.useImperativeHandle(t,function(){var e,t={scrollTo:function(e){var t;null===(t=E.current)||void 0===t||t.scrollTo(e)},nativeElement:null===(e=E.current)||void 0===e?void 0:e.nativeElement};return Object.defineProperty(t,"scrollLeft",{get:function(){var e;return(null===(e=E.current)||void 0===e?void 0:e.getScrollInfo().x)||0},set:function(e){var t;null===(t=E.current)||void 0===t||t.scrollTo({left:e})}}),Object.defineProperty(t,"scrollTop",{get:function(){var e;return(null===(e=E.current)||void 0===e?void 0:e.getScrollInfo().y)||0},set:function(e){var t;null===(t=E.current)||void 0===t||t.scrollTo({top:e})}}),t});var K=function(e,t){var n=null===(r=S[t])||void 0===r?void 0:r.record,o=e.onCell;if(o){var r,a,l=o(n,t);return null!==(a=null==l?void 0:l.rowSpan)&&void 0!==a?a:1}return 1},O=o.useMemo(function(){return{columnsOffset:N}},[N]),I="".concat(u,"-tbody"),R=x(["body","wrapper"]),P={};return g&&(P.position="sticky",P.bottom=0,"object"===(0,k.Z)(g)&&g.offsetScroll&&(P.bottom=g.offsetScroll)),o.createElement(eT.Provider,{value:O},o.createElement(eP.Z,{fullHeight:!1,ref:E,prefixCls:"".concat(I,"-virtual"),styles:{horizontalScrollBar:P},className:I,height:b,itemHeight:y||24,data:S,itemKey:function(e){return d(e.record)},component:R,scrollWidth:m,direction:h,onVirtualScroll:function(e){var t,n=e.x;r({currentTarget:null===(t=E.current)||void 0===t?void 0:t.nativeElement,scrollLeft:n})},onScroll:C,extraRender:function(e){var t=e.start,n=e.end,r=e.getSize,a=e.offsetY;if(n<0)return null;for(var l=c.filter(function(e){return 0===K(e,t)}),i=t,s=function(e){if(!(l=l.filter(function(t){return 0===K(t,e)})).length)return i=e,1},u=t;u>=0&&!s(u);u-=1);for(var f=c.filter(function(e){return 1!==K(e,n)}),p=n,m=function(e){if(!(f=f.filter(function(t){return 1!==K(t,e)})).length)return p=Math.max(e-1,n),1},h=n;h1})&&v.push(e)},b=i;b<=p;b+=1)if(g(b))continue;return v.map(function(e){var t=S[e],n=d(t.record,e),l=r(n);return o.createElement(ej,{key:e,data:t,rowKey:n,index:e,style:{top:-a+l.top},extra:!0,getHeight:function(t){var o=e+t-1,a=r(n,d(S[o].record,o));return a.bottom-a.top}})})}},function(e,t,n){var r=d(e.record,t);return o.createElement(ej,{data:e,rowKey:r,index:t,style:n.style})}))})),eH=function(e,t){var n=t.ref,r=t.onScroll;return o.createElement(eB,{ref:n,data:e,onScroll:r})},ez=o.forwardRef(function(e,t){var n=e.data,r=e.columns,l=e.scroll,c=e.sticky,i=e.prefixCls,d=void 0===i?eZ:i,s=e.className,u=e.listItemHeight,f=e.components,m=e.onScroll,h=l||{},v=h.x,g=h.y;"number"!=typeof v&&(v=1),"number"!=typeof g&&(g=500);var b=(0,P.zX)(function(e,t){return(0,K.Z)(f,e)||t}),y=(0,P.zX)(m),x=o.useMemo(function(){return{sticky:c,scrollY:g,listItemHeight:u,getComponent:b,onScroll:y}},[c,g,u,b,y]);return o.createElement(eM.Provider,{value:x},o.createElement(eR,(0,p.Z)({},e,{className:Z()(s,"".concat(d,"-virtual")),scroll:(0,C.Z)((0,C.Z)({},l),{},{x:v}),components:(0,C.Z)((0,C.Z)({},f),{},{body:null!=n&&n.length?eH:void 0}),columns:r,internalHooks:a,tailor:!0,ref:t})))});b(ez,void 0);var eA=n(70464),eW=o.createContext(null),e_=o.createContext({}),eF=o.memo(function(e){for(var t=e.prefixCls,n=e.level,r=e.isStart,a=e.isEnd,l="".concat(t,"-indent-unit"),c=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:null;return n.map(function(d,s){for(var u,f=eX(o?o.pos:"0",s),p=eU(d[a],f),m=0;m1&&void 0!==arguments[1]?arguments[1]:{},f=u.initWrapper,p=u.processEntity,m=u.onProcessFinished,h=u.externalGetKey,v=u.childrenPropName,g=u.fieldNames,b=arguments.length>2?arguments[2]:void 0,y={},x={},w={posEntities:y,keyEntities:x};return f&&(w=f(w)||w),t=function(e){var t=e.node,n=e.index,o=e.pos,r=e.key,a=e.parentPos,l=e.level,c={node:t,nodes:e.nodes,index:n,key:r,pos:o,level:l},i=eU(r,o);y[o]=c,x[i]=c,c.parent=y[a],c.parent&&(c.parent.children=c.parent.children||[],c.parent.children.push(c)),p&&p(c,w)},n={externalGetKey:h||b,childrenPropName:v,fieldNames:g},a=(r=("object"===(0,k.Z)(n)?n:{externalGetKey:n})||{}).childrenPropName,l=r.externalGetKey,i=(c=eG(r.fieldNames)).key,d=c.children,s=a||d,l?"string"==typeof l?o=function(e){return e[l]}:"function"==typeof l&&(o=function(e){return l(e)}):o=function(e,t){return eU(e[i],t)},function n(r,a,l,c){var i=r?r[s]:e,d=r?eX(l.pos,a):"0",u=r?[].concat((0,el.Z)(c),[r]):[];if(r){var f=o(r,d);t({node:r,index:a,pos:d,key:f,parentPos:l.node?l.pos:null,level:l.level+1,nodes:u})}i&&i.forEach(function(e,t){n(e,t,{node:r,pos:d,level:l?l.level+1:-1},u)})}(null),m&&m(w),w}function eQ(e,t){var n=t.expandedKeys,o=t.selectedKeys,r=t.loadedKeys,a=t.loadingKeys,l=t.checkedKeys,c=t.halfCheckedKeys,i=t.dragOverNodeKey,d=t.dropPosition,s=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==o.indexOf(e),loaded:-1!==r.indexOf(e),loading:-1!==a.indexOf(e),checked:-1!==l.indexOf(e),halfChecked:-1!==c.indexOf(e),pos:String(s?s.pos:""),dragOver:i===e&&0===d,dragOverGapTop:i===e&&-1===d,dragOverGapBottom:i===e&&1===d}}function e0(e){var t=e.data,n=e.expanded,o=e.selected,r=e.checked,a=e.loaded,l=e.loading,c=e.halfChecked,i=e.dragOver,d=e.dragOverGapTop,s=e.dragOverGapBottom,u=e.pos,f=e.active,p=e.eventKey,m=(0,C.Z)((0,C.Z)({},t),{},{expanded:n,selected:o,checked:r,loaded:a,loading:l,halfChecked:c,dragOver:i,dragOverGapTop:d,dragOverGapBottom:s,pos:u,active:f,key:p});return"props"in m||Object.defineProperty(m,"props",{get:function(){return(0,O.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}var e1=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],e2="open",e3="close",e4=function(e){var t,n,r,a=e.eventKey,c=e.className,i=e.style,d=e.dragOver,s=e.dragOverGapTop,u=e.dragOverGapBottom,f=e.isLeaf,m=e.isStart,h=e.isEnd,v=e.expanded,g=e.selected,b=e.checked,y=e.halfChecked,x=e.loading,w=e.domRef,k=e.active,S=e.data,N=e.onMouseMove,K=e.selectable,O=(0,j.Z)(e,e1),I=o.useContext(eW),R=o.useContext(e_),P=o.useRef(null),M=o.useState(!1),T=(0,l.Z)(M,2),D=T[0],L=T[1],B=!!(I.disabled||e.disabled||null!==(t=R.nodeDisabled)&&void 0!==t&&t.call(R,S)),H=o.useMemo(function(){return!!I.checkable&&!1!==e.checkable&&I.checkable},[I.checkable,e.checkable]),z=function(t){B||I.onNodeSelect(t,e0(e))},A=function(t){B||!H||e.disableCheckbox||I.onNodeCheck(t,e0(e),!b)},W=o.useMemo(function(){return"boolean"==typeof K?K:I.selectable},[K,I.selectable]),_=function(t){I.onNodeClick(t,e0(e)),W?z(t):A(t)},q=function(t){I.onNodeDoubleClick(t,e0(e))},V=function(t){I.onNodeMouseEnter(t,e0(e))},X=function(t){I.onNodeMouseLeave(t,e0(e))},U=function(t){I.onNodeContextMenu(t,e0(e))},G=o.useMemo(function(){return!!(I.draggable&&(!I.draggable.nodeDraggable||I.draggable.nodeDraggable(S)))},[I.draggable,S]),Y=function(t){x||I.onNodeExpand(t,e0(e))},$=o.useMemo(function(){return!!((I.keyEntities[a]||{}).children||[]).length},[I.keyEntities,a]),J=o.useMemo(function(){return!1!==f&&(f||!I.loadData&&!$||I.loadData&&e.loaded&&!$)},[f,I.loadData,$,e.loaded]);o.useEffect(function(){!x&&("function"!=typeof I.loadData||!v||J||e.loaded||I.onNodeLoad(e0(e)))},[x,I.loadData,I.onNodeLoad,v,J,e]);var Q=o.useMemo(function(){var e;return null!==(e=I.draggable)&&void 0!==e&&e.icon?o.createElement("span",{className:"".concat(I.prefixCls,"-draggable-icon")},I.draggable.icon):null},[I.draggable]),ee=function(t){var n=e.switcherIcon||I.switcherIcon;return"function"==typeof n?n((0,C.Z)((0,C.Z)({},e),{},{isLeaf:t})):n},et=o.useMemo(function(){if(!H)return null;var t="boolean"!=typeof H?H:null;return o.createElement("span",{className:Z()("".concat(I.prefixCls,"-checkbox"),(0,E.Z)((0,E.Z)((0,E.Z)({},"".concat(I.prefixCls,"-checkbox-checked"),b),"".concat(I.prefixCls,"-checkbox-indeterminate"),!b&&y),"".concat(I.prefixCls,"-checkbox-disabled"),B||e.disableCheckbox)),onClick:A,role:"checkbox","aria-checked":y?"mixed":b,"aria-disabled":B||e.disableCheckbox,"aria-label":"Select ".concat("string"==typeof e.title?e.title:"tree node")},t)},[H,b,y,B,e.disableCheckbox,e.title]),en=o.useMemo(function(){return J?null:v?e2:e3},[J,v]),eo=o.useMemo(function(){return o.createElement("span",{className:Z()("".concat(I.prefixCls,"-iconEle"),"".concat(I.prefixCls,"-icon__").concat(en||"docu"),(0,E.Z)({},"".concat(I.prefixCls,"-icon_loading"),x))})},[I.prefixCls,en,x]),er=o.useMemo(function(){var t=!!I.draggable;return!e.disabled&&t&&I.dragOverNodeKey===a?I.dropIndicatorRender({dropPosition:I.dropPosition,dropLevelOffset:I.dropLevelOffset,indent:I.indent,prefixCls:I.prefixCls,direction:I.direction}):null},[I.dropPosition,I.dropLevelOffset,I.indent,I.prefixCls,I.direction,I.draggable,I.dragOverNodeKey,I.dropIndicatorRender]),ea=o.useMemo(function(){var t,n,r=e.title,a=void 0===r?"---":r,l="".concat(I.prefixCls,"-node-content-wrapper");if(I.showIcon){var c=e.icon||I.icon;t=c?o.createElement("span",{className:Z()("".concat(I.prefixCls,"-iconEle"),"".concat(I.prefixCls,"-icon__customize"))},"function"==typeof c?c(e):c):eo}else I.loadData&&x&&(t=eo);return n="function"==typeof a?a(S):I.titleRender?I.titleRender(S):a,o.createElement("span",{ref:P,title:"string"==typeof a?a:"",className:Z()(l,"".concat(l,"-").concat(en||"normal"),(0,E.Z)({},"".concat(I.prefixCls,"-node-selected"),!B&&(g||D))),onMouseEnter:V,onMouseLeave:X,onContextMenu:U,onClick:_,onDoubleClick:q},t,o.createElement("span",{className:"".concat(I.prefixCls,"-title")},n),er)},[I.prefixCls,I.showIcon,e,I.icon,eo,I.titleRender,S,en,V,X,U,_,q]),el=(0,F.Z)(O,{aria:!0,data:!0}),ec=(I.keyEntities[a]||{}).level,ei=h[h.length-1],ed=!B&&G,es=I.draggingNodeKey===a;return o.createElement("div",(0,p.Z)({ref:w,role:"treeitem","aria-expanded":f?void 0:v,className:Z()(c,"".concat(I.prefixCls,"-treenode"),(r={},(0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)(r,"".concat(I.prefixCls,"-treenode-disabled"),B),"".concat(I.prefixCls,"-treenode-switcher-").concat(v?"open":"close"),!f),"".concat(I.prefixCls,"-treenode-checkbox-checked"),b),"".concat(I.prefixCls,"-treenode-checkbox-indeterminate"),y),"".concat(I.prefixCls,"-treenode-selected"),g),"".concat(I.prefixCls,"-treenode-loading"),x),"".concat(I.prefixCls,"-treenode-active"),k),"".concat(I.prefixCls,"-treenode-leaf-last"),ei),"".concat(I.prefixCls,"-treenode-draggable"),G),"dragging",es),(0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)((0,E.Z)(r,"drop-target",I.dropTargetKey===a),"drop-container",I.dropContainerKey===a),"drag-over",!B&&d),"drag-over-gap-top",!B&&s),"drag-over-gap-bottom",!B&&u),"filter-node",null===(n=I.filterTreeNode)||void 0===n?void 0:n.call(I,e0(e))),"".concat(I.prefixCls,"-treenode-leaf"),J))),style:i,draggable:ed,onDragStart:ed?function(t){t.stopPropagation(),L(!0),I.onNodeDragStart(t,e);try{t.dataTransfer.setData("text/plain","")}catch(e){}}:void 0,onDragEnter:G?function(t){t.preventDefault(),t.stopPropagation(),I.onNodeDragEnter(t,e)}:void 0,onDragOver:G?function(t){t.preventDefault(),t.stopPropagation(),I.onNodeDragOver(t,e)}:void 0,onDragLeave:G?function(t){t.stopPropagation(),I.onNodeDragLeave(t,e)}:void 0,onDrop:G?function(t){t.preventDefault(),t.stopPropagation(),L(!1),I.onNodeDrop(t,e)}:void 0,onDragEnd:G?function(t){t.stopPropagation(),L(!1),I.onNodeDragEnd(t,e)}:void 0,onMouseMove:N},void 0!==K?{"aria-selected":!!K}:void 0,el),o.createElement(eF,{prefixCls:I.prefixCls,level:ec,isStart:m,isEnd:h}),Q,function(){if(J){var e=ee(!0);return!1!==e?o.createElement("span",{className:Z()("".concat(I.prefixCls,"-switcher"),"".concat(I.prefixCls,"-switcher-noop"))},e):null}var t=ee(!1);return!1!==t?o.createElement("span",{onClick:Y,className:Z()("".concat(I.prefixCls,"-switcher"),"".concat(I.prefixCls,"-switcher_").concat(v?e2:e3))},t):null}(),et,ea)};function e8(e,t){if(!e)return[];var n=e.slice(),o=n.indexOf(t);return o>=0&&n.splice(o,1),n}function e6(e,t){var n=(e||[]).slice();return -1===n.indexOf(t)&&n.push(t),n}function e5(e){return e.split("-")}function e7(e,t,n,o,r,a,l,c,i,d){var s,u,f=e.clientX,p=e.clientY,m=e.target.getBoundingClientRect(),h=m.top,v=m.height,g=(("rtl"===d?-1:1)*(((null==r?void 0:r.x)||0)-f)-12)/o,b=i.filter(function(e){var t;return null===(t=c[e])||void 0===t||null===(t=t.children)||void 0===t?void 0:t.length}),y=c[n.eventKey];if(p-1.5?a({dragNode:N,dropNode:K,dropPosition:1})?E=1:O=!1:a({dragNode:N,dropNode:K,dropPosition:0})?E=0:a({dragNode:N,dropNode:K,dropPosition:1})?E=1:O=!1:a({dragNode:N,dropNode:K,dropPosition:1})?E=1:O=!1,{dropPosition:E,dropLevelOffset:S,dropTargetKey:y.key,dropTargetPos:y.pos,dragOverNodeKey:C,dropContainerKey:0===E?null:(null===(u=y.parent)||void 0===u?void 0:u.key)||null,dropAllowed:O}}function e9(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function te(e){var t;if(!e)return null;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==(0,k.Z)(e))return(0,O.ZP)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function tt(e,t){var n=new Set;return(e||[]).forEach(function(e){!function e(o){if(!n.has(o)){var r=t[o];if(r){n.add(o);var a=r.parent;!r.node.disabled&&a&&e(a.key)}}}(e)}),(0,el.Z)(n)}function tn(e,t){var n=new Set;return e.forEach(function(e){t.has(e)||n.add(e)}),n}function to(e){var t=e||{},n=t.disabled,o=t.disableCheckbox,r=t.checkable;return!!(n||o)||!1===r}function tr(e,t,n,o){var r,a=[];r=o||to;var l=new Set(e.filter(function(e){var t=!!n[e];return t||a.push(e),t})),c=new Map,i=0;return Object.keys(n).forEach(function(e){var t=n[e],o=t.level,r=c.get(o);r||(r=new Set,c.set(o,r)),r.add(t),i=Math.max(i,o)}),(0,O.ZP)(!a.length,"Tree missing follow keys: ".concat(a.slice(0,100).map(function(e){return"'".concat(e,"'")}).join(", "))),!0===t?function(e,t,n,o){for(var r=new Set(e),a=new Set,l=0;l<=n;l+=1)(t.get(l)||new Set).forEach(function(e){var t=e.key,n=e.node,a=e.children,l=void 0===a?[]:a;r.has(t)&&!o(n)&&l.filter(function(e){return!o(e.node)}).forEach(function(e){r.add(e.key)})});for(var c=new Set,i=n;i>=0;i-=1)(t.get(i)||new Set).forEach(function(e){var t=e.parent;if(!(o(e.node)||!e.parent||c.has(e.parent.key))){if(o(e.parent.node)){c.add(t.key);return}var n=!0,l=!1;(t.children||[]).filter(function(e){return!o(e.node)}).forEach(function(e){var t=e.key,o=r.has(t);n&&!o&&(n=!1),!l&&(o||a.has(t))&&(l=!0)}),n&&r.add(t.key),l&&a.add(t.key),c.add(t.key)}});return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(tn(a,r))}}(l,c,i,r):function(e,t,n,o,r){for(var a=new Set(e),l=new Set(t),c=0;c<=o;c+=1)(n.get(c)||new Set).forEach(function(e){var t=e.key,n=e.node,o=e.children,c=void 0===o?[]:o;a.has(t)||l.has(t)||r(n)||c.filter(function(e){return!r(e.node)}).forEach(function(e){a.delete(e.key)})});l=new Set;for(var i=new Set,d=o;d>=0;d-=1)(n.get(d)||new Set).forEach(function(e){var t=e.parent;if(!(r(e.node)||!e.parent||i.has(e.parent.key))){if(r(e.parent.node)){i.add(t.key);return}var n=!0,o=!1;(t.children||[]).filter(function(e){return!r(e.node)}).forEach(function(e){var t=e.key,r=a.has(t);n&&!r&&(n=!1),!o&&(r||l.has(t))&&(o=!0)}),n||a.delete(t.key),o&&l.add(t.key),i.add(t.key)}});return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(tn(l,a))}}(l,t.halfCheckedKeys,c,i,r)}e4.isTreeNode=1;var ta=n(50506);let tl=e=>{let[t,n]=(0,o.useState)(null);return[(0,o.useCallback)((o,r,a)=>{let l=null!=t?t:o,c=Math.max(l||0,o),i=r.slice(Math.min(l||0,o),c+1).map(e),d=i.some(e=>!a.has(e)),s=[];return i.forEach(e=>{d?(a.has(e)||s.push(e),a.add(e)):(a.delete(e),s.push(e))}),n(d?c:null),s},[t]),n]};var tc=n(13613),ti=n(4156),td=n(73705),ts=n(29967);let tu={},tf="SELECT_ALL",tp="SELECT_INVERT",tm="SELECT_NONE",th=[],tv=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(t||[]).forEach(t=>{n.push(t),t&&"object"==typeof t&&e in t&&tv(e,t[e],n)}),n};var tg=(e,t)=>{let{preserveSelectedRowKeys:n,selectedRowKeys:r,defaultSelectedRowKeys:a,getCheckboxProps:l,getTitleCheckboxProps:c,onChange:i,onSelect:d,onSelectAll:s,onSelectInvert:u,onSelectNone:f,onSelectMultiple:p,columnWidth:m,type:h,selections:v,fixed:g,renderCell:b,hideSelectAll:y,checkStrictly:x=!0}=t||{},{prefixCls:w,data:k,pageData:C,getRecordByKey:E,getRowKey:S,expandType:N,childrenColumnName:K,locale:O,getPopupContainer:I}=e,R=(0,tc.ln)("Table"),[P,M]=tl(e=>e),[T,D]=(0,ta.Z)(r||a||th,{value:r}),L=o.useRef(new Map),j=(0,o.useCallback)(e=>{if(n){let t=new Map;e.forEach(e=>{let n=E(e);!n&&L.current.has(e)&&(n=L.current.get(e)),t.set(e,n)}),L.current=t}},[E,n]);o.useEffect(()=>{j(T)},[T]);let B=(0,o.useMemo)(()=>tv(K,C),[K,C]),{keyEntities:H}=(0,o.useMemo)(()=>{if(x)return{keyEntities:null};let e=k;if(n){let t=new Set(B.map((e,t)=>S(e,t))),n=Array.from(L.current).reduce((e,n)=>{let[o,r]=n;return t.has(o)?e:e.concat(r)},[]);e=[].concat((0,el.Z)(e),(0,el.Z)(n))}return eJ(e,{externalGetKey:S,childrenPropName:K})},[k,S,x,K,n,B]),z=(0,o.useMemo)(()=>{let e=new Map;return B.forEach((t,n)=>{let o=S(t,n),r=(l?l(t):null)||{};e.set(o,r)}),e},[B,S,l]),A=(0,o.useCallback)(e=>{let t;let n=S(e);return!!(null==(t=z.has(n)?z.get(S(e)):l?l(e):void 0)?void 0:t.disabled)},[z,S]),[W,_]=(0,o.useMemo)(()=>{if(x)return[T||[],[]];let{checkedKeys:e,halfCheckedKeys:t}=tr(T,!0,H,A);return[e||[],t]},[T,x,H,A]),F=(0,o.useMemo)(()=>new Set("radio"===h?W.slice(0,1):W),[W,h]),q=(0,o.useMemo)(()=>"radio"===h?new Set:new Set(_),[_,h]);o.useEffect(()=>{t||D(th)},[!!t]);let V=(0,o.useCallback)((e,t)=>{let o,r;j(e),n?(o=e,r=e.map(e=>L.current.get(e))):(o=[],r=[],e.forEach(e=>{let t=E(e);void 0!==t&&(o.push(e),r.push(t))})),D(o),null==i||i(o,r,{type:t})},[D,E,i,n]),X=(0,o.useCallback)((e,t,n,o)=>{if(d){let r=n.map(e=>E(e));d(E(e),t,r,o)}V(n,"single")},[d,E,V]),U=(0,o.useMemo)(()=>!v||y?null:(!0===v?[tf,tp,tm]:v).map(e=>e===tf?{key:"all",text:O.selectionAll,onSelect(){V(k.map((e,t)=>S(e,t)).filter(e=>{let t=z.get(e);return!(null==t?void 0:t.disabled)||F.has(e)}),"all")}}:e===tp?{key:"invert",text:O.selectInvert,onSelect(){let e=new Set(F);C.forEach((t,n)=>{let o=S(t,n),r=z.get(o);(null==r?void 0:r.disabled)||(e.has(o)?e.delete(o):e.add(o))});let t=Array.from(e);u&&(R.deprecated(!1,"onSelectInvert","onChange"),u(t)),V(t,"invert")}}:e===tm?{key:"none",text:O.selectNone,onSelect(){null==f||f(),V(Array.from(F).filter(e=>{let t=z.get(e);return null==t?void 0:t.disabled}),"none")}}:e).map(e=>Object.assign(Object.assign({},e),{onSelect:function(){for(var t,n=arguments.length,o=Array(n),r=0;r{var n;let r,a,l;if(!t)return e.filter(e=>e!==tu);let i=(0,el.Z)(e),d=new Set(F),u=B.map(S).filter(e=>!z.get(e).disabled),f=u.every(e=>d.has(e)),k=u.some(e=>d.has(e)),C=()=>{let e=[];f?u.forEach(t=>{d.delete(t),e.push(t)}):u.forEach(t=>{d.has(t)||(d.add(t),e.push(t))});let t=Array.from(d);null==s||s(!f,t.map(e=>E(e)),e.map(e=>E(e))),V(t,"all"),M(null)};if("radio"!==h){let e;if(U){let t={getPopupContainer:I,items:U.map((e,t)=>{let{key:n,text:o,onSelect:r}=e;return{key:null!=n?n:t,onClick:()=>{null==r||r(u)},label:o}})};e=o.createElement("div",{className:"".concat(w,"-selection-extra")},o.createElement(td.Z,{menu:t,getPopupContainer:I},o.createElement("span",null,o.createElement(eA.Z,null))))}let t=B.map((e,t)=>{let n=S(e,t),o=z.get(n)||{};return Object.assign({checked:d.has(n)},o)}).filter(e=>{let{disabled:t}=e;return t}),n=!!t.length&&t.length===B.length,l=n&&t.every(e=>{let{checked:t}=e;return t}),i=n&&t.some(e=>{let{checked:t}=e;return t}),s=(null==c?void 0:c())||{},{onChange:p,disabled:m}=s;a=o.createElement(ti.Z,Object.assign({"aria-label":e?"Custom selection":"Select all"},s,{checked:n?l:!!B.length&&f,indeterminate:n?!l&&i:!f&&k,onChange:e=>{C(),null==p||p(e)},disabled:null!=m?m:0===B.length||n,skipGroup:!0})),r=!y&&o.createElement("div",{className:"".concat(w,"-selection")},a,e)}if(l="radio"===h?(e,t,n)=>{let r=S(t,n),a=d.has(r),l=z.get(r);return{node:o.createElement(ts.ZP,Object.assign({},l,{checked:a,onClick:e=>{var t;e.stopPropagation(),null===(t=null==l?void 0:l.onClick)||void 0===t||t.call(l,e)},onChange:e=>{var t;d.has(r)||X(r,!0,[r],e.nativeEvent),null===(t=null==l?void 0:l.onChange)||void 0===t||t.call(l,e)}})),checked:a}}:(e,t,n)=>{var r;let a;let l=S(t,n),c=d.has(l),i=q.has(l),s=z.get(l);return a="nest"===N?i:null!==(r=null==s?void 0:s.indeterminate)&&void 0!==r?r:i,{node:o.createElement(ti.Z,Object.assign({},s,{indeterminate:a,checked:c,skipGroup:!0,onClick:e=>{var t;e.stopPropagation(),null===(t=null==s?void 0:s.onClick)||void 0===t||t.call(s,e)},onChange:e=>{var t;let{nativeEvent:n}=e,{shiftKey:o}=n,r=u.indexOf(l),a=W.some(e=>u.includes(e));if(o&&x&&a){let e=P(r,u,d),t=Array.from(d);null==p||p(!c,t.map(e=>E(e)),e.map(e=>E(e))),V(t,"multiple")}else if(x){let e=c?e8(W,l):e6(W,l);X(l,!c,e,n)}else{let{checkedKeys:e,halfCheckedKeys:t}=tr([].concat((0,el.Z)(W),[l]),!0,H,A),o=e;if(c){let n=new Set(e);n.delete(l),o=tr(Array.from(n),{checked:!1,halfCheckedKeys:t},H,A).checkedKeys}X(l,!c,o,n)}c?M(null):M(r),null===(t=null==s?void 0:s.onChange)||void 0===t||t.call(s,e)}})),checked:c}},!i.includes(tu)){if(0===i.findIndex(e=>{var t;return(null===(t=e[eo])||void 0===t?void 0:t.columnType)==="EXPAND_COLUMN"})){let[e,...t]=i;i=[e,tu].concat((0,el.Z)(t))}else i=[tu].concat((0,el.Z)(i))}let K=i.indexOf(tu),O=(i=i.filter((e,t)=>e!==tu||t===K))[K-1],R=i[K+1],T=g;void 0===T&&((null==R?void 0:R.fixed)!==void 0?T=R.fixed:(null==O?void 0:O.fixed)!==void 0&&(T=O.fixed)),T&&O&&(null===(n=O[eo])||void 0===n?void 0:n.columnType)==="EXPAND_COLUMN"&&void 0===O.fixed&&(O.fixed=T);let D=Z()("".concat(w,"-selection-col"),{["".concat(w,"-selection-col-with-dropdown")]:v&&"checkbox"===h}),L={fixed:T,width:m,className:"".concat(w,"-selection-column"),title:(null==t?void 0:t.columnTitle)?"function"==typeof t.columnTitle?t.columnTitle(a):t.columnTitle:r,render:(e,t,n)=>{let{node:o,checked:r}=l(e,t,n);return b?b(r,t,n,o):o},onCell:t.onCell,align:t.align,[eo]:{className:D}};return i.map(e=>e===tu?L:e)},[S,B,t,W,F,q,m,U,N,z,p,X,A]),F]};let tb=(e,t)=>(0,o.useImperativeHandle)(e,()=>{let e=t(),{nativeElement:n}=e;return"undefined"!=typeof Proxy?new Proxy(n,{get:(t,n)=>e[n]?e[n]:Reflect.get(t,n)}):(n._antProxy=n._antProxy||{},Object.keys(e).forEach(t=>{if(!(t in n._antProxy)){let o=n[t];n._antProxy[t]=o,n[t]=e[t]}}),n)});function ty(e){return null!=e&&e===e.window}var tx=e=>{var t,n;if("undefined"==typeof window)return 0;let o=0;return ty(e)?o=e.pageYOffset:e instanceof Document?o=e.documentElement.scrollTop:e instanceof HTMLElement?o=e.scrollTop:e&&(o=e.scrollTop),e&&!ty(e)&&"number"!=typeof o&&(o=null===(n=(null!==(t=e.ownerDocument)&&void 0!==t?t:e).documentElement)||void 0===n?void 0:n.scrollTop),o},tw=n(18310),tk=n(71744),tC=n(91086),tE=n(64024),tS=n(33759),tZ=n(28617),tN=n(37381),tK=n(40049),tO=n(10353),tI=n(91691);let tR=(e,t)=>"key"in e&&void 0!==e.key&&null!==e.key?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function tP(e,t){return t?"".concat(t,"-").concat(e):"".concat(e)}let tM=(e,t)=>"function"==typeof e?e(t):e,tT=(e,t)=>{let n=tM(e,t);return"[object Object]"===Object.prototype.toString.call(n)?"":n};var tD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},tL=n(55015),tj=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:tD}))}),tB=n(53253),tH=n(51646);let tz=e=>{let t=o.useRef(e),[,n]=(0,tH.N)();return[()=>t.current,e=>{t.current=e,n()}]};var tA=n(5545),tW=n(85180),t_=n(60985),tF=n(88208),tq=n(76405),tV=n(25049),tX=n(63496),tU=n(41690),tG=n(15900),tY=n(95814);function t$(e){if(null==e)throw TypeError("Cannot destructure "+e)}var tJ=n(66632),tQ=function(e,t){var n=o.useState(!1),r=(0,l.Z)(n,2),a=r[0],c=r[1];(0,i.Z)(function(){if(a)return e(),function(){t()}},[a]),(0,i.Z)(function(){return c(!0),function(){c(!1)}},[])},t0=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],t1=o.forwardRef(function(e,t){var n=e.className,r=e.style,a=e.motion,c=e.motionNodes,d=e.motionType,s=e.onMotionStart,u=e.onMotionEnd,f=e.active,m=e.treeNodeRequiredProps,h=(0,j.Z)(e,t0),v=o.useState(!0),g=(0,l.Z)(v,2),b=g[0],y=g[1],x=o.useContext(eW).prefixCls,w=c&&"hide"!==d;(0,i.Z)(function(){c&&w!==b&&y(w)},[c]);var k=o.useRef(!1),C=function(){c&&!k.current&&(k.current=!0,u())};return(tQ(function(){c&&s()},C),c)?o.createElement(tJ.ZP,(0,p.Z)({ref:t,visible:b},a,{motionAppear:"show"===d,onVisibleChanged:function(e){w===e&&C()}}),function(e,t){var n=e.className,r=e.style;return o.createElement("div",{ref:t,className:Z()("".concat(x,"-treenode-motion"),n),style:r},c.map(function(e){var t=Object.assign({},(t$(e.data),e.data)),n=e.title,r=e.key,a=e.isStart,l=e.isEnd;delete t.children;var c=eQ(r,m);return o.createElement(e4,(0,p.Z)({},t,c,{title:n,active:f,data:e.data,key:r,isStart:a,isEnd:l}))}))}):o.createElement(e4,(0,p.Z)({domRef:t,className:n,style:r},h,{active:f}))});function t2(e,t,n){var o=e.findIndex(function(e){return e.key===n}),r=e[o+1],a=t.findIndex(function(e){return e.key===n});if(r){var l=t.findIndex(function(e){return e.key===r.key});return t.slice(a+1,l)}return t.slice(a+1)}var t3=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],t4={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},t8=function(){},t6="RC_TREE_MOTION_".concat(Math.random()),t5={key:t6},t7={key:t6,level:0,index:0,pos:"0",node:t5,nodes:[t5]},t9={parent:null,children:[],pos:t7.pos,data:t5,title:null,key:t6,isStart:[],isEnd:[]};function ne(e,t,n,o){return!1!==t&&n?e.slice(0,Math.ceil(n/o)+1):e}function nt(e){return eU(e.key,e.pos)}var nn=o.forwardRef(function(e,t){var n=e.prefixCls,r=e.data,a=(e.selectable,e.checkable,e.expandedKeys),c=e.selectedKeys,d=e.checkedKeys,s=e.loadedKeys,u=e.loadingKeys,f=e.halfCheckedKeys,m=e.keyEntities,h=e.disabled,v=e.dragging,g=e.dragOverNodeKey,b=e.dropPosition,y=e.motion,x=e.height,w=e.itemHeight,k=e.virtual,C=e.scrollWidth,E=e.focusable,S=e.activeItem,Z=e.focused,N=e.tabIndex,K=e.onKeyDown,O=e.onFocus,I=e.onBlur,R=e.onActiveChange,P=e.onListChangeStart,M=e.onListChangeEnd,T=(0,j.Z)(e,t3),D=o.useRef(null),L=o.useRef(null);o.useImperativeHandle(t,function(){return{scrollTo:function(e){D.current.scrollTo(e)},getIndentWidth:function(){return L.current.offsetWidth}}});var B=o.useState(a),H=(0,l.Z)(B,2),z=H[0],A=H[1],W=o.useState(r),_=(0,l.Z)(W,2),F=_[0],q=_[1],V=o.useState(r),X=(0,l.Z)(V,2),U=X[0],G=X[1],Y=o.useState([]),$=(0,l.Z)(Y,2),J=$[0],Q=$[1],ee=o.useState(null),et=(0,l.Z)(ee,2),en=et[0],eo=et[1],er=o.useRef(r);function ea(){var e=er.current;q(e),G(e),Q([]),eo(null),M()}er.current=r,(0,i.Z)(function(){A(a);var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.length,o=t.length;if(1!==Math.abs(n-o))return{add:!1,key:null};function r(e,t){var n=new Map;e.forEach(function(e){n.set(e,!0)});var o=t.filter(function(e){return!n.has(e)});return 1===o.length?o[0]:null}return n ").concat(t);return t}(S)),o.createElement("div",null,o.createElement("input",{style:t4,disabled:!1===E||h,tabIndex:!1!==E?N:null,onKeyDown:K,onFocus:O,onBlur:I,value:"",onChange:t8,"aria-label":"for screen reader"})),o.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},o.createElement("div",{className:"".concat(n,"-indent")},o.createElement("div",{ref:L,className:"".concat(n,"-indent-unit")}))),o.createElement(eP.Z,(0,p.Z)({},T,{data:el,itemKey:nt,height:x,fullHeight:!1,virtual:k,itemHeight:w,scrollWidth:C,prefixCls:"".concat(n,"-list"),ref:D,role:"tree",onVisibleChange:function(e){e.every(function(e){return nt(e)!==t6})&&ea()}}),function(e){var t=e.pos,n=Object.assign({},(t$(e.data),e.data)),r=e.title,a=e.key,l=e.isStart,c=e.isEnd,i=eU(a,t);delete n.key,delete n.children;var d=eQ(i,ec);return o.createElement(t1,(0,p.Z)({},n,d,{title:r,active:!!S&&a===S.key,pos:t,data:e.data,isStart:l,isEnd:c,motion:y,motionNodes:a===t6?J:null,motionType:en,onMotionStart:P,onMotionEnd:ea,treeNodeRequiredProps:ec,onMouseMove:function(){R(null)}}))}))}),no=function(e){(0,tU.Z)(n,e);var t=(0,tG.Z)(n);function n(){var e;(0,tq.Z)(this,n);for(var r=arguments.length,a=Array(r),l=0;l0&&void 0!==arguments[0]?arguments[0]:[];t.forEach(function(t){var n=t.key,r=t.children;o.push(n),e(r)})}(l[i].children),o),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(d),window.addEventListener("dragend",e.onWindowDragEnd),null==c||c({event:t,node:e0(n)})}),(0,E.Z)((0,tX.Z)(e),"onNodeDragEnter",function(t,n){var o=e.state,r=o.expandedKeys,a=o.keyEntities,l=o.dragChildrenKeys,c=o.flattenNodes,i=o.indent,d=e.props,s=d.onDragEnter,u=d.onExpand,f=d.allowDrop,p=d.direction,m=n.pos,h=n.eventKey;if(e.currentMouseOverDroppableNodeKey!==h&&(e.currentMouseOverDroppableNodeKey=h),!e.dragNodeProps){e.resetDragState();return}var v=e7(t,e.dragNodeProps,n,i,e.dragStartMousePosition,f,c,a,r,p),g=v.dropPosition,b=v.dropLevelOffset,y=v.dropTargetKey,x=v.dropContainerKey,w=v.dropTargetPos,k=v.dropAllowed,C=v.dragOverNodeKey;if(l.includes(y)||!k||(e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach(function(t){clearTimeout(e.delayedDragEnterLogic[t])}),e.dragNodeProps.eventKey!==n.eventKey&&(t.persist(),e.delayedDragEnterLogic[m]=window.setTimeout(function(){if(null!==e.state.draggingNodeKey){var o=(0,el.Z)(r),l=a[n.eventKey];l&&(l.children||[]).length&&(o=e6(r,n.eventKey)),e.props.hasOwnProperty("expandedKeys")||e.setExpandedKeys(o),null==u||u(o,{node:e0(n),expanded:!0,nativeEvent:t.nativeEvent})}},800)),e.dragNodeProps.eventKey===y&&0===b)){e.resetDragState();return}e.setState({dragOverNodeKey:C,dropPosition:g,dropLevelOffset:b,dropTargetKey:y,dropContainerKey:x,dropTargetPos:w,dropAllowed:k}),null==s||s({event:t,node:e0(n),expandedKeys:r})}),(0,E.Z)((0,tX.Z)(e),"onNodeDragOver",function(t,n){var o=e.state,r=o.dragChildrenKeys,a=o.flattenNodes,l=o.keyEntities,c=o.expandedKeys,i=o.indent,d=e.props,s=d.onDragOver,u=d.allowDrop,f=d.direction;if(e.dragNodeProps){var p=e7(t,e.dragNodeProps,n,i,e.dragStartMousePosition,u,a,l,c,f),m=p.dropPosition,h=p.dropLevelOffset,v=p.dropTargetKey,g=p.dropContainerKey,b=p.dropTargetPos,y=p.dropAllowed,x=p.dragOverNodeKey;!r.includes(v)&&y&&(e.dragNodeProps.eventKey===v&&0===h?null===e.state.dropPosition&&null===e.state.dropLevelOffset&&null===e.state.dropTargetKey&&null===e.state.dropContainerKey&&null===e.state.dropTargetPos&&!1===e.state.dropAllowed&&null===e.state.dragOverNodeKey||e.resetDragState():m===e.state.dropPosition&&h===e.state.dropLevelOffset&&v===e.state.dropTargetKey&&g===e.state.dropContainerKey&&b===e.state.dropTargetPos&&y===e.state.dropAllowed&&x===e.state.dragOverNodeKey||e.setState({dropPosition:m,dropLevelOffset:h,dropTargetKey:v,dropContainerKey:g,dropTargetPos:b,dropAllowed:y,dragOverNodeKey:x}),null==s||s({event:t,node:e0(n)}))}}),(0,E.Z)((0,tX.Z)(e),"onNodeDragLeave",function(t,n){e.currentMouseOverDroppableNodeKey!==n.eventKey||t.currentTarget.contains(t.relatedTarget)||(e.resetDragState(),e.currentMouseOverDroppableNodeKey=null);var o=e.props.onDragLeave;null==o||o({event:t,node:e0(n)})}),(0,E.Z)((0,tX.Z)(e),"onWindowDragEnd",function(t){e.onNodeDragEnd(t,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)}),(0,E.Z)((0,tX.Z)(e),"onNodeDragEnd",function(t,n){var o=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),null==o||o({event:t,node:e0(n)}),e.dragNodeProps=null,window.removeEventListener("dragend",e.onWindowDragEnd)}),(0,E.Z)((0,tX.Z)(e),"onNodeDrop",function(t,n){var o,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=e.state,l=a.dragChildrenKeys,c=a.dropPosition,i=a.dropTargetKey,d=a.dropTargetPos;if(a.dropAllowed){var s=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),null!==i){var u=(0,C.Z)((0,C.Z)({},eQ(i,e.getTreeNodeRequiredProps())),{},{active:(null===(o=e.getActiveItem())||void 0===o?void 0:o.key)===i,data:e.state.keyEntities[i].node}),f=l.includes(i);(0,O.ZP)(!f,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var p=e5(d),m={event:t,node:e0(u),dragNode:e.dragNodeProps?e0(e.dragNodeProps):null,dragNodesKeys:[e.dragNodeProps.eventKey].concat(l),dropToGap:0!==c,dropPosition:c+Number(p[p.length-1])};r||null==s||s(m),e.dragNodeProps=null}}}),(0,E.Z)((0,tX.Z)(e),"cleanDragState",function(){null!==e.state.draggingNodeKey&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null}),(0,E.Z)((0,tX.Z)(e),"triggerExpandActionExpand",function(t,n){var o=e.state,r=o.expandedKeys,a=o.flattenNodes,l=n.expanded,c=n.key;if(!n.isLeaf&&!t.shiftKey&&!t.metaKey&&!t.ctrlKey){var i=a.filter(function(e){return e.key===c})[0],d=e0((0,C.Z)((0,C.Z)({},eQ(c,e.getTreeNodeRequiredProps())),{},{data:i.data}));e.setExpandedKeys(l?e8(r,c):e6(r,c)),e.onNodeExpand(t,d)}}),(0,E.Z)((0,tX.Z)(e),"onNodeClick",function(t,n){var o=e.props,r=o.onClick;"click"===o.expandAction&&e.triggerExpandActionExpand(t,n),null==r||r(t,n)}),(0,E.Z)((0,tX.Z)(e),"onNodeDoubleClick",function(t,n){var o=e.props,r=o.onDoubleClick;"doubleClick"===o.expandAction&&e.triggerExpandActionExpand(t,n),null==r||r(t,n)}),(0,E.Z)((0,tX.Z)(e),"onNodeSelect",function(t,n){var o=e.state.selectedKeys,r=e.state,a=r.keyEntities,l=r.fieldNames,c=e.props,i=c.onSelect,d=c.multiple,s=n.selected,u=n[l.key],f=!s,p=(o=f?d?e6(o,u):[u]:e8(o,u)).map(function(e){var t=a[e];return t?t.node:null}).filter(Boolean);e.setUncontrolledState({selectedKeys:o}),null==i||i(o,{event:"select",selected:f,node:n,selectedNodes:p,nativeEvent:t.nativeEvent})}),(0,E.Z)((0,tX.Z)(e),"onNodeCheck",function(t,n,o){var r,a=e.state,l=a.keyEntities,c=a.checkedKeys,i=a.halfCheckedKeys,d=e.props,s=d.checkStrictly,u=d.onCheck,f=n.key,p={event:"check",node:n,checked:o,nativeEvent:t.nativeEvent};if(s){var m=o?e6(c,f):e8(c,f);r={checked:m,halfChecked:e8(i,f)},p.checkedNodes=m.map(function(e){return l[e]}).filter(Boolean).map(function(e){return e.node}),e.setUncontrolledState({checkedKeys:m})}else{var h=tr([].concat((0,el.Z)(c),[f]),!0,l),v=h.checkedKeys,g=h.halfCheckedKeys;if(!o){var b=new Set(v);b.delete(f);var y=tr(Array.from(b),{checked:!1,halfCheckedKeys:g},l);v=y.checkedKeys,g=y.halfCheckedKeys}r=v,p.checkedNodes=[],p.checkedNodesPositions=[],p.halfCheckedKeys=g,v.forEach(function(e){var t=l[e];if(t){var n=t.node,o=t.pos;p.checkedNodes.push(n),p.checkedNodesPositions.push({node:n,pos:o})}}),e.setUncontrolledState({checkedKeys:v},!1,{halfCheckedKeys:g})}null==u||u(r,p)}),(0,E.Z)((0,tX.Z)(e),"onNodeLoad",function(t){var n,o=t.key,r=e.state.keyEntities[o];if(null==r||null===(n=r.children)||void 0===n||!n.length){var a=new Promise(function(n,r){e.setState(function(a){var l=a.loadedKeys,c=a.loadingKeys,i=void 0===c?[]:c,d=e.props,s=d.loadData,u=d.onLoad;return!s||(void 0===l?[]:l).includes(o)||i.includes(o)?null:(s(t).then(function(){var r=e6(e.state.loadedKeys,o);null==u||u(r,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:r}),e.setState(function(e){return{loadingKeys:e8(e.loadingKeys,o)}}),n()}).catch(function(t){if(e.setState(function(e){return{loadingKeys:e8(e.loadingKeys,o)}}),e.loadingRetryTimes[o]=(e.loadingRetryTimes[o]||0)+1,e.loadingRetryTimes[o]>=10){var a=e.state.loadedKeys;(0,O.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:e6(a,o)}),n()}r(t)}),{loadingKeys:e6(i,o)})})});return a.catch(function(){}),a}}),(0,E.Z)((0,tX.Z)(e),"onNodeMouseEnter",function(t,n){var o=e.props.onMouseEnter;null==o||o({event:t,node:n})}),(0,E.Z)((0,tX.Z)(e),"onNodeMouseLeave",function(t,n){var o=e.props.onMouseLeave;null==o||o({event:t,node:n})}),(0,E.Z)((0,tX.Z)(e),"onNodeContextMenu",function(t,n){var o=e.props.onRightClick;o&&(t.preventDefault(),o({event:t,node:n}))}),(0,E.Z)((0,tX.Z)(e),"onFocus",function(){var t=e.props.onFocus;e.setState({focused:!0});for(var n=arguments.length,o=Array(n),r=0;r1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.destroyed){var r=!1,a=!0,l={};Object.keys(t).forEach(function(n){if(e.props.hasOwnProperty(n)){a=!1;return}r=!0,l[n]=t[n]}),r&&(!n||a)&&e.setState((0,C.Z)((0,C.Z)({},l),o))}}),(0,E.Z)((0,tX.Z)(e),"scrollTo",function(t){e.listRef.current.scrollTo(t)}),e}return(0,tV.Z)(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var e=this.props,t=e.activeKey,n=e.itemScrollOffset;void 0!==t&&t!==this.state.activeKey&&(this.setState({activeKey:t}),null!==t&&this.scrollTo({key:t,offset:void 0===n?0:n}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var e,t=this.state,n=t.focused,r=t.flattenNodes,a=t.keyEntities,l=t.draggingNodeKey,c=t.activeKey,i=t.dropLevelOffset,d=t.dropContainerKey,s=t.dropTargetKey,u=t.dropPosition,f=t.dragOverNodeKey,m=t.indent,h=this.props,v=h.prefixCls,g=h.className,b=h.style,y=h.showLine,x=h.focusable,w=h.tabIndex,C=h.selectable,S=h.showIcon,N=h.icon,K=h.switcherIcon,O=h.draggable,I=h.checkable,R=h.checkStrictly,P=h.disabled,M=h.motion,T=h.loadData,D=h.filterTreeNode,L=h.height,j=h.itemHeight,B=h.scrollWidth,H=h.virtual,z=h.titleRender,A=h.dropIndicatorRender,W=h.onContextMenu,_=h.onScroll,q=h.direction,V=h.rootClassName,X=h.rootStyle,U=(0,F.Z)(this.props,{aria:!0,data:!0});O&&(e="object"===(0,k.Z)(O)?O:"function"==typeof O?{nodeDraggable:O}:{});var G={prefixCls:v,selectable:C,showIcon:S,icon:N,switcherIcon:K,draggable:e,draggingNodeKey:l,checkable:I,checkStrictly:R,disabled:P,keyEntities:a,dropLevelOffset:i,dropContainerKey:d,dropTargetKey:s,dropPosition:u,dragOverNodeKey:f,indent:m,direction:q,dropIndicatorRender:A,loadData:T,filterTreeNode:D,titleRender:z,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return o.createElement(eW.Provider,{value:G},o.createElement("div",{className:Z()(v,g,V,(0,E.Z)((0,E.Z)((0,E.Z)({},"".concat(v,"-show-line"),y),"".concat(v,"-focused"),n),"".concat(v,"-active-focused"),null!==c)),style:X},o.createElement(nn,(0,p.Z)({ref:this.listRef,prefixCls:v,style:b,data:r,disabled:P,selectable:C,checkable:!!I,motion:M,dragging:null!==l,height:L,itemHeight:j,virtual:H,focusable:x,focused:n,tabIndex:void 0===w?0:w,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:W,onScroll:_,scrollWidth:B},this.getTreeNodeRequiredProps(),U))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,o,r=t.prevProps,a={prevProps:e};function l(t){return!r&&e.hasOwnProperty(t)||r&&r[t]!==e[t]}var c=t.fieldNames;if(l("fieldNames")&&(c=eG(e.fieldNames),a.fieldNames=c),l("treeData")?n=e.treeData:l("children")&&((0,O.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=eY(e.children)),n){a.treeData=n;var i=eJ(n,{fieldNames:c});a.keyEntities=(0,C.Z)((0,E.Z)({},t6,t7),i.keyEntities)}var d=a.keyEntities||t.keyEntities;if(l("expandedKeys")||r&&l("autoExpandParent"))a.expandedKeys=e.autoExpandParent||!r&&e.defaultExpandParent?tt(e.expandedKeys,d):e.expandedKeys;else if(!r&&e.defaultExpandAll){var s=(0,C.Z)({},d);delete s[t6];var u=[];Object.keys(s).forEach(function(e){var t=s[e];t.children&&t.children.length&&u.push(t.key)}),a.expandedKeys=u}else!r&&e.defaultExpandedKeys&&(a.expandedKeys=e.autoExpandParent||e.defaultExpandParent?tt(e.defaultExpandedKeys,d):e.defaultExpandedKeys);if(a.expandedKeys||delete a.expandedKeys,n||a.expandedKeys){var f=e$(n||t.treeData,a.expandedKeys||t.expandedKeys,c);a.flattenNodes=f}if(e.selectable&&(l("selectedKeys")?a.selectedKeys=e9(e.selectedKeys,e):!r&&e.defaultSelectedKeys&&(a.selectedKeys=e9(e.defaultSelectedKeys,e))),e.checkable&&(l("checkedKeys")?o=te(e.checkedKeys)||{}:!r&&e.defaultCheckedKeys?o=te(e.defaultCheckedKeys)||{}:n&&(o=te(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),o)){var p=o,m=p.checkedKeys,h=void 0===m?[]:m,v=p.halfCheckedKeys,g=void 0===v?[]:v;if(!e.checkStrictly){var b=tr(h,!0,d);h=b.checkedKeys,g=b.halfCheckedKeys}a.checkedKeys=h,a.halfCheckedKeys=g}return l("loadedKeys")&&(a.loadedKeys=e.loadedKeys),a}}]),n}(o.Component);(0,E.Z)(no,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:function(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,a={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case -1:a.top=0,a.left=-n*r;break;case 1:a.bottom=0,a.left=-n*r;break;case 0:a.bottom=0,a.left=r}return o.createElement("div",{style:a})},allowDrop:function(){return!0},expandAction:!1}),(0,E.Z)(no,"TreeNode",e4);var nr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},na=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:nr}))}),nl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},nc=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:nl}))}),ni={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},nd=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:ni}))}),ns={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},nu=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:ns}))}),nf=n(68710),np=n(86586),nm=n(93463),nh=n(23159),nv=n(12918),ng=n(63074),nb=n(71140),ny=n(99320);let nx=e=>{let{treeCls:t,treeNodeCls:n,directoryNodeSelectedBg:o,directoryNodeSelectedColor:r,motionDurationMid:a,borderRadius:l,controlItemBgHover:c}=e;return{["".concat(t).concat(t,"-directory ").concat(n)]:{["".concat(t,"-node-content-wrapper")]:{position:"static",["&:has(".concat(t,"-drop-indicator)")]:{position:"relative"},["> *:not(".concat(t,"-drop-indicator)")]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:"background-color ".concat(a),content:'""',borderRadius:l},"&:hover:before":{background:c}},["".concat(t,"-switcher, ").concat(t,"-checkbox, ").concat(t,"-draggable-icon")]:{zIndex:1},"&-selected":{background:o,borderRadius:l,["".concat(t,"-switcher, ").concat(t,"-draggable-icon")]:{color:r},["".concat(t,"-node-content-wrapper")]:{color:r,background:"transparent","&, &:hover":{color:r},"&:before, &:hover:before":{background:o}}}}}},nw=new nm.E4("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),nk=(e,t)=>({[".".concat(e,"-switcher-icon")]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:"transform ".concat(t.motionDurationSlow)}}}),nC=(e,t)=>({[".".concat(e,"-drop-indicator")]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:"".concat((0,nm.bf)(t.lineWidthBold)," solid ").concat(t.colorPrimary),borderRadius:"50%",content:'""'}}}),nE=(e,t)=>{let{treeCls:n,treeNodeCls:o,treeNodePadding:r,titleHeight:a,indentSize:l,nodeSelectedBg:c,nodeHoverBg:i,colorTextQuaternary:d,controlItemBgActiveDisabled:s}=t;return{[n]:Object.assign(Object.assign({},(0,nv.Wf)(t)),{"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:"background-color ".concat(t.motionDurationSlow),"&-rtl":{direction:"rtl"},["&".concat(n,"-rtl ").concat(n,"-switcher_close ").concat(n,"-switcher-icon svg")]:{transform:"rotate(90deg)"},["&-focused:not(:hover):not(".concat(n,"-active-focused)")]:(0,nv.oN)(t),["".concat(n,"-list-holder-inner")]:{alignItems:"flex-start"},["&".concat(n,"-block-node")]:{["".concat(n,"-list-holder-inner")]:{alignItems:"stretch",["".concat(n,"-node-content-wrapper")]:{flex:"auto"},["".concat(o,".dragging:after")]:{position:"absolute",inset:0,border:"1px solid ".concat(t.colorPrimary),opacity:0,animationName:nw,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[o]:{display:"flex",alignItems:"flex-start",marginBottom:r,lineHeight:(0,nm.bf)(a),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:r},["&-disabled ".concat(n,"-node-content-wrapper")]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},["".concat(n,"-checkbox-disabled + ").concat(n,"-node-selected,&").concat(o,"-disabled").concat(o,"-selected ").concat(n,"-node-content-wrapper")]:{backgroundColor:s},["".concat(n,"-checkbox-disabled")]:{pointerEvents:"unset"},["&:not(".concat(o,"-disabled)")]:{["".concat(n,"-node-content-wrapper")]:{"&:hover":{color:t.nodeHoverColor}}},["&-active ".concat(n,"-node-content-wrapper")]:{background:t.controlItemBgHover},["&:not(".concat(o,"-disabled).filter-node ").concat(n,"-title")]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",["".concat(n,"-draggable-icon")]:{flexShrink:0,width:a,textAlign:"center",visibility:"visible",color:d},["&".concat(o,"-disabled ").concat(n,"-draggable-icon")]:{visibility:"hidden"}}},["".concat(n,"-indent")]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:l}},["".concat(n,"-draggable-icon")]:{visibility:"hidden"},["".concat(n,"-switcher, ").concat(n,"-checkbox")]:{marginInlineEnd:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},["".concat(n,"-switcher")]:Object.assign(Object.assign({},nk(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:a,textAlign:"center",cursor:"pointer",userSelect:"none",transition:"all ".concat(t.motionDurationSlow),"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:a,height:a,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:"all ".concat(t.motionDurationSlow)},["&:not(".concat(n,"-switcher-noop):hover:before")]:{backgroundColor:t.colorBgTextHover},["&_close ".concat(n,"-switcher-icon svg")]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(r).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:"1px solid ".concat(t.colorBorder),content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(a).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:"1px solid ".concat(t.colorBorder),content:'""'}}}),["".concat(n,"-node-content-wrapper")]:Object.assign(Object.assign({position:"relative",minHeight:a,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:"all ".concat(t.motionDurationMid,", border 0s, line-height 0s, box-shadow 0s")},nC(e,t)),{"&:hover":{backgroundColor:i},["&".concat(n,"-node-selected")]:{color:t.nodeSelectedColor,backgroundColor:c},["".concat(n,"-iconEle")]:{display:"inline-block",width:a,height:a,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),["".concat(n,"-unselectable ").concat(n,"-node-content-wrapper:hover")]:{backgroundColor:"transparent"},["".concat(o,".drop-container > [draggable]")]:{boxShadow:"0 0 0 2px ".concat(t.colorPrimary)},"&-show-line":{["".concat(n,"-indent-unit")]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(r).mul(-1).equal(),borderInlineEnd:"1px solid ".concat(t.colorBorder),content:'""'},"&-end:before":{display:"none"}},["".concat(n,"-switcher")]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},["".concat(o,"-leaf-last ").concat(n,"-switcher-leaf-line:before")]:{top:"auto !important",bottom:"auto !important",height:"".concat((0,nm.bf)(t.calc(a).div(2).equal())," !important")}})}},nS=function(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=".".concat(e),r=t.calc(t.paddingXS).div(2).equal(),a=(0,nb.IX)(t,{treeCls:o,treeNodeCls:"".concat(o,"-treenode"),treeNodePadding:r});return[nE(e,a),n&&nx(a)].filter(Boolean)},nZ=e=>{let{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:o}=e;return{titleHeight:t,indentSize:t,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:o,nodeSelectedColor:e.colorText}};var nN=(0,ny.I$)("Tree",(e,t)=>{let{prefixCls:n}=t;return[{[e.componentCls]:(0,nh.C2)("".concat(n,"-checkbox"),e)},nS(n,e),(0,ng.Z)(e)]},e=>{let{colorTextLightSolid:t,colorPrimary:n}=e;return Object.assign(Object.assign({},nZ(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:n})}),nK=function(e){let{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:a,direction:l="ltr"}=e,c="ltr"===l?"left":"right",i={[c]:-n*a+4,["ltr"===l?"right":"left"]:0};switch(t){case -1:i.top=-3;break;case 1:i.bottom=-3;break;default:i.bottom=-3,i[c]=a+4}return o.createElement("div",{style:i,className:"".concat(r,"-drop-indicator")})},nO={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},nI=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:nO}))}),nR=n(61935),nP={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},nM=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:nP}))}),nT={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},nD=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:nT}))}),nL=n(19722),nj=e=>{var t,n;let r;let{prefixCls:a,switcherIcon:l,treeNodeProps:c,showLine:i,switcherLoadingIcon:d}=e,{isLeaf:s,expanded:u,loading:f}=c;if(f)return o.isValidElement(d)?d:o.createElement(nR.Z,{className:"".concat(a,"-switcher-loading-icon")});if(i&&"object"==typeof i&&(r=i.showLeafIcon),s){if(!i)return null;if("boolean"!=typeof r&&r){let e="function"==typeof r?r(c):r;return o.isValidElement(e)?(0,nL.Tm)(e,{className:Z()(null===(t=e.props)||void 0===t?void 0:t.className,"".concat(a,"-switcher-line-custom-icon"))}):e}return r?o.createElement(na,{className:"".concat(a,"-switcher-line-icon")}):o.createElement("span",{className:"".concat(a,"-switcher-leaf-line")})}let p="".concat(a,"-switcher-icon"),m="function"==typeof l?l(c):l;return o.isValidElement(m)?(0,nL.Tm)(m,{className:Z()(null===(n=m.props)||void 0===n?void 0:n.className,p)}):void 0!==m?m:i?u?o.createElement(nM,{className:"".concat(a,"-switcher-line-icon")}):o.createElement(nD,{className:"".concat(a,"-switcher-line-icon")}):o.createElement(nI,{className:p})};let nB=o.forwardRef((e,t)=>{var n;let{getPrefixCls:r,direction:a,virtual:l,tree:c}=o.useContext(tk.E_),{prefixCls:i,className:d,showIcon:s=!1,showLine:u,switcherIcon:f,switcherLoadingIcon:p,blockNode:m=!1,children:h,checkable:v=!1,selectable:g=!0,draggable:b,disabled:y,motion:x,style:w}=e,k=r("tree",i),C=r(),E=o.useContext(np.Z),S=null!=y?y:E,N=null!=x?x:Object.assign(Object.assign({},(0,nf.Z)(C)),{motionAppear:!1}),K=Object.assign(Object.assign({},e),{checkable:v,selectable:g,showIcon:s,motion:N,blockNode:m,disabled:S,showLine:!!u,dropIndicatorRender:nK}),[O,I,R]=nN(k),[,P]=(0,tI.ZP)(),M=P.paddingXS/2+((null===(n=P.Tree)||void 0===n?void 0:n.titleHeight)||P.controlHeightSM),T=o.useMemo(()=>{if(!b)return!1;let e={};switch(typeof b){case"function":e.nodeDraggable=b;break;case"object":e=Object.assign({},b)}return!1!==e.icon&&(e.icon=e.icon||o.createElement(nu,null)),e},[b]);return O(o.createElement(no,Object.assign({itemHeight:M,ref:t,virtual:l},K,{style:Object.assign(Object.assign({},null==c?void 0:c.style),w),prefixCls:k,className:Z()({["".concat(k,"-icon-hide")]:!s,["".concat(k,"-block-node")]:m,["".concat(k,"-unselectable")]:!g,["".concat(k,"-rtl")]:"rtl"===a,["".concat(k,"-disabled")]:S},null==c?void 0:c.className,d,I,R),direction:a,checkable:v?o.createElement("span",{className:"".concat(k,"-checkbox-inner")}):v,selectable:g,switcherIcon:e=>o.createElement(nj,{prefixCls:k,switcherIcon:f,switcherLoadingIcon:p,treeNodeProps:e,showLine:u}),draggable:T}),h))});function nH(e,t,n){let{key:o,children:r}=n;e.forEach(function(e){let a=e[o],l=e[r];!1!==t(a,e)&&nH(l||[],t,n)})}var nz=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);rt.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n};function nA(e){let{isLeaf:t,expanded:n}=e;return t?o.createElement(na,null):n?o.createElement(nc,null):o.createElement(nd,null)}function nW(e){let{treeData:t,children:n}=e;return t||eY(n)}let n_=o.forwardRef((e,t)=>{var{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:a}=e,l=nz(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);let c=o.useRef(null),i=o.useRef(null),d=()=>{let{keyEntities:e}=eJ(nW(l),{fieldNames:l.fieldNames});return n?Object.keys(e):r?tt(l.expandedKeys||a||[],e):l.expandedKeys||a||[]},[s,u]=o.useState(l.selectedKeys||l.defaultSelectedKeys||[]),[f,p]=o.useState(()=>d());o.useEffect(()=>{"selectedKeys"in l&&u(l.selectedKeys)},[l.selectedKeys]),o.useEffect(()=>{"expandedKeys"in l&&p(l.expandedKeys)},[l.expandedKeys]);let{getPrefixCls:m,direction:h}=o.useContext(tk.E_),{prefixCls:v,className:g,showIcon:b=!0,expandAction:y="click"}=l,x=nz(l,["prefixCls","className","showIcon","expandAction"]),w=m("tree",v),k=Z()("".concat(w,"-directory"),{["".concat(w,"-directory-rtl")]:"rtl"===h},g);return o.createElement(nB,Object.assign({icon:nA,ref:t,blockNode:!0},x,{showIcon:b,expandAction:y,prefixCls:w,className:k,expandedKeys:f,selectedKeys:s,onSelect:(e,t)=>{var n;let o;let{multiple:r,fieldNames:a}=l,{node:d,nativeEvent:s}=t,{key:p=""}=d,m=nW(l),h=Object.assign(Object.assign({},t),{selected:!0}),v=(null==s?void 0:s.ctrlKey)||(null==s?void 0:s.metaKey),g=null==s?void 0:s.shiftKey;r&&v?(o=e,c.current=p,i.current=o):r&&g?o=Array.from(new Set([].concat((0,el.Z)(i.current||[]),(0,el.Z)(function(e){let{treeData:t,expandedKeys:n,startKey:o,endKey:r,fieldNames:a}=e,l=[],c=0;return o&&o===r?[o]:o&&r?(nH(t,e=>{if(2===c)return!1;if(e===o||e===r){if(l.push(e),0===c)c=1;else if(1===c)return c=2,!1}else 1===c&&l.push(e);return n.includes(e)},eG(a)),l):[]}({treeData:m,expandedKeys:f,startKey:p,endKey:c.current,fieldNames:a}))))):(o=[p],c.current=p,i.current=o),h.selectedNodes=function(e,t,n){let o=(0,el.Z)(t),r=[];return nH(e,(e,t)=>{let n=o.indexOf(e);return -1!==n&&(r.push(t),o.splice(n,1)),!!o.length},eG(n)),r}(m,o,a),null===(n=l.onSelect)||void 0===n||n.call(l,o,h),"selectedKeys"in l||u(o)},onExpand:(e,t)=>{var n;return"expandedKeys"in l||p(e),null===(n=l.onExpand)||void 0===n?void 0:n.call(l,e,t)}}))});nB.DirectoryTree=n_,nB.TreeNode=e4;var nF=n(29436),nq=n(39454),nV=e=>{let{value:t,filterSearch:n,tablePrefixCls:r,locale:a,onChange:l}=e;return n?o.createElement("div",{className:"".concat(r,"-filter-dropdown-search")},o.createElement(nq.Z,{prefix:o.createElement(nF.Z,null),placeholder:a.filterSearchPlaceholder,onChange:l,value:t,htmlSize:1,className:"".concat(r,"-filter-dropdown-search-input")})):null};let nX=e=>{let{keyCode:t}=e;t===tY.Z.ENTER&&e.stopPropagation()},nU=o.forwardRef((e,t)=>o.createElement("div",{className:e.className,onClick:e=>e.stopPropagation(),onKeyDown:nX,ref:t},e.children));function nG(e){let t=[];return(e||[]).forEach(e=>{let{value:n,children:o}=e;t.push(n),o&&(t=[].concat((0,el.Z)(t),(0,el.Z)(nG(o))))}),t}function nY(e,t){return("string"==typeof t||"number"==typeof t)&&(null==t?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()))}var n$=e=>{var t,n,r,a;let l,c;let{tablePrefixCls:i,prefixCls:s,column:u,dropdownPrefixCls:f,columnKey:p,filterOnClose:m,filterMultiple:h,filterMode:v="menu",filterSearch:g=!1,filterState:b,triggerFilter:y,locale:x,children:w,getPopupContainer:k,rootClassName:C}=e,{filterResetToDefaultFilteredValue:E,defaultFilteredValue:S,filterDropdownProps:N={},filterDropdownOpen:K,filterDropdownVisible:O,onFilterDropdownVisibleChange:I,onFilterDropdownOpenChange:R}=u,[P,M]=o.useState(!1),T=!!(b&&((null===(t=b.filteredKeys)||void 0===t?void 0:t.length)||b.forceFiltered)),D=e=>{var t;M(e),null===(t=N.onOpenChange)||void 0===t||t.call(N,e),null==R||R(e),null==I||I(e)},L=null!==(a=null!==(r=null!==(n=N.open)&&void 0!==n?n:K)&&void 0!==r?r:O)&&void 0!==a?a:P,j=null==b?void 0:b.filteredKeys,[B,H]=tz(j||[]),z=e=>{let{selectedKeys:t}=e;H(t)},A=(e,t)=>{let{node:n,checked:o}=t;h?z({selectedKeys:e}):z({selectedKeys:o&&n.key?[n.key]:[]})};o.useEffect(()=>{P&&z({selectedKeys:j||[]})},[j]);let[W,_]=o.useState([]),F=e=>{_(e)},[q,V]=o.useState(""),X=e=>{let{value:t}=e.target;V(t)};o.useEffect(()=>{P||V("")},[P]);let U=e=>{let t=(null==e?void 0:e.length)?e:null;if(null===t&&(!b||!b.filteredKeys)||(0,d.Z)(t,null==b?void 0:b.filteredKeys,!0))return null;y({column:u,key:p,filteredKeys:t})},G=()=>{D(!1),U(B())},Y=function(){let{confirm:e,closeDropdown:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{confirm:!1,closeDropdown:!1};e&&U([]),t&&D(!1),V(""),E?H((S||[]).map(e=>String(e))):H([])},$=Z()({["".concat(f,"-menu-without-submenu")]:!(u.filters||[]).some(e=>{let{children:t}=e;return t})}),J=e=>{e.target.checked?H(nG(null==u?void 0:u.filters).map(e=>String(e))):H([])},Q=e=>{let{filters:t}=e;return(t||[]).map((e,t)=>{let n=String(e.value),o={title:e.text,key:void 0!==e.value?n:String(t)};return e.children&&(o.children=Q({filters:e.children})),o})},ee=e=>{var t;return Object.assign(Object.assign({},e),{text:e.title,value:e.key,children:(null===(t=e.children)||void 0===t?void 0:t.map(e=>ee(e)))||[]})},{direction:et,renderEmpty:en}=o.useContext(tk.E_);if("function"==typeof u.filterDropdown)l=u.filterDropdown({prefixCls:"".concat(f,"-custom"),setSelectedKeys:e=>z({selectedKeys:e}),selectedKeys:B(),confirm:function(){let{closeDropdown:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{closeDropdown:!0};e&&D(!1),U(B())},clearFilters:Y,filters:u.filters,visible:L,close:()=>{D(!1)}});else if(u.filterDropdown)l=u.filterDropdown;else{let e=B()||[];l=o.createElement(o.Fragment,null,(()=>{var t,n;let r=null!==(t=null==en?void 0:en("Table.filter"))&&void 0!==t?t:o.createElement(tW.Z,{image:tW.Z.PRESENTED_IMAGE_SIMPLE,description:x.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if(0===(u.filters||[]).length)return r;if("tree"===v)return o.createElement(o.Fragment,null,o.createElement(nV,{filterSearch:g,value:q,onChange:X,tablePrefixCls:i,locale:x}),o.createElement("div",{className:"".concat(i,"-filter-dropdown-tree")},h?o.createElement(ti.Z,{checked:e.length===nG(u.filters).length,indeterminate:e.length>0&&e.length"function"==typeof g?g(q,ee(e)):nY(q,e.title):void 0})));let a=function e(t){let{filters:n,prefixCls:r,filteredKeys:a,filterMultiple:l,searchValue:c,filterSearch:i}=t;return n.map((t,n)=>{let d=String(t.value);if(t.children)return{key:d||n,label:t.text,popupClassName:"".concat(r,"-dropdown-submenu"),children:e({filters:t.children,prefixCls:r,filteredKeys:a,filterMultiple:l,searchValue:c,filterSearch:i})};let s=l?ti.Z:ts.ZP,u={key:void 0!==t.value?d:n,label:o.createElement(o.Fragment,null,o.createElement(s,{checked:a.includes(d)}),o.createElement("span",null,t.text))};return c.trim()?"function"==typeof i?i(c,t)?u:null:nY(c,t.text)?u:null:u})}({filters:u.filters||[],filterSearch:g,prefixCls:s,filteredKeys:B(),filterMultiple:h,searchValue:q}),l=a.every(e=>null===e);return o.createElement(o.Fragment,null,o.createElement(nV,{filterSearch:g,value:q,onChange:X,tablePrefixCls:i,locale:x}),l?r:o.createElement(t_.Z,{selectable:!0,multiple:h,prefixCls:"".concat(f,"-menu"),className:$,onSelect:z,onDeselect:z,selectedKeys:e,getPopupContainer:k,openKeys:W,onOpenChange:F,items:a}))})(),o.createElement("div",{className:"".concat(s,"-dropdown-btns")},o.createElement(tA.ZP,{type:"link",size:"small",disabled:E?(0,d.Z)((S||[]).map(e=>String(e)),e,!0):0===e.length,onClick:()=>Y()},x.filterReset),o.createElement(tA.ZP,{type:"primary",size:"small",onClick:G},x.filterConfirm)))}u.filterDropdown&&(l=o.createElement(tF.J,{selectable:void 0},l)),l=o.createElement(nU,{className:"".concat(s,"-dropdown")},l);let eo=(0,tB.Z)({trigger:["click"],placement:"rtl"===et?"bottomLeft":"bottomRight",children:(c="function"==typeof u.filterIcon?u.filterIcon(T):u.filterIcon?u.filterIcon:o.createElement(tj,null),o.createElement("span",{role:"button",tabIndex:-1,className:Z()("".concat(s,"-trigger"),{active:T}),onClick:e=>{e.stopPropagation()}},c)),getPopupContainer:k},Object.assign(Object.assign({},N),{rootClassName:Z()(C,N.rootClassName),open:L,onOpenChange:(e,t)=>{"trigger"===t.source&&(e&&void 0!==j&&H(j||[]),D(e),e||u.filterDropdown||!m||G())},popupRender:()=>"function"==typeof(null==N?void 0:N.dropdownRender)?N.dropdownRender(l):l}));return o.createElement("div",{className:"".concat(s,"-column")},o.createElement("span",{className:"".concat(i,"-column-title")},w),o.createElement(td.Z,Object.assign({},eo)))};let nJ=(e,t,n)=>{let o=[];return(e||[]).forEach((e,r)=>{var a;let l=tP(r,n),c=void 0!==e.filterDropdown;if(e.filters||c||"onFilter"in e){if("filteredValue"in e){let t=e.filteredValue;c||(t=null!==(a=null==t?void 0:t.map(String))&&void 0!==a?a:t),o.push({column:e,key:tR(e,l),filteredKeys:t,forceFiltered:e.filtered})}else o.push({column:e,key:tR(e,l),filteredKeys:t&&e.defaultFilteredValue?e.defaultFilteredValue:void 0,forceFiltered:e.filtered})}"children"in e&&(o=[].concat((0,el.Z)(o),(0,el.Z)(nJ(e.children,t,l))))}),o},nQ=e=>{let t={};return e.forEach(e=>{let{key:n,filteredKeys:o,column:r}=e,{filters:a,filterDropdown:l}=r;if(l)t[n]=o||null;else if(Array.isArray(o)){let e=nG(a);t[n]=e.filter(e=>o.includes(String(e)))}else t[n]=null}),t},n0=(e,t,n)=>t.reduce((e,o)=>{let{column:{onFilter:r,filters:a},filteredKeys:l}=o;return r&&l&&l.length?e.map(e=>Object.assign({},e)).filter(e=>l.some(o=>{let l=nG(a),c=l.findIndex(e=>String(e)===String(o)),i=-1!==c?l[c]:o;return e[n]&&(e[n]=n0(e[n],t,n)),r(i,e)})):e},e),n1=e=>e.flatMap(e=>"children"in e?[e].concat((0,el.Z)(n1(e.children||[]))):[e]);var n2=e=>{let{prefixCls:t,dropdownPrefixCls:n,mergedColumns:r,onFilterChange:a,getPopupContainer:l,locale:c,rootClassName:i}=e;(0,tc.ln)("Table");let d=o.useMemo(()=>n1(r||[]),[r]),[s,u]=o.useState(()=>nJ(d,!0)),f=o.useMemo(()=>{let e=nJ(d,!1);if(0===e.length)return e;let t=!0;if(e.forEach(e=>{let{filteredKeys:n}=e;void 0!==n&&(t=!1)}),t){let e=(d||[]).map((e,t)=>tR(e,tP(t)));return s.filter(t=>{let{key:n}=t;return e.includes(n)}).map(t=>{let n=d[e.indexOf(t.key)];return Object.assign(Object.assign({},t),{column:Object.assign(Object.assign({},t.column),n),forceFiltered:n.filtered})})}return e},[d,s]),p=o.useMemo(()=>nQ(f),[f]),m=e=>{let t=f.filter(t=>{let{key:n}=t;return n!==e.key});t.push(e),u(t),a(nQ(t),t)};return[e=>(function e(t,n,r,a,l,c,i,d,s){return r.map((r,u)=>{let f=tP(u,d),{filterOnClose:p=!0,filterMultiple:m=!0,filterMode:h,filterSearch:v}=r,g=r;if(g.filters||g.filterDropdown){let e=tR(g,f),d=a.find(t=>{let{key:n}=t;return e===n});g=Object.assign(Object.assign({},g),{title:a=>o.createElement(n$,{tablePrefixCls:t,prefixCls:"".concat(t,"-filter"),dropdownPrefixCls:n,column:g,columnKey:e,filterState:d,filterOnClose:p,filterMultiple:m,filterMode:h,filterSearch:v,triggerFilter:c,locale:l,getPopupContainer:i,rootClassName:s},tM(r.title,a))})}return"children"in g&&(g=Object.assign(Object.assign({},g),{children:e(t,n,g.children,a,l,c,i,f,s)})),g})})(t,n,e,f,c,m,l,void 0,i),f,p]},n3=(e,t,n)=>{let r=o.useRef({});return[function(o){var a;if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let o=new Map;!function e(r){r.forEach((r,a)=>{let l=n(r,a);o.set(l,r),r&&"object"==typeof r&&t in r&&e(r[t]||[])})}(e),r.current={data:e,childrenColumnName:t,kvMap:o,getRowKey:n}}return null===(a=r.current.kvMap)||void 0===a?void 0:a.get(o)}]},n4=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);rt.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n},n8=function(e,t,n){let r=n&&"object"==typeof n?n:{},{total:a=0}=r,l=n4(r,["total"]),[c,i]=(0,o.useState)(()=>({current:"defaultCurrent"in l?l.defaultCurrent:1,pageSize:"defaultPageSize"in l?l.defaultPageSize:10})),d=(0,tB.Z)(c,l,{total:a>0?a:e}),s=Math.ceil((a||e)/d.pageSize);d.current>s&&(d.current=s||1);let u=(e,t)=>{i({current:null!=e?e:1,pageSize:t||d.pageSize})};return!1===n?[{},()=>{}]:[Object.assign(Object.assign({},d),{onChange:(e,o)=>{var r;n&&(null===(r=n.onChange)||void 0===r||r.call(n,e,o)),u(e,o),t(e,o||(null==d?void 0:d.pageSize))}}),u]},n6={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},n5=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:n6}))}),n7={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},n9=o.forwardRef(function(e,t){return o.createElement(tL.Z,(0,p.Z)({},e,{ref:t,icon:n7}))}),oe=n(99981);let ot="ascend",on="descend",oo=e=>"object"==typeof e.sorter&&"number"==typeof e.sorter.multiple&&e.sorter.multiple,or=e=>"function"==typeof e?e:!!e&&"object"==typeof e&&!!e.compare&&e.compare,oa=(e,t)=>t?e[e.indexOf(t)+1]:e[0],ol=(e,t,n)=>{let o=[],r=(e,t)=>{o.push({column:e,key:tR(e,t),multiplePriority:oo(e),sortOrder:e.sortOrder})};return(e||[]).forEach((e,a)=>{let l=tP(a,n);e.children?("sortOrder"in e&&r(e,l),o=[].concat((0,el.Z)(o),(0,el.Z)(ol(e.children,t,l)))):e.sorter&&("sortOrder"in e?r(e,l):t&&e.defaultSortOrder&&o.push({column:e,key:tR(e,l),multiplePriority:oo(e),sortOrder:e.defaultSortOrder}))}),o},oc=(e,t,n,r,a,l,c,i)=>(t||[]).map((t,d)=>{let s=tP(d,i),u=t;if(u.sorter){let i;let d=u.sortDirections||a,f=void 0===u.showSorterTooltip?c:u.showSorterTooltip,p=tR(u,s),m=n.find(e=>{let{key:t}=e;return t===p}),h=m?m.sortOrder:null,v=oa(d,h);if(t.sortIcon)i=t.sortIcon({sortOrder:h});else{let t=d.includes(ot)&&o.createElement(n9,{className:Z()("".concat(e,"-column-sorter-up"),{active:h===ot})}),n=d.includes(on)&&o.createElement(n5,{className:Z()("".concat(e,"-column-sorter-down"),{active:h===on})});i=o.createElement("span",{className:Z()("".concat(e,"-column-sorter"),{["".concat(e,"-column-sorter-full")]:!!(t&&n)})},o.createElement("span",{className:"".concat(e,"-column-sorter-inner"),"aria-hidden":"true"},t,n))}let{cancelSort:g,triggerAsc:b,triggerDesc:y}=l||{},x=g;v===on?x=y:v===ot&&(x=b);let w="object"==typeof f?Object.assign({title:x},f):{title:x};u=Object.assign(Object.assign({},u),{className:Z()(u.className,{["".concat(e,"-column-sort")]:h}),title:n=>{let r="".concat(e,"-column-sorters"),a=o.createElement("span",{className:"".concat(e,"-column-title")},tM(t.title,n)),l=o.createElement("div",{className:r},a,i);return f?"boolean"!=typeof f&&(null==f?void 0:f.target)==="sorter-icon"?o.createElement("div",{className:Z()(r,"".concat(r,"-tooltip-target-sorter"))},a,o.createElement(oe.Z,Object.assign({},w),i)):o.createElement(oe.Z,Object.assign({},w),l):l},onHeaderCell:n=>{var o;let a=(null===(o=t.onHeaderCell)||void 0===o?void 0:o.call(t,n))||{},l=a.onClick,c=a.onKeyDown;a.onClick=e=>{r({column:t,key:p,sortOrder:v,multiplePriority:oo(t)}),null==l||l(e)},a.onKeyDown=e=>{e.keyCode===tY.Z.ENTER&&(r({column:t,key:p,sortOrder:v,multiplePriority:oo(t)}),null==c||c(e))};let i=tT(t.title,{}),d=null==i?void 0:i.toString();return h&&(a["aria-sort"]="ascend"===h?"ascending":"descending"),a["aria-label"]=d||"",a.className=Z()(a.className,"".concat(e,"-column-has-sorters")),a.tabIndex=0,t.ellipsis&&(a.title=(null!=i?i:"").toString()),a}})}return"children"in u&&(u=Object.assign(Object.assign({},u),{children:oc(e,u.children,n,r,a,l,c,s)})),u}),oi=e=>{let{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}},od=e=>{let t=e.filter(e=>{let{sortOrder:t}=e;return t}).map(oi);if(0===t.length&&e.length){let t=e.length-1;return Object.assign(Object.assign({},oi(e[t])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},os=(e,t,n)=>{let o=t.slice().sort((e,t)=>t.multiplePriority-e.multiplePriority),r=e.slice(),a=o.filter(e=>{let{column:{sorter:t},sortOrder:n}=e;return or(t)&&n});return a.length?r.sort((e,t)=>{for(let n=0;n{let o=e[n];return o?Object.assign(Object.assign({},e),{[n]:os(o,t,n)}):e}):r};var ou=e=>{let{prefixCls:t,mergedColumns:n,sortDirections:r,tableLocale:a,showSorterTooltip:l,onSorterChange:c}=e,[i,d]=o.useState(()=>ol(n,!0)),s=(e,t)=>{let n=[];return e.forEach((e,o)=>{let r=tP(o,t);if(n.push(tR(e,r)),Array.isArray(e.children)){let t=s(e.children,r);n.push.apply(n,(0,el.Z)(t))}}),n},u=o.useMemo(()=>{let e=!0,t=ol(n,!1);if(!t.length){let e=s(n);return i.filter(t=>{let{key:n}=t;return e.includes(n)})}let o=[];function r(t){e?o.push(t):o.push(Object.assign(Object.assign({},t),{sortOrder:null}))}let a=null;return t.forEach(t=>{null===a?(r(t),t.sortOrder&&(!1===t.multiplePriority?e=!1:a=!0)):(a&&!1!==t.multiplePriority||(e=!1),r(t))}),o},[n,i]),f=o.useMemo(()=>{var e,t;let n=u.map(e=>{let{column:t,sortOrder:n}=e;return{column:t,order:n}});return{sortColumns:n,sortColumn:null===(e=n[0])||void 0===e?void 0:e.column,sortOrder:null===(t=n[0])||void 0===t?void 0:t.order}},[u]),p=e=>{let t;d(t=!1!==e.multiplePriority&&u.length&&!1!==u[0].multiplePriority?[].concat((0,el.Z)(u.filter(t=>{let{key:n}=t;return n!==e.key})),[e]):[e]),c(od(t),t)};return[e=>oc(t,e,u,p,r,a,l),u,f,()=>od(u)]};let of=(e,t)=>e.map(e=>{let n=Object.assign({},e);return n.title=tM(e.title,t),"children"in n&&(n.children=of(n.children,t)),n});var op=e=>[o.useCallback(t=>of(t,e),[e])];let om=b(eI,(e,t)=>{let{_renderTimes:n}=e,{_renderTimes:o}=t;return n!==o}),oh=b(ez,(e,t)=>{let{_renderTimes:n}=e,{_renderTimes:o}=t;return n!==o});var ov=n(54558),og=e=>{let{componentCls:t,lineWidth:n,lineType:o,tableBorderColor:r,tableHeaderBg:a,tablePaddingVertical:l,tablePaddingHorizontal:c,calc:i}=e,d="".concat((0,nm.bf)(n)," ").concat(o," ").concat(r),s=(e,o,r)=>({["&".concat(t,"-").concat(e)]:{["> ".concat(t,"-container")]:{["> ".concat(t,"-content, > ").concat(t,"-body")]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{["> ".concat(t,"-expanded-row-fixed")]:{margin:"".concat((0,nm.bf)(i(o).mul(-1).equal()),"\n ").concat((0,nm.bf)(i(i(r).add(n)).mul(-1).equal()))}}}}}});return{["".concat(t,"-wrapper")]:{["".concat(t).concat(t,"-bordered")]:Object.assign(Object.assign(Object.assign({["> ".concat(t,"-title")]:{border:d,borderBottom:0},["> ".concat(t,"-container")]:{borderInlineStart:d,borderTop:d,["\n > ".concat(t,"-content,\n > ").concat(t,"-header,\n > ").concat(t,"-body,\n > ").concat(t,"-summary\n ")]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:d},"> thead":{"> tr:not(:last-child) > th":{borderBottom:d},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{["> ".concat(t,"-cell-fix-right-first::after")]:{borderInlineEnd:d}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{["> ".concat(t,"-expanded-row-fixed")]:{margin:"".concat((0,nm.bf)(i(l).mul(-1).equal())," ").concat((0,nm.bf)(i(i(c).add(n)).mul(-1).equal())),"&::after":{position:"absolute",top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:d,content:'""'}}}}}},["&".concat(t,"-scroll-horizontal")]:{["> ".concat(t,"-container > ").concat(t,"-body")]:{"> table > tbody":{["\n > tr".concat(t,"-expanded-row,\n > tr").concat(t,"-placeholder\n ")]:{"> th, > td":{borderInlineEnd:0}}}}}},s("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),s("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{["> ".concat(t,"-footer")]:{border:d,borderTop:0}}),["".concat(t,"-cell")]:{["".concat(t,"-container:first-child")]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:"0 ".concat((0,nm.bf)(n)," 0 ").concat((0,nm.bf)(n)," ").concat(a)}},["".concat(t,"-bordered ").concat(t,"-cell-scrollbar")]:{borderInlineEnd:d}}}},ob=e=>{let{componentCls:t}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-cell-ellipsis")]:Object.assign(Object.assign({},nv.vS),{wordBreak:"keep-all",["\n &".concat(t,"-cell-fix-left-last,\n &").concat(t,"-cell-fix-right-first\n ")]:{overflow:"visible",["".concat(t,"-cell-content")]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},["".concat(t,"-column-title")]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},oy=e=>{let{componentCls:t}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-tbody > tr").concat(t,"-placeholder")]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},ox=e=>{let{componentCls:t,antCls:n,motionDurationSlow:o,lineWidth:r,paddingXS:a,lineType:l,tableBorderColor:c,tableExpandIconBg:i,tableExpandColumnWidth:d,borderRadius:s,tablePaddingVertical:u,tablePaddingHorizontal:f,tableExpandedRowBg:p,paddingXXS:m,expandIconMarginTop:h,expandIconSize:v,expandIconHalfInner:g,expandIconScale:b,calc:y}=e,x="".concat((0,nm.bf)(r)," ").concat(l," ").concat(c),w=y(m).sub(r).equal();return{["".concat(t,"-wrapper")]:{["".concat(t,"-expand-icon-col")]:{width:d},["".concat(t,"-row-expand-icon-cell")]:{textAlign:"center",["".concat(t,"-row-expand-icon")]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},["".concat(t,"-row-indent")]:{height:1,float:"left"},["".concat(t,"-row-expand-icon")]:Object.assign(Object.assign({},(0,nv.Nd)(e)),{position:"relative",float:"left",width:v,height:v,color:"inherit",lineHeight:(0,nm.bf)(v),background:i,border:x,borderRadius:s,transform:"scale(".concat(b,")"),"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:"transform ".concat(o," ease-out"),content:'""'},"&::before":{top:g,insetInlineEnd:w,insetInlineStart:w,height:r},"&::after":{top:w,bottom:w,insetInlineStart:g,width:r,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),["".concat(t,"-row-indent + ").concat(t,"-row-expand-icon")]:{marginTop:h,marginInlineEnd:a},["tr".concat(t,"-expanded-row")]:{"&, &:hover":{"> th, > td":{background:p}},["".concat(n,"-descriptions-view")]:{display:"flex",table:{flex:"auto",width:"100%"}}},["".concat(t,"-expanded-row-fixed")]:{position:"relative",margin:"".concat((0,nm.bf)(y(u).mul(-1).equal())," ").concat((0,nm.bf)(y(f).mul(-1).equal())),padding:"".concat((0,nm.bf)(u)," ").concat((0,nm.bf)(f))}}}},ow=e=>{let{componentCls:t,antCls:n,iconCls:o,tableFilterDropdownWidth:r,tableFilterDropdownSearchWidth:a,paddingXXS:l,paddingXS:c,colorText:i,lineWidth:d,lineType:s,tableBorderColor:u,headerIconColor:f,fontSizeSM:p,tablePaddingHorizontal:m,borderRadius:h,motionDurationSlow:v,colorIcon:g,colorPrimary:b,tableHeaderFilterActiveBg:y,colorTextDisabled:x,tableFilterDropdownBg:w,tableFilterDropdownHeight:k,controlItemBgHover:C,controlItemBgActive:E,boxShadowSecondary:S,filterDropdownMenuBg:Z,calc:N}=e,K="".concat(n,"-dropdown"),O="".concat(t,"-filter-dropdown"),I="".concat(n,"-tree"),R="".concat((0,nm.bf)(d)," ").concat(s," ").concat(u);return[{["".concat(t,"-wrapper")]:{["".concat(t,"-filter-column")]:{display:"flex",justifyContent:"space-between"},["".concat(t,"-filter-trigger")]:{position:"relative",display:"flex",alignItems:"center",marginBlock:N(l).mul(-1).equal(),marginInline:"".concat((0,nm.bf)(l)," ").concat((0,nm.bf)(N(m).div(2).mul(-1).equal())),padding:"0 ".concat((0,nm.bf)(l)),color:f,fontSize:p,borderRadius:h,cursor:"pointer",transition:"all ".concat(v),"&:hover":{color:g,background:y},"&.active":{color:b}}}},{["".concat(n,"-dropdown")]:{[O]:Object.assign(Object.assign({},(0,nv.Wf)(e)),{minWidth:r,backgroundColor:w,borderRadius:h,boxShadow:S,overflow:"hidden",["".concat(K,"-menu")]:{maxHeight:k,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:Z,"&:empty::after":{display:"block",padding:"".concat((0,nm.bf)(c)," 0"),color:x,fontSize:p,textAlign:"center",content:'"Not Found"'}},["".concat(O,"-tree")]:{paddingBlock:"".concat((0,nm.bf)(c)," 0"),paddingInline:c,[I]:{padding:0},["".concat(I,"-treenode ").concat(I,"-node-content-wrapper:hover")]:{backgroundColor:C},["".concat(I,"-treenode-checkbox-checked ").concat(I,"-node-content-wrapper")]:{"&, &:hover":{backgroundColor:E}}},["".concat(O,"-search")]:{padding:c,borderBottom:R,"&-input":{input:{minWidth:a},[o]:{color:x}}},["".concat(O,"-checkall")]:{width:"100%",marginBottom:l,marginInlineStart:l},["".concat(O,"-btns")]:{display:"flex",justifyContent:"space-between",padding:"".concat((0,nm.bf)(N(c).sub(d).equal())," ").concat((0,nm.bf)(c)),overflow:"hidden",borderTop:R}})}},{["".concat(n,"-dropdown ").concat(O,", ").concat(O,"-submenu")]:{["".concat(n,"-checkbox-wrapper + span")]:{paddingInlineStart:c,color:i},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},ok=e=>{let{componentCls:t,lineWidth:n,colorSplit:o,motionDurationSlow:r,zIndexTableFixed:a,tableBg:l,zIndexTableSticky:c,calc:i}=e;return{["".concat(t,"-wrapper")]:{["\n ".concat(t,"-cell-fix-left,\n ").concat(t,"-cell-fix-right\n ")]:{position:"sticky !important",zIndex:a,background:l},["\n ".concat(t,"-cell-fix-left-first::after,\n ").concat(t,"-cell-fix-left-last::after\n ")]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:i(n).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:"box-shadow ".concat(r),content:'""',pointerEvents:"none",willChange:"transform"},["".concat(t,"-cell-fix-left-all::after")]:{display:"none"},["\n ".concat(t,"-cell-fix-right-first::after,\n ").concat(t,"-cell-fix-right-last::after\n ")]:{position:"absolute",top:0,bottom:i(n).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:"box-shadow ".concat(r),content:'""',pointerEvents:"none"},["".concat(t,"-container")]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:i(c).add(1).equal({unit:!1}),width:30,transition:"box-shadow ".concat(r),content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},["".concat(t,"-ping-left")]:{["&:not(".concat(t,"-has-fix-left) ").concat(t,"-container::before")]:{boxShadow:"inset 10px 0 8px -8px ".concat(o)},["\n ".concat(t,"-cell-fix-left-first::after,\n ").concat(t,"-cell-fix-left-last::after\n ")]:{boxShadow:"inset 10px 0 8px -8px ".concat(o)},["".concat(t,"-cell-fix-left-last::before")]:{backgroundColor:"transparent !important"}},["".concat(t,"-ping-right")]:{["&:not(".concat(t,"-has-fix-right) ").concat(t,"-container::after")]:{boxShadow:"inset -10px 0 8px -8px ".concat(o)},["\n ".concat(t,"-cell-fix-right-first::after,\n ").concat(t,"-cell-fix-right-last::after\n ")]:{boxShadow:"inset -10px 0 8px -8px ".concat(o)}},["".concat(t,"-fixed-column-gapped")]:{["\n ".concat(t,"-cell-fix-left-first::after,\n ").concat(t,"-cell-fix-left-last::after,\n ").concat(t,"-cell-fix-right-first::after,\n ").concat(t,"-cell-fix-right-last::after\n ")]:{boxShadow:"none"}}}}},oC=e=>{let{componentCls:t,antCls:n,margin:o}=e;return{["".concat(t,"-wrapper ").concat(t,"-pagination").concat(n,"-pagination")]:{margin:"".concat((0,nm.bf)(o)," 0")}}},oE=e=>{let{componentCls:t,tableRadius:n}=e;return{["".concat(t,"-wrapper")]:{[t]:{["".concat(t,"-title, ").concat(t,"-header")]:{borderRadius:"".concat((0,nm.bf)(n)," ").concat((0,nm.bf)(n)," 0 0")},["".concat(t,"-title + ").concat(t,"-container")]:{borderStartStartRadius:0,borderStartEndRadius:0,["".concat(t,"-header, table")]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:"0 0 ".concat((0,nm.bf)(n)," ").concat((0,nm.bf)(n))}}}}},oS=e=>{let{componentCls:t}=e;return{["".concat(t,"-wrapper-rtl")]:{direction:"rtl",table:{direction:"rtl"},["".concat(t,"-pagination-left")]:{justifyContent:"flex-end"},["".concat(t,"-pagination-right")]:{justifyContent:"flex-start"},["".concat(t,"-row-expand-icon")]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},["".concat(t,"-container")]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},["".concat(t,"-row-indent")]:{float:"right"}}}}},oZ=e=>{let{componentCls:t,antCls:n,iconCls:o,fontSizeIcon:r,padding:a,paddingXS:l,headerIconColor:c,headerIconHoverColor:i,tableSelectionColumnWidth:d,tableSelectedRowBg:s,tableSelectedRowHoverBg:u,tableRowHoverBg:f,tablePaddingHorizontal:p,calc:m}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-selection-col")]:{width:d,["&".concat(t,"-selection-col-with-dropdown")]:{width:m(d).add(r).add(m(a).div(4)).equal()}},["".concat(t,"-bordered ").concat(t,"-selection-col")]:{width:m(d).add(m(l).mul(2)).equal(),["&".concat(t,"-selection-col-with-dropdown")]:{width:m(d).add(r).add(m(a).div(4)).add(m(l).mul(2)).equal()}},["\n table tr th".concat(t,"-selection-column,\n table tr td").concat(t,"-selection-column,\n ").concat(t,"-selection-column\n ")]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",["".concat(n,"-radio-wrapper")]:{marginInlineEnd:0}},["table tr th".concat(t,"-selection-column").concat(t,"-cell-fix-left")]:{zIndex:m(e.zIndexTableFixed).add(1).equal({unit:!1})},["table tr th".concat(t,"-selection-column::after")]:{backgroundColor:"transparent !important"},["".concat(t,"-selection")]:{position:"relative",display:"inline-flex",flexDirection:"column"},["".concat(t,"-selection-extra")]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:"all ".concat(e.motionDurationSlow),marginInlineStart:"100%",paddingInlineStart:(0,nm.bf)(m(p).div(4).equal()),[o]:{color:c,fontSize:r,verticalAlign:"baseline","&:hover":{color:i}}},["".concat(t,"-tbody")]:{["".concat(t,"-row")]:{["&".concat(t,"-row-selected")]:{["> ".concat(t,"-cell")]:{background:s,"&-row-hover":{background:u}}},["> ".concat(t,"-cell-row-hover")]:{background:f}}}}}},oN=e=>{let{componentCls:t,tableExpandColumnWidth:n,calc:o}=e,r=(e,r,a,l)=>({["".concat(t).concat(t,"-").concat(e)]:{fontSize:l,["\n ".concat(t,"-title,\n ").concat(t,"-footer,\n ").concat(t,"-cell,\n ").concat(t,"-thead > tr > th,\n ").concat(t,"-tbody > tr > th,\n ").concat(t,"-tbody > tr > td,\n tfoot > tr > th,\n tfoot > tr > td\n ")]:{padding:"".concat((0,nm.bf)(r)," ").concat((0,nm.bf)(a))},["".concat(t,"-filter-trigger")]:{marginInlineEnd:(0,nm.bf)(o(a).div(2).mul(-1).equal())},["".concat(t,"-expanded-row-fixed")]:{margin:"".concat((0,nm.bf)(o(r).mul(-1).equal())," ").concat((0,nm.bf)(o(a).mul(-1).equal()))},["".concat(t,"-tbody")]:{["".concat(t,"-wrapper:only-child ").concat(t)]:{marginBlock:(0,nm.bf)(o(r).mul(-1).equal()),marginInline:"".concat((0,nm.bf)(o(n).sub(a).equal())," ").concat((0,nm.bf)(o(a).mul(-1).equal()))}},["".concat(t,"-selection-extra")]:{paddingInlineStart:(0,nm.bf)(o(a).div(4).equal())}}});return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({},r("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),r("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},oK=e=>{let{componentCls:t,marginXXS:n,fontSizeIcon:o,headerIconColor:r,headerIconHoverColor:a}=e;return{["".concat(t,"-wrapper")]:{["".concat(t,"-thead th").concat(t,"-column-has-sorters")]:{outline:"none",cursor:"pointer",transition:"all ".concat(e.motionDurationSlow,", left 0s"),"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},["\n &".concat(t,"-cell-fix-left:hover,\n &").concat(t,"-cell-fix-right:hover\n ")]:{background:e.tableFixedHeaderSortActiveBg}},["".concat(t,"-thead th").concat(t,"-column-sort")]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},["td".concat(t,"-column-sort")]:{background:e.tableBodySortBg},["".concat(t,"-column-title")]:{position:"relative",zIndex:1,flex:1,minWidth:0},["".concat(t,"-column-sorters")]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},["".concat(t,"-column-sorters-tooltip-target-sorter")]:{"&::after":{content:"none"}},["".concat(t,"-column-sorter")]:{marginInlineStart:n,color:r,fontSize:0,transition:"color ".concat(e.motionDurationSlow),"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:o,"&.active":{color:e.colorPrimary}},["".concat(t,"-column-sorter-up + ").concat(t,"-column-sorter-down")]:{marginTop:"-0.3em"}},["".concat(t,"-column-sorters:hover ").concat(t,"-column-sorter")]:{color:a}}}},oO=e=>{let{componentCls:t,opacityLoading:n,tableScrollThumbBg:o,tableScrollThumbBgHover:r,tableScrollThumbSize:a,tableScrollBg:l,zIndexTableSticky:c,stickyScrollBarBorderRadius:i,lineWidth:d,lineType:s,tableBorderColor:u}=e,f="".concat((0,nm.bf)(d)," ").concat(s," ").concat(u);return{["".concat(t,"-wrapper")]:{["".concat(t,"-sticky")]:{"&-holder":{position:"sticky",zIndex:c,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:"".concat((0,nm.bf)(a)," !important"),zIndex:c,display:"flex",alignItems:"center",background:l,borderTop:f,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:a,backgroundColor:o,borderRadius:i,transition:"all ".concat(e.motionDurationSlow,", transform 0s"),position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:r}}}}}}},oI=e=>{let{componentCls:t,lineWidth:n,tableBorderColor:o,calc:r}=e,a="".concat((0,nm.bf)(n)," ").concat(e.lineType," ").concat(o);return{["".concat(t,"-wrapper")]:{["".concat(t,"-summary")]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},["div".concat(t,"-summary")]:{boxShadow:"0 ".concat((0,nm.bf)(r(n).mul(-1).equal())," 0 ").concat(o)}}}},oR=e=>{let{componentCls:t,motionDurationMid:n,lineWidth:o,lineType:r,tableBorderColor:a,calc:l}=e,c="".concat((0,nm.bf)(o)," ").concat(r," ").concat(a),i="".concat(t,"-expanded-row-cell");return{["".concat(t,"-wrapper")]:{["".concat(t,"-tbody-virtual")]:{["".concat(t,"-tbody-virtual-holder-inner")]:{["\n & > ".concat(t,"-row, \n & > div:not(").concat(t,"-row) > ").concat(t,"-row\n ")]:{display:"flex",boxSizing:"border-box",width:"100%"}},["".concat(t,"-cell")]:{borderBottom:c,transition:"background ".concat(n)},["".concat(t,"-expanded-row")]:{["".concat(i).concat(i,"-fixed")]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:"calc(var(--virtual-width) - ".concat((0,nm.bf)(o),")"),borderInlineEnd:"none"}}},["".concat(t,"-bordered")]:{["".concat(t,"-tbody-virtual")]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:c,position:"absolute"},["".concat(t,"-cell")]:{borderInlineEnd:c,["&".concat(t,"-cell-fix-right-first:before")]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:l(o).mul(-1).equal(),borderInlineStart:c}}},["&".concat(t,"-virtual")]:{["".concat(t,"-placeholder ").concat(t,"-cell")]:{borderInlineEnd:c,borderBottom:c}}}}}};let oP=e=>{let{componentCls:t,fontWeightStrong:n,tablePaddingVertical:o,tablePaddingHorizontal:r,tableExpandColumnWidth:a,lineWidth:l,lineType:c,tableBorderColor:i,tableFontSize:d,tableBg:s,tableRadius:u,tableHeaderTextColor:f,motionDurationMid:p,tableHeaderBg:m,tableHeaderCellSplitColor:h,tableFooterTextColor:v,tableFooterBg:g,calc:b}=e,y="".concat((0,nm.bf)(l)," ").concat(c," ").concat(i);return{["".concat(t,"-wrapper")]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},(0,nv.dF)()),{[t]:Object.assign(Object.assign({},(0,nv.Wf)(e)),{fontSize:d,background:s,borderRadius:"".concat((0,nm.bf)(u)," ").concat((0,nm.bf)(u)," 0 0"),scrollbarColor:"".concat(e.tableScrollThumbBg," ").concat(e.tableScrollBg)}),table:{width:"100%",textAlign:"start",borderRadius:"".concat((0,nm.bf)(u)," ").concat((0,nm.bf)(u)," 0 0"),borderCollapse:"separate",borderSpacing:0},["\n ".concat(t,"-cell,\n ").concat(t,"-thead > tr > th,\n ").concat(t,"-tbody > tr > th,\n ").concat(t,"-tbody > tr > td,\n tfoot > tr > th,\n tfoot > tr > td\n ")]:{position:"relative",padding:"".concat((0,nm.bf)(o)," ").concat((0,nm.bf)(r)),overflowWrap:"break-word"},["".concat(t,"-title")]:{padding:"".concat((0,nm.bf)(o)," ").concat((0,nm.bf)(r))},["".concat(t,"-thead")]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:f,fontWeight:n,textAlign:"start",background:m,borderBottom:y,transition:"background ".concat(p," ease"),"&[colspan]:not([colspan='1'])":{textAlign:"center"},["&:not(:last-child):not(".concat(t,"-selection-column):not(").concat(t,"-row-expand-icon-cell):not([colspan])::before")]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:h,transform:"translateY(-50%)",transition:"background-color ".concat(p),content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},["".concat(t,"-tbody")]:{"> tr":{"> th, > td":{transition:"background ".concat(p,", border-color ").concat(p),borderBottom:y,["\n > ".concat(t,"-wrapper:only-child,\n > ").concat(t,"-expanded-row-fixed > ").concat(t,"-wrapper:only-child\n ")]:{[t]:{marginBlock:(0,nm.bf)(b(o).mul(-1).equal()),marginInline:"".concat((0,nm.bf)(b(a).sub(r).equal()),"\n ").concat((0,nm.bf)(b(r).mul(-1).equal())),["".concat(t,"-tbody > tr:last-child > td")]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:f,fontWeight:n,textAlign:"start",background:m,borderBottom:y,transition:"background ".concat(p," ease")},["& > ".concat(t,"-measure-cell")]:{paddingBlock:"0 !important",borderBlock:"0 !important",["".concat(t,"-measure-cell-content")]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},["".concat(t,"-footer")]:{padding:"".concat((0,nm.bf)(o)," ").concat((0,nm.bf)(r)),color:v,background:g}})}};var oM=(0,ny.I$)("Table",e=>{let{colorTextHeading:t,colorSplit:n,colorBgContainer:o,controlInteractiveSize:r,headerBg:a,headerColor:l,headerSortActiveBg:c,headerSortHoverBg:i,bodySortBg:d,rowHoverBg:s,rowSelectedBg:u,rowSelectedHoverBg:f,rowExpandedBg:p,cellPaddingBlock:m,cellPaddingInline:h,cellPaddingBlockMD:v,cellPaddingInlineMD:g,cellPaddingBlockSM:b,cellPaddingInlineSM:y,borderColor:x,footerBg:w,footerColor:k,headerBorderRadius:C,cellFontSize:E,cellFontSizeMD:S,cellFontSizeSM:Z,headerSplitColor:N,fixedHeaderSortActiveBg:K,headerFilterHoverBg:O,filterDropdownBg:I,expandIconBg:R,selectionColumnWidth:P,stickyScrollBarBg:M,calc:T}=e,D=(0,nb.IX)(e,{tableFontSize:E,tableBg:o,tableRadius:C,tablePaddingVertical:m,tablePaddingHorizontal:h,tablePaddingVerticalMiddle:v,tablePaddingHorizontalMiddle:g,tablePaddingVerticalSmall:b,tablePaddingHorizontalSmall:y,tableBorderColor:x,tableHeaderTextColor:l,tableHeaderBg:a,tableFooterTextColor:k,tableFooterBg:w,tableHeaderCellSplitColor:N,tableHeaderSortBg:c,tableHeaderSortHoverBg:i,tableBodySortBg:d,tableFixedHeaderSortActiveBg:K,tableHeaderFilterActiveBg:O,tableFilterDropdownBg:I,tableRowHoverBg:s,tableSelectedRowBg:u,tableSelectedRowHoverBg:f,zIndexTableFixed:2,zIndexTableSticky:T(2).add(1).equal({unit:!1}),tableFontSizeMiddle:S,tableFontSizeSmall:Z,tableSelectionColumnWidth:P,tableExpandIconBg:R,tableExpandColumnWidth:T(r).add(T(e.padding).mul(2)).equal(),tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:M,tableScrollThumbBgHover:t,tableScrollBg:n});return[oP(D),oC(D),oI(D),oK(D),ow(D),og(D),oE(D),ox(D),oI(D),oy(D),oZ(D),ok(D),oO(D),ob(D),oN(D),oS(D),oR(D)]},e=>{let{colorFillAlter:t,colorBgContainer:n,colorTextHeading:o,colorFillSecondary:r,colorFillContent:a,controlItemBgActive:l,controlItemBgActiveHover:c,padding:i,paddingSM:d,paddingXS:s,colorBorderSecondary:u,borderRadiusLG:f,controlHeight:p,colorTextPlaceholder:m,fontSize:h,fontSizeSM:v,lineHeight:g,lineWidth:b,colorIcon:y,colorIconHover:x,opacityLoading:w,controlInteractiveSize:k}=e,C=new ov.t(r).onBackground(n).toHexString(),E=new ov.t(a).onBackground(n).toHexString(),S=new ov.t(t).onBackground(n).toHexString(),Z=new ov.t(y),N=new ov.t(x),K=k/2-b,O=2*K+3*b;return{headerBg:S,headerColor:o,headerSortActiveBg:C,headerSortHoverBg:E,bodySortBg:S,rowHoverBg:S,rowSelectedBg:l,rowSelectedHoverBg:c,rowExpandedBg:t,cellPaddingBlock:i,cellPaddingInline:i,cellPaddingBlockMD:d,cellPaddingInlineMD:s,cellPaddingBlockSM:s,cellPaddingInlineSM:s,borderColor:u,headerBorderRadius:f,footerBg:S,footerColor:o,cellFontSize:h,cellFontSizeMD:h,cellFontSizeSM:h,headerSplitColor:u,fixedHeaderSortActiveBg:C,headerFilterHoverBg:a,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:p,stickyScrollBarBg:m,stickyScrollBarBorderRadius:100,expandIconMarginTop:(h*g-3*b)/2-Math.ceil((1.4*v-3*b)/2),headerIconColor:Z.clone().setA(Z.a*w).toRgbString(),headerIconHoverColor:N.clone().setA(N.a*w).toRgbString(),expandIconHalfInner:K,expandIconSize:O,expandIconScale:k/O}},{unitless:{expandIconScale:!0}});let oT=[];var oD=o.forwardRef((e,t)=>{var n,r;let{prefixCls:l,className:c,rootClassName:i,style:d,size:s,bordered:u,dropdownPrefixCls:f,dataSource:p,pagination:m,rowSelection:h,rowKey:v="key",rowClassName:g,columns:b,children:y,childrenColumnName:x,onChange:w,getPopupContainer:k,loading:C,expandIcon:E,expandable:S,expandedRowRender:N,expandIconColumnIndex:K,indentSize:O,scroll:I,sortDirections:R,locale:P,showSorterTooltip:M={target:"full-header"},virtual:T}=e;(0,tc.ln)("Table");let D=o.useMemo(()=>b||ev(y),[b,y]),L=o.useMemo(()=>D.some(e=>e.responsive),[D]),j=(0,tZ.Z)(L),B=o.useMemo(()=>{let e=new Set(Object.keys(j).filter(e=>j[e]));return D.filter(t=>!t.responsive||t.responsive.some(t=>e.has(t)))},[D,j]),H=(0,eq.Z)(e,["className","style","columns"]),{locale:z=tN.Z,direction:A,table:W,renderEmpty:_,getPrefixCls:F,getPopupContainer:q}=o.useContext(tk.E_),V=(0,tS.Z)(s),X=Object.assign(Object.assign({},z.Table),P),U=p||oT,G=F("table",l),Y=F("dropdown",f),[,$]=(0,tI.ZP)(),J=(0,tE.Z)(G),[Q,ee,et]=oM(G,J),en=Object.assign(Object.assign({childrenColumnName:x,expandIconColumnIndex:K},S),{expandIcon:null!==(n=null==S?void 0:S.expandIcon)&&void 0!==n?n:null===(r=null==W?void 0:W.expandable)||void 0===r?void 0:r.expandIcon}),{childrenColumnName:eo="children"}=en,er=o.useMemo(()=>U.some(e=>null==e?void 0:e[eo])?"nest":N||(null==S?void 0:S.expandedRowRender)?"row":null,[U]),ea={body:o.useRef(null)},el=o.useRef(null),ec=o.useRef(null);tb(t,()=>Object.assign(Object.assign({},ec.current),{nativeElement:el.current}));let ei=o.useMemo(()=>"function"==typeof v?v:e=>null==e?void 0:e[v],[v]),[ed]=n3(U,eo,ei),es={},eu=function(e,t){var n,o,r,a;let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],c=Object.assign(Object.assign({},es),e);l&&(null===(n=es.resetPagination)||void 0===n||n.call(es),(null===(o=c.pagination)||void 0===o?void 0:o.current)&&(c.pagination.current=1),m&&(null===(r=m.onChange)||void 0===r||r.call(m,1,null===(a=c.pagination)||void 0===a?void 0:a.pageSize))),I&&!1!==I.scrollToFirstRowOnChange&&ea.body.current&&function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{getContainer:n=()=>window,callback:o,duration:r=450}=t,a=n(),l=tx(a),c=Date.now(),i=()=>{let t=Date.now()-c,n=function(e,t,n,o){let r=n-t;return(e/=o/2)<1?r/2*e*e*e+t:r/2*((e-=2)*e*e+2)+t}(t>r?r:t,l,e,r);ty(a)?a.scrollTo(window.pageXOffset,n):a instanceof Document||"HTMLDocument"===a.constructor.name?a.documentElement.scrollTop=n:a.scrollTop=n,tea.body.current}),null==w||w(c.pagination,c.filters,c.sorter,{currentDataSource:n0(os(U,c.sorterStates,eo),c.filterStates,eo),action:t})},[ef,ep,em,eh]=ou({prefixCls:G,mergedColumns:B,onSorterChange:(e,t)=>{eu({sorter:e,sorterStates:t},"sort",!1)},sortDirections:R||["ascend","descend"],tableLocale:X,showSorterTooltip:M}),eg=o.useMemo(()=>os(U,ep,eo),[U,ep]);es.sorter=eh(),es.sorterStates=ep;let[eb,ey,ex]=n2({prefixCls:G,locale:X,dropdownPrefixCls:Y,mergedColumns:B,onFilterChange:(e,t)=>{eu({filters:e,filterStates:t},"filter",!0)},getPopupContainer:k||q,rootClassName:Z()(i,J)}),ew=n0(eg,ey,eo);es.filters=ex,es.filterStates=ey;let[eC]=op(o.useMemo(()=>{let e={};return Object.keys(ex).forEach(t=>{null!==ex[t]&&(e[t]=ex[t])}),Object.assign(Object.assign({},em),{filters:e})},[em,ex])),[eE,eS]=n8(ew.length,(e,t)=>{eu({pagination:Object.assign(Object.assign({},es.pagination),{current:e,pageSize:t})},"paginate")},m);es.pagination=!1===m?{}:function(e,t){let n={current:e.current,pageSize:e.pageSize};return Object.keys(t&&"object"==typeof t?t:{}).forEach(t=>{let o=e[t];"function"!=typeof o&&(n[t]=o)}),n}(eE,m),es.resetPagination=eS;let eZ=o.useMemo(()=>{if(!1===m||!eE.pageSize)return ew;let{current:e=1,total:t,pageSize:n=10}=eE;return ew.lengthn?ew.slice((e-1)*n,e*n):ew:ew.slice((e-1)*n,e*n)},[!!m,ew,null==eE?void 0:eE.current,null==eE?void 0:eE.pageSize,null==eE?void 0:eE.total]),[eN,eK]=tg({prefixCls:G,data:ew,pageData:eZ,getRowKey:ei,getRecordByKey:ed,expandType:er,childrenColumnName:eo,locale:X,getPopupContainer:k||q},h);en.__PARENT_RENDER_ICON__=en.expandIcon,en.expandIcon=en.expandIcon||E||(e=>{let{prefixCls:t,onExpand:n,record:r,expanded:a,expandable:l}=e,c="".concat(t,"-row-expand-icon");return o.createElement("button",{type:"button",onClick:e=>{n(r,e),e.stopPropagation()},className:Z()(c,{["".concat(c,"-spaced")]:!l,["".concat(c,"-expanded")]:l&&a,["".concat(c,"-collapsed")]:l&&!a}),"aria-label":a?X.collapse:X.expand,"aria-expanded":a})}),"nest"===er&&void 0===en.expandIconColumnIndex?en.expandIconColumnIndex=h?1:0:en.expandIconColumnIndex>0&&h&&(en.expandIconColumnIndex-=1),"number"!=typeof en.indentSize&&(en.indentSize="number"==typeof O?O:15);let eO=o.useCallback(e=>eC(eN(eb(ef(e)))),[ef,eb,eN]),eI=o.useMemo(()=>"boolean"==typeof C?{spinning:C}:"object"==typeof C&&null!==C?Object.assign({spinning:!0},C):void 0,[C]),eR=Z()(et,J,"".concat(G,"-wrapper"),null==W?void 0:W.className,{["".concat(G,"-wrapper-rtl")]:"rtl"===A},c,i,ee),eP=Object.assign(Object.assign({},null==W?void 0:W.style),d),eM=o.useMemo(()=>(null==eI?void 0:eI.spinning)&&U===oT?null:void 0!==(null==P?void 0:P.emptyText)?P.emptyText:(null==_?void 0:_("Table"))||o.createElement(tC.Z,{componentName:"Table"}),[null==eI?void 0:eI.spinning,U,null==P?void 0:P.emptyText,_]),eT={},eD=o.useMemo(()=>{let{fontSize:e,lineHeight:t,lineWidth:n,padding:o,paddingXS:r,paddingSM:a}=$,l=Math.floor(e*t);switch(V){case"middle":return 2*a+l+n;case"small":return 2*r+l+n;default:return 2*o+l+n}},[$,V]);T&&(eT.listItemHeight=eD);let{top:eL,bottom:ej}=(()=>{if(!1===m||!(null==eE?void 0:eE.total))return{};let e=()=>eE.size||("small"===V||"middle"===V?"small":void 0),t=t=>o.createElement(tK.Z,Object.assign({},eE,{align:eE.align||("left"===t?"start":"right"===t?"end":t),className:Z()("".concat(G,"-pagination"),eE.className),size:e()})),n="rtl"===A?"left":"right",r=eE.position;if(null===r||!Array.isArray(r))return{bottom:t(n)};let a=r.find(e=>"string"==typeof e&&e.toLowerCase().includes("top")),l=r.find(e=>"string"==typeof e&&e.toLowerCase().includes("bottom")),c=r.every(e=>"none"==="".concat(e)),i=a?a.toLowerCase().replace("top",""):"",d=l?l.toLowerCase().replace("bottom",""):"";return{top:i?t(i):void 0,bottom:d?t(d):a||l||c?void 0:t(n)}})();return Q(o.createElement("div",{ref:el,className:eR,style:eP},o.createElement(tO.Z,Object.assign({spinning:!1},eI),eL,o.createElement(T?oh:om,Object.assign({},eT,H,{ref:ec,columns:B,direction:A,expandable:en,prefixCls:G,className:Z()({["".concat(G,"-middle")]:"middle"===V,["".concat(G,"-small")]:"small"===V,["".concat(G,"-bordered")]:u,["".concat(G,"-empty")]:0===U.length},et,J,ee),data:eZ,rowKey:ei,rowClassName:(e,t,n)=>{let o;return o="function"==typeof g?Z()(g(e,t,n)):Z()(g),Z()({["".concat(G,"-row-selected")]:eK.has(ei(e,t))},o)},emptyText:eM,internalHooks:a,internalRefs:ea,transformColumns:eO,getContainerWidth:(e,t)=>{let n=e.querySelector(".".concat(G,"-container")),o=t;if(n){let e=getComputedStyle(n);o=t-Number.parseInt(e.borderLeftWidth,10)-Number.parseInt(e.borderRightWidth,10)}return o},measureRowRender:e=>o.createElement(tw.ZP,{getPopupContainer:e=>e},e)})),ej)))});let oL=o.forwardRef((e,t)=>{let n=o.useRef(0);return n.current+=1,o.createElement(oD,Object.assign({},e,{ref:t,_renderTimes:n.current}))});oL.SELECTION_COLUMN=tu,oL.EXPAND_COLUMN=r,oL.SELECTION_ALL=tf,oL.SELECTION_INVERT=tp,oL.SELECTION_NONE=tm,oL.Column=e=>null,oL.ColumnGroup=e=>null,oL.Summary=H;var oj=oL}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/665-05a55da381817c0d.js b/litellm/proxy/_experimental/out/_next/static/chunks/665-05a55da381817c0d.js
deleted file mode 100644
index bc3eb86e6fd..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/665-05a55da381817c0d.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[665],{84717:function(e,s,a){a.d(s,{Ct:function(){return t.Z},Dx:function(){return x.Z},OK:function(){return n.Z},Zb:function(){return r.Z},nP:function(){return m.Z},rj:function(){return i.Z},td:function(){return o.Z},v0:function(){return d.Z},x4:function(){return c.Z},xv:function(){return u.Z},zx:function(){return l.Z}});var t=a(41649),l=a(78489),r=a(12514),i=a(67101),n=a(12485),d=a(18135),o=a(35242),c=a(29706),m=a(77991),u=a(84264),x=a(96761)},40728:function(e,s,a){a.d(s,{C:function(){return t.Z},x:function(){return l.Z}});var t=a(41649),l=a(84264)},64504:function(e,s,a){a.d(s,{o:function(){return l.Z},z:function(){return t.Z}});var t=a(78489),l=a(49566)},49282:function(e,s,a){var t=a(2265),l=a(39760),r=a(39623);s.Z=()=>{let[e,s]=(0,t.useState)([]),{accessToken:a,userId:i,userRole:n}=(0,l.Z)();return(0,t.useEffect)(()=>{(async()=>{s(await (0,r.Z)(a,i,n,null))})()},[a,i,n]),{teams:e,setTeams:s}}},39623:function(e,s,a){a.d(s,{Z:function(){return l}});var t=a(19250);let l=async(e,s,a,l)=>"Admin"!=a&&"Admin Viewer"!=a?await (0,t.teamListCall)(e,(null==l?void 0:l.organization_id)||null,s):await (0,t.teamListCall)(e,(null==l?void 0:l.organization_id)||null)},21609:function(e,s,a){a.d(s,{Z:function(){return c}});var t=a(57437),l=a(57840),r=a(22116),i=a(51653),n=a(76188),d=a(4260),o=a(2265);function c(e){let{isOpen:s,title:a,alertMessage:c,message:m,resourceInformationTitle:u,resourceInformation:x,onCancel:g,onOk:h,confirmLoading:p,requiredConfirmation:v}=e,{Title:j,Text:y}=l.default,[b,_]=(0,o.useState)("");return(0,o.useEffect)(()=>{s&&_("")},[s]),(0,t.jsx)(r.Z,{title:a,open:s,onOk:h,onCancel:g,confirmLoading:p,okText:p?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!v&&b!==v||p},cancelButtonProps:{disabled:p},children:(0,t.jsxs)("div",{className:"space-y-4",children:[c&&(0,t.jsx)(i.Z,{message:c,type:"warning"}),(0,t.jsxs)("div",{className:"mt-4 p-4 bg-red-50 rounded-lg border border-red-200",children:[(0,t.jsx)(j,{level:5,className:"mb-3 text-gray-900",children:u}),(0,t.jsx)(n.Z,{column:1,size:"small",children:x&&x.map(e=>{let{label:s,value:a,...l}=e;return(0,t.jsx)(n.Z.Item,{label:(0,t.jsx)("span",{className:"font-semibold text-gray-700",children:s}),children:(0,t.jsx)(y,{...l,children:null!=a?a:"-"})},s)})})]}),(0,t.jsx)("div",{children:(0,t.jsx)(y,{children:m})}),v&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200",children:[(0,t.jsxs)(y,{className:"block text-base font-medium text-gray-700 mb-2",children:[(0,t.jsx)(y,{children:"Type "}),(0,t.jsx)(y,{strong:!0,type:"danger",children:v}),(0,t.jsx)(y,{children:" to confirm deletion:"})]}),(0,t.jsx)(d.default,{value:b,onChange:e=>_(e.target.value),placeholder:v,className:"rounded-md text-base border-gray-200",autoFocus:!0})]})]})})}},67479:function(e,s,a){var t=a(57437),l=a(2265),r=a(37592),i=a(19250);s.Z=e=>{let{onChange:s,value:a,className:n,accessToken:d,disabled:o}=e,[c,m]=(0,l.useState)([]),[u,x]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(d){x(!0);try{let e=await (0,i.getGuardrailsList)(d);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),m(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{x(!1)}}})()},[d]),(0,t.jsx)("div",{children:(0,t.jsx)(r.default,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:e=>{console.log("Selected guardrails:",e),s(e)},value:a,loading:u,className:n,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:"".concat(e.guardrail_name),value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}},27799:function(e,s,a){var t=a(57437);a(2265);var l=a(40728),r=a(82182),i=a(91777),n=a(97434);s.Z=function(e){let{loggingConfigs:s=[],disabledCallbacks:a=[],variant:d="card",className:o=""}=e,c=e=>{var s;return(null===(s=Object.entries(n.Lo).find(s=>{let[a,t]=s;return t===e}))||void 0===s?void 0:s[0])||e},m=e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return"gray"}},u=e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}},x=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.Z,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(l.x,{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,t.jsx)(l.C,{color:"blue",size:"xs",children:s.length})]}),s.length>0?(0,t.jsx)("div",{className:"space-y-3",children:s.map((e,s)=>{var a;let i=c(e.callback_name),d=null===(a=n.Dg[i])||void 0===a?void 0:a.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d?(0,t.jsx)("img",{src:d,alt:i,className:"w-5 h-5 object-contain"}):(0,t.jsx)(r.Z,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(l.x,{className:"font-medium text-blue-800",children:i}),(0,t.jsxs)(l.x,{className:"text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,t.jsx)(l.C,{color:m(e.callback_type),size:"sm",children:u(e.callback_type)})]},s)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(r.Z,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(l.x,{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.Z,{className:"h-4 w-4 text-red-600"}),(0,t.jsx)(l.x,{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,t.jsx)(l.C,{color:"red",size:"xs",children:a.length})]}),a.length>0?(0,t.jsx)("div",{className:"space-y-3",children:a.map((e,s)=>{var a;let r=n.RD[e]||e,d=null===(a=n.Dg[r])||void 0===a?void 0:a.logo;return(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[d?(0,t.jsx)("img",{src:d,alt:r,className:"w-5 h-5 object-contain"}):(0,t.jsx)(i.Z,{className:"h-5 w-5 text-gray-400"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(l.x,{className:"font-medium text-red-800",children:r}),(0,t.jsx)(l.x,{className:"text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,t.jsx)(l.C,{color:"red",size:"sm",children:"Disabled"})]},s)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(i.Z,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(l.x,{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===d?(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(o),children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(l.x,{className:"font-semibold text-gray-900",children:"Logging Settings"}),(0,t.jsx)(l.x,{className:"text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),x]}):(0,t.jsxs)("div",{className:"".concat(o),children:[(0,t.jsx)(l.x,{className:"font-medium text-gray-900 mb-3",children:"Logging Settings"}),x]})}},60131:function(e,s,a){a.d(s,{Z:function(){return v}});var t=a(57437),l=a(2265),r=a(92280),i=a(40728),n=a(79814),d=a(19250),o=function(e){let{vectorStores:s,accessToken:a}=e,[r,o]=(0,l.useState)([]);(0,l.useEffect)(()=>{(async()=>{if(a&&0!==s.length)try{let e=await (0,d.vectorStoreListCall)(a);e.data&&o(e.data.map(e=>({vector_store_id:e.vector_store_id,vector_store_name:e.vector_store_name})))}catch(e){console.error("Error fetching vector stores:",e)}})()},[a,s.length]);let c=e=>{let s=r.find(s=>s.vector_store_id===e);return s?"".concat(s.vector_store_name||s.vector_store_id," (").concat(s.vector_store_id,")"):e};return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.Z,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(i.x,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,t.jsx)(i.C,{color:"blue",size:"xs",children:s.length})]}),s.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map((e,s)=>(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-sm font-medium",children:c(e)},s))}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(n.Z,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(i.x,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},c=a(25327),m=a(86462),u=a(47686),x=a(99981),g=function(e){let{mcpServers:s,mcpAccessGroups:r=[],mcpToolPermissions:n={},accessToken:o}=e,[g,h]=(0,l.useState)([]),[p,v]=(0,l.useState)([]),[j,y]=(0,l.useState)(new Set),b=e=>{y(s=>{let a=new Set(s);return a.has(e)?a.delete(e):a.add(e),a})};(0,l.useEffect)(()=>{(async()=>{if(o&&s.length>0)try{let e=await (0,d.fetchMCPServers)(o);e&&Array.isArray(e)?h(e):e.data&&Array.isArray(e.data)&&h(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[o,s.length]),(0,l.useEffect)(()=>{(async()=>{if(o&&r.length>0)try{let e=await Promise.resolve().then(a.bind(a,19250)).then(e=>e.fetchMCPAccessGroups(o));v(Array.isArray(e)?e:e.data||[])}catch(e){console.error("Error fetching MCP access groups:",e)}})()},[o,r.length]);let _=e=>{let s=g.find(s=>s.server_id===e);if(s){let a=e.length>7?"".concat(e.slice(0,3),"...").concat(e.slice(-4)):e;return"".concat(s.alias," (").concat(a,")")}return e},f=e=>e,N=[...s.map(e=>({type:"server",value:e})),...r.map(e=>({type:"accessGroup",value:e}))],w=N.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.Z,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(i.x,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,t.jsx)(i.C,{color:"blue",size:"xs",children:w})]}),w>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:N.map((e,s)=>{let a="server"===e.type?n[e.value]:void 0,l=a&&a.length>0,r=j.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>l&&b(e.value),className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ".concat(l?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"),children:[(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,t.jsx)(x.Z,{title:"Full ID: ".concat(e.value),placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:_(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:f(e.value)}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),l&&(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:a.length}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===a.length?"tool":"tools"}),r?(0,t.jsx)(m.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(u.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),l&&r&&(0,t.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:a.map((e,s)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-xs font-medium",children:e},s))})})]},s)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(c.Z,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(i.x,{className:"text-gray-500 text-sm",children:"No MCP servers or access groups configured"})]})]})},h=a(3497),p=function(e){let{agents:s,agentAccessGroups:a=[],accessToken:r}=e,[n,o]=(0,l.useState)([]);(0,l.useEffect)(()=>{(async()=>{if(r&&s.length>0)try{let e=await (0,d.getAgentsList)(r);e&&e.agents&&Array.isArray(e.agents)&&o(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[r,s.length]);let c=e=>{let s=n.find(s=>s.agent_id===e);if(s){let a=e.length>7?"".concat(e.slice(0,3),"...").concat(e.slice(-4)):e;return"".concat(s.agent_name," (").concat(a,")")}return e},m=[...s.map(e=>({type:"agent",value:e})),...a.map(e=>({type:"accessGroup",value:e}))],u=m.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(h.Z,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(i.x,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(i.C,{color:"purple",size:"xs",children:u})]}),u>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:m.map((e,s)=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)("div",{className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 bg-white",children:(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"agent"===e.type?(0,t.jsx)(x.Z,{title:"Full ID: ".concat(e.value),placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-purple-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:c(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded uppercase tracking-wide flex-shrink-0",children:"Group"})]})})})},s))}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(h.Z,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(i.x,{className:"text-gray-500 text-sm",children:"No agents or access groups configured"})]})]})},v=function(e){let{objectPermission:s,variant:a="card",className:l="",accessToken:i}=e,n=(null==s?void 0:s.vector_stores)||[],d=(null==s?void 0:s.mcp_servers)||[],c=(null==s?void 0:s.mcp_access_groups)||[],m=(null==s?void 0:s.mcp_tool_permissions)||{},u=(null==s?void 0:s.agents)||[],x=(null==s?void 0:s.agent_access_groups)||[],h=(0,t.jsxs)("div",{className:"card"===a?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(o,{vectorStores:n,accessToken:i}),(0,t.jsx)(g,{mcpServers:d,mcpAccessGroups:c,mcpToolPermissions:m,accessToken:i}),(0,t.jsx)(p,{agents:u,agentAccessGroups:x,accessToken:i})]});return"card"===a?(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(l),children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(r.x,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,t.jsx)(r.x,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),h]}):(0,t.jsxs)("div",{className:"".concat(l),children:[(0,t.jsx)(r.x,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),h]})}},87972:function(e,s,a){var t=a(57437),l=a(2265),r=a(37592),i=a(19250);s.Z=e=>{let{onChange:s,value:a,className:n,accessToken:d,disabled:o}=e,[c,m]=(0,l.useState)([]),[u,x]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(d){x(!0);try{let e=await (0,i.getPoliciesList)(d);console.log("Policies response:",e),e.policies&&(console.log("Policies data:",e.policies),m(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{x(!1)}}})()},[d]),(0,t.jsx)("div",{children:(0,t.jsx)(r.default,{mode:"multiple",disabled:o,placeholder:o?"Setting policies is a premium feature.":"Select policies",onChange:e=>{console.log("Selected policies:",e),s(e)},value:a,loading:u,className:n,allowClear:!0,options:c.map(e=>(console.log("Mapping policy:",e),{label:"".concat(e.policy_name).concat(e.description?" - ".concat(e.description):""),value:e.policy_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}},21425:function(e,s,a){var t=a(57437);a(2265);var l=a(54507);s.Z=e=>{let{value:s,onChange:a,disabledCallbacks:r=[],onDisabledCallbacksChange:i}=e;return(0,t.jsx)(l.Z,{value:s,onChange:a,disabledCallbacks:r,onDisabledCallbacksChange:i})}},50665:function(e,s,a){a.d(s,{Z:function(){return ec}});var t=a(57437),l=a(49282),r=a(59872),i=a(33304),n=a(10900),d=a(23628),o=a(74998),c=a(84717),m=a(10032),u=a(5545),x=a(99981),g=a(30401),h=a(78867),p=a(2265),v=a(20347),j=a(97434),y=a(40728),b=a(58710),_=e=>{let{autoRotate:s=!1,rotationInterval:a,lastRotationAt:l,keyRotationAt:r,nextRotationAt:i,variant:n="card",className:o=""}=e,c=e=>{let s=new Date(e),a=s.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),t=s.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return"".concat(a," at ").concat(t)},m=(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"space-y-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Z,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(y.x,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(y.C,{color:s?"green":"gray",size:"xs",children:s?"Enabled":"Disabled"}),s&&a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.x,{className:"text-gray-400",children:"•"}),(0,t.jsxs)(y.x,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(s||l||r||i)&&(0,t.jsxs)("div",{className:"space-y-3",children:[l&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(b.Z,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(y.x,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,t.jsx)(y.x,{className:"text-sm text-gray-600",children:c(l)})]})]}),(r||i)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,t.jsx)(b.Z,{className:"w-4 h-4 text-gray-500"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)(y.x,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,t.jsx)(y.x,{className:"text-sm text-gray-600",children:c(i||r||"")})]})]}),s&&!l&&!r&&!i&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(b.Z,{className:"w-4 h-4 text-gray-500"}),(0,t.jsx)(y.x,{className:"text-gray-600",children:"No rotation history available"})]})]}),!s&&!l&&!r&&!i&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,t.jsx)(d.Z,{className:"w-4 h-4 text-gray-400"}),(0,t.jsx)(y.x,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===n?(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(o),children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(y.x,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,t.jsx)(y.x,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),m]}):(0,t.jsxs)("div",{className:"".concat(o),children:[(0,t.jsx)(y.x,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),m]})},f=a(21609);let N=["logging"],w=e=>e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(e=>{let[s]=e;return!N.includes(s)})):{},k=e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],Z=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return JSON.stringify(w(e),null,s)},S=e=>{if(!e||"object"!=typeof e)return e;let{tags:s,...a}=e;return a};var C=a(27799),A=a(9114),I=a(19250),P=a(60131),L=a(39760),D=a(78489),M=a(49804),T=a(67101),E=a(84264),R=a(49566),F=a(96761),V=a(22116),O=a(19015),z=a(92668),K=a(29233);function G(e){let{selectedToken:s,visible:a,onClose:l,onKeyUpdate:r}=e,{accessToken:i}=(0,L.Z)(),[n]=m.Z.useForm(),[d,o]=(0,p.useState)(null),[c,u]=(0,p.useState)(null),[x,g]=(0,p.useState)(null),[h,v]=(0,p.useState)(!1),[j,y]=(0,p.useState)(!1),[b,_]=(0,p.useState)(null);(0,p.useEffect)(()=>{a&&s&&i&&(n.setFieldsValue({key_alias:s.key_alias,max_budget:s.max_budget,tpm_limit:s.tpm_limit,rpm_limit:s.rpm_limit,duration:s.duration||""}),_(i),y(s.key_name===i))},[a,s,n,i]),(0,p.useEffect)(()=>{a||(o(null),v(!1),y(!1),_(null),n.resetFields())},[a,n]);let f=e=>{if(!e)return null;try{let s;let a=new Date;if(e.endsWith("s"))s=(0,z.I)(a,{seconds:parseInt(e)});else if(e.endsWith("h"))s=(0,z.I)(a,{hours:parseInt(e)});else if(e.endsWith("d"))s=(0,z.I)(a,{days:parseInt(e)});else throw Error("Invalid duration format");return s.toLocaleString()}catch(e){return null}};(0,p.useEffect)(()=>{(null==c?void 0:c.duration)?g(f(c.duration)):g(null)},[null==c?void 0:c.duration]);let N=async()=>{if(s&&b){v(!0);try{let e=await n.validateFields(),a=await (0,I.regenerateKeyCall)(b,s.token||s.token_id,e);o(a.key),A.Z.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let t={token:a.token||a.key_id||s.token,key_name:a.key,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,expires:e.duration?f(e.duration):s.expires,...a};console.log("Updated key data with new token:",t),r&&r(t),v(!1)}catch(e){console.error("Error regenerating key:",e),A.Z.fromBackend(e),v(!1)}}},w=()=>{o(null),v(!1),y(!1),_(null),n.resetFields(),l()};return(0,t.jsx)(V.Z,{title:"Regenerate Virtual Key",open:a,onCancel:w,footer:d?[(0,t.jsx)(D.Z,{onClick:w,children:"Close"},"close")]:[(0,t.jsx)(D.Z,{onClick:w,className:"mr-2",children:"Cancel"},"cancel"),(0,t.jsx)(D.Z,{onClick:N,disabled:h,children:h?"Regenerating...":"Regenerate"},"regenerate")],children:d?(0,t.jsxs)(T.Z,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(F.Z,{children:"Regenerated Key"}),(0,t.jsx)(M.Z,{numColSpan:1,children:(0,t.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,t.jsxs)(M.Z,{numColSpan:1,children:[(0,t.jsx)(E.Z,{className:"mt-3",children:"Key Alias:"}),(0,t.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,t.jsx)("pre",{className:"break-words whitespace-normal",children:(null==s?void 0:s.key_alias)||"No alias set"})}),(0,t.jsx)(E.Z,{className:"mt-3",children:"New Virtual Key:"}),(0,t.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,t.jsx)("pre",{className:"break-words whitespace-normal",children:d})}),(0,t.jsx)(K.CopyToClipboard,{text:d,onCopy:()=>A.Z.success("Virtual Key copied to clipboard"),children:(0,t.jsx)(D.Z,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,t.jsxs)(m.Z,{form:n,layout:"vertical",onValuesChange:e=>{"duration"in e&&u(s=>({...s,duration:e.duration}))},children:[(0,t.jsx)(m.Z.Item,{name:"key_alias",label:"Key Alias",children:(0,t.jsx)(R.Z,{disabled:!0})}),(0,t.jsx)(m.Z.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,t.jsx)(O.Z,{step:.01,precision:2,style:{width:"100%"}})}),(0,t.jsx)(m.Z.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,t.jsx)(O.Z,{style:{width:"100%"}})}),(0,t.jsx)(m.Z.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,t.jsx)(O.Z,{style:{width:"100%"}})}),(0,t.jsx)(m.Z.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,t.jsx)(R.Z,{placeholder:""})}),(0,t.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",(null==s?void 0:s.expires)?new Date(s.expires).toLocaleString():"Never"]}),x&&(0,t.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",x]})]})})}var U=a(85968),B=a(67479),q=a(87972),W=a(15424),J=a(64504),$=a(37592),Q=a(4260),Y=a(63709),H=a(82586),X=a(62099),ee=a(95096),es=a(65895),ea=a(97492),et=a(68473),el=a(71098),er=a(24199),ei=a(21425),en=a(97415);let ed=e=>e&&0!==e.length?e.includes("llm_api_routes")?"llm_api":e.includes("management_routes")?"management":e.includes("info_routes")?"read_only":"default":"default";function eo(e){var s,a,l,r,i,n,d,o,c,u,g,h,v,y;let{keyData:b,onCancel:_,onSubmit:f,teams:N,accessToken:w,userID:C,userRole:P,premiumUser:L=!1}=e,[D]=m.Z.useForm(),[M,T]=(0,p.useState)([]),[E,R]=(0,p.useState)({}),F=null==N?void 0:N.find(e=>e.team_id===b.team_id),[V,O]=(0,p.useState)([]),[z,K]=(0,p.useState)(Array.isArray(null===(s=b.metadata)||void 0===s?void 0:s.litellm_disabled_callbacks)?(0,j.PA)(b.metadata.litellm_disabled_callbacks):[]),[G,U]=(0,p.useState)(b.auto_rotate||!1),[eo,ec]=(0,p.useState)(b.rotation_interval||""),[em,eu]=(0,p.useState)(!1);(0,p.useEffect)(()=>{let e=async()=>{if(C&&P&&w)try{if(null===b.team_id){let e=(await (0,I.modelAvailableCall)(w,C,P)).data.map(e=>e.id);O(e)}else if(null==F?void 0:F.team_id){let e=await (0,el.wk)(C,P,w,F.team_id);O(Array.from(new Set([...F.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(w)try{let e=await (0,I.getPromptsList)(w);T(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),e()},[C,P,w,F,b.team_id]),(0,p.useEffect)(()=>{D.setFieldValue("disabled_callbacks",z)},[D,z]);let ex=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,eg={...b,token:b.token||b.token_id,budget_duration:ex(b.budget_duration),metadata:Z(S(b.metadata)),guardrails:null===(a=b.metadata)||void 0===a?void 0:a.guardrails,disable_global_guardrails:(null===(l=b.metadata)||void 0===l?void 0:l.disable_global_guardrails)||!1,prompts:null===(r=b.metadata)||void 0===r?void 0:r.prompts,tags:null===(i=b.metadata)||void 0===i?void 0:i.tags,vector_stores:(null===(n=b.object_permission)||void 0===n?void 0:n.vector_stores)||[],mcp_servers_and_groups:{servers:(null===(d=b.object_permission)||void 0===d?void 0:d.mcp_servers)||[],accessGroups:(null===(o=b.object_permission)||void 0===o?void 0:o.mcp_access_groups)||[]},mcp_tool_permissions:(null===(c=b.object_permission)||void 0===c?void 0:c.mcp_tool_permissions)||{},agents_and_groups:{agents:(null===(u=b.object_permission)||void 0===u?void 0:u.agents)||[],accessGroups:(null===(g=b.object_permission)||void 0===g?void 0:g.agent_access_groups)||[]},logging_settings:k(b.metadata),disabled_callbacks:Array.isArray(null===(h=b.metadata)||void 0===h?void 0:h.litellm_disabled_callbacks)?(0,j.PA)(b.metadata.litellm_disabled_callbacks):[],auto_rotate:b.auto_rotate||!1,...b.rotation_interval&&{rotation_interval:b.rotation_interval},allowed_routes:b.allowed_routes};(0,p.useEffect)(()=>{var e,s,a,t,l,r,i,n,d;D.setFieldsValue({...b,token:b.token||b.token_id,budget_duration:ex(b.budget_duration),metadata:Z(S(b.metadata)),guardrails:null===(e=b.metadata)||void 0===e?void 0:e.guardrails,disable_global_guardrails:(null===(s=b.metadata)||void 0===s?void 0:s.disable_global_guardrails)||!1,prompts:null===(a=b.metadata)||void 0===a?void 0:a.prompts,tags:null===(t=b.metadata)||void 0===t?void 0:t.tags,vector_stores:(null===(l=b.object_permission)||void 0===l?void 0:l.vector_stores)||[],mcp_servers_and_groups:{servers:(null===(r=b.object_permission)||void 0===r?void 0:r.mcp_servers)||[],accessGroups:(null===(i=b.object_permission)||void 0===i?void 0:i.mcp_access_groups)||[]},mcp_tool_permissions:(null===(n=b.object_permission)||void 0===n?void 0:n.mcp_tool_permissions)||{},logging_settings:k(b.metadata),disabled_callbacks:Array.isArray(null===(d=b.metadata)||void 0===d?void 0:d.litellm_disabled_callbacks)?(0,j.PA)(b.metadata.litellm_disabled_callbacks):[],auto_rotate:b.auto_rotate||!1,...b.rotation_interval&&{rotation_interval:b.rotation_interval},allowed_routes:b.allowed_routes})},[b,D]),(0,p.useEffect)(()=>{D.setFieldValue("auto_rotate",G)},[G,D]),(0,p.useEffect)(()=>{eo&&D.setFieldValue("rotation_interval",eo)},[eo,D]),(0,p.useEffect)(()=>{(async()=>{if(w)try{let e=await (0,I.tagListCall)(w);R(e)}catch(e){A.Z.fromBackend("Error fetching tags: "+e)}})()},[w]),console.log("premiumUser:",L);let eh=async e=>{try{eu(!0),await f(e)}finally{eu(!1)}};return(0,t.jsxs)(m.Z,{form:D,onFinish:eh,initialValues:eg,layout:"vertical",children:[(0,t.jsx)(m.Z.Item,{label:"Key Alias",name:"key_alias",children:(0,t.jsx)(J.o,{})}),(0,t.jsx)(m.Z.Item,{label:"Models",name:"models",children:(0,t.jsx)(m.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.allowed_routes!==s.allowed_routes||e.models!==s.models,children:e=>{let{getFieldValue:s,setFieldValue:a}=e,l=s("allowed_routes")||[],r=l.includes("management_routes")||l.includes("info_routes"),i=s("models")||[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)($.default,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[V.length>0&&(0,t.jsx)($.default.Option,{value:"all-team-models",children:"All Team Models"}),V.map(e=>(0,t.jsx)($.default.Option,{value:e,children:e},e))]}),r&&(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,t.jsx)(m.Z.Item,{label:"Key Type",children:(0,t.jsx)(m.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.allowed_routes!==s.allowed_routes,children:e=>{let{getFieldValue:s,setFieldValue:a}=e,l=ed(s("allowed_routes"));return(0,t.jsxs)($.default,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:l,onChange:e=>{switch(e){case"default":a("allowed_routes",[]);break;case"llm_api":a("allowed_routes",["llm_api_routes"]);break;case"management":a("allowed_routes",["management_routes"]),a("models",[])}},children:[(0,t.jsx)($.default.Option,{value:"default",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call LLM API + Management routes"})]})}),(0,t.jsx)($.default.Option,{value:"llm_api",label:"LLM API",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"LLM API"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only LLM API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)($.default.Option,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,t.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,t.jsx)(m.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(er.Z,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,t.jsx)(m.Z.Item,{label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)($.default,{placeholder:"n/a",children:[(0,t.jsx)($.default.Option,{value:"daily",children:"Daily"}),(0,t.jsx)($.default.Option,{value:"weekly",children:"Weekly"}),(0,t.jsx)($.default.Option,{value:"monthly",children:"Monthly"})]})}),(0,t.jsx)(m.Z.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,t.jsx)(er.Z,{min:0})}),(0,t.jsx)(es.Z,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(m.Z.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,t.jsx)(er.Z,{min:0})}),(0,t.jsx)(es.Z,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,t.jsx)(m.Z.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,t.jsx)(er.Z,{min:0})}),(0,t.jsx)(m.Z.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,t.jsx)(Q.default.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(m.Z.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,t.jsx)(Q.default.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,t.jsx)(m.Z.Item,{label:"Guardrails",name:"guardrails",children:w&&(0,t.jsx)(B.Z,{onChange:e=>{D.setFieldValue("guardrails",e)},accessToken:w,disabled:!L})}),(0,t.jsx)(m.Z.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(x.Z,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)(W.Z,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,t.jsx)(Y.Z,{disabled:!L,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(m.Z.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(x.Z,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)(W.Z,{style:{marginLeft:"4px"}})})]}),name:"policies",children:w&&(0,t.jsx)(q.Z,{onChange:e=>{D.setFieldValue("policies",e)},accessToken:w,disabled:!L})}),(0,t.jsx)(m.Z.Item,{label:"Tags",name:"tags",children:(0,t.jsx)($.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(E).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,t.jsx)(m.Z.Item,{label:"Prompts",name:"prompts",children:(0,t.jsx)(x.Z,{title:L?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,t.jsx)($.default,{mode:"tags",style:{width:"100%"},disabled:!L,placeholder:L?Array.isArray(null===(v=b.metadata)||void 0===v?void 0:v.prompts)&&b.metadata.prompts.length>0?"Current: ".concat(b.metadata.prompts.join(", ")):"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:M.map(e=>({value:e,label:e}))})})}),(0,t.jsx)(m.Z.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,t.jsx)(x.Z,{title:L?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,t.jsx)(ee.Z,{onChange:e=>D.setFieldValue("allowed_passthrough_routes",e),value:D.getFieldValue("allowed_passthrough_routes"),accessToken:w||"",placeholder:L?Array.isArray(null===(y=b.metadata)||void 0===y?void 0:y.allowed_passthrough_routes)&&b.metadata.allowed_passthrough_routes.length>0?"Current: ".concat(b.metadata.allowed_passthrough_routes.join(", ")):"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!L})})}),(0,t.jsx)(m.Z.Item,{label:"Vector Stores",name:"vector_stores",children:(0,t.jsx)(en.Z,{onChange:e=>D.setFieldValue("vector_stores",e),value:D.getFieldValue("vector_stores"),accessToken:w||"",placeholder:"Select vector stores"})}),(0,t.jsx)(m.Z.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,t.jsx)(ea.Z,{onChange:e=>D.setFieldValue("mcp_servers_and_groups",e),value:D.getFieldValue("mcp_servers_and_groups"),accessToken:w||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,t.jsx)(m.Z.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(Q.default,{type:"hidden"})}),(0,t.jsx)(m.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.mcp_servers_and_groups!==s.mcp_servers_and_groups||e.mcp_tool_permissions!==s.mcp_tool_permissions,children:()=>{var e;return(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(et.Z,{accessToken:w||"",selectedServers:(null===(e=D.getFieldValue("mcp_servers_and_groups"))||void 0===e?void 0:e.servers)||[],toolPermissions:D.getFieldValue("mcp_tool_permissions")||{},onChange:e=>D.setFieldsValue({mcp_tool_permissions:e})})})}}),(0,t.jsx)(m.Z.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,t.jsx)(H.Z,{onChange:e=>D.setFieldValue("agents_and_groups",e),value:D.getFieldValue("agents_and_groups"),accessToken:w||"",placeholder:"Select agents or access groups (optional)"})}),(0,t.jsx)(m.Z.Item,{label:"Team ID",name:"team_id",children:(0,t.jsx)($.default,{placeholder:"Select team",showSearch:!0,style:{width:"100%"},filterOption:(e,s)=>{var a,t;let l=null==N?void 0:N.find(e=>e.team_id===(null==s?void 0:s.value));return!!l&&null!==(t=null===(a=l.team_alias)||void 0===a?void 0:a.toLowerCase().includes(e.toLowerCase()))&&void 0!==t&&t},children:null==N?void 0:N.map(e=>(0,t.jsx)($.default.Option,{value:e.team_id,children:"".concat(e.team_alias," (").concat(e.team_id,")")},e.team_id))})}),(0,t.jsx)(m.Z.Item,{label:"Logging Settings",name:"logging_settings",children:(0,t.jsx)(ei.Z,{value:D.getFieldValue("logging_settings"),onChange:e=>D.setFieldValue("logging_settings",e),disabledCallbacks:z,onDisabledCallbacksChange:e=>{K((0,j.PA)(e)),D.setFieldValue("disabled_callbacks",e)}})}),(0,t.jsx)(m.Z.Item,{label:"Metadata",name:"metadata",children:(0,t.jsx)(Q.default.TextArea,{rows:10})}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(X.Z,{form:D,autoRotationEnabled:G,onAutoRotationChange:U,rotationInterval:eo,onRotationIntervalChange:ec}),(0,t.jsx)(m.Z.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,t.jsx)(Q.default,{})})]}),(0,t.jsx)(m.Z.Item,{name:"token",hidden:!0,children:(0,t.jsx)(Q.default,{})}),(0,t.jsx)(m.Z.Item,{name:"allowed_routes",hidden:!0,children:(0,t.jsx)(Q.default,{})}),(0,t.jsx)(m.Z.Item,{name:"disabled_callbacks",hidden:!0,children:(0,t.jsx)(Q.default,{})}),(0,t.jsx)(m.Z.Item,{name:"auto_rotate",hidden:!0,children:(0,t.jsx)(Q.default,{})}),(0,t.jsx)(m.Z.Item,{name:"rotation_interval",hidden:!0,children:(0,t.jsx)(Q.default,{})}),(0,t.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,t.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,t.jsx)(J.z,{variant:"secondary",onClick:_,disabled:em,children:"Cancel"}),(0,t.jsx)(J.z,{type:"submit",loading:em,children:"Save Changes"})]})})]})}function ec(e){var s,a,y,b,N,w,D,M,T,E,R,F,V;let{onClose:O,keyData:z,teams:K,onKeyDataUpdate:B,onDelete:q,backButtonText:W="Back to Keys"}=e,{accessToken:J,userId:$,userRole:Q,premiumUser:Y}=(0,L.Z)(),{teams:H}=(0,l.Z)(),[X,ee]=(0,p.useState)(!1),[es]=m.Z.useForm(),[ea,et]=(0,p.useState)(!1),[el,er]=(0,p.useState)(!1),[ei,en]=(0,p.useState)(""),[ed,ec]=(0,p.useState)(!1),[em,eu]=(0,p.useState)({}),[ex,eg]=(0,p.useState)(z),[eh,ep]=(0,p.useState)(null),[ev,ej]=(0,p.useState)(!1),[ey,eb]=(0,p.useState)({}),[e_,ef]=(0,p.useState)(!1);if((0,p.useEffect)(()=>{z&&eg(z)},[z]),(0,p.useEffect)(()=>{(async()=>{var e;let s=null==ex?void 0:null===(e=ex.metadata)||void 0===e?void 0:e.policies;if(!J||!s||!Array.isArray(s)||0===s.length)return;ef(!0);let a={};try{await Promise.all(s.map(async e=>{try{let s=await (0,I.getPolicyInfoWithGuardrails)(J,e);a[e]=s.resolved_guardrails||[]}catch(s){console.error("Failed to fetch guardrails for policy ".concat(e,":"),s),a[e]=[]}})),eb(a)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{ef(!1)}})()},[J,null==ex?void 0:null===(s=ex.metadata)||void 0===s?void 0:s.policies]),(0,p.useEffect)(()=>{if(ev){let e=setTimeout(()=>{ej(!1)},5e3);return()=>clearTimeout(e)}},[ev]),!ex)return(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)(c.zx,{icon:n.Z,variant:"light",onClick:O,className:"mb-4",children:W}),(0,t.jsx)(c.xv,{children:"Key not found"})]});let eN=async e=>{try{var s,a,t,l;if(!J)return;let r=e.token;if(e.key=r,Y||(delete e.guardrails,delete e.prompts),e.max_budget=(0,i.C)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...ex.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:s,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...ex.object_permission,mcp_servers:s||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let s=e.mcp_tool_permissions||{};Object.keys(s).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:s}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:s,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:s||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,i.C)(e.max_budget),e.tpm_limit=(0,i.C)(e.tpm_limit),e.rpm_limit=(0,i.C)(e.rpm_limit),e.max_parallel_requests=(0,i.C)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let t=JSON.parse(e.metadata);"tags"in t&&delete t.tags,e.metadata={...t,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...(null===(s=e.guardrails)||void 0===s?void 0:s.length)>0?{guardrails:e.guardrails}:{},...e.logging_settings?{logging:e.logging_settings}:{},...(null===(a=e.disabled_callbacks)||void 0===a?void 0:a.length)>0?{litellm_disabled_callbacks:(0,j.Z3)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),A.Z.error("Invalid metadata JSON");return}else{let{tags:s,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...(null===(t=e.guardrails)||void 0===t?void 0:t.length)>0?{guardrails:e.guardrails}:{},...e.logging_settings?{logging:e.logging_settings}:{},...(null===(l=e.disabled_callbacks)||void 0===l?void 0:l.length)>0?{litellm_disabled_callbacks:(0,j.Z3)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let n=await (0,I.keyUpdateCall)(J,e);eg(e=>e?{...e,...n}:void 0),B&&B(n),A.Z.success("Key updated successfully"),ee(!1)}catch(e){A.Z.fromBackend((0,U.O)(e)),console.error("Error updating key:",e)}},ew=async()=>{try{if(er(!0),!J)return;await (0,I.keyDeleteCall)(J,ex.token||ex.token_id),A.Z.success("Key deleted successfully"),q&&q(),O()}catch(e){console.error("Error deleting the key:",e),A.Z.fromBackend(e)}finally{er(!1),et(!1),en("")}},ek=async(e,s)=>{await (0,r.vQ)(e)&&(eu(e=>({...e,[s]:!0})),setTimeout(()=>{eu(e=>({...e,[s]:!1}))},2e3))},eZ=e=>{let s=new Date(e),a=s.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),t=s.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return"".concat(a," at ").concat(t)};console.log("userRole",Q);let eS=(0,v.P4)(Q||"")||H&&(0,v._p)(null==H?void 0:null===(a=H.filter(e=>e.team_id===ex.team_id)[0])||void 0===a?void 0:a.members_with_roles,$||"")||$===ex.user_id&&"Internal Viewer"!==Q;return(0,t.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(c.zx,{icon:n.Z,variant:"light",onClick:O,className:"mb-4",children:W}),(0,t.jsx)(c.Dx,{children:ex.key_alias||"Virtual Key"}),(0,t.jsxs)("div",{className:"flex items-center cursor-pointer mb-2 space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"text-xs text-gray-400 uppercase tracking-wide mt-2",children:"Key ID"}),(0,t.jsx)(c.xv,{className:"text-gray-500 font-mono text-sm",children:ex.token_id||ex.token})]}),(0,t.jsx)(u.ZP,{type:"text",size:"small",icon:em["key-id"]?(0,t.jsx)(g.Z,{size:12}):(0,t.jsx)(h.Z,{size:12}),onClick:()=>ek(ex.token_id||ex.token,"key-id"),className:"ml-2 transition-all duration-200".concat(em["key-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,t.jsx)(c.xv,{className:"text-sm text-gray-500",children:ex.updated_at&&ex.updated_at!==ex.created_at?"Updated: ".concat(eZ(ex.updated_at)):"Created: ".concat(eZ(ex.created_at))}),ev&&(0,t.jsx)(c.Ct,{color:"green",size:"xs",className:"animate-pulse",children:"Recently Regenerated"}),eh&&(0,t.jsx)(c.Ct,{color:"blue",size:"xs",children:"Regenerated"})]})]}),eS&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(x.Z,{title:Y?"":"This is a LiteLLM Enterprise feature, and requires a valid key to use.",children:(0,t.jsx)("span",{className:"inline-block",children:(0,t.jsx)(c.zx,{icon:d.Z,variant:"secondary",onClick:()=>ec(!0),className:"flex items-center",disabled:!Y,children:"Regenerate Key"})})}),(0,t.jsx)(c.zx,{icon:o.Z,variant:"secondary",onClick:()=>et(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-700",children:"Delete Key"})]})]}),(0,t.jsx)(G,{selectedToken:ex,visible:ed,onClose:()=>ec(!1),onKeyUpdate:e=>{eg(s=>{if(s)return{...s,...e,created_at:new Date().toLocaleString()}}),ep(new Date),ej(!0),B&&B({...e,created_at:new Date().toLocaleString()})}}),(0,t.jsx)(f.Z,{isOpen:ea,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:(null==ex?void 0:ex.key_alias)||"-"},{label:"Key ID",value:(null==ex?void 0:ex.token_id)||(null==ex?void 0:ex.token)||"-",code:!0},{label:"Team ID",value:(null==ex?void 0:ex.team_id)||"-",code:!0},{label:"Spend",value:(null==ex?void 0:ex.spend)?"$".concat((0,r.pw)(ex.spend,4)):"$0.0000"}],onCancel:()=>{et(!1),en("")},onOk:ew,confirmLoading:el,requiredConfirmation:null==ex?void 0:ex.key_alias}),(0,t.jsxs)(c.v0,{children:[(0,t.jsxs)(c.td,{className:"mb-4",children:[(0,t.jsx)(c.OK,{children:"Overview"}),(0,t.jsx)(c.OK,{children:"Settings"})]}),(0,t.jsxs)(c.nP,{children:[(0,t.jsx)(c.x4,{children:(0,t.jsxs)(c.rj,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,t.jsxs)(c.Zb,{children:[(0,t.jsx)(c.xv,{children:"Spend"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(c.Dx,{children:["$",(0,r.pw)(ex.spend,4)]}),(0,t.jsxs)(c.xv,{children:["of"," ",null!==ex.max_budget?"$".concat((0,r.pw)(ex.max_budget)):"Unlimited"]})]})]}),(0,t.jsxs)(c.Zb,{children:[(0,t.jsx)(c.xv,{children:"Rate Limits"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)(c.xv,{children:["TPM: ",null!==ex.tpm_limit?ex.tpm_limit:"Unlimited"]}),(0,t.jsxs)(c.xv,{children:["RPM: ",null!==ex.rpm_limit?ex.rpm_limit:"Unlimited"]})]})]}),(0,t.jsxs)(c.Zb,{children:[(0,t.jsx)(c.xv,{children:"Models"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:ex.models&&ex.models.length>0?ex.models.map((e,s)=>(0,t.jsx)(c.Ct,{color:"red",children:e},s)):(0,t.jsx)(c.xv,{children:"No models specified"})})]}),(0,t.jsx)(c.Zb,{children:(0,t.jsx)(P.Z,{objectPermission:ex.object_permission,variant:"inline",accessToken:J})}),(0,t.jsxs)(c.Zb,{children:[(0,t.jsx)(c.xv,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(null===(y=ex.metadata)||void 0===y?void 0:y.guardrails)&&ex.metadata.guardrails.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ex.metadata.guardrails.map((e,s)=>(0,t.jsx)(c.Ct,{color:"blue",children:e},s))}):(0,t.jsx)(c.xv,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof(null===(b=ex.metadata)||void 0===b?void 0:b.disable_global_guardrails)&&!0===ex.metadata.disable_global_guardrails&&(0,t.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,t.jsx)(c.Ct,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,t.jsxs)(c.Zb,{children:[(0,t.jsx)(c.xv,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(null===(N=ex.metadata)||void 0===N?void 0:N.policies)&&ex.metadata.policies.length>0?(0,t.jsx)("div",{className:"space-y-4",children:ex.metadata.policies.map((e,s)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.Ct,{color:"purple",children:e}),e_&&(0,t.jsx)(c.xv,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!e_&&ey[e]&&ey[e].length>0&&(0,t.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,t.jsx)(c.xv,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1",children:ey[e].map((e,s)=>(0,t.jsx)(c.Ct,{color:"blue",size:"xs",children:e},s))})]})]},s))}):(0,t.jsx)(c.xv,{className:"text-gray-500",children:"No policies configured"})]}),(0,t.jsx)(C.Z,{loggingConfigs:k(ex.metadata),disabledCallbacks:Array.isArray(null===(w=ex.metadata)||void 0===w?void 0:w.litellm_disabled_callbacks)?(0,j.PA)(ex.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,t.jsx)(_,{autoRotate:ex.auto_rotate,rotationInterval:ex.rotation_interval,lastRotationAt:ex.last_rotation_at,keyRotationAt:ex.key_rotation_at,nextRotationAt:ex.next_rotation_at,variant:"card"})]})}),(0,t.jsx)(c.x4,{children:(0,t.jsxs)(c.Zb,{className:"overflow-y-auto max-h-[65vh]",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,t.jsx)(c.Dx,{children:"Key Settings"}),!X&&Q&&v.LQ.includes(Q)&&(0,t.jsx)(c.zx,{onClick:()=>ee(!0),children:"Edit Settings"})]}),X?(0,t.jsx)(eo,{keyData:ex,onCancel:()=>ee(!1),onSubmit:eN,teams:K,accessToken:J,userID:$,userRole:Q,premiumUser:Y}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Key ID"}),(0,t.jsx)(c.xv,{className:"font-mono",children:ex.token_id||ex.token})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Key Alias"}),(0,t.jsx)(c.xv,{children:ex.key_alias||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Secret Key"}),(0,t.jsx)(c.xv,{className:"font-mono",children:ex.key_name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Team ID"}),(0,t.jsx)(c.xv,{children:ex.team_id||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Organization"}),(0,t.jsx)(c.xv,{children:ex.organization_id||"Not Set"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Created"}),(0,t.jsx)(c.xv,{children:eZ(ex.created_at)})]}),eh&&(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Last Regenerated"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.xv,{children:eZ(eh)}),(0,t.jsx)(c.Ct,{color:"green",size:"xs",children:"Recent"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Expires"}),(0,t.jsx)(c.xv,{children:ex.expires?eZ(ex.expires):"Never"})]}),(0,t.jsx)(_,{autoRotate:ex.auto_rotate,rotationInterval:ex.rotation_interval,lastRotationAt:ex.last_rotation_at,keyRotationAt:ex.key_rotation_at,nextRotationAt:ex.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Spend"}),(0,t.jsxs)(c.xv,{children:["$",(0,r.pw)(ex.spend,4)," USD"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Budget"}),(0,t.jsx)(c.xv,{children:null!==ex.max_budget?"$".concat((0,r.pw)(ex.max_budget,2)):"Unlimited"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Tags"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(null===(D=ex.metadata)||void 0===D?void 0:D.tags)&&ex.metadata.tags.length>0?ex.metadata.tags.map((e,s)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):"No tags specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Prompts"}),(0,t.jsx)(c.xv,{children:Array.isArray(null===(M=ex.metadata)||void 0===M?void 0:M.prompts)&&ex.metadata.prompts.length>0?ex.metadata.prompts.map((e,s)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):"No prompts specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,t.jsx)(c.xv,{children:Array.isArray(null===(T=ex.metadata)||void 0===T?void 0:T.allowed_passthrough_routes)&&ex.metadata.allowed_passthrough_routes.length>0?ex.metadata.allowed_passthrough_routes.map((e,s)=>(0,t.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):"No pass through routes specified"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Disable Global Guardrails"}),(0,t.jsx)(c.xv,{children:(null===(E=ex.metadata)||void 0===E?void 0:E.disable_global_guardrails)===!0?(0,t.jsx)(c.Ct,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,t.jsx)(c.Ct,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Models"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:ex.models&&ex.models.length>0?ex.models.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):(0,t.jsx)(c.xv,{children:"No models specified"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Rate Limits"}),(0,t.jsxs)(c.xv,{children:["TPM: ",null!==ex.tpm_limit?ex.tpm_limit:"Unlimited"]}),(0,t.jsxs)(c.xv,{children:["RPM: ",null!==ex.rpm_limit?ex.rpm_limit:"Unlimited"]}),(0,t.jsxs)(c.xv,{children:["Max Parallel Requests:"," ",null!==ex.max_parallel_requests?ex.max_parallel_requests:"Unlimited"]}),(0,t.jsxs)(c.xv,{children:["Model TPM Limits:"," ",(null===(R=ex.metadata)||void 0===R?void 0:R.model_tpm_limit)?JSON.stringify(ex.metadata.model_tpm_limit):"Unlimited"]}),(0,t.jsxs)(c.xv,{children:["Model RPM Limits:"," ",(null===(F=ex.metadata)||void 0===F?void 0:F.model_rpm_limit)?JSON.stringify(ex.metadata.model_rpm_limit):"Unlimited"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.xv,{className:"font-medium",children:"Metadata"}),(0,t.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:Z(S(ex.metadata))})]}),(0,t.jsx)(P.Z,{objectPermission:ex.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:J}),(0,t.jsx)(C.Z,{loggingConfigs:k(ex.metadata),disabledCallbacks:Array.isArray(null===(V=ex.metadata)||void 0===V?void 0:V.litellm_disabled_callbacks)?(0,j.PA)(ex.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}},33304:function(e,s,a){a.d(s,{C:function(){return t}});function t(e){return""===e?null:e}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/665-f361bd1c21e3bf25.js b/litellm/proxy/_experimental/out/_next/static/chunks/665-f361bd1c21e3bf25.js
new file mode 100644
index 00000000000..d1cb156a66f
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/665-f361bd1c21e3bf25.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[665],{84717:function(e,s,a){a.d(s,{Ct:function(){return l.Z},Dx:function(){return x.Z},OK:function(){return n.Z},Zb:function(){return r.Z},nP:function(){return m.Z},rj:function(){return i.Z},td:function(){return o.Z},v0:function(){return d.Z},x4:function(){return c.Z},xv:function(){return u.Z},zx:function(){return t.Z}});var l=a(41649),t=a(78489),r=a(12514),i=a(67101),n=a(12485),d=a(18135),o=a(35242),c=a(29706),m=a(77991),u=a(84264),x=a(96761)},40728:function(e,s,a){a.d(s,{C:function(){return l.Z},x:function(){return t.Z}});var l=a(41649),t=a(84264)},64504:function(e,s,a){a.d(s,{o:function(){return t.Z},z:function(){return l.Z}});var l=a(78489),t=a(49566)},49282:function(e,s,a){var l=a(2265),t=a(39760),r=a(39623);s.Z=()=>{let[e,s]=(0,l.useState)([]),{accessToken:a,userId:i,userRole:n}=(0,t.Z)();return(0,l.useEffect)(()=>{(async()=>{s(await (0,r.Z)(a,i,n,null))})()},[a,i,n]),{teams:e,setTeams:s}}},39623:function(e,s,a){a.d(s,{Z:function(){return t}});var l=a(19250);let t=async(e,s,a,t)=>"Admin"!=a&&"Admin Viewer"!=a?await (0,l.teamListCall)(e,(null==t?void 0:t.organization_id)||null,s):await (0,l.teamListCall)(e,(null==t?void 0:t.organization_id)||null)},21609:function(e,s,a){a.d(s,{Z:function(){return x}});var l=a(57437),t=a(57840),r=a(2651),i=a(22116),n=a(51653),d=a(5945),o=a(76188),c=a(4260),m=a(29271),u=a(2265);function x(e){let{isOpen:s,title:a,alertMessage:x,message:g,resourceInformationTitle:h,resourceInformation:p,onCancel:v,onOk:j,confirmLoading:y,requiredConfirmation:b}=e,{Title:_,Text:f}=t.default,{token:N}=r.Z.useToken(),[k,w]=(0,u.useState)("");return(0,u.useEffect)(()=>{s&&w("")},[s]),(0,l.jsx)(i.Z,{title:a,open:s,onOk:j,onCancel:v,confirmLoading:y,okText:y?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!b&&k!==b||y},cancelButtonProps:{disabled:y},children:(0,l.jsxs)("div",{className:"space-y-4",children:[x&&(0,l.jsx)(n.Z,{message:x,type:"warning"}),(0,l.jsx)(d.Z,{title:h,className:"mt-4",styles:{body:{padding:"16px"},header:{backgroundColor:N.colorErrorBg,borderColor:N.colorErrorBorder}},style:{backgroundColor:N.colorErrorBg,borderColor:N.colorErrorBorder},children:(0,l.jsx)(o.Z,{column:1,size:"small",children:p&&p.map(e=>{let{label:s,value:a,...t}=e;return(0,l.jsx)(o.Z.Item,{label:(0,l.jsx)("span",{className:"font-semibold",children:s}),children:(0,l.jsx)(f,{...t,children:null!=a?a:"-"})},s)})})}),(0,l.jsx)("div",{children:(0,l.jsx)(f,{children:g})}),b&&(0,l.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[(0,l.jsxs)(f,{className:"block text-base font-medium text-gray-700 dark:text-gray-300 mb-2",children:[(0,l.jsx)(f,{children:"Type "}),(0,l.jsx)(f,{strong:!0,type:"danger",children:b}),(0,l.jsx)(f,{children:" to confirm deletion:"})]}),(0,l.jsx)(c.default,{value:k,onChange:e=>w(e.target.value),placeholder:b,className:"rounded-md",prefix:(0,l.jsx)(m.Z,{style:{color:N.colorError}}),autoFocus:!0})]})]})})}},67479:function(e,s,a){var l=a(57437),t=a(2265),r=a(37592),i=a(19250);s.Z=e=>{let{onChange:s,value:a,className:n,accessToken:d,disabled:o}=e,[c,m]=(0,t.useState)([]),[u,x]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{(async()=>{if(d){x(!0);try{let e=await (0,i.getGuardrailsList)(d);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),m(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{x(!1)}}})()},[d]),(0,l.jsx)("div",{children:(0,l.jsx)(r.default,{mode:"multiple",disabled:o,placeholder:o?"Setting guardrails is a premium feature.":"Select guardrails",onChange:e=>{console.log("Selected guardrails:",e),s(e)},value:a,loading:u,className:n,allowClear:!0,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:"".concat(e.guardrail_name),value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}},27799:function(e,s,a){var l=a(57437);a(2265);var t=a(40728),r=a(82182),i=a(91777),n=a(97434);s.Z=function(e){let{loggingConfigs:s=[],disabledCallbacks:a=[],variant:d="card",className:o=""}=e,c=e=>{var s;return(null===(s=Object.entries(n.Lo).find(s=>{let[a,l]=s;return l===e}))||void 0===s?void 0:s[0])||e},m=e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return"gray"}},u=e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}},x=(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(r.Z,{className:"h-4 w-4 text-blue-600"}),(0,l.jsx)(t.x,{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,l.jsx)(t.C,{color:"blue",size:"xs",children:s.length})]}),s.length>0?(0,l.jsx)("div",{className:"space-y-3",children:s.map((e,s)=>{var a;let i=c(e.callback_name),d=null===(a=n.Dg[i])||void 0===a?void 0:a.logo;return(0,l.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[d?(0,l.jsx)("img",{src:d,alt:i,className:"w-5 h-5 object-contain"}):(0,l.jsx)(r.Z,{className:"h-5 w-5 text-gray-400"}),(0,l.jsxs)("div",{children:[(0,l.jsx)(t.x,{className:"font-medium text-blue-800",children:i}),(0,l.jsxs)(t.x,{className:"text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,l.jsx)(t.C,{color:m(e.callback_type),size:"sm",children:u(e.callback_type)})]},s)})}):(0,l.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,l.jsx)(r.Z,{className:"h-4 w-4 text-gray-400"}),(0,l.jsx)(t.x,{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(i.Z,{className:"h-4 w-4 text-red-600"}),(0,l.jsx)(t.x,{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,l.jsx)(t.C,{color:"red",size:"xs",children:a.length})]}),a.length>0?(0,l.jsx)("div",{className:"space-y-3",children:a.map((e,s)=>{var a;let r=n.RD[e]||e,d=null===(a=n.Dg[r])||void 0===a?void 0:a.logo;return(0,l.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[d?(0,l.jsx)("img",{src:d,alt:r,className:"w-5 h-5 object-contain"}):(0,l.jsx)(i.Z,{className:"h-5 w-5 text-gray-400"}),(0,l.jsxs)("div",{children:[(0,l.jsx)(t.x,{className:"font-medium text-red-800",children:r}),(0,l.jsx)(t.x,{className:"text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,l.jsx)(t.C,{color:"red",size:"sm",children:"Disabled"})]},s)})}):(0,l.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,l.jsx)(i.Z,{className:"h-4 w-4 text-gray-400"}),(0,l.jsx)(t.x,{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===d?(0,l.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(o),children:[(0,l.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(t.x,{className:"font-semibold text-gray-900",children:"Logging Settings"}),(0,l.jsx)(t.x,{className:"text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),x]}):(0,l.jsxs)("div",{className:"".concat(o),children:[(0,l.jsx)(t.x,{className:"font-medium text-gray-900 mb-3",children:"Logging Settings"}),x]})}},60131:function(e,s,a){a.d(s,{Z:function(){return v}});var l=a(57437),t=a(2265),r=a(92280),i=a(40728),n=a(79814),d=a(19250),o=function(e){let{vectorStores:s,accessToken:a}=e,[r,o]=(0,t.useState)([]);(0,t.useEffect)(()=>{(async()=>{if(a&&0!==s.length)try{let e=await (0,d.vectorStoreListCall)(a);e.data&&o(e.data.map(e=>({vector_store_id:e.vector_store_id,vector_store_name:e.vector_store_name})))}catch(e){console.error("Error fetching vector stores:",e)}})()},[a,s.length]);let c=e=>{let s=r.find(s=>s.vector_store_id===e);return s?"".concat(s.vector_store_name||s.vector_store_id," (").concat(s.vector_store_id,")"):e};return(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(n.Z,{className:"h-4 w-4 text-blue-600"}),(0,l.jsx)(i.x,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,l.jsx)(i.C,{color:"blue",size:"xs",children:s.length})]}),s.length>0?(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map((e,s)=>(0,l.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-sm font-medium",children:c(e)},s))}):(0,l.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,l.jsx)(n.Z,{className:"h-4 w-4 text-gray-400"}),(0,l.jsx)(i.x,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},c=a(25327),m=a(86462),u=a(47686),x=a(99981),g=function(e){let{mcpServers:s,mcpAccessGroups:r=[],mcpToolPermissions:n={},accessToken:o}=e,[g,h]=(0,t.useState)([]),[p,v]=(0,t.useState)([]),[j,y]=(0,t.useState)(new Set),b=e=>{y(s=>{let a=new Set(s);return a.has(e)?a.delete(e):a.add(e),a})};(0,t.useEffect)(()=>{(async()=>{if(o&&s.length>0)try{let e=await (0,d.fetchMCPServers)(o);e&&Array.isArray(e)?h(e):e.data&&Array.isArray(e.data)&&h(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[o,s.length]),(0,t.useEffect)(()=>{(async()=>{if(o&&r.length>0)try{let e=await Promise.resolve().then(a.bind(a,19250)).then(e=>e.fetchMCPAccessGroups(o));v(Array.isArray(e)?e:e.data||[])}catch(e){console.error("Error fetching MCP access groups:",e)}})()},[o,r.length]);let _=e=>{let s=g.find(s=>s.server_id===e);if(s){let a=e.length>7?"".concat(e.slice(0,3),"...").concat(e.slice(-4)):e;return"".concat(s.alias," (").concat(a,")")}return e},f=e=>e,N=[...s.map(e=>({type:"server",value:e})),...r.map(e=>({type:"accessGroup",value:e}))],k=N.length;return(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(c.Z,{className:"h-4 w-4 text-blue-600"}),(0,l.jsx)(i.x,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,l.jsx)(i.C,{color:"blue",size:"xs",children:k})]}),k>0?(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:N.map((e,s)=>{let a="server"===e.type?n[e.value]:void 0,t=a&&a.length>0,r=j.has(e.value);return(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsxs)("div",{onClick:()=>t&&b(e.value),className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ".concat(t?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"),children:[(0,l.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,l.jsx)(x.Z,{title:"Full ID: ".concat(e.value),placement:"top",children:(0,l.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,l.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full flex-shrink-0"}),(0,l.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:_(e.value)})]})}):(0,l.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,l.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,l.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:f(e.value)}),(0,l.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),t&&(0,l.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,l.jsx)("span",{className:"text-xs font-medium text-gray-600",children:a.length}),(0,l.jsx)("span",{className:"text-xs text-gray-500",children:1===a.length?"tool":"tools"}),r?(0,l.jsx)(m.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,l.jsx)(u.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),t&&r&&(0,l.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,l.jsx)("div",{className:"flex flex-wrap gap-1.5",children:a.map((e,s)=>(0,l.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-xs font-medium",children:e},s))})})]},s)})}):(0,l.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,l.jsx)(c.Z,{className:"h-4 w-4 text-gray-400"}),(0,l.jsx)(i.x,{className:"text-gray-500 text-sm",children:"No MCP servers or access groups configured"})]})]})},h=a(3497),p=function(e){let{agents:s,agentAccessGroups:a=[],accessToken:r}=e,[n,o]=(0,t.useState)([]);(0,t.useEffect)(()=>{(async()=>{if(r&&s.length>0)try{let e=await (0,d.getAgentsList)(r);e&&e.agents&&Array.isArray(e.agents)&&o(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[r,s.length]);let c=e=>{let s=n.find(s=>s.agent_id===e);if(s){let a=e.length>7?"".concat(e.slice(0,3),"...").concat(e.slice(-4)):e;return"".concat(s.agent_name," (").concat(a,")")}return e},m=[...s.map(e=>({type:"agent",value:e})),...a.map(e=>({type:"accessGroup",value:e}))],u=m.length;return(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(h.Z,{className:"h-4 w-4 text-purple-600"}),(0,l.jsx)(i.x,{className:"font-semibold text-gray-900",children:"Agents"}),(0,l.jsx)(i.C,{color:"purple",size:"xs",children:u})]}),u>0?(0,l.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:m.map((e,s)=>(0,l.jsx)("div",{className:"space-y-2",children:(0,l.jsx)("div",{className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 bg-white",children:(0,l.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"agent"===e.type?(0,l.jsx)(x.Z,{title:"Full ID: ".concat(e.value),placement:"top",children:(0,l.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,l.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-purple-500 rounded-full flex-shrink-0"}),(0,l.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:c(e.value)})]})}):(0,l.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,l.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,l.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,l.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded uppercase tracking-wide flex-shrink-0",children:"Group"})]})})})},s))}):(0,l.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,l.jsx)(h.Z,{className:"h-4 w-4 text-gray-400"}),(0,l.jsx)(i.x,{className:"text-gray-500 text-sm",children:"No agents or access groups configured"})]})]})},v=function(e){let{objectPermission:s,variant:a="card",className:t="",accessToken:i}=e,n=(null==s?void 0:s.vector_stores)||[],d=(null==s?void 0:s.mcp_servers)||[],c=(null==s?void 0:s.mcp_access_groups)||[],m=(null==s?void 0:s.mcp_tool_permissions)||{},u=(null==s?void 0:s.agents)||[],x=(null==s?void 0:s.agent_access_groups)||[],h=(0,l.jsxs)("div",{className:"card"===a?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,l.jsx)(o,{vectorStores:n,accessToken:i}),(0,l.jsx)(g,{mcpServers:d,mcpAccessGroups:c,mcpToolPermissions:m,accessToken:i}),(0,l.jsx)(p,{agents:u,agentAccessGroups:x,accessToken:i})]});return"card"===a?(0,l.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(t),children:[(0,l.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(r.x,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,l.jsx)(r.x,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),h]}):(0,l.jsxs)("div",{className:"".concat(t),children:[(0,l.jsx)(r.x,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),h]})}},87972:function(e,s,a){var l=a(57437),t=a(2265),r=a(37592),i=a(19250);s.Z=e=>{let{onChange:s,value:a,className:n,accessToken:d,disabled:o}=e,[c,m]=(0,t.useState)([]),[u,x]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{(async()=>{if(d){x(!0);try{let e=await (0,i.getPoliciesList)(d);console.log("Policies response:",e),e.policies&&(console.log("Policies data:",e.policies),m(e.policies))}catch(e){console.error("Error fetching policies:",e)}finally{x(!1)}}})()},[d]),(0,l.jsx)("div",{children:(0,l.jsx)(r.default,{mode:"multiple",disabled:o,placeholder:o?"Setting policies is a premium feature.":"Select policies",onChange:e=>{console.log("Selected policies:",e),s(e)},value:a,loading:u,className:n,allowClear:!0,options:c.map(e=>(console.log("Mapping policy:",e),{label:"".concat(e.policy_name).concat(e.description?" - ".concat(e.description):""),value:e.policy_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}},21425:function(e,s,a){var l=a(57437);a(2265);var t=a(54507);s.Z=e=>{let{value:s,onChange:a,disabledCallbacks:r=[],onDisabledCallbacksChange:i}=e;return(0,l.jsx)(t.Z,{value:s,onChange:a,disabledCallbacks:r,onDisabledCallbacksChange:i})}},50665:function(e,s,a){a.d(s,{Z:function(){return ec}});var l=a(57437),t=a(49282),r=a(59872),i=a(33304),n=a(10900),d=a(23628),o=a(74998),c=a(84717),m=a(10032),u=a(5545),x=a(99981),g=a(30401),h=a(78867),p=a(2265),v=a(20347),j=a(97434),y=a(40728),b=a(58710),_=e=>{let{autoRotate:s=!1,rotationInterval:a,lastRotationAt:t,keyRotationAt:r,nextRotationAt:i,variant:n="card",className:o=""}=e,c=e=>{let s=new Date(e),a=s.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),l=s.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return"".concat(a," at ").concat(l)},m=(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)("div",{className:"space-y-3",children:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(d.Z,{className:"h-4 w-4 text-blue-600"}),(0,l.jsx)(y.x,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,l.jsx)(y.C,{color:s?"green":"gray",size:"xs",children:s?"Enabled":"Disabled"}),s&&a&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.x,{className:"text-gray-400",children:"•"}),(0,l.jsxs)(y.x,{className:"text-sm text-gray-600",children:["Every ",a]})]})]})}),(s||t||r||i)&&(0,l.jsxs)("div",{className:"space-y-3",children:[t&&(0,l.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,l.jsx)(b.Z,{className:"w-4 h-4 text-gray-500"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)(y.x,{className:"font-medium text-gray-700",children:"Last Rotation"}),(0,l.jsx)(y.x,{className:"text-sm text-gray-600",children:c(t)})]})]}),(r||i)&&(0,l.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,l.jsx)(b.Z,{className:"w-4 h-4 text-gray-500"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)(y.x,{className:"font-medium text-gray-700",children:"Next Scheduled Rotation"}),(0,l.jsx)(y.x,{className:"text-sm text-gray-600",children:c(i||r||"")})]})]}),s&&!t&&!r&&!i&&(0,l.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,l.jsx)(b.Z,{className:"w-4 h-4 text-gray-500"}),(0,l.jsx)(y.x,{className:"text-gray-600",children:"No rotation history available"})]})]}),!s&&!t&&!r&&!i&&(0,l.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-gray-50 border border-gray-100 rounded-md",children:[(0,l.jsx)(d.Z,{className:"w-4 h-4 text-gray-400"}),(0,l.jsx)(y.x,{className:"text-gray-600",children:"Auto-rotation is not enabled for this key"})]})]});return"card"===n?(0,l.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(o),children:[(0,l.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(y.x,{className:"font-semibold text-gray-900",children:"Auto-Rotation"}),(0,l.jsx)(y.x,{className:"text-xs text-gray-500",children:"Automatic key rotation settings and status for this key"})]})}),m]}):(0,l.jsxs)("div",{className:"".concat(o),children:[(0,l.jsx)(y.x,{className:"font-medium text-gray-900 mb-3",children:"Auto-Rotation"}),m]})},f=a(21609);let N=["logging"],k=e=>e&&"object"==typeof e?Object.fromEntries(Object.entries(e).filter(e=>{let[s]=e;return!N.includes(s)})):{},w=e=>e&&"object"==typeof e&&Array.isArray(e.logging)?e.logging:[],Z=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return JSON.stringify(k(e),null,s)},C=e=>{if(!e||"object"!=typeof e)return e;let{tags:s,...a}=e;return a};var S=a(27799),A=a(9114),I=a(19250),P=a(60131),L=a(39760),D=a(78489),E=a(49804),T=a(67101),M=a(84264),R=a(49566),F=a(96761),V=a(22116),O=a(12221),z=a(92668),K=a(29233);function G(e){let{selectedToken:s,visible:a,onClose:t,onKeyUpdate:r}=e,{accessToken:i}=(0,L.Z)(),[n]=m.Z.useForm(),[d,o]=(0,p.useState)(null),[c,u]=(0,p.useState)(null),[x,g]=(0,p.useState)(null),[h,v]=(0,p.useState)(!1),[j,y]=(0,p.useState)(!1),[b,_]=(0,p.useState)(null);(0,p.useEffect)(()=>{a&&s&&i&&(n.setFieldsValue({key_alias:s.key_alias,max_budget:s.max_budget,tpm_limit:s.tpm_limit,rpm_limit:s.rpm_limit,duration:s.duration||""}),_(i),y(s.key_name===i))},[a,s,n,i]),(0,p.useEffect)(()=>{a||(o(null),v(!1),y(!1),_(null),n.resetFields())},[a,n]);let f=e=>{if(!e)return null;try{let s;let a=new Date;if(e.endsWith("s"))s=(0,z.I)(a,{seconds:parseInt(e)});else if(e.endsWith("h"))s=(0,z.I)(a,{hours:parseInt(e)});else if(e.endsWith("d"))s=(0,z.I)(a,{days:parseInt(e)});else throw Error("Invalid duration format");return s.toLocaleString()}catch(e){return null}};(0,p.useEffect)(()=>{(null==c?void 0:c.duration)?g(f(c.duration)):g(null)},[null==c?void 0:c.duration]);let N=async()=>{if(s&&b){v(!0);try{let e=await n.validateFields(),a=await (0,I.regenerateKeyCall)(b,s.token||s.token_id,e);o(a.key),A.Z.success("Virtual Key regenerated successfully"),console.log("Full regenerate response:",a);let l={token:a.token||a.key_id||s.token,key_name:a.key,max_budget:e.max_budget,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit,expires:e.duration?f(e.duration):s.expires,...a};console.log("Updated key data with new token:",l),r&&r(l),v(!1)}catch(e){console.error("Error regenerating key:",e),A.Z.fromBackend(e),v(!1)}}},k=()=>{o(null),v(!1),y(!1),_(null),n.resetFields(),t()};return(0,l.jsx)(V.Z,{title:"Regenerate Virtual Key",open:a,onCancel:k,footer:d?[(0,l.jsx)(D.Z,{onClick:k,children:"Close"},"close")]:[(0,l.jsx)(D.Z,{onClick:k,className:"mr-2",children:"Cancel"},"cancel"),(0,l.jsx)(D.Z,{onClick:N,disabled:h,children:h?"Regenerating...":"Regenerate"},"regenerate")],children:d?(0,l.jsxs)(T.Z,{numItems:1,className:"gap-2 w-full",children:[(0,l.jsx)(F.Z,{children:"Regenerated Key"}),(0,l.jsx)(E.Z,{numColSpan:1,children:(0,l.jsxs)("p",{children:["Please replace your old key with the new key generated. For security reasons,"," ",(0,l.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]})}),(0,l.jsxs)(E.Z,{numColSpan:1,children:[(0,l.jsx)(M.Z,{className:"mt-3",children:"Key Alias:"}),(0,l.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,l.jsx)("pre",{className:"break-words whitespace-normal",children:(null==s?void 0:s.key_alias)||"No alias set"})}),(0,l.jsx)(M.Z,{className:"mt-3",children:"New Virtual Key:"}),(0,l.jsx)("div",{className:"bg-gray-100 p-2 rounded mb-2",children:(0,l.jsx)("pre",{className:"break-words whitespace-normal",children:d})}),(0,l.jsx)(K.CopyToClipboard,{text:d,onCopy:()=>A.Z.success("Virtual Key copied to clipboard"),children:(0,l.jsx)(D.Z,{className:"mt-3",children:"Copy Virtual Key"})})]})]}):(0,l.jsxs)(m.Z,{form:n,layout:"vertical",onValuesChange:e=>{"duration"in e&&u(s=>({...s,duration:e.duration}))},children:[(0,l.jsx)(m.Z.Item,{name:"key_alias",label:"Key Alias",children:(0,l.jsx)(R.Z,{disabled:!0})}),(0,l.jsx)(m.Z.Item,{name:"max_budget",label:"Max Budget (USD)",children:(0,l.jsx)(O.Z,{step:.01,precision:2,style:{width:"100%"}})}),(0,l.jsx)(m.Z.Item,{name:"tpm_limit",label:"TPM Limit",children:(0,l.jsx)(O.Z,{style:{width:"100%"}})}),(0,l.jsx)(m.Z.Item,{name:"rpm_limit",label:"RPM Limit",children:(0,l.jsx)(O.Z,{style:{width:"100%"}})}),(0,l.jsx)(m.Z.Item,{name:"duration",label:"Expire Key (eg: 30s, 30h, 30d)",className:"mt-8",children:(0,l.jsx)(R.Z,{placeholder:""})}),(0,l.jsxs)("div",{className:"mt-2 text-sm text-gray-500",children:["Current expiry: ",(null==s?void 0:s.expires)?new Date(s.expires).toLocaleString():"Never"]}),x&&(0,l.jsxs)("div",{className:"mt-2 text-sm text-green-600",children:["New expiry: ",x]})]})})}var U=a(85968),B=a(67479),q=a(87972),W=a(15424),J=a(64504),$=a(37592),Q=a(4260),Y=a(63709),H=a(82586),X=a(62099),ee=a(95096),es=a(65895),ea=a(97492),el=a(68473),et=a(71098),er=a(24199),ei=a(21425),en=a(97415);let ed=e=>e&&0!==e.length?e.includes("llm_api_routes")?"llm_api":e.includes("management_routes")?"management":e.includes("info_routes")?"read_only":"default":"default";function eo(e){var s,a,t,r,i,n,d,o,c,u,g,h,v,y;let{keyData:b,onCancel:_,onSubmit:f,teams:N,accessToken:k,userID:S,userRole:P,premiumUser:L=!1}=e,[D]=m.Z.useForm(),[E,T]=(0,p.useState)([]),[M,R]=(0,p.useState)({}),F=null==N?void 0:N.find(e=>e.team_id===b.team_id),[V,O]=(0,p.useState)([]),[z,K]=(0,p.useState)(Array.isArray(null===(s=b.metadata)||void 0===s?void 0:s.litellm_disabled_callbacks)?(0,j.PA)(b.metadata.litellm_disabled_callbacks):[]),[G,U]=(0,p.useState)(b.auto_rotate||!1),[eo,ec]=(0,p.useState)(b.rotation_interval||""),[em,eu]=(0,p.useState)(!1);(0,p.useEffect)(()=>{let e=async()=>{if(S&&P&&k)try{if(null===b.team_id){let e=(await (0,I.modelAvailableCall)(k,S,P)).data.map(e=>e.id);O(e)}else if(null==F?void 0:F.team_id){let e=await (0,et.wk)(S,P,k,F.team_id);O(Array.from(new Set([...F.models,...e])))}}catch(e){console.error("Error fetching models:",e)}};(async()=>{if(k)try{let e=await (0,I.getPromptsList)(k);T(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}})(),e()},[S,P,k,F,b.team_id]),(0,p.useEffect)(()=>{D.setFieldValue("disabled_callbacks",z)},[D,z]);let ex=e=>e&&({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||null,eg={...b,token:b.token||b.token_id,budget_duration:ex(b.budget_duration),metadata:Z(C(b.metadata)),guardrails:null===(a=b.metadata)||void 0===a?void 0:a.guardrails,disable_global_guardrails:(null===(t=b.metadata)||void 0===t?void 0:t.disable_global_guardrails)||!1,prompts:null===(r=b.metadata)||void 0===r?void 0:r.prompts,tags:null===(i=b.metadata)||void 0===i?void 0:i.tags,vector_stores:(null===(n=b.object_permission)||void 0===n?void 0:n.vector_stores)||[],mcp_servers_and_groups:{servers:(null===(d=b.object_permission)||void 0===d?void 0:d.mcp_servers)||[],accessGroups:(null===(o=b.object_permission)||void 0===o?void 0:o.mcp_access_groups)||[]},mcp_tool_permissions:(null===(c=b.object_permission)||void 0===c?void 0:c.mcp_tool_permissions)||{},agents_and_groups:{agents:(null===(u=b.object_permission)||void 0===u?void 0:u.agents)||[],accessGroups:(null===(g=b.object_permission)||void 0===g?void 0:g.agent_access_groups)||[]},logging_settings:w(b.metadata),disabled_callbacks:Array.isArray(null===(h=b.metadata)||void 0===h?void 0:h.litellm_disabled_callbacks)?(0,j.PA)(b.metadata.litellm_disabled_callbacks):[],auto_rotate:b.auto_rotate||!1,...b.rotation_interval&&{rotation_interval:b.rotation_interval},allowed_routes:b.allowed_routes};(0,p.useEffect)(()=>{var e,s,a,l,t,r,i,n,d;D.setFieldsValue({...b,token:b.token||b.token_id,budget_duration:ex(b.budget_duration),metadata:Z(C(b.metadata)),guardrails:null===(e=b.metadata)||void 0===e?void 0:e.guardrails,disable_global_guardrails:(null===(s=b.metadata)||void 0===s?void 0:s.disable_global_guardrails)||!1,prompts:null===(a=b.metadata)||void 0===a?void 0:a.prompts,tags:null===(l=b.metadata)||void 0===l?void 0:l.tags,vector_stores:(null===(t=b.object_permission)||void 0===t?void 0:t.vector_stores)||[],mcp_servers_and_groups:{servers:(null===(r=b.object_permission)||void 0===r?void 0:r.mcp_servers)||[],accessGroups:(null===(i=b.object_permission)||void 0===i?void 0:i.mcp_access_groups)||[]},mcp_tool_permissions:(null===(n=b.object_permission)||void 0===n?void 0:n.mcp_tool_permissions)||{},logging_settings:w(b.metadata),disabled_callbacks:Array.isArray(null===(d=b.metadata)||void 0===d?void 0:d.litellm_disabled_callbacks)?(0,j.PA)(b.metadata.litellm_disabled_callbacks):[],auto_rotate:b.auto_rotate||!1,...b.rotation_interval&&{rotation_interval:b.rotation_interval},allowed_routes:b.allowed_routes})},[b,D]),(0,p.useEffect)(()=>{D.setFieldValue("auto_rotate",G)},[G,D]),(0,p.useEffect)(()=>{eo&&D.setFieldValue("rotation_interval",eo)},[eo,D]),(0,p.useEffect)(()=>{(async()=>{if(k)try{let e=await (0,I.tagListCall)(k);R(e)}catch(e){A.Z.fromBackend("Error fetching tags: "+e)}})()},[k]),console.log("premiumUser:",L);let eh=async e=>{try{eu(!0),await f(e)}finally{eu(!1)}};return(0,l.jsxs)(m.Z,{form:D,onFinish:eh,initialValues:eg,layout:"vertical",children:[(0,l.jsx)(m.Z.Item,{label:"Key Alias",name:"key_alias",children:(0,l.jsx)(J.o,{})}),(0,l.jsx)(m.Z.Item,{label:"Models",name:"models",children:(0,l.jsx)(m.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.allowed_routes!==s.allowed_routes||e.models!==s.models,children:e=>{let{getFieldValue:s,setFieldValue:a}=e,t=s("allowed_routes")||[],r=t.includes("management_routes")||t.includes("info_routes"),i=s("models")||[];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)($.default,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:r,value:r?[]:i,onChange:e=>a("models",e),children:[V.length>0&&(0,l.jsx)($.default.Option,{value:"all-team-models",children:"All Team Models"}),V.map(e=>(0,l.jsx)($.default.Option,{value:e,children:e},e))]}),r&&(0,l.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Models field is disabled for this key type"})]})}})}),(0,l.jsx)(m.Z.Item,{label:"Key Type",children:(0,l.jsx)(m.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.allowed_routes!==s.allowed_routes,children:e=>{let{getFieldValue:s,setFieldValue:a}=e,t=ed(s("allowed_routes"));return(0,l.jsxs)($.default,{placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",value:t,onChange:e=>{switch(e){case"default":a("allowed_routes",[]);break;case"llm_api":a("allowed_routes",["llm_api_routes"]);break;case"management":a("allowed_routes",["management_routes"]),a("models",[])}},children:[(0,l.jsx)($.default.Option,{value:"default",label:"Default",children:(0,l.jsxs)("div",{style:{padding:"4px 0"},children:[(0,l.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,l.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call LLM API + Management routes"})]})}),(0,l.jsx)($.default.Option,{value:"llm_api",label:"LLM API",children:(0,l.jsxs)("div",{style:{padding:"4px 0"},children:[(0,l.jsx)("div",{style:{fontWeight:500},children:"LLM API"}),(0,l.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only LLM API routes (chat/completions, embeddings, etc.)"})]})}),(0,l.jsx)($.default.Option,{value:"management",label:"Management",children:(0,l.jsxs)("div",{style:{padding:"4px 0"},children:[(0,l.jsx)("div",{style:{fontWeight:500},children:"Management"}),(0,l.jsx)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:"Can call only management routes (user/team/key management)"})]})})]})}})}),(0,l.jsx)(m.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,l.jsx)(er.Z,{step:.01,style:{width:"100%"},placeholder:"Enter a numerical value"})}),(0,l.jsx)(m.Z.Item,{label:"Reset Budget",name:"budget_duration",children:(0,l.jsxs)($.default,{placeholder:"n/a",children:[(0,l.jsx)($.default.Option,{value:"daily",children:"Daily"}),(0,l.jsx)($.default.Option,{value:"weekly",children:"Weekly"}),(0,l.jsx)($.default.Option,{value:"monthly",children:"Monthly"})]})}),(0,l.jsx)(m.Z.Item,{label:"TPM Limit",name:"tpm_limit",children:(0,l.jsx)(er.Z,{min:0})}),(0,l.jsx)(es.Z,{type:"tpm",name:"tpm_limit_type",showDetailedDescriptions:!1}),(0,l.jsx)(m.Z.Item,{label:"RPM Limit",name:"rpm_limit",children:(0,l.jsx)(er.Z,{min:0})}),(0,l.jsx)(es.Z,{type:"rpm",name:"rpm_limit_type",showDetailedDescriptions:!1}),(0,l.jsx)(m.Z.Item,{label:"Max Parallel Requests",name:"max_parallel_requests",children:(0,l.jsx)(er.Z,{min:0})}),(0,l.jsx)(m.Z.Item,{label:"Model TPM Limit",name:"model_tpm_limit",children:(0,l.jsx)(Q.default.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,l.jsx)(m.Z.Item,{label:"Model RPM Limit",name:"model_rpm_limit",children:(0,l.jsx)(Q.default.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}'})}),(0,l.jsx)(m.Z.Item,{label:"Guardrails",name:"guardrails",children:k&&(0,l.jsx)(B.Z,{onChange:e=>{D.setFieldValue("guardrails",e)},accessToken:k,disabled:!L})}),(0,l.jsx)(m.Z.Item,{label:(0,l.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,l.jsx)(x.Z,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,l.jsx)(W.Z,{style:{marginLeft:"4px"}})})]}),name:"disable_global_guardrails",valuePropName:"checked",children:(0,l.jsx)(Y.Z,{disabled:!L,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,l.jsx)(m.Z.Item,{label:(0,l.jsxs)("span",{children:["Policies"," ",(0,l.jsx)(x.Z,{title:"Apply policies to this key to control guardrails and other settings",children:(0,l.jsx)(W.Z,{style:{marginLeft:"4px"}})})]}),name:"policies",children:k&&(0,l.jsx)(q.Z,{onChange:e=>{D.setFieldValue("policies",e)},accessToken:k,disabled:!L})}),(0,l.jsx)(m.Z.Item,{label:"Tags",name:"tags",children:(0,l.jsx)($.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(M).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),(0,l.jsx)(m.Z.Item,{label:"Prompts",name:"prompts",children:(0,l.jsx)(x.Z,{title:L?"":"Setting prompts by key is a premium feature",placement:"top",children:(0,l.jsx)($.default,{mode:"tags",style:{width:"100%"},disabled:!L,placeholder:L?Array.isArray(null===(v=b.metadata)||void 0===v?void 0:v.prompts)&&b.metadata.prompts.length>0?"Current: ".concat(b.metadata.prompts.join(", ")):"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:E.map(e=>({value:e,label:e}))})})}),(0,l.jsx)(m.Z.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,l.jsx)(x.Z,{title:L?"":"Setting allowed pass through routes by key is a premium feature",placement:"top",children:(0,l.jsx)(ee.Z,{onChange:e=>D.setFieldValue("allowed_passthrough_routes",e),value:D.getFieldValue("allowed_passthrough_routes"),accessToken:k||"",placeholder:L?Array.isArray(null===(y=b.metadata)||void 0===y?void 0:y.allowed_passthrough_routes)&&b.metadata.allowed_passthrough_routes.length>0?"Current: ".concat(b.metadata.allowed_passthrough_routes.join(", ")):"Select or enter allowed pass through routes":"Premium feature - Upgrade to set allowed pass through routes by key",disabled:!L})})}),(0,l.jsx)(m.Z.Item,{label:"Vector Stores",name:"vector_stores",children:(0,l.jsx)(en.Z,{onChange:e=>D.setFieldValue("vector_stores",e),value:D.getFieldValue("vector_stores"),accessToken:k||"",placeholder:"Select vector stores"})}),(0,l.jsx)(m.Z.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,l.jsx)(ea.Z,{onChange:e=>D.setFieldValue("mcp_servers_and_groups",e),value:D.getFieldValue("mcp_servers_and_groups"),accessToken:k||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,l.jsx)(m.Z.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,l.jsx)(Q.default,{type:"hidden"})}),(0,l.jsx)(m.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.mcp_servers_and_groups!==s.mcp_servers_and_groups||e.mcp_tool_permissions!==s.mcp_tool_permissions,children:()=>{var e;return(0,l.jsx)("div",{className:"mb-6",children:(0,l.jsx)(el.Z,{accessToken:k||"",selectedServers:(null===(e=D.getFieldValue("mcp_servers_and_groups"))||void 0===e?void 0:e.servers)||[],toolPermissions:D.getFieldValue("mcp_tool_permissions")||{},onChange:e=>D.setFieldsValue({mcp_tool_permissions:e})})})}}),(0,l.jsx)(m.Z.Item,{label:"Agents / Access Groups",name:"agents_and_groups",children:(0,l.jsx)(H.Z,{onChange:e=>D.setFieldValue("agents_and_groups",e),value:D.getFieldValue("agents_and_groups"),accessToken:k||"",placeholder:"Select agents or access groups (optional)"})}),(0,l.jsx)(m.Z.Item,{label:"Team ID",name:"team_id",children:(0,l.jsx)($.default,{placeholder:"Select team",showSearch:!0,style:{width:"100%"},filterOption:(e,s)=>{var a,l;let t=null==N?void 0:N.find(e=>e.team_id===(null==s?void 0:s.value));return!!t&&null!==(l=null===(a=t.team_alias)||void 0===a?void 0:a.toLowerCase().includes(e.toLowerCase()))&&void 0!==l&&l},children:null==N?void 0:N.map(e=>(0,l.jsx)($.default.Option,{value:e.team_id,children:"".concat(e.team_alias," (").concat(e.team_id,")")},e.team_id))})}),(0,l.jsx)(m.Z.Item,{label:"Logging Settings",name:"logging_settings",children:(0,l.jsx)(ei.Z,{value:D.getFieldValue("logging_settings"),onChange:e=>D.setFieldValue("logging_settings",e),disabledCallbacks:z,onDisabledCallbacksChange:e=>{K((0,j.PA)(e)),D.setFieldValue("disabled_callbacks",e)}})}),(0,l.jsx)(m.Z.Item,{label:"Metadata",name:"metadata",children:(0,l.jsx)(Q.default.TextArea,{rows:10})}),(0,l.jsxs)("div",{className:"mb-4",children:[(0,l.jsx)(X.Z,{form:D,autoRotationEnabled:G,onAutoRotationChange:U,rotationInterval:eo,onRotationIntervalChange:ec}),(0,l.jsx)(m.Z.Item,{name:"duration",hidden:!0,initialValue:"",children:(0,l.jsx)(Q.default,{})})]}),(0,l.jsx)(m.Z.Item,{name:"token",hidden:!0,children:(0,l.jsx)(Q.default,{})}),(0,l.jsx)(m.Z.Item,{name:"allowed_routes",hidden:!0,children:(0,l.jsx)(Q.default,{})}),(0,l.jsx)(m.Z.Item,{name:"disabled_callbacks",hidden:!0,children:(0,l.jsx)(Q.default,{})}),(0,l.jsx)(m.Z.Item,{name:"auto_rotate",hidden:!0,children:(0,l.jsx)(Q.default,{})}),(0,l.jsx)(m.Z.Item,{name:"rotation_interval",hidden:!0,children:(0,l.jsx)(Q.default,{})}),(0,l.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,l.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,l.jsx)(J.z,{variant:"secondary",onClick:_,disabled:em,children:"Cancel"}),(0,l.jsx)(J.z,{type:"submit",loading:em,children:"Save Changes"})]})})]})}function ec(e){var s,a,y,b,N,k,D,E,T,M,R,F,V;let{onClose:O,keyData:z,teams:K,onKeyDataUpdate:B,onDelete:q,backButtonText:W="Back to Keys"}=e,{accessToken:J,userId:$,userRole:Q,premiumUser:Y}=(0,L.Z)(),{teams:H}=(0,t.Z)(),[X,ee]=(0,p.useState)(!1),[es]=m.Z.useForm(),[ea,el]=(0,p.useState)(!1),[et,er]=(0,p.useState)(!1),[ei,en]=(0,p.useState)(""),[ed,ec]=(0,p.useState)(!1),[em,eu]=(0,p.useState)({}),[ex,eg]=(0,p.useState)(z),[eh,ep]=(0,p.useState)(null),[ev,ej]=(0,p.useState)(!1),[ey,eb]=(0,p.useState)({}),[e_,ef]=(0,p.useState)(!1);if((0,p.useEffect)(()=>{z&&eg(z)},[z]),(0,p.useEffect)(()=>{(async()=>{var e;let s=null==ex?void 0:null===(e=ex.metadata)||void 0===e?void 0:e.policies;if(!J||!s||!Array.isArray(s)||0===s.length)return;ef(!0);let a={};try{await Promise.all(s.map(async e=>{try{let s=await (0,I.getPolicyInfoWithGuardrails)(J,e);a[e]=s.resolved_guardrails||[]}catch(s){console.error("Failed to fetch guardrails for policy ".concat(e,":"),s),a[e]=[]}})),eb(a)}catch(e){console.error("Failed to fetch policy guardrails:",e)}finally{ef(!1)}})()},[J,null==ex?void 0:null===(s=ex.metadata)||void 0===s?void 0:s.policies]),(0,p.useEffect)(()=>{if(ev){let e=setTimeout(()=>{ej(!1)},5e3);return()=>clearTimeout(e)}},[ev]),!ex)return(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsx)(c.zx,{icon:n.Z,variant:"light",onClick:O,className:"mb-4",children:W}),(0,l.jsx)(c.xv,{children:"Key not found"})]});let eN=async e=>{try{var s,a,l,t;if(!J)return;let r=e.token;if(e.key=r,Y||(delete e.guardrails,delete e.prompts),e.max_budget=(0,i.C)(e.max_budget),void 0!==e.vector_stores&&(e.object_permission={...ex.object_permission,vector_stores:e.vector_stores||[]},delete e.vector_stores),void 0!==e.mcp_servers_and_groups){let{servers:s,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]};e.object_permission={...ex.object_permission,mcp_servers:s||[],mcp_access_groups:a||[]},delete e.mcp_servers_and_groups}if(void 0!==e.mcp_tool_permissions){let s=e.mcp_tool_permissions||{};Object.keys(s).length>0&&(e.object_permission={...e.object_permission,mcp_tool_permissions:s}),delete e.mcp_tool_permissions}if(void 0!==e.agents_and_groups){let{agents:s,accessGroups:a}=e.agents_and_groups||{agents:[],accessGroups:[]};e.object_permission={...e.object_permission,agents:s||[],agent_access_groups:a||[]},delete e.agents_and_groups}if(e.max_budget=(0,i.C)(e.max_budget),e.tpm_limit=(0,i.C)(e.tpm_limit),e.rpm_limit=(0,i.C)(e.rpm_limit),e.max_parallel_requests=(0,i.C)(e.max_parallel_requests),e.metadata&&"string"==typeof e.metadata)try{let l=JSON.parse(e.metadata);"tags"in l&&delete l.tags,e.metadata={...l,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...(null===(s=e.guardrails)||void 0===s?void 0:s.length)>0?{guardrails:e.guardrails}:{},...e.logging_settings?{logging:e.logging_settings}:{},...(null===(a=e.disabled_callbacks)||void 0===a?void 0:a.length)>0?{litellm_disabled_callbacks:(0,j.Z3)(e.disabled_callbacks)}:{}}}catch(e){console.error("Error parsing metadata JSON:",e),A.Z.error("Invalid metadata JSON");return}else{let{tags:s,...a}=e.metadata||{};e.metadata={...a,...Array.isArray(e.tags)&&e.tags.length>0?{tags:e.tags}:{},...(null===(l=e.guardrails)||void 0===l?void 0:l.length)>0?{guardrails:e.guardrails}:{},...e.logging_settings?{logging:e.logging_settings}:{},...(null===(t=e.disabled_callbacks)||void 0===t?void 0:t.length)>0?{litellm_disabled_callbacks:(0,j.Z3)(e.disabled_callbacks)}:{}}}"tags"in e&&delete e.tags,delete e.logging_settings,e.budget_duration&&(e.budget_duration=({daily:"24h",weekly:"7d",monthly:"30d"})[e.budget_duration]);let n=await (0,I.keyUpdateCall)(J,e);eg(e=>e?{...e,...n}:void 0),B&&B(n),A.Z.success("Key updated successfully"),ee(!1)}catch(e){A.Z.fromBackend((0,U.O)(e)),console.error("Error updating key:",e)}},ek=async()=>{try{if(er(!0),!J)return;await (0,I.keyDeleteCall)(J,ex.token||ex.token_id),A.Z.success("Key deleted successfully"),q&&q(),O()}catch(e){console.error("Error deleting the key:",e),A.Z.fromBackend(e)}finally{er(!1),el(!1),en("")}},ew=async(e,s)=>{await (0,r.vQ)(e)&&(eu(e=>({...e,[s]:!0})),setTimeout(()=>{eu(e=>({...e,[s]:!1}))},2e3))},eZ=e=>{let s=new Date(e),a=s.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),l=s.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return"".concat(a," at ").concat(l)};console.log("userRole",Q);let eC=(0,v.P4)(Q||"")||H&&(0,v._p)(null==H?void 0:null===(a=H.filter(e=>e.team_id===ex.team_id)[0])||void 0===a?void 0:a.members_with_roles,$||"")||$===ex.user_id&&"Internal Viewer"!==Q;return(0,l.jsxs)("div",{className:"w-full h-screen p-4",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.zx,{icon:n.Z,variant:"light",onClick:O,className:"mb-4",children:W}),(0,l.jsx)(c.Dx,{children:ex.key_alias||"Virtual Key"}),(0,l.jsxs)("div",{className:"flex items-center cursor-pointer mb-2 space-y-6",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"text-xs text-gray-400 uppercase tracking-wide mt-2",children:"Key ID"}),(0,l.jsx)(c.xv,{className:"text-gray-500 font-mono text-sm",children:ex.token_id||ex.token})]}),(0,l.jsx)(u.ZP,{type:"text",size:"small",icon:em["key-id"]?(0,l.jsx)(g.Z,{size:12}):(0,l.jsx)(h.Z,{size:12}),onClick:()=>ew(ex.token_id||ex.token,"key-id"),className:"ml-2 transition-all duration-200".concat(em["key-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,l.jsx)(c.xv,{className:"text-sm text-gray-500",children:ex.updated_at&&ex.updated_at!==ex.created_at?"Updated: ".concat(eZ(ex.updated_at)):"Created: ".concat(eZ(ex.created_at))}),ev&&(0,l.jsx)(c.Ct,{color:"green",size:"xs",className:"animate-pulse",children:"Recently Regenerated"}),eh&&(0,l.jsx)(c.Ct,{color:"blue",size:"xs",children:"Regenerated"})]})]}),eC&&(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(x.Z,{title:Y?"":"This is a LiteLLM Enterprise feature, and requires a valid key to use.",children:(0,l.jsx)("span",{className:"inline-block",children:(0,l.jsx)(c.zx,{icon:d.Z,variant:"secondary",onClick:()=>ec(!0),className:"flex items-center",disabled:!Y,children:"Regenerate Key"})})}),(0,l.jsx)(c.zx,{icon:o.Z,variant:"secondary",onClick:()=>el(!0),className:"flex items-center text-red-500 border-red-500 hover:text-red-700",children:"Delete Key"})]})]}),(0,l.jsx)(G,{selectedToken:ex,visible:ed,onClose:()=>ec(!1),onKeyUpdate:e=>{eg(s=>{if(s)return{...s,...e,created_at:new Date().toLocaleString()}}),ep(new Date),ej(!0),B&&B({...e,created_at:new Date().toLocaleString()})}}),(0,l.jsx)(f.Z,{isOpen:ea,title:"Delete Key",alertMessage:"This action is irreversible and will immediately revoke access for any applications using this key.",message:"Are you sure you want to delete this Virtual Key?",resourceInformationTitle:"Key Information",resourceInformation:[{label:"Key Alias",value:(null==ex?void 0:ex.key_alias)||"-"},{label:"Key ID",value:(null==ex?void 0:ex.token_id)||(null==ex?void 0:ex.token)||"-",code:!0},{label:"Team ID",value:(null==ex?void 0:ex.team_id)||"-",code:!0},{label:"Spend",value:(null==ex?void 0:ex.spend)?"$".concat((0,r.pw)(ex.spend,4)):"$0.0000"}],onCancel:()=>{el(!1),en("")},onOk:ek,confirmLoading:et,requiredConfirmation:null==ex?void 0:ex.key_alias}),(0,l.jsxs)(c.v0,{children:[(0,l.jsxs)(c.td,{className:"mb-4",children:[(0,l.jsx)(c.OK,{children:"Overview"}),(0,l.jsx)(c.OK,{children:"Settings"})]}),(0,l.jsxs)(c.nP,{children:[(0,l.jsx)(c.x4,{children:(0,l.jsxs)(c.rj,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,l.jsxs)(c.Zb,{children:[(0,l.jsx)(c.xv,{children:"Spend"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)(c.Dx,{children:["$",(0,r.pw)(ex.spend,4)]}),(0,l.jsxs)(c.xv,{children:["of"," ",null!==ex.max_budget?"$".concat((0,r.pw)(ex.max_budget)):"Unlimited"]})]})]}),(0,l.jsxs)(c.Zb,{children:[(0,l.jsx)(c.xv,{children:"Rate Limits"}),(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)(c.xv,{children:["TPM: ",null!==ex.tpm_limit?ex.tpm_limit:"Unlimited"]}),(0,l.jsxs)(c.xv,{children:["RPM: ",null!==ex.rpm_limit?ex.rpm_limit:"Unlimited"]})]})]}),(0,l.jsxs)(c.Zb,{children:[(0,l.jsx)(c.xv,{children:"Models"}),(0,l.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:ex.models&&ex.models.length>0?ex.models.map((e,s)=>(0,l.jsx)(c.Ct,{color:"red",children:e},s)):(0,l.jsx)(c.xv,{children:"No models specified"})})]}),(0,l.jsx)(c.Zb,{children:(0,l.jsx)(P.Z,{objectPermission:ex.object_permission,variant:"inline",accessToken:J})}),(0,l.jsxs)(c.Zb,{children:[(0,l.jsx)(c.xv,{className:"font-medium mb-3",children:"Guardrails"}),Array.isArray(null===(y=ex.metadata)||void 0===y?void 0:y.guardrails)&&ex.metadata.guardrails.length>0?(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:ex.metadata.guardrails.map((e,s)=>(0,l.jsx)(c.Ct,{color:"blue",children:e},s))}):(0,l.jsx)(c.xv,{className:"text-gray-500",children:"No guardrails configured"}),"boolean"==typeof(null===(b=ex.metadata)||void 0===b?void 0:b.disable_global_guardrails)&&!0===ex.metadata.disable_global_guardrails&&(0,l.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,l.jsx)(c.Ct,{color:"yellow",children:"Global Guardrails Disabled"})})]}),(0,l.jsxs)(c.Zb,{children:[(0,l.jsx)(c.xv,{className:"font-medium mb-3",children:"Policies"}),Array.isArray(null===(N=ex.metadata)||void 0===N?void 0:N.policies)&&ex.metadata.policies.length>0?(0,l.jsx)("div",{className:"space-y-4",children:ex.metadata.policies.map((e,s)=>(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(c.Ct,{color:"purple",children:e}),e_&&(0,l.jsx)(c.xv,{className:"text-xs text-gray-400",children:"Loading guardrails..."})]}),!e_&&ey[e]&&ey[e].length>0&&(0,l.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-gray-200",children:[(0,l.jsx)(c.xv,{className:"text-xs text-gray-500 mb-1",children:"Resolved Guardrails:"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-1",children:ey[e].map((e,s)=>(0,l.jsx)(c.Ct,{color:"blue",size:"xs",children:e},s))})]})]},s))}):(0,l.jsx)(c.xv,{className:"text-gray-500",children:"No policies configured"})]}),(0,l.jsx)(S.Z,{loggingConfigs:w(ex.metadata),disabledCallbacks:Array.isArray(null===(k=ex.metadata)||void 0===k?void 0:k.litellm_disabled_callbacks)?(0,j.PA)(ex.metadata.litellm_disabled_callbacks):[],variant:"card"}),(0,l.jsx)(_,{autoRotate:ex.auto_rotate,rotationInterval:ex.rotation_interval,lastRotationAt:ex.last_rotation_at,keyRotationAt:ex.key_rotation_at,nextRotationAt:ex.next_rotation_at,variant:"card"})]})}),(0,l.jsx)(c.x4,{children:(0,l.jsxs)(c.Zb,{className:"overflow-y-auto max-h-[65vh]",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,l.jsx)(c.Dx,{children:"Key Settings"}),!X&&Q&&v.LQ.includes(Q)&&(0,l.jsx)(c.zx,{onClick:()=>ee(!0),children:"Edit Settings"})]}),X?(0,l.jsx)(eo,{keyData:ex,onCancel:()=>ee(!1),onSubmit:eN,teams:K,accessToken:J,userID:$,userRole:Q,premiumUser:Y}):(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Key ID"}),(0,l.jsx)(c.xv,{className:"font-mono",children:ex.token_id||ex.token})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Key Alias"}),(0,l.jsx)(c.xv,{children:ex.key_alias||"Not Set"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Secret Key"}),(0,l.jsx)(c.xv,{className:"font-mono",children:ex.key_name})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Team ID"}),(0,l.jsx)(c.xv,{children:ex.team_id||"Not Set"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Organization"}),(0,l.jsx)(c.xv,{children:ex.organization_id||"Not Set"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Created"}),(0,l.jsx)(c.xv,{children:eZ(ex.created_at)})]}),eh&&(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Last Regenerated"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(c.xv,{children:eZ(eh)}),(0,l.jsx)(c.Ct,{color:"green",size:"xs",children:"Recent"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Expires"}),(0,l.jsx)(c.xv,{children:ex.expires?eZ(ex.expires):"Never"})]}),(0,l.jsx)(_,{autoRotate:ex.auto_rotate,rotationInterval:ex.rotation_interval,lastRotationAt:ex.last_rotation_at,keyRotationAt:ex.key_rotation_at,nextRotationAt:ex.next_rotation_at,variant:"inline",className:"pt-4 border-t border-gray-200"}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Spend"}),(0,l.jsxs)(c.xv,{children:["$",(0,r.pw)(ex.spend,4)," USD"]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Budget"}),(0,l.jsx)(c.xv,{children:null!==ex.max_budget?"$".concat((0,r.pw)(ex.max_budget,2)):"Unlimited"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Tags"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:Array.isArray(null===(D=ex.metadata)||void 0===D?void 0:D.tags)&&ex.metadata.tags.length>0?ex.metadata.tags.map((e,s)=>(0,l.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):"No tags specified"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Prompts"}),(0,l.jsx)(c.xv,{children:Array.isArray(null===(E=ex.metadata)||void 0===E?void 0:E.prompts)&&ex.metadata.prompts.length>0?ex.metadata.prompts.map((e,s)=>(0,l.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):"No prompts specified"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Allowed Pass Through Routes"}),(0,l.jsx)(c.xv,{children:Array.isArray(null===(T=ex.metadata)||void 0===T?void 0:T.allowed_passthrough_routes)&&ex.metadata.allowed_passthrough_routes.length>0?ex.metadata.allowed_passthrough_routes.map((e,s)=>(0,l.jsx)("span",{className:"px-2 mr-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):"No pass through routes specified"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Disable Global Guardrails"}),(0,l.jsx)(c.xv,{children:(null===(M=ex.metadata)||void 0===M?void 0:M.disable_global_guardrails)===!0?(0,l.jsx)(c.Ct,{color:"yellow",children:"Enabled - Global guardrails bypassed"}):(0,l.jsx)(c.Ct,{color:"green",children:"Disabled - Global guardrails active"})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Models"}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:ex.models&&ex.models.length>0?ex.models.map((e,s)=>(0,l.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:e},s)):(0,l.jsx)(c.xv,{children:"No models specified"})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Rate Limits"}),(0,l.jsxs)(c.xv,{children:["TPM: ",null!==ex.tpm_limit?ex.tpm_limit:"Unlimited"]}),(0,l.jsxs)(c.xv,{children:["RPM: ",null!==ex.rpm_limit?ex.rpm_limit:"Unlimited"]}),(0,l.jsxs)(c.xv,{children:["Max Parallel Requests:"," ",null!==ex.max_parallel_requests?ex.max_parallel_requests:"Unlimited"]}),(0,l.jsxs)(c.xv,{children:["Model TPM Limits:"," ",(null===(R=ex.metadata)||void 0===R?void 0:R.model_tpm_limit)?JSON.stringify(ex.metadata.model_tpm_limit):"Unlimited"]}),(0,l.jsxs)(c.xv,{children:["Model RPM Limits:"," ",(null===(F=ex.metadata)||void 0===F?void 0:F.model_rpm_limit)?JSON.stringify(ex.metadata.model_rpm_limit):"Unlimited"]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.xv,{className:"font-medium",children:"Metadata"}),(0,l.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:Z(C(ex.metadata))})]}),(0,l.jsx)(P.Z,{objectPermission:ex.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:J}),(0,l.jsx)(S.Z,{loggingConfigs:w(ex.metadata),disabledCallbacks:Array.isArray(null===(V=ex.metadata)||void 0===V?void 0:V.litellm_disabled_callbacks)?(0,j.PA)(ex.metadata.litellm_disabled_callbacks):[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]})]})}},33304:function(e,s,a){a.d(s,{C:function(){return l}});function l(e){return""===e?null:e}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6697-c1306587e479be83.js b/litellm/proxy/_experimental/out/_next/static/chunks/6697-c1306587e479be83.js
new file mode 100644
index 00000000000..7f7144f80da
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/6697-c1306587e479be83.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6697],{47323:function(e,t,r){r.d(t,{Z:function(){return p}});var n=r(5853),o=r(2265),l=r(47187),a=r(7084),i=r(13241),s=r(1153),d=r(26898);let c={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},u={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},f=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,s.bM)(t,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,s.bM)(t,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.q)((0,s.bM)(t,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,s.bM)(t,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.q)((0,s.bM)(t,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,s.bM)(t,d.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,i.q)((0,s.bM)(t,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,s.bM)(t,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,i.q)((0,s.bM)(t,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,s.bM)(t,d.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,i.q)((0,s.bM)(t,d.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},g=(0,s.fn)("Icon"),p=o.forwardRef((e,t)=>{let{icon:r,variant:d="simple",tooltip:p,size:b=a.u8.SM,color:v,className:h}=e,k=(0,n._T)(e,["icon","variant","tooltip","size","color","className"]),x=f(d,v),{tooltipProps:w,getReferenceProps:E}=(0,l.l)();return o.createElement("span",Object.assign({ref:(0,s.lq)([t,w.refs.setReference]),className:(0,i.q)(g("root"),"inline-flex shrink-0 items-center justify-center",x.bgColor,x.textColor,x.borderColor,x.ringColor,m[d].rounded,m[d].border,m[d].shadow,m[d].ring,c[b].paddingX,c[b].paddingY,h)},E,k),o.createElement(l.Z,Object.assign({text:p},w)),o.createElement(r,{className:(0,i.q)(g("icon"),"shrink-0",u[b].height,u[b].width)}))});p.displayName="Icon"},87452:function(e,t,r){r.d(t,{Z:function(){return u},r:function(){return c}});var n=r(5853),o=r(91054);r(42698),r(64016);var l=r(8710);r(33232);var a=r(13241),i=r(1153),s=r(2265);let d=(0,i.fn)("Accordion"),c=(0,s.createContext)({isOpen:!1}),u=s.forwardRef((e,t)=>{var r;let{defaultOpen:i=!1,children:u,className:m}=e,f=(0,n._T)(e,["defaultOpen","children","className"]),g=null!==(r=(0,s.useContext)(l.Z))&&void 0!==r?r:(0,a.q)("rounded-tremor-default border");return s.createElement(o.pJ,Object.assign({as:"div",ref:t,className:(0,a.q)(d("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",g,m),defaultOpen:i},f),e=>{let{open:t}=e;return s.createElement(c.Provider,{value:{isOpen:t}},u)})});u.displayName="Accordion"},88829:function(e,t,r){r.d(t,{Z:function(){return s}});var n=r(5853),o=r(2265),l=r(91054),a=r(13241);let i=(0,r(1153).fn)("AccordionBody"),s=o.forwardRef((e,t)=>{let{children:r,className:s}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(l.pJ.Panel,Object.assign({ref:t,className:(0,a.q)(i("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",s)},d),r)});s.displayName="AccordionBody"},72208:function(e,t,r){r.d(t,{Z:function(){return c}});var n=r(5853),o=r(2265),l=r(91054);let a=e=>{var t=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),o.createElement("path",{d:"M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z"}))};var i=r(87452),s=r(13241);let d=(0,r(1153).fn)("AccordionHeader"),c=o.forwardRef((e,t)=>{let{children:r,className:c}=e,u=(0,n._T)(e,["children","className"]),{isOpen:m}=(0,o.useContext)(i.r);return o.createElement(l.pJ.Button,Object.assign({ref:t,className:(0,s.q)(d("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",c)},u),o.createElement("div",{className:(0,s.q)(d("children"),"flex flex-1 text-inherit mr-4")},r),o.createElement("div",null,o.createElement(a,{className:(0,s.q)(d("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",m?"transition-all":"transition-all -rotate-180")})))});c.displayName="AccordionHeader"},21626:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(5853),o=r(2265),l=r(13241);let a=(0,r(1153).fn)("Table"),i=o.forwardRef((e,t)=>{let{children:r,className:i}=e,s=(0,n._T)(e,["children","className"]);return o.createElement("div",{className:(0,l.q)(a("root"),"overflow-auto",i)},o.createElement("table",Object.assign({ref:t,className:(0,l.q)(a("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),r))});i.displayName="Table"},97214:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(5853),o=r(2265),l=r(13241);let a=(0,r(1153).fn)("TableBody"),i=o.forwardRef((e,t)=>{let{children:r,className:i}=e,s=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tbody",Object.assign({ref:t,className:(0,l.q)(a("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},s),r))});i.displayName="TableBody"},28241:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(5853),o=r(2265),l=r(13241);let a=(0,r(1153).fn)("TableCell"),i=o.forwardRef((e,t)=>{let{children:r,className:i}=e,s=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("td",Object.assign({ref:t,className:(0,l.q)(a("root"),"align-middle whitespace-nowrap text-left p-4",i)},s),r))});i.displayName="TableCell"},58834:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(5853),o=r(2265),l=r(13241);let a=(0,r(1153).fn)("TableHead"),i=o.forwardRef((e,t)=>{let{children:r,className:i}=e,s=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("thead",Object.assign({ref:t,className:(0,l.q)(a("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},s),r))});i.displayName="TableHead"},69552:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(5853),o=r(2265),l=r(13241);let a=(0,r(1153).fn)("TableHeaderCell"),i=o.forwardRef((e,t)=>{let{children:r,className:i}=e,s=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("th",Object.assign({ref:t,className:(0,l.q)(a("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},s),r))});i.displayName="TableHeaderCell"},71876:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(5853),o=r(2265),l=r(13241);let a=(0,r(1153).fn)("TableRow"),i=o.forwardRef((e,t)=>{let{children:r,className:i}=e,s=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tr",Object.assign({ref:t,className:(0,l.q)(a("row"),i)},s),r))});i.displayName="TableRow"},84264:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(26898),o=r(13241),l=r(1153),a=r(2265);let i=a.forwardRef((e,t)=>{let{color:r,className:i,children:s}=e;return a.createElement("p",{ref:t,className:(0,o.q)("text-tremor-default",r?(0,l.bM)(r,n.K.text).textColor:(0,o.q)("text-tremor-content","dark:text-dark-tremor-content"),i)},s)});i.displayName="Text"},2651:function(e,t,r){r.d(t,{Z:function(){return k}});var n=r(93463),o=r(11938),l=r(70774),a=r(73602),i=r(91691),s=r(25119),d=r(37628),c=r(32417),u=r(4877),m=r(57943),f=r(12789),g=r(54558);let p=(e,t)=>new g.t(e).setA(t).toRgbString(),b=(e,t)=>new g.t(e).lighten(t).toHexString(),v=e=>{let t=(0,m.R_)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},h=(e,t)=>{let r=e||"#000",n=t||"#fff";return{colorBgBase:r,colorTextBase:n,colorText:p(n,.85),colorTextSecondary:p(n,.65),colorTextTertiary:p(n,.45),colorTextQuaternary:p(n,.25),colorFill:p(n,.18),colorFillSecondary:p(n,.12),colorFillTertiary:p(n,.08),colorFillQuaternary:p(n,.04),colorBgSolid:p(n,.95),colorBgSolidHover:p(n,1),colorBgSolidActive:p(n,.9),colorBgElevated:b(r,12),colorBgContainer:b(r,8),colorBgLayout:b(r,0),colorBgSpotlight:b(r,26),colorBgBlur:p(n,.04),colorBorder:b(r,26),colorBorderSecondary:b(r,19)}};var k={defaultSeed:s.u_.token,useToken:function(){let[e,t,r]=(0,i.ZP)();return{theme:e,token:t,hashId:r}},defaultAlgorithm:d.Z,darkAlgorithm:(e,t)=>{let r=Object.keys(l.M).map(t=>{let r=(0,m.R_)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,n,o)=>(e["".concat(t,"-").concat(o+1)]=r[o],e["".concat(t).concat(o+1)]=r[o],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),n=null!=t?t:(0,d.Z)(e),o=(0,f.Z)(e,{generateColorPalettes:v,generateNeutralColorPalettes:h});return Object.assign(Object.assign(Object.assign(Object.assign({},n),r),o),{colorPrimaryBg:o.colorPrimaryBorder,colorPrimaryBgHover:o.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let r=null!=t?t:(0,d.Z)(e),n=r.fontSizeSM,o=r.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),function(e){let{sizeUnit:t,sizeStep:r}=e,n=r-2;return{sizeXXL:t*(n+10),sizeXL:t*(n+6),sizeLG:t*(n+2),sizeMD:t*(n+2),sizeMS:t*(n+1),size:t*n,sizeSM:t*n,sizeXS:t*(n-1),sizeXXS:t*(n-1)}}(null!=t?t:e)),(0,u.Z)(n)),{controlHeight:o}),(0,c.Z)(Object.assign(Object.assign({},r),{controlHeight:o})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,n.jG)(e.algorithm):o.Z,r=Object.assign(Object.assign({},l.Z),null==e?void 0:e.token);return(0,n.t2)(r,{override:null==e?void 0:e.token},t,a.Z)},defaultConfig:s.u_,_internalContext:s.Mj}},86462:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});t.Z=o},44633:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});t.Z=o},3477:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});t.Z=o},53410:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});t.Z=o},91126:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=o},23628:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});t.Z=o},74998:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});t.Z=o},91054:function(e,t,r){let n,o;r.d(t,{pJ:function(){return L}});var l,a=r(71049),i=r(11323),s=r(2265),d=r(66797),c=r(93980),u=r(65573),m=r(67561),f=r(98218),g=r(33443),p=r(28294),b=r(31370),v=r(72468),h=r(5664),k=r(38929);let x=null!=(l=s.startTransition)?l:function(e){e()};var w=r(52724),E=((n=E||{})[n.Open=0]="Open",n[n.Closed=1]="Closed",n),C=((o=C||{})[o.ToggleDisclosure=0]="ToggleDisclosure",o[o.CloseDisclosure=1]="CloseDisclosure",o[o.SetButtonId=2]="SetButtonId",o[o.SetPanelId=3]="SetPanelId",o[o.SetButtonElement=4]="SetButtonElement",o[o.SetPanelElement=5]="SetPanelElement",o);let y={0:e=>({...e,disclosureState:(0,v.E)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId},4:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},5:(e,t)=>e.panelElement===t.element?e:{...e,panelElement:t.element}},N=(0,s.createContext)(null);function S(e){let t=(0,s.useContext)(N);if(null===t){let t=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,S),t}return t}N.displayName="DisclosureContext";let O=(0,s.createContext)(null);O.displayName="DisclosureAPIContext";let T=(0,s.createContext)(null);function j(e,t){return(0,v.E)(t.type,y,e,t)}T.displayName="DisclosurePanelContext";let M=s.Fragment,P=k.VN.RenderStrategy|k.VN.Static,L=Object.assign((0,k.yV)(function(e,t){let{defaultOpen:r=!1,...n}=e,o=(0,s.useRef)(null),l=(0,m.T)(t,(0,m.h)(e=>{o.current=e},void 0===e.as||e.as===s.Fragment)),a=(0,s.useReducer)(j,{disclosureState:r?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:i,buttonId:d},u]=a,f=(0,c.z)(e=>{u({type:1});let t=(0,h.r)(o);if(!t||!d)return;let r=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(d):t.getElementById(d);null==r||r.focus()}),b=(0,s.useMemo)(()=>({close:f}),[f]),x=(0,s.useMemo)(()=>({open:0===i,close:f}),[i,f]),w=(0,k.L6)();return s.createElement(N.Provider,{value:a},s.createElement(O.Provider,{value:b},s.createElement(g.Z,{value:f},s.createElement(p.up,{value:(0,v.E)(i,{0:p.ZM.Open,1:p.ZM.Closed})},w({ourProps:{ref:l},theirProps:n,slot:x,defaultTag:M,name:"Disclosure"})))))}),{Button:(0,k.yV)(function(e,t){let r=(0,s.useId)(),{id:n="headlessui-disclosure-button-".concat(r),disabled:o=!1,autoFocus:l=!1,...f}=e,[g,p]=S("Disclosure.Button"),v=(0,s.useContext)(T),h=null!==v&&v===g.panelId,x=(0,s.useRef)(null),E=(0,m.T)(x,t,(0,c.z)(e=>{if(!h)return p({type:4,element:e})}));(0,s.useEffect)(()=>{if(!h)return p({type:2,buttonId:n}),()=>{p({type:2,buttonId:null})}},[n,p,h]);let C=(0,c.z)(e=>{var t;if(h){if(1===g.disclosureState)return;switch(e.key){case w.R.Space:case w.R.Enter:e.preventDefault(),e.stopPropagation(),p({type:0}),null==(t=g.buttonElement)||t.focus()}}else switch(e.key){case w.R.Space:case w.R.Enter:e.preventDefault(),e.stopPropagation(),p({type:0})}}),y=(0,c.z)(e=>{e.key===w.R.Space&&e.preventDefault()}),N=(0,c.z)(e=>{var t;(0,b.P)(e.currentTarget)||o||(h?(p({type:0}),null==(t=g.buttonElement)||t.focus()):p({type:0}))}),{isFocusVisible:O,focusProps:j}=(0,a.F)({autoFocus:l}),{isHovered:M,hoverProps:P}=(0,i.X)({isDisabled:o}),{pressed:L,pressProps:Z}=(0,d.x)({disabled:o}),B=(0,s.useMemo)(()=>({open:0===g.disclosureState,hover:M,active:L,disabled:o,focus:O,autofocus:l}),[g,M,L,O,o,l]),R=(0,u.f)(e,g.buttonElement),F=h?(0,k.dG)({ref:E,type:R,disabled:o||void 0,autoFocus:l,onKeyDown:C,onClick:N},j,P,Z):(0,k.dG)({ref:E,id:n,type:R,"aria-expanded":0===g.disclosureState,"aria-controls":g.panelElement?g.panelId:void 0,disabled:o||void 0,autoFocus:l,onKeyDown:C,onKeyUp:y,onClick:N},j,P,Z);return(0,k.L6)()({ourProps:F,theirProps:f,slot:B,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,k.yV)(function(e,t){let r=(0,s.useId)(),{id:n="headlessui-disclosure-panel-".concat(r),transition:o=!1,...l}=e,[a,i]=S("Disclosure.Panel"),{close:d}=function e(t){let r=(0,s.useContext)(O);if(null===r){let r=Error("<".concat(t," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(r,e),r}return r}("Disclosure.Panel"),[u,g]=(0,s.useState)(null),b=(0,m.T)(t,(0,c.z)(e=>{x(()=>i({type:5,element:e}))}),g);(0,s.useEffect)(()=>(i({type:3,panelId:n}),()=>{i({type:3,panelId:null})}),[n,i]);let v=(0,p.oJ)(),[h,w]=(0,f.Y)(o,u,null!==v?(v&p.ZM.Open)===p.ZM.Open:0===a.disclosureState),E=(0,s.useMemo)(()=>({open:0===a.disclosureState,close:d}),[a.disclosureState,d]),C={ref:b,id:n,...(0,f.X)(w)},y=(0,k.L6)();return s.createElement(p.uu,null,s.createElement(T.Provider,{value:a.panelId},y({ourProps:C,theirProps:l,slot:E,defaultTag:"div",features:P,visible:h,name:"Disclosure.Panel"})))})})},98218:function(e,t,r){let n;r.d(t,{X:function(){return m},Y:function(){return f}});var o,l,a=r(2265),i=r(36933),s=r(59456),d=r(73389),c=r(40257);void 0!==c&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&(null==(o=null==c?void 0:c.env)?void 0:o.NODE_ENV)==="test"&&void 0===(null==(l=null==Element?void 0:Element.prototype)?void 0:l.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn("Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.\nPlease install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.\n\nExample usage:\n```js\nimport { mockAnimationsApi } from 'jsdom-testing-mocks'\nmockAnimationsApi()\n```"),[]});var u=((n=u||{})[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n);function m(e){let t={};for(let r in e)!0===e[r]&&(t["data-".concat(r)]="");return t}function f(e,t,r,n){let[o,l]=(0,a.useState)(r),{hasFlag:c,addFlag:u,removeFlag:m}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,[t,r]=(0,a.useState)(e),n=(0,a.useCallback)(e=>r(e),[t]),o=(0,a.useCallback)(e=>r(t=>t|e),[t]),l=(0,a.useCallback)(e=>(t&e)===e,[t]);return{flags:t,setFlag:n,addFlag:o,hasFlag:l,removeFlag:(0,a.useCallback)(e=>r(t=>t&~e),[r]),toggleFlag:(0,a.useCallback)(e=>r(t=>t^e),[r])}}(e&&o?3:0),f=(0,a.useRef)(!1),g=(0,a.useRef)(!1),p=(0,s.G)();return(0,d.e)(()=>{var o;if(e){if(r&&l(!0),!t){r&&u(3);return}return null==(o=null==n?void 0:n.start)||o.call(n,r),function(e,t){let{prepare:r,run:n,done:o,inFlight:l}=t,a=(0,i.k)();return function(e,t){let{inFlight:r,prepare:n}=t;if(null!=r&&r.current){n();return}let o=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=o}(e,{prepare:r,inFlight:l}),a.nextFrame(()=>{n(),a.requestAnimationFrame(()=>{a.add(function(e,t){var r,n;let o=(0,i.k)();if(!e)return o.dispose;let l=!1;o.add(()=>{l=!0});let a=null!=(n=null==(r=e.getAnimations)?void 0:r.call(e).filter(e=>e instanceof CSSTransition))?n:[];return 0===a.length?t():Promise.allSettled(a.map(e=>e.finished)).then(()=>{l||t()}),o.dispose}(e,o))})}),a.dispose}(t,{inFlight:f,prepare(){g.current?g.current=!1:g.current=f.current,f.current=!0,g.current||(r?(u(3),m(4)):(u(4),m(2)))},run(){g.current?r?(m(3),u(4)):(m(4),u(3)):r?m(1):u(1)},done(){var e;g.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(f.current=!1,m(7),r||l(!1),null==(e=null==n?void 0:n.end)||e.call(n,r))}})}},[e,r,t,p]),e?[o,{closed:c(1),enter:c(2),leave:c(4),transition:c(2)||c(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}},33443:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(2265);let o=(0,n.createContext)(()=>{});function l(e){let{value:t,children:r}=e;return n.createElement(o.Provider,{value:t},r)}},28294:function(e,t,r){let n;r.d(t,{ZM:function(){return a},oJ:function(){return i},up:function(){return s},uu:function(){return d}});var o=r(2265);let l=(0,o.createContext)(null);l.displayName="OpenClosedContext";var a=((n=a||{})[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n);function i(){return(0,o.useContext)(l)}function s(e){let{value:t,children:r}=e;return o.createElement(l.Provider,{value:t},r)}function d(e){let{children:t}=e;return o.createElement(l.Provider,{value:null},t)}},31370:function(e,t,r){function n(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(null==t?void 0:t.getAttribute("disabled"))==="";return!(n&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(r))&&n}r.d(t,{P:function(){return n}})}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6728-a6b270885bc8863f.js b/litellm/proxy/_experimental/out/_next/static/chunks/6728-a6b270885bc8863f.js
new file mode 100644
index 00000000000..053468f5e02
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/6728-a6b270885bc8863f.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6728],{57589:function(e,s,t){t.d(s,{Z:function(){return _}});var a=t(57437),r=t(39760),l=t(44633),n=t(86462),i=t(40278),c=t(78489),o=t(99981),d=t(10968),u=t(2265),m=t(59872);let x=e=>{let{key:s,info:t}=e;return{token:s,...t}};var h=t(19250),p=t(50665),g=t(12322),_=e=>{let{topKeys:s,teams:t,showTags:_=!1,topKeysLimit:f,setTopKeysLimit:j}=e,{accessToken:y,userRole:v,userId:k,premiumUser:b}=(0,r.Z)(),[Z,N]=(0,u.useState)(!1),[w,q]=(0,u.useState)(null),[S,C]=(0,u.useState)(void 0),[T,D]=(0,u.useState)("table"),[L,E]=(0,u.useState)(new Set),A=e=>{E(s=>{let t=new Set(s);return t.has(e)?t.delete(e):t.add(e),t})},F=async e=>{if(y)try{let s=await (0,h.keyInfoV1Call)(y,e.api_key),t=x(s);C(t),q(e.api_key),N(!0)}catch(e){console.error("Error fetching key info:",e)}},O=()=>{N(!1),q(null),C(void 0)};u.useEffect(()=>{let e=e=>{"Escape"===e.key&&Z&&O()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[Z]);let M=[{header:"Key ID",accessorKey:"api_key",cell:e=>(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(o.Z,{title:e.getValue(),children:(0,a.jsx)(c.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left overflow-hidden truncate max-w-[200px]",onClick:()=>F(e.row.original),children:e.getValue()?"".concat(e.getValue().slice(0,7),"..."):"-"})})})},{header:"Key Alias",accessorKey:"key_alias",cell:e=>e.getValue()||"-"}],U={header:"Spend (USD)",accessorKey:"spend",cell:e=>{let s=e.getValue();return s>0&&s<.01?"<$0.01":"$".concat((0,m.pw)(s,2))}},V=_?[...M,{header:"Tags",accessorKey:"tags",cell:e=>{let s=e.getValue(),t=e.row.original.api_key,r=L.has(t);if(!s||0===s.length)return"-";let i=s.sort((e,s)=>s.usage-e.usage),c=r?i:i.slice(0,2),d=s.length>2;return(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[c.map((e,s)=>(0,a.jsx)(o.Z,{title:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Tag Name:"})," ",e.tag]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Spend:"})," ",e.usage>0&&e.usage<.01?"<$0.01":"$".concat((0,m.pw)(e.usage,2))]})]}),children:(0,a.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[e.tag.slice(0,7),"..."]})},s)),d&&(0,a.jsx)("button",{onClick:()=>A(t),className:"ml-1 p-1 hover:bg-gray-200 rounded-full transition-colors",title:r?"Show fewer tags":"Show all tags",children:r?(0,a.jsx)(l.Z,{className:"h-3 w-3 text-gray-500"}):(0,a.jsx)(n.Z,{className:"h-3 w-3 text-gray-500"})})]})})}},U]:[...M,U],I=s.map(e=>({...e,display_key_alias:e.key_alias&&e.key_alias.length>10?"".concat(e.key_alias.slice(0,10),"..."):e.key_alias||"-"}));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,a.jsx)(d.Z,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:f,onChange:e=>j(e)}),(0,a.jsxs)("div",{className:"flex space-x-2",children:[(0,a.jsx)("button",{onClick:()=>D("table"),className:"px-3 py-1 text-sm rounded-md ".concat("table"===T?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Table View"}),(0,a.jsx)("button",{onClick:()=>D("chart"),className:"px-3 py-1 text-sm rounded-md ".concat("chart"===T?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Chart View"})]})]}),"chart"===T?(0,a.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,a.jsx)(i.Z,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(I.length,f)},data:I,index:"display_key_alias",categories:["spend"],colors:["cyan"],yAxisWidth:120,tickGap:5,layout:"vertical",showLegend:!1,valueFormatter:e=>"$".concat((0,m.pw)(e,2)),onValueChange:e=>F(e),showTooltip:!0,customTooltip:e=>{var s,t;let r=null===(t=e.payload)||void 0===t?void 0:null===(s=t[0])||void 0===s?void 0:s.payload;return(0,a.jsx)("div",{className:"relative z-50 p-3 bg-black/90 shadow-lg rounded-lg text-white max-w-xs",children:(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Key Alias: "}),(0,a.jsx)("span",{className:"font-mono text-gray-100 break-all",children:null==r?void 0:r.key_alias})]}),(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Key ID: "}),(0,a.jsx)("span",{className:"font-mono text-gray-100 break-all",children:null==r?void 0:r.api_key})]}),(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Spend: "}),(0,a.jsxs)("span",{className:"text-white font-medium",children:["$",(0,m.pw)(null==r?void 0:r.spend,2)]})]})]})})}})}):(0,a.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,a.jsx)(g.w,{columns:V,data:s,renderSubComponent:()=>(0,a.jsx)(a.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})}),Z&&w&&S&&(console.log("Rendering modal with:",{isModalOpen:Z,selectedKey:w,keyData:S}),(0,a.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",onClick:e=>{e.target===e.currentTarget&&O()},children:(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow-xl relative w-11/12 max-w-6xl max-h-[90vh] overflow-y-auto min-h-[750px]",children:[(0,a.jsx)("button",{onClick:O,className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700 focus:outline-none","aria-label":"Close",children:(0,a.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),(0,a.jsx)("div",{className:"p-6 h-full",children:(0,a.jsx)(p.Z,{keyId:w,onClose:O,keyData:S,teams:t})})]})}))]})}},16728:function(e,s,t){t.d(s,{Z:function(){return se}});var a=t(57437),r=t(40278),l=t(12514),n=t(49804),i=t(14042),c=t(67101),o=t(12485),d=t(18135),u=t(35242),m=t(29706),x=t(77991),h=t(21626),p=t(97214),g=t(28241),_=t(58834),f=t(69552),j=t(71876),y=t(84264),v=t(96761),k=t(10968),b=t(51653),Z=t(2265),N=t(19250),w=t(11713),q=t(90246),S=t(20347),C=t(39760);let T=(0,q.n)("agents"),D=()=>{let{accessToken:e,userRole:s}=(0,C.Z)();return(0,w.a)({queryKey:T.list({}),queryFn:async()=>await (0,N.getAgentsList)(e),enabled:!!e&&S.ZL.includes(s||"")})},L=(0,q.n)("customers"),E=()=>{let{accessToken:e,userRole:s}=(0,C.Z)();return(0,w.a)({queryKey:L.list({}),queryFn:async()=>await (0,N.allEndUsersCall)(e),enabled:!!e&&S.ZL.includes(s)})};var A=t(76134),F=t(59872),O=t(16312),M=t(29299),U=t(75105),V=t(44851);let I={blue:"#3b82f6",cyan:"#06b6d4",indigo:"#6366f1",green:"#22c55e",red:"#ef4444",purple:"#8b5cf6",emerald:"#37bc7d"},R=e=>{let{active:s,payload:t,label:r}=e;if(s&&t&&t.length){let e=e=>e.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),s=(e,s)=>{let t=s.substring(s.indexOf(".")+1);if(e.metrics&&t in e.metrics)return e.metrics[t]};return(0,a.jsxs)("div",{className:"w-56 rounded-tremor-default border border-tremor-border bg-tremor-background p-2 text-tremor-default shadow-tremor-dropdown",children:[(0,a.jsx)("p",{className:"text-tremor-content-strong",children:r}),t.map(t=>{var r;let l=null===(r=t.dataKey)||void 0===r?void 0:r.toString();if(!l||!t.payload)return null;let n=s(t.payload,l),i=l.includes("spend"),c=void 0!==n?i?"$".concat(n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})):n.toLocaleString():"N/A",o=I[t.color]||t.color;return(0,a.jsxs)("div",{className:"flex items-center justify-between space-x-4",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-2 ring-white drop-shadow-md",style:{backgroundColor:o}}),(0,a.jsx)("p",{className:"font-medium text-tremor-content dark:text-dark-tremor-content",children:e(l)})]}),(0,a.jsx)("p",{className:"font-medium text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",children:c})]},l)})]})}return null},z=e=>{let{categories:s,colors:t}=e,r=e=>e.replace("metrics.","").replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return(0,a.jsx)("div",{className:"flex items-center justify-end space-x-4",children:s.map((e,s)=>{let l=I[t[s]]||t[s];return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ring-4 ring-white",style:{backgroundColor:l}}),(0,a.jsx)("p",{className:"text-sm text-tremor-content dark:text-dark-tremor-content",children:r(e)})]},e)})})};var Y=t(56609);let K=[{title:"Model",dataIndex:"model",key:"model",render:e=>e||"-"},{title:"Spend (USD)",dataIndex:"spend",key:"spend",render:e=>"$".concat((0,F.pw)(e,2))},{title:"Successful",dataIndex:"successful_requests",key:"successful_requests",render:e=>(0,a.jsx)("span",{className:"text-green-600",children:(null==e?void 0:e.toLocaleString())||0})},{title:"Failed",dataIndex:"failed_requests",key:"failed_requests",render:e=>(0,a.jsx)("span",{className:"text-red-600",children:(null==e?void 0:e.toLocaleString())||0})},{title:"Tokens",dataIndex:"tokens",key:"tokens",render:e=>(null==e?void 0:e.toLocaleString())||0}];var $=e=>{let{topModels:s}=e,[t,n]=(0,Z.useState)("table");return 0===s.length?null:(0,a.jsxs)(l.Z,{className:"mt-4",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,a.jsx)(v.Z,{children:"Model Usage"}),(0,a.jsxs)("div",{className:"flex space-x-2",children:[(0,a.jsx)("button",{onClick:()=>n("table"),className:"px-3 py-1 text-sm rounded-md ".concat("table"===t?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Table"}),(0,a.jsx)("button",{onClick:()=>n("chart"),className:"px-3 py-1 text-sm rounded-md ".concat("chart"===t?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Chart"})]})]}),"chart"===t?(0,a.jsx)("div",{className:"max-h-[234px] overflow-y-auto",children:(0,a.jsx)(r.Z,{style:{height:40*s.length},data:s.map(e=>({key:e.model,spend:e.spend})),index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>"$".concat((0,F.pw)(e,2)),layout:"vertical",yAxisWidth:180,tickGap:5,showLegend:!1})}):(0,a.jsx)(Y.Z,{columns:K,dataSource:s,rowKey:"model",size:"small",pagination:!1,scroll:s.length>5?{y:195}:void 0})]})};function P(e){return e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?e/1e3+"k":e.toString()}function W(e){return 0===e?"$0":e>=1e6?"$"+e/1e6+"M":e>=1e3?"$"+e/1e3+"k":"$"+e}let B=e=>{var s,t;let{modelName:n,metrics:i,hidePromptCachingMetrics:o=!1}=e;return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)(c.Z,{numItems:4,className:"gap-4",children:[(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Requests"}),(0,a.jsx)(v.Z,{children:i.total_requests.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Successful Requests"}),(0,a.jsx)(v.Z,{children:i.total_successful_requests.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Tokens"}),(0,a.jsx)(v.Z,{children:i.total_tokens.toLocaleString()}),(0,a.jsxs)(y.Z,{children:[Math.round(i.total_tokens/i.total_successful_requests)," avg per successful request"]})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Spend"}),(0,a.jsxs)(v.Z,{children:["$",(0,F.pw)(i.total_spend,2)]}),(0,a.jsxs)(y.Z,{children:["$",(0,F.pw)(i.total_spend/i.total_successful_requests,3)," per successful request"]})]})]}),i.top_api_keys&&i.top_api_keys.length>0&&(0,a.jsxs)(l.Z,{className:"mt-4",children:[(0,a.jsx)(v.Z,{children:"Top Virtual Keys by Spend"}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)("div",{className:"grid grid-cols-1 gap-2",children:i.top_api_keys.map((e,s)=>(0,a.jsxs)("div",{className:"flex justify-between items-center p-3 bg-gray-50 rounded-lg",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"font-medium",children:e.key_alias||"".concat(e.api_key.substring(0,10),"...")}),e.team_id&&(0,a.jsxs)(y.Z,{className:"text-xs text-gray-500",children:["Team: ",e.team_id]})]}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsxs)(y.Z,{className:"font-medium",children:["$",(0,F.pw)(e.spend,2)]}),(0,a.jsxs)(y.Z,{className:"text-xs text-gray-500",children:[e.requests.toLocaleString()," requests | ",e.tokens.toLocaleString()," tokens"]})]})]},e.api_key))})})]}),i.top_models&&i.top_models.length>0&&(0,a.jsx)($,{topModels:i.top_models}),(0,a.jsxs)(l.Z,{className:"mt-4",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Spend per day"}),(0,a.jsx)(z,{categories:["metrics.spend"],colors:["green"]})]}),(0,a.jsx)(r.Z,{className:"mt-4",data:i.daily_data,index:"date",categories:["metrics.spend"],colors:["green"],valueFormatter:e=>"$".concat((0,F.pw)(e,2,!0)),yAxisWidth:72})]}),(0,a.jsxs)(c.Z,{numItems:2,className:"gap-4 mt-4",children:[(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Total Tokens"}),(0,a.jsx)(z,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,a.jsx)(U.Z,{className:"mt-4",data:i.daily_data,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:P,customTooltip:R,showLegend:!1})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Requests per day"}),(0,a.jsx)(z,{categories:["metrics.api_requests"],colors:["blue"]})]}),(0,a.jsx)(r.Z,{className:"mt-4",data:i.daily_data,index:"date",categories:["metrics.api_requests"],colors:["blue"],valueFormatter:P,customTooltip:R,showLegend:!1})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Success vs Failed Requests"}),(0,a.jsx)(z,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,a.jsx)(U.Z,{className:"mt-4",data:i.daily_data,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:P,stack:!0,customTooltip:R,showLegend:!1})]}),!o&&(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Prompt Caching Metrics"}),(0,a.jsx)(z,{categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"]})]}),(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsxs)(y.Z,{children:["Cache Read: ",(null===(s=i.total_cache_read_input_tokens)||void 0===s?void 0:s.toLocaleString())||0," tokens"]}),(0,a.jsxs)(y.Z,{children:["Cache Creation: ",(null===(t=i.total_cache_creation_input_tokens)||void 0===t?void 0:t.toLocaleString())||0," tokens"]})]}),(0,a.jsx)(U.Z,{className:"mt-4",data:i.daily_data,index:"date",categories:["metrics.cache_read_input_tokens","metrics.cache_creation_input_tokens"],colors:["cyan","purple"],valueFormatter:P,customTooltip:R,showLegend:!1})]})]})]})},G=e=>{let{modelMetrics:s,hidePromptCachingMetrics:t=!1}=e,r=Object.keys(s).sort((e,t)=>""===e?1:""===t?-1:s[t].total_spend-s[e].total_spend),n={total_requests:0,total_successful_requests:0,total_tokens:0,total_spend:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,daily_data:{}};Object.values(s).forEach(e=>{n.total_requests+=e.total_requests,n.total_successful_requests+=e.total_successful_requests,n.total_tokens+=e.total_tokens,n.total_spend+=e.total_spend,n.total_cache_read_input_tokens+=e.total_cache_read_input_tokens||0,n.total_cache_creation_input_tokens+=e.total_cache_creation_input_tokens||0,e.daily_data.forEach(e=>{n.daily_data[e.date]||(n.daily_data[e.date]={prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,spend:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0}),n.daily_data[e.date].prompt_tokens+=e.metrics.prompt_tokens,n.daily_data[e.date].completion_tokens+=e.metrics.completion_tokens,n.daily_data[e.date].total_tokens+=e.metrics.total_tokens,n.daily_data[e.date].api_requests+=e.metrics.api_requests,n.daily_data[e.date].spend+=e.metrics.spend,n.daily_data[e.date].successful_requests+=e.metrics.successful_requests,n.daily_data[e.date].failed_requests+=e.metrics.failed_requests,n.daily_data[e.date].cache_read_input_tokens+=e.metrics.cache_read_input_tokens||0,n.daily_data[e.date].cache_creation_input_tokens+=e.metrics.cache_creation_input_tokens||0})});let i=Object.entries(n.daily_data).map(e=>{let[s,t]=e;return{date:s,metrics:t}}).sort((e,s)=>new Date(e.date).getTime()-new Date(s.date).getTime());return(0,a.jsxs)("div",{className:"space-y-8",children:[(0,a.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,a.jsx)(v.Z,{children:"Overall Usage"}),(0,a.jsxs)(c.Z,{numItems:4,className:"gap-4 mb-4",children:[(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Requests"}),(0,a.jsx)(v.Z,{children:n.total_requests.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Successful Requests"}),(0,a.jsx)(v.Z,{children:n.total_successful_requests.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Tokens"}),(0,a.jsx)(v.Z,{children:n.total_tokens.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(y.Z,{children:"Total Spend"}),(0,a.jsxs)(v.Z,{children:["$",(0,F.pw)(n.total_spend,2)]})]})]}),(0,a.jsxs)(c.Z,{numItems:2,className:"gap-4",children:[(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Total Tokens Over Time"}),(0,a.jsx)(z,{categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"]})]}),(0,a.jsx)(U.Z,{className:"mt-4",data:i,index:"date",categories:["metrics.prompt_tokens","metrics.completion_tokens","metrics.total_tokens"],colors:["blue","cyan","indigo"],valueFormatter:P,customTooltip:R,showLegend:!1})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Total Requests Over Time"}),(0,a.jsx)(z,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"]})]}),(0,a.jsx)(U.Z,{className:"mt-4",data:i,index:"date",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["emerald","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:R,showLegend:!1})]})]})]}),(0,a.jsx)(V.default,{defaultActiveKey:r[0],children:r.map(e=>(0,a.jsx)(V.default.Panel,{header:(0,a.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,a.jsx)(v.Z,{children:s[e].label||"Unknown Item"}),(0,a.jsxs)("div",{className:"flex space-x-4 text-sm text-gray-500",children:[(0,a.jsxs)("span",{children:["$",(0,F.pw)(s[e].total_spend,2)]}),(0,a.jsxs)("span",{children:[s[e].total_requests.toLocaleString()," requests"]})]})]}),children:(0,a.jsx)(B,{modelName:e||"Unknown Model",metrics:s[e],hidePromptCachingMetrics:t})},e))})]})},H=(e,s,t)=>{let a=e.metadata.key_alias||"key-hash-".concat(s),r=e.metadata.team_id;if(r){let e=(0,M.o)(r,t);return e?"".concat(a," (team: ").concat(e,")"):"".concat(a," (team_id: ").concat(r,")")}return a},J=function(e,s){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a={};return e.results.forEach(e=>{Object.entries(e.breakdown[s]||{}).forEach(r=>{let[l,n]=r;a[l]||(a[l]={label:"api_keys"===s?H(n,l,t):l,total_requests:0,total_successful_requests:0,total_failed_requests:0,total_tokens:0,prompt_tokens:0,completion_tokens:0,total_spend:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,top_api_keys:[],top_models:[],daily_data:[]}),a[l].total_requests+=n.metrics.api_requests,a[l].prompt_tokens+=n.metrics.prompt_tokens,a[l].completion_tokens+=n.metrics.completion_tokens,a[l].total_tokens+=n.metrics.total_tokens,a[l].total_spend+=n.metrics.spend,a[l].total_successful_requests+=n.metrics.successful_requests,a[l].total_failed_requests+=n.metrics.failed_requests,a[l].total_cache_read_input_tokens+=n.metrics.cache_read_input_tokens||0,a[l].total_cache_creation_input_tokens+=n.metrics.cache_creation_input_tokens||0,a[l].daily_data.push({date:e.date,metrics:{prompt_tokens:n.metrics.prompt_tokens,completion_tokens:n.metrics.completion_tokens,total_tokens:n.metrics.total_tokens,api_requests:n.metrics.api_requests,spend:n.metrics.spend,successful_requests:n.metrics.successful_requests,failed_requests:n.metrics.failed_requests,cache_read_input_tokens:n.metrics.cache_read_input_tokens||0,cache_creation_input_tokens:n.metrics.cache_creation_input_tokens||0}})})}),"api_keys"!==s&&Object.entries(a).forEach(t=>{let[r,l]=t,n={};e.results.forEach(e=>{var t;let a=null===(t=e.breakdown[s])||void 0===t?void 0:t[r];a&&"api_key_breakdown"in a&&Object.entries(a.api_key_breakdown||{}).forEach(e=>{let[s,t]=e;n[s]||(n[s]={api_key:s,key_alias:t.metadata.key_alias,team_id:t.metadata.team_id,spend:0,requests:0,tokens:0}),n[s].spend+=t.metrics.spend,n[s].requests+=t.metrics.api_requests,n[s].tokens+=t.metrics.total_tokens})}),a[r].top_api_keys=Object.values(n).sort((e,s)=>s.spend-e.spend).slice(0,5)}),"api_keys"===s&&Object.entries(a).forEach(s=>{let[t,r]=s,l={};e.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(e=>{let[s,a]=e;if(a&&"api_key_breakdown"in a){var r;let e=null===(r=a.api_key_breakdown)||void 0===r?void 0:r[t];e&&(l[s]||(l[s]={model:s,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0}),l[s].spend+=e.metrics.spend,l[s].requests+=e.metrics.api_requests,l[s].successful_requests+=e.metrics.successful_requests||0,l[s].failed_requests+=e.metrics.failed_requests||0,l[s].tokens+=e.metrics.total_tokens)}})}),a[t].top_models=Object.values(l).sort((e,s)=>s.spend-e.spend)}),Object.values(a).forEach(e=>{e.daily_data.sort((e,s)=>new Date(e.date).getTime()-new Date(s.date).getTime())}),a};var Q=t(78489),X=t(94789),ee=t(49566),es=t(10032),et=t(22116),ea=t(37592),er=t(10353),el=t(9114),en=e=>{let{isOpen:s,onClose:t,accessToken:r}=e,[l]=es.Z.useForm(),[n,i]=(0,Z.useState)(!1),[c,o]=(0,Z.useState)(null),[d,u]=(0,Z.useState)(!1),[m,x]=(0,Z.useState)("cloudzero"),[h,p]=(0,Z.useState)(!1);(0,Z.useEffect)(()=>{s&&r&&g()},[s,r]);let g=async()=>{u(!0);try{let e=await fetch("/cloudzero/settings",{method:"GET",headers:{[(0,N.getGlobalLitellmHeaderName)()]:"Bearer ".concat(r),"Content-Type":"application/json"}});if(e.ok){let s=await e.json();o(s),l.setFieldsValue({connection_id:s.connection_id})}else if(404!==e.status){let s=await e.json();el.Z.fromBackend("Failed to load existing settings: ".concat(s.error||"Unknown error"))}}catch(e){console.error("Error loading CloudZero settings:",e),el.Z.fromBackend("Failed to load existing settings")}finally{u(!1)}},_=async e=>{if(!r){el.Z.fromBackend("No access token available");return}i(!0);try{let s={...e,timezone:"UTC"},t=await fetch(c?"/cloudzero/settings":"/cloudzero/init",{method:c?"PUT":"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:"Bearer ".concat(r),"Content-Type":"application/json"},body:JSON.stringify(s)}),a=await t.json();if(t.ok)return el.Z.success(a.message||"CloudZero settings saved successfully"),o({api_key_masked:e.api_key.substring(0,4)+"****"+e.api_key.slice(-4),connection_id:e.connection_id,status:"configured"}),!0;return el.Z.fromBackend(a.error||"Failed to save CloudZero settings"),!1}catch(e){return console.error("Error saving CloudZero settings:",e),el.Z.fromBackend("Failed to save CloudZero settings"),!1}finally{i(!1)}},f=async()=>{if(!r){el.Z.fromBackend("No access token available");return}p(!0);try{let e=await fetch("/cloudzero/export",{method:"POST",headers:{[(0,N.getGlobalLitellmHeaderName)()]:"Bearer ".concat(r),"Content-Type":"application/json"},body:JSON.stringify({limit:1e5,operation:"replace_hourly"})}),s=await e.json();e.ok?(el.Z.success(s.message||"Export to CloudZero completed successfully"),t()):el.Z.fromBackend(s.error||"Failed to export to CloudZero")}catch(e){console.error("Error exporting to CloudZero:",e),el.Z.fromBackend("Failed to export to CloudZero")}finally{p(!1)}},j=async()=>{p(!0);try{el.Z.info("CSV export functionality coming soon!"),t()}catch(e){console.error("Error exporting CSV:",e),el.Z.fromBackend("Failed to export CSV")}finally{p(!1)}},v=async()=>{if("cloudzero"===m){if(!c){let e=await l.validateFields();if(!await _(e))return}await f()}else await j()},k=()=>{l.resetFields(),x("cloudzero"),o(null),t()},b=[{value:"cloudzero",label:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:"/cloudzero.png",alt:"CloudZero",className:"w-5 h-5",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{children:"Export to CloudZero"})]})},{value:"csv",label:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),(0,a.jsx)("span",{children:"Export to CSV"})]})}];return(0,a.jsx)(et.Z,{title:"Export Data",open:s,onCancel:k,footer:null,width:600,destroyOnClose:!0,children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"font-medium mb-2 block",children:"Export Destination"}),(0,a.jsx)(ea.default,{value:m,onChange:x,options:b,className:"w-full",size:"large"})]}),"cloudzero"===m&&(0,a.jsx)("div",{children:d?(0,a.jsx)("div",{className:"flex justify-center py-8",children:(0,a.jsx)(er.Z,{size:"large"})}):(0,a.jsxs)(a.Fragment,{children:[c&&(0,a.jsx)(X.Z,{title:"Existing CloudZero Configuration",icon:()=>(0,a.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),color:"green",className:"mb-4",children:(0,a.jsxs)(y.Z,{children:["API Key: ",c.api_key_masked,(0,a.jsx)("br",{}),"Connection ID: ",c.connection_id]})}),!c&&(0,a.jsxs)(es.Z,{form:l,layout:"vertical",children:[(0,a.jsx)(es.Z.Item,{label:"CloudZero API Key",name:"api_key",rules:[{required:!0,message:"Please enter your CloudZero API key"}],children:(0,a.jsx)(ee.Z,{type:"password",placeholder:"Enter your CloudZero API key"})}),(0,a.jsx)(es.Z.Item,{label:"Connection ID",name:"connection_id",rules:[{required:!0,message:"Please enter the CloudZero connection ID"}],children:(0,a.jsx)(ee.Z,{placeholder:"Enter CloudZero connection ID"})})]})]})}),"csv"===m&&(0,a.jsx)(X.Z,{title:"CSV Export",icon:()=>(0,a.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),color:"blue",children:(0,a.jsx)(y.Z,{children:"Export your usage data as a CSV file for analysis in spreadsheet applications."})}),(0,a.jsxs)("div",{className:"flex justify-end space-x-2 pt-4",children:[(0,a.jsx)(Q.Z,{variant:"secondary",onClick:k,children:"Cancel"}),(0,a.jsx)(Q.Z,{onClick:v,loading:n||h,disabled:n||h,children:"cloudzero"===m?"Export to CloudZero":"Export CSV"})]})]})})},ei=t(47359),ec=t(50337),eo=t(5545),ed=e=>{let{value:s,onChange:t}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Format"}),(0,a.jsx)(ea.default,{value:s,onChange:t,className:"w-full",options:[{value:"csv",label:"CSV (Excel, Google Sheets)"},{value:"json",label:"JSON (includes metadata)"}]})]})},eu=e=>{var s,t;let{dateRange:r,selectedFilters:l}=e;return(0,a.jsxs)("div",{className:"text-sm text-gray-500",children:[null===(s=r.from)||void 0===s?void 0:s.toLocaleDateString()," - ",null===(t=r.to)||void 0===t?void 0:t.toLocaleDateString(),l.length>0&&" \xb7 ".concat(l.length," filter").concat(l.length>1?"s":"")]})},em=t(29967),ex=e=>{let{value:s,onChange:t,entityType:r}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium text-gray-700 block mb-2",children:"Export type"}),(0,a.jsx)(em.ZP.Group,{value:s,onChange:e=>t(e.target.value),className:"w-full",children:(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,a.jsx)(em.ZP,{value:"daily",className:"mt-0.5"}),(0,a.jsxs)("div",{className:"ml-3 flex-1",children:[(0,a.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",r]}),(0,a.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",r]})]})]}),(0,a.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,a.jsx)(em.ZP,{value:"daily_with_keys",className:"mt-0.5"}),(0,a.jsxs)("div",{className:"ml-3 flex-1",children:[(0,a.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day breakdown by ",r," and key"]}),(0,a.jsxs)("div",{className:"text-xs text-gray-500 mt-0.5",children:["Daily metrics for each ",r,", split by API key"]})]})]}),(0,a.jsxs)("label",{className:"flex items-start p-3 border border-gray-200 rounded-lg hover:bg-gray-50 cursor-pointer transition-colors",children:[(0,a.jsx)(em.ZP,{value:"daily_with_models",className:"mt-0.5"}),(0,a.jsxs)("div",{className:"ml-3 flex-1",children:[(0,a.jsxs)("div",{className:"font-medium text-sm",children:["Day-by-day by ",r," and model"]}),(0,a.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Daily metrics split by model"})]})]})]})})]})},eh=t(15452),ep=t.n(eh);let eg=e=>{if(!e)return null;for(let t of Object.values(e)){var s;let e=null==t?void 0:null===(s=t.metadata)||void 0===s?void 0:s.team_id;if(e)return e}return null},e_=function(e,s){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[];return e.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(r=>{let[l,n]=r,i=eg(n.api_key_breakdown),c=i&&t[i]||null;a.push({Date:e.date,[s]:c||"-",["".concat(s," ID")]:i||"-","Spend ($)":(0,F.pw)(n.metrics.spend,4),Requests:n.metrics.api_requests,"Successful Requests":n.metrics.successful_requests,"Failed Requests":n.metrics.failed_requests,"Total Tokens":n.metrics.total_tokens,"Prompt Tokens":n.metrics.prompt_tokens||0,"Completion Tokens":n.metrics.completion_tokens||0})})}),a.sort((e,s)=>new Date(e.Date).getTime()-new Date(s.Date).getTime())},ef=function(e,s){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a={};return e.results.forEach(e=>{Object.entries(e.breakdown.entities||{}).forEach(s=>{let[r,l]=s;Object.entries(l.api_key_breakdown||{}).forEach(s=>{var l,n,i,c,o,d,u,m,x,h,p,g,_,f,j,y;let[v,k]=s,b=(null==k?void 0:null===(l=k.metadata)||void 0===l?void 0:l.key_alias)||null,Z=(null==k?void 0:null===(n=k.metadata)||void 0===n?void 0:n.team_id)||r,N=Z&&t[Z]||null,w="".concat(e.date,"_").concat(Z,"_").concat(v);a[w]?(a[w].metrics.spend+=(null===(h=k.metrics)||void 0===h?void 0:h.spend)||0,a[w].metrics.api_requests+=(null===(p=k.metrics)||void 0===p?void 0:p.api_requests)||0,a[w].metrics.successful_requests+=(null===(g=k.metrics)||void 0===g?void 0:g.successful_requests)||0,a[w].metrics.failed_requests+=(null===(_=k.metrics)||void 0===_?void 0:_.failed_requests)||0,a[w].metrics.total_tokens+=(null===(f=k.metrics)||void 0===f?void 0:f.total_tokens)||0,a[w].metrics.prompt_tokens+=(null===(j=k.metrics)||void 0===j?void 0:j.prompt_tokens)||0,a[w].metrics.completion_tokens+=(null===(y=k.metrics)||void 0===y?void 0:y.completion_tokens)||0):a[w]={Date:e.date,teamId:Z,teamAlias:N,keyId:v,keyAlias:b,metrics:{spend:(null===(i=k.metrics)||void 0===i?void 0:i.spend)||0,api_requests:(null===(c=k.metrics)||void 0===c?void 0:c.api_requests)||0,successful_requests:(null===(o=k.metrics)||void 0===o?void 0:o.successful_requests)||0,failed_requests:(null===(d=k.metrics)||void 0===d?void 0:d.failed_requests)||0,total_tokens:(null===(u=k.metrics)||void 0===u?void 0:u.total_tokens)||0,prompt_tokens:(null===(m=k.metrics)||void 0===m?void 0:m.prompt_tokens)||0,completion_tokens:(null===(x=k.metrics)||void 0===x?void 0:x.completion_tokens)||0}}})})}),Object.values(a).map(e=>({Date:e.Date,[s]:e.teamAlias||"-",["".concat(s," ID")]:e.teamId||"-","Key Alias":e.keyAlias||"-","Key ID":e.keyId,"Spend ($)":(0,F.pw)(e.metrics.spend,4),Requests:e.metrics.api_requests,"Successful Requests":e.metrics.successful_requests,"Failed Requests":e.metrics.failed_requests,"Total Tokens":e.metrics.total_tokens,"Prompt Tokens":e.metrics.prompt_tokens,"Completion Tokens":e.metrics.completion_tokens})).sort((e,s)=>new Date(e.Date).getTime()-new Date(s.Date).getTime())},ej=function(e,s){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=[];return e.results.forEach(e=>{let r={};Object.entries(e.breakdown.entities||{}).forEach(s=>{let[t,a]=s;r[t]||(r[t]={}),Object.entries(e.breakdown.models||{}).forEach(e=>{let[s,l]=e;Object.entries(a.api_key_breakdown||{}).forEach(e=>{let[a,l]=e;r[t][s]||(r[t][s]={spend:0,requests:0,successful:0,failed:0,tokens:0}),r[t][s].spend+=l.metrics.spend||0,r[t][s].requests+=l.metrics.api_requests||0,r[t][s].successful+=l.metrics.successful_requests||0,r[t][s].failed+=l.metrics.failed_requests||0,r[t][s].tokens+=l.metrics.total_tokens||0})})}),Object.entries(r).forEach(r=>{var l;let[n,i]=r,c=null===(l=e.breakdown.entities)||void 0===l?void 0:l[n],o=eg(null==c?void 0:c.api_key_breakdown),d=o&&t[o]||null;Object.entries(i).forEach(t=>{let[r,l]=t;a.push({Date:e.date,[s]:d||"-",["".concat(s," ID")]:o||"-",Model:r,"Spend ($)":(0,F.pw)(l.spend,4),Requests:l.requests,Successful:l.successful,Failed:l.failed,"Total Tokens":l.tokens})})})}),a.sort((e,s)=>new Date(e.Date).getTime()-new Date(s.Date).getTime())},ey=function(e,s,t){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};switch(s){case"daily":default:return e_(e,t,a);case"daily_with_keys":return ef(e,t,a);case"daily_with_models":return ej(e,t,a)}},ev=(e,s,t,a,r)=>{var l,n;return{export_date:new Date().toISOString(),entity_type:e,date_range:{from:null===(l=s.from)||void 0===l?void 0:l.toISOString(),to:null===(n=s.to)||void 0===n?void 0:n.toISOString()},filters_applied:t.length>0?t:"None",export_scope:a,summary:{total_spend:r.metadata.total_spend,total_requests:r.metadata.total_api_requests,successful_requests:r.metadata.total_successful_requests,failed_requests:r.metadata.total_failed_requests,total_tokens:r.metadata.total_tokens}}},ek=function(e,s,t,a){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},l=ey(e,s,t,r),n=new Blob([ep().unparse(l)],{type:"text/csv;charset=utf-8;"}),i=window.URL.createObjectURL(n),c=document.createElement("a");c.href=i;let o="".concat(a,"_usage_").concat(s,"_").concat(new Date().toISOString().split("T")[0],".csv");c.download=o,document.body.appendChild(c),c.click(),document.body.removeChild(c),window.URL.revokeObjectURL(i)},eb=function(e,s,t,a,r,l){let n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},i=ey(e,s,t,n),c=new Blob([JSON.stringify({metadata:ev(a,r,l,s,e),data:i},null,2)],{type:"application/json"}),o=window.URL.createObjectURL(c),d=document.createElement("a");d.href=o;let u="".concat(a,"_usage_").concat(s,"_").concat(new Date().toISOString().split("T")[0],".json");d.download=u,document.body.appendChild(d),d.click(),document.body.removeChild(d),window.URL.revokeObjectURL(o)};var eZ=e=>{let{isOpen:s,onClose:t,entityType:r,spendData:l,dateRange:n,selectedFilters:i,customTitle:c}=e,[o,d]=(0,Z.useState)("csv"),[u,m]=(0,Z.useState)("daily"),[x,h]=(0,Z.useState)(!1),{data:p,isLoading:g}=(0,ei.y2)(),_=r.charAt(0).toUpperCase()+r.slice(1),f=c||"Export ".concat(_," Usage"),j=(0,Z.useMemo)(()=>(0,M.O)(p),[p]),y=async e=>{let s=e||o;h(!0);try{"csv"===s?(ek(l,u,_,r,j),el.Z.success("".concat(_," usage data exported successfully as CSV"))):(eb(l,u,_,r,n,i,j),el.Z.success("".concat(_," usage data exported successfully as JSON"))),t()}catch(e){console.error("Error exporting data:",e),el.Z.fromBackend("Failed to export data")}finally{h(!1)}};return(0,a.jsx)(et.Z,{title:(0,a.jsx)("span",{className:"text-base font-semibold",children:f}),open:s,onCancel:t,footer:null,width:480,children:(0,a.jsxs)("div",{className:"space-y-5 py-2",children:[g?(0,a.jsx)(ec.Z,{active:!0}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eu,{dateRange:n,selectedFilters:i}),(0,a.jsx)(ex,{value:u,onChange:m,entityType:r}),(0,a.jsx)(ed,{value:o,onChange:d})]}),g?(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,a.jsx)(ec.Z.Button,{active:!0}),(0,a.jsx)(ec.Z.Button,{active:!0})]}):(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2 pt-4 border-t",children:[(0,a.jsx)(eo.ZP,{variant:"outlined",onClick:t,disabled:x,children:"Cancel"}),(0,a.jsx)(eo.ZP,{onClick:()=>y(),loading:x||g,disabled:x||g,type:"primary",children:x?"Exporting...":"Export ".concat(o.toUpperCase())})]})]})})},eN=t(19431),ew=e=>{let{dateValue:s,entityType:t,spendData:r,showFilters:l=!1,filterLabel:n,filterPlaceholder:i,selectedFilters:c=[],onFiltersChange:o,filterOptions:d=[],customTitle:u,compactLayout:m=!1,teams:x=[]}=e,[h,p]=(0,Z.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsxs)("div",{className:"grid ".concat(l&&d.length>0?"grid-cols-[1fr_auto]":"grid-cols-[auto]"," items-end gap-4"),children:[l&&d.length>0&&(0,a.jsxs)("div",{children:[n&&(0,a.jsx)(eN.x,{className:"mb-2",children:n}),(0,a.jsx)(ea.default,{mode:"multiple",style:{width:"100%"},placeholder:i,value:c,onChange:o,options:d,allowClear:!0})]}),(0,a.jsx)("div",{className:"justify-self-end",children:(0,a.jsx)(eN.z,{onClick:()=>p(!0),icon:()=>(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})})]})}),(0,a.jsx)(eZ,{isOpen:h,onClose:()=>p(!1),entityType:t,spendData:r,dateRange:s,selectedFilters:c,customTitle:u,teams:x})]})},eq=t(42673),eS=t(5540),eC=t(49634),eT=t(77398),eD=t.n(eT);let eL=[{label:"Today",shortLabel:"today",getValue:()=>({from:eD()().startOf("day").toDate(),to:eD()().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:eD()().subtract(7,"days").startOf("day").toDate(),to:eD()().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:eD()().subtract(30,"days").startOf("day").toDate(),to:eD()().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:eD()().startOf("month").toDate(),to:eD()().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:eD()().startOf("year").toDate(),to:eD()().endOf("day").toDate()})}];var eE=e=>{let{value:s,onValueChange:t,label:r="Select Time Range",showTimeRange:l=!0}=e,[n,i]=(0,Z.useState)(!1),[c,o]=(0,Z.useState)(s),[d,u]=(0,Z.useState)(null),[m,x]=(0,Z.useState)(""),[h,p]=(0,Z.useState)(""),g=(0,Z.useRef)(null),_=(0,Z.useCallback)(e=>{if(!e.from||!e.to)return null;for(let s of eL){let t=s.getValue(),a=eD()(e.from).isSame(eD()(t.from),"day"),r=eD()(e.to).isSame(eD()(t.to),"day");if(a&&r)return s.shortLabel}return null},[]);(0,Z.useEffect)(()=>{u(_(s))},[s,_]);let f=(0,Z.useCallback)(()=>{if(!m||!h)return{isValid:!0,error:""};let e=eD()(m,"YYYY-MM-DD"),s=eD()(h,"YYYY-MM-DD");return e.isValid()&&s.isValid()?s.isBefore(e)?{isValid:!1,error:"End date cannot be before start date"}:{isValid:!0,error:""}:{isValid:!1,error:"Invalid date format"}},[m,h])();(0,Z.useEffect)(()=>{s.from&&x(eD()(s.from).format("YYYY-MM-DD")),s.to&&p(eD()(s.to).format("YYYY-MM-DD")),o(s)},[s]),(0,Z.useEffect)(()=>{let e=e=>{g.current&&!g.current.contains(e.target)&&i(!1)};return n&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[n]);let j=(0,Z.useCallback)((e,s)=>{if(!e||!s)return"Select date range";let t=e=>eD()(e).format("D MMM, HH:mm");return"".concat(t(e)," - ").concat(t(s))},[]),y=(0,Z.useCallback)(e=>{let s;if(!e.from)return e;let t={...e},a=new Date(e.from);return s=new Date(e.to?e.to:e.from),a.toDateString(),s.toDateString(),a.setHours(0,0,0,0),s.setHours(23,59,59,999),t.from=a,t.to=s,t},[]),v=e=>{let{from:s,to:t}=e.getValue();o({from:s,to:t}),u(e.shortLabel),x(eD()(s).format("YYYY-MM-DD")),p(eD()(t).format("YYYY-MM-DD"))},k=(0,Z.useCallback)(()=>{try{if(m&&h&&f.isValid){let e=eD()(m,"YYYY-MM-DD").startOf("day"),s=eD()(h,"YYYY-MM-DD").endOf("day");if(e.isValid()&&s.isValid()){let t={from:e.toDate(),to:s.toDate()};o(t);let a=_(t);u(a)}}}catch(e){console.warn("Invalid date format:",e)}},[m,h,f.isValid,_]);return(0,Z.useEffect)(()=>{k()},[k]),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[r&&(0,a.jsx)(eN.x,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:r}),(0,a.jsxs)("div",{className:"relative",ref:g,children:[(0,a.jsx)("div",{className:"w-[300px] px-3 py-2 text-sm border border-gray-300 rounded-md bg-white cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500",onClick:()=>i(!n),children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(eS.Z,{className:"text-gray-600"}),(0,a.jsx)("span",{className:"text-gray-900",children:j(s.from,s.to)})]}),(0,a.jsx)("svg",{className:"w-4 h-4 text-gray-400 transition-transform ".concat(n?"rotate-180":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),n&&(0,a.jsx)("div",{className:"absolute top-full right-0 z-[9999] min-w-[600px] mt-1 bg-white border border-gray-200 rounded-lg shadow-xl",children:(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsxs)("div",{className:"w-1/2 border-r border-gray-200",children:[(0,a.jsx)("div",{className:"p-3 border-b border-gray-200",children:(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Relative time"})}),(0,a.jsx)("div",{className:"h-[350px] overflow-y-auto",children:eL.map(e=>{let s=d===e.shortLabel;return(0,a.jsxs)("div",{className:"flex items-center justify-between px-5 py-4 cursor-pointer border-b border-gray-100 transition-colors ".concat(s?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"),onClick:()=>v(e),children:[(0,a.jsx)("span",{className:"text-sm ".concat(s?"text-blue-700 font-medium":"text-gray-700"),children:e.label}),(0,a.jsx)("span",{className:"text-xs px-2 py-1 rounded capitalize ".concat(s?"text-blue-700 bg-blue-100":"text-gray-500 bg-gray-100"),children:e.shortLabel})]},e.label)})})]}),(0,a.jsxs)("div",{className:"w-1/2 relative",children:[(0,a.jsx)("div",{className:"p-3.5 border-b border-gray-200",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(eC.Z,{className:"text-gray-600"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Start and end dates"})]})}),(0,a.jsxs)("div",{className:"p-6 space-y-6 pb-20",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"Start date"}),(0,a.jsx)("input",{type:"date",value:m,onChange:e=>x(e.target.value),className:"w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ".concat(f.isValid?"border-gray-300":"border-red-300 focus:border-red-500 focus:ring-red-200")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"End date"}),(0,a.jsx)("input",{type:"date",value:h,onChange:e=>p(e.target.value),className:"w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ".concat(f.isValid?"border-gray-300":"border-red-300 focus:border-red-500 focus:ring-red-200")})]}),!f.isValid&&f.error&&(0,a.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("svg",{className:"w-4 h-4 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,a.jsx)("span",{className:"text-sm text-red-700 font-medium",children:f.error})]})}),c.from&&c.to&&f.isValid&&(0,a.jsxs)("div",{className:"bg-blue-50 p-3 rounded-md space-y-1",children:[(0,a.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,a.jsx)("span",{className:"font-medium",children:"From:"})," ",eD()(c.from).format("MMM D, YYYY [at] HH:mm:ss")]}),(0,a.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,a.jsx)("span",{className:"font-medium",children:"To:"})," ",eD()(c.to).format("MMM D, YYYY [at] HH:mm:ss")]})]})]}),(0,a.jsx)("div",{className:"absolute bottom-4 right-4",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(eN.z,{variant:"secondary",onClick:()=>{o(s),s.from&&x(eD()(s.from).format("YYYY-MM-DD")),s.to&&p(eD()(s.to).format("YYYY-MM-DD")),u(_(s)),i(!1)},children:"Cancel"}),(0,a.jsx)(eN.z,{onClick:()=>{c.from&&c.to&&f.isValid&&(t(c),requestIdleCallback(()=>{t(y(c))},{timeout:100}),i(!1))},disabled:!c.from||!c.to||!f.isValid,children:"Apply"})]})})]})]})})]})]})},eA=t(91323);let eF=e=>{let{isDateChanging:s=!1}=e;return(0,a.jsx)("div",{className:"flex items-center justify-center h-40",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,a.jsx)(eA.S,{className:"size-5"}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"text-gray-600 text-sm font-medium",children:s?"Processing date selection...":"Loading chart data..."}),(0,a.jsx)("span",{className:"text-gray-400 text-xs mt-1",children:s?"This will only take a moment":"Fetching your data"})]})]})})};var eO=t(35829),eM=t(97765),eU=t(99981),eV=e=>{let{accessToken:s,selectedTags:t,formatAbbreviatedNumber:l}=e,[n,i]=(0,Z.useState)({results:[],total_count:0,page:1,page_size:50,total_pages:0}),[c,k]=(0,Z.useState)(!1),[b,w]=(0,Z.useState)(1),q=async()=>{if(s){k(!0);try{let e=await (0,N.perUserAnalyticsCall)(s,b,50,t.length>0?t:void 0);i(e)}catch(e){console.error("Failed to fetch per-user data:",e)}finally{k(!1)}}};return(0,Z.useEffect)(()=>{q()},[s,t,b]),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)(v.Z,{children:"Per User Usage"}),(0,a.jsx)(eM.Z,{children:"Individual developer usage metrics"}),(0,a.jsxs)(d.Z,{children:[(0,a.jsxs)(u.Z,{className:"mb-6",children:[(0,a.jsx)(o.Z,{children:"User Details"}),(0,a.jsx)(o.Z,{children:"Usage Distribution"})]}),(0,a.jsxs)(x.Z,{children:[(0,a.jsxs)(m.Z,{children:[(0,a.jsxs)(h.Z,{children:[(0,a.jsx)(_.Z,{children:(0,a.jsxs)(j.Z,{children:[(0,a.jsx)(f.Z,{children:"User ID"}),(0,a.jsx)(f.Z,{children:"User Email"}),(0,a.jsx)(f.Z,{children:"User Agent"}),(0,a.jsx)(f.Z,{className:"text-right",children:"Success Generations"}),(0,a.jsx)(f.Z,{className:"text-right",children:"Total Tokens"}),(0,a.jsx)(f.Z,{className:"text-right",children:"Failed Requests"}),(0,a.jsx)(f.Z,{className:"text-right",children:"Total Cost"})]})}),(0,a.jsx)(p.Z,{children:n.results.slice(0,10).map((e,s)=>(0,a.jsxs)(j.Z,{children:[(0,a.jsx)(g.Z,{children:(0,a.jsx)(y.Z,{className:"font-medium",children:e.user_id})}),(0,a.jsx)(g.Z,{children:(0,a.jsx)(y.Z,{children:e.user_email||"N/A"})}),(0,a.jsx)(g.Z,{children:(0,a.jsx)(y.Z,{children:e.user_agent||"Unknown"})}),(0,a.jsx)(g.Z,{className:"text-right",children:(0,a.jsx)(y.Z,{children:l(e.successful_requests)})}),(0,a.jsx)(g.Z,{className:"text-right",children:(0,a.jsx)(y.Z,{children:l(e.total_tokens)})}),(0,a.jsx)(g.Z,{className:"text-right",children:(0,a.jsx)(y.Z,{children:l(e.failed_requests)})}),(0,a.jsx)(g.Z,{className:"text-right",children:(0,a.jsxs)(y.Z,{children:["$",l(e.spend,4)]})})]},s))})]}),n.results.length>10&&(0,a.jsxs)("div",{className:"mt-4 flex justify-between items-center",children:[(0,a.jsxs)(y.Z,{className:"text-sm text-gray-500",children:["Showing 10 of ",n.total_count," results"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(Q.Z,{size:"sm",variant:"secondary",onClick:()=>{b>1&&w(b-1)},disabled:1===b,children:"Previous"}),(0,a.jsx)(Q.Z,{size:"sm",variant:"secondary",onClick:()=>{b=n.total_pages,children:"Next"})]})]})]}),(0,a.jsxs)(m.Z,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)(v.Z,{className:"text-lg",children:"User Usage Distribution"}),(0,a.jsx)(eM.Z,{children:"Number of users by successful request frequency"})]}),(0,a.jsx)(r.Z,{data:(()=>{let e=new Map;n.results.forEach(s=>{let t=s.user_agent||"Unknown";e.set(t,(e.get(t)||0)+1)});let s=Array.from(e.entries()).sort((e,s)=>{let[,t]=e,[,a]=s;return a-t}).slice(0,8).map(e=>{let[s]=e;return s}),t={"1-9 requests":{range:[1,9],agents:{}},"10-99 requests":{range:[10,99],agents:{}},"100-999 requests":{range:[100,999],agents:{}},"1K-9.9K requests":{range:[1e3,9999],agents:{}},"10K-99.9K requests":{range:[1e4,99999],agents:{}},"100K+ requests":{range:[1e5,1/0],agents:{}}};return n.results.forEach(e=>{let a=e.successful_requests,r=e.user_agent||"Unknown";s.includes(r)&&Object.entries(t).forEach(e=>{let[s,t]=e;a>=t.range[0]&&a<=t.range[1]&&(t.agents[r]||(t.agents[r]=0),t.agents[r]++)})}),Object.entries(t).map(e=>{let[t,a]=e,r={category:t};return s.forEach(e=>{r[e]=a.agents[e]||0}),r})})(),index:"category",categories:(()=>{let e=new Map;return n.results.forEach(s=>{let t=s.user_agent||"Unknown";e.set(t,(e.get(t)||0)+1)}),Array.from(e.entries()).sort((e,s)=>{let[,t]=e,[,a]=s;return a-t}).slice(0,8).map(e=>{let[s]=e;return s})})(),colors:["blue","green","orange","red","purple","yellow","pink","indigo"],valueFormatter:e=>"".concat(e," users"),yAxisWidth:80,showLegend:!0,stack:!0})]})]})]})]})},eI=e=>{let{accessToken:s,userRole:t,dateValue:n,onDateChange:i}=e,[h,p]=(0,Z.useState)({results:[]}),[g,_]=(0,Z.useState)({results:[]}),[f,j]=(0,Z.useState)({results:[]}),[k,b]=(0,Z.useState)({results:[]}),[w,q]=(0,Z.useState)(""),[S,C]=(0,Z.useState)([]),[T,D]=(0,Z.useState)([]),[L,E]=(0,Z.useState)(!1),[A,F]=(0,Z.useState)(!1),[O,M]=(0,Z.useState)(!1),[U,V]=(0,Z.useState)(!1),[I,R]=(0,Z.useState)(!1),z=new Date,Y=async()=>{if(s){E(!0);try{let e=await (0,N.tagDistinctCall)(s);C(e.results.map(e=>e.tag))}catch(e){console.error("Failed to fetch available tags:",e)}finally{E(!1)}}},K=async()=>{if(s){F(!0);try{let e=await (0,N.tagDauCall)(s,z,w||void 0,T.length>0?T:void 0);p(e)}catch(e){console.error("Failed to fetch DAU data:",e)}finally{F(!1)}}},$=async()=>{if(s){M(!0);try{let e=await (0,N.tagWauCall)(s,z,w||void 0,T.length>0?T:void 0);_(e)}catch(e){console.error("Failed to fetch WAU data:",e)}finally{M(!1)}}},P=async()=>{if(s){V(!0);try{let e=await (0,N.tagMauCall)(s,z,w||void 0,T.length>0?T:void 0);j(e)}catch(e){console.error("Failed to fetch MAU data:",e)}finally{V(!1)}}},W=async()=>{if(s&&n.from&&n.to){R(!0);try{let e=await (0,N.userAgentSummaryCall)(s,n.from,n.to,T.length>0?T:void 0);b(e)}catch(e){console.error("Failed to fetch user agent summary data:",e)}finally{R(!1)}}};(0,Z.useEffect)(()=>{Y()},[s]),(0,Z.useEffect)(()=>{if(!s)return;let e=setTimeout(()=>{K(),$(),P()},50);return()=>clearTimeout(e)},[s,w,T]),(0,Z.useEffect)(()=>{if(!n.from||!n.to)return;let e=setTimeout(()=>{W()},50);return()=>clearTimeout(e)},[s,n,T]);let B=e=>e.startsWith("User-Agent: ")?e.replace("User-Agent: ",""):e,G=e=>e.length>15?e.substring(0,15)+"...":e,H=e=>Object.entries(e.reduce((e,s)=>(e[s.tag]=(e[s.tag]||0)+s.active_users,e),{})).sort((e,s)=>{let[,t]=e,[,a]=s;return a-t}).map(e=>{let[s]=e;return s}),J=H(h.results).slice(0,10),Q=H(g.results).slice(0,10),X=H(f.results).slice(0,10),ee=(()=>{let e=[],s=new Date;for(let t=6;t>=0;t--){let a=new Date(s);a.setDate(a.getDate()-t);let r={date:a.toISOString().split("T")[0]};J.forEach(e=>{r[B(e)]=0}),e.push(r)}return h.results.forEach(s=>{let t=B(s.tag),a=e.find(e=>e.date===s.date);a&&(a[t]=s.active_users)}),e})(),es=(()=>{let e=[];for(let s=1;s<=7;s++){let t={week:"Week ".concat(s)};Q.forEach(e=>{t[B(e)]=0}),e.push(t)}return g.results.forEach(s=>{let t=B(s.tag),a=s.date.match(/Week (\d+)/);if(a){let r="Week ".concat(a[1]),l=e.find(e=>e.week===r);l&&(l[t]=s.active_users)}}),e})(),et=(()=>{let e=[];for(let s=1;s<=7;s++){let t={month:"Month ".concat(s)};X.forEach(e=>{t[B(e)]=0}),e.push(t)}return f.results.forEach(s=>{let t=B(s.tag),a=s.date.match(/Month (\d+)/);if(a){let r="Month ".concat(a[1]),l=e.find(e=>e.month===r);l&&(l[t]=s.active_users)}}),e})(),er=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e>=1e8||e>=1e7||e>=1e6?(e/1e6).toFixed(s)+"M":e>=1e4?(e/1e3).toFixed(s)+"K":e>=1e3?(e/1e3).toFixed(s)+"K":e.toFixed(s)};return(0,a.jsxs)("div",{className:"space-y-6 mt-6",children:[(0,a.jsx)(l.Z,{children:(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex justify-between items-start",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(v.Z,{children:"Summary by User Agent"}),(0,a.jsx)(eM.Z,{children:"Performance metrics for different user agents"})]}),(0,a.jsxs)("div",{className:"w-96",children:[(0,a.jsx)(y.Z,{className:"text-sm font-medium block mb-2",children:"Filter by User Agents"}),(0,a.jsx)(ea.default,{mode:"multiple",placeholder:"All User Agents",value:T,onChange:D,style:{width:"100%"},showSearch:!0,allowClear:!0,loading:L,optionFilterProp:"label",className:"rounded-md",maxTagCount:"responsive",children:S.map(e=>{let s=B(e),t=s.length>50?"".concat(s.substring(0,50),"..."):s;return(0,a.jsx)(ea.default.Option,{value:e,label:t,title:s,children:t},e)})})]})]}),I?(0,a.jsx)(eF,{isDateChanging:!1}):(0,a.jsxs)(c.Z,{numItems:4,className:"gap-4",children:[(k.results||[]).slice(0,4).map((e,s)=>{let t=B(e.tag),r=G(t);return(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(eU.Z,{title:t,placement:"top",children:(0,a.jsx)(v.Z,{className:"truncate",children:r})}),(0,a.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,a.jsx)(eO.Z,{className:"text-lg",children:er(e.successful_requests)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,a.jsx)(eO.Z,{className:"text-lg",children:er(e.total_tokens)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,a.jsxs)(eO.Z,{className:"text-lg",children:["$",er(e.total_spend,4)]})]})]})]},s)}),Array.from({length:Math.max(0,4-(k.results||[]).length)}).map((e,s)=>(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"No Data"}),(0,a.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"text-sm text-gray-600",children:"Success Requests"}),(0,a.jsx)(eO.Z,{className:"text-lg",children:"-"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"text-sm text-gray-600",children:"Total Tokens"}),(0,a.jsx)(eO.Z,{className:"text-lg",children:"-"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(y.Z,{className:"text-sm text-gray-600",children:"Total Cost"}),(0,a.jsx)(eO.Z,{className:"text-lg",children:"-"})]})]})]},"empty-".concat(s)))]})]})}),(0,a.jsx)(l.Z,{children:(0,a.jsxs)(d.Z,{children:[(0,a.jsxs)(u.Z,{className:"mb-6",children:[(0,a.jsx)(o.Z,{children:"DAU/WAU/MAU"}),(0,a.jsx)(o.Z,{children:"Per User Usage (Last 30 Days)"})]}),(0,a.jsxs)(x.Z,{children:[(0,a.jsxs)(m.Z,{children:[(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)(v.Z,{children:"DAU, WAU & MAU per Agent"}),(0,a.jsx)(eM.Z,{children:"Active users across different time periods"})]}),(0,a.jsxs)(d.Z,{children:[(0,a.jsxs)(u.Z,{className:"mb-6",children:[(0,a.jsx)(o.Z,{children:"DAU"}),(0,a.jsx)(o.Z,{children:"WAU"}),(0,a.jsx)(o.Z,{children:"MAU"})]}),(0,a.jsxs)(x.Z,{children:[(0,a.jsxs)(m.Z,{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(v.Z,{className:"text-lg",children:"Daily Active Users - Last 7 Days"})}),A?(0,a.jsx)(eF,{isDateChanging:!1}):(0,a.jsx)(r.Z,{data:ee,index:"date",categories:J.map(B),valueFormatter:e=>er(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,a.jsxs)(m.Z,{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(v.Z,{className:"text-lg",children:"Weekly Active Users - Last 7 Weeks"})}),O?(0,a.jsx)(eF,{isDateChanging:!1}):(0,a.jsx)(r.Z,{data:es,index:"week",categories:Q.map(B),valueFormatter:e=>er(e),yAxisWidth:60,showLegend:!0,stack:!0})]}),(0,a.jsxs)(m.Z,{children:[(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(v.Z,{className:"text-lg",children:"Monthly Active Users - Last 7 Months"})}),U?(0,a.jsx)(eF,{isDateChanging:!1}):(0,a.jsx)(r.Z,{data:et,index:"month",categories:X.map(B),valueFormatter:e=>er(e),yAxisWidth:60,showLegend:!0,stack:!0})]})]})]})]}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(eV,{accessToken:s,selectedTags:T,formatAbbreviatedNumber:er})})]})]})})]})},eR=t(47375),ez=e=>{let{endpointData:s}=e,t=s||{},n=Z.useMemo(()=>Object.entries(t).map(e=>{let[s,t]=e;return{endpoint:s,"metrics.successful_requests":t.metrics.successful_requests,"metrics.failed_requests":t.metrics.failed_requests,metrics:{successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests}}}),[t]);return(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)(v.Z,{children:"Success vs Failed Requests by Endpoint"}),(0,a.jsx)(z,{categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"]})]}),(0,a.jsx)(r.Z,{className:"mt-4",data:n,index:"endpoint",categories:["metrics.successful_requests","metrics.failed_requests"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),customTooltip:R,showLegend:!1,stack:!0,yAxisWidth:60})]})},eY=t(59664),eK=function(e){let{dailyData:s,endpointData:t}=e,r=(0,Z.useMemo)(()=>(null==s?void 0:s.results)&&0!==s.results.length?function(e){let s=[],t=new Set;return e.forEach(e=>{e.breakdown.endpoints&&Object.keys(e.breakdown.endpoints).forEach(e=>t.add(e))}),e.forEach(e=>{let a={date:new Date(e.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})};t.forEach(s=>{var t;let r=null===(t=e.breakdown.endpoints)||void 0===t?void 0:t[s];a[s]=(null==r?void 0:r.metrics.api_requests)||0}),s.push(a)}),s.reverse()}(s.results):[],[s]),n=(0,Z.useMemo)(()=>0===r.length?[]:Object.keys(r[0]).filter(e=>"date"!==e),[r]);return(0,a.jsxs)(l.Z,{className:"mb-6",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsx)(v.Z,{children:"Endpoint Usage Trends"})}),(0,a.jsx)(eY.Z,{className:"h-80",data:r,index:"date",categories:n,colors:["blue","cyan","indigo","violet","purple","fuchsia","pink","rose","red","orange"].slice(0,n.length),valueFormatter:e=>e.toLocaleString(),showLegend:!0,showGridLines:!0,yAxisWidth:60,connectNulls:!0,curveType:"natural"})]})},e$=t(68565),eP=e=>{let{endpointData:s}=e,t=(e,s)=>0===s?0:e/s*100,r=Object.entries(s).map(e=>{let[s,a]=e;return{key:s,endpoint:s,successful_requests:a.metrics.successful_requests,failed_requests:a.metrics.failed_requests,api_requests:a.metrics.api_requests,total_tokens:a.metrics.total_tokens,spend:a.metrics.spend,successRate:t(a.metrics.successful_requests,a.metrics.api_requests)}}),l=[{title:"Endpoint",dataIndex:"endpoint",key:"endpoint",render:e=>(0,a.jsx)("span",{className:"font-medium",children:e})},{title:"Successful / Failed",key:"requests",render:(e,s)=>{let t=s.api_requests>0?s.successful_requests/s.api_requests*100:0,r=s.api_requests>0?s.failed_requests/s.api_requests*100:0,l={"0%":"#22c55e"};return t>0&&t<100&&(l["".concat(t,"%")]="#22c55e",l["".concat(t+.01,"%")]="#ef4444"),l["100%"]=r>0?"#ef4444":"#22c55e",(0,a.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,a.jsx)("div",{className:"flex-1 relative",children:(0,a.jsx)(e$.Z,{percent:t+r,size:"small",strokeColor:l,showInfo:!1})}),(0,a.jsxs)("div",{className:"flex items-center space-x-2 text-sm min-w-[100px]",children:[(0,a.jsx)("span",{className:"text-green-600 font-medium",children:s.successful_requests.toLocaleString()}),(0,a.jsx)("span",{className:"text-gray-400",children:"/"}),(0,a.jsx)("span",{className:"text-red-600 font-medium",children:s.failed_requests.toLocaleString()})]})]})}},{title:"Total Request",dataIndex:"api_requests",key:"api_requests",render:e=>e.toLocaleString()},{title:"Success Rate",dataIndex:"successRate",key:"successRate",render:e=>{let s=e.toFixed(2);return(0,a.jsxs)("span",{className:e>=95?"text-green-600 font-medium":e>=80?"text-yellow-600 font-medium":"text-red-600 font-medium",children:[s,"%"]})}},{title:"Total Tokens",dataIndex:"total_tokens",key:"total_tokens",render:e=>e.toLocaleString()},{title:"Spend",dataIndex:"spend",key:"spend",render:e=>"$".concat((0,F.pw)(e,2))}];return(0,a.jsx)(Y.Z,{columns:l,dataSource:r,pagination:!1})},eW=e=>{let{userSpendData:s}=e,t=(0,Z.useMemo)(()=>{let e={};return(null==s?void 0:s.results)&&s.results.forEach(s=>{Object.entries(s.breakdown.endpoints||{}).forEach(s=>{let[t,a]=s;e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:a.metadata||{},api_key_breakdown:{}}),e[t].metrics.spend+=a.metrics.spend,e[t].metrics.prompt_tokens+=a.metrics.prompt_tokens,e[t].metrics.completion_tokens+=a.metrics.completion_tokens,e[t].metrics.total_tokens+=a.metrics.total_tokens,e[t].metrics.api_requests+=a.metrics.api_requests,e[t].metrics.successful_requests+=a.metrics.successful_requests||0,e[t].metrics.failed_requests+=a.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=a.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=a.metrics.cache_creation_input_tokens||0})}),e},[s]);return(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(eP,{endpointData:t}),(0,a.jsx)(ez,{endpointData:t}),(0,a.jsx)(eK,{dailyData:s,endpointData:t})]})},eB=t(49282),eG=t(57589),eH=t(12322);function eJ(e){let{topModels:s,topModelsLimit:t,setTopModelsLimit:l}=e,[n,i]=(0,Z.useState)("table"),c=s.slice(0,t);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,a.jsx)(k.Z,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:t,onChange:e=>l(e)}),(0,a.jsxs)("div",{className:"flex space-x-2",children:[(0,a.jsx)("button",{onClick:()=>i("table"),className:"px-3 py-1 text-sm rounded-md ".concat("table"===n?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Table View"}),(0,a.jsx)("button",{onClick:()=>i("chart"),className:"px-3 py-1 text-sm rounded-md ".concat("chart"===n?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Chart View"})]})]}),"chart"===n?(0,a.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,a.jsx)(r.Z,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(c.length,t)},data:c,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:e=>"$".concat((0,F.pw)(e,2)),layout:"vertical",yAxisWidth:200,tickGap:5,showLegend:!1})}):(0,a.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,a.jsx)(eH.w,{columns:[{header:"Model",accessorKey:"key",cell:e=>e.getValue()||"-"},{header:"Spend (USD)",accessorKey:"spend",cell:e=>{let s=e.getValue();return"$".concat((0,F.pw)(s,2))}},{header:"Successful",accessorKey:"successful_requests",cell:e=>{var s;return(0,a.jsx)("span",{className:"text-green-600",children:(null===(s=e.getValue())||void 0===s?void 0:s.toLocaleString())||0})}},{header:"Failed",accessorKey:"failed_requests",cell:e=>{var s;return(0,a.jsx)("span",{className:"text-red-600",children:(null===(s=e.getValue())||void 0===s?void 0:s.toLocaleString())||0})}},{header:"Tokens",accessorKey:"tokens",cell:e=>{var s;return(null===(s=e.getValue())||void 0===s?void 0:s.toLocaleString())||0}}],data:c,renderSubComponent:()=>(0,a.jsx)(a.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})})]})}var eQ=e=>{let{accessToken:s,entityType:t,entityId:k,entityList:b,dateValue:w}=e,[q,S]=(0,Z.useState)({results:[],metadata:{total_spend:0,total_api_requests:0,total_successful_requests:0,total_failed_requests:0,total_tokens:0}}),{teams:C}=(0,eB.Z)(),T=J(q,"models",C||[]),D=J(q,"api_keys",C||[]),[L,E]=(0,Z.useState)([]),[A,O]=(0,Z.useState)(5),[M,U]=(0,Z.useState)(5),V=async()=>{if(!s||!w.from||!w.to)return;let e=new Date(w.from),a=new Date(w.to);if("tag"===t)S(await (0,N.tagDailyActivityCall)(s,e,a,1,L.length>0?L:null));else if("team"===t)S(await (0,N.teamDailyActivityCall)(s,e,a,1,L.length>0?L:null));else if("organization"===t)S(await (0,N.organizationDailyActivityCall)(s,e,a,1,L.length>0?L:null));else if("customer"===t)S(await (0,N.customerDailyActivityCall)(s,e,a,1,L.length>0?L:null));else if("agent"===t)S(await (0,N.agentDailyActivityCall)(s,e,a,1,L.length>0?L:null));else throw Error("Invalid entity type")};(0,Z.useEffect)(()=>{V()},[s,w,k,L]);let I=()=>{let e={};return q.results.forEach(s=>{Object.entries(s.breakdown.providers||{}).forEach(s=>{let[t,a]=s;e[t]||(e[t]={provider:t,spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{e[t].spend+=a.metrics.spend,e[t].requests+=a.metrics.api_requests,e[t].successful_requests+=a.metrics.successful_requests,e[t].failed_requests+=a.metrics.failed_requests,e[t].tokens+=a.metrics.total_tokens}catch(e){console.error("Error processing provider ".concat(t,": ").concat(e))}})}),Object.values(e).filter(e=>e.spend>0).sort((e,s)=>s.spend-e.spend)},R=(e,s)=>{if(b){let s=b.find(s=>s.value===e);if(s)return s.label}return(null==s?void 0:s.team_alias)?s.team_alias:e},z=e=>0===L.length?e:e.filter(e=>L.includes(e.metadata.id)),Y=()=>{let e={};return q.results.forEach(s=>{Object.entries(s.breakdown.entities||{}).forEach(s=>{let[t,a]=s;e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{alias:R(t,a.metadata),id:t}}),e[t].metrics.spend+=a.metrics.spend,e[t].metrics.api_requests+=a.metrics.api_requests,e[t].metrics.successful_requests+=a.metrics.successful_requests,e[t].metrics.failed_requests+=a.metrics.failed_requests,e[t].metrics.total_tokens+=a.metrics.total_tokens})}),z(Object.values(e).sort((e,s)=>s.metrics.spend-e.metrics.spend))},K=t.charAt(0).toUpperCase()+t.slice(1);return(0,a.jsxs)("div",{style:{width:"100%"},className:"relative",children:[(0,a.jsx)(ew,{dateValue:w,entityType:t,spendData:q,showFilters:null!==b&&b.length>0,filterLabel:"Filter by ".concat(t),filterPlaceholder:"Select ".concat(t," to filter..."),selectedFilters:L,onFiltersChange:E,filterOptions:(()=>{if(b)return b})()||void 0,teams:C||[]}),(0,a.jsxs)(d.Z,{children:[(0,a.jsxs)(u.Z,{variant:"solid",className:"mt-1",children:[(0,a.jsx)(o.Z,{children:"Cost"}),(0,a.jsx)(o.Z,{children:"agent"===t?"Request / Token Consumption":"Model Activity"}),(0,a.jsx)(o.Z,{children:"Key Activity"}),(0,a.jsx)(o.Z,{children:"Endpoint Activity"})]}),(0,a.jsxs)(x.Z,{children:[(0,a.jsx)(m.Z,{children:(0,a.jsxs)(c.Z,{numItems:2,className:"gap-2 w-full",children:[(0,a.jsx)(n.Z,{numColSpan:2,children:(0,a.jsxs)(l.Z,{children:[(0,a.jsxs)(v.Z,{children:[K," Spend Overview"]}),(0,a.jsxs)(c.Z,{numItems:5,className:"gap-4 mt-4",children:[(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Total Spend"}),(0,a.jsxs)(y.Z,{className:"text-2xl font-bold mt-2",children:["$",(0,F.pw)(q.metadata.total_spend,2)]})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Total Requests"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2",children:q.metadata.total_api_requests.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Successful Requests"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2 text-green-600",children:q.metadata.total_successful_requests.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Failed Requests"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2 text-red-600",children:q.metadata.total_failed_requests.toLocaleString()})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Total Tokens"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2",children:q.metadata.total_tokens.toLocaleString()})]})]})]})}),(0,a.jsx)(n.Z,{numColSpan:2,children:(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Daily Spend"}),(0,a.jsx)(r.Z,{data:[...q.results].sort((e,s)=>new Date(e.date).getTime()-new Date(s.date).getTime()),index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:W,yAxisWidth:100,showLegend:!1,customTooltip:e=>{let{payload:s,active:t}=e;if(!t||!(null==s?void 0:s[0]))return null;let r=s[0].payload,l=Object.keys(r.breakdown.entities||{}).length;return(0,a.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,a.jsx)("p",{className:"font-bold",children:r.date}),(0,a.jsxs)("p",{className:"text-cyan-500",children:["Total Spend: $",(0,F.pw)(r.metrics.spend,2)]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",r.metrics.api_requests]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Successful: ",r.metrics.successful_requests]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Failed: ",r.metrics.failed_requests]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Total Tokens: ",r.metrics.total_tokens]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Total ",K,"s: ",l]}),(0,a.jsxs)("div",{className:"mt-2 border-t pt-2",children:[(0,a.jsxs)("p",{className:"font-semibold",children:["Spend by ",K,":"]}),Object.entries(r.breakdown.entities||{}).sort((e,s)=>{let[,t]=e,[,a]=s,r=t.metrics.spend;return a.metrics.spend-r}).slice(0,5).map(e=>{let[s,t]=e;return(0,a.jsxs)("p",{className:"text-sm text-gray-600",children:[R(s,t.metadata),": $",(0,F.pw)(t.metrics.spend,2)]},s)}),l>5&&(0,a.jsxs)("p",{className:"text-sm text-gray-500 italic",children:["...and ",l-5," more"]})]})]})}})]})}),(0,a.jsx)(n.Z,{numColSpan:2,children:(0,a.jsx)(l.Z,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,a.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,a.jsxs)(v.Z,{children:["Spend Per ",K]}),(0,a.jsx)(eM.Z,{className:"text-xs",children:"Showing Top 5 by Spend"}),(0,a.jsxs)("div",{className:"flex items-center text-sm text-gray-500",children:[(0,a.jsxs)("span",{children:["Get Started by Tracking cost per ",K," "]}),(0,a.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/enterprise#spend-tracking",className:"text-blue-500 hover:text-blue-700 ml-1",children:"here"})]})]}),(0,a.jsxs)(c.Z,{numItems:2,className:"gap-6",children:[(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsx)(r.Z,{className:"mt-4 h-52",data:Y().slice(0,5).map(e=>({...e,metadata:{...e.metadata,alias_display:e.metadata.alias&&e.metadata.alias.length>15?"".concat(e.metadata.alias.slice(0,15),"..."):e.metadata.alias}})),index:"metadata.alias_display",categories:["metrics.spend"],colors:["cyan"],valueFormatter:W,layout:"vertical",showLegend:!1,yAxisWidth:150,customTooltip:e=>{let{payload:s,active:t}=e;if(!t||!(null==s?void 0:s[0]))return null;let r=s[0].payload;return(0,a.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,a.jsx)("p",{className:"font-bold",children:r.metadata.alias}),(0,a.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,F.pw)(r.metrics.spend,4)]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Requests: ",r.metrics.api_requests.toLocaleString()]}),(0,a.jsxs)("p",{className:"text-green-600",children:["Successful: ",r.metrics.successful_requests.toLocaleString()]}),(0,a.jsxs)("p",{className:"text-red-600",children:["Failed: ",r.metrics.failed_requests.toLocaleString()]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",r.metrics.total_tokens.toLocaleString()]})]})}})}),(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsx)("div",{className:"h-52 overflow-y-auto",children:(0,a.jsxs)(h.Z,{children:[(0,a.jsx)(_.Z,{children:(0,a.jsxs)(j.Z,{children:[(0,a.jsx)(f.Z,{children:K}),(0,a.jsx)(f.Z,{children:"Spend"}),(0,a.jsx)(f.Z,{className:"text-green-600",children:"Successful"}),(0,a.jsx)(f.Z,{className:"text-red-600",children:"Failed"}),(0,a.jsx)(f.Z,{children:"Tokens"})]})}),(0,a.jsx)(p.Z,{children:Y().filter(e=>e.metrics.spend>0).map(e=>(0,a.jsxs)(j.Z,{children:[(0,a.jsx)(g.Z,{children:e.metadata.alias}),(0,a.jsxs)(g.Z,{children:["$",(0,F.pw)(e.metrics.spend,4)]}),(0,a.jsx)(g.Z,{className:"text-green-600",children:e.metrics.successful_requests.toLocaleString()}),(0,a.jsx)(g.Z,{className:"text-red-600",children:e.metrics.failed_requests.toLocaleString()}),(0,a.jsx)(g.Z,{children:e.metrics.total_tokens.toLocaleString()})]},e.metadata.id))})]})})})]})]})})}),(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Top Virtual Keys"}),(0,a.jsx)(eG.Z,{topKeys:(()=>{console.log("debugTags",{spendData:q});let e={};return q.results.forEach(s=>{let{breakdown:t}=s,{entities:a}=t;console.log("debugTags",{entities:a});let r=Object.keys(a).reduce((e,s)=>{let{api_key_breakdown:t}=a[s];return Object.keys(t).forEach(a=>{let r={tag:s,usage:t[a].metrics.spend};e[a]?e[a].push(r):e[a]=[r]}),e},{});console.log("debugTags",{tagDictionary:r}),Object.entries(s.breakdown.api_keys||{}).forEach(s=>{let[t,a]=s;e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{key_alias:a.metadata.key_alias,team_id:a.metadata.team_id||null,tags:r[t]||[]}},console.log("debugTags",{keySpend:e})),e[t].metrics.spend+=a.metrics.spend,e[t].metrics.prompt_tokens+=a.metrics.prompt_tokens,e[t].metrics.completion_tokens+=a.metrics.completion_tokens,e[t].metrics.total_tokens+=a.metrics.total_tokens,e[t].metrics.api_requests+=a.metrics.api_requests,e[t].metrics.successful_requests+=a.metrics.successful_requests,e[t].metrics.failed_requests+=a.metrics.failed_requests,e[t].metrics.cache_read_input_tokens+=a.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=a.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(e=>{let[s,t]=e;return{api_key:s,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||"-",spend:t.metrics.spend}}).sort((e,s)=>s.spend-e.spend).slice(0,A)})(),teams:null,showTags:"tag"===t,topKeysLimit:A,setTopKeysLimit:O})]})}),(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"agent"===t?"Top Agents":"Top Models"}),(0,a.jsx)(eJ,{topModels:(()=>{let e={};return q.results.forEach(s=>{Object.entries(s.breakdown.models||{}).forEach(s=>{let[t,a]=s;e[t]||(e[t]={spend:0,requests:0,successful_requests:0,failed_requests:0,tokens:0});try{e[t].spend+=a.metrics.spend}catch(e){console.error("Error adding spend for ".concat(t,": ").concat(e,", got metrics: ").concat(JSON.stringify(a)))}e[t].requests+=a.metrics.api_requests,e[t].successful_requests+=a.metrics.successful_requests,e[t].failed_requests+=a.metrics.failed_requests,e[t].tokens+=a.metrics.total_tokens})}),Object.entries(e).map(e=>{let[s,t]=e;return{key:s,...t}}).sort((e,s)=>s.spend-e.spend).slice(0,M)})(),topModelsLimit:M,setTopModelsLimit:U})]})}),(0,a.jsx)(n.Z,{numColSpan:2,children:(0,a.jsx)(l.Z,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,a.jsx)(v.Z,{children:"Provider Usage"}),(0,a.jsxs)(c.Z,{numItems:2,children:[(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsx)(i.Z,{className:"mt-4 h-40",data:I(),index:"provider",category:"spend",valueFormatter:e=>"$".concat((0,F.pw)(e,2)),colors:["cyan","blue","indigo","violet","purple"]})}),(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsxs)(h.Z,{children:[(0,a.jsx)(_.Z,{children:(0,a.jsxs)(j.Z,{children:[(0,a.jsx)(f.Z,{children:"Provider"}),(0,a.jsx)(f.Z,{children:"Spend"}),(0,a.jsx)(f.Z,{className:"text-green-600",children:"Successful"}),(0,a.jsx)(f.Z,{className:"text-red-600",children:"Failed"}),(0,a.jsx)(f.Z,{children:"Tokens"})]})}),(0,a.jsx)(p.Z,{children:I().map(e=>(0,a.jsxs)(j.Z,{children:[(0,a.jsx)(g.Z,{children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,a.jsx)("img",{src:(0,eq.dr)(e.provider).logo,alt:"".concat(e.provider," logo"),className:"w-4 h-4",onError:s=>{let t=s.target,a=t.parentElement;if(a){var r;let s=document.createElement("div");s.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",s.textContent=(null===(r=e.provider)||void 0===r?void 0:r.charAt(0))||"-",a.replaceChild(s,t)}}}),(0,a.jsx)("span",{children:e.provider})]})}),(0,a.jsxs)(g.Z,{children:["$",(0,F.pw)(e.spend,2)]}),(0,a.jsx)(g.Z,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,a.jsx)(g.Z,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,a.jsx)(g.Z,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})})})]})}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(G,{modelMetrics:T,hidePromptCachingMetrics:"agent"===t})}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(G,{modelMetrics:D,hidePromptCachingMetrics:"agent"===t})}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(eW,{userSpendData:q})})]})]})]})},eX=t(64739),e0=t(37527),e1=t(41361),e2=t(40312),e4=t(71891),e5=t(69993),e6=t(48231),e3=t(9775),e9=t(33866);let e7=[{value:"global",label:"Global Usage",showForAdmin:"Global Usage",showForNonAdmin:"Your Usage",description:"View usage across all resources",descriptionForAdmin:"View usage across all resources",descriptionForNonAdmin:"View your usage",icon:(0,a.jsx)(eX.Z,{style:{fontSize:"16px"}})},{value:"organization",label:"Organization Usage",showForAdmin:"Organization Usage",showForNonAdmin:"Your Organization Usage",description:"View organization-level usage",descriptionForAdmin:"View usage across all organizations",descriptionForNonAdmin:"View your organization's usage",icon:(0,a.jsx)(e0.Z,{style:{fontSize:"16px"}})},{value:"team",label:"Team Usage",description:"View usage by team",icon:(0,a.jsx)(e1.Z,{style:{fontSize:"16px"}})},{value:"customer",label:"Customer Usage",description:"View usage by customer accounts",icon:(0,a.jsx)(e2.Z,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"tag",label:"Tag Usage",description:"View usage grouped by tags",icon:(0,a.jsx)(e4.Z,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"agent",label:"Agent Usage (A2A)",description:"View usage by AI agents",icon:(0,a.jsx)(e5.Z,{style:{fontSize:"16px"}}),adminOnly:!0},{value:"user-agent-activity",label:"User Agent Activity",description:"View detailed user agent activity logs",icon:(0,a.jsx)(e6.Z,{style:{fontSize:"16px"}}),adminOnly:!0}],e8=e=>{let{value:s,onChange:t,isAdmin:r,title:l="Usage View",description:n="Select the usage data you want to view","data-id":i}=e,c=e7.filter(e=>!e.adminOnly||!!r).map(e=>{let s=e.label,t=e.description;return e.showForAdmin&&e.showForNonAdmin&&(s=r?e.showForAdmin:e.showForNonAdmin),e.descriptionForAdmin&&e.descriptionForNonAdmin&&(t=r?e.descriptionForAdmin:e.descriptionForNonAdmin),{value:e.value,label:s,description:t,icon:e.icon,badgeText:e.badgeText}});return(0,a.jsx)("div",{className:"w-full","data-id":i,children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-start gap-4",children:[(0,a.jsxs)("div",{className:"flex items-stretch gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"flex-shrink-0 flex items-center",children:(0,a.jsx)(e3.Z,{style:{fontSize:"32px"}})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-gray-900 mb-0.5 leading-tight",children:l}),(0,a.jsx)("p",{className:"text-xs text-gray-600 leading-tight",children:n})]})]}),(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsx)(ea.default,{value:s,onChange:t,className:"w-54 sm:w-64 md:w-72",size:"large",options:c.map(e=>({value:e.value,label:e.label})),optionRender:e=>{let s=c.find(s=>s.value===e.value);return s?(0,a.jsxs)("div",{className:"flex items-center gap-2 py-1",children:[(0,a.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:s.icon}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-900",children:s.label}),(0,a.jsx)("div",{className:"text-xs text-gray-600 mt-0.5",children:s.description})]}),s.badgeText&&(0,a.jsx)("div",{className:"items-center",children:(0,a.jsx)(e9.Z,{color:"blue",count:s.badgeText})})]}):e.label},labelRender:e=>{let s=c.find(s=>s.value===e.value);return s?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{children:s.icon}),(0,a.jsx)("span",{className:"text-sm",children:s.label})]}):e.label}})})]})})};var se=e=>{var s,t,w,q,T,L,M,U,V,I,R;let{teams:z,organizations:Y}=e,{accessToken:K,userRole:$,userId:P,premiumUser:B}=(0,C.Z)(),[H,Q]=(0,Z.useState)({results:[],metadata:{}}),[X,ee]=(0,Z.useState)(!1),[es,et]=(0,Z.useState)(!1),ea=(0,Z.useMemo)(()=>new Date(Date.now()-6048e5),[]),er=(0,Z.useMemo)(()=>new Date,[]),[el,ei]=(0,Z.useState)({from:ea,to:er}),[ec,eo]=(0,Z.useState)([]),{data:ed=[]}=E(),{data:eu}=D(),{data:em}=(0,A.x)();console.log("currentUser: ".concat(JSON.stringify(em))),console.log("currentUser max budget: ".concat(null==em?void 0:em.max_budget));let[ex,eh]=(0,Z.useState)("groups"),[ep,eg]=(0,Z.useState)(!1),[e_,ef]=(0,Z.useState)(!1),[ej,ey]=(0,Z.useState)(!0),[ev,ek]=(0,Z.useState)(!0),[eb,eN]=(0,Z.useState)("global"),[ew,eS]=(0,Z.useState)(!0),[eC,eT]=(0,Z.useState)(5),[eD,eL]=(0,Z.useState)(5),eA=async()=>{K&&eo(Object.values(await (0,N.tagListCall)(K)).map(e=>({label:e.name,value:e.name})))};(0,Z.useEffect)(()=>{eA()},[K]);let eO=(null===(s=H.metadata)||void 0===s?void 0:s.total_spend)||0,eM=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,s={};return H.results.forEach(e=>{Object.entries(e.breakdown.models||{}).forEach(e=>{let[t,a]=e;s[t]||(s[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),s[t].metrics.spend+=a.metrics.spend,s[t].metrics.prompt_tokens+=a.metrics.prompt_tokens,s[t].metrics.completion_tokens+=a.metrics.completion_tokens,s[t].metrics.total_tokens+=a.metrics.total_tokens,s[t].metrics.api_requests+=a.metrics.api_requests,s[t].metrics.successful_requests+=a.metrics.successful_requests||0,s[t].metrics.failed_requests+=a.metrics.failed_requests||0,s[t].metrics.cache_read_input_tokens+=a.metrics.cache_read_input_tokens||0,s[t].metrics.cache_creation_input_tokens+=a.metrics.cache_creation_input_tokens||0})}),Object.entries(s).map(e=>{let[s,t]=e;return{key:s,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens}}).sort((e,s)=>s.spend-e.spend).slice(0,e)},eU=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,s={};return H.results.forEach(e=>{Object.entries(e.breakdown.model_groups||{}).forEach(e=>{let[t,a]=e;s[t]||(s[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),s[t].metrics.spend+=a.metrics.spend,s[t].metrics.prompt_tokens+=a.metrics.prompt_tokens,s[t].metrics.completion_tokens+=a.metrics.completion_tokens,s[t].metrics.total_tokens+=a.metrics.total_tokens,s[t].metrics.api_requests+=a.metrics.api_requests,s[t].metrics.successful_requests+=a.metrics.successful_requests||0,s[t].metrics.failed_requests+=a.metrics.failed_requests||0,s[t].metrics.cache_read_input_tokens+=a.metrics.cache_read_input_tokens||0,s[t].metrics.cache_creation_input_tokens+=a.metrics.cache_creation_input_tokens||0})}),Object.entries(s).map(e=>{let[s,t]=e;return{key:s,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens}}).sort((e,s)=>s.spend-e.spend).slice(0,e)},eV=()=>{let e={};return H.results.forEach(s=>{Object.entries(s.breakdown.providers||{}).forEach(s=>{let[t,a]=s;e[t]||(e[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{},api_key_breakdown:{}}),e[t].metrics.spend+=a.metrics.spend,e[t].metrics.prompt_tokens+=a.metrics.prompt_tokens,e[t].metrics.completion_tokens+=a.metrics.completion_tokens,e[t].metrics.total_tokens+=a.metrics.total_tokens,e[t].metrics.api_requests+=a.metrics.api_requests,e[t].metrics.successful_requests+=a.metrics.successful_requests||0,e[t].metrics.failed_requests+=a.metrics.failed_requests||0,e[t].metrics.cache_read_input_tokens+=a.metrics.cache_read_input_tokens||0,e[t].metrics.cache_creation_input_tokens+=a.metrics.cache_creation_input_tokens||0})}),Object.entries(e).map(e=>{let[s,t]=e;return{provider:s,spend:t.metrics.spend,requests:t.metrics.api_requests,successful_requests:t.metrics.successful_requests,failed_requests:t.metrics.failed_requests,tokens:t.metrics.total_tokens}})},ez=(0,Z.useCallback)(async()=>{if(!K||!el.from||!el.to)return;ee(!0);let e=new Date(el.from),s=new Date(el.to);try{try{let t=await (0,N.userDailyActivityAggregatedCall)(K,e,s);Q(t);return}catch(e){}let t=await (0,N.userDailyActivityCall)(K,e,s);if(t.metadata.total_pages<=1){Q(t);return}let a=[...t.results],r={...t.metadata};for(let l=2;l<=t.metadata.total_pages;l++){let t=await (0,N.userDailyActivityCall)(K,e,s,l);a.push(...t.results),t.metadata&&(r.total_spend+=t.metadata.total_spend||0,r.total_api_requests+=t.metadata.total_api_requests||0,r.total_successful_requests+=t.metadata.total_successful_requests||0,r.total_failed_requests+=t.metadata.total_failed_requests||0,r.total_tokens+=t.metadata.total_tokens||0)}Q({results:a,metadata:r})}catch(e){console.error("Error fetching user spend data:",e)}finally{ee(!1),et(!1)}},[K,el.from,el.to]),eY=(0,Z.useCallback)(e=>{et(!0),ee(!0),ei(e)},[]);(0,Z.useEffect)(()=>{if(!el.from||!el.to)return;let e=setTimeout(()=>{ez()},50);return()=>clearTimeout(e)},[ez]);let eK=J(H,"models",z),e$=J(H,"api_keys",z),eP=J(H,"mcp_servers",z);return(0,a.jsxs)("div",{style:{width:"100%"},className:"p-8 relative",children:[(0,a.jsx)("div",{className:"flex items-end justify-between gap-6 mb-6",children:(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex items-end justify-between gap-6 mb-4 w-full",children:[(0,a.jsx)(e8,{value:eb,onChange:e=>eN(e),isAdmin:S.ZL.includes($||"")}),(0,a.jsx)(eE,{value:el,onValueChange:eY})]}),"global"===eb&&(0,a.jsxs)(d.Z,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsxs)(u.Z,{variant:"solid",className:"mt-1",children:[(0,a.jsx)(o.Z,{children:"Cost"}),(0,a.jsx)(o.Z,{children:"Model Activity"}),(0,a.jsx)(o.Z,{children:"Key Activity"}),(0,a.jsx)(o.Z,{children:"MCP Server Activity"}),(0,a.jsx)(o.Z,{children:"Endpoint Activity"})]}),(0,a.jsx)(O.z,{onClick:()=>ef(!0),icon:()=>(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),children:"Export Data"})]}),(0,a.jsxs)(x.Z,{children:[(0,a.jsx)(m.Z,{children:(0,a.jsxs)(c.Z,{numItems:2,className:"gap-2 w-full",children:[(0,a.jsxs)(n.Z,{numColSpan:2,children:[(0,a.jsxs)(y.Z,{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content mb-2 mt-2 text-lg",children:["Project Spend"," ",el.from&&el.to&&(0,a.jsxs)(a.Fragment,{children:[el.from.toLocaleDateString("en-US",{month:"short",day:"numeric",year:el.from.getFullYear()!==el.to.getFullYear()?"numeric":void 0})," - ",el.to.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]}),(0,a.jsx)(eR.Z,{userSpend:eO,selectedTeam:null,userMaxBudget:(null==em?void 0:em.max_budget)||null})]}),(0,a.jsx)(n.Z,{numColSpan:2,children:(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Usage Metrics"}),(0,a.jsxs)(c.Z,{numItems:5,className:"gap-4 mt-4",children:[(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Total Requests"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2",children:(null===(w=H.metadata)||void 0===w?void 0:null===(t=w.total_api_requests)||void 0===t?void 0:t.toLocaleString())||0})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Successful Requests"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2 text-green-600",children:(null===(T=H.metadata)||void 0===T?void 0:null===(q=T.total_successful_requests)||void 0===q?void 0:q.toLocaleString())||0})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Failed Requests"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2 text-red-600",children:(null===(M=H.metadata)||void 0===M?void 0:null===(L=M.total_failed_requests)||void 0===L?void 0:L.toLocaleString())||0})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Total Tokens"}),(0,a.jsx)(y.Z,{className:"text-2xl font-bold mt-2",children:(null===(V=H.metadata)||void 0===V?void 0:null===(U=V.total_tokens)||void 0===U?void 0:U.toLocaleString())||0})]}),(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Average Cost per Request"}),(0,a.jsxs)(y.Z,{className:"text-2xl font-bold mt-2",children:["$",(0,F.pw)((eO||0)/((null===(I=H.metadata)||void 0===I?void 0:I.total_api_requests)||1),4)]})]})]})]})}),(0,a.jsx)(n.Z,{numColSpan:2,children:(0,a.jsxs)(l.Z,{children:[(0,a.jsx)(v.Z,{children:"Daily Spend"}),X?(0,a.jsx)(eF,{isDateChanging:es}):(0,a.jsx)(r.Z,{data:[...H.results].sort((e,s)=>new Date(e.date).getTime()-new Date(s.date).getTime()),index:"date",categories:["metrics.spend"],colors:["cyan"],valueFormatter:W,yAxisWidth:100,showLegend:!1,customTooltip:e=>{let{payload:s,active:t}=e;if(!t||!(null==s?void 0:s[0]))return null;let r=s[0].payload;return(0,a.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,a.jsx)("p",{className:"font-bold",children:r.date}),(0,a.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,F.pw)(r.metrics.spend,2)]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Requests: ",r.metrics.api_requests]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Successful: ",r.metrics.successful_requests]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Failed: ",r.metrics.failed_requests]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",r.metrics.total_tokens]})]})}})]})}),(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsxs)(l.Z,{className:"h-full",children:[(0,a.jsx)(v.Z,{children:"Top Virtual Keys"}),(0,a.jsx)(eG.Z,{topKeys:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,s={};return H.results.forEach(e=>{Object.entries(e.breakdown.api_keys||{}).forEach(e=>{let[t,a]=e;s[t]||(s[t]={metrics:{spend:0,prompt_tokens:0,completion_tokens:0,total_tokens:0,api_requests:0,successful_requests:0,failed_requests:0,cache_read_input_tokens:0,cache_creation_input_tokens:0},metadata:{key_alias:a.metadata.key_alias,team_id:null,tags:a.metadata.tags||[]}}),s[t].metrics.spend+=a.metrics.spend,s[t].metrics.prompt_tokens+=a.metrics.prompt_tokens,s[t].metrics.completion_tokens+=a.metrics.completion_tokens,s[t].metrics.total_tokens+=a.metrics.total_tokens,s[t].metrics.api_requests+=a.metrics.api_requests,s[t].metrics.successful_requests+=a.metrics.successful_requests,s[t].metrics.failed_requests+=a.metrics.failed_requests,s[t].metrics.cache_read_input_tokens+=a.metrics.cache_read_input_tokens||0,s[t].metrics.cache_creation_input_tokens+=a.metrics.cache_creation_input_tokens||0})}),console.log("debugTags",{keySpend:s,userSpendData:H}),Object.entries(s).map(e=>{let[s,t]=e;return{api_key:s,key_alias:t.metadata.key_alias||"-",tags:t.metadata.tags||[],spend:t.metrics.spend}}).sort((e,s)=>s.spend-e.spend).slice(0,e)}(eC),teams:null,topKeysLimit:eC,setTopKeysLimit:eT})]})}),(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsxs)(l.Z,{className:"h-full",children:[(0,a.jsx)(v.Z,{children:"groups"===ex?"Top Public Model Names":"Top Litellm Models"}),(0,a.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,a.jsx)(k.Z,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:eD,onChange:e=>eL(e)}),(0,a.jsxs)("div",{className:"flex bg-gray-100 rounded-lg p-1",children:[(0,a.jsx)("button",{className:"px-3 py-1 text-sm rounded-md transition-colors ".concat("groups"===ex?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"),onClick:()=>eh("groups"),children:"Public Model Name"}),(0,a.jsx)("button",{className:"px-3 py-1 text-sm rounded-md transition-colors ".concat("individual"===ex?"bg-white shadow-sm text-gray-900":"text-gray-600 hover:text-gray-900"),onClick:()=>eh("individual"),children:"Litellm Model Name"})]})]}),X?(0,a.jsx)(eF,{isDateChanging:es}):(0,a.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(()=>{let e="groups"===ex?eU(eD):eM(eD);return(0,a.jsx)(r.Z,{className:"mt-4",style:{height:52*Math.min(e.length,eD)},data:e,index:"key",categories:["spend"],colors:["cyan"],valueFormatter:W,layout:"vertical",yAxisWidth:200,showLegend:!1,customTooltip:e=>{let{payload:s,active:t}=e;if(!t||!(null==s?void 0:s[0]))return null;let r=s[0].payload;return(0,a.jsxs)("div",{className:"bg-white p-4 shadow-lg rounded-lg border",children:[(0,a.jsx)("p",{className:"font-bold",children:r.key}),(0,a.jsxs)("p",{className:"text-cyan-500",children:["Spend: $",(0,F.pw)(r.spend,2)]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Total Requests: ",r.requests.toLocaleString()]}),(0,a.jsxs)("p",{className:"text-green-600",children:["Successful: ",r.successful_requests.toLocaleString()]}),(0,a.jsxs)("p",{className:"text-red-600",children:["Failed: ",r.failed_requests.toLocaleString()]}),(0,a.jsxs)("p",{className:"text-gray-600",children:["Tokens: ",r.tokens.toLocaleString()]})]})}})})()})]})}),(0,a.jsx)(n.Z,{numColSpan:2,children:(0,a.jsxs)(l.Z,{className:"h-full",children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,a.jsx)(v.Z,{children:"Spend by Provider"})}),X?(0,a.jsx)(eF,{isDateChanging:es}):(0,a.jsxs)(c.Z,{numItems:2,children:[(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsx)(i.Z,{className:"mt-4 h-40",data:eV(),index:"provider",category:"spend",valueFormatter:e=>"$".concat((0,F.pw)(e,2)),colors:["cyan"]})}),(0,a.jsx)(n.Z,{numColSpan:1,children:(0,a.jsxs)(h.Z,{children:[(0,a.jsx)(_.Z,{children:(0,a.jsxs)(j.Z,{children:[(0,a.jsx)(f.Z,{children:"Provider"}),(0,a.jsx)(f.Z,{children:"Spend"}),(0,a.jsx)(f.Z,{className:"text-green-600",children:"Successful"}),(0,a.jsx)(f.Z,{className:"text-red-600",children:"Failed"}),(0,a.jsx)(f.Z,{children:"Tokens"})]})}),(0,a.jsx)(p.Z,{children:eV().filter(e=>e.spend>0).map(e=>(0,a.jsxs)(j.Z,{children:[(0,a.jsx)(g.Z,{children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[e.provider&&(0,a.jsx)("img",{src:(0,eq.dr)(e.provider).logo,alt:"".concat(e.provider," logo"),className:"w-4 h-4",onError:s=>{let t=s.target,a=t.parentElement;if(a){var r;let s=document.createElement("div");s.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",s.textContent=(null===(r=e.provider)||void 0===r?void 0:r.charAt(0))||"-",a.replaceChild(s,t)}}}),(0,a.jsx)("span",{children:e.provider})]})}),(0,a.jsxs)(g.Z,{children:["$",(0,F.pw)(e.spend,2)]}),(0,a.jsx)(g.Z,{className:"text-green-600",children:e.successful_requests.toLocaleString()}),(0,a.jsx)(g.Z,{className:"text-red-600",children:e.failed_requests.toLocaleString()}),(0,a.jsx)(g.Z,{children:e.tokens.toLocaleString()})]},e.provider))})]})})]})]})})]})}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(G,{modelMetrics:eK})}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(G,{modelMetrics:e$})}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(G,{modelMetrics:eP})}),(0,a.jsx)(m.Z,{children:(0,a.jsx)(eW,{userSpendData:H})})]})]}),"organization"===eb&&(0,a.jsxs)(a.Fragment,{children:[ej&&(0,a.jsx)(b.Z,{banner:!0,type:"info",message:"Organization usage is a new feature.",description:"Spend is tracked from feature launch and previous data isn't backfilled, so only future usage appears here.",closable:!0,onClose:()=>ey(!1),className:"mb-5"}),(0,a.jsx)(eQ,{accessToken:K,entityType:"organization",userID:P,userRole:$,dateValue:el,entityList:(null==Y?void 0:Y.map(e=>({label:e.organization_alias,value:e.organization_id})))||null,premiumUser:B})]}),"team"===eb&&(0,a.jsx)(eQ,{accessToken:K,entityType:"team",userID:P,userRole:$,entityList:(null==z?void 0:z.map(e=>({label:e.team_alias,value:e.team_id})))||null,premiumUser:B,dateValue:el}),"customer"===eb&&(0,a.jsxs)(a.Fragment,{children:[ev&&(0,a.jsx)(b.Z,{banner:!0,type:"info",message:"Customer usage is a new feature.",description:"Spend is tracked from feature launch and previous data isn't backfilled, so only future usage appears here.",closable:!0,onClose:()=>ek(!1),className:"mb-5"}),(0,a.jsx)(eQ,{accessToken:K,entityType:"customer",userID:P,userRole:$,entityList:(null==ed?void 0:ed.map(e=>({label:e.alias||e.user_id,value:e.user_id})))||null,premiumUser:B,dateValue:el})]}),"tag"===eb&&(0,a.jsx)(eQ,{accessToken:K,entityType:"tag",userID:P,userRole:$,entityList:ec,premiumUser:B,dateValue:el}),"agent"===eb&&(0,a.jsxs)(a.Fragment,{children:[ew&&(0,a.jsx)(b.Z,{banner:!0,type:"info",message:"Agent usage (A2A) is a new feature.",description:"Spend is tracked from feature launch and previous data isn't backfilled, so only future usage appears here.",closable:!0,onClose:()=>eS(!1),className:"mb-5"}),(0,a.jsx)(eQ,{accessToken:K,entityType:"agent",userID:P,userRole:$,entityList:(null==eu?void 0:null===(R=eu.agents)||void 0===R?void 0:R.map(e=>({label:e.agent_name,value:e.agent_id})))||null,premiumUser:B,dateValue:el})," "]}),"user-agent-activity"===eb&&(0,a.jsx)(eI,{accessToken:K,userRole:$,dateValue:el})]})}),(0,a.jsx)(en,{isOpen:ep,onClose:()=>eg(!1),accessToken:K}),(0,a.jsx)(eZ,{isOpen:e_,onClose:()=>ef(!1),entityType:"team",spendData:{results:H.results,metadata:H.metadata},dateRange:el,selectedFilters:[],customTitle:"Export Usage Data"})]})}},91323:function(e,s,t){t.d(s,{S:function(){return n}});var a=t(57437),r=t(2265),l=t(10012);function n(e){var s,t;let{className:n="",...i}=e,c=(0,r.useId)();return s=()=>{let e=document.getAnimations().filter(e=>e instanceof CSSAnimation&&"spin"===e.animationName),s=e.find(e=>{var s;return(null===(s=e.effect.target)||void 0===s?void 0:s.getAttribute("data-spinner-id"))===c}),t=e.find(e=>{var s;return e.effect instanceof KeyframeEffect&&(null===(s=e.effect.target)||void 0===s?void 0:s.getAttribute("data-spinner-id"))!==c});s&&t&&(s.currentTime=t.currentTime)},t=[c],(0,r.useLayoutEffect)(s,t),(0,a.jsxs)("svg",{"data-spinner-id":c,className:(0,l.cx)("pointer-events-none size-12 animate-spin text-current",n),fill:"none",viewBox:"0 0 24 24",...i,children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}},47375:function(e,s,t){var a=t(57437),r=t(2265),l=t(19250),n=t(59872),i=t(39760);s.Z=e=>{let{userSpend:s,userMaxBudget:t,selectedTeam:c}=e,{accessToken:o,userRole:d,userId:u}=(0,i.Z)(),[m,x]=(0,r.useState)(null!==s?s:0),[h,p]=(0,r.useState)(c?Number((0,n.pw)(c.max_budget,4)):null);(0,r.useEffect)(()=>{if(c){if("Default Team"===c.team_alias)p(t);else{let e=!1;if(c.team_memberships)for(let s of c.team_memberships)s.user_id===u&&"max_budget"in s.litellm_budget_table&&null!==s.litellm_budget_table.max_budget&&(p(s.litellm_budget_table.max_budget),e=!0);e||p(c.max_budget)}}else p(t)},[c,t]);let[g,_]=(0,r.useState)([]);(0,r.useEffect)(()=>{let e=async()=>{if(!o||!u||!d)return};(async()=>{try{if(null===u||null===d)return;if(null!==o){let e=(await (0,l.modelAvailableCall)(o,u,d)).data.map(e=>e.id);console.log("available_model_names:",e),_(e)}}catch(e){console.error("Error fetching user models:",e)}})(),e()},[d,o,u]),(0,r.useEffect)(()=>{null!==s&&x(s)},[s]);let f=[];c&&c.models&&(f=c.models),f&&f.includes("all-proxy-models")?(console.log("user models:",g),f=g):f&&f.includes("all-team-models")?f=c.models:f&&0===f.length&&(f=g);let j=null!==h?"$".concat((0,n.pw)(Number(h),4)," limit"):"No limit",y=void 0!==m?(0,n.pw)(m,4):null;return console.log("spend in view user spend: ".concat(m)),(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsxs)("div",{className:"flex justify-between gap-x-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content",children:"Total Spend"}),(0,a.jsxs)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:["$",y]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content",children:"Max Budget"}),(0,a.jsx)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:j})]})]})})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6988-27c1a5ab5702ba23.js b/litellm/proxy/_experimental/out/_next/static/chunks/6988-27c1a5ab5702ba23.js
new file mode 100644
index 00000000000..adcc976c59c
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/6988-27c1a5ab5702ba23.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6988],{47323:function(e,t,r){r.d(t,{Z:function(){return g}});var o=r(5853),n=r(2265),a=r(47187),i=r(7084),l=r(13241),s=r(1153),c=r(26898);let d={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},u={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},p=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,l.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,s.bM)(t,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,s.bM)(t,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,s.bM)(t,c.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,l.q)((0,s.bM)(t,c.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},h=(0,s.fn)("Icon"),g=n.forwardRef((e,t)=>{let{icon:r,variant:c="simple",tooltip:g,size:b=i.u8.SM,color:f,className:v}=e,y=(0,o._T)(e,["icon","variant","tooltip","size","color","className"]),k=p(c,f),{tooltipProps:w,getReferenceProps:x}=(0,a.l)();return n.createElement("span",Object.assign({ref:(0,s.lq)([t,w.refs.setReference]),className:(0,l.q)(h("root"),"inline-flex shrink-0 items-center justify-center",k.bgColor,k.textColor,k.borderColor,k.ringColor,m[c].rounded,m[c].border,m[c].shadow,m[c].ring,d[b].paddingX,d[b].paddingY,v)},x,y),n.createElement(a.Z,Object.assign({text:g},w)),n.createElement(r,{className:(0,l.q)(h("icon"),"shrink-0",u[b].height,u[b].width)}))});g.displayName="Icon"},59341:function(e,t,r){r.d(t,{Z:function(){return R}});var o=r(5853),n=r(71049),a=r(11323),i=r(2265),l=r(66797),s=r(40099),c=r(74275),d=r(59456),u=r(93980),m=r(65573),p=r(67561),h=r(87550),g=r(628),b=r(80281),f=r(31370),v=r(20131),y=r(38929),k=r(52307),w=r(52724),x=r(7935);let C=(0,i.createContext)(null);C.displayName="GroupContext";let O=i.Fragment,E=Object.assign((0,y.yV)(function(e,t){var r;let o=(0,i.useId)(),O=(0,b.Q)(),E=(0,h.B)(),{id:j=O||"headlessui-switch-".concat(o),disabled:N=E||!1,checked:S,defaultChecked:M,onChange:Z,name:P,value:R,form:T,autoFocus:B=!1,...L}=e,z=(0,i.useContext)(C),[I,q]=(0,i.useState)(null),F=(0,i.useRef)(null),_=(0,p.T)(F,t,null===z?null:z.setSwitch,q),H=(0,c.L)(M),[W,A]=(0,s.q)(S,Z,null!=H&&H),D=(0,d.G)(),[K,V]=(0,i.useState)(!1),X=(0,u.z)(()=>{V(!0),null==A||A(!W),D.nextFrame(()=>{V(!1)})}),G=(0,u.z)(e=>{if((0,f.P)(e.currentTarget))return e.preventDefault();e.preventDefault(),X()}),U=(0,u.z)(e=>{e.key===w.R.Space?(e.preventDefault(),X()):e.key===w.R.Enter&&(0,v.g)(e.currentTarget)}),Y=(0,u.z)(e=>e.preventDefault()),$=(0,x.wp)(),Q=(0,k.zH)(),{isFocusVisible:J,focusProps:ee}=(0,n.F)({autoFocus:B}),{isHovered:et,hoverProps:er}=(0,a.X)({isDisabled:N}),{pressed:eo,pressProps:en}=(0,l.x)({disabled:N}),ea=(0,i.useMemo)(()=>({checked:W,disabled:N,hover:et,focus:J,active:eo,autofocus:B,changing:K}),[W,et,J,eo,N,K,B]),ei=(0,y.dG)({id:j,ref:_,role:"switch",type:(0,m.f)(e,I),tabIndex:-1===e.tabIndex?0:null!=(r=e.tabIndex)?r:0,"aria-checked":W,"aria-labelledby":$,"aria-describedby":Q,disabled:N||void 0,autoFocus:B,onClick:G,onKeyUp:U,onKeyPress:Y},ee,er,en),el=(0,i.useCallback)(()=>{if(void 0!==H)return null==A?void 0:A(H)},[A,H]),es=(0,y.L6)();return i.createElement(i.Fragment,null,null!=P&&i.createElement(g.Mt,{disabled:N,data:{[P]:R||"on"},overrides:{type:"checkbox",checked:W},form:T,onReset:el}),es({ourProps:ei,theirProps:L,slot:ea,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,o]=(0,i.useState)(null),[n,a]=(0,x.bE)(),[l,s]=(0,k.fw)(),c=(0,i.useMemo)(()=>({switch:r,setSwitch:o}),[r,o]),d=(0,y.L6)();return i.createElement(s,{name:"Switch.Description",value:l},i.createElement(a,{name:"Switch.Label",value:n,props:{htmlFor:null==(t=c.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},i.createElement(C.Provider,{value:c},d({ourProps:{},theirProps:e,slot:{},defaultTag:O,name:"Switch.Group"}))))},Label:x.__,Description:k.dk});var j=r(44140),N=r(26898),S=r(13241),M=r(1153),Z=r(47187);let P=(0,M.fn)("Switch"),R=i.forwardRef((e,t)=>{let{checked:r,defaultChecked:n=!1,onChange:a,color:l,name:s,error:c,errorMessage:d,disabled:u,required:m,tooltip:p,id:h}=e,g=(0,o._T)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),b={bgColor:l?(0,M.bM)(l,N.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:l?(0,M.bM)(l,N.K.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[f,v]=(0,j.Z)(n,r),[y,k]=(0,i.useState)(!1),{tooltipProps:w,getReferenceProps:x}=(0,Z.l)(300);return i.createElement("div",{className:"flex flex-row items-center justify-start"},i.createElement(Z.Z,Object.assign({text:p},w)),i.createElement("div",Object.assign({ref:(0,M.lq)([t,w.refs.setReference]),className:(0,S.q)(P("root"),"flex flex-row relative h-5")},g,x),i.createElement("input",{type:"checkbox",className:(0,S.q)(P("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:s,required:m,checked:f,onChange:e=>{e.preventDefault()}}),i.createElement(E,{checked:f,onChange:e=>{v(e),null==a||a(e)},disabled:u,className:(0,S.q)(P("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>k(!0),onBlur:()=>k(!1),id:h},i.createElement("span",{className:(0,S.q)(P("sr-only"),"sr-only")},"Switch ",f?"on":"off"),i.createElement("span",{"aria-hidden":"true",className:(0,S.q)(P("background"),f?b.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),i.createElement("span",{"aria-hidden":"true",className:(0,S.q)(P("round"),f?(0,S.q)(b.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",y?(0,S.q)("ring-2",b.ringColor):"")}))),c&&d?i.createElement("p",{className:(0,S.q)(P("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});R.displayName="Switch"},21626:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(5853),n=r(2265),a=r(13241);let i=(0,r(1153).fn)("Table"),l=n.forwardRef((e,t)=>{let{children:r,className:l}=e,s=(0,o._T)(e,["children","className"]);return n.createElement("div",{className:(0,a.q)(i("root"),"overflow-auto",l)},n.createElement("table",Object.assign({ref:t,className:(0,a.q)(i("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},s),r))});l.displayName="Table"},97214:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(5853),n=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableBody"),l=n.forwardRef((e,t)=>{let{children:r,className:l}=e,s=(0,o._T)(e,["children","className"]);return n.createElement(n.Fragment,null,n.createElement("tbody",Object.assign({ref:t,className:(0,a.q)(i("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",l)},s),r))});l.displayName="TableBody"},28241:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(5853),n=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableCell"),l=n.forwardRef((e,t)=>{let{children:r,className:l}=e,s=(0,o._T)(e,["children","className"]);return n.createElement(n.Fragment,null,n.createElement("td",Object.assign({ref:t,className:(0,a.q)(i("root"),"align-middle whitespace-nowrap text-left p-4",l)},s),r))});l.displayName="TableCell"},58834:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(5853),n=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableHead"),l=n.forwardRef((e,t)=>{let{children:r,className:l}=e,s=(0,o._T)(e,["children","className"]);return n.createElement(n.Fragment,null,n.createElement("thead",Object.assign({ref:t,className:(0,a.q)(i("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",l)},s),r))});l.displayName="TableHead"},69552:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(5853),n=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableHeaderCell"),l=n.forwardRef((e,t)=>{let{children:r,className:l}=e,s=(0,o._T)(e,["children","className"]);return n.createElement(n.Fragment,null,n.createElement("th",Object.assign({ref:t,className:(0,a.q)(i("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",l)},s),r))});l.displayName="TableHeaderCell"},71876:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(5853),n=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableRow"),l=n.forwardRef((e,t)=>{let{children:r,className:l}=e,s=(0,o._T)(e,["children","className"]);return n.createElement(n.Fragment,null,n.createElement("tr",Object.assign({ref:t,className:(0,a.q)(i("row"),l)},s),r))});l.displayName="TableRow"},92570:function(e,t,r){r.d(t,{Z:function(){return o}});let o=e=>e?"function"==typeof e?e():e:null},867:function(e,t,r){r.d(t,{Z:function(){return E}});var o=r(2265),n=r(54537),a=r(36760),i=r.n(a),l=r(50506),s=r(18694),c=r(71744),d=r(79326),u=r(59367),m=r(92570),p=r(5545),h=r(51248),g=r(55274),b=r(37381),f=r(20435),v=r(99320);let y=e=>{let{componentCls:t,iconCls:r,antCls:o,zIndexPopup:n,colorText:a,colorWarning:i,marginXXS:l,marginXS:s,fontSize:c,fontWeightStrong:d,colorTextHeading:u}=e;return{[t]:{zIndex:n,["&".concat(o,"-popover")]:{fontSize:c},["".concat(t,"-message")]:{marginBottom:s,display:"flex",flexWrap:"nowrap",alignItems:"start",["> ".concat(t,"-message-icon ").concat(r)]:{color:i,fontSize:c,lineHeight:1,marginInlineEnd:s},["".concat(t,"-title")]:{fontWeight:d,color:u,"&:only-child":{fontWeight:"normal"}},["".concat(t,"-description")]:{marginTop:l,color:a}},["".concat(t,"-buttons")]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:s}}}}};var k=(0,v.I$)("Popconfirm",e=>y(e),e=>{let{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},{resetStyle:!1}),w=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let x=e=>{let{prefixCls:t,okButtonProps:r,cancelButtonProps:a,title:i,description:l,cancelText:s,okText:d,okType:f="primary",icon:v=o.createElement(n.Z,null),showCancel:y=!0,close:k,onConfirm:w,onCancel:x,onPopupClick:C}=e,{getPrefixCls:O}=o.useContext(c.E_),[E]=(0,g.Z)("Popconfirm",b.Z.Popconfirm),j=(0,m.Z)(i),N=(0,m.Z)(l);return o.createElement("div",{className:"".concat(t,"-inner-content"),onClick:C},o.createElement("div",{className:"".concat(t,"-message")},v&&o.createElement("span",{className:"".concat(t,"-message-icon")},v),o.createElement("div",{className:"".concat(t,"-message-text")},j&&o.createElement("div",{className:"".concat(t,"-title")},j),N&&o.createElement("div",{className:"".concat(t,"-description")},N))),o.createElement("div",{className:"".concat(t,"-buttons")},y&&o.createElement(p.ZP,Object.assign({onClick:x,size:"small"},a),s||(null==E?void 0:E.cancelText)),o.createElement(u.Z,{buttonProps:Object.assign(Object.assign({size:"small"},(0,h.nx)(f)),r),actionFn:w,close:k,prefixCls:O("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},d||(null==E?void 0:E.okText))))};var C=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let O=o.forwardRef((e,t)=>{var r,a;let{prefixCls:u,placement:m="top",trigger:p="click",okType:h="primary",icon:g=o.createElement(n.Z,null),children:b,overlayClassName:f,onOpenChange:v,onVisibleChange:y,overlayStyle:w,styles:O,classNames:E}=e,j=C(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:N,className:S,style:M,classNames:Z,styles:P}=(0,c.dj)("popconfirm"),[R,T]=(0,l.Z)(!1,{value:null!==(r=e.open)&&void 0!==r?r:e.visible,defaultValue:null!==(a=e.defaultOpen)&&void 0!==a?a:e.defaultVisible}),B=(e,t)=>{T(e,!0),null==y||y(e),null==v||v(e,t)},L=N("popconfirm",u),z=i()(L,S,f,Z.root,null==E?void 0:E.root),I=i()(Z.body,null==E?void 0:E.body),[q]=k(L);return q(o.createElement(d.Z,Object.assign({},(0,s.Z)(j,["title"]),{trigger:p,placement:m,onOpenChange:(t,r)=>{let{disabled:o=!1}=e;o||B(t,r)},open:R,ref:t,classNames:{root:z,body:I},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},P.root),M),w),null==O?void 0:O.root),body:Object.assign(Object.assign({},P.body),null==O?void 0:O.body)},content:o.createElement(x,Object.assign({okType:h,icon:g},e,{prefixCls:L,close:e=>{B(!1,e)},onConfirm:t=>{var r;return null===(r=e.onConfirm)||void 0===r?void 0:r.call(void 0,t)},onCancel:t=>{var r;B(!1,t),null===(r=e.onCancel)||void 0===r||r.call(void 0,t)}})),"data-popover-inject":!0}),b))});O._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,placement:r,className:n,style:a}=e,l=w(e,["prefixCls","placement","className","style"]),{getPrefixCls:s}=o.useContext(c.E_),d=s("popconfirm",t),[u]=k(d);return u(o.createElement(f.ZP,{placement:r,className:i()(d,n),style:a,content:o.createElement(x,Object.assign({prefixCls:d},l))}))};var E=O},20435:function(e,t,r){r.d(t,{aV:function(){return u}});var o=r(2265),n=r(36760),a=r.n(n),i=r(5769),l=r(92570),s=r(71744),c=r(72262),d=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let u=e=>{let{title:t,content:r,prefixCls:n}=e;return t||r?o.createElement(o.Fragment,null,t&&o.createElement("div",{className:"".concat(n,"-title")},t),r&&o.createElement("div",{className:"".concat(n,"-inner-content")},r)):null},m=e=>{let{hashId:t,prefixCls:r,className:n,style:s,placement:c="top",title:d,content:m,children:p}=e,h=(0,l.Z)(d),g=(0,l.Z)(m),b=a()(t,r,"".concat(r,"-pure"),"".concat(r,"-placement-").concat(c),n);return o.createElement("div",{className:b,style:s},o.createElement("div",{className:"".concat(r,"-arrow")}),o.createElement(i.G,Object.assign({},e,{className:t,prefixCls:r}),p||o.createElement(u,{prefixCls:r,title:h,content:g})))};t.ZP=e=>{let{prefixCls:t,className:r}=e,n=d(e,["prefixCls","className"]),{getPrefixCls:i}=o.useContext(s.E_),l=i("popover",t),[u,p,h]=(0,c.Z)(l);return u(o.createElement(m,Object.assign({},n,{prefixCls:l,hashId:p,className:a()(r,h)})))}},79326:function(e,t,r){var o=r(2265),n=r(36760),a=r.n(n),i=r(50506),l=r(95814),s=r(92570),c=r(68710),d=r(19722),u=r(71744),m=r(99981),p=r(20435),h=r(72262),g=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let b=o.forwardRef((e,t)=>{var r,n;let{prefixCls:b,title:f,content:v,overlayClassName:y,placement:k="top",trigger:w="hover",children:x,mouseEnterDelay:C=.1,mouseLeaveDelay:O=.1,onOpenChange:E,overlayStyle:j={},styles:N,classNames:S}=e,M=g(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:Z,className:P,style:R,classNames:T,styles:B}=(0,u.dj)("popover"),L=Z("popover",b),[z,I,q]=(0,h.Z)(L),F=Z(),_=a()(y,I,q,P,T.root,null==S?void 0:S.root),H=a()(T.body,null==S?void 0:S.body),[W,A]=(0,i.Z)(!1,{value:null!==(r=e.open)&&void 0!==r?r:e.visible,defaultValue:null!==(n=e.defaultOpen)&&void 0!==n?n:e.defaultVisible}),D=(e,t)=>{A(e,!0),null==E||E(e,t)},K=e=>{e.keyCode===l.Z.ESC&&D(!1,e)},V=(0,s.Z)(f),X=(0,s.Z)(v);return z(o.createElement(m.Z,Object.assign({placement:k,trigger:w,mouseEnterDelay:C,mouseLeaveDelay:O},M,{prefixCls:L,classNames:{root:_,body:H},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},B.root),R),j),null==N?void 0:N.root),body:Object.assign(Object.assign({},B.body),null==N?void 0:N.body)},ref:t,open:W,onOpenChange:e=>{D(e)},overlay:V||X?o.createElement(p.aV,{prefixCls:L,title:V,content:X}):null,transitionName:(0,c.m)(F,"zoom-big",M.transitionName),"data-popover-inject":!0}),(0,d.Tm)(x,{onKeyDown:e=>{var t,r;(0,o.isValidElement)(x)&&(null===(r=null==x?void 0:(t=x.props).onKeyDown)||void 0===r||r.call(t,e)),K(e)}})))});b._InternalPanelDoNotUseOrYouWillBeFired=p.ZP,t.Z=b},72262:function(e,t,r){var o=r(12918),n=r(691),a=r(88260),i=r(34442),l=r(53454),s=r(99320),c=r(71140);let d=e=>{let{componentCls:t,popoverColor:r,titleMinWidth:n,fontWeightStrong:i,innerPadding:l,boxShadowSecondary:s,colorTextHeading:c,borderRadiusLG:d,zIndexPopup:u,titleMarginBottom:m,colorBgElevated:p,popoverBg:h,titleBorderBottom:g,innerContentPadding:b,titlePadding:f}=e;return[{[t]:Object.assign(Object.assign({},(0,o.Wf)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:u,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:"var(--valid-offset-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":p,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},["".concat(t,"-content")]:{position:"relative"},["".concat(t,"-inner")]:{backgroundColor:h,backgroundClip:"padding-box",borderRadius:d,boxShadow:s,padding:l},["".concat(t,"-title")]:{minWidth:n,marginBottom:m,color:c,fontWeight:i,borderBottom:g,padding:f},["".concat(t,"-inner-content")]:{color:r,padding:b}})},(0,a.ZP)(e,"var(--antd-arrow-background-color)"),{["".concat(t,"-pure")]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",["".concat(t,"-content")]:{display:"inline-block"}}}]},u=e=>{let{componentCls:t}=e;return{[t]:l.i.map(r=>{let o=e["".concat(r,"6")];return{["&".concat(t,"-").concat(r)]:{"--antd-arrow-background-color":o,["".concat(t,"-inner")]:{backgroundColor:o},["".concat(t,"-arrow")]:{background:"transparent"}}}})}};t.Z=(0,s.I$)("Popover",e=>{let{colorBgElevated:t,colorText:r}=e,o=(0,c.IX)(e,{popoverBg:t,popoverColor:r});return[d(o),u(o),(0,n._y)(o,"zoom-big")]},e=>{let{lineWidth:t,controlHeight:r,fontHeight:o,padding:n,wireframe:l,zIndexPopupBase:s,borderRadiusLG:c,marginXS:d,lineType:u,colorSplit:m,paddingSM:p}=e,h=r-o;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:s+30},(0,i.w)(e)),(0,a.wZ)({contentRadius:c,limitVerticalRadius:!0})),{innerPadding:l?0:12,titleMarginBottom:l?0:d,titlePadding:l?"".concat(h/2,"px ").concat(n,"px ").concat(h/2-t,"px"):0,titleBorderBottom:l?"".concat(t,"px ").concat(u," ").concat(m):"none",innerContentPadding:l?"".concat(p,"px ").concat(n,"px"):0})},{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]})},3810:function(e,t,r){r.d(t,{Z:function(){return Z}});var o=r(2265),n=r(36760),a=r.n(n),i=r(18694),l=r(93350),s=r(53445),c=r(19722),d=r(6694),u=r(71744),m=r(93463),p=r(54558),h=r(12918),g=r(71140),b=r(99320);let f=e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:o,componentCls:n,calc:a}=e,i=a(o).sub(r).equal(),l=a(t).sub(r).equal();return{[n]:Object.assign(Object.assign({},(0,h.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:"".concat((0,m.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusSM,opacity:1,transition:"all ".concat(e.motionDurationMid),textAlign:"start",position:"relative",["&".concat(n,"-rtl")]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},["".concat(n,"-close-icon")]:{marginInlineStart:l,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),"&:hover":{color:e.colorTextHeading}},["&".concat(n,"-has-color")]:{borderColor:"transparent",["&, a, a:hover, ".concat(e.iconCls,"-close, ").concat(e.iconCls,"-close:hover")]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",["&:not(".concat(n,"-checkable-checked):hover")]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},["> ".concat(e.iconCls," + span, > span + ").concat(e.iconCls)]:{marginInlineStart:i}}),["".concat(n,"-borderless")]:{borderColor:"transparent",background:e.tagBorderlessBg}}},v=e=>{let{lineWidth:t,fontSizeIcon:r,calc:o}=e,n=e.fontSizeSM;return(0,g.IX)(e,{tagFontSize:n,tagLineHeight:(0,m.bf)(o(e.lineHeightSM).mul(n).equal()),tagIconSize:o(r).sub(o(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},y=e=>({defaultBg:new p.t(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var k=(0,b.I$)("Tag",e=>f(v(e)),y),w=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let x=o.forwardRef((e,t)=>{let{prefixCls:r,style:n,className:i,checked:l,children:s,icon:c,onChange:d,onClick:m}=e,p=w(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:h,tag:g}=o.useContext(u.E_),b=h("tag",r),[f,v,y]=k(b),x=a()(b,"".concat(b,"-checkable"),{["".concat(b,"-checkable-checked")]:l},null==g?void 0:g.className,i,v,y);return f(o.createElement("span",Object.assign({},p,{ref:t,style:Object.assign(Object.assign({},n),null==g?void 0:g.style),className:x,onClick:e=>{null==d||d(!l),null==m||m(e)}}),c,o.createElement("span",null,s)))});var C=r(18536);let O=e=>(0,C.Z)(e,(t,r)=>{let{textColor:o,lightBorderColor:n,lightColor:a,darkColor:i}=r;return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:o,background:a,borderColor:n,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}});var E=(0,b.bk)(["Tag","preset"],e=>O(v(e)),y);let j=(e,t,r)=>{let o="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:e["color".concat(r)],background:e["color".concat(o,"Bg")],borderColor:e["color".concat(o,"Border")],["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}};var N=(0,b.bk)(["Tag","status"],e=>{let t=v(e);return[j(t,"success","Success"),j(t,"processing","Info"),j(t,"error","Error"),j(t,"warning","Warning")]},y),S=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let M=o.forwardRef((e,t)=>{let{prefixCls:r,className:n,rootClassName:m,style:p,children:h,icon:g,color:b,onClose:f,bordered:v=!0,visible:y}=e,w=S(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:x,direction:C,tag:O}=o.useContext(u.E_),[j,M]=o.useState(!0),Z=(0,i.Z)(w,["closeIcon","closable"]);o.useEffect(()=>{void 0!==y&&M(y)},[y]);let P=(0,l.o2)(b),R=(0,l.yT)(b),T=P||R,B=Object.assign(Object.assign({backgroundColor:b&&!T?b:void 0},null==O?void 0:O.style),p),L=x("tag",r),[z,I,q]=k(L),F=a()(L,null==O?void 0:O.className,{["".concat(L,"-").concat(b)]:T,["".concat(L,"-has-color")]:b&&!T,["".concat(L,"-hidden")]:!j,["".concat(L,"-rtl")]:"rtl"===C,["".concat(L,"-borderless")]:!v},n,m,I,q),_=e=>{e.stopPropagation(),null==f||f(e),e.defaultPrevented||M(!1)},[,H]=(0,s.b)((0,s.w)(e),(0,s.w)(O),{closable:!1,closeIconRender:e=>{let t=o.createElement("span",{className:"".concat(L,"-close-icon"),onClick:_},e);return(0,c.wm)(e,t,e=>({onClick:t=>{var r;null===(r=null==e?void 0:e.onClick)||void 0===r||r.call(e,t),_(t)},className:a()(null==e?void 0:e.className,"".concat(L,"-close-icon"))}))}}),W="function"==typeof w.onClick||h&&"a"===h.type,A=g||null,D=A?o.createElement(o.Fragment,null,A,h&&o.createElement("span",null,h)):h,K=o.createElement("span",Object.assign({},Z,{ref:t,className:F,style:B}),D,H,P&&o.createElement(E,{key:"preset",prefixCls:L}),R&&o.createElement(N,{key:"status",prefixCls:L}));return z(W?o.createElement(d.Z,{component:"Tag"},K):K)});M.CheckableTag=x;var Z=M},2651:function(e,t,r){r.d(t,{Z:function(){return y}});var o=r(93463),n=r(11938),a=r(70774),i=r(73602),l=r(91691),s=r(25119),c=r(37628),d=r(32417),u=r(4877),m=r(57943),p=r(12789),h=r(54558);let g=(e,t)=>new h.t(e).setA(t).toRgbString(),b=(e,t)=>new h.t(e).lighten(t).toHexString(),f=e=>{let t=(0,m.R_)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},v=(e,t)=>{let r=e||"#000",o=t||"#fff";return{colorBgBase:r,colorTextBase:o,colorText:g(o,.85),colorTextSecondary:g(o,.65),colorTextTertiary:g(o,.45),colorTextQuaternary:g(o,.25),colorFill:g(o,.18),colorFillSecondary:g(o,.12),colorFillTertiary:g(o,.08),colorFillQuaternary:g(o,.04),colorBgSolid:g(o,.95),colorBgSolidHover:g(o,1),colorBgSolidActive:g(o,.9),colorBgElevated:b(r,12),colorBgContainer:b(r,8),colorBgLayout:b(r,0),colorBgSpotlight:b(r,26),colorBgBlur:g(o,.04),colorBorder:b(r,26),colorBorderSecondary:b(r,19)}};var y={defaultSeed:s.u_.token,useToken:function(){let[e,t,r]=(0,l.ZP)();return{theme:e,token:t,hashId:r}},defaultAlgorithm:c.Z,darkAlgorithm:(e,t)=>{let r=Object.keys(a.M).map(t=>{let r=(0,m.R_)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,o,n)=>(e["".concat(t,"-").concat(n+1)]=r[n],e["".concat(t).concat(n+1)]=r[n],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),o=null!=t?t:(0,c.Z)(e),n=(0,p.Z)(e,{generateColorPalettes:f,generateNeutralColorPalettes:v});return Object.assign(Object.assign(Object.assign(Object.assign({},o),r),n),{colorPrimaryBg:n.colorPrimaryBorder,colorPrimaryBgHover:n.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let r=null!=t?t:(0,c.Z)(e),o=r.fontSizeSM,n=r.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),function(e){let{sizeUnit:t,sizeStep:r}=e,o=r-2;return{sizeXXL:t*(o+10),sizeXL:t*(o+6),sizeLG:t*(o+2),sizeMD:t*(o+2),sizeMS:t*(o+1),size:t*o,sizeSM:t*o,sizeXS:t*(o-1),sizeXXS:t*(o-1)}}(null!=t?t:e)),(0,u.Z)(o)),{controlHeight:n}),(0,d.Z)(Object.assign(Object.assign({},r),{controlHeight:n})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,o.jG)(e.algorithm):n.Z,r=Object.assign(Object.assign({},a.Z),null==e?void 0:e.token);return(0,o.t2)(r,{override:null==e?void 0:e.token},t,i.Z)},defaultConfig:s.u_,_internalContext:s.Mj}},79205:function(e,t,r){r.d(t,{Z:function(){return u}});var o=r(2265);let n=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),i=e=>{let t=a(e);return t.charAt(0).toUpperCase()+t.slice(1)},l=function(){for(var e=arguments.length,t=Array(e),r=0;r!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()},s=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var c={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let d=(0,o.forwardRef)((e,t)=>{let{color:r="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:d="",children:u,iconNode:m,...p}=e;return(0,o.createElement)("svg",{ref:t,...c,width:n,height:n,stroke:r,strokeWidth:i?24*Number(a)/Number(n):a,className:l("lucide",d),...!u&&!s(p)&&{"aria-hidden":"true"},...p},[...m.map(e=>{let[t,r]=e;return(0,o.createElement)(t,r)}),...Array.isArray(u)?u:[u]])}),u=(e,t)=>{let r=(0,o.forwardRef)((r,a)=>{let{className:s,...c}=r;return(0,o.createElement)(d,{ref:a,iconNode:t,className:l("lucide-".concat(n(i(e))),"lucide-".concat(e),s),...c})});return r.displayName=i(e),r}},41671:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},33276:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},15868:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])},18930:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},17689:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},44643:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=n},86462:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});t.Z=n},44633:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});t.Z=n},3477:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});t.Z=n},53410:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});t.Z=n},91126:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=n},23628:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});t.Z=n},74998:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});t.Z=n},2894:function(e,t,r){r.d(t,{R:function(){return l},m:function(){return i}});var o=r(18238),n=r(7989),a=r(11255),i=class extends n.F{#e;#t;#r;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#r=e.mutationCache,this.#t=[],this.state=e.state||l(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#r.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#n({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=(0,a.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#n({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#n({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});let o="pending"===this.state.status,n=!this.#o.canStart();try{if(o)t();else{this.#n({type:"pending",variables:e,isPaused:n}),await this.#r.config.onMutate?.(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#n({type:"pending",context:t,variables:e,isPaused:n})}let a=await this.#o.start();return await this.#r.config.onSuccess?.(a,e,this.state.context,this,r),await this.options.onSuccess?.(a,e,this.state.context,r),await this.#r.config.onSettled?.(a,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(a,null,e,this.state.context,r),this.#n({type:"success",data:a}),a}catch(t){try{throw await this.#r.config.onError?.(t,e,this.state.context,this,r),await this.options.onError?.(t,e,this.state.context,r),await this.#r.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,t,e,this.state.context,r),t}finally{this.#n({type:"error",error:t})}}finally{this.#r.runNext(this)}}#n(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),o.Vr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#r.notify({mutation:this,type:"updated",action:e})})}};function l(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},21770:function(e,t,r){r.d(t,{D:function(){return d}});var o=r(2265),n=r(2894),a=r(18238),i=r(24112),l=r(45345),s=class extends i.l{#e;#a=void 0;#i;#l;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,l.VS)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#i,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.Ym)(t.mutationKey)!==(0,l.Ym)(this.options.mutationKey)?this.reset():this.#i?.state.status==="pending"&&this.#i.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#i?.removeObserver(this)}onMutationUpdate(e){this.#s(),this.#c(e)}getCurrentResult(){return this.#a}reset(){this.#i?.removeObserver(this),this.#i=void 0,this.#s(),this.#c()}mutate(e,t){return this.#l=t,this.#i?.removeObserver(this),this.#i=this.#e.getMutationCache().build(this.#e,this.options),this.#i.addObserver(this),this.#i.execute(e)}#s(){let e=this.#i?.state??(0,n.R)();this.#a={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#c(e){a.Vr.batch(()=>{if(this.#l&&this.hasListeners()){let t=this.#a.variables,r=this.#a.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type==="success"?(this.#l.onSuccess?.(e.data,t,r,o),this.#l.onSettled?.(e.data,null,t,r,o)):e?.type==="error"&&(this.#l.onError?.(e.error,t,r,o),this.#l.onSettled?.(void 0,e.error,t,r,o))}this.listeners.forEach(e=>{e(this.#a)})})}},c=r(29827);function d(e,t){let r=(0,c.NL)(t),[n]=o.useState(()=>new s(r,e));o.useEffect(()=>{n.setOptions(e)},[n,e]);let i=o.useSyncExternalStore(o.useCallback(e=>n.subscribe(a.Vr.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),d=o.useCallback((e,t)=>{n.mutate(e,t).catch(l.ZT)},[n]);if(i.error&&(0,l.L3)(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:d,mutateAsync:i.mutate}}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/6266-e38c5801183e9c17.js b/litellm/proxy/_experimental/out/_next/static/chunks/7187-ee86be841e859eb1.js
similarity index 87%
rename from litellm/proxy/_experimental/out/_next/static/chunks/6266-e38c5801183e9c17.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/7187-ee86be841e859eb1.js
index a0d34851769..1fedc5829f5 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/6266-e38c5801183e9c17.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/7187-ee86be841e859eb1.js
@@ -1 +1 @@
-(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6266],{58747:function(e,r,t){"use strict";t.d(r,{Z:function(){return a}});var n=t(5853),o=t(2265);let a=e=>{var r=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},r),o.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))}},4537:function(e,r,t){"use strict";t.d(r,{Z:function(){return a}});var n=t(5853),o=t(2265);let a=e=>{var r=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},r),o.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))}},41649:function(e,r,t){"use strict";t.d(r,{Z:function(){return p}});var n=t(5853),o=t(2265),a=t(47187),l=t(7084),i=t(26898),s=t(13241),d=t(1153);let c={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},u={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},m=(0,d.fn)("Badge"),p=o.forwardRef((e,r)=>{let{color:t,icon:p,size:g=l.u8.SM,tooltip:f,className:b,children:h}=e,v=(0,n._T)(e,["color","icon","size","tooltip","className","children"]),x=p||null,{tooltipProps:k,getReferenceProps:w}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,d.lq)([r,k.refs.setReference]),className:(0,s.q)(m("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",t?(0,s.q)((0,d.bM)(t,i.K.background).bgColor,(0,d.bM)(t,i.K.iconText).textColor,(0,d.bM)(t,i.K.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,s.q)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),c[g].paddingX,c[g].paddingY,c[g].fontSize,b)},w,v),o.createElement(a.Z,Object.assign({text:f},k)),x?o.createElement(x,{className:(0,s.q)(m("icon"),"shrink-0 -ml-1 mr-1.5",u[g].height,u[g].width)}):null,o.createElement("span",{className:(0,s.q)(m("text"),"whitespace-nowrap")},h))});p.displayName="Badge"},47323:function(e,r,t){"use strict";t.d(r,{Z:function(){return f}});var n=t(5853),o=t(2265),a=t(47187),l=t(7084),i=t(13241),s=t(1153),d=t(26898);let c={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},u={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},p=(e,r)=>{switch(e){case"simple":return{textColor:r?(0,s.bM)(r,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:r?(0,s.bM)(r,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,i.q)((0,s.bM)(r,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:r?(0,s.bM)(r,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,i.q)((0,s.bM)(r,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:r?(0,s.bM)(r,d.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:r?(0,i.q)((0,s.bM)(r,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:r?(0,s.bM)(r,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,i.q)((0,s.bM)(r,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:r?(0,s.bM)(r,d.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:r?(0,i.q)((0,s.bM)(r,d.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},g=(0,s.fn)("Icon"),f=o.forwardRef((e,r)=>{let{icon:t,variant:d="simple",tooltip:f,size:b=l.u8.SM,color:h,className:v}=e,x=(0,n._T)(e,["icon","variant","tooltip","size","color","className"]),k=p(d,h),{tooltipProps:w,getReferenceProps:C}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,s.lq)([r,w.refs.setReference]),className:(0,i.q)(g("root"),"inline-flex shrink-0 items-center justify-center",k.bgColor,k.textColor,k.borderColor,k.ringColor,m[d].rounded,m[d].border,m[d].shadow,m[d].ring,c[b].paddingX,c[b].paddingY,v)},C,x),o.createElement(a.Z,Object.assign({text:f},w)),o.createElement(t,{className:(0,i.q)(g("icon"),"shrink-0",u[b].height,u[b].width)}))});f.displayName="Icon"},78489:function(e,r,t){"use strict";t.d(r,{Z:function(){return E}});var n=t(5853),o=t(47187),a=t(2265);let l=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],i=e=>({_s:e,status:l[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),s=e=>e?6:5,d=(e,r)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return s(r)}},c=e=>"object"==typeof e?[e.enter,e.exit]:[e,e],u=(e,r)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(r+1)},0),m=(e,r,t,n,o)=>{clearTimeout(n.current);let a=i(e);r(a),t.current=a,o&&o({current:a})},p=({enter:e=!0,exit:r=!0,preEnter:t,preExit:n,timeout:o,initialEntered:l,mountOnEnter:p,unmountOnExit:g,onStateChange:f}={})=>{let[b,h]=(0,a.useState)(()=>i(l?2:s(p))),v=(0,a.useRef)(b),x=(0,a.useRef)(),[k,w]=c(o),C=(0,a.useCallback)(()=>{let e=d(v.current._s,g);e&&m(e,h,v,x,f)},[f,g]);return[b,(0,a.useCallback)(o=>{let a=e=>{switch(m(e,h,v,x,f),e){case 1:k>=0&&(x.current=setTimeout(C,k));break;case 4:w>=0&&(x.current=setTimeout(C,w));break;case 0:case 3:x.current=u(a,e)}},l=v.current.isEnter;"boolean"!=typeof o&&(o=!l),o?l||a(e?t?0:1:2):l&&a(r?n?3:4:s(g))},[C,f,e,r,t,n,k,w,g]),C]};var g=t(7084),f=t(13241),b=t(1153);let h=e=>{var r=(0,n._T)(e,[]);return a.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.createElement("path",{d:"M18.364 5.636L16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364z"}))};var v=t(26898);let x={xs:{height:"h-4",width:"w-4"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-6",width:"w-6"},xl:{height:"h-6",width:"w-6"}},k=e=>"light"!==e?{xs:{paddingX:"px-2.5",paddingY:"py-1.5",fontSize:"text-xs"},sm:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-sm"},md:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-md"},lg:{paddingX:"px-4",paddingY:"py-2.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-3",fontSize:"text-xl"}}:{xs:{paddingX:"",paddingY:"",fontSize:"text-xs"},sm:{paddingX:"",paddingY:"",fontSize:"text-sm"},md:{paddingX:"",paddingY:"",fontSize:"text-md"},lg:{paddingX:"",paddingY:"",fontSize:"text-lg"},xl:{paddingX:"",paddingY:"",fontSize:"text-xl"}},w=(e,r)=>{switch(e){case"primary":return{textColor:r?(0,b.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:r?(0,b.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:r?(0,b.bM)(r,v.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:r?(0,b.bM)(r,v.K.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:r?(0,b.bM)(r,v.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:r?(0,b.bM)(r,v.K.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:r?(0,b.bM)(r,v.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:r?(0,b.bM)(r,v.K.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,b.bM)("transparent").bgColor,hoverBgColor:r?(0,f.q)((0,b.bM)(r,v.K.background).hoverBgColor,"hover:bg-opacity-20 dark:hover:bg-opacity-20"):"hover:bg-tremor-brand-faint dark:hover:bg-dark-tremor-brand-faint",borderColor:r?(0,b.bM)(r,v.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:r?(0,b.bM)(r,v.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:r?(0,b.bM)(r,v.K.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,b.bM)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},C=(0,b.fn)("Button"),y=e=>{let{loading:r,iconSize:t,iconPosition:n,Icon:o,needMargin:l,transitionStatus:i}=e,s=l?n===g.zS.Left?(0,f.q)("-ml-1","mr-1.5"):(0,f.q)("-mr-1","ml-1.5"):"",d=(0,f.q)("w-0 h-0"),c={default:d,entering:d,entered:t,exiting:t,exited:d};return r?a.createElement(h,{className:(0,f.q)(C("icon"),"animate-spin shrink-0",s,c.default,c[i]),style:{transition:"width 150ms"}}):a.createElement(o,{className:(0,f.q)(C("icon"),"shrink-0",t,s)})},E=a.forwardRef((e,r)=>{let{icon:t,iconPosition:l=g.zS.Left,size:i=g.u8.SM,color:s,variant:d="primary",disabled:c,loading:u=!1,loadingText:m,children:h,tooltip:v,className:E}=e,S=(0,n._T)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),N=u||c,M=void 0!==t||u,T=u&&m,I=!(!h&&!T),q=(0,f.q)(x[i].height,x[i].width),O="light"!==d?(0,f.q)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",P=w(d,s),R=k(d)[i],{tooltipProps:j,getReferenceProps:z}=(0,o.l)(300),[L,Z]=p({timeout:50});return(0,a.useEffect)(()=>{Z(u)},[u]),a.createElement("button",Object.assign({ref:(0,b.lq)([r,j.refs.setReference]),className:(0,f.q)(C("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",O,R.paddingX,R.paddingY,R.fontSize,P.textColor,P.bgColor,P.borderColor,P.hoverBorderColor,N?"opacity-50 cursor-not-allowed":(0,f.q)(w(d,s).hoverTextColor,w(d,s).hoverBgColor,w(d,s).hoverBorderColor),E),disabled:N},z,S),a.createElement(o.Z,Object.assign({text:v},j)),M&&l!==g.zS.Right?a.createElement(y,{loading:u,iconSize:q,iconPosition:l,Icon:t,transitionStatus:L.status,needMargin:I}):null,T||h?a.createElement("span",{className:(0,f.q)(C("text"),"text-tremor-default whitespace-nowrap")},T?m:h):null,M&&l===g.zS.Right?a.createElement(y,{loading:u,iconSize:q,iconPosition:l,Icon:t,transitionStatus:L.status,needMargin:I}):null)});E.displayName="Button"},30150:function(e,r,t){"use strict";t.d(r,{Z:function(){return m}});var n=t(5853),o=t(2265);let a=e=>{var r=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),o.createElement("path",{d:"M12 4v16m8-8H4"}))},l=e=>{var r=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),o.createElement("path",{d:"M20 12H4"}))};var i=t(13241),s=t(1153),d=t(69262);let c="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",u="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",m=o.forwardRef((e,r)=>{let{onSubmit:t,enableStepper:m=!0,disabled:p,onValueChange:g,onChange:f}=e,b=(0,n._T)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),h=(0,o.useRef)(null),[v,x]=o.useState(!1),k=o.useCallback(()=>{x(!0)},[]),w=o.useCallback(()=>{x(!1)},[]),[C,y]=o.useState(!1),E=o.useCallback(()=>{y(!0)},[]),S=o.useCallback(()=>{y(!1)},[]);return o.createElement(d.Z,Object.assign({type:"number",ref:(0,s.lq)([h,r]),disabled:p,makeInputClassName:(0,s.fn)("NumberInput"),onKeyDown:e=>{var r;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null===(r=h.current)||void 0===r?void 0:r.value;null==t||t(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&k(),"ArrowUp"===e.key&&E()},onKeyUp:e=>{"ArrowDown"===e.key&&w(),"ArrowUp"===e.key&&S()},onChange:e=>{p||(null==g||g(parseFloat(e.target.value)),null==f||f(e))},stepper:m?o.createElement("div",{className:(0,i.q)("flex justify-center align-middle")},o.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,r;p||(null===(e=h.current)||void 0===e||e.stepDown(),null===(r=h.current)||void 0===r||r.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.q)(!p&&u,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},o.createElement(l,{"data-testid":"step-down",className:(v?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),o.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,r;p||(null===(e=h.current)||void 0===e||e.stepUp(),null===(r=h.current)||void 0===r||r.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.q)(!p&&u,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},o.createElement(a,{"data-testid":"step-up",className:(C?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},b))});m.displayName="NumberInput"},27281:function(e,r,t){"use strict";t.d(r,{Z:function(){return g}});var n=t(5853),o=t(58747),a=t(2265),l=t(4537),i=t(13241),s=t(1153),d=t(96398),c=t(51975),u=t(85238),m=t(44140);let p=(0,s.fn)("Select"),g=a.forwardRef((e,r)=>{let{defaultValue:t="",value:s,onValueChange:g,placeholder:f="Select...",disabled:b=!1,icon:h,enableClear:v=!1,required:x,children:k,name:w,error:C=!1,errorMessage:y,className:E,id:S}=e,N=(0,n._T)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),M=(0,a.useRef)(null),T=a.Children.toArray(k),[I,q]=(0,m.Z)(t,s),O=(0,a.useMemo)(()=>{let e=a.Children.toArray(k).filter(a.isValidElement);return(0,d.sl)(e)},[k]);return a.createElement("div",{className:(0,i.q)("w-full min-w-[10rem] text-tremor-default",E)},a.createElement("div",{className:"relative"},a.createElement("select",{title:"select-hidden",required:x,className:(0,i.q)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:I,onChange:e=>{e.preventDefault()},name:w,disabled:b,id:S,onFocus:()=>{let e=M.current;e&&e.focus()}},a.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},f),T.map(e=>{let r=e.props.value,t=e.props.children;return a.createElement("option",{className:"hidden",key:r,value:r},t)})),a.createElement(c.Ri,Object.assign({as:"div",ref:r,defaultValue:I,value:I,onChange:e=>{null==g||g(e),q(e)},disabled:b,id:S},N),e=>{var r;let{value:t}=e;return a.createElement(a.Fragment,null,a.createElement(c.Y4,{ref:M,className:(0,i.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",h?"pl-10":"pl-3",(0,d.um)((0,d.Uh)(t),b,C))},h&&a.createElement("span",{className:(0,i.q)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.createElement(h,{className:(0,i.q)(p("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.createElement("span",{className:"w-[90%] block truncate"},t&&null!==(r=O.get(t))&&void 0!==r?r:f),a.createElement("span",{className:(0,i.q)("absolute inset-y-0 right-0 flex items-center mr-3")},a.createElement(o.Z,{className:(0,i.q)(p("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),v&&I?a.createElement("button",{type:"button",className:(0,i.q)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),q(""),null==g||g("")}},a.createElement(l.Z,{className:(0,i.q)(p("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.createElement(u.u,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.createElement(c.O_,{anchor:"bottom start",className:(0,i.q)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},k)))})),C&&y?a.createElement("p",{className:(0,i.q)("errorMessage","text-sm text-rose-500 mt-1")},y):null)});g.displayName="Select"},87452:function(e,r,t){"use strict";t.d(r,{Z:function(){return u},r:function(){return c}});var n=t(5853),o=t(91054);t(42698),t(64016);var a=t(8710);t(33232);var l=t(13241),i=t(1153),s=t(2265);let d=(0,i.fn)("Accordion"),c=(0,s.createContext)({isOpen:!1}),u=s.forwardRef((e,r)=>{var t;let{defaultOpen:i=!1,children:u,className:m}=e,p=(0,n._T)(e,["defaultOpen","children","className"]),g=null!==(t=(0,s.useContext)(a.Z))&&void 0!==t?t:(0,l.q)("rounded-tremor-default border");return s.createElement(o.pJ,Object.assign({as:"div",ref:r,className:(0,l.q)(d("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",g,m),defaultOpen:i},p),e=>{let{open:r}=e;return s.createElement(c.Provider,{value:{isOpen:r}},u)})});u.displayName="Accordion"},88829:function(e,r,t){"use strict";t.d(r,{Z:function(){return s}});var n=t(5853),o=t(2265),a=t(91054),l=t(13241);let i=(0,t(1153).fn)("AccordionBody"),s=o.forwardRef((e,r)=>{let{children:t,className:s}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(a.pJ.Panel,Object.assign({ref:r,className:(0,l.q)(i("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",s)},d),t)});s.displayName="AccordionBody"},72208:function(e,r,t){"use strict";t.d(r,{Z:function(){return c}});var n=t(5853),o=t(2265),a=t(91054);let l=e=>{var r=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},r),o.createElement("path",{d:"M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z"}))};var i=t(87452),s=t(13241);let d=(0,t(1153).fn)("AccordionHeader"),c=o.forwardRef((e,r)=>{let{children:t,className:c}=e,u=(0,n._T)(e,["children","className"]),{isOpen:m}=(0,o.useContext)(i.r);return o.createElement(a.pJ.Button,Object.assign({ref:r,className:(0,s.q)(d("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",c)},u),o.createElement("div",{className:(0,s.q)(d("children"),"flex flex-1 text-inherit mr-4")},t),o.createElement("div",null,o.createElement(l,{className:(0,s.q)(d("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",m?"transition-all":"transition-all -rotate-180")})))});c.displayName="AccordionHeader"},12514:function(e,r,t){"use strict";t.d(r,{Z:function(){return u}});var n=t(5853),o=t(2265),a=t(7084),l=t(26898),i=t(13241),s=t(1153);let d=(0,s.fn)("Card"),c=e=>{if(!e)return"";switch(e){case a.zS.Left:return"border-l-4";case a.m.Top:return"border-t-4";case a.zS.Right:return"border-r-4";case a.m.Bottom:return"border-b-4";default:return""}},u=o.forwardRef((e,r)=>{let{decoration:t="",decorationColor:a,children:u,className:m}=e,p=(0,n._T)(e,["decoration","decorationColor","children","className"]);return o.createElement("div",Object.assign({ref:r,className:(0,i.q)(d("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",a?(0,s.bM)(a,l.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",c(t),m)},p),u)});u.displayName="Card"},67101:function(e,r,t){"use strict";t.d(r,{Z:function(){return c}});var n=t(5853),o=t(13241),a=t(1153),l=t(2265),i=t(9496);let s=(0,a.fn)("Grid"),d=(e,r)=>e&&Object.keys(r).includes(String(e))?r[e]:"",c=l.forwardRef((e,r)=>{let{numItems:t=1,numItemsSm:a,numItemsMd:c,numItemsLg:u,children:m,className:p}=e,g=(0,n._T)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),f=d(t,i._m),b=d(a,i.LH),h=d(c,i.l5),v=d(u,i.N4),x=(0,o.q)(f,b,h,v);return l.createElement("div",Object.assign({ref:r,className:(0,o.q)(s("root"),"grid",x,p)},g),m)});c.displayName="Grid"},9496:function(e,r,t){"use strict";t.d(r,{LH:function(){return o},N4:function(){return l},PT:function(){return i},SP:function(){return s},VS:function(){return d},_m:function(){return n},_w:function(){return c},l5:function(){return a}});let n={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},o={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},a={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},l={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},i={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},s={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},d={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},c={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"}},84264:function(e,r,t){"use strict";t.d(r,{Z:function(){return i}});var n=t(26898),o=t(13241),a=t(1153),l=t(2265);let i=l.forwardRef((e,r)=>{let{color:t,className:i,children:s}=e;return l.createElement("p",{ref:r,className:(0,o.q)("text-tremor-default",t?(0,a.bM)(t,n.K.text).textColor:(0,o.q)("text-tremor-content","dark:text-dark-tremor-content"),i)},s)});i.displayName="Text"},23910:function(e,r,t){var n=t(74288).Symbol;e.exports=n},54506:function(e,r,t){var n=t(23910),o=t(4479),a=t(80910),l=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":l&&l in Object(e)?o(e):a(e)}},55041:function(e,r,t){var n=t(5035),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},17071:function(e,r,t){var n="object"==typeof t.g&&t.g&&t.g.Object===Object&&t.g;e.exports=n},4479:function(e,r,t){var n=t(23910),o=Object.prototype,a=o.hasOwnProperty,l=o.toString,i=n?n.toStringTag:void 0;e.exports=function(e){var r=a.call(e,i),t=e[i];try{e[i]=void 0;var n=!0}catch(e){}var o=l.call(e);return n&&(r?e[i]=t:delete e[i]),o}},80910:function(e){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},74288:function(e,r,t){var n=t(17071),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},5035:function(e){var r=/\s/;e.exports=function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}},7310:function(e,r,t){var n=t(28302),o=t(11121),a=t(6660),l=Math.max,i=Math.min;e.exports=function(e,r,t){var s,d,c,u,m,p,g=0,f=!1,b=!1,h=!0;if("function"!=typeof e)throw TypeError("Expected a function");function v(r){var t=s,n=d;return s=d=void 0,g=r,u=e.apply(n,t)}function x(e){var t=e-p,n=e-g;return void 0===p||t>=r||t<0||b&&n>=c}function k(){var e,t,n,a=o();if(x(a))return w(a);m=setTimeout(k,(e=a-p,t=a-g,n=r-e,b?i(n,c-t):n))}function w(e){return(m=void 0,h&&s)?v(e):(s=d=void 0,u)}function C(){var e,t=o(),n=x(t);if(s=arguments,d=this,p=t,n){if(void 0===m)return g=e=p,m=setTimeout(k,r),f?v(e):u;if(b)return clearTimeout(m),m=setTimeout(k,r),v(p)}return void 0===m&&(m=setTimeout(k,r)),u}return r=a(r)||0,n(t)&&(f=!!t.leading,c=(b="maxWait"in t)?l(a(t.maxWait)||0,r):c,h="trailing"in t?!!t.trailing:h),C.cancel=function(){void 0!==m&&clearTimeout(m),g=0,s=p=d=m=void 0},C.flush=function(){return void 0===m?u:w(o())},C}},28302:function(e){e.exports=function(e){var r=typeof e;return null!=e&&("object"==r||"function"==r)}},10303:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},78371:function(e,r,t){var n=t(54506),o=t(10303);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},11121:function(e,r,t){var n=t(74288);e.exports=function(){return n.Date.now()}},6660:function(e,r,t){var n=t(55041),o=t(28302),a=t(78371),l=0/0,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return l;if(o(e)){var r="function"==typeof e.valueOf?e.valueOf():e;e=o(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var t=s.test(e);return t||d.test(e)?c(e.slice(2),t?2:8):i.test(e)?l:+e}},44643:function(e,r,t){"use strict";var n=t(2265);let o=n.forwardRef(function(e,r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))});r.Z=o},51853:function(e,r,t){"use strict";var n=t(2265);let o=n.forwardRef(function(e,r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});r.Z=o},23628:function(e,r,t){"use strict";var n=t(2265);let o=n.forwardRef(function(e,r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});r.Z=o},71157:function(e,r,t){"use strict";var n=t(2265);let o=n.forwardRef(function(e,r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))});r.Z=o},91054:function(e,r,t){"use strict";let n,o;t.d(r,{pJ:function(){return P}});var a,l=t(71049),i=t(11323),s=t(2265),d=t(66797),c=t(93980),u=t(65573),m=t(67561),p=t(98218),g=t(33443),f=t(28294),b=t(31370),h=t(72468),v=t(5664),x=t(38929);let k=null!=(a=s.startTransition)?a:function(e){e()};var w=t(52724),C=((n=C||{})[n.Open=0]="Open",n[n.Closed=1]="Closed",n),y=((o=y||{})[o.ToggleDisclosure=0]="ToggleDisclosure",o[o.CloseDisclosure=1]="CloseDisclosure",o[o.SetButtonId=2]="SetButtonId",o[o.SetPanelId=3]="SetPanelId",o[o.SetButtonElement=4]="SetButtonElement",o[o.SetPanelElement=5]="SetPanelElement",o);let E={0:e=>({...e,disclosureState:(0,h.E)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,r)=>e.buttonId===r.buttonId?e:{...e,buttonId:r.buttonId},3:(e,r)=>e.panelId===r.panelId?e:{...e,panelId:r.panelId},4:(e,r)=>e.buttonElement===r.element?e:{...e,buttonElement:r.element},5:(e,r)=>e.panelElement===r.element?e:{...e,panelElement:r.element}},S=(0,s.createContext)(null);function N(e){let r=(0,s.useContext)(S);if(null===r){let r=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(r,N),r}return r}S.displayName="DisclosureContext";let M=(0,s.createContext)(null);M.displayName="DisclosureAPIContext";let T=(0,s.createContext)(null);function I(e,r){return(0,h.E)(r.type,E,e,r)}T.displayName="DisclosurePanelContext";let q=s.Fragment,O=x.VN.RenderStrategy|x.VN.Static,P=Object.assign((0,x.yV)(function(e,r){let{defaultOpen:t=!1,...n}=e,o=(0,s.useRef)(null),a=(0,m.T)(r,(0,m.h)(e=>{o.current=e},void 0===e.as||e.as===s.Fragment)),l=(0,s.useReducer)(I,{disclosureState:t?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:i,buttonId:d},u]=l,p=(0,c.z)(e=>{u({type:1});let r=(0,v.r)(o);if(!r||!d)return;let t=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:r.getElementById(d):r.getElementById(d);null==t||t.focus()}),b=(0,s.useMemo)(()=>({close:p}),[p]),k=(0,s.useMemo)(()=>({open:0===i,close:p}),[i,p]),w=(0,x.L6)();return s.createElement(S.Provider,{value:l},s.createElement(M.Provider,{value:b},s.createElement(g.Z,{value:p},s.createElement(f.up,{value:(0,h.E)(i,{0:f.ZM.Open,1:f.ZM.Closed})},w({ourProps:{ref:a},theirProps:n,slot:k,defaultTag:q,name:"Disclosure"})))))}),{Button:(0,x.yV)(function(e,r){let t=(0,s.useId)(),{id:n="headlessui-disclosure-button-".concat(t),disabled:o=!1,autoFocus:a=!1,...p}=e,[g,f]=N("Disclosure.Button"),h=(0,s.useContext)(T),v=null!==h&&h===g.panelId,k=(0,s.useRef)(null),C=(0,m.T)(k,r,(0,c.z)(e=>{if(!v)return f({type:4,element:e})}));(0,s.useEffect)(()=>{if(!v)return f({type:2,buttonId:n}),()=>{f({type:2,buttonId:null})}},[n,f,v]);let y=(0,c.z)(e=>{var r;if(v){if(1===g.disclosureState)return;switch(e.key){case w.R.Space:case w.R.Enter:e.preventDefault(),e.stopPropagation(),f({type:0}),null==(r=g.buttonElement)||r.focus()}}else switch(e.key){case w.R.Space:case w.R.Enter:e.preventDefault(),e.stopPropagation(),f({type:0})}}),E=(0,c.z)(e=>{e.key===w.R.Space&&e.preventDefault()}),S=(0,c.z)(e=>{var r;(0,b.P)(e.currentTarget)||o||(v?(f({type:0}),null==(r=g.buttonElement)||r.focus()):f({type:0}))}),{isFocusVisible:M,focusProps:I}=(0,l.F)({autoFocus:a}),{isHovered:q,hoverProps:O}=(0,i.X)({isDisabled:o}),{pressed:P,pressProps:R}=(0,d.x)({disabled:o}),j=(0,s.useMemo)(()=>({open:0===g.disclosureState,hover:q,active:P,disabled:o,focus:M,autofocus:a}),[g,q,P,M,o,a]),z=(0,u.f)(e,g.buttonElement),L=v?(0,x.dG)({ref:C,type:z,disabled:o||void 0,autoFocus:a,onKeyDown:y,onClick:S},I,O,R):(0,x.dG)({ref:C,id:n,type:z,"aria-expanded":0===g.disclosureState,"aria-controls":g.panelElement?g.panelId:void 0,disabled:o||void 0,autoFocus:a,onKeyDown:y,onKeyUp:E,onClick:S},I,O,R);return(0,x.L6)()({ourProps:L,theirProps:p,slot:j,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,x.yV)(function(e,r){let t=(0,s.useId)(),{id:n="headlessui-disclosure-panel-".concat(t),transition:o=!1,...a}=e,[l,i]=N("Disclosure.Panel"),{close:d}=function e(r){let t=(0,s.useContext)(M);if(null===t){let t=Error("<".concat(r," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return t}("Disclosure.Panel"),[u,g]=(0,s.useState)(null),b=(0,m.T)(r,(0,c.z)(e=>{k(()=>i({type:5,element:e}))}),g);(0,s.useEffect)(()=>(i({type:3,panelId:n}),()=>{i({type:3,panelId:null})}),[n,i]);let h=(0,f.oJ)(),[v,w]=(0,p.Y)(o,u,null!==h?(h&f.ZM.Open)===f.ZM.Open:0===l.disclosureState),C=(0,s.useMemo)(()=>({open:0===l.disclosureState,close:d}),[l.disclosureState,d]),y={ref:b,id:n,...(0,p.X)(w)},E=(0,x.L6)();return s.createElement(f.uu,null,s.createElement(T.Provider,{value:l.panelId},E({ourProps:y,theirProps:a,slot:C,defaultTag:"div",features:O,visible:v,name:"Disclosure.Panel"})))})})},85238:function(e,r,t){"use strict";let n;t.d(r,{u:function(){return T}});var o=t(2265),a=t(59456),l=t(93980),i=t(25289),s=t(73389),d=t(43507),c=t(180),u=t(67561),m=t(98218),p=t(28294),g=t(95504),f=t(72468),b=t(38929);function h(e){var r;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(r=e.as)?r:y)!==o.Fragment||1===o.Children.count(e.children)}let v=(0,o.createContext)(null);v.displayName="TransitionContext";var x=((n=x||{}).Visible="visible",n.Hidden="hidden",n);let k=(0,o.createContext)(null);function w(e){return"children"in e?w(e.children):e.current.filter(e=>{let{el:r}=e;return null!==r.current}).filter(e=>{let{state:r}=e;return"visible"===r}).length>0}function C(e,r){let t=(0,d.E)(e),n=(0,o.useRef)([]),s=(0,i.t)(),c=(0,a.G)(),u=(0,l.z)(function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b.l4.Hidden,o=n.current.findIndex(r=>{let{el:t}=r;return t===e});-1!==o&&((0,f.E)(r,{[b.l4.Unmount](){n.current.splice(o,1)},[b.l4.Hidden](){n.current[o].state="hidden"}}),c.microTask(()=>{var e;!w(n)&&s.current&&(null==(e=t.current)||e.call(t))}))}),m=(0,l.z)(e=>{let r=n.current.find(r=>{let{el:t}=r;return t===e});return r?"visible"!==r.state&&(r.state="visible"):n.current.push({el:e,state:"visible"}),()=>u(e,b.l4.Unmount)}),p=(0,o.useRef)([]),g=(0,o.useRef)(Promise.resolve()),h=(0,o.useRef)({enter:[],leave:[]}),v=(0,l.z)((e,t,n)=>{p.current.splice(0),r&&(r.chains.current[t]=r.chains.current[t].filter(r=>{let[t]=r;return t!==e})),null==r||r.chains.current[t].push([e,new Promise(e=>{p.current.push(e)})]),null==r||r.chains.current[t].push([e,new Promise(e=>{Promise.all(h.current[t].map(e=>{let[r,t]=e;return t})).then(()=>e())})]),"enter"===t?g.current=g.current.then(()=>null==r?void 0:r.wait.current).then(()=>n(t)):n(t)}),x=(0,l.z)((e,r,t)=>{Promise.all(h.current[r].splice(0).map(e=>{let[r,t]=e;return t})).then(()=>{var e;null==(e=p.current.shift())||e()}).then(()=>t(r))});return(0,o.useMemo)(()=>({children:n,register:m,unregister:u,onStart:v,onStop:x,wait:g,chains:h}),[m,u,n,v,x,h,g])}k.displayName="NestingContext";let y=o.Fragment,E=b.VN.RenderStrategy,S=(0,b.yV)(function(e,r){let{show:t,appear:n=!1,unmount:a=!0,...i}=e,d=(0,o.useRef)(null),m=h(e),g=(0,u.T)(...m?[d,r]:null===r?[]:[r]);(0,c.H)();let f=(0,p.oJ)();if(void 0===t&&null!==f&&(t=(f&p.ZM.Open)===p.ZM.Open),void 0===t)throw Error("A is used but it is missing a `show={true | false}` prop.");let[x,y]=(0,o.useState)(t?"visible":"hidden"),S=C(()=>{t||y("hidden")}),[M,T]=(0,o.useState)(!0),I=(0,o.useRef)([t]);(0,s.e)(()=>{!1!==M&&I.current[I.current.length-1]!==t&&(I.current.push(t),T(!1))},[I,t]);let q=(0,o.useMemo)(()=>({show:t,appear:n,initial:M}),[t,n,M]);(0,s.e)(()=>{t?y("visible"):w(S)||null===d.current||y("hidden")},[t,S]);let O={unmount:a},P=(0,l.z)(()=>{var r;M&&T(!1),null==(r=e.beforeEnter)||r.call(e)}),R=(0,l.z)(()=>{var r;M&&T(!1),null==(r=e.beforeLeave)||r.call(e)}),j=(0,b.L6)();return o.createElement(k.Provider,{value:S},o.createElement(v.Provider,{value:q},j({ourProps:{...O,as:o.Fragment,children:o.createElement(N,{ref:g,...O,...i,beforeEnter:P,beforeLeave:R})},theirProps:{},defaultTag:o.Fragment,features:E,visible:"visible"===x,name:"Transition"})))}),N=(0,b.yV)(function(e,r){var t,n;let{transition:a=!0,beforeEnter:i,afterEnter:d,beforeLeave:x,afterLeave:S,enter:N,enterFrom:M,enterTo:T,entered:I,leave:q,leaveFrom:O,leaveTo:P,...R}=e,[j,z]=(0,o.useState)(null),L=(0,o.useRef)(null),Z=h(e),B=(0,u.T)(...Z?[L,r,z]:null===r?[]:[r]),D=null==(t=R.unmount)||t?b.l4.Unmount:b.l4.Hidden,{show:K,appear:_,initial:X}=function(){let e=(0,o.useContext)(v);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[Y,A]=(0,o.useState)(K?"visible":"hidden"),F=function(){let e=(0,o.useContext)(k);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:H,unregister:V}=F;(0,s.e)(()=>H(L),[H,L]),(0,s.e)(()=>{if(D===b.l4.Hidden&&L.current){if(K&&"visible"!==Y){A("visible");return}return(0,f.E)(Y,{hidden:()=>V(L),visible:()=>H(L)})}},[Y,L,H,V,K,D]);let U=(0,c.H)();(0,s.e)(()=>{if(Z&&U&&"visible"===Y&&null===L.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[L,Y,U,Z]);let W=X&&!_,J=_&&K&&X,$=(0,o.useRef)(!1),G=C(()=>{$.current||(A("hidden"),V(L))},F),Q=(0,l.z)(e=>{$.current=!0,G.onStart(L,e?"enter":"leave",e=>{"enter"===e?null==i||i():"leave"===e&&(null==x||x())})}),ee=(0,l.z)(e=>{let r=e?"enter":"leave";$.current=!1,G.onStop(L,r,e=>{"enter"===e?null==d||d():"leave"===e&&(null==S||S())}),"leave"!==r||w(G)||(A("hidden"),V(L))});(0,o.useEffect)(()=>{Z&&a||(Q(K),ee(K))},[K,Z,a]);let er=!(!a||!Z||!U||W),[,et]=(0,m.Y)(er,j,K,{start:Q,end:ee}),en=(0,b.oA)({ref:B,className:(null==(n=(0,g.A)(R.className,J&&N,J&&M,et.enter&&N,et.enter&&et.closed&&M,et.enter&&!et.closed&&T,et.leave&&q,et.leave&&!et.closed&&O,et.leave&&et.closed&&P,!et.transition&&K&&I))?void 0:n.trim())||void 0,...(0,m.X)(et)}),eo=0;"visible"===Y&&(eo|=p.ZM.Open),"hidden"===Y&&(eo|=p.ZM.Closed),et.enter&&(eo|=p.ZM.Opening),et.leave&&(eo|=p.ZM.Closing);let ea=(0,b.L6)();return o.createElement(k.Provider,{value:G},o.createElement(p.up,{value:eo},ea({ourProps:en,theirProps:R,defaultTag:y,features:E,visible:"visible"===Y,name:"Transition.Child"})))}),M=(0,b.yV)(function(e,r){let t=null!==(0,o.useContext)(v),n=null!==(0,p.oJ)();return o.createElement(o.Fragment,null,!t&&n?o.createElement(S,{ref:r,...e}):o.createElement(N,{ref:r,...e}))}),T=Object.assign(S,{Child:M,Root:S})},33443:function(e,r,t){"use strict";t.d(r,{Z:function(){return a}});var n=t(2265);let o=(0,n.createContext)(()=>{});function a(e){let{value:r,children:t}=e;return n.createElement(o.Provider,{value:r},t)}},61994:function(e,r,t){"use strict";function n(){for(var e,r,t=0,n="",o=arguments.length;t{let t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t}))}catch(e){return atob(r)}}(a)}catch(e){throw new n(`Invalid token specified: invalid base64 for part #${o+1} (${e.message})`)}try{return JSON.parse(t)}catch(e){throw new n(`Invalid token specified: invalid json for part #${o+1} (${e.message})`)}}n.prototype.name="InvalidTokenError"}}]);
\ No newline at end of file
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7187],{58747:function(e,r,t){"use strict";t.d(r,{Z:function(){return a}});var n=t(5853),o=t(2265);let a=e=>{var r=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},r),o.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"}))}},4537:function(e,r,t){"use strict";t.d(r,{Z:function(){return a}});var n=t(5853),o=t(2265);let a=e=>{var r=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},r),o.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))}},41649:function(e,r,t){"use strict";t.d(r,{Z:function(){return p}});var n=t(5853),o=t(2265),a=t(47187),l=t(7084),i=t(26898),s=t(13241),d=t(1153);let c={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},u={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},m=(0,d.fn)("Badge"),p=o.forwardRef((e,r)=>{let{color:t,icon:p,size:g=l.u8.SM,tooltip:f,className:b,children:h}=e,v=(0,n._T)(e,["color","icon","size","tooltip","className","children"]),x=p||null,{tooltipProps:k,getReferenceProps:w}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,d.lq)([r,k.refs.setReference]),className:(0,s.q)(m("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",t?(0,s.q)((0,d.bM)(t,i.K.background).bgColor,(0,d.bM)(t,i.K.iconText).textColor,(0,d.bM)(t,i.K.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,s.q)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),c[g].paddingX,c[g].paddingY,c[g].fontSize,b)},w,v),o.createElement(a.Z,Object.assign({text:f},k)),x?o.createElement(x,{className:(0,s.q)(m("icon"),"shrink-0 -ml-1 mr-1.5",u[g].height,u[g].width)}):null,o.createElement("span",{className:(0,s.q)(m("text"),"whitespace-nowrap")},h))});p.displayName="Badge"},47323:function(e,r,t){"use strict";t.d(r,{Z:function(){return f}});var n=t(5853),o=t(2265),a=t(47187),l=t(7084),i=t(13241),s=t(1153),d=t(26898);let c={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},u={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},p=(e,r)=>{switch(e){case"simple":return{textColor:r?(0,s.bM)(r,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:r?(0,s.bM)(r,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,i.q)((0,s.bM)(r,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:r?(0,s.bM)(r,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,i.q)((0,s.bM)(r,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:r?(0,s.bM)(r,d.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:r?(0,i.q)((0,s.bM)(r,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:r?(0,s.bM)(r,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,i.q)((0,s.bM)(r,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:r?(0,s.bM)(r,d.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:r?(0,i.q)((0,s.bM)(r,d.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},g=(0,s.fn)("Icon"),f=o.forwardRef((e,r)=>{let{icon:t,variant:d="simple",tooltip:f,size:b=l.u8.SM,color:h,className:v}=e,x=(0,n._T)(e,["icon","variant","tooltip","size","color","className"]),k=p(d,h),{tooltipProps:w,getReferenceProps:C}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,s.lq)([r,w.refs.setReference]),className:(0,i.q)(g("root"),"inline-flex shrink-0 items-center justify-center",k.bgColor,k.textColor,k.borderColor,k.ringColor,m[d].rounded,m[d].border,m[d].shadow,m[d].ring,c[b].paddingX,c[b].paddingY,v)},C,x),o.createElement(a.Z,Object.assign({text:f},w)),o.createElement(t,{className:(0,i.q)(g("icon"),"shrink-0",u[b].height,u[b].width)}))});f.displayName="Icon"},78489:function(e,r,t){"use strict";t.d(r,{Z:function(){return E}});var n=t(5853),o=t(47187),a=t(2265);let l=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],i=e=>({_s:e,status:l[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),s=e=>e?6:5,d=(e,r)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return s(r)}},c=e=>"object"==typeof e?[e.enter,e.exit]:[e,e],u=(e,r)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(r+1)},0),m=(e,r,t,n,o)=>{clearTimeout(n.current);let a=i(e);r(a),t.current=a,o&&o({current:a})},p=({enter:e=!0,exit:r=!0,preEnter:t,preExit:n,timeout:o,initialEntered:l,mountOnEnter:p,unmountOnExit:g,onStateChange:f}={})=>{let[b,h]=(0,a.useState)(()=>i(l?2:s(p))),v=(0,a.useRef)(b),x=(0,a.useRef)(),[k,w]=c(o),C=(0,a.useCallback)(()=>{let e=d(v.current._s,g);e&&m(e,h,v,x,f)},[f,g]);return[b,(0,a.useCallback)(o=>{let a=e=>{switch(m(e,h,v,x,f),e){case 1:k>=0&&(x.current=setTimeout(C,k));break;case 4:w>=0&&(x.current=setTimeout(C,w));break;case 0:case 3:x.current=u(a,e)}},l=v.current.isEnter;"boolean"!=typeof o&&(o=!l),o?l||a(e?t?0:1:2):l&&a(r?n?3:4:s(g))},[C,f,e,r,t,n,k,w,g]),C]};var g=t(7084),f=t(13241),b=t(1153);let h=e=>{var r=(0,n._T)(e,[]);return a.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.createElement("path",{d:"M18.364 5.636L16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364z"}))};var v=t(26898);let x={xs:{height:"h-4",width:"w-4"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-6",width:"w-6"},xl:{height:"h-6",width:"w-6"}},k=e=>"light"!==e?{xs:{paddingX:"px-2.5",paddingY:"py-1.5",fontSize:"text-xs"},sm:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-sm"},md:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-md"},lg:{paddingX:"px-4",paddingY:"py-2.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-3",fontSize:"text-xl"}}:{xs:{paddingX:"",paddingY:"",fontSize:"text-xs"},sm:{paddingX:"",paddingY:"",fontSize:"text-sm"},md:{paddingX:"",paddingY:"",fontSize:"text-md"},lg:{paddingX:"",paddingY:"",fontSize:"text-lg"},xl:{paddingX:"",paddingY:"",fontSize:"text-xl"}},w=(e,r)=>{switch(e){case"primary":return{textColor:r?(0,b.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:r?(0,b.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:r?(0,b.bM)(r,v.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:r?(0,b.bM)(r,v.K.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:r?(0,b.bM)(r,v.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:r?(0,b.bM)(r,v.K.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:r?(0,b.bM)(r,v.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:r?(0,b.bM)(r,v.K.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,b.bM)("transparent").bgColor,hoverBgColor:r?(0,f.q)((0,b.bM)(r,v.K.background).hoverBgColor,"hover:bg-opacity-20 dark:hover:bg-opacity-20"):"hover:bg-tremor-brand-faint dark:hover:bg-dark-tremor-brand-faint",borderColor:r?(0,b.bM)(r,v.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:r?(0,b.bM)(r,v.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:r?(0,b.bM)(r,v.K.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,b.bM)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},C=(0,b.fn)("Button"),y=e=>{let{loading:r,iconSize:t,iconPosition:n,Icon:o,needMargin:l,transitionStatus:i}=e,s=l?n===g.zS.Left?(0,f.q)("-ml-1","mr-1.5"):(0,f.q)("-mr-1","ml-1.5"):"",d=(0,f.q)("w-0 h-0"),c={default:d,entering:d,entered:t,exiting:t,exited:d};return r?a.createElement(h,{className:(0,f.q)(C("icon"),"animate-spin shrink-0",s,c.default,c[i]),style:{transition:"width 150ms"}}):a.createElement(o,{className:(0,f.q)(C("icon"),"shrink-0",t,s)})},E=a.forwardRef((e,r)=>{let{icon:t,iconPosition:l=g.zS.Left,size:i=g.u8.SM,color:s,variant:d="primary",disabled:c,loading:u=!1,loadingText:m,children:h,tooltip:v,className:E}=e,S=(0,n._T)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),N=u||c,M=void 0!==t||u,T=u&&m,q=!(!h&&!T),O=(0,f.q)(x[i].height,x[i].width),P="light"!==d?(0,f.q)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",z=w(d,s),R=k(d)[i],{tooltipProps:j,getReferenceProps:I}=(0,o.l)(300),[L,Z]=p({timeout:50});return(0,a.useEffect)(()=>{Z(u)},[u]),a.createElement("button",Object.assign({ref:(0,b.lq)([r,j.refs.setReference]),className:(0,f.q)(C("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",P,R.paddingX,R.paddingY,R.fontSize,z.textColor,z.bgColor,z.borderColor,z.hoverBorderColor,N?"opacity-50 cursor-not-allowed":(0,f.q)(w(d,s).hoverTextColor,w(d,s).hoverBgColor,w(d,s).hoverBorderColor),E),disabled:N},I,S),a.createElement(o.Z,Object.assign({text:v},j)),M&&l!==g.zS.Right?a.createElement(y,{loading:u,iconSize:O,iconPosition:l,Icon:t,transitionStatus:L.status,needMargin:q}):null,T||h?a.createElement("span",{className:(0,f.q)(C("text"),"text-tremor-default whitespace-nowrap")},T?m:h):null,M&&l===g.zS.Right?a.createElement(y,{loading:u,iconSize:O,iconPosition:l,Icon:t,transitionStatus:L.status,needMargin:q}):null)});E.displayName="Button"},30150:function(e,r,t){"use strict";t.d(r,{Z:function(){return m}});var n=t(5853),o=t(2265);let a=e=>{var r=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),o.createElement("path",{d:"M12 4v16m8-8H4"}))},l=e=>{var r=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5"}),o.createElement("path",{d:"M20 12H4"}))};var i=t(13241),s=t(1153),d=t(69262);let c="flex mx-auto text-tremor-content-subtle dark:text-dark-tremor-content-subtle",u="cursor-pointer hover:text-tremor-content dark:hover:text-dark-tremor-content",m=o.forwardRef((e,r)=>{let{onSubmit:t,enableStepper:m=!0,disabled:p,onValueChange:g,onChange:f}=e,b=(0,n._T)(e,["onSubmit","enableStepper","disabled","onValueChange","onChange"]),h=(0,o.useRef)(null),[v,x]=o.useState(!1),k=o.useCallback(()=>{x(!0)},[]),w=o.useCallback(()=>{x(!1)},[]),[C,y]=o.useState(!1),E=o.useCallback(()=>{y(!0)},[]),S=o.useCallback(()=>{y(!1)},[]);return o.createElement(d.Z,Object.assign({type:"number",ref:(0,s.lq)([h,r]),disabled:p,makeInputClassName:(0,s.fn)("NumberInput"),onKeyDown:e=>{var r;if("Enter"===e.key&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){let e=null===(r=h.current)||void 0===r?void 0:r.value;null==t||t(parseFloat(null!=e?e:""))}"ArrowDown"===e.key&&k(),"ArrowUp"===e.key&&E()},onKeyUp:e=>{"ArrowDown"===e.key&&w(),"ArrowUp"===e.key&&S()},onChange:e=>{p||(null==g||g(parseFloat(e.target.value)),null==f||f(e))},stepper:m?o.createElement("div",{className:(0,i.q)("flex justify-center align-middle")},o.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,r;p||(null===(e=h.current)||void 0===e||e.stepDown(),null===(r=h.current)||void 0===r||r.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.q)(!p&&u,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},o.createElement(l,{"data-testid":"step-down",className:(v?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"})),o.createElement("div",{tabIndex:-1,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onTouchStart:e=>{e.cancelable&&e.preventDefault()},onMouseUp:()=>{var e,r;p||(null===(e=h.current)||void 0===e||e.stepUp(),null===(r=h.current)||void 0===r||r.dispatchEvent(new Event("input",{bubbles:!0})))},className:(0,i.q)(!p&&u,c,"group py-[10px] px-2.5 border-l border-tremor-border dark:border-dark-tremor-border")},o.createElement(a,{"data-testid":"step-up",className:(C?"scale-95":"")+" h-4 w-4 duration-75 transition group-active:scale-95"}))):null},b))});m.displayName="NumberInput"},27281:function(e,r,t){"use strict";t.d(r,{Z:function(){return g}});var n=t(5853),o=t(58747),a=t(2265),l=t(4537),i=t(13241),s=t(1153),d=t(96398),c=t(51975),u=t(85238),m=t(44140);let p=(0,s.fn)("Select"),g=a.forwardRef((e,r)=>{let{defaultValue:t="",value:s,onValueChange:g,placeholder:f="Select...",disabled:b=!1,icon:h,enableClear:v=!1,required:x,children:k,name:w,error:C=!1,errorMessage:y,className:E,id:S}=e,N=(0,n._T)(e,["defaultValue","value","onValueChange","placeholder","disabled","icon","enableClear","required","children","name","error","errorMessage","className","id"]),M=(0,a.useRef)(null),T=a.Children.toArray(k),[q,O]=(0,m.Z)(t,s),P=(0,a.useMemo)(()=>{let e=a.Children.toArray(k).filter(a.isValidElement);return(0,d.sl)(e)},[k]);return a.createElement("div",{className:(0,i.q)("w-full min-w-[10rem] text-tremor-default",E)},a.createElement("div",{className:"relative"},a.createElement("select",{title:"select-hidden",required:x,className:(0,i.q)("h-full w-full absolute left-0 top-0 -z-10 opacity-0"),value:q,onChange:e=>{e.preventDefault()},name:w,disabled:b,id:S,onFocus:()=>{let e=M.current;e&&e.focus()}},a.createElement("option",{className:"hidden",value:"",disabled:!0,hidden:!0},f),T.map(e=>{let r=e.props.value,t=e.props.children;return a.createElement("option",{className:"hidden",key:r,value:r},t)})),a.createElement(c.Ri,Object.assign({as:"div",ref:r,defaultValue:q,value:q,onChange:e=>{null==g||g(e),O(e)},disabled:b,id:S},N),e=>{var r;let{value:t}=e;return a.createElement(a.Fragment,null,a.createElement(c.Y4,{ref:M,className:(0,i.q)("w-full outline-none text-left whitespace-nowrap truncate rounded-tremor-default focus:ring-2 transition duration-100 border pr-8 py-2","border-tremor-border shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:border-dark-tremor-border dark:shadow-dark-tremor-input dark:focus:border-dark-tremor-brand-subtle dark:focus:ring-dark-tremor-brand-muted",h?"pl-10":"pl-3",(0,d.um)((0,d.Uh)(t),b,C))},h&&a.createElement("span",{className:(0,i.q)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},a.createElement(h,{className:(0,i.q)(p("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),a.createElement("span",{className:"w-[90%] block truncate"},t&&null!==(r=P.get(t))&&void 0!==r?r:f),a.createElement("span",{className:(0,i.q)("absolute inset-y-0 right-0 flex items-center mr-3")},a.createElement(o.Z,{className:(0,i.q)(p("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),v&&q?a.createElement("button",{type:"button",className:(0,i.q)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),O(""),null==g||g("")}},a.createElement(l.Z,{className:(0,i.q)(p("clearIcon"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,a.createElement(u.u,{enter:"transition ease duration-100 transform",enterFrom:"opacity-0 -translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"transition ease duration-100 transform",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-4"},a.createElement(c.O_,{anchor:"bottom start",className:(0,i.q)("z-10 w-[var(--button-width)] divide-y overflow-y-auto outline-none rounded-tremor-default max-h-[228px] border [--anchor-gap:4px]","bg-tremor-background border-tremor-border divide-tremor-border shadow-tremor-dropdown","dark:bg-dark-tremor-background dark:border-dark-tremor-border dark:divide-dark-tremor-border dark:shadow-dark-tremor-dropdown")},k)))})),C&&y?a.createElement("p",{className:(0,i.q)("errorMessage","text-sm text-rose-500 mt-1")},y):null)});g.displayName="Select"},87452:function(e,r,t){"use strict";t.d(r,{Z:function(){return u},r:function(){return c}});var n=t(5853),o=t(91054);t(42698),t(64016);var a=t(8710);t(33232);var l=t(13241),i=t(1153),s=t(2265);let d=(0,i.fn)("Accordion"),c=(0,s.createContext)({isOpen:!1}),u=s.forwardRef((e,r)=>{var t;let{defaultOpen:i=!1,children:u,className:m}=e,p=(0,n._T)(e,["defaultOpen","children","className"]),g=null!==(t=(0,s.useContext)(a.Z))&&void 0!==t?t:(0,l.q)("rounded-tremor-default border");return s.createElement(o.pJ,Object.assign({as:"div",ref:r,className:(0,l.q)(d("root"),"overflow-hidden","bg-tremor-background border-tremor-border","dark:bg-dark-tremor-background dark:border-dark-tremor-border",g,m),defaultOpen:i},p),e=>{let{open:r}=e;return s.createElement(c.Provider,{value:{isOpen:r}},u)})});u.displayName="Accordion"},88829:function(e,r,t){"use strict";t.d(r,{Z:function(){return s}});var n=t(5853),o=t(2265),a=t(91054),l=t(13241);let i=(0,t(1153).fn)("AccordionBody"),s=o.forwardRef((e,r)=>{let{children:t,className:s}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(a.pJ.Panel,Object.assign({ref:r,className:(0,l.q)(i("root"),"w-full text-tremor-default px-4 pb-3","text-tremor-content","dark:text-dark-tremor-content",s)},d),t)});s.displayName="AccordionBody"},72208:function(e,r,t){"use strict";t.d(r,{Z:function(){return c}});var n=t(5853),o=t(2265),a=t(91054);let l=e=>{var r=(0,n._T)(e,[]);return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},r),o.createElement("path",{d:"M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z"}))};var i=t(87452),s=t(13241);let d=(0,t(1153).fn)("AccordionHeader"),c=o.forwardRef((e,r)=>{let{children:t,className:c}=e,u=(0,n._T)(e,["children","className"]),{isOpen:m}=(0,o.useContext)(i.r);return o.createElement(a.pJ.Button,Object.assign({ref:r,className:(0,s.q)(d("root"),"w-full flex items-center justify-between px-4 py-3","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis",c)},u),o.createElement("div",{className:(0,s.q)(d("children"),"flex flex-1 text-inherit mr-4")},t),o.createElement("div",null,o.createElement(l,{className:(0,s.q)(d("arrowIcon"),"h-5 w-5 -mr-1","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle",m?"transition-all":"transition-all -rotate-180")})))});c.displayName="AccordionHeader"},12514:function(e,r,t){"use strict";t.d(r,{Z:function(){return u}});var n=t(5853),o=t(2265),a=t(7084),l=t(26898),i=t(13241),s=t(1153);let d=(0,s.fn)("Card"),c=e=>{if(!e)return"";switch(e){case a.zS.Left:return"border-l-4";case a.m.Top:return"border-t-4";case a.zS.Right:return"border-r-4";case a.m.Bottom:return"border-b-4";default:return""}},u=o.forwardRef((e,r)=>{let{decoration:t="",decorationColor:a,children:u,className:m}=e,p=(0,n._T)(e,["decoration","decorationColor","children","className"]);return o.createElement("div",Object.assign({ref:r,className:(0,i.q)(d("root"),"relative w-full text-left ring-1 rounded-tremor-default p-6","bg-tremor-background ring-tremor-ring shadow-tremor-card","dark:bg-dark-tremor-background dark:ring-dark-tremor-ring dark:shadow-dark-tremor-card",a?(0,s.bM)(a,l.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",c(t),m)},p),u)});u.displayName="Card"},67101:function(e,r,t){"use strict";t.d(r,{Z:function(){return c}});var n=t(5853),o=t(13241),a=t(1153),l=t(2265),i=t(9496);let s=(0,a.fn)("Grid"),d=(e,r)=>e&&Object.keys(r).includes(String(e))?r[e]:"",c=l.forwardRef((e,r)=>{let{numItems:t=1,numItemsSm:a,numItemsMd:c,numItemsLg:u,children:m,className:p}=e,g=(0,n._T)(e,["numItems","numItemsSm","numItemsMd","numItemsLg","children","className"]),f=d(t,i._m),b=d(a,i.LH),h=d(c,i.l5),v=d(u,i.N4),x=(0,o.q)(f,b,h,v);return l.createElement("div",Object.assign({ref:r,className:(0,o.q)(s("root"),"grid",x,p)},g),m)});c.displayName="Grid"},9496:function(e,r,t){"use strict";t.d(r,{LH:function(){return o},N4:function(){return l},PT:function(){return i},SP:function(){return s},VS:function(){return d},_m:function(){return n},_w:function(){return c},l5:function(){return a}});let n={0:"grid-cols-none",1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},o={0:"sm:grid-cols-none",1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},a={0:"md:grid-cols-none",1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},l={0:"lg:grid-cols-none",1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},i={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",13:"col-span-13"},s={1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",13:"sm:col-span-13"},d={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",13:"md:col-span-13"},c={1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",13:"lg:col-span-13"}},84264:function(e,r,t){"use strict";t.d(r,{Z:function(){return i}});var n=t(26898),o=t(13241),a=t(1153),l=t(2265);let i=l.forwardRef((e,r)=>{let{color:t,className:i,children:s}=e;return l.createElement("p",{ref:r,className:(0,o.q)("text-tremor-default",t?(0,a.bM)(t,n.K.text).textColor:(0,o.q)("text-tremor-content","dark:text-dark-tremor-content"),i)},s)});i.displayName="Text"},23910:function(e,r,t){var n=t(74288).Symbol;e.exports=n},54506:function(e,r,t){var n=t(23910),o=t(4479),a=t(80910),l=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":l&&l in Object(e)?o(e):a(e)}},55041:function(e,r,t){var n=t(5035),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},17071:function(e,r,t){var n="object"==typeof t.g&&t.g&&t.g.Object===Object&&t.g;e.exports=n},4479:function(e,r,t){var n=t(23910),o=Object.prototype,a=o.hasOwnProperty,l=o.toString,i=n?n.toStringTag:void 0;e.exports=function(e){var r=a.call(e,i),t=e[i];try{e[i]=void 0;var n=!0}catch(e){}var o=l.call(e);return n&&(r?e[i]=t:delete e[i]),o}},80910:function(e){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},74288:function(e,r,t){var n=t(17071),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},5035:function(e){var r=/\s/;e.exports=function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}},7310:function(e,r,t){var n=t(28302),o=t(11121),a=t(6660),l=Math.max,i=Math.min;e.exports=function(e,r,t){var s,d,c,u,m,p,g=0,f=!1,b=!1,h=!0;if("function"!=typeof e)throw TypeError("Expected a function");function v(r){var t=s,n=d;return s=d=void 0,g=r,u=e.apply(n,t)}function x(e){var t=e-p,n=e-g;return void 0===p||t>=r||t<0||b&&n>=c}function k(){var e,t,n,a=o();if(x(a))return w(a);m=setTimeout(k,(e=a-p,t=a-g,n=r-e,b?i(n,c-t):n))}function w(e){return(m=void 0,h&&s)?v(e):(s=d=void 0,u)}function C(){var e,t=o(),n=x(t);if(s=arguments,d=this,p=t,n){if(void 0===m)return g=e=p,m=setTimeout(k,r),f?v(e):u;if(b)return clearTimeout(m),m=setTimeout(k,r),v(p)}return void 0===m&&(m=setTimeout(k,r)),u}return r=a(r)||0,n(t)&&(f=!!t.leading,c=(b="maxWait"in t)?l(a(t.maxWait)||0,r):c,h="trailing"in t?!!t.trailing:h),C.cancel=function(){void 0!==m&&clearTimeout(m),g=0,s=p=d=m=void 0},C.flush=function(){return void 0===m?u:w(o())},C}},28302:function(e){e.exports=function(e){var r=typeof e;return null!=e&&("object"==r||"function"==r)}},10303:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},78371:function(e,r,t){var n=t(54506),o=t(10303);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},11121:function(e,r,t){var n=t(74288);e.exports=function(){return n.Date.now()}},6660:function(e,r,t){var n=t(55041),o=t(28302),a=t(78371),l=0/0,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return l;if(o(e)){var r="function"==typeof e.valueOf?e.valueOf():e;e=o(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var t=s.test(e);return t||d.test(e)?c(e.slice(2),t?2:8):i.test(e)?l:+e}},44643:function(e,r,t){"use strict";var n=t(2265);let o=n.forwardRef(function(e,r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))});r.Z=o},51853:function(e,r,t){"use strict";var n=t(2265);let o=n.forwardRef(function(e,r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});r.Z=o},23628:function(e,r,t){"use strict";var n=t(2265);let o=n.forwardRef(function(e,r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});r.Z=o},71157:function(e,r,t){"use strict";var n=t(2265);let o=n.forwardRef(function(e,r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))});r.Z=o},91054:function(e,r,t){"use strict";let n,o;t.d(r,{pJ:function(){return z}});var a,l=t(71049),i=t(11323),s=t(2265),d=t(66797),c=t(93980),u=t(65573),m=t(67561),p=t(98218),g=t(33443),f=t(28294),b=t(31370),h=t(72468),v=t(5664),x=t(38929);let k=null!=(a=s.startTransition)?a:function(e){e()};var w=t(52724),C=((n=C||{})[n.Open=0]="Open",n[n.Closed=1]="Closed",n),y=((o=y||{})[o.ToggleDisclosure=0]="ToggleDisclosure",o[o.CloseDisclosure=1]="CloseDisclosure",o[o.SetButtonId=2]="SetButtonId",o[o.SetPanelId=3]="SetPanelId",o[o.SetButtonElement=4]="SetButtonElement",o[o.SetPanelElement=5]="SetPanelElement",o);let E={0:e=>({...e,disclosureState:(0,h.E)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},2:(e,r)=>e.buttonId===r.buttonId?e:{...e,buttonId:r.buttonId},3:(e,r)=>e.panelId===r.panelId?e:{...e,panelId:r.panelId},4:(e,r)=>e.buttonElement===r.element?e:{...e,buttonElement:r.element},5:(e,r)=>e.panelElement===r.element?e:{...e,panelElement:r.element}},S=(0,s.createContext)(null);function N(e){let r=(0,s.useContext)(S);if(null===r){let r=Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(r,N),r}return r}S.displayName="DisclosureContext";let M=(0,s.createContext)(null);M.displayName="DisclosureAPIContext";let T=(0,s.createContext)(null);function q(e,r){return(0,h.E)(r.type,E,e,r)}T.displayName="DisclosurePanelContext";let O=s.Fragment,P=x.VN.RenderStrategy|x.VN.Static,z=Object.assign((0,x.yV)(function(e,r){let{defaultOpen:t=!1,...n}=e,o=(0,s.useRef)(null),a=(0,m.T)(r,(0,m.h)(e=>{o.current=e},void 0===e.as||e.as===s.Fragment)),l=(0,s.useReducer)(q,{disclosureState:t?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:i,buttonId:d},u]=l,p=(0,c.z)(e=>{u({type:1});let r=(0,v.r)(o);if(!r||!d)return;let t=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:r.getElementById(d):r.getElementById(d);null==t||t.focus()}),b=(0,s.useMemo)(()=>({close:p}),[p]),k=(0,s.useMemo)(()=>({open:0===i,close:p}),[i,p]),w=(0,x.L6)();return s.createElement(S.Provider,{value:l},s.createElement(M.Provider,{value:b},s.createElement(g.Z,{value:p},s.createElement(f.up,{value:(0,h.E)(i,{0:f.ZM.Open,1:f.ZM.Closed})},w({ourProps:{ref:a},theirProps:n,slot:k,defaultTag:O,name:"Disclosure"})))))}),{Button:(0,x.yV)(function(e,r){let t=(0,s.useId)(),{id:n="headlessui-disclosure-button-".concat(t),disabled:o=!1,autoFocus:a=!1,...p}=e,[g,f]=N("Disclosure.Button"),h=(0,s.useContext)(T),v=null!==h&&h===g.panelId,k=(0,s.useRef)(null),C=(0,m.T)(k,r,(0,c.z)(e=>{if(!v)return f({type:4,element:e})}));(0,s.useEffect)(()=>{if(!v)return f({type:2,buttonId:n}),()=>{f({type:2,buttonId:null})}},[n,f,v]);let y=(0,c.z)(e=>{var r;if(v){if(1===g.disclosureState)return;switch(e.key){case w.R.Space:case w.R.Enter:e.preventDefault(),e.stopPropagation(),f({type:0}),null==(r=g.buttonElement)||r.focus()}}else switch(e.key){case w.R.Space:case w.R.Enter:e.preventDefault(),e.stopPropagation(),f({type:0})}}),E=(0,c.z)(e=>{e.key===w.R.Space&&e.preventDefault()}),S=(0,c.z)(e=>{var r;(0,b.P)(e.currentTarget)||o||(v?(f({type:0}),null==(r=g.buttonElement)||r.focus()):f({type:0}))}),{isFocusVisible:M,focusProps:q}=(0,l.F)({autoFocus:a}),{isHovered:O,hoverProps:P}=(0,i.X)({isDisabled:o}),{pressed:z,pressProps:R}=(0,d.x)({disabled:o}),j=(0,s.useMemo)(()=>({open:0===g.disclosureState,hover:O,active:z,disabled:o,focus:M,autofocus:a}),[g,O,z,M,o,a]),I=(0,u.f)(e,g.buttonElement),L=v?(0,x.dG)({ref:C,type:I,disabled:o||void 0,autoFocus:a,onKeyDown:y,onClick:S},q,P,R):(0,x.dG)({ref:C,id:n,type:I,"aria-expanded":0===g.disclosureState,"aria-controls":g.panelElement?g.panelId:void 0,disabled:o||void 0,autoFocus:a,onKeyDown:y,onKeyUp:E,onClick:S},q,P,R);return(0,x.L6)()({ourProps:L,theirProps:p,slot:j,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,x.yV)(function(e,r){let t=(0,s.useId)(),{id:n="headlessui-disclosure-panel-".concat(t),transition:o=!1,...a}=e,[l,i]=N("Disclosure.Panel"),{close:d}=function e(r){let t=(0,s.useContext)(M);if(null===t){let t=Error("<".concat(r," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return t}("Disclosure.Panel"),[u,g]=(0,s.useState)(null),b=(0,m.T)(r,(0,c.z)(e=>{k(()=>i({type:5,element:e}))}),g);(0,s.useEffect)(()=>(i({type:3,panelId:n}),()=>{i({type:3,panelId:null})}),[n,i]);let h=(0,f.oJ)(),[v,w]=(0,p.Y)(o,u,null!==h?(h&f.ZM.Open)===f.ZM.Open:0===l.disclosureState),C=(0,s.useMemo)(()=>({open:0===l.disclosureState,close:d}),[l.disclosureState,d]),y={ref:b,id:n,...(0,p.X)(w)},E=(0,x.L6)();return s.createElement(f.uu,null,s.createElement(T.Provider,{value:l.panelId},E({ourProps:y,theirProps:a,slot:C,defaultTag:"div",features:P,visible:v,name:"Disclosure.Panel"})))})})},85238:function(e,r,t){"use strict";let n;t.d(r,{u:function(){return T}});var o=t(2265),a=t(59456),l=t(93980),i=t(25289),s=t(73389),d=t(43507),c=t(180),u=t(67561),m=t(98218),p=t(28294),g=t(95504),f=t(72468),b=t(38929);function h(e){var r;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(r=e.as)?r:y)!==o.Fragment||1===o.Children.count(e.children)}let v=(0,o.createContext)(null);v.displayName="TransitionContext";var x=((n=x||{}).Visible="visible",n.Hidden="hidden",n);let k=(0,o.createContext)(null);function w(e){return"children"in e?w(e.children):e.current.filter(e=>{let{el:r}=e;return null!==r.current}).filter(e=>{let{state:r}=e;return"visible"===r}).length>0}function C(e,r){let t=(0,d.E)(e),n=(0,o.useRef)([]),s=(0,i.t)(),c=(0,a.G)(),u=(0,l.z)(function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b.l4.Hidden,o=n.current.findIndex(r=>{let{el:t}=r;return t===e});-1!==o&&((0,f.E)(r,{[b.l4.Unmount](){n.current.splice(o,1)},[b.l4.Hidden](){n.current[o].state="hidden"}}),c.microTask(()=>{var e;!w(n)&&s.current&&(null==(e=t.current)||e.call(t))}))}),m=(0,l.z)(e=>{let r=n.current.find(r=>{let{el:t}=r;return t===e});return r?"visible"!==r.state&&(r.state="visible"):n.current.push({el:e,state:"visible"}),()=>u(e,b.l4.Unmount)}),p=(0,o.useRef)([]),g=(0,o.useRef)(Promise.resolve()),h=(0,o.useRef)({enter:[],leave:[]}),v=(0,l.z)((e,t,n)=>{p.current.splice(0),r&&(r.chains.current[t]=r.chains.current[t].filter(r=>{let[t]=r;return t!==e})),null==r||r.chains.current[t].push([e,new Promise(e=>{p.current.push(e)})]),null==r||r.chains.current[t].push([e,new Promise(e=>{Promise.all(h.current[t].map(e=>{let[r,t]=e;return t})).then(()=>e())})]),"enter"===t?g.current=g.current.then(()=>null==r?void 0:r.wait.current).then(()=>n(t)):n(t)}),x=(0,l.z)((e,r,t)=>{Promise.all(h.current[r].splice(0).map(e=>{let[r,t]=e;return t})).then(()=>{var e;null==(e=p.current.shift())||e()}).then(()=>t(r))});return(0,o.useMemo)(()=>({children:n,register:m,unregister:u,onStart:v,onStop:x,wait:g,chains:h}),[m,u,n,v,x,h,g])}k.displayName="NestingContext";let y=o.Fragment,E=b.VN.RenderStrategy,S=(0,b.yV)(function(e,r){let{show:t,appear:n=!1,unmount:a=!0,...i}=e,d=(0,o.useRef)(null),m=h(e),g=(0,u.T)(...m?[d,r]:null===r?[]:[r]);(0,c.H)();let f=(0,p.oJ)();if(void 0===t&&null!==f&&(t=(f&p.ZM.Open)===p.ZM.Open),void 0===t)throw Error("A is used but it is missing a `show={true | false}` prop.");let[x,y]=(0,o.useState)(t?"visible":"hidden"),S=C(()=>{t||y("hidden")}),[M,T]=(0,o.useState)(!0),q=(0,o.useRef)([t]);(0,s.e)(()=>{!1!==M&&q.current[q.current.length-1]!==t&&(q.current.push(t),T(!1))},[q,t]);let O=(0,o.useMemo)(()=>({show:t,appear:n,initial:M}),[t,n,M]);(0,s.e)(()=>{t?y("visible"):w(S)||null===d.current||y("hidden")},[t,S]);let P={unmount:a},z=(0,l.z)(()=>{var r;M&&T(!1),null==(r=e.beforeEnter)||r.call(e)}),R=(0,l.z)(()=>{var r;M&&T(!1),null==(r=e.beforeLeave)||r.call(e)}),j=(0,b.L6)();return o.createElement(k.Provider,{value:S},o.createElement(v.Provider,{value:O},j({ourProps:{...P,as:o.Fragment,children:o.createElement(N,{ref:g,...P,...i,beforeEnter:z,beforeLeave:R})},theirProps:{},defaultTag:o.Fragment,features:E,visible:"visible"===x,name:"Transition"})))}),N=(0,b.yV)(function(e,r){var t,n;let{transition:a=!0,beforeEnter:i,afterEnter:d,beforeLeave:x,afterLeave:S,enter:N,enterFrom:M,enterTo:T,entered:q,leave:O,leaveFrom:P,leaveTo:z,...R}=e,[j,I]=(0,o.useState)(null),L=(0,o.useRef)(null),Z=h(e),B=(0,u.T)(...Z?[L,r,I]:null===r?[]:[r]),D=null==(t=R.unmount)||t?b.l4.Unmount:b.l4.Hidden,{show:K,appear:X,initial:Y}=function(){let e=(0,o.useContext)(v);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[_,F]=(0,o.useState)(K?"visible":"hidden"),A=function(){let e=(0,o.useContext)(k);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:H,unregister:V}=A;(0,s.e)(()=>H(L),[H,L]),(0,s.e)(()=>{if(D===b.l4.Hidden&&L.current){if(K&&"visible"!==_){F("visible");return}return(0,f.E)(_,{hidden:()=>V(L),visible:()=>H(L)})}},[_,L,H,V,K,D]);let U=(0,c.H)();(0,s.e)(()=>{if(Z&&U&&"visible"===_&&null===L.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[L,_,U,Z]);let W=Y&&!X,J=X&&K&&Y,G=(0,o.useRef)(!1),$=C(()=>{G.current||(F("hidden"),V(L))},A),Q=(0,l.z)(e=>{G.current=!0,$.onStart(L,e?"enter":"leave",e=>{"enter"===e?null==i||i():"leave"===e&&(null==x||x())})}),ee=(0,l.z)(e=>{let r=e?"enter":"leave";G.current=!1,$.onStop(L,r,e=>{"enter"===e?null==d||d():"leave"===e&&(null==S||S())}),"leave"!==r||w($)||(F("hidden"),V(L))});(0,o.useEffect)(()=>{Z&&a||(Q(K),ee(K))},[K,Z,a]);let er=!(!a||!Z||!U||W),[,et]=(0,m.Y)(er,j,K,{start:Q,end:ee}),en=(0,b.oA)({ref:B,className:(null==(n=(0,g.A)(R.className,J&&N,J&&M,et.enter&&N,et.enter&&et.closed&&M,et.enter&&!et.closed&&T,et.leave&&O,et.leave&&!et.closed&&P,et.leave&&et.closed&&z,!et.transition&&K&&q))?void 0:n.trim())||void 0,...(0,m.X)(et)}),eo=0;"visible"===_&&(eo|=p.ZM.Open),"hidden"===_&&(eo|=p.ZM.Closed),et.enter&&(eo|=p.ZM.Opening),et.leave&&(eo|=p.ZM.Closing);let ea=(0,b.L6)();return o.createElement(k.Provider,{value:$},o.createElement(p.up,{value:eo},ea({ourProps:en,theirProps:R,defaultTag:y,features:E,visible:"visible"===_,name:"Transition.Child"})))}),M=(0,b.yV)(function(e,r){let t=null!==(0,o.useContext)(v),n=null!==(0,p.oJ)();return o.createElement(o.Fragment,null,!t&&n?o.createElement(S,{ref:r,...e}):o.createElement(N,{ref:r,...e}))}),T=Object.assign(S,{Child:M,Root:S})},33443:function(e,r,t){"use strict";t.d(r,{Z:function(){return a}});var n=t(2265);let o=(0,n.createContext)(()=>{});function a(e){let{value:r,children:t}=e;return n.createElement(o.Provider,{value:r},t)}},61994:function(e,r,t){"use strict";function n(){for(var e,r,t=0,n="",o=arguments.length;t{let{color:t,icon:f,size:g=l.u8.SM,tooltip:p,className:b,children:h}=e,k=(0,n._T)(e,["color","icon","size","tooltip","className","children"]),v=f||null,{tooltipProps:x,getReferenceProps:w}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,c.lq)([r,x.refs.setReference]),className:(0,d.q)(m("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",t?(0,d.q)((0,c.bM)(t,i.K.background).bgColor,(0,c.bM)(t,i.K.iconText).textColor,(0,c.bM)(t,i.K.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,d.q)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),s[g].paddingX,s[g].paddingY,s[g].fontSize,b)},w,k),o.createElement(a.Z,Object.assign({text:p},x)),v?o.createElement(v,{className:(0,d.q)(m("icon"),"shrink-0 -ml-1 mr-1.5",u[g].height,u[g].width)}):null,o.createElement("span",{className:(0,d.q)(m("text"),"whitespace-nowrap")},h))});f.displayName="Badge"},47323:function(e,r,t){t.d(r,{Z:function(){return p}});var n=t(5853),o=t(2265),a=t(47187),l=t(7084),i=t(13241),d=t(1153),c=t(26898);let s={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},u={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},f=(e,r)=>{switch(e){case"simple":return{textColor:r?(0,d.bM)(r,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:r?(0,d.bM)(r,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,i.q)((0,d.bM)(r,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:r?(0,d.bM)(r,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,i.q)((0,d.bM)(r,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:r?(0,d.bM)(r,c.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:r?(0,i.q)((0,d.bM)(r,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:r?(0,d.bM)(r,c.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,i.q)((0,d.bM)(r,c.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:r?(0,d.bM)(r,c.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:r?(0,i.q)((0,d.bM)(r,c.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},g=(0,d.fn)("Icon"),p=o.forwardRef((e,r)=>{let{icon:t,variant:c="simple",tooltip:p,size:b=l.u8.SM,color:h,className:k}=e,v=(0,n._T)(e,["icon","variant","tooltip","size","color","className"]),x=f(c,h),{tooltipProps:w,getReferenceProps:y}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,d.lq)([r,w.refs.setReference]),className:(0,i.q)(g("root"),"inline-flex shrink-0 items-center justify-center",x.bgColor,x.textColor,x.borderColor,x.ringColor,m[c].rounded,m[c].border,m[c].shadow,m[c].ring,s[b].paddingX,s[b].paddingY,k)},y,v),o.createElement(a.Z,Object.assign({text:p},w)),o.createElement(t,{className:(0,i.q)(g("icon"),"shrink-0",u[b].height,u[b].width)}))});p.displayName="Icon"},59341:function(e,r,t){t.d(r,{Z:function(){return Z}});var n=t(5853),o=t(71049),a=t(11323),l=t(2265),i=t(66797),d=t(40099),c=t(74275),s=t(59456),u=t(93980),m=t(65573),f=t(67561),g=t(87550),p=t(628),b=t(80281),h=t(31370),k=t(20131),v=t(38929),x=t(52307),w=t(52724),y=t(7935);let C=(0,l.createContext)(null);C.displayName="GroupContext";let E=l.Fragment,N=Object.assign((0,v.yV)(function(e,r){var t;let n=(0,l.useId)(),E=(0,b.Q)(),N=(0,g.B)(),{id:T=E||"headlessui-switch-".concat(n),disabled:S=N||!1,checked:M,defaultChecked:j,onChange:q,name:O,value:Z,form:L,autoFocus:z=!1,...R}=e,B=(0,l.useContext)(C),[P,F]=(0,l.useState)(null),_=(0,l.useRef)(null),A=(0,f.T)(_,r,null===B?null:B.setSwitch,F),H=(0,c.L)(j),[K,X]=(0,d.q)(M,q,null!=H&&H),D=(0,s.G)(),[I,Y]=(0,l.useState)(!1),G=(0,u.z)(()=>{Y(!0),null==X||X(!K),D.nextFrame(()=>{Y(!1)})}),U=(0,u.z)(e=>{if((0,h.P)(e.currentTarget))return e.preventDefault();e.preventDefault(),G()}),W=(0,u.z)(e=>{e.key===w.R.Space?(e.preventDefault(),G()):e.key===w.R.Enter&&(0,k.g)(e.currentTarget)}),Q=(0,u.z)(e=>e.preventDefault()),V=(0,y.wp)(),$=(0,x.zH)(),{isFocusVisible:J,focusProps:ee}=(0,o.F)({autoFocus:z}),{isHovered:er,hoverProps:et}=(0,a.X)({isDisabled:S}),{pressed:en,pressProps:eo}=(0,i.x)({disabled:S}),ea=(0,l.useMemo)(()=>({checked:K,disabled:S,hover:er,focus:J,active:en,autofocus:z,changing:I}),[K,er,J,en,S,I,z]),el=(0,v.dG)({id:T,ref:A,role:"switch",type:(0,m.f)(e,P),tabIndex:-1===e.tabIndex?0:null!=(t=e.tabIndex)?t:0,"aria-checked":K,"aria-labelledby":V,"aria-describedby":$,disabled:S||void 0,autoFocus:z,onClick:U,onKeyUp:W,onKeyPress:Q},ee,et,eo),ei=(0,l.useCallback)(()=>{if(void 0!==H)return null==X?void 0:X(H)},[X,H]),ed=(0,v.L6)();return l.createElement(l.Fragment,null,null!=O&&l.createElement(p.Mt,{disabled:S,data:{[O]:Z||"on"},overrides:{type:"checkbox",checked:K},form:L,onReset:ei}),ed({ourProps:el,theirProps:R,slot:ea,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var r;let[t,n]=(0,l.useState)(null),[o,a]=(0,y.bE)(),[i,d]=(0,x.fw)(),c=(0,l.useMemo)(()=>({switch:t,setSwitch:n}),[t,n]),s=(0,v.L6)();return l.createElement(d,{name:"Switch.Description",value:i},l.createElement(a,{name:"Switch.Label",value:o,props:{htmlFor:null==(r=c.switch)?void 0:r.id,onClick(e){t&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},l.createElement(C.Provider,{value:c},s({ourProps:{},theirProps:e,slot:{},defaultTag:E,name:"Switch.Group"}))))},Label:y.__,Description:x.dk});var T=t(44140),S=t(26898),M=t(13241),j=t(1153),q=t(47187);let O=(0,j.fn)("Switch"),Z=l.forwardRef((e,r)=>{let{checked:t,defaultChecked:o=!1,onChange:a,color:i,name:d,error:c,errorMessage:s,disabled:u,required:m,tooltip:f,id:g}=e,p=(0,n._T)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),b={bgColor:i?(0,j.bM)(i,S.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:i?(0,j.bM)(i,S.K.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[h,k]=(0,T.Z)(o,t),[v,x]=(0,l.useState)(!1),{tooltipProps:w,getReferenceProps:y}=(0,q.l)(300);return l.createElement("div",{className:"flex flex-row items-center justify-start"},l.createElement(q.Z,Object.assign({text:f},w)),l.createElement("div",Object.assign({ref:(0,j.lq)([r,w.refs.setReference]),className:(0,M.q)(O("root"),"flex flex-row relative h-5")},p,y),l.createElement("input",{type:"checkbox",className:(0,M.q)(O("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:d,required:m,checked:h,onChange:e=>{e.preventDefault()}}),l.createElement(N,{checked:h,onChange:e=>{k(e),null==a||a(e)},disabled:u,className:(0,M.q)(O("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>x(!0),onBlur:()=>x(!1),id:g},l.createElement("span",{className:(0,M.q)(O("sr-only"),"sr-only")},"Switch ",h?"on":"off"),l.createElement("span",{"aria-hidden":"true",className:(0,M.q)(O("background"),h?b.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),l.createElement("span",{"aria-hidden":"true",className:(0,M.q)(O("round"),h?(0,M.q)(b.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",v?(0,M.q)("ring-2",b.ringColor):"")}))),c&&s?l.createElement("p",{className:(0,M.q)(O("errorMessage"),"text-sm text-red-500 mt-1 ")},s):null)});Z.displayName="Switch"},21626:function(e,r,t){t.d(r,{Z:function(){return i}});var n=t(5853),o=t(2265),a=t(13241);let l=(0,t(1153).fn)("Table"),i=o.forwardRef((e,r)=>{let{children:t,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement("div",{className:(0,a.q)(l("root"),"overflow-auto",i)},o.createElement("table",Object.assign({ref:r,className:(0,a.q)(l("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},d),t))});i.displayName="Table"},97214:function(e,r,t){t.d(r,{Z:function(){return i}});var n=t(5853),o=t(2265),a=t(13241);let l=(0,t(1153).fn)("TableBody"),i=o.forwardRef((e,r)=>{let{children:t,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tbody",Object.assign({ref:r,className:(0,a.q)(l("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",i)},d),t))});i.displayName="TableBody"},28241:function(e,r,t){t.d(r,{Z:function(){return i}});var n=t(5853),o=t(2265),a=t(13241);let l=(0,t(1153).fn)("TableCell"),i=o.forwardRef((e,r)=>{let{children:t,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("td",Object.assign({ref:r,className:(0,a.q)(l("root"),"align-middle whitespace-nowrap text-left p-4",i)},d),t))});i.displayName="TableCell"},58834:function(e,r,t){t.d(r,{Z:function(){return i}});var n=t(5853),o=t(2265),a=t(13241);let l=(0,t(1153).fn)("TableHead"),i=o.forwardRef((e,r)=>{let{children:t,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("thead",Object.assign({ref:r,className:(0,a.q)(l("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",i)},d),t))});i.displayName="TableHead"},69552:function(e,r,t){t.d(r,{Z:function(){return i}});var n=t(5853),o=t(2265),a=t(13241);let l=(0,t(1153).fn)("TableHeaderCell"),i=o.forwardRef((e,r)=>{let{children:t,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("th",Object.assign({ref:r,className:(0,a.q)(l("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",i)},d),t))});i.displayName="TableHeaderCell"},71876:function(e,r,t){t.d(r,{Z:function(){return i}});var n=t(5853),o=t(2265),a=t(13241);let l=(0,t(1153).fn)("TableRow"),i=o.forwardRef((e,r)=>{let{children:t,className:i}=e,d=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tr",Object.assign({ref:r,className:(0,a.q)(l("row"),i)},d),t))});i.displayName="TableRow"},84264:function(e,r,t){t.d(r,{Z:function(){return i}});var n=t(26898),o=t(13241),a=t(1153),l=t(2265);let i=l.forwardRef((e,r)=>{let{color:t,className:i,children:d}=e;return l.createElement("p",{ref:r,className:(0,o.q)("text-tremor-default",t?(0,a.bM)(t,n.K.text).textColor:(0,o.q)("text-tremor-content","dark:text-dark-tremor-content"),i)},d)});i.displayName="Text"},44140:function(e,r,t){t.d(r,{Z:function(){return o}});var n=t(2265);let o=(e,r)=>{let t=void 0!==r,[o,a]=(0,n.useState)(e);return[t?r:o,e=>{t||a(e)}]}},2651:function(e,r,t){t.d(r,{Z:function(){return v}});var n=t(93463),o=t(11938),a=t(70774),l=t(73602),i=t(91691),d=t(25119),c=t(37628),s=t(32417),u=t(4877),m=t(57943),f=t(12789),g=t(54558);let p=(e,r)=>new g.t(e).setA(r).toRgbString(),b=(e,r)=>new g.t(e).lighten(r).toHexString(),h=e=>{let r=(0,m.R_)(e,{theme:"dark"});return{1:r[0],2:r[1],3:r[2],4:r[3],5:r[6],6:r[5],7:r[4],8:r[6],9:r[5],10:r[4]}},k=(e,r)=>{let t=e||"#000",n=r||"#fff";return{colorBgBase:t,colorTextBase:n,colorText:p(n,.85),colorTextSecondary:p(n,.65),colorTextTertiary:p(n,.45),colorTextQuaternary:p(n,.25),colorFill:p(n,.18),colorFillSecondary:p(n,.12),colorFillTertiary:p(n,.08),colorFillQuaternary:p(n,.04),colorBgSolid:p(n,.95),colorBgSolidHover:p(n,1),colorBgSolidActive:p(n,.9),colorBgElevated:b(t,12),colorBgContainer:b(t,8),colorBgLayout:b(t,0),colorBgSpotlight:b(t,26),colorBgBlur:p(n,.04),colorBorder:b(t,26),colorBorderSecondary:b(t,19)}};var v={defaultSeed:d.u_.token,useToken:function(){let[e,r,t]=(0,i.ZP)();return{theme:e,token:r,hashId:t}},defaultAlgorithm:c.Z,darkAlgorithm:(e,r)=>{let t=Object.keys(a.M).map(r=>{let t=(0,m.R_)(e[r],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,n,o)=>(e["".concat(r,"-").concat(o+1)]=t[o],e["".concat(r).concat(o+1)]=t[o],e),{})}).reduce((e,r)=>e=Object.assign(Object.assign({},e),r),{}),n=null!=r?r:(0,c.Z)(e),o=(0,f.Z)(e,{generateColorPalettes:h,generateNeutralColorPalettes:k});return Object.assign(Object.assign(Object.assign(Object.assign({},n),t),o),{colorPrimaryBg:o.colorPrimaryBorder,colorPrimaryBgHover:o.colorPrimaryBorderHover})},compactAlgorithm:(e,r)=>{let t=null!=r?r:(0,c.Z)(e),n=t.fontSizeSM,o=t.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),function(e){let{sizeUnit:r,sizeStep:t}=e,n=t-2;return{sizeXXL:r*(n+10),sizeXL:r*(n+6),sizeLG:r*(n+2),sizeMD:r*(n+2),sizeMS:r*(n+1),size:r*n,sizeSM:r*n,sizeXS:r*(n-1),sizeXXS:r*(n-1)}}(null!=r?r:e)),(0,u.Z)(n)),{controlHeight:o}),(0,s.Z)(Object.assign(Object.assign({},t),{controlHeight:o})))},getDesignToken:e=>{let r=(null==e?void 0:e.algorithm)?(0,n.jG)(e.algorithm):o.Z,t=Object.assign(Object.assign({},a.Z),null==e?void 0:e.token);return(0,n.t2)(t,{override:null==e?void 0:e.token},r,l.Z)},defaultConfig:d.u_,_internalContext:d.Mj}},79205:function(e,r,t){t.d(r,{Z:function(){return u}});var n=t(2265);let o=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase()),l=e=>{let r=a(e);return r.charAt(0).toUpperCase()+r.slice(1)},i=function(){for(var e=arguments.length,r=Array(e),t=0;t!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim()},d=e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0};var c={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=(0,n.forwardRef)((e,r)=>{let{color:t="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:s="",children:u,iconNode:m,...f}=e;return(0,n.createElement)("svg",{ref:r,...c,width:o,height:o,stroke:t,strokeWidth:l?24*Number(a)/Number(o):a,className:i("lucide",s),...!u&&!d(f)&&{"aria-hidden":"true"},...f},[...m.map(e=>{let[r,t]=e;return(0,n.createElement)(r,t)}),...Array.isArray(u)?u:[u]])}),u=(e,r)=>{let t=(0,n.forwardRef)((t,a)=>{let{className:d,...c}=t;return(0,n.createElement)(s,{ref:a,iconNode:r,className:i("lucide-".concat(o(l(e))),"lucide-".concat(e),d),...c})});return t.displayName=l(e),t}},15051:function(e,r,t){t.d(r,{Z:function(){return n}});let n=(0,t(79205).Z)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},76858:function(e,r,t){t.d(r,{Z:function(){return n}});let n=(0,t(79205).Z)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},49322:function(e,r,t){t.d(r,{Z:function(){return n}});let n=(0,t(79205).Z)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},99397:function(e,r,t){t.d(r,{Z:function(){return n}});let n=(0,t(79205).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},32489:function(e,r,t){t.d(r,{Z:function(){return n}});let n=(0,t(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},44643:function(e,r,t){var n=t(2265);let o=n.forwardRef(function(e,r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))});r.Z=o},91126:function(e,r,t){var n=t(2265);let o=n.forwardRef(function(e,r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});r.Z=o},74998:function(e,r,t){var n=t(2265);let o=n.forwardRef(function(e,r){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});r.Z=o},52307:function(e,r,t){t.d(r,{dk:function(){return m},fw:function(){return u},zH:function(){return s}});var n=t(2265),o=t(93980),a=t(73389),l=t(67561),i=t(87550),d=t(38929);let c=(0,n.createContext)(null);function s(){var e,r;return null!=(r=null==(e=(0,n.useContext)(c))?void 0:e.value)?r:void 0}function u(){let[e,r]=(0,n.useState)([]);return[e.length>0?e.join(" "):void 0,(0,n.useMemo)(()=>function(e){let t=(0,o.z)(e=>(r(r=>[...r,e]),()=>r(r=>{let t=r.slice(),n=t.indexOf(e);return -1!==n&&t.splice(n,1),t}))),a=(0,n.useMemo)(()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value}),[t,e.slot,e.name,e.props,e.value]);return n.createElement(c.Provider,{value:a},e.children)},[r])]}c.displayName="DescriptionContext";let m=Object.assign((0,d.yV)(function(e,r){let t=(0,n.useId)(),o=(0,i.B)(),{id:s="headlessui-description-".concat(t),...u}=e,m=function e(){let r=(0,n.useContext)(c);if(null===r){let r=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,e),r}return r}(),f=(0,l.T)(r);(0,a.e)(()=>m.register(s),[s,m.register]);let g=o||!1,p=(0,n.useMemo)(()=>({...m.slot,disabled:g}),[m.slot,g]),b={ref:f,...m.props,id:s};return(0,d.L6)()({ourProps:b,theirProps:u,slot:p,defaultTag:"p",name:m.name||"Description"})}),{})},7935:function(e,r,t){t.d(r,{__:function(){return f},bE:function(){return m},wp:function(){return u}});var n=t(2265),o=t(93980),a=t(73389),l=t(67561),i=t(87550),d=t(80281),c=t(38929);let s=(0,n.createContext)(null);function u(e){var r,t,o;let a=null!=(t=null==(r=(0,n.useContext)(s))?void 0:r.value)?t:void 0;return(null!=(o=null==e?void 0:e.length)?o:0)>0?[a,...e].filter(Boolean).join(" "):a}function m(){let{inherit:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=u(),[t,a]=(0,n.useState)([]),l=e?[r,...t].filter(Boolean):t;return[l.length>0?l.join(" "):void 0,(0,n.useMemo)(()=>function(e){let r=(0,o.z)(e=>(a(r=>[...r,e]),()=>a(r=>{let t=r.slice(),n=t.indexOf(e);return -1!==n&&t.splice(n,1),t}))),t=(0,n.useMemo)(()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value}),[r,e.slot,e.name,e.props,e.value]);return n.createElement(s.Provider,{value:t},e.children)},[a])]}s.displayName="LabelContext";let f=Object.assign((0,c.yV)(function(e,r){var t;let u=(0,n.useId)(),m=function e(){let r=(0,n.useContext)(s);if(null===r){let r=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,e),r}return r}(),f=(0,d.Q)(),g=(0,i.B)(),{id:p="headlessui-label-".concat(u),htmlFor:b=null!=f?f:null==(t=m.props)?void 0:t.htmlFor,passive:h=!1,...k}=e,v=(0,l.T)(r);(0,a.e)(()=>m.register(p),[p,m.register]);let x=(0,o.z)(e=>{let r=e.currentTarget;if(r instanceof HTMLLabelElement&&e.preventDefault(),m.props&&"onClick"in m.props&&"function"==typeof m.props.onClick&&m.props.onClick(e),r instanceof HTMLLabelElement){let e=document.getElementById(r.htmlFor);if(e){let r=e.getAttribute("disabled");if("true"===r||""===r)return;let t=e.getAttribute("aria-disabled");if("true"===t||""===t)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}}),w=g||!1,y=(0,n.useMemo)(()=>({...m.slot,disabled:w}),[m.slot,w]),C={ref:v,...m.props,id:p,htmlFor:b,onClick:x};return h&&("onClick"in C&&(delete C.htmlFor,delete C.onClick),"onClick"in k&&delete k.onClick),(0,c.L6)()({ourProps:C,theirProps:k,slot:y,defaultTag:b?"label":"div",name:m.name||"Label"})}),{})},40099:function(e,r,t){t.d(r,{q:function(){return a}});var n=t(2265),o=t(93980);function a(e,r,t){let[a,l]=(0,n.useState)(t),i=void 0!==e,d=(0,n.useRef)(i),c=(0,n.useRef)(!1),s=(0,n.useRef)(!1);return!i||d.current||c.current?i||!d.current||s.current||(s.current=!0,d.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(c.current=!0,d.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[i?e:a,(0,o.z)(e=>(i||l(e),null==r?void 0:r(e)))]}},74275:function(e,r,t){t.d(r,{L:function(){return o}});var n=t(2265);function o(e){let[r]=(0,n.useState)(e);return r}},87550:function(e,r,t){t.d(r,{B:function(){return a}});var n=t(2265);let o=(0,n.createContext)(void 0);function a(){return(0,n.useContext)(o)}},628:function(e,r,t){t.d(r,{Mt:function(){return u}});var n=t(2265),o=t(54887),a=t(59456),l=t(20131),i=t(38929),d=t(65639);let c=(0,n.createContext)(null);function s(e){let{children:r}=e,t=(0,n.useContext)(c);if(!t)return n.createElement(n.Fragment,null,r);let{target:a}=t;return a?(0,o.createPortal)(n.createElement(n.Fragment,null,r),a):null}function u(e){let{data:r,form:t,disabled:o,onReset:c,overrides:u}=e,[f,g]=(0,n.useState)(null),p=(0,a.G)();return(0,n.useEffect)(()=>{if(c&&f)return p.addEventListener(f,"reset",c)},[f,t,c]),n.createElement(s,null,n.createElement(m,{setForm:g,formId:t}),(0,l.t)(r).map(e=>{let[r,a]=e;return n.createElement(d._,{features:d.x.Hidden,...(0,i.oA)({key:r,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:o,name:r,value:a,...u})})}))}function m(e){let{setForm:r,formId:t}=e;return(0,n.useEffect)(()=>{if(t){let e=document.getElementById(t);e&&r(e)}},[r,t]),t?null:n.createElement(d._,{features:d.x.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let t=e.closest("form");t&&r(t)}})}},80281:function(e,r,t){t.d(r,{Q:function(){return a}});var n=t(2265);let o=(0,n.createContext)(void 0);function a(){return(0,n.useContext)(o)}},31370:function(e,r,t){function n(e){let r=e.parentElement,t=null;for(;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(t=r),r=r.parentElement;let n=(null==r?void 0:r.getAttribute("disabled"))==="";return!(n&&function(e){if(!e)return!1;let r=e.previousElementSibling;for(;null!==r;){if(r instanceof HTMLLegendElement)return!1;r=r.previousElementSibling}return!0}(t))&&n}t.d(r,{P:function(){return n}})},20131:function(e,r,t){function n(e,r){return e?e+"["+r+"]":r}function o(e){var r,t;let n=null!=(r=null==e?void 0:e.form)?r:e.closest("form");if(n){for(let r of n.elements)if(r!==e&&("INPUT"===r.tagName&&"submit"===r.type||"BUTTON"===r.tagName&&"submit"===r.type||"INPUT"===r.nodeName&&"image"===r.type)){r.click();return}null==(t=n.requestSubmit)||t.call(n)}}t.d(r,{g:function(){return o},t:function(){return function e(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(let[a,l]of Object.entries(r))!function r(t,o,a){if(Array.isArray(a))for(let[e,l]of a.entries())r(t,n(o,e.toString()),l);else a instanceof Date?t.push([o,a.toISOString()]):"boolean"==typeof a?t.push([o,a?"1":"0"]):"string"==typeof a?t.push([o,a]):"number"==typeof a?t.push([o,"".concat(a)]):null==a?t.push([o,""]):e(a,o,t)}(o,n(t,a),l);return o}}})}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7451-a657252554fd3e24.js b/litellm/proxy/_experimental/out/_next/static/chunks/7451-a657252554fd3e24.js
deleted file mode 100644
index 8d8c0cc65db..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/7451-a657252554fd3e24.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7451],{44625:function(t,e,o){o.d(e,{Z:function(){return c}});var r=o(1119),n=o(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"},i=o(55015),c=n.forwardRef(function(t,e){return n.createElement(i.Z,(0,r.Z)({},t,{ref:e,icon:a}))})},46783:function(t,e,o){o.d(e,{Z:function(){return c}});var r=o(1119),n=o(2265),a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},i=o(55015),c=n.forwardRef(function(t,e){return n.createElement(i.Z,(0,r.Z)({},t,{ref:e,icon:a}))})},23907:function(t,e,o){o.d(e,{Z:function(){return c}});var r=o(1119),n=o(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"},i=o(55015),c=n.forwardRef(function(t,e){return n.createElement(i.Z,(0,r.Z)({},t,{ref:e,icon:a}))})},47323:function(t,e,o){o.d(e,{Z:function(){return f}});var r=o(5853),n=o(2265),a=o(47187),i=o(7084),c=o(13241),l=o(1153),s=o(26898);let d={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},u={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},b=(t,e)=>{switch(t){case"simple":return{textColor:e?(0,l.bM)(e,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:e?(0,l.bM)(e,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,c.q)((0,l.bM)(e,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:e?(0,l.bM)(e,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,c.q)((0,l.bM)(e,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:e?(0,l.bM)(e,s.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:e?(0,c.q)((0,l.bM)(e,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:e?(0,l.bM)(e,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,c.q)((0,l.bM)(e,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:e?(0,l.bM)(e,s.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:e?(0,c.q)((0,l.bM)(e,s.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},g=(0,l.fn)("Icon"),f=n.forwardRef((t,e)=>{let{icon:o,variant:s="simple",tooltip:f,size:p=i.u8.SM,color:h,className:v}=t,w=(0,r._T)(t,["icon","variant","tooltip","size","color","className"]),k=b(s,h),{tooltipProps:x,getReferenceProps:C}=(0,a.l)();return n.createElement("span",Object.assign({ref:(0,l.lq)([e,x.refs.setReference]),className:(0,c.q)(g("root"),"inline-flex shrink-0 items-center justify-center",k.bgColor,k.textColor,k.borderColor,k.ringColor,m[s].rounded,m[s].border,m[s].shadow,m[s].ring,d[p].paddingX,d[p].paddingY,v)},C,w),n.createElement(a.Z,Object.assign({text:f},x)),n.createElement(o,{className:(0,c.q)(g("icon"),"shrink-0",u[p].height,u[p].width)}))});f.displayName="Icon"},49804:function(t,e,o){o.d(e,{Z:function(){return s}});var r=o(5853),n=o(13241),a=o(1153),i=o(2265),c=o(9496);let l=(0,a.fn)("Col"),s=i.forwardRef((t,e)=>{let{numColSpan:o=1,numColSpanSm:a,numColSpanMd:s,numColSpanLg:d,children:u,className:m}=t,b=(0,r._T)(t,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),g=(t,e)=>t&&Object.keys(e).includes(String(t))?e[t]:"";return i.createElement("div",Object.assign({ref:e,className:(0,n.q)(l("root"),(()=>{let t=g(o,c.PT),e=g(a,c.SP),r=g(s,c.VS),i=g(d,c._w);return(0,n.q)(t,e,r,i)})(),m)},b),u)});s.displayName="Col"},33866:function(t,e,o){o.d(e,{Z:function(){return Z}});var r=o(2265),n=o(36760),a=o.n(n),i=o(66632),c=o(93350),l=o(19722),s=o(71744),d=o(93463),u=o(12918),m=o(18536),b=o(71140),g=o(99320);let f=new d.E4("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),p=new d.E4("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),h=new d.E4("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),v=new d.E4("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),w=new d.E4("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),k=new d.E4("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),x=t=>{let{componentCls:e,iconCls:o,antCls:r,badgeShadowSize:n,textFontSize:a,textFontSizeSM:i,statusSize:c,dotSize:l,textFontWeight:s,indicatorHeight:b,indicatorHeightSM:g,marginXS:x,calc:C}=t,y="".concat(r,"-scroll-number"),O=(0,m.Z)(t,(t,o)=>{let{darkColor:r}=o;return{["&".concat(e," ").concat(e,"-color-").concat(t)]:{background:r,["&:not(".concat(e,"-count)")]:{color:r},"a:hover &":{background:r}}}});return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.Wf)(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,["".concat(e,"-count")]:{display:"inline-flex",justifyContent:"center",zIndex:t.indicatorZIndex,minWidth:b,height:b,color:t.badgeTextColor,fontWeight:s,fontSize:a,lineHeight:(0,d.bf)(b),whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:C(b).div(2).equal(),boxShadow:"0 0 0 ".concat((0,d.bf)(n)," ").concat(t.badgeShadowColor),transition:"background ".concat(t.motionDurationMid),a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},["".concat(e,"-count-sm")]:{minWidth:g,height:g,fontSize:i,lineHeight:(0,d.bf)(g),borderRadius:C(g).div(2).equal()},["".concat(e,"-multiple-words")]:{padding:"0 ".concat((0,d.bf)(t.paddingXS)),bdi:{unicodeBidi:"plaintext"}},["".concat(e,"-dot")]:{zIndex:t.indicatorZIndex,width:l,minWidth:l,height:l,background:t.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat((0,d.bf)(n)," ").concat(t.badgeShadowColor)},["".concat(e,"-count, ").concat(e,"-dot, ").concat(y,"-custom-component")]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",["&".concat(o,"-spin")]:{animationName:k,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&".concat(e,"-status")]:{lineHeight:"inherit",verticalAlign:"baseline",["".concat(e,"-status-dot")]:{position:"relative",top:-1,display:"inline-block",width:c,height:c,verticalAlign:"middle",borderRadius:"50%"},["".concat(e,"-status-success")]:{backgroundColor:t.colorSuccess},["".concat(e,"-status-processing")]:{overflow:"visible",color:t.colorInfo,backgroundColor:t.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:n,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:f,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},["".concat(e,"-status-default")]:{backgroundColor:t.colorTextPlaceholder},["".concat(e,"-status-error")]:{backgroundColor:t.colorError},["".concat(e,"-status-warning")]:{backgroundColor:t.colorWarning},["".concat(e,"-status-text")]:{marginInlineStart:x,color:t.colorText,fontSize:t.fontSize}}}),O),{["".concat(e,"-zoom-appear, ").concat(e,"-zoom-enter")]:{animationName:p,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},["".concat(e,"-zoom-leave")]:{animationName:h,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},["&".concat(e,"-not-a-wrapper")]:{["".concat(e,"-zoom-appear, ").concat(e,"-zoom-enter")]:{animationName:v,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},["".concat(e,"-zoom-leave")]:{animationName:w,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},["&:not(".concat(e,"-status)")]:{verticalAlign:"middle"},["".concat(y,"-custom-component, ").concat(e,"-count")]:{transform:"none"},["".concat(y,"-custom-component, ").concat(y)]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[y]:{overflow:"hidden",transition:"all ".concat(t.motionDurationMid," ").concat(t.motionEaseOutBack),["".concat(y,"-only")]:{position:"relative",display:"inline-block",height:b,transition:"all ".concat(t.motionDurationSlow," ").concat(t.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",["> p".concat(y,"-only-unit")]:{height:b,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},["".concat(y,"-symbol")]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",["".concat(e,"-count, ").concat(e,"-dot, ").concat(y,"-custom-component")]:{transform:"translate(-50%, -50%)"}}})}},C=t=>{let{fontHeight:e,lineWidth:o,marginXS:r,colorBorderBg:n}=t,a=t.colorTextLightSolid,i=t.colorError,c=t.colorErrorHover;return(0,b.IX)(t,{badgeFontHeight:e,badgeShadowSize:o,badgeTextColor:a,badgeColor:i,badgeColorHover:c,badgeShadowColor:n,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},y=t=>{let{fontSize:e,lineHeight:o,fontSizeSM:r,lineWidth:n}=t;return{indicatorZIndex:"auto",indicatorHeight:Math.round(e*o)-2*n,indicatorHeightSM:e,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}};var O=(0,g.I$)("Badge",t=>x(C(t)),y);let E=t=>{let{antCls:e,badgeFontHeight:o,marginXS:r,badgeRibbonOffset:n,calc:a}=t,i="".concat(e,"-ribbon"),c=(0,m.Z)(t,(t,e)=>{let{darkColor:o}=e;return{["&".concat(i,"-color-").concat(t)]:{background:o,color:o}}});return{["".concat(e,"-ribbon-wrapper")]:{position:"relative"},[i]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.Wf)(t)),{position:"absolute",top:r,padding:"0 ".concat((0,d.bf)(t.paddingXS)),color:t.colorPrimary,lineHeight:(0,d.bf)(o),whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,["".concat(i,"-text")]:{color:t.badgeTextColor},["".concat(i,"-corner")]:{position:"absolute",top:"100%",width:n,height:n,color:"currentcolor",border:"".concat((0,d.bf)(a(n).div(2).equal())," solid"),transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),c),{["&".concat(i,"-placement-end")]:{insetInlineEnd:a(n).mul(-1).equal(),borderEndEndRadius:0,["".concat(i,"-corner")]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},["&".concat(i,"-placement-start")]:{insetInlineStart:a(n).mul(-1).equal(),borderEndStartRadius:0,["".concat(i,"-corner")]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}};var j=(0,g.I$)(["Badge","Ribbon"],t=>E(C(t)),y);let S=t=>{let e;let{prefixCls:o,value:n,current:i,offset:c=0}=t;return c&&(e={position:"absolute",top:"".concat(c,"00%"),left:0}),r.createElement("span",{style:e,className:a()("".concat(o,"-only-unit"),{current:i})},n)};var N=t=>{let e,o;let{prefixCls:n,count:a,value:i}=t,c=Number(i),l=Math.abs(a),[s,d]=r.useState(c),[u,m]=r.useState(l),b=()=>{d(c),m(l)};if(r.useEffect(()=>{let t=setTimeout(b,1e3);return()=>clearTimeout(t)},[c]),s===c||Number.isNaN(c)||Number.isNaN(s))e=[r.createElement(S,Object.assign({},t,{key:c,current:!0}))],o={transition:"none"};else{e=[];let n=c+10,a=[];for(let t=c;t<=n;t+=1)a.push(t);let i=ut%10===s);e=(i<0?a.slice(0,d+1):a.slice(d)).map((e,o)=>r.createElement(S,Object.assign({},t,{key:e,value:e%10,offset:i<0?o-d:o,current:o===d}))),o={transform:"translateY(".concat(-function(t,e,o){let r=t,n=0;for(;(r+10)%10!==e;)r+=o,n+=o;return n}(s,c,i),"00%)")}}return r.createElement("span",{className:"".concat(n,"-only"),style:o,onTransitionEnd:b},e)},M=function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(t);ne.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(o[r[n]]=t[r[n]]);return o};let R=r.forwardRef((t,e)=>{let{prefixCls:o,count:n,className:i,motionClassName:c,style:d,title:u,show:m,component:b="sup",children:g}=t,f=M(t,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:p}=r.useContext(s.E_),h=p("scroll-number",o),v=Object.assign(Object.assign({},f),{"data-show":m,style:d,className:a()(h,i,c),title:u}),w=n;if(n&&Number(n)%1==0){let t=String(n).split("");w=r.createElement("bdi",null,t.map((e,o)=>r.createElement(N,{prefixCls:h,count:Number(n),value:e,key:t.length-o})))}return((null==d?void 0:d.borderColor)&&(v.style=Object.assign(Object.assign({},d),{boxShadow:"0 0 0 1px ".concat(d.borderColor," inset")})),g)?(0,l.Tm)(g,t=>({className:a()("".concat(h,"-custom-component"),null==t?void 0:t.className,c)})):r.createElement(b,Object.assign({},v,{ref:e}),w)});var z=function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(o[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(t);ne.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(o[r[n]]=t[r[n]]);return o};let L=r.forwardRef((t,e)=>{var o,n,d,u,m;let{prefixCls:b,scrollNumberPrefixCls:g,children:f,status:p,text:h,color:v,count:w=null,overflowCount:k=99,dot:x=!1,size:C="default",title:y,offset:E,style:j,className:S,rootClassName:N,classNames:M,styles:L,showZero:Z=!1}=t,B=z(t,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:I,direction:T,badge:H}=r.useContext(s.E_),W=I("badge",b),[P,D,q]=O(W),F=w>k?"".concat(k,"+"):w,V="0"===F||0===F||"0"===h||0===h,K=null===w||V&&!Z,_=(null!=p||null!=v)&&K,A=null!=p||!V,X=x&&!V,Y=X?"":F,$=(0,r.useMemo)(()=>((null==Y||""===Y)&&(null==h||""===h)||V&&!Z)&&!X,[Y,V,Z,X,h]),G=(0,r.useRef)(w);$||(G.current=w);let J=G.current,Q=(0,r.useRef)(Y);$||(Q.current=Y);let U=Q.current,tt=(0,r.useRef)(X);$||(tt.current=X);let te=(0,r.useMemo)(()=>{if(!E)return Object.assign(Object.assign({},null==H?void 0:H.style),j);let t={marginTop:E[1]};return"rtl"===T?t.left=Number.parseInt(E[0],10):t.right=-Number.parseInt(E[0],10),Object.assign(Object.assign(Object.assign({},t),null==H?void 0:H.style),j)},[T,E,j,null==H?void 0:H.style]),to=null!=y?y:"string"==typeof J||"number"==typeof J?J:void 0,tr=!$&&(0===h?Z:!!h&&!0!==h),tn=tr?r.createElement("span",{className:"".concat(W,"-status-text")},h):null,ta=J&&"object"==typeof J?(0,l.Tm)(J,t=>({style:Object.assign(Object.assign({},te),t.style)})):void 0,ti=(0,c.o2)(v,!1),tc=a()(null==M?void 0:M.indicator,null===(o=null==H?void 0:H.classNames)||void 0===o?void 0:o.indicator,{["".concat(W,"-status-dot")]:_,["".concat(W,"-status-").concat(p)]:!!p,["".concat(W,"-color-").concat(v)]:ti}),tl={};v&&!ti&&(tl.color=v,tl.background=v);let ts=a()(W,{["".concat(W,"-status")]:_,["".concat(W,"-not-a-wrapper")]:!f,["".concat(W,"-rtl")]:"rtl"===T},S,N,null==H?void 0:H.className,null===(n=null==H?void 0:H.classNames)||void 0===n?void 0:n.root,null==M?void 0:M.root,D,q);if(!f&&_&&(h||A||!K)){let t=te.color;return P(r.createElement("span",Object.assign({},B,{className:ts,style:Object.assign(Object.assign(Object.assign({},null==L?void 0:L.root),null===(d=null==H?void 0:H.styles)||void 0===d?void 0:d.root),te)}),r.createElement("span",{className:tc,style:Object.assign(Object.assign(Object.assign({},null==L?void 0:L.indicator),null===(u=null==H?void 0:H.styles)||void 0===u?void 0:u.indicator),tl)}),tr&&r.createElement("span",{style:{color:t},className:"".concat(W,"-status-text")},h)))}return P(r.createElement("span",Object.assign({ref:e},B,{className:ts,style:Object.assign(Object.assign({},null===(m=null==H?void 0:H.styles)||void 0===m?void 0:m.root),null==L?void 0:L.root)}),f,r.createElement(i.ZP,{visible:!$,motionName:"".concat(W,"-zoom"),motionAppear:!1,motionDeadline:1e3},t=>{var e,o;let{className:n}=t,i=I("scroll-number",g),c=tt.current,l=a()(null==M?void 0:M.indicator,null===(e=null==H?void 0:H.classNames)||void 0===e?void 0:e.indicator,{["".concat(W,"-dot")]:c,["".concat(W,"-count")]:!c,["".concat(W,"-count-sm")]:"small"===C,["".concat(W,"-multiple-words")]:!c&&U&&U.toString().length>1,["".concat(W,"-status-").concat(p)]:!!p,["".concat(W,"-color-").concat(v)]:ti}),s=Object.assign(Object.assign(Object.assign({},null==L?void 0:L.indicator),null===(o=null==H?void 0:H.styles)||void 0===o?void 0:o.indicator),te);return v&&!ti&&((s=s||{}).background=v),r.createElement(R,{prefixCls:i,show:!$,motionClassName:n,className:l,count:U,title:to,style:s,key:"scrollNumber"},ta)}),tn))});L.Ribbon=t=>{let{className:e,prefixCls:o,style:n,color:i,children:l,text:d,placement:u="end",rootClassName:m}=t,{getPrefixCls:b,direction:g}=r.useContext(s.E_),f=b("ribbon",o),p="".concat(f,"-wrapper"),[h,v,w]=j(f,p),k=(0,c.o2)(i,!1),x=a()(f,"".concat(f,"-placement-").concat(u),{["".concat(f,"-rtl")]:"rtl"===g,["".concat(f,"-color-").concat(i)]:k},e),C={},y={};return i&&!k&&(C.background=i,y.color=i),h(r.createElement("div",{className:a()(p,m,v,w)},l,r.createElement("div",{className:a()(x,v),style:Object.assign(Object.assign({},C),n)},r.createElement("span",{className:"".concat(f,"-text")},d),r.createElement("div",{className:"".concat(f,"-corner"),style:y}))))};var Z=L},10900:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.Z=n},86462:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.Z=n},44633:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.Z=n},3477:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.Z=n},53410:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.Z=n},91126:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.Z=n},23628:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.Z=n},49084:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});e.Z=n},74998:function(t,e,o){var r=o(2265);let n=r.forwardRef(function(t,e){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.Z=n}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7471-f852accc26f14f8c.js b/litellm/proxy/_experimental/out/_next/static/chunks/7471-f852accc26f14f8c.js
deleted file mode 100644
index a0160e7099c..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/7471-f852accc26f14f8c.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7471],{69993:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(1119),o=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},i=r(55015),l=o.forwardRef(function(e,t){return o.createElement(i.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},47323:function(e,t,r){r.d(t,{Z:function(){return f}});var n=r(5853),o=r(2265),a=r(47187),i=r(7084),l=r(13241),c=r(1153),s=r(26898);let d={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},u={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},b=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,c.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,c.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,l.q)((0,c.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,c.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,c.bM)(t,s.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,l.q)((0,c.bM)(t,s.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},g=(0,c.fn)("Icon"),f=o.forwardRef((e,t)=>{let{icon:r,variant:s="simple",tooltip:f,size:p=i.u8.SM,color:h,className:v}=e,k=(0,n._T)(e,["icon","variant","tooltip","size","color","className"]),w=b(s,h),{tooltipProps:x,getReferenceProps:y}=(0,a.l)();return o.createElement("span",Object.assign({ref:(0,c.lq)([t,x.refs.setReference]),className:(0,l.q)(g("root"),"inline-flex shrink-0 items-center justify-center",w.bgColor,w.textColor,w.borderColor,w.ringColor,m[s].rounded,m[s].border,m[s].shadow,m[s].ring,d[p].paddingX,d[p].paddingY,v)},y,k),o.createElement(a.Z,Object.assign({text:f},x)),o.createElement(r,{className:(0,l.q)(g("icon"),"shrink-0",u[p].height,u[p].width)}))});f.displayName="Icon"},59341:function(e,t,r){r.d(t,{Z:function(){return T}});var n=r(5853),o=r(71049),a=r(11323),i=r(2265),l=r(66797),c=r(40099),s=r(74275),d=r(59456),u=r(93980),m=r(65573),b=r(67561),g=r(87550),f=r(628),p=r(80281),h=r(31370),v=r(20131),k=r(38929),w=r(52307),x=r(52724),y=r(7935);let C=(0,i.createContext)(null);C.displayName="GroupContext";let E=i.Fragment,j=Object.assign((0,k.yV)(function(e,t){var r;let n=(0,i.useId)(),E=(0,p.Q)(),j=(0,g.B)(),{id:N=E||"headlessui-switch-".concat(n),disabled:O=j||!1,checked:S,defaultChecked:M,onChange:Z,name:R,value:T,form:L,autoFocus:z=!1,...q}=e,B=(0,i.useContext)(C),[I,H]=(0,i.useState)(null),P=(0,i.useRef)(null),F=(0,b.T)(P,t,null===B?null:B.setSwitch,H),W=(0,s.L)(M),[D,_]=(0,c.q)(S,Z,null!=W&&W),K=(0,d.G)(),[A,X]=(0,i.useState)(!1),V=(0,u.z)(()=>{X(!0),null==_||_(!D),K.nextFrame(()=>{X(!1)})}),Y=(0,u.z)(e=>{if((0,h.P)(e.currentTarget))return e.preventDefault();e.preventDefault(),V()}),G=(0,u.z)(e=>{e.key===x.R.Space?(e.preventDefault(),V()):e.key===x.R.Enter&&(0,v.g)(e.currentTarget)}),$=(0,u.z)(e=>e.preventDefault()),Q=(0,y.wp)(),U=(0,w.zH)(),{isFocusVisible:J,focusProps:ee}=(0,o.F)({autoFocus:z}),{isHovered:et,hoverProps:er}=(0,a.X)({isDisabled:O}),{pressed:en,pressProps:eo}=(0,l.x)({disabled:O}),ea=(0,i.useMemo)(()=>({checked:D,disabled:O,hover:et,focus:J,active:en,autofocus:z,changing:A}),[D,et,J,en,O,A,z]),ei=(0,k.dG)({id:N,ref:F,role:"switch",type:(0,m.f)(e,I),tabIndex:-1===e.tabIndex?0:null!=(r=e.tabIndex)?r:0,"aria-checked":D,"aria-labelledby":Q,"aria-describedby":U,disabled:O||void 0,autoFocus:z,onClick:Y,onKeyUp:G,onKeyPress:$},ee,er,eo),el=(0,i.useCallback)(()=>{if(void 0!==W)return null==_?void 0:_(W)},[_,W]),ec=(0,k.L6)();return i.createElement(i.Fragment,null,null!=R&&i.createElement(f.Mt,{disabled:O,data:{[R]:T||"on"},overrides:{type:"checkbox",checked:D},form:L,onReset:el}),ec({ourProps:ei,theirProps:q,slot:ea,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,n]=(0,i.useState)(null),[o,a]=(0,y.bE)(),[l,c]=(0,w.fw)(),s=(0,i.useMemo)(()=>({switch:r,setSwitch:n}),[r,n]),d=(0,k.L6)();return i.createElement(c,{name:"Switch.Description",value:l},i.createElement(a,{name:"Switch.Label",value:o,props:{htmlFor:null==(t=s.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},i.createElement(C.Provider,{value:s},d({ourProps:{},theirProps:e,slot:{},defaultTag:E,name:"Switch.Group"}))))},Label:y.__,Description:w.dk});var N=r(44140),O=r(26898),S=r(13241),M=r(1153),Z=r(47187);let R=(0,M.fn)("Switch"),T=i.forwardRef((e,t)=>{let{checked:r,defaultChecked:o=!1,onChange:a,color:l,name:c,error:s,errorMessage:d,disabled:u,required:m,tooltip:b,id:g}=e,f=(0,n._T)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),p={bgColor:l?(0,M.bM)(l,O.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:l?(0,M.bM)(l,O.K.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[h,v]=(0,N.Z)(o,r),[k,w]=(0,i.useState)(!1),{tooltipProps:x,getReferenceProps:y}=(0,Z.l)(300);return i.createElement("div",{className:"flex flex-row items-center justify-start"},i.createElement(Z.Z,Object.assign({text:b},x)),i.createElement("div",Object.assign({ref:(0,M.lq)([t,x.refs.setReference]),className:(0,S.q)(R("root"),"flex flex-row relative h-5")},f,y),i.createElement("input",{type:"checkbox",className:(0,S.q)(R("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:c,required:m,checked:h,onChange:e=>{e.preventDefault()}}),i.createElement(j,{checked:h,onChange:e=>{v(e),null==a||a(e)},disabled:u,className:(0,S.q)(R("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>w(!0),onBlur:()=>w(!1),id:g},i.createElement("span",{className:(0,S.q)(R("sr-only"),"sr-only")},"Switch ",h?"on":"off"),i.createElement("span",{"aria-hidden":"true",className:(0,S.q)(R("background"),h?p.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),i.createElement("span",{"aria-hidden":"true",className:(0,S.q)(R("round"),h?(0,S.q)(p.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",k?(0,S.q)("ring-2",p.ringColor):"")}))),s&&d?i.createElement("p",{className:(0,S.q)(R("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});T.displayName="Switch"},49804:function(e,t,r){r.d(t,{Z:function(){return s}});var n=r(5853),o=r(13241),a=r(1153),i=r(2265),l=r(9496);let c=(0,a.fn)("Col"),s=i.forwardRef((e,t)=>{let{numColSpan:r=1,numColSpanSm:a,numColSpanMd:s,numColSpanLg:d,children:u,className:m}=e,b=(0,n._T)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),g=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return i.createElement("div",Object.assign({ref:t,className:(0,o.q)(c("root"),(()=>{let e=g(r,l.PT),t=g(a,l.SP),n=g(s,l.VS),i=g(d,l._w);return(0,o.q)(e,t,n,i)})(),m)},b),u)});s.displayName="Col"},21626:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(5853),o=r(2265),a=r(13241);let i=(0,r(1153).fn)("Table"),l=o.forwardRef((e,t)=>{let{children:r,className:l}=e,c=(0,n._T)(e,["children","className"]);return o.createElement("div",{className:(0,a.q)(i("root"),"overflow-auto",l)},o.createElement("table",Object.assign({ref:t,className:(0,a.q)(i("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},c),r))});l.displayName="Table"},97214:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(5853),o=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableBody"),l=o.forwardRef((e,t)=>{let{children:r,className:l}=e,c=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tbody",Object.assign({ref:t,className:(0,a.q)(i("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",l)},c),r))});l.displayName="TableBody"},28241:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(5853),o=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableCell"),l=o.forwardRef((e,t)=>{let{children:r,className:l}=e,c=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("td",Object.assign({ref:t,className:(0,a.q)(i("root"),"align-middle whitespace-nowrap text-left p-4",l)},c),r))});l.displayName="TableCell"},58834:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(5853),o=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableHead"),l=o.forwardRef((e,t)=>{let{children:r,className:l}=e,c=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("thead",Object.assign({ref:t,className:(0,a.q)(i("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",l)},c),r))});l.displayName="TableHead"},69552:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(5853),o=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableHeaderCell"),l=o.forwardRef((e,t)=>{let{children:r,className:l}=e,c=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("th",Object.assign({ref:t,className:(0,a.q)(i("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",l)},c),r))});l.displayName="TableHeaderCell"},71876:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(5853),o=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableRow"),l=o.forwardRef((e,t)=>{let{children:r,className:l}=e,c=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tr",Object.assign({ref:t,className:(0,a.q)(i("row"),l)},c),r))});l.displayName="TableRow"},33866:function(e,t,r){r.d(t,{Z:function(){return L}});var n=r(2265),o=r(36760),a=r.n(o),i=r(66632),l=r(93350),c=r(19722),s=r(71744),d=r(93463),u=r(12918),m=r(18536),b=r(71140),g=r(99320);let f=new d.E4("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),p=new d.E4("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),h=new d.E4("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),v=new d.E4("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),k=new d.E4("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),w=new d.E4("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),x=e=>{let{componentCls:t,iconCls:r,antCls:n,badgeShadowSize:o,textFontSize:a,textFontSizeSM:i,statusSize:l,dotSize:c,textFontWeight:s,indicatorHeight:b,indicatorHeightSM:g,marginXS:x,calc:y}=e,C="".concat(n,"-scroll-number"),E=(0,m.Z)(e,(e,r)=>{let{darkColor:n}=r;return{["&".concat(t," ").concat(t,"-color-").concat(e)]:{background:n,["&:not(".concat(t,"-count)")]:{color:n},"a:hover &":{background:n}}}});return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.Wf)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,["".concat(t,"-count")]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:b,height:b,color:e.badgeTextColor,fontWeight:s,fontSize:a,lineHeight:(0,d.bf)(b),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:y(b).div(2).equal(),boxShadow:"0 0 0 ".concat((0,d.bf)(o)," ").concat(e.badgeShadowColor),transition:"background ".concat(e.motionDurationMid),a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},["".concat(t,"-count-sm")]:{minWidth:g,height:g,fontSize:i,lineHeight:(0,d.bf)(g),borderRadius:y(g).div(2).equal()},["".concat(t,"-multiple-words")]:{padding:"0 ".concat((0,d.bf)(e.paddingXS)),bdi:{unicodeBidi:"plaintext"}},["".concat(t,"-dot")]:{zIndex:e.indicatorZIndex,width:c,minWidth:c,height:c,background:e.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat((0,d.bf)(o)," ").concat(e.badgeShadowColor)},["".concat(t,"-count, ").concat(t,"-dot, ").concat(C,"-custom-component")]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",["&".concat(r,"-spin")]:{animationName:w,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&".concat(t,"-status")]:{lineHeight:"inherit",verticalAlign:"baseline",["".concat(t,"-status-dot")]:{position:"relative",top:-1,display:"inline-block",width:l,height:l,verticalAlign:"middle",borderRadius:"50%"},["".concat(t,"-status-success")]:{backgroundColor:e.colorSuccess},["".concat(t,"-status-processing")]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:f,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},["".concat(t,"-status-default")]:{backgroundColor:e.colorTextPlaceholder},["".concat(t,"-status-error")]:{backgroundColor:e.colorError},["".concat(t,"-status-warning")]:{backgroundColor:e.colorWarning},["".concat(t,"-status-text")]:{marginInlineStart:x,color:e.colorText,fontSize:e.fontSize}}}),E),{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:p,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["".concat(t,"-zoom-leave")]:{animationName:h,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["&".concat(t,"-not-a-wrapper")]:{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["".concat(t,"-zoom-leave")]:{animationName:k,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["&:not(".concat(t,"-status)")]:{verticalAlign:"middle"},["".concat(C,"-custom-component, ").concat(t,"-count")]:{transform:"none"},["".concat(C,"-custom-component, ").concat(C)]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[C]:{overflow:"hidden",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseOutBack),["".concat(C,"-only")]:{position:"relative",display:"inline-block",height:b,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",["> p".concat(C,"-only-unit")]:{height:b,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},["".concat(C,"-symbol")]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",["".concat(t,"-count, ").concat(t,"-dot, ").concat(C,"-custom-component")]:{transform:"translate(-50%, -50%)"}}})}},y=e=>{let{fontHeight:t,lineWidth:r,marginXS:n,colorBorderBg:o}=e,a=e.colorTextLightSolid,i=e.colorError,l=e.colorErrorHover;return(0,b.IX)(e,{badgeFontHeight:t,badgeShadowSize:r,badgeTextColor:a,badgeColor:i,badgeColorHover:l,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:n,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},C=e=>{let{fontSize:t,lineHeight:r,fontSizeSM:n,lineWidth:o}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*r)-2*o,indicatorHeightSM:t,dotSize:n/2,textFontSize:n,textFontSizeSM:n,textFontWeight:"normal",statusSize:n/2}};var E=(0,g.I$)("Badge",e=>x(y(e)),C);let j=e=>{let{antCls:t,badgeFontHeight:r,marginXS:n,badgeRibbonOffset:o,calc:a}=e,i="".concat(t,"-ribbon"),l=(0,m.Z)(e,(e,t)=>{let{darkColor:r}=t;return{["&".concat(i,"-color-").concat(e)]:{background:r,color:r}}});return{["".concat(t,"-ribbon-wrapper")]:{position:"relative"},[i]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.Wf)(e)),{position:"absolute",top:n,padding:"0 ".concat((0,d.bf)(e.paddingXS)),color:e.colorPrimary,lineHeight:(0,d.bf)(r),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,["".concat(i,"-text")]:{color:e.badgeTextColor},["".concat(i,"-corner")]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:"".concat((0,d.bf)(a(o).div(2).equal())," solid"),transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),l),{["&".concat(i,"-placement-end")]:{insetInlineEnd:a(o).mul(-1).equal(),borderEndEndRadius:0,["".concat(i,"-corner")]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},["&".concat(i,"-placement-start")]:{insetInlineStart:a(o).mul(-1).equal(),borderEndStartRadius:0,["".concat(i,"-corner")]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}};var N=(0,g.I$)(["Badge","Ribbon"],e=>j(y(e)),C);let O=e=>{let t;let{prefixCls:r,value:o,current:i,offset:l=0}=e;return l&&(t={position:"absolute",top:"".concat(l,"00%"),left:0}),n.createElement("span",{style:t,className:a()("".concat(r,"-only-unit"),{current:i})},o)};var S=e=>{let t,r;let{prefixCls:o,count:a,value:i}=e,l=Number(i),c=Math.abs(a),[s,d]=n.useState(l),[u,m]=n.useState(c),b=()=>{d(l),m(c)};if(n.useEffect(()=>{let e=setTimeout(b,1e3);return()=>clearTimeout(e)},[l]),s===l||Number.isNaN(l)||Number.isNaN(s))t=[n.createElement(O,Object.assign({},e,{key:l,current:!0}))],r={transition:"none"};else{t=[];let o=l+10,a=[];for(let e=l;e<=o;e+=1)a.push(e);let i=ue%10===s);t=(i<0?a.slice(0,d+1):a.slice(d)).map((t,r)=>n.createElement(O,Object.assign({},e,{key:t,value:t%10,offset:i<0?r-d:r,current:r===d}))),r={transform:"translateY(".concat(-function(e,t,r){let n=e,o=0;for(;(n+10)%10!==t;)n+=r,o+=r;return o}(s,l,i),"00%)")}}return n.createElement("span",{className:"".concat(o,"-only"),style:r,onTransitionEnd:b},t)},M=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let Z=n.forwardRef((e,t)=>{let{prefixCls:r,count:o,className:i,motionClassName:l,style:d,title:u,show:m,component:b="sup",children:g}=e,f=M(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:p}=n.useContext(s.E_),h=p("scroll-number",r),v=Object.assign(Object.assign({},f),{"data-show":m,style:d,className:a()(h,i,l),title:u}),k=o;if(o&&Number(o)%1==0){let e=String(o).split("");k=n.createElement("bdi",null,e.map((t,r)=>n.createElement(S,{prefixCls:h,count:Number(o),value:t,key:e.length-r})))}return((null==d?void 0:d.borderColor)&&(v.style=Object.assign(Object.assign({},d),{boxShadow:"0 0 0 1px ".concat(d.borderColor," inset")})),g)?(0,c.Tm)(g,e=>({className:a()("".concat(h,"-custom-component"),null==e?void 0:e.className,l)})):n.createElement(b,Object.assign({},v,{ref:t}),k)});var R=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let T=n.forwardRef((e,t)=>{var r,o,d,u,m;let{prefixCls:b,scrollNumberPrefixCls:g,children:f,status:p,text:h,color:v,count:k=null,overflowCount:w=99,dot:x=!1,size:y="default",title:C,offset:j,style:N,className:O,rootClassName:S,classNames:M,styles:T,showZero:L=!1}=e,z=R(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:q,direction:B,badge:I}=n.useContext(s.E_),H=q("badge",b),[P,F,W]=E(H),D=k>w?"".concat(w,"+"):k,_="0"===D||0===D||"0"===h||0===h,K=null===k||_&&!L,A=(null!=p||null!=v)&&K,X=null!=p||!_,V=x&&!_,Y=V?"":D,G=(0,n.useMemo)(()=>((null==Y||""===Y)&&(null==h||""===h)||_&&!L)&&!V,[Y,_,L,V,h]),$=(0,n.useRef)(k);G||($.current=k);let Q=$.current,U=(0,n.useRef)(Y);G||(U.current=Y);let J=U.current,ee=(0,n.useRef)(V);G||(ee.current=V);let et=(0,n.useMemo)(()=>{if(!j)return Object.assign(Object.assign({},null==I?void 0:I.style),N);let e={marginTop:j[1]};return"rtl"===B?e.left=Number.parseInt(j[0],10):e.right=-Number.parseInt(j[0],10),Object.assign(Object.assign(Object.assign({},e),null==I?void 0:I.style),N)},[B,j,N,null==I?void 0:I.style]),er=null!=C?C:"string"==typeof Q||"number"==typeof Q?Q:void 0,en=!G&&(0===h?L:!!h&&!0!==h),eo=en?n.createElement("span",{className:"".concat(H,"-status-text")},h):null,ea=Q&&"object"==typeof Q?(0,c.Tm)(Q,e=>({style:Object.assign(Object.assign({},et),e.style)})):void 0,ei=(0,l.o2)(v,!1),el=a()(null==M?void 0:M.indicator,null===(r=null==I?void 0:I.classNames)||void 0===r?void 0:r.indicator,{["".concat(H,"-status-dot")]:A,["".concat(H,"-status-").concat(p)]:!!p,["".concat(H,"-color-").concat(v)]:ei}),ec={};v&&!ei&&(ec.color=v,ec.background=v);let es=a()(H,{["".concat(H,"-status")]:A,["".concat(H,"-not-a-wrapper")]:!f,["".concat(H,"-rtl")]:"rtl"===B},O,S,null==I?void 0:I.className,null===(o=null==I?void 0:I.classNames)||void 0===o?void 0:o.root,null==M?void 0:M.root,F,W);if(!f&&A&&(h||X||!K)){let e=et.color;return P(n.createElement("span",Object.assign({},z,{className:es,style:Object.assign(Object.assign(Object.assign({},null==T?void 0:T.root),null===(d=null==I?void 0:I.styles)||void 0===d?void 0:d.root),et)}),n.createElement("span",{className:el,style:Object.assign(Object.assign(Object.assign({},null==T?void 0:T.indicator),null===(u=null==I?void 0:I.styles)||void 0===u?void 0:u.indicator),ec)}),en&&n.createElement("span",{style:{color:e},className:"".concat(H,"-status-text")},h)))}return P(n.createElement("span",Object.assign({ref:t},z,{className:es,style:Object.assign(Object.assign({},null===(m=null==I?void 0:I.styles)||void 0===m?void 0:m.root),null==T?void 0:T.root)}),f,n.createElement(i.ZP,{visible:!G,motionName:"".concat(H,"-zoom"),motionAppear:!1,motionDeadline:1e3},e=>{var t,r;let{className:o}=e,i=q("scroll-number",g),l=ee.current,c=a()(null==M?void 0:M.indicator,null===(t=null==I?void 0:I.classNames)||void 0===t?void 0:t.indicator,{["".concat(H,"-dot")]:l,["".concat(H,"-count")]:!l,["".concat(H,"-count-sm")]:"small"===y,["".concat(H,"-multiple-words")]:!l&&J&&J.toString().length>1,["".concat(H,"-status-").concat(p)]:!!p,["".concat(H,"-color-").concat(v)]:ei}),s=Object.assign(Object.assign(Object.assign({},null==T?void 0:T.indicator),null===(r=null==I?void 0:I.styles)||void 0===r?void 0:r.indicator),et);return v&&!ei&&((s=s||{}).background=v),n.createElement(Z,{prefixCls:i,show:!G,motionClassName:o,className:c,count:J,title:er,style:s,key:"scrollNumber"},ea)}),eo))});T.Ribbon=e=>{let{className:t,prefixCls:r,style:o,color:i,children:c,text:d,placement:u="end",rootClassName:m}=e,{getPrefixCls:b,direction:g}=n.useContext(s.E_),f=b("ribbon",r),p="".concat(f,"-wrapper"),[h,v,k]=N(f,p),w=(0,l.o2)(i,!1),x=a()(f,"".concat(f,"-placement-").concat(u),{["".concat(f,"-rtl")]:"rtl"===g,["".concat(f,"-color-").concat(i)]:w},t),y={},C={};return i&&!w&&(y.background=i,C.color=i),h(n.createElement("div",{className:a()(p,m,v,k)},c,n.createElement("div",{className:a()(x,v),style:Object.assign(Object.assign({},y),o)},n.createElement("span",{className:"".concat(f,"-text")},d),n.createElement("div",{className:"".concat(f,"-corner"),style:C}))))};var L=T},15051:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},49322:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},3577:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]])},99397:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},69076:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},73247:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},92369:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},32489:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},10900:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});t.Z=o},91777:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});t.Z=o},47686:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});t.Z=o},82182:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});t.Z=o},79814:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))});t.Z=o},3477:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});t.Z=o},53410:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});t.Z=o},93416:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});t.Z=o},91126:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=o},77355:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=o},22452:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});t.Z=o},25327:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))});t.Z=o},3497:function(e,t,r){var n=r(2265);let o=n.forwardRef(function(e,t){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"}))});t.Z=o}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7474-79e3343f32c7e661.js b/litellm/proxy/_experimental/out/_next/static/chunks/7474-79e3343f32c7e661.js
new file mode 100644
index 00000000000..59db3103622
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/7474-79e3343f32c7e661.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7474],{15327:function(e,t,n){n.d(t,{Z:function(){return i}});var o=n(1119),a=n(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},r=n(55015),i=a.forwardRef(function(e,t){return a.createElement(r.Z,(0,o.Z)({},e,{ref:t,icon:c}))})},77565:function(e,t,n){n.d(t,{Z:function(){return i}});var o=n(1119),a=n(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},r=n(55015),i=a.forwardRef(function(e,t){return a.createElement(r.Z,(0,o.Z)({},e,{ref:t,icon:c}))})},23496:function(e,t,n){n.d(t,{Z:function(){return h}});var o=n(2265),a=n(36760),c=n.n(a),r=n(71744),i=n(33759),l=n(93463),d=n(12918),s=n(99320),u=n(71140);let m=e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{["&".concat(t)]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},p=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:o,lineWidth:a,textPaddingInline:c,orientationMargin:r,verticalMarginInline:i}=e;return{[t]:Object.assign(Object.assign({},(0,d.Wf)(e)),{borderBlockStart:"".concat((0,l.bf)(a)," solid ").concat(o),"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:i,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:"".concat((0,l.bf)(a)," solid ").concat(o)},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:"".concat((0,l.bf)(e.marginLG)," 0")},["&-horizontal".concat(t,"-with-text")]:{display:"flex",alignItems:"center",margin:"".concat((0,l.bf)(e.dividerHorizontalWithTextGutterMargin)," 0"),color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:"0 ".concat(o),"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:"".concat((0,l.bf)(a)," solid transparent"),borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},["&-horizontal".concat(t,"-with-text-start")]:{"&::before":{width:"calc(".concat(r," * 100%)")},"&::after":{width:"calc(100% - ".concat(r," * 100%)")}},["&-horizontal".concat(t,"-with-text-end")]:{"&::before":{width:"calc(100% - ".concat(r," * 100%)")},"&::after":{width:"calc(".concat(r," * 100%)")}},["".concat(t,"-inner-text")]:{display:"inline-block",paddingBlock:0,paddingInline:c},"&-dashed":{background:"none",borderColor:o,borderStyle:"dashed",borderWidth:"".concat((0,l.bf)(a)," 0 0")},["&-horizontal".concat(t,"-with-text").concat(t,"-dashed")]:{"&::before, &::after":{borderStyle:"dashed none none"}},["&-vertical".concat(t,"-dashed")]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:o,borderStyle:"dotted",borderWidth:"".concat((0,l.bf)(a)," 0 0")},["&-horizontal".concat(t,"-with-text").concat(t,"-dotted")]:{"&::before, &::after":{borderStyle:"dotted none none"}},["&-vertical".concat(t,"-dotted")]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},["&-plain".concat(t,"-with-text")]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},["&-horizontal".concat(t,"-with-text-start").concat(t,"-no-default-orientation-margin-start")]:{"&::before":{width:0},"&::after":{width:"100%"},["".concat(t,"-inner-text")]:{paddingInlineStart:n}},["&-horizontal".concat(t,"-with-text-end").concat(t,"-no-default-orientation-margin-end")]:{"&::before":{width:"100%"},"&::after":{width:0},["".concat(t,"-inner-text")]:{paddingInlineEnd:n}}})}};var g=(0,s.I$)("Divider",e=>{let t=(0,u.IX)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[p(t),m(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),b=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let f={small:"sm",middle:"md"};var h=e=>{let{getPrefixCls:t,direction:n,className:a,style:l}=(0,r.dj)("divider"),{prefixCls:d,type:s="horizontal",orientation:u="center",orientationMargin:m,className:p,rootClassName:h,children:v,dashed:y,variant:x="solid",plain:I,style:w,size:S}=e,C=b(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),O=t("divider",d),[B,k,j]=g(O),z=f[(0,i.Z)(S)],E=!!v,N=o.useMemo(()=>"left"===u?"rtl"===n?"end":"start":"right"===u?"rtl"===n?"start":"end":u,[n,u]),H="start"===N&&null!=m,T="end"===N&&null!=m,P=c()(O,a,k,j,"".concat(O,"-").concat(s),{["".concat(O,"-with-text")]:E,["".concat(O,"-with-text-").concat(N)]:E,["".concat(O,"-dashed")]:!!y,["".concat(O,"-").concat(x)]:"solid"!==x,["".concat(O,"-plain")]:!!I,["".concat(O,"-rtl")]:"rtl"===n,["".concat(O,"-no-default-orientation-margin-start")]:H,["".concat(O,"-no-default-orientation-margin-end")]:T,["".concat(O,"-").concat(z)]:!!z},p,h),R=o.useMemo(()=>"number"==typeof m?m:/^\d+$/.test(m)?Number(m):m,[m]);return B(o.createElement("div",Object.assign({className:P,style:Object.assign(Object.assign({},l),w)},C,{role:"separator"}),v&&"vertical"!==s&&o.createElement("span",{className:"".concat(O,"-inner-text"),style:{marginInlineStart:H?R:void 0,marginInlineEnd:T?R:void 0}},v)))}},73705:function(e,t,n){n.d(t,{Z:function(){return _}});var o=n(2265),a=n(15327),c=n(77565),r=n(36760),i=n.n(r),l=n(71030),d=n(58525),s=n(50506),u=n(18694),m=n(62236),p=e=>"object"!=typeof e&&"function"!=typeof e||null===e,g=n(92736),b=n(93942),f=n(19722),h=n(13613),v=n(95140),y=n(71744),x=n(64024),I=n(60985),w=n(88208),S=n(91691),C=n(93463),O=n(12918),B=n(18544),k=n(29382),j=n(691),z=n(88260),E=n(34442),N=n(99320),H=n(71140),T=e=>{let{componentCls:t,menuCls:n,colorError:o,colorTextLightSolid:a}=e,c="".concat(n,"-item");return{["".concat(t,", ").concat(t,"-menu-submenu")]:{["".concat(n," ").concat(c)]:{["&".concat(c,"-danger:not(").concat(c,"-disabled)")]:{color:o,"&:hover":{color:a,backgroundColor:o}}}}}};let P=e=>{let{componentCls:t,menuCls:n,zIndexPopup:o,dropdownArrowDistance:a,sizePopupArrow:c,antCls:r,iconCls:i,motionDurationMid:l,paddingBlock:d,fontSize:s,dropdownEdgeChildPadding:u,colorTextDisabled:m,fontSizeIcon:p,controlPaddingHorizontal:g,colorBgElevated:b}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:o,display:"block","&::before":{position:"absolute",insetBlock:e.calc(c).div(2).sub(a).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},["&-trigger".concat(r,"-btn")]:{["& > ".concat(i,"-down, & > ").concat(r,"-btn-icon > ").concat(i,"-down")]:{fontSize:p}},["".concat(t,"-wrap")]:{position:"relative",["".concat(r,"-btn > ").concat(i,"-down")]:{fontSize:p},["".concat(i,"-down::before")]:{transition:"transform ".concat(l)}},["".concat(t,"-wrap-open")]:{["".concat(i,"-down::before")]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},["&".concat(r,"-slide-down-enter").concat(r,"-slide-down-enter-active").concat(t,"-placement-bottomLeft,\n &").concat(r,"-slide-down-appear").concat(r,"-slide-down-appear-active").concat(t,"-placement-bottomLeft,\n &").concat(r,"-slide-down-enter").concat(r,"-slide-down-enter-active").concat(t,"-placement-bottom,\n &").concat(r,"-slide-down-appear").concat(r,"-slide-down-appear-active").concat(t,"-placement-bottom,\n &").concat(r,"-slide-down-enter").concat(r,"-slide-down-enter-active").concat(t,"-placement-bottomRight,\n &").concat(r,"-slide-down-appear").concat(r,"-slide-down-appear-active").concat(t,"-placement-bottomRight")]:{animationName:B.fJ},["&".concat(r,"-slide-up-enter").concat(r,"-slide-up-enter-active").concat(t,"-placement-topLeft,\n &").concat(r,"-slide-up-appear").concat(r,"-slide-up-appear-active").concat(t,"-placement-topLeft,\n &").concat(r,"-slide-up-enter").concat(r,"-slide-up-enter-active").concat(t,"-placement-top,\n &").concat(r,"-slide-up-appear").concat(r,"-slide-up-appear-active").concat(t,"-placement-top,\n &").concat(r,"-slide-up-enter").concat(r,"-slide-up-enter-active").concat(t,"-placement-topRight,\n &").concat(r,"-slide-up-appear").concat(r,"-slide-up-appear-active").concat(t,"-placement-topRight")]:{animationName:B.Qt},["&".concat(r,"-slide-down-leave").concat(r,"-slide-down-leave-active").concat(t,"-placement-bottomLeft,\n &").concat(r,"-slide-down-leave").concat(r,"-slide-down-leave-active").concat(t,"-placement-bottom,\n &").concat(r,"-slide-down-leave").concat(r,"-slide-down-leave-active").concat(t,"-placement-bottomRight")]:{animationName:B.Uw},["&".concat(r,"-slide-up-leave").concat(r,"-slide-up-leave-active").concat(t,"-placement-topLeft,\n &").concat(r,"-slide-up-leave").concat(r,"-slide-up-leave-active").concat(t,"-placement-top,\n &").concat(r,"-slide-up-leave").concat(r,"-slide-up-leave-active").concat(t,"-placement-topRight")]:{animationName:B.ly}}},(0,z.ZP)(e,b,{arrowPlacement:{top:!0,bottom:!0}}),{["".concat(t," ").concat(n)]:{position:"relative",margin:0},["".concat(n,"-submenu-popup")]:{position:"absolute",zIndex:o,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},["".concat(t,", ").concat(t,"-menu-submenu")]:Object.assign(Object.assign({},(0,O.Wf)(e)),{[n]:Object.assign(Object.assign({padding:u,listStyleType:"none",backgroundColor:b,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},(0,O.Qy)(e)),{"&:empty":{padding:0,boxShadow:"none"},["".concat(n,"-item-group-title")]:{padding:"".concat((0,C.bf)(d)," ").concat((0,C.bf)(g)),color:e.colorTextDescription,transition:"all ".concat(l)},["".concat(n,"-item")]:{position:"relative",display:"flex",alignItems:"center"},["".concat(n,"-item-icon")]:{minWidth:s,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},["".concat(n,"-title-content")]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:"all ".concat(l),"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},["".concat(n,"-item-extra")]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},["".concat(n,"-item, ").concat(n,"-submenu-title")]:Object.assign(Object.assign({display:"flex",margin:0,padding:"".concat((0,C.bf)(d)," ").concat((0,C.bf)(g)),color:e.colorText,fontWeight:"normal",fontSize:s,lineHeight:e.lineHeight,cursor:"pointer",transition:"all ".concat(l),borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},(0,O.Qy)(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:m,cursor:"not-allowed","&:hover":{color:m,backgroundColor:b,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:"".concat((0,C.bf)(e.marginXXS)," 0"),overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},["".concat(t,"-menu-submenu-expand-icon")]:{position:"absolute",insetInlineEnd:e.paddingXS,["".concat(t,"-menu-submenu-arrow-icon")]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:p,fontStyle:"normal"}}}),["".concat(n,"-item-group-list")]:{margin:"0 ".concat((0,C.bf)(e.marginXS)),padding:0,listStyle:"none"},["".concat(n,"-submenu-title")]:{paddingInlineEnd:e.calc(g).add(e.fontSizeSM).equal()},["".concat(n,"-submenu-vertical")]:{position:"relative"},["".concat(n,"-submenu").concat(n,"-submenu-disabled ").concat(t,"-menu-submenu-title")]:{["&, ".concat(t,"-menu-submenu-arrow-icon")]:{color:m,backgroundColor:b,cursor:"not-allowed"}},["".concat(n,"-submenu-selected ").concat(t,"-menu-submenu-title")]:{color:e.colorPrimary}})})},[(0,B.oN)(e,"slide-up"),(0,B.oN)(e,"slide-down"),(0,k.Fm)(e,"move-up"),(0,k.Fm)(e,"move-down"),(0,j._y)(e,"zoom-big")]]};var R=(0,N.I$)("Dropdown",e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:o,componentCls:a}=e,c=(0,H.IX)(e,{menuCls:"".concat(a,"-menu"),dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:o});return[P(c),T(c)]},e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},(0,z.wZ)({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),(0,E.w)(e)),{resetStyle:!1});let Z=e=>{var t;let{menu:n,arrow:r,prefixCls:b,children:C,trigger:O,disabled:B,dropdownRender:k,popupRender:j,getPopupContainer:z,overlayClassName:E,rootClassName:N,overlayStyle:H,open:T,onOpenChange:P,visible:Z,onVisibleChange:M,mouseEnterDelay:W=.15,mouseLeaveDelay:D=.1,autoAdjustOverflow:A=!0,placement:L="",overlay:G,transitionName:X,destroyOnHidden:_,destroyPopupOnHide:q}=e,{getPopupContainer:F,getPrefixCls:Y,direction:V,dropdown:$}=o.useContext(y.E_),J=j||k;(0,h.ln)("Dropdown");let Q=o.useMemo(()=>{let e=Y();return void 0!==X?X:L.includes("top")?"".concat(e,"-slide-down"):"".concat(e,"-slide-up")},[Y,L,X]),U=o.useMemo(()=>L?L.includes("Center")?L.slice(0,L.indexOf("Center")):L:"rtl"===V?"bottomRight":"bottomLeft",[L,V]),K=Y("dropdown",b),ee=(0,x.Z)(K),[et,en,eo]=R(K,ee),[,ea]=(0,S.ZP)(),ec=o.Children.only(p(C)?o.createElement("span",null,C):C),er=(0,f.Tm)(ec,{className:i()("".concat(K,"-trigger"),{["".concat(K,"-rtl")]:"rtl"===V},ec.props.className),disabled:null!==(t=ec.props.disabled)&&void 0!==t?t:B}),ei=B?[]:O,el=!!(null==ei?void 0:ei.includes("contextMenu")),[ed,es]=(0,s.Z)(!1,{value:null!=T?T:Z}),eu=(0,d.Z)(e=>{null==P||P(e,{source:"trigger"}),null==M||M(e),es(e)}),em=i()(E,N,en,eo,ee,null==$?void 0:$.className,{["".concat(K,"-rtl")]:"rtl"===V}),ep=(0,g.Z)({arrowPointAtCenter:"object"==typeof r&&r.pointAtCenter,autoAdjustOverflow:A,offset:ea.marginXXS,arrowWidth:r?ea.sizePopupArrow:0,borderRadius:ea.borderRadius}),eg=(0,d.Z)(()=>{null!=n&&n.selectable&&null!=n&&n.multiple||(null==P||P(!1,{source:"menu"}),es(!1))}),[eb,ef]=(0,m.Cn)("Dropdown",null==H?void 0:H.zIndex),eh=o.createElement(l.Z,Object.assign({alignPoint:el},(0,u.Z)(e,["rootClassName"]),{mouseEnterDelay:W,mouseLeaveDelay:D,visible:ed,builtinPlacements:ep,arrow:!!r,overlayClassName:em,prefixCls:K,getPopupContainer:z||F,transitionName:Q,trigger:ei,overlay:()=>{let e;return e=(null==n?void 0:n.items)?o.createElement(I.Z,Object.assign({},n)):"function"==typeof G?G():G,J&&(e=J(e)),e=o.Children.only("string"==typeof e?o.createElement("span",null,e):e),o.createElement(w.J,{prefixCls:"".concat(K,"-menu"),rootClassName:i()(eo,ee),expandIcon:o.createElement("span",{className:"".concat(K,"-menu-submenu-arrow")},"rtl"===V?o.createElement(a.Z,{className:"".concat(K,"-menu-submenu-arrow-icon")}):o.createElement(c.Z,{className:"".concat(K,"-menu-submenu-arrow-icon")})),mode:"vertical",selectable:!1,onClick:eg,validator:e=>{let{mode:t}=e}},e)},placement:U,onVisibleChange:eu,overlayStyle:Object.assign(Object.assign(Object.assign({},null==$?void 0:$.style),H),{zIndex:eb}),autoDestroy:null!=_?_:q}),er);return eb&&(eh=o.createElement(v.Z.Provider,{value:ef},eh)),et(eh)},M=(0,b.Z)(Z,"align",void 0,"dropdown",e=>e);Z._InternalPanelDoNotUseOrYouWillBeFired=e=>o.createElement(M,Object.assign({},e),o.createElement("span",null));var W=n(60440),D=n(5545),A=n(58760),L=n(77685),G=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let X=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:a}=o.useContext(y.E_),{prefixCls:c,type:r="default",danger:l,disabled:d,loading:s,onClick:u,htmlType:m,children:p,className:g,menu:b,arrow:f,autoFocus:h,overlay:v,trigger:x,align:I,open:w,onOpenChange:S,placement:C,getPopupContainer:O,href:B,icon:k=o.createElement(W.Z,null),title:j,buttonsRender:z=e=>e,mouseEnterDelay:E,mouseLeaveDelay:N,overlayClassName:H,overlayStyle:T,destroyOnHidden:P,destroyPopupOnHide:R,dropdownRender:M,popupRender:X}=e,_=G(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),q=n("dropdown",c),F={menu:b,arrow:f,autoFocus:h,align:I,disabled:d,trigger:d?[]:x,onOpenChange:S,getPopupContainer:O||t,mouseEnterDelay:E,mouseLeaveDelay:N,overlayClassName:H,overlayStyle:T,destroyOnHidden:P,popupRender:X||M},{compactSize:Y,compactItemClassnames:V}=(0,L.ri)(q,a),$=i()("".concat(q,"-button"),V,g);"destroyPopupOnHide"in e&&(F.destroyPopupOnHide=R),"overlay"in e&&(F.overlay=v),"open"in e&&(F.open=w),"placement"in e?F.placement=C:F.placement="rtl"===a?"bottomLeft":"bottomRight";let[J,Q]=z([o.createElement(D.ZP,{type:r,danger:l,disabled:d,loading:s,onClick:u,htmlType:m,href:B,title:j},p),o.createElement(D.ZP,{type:r,danger:l,icon:k})]);return o.createElement(A.Z.Compact,Object.assign({className:$,size:Y,block:!0},_),J,o.createElement(Z,Object.assign({},F),Q))};X.__ANT_BUTTON=!0,Z.Button=X;var _=Z},32186:function(e,t,n){let o;n.d(t,{D:function(){return S},Z:function(){return O}});var a=n(2265),c=n(1119),r={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},i=n(55015),l=a.forwardRef(function(e,t){return a.createElement(i.Z,(0,c.Z)({},e,{ref:t,icon:r}))}),d=n(15327),s=n(77565),u=n(36760),m=n.n(u),p=n(18694),g=n(16774),b=n(71744),f=n(80856),h=n(93463),v=n(25437),y=(0,n(99320).I$)(["Layout","Sider"],e=>{let{componentCls:t,siderBg:n,motionDurationMid:o,motionDurationSlow:a,antCls:c,triggerHeight:r,triggerColor:i,triggerBg:l,headerHeight:d,zeroTriggerWidth:s,zeroTriggerHeight:u,borderRadiusLG:m,lightSiderBg:p,lightTriggerColor:g,lightTriggerBg:b,bodyBg:f}=e;return{[t]:{position:"relative",minWidth:0,background:n,transition:"all ".concat(o,", background 0s"),"&-has-trigger":{paddingBottom:r},"&-right":{order:1},["".concat(t,"-children")]:{height:"100%",marginTop:-.1,paddingTop:.1,["".concat(c,"-menu").concat(c,"-menu-inline-collapsed")]:{width:"auto"}},["&-zero-width ".concat(t,"-children")]:{overflow:"hidden"},["".concat(t,"-trigger")]:{position:"fixed",bottom:0,zIndex:1,height:r,color:i,lineHeight:(0,h.bf)(r),textAlign:"center",background:l,cursor:"pointer",transition:"all ".concat(o)},["".concat(t,"-zero-width-trigger")]:{position:"absolute",top:d,insetInlineEnd:e.calc(s).mul(-1).equal(),zIndex:1,width:s,height:u,color:i,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:"0 ".concat((0,h.bf)(m)," ").concat((0,h.bf)(m)," 0"),cursor:"pointer",transition:"background ".concat(a," ease"),"&::after":{position:"absolute",inset:0,background:"transparent",transition:"all ".concat(a),content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(s).mul(-1).equal(),borderRadius:"".concat((0,h.bf)(m)," 0 0 ").concat((0,h.bf)(m))}},"&-light":{background:p,["".concat(t,"-trigger")]:{color:g,background:b},["".concat(t,"-zero-width-trigger")]:{color:g,background:b,border:"1px solid ".concat(f),borderInlineStart:0}}}}},v.eh,{deprecatedTokens:v.jn}),x=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let I={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},w=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),S=a.createContext({}),C=(o=0,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return o+=1,"".concat(e).concat(o)});var O=a.forwardRef((e,t)=>{let{prefixCls:n,className:o,trigger:c,children:r,defaultCollapsed:i=!1,theme:u="dark",style:h={},collapsible:v=!1,reverseArrow:O=!1,width:B=200,collapsedWidth:k=80,zeroWidthTriggerStyle:j,breakpoint:z,onCollapse:E,onBreakpoint:N}=e,H=x(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:T}=(0,a.useContext)(f.V),[P,R]=(0,a.useState)("collapsed"in e?e.collapsed:i),[Z,M]=(0,a.useState)(!1);(0,a.useEffect)(()=>{"collapsed"in e&&R(e.collapsed)},[e.collapsed]);let W=(t,n)=>{"collapsed"in e||R(t),null==E||E(t,n)},{getPrefixCls:D,direction:A}=(0,a.useContext)(b.E_),L=D("layout-sider",n),[G,X,_]=y(L),q=(0,a.useRef)(null);q.current=e=>{M(e.matches),null==N||N(e.matches),P!==e.matches&&W(e.matches,"responsive")},(0,a.useEffect)(()=>{let e;function t(e){var t;return null===(t=q.current)||void 0===t?void 0:t.call(q,e)}return void 0!==(null==window?void 0:window.matchMedia)&&z&&z in I&&(e=window.matchMedia("screen and (max-width: ".concat(I[z],")")),(0,g.x)(e,t),t(e)),()=>{(0,g.h)(e,t)}},[z]),(0,a.useEffect)(()=>{let e=C("ant-sider-");return T.addSider(e),()=>T.removeSider(e)},[]);let F=()=>{W(!P,"clickTrigger")},Y=(0,p.Z)(H,["collapsed"]),V=P?k:B,$=w(V)?"".concat(V,"px"):String(V),J=0===Number.parseFloat(String(k||0))?a.createElement("span",{onClick:F,className:m()("".concat(L,"-zero-width-trigger"),"".concat(L,"-zero-width-trigger-").concat(O?"right":"left")),style:j},c||a.createElement(l,null)):null,Q="rtl"===A==!O,U={expanded:Q?a.createElement(s.Z,null):a.createElement(d.Z,null),collapsed:Q?a.createElement(d.Z,null):a.createElement(s.Z,null)}[P?"collapsed":"expanded"],K=null!==c?J||a.createElement("div",{className:"".concat(L,"-trigger"),onClick:F,style:{width:$}},c||U):null,ee=Object.assign(Object.assign({},h),{flex:"0 0 ".concat($),maxWidth:$,minWidth:$,width:$}),et=m()(L,"".concat(L,"-").concat(u),{["".concat(L,"-collapsed")]:!!P,["".concat(L,"-has-trigger")]:v&&null!==c&&!J,["".concat(L,"-below")]:!!Z,["".concat(L,"-zero-width")]:0===Number.parseFloat($)},o,X,_),en=a.useMemo(()=>({siderCollapsed:P}),[P]);return G(a.createElement(S.Provider,{value:en},a.createElement("aside",Object.assign({className:et},Y,{style:ee,ref:t}),a.createElement("div",{className:"".concat(L,"-children")},r),v||Z&&J?K:null)))})},80856:function(e,t,n){n.d(t,{V:function(){return o}});let o=n(2265).createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},25437:function(e,t,n){n.d(t,{eh:function(){return c},jn:function(){return r}});var o=n(93463),a=n(99320);let c=e=>{let{colorBgLayout:t,controlHeight:n,controlHeightLG:o,colorText:a,controlHeightSM:c,marginXXS:r,colorTextLightSolid:i,colorBgContainer:l}=e,d=1.25*o;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:2*n,headerPadding:"0 ".concat(d,"px"),headerColor:a,footerPadding:"".concat(c,"px ").concat(d,"px"),footerBg:t,siderBg:"#001529",triggerHeight:o+2*r,triggerBg:"#002140",triggerColor:i,zeroTriggerWidth:o,zeroTriggerHeight:o,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:a}},r=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];t.ZP=(0,a.I$)("Layout",e=>{let{antCls:t,componentCls:n,colorText:a,footerBg:c,headerHeight:r,headerPadding:i,headerColor:l,footerPadding:d,fontSize:s,bodyBg:u,headerBg:m}=e;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},["&".concat(n,"-has-sider")]:{flexDirection:"row",["> ".concat(n,", > ").concat(n,"-content")]:{width:0}},["".concat(n,"-header, &").concat(n,"-footer")]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},["".concat(n,"-header")]:{height:r,padding:i,color:l,lineHeight:(0,o.bf)(r),background:m,["".concat(t,"-menu")]:{lineHeight:"inherit"}},["".concat(n,"-footer")]:{padding:d,color:a,fontSize:s,background:c},["".concat(n,"-content")]:{flex:"auto",color:a,minHeight:0}}},c,{deprecatedTokens:r})},88208:function(e,t,n){n.d(t,{J:function(){return l}});var o=n(2265),a=n(28791),c=n(391),r=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let i=o.createContext(null),l=o.forwardRef((e,t)=>{let{children:n}=e,l=r(e,["children"]),d=o.useContext(i),s=o.useMemo(()=>Object.assign(Object.assign({},d),l),[d,l.prefixCls,l.mode,l.selectable,l.rootClassName]),u=(0,a.t4)(n),m=(0,a.x1)(t,u?(0,a.C4)(n):null);return o.createElement(i.Provider,{value:s},o.createElement(c.Z,{space:!0},u?o.cloneElement(n,{ref:m}):n))});t.Z=i},60985:function(e,t,n){n.d(t,{Z:function(){return Y}});var o=n(2265),a=n(33082),c=n(32186),r=n(60440),i=n(36760),l=n.n(i),d=n(58525),s=n(18694),u=n(68710),m=n(19722),p=n(71744),g=n(64024);let b=(0,o.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var f=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n},h=e=>{let{prefixCls:t,className:n,dashed:c}=e,r=f(e,["prefixCls","className","dashed"]),{getPrefixCls:i}=o.useContext(p.E_),d=i("menu",t),s=l()({["".concat(d,"-item-divider-dashed")]:!!c},n);return o.createElement(a.iz,Object.assign({className:s},r))},v=n(45287),y=n(99981),x=e=>{var t;let{className:n,children:r,icon:i,title:d,danger:u,extra:p}=e,{prefixCls:g,firstLevel:f,direction:h,disableMenuItemTitleTooltip:x,inlineCollapsed:I}=o.useContext(b),{siderCollapsed:w}=o.useContext(c.D),S=d;void 0===d?S=f?r:"":!1===d&&(S="");let C={title:S};w||I||(C.title=null,C.open=!1);let O=(0,v.Z)(r).length,B=o.createElement(a.ck,Object.assign({},(0,s.Z)(e,["title","icon","danger"]),{className:l()({["".concat(g,"-item-danger")]:u,["".concat(g,"-item-only-child")]:(i?O+1:O)===1},n),title:"string"==typeof d?d:void 0}),(0,m.Tm)(i,{className:l()(o.isValidElement(i)?null===(t=i.props)||void 0===t?void 0:t.className:void 0,"".concat(g,"-item-icon"))}),(e=>{let t=null==r?void 0:r[0],n=o.createElement("span",{className:l()("".concat(g,"-title-content"),{["".concat(g,"-title-content-with-extra")]:!!p||0===p})},r);return(!i||o.isValidElement(r)&&"span"===r.type)&&r&&e&&f&&"string"==typeof t?o.createElement("div",{className:"".concat(g,"-inline-collapsed-noicon")},t.charAt(0)):n})(I));return x||(B=o.createElement(y.Z,Object.assign({},C,{placement:"rtl"===h?"left":"right",classNames:{root:"".concat(g,"-inline-collapsed-tooltip")}}),B)),B},I=n(88208),w=n(93463),S=n(54558),C=n(12918),O=n(63074),B=n(18544),k=n(691),j=n(99320),z=n(71140),E=e=>{let{componentCls:t,motionDurationSlow:n,horizontalLineHeight:o,colorSplit:a,lineWidth:c,lineType:r,itemPaddingInline:i}=e;return{["".concat(t,"-horizontal")]:{lineHeight:o,border:0,borderBottom:"".concat((0,w.bf)(c)," ").concat(r," ").concat(a),boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},["".concat(t,"-item, ").concat(t,"-submenu")]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:i},["> ".concat(t,"-item:hover,\n > ").concat(t,"-item-active,\n > ").concat(t,"-submenu ").concat(t,"-submenu-title:hover")]:{backgroundColor:"transparent"},["".concat(t,"-item, ").concat(t,"-submenu-title")]:{transition:["border-color ".concat(n),"background ".concat(n)].join(",")},["".concat(t,"-submenu-arrow")]:{display:"none"}}}},N=e=>{let{componentCls:t,menuArrowOffset:n,calc:o}=e;return{["".concat(t,"-rtl")]:{direction:"rtl"},["".concat(t,"-submenu-rtl")]:{transformOrigin:"100% 0"},["".concat(t,"-rtl").concat(t,"-vertical,\n ").concat(t,"-submenu-rtl ").concat(t,"-vertical")]:{["".concat(t,"-submenu-arrow")]:{"&::before":{transform:"rotate(-45deg) translateY(".concat((0,w.bf)(o(n).mul(-1).equal()),")")},"&::after":{transform:"rotate(45deg) translateY(".concat((0,w.bf)(n),")")}}}}};let H=e=>(0,C.oN)(e);var T=(e,t)=>{let{componentCls:n,itemColor:o,itemSelectedColor:a,subMenuItemSelectedColor:c,groupTitleColor:r,itemBg:i,subMenuItemBg:l,itemSelectedBg:d,activeBarHeight:s,activeBarWidth:u,activeBarBorderWidth:m,motionDurationSlow:p,motionEaseInOut:g,motionEaseOut:b,itemPaddingInline:f,motionDurationMid:h,itemHoverColor:v,lineType:y,colorSplit:x,itemDisabledColor:I,dangerItemColor:S,dangerItemHoverColor:C,dangerItemSelectedColor:O,dangerItemActiveBg:B,dangerItemSelectedBg:k,popupBg:j,itemHoverBg:z,itemActiveBg:E,menuSubMenuBg:N,horizontalItemSelectedColor:T,horizontalItemSelectedBg:P,horizontalItemBorderRadius:R,horizontalItemHoverBg:Z}=e;return{["".concat(n,"-").concat(t,", ").concat(n,"-").concat(t," > ").concat(n)]:{color:o,background:i,["&".concat(n,"-root:focus-visible")]:Object.assign({},H(e)),["".concat(n,"-item")]:{"&-group-title, &-extra":{color:r}},["".concat(n,"-submenu-selected > ").concat(n,"-submenu-title")]:{color:c},["".concat(n,"-item, ").concat(n,"-submenu-title")]:{color:o,["&:not(".concat(n,"-item-disabled):focus-visible")]:Object.assign({},H(e))},["".concat(n,"-item-disabled, ").concat(n,"-submenu-disabled")]:{color:"".concat(I," !important")},["".concat(n,"-item:not(").concat(n,"-item-selected):not(").concat(n,"-submenu-selected)")]:{["&:hover, > ".concat(n,"-submenu-title:hover")]:{color:v}},["&:not(".concat(n,"-horizontal)")]:{["".concat(n,"-item:not(").concat(n,"-item-selected)")]:{"&:hover":{backgroundColor:z},"&:active":{backgroundColor:E}},["".concat(n,"-submenu-title")]:{"&:hover":{backgroundColor:z},"&:active":{backgroundColor:E}}},["".concat(n,"-item-danger")]:{color:S,["&".concat(n,"-item:hover")]:{["&:not(".concat(n,"-item-selected):not(").concat(n,"-submenu-selected)")]:{color:C}},["&".concat(n,"-item:active")]:{background:B}},["".concat(n,"-item a")]:{"&, &:hover":{color:"inherit"}},["".concat(n,"-item-selected")]:{color:a,["&".concat(n,"-item-danger")]:{color:O},"a, a:hover":{color:"inherit"}},["& ".concat(n,"-item-selected")]:{backgroundColor:d,["&".concat(n,"-item-danger")]:{backgroundColor:k}},["&".concat(n,"-submenu > ").concat(n)]:{backgroundColor:N},["&".concat(n,"-popup > ").concat(n)]:{backgroundColor:j},["&".concat(n,"-submenu-popup > ").concat(n)]:{backgroundColor:j},["&".concat(n,"-horizontal")]:Object.assign(Object.assign({},"dark"===t?{borderBottom:0}:{}),{["> ".concat(n,"-item, > ").concat(n,"-submenu")]:{top:m,marginTop:e.calc(m).mul(-1).equal(),marginBottom:0,borderRadius:R,"&::after":{position:"absolute",insetInline:f,bottom:0,borderBottom:"".concat((0,w.bf)(s)," solid transparent"),transition:"border-color ".concat(p," ").concat(g),content:'""'},"&:hover, &-active, &-open":{background:Z,"&::after":{borderBottomWidth:s,borderBottomColor:T}},"&-selected":{color:T,backgroundColor:P,"&:hover":{backgroundColor:P},"&::after":{borderBottomWidth:s,borderBottomColor:T}}}}),["&".concat(n,"-root")]:{["&".concat(n,"-inline, &").concat(n,"-vertical")]:{borderInlineEnd:"".concat((0,w.bf)(m)," ").concat(y," ").concat(x)}},["&".concat(n,"-inline")]:{["".concat(n,"-sub").concat(n,"-inline")]:{background:l},["".concat(n,"-item")]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:"".concat((0,w.bf)(u)," solid ").concat(a),transform:"scaleY(0.0001)",opacity:0,transition:["transform ".concat(h," ").concat(b),"opacity ".concat(h," ").concat(b)].join(","),content:'""'},["&".concat(n,"-item-danger")]:{"&::after":{borderInlineEndColor:O}}},["".concat(n,"-selected, ").concat(n,"-item-selected")]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform ".concat(h," ").concat(g),"opacity ".concat(h," ").concat(g)].join(",")}}}}}};let P=e=>{let{componentCls:t,itemHeight:n,itemMarginInline:o,padding:a,menuArrowSize:c,marginXS:r,itemMarginBlock:i,itemWidth:l,itemPaddingInline:d}=e,s=e.calc(c).add(a).add(r).equal();return{["".concat(t,"-item")]:{position:"relative",overflow:"hidden"},["".concat(t,"-item, ").concat(t,"-submenu-title")]:{height:n,lineHeight:(0,w.bf)(n),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:o,marginBlock:i,width:l},["> ".concat(t,"-item,\n > ").concat(t,"-submenu > ").concat(t,"-submenu-title")]:{height:n,lineHeight:(0,w.bf)(n)},["".concat(t,"-item-group-list ").concat(t,"-submenu-title,\n ").concat(t,"-submenu-title")]:{paddingInlineEnd:s}}};var R=e=>{let{componentCls:t,iconCls:n,itemHeight:o,colorTextLightSolid:a,dropdownWidth:c,controlHeightLG:r,motionEaseOut:i,paddingXL:l,itemMarginInline:d,fontSizeLG:s,motionDurationFast:u,motionDurationSlow:m,paddingXS:p,boxShadowSecondary:g,collapsedWidth:b,collapsedIconSize:f}=e,h={height:o,lineHeight:(0,w.bf)(o),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({["&".concat(t,"-root")]:{boxShadow:"none"}},P(e))},["".concat(t,"-submenu-popup")]:{["".concat(t,"-vertical")]:Object.assign(Object.assign({},P(e)),{boxShadow:g})}},{["".concat(t,"-submenu-popup ").concat(t,"-vertical").concat(t,"-sub")]:{minWidth:c,maxHeight:"calc(100vh - ".concat((0,w.bf)(e.calc(r).mul(2.5).equal()),")"),padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{["".concat(t,"-inline")]:{width:"100%",["&".concat(t,"-root")]:{["".concat(t,"-item, ").concat(t,"-submenu-title")]:{display:"flex",alignItems:"center",transition:["border-color ".concat(m),"background ".concat(m),"padding ".concat(u," ").concat(i)].join(","),["> ".concat(t,"-title-content")]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},["".concat(t,"-sub").concat(t,"-inline")]:{padding:0,border:0,borderRadius:0,boxShadow:"none",["& > ".concat(t,"-submenu > ").concat(t,"-submenu-title")]:h,["& ".concat(t,"-item-group-title")]:{paddingInlineStart:l}},["".concat(t,"-item")]:h}},{["".concat(t,"-inline-collapsed")]:{width:b,["&".concat(t,"-root")]:{["".concat(t,"-item, ").concat(t,"-submenu ").concat(t,"-submenu-title")]:{["> ".concat(t,"-inline-collapsed-noicon")]:{fontSize:s,textAlign:"center"}}},["> ".concat(t,"-item,\n > ").concat(t,"-item-group > ").concat(t,"-item-group-list > ").concat(t,"-item,\n > ").concat(t,"-item-group > ").concat(t,"-item-group-list > ").concat(t,"-submenu > ").concat(t,"-submenu-title,\n > ").concat(t,"-submenu > ").concat(t,"-submenu-title")]:{insetInlineStart:0,paddingInline:"calc(50% - ".concat((0,w.bf)(e.calc(f).div(2).equal())," - ").concat((0,w.bf)(d),")"),textOverflow:"clip",["\n ".concat(t,"-submenu-arrow,\n ").concat(t,"-submenu-expand-icon\n ")]:{opacity:0},["".concat(t,"-item-icon, ").concat(n)]:{margin:0,fontSize:f,lineHeight:(0,w.bf)(o),"+ span":{display:"inline-block",opacity:0}}},["".concat(t,"-item-icon, ").concat(n)]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",["".concat(t,"-item-icon, ").concat(n)]:{display:"none"},"a, a:hover":{color:a}},["".concat(t,"-item-group-title")]:Object.assign(Object.assign({},C.vS),{paddingInline:p})}}]};let Z=e=>{let{componentCls:t,motionDurationSlow:n,motionDurationMid:o,motionEaseInOut:a,motionEaseOut:c,iconCls:r,iconSize:i,iconMarginInlineEnd:l}=e;return{["".concat(t,"-item, ").concat(t,"-submenu-title")]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:["border-color ".concat(n),"background ".concat(n),"padding calc(".concat(n," + 0.1s) ").concat(a)].join(","),["".concat(t,"-item-icon, ").concat(r)]:{minWidth:i,fontSize:i,transition:["font-size ".concat(o," ").concat(c),"margin ".concat(n," ").concat(a),"color ".concat(n)].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:["opacity ".concat(n," ").concat(a),"margin ".concat(n),"color ".concat(n)].join(",")}},["".concat(t,"-item-icon")]:Object.assign({},(0,C.Ro)()),["&".concat(t,"-item-only-child")]:{["> ".concat(r,", > ").concat(t,"-item-icon")]:{marginInlineEnd:0}}},["".concat(t,"-item-disabled, ").concat(t,"-submenu-disabled")]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},["> ".concat(t,"-submenu-title")]:{color:"inherit !important",cursor:"not-allowed"}}}},M=e=>{let{componentCls:t,motionDurationSlow:n,motionEaseInOut:o,borderRadius:a,menuArrowSize:c,menuArrowOffset:r}=e;return{["".concat(t,"-submenu")]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:c,color:"currentcolor",transform:"translateY(-50%)",transition:"transform ".concat(n," ").concat(o,", opacity ").concat(n)},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(c).mul(.6).equal(),height:e.calc(c).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:a,transition:["background ".concat(n," ").concat(o),"transform ".concat(n," ").concat(o),"top ".concat(n," ").concat(o),"color ".concat(n," ").concat(o)].join(","),content:'""'},"&::before":{transform:"rotate(45deg) translateY(".concat((0,w.bf)(e.calc(r).mul(-1).equal()),")")},"&::after":{transform:"rotate(-45deg) translateY(".concat((0,w.bf)(r),")")}}}}},W=e=>{let{antCls:t,componentCls:n,fontSize:o,motionDurationSlow:a,motionDurationMid:c,motionEaseInOut:r,paddingXS:i,padding:l,colorSplit:d,lineWidth:s,zIndexPopup:u,borderRadiusLG:m,subMenuItemBorderRadius:p,menuArrowSize:g,menuArrowOffset:b,lineType:f,groupTitleLineHeight:h,groupTitleFontSize:v}=e;return[{"":{[n]:Object.assign(Object.assign({},(0,C.dF)()),{"&-hidden":{display:"none"}})},["".concat(n,"-submenu-hidden")]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,C.Wf)(e)),(0,C.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:o,lineHeight:0,listStyle:"none",outline:"none",transition:"width ".concat(a," cubic-bezier(0.2, 0, 0, 1) 0s"),"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",["".concat(n,"-item")]:{flex:"none"}},["".concat(n,"-item, ").concat(n,"-submenu, ").concat(n,"-submenu-title")]:{borderRadius:e.itemBorderRadius},["".concat(n,"-item-group-title")]:{padding:"".concat((0,w.bf)(i)," ").concat((0,w.bf)(l)),fontSize:v,lineHeight:h,transition:"all ".concat(a)},["&-horizontal ".concat(n,"-submenu")]:{transition:["border-color ".concat(a," ").concat(r),"background ".concat(a," ").concat(r)].join(",")},["".concat(n,"-submenu, ").concat(n,"-submenu-inline")]:{transition:["border-color ".concat(a," ").concat(r),"background ".concat(a," ").concat(r),"padding ".concat(c," ").concat(r)].join(",")},["".concat(n,"-submenu ").concat(n,"-sub")]:{cursor:"initial",transition:["background ".concat(a," ").concat(r),"padding ".concat(a," ").concat(r)].join(",")},["".concat(n,"-title-content")]:{transition:"color ".concat(a),"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},["> ".concat(t,"-typography-ellipsis-single-line")]:{display:"inline",verticalAlign:"unset"},["".concat(n,"-item-extra")]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},["".concat(n,"-item a")]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},["".concat(n,"-item-divider")]:{overflow:"hidden",lineHeight:0,borderColor:d,borderStyle:f,borderWidth:0,borderTopWidth:s,marginBlock:s,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Z(e)),{["".concat(n,"-item-group")]:{["".concat(n,"-item-group-list")]:{margin:0,padding:0,["".concat(n,"-item, ").concat(n,"-submenu-title")]:{paddingInline:"".concat((0,w.bf)(e.calc(o).mul(2).equal())," ").concat((0,w.bf)(l))}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:u,borderRadius:m,boxShadow:"none",transformOrigin:"0 0",["&".concat(n,"-submenu")]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},["> ".concat(n)]:Object.assign(Object.assign(Object.assign({borderRadius:m},Z(e)),M(e)),{["".concat(n,"-item, ").concat(n,"-submenu > ").concat(n,"-submenu-title")]:{borderRadius:p},["".concat(n,"-submenu-title::after")]:{transition:"transform ".concat(a," ").concat(r)}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),M(e)),{["&-inline-collapsed ".concat(n,"-submenu-arrow,\n &-inline ").concat(n,"-submenu-arrow")]:{"&::before":{transform:"rotate(-45deg) translateX(".concat((0,w.bf)(b),")")},"&::after":{transform:"rotate(45deg) translateX(".concat((0,w.bf)(e.calc(b).mul(-1).equal()),")")}},["".concat(n,"-submenu-open").concat(n,"-submenu-inline > ").concat(n,"-submenu-title > ").concat(n,"-submenu-arrow")]:{transform:"translateY(".concat((0,w.bf)(e.calc(g).mul(.2).mul(-1).equal()),")"),"&::after":{transform:"rotate(-45deg) translateX(".concat((0,w.bf)(e.calc(b).mul(-1).equal()),")")},"&::before":{transform:"rotate(45deg) translateX(".concat((0,w.bf)(b),")")}}})},{["".concat(t,"-layout-header")]:{[n]:{lineHeight:"inherit"}}}]},D=e=>{var t,n,o;let{colorPrimary:a,colorError:c,colorTextDisabled:r,colorErrorBg:i,colorText:l,colorTextDescription:d,colorBgContainer:s,colorFillAlter:u,colorFillContent:m,lineWidth:p,lineWidthBold:g,controlItemBgActive:b,colorBgTextHover:f,controlHeightLG:h,lineHeight:v,colorBgElevated:y,marginXXS:x,padding:I,fontSize:w,controlHeightSM:C,fontSizeLG:O,colorTextLightSolid:B,colorErrorHover:k}=e,j=null!==(t=e.activeBarWidth)&&void 0!==t?t:0,z=null!==(n=e.activeBarBorderWidth)&&void 0!==n?n:p,E=null!==(o=e.itemMarginInline)&&void 0!==o?o:e.marginXXS,N=new S.t(B).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:a,horizontalItemHoverColor:a,colorGroupTitle:d,groupTitleColor:d,colorItemTextSelected:a,itemSelectedColor:a,subMenuItemSelectedColor:a,colorItemTextSelectedHorizontal:a,horizontalItemSelectedColor:a,colorItemBg:s,itemBg:s,colorItemBgHover:f,itemHoverBg:f,colorItemBgActive:m,itemActiveBg:b,colorSubItemBg:u,subMenuItemBg:u,colorItemBgSelected:b,itemSelectedBg:b,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:j,colorActiveBarHeight:g,activeBarHeight:g,colorActiveBarBorderSize:p,activeBarBorderWidth:z,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:c,dangerItemColor:c,colorDangerItemTextHover:c,dangerItemHoverColor:c,colorDangerItemTextSelected:c,dangerItemSelectedColor:c,colorDangerItemBgActive:i,dangerItemActiveBg:i,colorDangerItemBgSelected:i,dangerItemSelectedBg:i,itemMarginInline:E,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:h,groupTitleLineHeight:v,collapsedWidth:2*h,popupBg:y,itemMarginBlock:x,itemPaddingInline:I,horizontalLineHeight:"".concat(1.15*h,"px"),iconSize:w,iconMarginInlineEnd:C-w,collapsedIconSize:O,groupTitleFontSize:w,darkItemDisabledColor:new S.t(B).setA(.25).toRgbString(),darkItemColor:N,darkDangerItemColor:c,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:B,darkItemSelectedBg:a,darkDangerItemSelectedBg:c,darkItemHoverBg:"transparent",darkGroupTitleColor:N,darkItemHoverColor:B,darkDangerItemHoverColor:k,darkDangerItemSelectedColor:B,darkDangerItemActiveBg:c,itemWidth:j?"calc(100% + ".concat(z,"px)"):"calc(100% - ".concat(2*E,"px)")}};var A=n(62236),L=e=>{var t;let n;let{popupClassName:c,icon:r,title:i,theme:d}=e,u=o.useContext(b),{prefixCls:p,inlineCollapsed:g,theme:f}=u,h=(0,a.Xl)();if(r){let e=o.isValidElement(i)&&"span"===i.type;n=o.createElement(o.Fragment,null,(0,m.Tm)(r,{className:l()(o.isValidElement(r)?null===(t=r.props)||void 0===t?void 0:t.className:void 0,"".concat(p,"-item-icon"))}),e?i:o.createElement("span",{className:"".concat(p,"-title-content")},i))}else n=g&&!h.length&&i&&"string"==typeof i?o.createElement("div",{className:"".concat(p,"-inline-collapsed-noicon")},i.charAt(0)):o.createElement("span",{className:"".concat(p,"-title-content")},i);let v=o.useMemo(()=>Object.assign(Object.assign({},u),{firstLevel:!1}),[u]),[y]=(0,A.Cn)("Menu");return o.createElement(b.Provider,{value:v},o.createElement(a.Wd,Object.assign({},(0,s.Z)(e,["icon"]),{title:n,popupClassName:l()(p,c,"".concat(p,"-").concat(d||f)),popupStyle:Object.assign({zIndex:y},e.popupStyle)})))},G=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};function X(e){return null===e||!1===e}let _={item:x,submenu:L,divider:h},q=(0,o.forwardRef)((e,t)=>{var n;let c=o.useContext(I.Z),i=c||{},{getPrefixCls:f,getPopupContainer:h,direction:v,menu:y}=o.useContext(p.E_),x=f(),{prefixCls:w,className:S,style:C,theme:H="light",expandIcon:P,_internalDisableMenuItemTitleTooltip:Z,inlineCollapsed:M,siderCollapsed:A,rootClassName:L,mode:q,selectable:F,onClick:Y,overflowedIndicatorPopupClassName:V}=e,$=G(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),J=(0,s.Z)($,["collapsedWidth"]);null===(n=i.validator)||void 0===n||n.call(i,{mode:q});let Q=(0,d.Z)(function(){for(var e,t=arguments.length,n=Array(t),o=0;o1&&void 0!==arguments[1]?arguments[1]:e,n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return(0,j.I$)("Menu",e=>{let{colorBgElevated:t,controlHeightLG:n,fontSize:o,darkItemColor:a,darkDangerItemColor:c,darkItemBg:r,darkSubMenuItemBg:i,darkItemSelectedColor:l,darkItemSelectedBg:d,darkDangerItemSelectedBg:s,darkItemHoverBg:u,darkGroupTitleColor:m,darkItemHoverColor:p,darkItemDisabledColor:g,darkDangerItemHoverColor:b,darkDangerItemSelectedColor:f,darkDangerItemActiveBg:h,popupBg:v,darkPopupBg:y}=e,x=e.calc(o).div(7).mul(5).equal(),I=(0,z.IX)(e,{menuArrowSize:x,menuHorizontalHeight:e.calc(n).mul(1.15).equal(),menuArrowOffset:e.calc(x).mul(.25).equal(),menuSubMenuBg:t,calc:e.calc,popupBg:v}),w=(0,z.IX)(I,{itemColor:a,itemHoverColor:p,groupTitleColor:m,itemSelectedColor:l,subMenuItemSelectedColor:l,itemBg:r,popupBg:y,subMenuItemBg:i,itemActiveBg:"transparent",itemSelectedBg:d,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:u,itemDisabledColor:g,dangerItemColor:c,dangerItemHoverColor:b,dangerItemSelectedColor:f,dangerItemActiveBg:h,dangerItemSelectedBg:s,menuSubMenuBg:i,horizontalItemSelectedColor:l,horizontalItemSelectedBg:d});return[W(I),E(I),R(I),T(I,"light"),T(w,"dark"),N(I),(0,O.Z)(I),(0,B.oN)(I,"slide-up"),(0,B.oN)(I,"slide-down"),(0,k._y)(I,"zoom-big")]},D,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t)}(en,eo,!c),ei=l()("".concat(en,"-").concat(H),null==y?void 0:y.className,S),el=o.useMemo(()=>{var e,t;if("function"==typeof P||X(P))return P||null;if("function"==typeof i.expandIcon||X(i.expandIcon))return i.expandIcon||null;if("function"==typeof(null==y?void 0:y.expandIcon)||X(null==y?void 0:y.expandIcon))return(null==y?void 0:y.expandIcon)||null;let n=null!==(e=null!=P?P:null==i?void 0:i.expandIcon)&&void 0!==e?e:null==y?void 0:y.expandIcon;return(0,m.Tm)(n,{className:l()("".concat(en,"-submenu-expand-icon"),o.isValidElement(n)?null===(t=n.props)||void 0===t?void 0:t.className:void 0)})},[P,null==i?void 0:i.expandIcon,null==y?void 0:y.expandIcon,en]),ed=o.useMemo(()=>({prefixCls:en,inlineCollapsed:ee||!1,direction:v,firstLevel:!0,theme:H,mode:U,disableMenuItemTitleTooltip:Z}),[en,ee,v,Z,H]);return ea(o.createElement(I.Z.Provider,{value:null},o.createElement(b.Provider,{value:ed},o.createElement(a.ZP,Object.assign({getPopupContainer:h,overflowedIndicator:o.createElement(r.Z,null),overflowedIndicatorPopupClassName:l()(en,"".concat(en,"-").concat(H),V),mode:U,selectable:K,onClick:Q},J,{inlineCollapsed:ee,style:Object.assign(Object.assign({},null==y?void 0:y.style),C),className:ei,prefixCls:en,direction:v,defaultMotions:et,expandIcon:el,ref:t,rootClassName:l()(L,ec,i.rootClassName,er,eo),_internalComponents:_})))))}),F=(0,o.forwardRef)((e,t)=>{let n=(0,o.useRef)(null),a=o.useContext(c.D);return(0,o.useImperativeHandle)(t,()=>({menu:n.current,focus:e=>{var t;null===(t=n.current)||void 0===t||t.focus(e)}})),o.createElement(q,Object.assign({ref:n},e,a))});F.Item=x,F.SubMenu=L,F.Divider=h,F.ItemGroup=a.BW;var Y=F},58760:function(e,t,n){n.d(t,{Z:function(){return B}});var o=n(2265),a=n(36760),c=n.n(a),r=n(45287);function i(e){return["small","middle","large"].includes(e)}function l(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}var d=n(71744),s=n(77685),u=n(17691),m=n(99320);let p=e=>{let{componentCls:t,borderRadius:n,paddingSM:o,colorBorder:a,paddingXS:c,fontSizeLG:r,fontSizeSM:i,borderRadiusLG:l,borderRadiusSM:d,colorBgContainerDisabled:s,lineWidth:m}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:o,margin:0,background:s,borderWidth:m,borderStyle:"solid",borderColor:a,borderRadius:n,"&-large":{fontSize:r,borderRadius:l},"&-small":{paddingInline:c,borderRadius:d,fontSize:i},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},(0,u.c)(e,{focus:!1})]}};var g=(0,m.I$)(["Space","Addon"],e=>[p(e)]),b=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let f=o.forwardRef((e,t)=>{let{className:n,children:a,style:r,prefixCls:i}=e,l=b(e,["className","children","style","prefixCls"]),{getPrefixCls:u,direction:m}=o.useContext(d.E_),p=u("space-addon",i),[f,h,v]=g(p),{compactItemClassnames:y,compactSize:x}=(0,s.ri)(p,m),I=c()(p,h,y,v,{["".concat(p,"-").concat(x)]:x},n);return f(o.createElement("div",Object.assign({ref:t,className:I,style:r},l),a))}),h=o.createContext({latestIndex:0}),v=h.Provider;var y=e=>{let{className:t,index:n,children:a,split:c,style:r}=e,{latestIndex:i}=o.useContext(h);return null==a?null:o.createElement(o.Fragment,null,o.createElement("div",{className:t,style:r},a),n{let{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},["".concat(t,"-item:empty")]:{display:"none"},["".concat(t,"-item > ").concat(n,"-badge-not-a-wrapper:only-child")]:{display:"block"}}}},w=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}};var S=(0,m.I$)("Space",e=>{let t=(0,x.IX)(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[I(t),w(t)]},()=>({}),{resetStyle:!1}),C=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,o=Object.getOwnPropertySymbols(e);at.indexOf(o[a])&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};let O=o.forwardRef((e,t)=>{var n;let{getPrefixCls:a,direction:s,size:u,className:m,style:p,classNames:g,styles:b}=(0,d.dj)("space"),{size:f=null!=u?u:"small",align:h,className:x,rootClassName:I,children:w,direction:O="horizontal",prefixCls:B,split:k,style:j,wrap:z=!1,classNames:E,styles:N}=e,H=C(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[T,P]=Array.isArray(f)?f:[f,f],R=i(P),Z=i(T),M=l(P),W=l(T),D=(0,r.Z)(w,{keepEmpty:!0}),A=void 0===h&&"horizontal"===O?"center":h,L=a("space",B),[G,X,_]=S(L),q=c()(L,m,X,"".concat(L,"-").concat(O),{["".concat(L,"-rtl")]:"rtl"===s,["".concat(L,"-align-").concat(A)]:A,["".concat(L,"-gap-row-").concat(P)]:R,["".concat(L,"-gap-col-").concat(T)]:Z},x,I,_),F=c()("".concat(L,"-item"),null!==(n=null==E?void 0:E.item)&&void 0!==n?n:g.item),Y=Object.assign(Object.assign({},b.item),null==N?void 0:N.item),V=D.map((e,t)=>{let n=(null==e?void 0:e.key)||"".concat(F,"-").concat(t);return o.createElement(y,{className:F,key:n,index:t,split:k,style:Y},e)}),$=o.useMemo(()=>({latestIndex:D.reduce((e,t,n)=>null!=t?n:e,0)}),[D]);if(0===D.length)return null;let J={};return z&&(J.flexWrap="wrap"),!Z&&W&&(J.columnGap=T),!R&&M&&(J.rowGap=P),G(o.createElement("div",Object.assign({ref:t,className:q,style:Object.assign(Object.assign(Object.assign({},J),p),j)},H),o.createElement(v,{value:$},V)))});O.Compact=s.ZP,O.Addon=f;var B=O}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7526-e76a2c2b549bf2d2.js b/litellm/proxy/_experimental/out/_next/static/chunks/7526-e76a2c2b549bf2d2.js
deleted file mode 100644
index 11f4d19cb27..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/7526-e76a2c2b549bf2d2.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7526],{19130:function(e,t,n){n.d(t,{RM:function(){return s.Z},SC:function(){return o.Z},iA:function(){return a.Z},pj:function(){return r.Z},ss:function(){return i.Z},xs:function(){return l.Z}});var a=n(21626),s=n(97214),r=n(28241),i=n(58834),l=n(69552),o=n(71876)},23133:function(e,t,n){n.d(t,{w:function(){return l}});var a=n(2265),s=n(9245);function r(e){let t=t=>{"disableShowPrompts"===t.key&&e()},n=t=>{let{key:n}=t.detail;"disableShowPrompts"===n&&e()};return window.addEventListener("storage",t),window.addEventListener(s.Qg,n),()=>{window.removeEventListener("storage",t),window.removeEventListener(s.Qg,n)}}function i(){return"true"===(0,s.le)("disableShowPrompts")}function l(){return(0,a.useSyncExternalStore)(r,i)}},8048:function(e,t,n){n.d(t,{C:function(){return m}});var a=n(57437),s=n(71594),r=n(24525),i=n(2265),l=n(19130),o=n(44633),c=n(86462),d=n(49084);function m(e){let{data:t=[],columns:n,isLoading:m=!1,defaultSorting:p=[],pagination:u,onPaginationChange:g,enablePagination:h=!1}=e,[x,f]=i.useState(p),[_]=i.useState("onChange"),[b,v]=i.useState({}),[j,y]=i.useState({}),N=(0,s.b7)({data:t,columns:n,state:{sorting:x,columnSizing:b,columnVisibility:j,...h&&u?{pagination:u}:{}},columnResizeMode:_,onSortingChange:f,onColumnSizingChange:v,onColumnVisibilityChange:y,...h&&g?{onPaginationChange:g}:{},getCoreRowModel:(0,r.sC)(),getSortedRowModel:(0,r.tj)(),...h?{getPaginationRowModel:(0,r.G_)()}:{},enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,a.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("div",{className:"relative min-w-full",children:(0,a.jsxs)(l.iA,{className:"[&_td]:py-2 [&_th]:py-2 w-full",children:[(0,a.jsx)(l.ss,{children:N.getHeaderGroups().map(e=>(0,a.jsx)(l.SC,{children:e.headers.map(e=>{var t;return(0,a.jsxs)(l.xs,{className:"py-1 h-8 relative ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,s.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,a.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,a.jsx)(o.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,a.jsx)(c.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,a.jsx)(d.Z,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,a.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:"absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ".concat(e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200")})]},e.id)})},e.id))}),(0,a.jsx)(l.RM,{children:m?(0,a.jsx)(l.SC,{children:(0,a.jsx)(l.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:"\uD83D\uDE85 Loading models..."})})})}):N.getRowModel().rows.length>0?N.getRowModel().rows.map(e=>(0,a.jsx)(l.SC,{children:e.getVisibleCells().map(e=>{var t;return(0,a.jsx)(l.pj,{className:"py-0.5 ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,s.ie)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):(0,a.jsx)(l.SC,{children:(0,a.jsx)(l.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:"No models found"})})})})})]})})})})}},92004:function(e,t,n){n.d(t,{Z:function(){return k}});var a=n(57437),s=n(19250),r=n(11713);let i=(0,n(90246).n)("healthReadiness"),l=async()=>{let e=(0,s.getProxyBaseUrl)(),t=await fetch("".concat(e,"/health/readiness"));if(!t.ok)throw Error("Failed to fetch health readiness: ".concat(t.statusText));return t.json()},o=()=>(0,r.a)({queryKey:i.detail("readiness"),queryFn:l,staleTime:3e5});var c=n(23133),d=n(69734),m=n(3914),p=n(9245),u=n(91624),g=n(15883),h=n(46346),x=n(57400),f=n(91870),_=n(40428),b=n(83884),v=n(45524),j=n(20949),y=n(4683),N=n(99981),w=n(63709),S=n(5545),A=n(73705),C=n(27648),I=n(2265),k=e=>{let{userID:t,userEmail:n,userRole:r,premiumUser:i,proxySettings:l,setProxySettings:k,accessToken:Z,isPublicPage:E=!1,sidebarCollapsed:M=!1,onToggleSidebar:P,isDarkMode:O,toggleDarkMode:T}=e,D=(0,s.getProxyBaseUrl)(),[L,z]=(0,I.useState)(""),[R,H]=(0,I.useState)(!1),F=(0,c.w)(),{logoUrl:G}=(0,d.F)(),{data:K}=o(),U=null==K?void 0:K.litellm_version,B=G||"".concat(D,"/get_image");(0,I.useEffect)(()=>{(async()=>{if(Z){let e=await (0,u.C)(Z);console.log("response from fetchProxySettings",e),e&&k(e)}})()},[Z]),(0,I.useEffect)(()=>{H("true"===(0,p.le)("disableShowNewBadge"))},[]),(0,I.useEffect)(()=>{z((null==l?void 0:l.PROXY_LOGOUT_URL)||"")},[l]);let V=[{key:"user-info",onClick:e=>{var t;return null===(t=e.domEvent)||void 0===t?void 0:t.stopPropagation()},label:(0,a.jsxs)("div",{className:"px-3 py-3 border-b border-gray-100",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(g.Z,{className:"mr-2 text-gray-700"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:t})]}),i?(0,a.jsx)(N.Z,{title:"Premium User",placement:"left",children:(0,a.jsxs)("div",{className:"flex items-center bg-gradient-to-r from-amber-500 to-yellow-500 text-white px-2 py-0.5 rounded-full cursor-help",children:[(0,a.jsx)(h.Z,{className:"mr-1 text-xs"}),(0,a.jsx)("span",{className:"text-xs font-medium",children:"Premium"})]})}):(0,a.jsx)(N.Z,{title:"Upgrade to Premium for advanced features",placement:"left",children:(0,a.jsxs)("div",{className:"flex items-center bg-gray-100 text-gray-500 px-2 py-0.5 rounded-full cursor-help",children:[(0,a.jsx)(h.Z,{className:"mr-1 text-xs"}),(0,a.jsx)("span",{className:"text-xs font-medium",children:"Standard"})]})})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center text-sm",children:[(0,a.jsx)(x.Z,{className:"mr-2 text-gray-400 text-xs"}),(0,a.jsx)("span",{className:"text-gray-500 text-xs",children:"Role"}),(0,a.jsx)("span",{className:"ml-auto text-gray-700 font-medium",children:r})]}),(0,a.jsxs)("div",{className:"flex items-center text-sm",children:[(0,a.jsx)(f.Z,{className:"mr-2 text-gray-400 text-xs"}),(0,a.jsx)("span",{className:"text-gray-500 text-xs",children:"Email"}),(0,a.jsx)("span",{className:"ml-auto text-gray-700 font-medium truncate max-w-[150px]",title:n||"Unknown",children:n||"Unknown"})]}),(0,a.jsxs)("div",{className:"flex items-center text-sm pt-2 mt-2 border-t border-gray-100",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("span",{className:"text-gray-500 text-xs",children:"Hide New Feature Indicators"}),(0,a.jsx)(w.Z,{className:"ml-auto",size:"small",checked:R,onChange:e=>{H(e),e?(0,p.D$)("disableShowNewBadge","true"):(0,p.e8)("disableShowNewBadge"),(0,p.nO)("disableShowNewBadge")},"aria-label":"Toggle hide new feature indicators"})]}),(0,a.jsxs)("div",{className:"flex items-center text-sm pt-2 mt-2 border-t border-gray-100",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("span",{className:"text-gray-500 text-xs",children:"Hide All Prompts"}),(0,a.jsx)(w.Z,{className:"ml-auto",size:"small",checked:F,onChange:e=>{e?(0,p.D$)("disableShowPrompts","true"):(0,p.e8)("disableShowPrompts"),(0,p.nO)("disableShowPrompts")},"aria-label":"Toggle hide all prompts"})]})]})]})},{key:"logout",label:(0,a.jsxs)("div",{className:"flex items-center py-2 px-3 hover:bg-gray-50 rounded-md mx-1 my-1",onClick:()=>{(0,m.b)(),window.location.href=L},children:[(0,a.jsx)(_.Z,{className:"mr-3 text-gray-600"}),(0,a.jsx)("span",{className:"text-gray-800",children:"Logout"})]})}];return(0,a.jsx)("nav",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:(0,a.jsx)("div",{className:"w-full",children:(0,a.jsxs)("div",{className:"flex items-center h-14 px-4",children:[(0,a.jsxs)("div",{className:"flex items-center flex-shrink-0",children:[P&&(0,a.jsx)("button",{onClick:P,className:"flex items-center justify-center w-10 h-10 mr-2 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded transition-colors",title:M?"Expand sidebar":"Collapse sidebar",children:(0,a.jsx)("span",{className:"text-lg",children:M?(0,a.jsx)(b.Z,{}):(0,a.jsx)(v.Z,{})})}),(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(C.default,{href:D||"/",className:"flex items-center",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("img",{src:B,alt:"LiteLLM Brand",className:"h-10 w-auto"}),(0,a.jsx)("span",{className:"absolute -top-1 -right-2 text-lg animate-bounce",style:{animationDuration:"2s"},title:"Happy Holidays!",children:"❄️"})]})}),U&&(0,a.jsxs)("a",{href:"https://docs.litellm.ai/release_notes",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-gray-500 border border-gray-200 rounded-lg px-2 py-0.5 bg-gray-50 font-medium -ml-2 hover:bg-gray-100 transition-colors cursor-pointer z-10",children:["v",U]})]})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-5 ml-auto",children:[(0,a.jsx)(S.ZP,{href:"https://www.litellm.ai/support",target:"_blank",rel:"noopener noreferrer",icon:(0,a.jsx)(j.Z,{}),className:"shadow-md shadow-indigo-500/20 hover:shadow-indigo-500/50 transition-shadow",children:"Join Slack"}),(0,a.jsx)(S.ZP,{href:"https://github.com/BerriAI/litellm",target:"_blank",rel:"noopener noreferrer",className:"shadow-md shadow-indigo-500/20 hover:shadow-indigo-500/50 transition-shadow",icon:(0,a.jsx)(y.Z,{}),children:"Star us on GitHub"}),!1,(0,a.jsx)("a",{href:"https://docs.litellm.ai/docs/",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-gray-600 hover:text-gray-900 transition-colors",children:"Docs"}),!E&&(0,a.jsx)(A.Z,{menu:{items:V,className:"min-w-[200px]",style:{padding:"8px",marginTop:"8px",borderRadius:"12px",boxShadow:"0 4px 24px rgba(0, 0, 0, 0.08)"}},overlayStyle:{minWidth:"200px"},children:(0,a.jsxs)("button",{className:"inline-flex items-center text-sm text-gray-600 hover:text-gray-900 transition-colors",children:["User",(0,a.jsx)("svg",{className:"ml-1 w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M19 9l-7 7-7-7"})})]})})]})]})})})}},82971:function(e,t,n){n.d(t,{L:function(){return s}});var a=n(8443);let s=e=>{let t;let{apiKeySource:n,accessToken:s,apiKey:r,inputMessage:i,chatHistory:l,selectedTags:o,selectedVectorStores:c,selectedGuardrails:d,selectedPolicies:m,selectedMCPServers:p,mcpServers:u,mcpServerToolRestrictions:g,selectedVoice:h,endpointType:x,selectedModel:f,selectedSdk:_,proxySettings:b}=e,v="session"===n?s:r,j=window.location.origin,y=null==b?void 0:b.LITELLM_UI_API_DOC_BASE_URL;y&&y.trim()?j=y:(null==b?void 0:b.PROXY_BASE_URL)&&(j=b.PROXY_BASE_URL);let N=i||"Your prompt here",w=N.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),S=l.filter(e=>!e.isImage).map(e=>{let{role:t,content:n}=e;return{role:t,content:n}}),A={};o.length>0&&(A.tags=o),c.length>0&&(A.vector_stores=c),d.length>0&&(A.guardrails=d),m.length>0&&(A.policies=m);let C=f||"your-model-name",I="azure"===_?'import openai\n\nclient = openai.AzureOpenAI(\n api_key="'.concat(v||"YOUR_LITELLM_API_KEY",'",\n azure_endpoint="').concat(j,'",\n api_version="2024-02-01"\n)'):'import openai\n\nclient = openai.OpenAI(\n api_key="'.concat(v||"YOUR_LITELLM_API_KEY",'",\n base_url="').concat(j,'"\n)');switch(x){case a.KP.CHAT:{let e=Object.keys(A).length>0,n="";if(e){let e=JSON.stringify({metadata:A},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();n=",\n extra_body=".concat(e)}let a=S.length>0?S:[{role:"user",content:N}];t='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.chat.completions.create(\n model="'.concat(C,'",\n messages=').concat(JSON.stringify(a,null,4)).concat(n,'\n)\n\nprint(response)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.chat.completions.create(\n# model="').concat(C,'",\n# messages=[\n# {\n# "role": "user",\n# "content": [\n# {\n# "type": "text",\n# "text": "').concat(w,'"\n# },\n# {\n# "type": "image_url",\n# "image_url": {\n# "url": f"data:image/jpeg;base64,{base64_file}" # or data:application/pdf;base64,{base64_file}\n# }\n# }\n# ]\n# }\n# ]').concat(n,"\n# )\n# print(response_with_file)\n");break}case a.KP.RESPONSES:{let e=Object.keys(A).length>0,n="";if(e){let e=JSON.stringify({metadata:A},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();n=",\n extra_body=".concat(e)}let a=S.length>0?S:[{role:"user",content:N}];t='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.responses.create(\n model="'.concat(C,'",\n input=').concat(JSON.stringify(a,null,4)).concat(n,'\n)\n\nprint(response.output_text)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.responses.create(\n# model="').concat(C,'",\n# input=[\n# {\n# "role": "user",\n# "content": [\n# {"type": "input_text", "text": "').concat(w,'"},\n# {\n# "type": "input_image",\n# "image_url": f"data:image/jpeg;base64,{base64_file}", # or data:application/pdf;base64,{base64_file}\n# },\n# ],\n# }\n# ]').concat(n,"\n# )\n# print(response_with_file.output_text)\n");break}case a.KP.IMAGE:t="azure"===_?"\n# NOTE: The Azure SDK does not have a direct equivalent to the multi-modal 'responses.create' method shown for OpenAI.\n# This snippet uses 'client.images.generate' and will create a new image based on your prompt.\n# It does not use the uploaded image, as 'client.images.generate' does not support image inputs in this context.\nimport os\nimport requests\nimport json\nimport time\nfrom PIL import Image\n\nresult = client.images.generate(\n model=\"".concat(C,'",\n prompt="').concat(i,'",\n n=1\n)\n\njson_response = json.loads(result.model_dump_json())\n\n# Set the directory for the stored image\nimage_dir = os.path.join(os.curdir, \'images\')\n\n# If the directory doesn\'t exist, create it\nif not os.path.isdir(image_dir):\n os.mkdir(image_dir)\n\n# Initialize the image path\nimage_filename = f"generated_image_{int(time.time())}.png"\nimage_path = os.path.join(image_dir, image_filename)\n\ntry:\n # Retrieve the generated image\n if json_response.get("data") && len(json_response["data"]) > 0 && json_response["data"][0].get("url"):\n image_url = json_response["data"][0]["url"]\n generated_image = requests.get(image_url).content\n with open(image_path, "wb") as image_file:\n image_file.write(generated_image)\n\n print(f"Image saved to {image_path}")\n # Display the image\n image = Image.open(image_path)\n image.show()\n else:\n print("Could not find image URL in response.")\n print("Full response:", json_response)\nexcept Exception as e:\n print(f"An error occurred: {e}")\n print("Full response:", json_response)\n'):"\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(w,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(C,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;case a.KP.IMAGE_EDITS:t="azure"===_?'\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# The prompt entered by the user\nprompt = "'.concat(w,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(C,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n'):"\nimport base64\nimport os\nimport time\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(w,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(C,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;case a.KP.EMBEDDINGS:t='\nresponse = client.embeddings.create(\n input="'.concat(i||"Your string here",'",\n model="').concat(C,'",\n encoding_format="base64" # or "float"\n)\n\nprint(response.data[0].embedding)\n');break;case a.KP.TRANSCRIPTION:t='\n# Open the audio file\naudio_file = open("path/to/your/audio/file.mp3", "rb")\n\n# Make the transcription request\nresponse = client.audio.transcriptions.create(\n model="'.concat(C,'",\n file=audio_file').concat(i?',\n prompt="'.concat(i.replace(/"/g,'\\"'),'"'):"","\n)\n\nprint(response.text)\n");break;case a.KP.SPEECH:t='\n# Make the text-to-speech request\nresponse = client.audio.speech.create(\n model="'.concat(C,'",\n input="').concat(i||"Your text to convert to speech here",'",\n voice="').concat(h,'" # Options: alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer\n)\n\n# Save the audio to a file\noutput_filename = "output_speech.mp3"\nresponse.stream_to_file(output_filename)\nprint(f"Audio saved to {output_filename}")\n\n# Optional: Customize response format and speed\n# response = client.audio.speech.create(\n# model="').concat(C,'",\n# input="').concat(i||"Your text to convert to speech here",'",\n# voice="alloy",\n# response_format="mp3", # Options: mp3, opus, aac, flac, wav, pcm\n# speed=1.0 # Range: 0.25 to 4.0\n# )\n# response.stream_to_file("output_speech.mp3")\n');break;default:t="\n# Code generation for this endpoint is not implemented yet."}return"".concat(I,"\n").concat(t)}},8443:function(e,t,n){var a,s,r,i;n.d(t,{KP:function(){return s},vf:function(){return o}}),(r=a||(a={})).AUDIO_SPEECH="audio_speech",r.AUDIO_TRANSCRIPTION="audio_transcription",r.IMAGE_GENERATION="image_generation",r.VIDEO_GENERATION="video_generation",r.CHAT="chat",r.RESPONSES="responses",r.IMAGE_EDITS="image_edits",r.ANTHROPIC_MESSAGES="anthropic_messages",r.EMBEDDING="embedding",(i=s||(s={})).IMAGE="image",i.VIDEO="video",i.CHAT="chat",i.RESPONSES="responses",i.IMAGE_EDITS="image_edits",i.ANTHROPIC_MESSAGES="anthropic_messages",i.EMBEDDINGS="embeddings",i.SPEECH="speech",i.TRANSCRIPTION="transcription",i.A2A_AGENTS="a2a_agents";let l={image_generation:"image",video_generation:"video",chat:"chat",responses:"responses",image_edits:"image_edits",anthropic_messages:"anthropic_messages",audio_speech:"speech",audio_transcription:"transcription",embedding:"embeddings"},o=e=>{if(console.log("getEndpointType:",e),Object.values(a).includes(e)){let t=l[e];return console.log("endpointType:",t),t}return"chat"}},42673:function(e,t,n){var a,s;n.d(t,{Cl:function(){return a},bK:function(){return d},cd:function(){return l},dr:function(){return o},fK:function(){return r},ph:function(){return c}}),(s=a||(a={})).A2A_Agent="A2A Agent",s.AIML="AI/ML API",s.Bedrock="Amazon Bedrock",s.Anthropic="Anthropic",s.AssemblyAI="AssemblyAI",s.SageMaker="AWS SageMaker",s.Azure="Azure",s.Azure_AI_Studio="Azure AI Foundry (Studio)",s.Cerebras="Cerebras",s.Cohere="Cohere",s.Dashscope="Dashscope",s.Databricks="Databricks (Qwen API)",s.DeepInfra="DeepInfra",s.Deepgram="Deepgram",s.Deepseek="Deepseek",s.ElevenLabs="ElevenLabs",s.FalAI="Fal AI",s.FireworksAI="Fireworks AI",s.Google_AI_Studio="Google AI Studio",s.GradientAI="GradientAI",s.Groq="Groq",s.Hosted_Vllm="vllm",s.Infinity="Infinity",s.JinaAI="Jina AI",s.MiniMax="MiniMax",s.MistralAI="Mistral AI",s.Ollama="Ollama",s.OpenAI="OpenAI",s.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",s.OpenAI_Text="OpenAI Text Completion",s.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",s.Openrouter="Openrouter",s.Oracle="Oracle Cloud Infrastructure (OCI)",s.Perplexity="Perplexity",s.RunwayML="RunwayML",s.Sambanova="Sambanova",s.Snowflake="Snowflake",s.TogetherAI="TogetherAI",s.Triton="Triton",s.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",s.VolcEngine="VolcEngine",s.Voyage="Voyage AI",s.xAI="xAI",s.SAP="SAP Generative AI Hub",s.Watsonx="Watsonx";let r={A2A_Agent:"a2a_agent",AIML:"aiml",OpenAI:"openai",OpenAI_Text:"text-completion-openai",Azure:"azure",Azure_AI_Studio:"azure_ai",Anthropic:"anthropic",Google_AI_Studio:"gemini",Bedrock:"bedrock",Groq:"groq",MiniMax:"minimax",MistralAI:"mistral",Cohere:"cohere",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",Dashscope:"dashscope",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",RunwayML:"runwayml",TogetherAI:"together_ai",Openrouter:"openrouter",Oracle:"oci",Snowflake:"snowflake",FireworksAI:"fireworks_ai",GradientAI:"gradient_ai",Triton:"triton",Deepgram:"deepgram",ElevenLabs:"elevenlabs",FalAI:"fal_ai",SageMaker:"sagemaker_chat",Voyage:"voyage",JinaAI:"jina_ai",VolcEngine:"volcengine",DeepInfra:"deepinfra",Hosted_Vllm:"hosted_vllm",Infinity:"infinity",SAP:"sap",Watsonx:"watsonx"},i="../ui/assets/logos/",l={"A2A Agent":"".concat(i,"a2a_agent.png"),"AI/ML API":"".concat(i,"aiml_api.svg"),Anthropic:"".concat(i,"anthropic.svg"),AssemblyAI:"".concat(i,"assemblyai_small.png"),Azure:"".concat(i,"microsoft_azure.svg"),"Azure AI Foundry (Studio)":"".concat(i,"microsoft_azure.svg"),"Amazon Bedrock":"".concat(i,"bedrock.svg"),"AWS SageMaker":"".concat(i,"bedrock.svg"),Cerebras:"".concat(i,"cerebras.svg"),Cohere:"".concat(i,"cohere.svg"),"Databricks (Qwen API)":"".concat(i,"databricks.svg"),Dashscope:"".concat(i,"dashscope.svg"),Deepseek:"".concat(i,"deepseek.svg"),"Fireworks AI":"".concat(i,"fireworks.svg"),Groq:"".concat(i,"groq.svg"),"Google AI Studio":"".concat(i,"google.svg"),vllm:"".concat(i,"vllm.png"),Infinity:"".concat(i,"infinity.png"),MiniMax:"".concat(i,"minimax.svg"),"Mistral AI":"".concat(i,"mistral.svg"),Ollama:"".concat(i,"ollama.svg"),OpenAI:"".concat(i,"openai_small.svg"),"OpenAI Text Completion":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Text Completion Models (Together AI, etc.)":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Endpoints (Together AI, etc.)":"".concat(i,"openai_small.svg"),Openrouter:"".concat(i,"openrouter.svg"),"Oracle Cloud Infrastructure (OCI)":"".concat(i,"oracle.svg"),Perplexity:"".concat(i,"perplexity-ai.svg"),RunwayML:"".concat(i,"runwayml.png"),Sambanova:"".concat(i,"sambanova.svg"),Snowflake:"".concat(i,"snowflake.svg"),TogetherAI:"".concat(i,"togetherai.svg"),"Vertex AI (Anthropic, Gemini, etc.)":"".concat(i,"google.svg"),xAI:"".concat(i,"xai.svg"),GradientAI:"".concat(i,"gradientai.svg"),Triton:"".concat(i,"nvidia_triton.png"),Deepgram:"".concat(i,"deepgram.png"),ElevenLabs:"".concat(i,"elevenlabs.png"),"Fal AI":"".concat(i,"fal_ai.jpg"),"Voyage AI":"".concat(i,"voyage.webp"),"Jina AI":"".concat(i,"jina.png"),VolcEngine:"".concat(i,"volcengine.png"),DeepInfra:"".concat(i,"deepinfra.png"),"SAP Generative AI Hub":"".concat(i,"sap.png")},o=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:l[e],displayName:e}}let t=Object.keys(r).find(t=>r[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let n=a[t];return{logo:l[n],displayName:n}},c=e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e||"Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";if("Google AI Studio"==e)return"gemini-pro";if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else return"gpt-3.5-turbo"},d=(e,t)=>{console.log("Provider key: ".concat(e));let n=r[e];console.log("Provider mapped to: ".concat(n));let a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(e=>{let[t,s]=e;if(null!==s&&"object"==typeof s&&"litellm_provider"in s){let e=s.litellm_provider;(e===n||"string"==typeof e&&e.includes(n))&&a.push(t)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(e=>{let[t,n]=e;null!==n&&"object"==typeof n&&"litellm_provider"in n&&"cohere_chat"===n.litellm_provider&&a.push(t)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(e=>{let[t,n]=e;null!==n&&"object"==typeof n&&"litellm_provider"in n&&"sagemaker_chat"===n.litellm_provider&&a.push(t)}))),a}},87526:function(e,t,n){n.d(t,{Z:function(){return C}});var a=n(57437),s=n(69734),r=n(3477),i=n(17732),l=n(78489),o=n(12514),c=n(84264),d=n(96761),m=n(65869),p=n(99981),u=n(3810),g=n(37592),h=n(22116),x=n(78867),f=n(33245),_=n(2265),b=n(8048),v=n(9114),j=n(92004),y=n(19250),N=n(82971),w=n(8443),S=n(42673);let{TabPane:A}=m.default;var C=e=>{var t,n,C,I,k;let{accessToken:Z,isEmbedded:E=!1}=e,[M,P]=(0,_.useState)(null),[O,T]=(0,_.useState)(null),[D,L]=(0,_.useState)(null),[z,R]=(0,_.useState)("LiteLLM Gateway"),[H,F]=(0,_.useState)(null),[G,K]=(0,_.useState)(""),[U,B]=(0,_.useState)({}),[V,W]=(0,_.useState)(!0),[q,Y]=(0,_.useState)(!0),[J,X]=(0,_.useState)(!0),[$,Q]=(0,_.useState)(""),[ee,et]=(0,_.useState)(""),[en,ea]=(0,_.useState)(""),[es,er]=(0,_.useState)([]),[ei,el]=(0,_.useState)([]),[eo,ec]=(0,_.useState)([]),[ed,em]=(0,_.useState)([]),[ep,eu]=(0,_.useState)([]),[eg,eh]=(0,_.useState)("I'm alive! ✓"),[ex,ef]=(0,_.useState)(!1),[e_,eb]=(0,_.useState)(!1),[ev,ej]=(0,_.useState)(!1),[ey,eN]=(0,_.useState)(null),[ew,eS]=(0,_.useState)(null),[eA,eC]=(0,_.useState)(null),[eI,ek]=(0,_.useState)({}),[eZ,eE]=(0,_.useState)("models");(0,_.useEffect)(()=>{(async()=>{try{await (0,y.getUiConfig)()}catch(e){console.error("Failed to get UI config:",e)}let e=async()=>{try{W(!0);let e=await (0,y.modelHubPublicModelsCall)();console.log("ModelHubData:",e),P(e)}catch(e){console.error("There was an error fetching the public model data",e),eh("Service unavailable")}finally{W(!1)}},t=async()=>{try{Y(!0);let e=await (0,y.agentHubPublicModelsCall)();console.log("AgentHubData:",e),T(e)}catch(e){console.error("There was an error fetching the public agent data",e)}finally{Y(!1)}},n=async()=>{try{X(!0);let e=await (0,y.mcpHubPublicServersCall)();console.log("MCPHubData:",e),L(e)}catch(e){console.error("There was an error fetching the public MCP server data",e)}finally{X(!1)}};(async()=>{let e=await (0,y.getPublicModelHubInfo)();console.log("Public Model Hub Info:",e),R(e.docs_title),F(e.custom_docs_description),K(e.litellm_version),B(e.useful_links||{})})(),e(),t(),n()})()},[]),(0,_.useEffect)(()=>{},[$,es,ei,eo]);let eM=(0,_.useMemo)(()=>{if(!M)return[];let e=M;if($.trim()){let t=$.toLowerCase(),n=t.split(/\s+/),a=M.filter(e=>{let a=e.model_group.toLowerCase();return!!a.includes(t)||n.every(e=>a.includes(e))});a.length>0&&(e=a.sort((e,n)=>{let a=e.model_group.toLowerCase(),s=n.model_group.toLowerCase(),r=a===t?1e3:0,i=s===t?1e3:0,l=a.startsWith(t)?100:0,o=s.startsWith(t)?100:0,c=t.split(/\s+/).every(e=>a.includes(e))?50:0,d=t.split(/\s+/).every(e=>s.includes(e))?50:0,m=a.length;return i+o+d+(1e3-s.length)-(r+l+c+(1e3-m))}))}return e.filter(e=>{let t=0===es.length||es.some(t=>e.providers.includes(t)),n=0===ei.length||ei.includes(e.mode||""),a=0===eo.length||Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).some(e=>{let[t]=e,n=t.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return eo.includes(n)});return t&&n&&a})},[M,$,es,ei,eo]),eP=(0,_.useMemo)(()=>{if(!O)return[];let e=O;if(ee.trim()){let t=ee.toLowerCase(),n=t.split(/\s+/);e=(e=O.filter(e=>{let a=e.name.toLowerCase(),s=e.description.toLowerCase();return!!(a.includes(t)||s.includes(t))||n.every(e=>a.includes(e)||s.includes(e))})).sort((e,n)=>{let a=e.name.toLowerCase(),s=n.name.toLowerCase(),r=a===t?1e3:0,i=s===t?1e3:0,l=a.startsWith(t)?100:0,o=s.startsWith(t)?100:0,c=r+l+(1e3-a.length);return i+o+(1e3-s.length)-c})}return e.filter(e=>{var t;return 0===ed.length||(null===(t=e.skills)||void 0===t?void 0:t.some(e=>{var t;return null===(t=e.tags)||void 0===t?void 0:t.some(e=>ed.includes(e))}))})},[O,ee,ed]),eO=(0,_.useMemo)(()=>{if(!D)return[];let e=D;if(en.trim()){let t=en.toLowerCase(),n=t.split(/\s+/);e=(e=D.filter(e=>{var a;let s=e.server_name.toLowerCase(),r=((null===(a=e.mcp_info)||void 0===a?void 0:a.description)||"").toLowerCase();return!!(s.includes(t)||r.includes(t))||n.every(e=>s.includes(e)||r.includes(e))})).sort((e,n)=>{let a=e.server_name.toLowerCase(),s=n.server_name.toLowerCase(),r=a===t?1e3:0,i=s===t?1e3:0,l=a.startsWith(t)?100:0,o=s.startsWith(t)?100:0,c=r+l+(1e3-a.length);return i+o+(1e3-s.length)-c})}return e.filter(e=>0===ep.length||ep.includes(e.transport))},[D,en,ep]),eT=e=>{eN(e),ef(!0)},eD=e=>{eS(e),eb(!0)},eL=e=>{eC(e),ej(!0)},ez=e=>{navigator.clipboard.writeText(e),v.Z.success("Copied to clipboard!")},eR=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),eH=e=>Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).map(e=>{let[t]=e;return t}),eF=e=>"$".concat((1e6*e).toFixed(4)),eG=e=>e?e>=1e3?"".concat((e/1e3).toFixed(0),"K"):e.toString():"N/A",eK=(e,t)=>{let n=[];return e&&n.push("RPM: ".concat(e.toLocaleString())),t&&n.push("TPM: ".concat(t.toLocaleString())),n.length>0?n.join(", "):"N/A"};return(0,a.jsx)(s.f,{accessToken:Z,children:(0,a.jsxs)("div",{className:E?"w-full":"min-h-screen bg-white",children:[!E&&(0,a.jsx)(j.Z,{userID:null,userEmail:null,userRole:null,premiumUser:!1,setProxySettings:ek,proxySettings:eI,accessToken:Z||null,isPublicPage:!0,isDarkMode:!1,toggleDarkMode:()=>{}}),(0,a.jsxs)("div",{className:E?"w-full p-6":"w-full px-8 py-12",children:[E&&(0,a.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:(0,a.jsx)("p",{className:"text-sm text-gray-700",children:"These are models, agents, and MCP servers your proxy admin has indicated are available in your company."})}),!E&&(0,a.jsxs)(o.Z,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(d.Z,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"About"}),(0,a.jsx)("p",{className:"text-gray-700 mb-6 text-base leading-relaxed",children:H||"Proxy Server to call 100+ LLMs in the OpenAI format."}),(0,a.jsx)("div",{className:"flex items-center space-x-3 text-sm text-gray-600",children:(0,a.jsxs)("span",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"w-4 h-4 mr-2",children:"\uD83D\uDD27"}),"Built with litellm: v",G]})})]}),U&&Object.keys(U).length>0&&(0,a.jsxs)(o.Z,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(d.Z,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Useful Links"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Object.entries(U||{}).map(e=>{var t;let[n,a]=e;return{title:n,url:"string"==typeof a?a:a.url,index:"string"==typeof a?0:null!==(t=a.index)&&void 0!==t?t:0}}).sort((e,t)=>e.index-t.index).map(e=>{let{title:t,url:n}=e;return(0,a.jsxs)("button",{onClick:()=>window.open(n,"_blank"),className:"flex items-center space-x-3 text-blue-600 hover:text-blue-800 transition-colors p-3 rounded-lg hover:bg-blue-50 border border-gray-200",children:[(0,a.jsx)(r.Z,{className:"w-4 h-4"}),(0,a.jsx)(c.Z,{className:"text-sm font-medium",children:t})]},t)})})]}),!E&&(0,a.jsxs)(o.Z,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(d.Z,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Health and Endpoint Status"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,a.jsxs)(c.Z,{className:"text-green-600 font-medium text-sm",children:["Service status: ",eg]})})]}),(0,a.jsx)(o.Z,{className:"p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:(0,a.jsxs)(m.default,{activeKey:eZ,onChange:eE,size:"large",className:"public-hub-tabs",children:[(0,a.jsxs)(A,{tab:"Model Hub",children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,a.jsx)(d.Z,{className:"text-2xl font-semibold text-gray-900",children:"Available Models"})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium text-gray-700",children:"Search Models:"}),(0,a.jsx)(p.Z,{title:"Smart search with relevance ranking - finds models containing your search terms, ranked by relevance. Try searching 'xai grok-4', 'claude-4', 'gpt-4', or 'sonnet'",placement:"top",children:(0,a.jsx)(f.Z,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(i.Z,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,a.jsx)("input",{type:"text",placeholder:"Search model names... (smart search enabled)",value:$,onChange:e=>Q(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium mb-3 text-gray-700",children:"Provider:"}),(0,a.jsx)(g.default,{mode:"multiple",value:es,onChange:e=>er(e),placeholder:"Select providers",className:"w-full",size:"large",allowClear:!0,optionRender:e=>{let{logo:t}=(0,S.dr)(e.value);return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,a.jsx)("img",{src:t,alt:e.label,className:"w-5 h-5 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e.label})]})},children:M&&(e=>{let t=new Set;return e.forEach(e=>{e.providers.forEach(e=>t.add(e))}),Array.from(t)})(M).map(e=>(0,a.jsx)(g.default.Option,{value:e,children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium mb-3 text-gray-700",children:"Mode:"}),(0,a.jsx)(g.default,{mode:"multiple",value:ei,onChange:e=>el(e),placeholder:"Select modes",className:"w-full",size:"large",allowClear:!0,children:M&&(e=>{let t=new Set;return e.forEach(e=>{e.mode&&t.add(e.mode)}),Array.from(t)})(M).map(e=>(0,a.jsx)(g.default.Option,{value:e,children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium mb-3 text-gray-700",children:"Features:"}),(0,a.jsx)(g.default,{mode:"multiple",value:eo,onChange:e=>ec(e),placeholder:"Select features",className:"w-full",size:"large",allowClear:!0,children:M&&(e=>{let t=new Set;return e.forEach(e=>{Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).forEach(e=>{let[n]=e,a=n.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");t.add(a)})}),Array.from(t).sort()})(M).map(e=>(0,a.jsx)(g.default.Option,{value:e,children:e},e))})]})]}),(0,a.jsx)(b.C,{columns:[{header:"Model Name",accessorKey:"model_group",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(p.Z,{title:t.original.model_group,children:(0,a.jsx)(l.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>eT(t.original),children:t.original.model_group})})})},size:150},{header:"Providers",accessorKey:"providers",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.providers;return(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:n.map(e=>{let{logo:t}=(0,S.dr)(e);return(0,a.jsxs)("div",{className:"flex items-center space-x-1 px-2 py-1 bg-gray-100 rounded text-xs",children:[t&&(0,a.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e})]},e)})})},size:120},{header:"Mode",accessorKey:"mode",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.mode;return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(e=>{switch(null==e?void 0:e.toLowerCase()){case"chat":return"\uD83D\uDCAC";case"rerank":return"\uD83D\uDD04";case"embedding":return"\uD83D\uDCC4";default:return"\uD83E\uDD16"}})(n||"")}),(0,a.jsx)(c.Z,{children:n||"Chat"})]})},size:100},{header:"Max Input",accessorKey:"max_input_tokens",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)(c.Z,{className:"text-center",children:eG(t.original.max_input_tokens)})},size:100,meta:{className:"text-center"}},{header:"Max Output",accessorKey:"max_output_tokens",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)(c.Z,{className:"text-center",children:eG(t.original.max_output_tokens)})},size:100,meta:{className:"text-center"}},{header:"Input $/1M",accessorKey:"input_cost_per_token",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.input_cost_per_token;return(0,a.jsx)(c.Z,{className:"text-center",children:n?eF(n):"Free"})},size:100,meta:{className:"text-center"}},{header:"Output $/1M",accessorKey:"output_cost_per_token",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.output_cost_per_token;return(0,a.jsx)(c.Z,{className:"text-center",children:n?eF(n):"Free"})},size:100,meta:{className:"text-center"}},{header:"Features",accessorKey:"supports_vision",enableSorting:!1,cell:e=>{let{row:t}=e,n=Object.entries(t.original).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).map(e=>{let[t]=e;return eR(t)});return 0===n.length?(0,a.jsx)(c.Z,{className:"text-gray-400",children:"-"}):1===n.length?(0,a.jsx)("div",{className:"h-6 flex items-center",children:(0,a.jsx)(u.Z,{color:"blue",className:"text-xs",children:n[0]})}):(0,a.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,a.jsx)(u.Z,{color:"blue",className:"text-xs",children:n[0]}),(0,a.jsx)(p.Z,{title:(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("div",{className:"font-medium",children:"All Features:"}),n.map((e,t)=>(0,a.jsxs)("div",{className:"text-xs",children:["• ",e]},t))]}),trigger:"click",placement:"topLeft",children:(0,a.jsxs)("span",{className:"text-xs text-blue-600 cursor-pointer hover:text-blue-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",n.length-1]})})]})},size:120},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,cell:e=>{var t;let{row:n}=e,s=n.original,r="healthy"===s.health_status?"green":"unhealthy"===s.health_status?"red":"default",i=s.health_response_time?"Response Time: ".concat(Number(s.health_response_time).toFixed(2),"ms"):"N/A",l=s.health_checked_at?"Last Checked: ".concat(new Date(s.health_checked_at).toLocaleString()):"N/A";return(0,a.jsx)(p.Z,{title:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{children:i}),(0,a.jsx)("div",{children:l})]}),children:(0,a.jsx)(u.Z,{color:r,children:(0,a.jsx)("span",{className:"capitalize",children:null!==(t=s.health_status)&&void 0!==t?t:"Unknown"})},s.model_group)})},size:100},{header:"Limits",accessorKey:"rpm",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original;return(0,a.jsx)(c.Z,{className:"text-xs text-gray-600",children:eK(n.rpm,n.tpm)})},size:150}],data:eM,isLoading:V,defaultSorting:[{id:"model_group",desc:!1}]}),(0,a.jsx)("div",{className:"mt-8 text-center",children:(0,a.jsxs)(c.Z,{className:"text-sm text-gray-600",children:["Showing ",eM.length," of ",(null==M?void 0:M.length)||0," models"]})})]},"models"),O&&O.length>0&&(0,a.jsxs)(A,{tab:"Agent Hub",children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,a.jsx)(d.Z,{className:"text-2xl font-semibold text-gray-900",children:"Available Agents"})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium text-gray-700",children:"Search Agents:"}),(0,a.jsx)(p.Z,{title:"Search agents by name or description",placement:"top",children:(0,a.jsx)(f.Z,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(i.Z,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,a.jsx)("input",{type:"text",placeholder:"Search agent names or descriptions...",value:ee,onChange:e=>et(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium mb-3 text-gray-700",children:"Skills:"}),(0,a.jsx)(g.default,{mode:"multiple",value:ed,onChange:e=>em(e),placeholder:"Select skills",className:"w-full",size:"large",allowClear:!0,children:O&&(e=>{let t=new Set;return e.forEach(e=>{var n;null===(n=e.skills)||void 0===n||n.forEach(e=>{var n;null===(n=e.tags)||void 0===n||n.forEach(e=>t.add(e))})}),Array.from(t).sort()})(O).map(e=>(0,a.jsx)(g.default.Option,{value:e,children:e},e))})]})]}),(0,a.jsx)(b.C,{columns:[{header:"Agent Name",accessorKey:"name",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(p.Z,{title:t.original.name,children:(0,a.jsx)(l.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>eD(t.original),children:t.original.name})})})},size:150},{header:"Description",accessorKey:"description",enableSorting:!1,cell:e=>{let{row:t}=e,n=t.original.description,s=n.length>80?n.substring(0,80)+"...":n;return(0,a.jsx)(p.Z,{title:n,children:(0,a.jsx)(c.Z,{className:"text-sm text-gray-700",children:s})})},size:250},{header:"Version",accessorKey:"version",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)(c.Z,{className:"text-sm",children:t.original.version})},size:80},{header:"Provider",accessorKey:"provider",enableSorting:!1,cell:e=>{let{row:t}=e,n=t.original.provider;return n?(0,a.jsx)("div",{className:"text-sm",children:(0,a.jsx)(c.Z,{className:"font-medium",children:n.organization})}):(0,a.jsx)(c.Z,{className:"text-gray-400",children:"-"})},size:120},{header:"Skills",accessorKey:"skills",enableSorting:!1,cell:e=>{let{row:t}=e,n=t.original.skills||[];return 0===n.length?(0,a.jsx)(c.Z,{className:"text-gray-400",children:"-"}):1===n.length?(0,a.jsx)("div",{className:"h-6 flex items-center",children:(0,a.jsx)(u.Z,{color:"purple",className:"text-xs",children:n[0].name})}):(0,a.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,a.jsx)(u.Z,{color:"purple",className:"text-xs",children:n[0].name}),(0,a.jsx)(p.Z,{title:(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("div",{className:"font-medium",children:"All Skills:"}),n.map((e,t)=>(0,a.jsxs)("div",{className:"text-xs",children:["• ",e.name]},t))]}),trigger:"click",placement:"topLeft",children:(0,a.jsxs)("span",{className:"text-xs text-purple-600 cursor-pointer hover:text-purple-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",n.length-1]})})]})},size:150},{header:"Capabilities",accessorKey:"capabilities",enableSorting:!1,cell:e=>{let{row:t}=e,n=Object.entries(t.original.capabilities||{}).filter(e=>{let[t,n]=e;return!0===n}).map(e=>{let[t]=e;return t});return 0===n.length?(0,a.jsx)(c.Z,{className:"text-gray-400",children:"-"}):(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:n.map(e=>(0,a.jsx)(u.Z,{color:"green",className:"text-xs capitalize",children:e},e))})},size:150}],data:eP,isLoading:q,defaultSorting:[{id:"name",desc:!1}]}),(0,a.jsx)("div",{className:"mt-8 text-center",children:(0,a.jsxs)(c.Z,{className:"text-sm text-gray-600",children:["Showing ",eP.length," of ",(null==O?void 0:O.length)||0," agents"]})})]},"agents"),D&&D.length>0&&(0,a.jsxs)(A,{tab:"MCP Hub",children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,a.jsx)(d.Z,{className:"text-2xl font-semibold text-gray-900",children:"Available MCP Servers"})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium text-gray-700",children:"Search MCP Servers:"}),(0,a.jsx)(p.Z,{title:"Search MCP servers by name or description",placement:"top",children:(0,a.jsx)(f.Z,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(i.Z,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,a.jsx)("input",{type:"text",placeholder:"Search MCP server names or descriptions...",value:en,onChange:e=>ea(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium mb-3 text-gray-700",children:"Transport:"}),(0,a.jsx)(g.default,{mode:"multiple",value:ep,onChange:e=>eu(e),placeholder:"Select transport types",className:"w-full",size:"large",allowClear:!0,children:D&&(e=>{let t=new Set;return e.forEach(e=>{e.transport&&t.add(e.transport)}),Array.from(t).sort()})(D).map(e=>(0,a.jsx)(g.default.Option,{value:e,children:e},e))})]})]}),(0,a.jsx)(b.C,{columns:[{header:"Server Name",accessorKey:"server_name",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(p.Z,{title:t.original.server_name,children:(0,a.jsx)(l.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>eL(t.original),children:t.original.server_name})})})},size:150},{header:"Description",accessorKey:"mcp_info.description",enableSorting:!1,cell:e=>{var t;let{row:n}=e,s=(null===(t=n.original.mcp_info)||void 0===t?void 0:t.description)||"-",r=s.length>80?s.substring(0,80)+"...":s;return(0,a.jsx)(p.Z,{title:s,children:(0,a.jsx)(c.Z,{className:"text-sm text-gray-700",children:r})})},size:250},{header:"URL",accessorKey:"url",enableSorting:!1,cell:e=>{let{row:t}=e,n=t.original.url,s=n.length>40?n.substring(0,40)+"...":n;return(0,a.jsx)(p.Z,{title:n,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(c.Z,{className:"text-xs font-mono",children:s}),(0,a.jsx)(x.Z,{onClick:()=>ez(n),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-3 h-3"})]})})},size:200},{header:"Transport",accessorKey:"transport",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.transport;return(0,a.jsx)(u.Z,{color:"blue",className:"text-xs uppercase",children:n})},size:100},{header:"Auth Type",accessorKey:"auth_type",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.auth_type;return(0,a.jsx)(u.Z,{color:"none"===n?"gray":"green",className:"text-xs capitalize",children:n})},size:100}],data:eO,isLoading:J,defaultSorting:[{id:"server_name",desc:!1}]}),(0,a.jsx)("div",{className:"mt-8 text-center",children:(0,a.jsxs)(c.Z,{className:"text-sm text-gray-600",children:["Showing ",eO.length," of ",(null==D?void 0:D.length)||0," MCP servers"]})})]},"mcp")]})})]}),(0,a.jsx)(h.Z,{title:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(null==ey?void 0:ey.model_group)||"Model Details"}),ey&&(0,a.jsx)(p.Z,{title:"Copy model name",children:(0,a.jsx)(x.Z,{onClick:()=>ez(ey.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:ex,footer:null,onOk:()=>{ef(!1),eN(null)},onCancel:()=>{ef(!1),eN(null)},children:ey&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Model Name:"}),(0,a.jsx)(c.Z,{children:ey.model_group})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Mode:"}),(0,a.jsx)(c.Z,{children:ey.mode||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Providers:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:ey.providers.map(e=>{let{logo:t}=(0,S.dr)(e);return(0,a.jsx)(u.Z,{color:"blue",children:(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[t&&(0,a.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e})]})},e)})})]})]}),ey.model_group.includes("*")&&(0,a.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:(0,a.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,a.jsx)(f.Z,{className:"w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium text-blue-900 mb-2",children:"Wildcard Routing"}),(0,a.jsxs)(c.Z,{className:"text-sm text-blue-800 mb-2",children:["This model uses wildcard routing. You can pass any value where you see the"," ",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:"*"})," symbol."]}),(0,a.jsxs)(c.Z,{className:"text-sm text-blue-800",children:["For example, with"," ",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:ey.model_group}),", you can use any string (",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:ey.model_group.replace("*","my-custom-value")}),") that matches this pattern."]})]})]})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Max Input Tokens:"}),(0,a.jsx)(c.Z,{children:(null===(t=ey.max_input_tokens)||void 0===t?void 0:t.toLocaleString())||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Max Output Tokens:"}),(0,a.jsx)(c.Z,{children:(null===(n=ey.max_output_tokens)||void 0===n?void 0:n.toLocaleString())||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,a.jsx)(c.Z,{children:ey.input_cost_per_token?eF(ey.input_cost_per_token):"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,a.jsx)(c.Z,{children:ey.output_cost_per_token?eF(ey.output_cost_per_token):"Not specified"})]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:(()=>{let e=eH(ey),t=["green","blue","purple","orange","red","yellow"];return 0===e.length?(0,a.jsx)(c.Z,{className:"text-gray-500",children:"No special capabilities listed"}):e.map((e,n)=>(0,a.jsx)(u.Z,{color:t[n%t.length],children:eR(e)},e))})()})]}),(ey.tpm||ey.rpm)&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[ey.tpm&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Tokens per Minute:"}),(0,a.jsx)(c.Z,{children:ey.tpm.toLocaleString()})]}),ey.rpm&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Requests per Minute:"}),(0,a.jsx)(c.Z,{children:ey.rpm.toLocaleString()})]})]})]}),ey.supported_openai_params&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:ey.supported_openai_params.map(e=>(0,a.jsx)(u.Z,{color:"green",children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,a.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,a.jsx)("pre",{className:"text-sm",children:(0,N.L)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,w.vf)(ey.mode||"chat"),selectedModel:ey.model_group,selectedSdk:"openai"})})}),(0,a.jsx)("div",{className:"mt-2 text-right",children:(0,a.jsx)("button",{onClick:()=>{ez((0,N.L)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,w.vf)(ey.mode||"chat"),selectedModel:ey.model_group,selectedSdk:"openai"}))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})}),(0,a.jsx)(h.Z,{title:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(null==ew?void 0:ew.name)||"Agent Details"}),ew&&(0,a.jsx)(p.Z,{title:"Copy agent name",children:(0,a.jsx)(x.Z,{onClick:()=>ez(ew.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:e_,footer:null,onOk:()=>{eb(!1),eS(null)},onCancel:()=>{eb(!1),eS(null)},children:ew&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Agent Overview"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Name:"}),(0,a.jsx)(c.Z,{children:ew.name})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Version:"}),(0,a.jsx)(c.Z,{children:ew.version})]}),(0,a.jsxs)("div",{className:"col-span-2",children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Description:"}),(0,a.jsx)(c.Z,{children:ew.description})]}),ew.url&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"URL:"}),(0,a.jsx)("a",{href:ew.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 text-sm break-all",children:ew.url})]})]})]}),ew.capabilities&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(ew.capabilities).filter(e=>{let[t,n]=e;return!0===n}).map(e=>{let[t]=e;return(0,a.jsx)(u.Z,{color:"green",className:"capitalize",children:t},t)})})]}),ew.skills&&ew.skills.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Skills"}),(0,a.jsx)("div",{className:"space-y-4",children:ew.skills.map((e,t)=>(0,a.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,a.jsx)("div",{className:"flex items-start justify-between mb-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium text-base",children:e.name}),(0,a.jsx)(c.Z,{className:"text-sm text-gray-600",children:e.description})]})}),e.tags&&e.tags.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map(e=>(0,a.jsx)(u.Z,{color:"purple",className:"text-xs",children:e},e))})]},t))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Input/Output Modes"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Input Modes:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:null===(C=ew.defaultInputModes)||void 0===C?void 0:C.map(e=>(0,a.jsx)(u.Z,{color:"blue",children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Output Modes:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:null===(I=ew.defaultOutputModes)||void 0===I?void 0:I.map(e=>(0,a.jsx)(u.Z,{color:"blue",children:e},e))})]})]})]}),ew.documentationUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Documentation"}),(0,a.jsxs)("a",{href:ew.documentationUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 flex items-center space-x-2",children:[(0,a.jsx)(r.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"View Documentation"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Usage Example (A2A Protocol)"}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium mb-2 text-gray-700",children:"Step 1: Retrieve Agent Card"}),(0,a.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,a.jsx)("pre",{className:"text-xs",children:"base_url = '".concat(ew.url,"'\n\nresolver = A2ACardResolver(\n httpx_client=httpx_client,\n base_url=base_url,\n # agent_card_path uses default, extended_agent_card_path also uses default\n)\n\n# Fetch Public Agent Card and Initialize Client\nfinal_agent_card_to_use: AgentCard | None = None\n_public_card = (\n await resolver.get_agent_card()\n) # Fetches from default public path - `/agents/{agent_id}/`\nfinal_agent_card_to_use = _public_card\n\nif _public_card.supports_authenticated_extended_card:\n try:\n auth_headers_dict = {\n 'Authorization': 'Bearer dummy-token-for-extended-card'\n }\n _extended_card = await resolver.get_agent_card(\n relative_card_path=EXTENDED_AGENT_CARD_PATH,\n http_kwargs={'headers': auth_headers_dict},\n )\n final_agent_card_to_use = (\n _extended_card # Update to use the extended card\n )\n except Exception as e_extended:\n logger.warning(\n f'Failed to fetch extended agent card: {e_extended}. Will proceed with public card.',\n exc_info=True,\n )")})}),(0,a.jsx)("div",{className:"mt-2 text-right",children:(0,a.jsx)("button",{onClick:()=>{ez("from a2a.client import A2ACardResolver, A2AClient\nfrom a2a.types import (\n AgentCard,\n MessageSendParams,\n SendMessageRequest,\n SendStreamingMessageRequest,\n)\nfrom a2a.utils.constants import (\n AGENT_CARD_WELL_KNOWN_PATH,\n EXTENDED_AGENT_CARD_PATH,\n)\n\nbase_url = '".concat(ew.url,"'\n\nresolver = A2ACardResolver(\n httpx_client=httpx_client,\n base_url=base_url,\n # agent_card_path uses default, extended_agent_card_path also uses default\n)\n\n# Fetch Public Agent Card and Initialize Client\nfinal_agent_card_to_use: AgentCard | None = None\n_public_card = (\n await resolver.get_agent_card()\n) # Fetches from default public path - `/agents/{agent_id}/`\nfinal_agent_card_to_use = _public_card\n\nif _public_card.supports_authenticated_extended_card:\n try:\n auth_headers_dict = {\n 'Authorization': 'Bearer dummy-token-for-extended-card'\n }\n _extended_card = await resolver.get_agent_card(\n relative_card_path=EXTENDED_AGENT_CARD_PATH,\n http_kwargs={'headers': auth_headers_dict},\n )\n final_agent_card_to_use = (\n _extended_card # Update to use the extended card\n )\n except Exception as e_extended:\n logger.warning(\n f'Failed to fetch extended agent card: {e_extended}. Will proceed with public card.',\n exc_info=True,\n )"))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium mb-2 text-gray-700",children:"Step 2: Call the Agent"}),(0,a.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,a.jsx)("pre",{className:"text-xs",children:"client = A2AClient(\n httpx_client=httpx_client, agent_card=final_agent_card_to_use\n)\n\nsend_message_payload: dict[str, Any] = {\n 'message': {\n 'role': 'user',\n 'parts': [\n {'kind': 'text', 'text': 'how much is 10 USD in INR?'}\n ],\n 'messageId': uuid4().hex,\n },\n}\nrequest = SendMessageRequest(\n id=str(uuid4()), params=MessageSendParams(**send_message_payload)\n)\n\nresponse = await client.send_message(request)\nprint(response.model_dump(mode='json', exclude_none=True))"})}),(0,a.jsx)("div",{className:"mt-2 text-right",children:(0,a.jsx)("button",{onClick:()=>{ez("client = A2AClient(\n httpx_client=httpx_client, agent_card=final_agent_card_to_use\n)\n\nsend_message_payload: dict[str, Any] = {\n 'message': {\n 'role': 'user',\n 'parts': [\n {'kind': 'text', 'text': 'how much is 10 USD in INR?'}\n ],\n 'messageId': uuid4().hex,\n },\n}\nrequest = SendMessageRequest(\n id=str(uuid4()), params=MessageSendParams(**send_message_payload)\n)\n\nresponse = await client.send_message(request)\nprint(response.model_dump(mode='json', exclude_none=True))")},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})]})}),(0,a.jsx)(h.Z,{title:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(null==eA?void 0:eA.server_name)||"MCP Server Details"}),eA&&(0,a.jsx)(p.Z,{title:"Copy server name",children:(0,a.jsx)(x.Z,{onClick:()=>ez(eA.server_name),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:ev,footer:null,onOk:()=>{ej(!1),eC(null)},onCancel:()=>{ej(!1),eC(null)},children:eA&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Server Overview"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Server Name:"}),(0,a.jsx)(c.Z,{children:eA.server_name})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Transport:"}),(0,a.jsx)(u.Z,{color:"blue",children:eA.transport})]}),eA.alias&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Alias:"}),(0,a.jsx)(c.Z,{children:eA.alias})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Auth Type:"}),(0,a.jsx)(u.Z,{color:"none"===eA.auth_type?"gray":"green",children:eA.auth_type})]}),(0,a.jsxs)("div",{className:"col-span-2",children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Description:"}),(0,a.jsx)(c.Z,{children:(null===(k=eA.mcp_info)||void 0===k?void 0:k.description)||"-"})]}),(0,a.jsxs)("div",{className:"col-span-2",children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"URL:"}),(0,a.jsxs)("a",{href:eA.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 text-sm break-all flex items-center space-x-2",children:[(0,a.jsx)("span",{children:eA.url}),(0,a.jsx)(r.Z,{className:"w-4 h-4"})]})]})]})]}),eA.mcp_info&&Object.keys(eA.mcp_info).length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Additional Information"}),(0,a.jsx)("div",{className:"bg-gray-50 p-4 rounded-lg",children:(0,a.jsx)("pre",{className:"text-xs overflow-x-auto",children:JSON.stringify(eA.mcp_info,null,2)})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,a.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,a.jsx)("pre",{className:"text-sm",children:'# Using MCP Server with Python FastMCP\n\nfrom fastmcp import Client\nimport asyncio\n\n# Standard MCP configuration\nconfig = {\n "mcpServers": {\n "'.concat(eA.server_name,'": {\n "url": "http://localhost:4000/').concat(eA.server_name,'/mcp",\n "headers": {\n "x-litellm-api-key": "Bearer sk-1234"\n }\n }\n }\n}\n\n# Create a client that connects to the server\nclient = Client(config)\n\nasync def main():\n async with client:\n # List available tools\n tools = await client.list_tools()\n print(f"Available tools: {[tool.name for tool in tools]}")\n\n # Call a tool\n response = await client.call_tool(\n name="tool_name", \n arguments={"arg": "value"}\n )\n print(f"Response: {response}")\n\nif __name__ == "__main__":\n asyncio.run(main())')})}),(0,a.jsx)("div",{className:"mt-2 text-right",children:(0,a.jsx)("button",{onClick:()=>{ez('# Using MCP Server with Python FastMCP\n\nfrom fastmcp import Client\nimport asyncio\n\n# Standard MCP configuration\nconfig = {\n "mcpServers": {\n "'.concat(eA.server_name,'": {\n "url": "http://localhost:4000/').concat(eA.server_name,'/mcp",\n "headers": {\n "x-litellm-api-key": "Bearer sk-1234"\n }\n }\n }\n}\n\n# Create a client that connects to the server\nclient = Client(config)\n\nasync def main():\n async with client:\n # List available tools\n tools = await client.list_tools()\n print(f"Available tools: {[tool.name for tool in tools]}")\n\n # Call a tool\n response = await client.call_tool(\n name="tool_name", \n arguments={"arg": "value"}\n )\n print(f"Response: {response}")\n\nif __name__ == "__main__":\n asyncio.run(main())'))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})})]})})}},69734:function(e,t,n){n.d(t,{F:function(){return l},f:function(){return o}});var a=n(57437),s=n(2265),r=n(19250);let i=(0,s.createContext)(void 0),l=()=>{let e=(0,s.useContext)(i);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e},o=e=>{let{children:t,accessToken:n}=e,[l,o]=(0,s.useState)(null);return(0,s.useEffect)(()=>{(async()=>{try{let t=(0,r.getProxyBaseUrl)(),n=await fetch(t?"".concat(t,"/get/ui_theme_settings"):"/get/ui_theme_settings",{method:"GET",headers:{"Content-Type":"application/json"}});if(n.ok){var e;let t=await n.json();(null===(e=t.values)||void 0===e?void 0:e.logo_url)&&o(t.values.logo_url)}}catch(e){console.warn("Failed to load logo settings from backend:",e)}})()},[]),(0,a.jsx)(i.Provider,{value:{logoUrl:l,setLogoUrl:o},children:t})}},9245:function(e,t,n){n.d(t,{D$:function(){return i},Qg:function(){return a},e8:function(){return l},le:function(){return r},nO:function(){return s}});let a="local-storage-change";function s(e){window.dispatchEvent(new CustomEvent(a,{detail:{key:e}}))}function r(e){try{return window.localStorage.getItem(e)}catch(t){return console.warn('Error reading localStorage key "'.concat(e,'":'),t),null}}function i(e,t){try{window.localStorage.setItem(e,t)}catch(t){console.warn('Error setting localStorage key "'.concat(e,'":'),t)}}function l(e){try{window.localStorage.removeItem(e)}catch(t){console.warn('Error removing localStorage key "'.concat(e,'":'),t)}}},91624:function(e,t,n){n.d(t,{C:function(){return s}});var a=n(19250);let s=async e=>{if(!e)return null;try{return await (0,a.getProxyUISettings)(e)}catch(e){return console.error("Error fetching proxy settings:",e),null}}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7526-f6a7e2b51a17dd02.js b/litellm/proxy/_experimental/out/_next/static/chunks/7526-f6a7e2b51a17dd02.js
new file mode 100644
index 00000000000..660a80754bf
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/7526-f6a7e2b51a17dd02.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7526],{19130:function(e,t,n){n.d(t,{RM:function(){return s.Z},SC:function(){return o.Z},iA:function(){return a.Z},pj:function(){return r.Z},ss:function(){return i.Z},xs:function(){return l.Z}});var a=n(21626),s=n(97214),r=n(28241),i=n(58834),l=n(69552),o=n(71876)},23133:function(e,t,n){n.d(t,{w:function(){return l}});var a=n(2265),s=n(9245);function r(e){let t=t=>{"disableShowPrompts"===t.key&&e()},n=t=>{let{key:n}=t.detail;"disableShowPrompts"===n&&e()};return window.addEventListener("storage",t),window.addEventListener(s.Qg,n),()=>{window.removeEventListener("storage",t),window.removeEventListener(s.Qg,n)}}function i(){return"true"===(0,s.le)("disableShowPrompts")}function l(){return(0,a.useSyncExternalStore)(r,i)}},8048:function(e,t,n){n.d(t,{C:function(){return m}});var a=n(57437),s=n(71594),r=n(24525),i=n(2265),l=n(19130),o=n(44633),c=n(86462),d=n(49084);function m(e){let{data:t=[],columns:n,isLoading:m=!1,defaultSorting:u=[],pagination:p,onPaginationChange:g,enablePagination:h=!1}=e,[x,f]=i.useState(u),[_]=i.useState("onChange"),[b,j]=i.useState({}),[v,y]=i.useState({}),N=(0,s.b7)({data:t,columns:n,state:{sorting:x,columnSizing:b,columnVisibility:v,...h&&p?{pagination:p}:{}},columnResizeMode:_,onSortingChange:f,onColumnSizingChange:j,onColumnVisibilityChange:y,...h&&g?{onPaginationChange:g}:{},getCoreRowModel:(0,r.sC)(),getSortedRowModel:(0,r.tj)(),...h?{getPaginationRowModel:(0,r.G_)()}:{},enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return(0,a.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("div",{className:"relative min-w-full",children:(0,a.jsxs)(l.iA,{className:"[&_td]:py-2 [&_th]:py-2 w-full",children:[(0,a.jsx)(l.ss,{children:N.getHeaderGroups().map(e=>(0,a.jsx)(l.SC,{children:e.headers.map(e=>{var t;return(0,a.jsxs)(l.xs,{className:"py-1 h-8 relative ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,s.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,a.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,a.jsx)(o.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,a.jsx)(c.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,a.jsx)(d.Z,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,a.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:"absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ".concat(e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200")})]},e.id)})},e.id))}),(0,a.jsx)(l.RM,{children:m?(0,a.jsx)(l.SC,{children:(0,a.jsx)(l.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:"\uD83D\uDE85 Loading models..."})})})}):N.getRowModel().rows.length>0?N.getRowModel().rows.map(e=>(0,a.jsx)(l.SC,{children:e.getVisibleCells().map(e=>{var t;return(0,a.jsx)(l.pj,{className:"py-0.5 ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,s.ie)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):(0,a.jsx)(l.SC,{children:(0,a.jsx)(l.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:"No models found"})})})})})]})})})})}},26246:function(e,t,n){n.d(t,{Z:function(){return L}});var a=n(57437),s=n(19250),r=n(11713);let i=(0,n(90246).n)("healthReadiness"),l=async()=>{let e=(0,s.getProxyBaseUrl)(),t=await fetch("".concat(e,"/health/readiness"));if(!t.ok)throw Error("Failed to fetch health readiness: ".concat(t.statusText));return t.json()},o=()=>(0,r.a)({queryKey:i.detail("readiness"),queryFn:l,staleTime:3e5});var c=n(69734),d=n(3914),m=n(91624),u=n(83884),p=n(45524),g=n(20949),h=n(4683),x=n(3810),f=n(5545),_=n(27648),b=n(2265),j=n(39760),v=n(23133),y=n(9245),N=n(40428),w=n(91870),S=n(46346),A=n(15883),C=n(57400),Z=n(70464),I=n(57840),k=n(58760),E=n(99981),M=n(23496),P=n(63709),O=n(73705);let{Text:D}=I.default;var T=e=>{let{onLogout:t}=e,{userId:n,userEmail:s,userRole:r,premiumUser:i}=(0,j.Z)(),l=(0,v.w)(),[o,c]=(0,b.useState)(!1);(0,b.useEffect)(()=>{c("true"===(0,y.le)("disableShowNewBadge"))},[]);let d=[{key:"logout",label:(0,a.jsxs)(k.Z,{children:[(0,a.jsx)(N.Z,{}),"Logout"]}),onClick:t}],m=()=>(0,a.jsxs)(k.Z,{direction:"vertical",size:"small",style:{width:"100%",padding:"12px"},children:[(0,a.jsxs)(k.Z,{style:{width:"100%",justifyContent:"space-between"},children:[(0,a.jsxs)(k.Z,{children:[(0,a.jsx)(w.Z,{}),(0,a.jsx)(D,{type:"secondary",children:s||"-"})]}),i?(0,a.jsx)(x.Z,{icon:(0,a.jsx)(S.Z,{}),color:"gold",children:"Premium"}):(0,a.jsx)(E.Z,{title:"Upgrade to Premium for advanced features",placement:"left",children:(0,a.jsx)(x.Z,{icon:(0,a.jsx)(S.Z,{}),children:"Standard"})})]}),(0,a.jsx)(M.Z,{style:{margin:"8px 0"}}),(0,a.jsxs)(k.Z,{style:{width:"100%",justifyContent:"space-between"},children:[(0,a.jsxs)(k.Z,{children:[(0,a.jsx)(A.Z,{}),(0,a.jsx)(D,{type:"secondary",children:"User ID"})]}),(0,a.jsx)(D,{copyable:!0,ellipsis:!0,style:{maxWidth:"150px"},title:n||"-",children:n||"-"})]}),(0,a.jsxs)(k.Z,{style:{width:"100%",justifyContent:"space-between"},children:[(0,a.jsxs)(k.Z,{children:[(0,a.jsx)(C.Z,{}),(0,a.jsx)(D,{type:"secondary",children:"Role"})]}),(0,a.jsx)(D,{children:r})]}),(0,a.jsx)(M.Z,{style:{margin:"8px 0"}}),(0,a.jsxs)(k.Z,{style:{width:"100%",justifyContent:"space-between"},children:[(0,a.jsx)(D,{type:"secondary",children:"Hide New Feature Indicators"}),(0,a.jsx)(P.Z,{size:"small",checked:o,onChange:e=>{c(e),e?(0,y.D$)("disableShowNewBadge","true"):(0,y.e8)("disableShowNewBadge"),(0,y.nO)("disableShowNewBadge")},"aria-label":"Toggle hide new feature indicators"})]}),(0,a.jsxs)(k.Z,{style:{width:"100%",justifyContent:"space-between"},children:[(0,a.jsx)(D,{type:"secondary",children:"Hide All Prompts"}),(0,a.jsx)(P.Z,{size:"small",checked:l,onChange:e=>{e?(0,y.D$)("disableShowPrompts","true"):(0,y.e8)("disableShowPrompts"),(0,y.nO)("disableShowPrompts")},"aria-label":"Toggle hide all prompts"})]})]});return(0,a.jsx)(O.Z,{menu:{items:d},popupRender:e=>(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow-lg",children:[m(),(0,a.jsx)(M.Z,{style:{margin:0}}),b.cloneElement(e,{style:{boxShadow:"none"}})]}),children:(0,a.jsx)(f.ZP,{type:"text",children:(0,a.jsxs)(k.Z,{children:[(0,a.jsx)(A.Z,{}),(0,a.jsx)(D,{children:"User"}),(0,a.jsx)(Z.Z,{})]})})})},L=e=>{let{userID:t,userEmail:n,userRole:r,premiumUser:i,proxySettings:l,setProxySettings:j,accessToken:v,isPublicPage:y=!1,sidebarCollapsed:N=!1,onToggleSidebar:w,isDarkMode:S,toggleDarkMode:A}=e,C=(0,s.getProxyBaseUrl)(),[Z,I]=(0,b.useState)(""),{logoUrl:k}=(0,c.F)(),{data:E}=o(),M=null==E?void 0:E.litellm_version,P=k||"".concat(C,"/get_image");return(0,b.useEffect)(()=>{(async()=>{if(v){let e=await (0,m.C)(v);console.log("response from fetchProxySettings",e),e&&j(e)}})()},[v]),(0,b.useEffect)(()=>{I((null==l?void 0:l.PROXY_LOGOUT_URL)||"")},[l]),(0,a.jsx)("nav",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:(0,a.jsx)("div",{className:"w-full",children:(0,a.jsxs)("div",{className:"flex items-center h-14 px-4",children:[(0,a.jsxs)("div",{className:"flex items-center flex-shrink-0",children:[w&&(0,a.jsx)("button",{onClick:w,className:"flex items-center justify-center w-10 h-10 mr-2 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded transition-colors",title:N?"Expand sidebar":"Collapse sidebar",children:(0,a.jsx)("span",{className:"text-lg",children:N?(0,a.jsx)(u.Z,{}):(0,a.jsx)(p.Z,{})})}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(_.default,{href:C||"/",className:"flex items-center",children:(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)("div",{className:"h-10 max-w-48 flex items-center justify-center overflow-hidden",children:(0,a.jsx)("img",{src:P,alt:"LiteLLM Brand",className:"max-w-full max-h-full w-auto h-auto object-contain"})})})}),M&&(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("span",{className:"absolute -top-1 -left-2 text-lg animate-bounce",style:{animationDuration:"2s"},title:"Thanks for using LiteLLM!",children:"❄️"}),(0,a.jsx)(x.Z,{className:"relative text-xs font-medium cursor-pointer z-10",children:(0,a.jsxs)("a",{href:"https://docs.litellm.ai/release_notes",target:"_blank",rel:"noopener noreferrer",className:"flex-shrink-0",children:["v",M]})})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-5 ml-auto",children:[(0,a.jsx)(f.ZP,{href:"https://www.litellm.ai/support",target:"_blank",rel:"noopener noreferrer",icon:(0,a.jsx)(g.Z,{}),className:"shadow-md shadow-indigo-500/20 hover:shadow-indigo-500/50 transition-shadow",children:"Join Slack"}),(0,a.jsx)(f.ZP,{href:"https://github.com/BerriAI/litellm",target:"_blank",rel:"noopener noreferrer",className:"shadow-md shadow-indigo-500/20 hover:shadow-indigo-500/50 transition-shadow",icon:(0,a.jsx)(h.Z,{}),children:"Star us on GitHub"}),!1,(0,a.jsx)("a",{href:"https://docs.litellm.ai/docs/",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-gray-600 hover:text-gray-900 transition-colors",children:"Docs"}),!y&&(0,a.jsx)(T,{onLogout:()=>{(0,d.b)(),window.location.href=Z}})]})]})})})}},82971:function(e,t,n){n.d(t,{L:function(){return s}});var a=n(8443);let s=e=>{let t;let{apiKeySource:n,accessToken:s,apiKey:r,inputMessage:i,chatHistory:l,selectedTags:o,selectedVectorStores:c,selectedGuardrails:d,selectedPolicies:m,selectedMCPServers:u,mcpServers:p,mcpServerToolRestrictions:g,selectedVoice:h,endpointType:x,selectedModel:f,selectedSdk:_,proxySettings:b}=e,j="session"===n?s:r,v=window.location.origin,y=null==b?void 0:b.LITELLM_UI_API_DOC_BASE_URL;y&&y.trim()?v=y:(null==b?void 0:b.PROXY_BASE_URL)&&(v=b.PROXY_BASE_URL);let N=i||"Your prompt here",w=N.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),S=l.filter(e=>!e.isImage).map(e=>{let{role:t,content:n}=e;return{role:t,content:n}}),A={};o.length>0&&(A.tags=o),c.length>0&&(A.vector_stores=c),d.length>0&&(A.guardrails=d),m.length>0&&(A.policies=m);let C=f||"your-model-name",Z="azure"===_?'import openai\n\nclient = openai.AzureOpenAI(\n api_key="'.concat(j||"YOUR_LITELLM_API_KEY",'",\n azure_endpoint="').concat(v,'",\n api_version="2024-02-01"\n)'):'import openai\n\nclient = openai.OpenAI(\n api_key="'.concat(j||"YOUR_LITELLM_API_KEY",'",\n base_url="').concat(v,'"\n)');switch(x){case a.KP.CHAT:{let e=Object.keys(A).length>0,n="";if(e){let e=JSON.stringify({metadata:A},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();n=",\n extra_body=".concat(e)}let a=S.length>0?S:[{role:"user",content:N}];t='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.chat.completions.create(\n model="'.concat(C,'",\n messages=').concat(JSON.stringify(a,null,4)).concat(n,'\n)\n\nprint(response)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.chat.completions.create(\n# model="').concat(C,'",\n# messages=[\n# {\n# "role": "user",\n# "content": [\n# {\n# "type": "text",\n# "text": "').concat(w,'"\n# },\n# {\n# "type": "image_url",\n# "image_url": {\n# "url": f"data:image/jpeg;base64,{base64_file}" # or data:application/pdf;base64,{base64_file}\n# }\n# }\n# ]\n# }\n# ]').concat(n,"\n# )\n# print(response_with_file)\n");break}case a.KP.RESPONSES:{let e=Object.keys(A).length>0,n="";if(e){let e=JSON.stringify({metadata:A},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();n=",\n extra_body=".concat(e)}let a=S.length>0?S:[{role:"user",content:N}];t='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.responses.create(\n model="'.concat(C,'",\n input=').concat(JSON.stringify(a,null,4)).concat(n,'\n)\n\nprint(response.output_text)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.responses.create(\n# model="').concat(C,'",\n# input=[\n# {\n# "role": "user",\n# "content": [\n# {"type": "input_text", "text": "').concat(w,'"},\n# {\n# "type": "input_image",\n# "image_url": f"data:image/jpeg;base64,{base64_file}", # or data:application/pdf;base64,{base64_file}\n# },\n# ],\n# }\n# ]').concat(n,"\n# )\n# print(response_with_file.output_text)\n");break}case a.KP.IMAGE:t="azure"===_?"\n# NOTE: The Azure SDK does not have a direct equivalent to the multi-modal 'responses.create' method shown for OpenAI.\n# This snippet uses 'client.images.generate' and will create a new image based on your prompt.\n# It does not use the uploaded image, as 'client.images.generate' does not support image inputs in this context.\nimport os\nimport requests\nimport json\nimport time\nfrom PIL import Image\n\nresult = client.images.generate(\n model=\"".concat(C,'",\n prompt="').concat(i,'",\n n=1\n)\n\njson_response = json.loads(result.model_dump_json())\n\n# Set the directory for the stored image\nimage_dir = os.path.join(os.curdir, \'images\')\n\n# If the directory doesn\'t exist, create it\nif not os.path.isdir(image_dir):\n os.mkdir(image_dir)\n\n# Initialize the image path\nimage_filename = f"generated_image_{int(time.time())}.png"\nimage_path = os.path.join(image_dir, image_filename)\n\ntry:\n # Retrieve the generated image\n if json_response.get("data") && len(json_response["data"]) > 0 && json_response["data"][0].get("url"):\n image_url = json_response["data"][0]["url"]\n generated_image = requests.get(image_url).content\n with open(image_path, "wb") as image_file:\n image_file.write(generated_image)\n\n print(f"Image saved to {image_path}")\n # Display the image\n image = Image.open(image_path)\n image.show()\n else:\n print("Could not find image URL in response.")\n print("Full response:", json_response)\nexcept Exception as e:\n print(f"An error occurred: {e}")\n print("Full response:", json_response)\n'):"\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(w,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(C,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;case a.KP.IMAGE_EDITS:t="azure"===_?'\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# The prompt entered by the user\nprompt = "'.concat(w,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(C,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n'):"\nimport base64\nimport os\nimport time\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(w,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(C,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;case a.KP.EMBEDDINGS:t='\nresponse = client.embeddings.create(\n input="'.concat(i||"Your string here",'",\n model="').concat(C,'",\n encoding_format="base64" # or "float"\n)\n\nprint(response.data[0].embedding)\n');break;case a.KP.TRANSCRIPTION:t='\n# Open the audio file\naudio_file = open("path/to/your/audio/file.mp3", "rb")\n\n# Make the transcription request\nresponse = client.audio.transcriptions.create(\n model="'.concat(C,'",\n file=audio_file').concat(i?',\n prompt="'.concat(i.replace(/"/g,'\\"'),'"'):"","\n)\n\nprint(response.text)\n");break;case a.KP.SPEECH:t='\n# Make the text-to-speech request\nresponse = client.audio.speech.create(\n model="'.concat(C,'",\n input="').concat(i||"Your text to convert to speech here",'",\n voice="').concat(h,'" # Options: alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer\n)\n\n# Save the audio to a file\noutput_filename = "output_speech.mp3"\nresponse.stream_to_file(output_filename)\nprint(f"Audio saved to {output_filename}")\n\n# Optional: Customize response format and speed\n# response = client.audio.speech.create(\n# model="').concat(C,'",\n# input="').concat(i||"Your text to convert to speech here",'",\n# voice="alloy",\n# response_format="mp3", # Options: mp3, opus, aac, flac, wav, pcm\n# speed=1.0 # Range: 0.25 to 4.0\n# )\n# response.stream_to_file("output_speech.mp3")\n');break;default:t="\n# Code generation for this endpoint is not implemented yet."}return"".concat(Z,"\n").concat(t)}},8443:function(e,t,n){var a,s,r,i;n.d(t,{KP:function(){return s},vf:function(){return o}}),(r=a||(a={})).AUDIO_SPEECH="audio_speech",r.AUDIO_TRANSCRIPTION="audio_transcription",r.IMAGE_GENERATION="image_generation",r.VIDEO_GENERATION="video_generation",r.CHAT="chat",r.RESPONSES="responses",r.IMAGE_EDITS="image_edits",r.ANTHROPIC_MESSAGES="anthropic_messages",r.EMBEDDING="embedding",(i=s||(s={})).IMAGE="image",i.VIDEO="video",i.CHAT="chat",i.RESPONSES="responses",i.IMAGE_EDITS="image_edits",i.ANTHROPIC_MESSAGES="anthropic_messages",i.EMBEDDINGS="embeddings",i.SPEECH="speech",i.TRANSCRIPTION="transcription",i.A2A_AGENTS="a2a_agents";let l={image_generation:"image",video_generation:"video",chat:"chat",responses:"responses",image_edits:"image_edits",anthropic_messages:"anthropic_messages",audio_speech:"speech",audio_transcription:"transcription",embedding:"embeddings"},o=e=>{if(console.log("getEndpointType:",e),Object.values(a).includes(e)){let t=l[e];return console.log("endpointType:",t),t}return"chat"}},42673:function(e,t,n){var a,s;n.d(t,{Cl:function(){return a},bK:function(){return d},cd:function(){return l},dr:function(){return o},fK:function(){return r},ph:function(){return c}}),(s=a||(a={})).A2A_Agent="A2A Agent",s.AIML="AI/ML API",s.Bedrock="Amazon Bedrock",s.Anthropic="Anthropic",s.AssemblyAI="AssemblyAI",s.SageMaker="AWS SageMaker",s.Azure="Azure",s.Azure_AI_Studio="Azure AI Foundry (Studio)",s.Cerebras="Cerebras",s.Cohere="Cohere",s.Dashscope="Dashscope",s.Databricks="Databricks (Qwen API)",s.DeepInfra="DeepInfra",s.Deepgram="Deepgram",s.Deepseek="Deepseek",s.ElevenLabs="ElevenLabs",s.FalAI="Fal AI",s.FireworksAI="Fireworks AI",s.Google_AI_Studio="Google AI Studio",s.GradientAI="GradientAI",s.Groq="Groq",s.Hosted_Vllm="vllm",s.Infinity="Infinity",s.JinaAI="Jina AI",s.MiniMax="MiniMax",s.MistralAI="Mistral AI",s.Ollama="Ollama",s.OpenAI="OpenAI",s.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",s.OpenAI_Text="OpenAI Text Completion",s.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",s.Openrouter="Openrouter",s.Oracle="Oracle Cloud Infrastructure (OCI)",s.Perplexity="Perplexity",s.RunwayML="RunwayML",s.Sambanova="Sambanova",s.Snowflake="Snowflake",s.TogetherAI="TogetherAI",s.Triton="Triton",s.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",s.VolcEngine="VolcEngine",s.Voyage="Voyage AI",s.xAI="xAI",s.SAP="SAP Generative AI Hub",s.Watsonx="Watsonx";let r={A2A_Agent:"a2a_agent",AIML:"aiml",OpenAI:"openai",OpenAI_Text:"text-completion-openai",Azure:"azure",Azure_AI_Studio:"azure_ai",Anthropic:"anthropic",Google_AI_Studio:"gemini",Bedrock:"bedrock",Groq:"groq",MiniMax:"minimax",MistralAI:"mistral",Cohere:"cohere",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",Dashscope:"dashscope",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",RunwayML:"runwayml",TogetherAI:"together_ai",Openrouter:"openrouter",Oracle:"oci",Snowflake:"snowflake",FireworksAI:"fireworks_ai",GradientAI:"gradient_ai",Triton:"triton",Deepgram:"deepgram",ElevenLabs:"elevenlabs",FalAI:"fal_ai",SageMaker:"sagemaker_chat",Voyage:"voyage",JinaAI:"jina_ai",VolcEngine:"volcengine",DeepInfra:"deepinfra",Hosted_Vllm:"hosted_vllm",Infinity:"infinity",SAP:"sap",Watsonx:"watsonx"},i="../ui/assets/logos/",l={"A2A Agent":"".concat(i,"a2a_agent.png"),"AI/ML API":"".concat(i,"aiml_api.svg"),Anthropic:"".concat(i,"anthropic.svg"),AssemblyAI:"".concat(i,"assemblyai_small.png"),Azure:"".concat(i,"microsoft_azure.svg"),"Azure AI Foundry (Studio)":"".concat(i,"microsoft_azure.svg"),"Amazon Bedrock":"".concat(i,"bedrock.svg"),"AWS SageMaker":"".concat(i,"bedrock.svg"),Cerebras:"".concat(i,"cerebras.svg"),Cohere:"".concat(i,"cohere.svg"),"Databricks (Qwen API)":"".concat(i,"databricks.svg"),Dashscope:"".concat(i,"dashscope.svg"),Deepseek:"".concat(i,"deepseek.svg"),"Fireworks AI":"".concat(i,"fireworks.svg"),Groq:"".concat(i,"groq.svg"),"Google AI Studio":"".concat(i,"google.svg"),vllm:"".concat(i,"vllm.png"),Infinity:"".concat(i,"infinity.png"),MiniMax:"".concat(i,"minimax.svg"),"Mistral AI":"".concat(i,"mistral.svg"),Ollama:"".concat(i,"ollama.svg"),OpenAI:"".concat(i,"openai_small.svg"),"OpenAI Text Completion":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Text Completion Models (Together AI, etc.)":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Endpoints (Together AI, etc.)":"".concat(i,"openai_small.svg"),Openrouter:"".concat(i,"openrouter.svg"),"Oracle Cloud Infrastructure (OCI)":"".concat(i,"oracle.svg"),Perplexity:"".concat(i,"perplexity-ai.svg"),RunwayML:"".concat(i,"runwayml.png"),Sambanova:"".concat(i,"sambanova.svg"),Snowflake:"".concat(i,"snowflake.svg"),TogetherAI:"".concat(i,"togetherai.svg"),"Vertex AI (Anthropic, Gemini, etc.)":"".concat(i,"google.svg"),xAI:"".concat(i,"xai.svg"),GradientAI:"".concat(i,"gradientai.svg"),Triton:"".concat(i,"nvidia_triton.png"),Deepgram:"".concat(i,"deepgram.png"),ElevenLabs:"".concat(i,"elevenlabs.png"),"Fal AI":"".concat(i,"fal_ai.jpg"),"Voyage AI":"".concat(i,"voyage.webp"),"Jina AI":"".concat(i,"jina.png"),VolcEngine:"".concat(i,"volcengine.png"),DeepInfra:"".concat(i,"deepinfra.png"),"SAP Generative AI Hub":"".concat(i,"sap.png")},o=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:l[e],displayName:e}}let t=Object.keys(r).find(t=>r[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let n=a[t];return{logo:l[n],displayName:n}},c=e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e||"Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";if("Google AI Studio"==e)return"gemini-pro";if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else return"gpt-3.5-turbo"},d=(e,t)=>{console.log("Provider key: ".concat(e));let n=r[e];console.log("Provider mapped to: ".concat(n));let a=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(e=>{let[t,s]=e;if(null!==s&&"object"==typeof s&&"litellm_provider"in s){let e=s.litellm_provider;(e===n||"string"==typeof e&&e.includes(n))&&a.push(t)}}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(e=>{let[t,n]=e;null!==n&&"object"==typeof n&&"litellm_provider"in n&&"cohere_chat"===n.litellm_provider&&a.push(t)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(e=>{let[t,n]=e;null!==n&&"object"==typeof n&&"litellm_provider"in n&&"sagemaker_chat"===n.litellm_provider&&a.push(t)}))),a}},87526:function(e,t,n){n.d(t,{Z:function(){return C}});var a=n(57437),s=n(69734),r=n(3477),i=n(17732),l=n(78489),o=n(12514),c=n(84264),d=n(96761),m=n(65869),u=n(99981),p=n(3810),g=n(37592),h=n(22116),x=n(78867),f=n(33245),_=n(2265),b=n(8048),j=n(9114),v=n(26246),y=n(19250),N=n(82971),w=n(8443),S=n(42673);let{TabPane:A}=m.default;var C=e=>{var t,n,C,Z,I;let{accessToken:k,isEmbedded:E=!1}=e,[M,P]=(0,_.useState)(null),[O,D]=(0,_.useState)(null),[T,L]=(0,_.useState)(null),[z,R]=(0,_.useState)("LiteLLM Gateway"),[H,F]=(0,_.useState)(null),[G,K]=(0,_.useState)(""),[U,V]=(0,_.useState)({}),[B,q]=(0,_.useState)(!0),[W,Y]=(0,_.useState)(!0),[J,X]=(0,_.useState)(!0),[$,Q]=(0,_.useState)(""),[ee,et]=(0,_.useState)(""),[en,ea]=(0,_.useState)(""),[es,er]=(0,_.useState)([]),[ei,el]=(0,_.useState)([]),[eo,ec]=(0,_.useState)([]),[ed,em]=(0,_.useState)([]),[eu,ep]=(0,_.useState)([]),[eg,eh]=(0,_.useState)("I'm alive! ✓"),[ex,ef]=(0,_.useState)(!1),[e_,eb]=(0,_.useState)(!1),[ej,ev]=(0,_.useState)(!1),[ey,eN]=(0,_.useState)(null),[ew,eS]=(0,_.useState)(null),[eA,eC]=(0,_.useState)(null),[eZ,eI]=(0,_.useState)({}),[ek,eE]=(0,_.useState)("models");(0,_.useEffect)(()=>{(async()=>{try{await (0,y.getUiConfig)()}catch(e){console.error("Failed to get UI config:",e)}let e=async()=>{try{q(!0);let e=await (0,y.modelHubPublicModelsCall)();console.log("ModelHubData:",e),P(e)}catch(e){console.error("There was an error fetching the public model data",e),eh("Service unavailable")}finally{q(!1)}},t=async()=>{try{Y(!0);let e=await (0,y.agentHubPublicModelsCall)();console.log("AgentHubData:",e),D(e)}catch(e){console.error("There was an error fetching the public agent data",e)}finally{Y(!1)}},n=async()=>{try{X(!0);let e=await (0,y.mcpHubPublicServersCall)();console.log("MCPHubData:",e),L(e)}catch(e){console.error("There was an error fetching the public MCP server data",e)}finally{X(!1)}};(async()=>{let e=await (0,y.getPublicModelHubInfo)();console.log("Public Model Hub Info:",e),R(e.docs_title),F(e.custom_docs_description),K(e.litellm_version),V(e.useful_links||{})})(),e(),t(),n()})()},[]),(0,_.useEffect)(()=>{},[$,es,ei,eo]);let eM=(0,_.useMemo)(()=>{if(!M)return[];let e=M;if($.trim()){let t=$.toLowerCase(),n=t.split(/\s+/),a=M.filter(e=>{let a=e.model_group.toLowerCase();return!!a.includes(t)||n.every(e=>a.includes(e))});a.length>0&&(e=a.sort((e,n)=>{let a=e.model_group.toLowerCase(),s=n.model_group.toLowerCase(),r=a===t?1e3:0,i=s===t?1e3:0,l=a.startsWith(t)?100:0,o=s.startsWith(t)?100:0,c=t.split(/\s+/).every(e=>a.includes(e))?50:0,d=t.split(/\s+/).every(e=>s.includes(e))?50:0,m=a.length;return i+o+d+(1e3-s.length)-(r+l+c+(1e3-m))}))}return e.filter(e=>{let t=0===es.length||es.some(t=>e.providers.includes(t)),n=0===ei.length||ei.includes(e.mode||""),a=0===eo.length||Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).some(e=>{let[t]=e,n=t.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return eo.includes(n)});return t&&n&&a})},[M,$,es,ei,eo]),eP=(0,_.useMemo)(()=>{if(!O)return[];let e=O;if(ee.trim()){let t=ee.toLowerCase(),n=t.split(/\s+/);e=(e=O.filter(e=>{let a=e.name.toLowerCase(),s=e.description.toLowerCase();return!!(a.includes(t)||s.includes(t))||n.every(e=>a.includes(e)||s.includes(e))})).sort((e,n)=>{let a=e.name.toLowerCase(),s=n.name.toLowerCase(),r=a===t?1e3:0,i=s===t?1e3:0,l=a.startsWith(t)?100:0,o=s.startsWith(t)?100:0,c=r+l+(1e3-a.length);return i+o+(1e3-s.length)-c})}return e.filter(e=>{var t;return 0===ed.length||(null===(t=e.skills)||void 0===t?void 0:t.some(e=>{var t;return null===(t=e.tags)||void 0===t?void 0:t.some(e=>ed.includes(e))}))})},[O,ee,ed]),eO=(0,_.useMemo)(()=>{if(!T)return[];let e=T;if(en.trim()){let t=en.toLowerCase(),n=t.split(/\s+/);e=(e=T.filter(e=>{var a;let s=e.server_name.toLowerCase(),r=((null===(a=e.mcp_info)||void 0===a?void 0:a.description)||"").toLowerCase();return!!(s.includes(t)||r.includes(t))||n.every(e=>s.includes(e)||r.includes(e))})).sort((e,n)=>{let a=e.server_name.toLowerCase(),s=n.server_name.toLowerCase(),r=a===t?1e3:0,i=s===t?1e3:0,l=a.startsWith(t)?100:0,o=s.startsWith(t)?100:0,c=r+l+(1e3-a.length);return i+o+(1e3-s.length)-c})}return e.filter(e=>0===eu.length||eu.includes(e.transport))},[T,en,eu]),eD=e=>{eN(e),ef(!0)},eT=e=>{eS(e),eb(!0)},eL=e=>{eC(e),ev(!0)},ez=e=>{navigator.clipboard.writeText(e),j.Z.success("Copied to clipboard!")},eR=e=>e.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),eH=e=>Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).map(e=>{let[t]=e;return t}),eF=e=>"$".concat((1e6*e).toFixed(4)),eG=e=>e?e>=1e3?"".concat((e/1e3).toFixed(0),"K"):e.toString():"N/A",eK=(e,t)=>{let n=[];return e&&n.push("RPM: ".concat(e.toLocaleString())),t&&n.push("TPM: ".concat(t.toLocaleString())),n.length>0?n.join(", "):"N/A"};return(0,a.jsx)(s.f,{accessToken:k,children:(0,a.jsxs)("div",{className:E?"w-full":"min-h-screen bg-white",children:[!E&&(0,a.jsx)(v.Z,{userID:null,userEmail:null,userRole:null,premiumUser:!1,setProxySettings:eI,proxySettings:eZ,accessToken:k||null,isPublicPage:!0,isDarkMode:!1,toggleDarkMode:()=>{}}),(0,a.jsxs)("div",{className:E?"w-full p-6":"w-full px-8 py-12",children:[E&&(0,a.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:(0,a.jsx)("p",{className:"text-sm text-gray-700",children:"These are models, agents, and MCP servers your proxy admin has indicated are available in your company."})}),!E&&(0,a.jsxs)(o.Z,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(d.Z,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"About"}),(0,a.jsx)("p",{className:"text-gray-700 mb-6 text-base leading-relaxed",children:H||"Proxy Server to call 100+ LLMs in the OpenAI format."}),(0,a.jsx)("div",{className:"flex items-center space-x-3 text-sm text-gray-600",children:(0,a.jsxs)("span",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"w-4 h-4 mr-2",children:"\uD83D\uDD27"}),"Built with litellm: v",G]})})]}),U&&Object.keys(U).length>0&&(0,a.jsxs)(o.Z,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(d.Z,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Useful Links"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Object.entries(U||{}).map(e=>{var t;let[n,a]=e;return{title:n,url:"string"==typeof a?a:a.url,index:"string"==typeof a?0:null!==(t=a.index)&&void 0!==t?t:0}}).sort((e,t)=>e.index-t.index).map(e=>{let{title:t,url:n}=e;return(0,a.jsxs)("button",{onClick:()=>window.open(n,"_blank"),className:"flex items-center space-x-3 text-blue-600 hover:text-blue-800 transition-colors p-3 rounded-lg hover:bg-blue-50 border border-gray-200",children:[(0,a.jsx)(r.Z,{className:"w-4 h-4"}),(0,a.jsx)(c.Z,{className:"text-sm font-medium",children:t})]},t)})})]}),!E&&(0,a.jsxs)(o.Z,{className:"mb-10 p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,a.jsx)(d.Z,{className:"text-2xl font-semibold mb-6 text-gray-900",children:"Health and Endpoint Status"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:(0,a.jsxs)(c.Z,{className:"text-green-600 font-medium text-sm",children:["Service status: ",eg]})})]}),(0,a.jsx)(o.Z,{className:"p-8 bg-white border border-gray-200 rounded-lg shadow-sm",children:(0,a.jsxs)(m.default,{activeKey:ek,onChange:eE,size:"large",className:"public-hub-tabs",children:[(0,a.jsxs)(A,{tab:"Model Hub",children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,a.jsx)(d.Z,{className:"text-2xl font-semibold text-gray-900",children:"Available Models"})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium text-gray-700",children:"Search Models:"}),(0,a.jsx)(u.Z,{title:"Smart search with relevance ranking - finds models containing your search terms, ranked by relevance. Try searching 'xai grok-4', 'claude-4', 'gpt-4', or 'sonnet'",placement:"top",children:(0,a.jsx)(f.Z,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(i.Z,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,a.jsx)("input",{type:"text",placeholder:"Search model names... (smart search enabled)",value:$,onChange:e=>Q(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium mb-3 text-gray-700",children:"Provider:"}),(0,a.jsx)(g.default,{mode:"multiple",value:es,onChange:e=>er(e),placeholder:"Select providers",className:"w-full",size:"large",allowClear:!0,optionRender:e=>{let{logo:t}=(0,S.dr)(e.value);return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,a.jsx)("img",{src:t,alt:e.label,className:"w-5 h-5 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e.label})]})},children:M&&(e=>{let t=new Set;return e.forEach(e=>{e.providers.forEach(e=>t.add(e))}),Array.from(t)})(M).map(e=>(0,a.jsx)(g.default.Option,{value:e,children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium mb-3 text-gray-700",children:"Mode:"}),(0,a.jsx)(g.default,{mode:"multiple",value:ei,onChange:e=>el(e),placeholder:"Select modes",className:"w-full",size:"large",allowClear:!0,children:M&&(e=>{let t=new Set;return e.forEach(e=>{e.mode&&t.add(e.mode)}),Array.from(t)})(M).map(e=>(0,a.jsx)(g.default.Option,{value:e,children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium mb-3 text-gray-700",children:"Features:"}),(0,a.jsx)(g.default,{mode:"multiple",value:eo,onChange:e=>ec(e),placeholder:"Select features",className:"w-full",size:"large",allowClear:!0,children:M&&(e=>{let t=new Set;return e.forEach(e=>{Object.entries(e).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).forEach(e=>{let[n]=e,a=n.replace(/^supports_/,"").split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");t.add(a)})}),Array.from(t).sort()})(M).map(e=>(0,a.jsx)(g.default.Option,{value:e,children:e},e))})]})]}),(0,a.jsx)(b.C,{columns:[{header:"Model Name",accessorKey:"model_group",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(u.Z,{title:t.original.model_group,children:(0,a.jsx)(l.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>eD(t.original),children:t.original.model_group})})})},size:150},{header:"Providers",accessorKey:"providers",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.providers;return(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:n.map(e=>{let{logo:t}=(0,S.dr)(e);return(0,a.jsxs)("div",{className:"flex items-center space-x-1 px-2 py-1 bg-gray-100 rounded text-xs",children:[t&&(0,a.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e})]},e)})})},size:120},{header:"Mode",accessorKey:"mode",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.mode;return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(e=>{switch(null==e?void 0:e.toLowerCase()){case"chat":return"\uD83D\uDCAC";case"rerank":return"\uD83D\uDD04";case"embedding":return"\uD83D\uDCC4";default:return"\uD83E\uDD16"}})(n||"")}),(0,a.jsx)(c.Z,{children:n||"Chat"})]})},size:100},{header:"Max Input",accessorKey:"max_input_tokens",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)(c.Z,{className:"text-center",children:eG(t.original.max_input_tokens)})},size:100,meta:{className:"text-center"}},{header:"Max Output",accessorKey:"max_output_tokens",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)(c.Z,{className:"text-center",children:eG(t.original.max_output_tokens)})},size:100,meta:{className:"text-center"}},{header:"Input $/1M",accessorKey:"input_cost_per_token",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.input_cost_per_token;return(0,a.jsx)(c.Z,{className:"text-center",children:n?eF(n):"Free"})},size:100,meta:{className:"text-center"}},{header:"Output $/1M",accessorKey:"output_cost_per_token",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.output_cost_per_token;return(0,a.jsx)(c.Z,{className:"text-center",children:n?eF(n):"Free"})},size:100,meta:{className:"text-center"}},{header:"Features",accessorKey:"supports_vision",enableSorting:!1,cell:e=>{let{row:t}=e,n=Object.entries(t.original).filter(e=>{let[t,n]=e;return t.startsWith("supports_")&&!0===n}).map(e=>{let[t]=e;return eR(t)});return 0===n.length?(0,a.jsx)(c.Z,{className:"text-gray-400",children:"-"}):1===n.length?(0,a.jsx)("div",{className:"h-6 flex items-center",children:(0,a.jsx)(p.Z,{color:"blue",className:"text-xs",children:n[0]})}):(0,a.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,a.jsx)(p.Z,{color:"blue",className:"text-xs",children:n[0]}),(0,a.jsx)(u.Z,{title:(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("div",{className:"font-medium",children:"All Features:"}),n.map((e,t)=>(0,a.jsxs)("div",{className:"text-xs",children:["• ",e]},t))]}),trigger:"click",placement:"topLeft",children:(0,a.jsxs)("span",{className:"text-xs text-blue-600 cursor-pointer hover:text-blue-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",n.length-1]})})]})},size:120},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,cell:e=>{var t;let{row:n}=e,s=n.original,r="healthy"===s.health_status?"green":"unhealthy"===s.health_status?"red":"default",i=s.health_response_time?"Response Time: ".concat(Number(s.health_response_time).toFixed(2),"ms"):"N/A",l=s.health_checked_at?"Last Checked: ".concat(new Date(s.health_checked_at).toLocaleString()):"N/A";return(0,a.jsx)(u.Z,{title:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{children:i}),(0,a.jsx)("div",{children:l})]}),children:(0,a.jsx)(p.Z,{color:r,children:(0,a.jsx)("span",{className:"capitalize",children:null!==(t=s.health_status)&&void 0!==t?t:"Unknown"})},s.model_group)})},size:100},{header:"Limits",accessorKey:"rpm",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original;return(0,a.jsx)(c.Z,{className:"text-xs text-gray-600",children:eK(n.rpm,n.tpm)})},size:150}],data:eM,isLoading:B,defaultSorting:[{id:"model_group",desc:!1}]}),(0,a.jsx)("div",{className:"mt-8 text-center",children:(0,a.jsxs)(c.Z,{className:"text-sm text-gray-600",children:["Showing ",eM.length," of ",(null==M?void 0:M.length)||0," models"]})})]},"models"),O&&O.length>0&&(0,a.jsxs)(A,{tab:"Agent Hub",children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,a.jsx)(d.Z,{className:"text-2xl font-semibold text-gray-900",children:"Available Agents"})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium text-gray-700",children:"Search Agents:"}),(0,a.jsx)(u.Z,{title:"Search agents by name or description",placement:"top",children:(0,a.jsx)(f.Z,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(i.Z,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,a.jsx)("input",{type:"text",placeholder:"Search agent names or descriptions...",value:ee,onChange:e=>et(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium mb-3 text-gray-700",children:"Skills:"}),(0,a.jsx)(g.default,{mode:"multiple",value:ed,onChange:e=>em(e),placeholder:"Select skills",className:"w-full",size:"large",allowClear:!0,children:O&&(e=>{let t=new Set;return e.forEach(e=>{var n;null===(n=e.skills)||void 0===n||n.forEach(e=>{var n;null===(n=e.tags)||void 0===n||n.forEach(e=>t.add(e))})}),Array.from(t).sort()})(O).map(e=>(0,a.jsx)(g.default.Option,{value:e,children:e},e))})]})]}),(0,a.jsx)(b.C,{columns:[{header:"Agent Name",accessorKey:"name",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(u.Z,{title:t.original.name,children:(0,a.jsx)(l.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>eT(t.original),children:t.original.name})})})},size:150},{header:"Description",accessorKey:"description",enableSorting:!1,cell:e=>{let{row:t}=e,n=t.original.description,s=n.length>80?n.substring(0,80)+"...":n;return(0,a.jsx)(u.Z,{title:n,children:(0,a.jsx)(c.Z,{className:"text-sm text-gray-700",children:s})})},size:250},{header:"Version",accessorKey:"version",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)(c.Z,{className:"text-sm",children:t.original.version})},size:80},{header:"Provider",accessorKey:"provider",enableSorting:!1,cell:e=>{let{row:t}=e,n=t.original.provider;return n?(0,a.jsx)("div",{className:"text-sm",children:(0,a.jsx)(c.Z,{className:"font-medium",children:n.organization})}):(0,a.jsx)(c.Z,{className:"text-gray-400",children:"-"})},size:120},{header:"Skills",accessorKey:"skills",enableSorting:!1,cell:e=>{let{row:t}=e,n=t.original.skills||[];return 0===n.length?(0,a.jsx)(c.Z,{className:"text-gray-400",children:"-"}):1===n.length?(0,a.jsx)("div",{className:"h-6 flex items-center",children:(0,a.jsx)(p.Z,{color:"purple",className:"text-xs",children:n[0].name})}):(0,a.jsxs)("div",{className:"h-6 flex items-center space-x-1",children:[(0,a.jsx)(p.Z,{color:"purple",className:"text-xs",children:n[0].name}),(0,a.jsx)(u.Z,{title:(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("div",{className:"font-medium",children:"All Skills:"}),n.map((e,t)=>(0,a.jsxs)("div",{className:"text-xs",children:["• ",e.name]},t))]}),trigger:"click",placement:"topLeft",children:(0,a.jsxs)("span",{className:"text-xs text-purple-600 cursor-pointer hover:text-purple-800 hover:underline",onClick:e=>e.stopPropagation(),children:["+",n.length-1]})})]})},size:150},{header:"Capabilities",accessorKey:"capabilities",enableSorting:!1,cell:e=>{let{row:t}=e,n=Object.entries(t.original.capabilities||{}).filter(e=>{let[t,n]=e;return!0===n}).map(e=>{let[t]=e;return t});return 0===n.length?(0,a.jsx)(c.Z,{className:"text-gray-400",children:"-"}):(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:n.map(e=>(0,a.jsx)(p.Z,{color:"green",className:"text-xs capitalize",children:e},e))})},size:150}],data:eP,isLoading:W,defaultSorting:[{id:"name",desc:!1}]}),(0,a.jsx)("div",{className:"mt-8 text-center",children:(0,a.jsxs)(c.Z,{className:"text-sm text-gray-600",children:["Showing ",eP.length," of ",(null==O?void 0:O.length)||0," agents"]})})]},"agents"),T&&T.length>0&&(0,a.jsxs)(A,{tab:"MCP Hub",children:[(0,a.jsx)("div",{className:"flex justify-between items-center mb-8",children:(0,a.jsx)(d.Z,{className:"text-2xl font-semibold text-gray-900",children:"Available MCP Servers"})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2 mb-3",children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium text-gray-700",children:"Search MCP Servers:"}),(0,a.jsx)(u.Z,{title:"Search MCP servers by name or description",placement:"top",children:(0,a.jsx)(f.Z,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(i.Z,{className:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2"}),(0,a.jsx)("input",{type:"text",placeholder:"Search MCP server names or descriptions...",value:en,onChange:e=>ea(e.target.value),className:"border border-gray-300 rounded-lg pl-10 pr-4 py-2 w-full text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium mb-3 text-gray-700",children:"Transport:"}),(0,a.jsx)(g.default,{mode:"multiple",value:eu,onChange:e=>ep(e),placeholder:"Select transport types",className:"w-full",size:"large",allowClear:!0,children:T&&(e=>{let t=new Set;return e.forEach(e=>{e.transport&&t.add(e.transport)}),Array.from(t).sort()})(T).map(e=>(0,a.jsx)(g.default.Option,{value:e,children:e},e))})]})]}),(0,a.jsx)(b.C,{columns:[{header:"Server Name",accessorKey:"server_name",enableSorting:!0,cell:e=>{let{row:t}=e;return(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(u.Z,{title:t.original.server_name,children:(0,a.jsx)(l.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left",onClick:()=>eL(t.original),children:t.original.server_name})})})},size:150},{header:"Description",accessorKey:"mcp_info.description",enableSorting:!1,cell:e=>{var t;let{row:n}=e,s=(null===(t=n.original.mcp_info)||void 0===t?void 0:t.description)||"-",r=s.length>80?s.substring(0,80)+"...":s;return(0,a.jsx)(u.Z,{title:s,children:(0,a.jsx)(c.Z,{className:"text-sm text-gray-700",children:r})})},size:250},{header:"URL",accessorKey:"url",enableSorting:!1,cell:e=>{let{row:t}=e,n=t.original.url,s=n.length>40?n.substring(0,40)+"...":n;return(0,a.jsx)(u.Z,{title:n,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(c.Z,{className:"text-xs font-mono",children:s}),(0,a.jsx)(x.Z,{onClick:()=>ez(n),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-3 h-3"})]})})},size:200},{header:"Transport",accessorKey:"transport",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.transport;return(0,a.jsx)(p.Z,{color:"blue",className:"text-xs uppercase",children:n})},size:100},{header:"Auth Type",accessorKey:"auth_type",enableSorting:!0,cell:e=>{let{row:t}=e,n=t.original.auth_type;return(0,a.jsx)(p.Z,{color:"none"===n?"gray":"green",className:"text-xs capitalize",children:n})},size:100}],data:eO,isLoading:J,defaultSorting:[{id:"server_name",desc:!1}]}),(0,a.jsx)("div",{className:"mt-8 text-center",children:(0,a.jsxs)(c.Z,{className:"text-sm text-gray-600",children:["Showing ",eO.length," of ",(null==T?void 0:T.length)||0," MCP servers"]})})]},"mcp")]})})]}),(0,a.jsx)(h.Z,{title:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(null==ey?void 0:ey.model_group)||"Model Details"}),ey&&(0,a.jsx)(u.Z,{title:"Copy model name",children:(0,a.jsx)(x.Z,{onClick:()=>ez(ey.model_group),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:ex,footer:null,onOk:()=>{ef(!1),eN(null)},onCancel:()=>{ef(!1),eN(null)},children:ey&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Model Overview"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Model Name:"}),(0,a.jsx)(c.Z,{children:ey.model_group})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Mode:"}),(0,a.jsx)(c.Z,{children:ey.mode||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Providers:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:ey.providers.map(e=>{let{logo:t}=(0,S.dr)(e);return(0,a.jsx)(p.Z,{color:"blue",children:(0,a.jsxs)("div",{className:"flex items-center space-x-1",children:[t&&(0,a.jsx)("img",{src:t,alt:e,className:"w-3 h-3 flex-shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}),(0,a.jsx)("span",{className:"capitalize",children:e})]})},e)})})]})]}),ey.model_group.includes("*")&&(0,a.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:(0,a.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,a.jsx)(f.Z,{className:"w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium text-blue-900 mb-2",children:"Wildcard Routing"}),(0,a.jsxs)(c.Z,{className:"text-sm text-blue-800 mb-2",children:["This model uses wildcard routing. You can pass any value where you see the"," ",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:"*"})," symbol."]}),(0,a.jsxs)(c.Z,{className:"text-sm text-blue-800",children:["For example, with"," ",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:ey.model_group}),", you can use any string (",(0,a.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded text-xs",children:ey.model_group.replace("*","my-custom-value")}),") that matches this pattern."]})]})]})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Token & Cost Information"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Max Input Tokens:"}),(0,a.jsx)(c.Z,{children:(null===(t=ey.max_input_tokens)||void 0===t?void 0:t.toLocaleString())||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Max Output Tokens:"}),(0,a.jsx)(c.Z,{children:(null===(n=ey.max_output_tokens)||void 0===n?void 0:n.toLocaleString())||"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Input Cost per 1M Tokens:"}),(0,a.jsx)(c.Z,{children:ey.input_cost_per_token?eF(ey.input_cost_per_token):"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Output Cost per 1M Tokens:"}),(0,a.jsx)(c.Z,{children:ey.output_cost_per_token?eF(ey.output_cost_per_token):"Not specified"})]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:(()=>{let e=eH(ey),t=["green","blue","purple","orange","red","yellow"];return 0===e.length?(0,a.jsx)(c.Z,{className:"text-gray-500",children:"No special capabilities listed"}):e.map((e,n)=>(0,a.jsx)(p.Z,{color:t[n%t.length],children:eR(e)},e))})()})]}),(ey.tpm||ey.rpm)&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Rate Limits"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[ey.tpm&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Tokens per Minute:"}),(0,a.jsx)(c.Z,{children:ey.tpm.toLocaleString()})]}),ey.rpm&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Requests per Minute:"}),(0,a.jsx)(c.Z,{children:ey.rpm.toLocaleString()})]})]})]}),ey.supported_openai_params&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Supported OpenAI Parameters"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:ey.supported_openai_params.map(e=>(0,a.jsx)(p.Z,{color:"green",children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,a.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,a.jsx)("pre",{className:"text-sm",children:(0,N.L)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,w.vf)(ey.mode||"chat"),selectedModel:ey.model_group,selectedSdk:"openai"})})}),(0,a.jsx)("div",{className:"mt-2 text-right",children:(0,a.jsx)("button",{onClick:()=>{ez((0,N.L)({apiKeySource:"custom",accessToken:null,apiKey:"your_api_key",inputMessage:"Hello, how are you?",chatHistory:[{role:"user",content:"Hello, how are you?",isImage:!1}],selectedTags:[],selectedVectorStores:[],selectedGuardrails:[],selectedPolicies:[],selectedMCPServers:[],endpointType:(0,w.vf)(ey.mode||"chat"),selectedModel:ey.model_group,selectedSdk:"openai"}))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})}),(0,a.jsx)(h.Z,{title:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(null==ew?void 0:ew.name)||"Agent Details"}),ew&&(0,a.jsx)(u.Z,{title:"Copy agent name",children:(0,a.jsx)(x.Z,{onClick:()=>ez(ew.name),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:e_,footer:null,onOk:()=>{eb(!1),eS(null)},onCancel:()=>{eb(!1),eS(null)},children:ew&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Agent Overview"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Name:"}),(0,a.jsx)(c.Z,{children:ew.name})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Version:"}),(0,a.jsx)(c.Z,{children:ew.version})]}),(0,a.jsxs)("div",{className:"col-span-2",children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Description:"}),(0,a.jsx)(c.Z,{children:ew.description})]}),ew.url&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"URL:"}),(0,a.jsx)("a",{href:ew.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 text-sm break-all",children:ew.url})]})]})]}),ew.capabilities&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Capabilities"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(ew.capabilities).filter(e=>{let[t,n]=e;return!0===n}).map(e=>{let[t]=e;return(0,a.jsx)(p.Z,{color:"green",className:"capitalize",children:t},t)})})]}),ew.skills&&ew.skills.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Skills"}),(0,a.jsx)("div",{className:"space-y-4",children:ew.skills.map((e,t)=>(0,a.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,a.jsx)("div",{className:"flex items-start justify-between mb-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium text-base",children:e.name}),(0,a.jsx)(c.Z,{className:"text-sm text-gray-600",children:e.description})]})}),e.tags&&e.tags.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map(e=>(0,a.jsx)(p.Z,{color:"purple",className:"text-xs",children:e},e))})]},t))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Input/Output Modes"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Input Modes:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:null===(C=ew.defaultInputModes)||void 0===C?void 0:C.map(e=>(0,a.jsx)(p.Z,{color:"blue",children:e},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Output Modes:"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:null===(Z=ew.defaultOutputModes)||void 0===Z?void 0:Z.map(e=>(0,a.jsx)(p.Z,{color:"blue",children:e},e))})]})]})]}),ew.documentationUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Documentation"}),(0,a.jsxs)("a",{href:ew.documentationUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 flex items-center space-x-2",children:[(0,a.jsx)(r.Z,{className:"w-4 h-4"}),(0,a.jsx)("span",{children:"View Documentation"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Usage Example (A2A Protocol)"}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium mb-2 text-gray-700",children:"Step 1: Retrieve Agent Card"}),(0,a.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,a.jsx)("pre",{className:"text-xs",children:"base_url = '".concat(ew.url,"'\n\nresolver = A2ACardResolver(\n httpx_client=httpx_client,\n base_url=base_url,\n # agent_card_path uses default, extended_agent_card_path also uses default\n)\n\n# Fetch Public Agent Card and Initialize Client\nfinal_agent_card_to_use: AgentCard | None = None\n_public_card = (\n await resolver.get_agent_card()\n) # Fetches from default public path - `/agents/{agent_id}/`\nfinal_agent_card_to_use = _public_card\n\nif _public_card.supports_authenticated_extended_card:\n try:\n auth_headers_dict = {\n 'Authorization': 'Bearer dummy-token-for-extended-card'\n }\n _extended_card = await resolver.get_agent_card(\n relative_card_path=EXTENDED_AGENT_CARD_PATH,\n http_kwargs={'headers': auth_headers_dict},\n )\n final_agent_card_to_use = (\n _extended_card # Update to use the extended card\n )\n except Exception as e_extended:\n logger.warning(\n f'Failed to fetch extended agent card: {e_extended}. Will proceed with public card.',\n exc_info=True,\n )")})}),(0,a.jsx)("div",{className:"mt-2 text-right",children:(0,a.jsx)("button",{onClick:()=>{ez("from a2a.client import A2ACardResolver, A2AClient\nfrom a2a.types import (\n AgentCard,\n MessageSendParams,\n SendMessageRequest,\n SendStreamingMessageRequest,\n)\nfrom a2a.utils.constants import (\n AGENT_CARD_WELL_KNOWN_PATH,\n EXTENDED_AGENT_CARD_PATH,\n)\n\nbase_url = '".concat(ew.url,"'\n\nresolver = A2ACardResolver(\n httpx_client=httpx_client,\n base_url=base_url,\n # agent_card_path uses default, extended_agent_card_path also uses default\n)\n\n# Fetch Public Agent Card and Initialize Client\nfinal_agent_card_to_use: AgentCard | None = None\n_public_card = (\n await resolver.get_agent_card()\n) # Fetches from default public path - `/agents/{agent_id}/`\nfinal_agent_card_to_use = _public_card\n\nif _public_card.supports_authenticated_extended_card:\n try:\n auth_headers_dict = {\n 'Authorization': 'Bearer dummy-token-for-extended-card'\n }\n _extended_card = await resolver.get_agent_card(\n relative_card_path=EXTENDED_AGENT_CARD_PATH,\n http_kwargs={'headers': auth_headers_dict},\n )\n final_agent_card_to_use = (\n _extended_card # Update to use the extended card\n )\n except Exception as e_extended:\n logger.warning(\n f'Failed to fetch extended agent card: {e_extended}. Will proceed with public card.',\n exc_info=True,\n )"))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-sm font-medium mb-2 text-gray-700",children:"Step 2: Call the Agent"}),(0,a.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,a.jsx)("pre",{className:"text-xs",children:"client = A2AClient(\n httpx_client=httpx_client, agent_card=final_agent_card_to_use\n)\n\nsend_message_payload: dict[str, Any] = {\n 'message': {\n 'role': 'user',\n 'parts': [\n {'kind': 'text', 'text': 'how much is 10 USD in INR?'}\n ],\n 'messageId': uuid4().hex,\n },\n}\nrequest = SendMessageRequest(\n id=str(uuid4()), params=MessageSendParams(**send_message_payload)\n)\n\nresponse = await client.send_message(request)\nprint(response.model_dump(mode='json', exclude_none=True))"})}),(0,a.jsx)("div",{className:"mt-2 text-right",children:(0,a.jsx)("button",{onClick:()=>{ez("client = A2AClient(\n httpx_client=httpx_client, agent_card=final_agent_card_to_use\n)\n\nsend_message_payload: dict[str, Any] = {\n 'message': {\n 'role': 'user',\n 'parts': [\n {'kind': 'text', 'text': 'how much is 10 USD in INR?'}\n ],\n 'messageId': uuid4().hex,\n },\n}\nrequest = SendMessageRequest(\n id=str(uuid4()), params=MessageSendParams(**send_message_payload)\n)\n\nresponse = await client.send_message(request)\nprint(response.model_dump(mode='json', exclude_none=True))")},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})]})}),(0,a.jsx)(h.Z,{title:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("span",{children:(null==eA?void 0:eA.server_name)||"MCP Server Details"}),eA&&(0,a.jsx)(u.Z,{title:"Copy server name",children:(0,a.jsx)(x.Z,{onClick:()=>ez(eA.server_name),className:"cursor-pointer text-gray-500 hover:text-blue-500 w-4 h-4"})})]}),width:1e3,open:ej,footer:null,onOk:()=>{ev(!1),eC(null)},onCancel:()=>{ev(!1),eC(null)},children:eA&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Server Overview"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Server Name:"}),(0,a.jsx)(c.Z,{children:eA.server_name})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Transport:"}),(0,a.jsx)(p.Z,{color:"blue",children:eA.transport})]}),eA.alias&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Alias:"}),(0,a.jsx)(c.Z,{children:eA.alias})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Auth Type:"}),(0,a.jsx)(p.Z,{color:"none"===eA.auth_type?"gray":"green",children:eA.auth_type})]}),(0,a.jsxs)("div",{className:"col-span-2",children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"Description:"}),(0,a.jsx)(c.Z,{children:(null===(I=eA.mcp_info)||void 0===I?void 0:I.description)||"-"})]}),(0,a.jsxs)("div",{className:"col-span-2",children:[(0,a.jsx)(c.Z,{className:"font-medium",children:"URL:"}),(0,a.jsxs)("a",{href:eA.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 text-sm break-all flex items-center space-x-2",children:[(0,a.jsx)("span",{children:eA.url}),(0,a.jsx)(r.Z,{className:"w-4 h-4"})]})]})]})]}),eA.mcp_info&&Object.keys(eA.mcp_info).length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Additional Information"}),(0,a.jsx)("div",{className:"bg-gray-50 p-4 rounded-lg",children:(0,a.jsx)("pre",{className:"text-xs overflow-x-auto",children:JSON.stringify(eA.mcp_info,null,2)})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.Z,{className:"text-lg font-semibold mb-4",children:"Usage Example"}),(0,a.jsx)("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:(0,a.jsx)("pre",{className:"text-sm",children:'# Using MCP Server with Python FastMCP\n\nfrom fastmcp import Client\nimport asyncio\n\n# Standard MCP configuration\nconfig = {\n "mcpServers": {\n "'.concat(eA.server_name,'": {\n "url": "http://localhost:4000/').concat(eA.server_name,'/mcp",\n "headers": {\n "x-litellm-api-key": "Bearer sk-1234"\n }\n }\n }\n}\n\n# Create a client that connects to the server\nclient = Client(config)\n\nasync def main():\n async with client:\n # List available tools\n tools = await client.list_tools()\n print(f"Available tools: {[tool.name for tool in tools]}")\n\n # Call a tool\n response = await client.call_tool(\n name="tool_name", \n arguments={"arg": "value"}\n )\n print(f"Response: {response}")\n\nif __name__ == "__main__":\n asyncio.run(main())')})}),(0,a.jsx)("div",{className:"mt-2 text-right",children:(0,a.jsx)("button",{onClick:()=>{ez('# Using MCP Server with Python FastMCP\n\nfrom fastmcp import Client\nimport asyncio\n\n# Standard MCP configuration\nconfig = {\n "mcpServers": {\n "'.concat(eA.server_name,'": {\n "url": "http://localhost:4000/').concat(eA.server_name,'/mcp",\n "headers": {\n "x-litellm-api-key": "Bearer sk-1234"\n }\n }\n }\n}\n\n# Create a client that connects to the server\nclient = Client(config)\n\nasync def main():\n async with client:\n # List available tools\n tools = await client.list_tools()\n print(f"Available tools: {[tool.name for tool in tools]}")\n\n # Call a tool\n response = await client.call_tool(\n name="tool_name", \n arguments={"arg": "value"}\n )\n print(f"Response: {response}")\n\nif __name__ == "__main__":\n asyncio.run(main())'))},className:"text-sm text-blue-600 hover:text-blue-800 cursor-pointer",children:"Copy to clipboard"})})]})]})})]})})}},69734:function(e,t,n){n.d(t,{F:function(){return l},f:function(){return o}});var a=n(57437),s=n(2265),r=n(19250);let i=(0,s.createContext)(void 0),l=()=>{let e=(0,s.useContext)(i);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e},o=e=>{let{children:t,accessToken:n}=e,[l,o]=(0,s.useState)(null);return(0,s.useEffect)(()=>{(async()=>{try{let t=(0,r.getProxyBaseUrl)(),n=await fetch(t?"".concat(t,"/get/ui_theme_settings"):"/get/ui_theme_settings",{method:"GET",headers:{"Content-Type":"application/json"}});if(n.ok){var e;let t=await n.json();(null===(e=t.values)||void 0===e?void 0:e.logo_url)&&o(t.values.logo_url)}}catch(e){console.warn("Failed to load logo settings from backend:",e)}})()},[]),(0,a.jsx)(i.Provider,{value:{logoUrl:l,setLogoUrl:o},children:t})}},9245:function(e,t,n){n.d(t,{D$:function(){return i},Qg:function(){return a},e8:function(){return l},le:function(){return r},nO:function(){return s}});let a="local-storage-change";function s(e){window.dispatchEvent(new CustomEvent(a,{detail:{key:e}}))}function r(e){try{return window.localStorage.getItem(e)}catch(t){return console.warn('Error reading localStorage key "'.concat(e,'":'),t),null}}function i(e,t){try{window.localStorage.setItem(e,t)}catch(t){console.warn('Error setting localStorage key "'.concat(e,'":'),t)}}function l(e){try{window.localStorage.removeItem(e)}catch(t){console.warn('Error removing localStorage key "'.concat(e,'":'),t)}}},91624:function(e,t,n){n.d(t,{C:function(){return s}});var a=n(19250);let s=async e=>{if(!e)return null;try{return await (0,a.getProxyUISettings)(e)}catch(e){return console.error("Error fetching proxy settings:",e),null}}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7572-64b63fb5f5a45de2.js b/litellm/proxy/_experimental/out/_next/static/chunks/7572-64b63fb5f5a45de2.js
deleted file mode 100644
index b56cf042f0a..00000000000
--- a/litellm/proxy/_experimental/out/_next/static/chunks/7572-64b63fb5f5a45de2.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7572],{12660:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(1119),o=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"},a=r(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:c}))})},44625:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(1119),o=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"},a=r(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:c}))})},29271:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(1119),o=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},a=r(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:c}))})},38434:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(1119),o=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},a=r(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:c}))})},92403:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(1119),o=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5l-41.1 41.1-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-44.9 44.9-62.3-62.3a8.15 8.15 0 00-11.4 0l-39.8 39.8a8.15 8.15 0 000 11.4l62.3 62.3-65.3 65.3a8.03 8.03 0 000 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6A304.06 304.06 0 00608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644c-60.9 0-118.2-23.7-161.2-66.8-43.1-43-66.8-100.3-66.8-161.2 0-60.9 23.7-118.2 66.8-161.2 43-43.1 100.3-66.8 161.2-66.8 60.9 0 118.2 23.7 161.2 66.8 43.1 43 66.8 100.3 66.8 161.2 0 60.9-23.7 118.2-66.8 161.2z"}}]},name:"key",theme:"outlined"},a=r(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:c}))})},62272:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(1119),o=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"},a=r(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:c}))})},34419:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(1119),o=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},a=r(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:c}))})},69993:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(1119),o=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},a=r(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:c}))})},57400:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(1119),o=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64L128 192v384c0 212.1 171.9 384 384 384s384-171.9 384-384V192L512 64zm312 512c0 172.3-139.7 312-312 312S200 748.3 200 576V246l312-110 312 110v330z"}},{tag:"path",attrs:{d:"M378.4 475.1a35.91 35.91 0 00-50.9 0 35.91 35.91 0 000 50.9l129.4 129.4 2.1 2.1a33.98 33.98 0 0048.1 0L730.6 434a33.98 33.98 0 000-48.1l-2.8-2.8a33.98 33.98 0 00-48.1 0L483 579.7 378.4 475.1z"}}]},name:"safety",theme:"outlined"},a=r(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:c}))})},55322:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(1119),o=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},a=r(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:c}))})},71891:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(1119),o=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm62.6-651.7l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9zm60.16 186.23a48 48 0 1067.88-67.89 48 48 0 10-67.88 67.89zM889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z"}}]},name:"tags",theme:"outlined"},a=r(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:c}))})},58630:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(1119),o=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"},a=r(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:c}))})},15883:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(1119),o=r(2265),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},a=r(55015),l=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:c}))})},21626:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(5853),o=r(2265),c=r(13241);let a=(0,r(1153).fn)("Table"),l=o.forwardRef((e,t)=>{let{children:r,className:l}=e,i=(0,n._T)(e,["children","className"]);return o.createElement("div",{className:(0,c.q)(a("root"),"overflow-auto",l)},o.createElement("table",Object.assign({ref:t,className:(0,c.q)(a("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},i),r))});l.displayName="Table"},97214:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(5853),o=r(2265),c=r(13241);let a=(0,r(1153).fn)("TableBody"),l=o.forwardRef((e,t)=>{let{children:r,className:l}=e,i=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tbody",Object.assign({ref:t,className:(0,c.q)(a("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",l)},i),r))});l.displayName="TableBody"},28241:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(5853),o=r(2265),c=r(13241);let a=(0,r(1153).fn)("TableCell"),l=o.forwardRef((e,t)=>{let{children:r,className:l}=e,i=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("td",Object.assign({ref:t,className:(0,c.q)(a("root"),"align-middle whitespace-nowrap text-left p-4",l)},i),r))});l.displayName="TableCell"},58834:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(5853),o=r(2265),c=r(13241);let a=(0,r(1153).fn)("TableHead"),l=o.forwardRef((e,t)=>{let{children:r,className:l}=e,i=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("thead",Object.assign({ref:t,className:(0,c.q)(a("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",l)},i),r))});l.displayName="TableHead"},69552:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(5853),o=r(2265),c=r(13241);let a=(0,r(1153).fn)("TableHeaderCell"),l=o.forwardRef((e,t)=>{let{children:r,className:l}=e,i=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("th",Object.assign({ref:t,className:(0,c.q)(a("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",l)},i),r))});l.displayName="TableHeaderCell"},71876:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(5853),o=r(2265),c=r(13241);let a=(0,r(1153).fn)("TableRow"),l=o.forwardRef((e,t)=>{let{children:r,className:l}=e,i=(0,n._T)(e,["children","className"]);return o.createElement(o.Fragment,null,o.createElement("tr",Object.assign({ref:t,className:(0,c.q)(a("row"),l)},i),r))});l.displayName="TableRow"},96761:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(5853),o=r(26898),c=r(13241),a=r(1153),l=r(2265);let i=l.forwardRef((e,t)=>{let{color:r,children:i,className:s}=e,u=(0,n._T)(e,["color","children","className"]);return l.createElement("p",Object.assign({ref:t,className:(0,c.q)("font-medium text-tremor-title",r?(0,a.bM)(r,o.K.darkText).textColor:"text-tremor-content-strong dark:text-dark-tremor-content-strong",s)},u),i)});i.displayName="Title"},3810:function(e,t,r){r.d(t,{Z:function(){return M}});var n=r(2265),o=r(36760),c=r.n(o),a=r(18694),l=r(93350),i=r(53445),s=r(19722),u=r(6694),f=r(71744),d=r(93463),p=r(54558),m=r(12918),h=r(71140),b=r(99320);let g=e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:o,calc:c}=e,a=c(n).sub(r).equal(),l=c(t).sub(r).equal();return{[o]:Object.assign(Object.assign({},(0,m.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:"".concat((0,d.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusSM,opacity:1,transition:"all ".concat(e.motionDurationMid),textAlign:"start",position:"relative",["&".concat(o,"-rtl")]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},["".concat(o,"-close-icon")]:{marginInlineStart:l,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),"&:hover":{color:e.colorTextHeading}},["&".concat(o,"-has-color")]:{borderColor:"transparent",["&, a, a:hover, ".concat(e.iconCls,"-close, ").concat(e.iconCls,"-close:hover")]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",["&:not(".concat(o,"-checkable-checked):hover")]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},["> ".concat(e.iconCls," + span, > span + ").concat(e.iconCls)]:{marginInlineStart:a}}),["".concat(o,"-borderless")]:{borderColor:"transparent",background:e.tagBorderlessBg}}},v=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,o=e.fontSizeSM;return(0,h.IX)(e,{tagFontSize:o,tagLineHeight:(0,d.bf)(n(e.lineHeightSM).mul(o).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},y=e=>({defaultBg:new p.t(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var w=(0,b.I$)("Tag",e=>g(v(e)),y),C=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let O=n.forwardRef((e,t)=>{let{prefixCls:r,style:o,className:a,checked:l,children:i,icon:s,onChange:u,onClick:d}=e,p=C(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:m,tag:h}=n.useContext(f.E_),b=m("tag",r),[g,v,y]=w(b),O=c()(b,"".concat(b,"-checkable"),{["".concat(b,"-checkable-checked")]:l},null==h?void 0:h.className,a,v,y);return g(n.createElement("span",Object.assign({},p,{ref:t,style:Object.assign(Object.assign({},o),null==h?void 0:h.style),className:O,onClick:e=>{null==u||u(!l),null==d||d(e)}}),s,n.createElement("span",null,i)))});var k=r(18536);let x=e=>(0,k.Z)(e,(t,r)=>{let{textColor:n,lightBorderColor:o,lightColor:c,darkColor:a}=r;return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:n,background:c,borderColor:o,"&-inverse":{color:e.colorTextLightSolid,background:a,borderColor:a},["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}});var z=(0,b.bk)(["Tag","preset"],e=>x(v(e)),y);let Z=(e,t,r)=>{let n="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:e["color".concat(r)],background:e["color".concat(n,"Bg")],borderColor:e["color".concat(n,"Border")],["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}};var E=(0,b.bk)(["Tag","status"],e=>{let t=v(e);return[Z(t,"success","Success"),Z(t,"processing","Info"),Z(t,"error","Error"),Z(t,"warning","Warning")]},y),j=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let N=n.forwardRef((e,t)=>{let{prefixCls:r,className:o,rootClassName:d,style:p,children:m,icon:h,color:b,onClose:g,bordered:v=!0,visible:y}=e,C=j(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:O,direction:k,tag:x}=n.useContext(f.E_),[Z,N]=n.useState(!0),M=(0,a.Z)(C,["closeIcon","closable"]);n.useEffect(()=>{void 0!==y&&N(y)},[y]);let S=(0,l.o2)(b),T=(0,l.yT)(b),L=S||T,P=Object.assign(Object.assign({backgroundColor:b&&!L?b:void 0},null==x?void 0:x.style),p),R=O("tag",r),[B,H,_]=w(R),A=c()(R,null==x?void 0:x.className,{["".concat(R,"-").concat(b)]:L,["".concat(R,"-has-color")]:b&&!L,["".concat(R,"-hidden")]:!Z,["".concat(R,"-rtl")]:"rtl"===k,["".concat(R,"-borderless")]:!v},o,d,H,_),I=e=>{e.stopPropagation(),null==g||g(e),e.defaultPrevented||N(!1)},[,V]=(0,i.b)((0,i.w)(e),(0,i.w)(x),{closable:!1,closeIconRender:e=>{let t=n.createElement("span",{className:"".concat(R,"-close-icon"),onClick:I},e);return(0,s.wm)(e,t,e=>({onClick:t=>{var r;null===(r=null==e?void 0:e.onClick)||void 0===r||r.call(e,t),I(t)},className:c()(null==e?void 0:e.className,"".concat(R,"-close-icon"))}))}}),q="function"==typeof C.onClick||m&&"a"===m.type,F=h||null,D=F?n.createElement(n.Fragment,null,F,m&&n.createElement("span",null,m)):m,W=n.createElement("span",Object.assign({},M,{ref:t,className:A,style:P}),D,V,S&&n.createElement(z,{key:"preset",prefixCls:R}),T&&n.createElement(E,{key:"status",prefixCls:R}));return B(q?n.createElement(u.Z,{component:"Tag"},W):W)});N.CheckableTag=O;var M=N},79205:function(e,t,r){r.d(t,{Z:function(){return f}});var n=r(2265);let o=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),c=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),a=e=>{let t=c(e);return t.charAt(0).toUpperCase()+t.slice(1)},l=function(){for(var e=arguments.length,t=Array(e),r=0;r!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()},i=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let u=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:o=24,strokeWidth:c=2,absoluteStrokeWidth:a,className:u="",children:f,iconNode:d,...p}=e;return(0,n.createElement)("svg",{ref:t,...s,width:o,height:o,stroke:r,strokeWidth:a?24*Number(c)/Number(o):c,className:l("lucide",u),...!f&&!i(p)&&{"aria-hidden":"true"},...p},[...d.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(f)?f:[f]])}),f=(e,t)=>{let r=(0,n.forwardRef)((r,c)=>{let{className:i,...s}=r;return(0,n.createElement)(u,{ref:c,iconNode:t,className:l("lucide-".concat(o(a(e))),"lucide-".concat(e),i),...s})});return r.displayName=a(e),r}},87769:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},42208:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},6337:function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var o=l(r(2265)),c=l(r(49211)),a=["text","onCopy","options","children"];function l(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a),n=o.default.Children.only(t);return o.default.cloneElement(n,s(s({},r),{},{onClick:this.onClick}))}}],function(e,t){for(var r=0;r{"disableShowNewBadge"===s.key&&e()},t=s=>{let{key:t}=s.detail;"disableShowNewBadge"===t&&e()};return window.addEventListener("storage",s),window.addEventListener(r.Qg,t),()=>{window.removeEventListener("storage",s),window.removeEventListener(r.Qg,t)}}function o(){return"true"===(0,r.le)("disableShowNewBadge")}function d(e){let{children:s,dot:t=!1}=e;return(0,n.useSyncExternalStore)(i,o)?s?(0,a.jsx)(a.Fragment,{children:s}):null:s?(0,a.jsx)(l.Z,{color:"blue",count:t?void 0:"New",dot:t,children:s}):(0,a.jsx)(l.Z,{color:"blue",count:t?void 0:"New",dot:t})}},12363:function(e,s,t){t.d(s,{d:function(){return n},n:function(){return l}});var a=t(2265);let l=()=>{let[e,s]=(0,a.useState)("http://localhost:4000");return(0,a.useEffect)(()=>{{let{protocol:e,host:t}=window.location;s("".concat(e,"//").concat(t))}},[]),e},n=25},30841:function(e,s,t){t.d(s,{IE:function(){return n},LO:function(){return l},cT:function(){return r}});var a=t(19250);let l=async e=>{if(!e)return[];try{let{aliases:s}=await (0,a.keyAliasesCall)(e);return Array.from(new Set((s||[]).filter(Boolean)))}catch(e){return console.error("Error fetching all key aliases:",e),[]}},n=async(e,s)=>{if(!e)return[];try{let t=[],l=1,n=!0;for(;n;){let r=await (0,a.teamListCall)(e,s||null,null);t=[...t,...r],l{if(!e)return[];try{let s=[],t=1,l=!0;for(;l;){let n=await (0,a.organizationListCall)(e);s=[...s,...n],t{let{options:s,onApplyFilters:t,onResetFilters:d,initialValues:m={},buttonLabel:u="Filters"}=e,[x,h]=(0,l.useState)(!1),[p,g]=(0,l.useState)(m),[f,j]=(0,l.useState)({}),[v,y]=(0,l.useState)({}),[b,N]=(0,l.useState)({}),[w,_]=(0,l.useState)({}),k=(0,l.useCallback)(c()(async(e,s)=>{if(s.isSearchable&&s.searchFn){y(e=>({...e,[s.name]:!0}));try{let t=await s.searchFn(e);j(e=>({...e,[s.name]:t}))}catch(e){console.error("Error searching:",e),j(e=>({...e,[s.name]:[]}))}finally{y(e=>({...e,[s.name]:!1}))}}},300),[]),S=(0,l.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!w[e.name]){y(s=>({...s,[e.name]:!0})),_(s=>({...s,[e.name]:!0}));try{let s=await e.searchFn("");j(t=>({...t,[e.name]:s}))}catch(s){console.error("Error loading initial options:",s),j(s=>({...s,[e.name]:[]}))}finally{y(s=>({...s,[e.name]:!1}))}}},[w]);(0,l.useEffect)(()=>{x&&s.forEach(e=>{e.isSearchable&&!w[e.name]&&S(e)})},[x,s,S,w]);let C=(e,s)=>{let a={...p,[e]:s};g(a),t(a)},L=(e,s)=>{e&&s.isSearchable&&!w[s.name]&&S(s)};return(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,a.jsx)(n.ZP,{icon:(0,a.jsx)(o.Z,{className:"h-4 w-4"}),onClick:()=>h(!x),className:"flex items-center gap-2",children:u}),(0,a.jsx)(n.ZP,{onClick:()=>{let e={};s.forEach(s=>{e[s.name]=""}),g(e),d()},children:"Reset Filters"})]}),x&&(0,a.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Error Code","Error Message","Key Hash","Model"].map(e=>{let t=s.find(s=>s.label===e||s.name===e);return t?(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm text-gray-600",children:t.label||t.name}),t.isSearchable?(0,a.jsx)(r.default,{showSearch:!0,className:"w-full",placeholder:"Search ".concat(t.label||t.name,"..."),value:p[t.name]||void 0,onChange:e=>C(t.name,e),onDropdownVisibleChange:e=>L(e,t),onSearch:e=>{N(s=>({...s,[t.name]:e})),t.searchFn&&k(e,t)},filterOption:!1,loading:v[t.name],options:f[t.name]||[],allowClear:!0,notFoundContent:v[t.name]?"Loading...":"No results found"}):t.options?(0,a.jsx)(r.default,{className:"w-full",placeholder:"Select ".concat(t.label||t.name,"..."),value:p[t.name]||void 0,onChange:e=>C(t.name,e),allowClear:!0,children:t.options.map(e=>(0,a.jsx)(r.default.Option,{value:e.value,children:e.label},e.value))}):(0,a.jsx)(i.default,{className:"w-full",placeholder:"Enter ".concat(t.label||t.name,"..."),value:p[t.name]||"",onChange:e=>C(t.name,e.target.value),allowClear:!0})]},t.name):null})})]})}},57049:function(e,s,t){t.d(s,{I:function(){return tc},Z:function(){return td}});var a,l,n=t(57437),r=t(29827),i=t(11713),o=t(77398),d=t.n(o),c=t(2265),m=t(99981),u=t(44851);let x=e=>e>=.8?"text-green-600":"text-yellow-600";var h=e=>{let{entities:s}=e,[t,a]=(0,c.useState)(!0),[l,r]=(0,c.useState)({}),i=e=>{r(s=>({...s,[e]:!s[e]}))};return s&&0!==s.length?(0,n.jsxs)("div",{className:"mt-4",children:[(0,n.jsxs)("div",{className:"flex items-center mb-2 cursor-pointer",onClick:()=>a(!t),children:[(0,n.jsx)("svg",{className:"w-5 h-5 mr-2 transition-transform ".concat(t?"transform rotate-90":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,n.jsxs)("h4",{className:"font-medium",children:["Detected Entities (",s.length,")"]})]}),t&&(0,n.jsx)("div",{className:"space-y-2",children:s.map((e,s)=>{let t=l[s]||!1;return(0,n.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>i(s),children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("svg",{className:"w-5 h-5 mr-2 transition-transform ".concat(t?"transform rotate-90":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,n.jsx)("span",{className:"font-medium mr-2",children:e.entity_type}),(0,n.jsxs)("span",{className:"font-mono ".concat(x(e.score)),children:["Score: ",e.score.toFixed(2)]})]}),(0,n.jsxs)("span",{className:"text-xs text-gray-500",children:["Position: ",e.start,"-",e.end]})]}),t&&(0,n.jsx)("div",{className:"p-3 border-t bg-white",children:(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-2",children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Entity Type:"}),(0,n.jsx)("span",{children:e.entity_type})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Position:"}),(0,n.jsxs)("span",{children:["Characters ",e.start,"-",e.end]})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Confidence:"}),(0,n.jsx)("span",{className:x(e.score),children:e.score.toFixed(2)})]})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[e.recognition_metadata&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Recognizer:"}),(0,n.jsx)("span",{children:e.recognition_metadata.recognizer_name})]}),(0,n.jsxs)("div",{className:"flex overflow-hidden",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Identifier:"}),(0,n.jsx)("span",{className:"truncate text-xs font-mono",children:e.recognition_metadata.recognizer_identifier})]})]}),e.analysis_explanation&&(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Explanation:"}),(0,n.jsx)("span",{children:e.analysis_explanation})]})]})]})})]},s)})})]}):null};let p=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"slate";return(0,n.jsx)("span",{className:"px-2 py-1 rounded-md text-xs font-medium inline-block ".concat({green:"bg-green-100 text-green-800",red:"bg-red-100 text-red-800",blue:"bg-blue-50 text-blue-700",slate:"bg-slate-100 text-slate-800",amber:"bg-amber-100 text-amber-800"}[s]),children:e})},g=e=>e?p("detected","red"):p("not detected","slate"),f=e=>{let{title:s,count:t,defaultOpen:a=!0,right:l,children:r}=e,[i,o]=(0,c.useState)(a);return(0,n.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>o(e=>!e),children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("svg",{className:"w-5 h-5 mr-2 transition-transform ".concat(i?"transform rotate-90":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,n.jsxs)("h5",{className:"font-medium",children:[s," ","number"==typeof t&&(0,n.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",t,")"]})]})]}),(0,n.jsx)("div",{children:l})]}),i&&(0,n.jsx)("div",{className:"p-3 border-t bg-white",children:r})]})},j=e=>{let{label:s,children:t,mono:a}=e;return(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:s}),(0,n.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:t})]})},v=()=>(0,n.jsx)("div",{className:"my-3 border-t"});var y=e=>{var s,t,a,l,r,i,o,d,c,m;let{response:u}=e;if(!u)return null;let x=null!==(r=null!==(l=u.outputs)&&void 0!==l?l:u.output)&&void 0!==r?r:[],h="GUARDRAIL_INTERVENED"===u.action?"red":"green",y=(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(null===(s=u.guardrailCoverage)||void 0===s?void 0:s.textCharacters)&&p("text guarded ".concat(null!==(i=u.guardrailCoverage.textCharacters.guarded)&&void 0!==i?i:0,"/").concat(null!==(o=u.guardrailCoverage.textCharacters.total)&&void 0!==o?o:0),"blue"),(null===(t=u.guardrailCoverage)||void 0===t?void 0:t.images)&&p("images guarded ".concat(null!==(d=u.guardrailCoverage.images.guarded)&&void 0!==d?d:0,"/").concat(null!==(c=u.guardrailCoverage.images.total)&&void 0!==c?c:0),"blue")]}),b=u.usage&&(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(u.usage).map(e=>{let[s,t]=e;return"number"==typeof t?(0,n.jsxs)("span",{className:"px-2 py-1 bg-slate-100 text-slate-800 rounded-md text-xs font-medium",children:[s,": ",t]},s):null})});return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"border rounded-lg p-4",children:[(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(j,{label:"Action:",children:p(null!==(m=u.action)&&void 0!==m?m:"N/A",h)}),u.actionReason&&(0,n.jsx)(j,{label:"Action Reason:",children:u.actionReason}),u.blockedResponse&&(0,n.jsx)(j,{label:"Blocked Response:",children:(0,n.jsx)("span",{className:"italic",children:u.blockedResponse})})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(j,{label:"Coverage:",children:y}),(0,n.jsx)(j,{label:"Usage:",children:b})]})]}),x.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v,{}),(0,n.jsx)("h4",{className:"font-medium mb-2",children:"Outputs"}),(0,n.jsx)("div",{className:"space-y-2",children:x.map((e,s)=>{var t;return(0,n.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,n.jsx)("div",{className:"text-sm whitespace-pre-wrap",children:null!==(t=e.text)&&void 0!==t?t:(0,n.jsx)("em",{children:"(non-text output)"})})},s)})})]})]}),(null===(a=u.assessments)||void 0===a?void 0:a.length)?(0,n.jsx)("div",{className:"space-y-3",children:u.assessments.map((e,s)=>{var t,a,l,r,i,o,d,c,m,u,x,h,v,y,b,N,w,_,k,S,C,L,E,T;let M=(0,n.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.wordPolicy&&p("word","slate"),e.contentPolicy&&p("content","slate"),e.topicPolicy&&p("topic","slate"),e.sensitiveInformationPolicy&&p("sensitive-info","slate"),e.contextualGroundingPolicy&&p("contextual-grounding","slate"),e.automatedReasoningPolicy&&p("automated-reasoning","slate")]});return(0,n.jsxs)(f,{title:"Assessment #".concat(s+1),defaultOpen:!0,right:(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(null===(t=e.invocationMetrics)||void 0===t?void 0:t.guardrailProcessingLatency)!=null&&p("".concat(e.invocationMetrics.guardrailProcessingLatency," ms"),"amber"),M]}),children:[e.wordPolicy&&(0,n.jsxs)("div",{className:"mb-3",children:[(0,n.jsx)("h6",{className:"font-medium mb-2",children:"Word Policy"}),(null!==(N=null===(a=e.wordPolicy.customWords)||void 0===a?void 0:a.length)&&void 0!==N?N:0)>0&&(0,n.jsx)(f,{title:"Custom Words",defaultOpen:!0,children:(0,n.jsx)("div",{className:"space-y-2",children:e.wordPolicy.customWords.map((e,s)=>{var t;return(0,n.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[p(null!==(t=e.action)&&void 0!==t?t:"N/A",e.detected?"red":"slate"),(0,n.jsx)("span",{className:"font-mono text-sm break-all",children:e.match})]}),g(e.detected)]},s)})})}),(null!==(w=null===(l=e.wordPolicy.managedWordLists)||void 0===l?void 0:l.length)&&void 0!==w?w:0)>0&&(0,n.jsx)(f,{title:"Managed Word Lists",defaultOpen:!1,children:(0,n.jsx)("div",{className:"space-y-2",children:e.wordPolicy.managedWordLists.map((e,s)=>{var t;return(0,n.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[p(null!==(t=e.action)&&void 0!==t?t:"N/A",e.detected?"red":"slate"),(0,n.jsx)("span",{className:"font-mono text-sm break-all",children:e.match}),e.type&&p(e.type,"slate")]}),g(e.detected)]},s)})})})]}),(null===(i=e.contentPolicy)||void 0===i?void 0:null===(r=i.filters)||void 0===r?void 0:r.length)?(0,n.jsxs)("div",{className:"mb-3",children:[(0,n.jsx)("h6",{className:"font-medium mb-2",children:"Content Policy"}),(0,n.jsx)("div",{className:"overflow-x-auto",children:(0,n.jsxs)("table",{className:"min-w-full text-sm",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{className:"text-left text-gray-600",children:[(0,n.jsx)("th",{className:"py-1 pr-4",children:"Type"}),(0,n.jsx)("th",{className:"py-1 pr-4",children:"Action"}),(0,n.jsx)("th",{className:"py-1 pr-4",children:"Detected"}),(0,n.jsx)("th",{className:"py-1 pr-4",children:"Strength"}),(0,n.jsx)("th",{className:"py-1 pr-4",children:"Confidence"})]})}),(0,n.jsx)("tbody",{children:e.contentPolicy.filters.map((e,s)=>{var t,a,l,r;return(0,n.jsxs)("tr",{className:"border-t",children:[(0,n.jsx)("td",{className:"py-1 pr-4",children:null!==(t=e.type)&&void 0!==t?t:"—"}),(0,n.jsx)("td",{className:"py-1 pr-4",children:p(null!==(a=e.action)&&void 0!==a?a:"—",e.detected?"red":"slate")}),(0,n.jsx)("td",{className:"py-1 pr-4",children:g(e.detected)}),(0,n.jsx)("td",{className:"py-1 pr-4",children:null!==(l=e.filterStrength)&&void 0!==l?l:"—"}),(0,n.jsx)("td",{className:"py-1 pr-4",children:null!==(r=e.confidence)&&void 0!==r?r:"—"})]},s)})})]})})]}):null,(null===(d=e.contextualGroundingPolicy)||void 0===d?void 0:null===(o=d.filters)||void 0===o?void 0:o.length)?(0,n.jsxs)("div",{className:"mb-3",children:[(0,n.jsx)("h6",{className:"font-medium mb-2",children:"Contextual Grounding"}),(0,n.jsx)("div",{className:"overflow-x-auto",children:(0,n.jsxs)("table",{className:"min-w-full text-sm",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{className:"text-left text-gray-600",children:[(0,n.jsx)("th",{className:"py-1 pr-4",children:"Type"}),(0,n.jsx)("th",{className:"py-1 pr-4",children:"Action"}),(0,n.jsx)("th",{className:"py-1 pr-4",children:"Detected"}),(0,n.jsx)("th",{className:"py-1 pr-4",children:"Score"}),(0,n.jsx)("th",{className:"py-1 pr-4",children:"Threshold"})]})}),(0,n.jsx)("tbody",{children:e.contextualGroundingPolicy.filters.map((e,s)=>{var t,a,l,r;return(0,n.jsxs)("tr",{className:"border-t",children:[(0,n.jsx)("td",{className:"py-1 pr-4",children:null!==(t=e.type)&&void 0!==t?t:"—"}),(0,n.jsx)("td",{className:"py-1 pr-4",children:p(null!==(a=e.action)&&void 0!==a?a:"—",e.detected?"red":"slate")}),(0,n.jsx)("td",{className:"py-1 pr-4",children:g(e.detected)}),(0,n.jsx)("td",{className:"py-1 pr-4",children:null!==(l=e.score)&&void 0!==l?l:"—"}),(0,n.jsx)("td",{className:"py-1 pr-4",children:null!==(r=e.threshold)&&void 0!==r?r:"—"})]},s)})})]})})]}):null,e.sensitiveInformationPolicy&&(0,n.jsxs)("div",{className:"mb-3",children:[(0,n.jsx)("h6",{className:"font-medium mb-2",children:"Sensitive Information"}),(null!==(_=null===(c=e.sensitiveInformationPolicy.piiEntities)||void 0===c?void 0:c.length)&&void 0!==_?_:0)>0&&(0,n.jsx)(f,{title:"PII Entities",defaultOpen:!0,children:(0,n.jsx)("div",{className:"space-y-2",children:e.sensitiveInformationPolicy.piiEntities.map((e,s)=>{var t;return(0,n.jsxs)("div",{className:"flex justify-between items-center p-2 bg-gray-50 rounded",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[p(null!==(t=e.action)&&void 0!==t?t:"N/A",e.detected?"red":"slate"),e.type&&p(e.type,"slate"),(0,n.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]}),g(e.detected)]},s)})})}),(null!==(k=null===(m=e.sensitiveInformationPolicy.regexes)||void 0===m?void 0:m.length)&&void 0!==k?k:0)>0&&(0,n.jsx)(f,{title:"Custom Regexes",defaultOpen:!1,children:(0,n.jsx)("div",{className:"space-y-2",children:e.sensitiveInformationPolicy.regexes.map((e,s)=>{var t,a;return(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-2 bg-gray-50 rounded gap-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[p(null!==(t=e.action)&&void 0!==t?t:"N/A",e.detected?"red":"slate"),(0,n.jsx)("span",{className:"font-medium",children:null!==(a=e.name)&&void 0!==a?a:"regex"}),(0,n.jsx)("span",{className:"font-mono text-xs break-all",children:e.regex})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[g(e.detected),e.match&&(0,n.jsx)("span",{className:"font-mono text-xs break-all",children:e.match})]})]},s)})})})]}),(null===(x=e.topicPolicy)||void 0===x?void 0:null===(u=x.topics)||void 0===u?void 0:u.length)?(0,n.jsxs)("div",{className:"mb-3",children:[(0,n.jsx)("h6",{className:"font-medium mb-2",children:"Topic Policy"}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:e.topicPolicy.topics.map((e,s)=>{var t,a;return(0,n.jsx)("div",{className:"px-3 py-1.5 bg-gray-50 rounded-md text-xs",children:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[p(null!==(t=e.action)&&void 0!==t?t:"N/A",e.detected?"red":"slate"),(0,n.jsx)("span",{className:"font-medium",children:null!==(a=e.name)&&void 0!==a?a:"topic"}),e.type&&p(e.type,"slate"),g(e.detected)]})},s)})})]}):null,e.invocationMetrics&&(0,n.jsx)(f,{title:"Invocation Metrics",defaultOpen:!1,children:(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(j,{label:"Latency (ms)",children:null!==(S=e.invocationMetrics.guardrailProcessingLatency)&&void 0!==S?S:"—"}),(0,n.jsx)(j,{label:"Coverage:",children:(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(null===(h=e.invocationMetrics.guardrailCoverage)||void 0===h?void 0:h.textCharacters)&&p("text ".concat(null!==(C=e.invocationMetrics.guardrailCoverage.textCharacters.guarded)&&void 0!==C?C:0,"/").concat(null!==(L=e.invocationMetrics.guardrailCoverage.textCharacters.total)&&void 0!==L?L:0),"blue"),(null===(v=e.invocationMetrics.guardrailCoverage)||void 0===v?void 0:v.images)&&p("images ".concat(null!==(E=e.invocationMetrics.guardrailCoverage.images.guarded)&&void 0!==E?E:0,"/").concat(null!==(T=e.invocationMetrics.guardrailCoverage.images.total)&&void 0!==T?T:0),"blue")]})})]}),(0,n.jsx)("div",{className:"space-y-2",children:(0,n.jsx)(j,{label:"Usage:",children:(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:e.invocationMetrics.usage&&Object.entries(e.invocationMetrics.usage).map(e=>{let[s,t]=e;return"number"==typeof t?(0,n.jsxs)("span",{className:"px-2 py-1 bg-slate-100 text-slate-800 rounded-md text-xs font-medium",children:[s,": ",t]},s):null})})})})]})}),(null===(b=e.automatedReasoningPolicy)||void 0===b?void 0:null===(y=b.findings)||void 0===y?void 0:y.length)?(0,n.jsx)(f,{title:"Automated Reasoning Findings",defaultOpen:!1,children:(0,n.jsx)("div",{className:"space-y-2",children:e.automatedReasoningPolicy.findings.map((e,s)=>(0,n.jsx)("pre",{className:"bg-gray-50 rounded p-2 text-xs overflow-x-auto",children:JSON.stringify(e,null,2)},s))})}):null]},s)})}):null,(0,n.jsx)(f,{title:"Raw Bedrock Guardrail Response",defaultOpen:!1,children:(0,n.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(u,null,2)})})]})};let b=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"slate";return(0,n.jsx)("span",{className:"px-2 py-1 rounded-md text-xs font-medium inline-block ".concat({green:"bg-green-100 text-green-800",red:"bg-red-100 text-red-800",blue:"bg-blue-50 text-blue-700",slate:"bg-slate-100 text-slate-800",amber:"bg-amber-100 text-amber-800"}[s]),children:e})},N=e=>{let{title:s,count:t,defaultOpen:a=!0,children:l}=e,[r,i]=(0,c.useState)(a);return(0,n.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,n.jsx)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>i(e=>!e),children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("svg",{className:"w-5 h-5 mr-2 transition-transform ".concat(r?"transform rotate-90":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,n.jsxs)("h5",{className:"font-medium",children:[s," ","number"==typeof t&&(0,n.jsxs)("span",{className:"text-gray-500 font-normal",children:["(",t,")"]})]})]})}),r&&(0,n.jsx)("div",{className:"p-3 border-t bg-white",children:l})]})},w=e=>{let{label:s,children:t,mono:a}=e;return(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:s}),(0,n.jsx)("span",{className:a?"font-mono text-sm break-all":"",children:t})]})};var _=e=>{let{response:s}=e;if(!s||"string"==typeof s)return"string"==typeof s&&s?(0,n.jsx)("div",{className:"bg-white rounded-lg border border-red-200 p-4",children:(0,n.jsxs)("div",{className:"text-red-800",children:[(0,n.jsx)("h5",{className:"font-medium mb-2",children:"Error"}),(0,n.jsx)("p",{className:"text-sm",children:s})]})}):null;let t=Array.isArray(s)?s:[];if(0===t.length)return(0,n.jsx)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:(0,n.jsx)("div",{className:"text-gray-600 text-sm",children:"No detections found"})});let a=t.filter(e=>"pattern"===e.type),l=t.filter(e=>"blocked_word"===e.type),r=t.filter(e=>"category_keyword"===e.type),i=t.filter(e=>"BLOCK"===e.action).length,o=t.filter(e=>"MASK"===e.action).length,d=t.length;return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(w,{label:"Total Detections:",children:(0,n.jsx)("span",{className:"font-semibold",children:d})}),(0,n.jsx)(w,{label:"Actions:",children:(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[i>0&&b("".concat(i," blocked"),"red"),o>0&&b("".concat(o," masked"),"blue"),0===i&&0===o&&b("passed","green")]})})]}),(0,n.jsx)("div",{className:"space-y-2",children:(0,n.jsx)(w,{label:"By Type:",children:(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[a.length>0&&b("".concat(a.length," patterns"),"slate"),l.length>0&&b("".concat(l.length," keywords"),"slate"),r.length>0&&b("".concat(r.length," categories"),"slate")]})})})]})}),a.length>0&&(0,n.jsx)(N,{title:"Patterns Matched",count:a.length,defaultOpen:!0,children:(0,n.jsx)("div",{className:"space-y-2",children:a.map((e,s)=>(0,n.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,n.jsx)("div",{className:"space-y-1",children:(0,n.jsx)(w,{label:"Pattern:",children:e.pattern_name||"unknown"})}),(0,n.jsx)("div",{className:"space-y-1",children:(0,n.jsx)(w,{label:"Action:",children:b(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),l.length>0&&(0,n.jsx)(N,{title:"Blocked Words Detected",count:l.length,defaultOpen:!0,children:(0,n.jsx)("div",{className:"space-y-2",children:l.map((e,s)=>(0,n.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)(w,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.description&&(0,n.jsx)(w,{label:"Description:",children:e.description})]}),(0,n.jsx)("div",{className:"space-y-1",children:(0,n.jsx)(w,{label:"Action:",children:b(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),r.length>0&&(0,n.jsx)(N,{title:"Category Keywords Detected",count:r.length,defaultOpen:!0,children:(0,n.jsx)("div",{className:"space-y-2",children:r.map((e,s)=>(0,n.jsx)("div",{className:"p-3 bg-gray-50 rounded-md",children:(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)(w,{label:"Category:",children:e.category||"unknown"}),(0,n.jsx)(w,{label:"Keyword:",mono:!0,children:e.keyword||"unknown"}),e.severity&&(0,n.jsx)(w,{label:"Severity:",children:b(e.severity,"high"===e.severity?"red":"medium"===e.severity?"amber":"slate")})]}),(0,n.jsx)("div",{className:"space-y-1",children:(0,n.jsx)(w,{label:"Action:",children:b(e.action,"BLOCK"===e.action?"red":"blue")})})]})},s))})}),(0,n.jsx)(N,{title:"Raw Detection Data",defaultOpen:!1,children:(0,n.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(t,null,2)})})]})};let k=e=>new Date(1e3*e).toLocaleString(),S=new Set(["presidio","bedrock","litellm_content_filter"]),C=e=>{let{response:s}=e,[t,a]=(0,c.useState)(!1);return(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,n.jsx)("div",{className:"flex items-center justify-between p-3 bg-gray-50 cursor-pointer hover:bg-gray-100",onClick:()=>a(!t),children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("svg",{className:"w-5 h-5 mr-2 transition-transform ".concat(t?"transform rotate-90":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,n.jsx)("h5",{className:"font-medium",children:"Raw Guardrail Response"})]})}),t&&(0,n.jsx)("div",{className:"p-3 border-t bg-white",children:(0,n.jsx)("pre",{className:"bg-gray-50 rounded p-3 text-xs overflow-x-auto",children:JSON.stringify(s,null,2)})})]})})},L=e=>{var s,t;let{entry:a,index:l,total:r}=e,i=null!==(s=a.guardrail_provider)&&void 0!==s?s:"presidio",o=null!==(t=a.guardrail_status)&&void 0!==t?t:"unknown",d="success"===o.toLowerCase(),c=a.masked_entity_count||{},u=Object.values(c).reduce((e,s)=>e+("number"==typeof s?s:0),0),x=a.guardrail_response,p=Array.isArray(x)?x:[],g="bedrock"!==i||null===x||"object"!=typeof x||Array.isArray(x)?void 0:x;return(0,n.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[r>1&&(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsxs)("h4",{className:"text-base font-semibold",children:["Guardrail #",l+1,(0,n.jsx)("span",{className:"ml-2 font-mono text-sm text-gray-600",children:a.guardrail_name})]}),(0,n.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 rounded-md text-xs capitalize",children:i})]}),(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Guardrail Name:"}),(0,n.jsx)("span",{className:"font-mono break-words",children:a.guardrail_name})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Mode:"}),(0,n.jsx)("span",{className:"font-mono break-words",children:a.guardrail_mode})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Status:"}),(0,n.jsx)(m.Z,{title:d?null:"Guardrail failed to run.",placement:"top",arrow:!0,destroyTooltipOnHide:!0,children:(0,n.jsx)("span",{className:"px-2 py-1 rounded-md text-xs font-medium inline-block ".concat(d?"bg-green-100 text-green-800":"bg-red-100 text-red-800 cursor-help"),children:o})})]})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Start Time:"}),(0,n.jsx)("span",{children:k(a.start_time)})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"End Time:"}),(0,n.jsx)("span",{children:k(a.end_time)})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Duration:"}),(0,n.jsxs)("span",{children:[a.duration.toFixed(4),"s"]})]})]})]}),u>0&&(0,n.jsxs)("div",{className:"mt-4 pt-4 border-t",children:[(0,n.jsx)("h5",{className:"font-medium mb-2",children:"Masked Entity Summary"}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(c).map(e=>{let[s,t]=e;return(0,n.jsxs)("span",{className:"px-3 py-1.5 bg-blue-50 text-blue-700 rounded-md text-xs font-medium",children:[s,": ",t]},s)})})]}),"presidio"===i&&p.length>0&&(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(h,{entities:p})}),"bedrock"===i&&g&&(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(y,{response:g})}),"litellm_content_filter"===i&&x&&(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(_,{response:x})}),i&&!S.has(i)&&x&&(0,n.jsx)(C,{response:x})]})};var E=e=>{let{data:s}=e,t=Array.isArray(s)?s.filter(e=>!!e):s?[s]:[],a=1===t.length?t[0].guardrail_name:"".concat(t.length," guardrails"),l=Array.from(new Set(t.map(e=>e.guardrail_status))).every(e=>"success"===(null!=e?e:"").toLowerCase()),r=t.reduce((e,s)=>e+Object.values(s.masked_entity_count||{}).reduce((e,s)=>e+("number"==typeof s?s:0),0),0);return 0===t.length?null:(0,n.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,n.jsx)(u.default,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Guardrail Information"}),(0,n.jsx)(m.Z,{title:l?null:"Guardrail failed to run.",placement:"top",arrow:!0,destroyTooltipOnHide:!0,children:(0,n.jsx)("span",{className:"px-2 py-1 rounded-md text-xs font-medium inline-block ".concat(l?"bg-green-100 text-green-800":"bg-red-100 text-red-800 cursor-help"),children:l?"success":"failure"})}),(0,n.jsx)("span",{className:"font-mono text-sm text-gray-600",children:a}),r>0&&(0,n.jsxs)("span",{className:"px-2 py-1 bg-blue-50 text-blue-700 rounded-md text-xs font-medium",children:[r," masked ",1===r?"entity":"entities"]})]}),children:(0,n.jsx)("div",{className:"p-4 space-y-6",children:t.map((e,s)=>{var a;return(0,n.jsx)(L,{entry:e,index:s,total:t.length},"".concat(null!==(a=e.guardrail_name)&&void 0!==a?a:"guardrail","-").concat(s))})})}]})})},T=t(59872),M=t(9309),D=t(55322),Z=t(59341),z=t(12485),A=t(18135),R=t(35242),I=t(29706),O=t(77991),P=t(5545),B=t(20347),H=t(30280),K=t(44633),q=t(86462),F=t(49084),Y=t(71594),U=t(24525),V=t(19130);function W(e){let{keys:s,totalCount:t,isLoading:a,isFetching:l,pageIndex:r,pageSize:i,onPageChange:o}=e,[d,u]=(0,c.useState)([{id:"deleted_at",desc:!0}]),[x,h]=(0,c.useState)({pageIndex:r,pageSize:i});c.useEffect(()=>{h({pageIndex:r,pageSize:i})},[r,i]);let p=[{id:"token",accessorKey:"token",header:"Key ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,n.jsx)(m.Z,{title:s,children:(0,n.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"key_alias",accessorKey:"key_alias",header:"Key Alias",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,n.jsx)(m.Z,{title:s,children:(0,n.jsx)("span",{className:"font-mono text-xs truncate block max-w-[200px]",children:null!=s?s:"-"})})}},{id:"team_alias",accessorKey:"team_alias",header:"Team Alias",size:120,maxSize:180,cell:e=>{let s=e.getValue();return(0,n.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>(0,n.jsx)("span",{className:"block max-w-[140px]",children:(0,T.pw)(e.getValue(),4)})},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,n.jsx)("span",{className:"block max-w-[150px]",children:null===s?"Unlimited":"$".concat((0,T.pw)(s))})}},{id:"user_email",accessorKey:"user_email",header:"User Email",size:160,maxSize:250,cell:e=>{let s=e.getValue();return(0,n.jsx)(m.Z,{title:s,children:(0,n.jsx)("span",{className:"font-mono text-xs truncate block max-w-[250px]",children:null!=s?s:"-"})})}},{id:"user_id",accessorKey:"user_id",header:"User ID",size:120,maxSize:200,cell:e=>{let s=e.getValue();return(0,n.jsx)(m.Z,{title:s||void 0,children:(0,n.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created At",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,n.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"created_by",accessorKey:"created_by",header:"Created By",size:120,maxSize:180,cell:e=>{let s=e.row.original.created_by;return(0,n.jsx)(m.Z,{title:s||void 0,children:(0,n.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,n.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,n.jsx)(m.Z,{title:s||void 0,children:(0,n.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],g=(0,Y.b7)({data:s,columns:p,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:d,pagination:x},onSortingChange:u,onPaginationChange:e=>{let s="function"==typeof e?e(x):e;h(s),o(s.pageIndex)},getCoreRowModel:(0,U.sC)(),getSortedRowModel:(0,U.tj)(),getPaginationRowModel:(0,U.G_)(),enableSorting:!0,manualSorting:!1,manualPagination:!0,pageCount:Math.ceil(t/i)}),{pageIndex:f}=g.getState().pagination,j=f*i+1,v="".concat(j," - ").concat(Math.min((f+1)*i,t));return(0,n.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,n.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between w-full mb-4",children:[a||l?(0,n.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,n.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",v," of ",t," results"]}),(0,n.jsxs)("div",{className:"inline-flex items-center gap-2",children:[a||l?(0,n.jsx)("span",{className:"text-sm text-gray-700",children:"Loading..."}):(0,n.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",f+1," of ",g.getPageCount()]}),(0,n.jsx)("button",{onClick:()=>g.previousPage(),disabled:a||l||!g.getCanPreviousPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,n.jsx)("button",{onClick:()=>g.nextPage(),disabled:a||l||!g.getCanNextPage(),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]}),(0,n.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,n.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,n.jsx)("div",{className:"overflow-x-auto",children:(0,n.jsxs)(V.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:g.getCenterTotalSize()},children:[(0,n.jsx)(V.ss,{children:g.getHeaderGroups().map(e=>(0,n.jsx)(V.SC,{children:e.headers.map(e=>(0,n.jsx)(V.xs,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let s=document.querySelector('[data-header-id="'.concat(e.id,'"] .resizer'));s&&(s.style.opacity="0.5")},onMouseLeave:()=>{let s=document.querySelector('[data-header-id="'.concat(e.id,'"] .resizer'));s&&!e.column.getIsResizing()&&(s.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,Y.ie)(e.column.columnDef.header,e.getContext())}),(0,n.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,n.jsx)(K.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,n.jsx)(q.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,n.jsx)(F.Z,{className:"h-4 w-4 text-gray-400"})}),(0,n.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:"resizer ".concat(g.options.columnResizeDirection," ").concat(e.column.getIsResizing()?"isResizing":""),style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:e.column.getIsResizing()?1:0}})]})},e.id))},e.id))}),(0,n.jsx)(V.RM,{children:a||l?(0,n.jsx)(V.SC,{children:(0,n.jsx)(V.pj,{colSpan:p.length,className:"h-8 text-center",children:(0,n.jsx)("div",{className:"text-center text-gray-500",children:(0,n.jsx)("p",{children:"\uD83D\uDE85 Loading keys..."})})})}):s.length>0?g.getRowModel().rows.map(e=>(0,n.jsx)(V.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,n.jsx)(V.pj,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,Y.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,n.jsx)(V.SC,{children:(0,n.jsx)(V.pj,{colSpan:p.length,className:"h-8 text-center",children:(0,n.jsx)("div",{className:"text-center text-gray-500",children:(0,n.jsx)("p",{children:"No deleted keys found"})})})})})]})})})})]})})}function J(){let[e,s]=(0,c.useState)(0),[t]=(0,c.useState)(50),{data:a,isPending:l,isFetching:r}=(0,H.Tv)(e+1,t);return(0,n.jsx)(W,{keys:(null==a?void 0:a.keys)||[],totalCount:(null==a?void 0:a.total_count)||0,isLoading:l,isFetching:r,pageIndex:e,pageSize:t,onPageChange:s})}var G=t(47359),Q=t(41649),$=t(21626),X=t(97214),ee=t(28241),es=t(58834),et=t(69552),ea=t(71876),el=t(84264),en=t(46468);function er(e){let{teams:s,isLoading:t,isFetching:a}=e,[l,r]=(0,c.useState)([{id:"deleted_at",desc:!0}]),i=[{id:"team_alias",accessorKey:"team_alias",header:"Team Name",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,n.jsx)(m.Z,{title:s||void 0,children:(0,n.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"team_id",accessorKey:"team_id",header:"Team ID",size:150,maxSize:250,cell:e=>{let s=e.getValue();return(0,n.jsx)(m.Z,{title:s,children:(0,n.jsx)("span",{className:"font-mono text-blue-500 text-xs truncate block max-w-[250px]",children:s||"-"})})}},{id:"created_at",accessorKey:"created_at",header:"Created",size:120,maxSize:140,cell:e=>{let s=e.getValue();return(0,n.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"spend",accessorKey:"spend",header:"Spend (USD)",size:100,maxSize:140,cell:e=>{let s=e.row.original.spend;return(0,n.jsx)("span",{className:"block max-w-[140px]",children:void 0!==s?(0,T.pw)(s,4):"-"})}},{id:"max_budget",accessorKey:"max_budget",header:"Budget (USD)",size:110,maxSize:150,cell:e=>{let s=e.getValue();return(0,n.jsx)("span",{className:"block max-w-[150px]",children:null==s?"No limit":"$".concat((0,T.pw)(s))})}},{id:"models",accessorKey:"models",header:"Models",size:200,maxSize:300,cell:e=>{let s=e.getValue();return Array.isArray(s)&&0!==s.length?(0,n.jsxs)("div",{className:"flex flex-wrap gap-1 max-w-[300px]",children:[s.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,n.jsx)(Q.Z,{size:"xs",color:"red",children:(0,n.jsx)(el.Z,{children:"All Proxy Models"})},s):(0,n.jsx)(Q.Z,{size:"xs",color:"blue",children:(0,n.jsx)(el.Z,{children:e.length>30?"".concat((0,en.W0)(e).slice(0,30),"..."):(0,en.W0)(e)})},s)),s.length>3&&(0,n.jsx)(Q.Z,{size:"xs",color:"gray",children:(0,n.jsxs)(el.Z,{children:["+",s.length-3," ",s.length-3==1?"more model":"more models"]})})]}):(0,n.jsx)(Q.Z,{size:"xs",color:"red",children:(0,n.jsx)(el.Z,{children:"All Proxy Models"})})}},{id:"organization_id",accessorKey:"organization_id",header:"Organization",size:150,maxSize:200,cell:e=>{let s=e.getValue();return(0,n.jsx)(m.Z,{title:s||void 0,children:(0,n.jsx)("span",{className:"truncate block max-w-[200px]",children:s||"-"})})}},{id:"deleted_at",accessorKey:"deleted_at",header:"Deleted At",size:120,maxSize:140,cell:e=>{let s=e.row.original.deleted_at;return(0,n.jsx)("span",{className:"block max-w-[140px]",children:s?new Date(s).toLocaleDateString():"-"})}},{id:"deleted_by",accessorKey:"deleted_by",header:"Deleted By",size:120,maxSize:180,cell:e=>{let s=e.row.original.deleted_by;return(0,n.jsx)(m.Z,{title:s||void 0,children:(0,n.jsx)("span",{className:"truncate block max-w-[180px]",children:s||"-"})})}}],o=(0,Y.b7)({data:s,columns:i,columnResizeMode:"onChange",columnResizeDirection:"ltr",state:{sorting:l},onSortingChange:r,getCoreRowModel:(0,U.sC)(),getSortedRowModel:(0,U.tj)(),enableSorting:!0,manualSorting:!1});return(0,n.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,n.jsxs)("div",{className:"border-b py-4 flex-1 overflow-hidden",children:[(0,n.jsx)("div",{className:"flex items-center justify-between w-full mb-4",children:t||a?(0,n.jsx)("span",{className:"inline-flex text-sm text-gray-700",children:"Loading..."}):(0,n.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:["Showing ",s.length," ",1===s.length?"team":"teams"]})}),(0,n.jsx)("div",{className:"h-[75vh] overflow-auto",children:(0,n.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,n.jsx)("div",{className:"overflow-x-auto",children:(0,n.jsxs)($.Z,{className:"[&_td]:py-0.5 [&_th]:py-1",style:{width:o.getCenterTotalSize()},children:[(0,n.jsx)(es.Z,{children:o.getHeaderGroups().map(e=>(0,n.jsx)(ea.Z,{children:e.headers.map(e=>(0,n.jsx)(et.Z,{"data-header-id":e.id,className:"py-1 h-8 relative hover:bg-gray-50",style:{width:e.getSize(),maxWidth:e.column.columnDef.maxSize,position:"relative"},onMouseEnter:()=>{let s=document.querySelector('[data-header-id="'.concat(e.id,'"] .resizer'));s&&(s.style.opacity="0.5")},onMouseLeave:()=>{let s=document.querySelector('[data-header-id="'.concat(e.id,'"] .resizer'));s&&!e.column.getIsResizing()&&(s.style.opacity="0")},onClick:e.column.getToggleSortingHandler(),children:(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,Y.ie)(e.column.columnDef.header,e.getContext())}),(0,n.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,n.jsx)(K.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,n.jsx)(q.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,n.jsx)(F.Z,{className:"h-4 w-4 text-gray-400"})}),(0,n.jsx)("div",{onDoubleClick:()=>e.column.resetSize(),onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:"resizer ".concat(o.options.columnResizeDirection," ").concat(e.column.getIsResizing()?"isResizing":""),style:{position:"absolute",right:0,top:0,height:"100%",width:"5px",background:e.column.getIsResizing()?"#3b82f6":"transparent",cursor:"col-resize",userSelect:"none",touchAction:"none",opacity:e.column.getIsResizing()?1:0}})]})},e.id))},e.id))}),(0,n.jsx)(X.Z,{children:t||a?(0,n.jsx)(ea.Z,{children:(0,n.jsx)(ee.Z,{colSpan:i.length,className:"h-8 text-center",children:(0,n.jsx)("div",{className:"text-center text-gray-500",children:(0,n.jsx)("p",{children:"\uD83D\uDE85 Loading teams..."})})})}):s.length>0?o.getRowModel().rows.map(e=>(0,n.jsx)(ea.Z,{className:"h-8",children:e.getVisibleCells().map(e=>(0,n.jsx)(ee.Z,{style:{width:e.column.getSize(),maxWidth:e.column.columnDef.maxSize,whiteSpace:"pre-wrap",overflow:"hidden"},className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,Y.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,n.jsx)(ea.Z,{children:(0,n.jsx)(ee.Z,{colSpan:i.length,className:"h-8 text-center",children:(0,n.jsx)("div",{className:"text-center text-gray-500",children:(0,n.jsx)("p",{children:"No deleted teams found"})})})})})]})})})})]})})}function ei(){let{data:e,isPending:s,isFetching:t}=(0,G.iN)(1,100);return(0,n.jsx)(er,{teams:e||[],isLoading:s,isFetching:t})}var eo=t(30841),ed=t(23048),ec=t(19250),em=t(50665),eu=t(12322),ex=t(78489),eh=t(42673);let ep=e=>{try{return new Date(e).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).replace(",","")}catch(e){return"Error converting time"}},eg=e=>{let{utcTime:s}=e;return(0,n.jsx)("span",{style:{fontFamily:"monospace",width:"180px",display:"inline-block"},children:ep(s)})},ef=(e,s)=>{var t,a;return(null===(a=e.metadata)||void 0===a?void 0:null===(t=a.mcp_tool_call_metadata)||void 0===t?void 0:t.mcp_server_logo_url)?e.metadata.mcp_tool_call_metadata.mcp_server_logo_url:s?(0,eh.dr)(s).logo:""},ej=[{header:"Time",accessorKey:"startTime",cell:e=>(0,n.jsx)(eg,{utcTime:e.getValue()})},{header:"Status",accessorKey:"metadata.status",cell:e=>{let s="failure"!==(e.getValue()||"Success").toLowerCase();return(0,n.jsx)("span",{className:"px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ".concat(s?"bg-green-100 text-green-800":"bg-red-100 text-red-800"),children:s?"Success":"Failure"})}},{header:"Session ID",accessorKey:"session_id",cell:e=>{let s=String(e.getValue()||""),t=e.row.original.onSessionClick;return(0,n.jsx)(m.Z,{title:String(e.getValue()||""),children:(0,n.jsx)(ex.Z,{size:"xs",variant:"light",className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal text-xs max-w-[15ch] truncate block",onClick:()=>null==t?void 0:t(s),children:String(e.getValue()||"")})})}},{header:"Request ID",accessorKey:"request_id",cell:e=>(0,n.jsx)(m.Z,{title:String(e.getValue()||""),children:(0,n.jsx)("span",{className:"font-mono text-xs max-w-[15ch] truncate block",children:String(e.getValue()||"")})})},{header:"Cost",accessorKey:"spend",cell:e=>(0,n.jsx)(m.Z,{title:"$".concat(String(e.getValue()||0)," "),children:(0,n.jsx)("span",{children:(0,T.GS)(e.getValue()||0)})})},{header:"Duration (s)",accessorKey:"duration",cell:e=>(0,n.jsx)(m.Z,{title:String(e.getValue()||"-"),children:(0,n.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Team Name",accessorKey:"metadata.user_api_key_team_alias",cell:e=>(0,n.jsx)(m.Z,{title:String(e.getValue()||"-"),children:(0,n.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Key Hash",accessorKey:"metadata.user_api_key",cell:e=>{let s=String(e.getValue()||"-"),t=e.row.original.onKeyHashClick;return(0,n.jsx)(m.Z,{title:s,children:(0,n.jsx)("span",{className:"font-mono max-w-[15ch] truncate block cursor-pointer hover:text-blue-600",onClick:()=>null==t?void 0:t(s),children:s})})}},{header:"Key Name",accessorKey:"metadata.user_api_key_alias",cell:e=>(0,n.jsx)(m.Z,{title:String(e.getValue()||"-"),children:(0,n.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Model",accessorKey:"model",cell:e=>{let s=e.row.original,t=s.custom_llm_provider,a=String(e.getValue()||"");return(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,n.jsx)("img",{src:ef(s,t),alt:"",className:"w-4 h-4",onError:e=>{e.target.style.display="none"}}),(0,n.jsx)(m.Z,{title:a,children:(0,n.jsx)("span",{className:"max-w-[15ch] truncate block",children:a})})]})}},{header:"Tokens",accessorKey:"total_tokens",cell:e=>{let s=e.row.original;return(0,n.jsxs)("span",{className:"text-sm",children:[String(s.total_tokens||"0"),(0,n.jsxs)("span",{className:"text-gray-400 text-xs ml-1",children:["(",String(s.prompt_tokens||"0"),"+",String(s.completion_tokens||"0"),")"]})]})}},{header:"Internal User",accessorKey:"user",cell:e=>(0,n.jsx)(m.Z,{title:String(e.getValue()||"-"),children:(0,n.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"End User",accessorKey:"end_user",cell:e=>(0,n.jsx)(m.Z,{title:String(e.getValue()||"-"),children:(0,n.jsx)("span",{className:"max-w-[15ch] truncate block",children:String(e.getValue()||"-")})})},{header:"Tags",accessorKey:"request_tags",cell:e=>{let s=e.getValue();if(!s||0===Object.keys(s).length)return"-";let t=Object.entries(s),a=t[0],l=t.slice(1);return(0,n.jsx)("div",{className:"flex flex-wrap gap-1",children:(0,n.jsx)(m.Z,{title:(0,n.jsx)("div",{className:"flex flex-col gap-1",children:t.map(e=>{let[s,t]=e;return(0,n.jsxs)("span",{children:[s,": ",String(t)]},s)})}),children:(0,n.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[a[0],": ",String(a[1]),l.length>0&&" +".concat(l.length)]})})})}}],ev=e=>(0,n.jsx)(Q.Z,{color:"gray",className:"flex items-center gap-1",children:(0,n.jsx)("span",{className:"whitespace-nowrap text-xs",children:e})}),ey=[{id:"expander",header:()=>null,cell:e=>{let{row:s}=e;return(0,n.jsx)(()=>{let[e,t]=c.useState(s.getIsExpanded()),a=c.useCallback(()=>{t(e=>!e),s.getToggleExpandedHandler()()},[s]);return s.getCanExpand()?(0,n.jsx)("button",{onClick:a,style:{cursor:"pointer"},"aria-label":e?"Collapse row":"Expand row",className:"w-6 h-6 flex items-center justify-center focus:outline-none",children:(0,n.jsx)("svg",{className:"w-4 h-4 transform transition-transform ".concat(e?"rotate-90":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}):(0,n.jsx)("span",{className:"w-6 h-6 flex items-center justify-center",children:"●"})},{})}},{header:"Timestamp",accessorKey:"updated_at",cell:e=>(0,n.jsx)(eg,{utcTime:e.getValue()})},{header:"Table Name",accessorKey:"table_name",cell:e=>{let s=e.getValue(),t=s;switch(s){case"LiteLLM_VerificationToken":t="Keys";break;case"LiteLLM_TeamTable":t="Teams";break;case"LiteLLM_OrganizationTable":t="Organizations";break;case"LiteLLM_UserTable":t="Users";break;case"LiteLLM_ProxyModelTable":t="Models";break;default:t=s}return(0,n.jsx)("span",{children:t})}},{header:"Action",accessorKey:"action",cell:e=>(0,n.jsx)("span",{children:ev(e.getValue())})},{header:"Changed By",accessorKey:"changed_by",cell:e=>{let s=e.row.original.changed_by,t=e.row.original.changed_by_api_key;return(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)("div",{className:"font-medium",children:s}),t&&(0,n.jsx)(m.Z,{title:t,children:(0,n.jsxs)("div",{className:"text-xs text-muted-foreground max-w-[15ch] truncate",children:[" ",t]})})]})}},{header:"Affected Item ID",accessorKey:"object_id",cell:e=>(0,n.jsx)(()=>{let s=e.getValue(),[t,a]=(0,c.useState)(!1);if(!s)return(0,n.jsx)(n.Fragment,{children:"-"});let l=async()=>{try{await navigator.clipboard.writeText(String(s)),a(!0),setTimeout(()=>a(!1),1500)}catch(e){console.error("Failed to copy object ID: ",e)}};return(0,n.jsx)(m.Z,{title:t?"Copied!":String(s),children:(0,n.jsx)("span",{className:"max-w-[20ch] truncate block cursor-pointer hover:text-blue-600",onClick:l,children:String(s)})})},{})}];var eb=t(92280);let eN="".concat("../ui/assets/","audit-logs-preview.png");function ew(e){let{userID:s,userRole:t,token:a,accessToken:l,isActive:r,premiumUser:o,allTeams:m}=e,[u,x]=(0,c.useState)(d()().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),h=(0,c.useRef)(null),p=(0,c.useRef)(null),[g,f]=(0,c.useState)(1),[j]=(0,c.useState)(50),[v,y]=(0,c.useState)({}),[b,N]=(0,c.useState)(""),[w,_]=(0,c.useState)(""),[k,S]=(0,c.useState)(""),[C,L]=(0,c.useState)("all"),[E,M]=(0,c.useState)("all"),[D,Z]=(0,c.useState)(!1),[z,A]=(0,c.useState)(!1),R=(0,i.a)({queryKey:["all_audit_logs",l,a,t,s,u],queryFn:async()=>{if(!l||!a||!t||!s)return[];let e=d()(u).utc().format("YYYY-MM-DD HH:mm:ss"),n=d()().utc().format("YYYY-MM-DD HH:mm:ss"),r=[],i=1,o=1;do{let s=await (0,ec.uiAuditLogsCall)(l,e,n,i,50);r=r.concat(s.audit_logs),o=s.total_pages,i++}while(i<=o);return r},enabled:!!l&&!!a&&!!t&&!!s&&r,refetchInterval:5e3,refetchIntervalInBackground:!0}),I=(0,c.useCallback)(async e=>{if(l)try{let s=(await (0,ec.keyListCall)(l,null,null,e,null,null,1,10)).keys.find(s=>s.key_alias===e);s?_(s.token):_("")}catch(e){console.error("Error fetching key hash for alias:",e),_("")}},[l]);(0,c.useEffect)(()=>{if(!l)return;let e=!1,s=!1;v["Team ID"]?b!==v["Team ID"]&&(N(v["Team ID"]),e=!0):""!==b&&(N(""),e=!0),v["Key Hash"]?w!==v["Key Hash"]&&(_(v["Key Hash"]),s=!0):v["Key Alias"]?I(v["Key Alias"]):""!==w&&(_(""),s=!0),(e||s)&&f(1)},[v,l,I,b,w]),(0,c.useEffect)(()=>{f(1)},[b,w,u,k,C,E]),(0,c.useEffect)(()=>{function e(e){h.current&&!h.current.contains(e.target)&&Z(!1),p.current&&!p.current.contains(e.target)&&A(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let O=(0,c.useMemo)(()=>R.data?R.data.filter(e=>{var s,t,a,l,n,r,i;let o=!0,d=!0,c=!0,m=!0,u=!0;if(b){let n="string"==typeof e.before_value?null===(s=JSON.parse(e.before_value))||void 0===s?void 0:s.team_id:null===(t=e.before_value)||void 0===t?void 0:t.team_id,r="string"==typeof e.updated_values?null===(a=JSON.parse(e.updated_values))||void 0===a?void 0:a.team_id:null===(l=e.updated_values)||void 0===l?void 0:l.team_id;o=n===b||r===b}if(w)try{let s="string"==typeof e.before_value?JSON.parse(e.before_value):e.before_value,t="string"==typeof e.updated_values?JSON.parse(e.updated_values):e.updated_values,a=null==s?void 0:s.token,l=null==t?void 0:t.token;d="string"==typeof a&&a.includes(w)||"string"==typeof l&&l.includes(w)}catch(e){d=!1}if(k&&(c=null===(n=e.object_id)||void 0===n?void 0:n.toLowerCase().includes(k.toLowerCase())),"all"!==C&&(m=(null===(r=e.action)||void 0===r?void 0:r.toLowerCase())===C.toLowerCase()),"all"!==E){let s="";switch(E){case"keys":s="litellm_verificationtoken";break;case"teams":s="litellm_teamtable";break;case"users":s="litellm_usertable";break;default:s=E}u=(null===(i=e.table_name)||void 0===i?void 0:i.toLowerCase())===s}return o&&d&&c&&m&&u}):[],[R.data,b,w,k,C,E]),P=O.length,B=Math.ceil(P/j)||1,H=(0,c.useMemo)(()=>{let e=(g-1)*j,s=e+j;return O.slice(e,s)},[O,g,j]),K=!R.data||0===R.data.length,q=(0,c.useCallback)(e=>{let{row:s}=e;return(0,n.jsx)(e=>{let{rowData:s}=e,{before_value:t,updated_values:a,table_name:l,action:r}=s,i=(e,s)=>{if(!e||0===Object.keys(e).length)return(0,n.jsx)(eb.x,{children:"N/A"});if(s){let s=Object.keys(e),t=["token","spend","max_budget"];if(s.every(e=>t.includes(e))&&s.length>0)return(0,n.jsxs)("div",{children:[s.includes("token")&&(0,n.jsxs)("p",{children:[(0,n.jsx)("strong",{children:"Token:"})," ",e.token||"N/A"]}),s.includes("spend")&&(0,n.jsxs)("p",{children:[(0,n.jsx)("strong",{children:"Spend:"})," ",void 0!==e.spend?"$".concat((0,T.pw)(e.spend,6)):"N/A"]}),s.includes("max_budget")&&(0,n.jsxs)("p",{children:[(0,n.jsx)("strong",{children:"Max Budget:"})," ",void 0!==e.max_budget?"$".concat((0,T.pw)(e.max_budget,6)):"N/A"]})]});if(e["No differing fields detected in 'before' state"]||e["No differing fields detected in 'updated' state"]||e["No fields changed"])return(0,n.jsx)(eb.x,{children:e[Object.keys(e)[0]]})}return(0,n.jsx)("pre",{className:"p-2 bg-gray-50 border rounded text-xs overflow-auto max-h-60",children:JSON.stringify(e,null,2)})},o=t,d=a;if(("updated"===r||"rotated"===r)&&t&&a&&("LiteLLM_TeamTable"===l||"LiteLLM_UserTable"===l||"LiteLLM_VerificationToken"===l)){let e={},s={};new Set([...Object.keys(t),...Object.keys(a)]).forEach(l=>{JSON.stringify(t[l])!==JSON.stringify(a[l])&&(t.hasOwnProperty(l)&&(e[l]=t[l]),a.hasOwnProperty(l)&&(s[l]=a[l]))}),Object.keys(t).forEach(l=>{a.hasOwnProperty(l)||e.hasOwnProperty(l)||(e[l]=t[l],s[l]=void 0)}),Object.keys(a).forEach(l=>{t.hasOwnProperty(l)||s.hasOwnProperty(l)||(s[l]=a[l],e[l]=void 0)}),o=Object.keys(e).length>0?e:{"No differing fields detected in 'before' state":"N/A"},d=Object.keys(s).length>0?s:{"No differing fields detected in 'updated' state":"N/A"},0===Object.keys(e).length&&0===Object.keys(s).length&&(o={"No fields changed":"N/A"},d={"No fields changed":"N/A"})}return(0,n.jsxs)("div",{className:"-mx-4 p-4 bg-slate-100 border-y border-slate-300 grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold mb-2 text-sm text-slate-700",children:"Before Value:"}),i(o,"LiteLLM_VerificationToken"===l)]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold mb-2 text-sm text-slate-700",children:"Updated Value:"}),i(d,"LiteLLM_VerificationToken"===l)]})]})},{rowData:s.original})},[]);if(!o)return(0,n.jsxs)("div",{style:{textAlign:"center",marginTop:"20px"},children:[(0,n.jsx)("h1",{style:{display:"block",marginBottom:"10px"},children:"✨ Enterprise Feature."}),(0,n.jsx)(eb.x,{style:{display:"block",marginBottom:"10px"},children:"This is a LiteLLM Enterprise feature, and requires a valid key to use."}),(0,n.jsx)(eb.x,{style:{display:"block",marginBottom:"20px",fontStyle:"italic"},children:"Here's a preview of what Audit Logs offer:"}),(0,n.jsx)("img",{src:eN,alt:"Audit Logs Preview",style:{maxWidth:"100%",maxHeight:"700px",borderRadius:"8px",boxShadow:"0 4px 8px rgba(0,0,0,0.1)",margin:"0 auto"},onError:e=>{console.error("Failed to load audit logs preview image"),e.target.style.display="none"}})]});let F=P>0?(g-1)*j+1:0,Y=Math.min(g*j,P);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"flex items-center justify-between mb-4"}),(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,n.jsxs)("div",{className:"border-b px-6 py-4",children:[(0,n.jsx)("h1",{className:"text-xl font-semibold py-4",children:"Audit Logs"}),(0,n.jsx)(e=>{let{show:s}=e;return s?(0,n.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 flex items-start mb-6",children:[(0,n.jsx)("div",{className:"text-blue-500 mr-3 flex-shrink-0 mt-0.5",children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,n.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,n.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"text-sm font-medium text-blue-800",children:"Audit Logs Not Available"}),(0,n.jsx)("p",{className:"text-sm text-blue-700 mt-1",children:"To enable audit logging, add the following configuration to your LiteLLM proxy configuration file:"}),(0,n.jsx)("pre",{className:"mt-2 bg-white p-3 rounded border border-blue-200 text-xs font-mono overflow-auto",children:"litellm_settings:\n store_audit_logs: true"}),(0,n.jsx)("p",{className:"text-xs text-blue-700 mt-2",children:"Note: This will only affect new requests after the configuration change and proxy restart."})]})]}):null},{show:K}),(0,n.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0",children:[(0,n.jsx)("div",{className:"flex flex-wrap items-center gap-3",children:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("div",{className:"flex items-center",children:(0,n.jsx)("input",{type:"text",placeholder:"Search by Object ID...",value:k,onChange:e=>S(e.target.value),className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,n.jsxs)("button",{onClick:()=>{R.refetch()},className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",title:"Refresh data",children:[(0,n.jsx)("svg",{className:"w-4 h-4 ".concat(R.isFetching?"animate-spin":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),(0,n.jsx)("span",{children:"Refresh"})]})]})}),(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsxs)("div",{className:"relative",ref:h,children:[(0,n.jsx)("label",{htmlFor:"actionFilterDisplay",className:"mr-2 text-sm font-medium text-gray-700 sr-only",children:"Action:"}),(0,n.jsxs)("button",{id:"actionFilterDisplay",onClick:()=>Z(!D),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 bg-white w-40 text-left justify-between",children:[(0,n.jsxs)("span",{children:["all"===C&&"All Actions","created"===C&&"Created","updated"===C&&"Updated","deleted"===C&&"Deleted","rotated"===C&&"Rotated"]}),(0,n.jsx)("svg",{className:"w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),D&&(0,n.jsx)("div",{className:"absolute left-0 mt-2 w-40 bg-white rounded-lg shadow-lg border p-1 z-50",children:(0,n.jsx)("div",{className:"space-y-1",children:[{label:"All Actions",value:"all"},{label:"Created",value:"created"},{label:"Updated",value:"updated"},{label:"Deleted",value:"deleted"},{label:"Rotated",value:"rotated"}].map(e=>(0,n.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ".concat(C===e.value?"bg-blue-50 text-blue-600 font-medium":"font-normal"),onClick:()=>{L(e.value),Z(!1)},children:e.label},e.value))})})]}),(0,n.jsxs)("div",{className:"relative",ref:p,children:[(0,n.jsx)("label",{htmlFor:"tableFilterDisplay",className:"mr-2 text-sm font-medium text-gray-700 sr-only",children:"Table:"}),(0,n.jsxs)("button",{id:"tableFilterDisplay",onClick:()=>A(!z),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 bg-white w-40 text-left justify-between",children:[(0,n.jsxs)("span",{children:["all"===E&&"All Tables","keys"===E&&"Keys","teams"===E&&"Teams","users"===E&&"Users"]}),(0,n.jsx)("svg",{className:"w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),z&&(0,n.jsx)("div",{className:"absolute left-0 mt-2 w-40 bg-white rounded-lg shadow-lg border p-1 z-50",children:(0,n.jsx)("div",{className:"space-y-1",children:[{label:"All Tables",value:"all"},{label:"Keys",value:"keys"},{label:"Teams",value:"teams"},{label:"Users",value:"users"}].map(e=>(0,n.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ".concat(E===e.value?"bg-blue-50 text-blue-600 font-medium":"font-normal"),onClick:()=>{M(e.value),A(!1)},children:e.label},e.value))})})]}),(0,n.jsxs)("span",{className:"text-sm text-gray-700",children:["Showing ",R.isLoading?"...":F," -"," ",R.isLoading?"...":Y," of"," ",R.isLoading?"...":P," results"]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsxs)("span",{className:"text-sm text-gray-700",children:["Page ",R.isLoading?"...":g," of"," ",R.isLoading?"...":B]}),(0,n.jsx)("button",{onClick:()=>f(e=>Math.max(1,e-1)),disabled:R.isLoading||1===g,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,n.jsx)("button",{onClick:()=>f(e=>Math.min(B,e+1)),disabled:R.isLoading||g===B,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})]}),(0,n.jsx)(eu.w,{columns:ey,data:H,renderSubComponent:q,getRowCanExpand:()=>!0})]})]})}let e_=e=>{let{show:s,onOpenSettings:t}=e;return s?(0,n.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 flex items-start",children:[(0,n.jsx)("div",{className:"text-blue-500 mr-3 flex-shrink-0 mt-0.5",children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,n.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,n.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"text-sm font-medium text-blue-800",children:"Request/Response Data Not Available"}),(0,n.jsxs)("p",{className:"text-sm text-blue-700 mt-1",children:["To view request and response details, enable prompt storage in your LiteLLM configuration by adding the following to your ",(0,n.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded",children:"proxy_config.yaml"})," file",t&&(0,n.jsxs)(n.Fragment,{children:[" or"," ",(0,n.jsx)("button",{onClick:t,className:"text-blue-600 hover:text-blue-800 underline font-medium",children:"open the settings"})," ","to configure this directly."]})]}),(0,n.jsx)("pre",{className:"mt-2 bg-white p-3 rounded border border-blue-200 text-xs font-mono overflow-auto",children:"general_settings:\n store_model_in_db: true\n store_prompts_in_spend_logs: true"}),(0,n.jsx)("p",{className:"text-xs text-blue-700 mt-2",children:"Note: This will only affect new requests after the configuration change."})]})]}):null},ek=e=>null==e?"-":"$".concat((0,T.pw)(e,8)),eS=e=>null==e?"-":"".concat((100*e).toFixed(2),"%"),eC=e=>{var s;let{costBreakdown:t,totalSpend:a}=e;if(!t)return null;let l=void 0!==t.discount_percent&&0!==t.discount_percent||void 0!==t.discount_amount&&0!==t.discount_amount,r=void 0!==t.margin_percent&&0!==t.margin_percent||void 0!==t.margin_fixed_amount&&0!==t.margin_fixed_amount||void 0!==t.margin_total_amount&&0!==t.margin_total_amount;return void 0!==t.input_cost||void 0!==t.output_cost||l||r?(0,n.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,n.jsx)(u.default,{expandIconPosition:"start",items:[{key:"1",label:(0,n.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,n.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Cost Breakdown"}),(0,n.jsxs)("div",{className:"flex items-center space-x-2 mr-4",children:[(0,n.jsx)("span",{className:"text-sm text-gray-500",children:"Total:"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:ek(a)})]})]}),children:(0,n.jsxs)("div",{className:"p-6 space-y-4",children:[(0,n.jsxs)("div",{className:"space-y-2 max-w-2xl",children:[(0,n.jsxs)("div",{className:"flex text-sm",children:[(0,n.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Input Cost:"}),(0,n.jsx)("span",{className:"text-gray-900",children:ek(t.input_cost)})]}),(0,n.jsxs)("div",{className:"flex text-sm",children:[(0,n.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Output Cost:"}),(0,n.jsx)("span",{className:"text-gray-900",children:ek(t.output_cost)})]}),void 0!==t.tool_usage_cost&&t.tool_usage_cost>0&&(0,n.jsxs)("div",{className:"flex text-sm",children:[(0,n.jsx)("span",{className:"text-gray-600 font-medium w-1/3",children:"Tool Usage Cost:"}),(0,n.jsx)("span",{className:"text-gray-900",children:ek(t.tool_usage_cost)})]}),t.additional_costs&&Object.keys(t.additional_costs).length>0&&(0,n.jsx)(n.Fragment,{children:Object.entries(t.additional_costs).map(e=>{let[s,t]=e;return(0,n.jsxs)("div",{className:"flex text-sm",children:[(0,n.jsxs)("span",{className:"text-gray-600 font-medium w-1/3",children:[s,":"]}),(0,n.jsx)("span",{className:"text-gray-900",children:ek(t)})]},s)})})]}),(0,n.jsx)("div",{className:"pt-2 border-t border-gray-100 max-w-2xl",children:(0,n.jsxs)("div",{className:"flex text-sm font-semibold",children:[(0,n.jsx)("span",{className:"text-gray-900 w-1/3",children:"Original LLM Cost:"}),(0,n.jsx)("span",{className:"text-gray-900",children:ek(t.original_cost)})]})}),(l||r)&&(0,n.jsxs)("div",{className:"pt-2 space-y-2 max-w-2xl",children:[l&&(0,n.jsxs)("div",{className:"space-y-2",children:[void 0!==t.discount_percent&&0!==t.discount_percent&&(0,n.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,n.jsxs)("span",{className:"font-medium w-1/3",children:["Discount (",eS(t.discount_percent),"):"]}),(0,n.jsxs)("span",{className:"text-gray-900",children:["-",ek(t.discount_amount)]})]}),void 0!==t.discount_amount&&void 0===t.discount_percent&&(0,n.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Discount Amount:"}),(0,n.jsxs)("span",{className:"text-gray-900",children:["-",ek(t.discount_amount)]})]})]}),r&&(0,n.jsxs)("div",{className:"space-y-2",children:[void 0!==t.margin_percent&&0!==t.margin_percent&&(0,n.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,n.jsxs)("span",{className:"font-medium w-1/3",children:["Margin (",eS(t.margin_percent),"):"]}),(0,n.jsxs)("span",{className:"text-gray-900",children:["+",ek((t.margin_total_amount||0)-(t.margin_fixed_amount||0))]})]}),void 0!==t.margin_fixed_amount&&0!==t.margin_fixed_amount&&(0,n.jsxs)("div",{className:"flex text-sm text-gray-600",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Margin:"}),(0,n.jsxs)("span",{className:"text-gray-900",children:["+",ek(t.margin_fixed_amount)]})]})]})]}),(0,n.jsx)("div",{className:"mt-4 pt-4 border-t border-gray-200 max-w-2xl",children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("span",{className:"font-bold text-sm text-gray-900 w-1/3",children:"Final Calculated Cost:"}),(0,n.jsx)("span",{className:"text-sm font-bold text-gray-900",children:ek(null!==(s=t.total_cost)&&void 0!==s?s:a)})]})})]})}]})}):null},eL=e=>{var s;let{errorInfo:t}=e,[a,l]=c.useState({}),[r,i]=c.useState(!1),o=e=>{l(s=>({...s,[e]:!s[e]}))},d=t.traceback&&(s=t.traceback)?Array.from(s.matchAll(/File "([^"]+)", line (\d+)/g)).map(e=>{let t=e[1],a=e[2],l=t.split("/").pop()||t,n=e.index||0,r=s.indexOf('File "',n+1),i=r>-1?s.substring(n,r).trim():s.substring(n).trim(),o=i.split("\n"),d="";return o.length>1&&(d=o[o.length-1].trim()),{filePath:t,fileName:l,lineNumber:a,code:d,inFunction:i.includes(" in ")?i.split(" in ")[1].split("\n")[0]:""}}):[];return(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,n.jsx)("div",{className:"p-4 border-b",children:(0,n.jsxs)("h3",{className:"text-lg font-medium flex items-center text-red-600",children:[(0,n.jsx)("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),"Error Details"]})}),(0,n.jsxs)("div",{className:"p-4",children:[(0,n.jsxs)("div",{className:"bg-red-50 rounded-md p-4 mb-4",children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"text-red-800 font-medium w-20",children:"Type:"}),(0,n.jsx)("span",{className:"text-red-700",children:t.error_class||"Unknown Error"})]}),(0,n.jsxs)("div",{className:"flex mt-2",children:[(0,n.jsx)("span",{className:"text-red-800 font-medium w-20 flex-shrink-0",children:"Message:"}),(0,n.jsx)("span",{className:"text-red-700 break-words whitespace-pre-wrap",children:t.error_message||"Unknown error occurred"})]})]}),t.traceback&&(0,n.jsxs)("div",{className:"mt-4",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,n.jsx)("h4",{className:"font-medium",children:"Traceback"}),(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsx)("button",{onClick:()=>{let e=!r;if(i(e),d.length>0){let s={};d.forEach((t,a)=>{s[a]=e}),l(s)}},className:"text-gray-500 hover:text-gray-700 flex items-center text-sm",children:r?"Collapse All":"Expand All"}),(0,n.jsxs)("button",{onClick:()=>navigator.clipboard.writeText(t.traceback||""),className:"text-gray-500 hover:text-gray-700 flex items-center",title:"Copy traceback",children:[(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,n.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),(0,n.jsx)("span",{className:"ml-1",children:"Copy"})]})]})]}),(0,n.jsx)("div",{className:"bg-white rounded-md border border-gray-200 overflow-hidden shadow-sm",children:d.map((e,s)=>(0,n.jsxs)("div",{className:"border-b border-gray-200 last:border-b-0",children:[(0,n.jsxs)("div",{className:"px-4 py-2 flex items-center justify-between cursor-pointer hover:bg-gray-50",onClick:()=>o(s),children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("span",{className:"text-gray-400 mr-2 w-12 text-right",children:e.lineNumber}),(0,n.jsx)("span",{className:"text-gray-600 font-medium",children:e.fileName}),(0,n.jsx)("span",{className:"text-gray-500 mx-1",children:"in"}),(0,n.jsx)("span",{className:"text-indigo-600 font-medium",children:e.inFunction||e.fileName})]}),(0,n.jsx)("svg",{className:"w-5 h-5 text-gray-500 transition-transform ".concat(a[s]?"transform rotate-180":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),(a[s]||!1)&&e.code&&(0,n.jsx)("div",{className:"px-12 py-2 font-mono text-sm text-gray-800 bg-gray-50 overflow-x-auto border-t border-gray-100",children:e.code})]},s))})]})]})]})};var eE=t(7310),eT=t.n(eE),eM=t(12363);let eD={TEAM_ID:"Team ID",KEY_HASH:"Key Hash",REQUEST_ID:"Request ID",MODEL:"Model",USER_ID:"User ID",END_USER:"End User",STATUS:"Status",KEY_ALIAS:"Key Alias",ERROR_CODE:"Error Code",ERROR_MESSAGE:"Error Message"},eZ=(e,s,t)=>{if(e)return"".concat(d()(s).format("MMM D, h:mm A")," - ").concat(d()(t).format("MMM D, h:mm A"));let a=d()(),l=d()(s),n=a.diff(l,"minutes");if(n>=0&&n<2)return"Last 1 Minute";if(n>=2&&n<16)return"Last 15 Minutes";if(n>=16&&n<61)return"Last Hour";let r=a.diff(l,"hours");return r>=1&&r<5?"Last 4 Hours":r>=5&&r<25?"Last 24 Hours":r>=25&&r<169?"Last 7 Days":"".concat(l.format("MMM D")," - ").concat(a.format("MMM D"))},ez=async(e,s,t,a)=>{console.log("prefetchLogDetails called with",e.length,"logs");let l=e.map(e=>{if(e.request_id)return console.log("Prefetching details for request_id:",e.request_id),a.prefetchQuery({queryKey:["logDetails",e.request_id,s],queryFn:async()=>{console.log("Fetching details for",e.request_id);let a=await (0,ec.uiSpendLogDetailsCall)(t,e.request_id,s);return console.log("Received details for",e.request_id,":",a?"success":"failed"),a},staleTime:6e5,gcTime:6e5})});try{let e=await Promise.all(l);return console.log("All prefetch promises completed:",e.length),e}catch(e){throw console.error("Error in prefetchLogDetails:",e),e}};var eA=t(9114),eR=t(86669);function eI(e){let{row:s,hasMessages:t,hasResponse:a,hasError:l,errorInfo:r,getRawRequest:i,formattedResponse:o}=e,d=async e=>{try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{let s=document.createElement("textarea");s.value=e,s.style.position="fixed",s.style.opacity="0",document.body.appendChild(s),s.focus(),s.select();let t=document.execCommand("copy");if(document.body.removeChild(s),!t)throw Error("execCommand failed");return!0}}catch(e){return console.error("Copy failed:",e),!1}},c=async()=>{await d(JSON.stringify(i(),null,2))?eA.Z.success("Request copied to clipboard"):eA.Z.fromBackend("Failed to copy request")},m=async()=>{await d(JSON.stringify(o(),null,2))?eA.Z.success("Response copied to clipboard"):eA.Z.fromBackend("Failed to copy response")};return(0,n.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 w-full max-w-full overflow-hidden box-border",children:[(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center p-4 border-b",children:[(0,n.jsx)("h3",{className:"text-lg font-medium",children:"Request"}),(0,n.jsx)("button",{onClick:c,className:"p-1 hover:bg-gray-200 rounded",title:"Copy request",children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,n.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})]}),(0,n.jsx)("div",{className:"p-4 overflow-auto max-h-96 w-full max-w-full box-border",children:(0,n.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,n.jsx)(eR.gc,{data:i(),style:eR.jF,clickToExpandNode:!0})})})]}),(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center p-4 border-b",children:[(0,n.jsxs)("h3",{className:"text-lg font-medium",children:["Response",l&&(0,n.jsxs)("span",{className:"ml-2 text-sm text-red-600",children:["• HTTP code ",(null==r?void 0:r.error_code)||400]})]}),(0,n.jsx)("button",{onClick:m,className:"p-1 hover:bg-gray-200 rounded",title:"Copy response",disabled:!a,children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,n.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})]}),(0,n.jsx)("div",{className:"p-4 overflow-auto max-h-96 w-full max-w-full box-border",children:a?(0,n.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,n.jsx)(eR.gc,{data:o(),style:eR.jF,clickToExpandNode:!0})}):(0,n.jsx)("div",{className:"text-gray-500 text-sm italic text-center py-4",children:"Response data not available"})})]})]})}t(52621);var eO=t(12514),eP=t(35829),eB=t(96761),eH=t(10900),eK=t(30401),eq=t(78867);let eF=e=>{let{sessionId:s,logs:t,onBack:a}=e,[l,r]=(0,c.useState)(null),[i,o]=(0,c.useState)({}),d=t.reduce((e,s)=>e+(s.spend||0),0),u=t.reduce((e,s)=>e+(s.total_tokens||0),0),x=t.reduce((e,s)=>{var t,a;return e+((null===(a=s.metadata)||void 0===a?void 0:null===(t=a.additional_usage_values)||void 0===t?void 0:t.cache_read_input_tokens)||0)},0),h=t.reduce((e,s)=>{var t,a;return e+((null===(a=s.metadata)||void 0===a?void 0:null===(t=a.additional_usage_values)||void 0===t?void 0:t.cache_creation_input_tokens)||0)},0),p=u+x+h,g=t.length>0?new Date(t[0].startTime):new Date;(((t.length>0?new Date(t[t.length-1].endTime):new Date).getTime()-g.getTime())/1e3).toFixed(2),t.map(e=>({time:new Date(e.startTime).toISOString(),tokens:e.total_tokens||0,cost:e.spend||0}));let f=async(e,s)=>{await (0,T.vQ)(e)&&(o(e=>({...e,[s]:!0})),setTimeout(()=>{o(e=>({...e,[s]:!1}))},2e3))};return(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsxs)("div",{className:"mb-8",children:[(0,n.jsx)(ex.Z,{icon:eH.Z,variant:"light",onClick:a,className:"mb-4",children:"Back to All Logs"}),(0,n.jsxs)("div",{className:"mt-4",children:[(0,n.jsx)("h1",{className:"text-2xl font-semibold text-gray-900",children:"Session Details"}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,n.jsx)("p",{className:"text-sm text-gray-500 font-mono",children:s}),(0,n.jsx)(P.ZP,{type:"text",size:"small",icon:i["session-id"]?(0,n.jsx)(eK.Z,{size:12}):(0,n.jsx)(eq.Z,{size:12}),onClick:()=>f(s,"session-id"),className:"left-2 z-10 transition-all duration-200 ".concat(i["session-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]}),(0,n.jsxs)("a",{href:"https://docs.litellm.ai/docs/proxy/ui_logs_sessions",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:text-blue-800 flex items-center gap-1",children:["Get started with session management here",(0,n.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})]})]})]}),(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[(0,n.jsxs)(eO.Z,{children:[(0,n.jsx)(el.Z,{children:"Total Requests"}),(0,n.jsx)(eP.Z,{children:t.length})]}),(0,n.jsxs)(eO.Z,{children:[(0,n.jsx)(el.Z,{children:"Total Cost"}),(0,n.jsxs)(eP.Z,{children:["$",(0,T.pw)(d,6)]})]}),(0,n.jsx)(m.Z,{title:(0,n.jsxs)("div",{className:"text-white min-w-[200px]",children:[(0,n.jsx)("div",{className:"text-lg font-medium mb-3",children:"Usage breakdown"}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-base font-medium mb-2",children:"Input usage:"}),(0,n.jsxs)("div",{className:"space-y-2 text-sm text-gray-300",children:[(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)("span",{children:"input:"}),(0,n.jsx)("span",{className:"ml-8",children:(0,T.pw)(t.reduce((e,s)=>e+(s.prompt_tokens||0),0))})]}),x>0&&(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)("span",{children:"input_cached_tokens:"}),(0,n.jsx)("span",{className:"ml-8",children:(0,T.pw)(x)})]}),h>0&&(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)("span",{children:"input_cache_creation_tokens:"}),(0,n.jsx)("span",{className:"ml-8",children:(0,T.pw)(h)})]})]})]}),(0,n.jsxs)("div",{className:"border-t border-gray-600 pt-3",children:[(0,n.jsx)("div",{className:"text-base font-medium mb-2",children:"Output usage:"}),(0,n.jsx)("div",{className:"space-y-2 text-sm text-gray-300",children:(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsx)("span",{children:"output:"}),(0,n.jsx)("span",{className:"ml-8",children:(0,T.pw)(t.reduce((e,s)=>e+(s.completion_tokens||0),0))})]})})]}),(0,n.jsx)("div",{className:"border-t border-gray-600 pt-3",children:(0,n.jsxs)("div",{className:"flex justify-between items-center",children:[(0,n.jsx)("span",{className:"text-base font-medium",children:"Total usage:"}),(0,n.jsx)("span",{className:"text-sm text-gray-300",children:(0,T.pw)(p)})]})})]})]}),placement:"top",overlayStyle:{minWidth:"300px"},children:(0,n.jsxs)(eO.Z,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)(el.Z,{children:"Total Tokens"}),(0,n.jsx)("span",{className:"text-gray-400 text-sm",children:"ⓘ"})]}),(0,n.jsx)(eP.Z,{children:(0,T.pw)(p)})]})})]}),(0,n.jsx)(eB.Z,{children:"Session Logs"}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(eu.w,{columns:ej,data:t,renderSubComponent:tc,getRowCanExpand:()=>!0,loadingMessage:"Loading logs...",noDataMessage:"No logs found"})})]})};var eY=t(21770),eU=t(90246),eV=t(39760);(a||(a={})).GENERAL_SETTINGS="general_settings",(l||(l={})).MAXIMUM_SPEND_LOGS_RETENTION_PERIOD="maximum_spend_logs_retention_period";let eW=async(e,s)=>{try{let t=ec.proxyBaseUrl?"".concat(ec.proxyBaseUrl,"/config/list?config_type=").concat(s):"/config/list?config_type=".concat(s),a=await fetch(t,{method:"GET",headers:{[(0,ec.getGlobalLitellmHeaderName)()]:"Bearer ".concat(e),"Content-Type":"application/json"}});if(!a.ok){let e=await a.json(),s=(0,ec.deriveErrorMessage)(e);throw(0,ec.handleError)(s),Error(s)}return await a.json()}catch(e){throw console.error("Failed to get proxy config for ".concat(s,":"),e),e}},eJ=(0,eU.n)("proxyConfig"),eG=async(e,s)=>{try{let t=ec.proxyBaseUrl?"".concat(ec.proxyBaseUrl,"/config/field/delete"):"/config/field/delete",a=await fetch(t,{method:"POST",headers:{[(0,ec.getGlobalLitellmHeaderName)()]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify(s)});if(!a.ok){let e=await a.json(),s=(0,ec.deriveErrorMessage)(e);throw(0,ec.handleError)(s),Error(s)}return await a.json()}catch(e){throw console.error("Failed to delete proxy config field ".concat(s.field_name,":"),e),e}},eQ=e=>{let{accessToken:s}=(0,eV.Z)();return(0,i.a)({queryKey:eJ.list({filters:{configType:e}}),queryFn:async()=>await eW(s,e),enabled:!!s})},e$=()=>{let{accessToken:e}=(0,eV.Z)();return(0,eY.D)({mutationFn:async s=>{if(!e)throw Error("Access token is required");return await eG(e,s)}})},eX=async(e,s)=>{let t=(0,ec.getProxyBaseUrl)(),a=await fetch(t?"".concat(t,"/config/update"):"/config/update",{method:"POST",headers:{[(0,ec.getGlobalLitellmHeaderName)()]:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({general_settings:{store_prompts_in_spend_logs:s.store_prompts_in_spend_logs,...s.maximum_spend_logs_retention_period&&{maximum_spend_logs_retention_period:s.maximum_spend_logs_retention_period}}})});if(!a.ok){var l;let e=await a.json().catch(()=>({}));throw Error((null==e?void 0:null===(l=e.error)||void 0===l?void 0:l.message)||(null==e?void 0:e.message)||(null==e?void 0:e.detail)||"Failed to update spend logs settings")}return await a.json()},e0=()=>{let{accessToken:e}=(0,eV.Z)();return(0,eY.D)({mutationFn:async s=>{if(!e)throw Error("Access token is required");return await eX(e,s)}})};var e1=t(91027),e2=t(85968),e4=t(5540),e5=t(10032),e3=t(22116),e6=t(57840),e8=t(58760),e7=t(50337),e9=t(63709),se=t(4260),ss=e=>{var s,t;let{isVisible:r,onCancel:i,onSuccess:o}=e,[d]=e5.Z.useForm(),{mutateAsync:m,isPending:u}=e0(),{mutateAsync:x,isPending:h}=e$(),{data:p,isLoading:g,refetch:f}=eQ(a.GENERAL_SETTINGS),j=e5.Z.useWatch("store_prompts_in_spend_logs",d);(0,c.useEffect)(()=>{r&&f()},[r,f]);let v=(0,c.useMemo)(()=>{var e,s;if(!p)return{store_prompts_in_spend_logs:!1,maximum_spend_logs_retention_period:void 0};let t=p.find(e=>"store_prompts_in_spend_logs"===e.field_name),a=p.find(e=>"maximum_spend_logs_retention_period"===e.field_name);return{store_prompts_in_spend_logs:null!==(e=null==t?void 0:t.field_value)&&void 0!==e&&e,maximum_spend_logs_retention_period:null!==(s=null==a?void 0:a.field_value)&&void 0!==s?s:void 0}},[p]),y=async e=>{try{let s=e.maximum_spend_logs_retention_period;if(!s||"string"==typeof s&&""===s.trim())try{await x({config_type:a.GENERAL_SETTINGS,field_name:l.MAXIMUM_SPEND_LOGS_RETENTION_PERIOD})}catch(e){console.warn("Failed to delete retention period field (may not exist):",e)}let t={store_prompts_in_spend_logs:e.store_prompts_in_spend_logs,...s&&"string"==typeof s&&""!==s.trim()&&{maximum_spend_logs_retention_period:s}};await m(t,{onSuccess:()=>{eA.Z.success("Spend logs settings updated successfully"),f(),null==o||o()},onError:e=>{eA.Z.fromBackend("Failed to save spend logs settings: "+(0,e2.O)(e))}})}catch(e){eA.Z.fromBackend("Failed to save spend logs settings: "+(0,e2.O)(e))}},b=()=>{d.resetFields(),i()};return(0,n.jsx)(e3.Z,{title:(0,n.jsxs)("span",{className:"flex gap-2",children:[(0,n.jsx)(e6.default.Title,{level:5,children:"Spend Logs Settings"}),(0,n.jsx)(e1.Z,{})]}),open:r,footer:(0,n.jsxs)(e8.Z,{children:[(0,n.jsx)(P.ZP,{onClick:b,disabled:u||h||g,children:"Cancel"}),(0,n.jsx)(P.ZP,{type:"primary",loading:u||h,disabled:g,onClick:()=>d.submit(),children:u||h?"Saving...":"Save Settings"})]}),onCancel:b,children:(0,n.jsxs)(e5.Z,{form:d,layout:"horizontal",onFinish:y,initialValues:v,children:[(0,n.jsx)(e5.Z.Item,{label:"Store Prompts in Spend Logs",name:"store_prompts_in_spend_logs",tooltip:(null==p?void 0:null===(s=p.find(e=>"store_prompts_in_spend_logs"===e.field_name))||void 0===s?void 0:s.field_description)||"When enabled, prompts will be stored in spend logs for tracking and analysis purposes.",valuePropName:"checked",children:(0,n.jsx)("div",{children:g?(0,n.jsx)(e7.Z.Input,{active:!0,block:!0}):(0,n.jsx)(e9.Z,{checked:null!=j&&j,onChange:e=>d.setFieldValue("store_prompts_in_spend_logs",e)})})}),(0,n.jsx)(e5.Z.Item,{label:"Maximum Spend Logs Retention Period (Optional)",name:"maximum_spend_logs_retention_period",tooltip:(null==p?void 0:null===(t=p.find(e=>"maximum_spend_logs_retention_period"===e.field_name))||void 0===t?void 0:t.field_description)||"Set the maximum retention period for spend logs (e.g., '7d' for 7 days, '30d' for 30 days). Leave empty for no limit.",children:g?(0,n.jsx)(e7.Z.Input,{active:!0,block:!0}):(0,n.jsx)(se.default,{placeholder:"e.g., 7d, 30d",prefix:(0,n.jsx)(e4.Z,{})})})]},p?JSON.stringify(v):"loading")})};function st(e){let{data:s}=e,[t,a]=(0,c.useState)({});if(!s||0===s.length)return null;let l=e=>new Date(1e3*e).toLocaleString(),r=(e,s)=>"".concat(((s-e)*1e3).toFixed(2),"ms"),i=(e,s)=>{let t="".concat(e,"-").concat(s);a(e=>({...e,[t]:!e[t]}))};return(0,n.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,n.jsx)(u.default,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,n.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Vector Store Requests"}),children:(0,n.jsx)("div",{className:"p-4",children:s.map((e,s)=>(0,n.jsxs)("div",{className:"mb-6 last:mb-0",children:[(0,n.jsx)("div",{className:"bg-white rounded-lg border p-4 mb-4",children:(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Query:"}),(0,n.jsx)("span",{className:"font-mono",children:e.query})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Vector Store ID:"}),(0,n.jsx)("span",{className:"font-mono",children:e.vector_store_id})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Provider:"}),(0,n.jsx)("span",{className:"flex items-center",children:(()=>{let{logo:s,displayName:t}=(0,eh.dr)(e.custom_llm_provider);return(0,n.jsxs)(n.Fragment,{children:[s&&(0,n.jsx)("img",{src:s,alt:"".concat(t," logo"),className:"h-5 w-5 mr-2"}),t]})})()})]})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Start Time:"}),(0,n.jsx)("span",{children:l(e.start_time)})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"End Time:"}),(0,n.jsx)("span",{children:l(e.end_time)})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Duration:"}),(0,n.jsx)("span",{children:r(e.start_time,e.end_time)})]})]})]})}),(0,n.jsx)("h4",{className:"font-medium mb-2",children:"Search Results"}),(0,n.jsx)("div",{className:"space-y-2",children:e.vector_store_search_response.data.map((e,a)=>{let l=t["".concat(s,"-").concat(a)]||!1;return(0,n.jsxs)("div",{className:"border rounded-lg overflow-hidden",children:[(0,n.jsxs)("div",{className:"flex items-center p-3 bg-gray-50 cursor-pointer",onClick:()=>i(s,a),children:[(0,n.jsx)("svg",{className:"w-5 h-5 mr-2 transition-transform ".concat(l?"transform rotate-90":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsxs)("span",{className:"font-medium mr-2",children:["Result ",a+1]}),(0,n.jsxs)("span",{className:"text-gray-500 text-sm",children:["Score: ",(0,n.jsx)("span",{className:"font-mono",children:e.score.toFixed(4)})]})]})]}),l&&(0,n.jsx)("div",{className:"p-3 border-t bg-white",children:e.content.map((e,s)=>(0,n.jsxs)("div",{className:"mb-2 last:mb-0",children:[(0,n.jsx)("div",{className:"text-xs text-gray-500 mb-1",children:e.type}),(0,n.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all bg-gray-50 p-2 rounded",children:e.text})]},s))})]},a)})})]},s))})}]})})}var sa=t(63134),sl=t(51653),sn=t(5945),sr=t(76188),si=t(3810),so=t(29967),sd=t(65869);let sc="24px",sm="request",su="response",sx="monospace",sh="#f0f0f0",{Text:sp}=e6.default;function sg(e){let{value:s,maxWidth:t=180}=e;return s?(0,n.jsx)(m.Z,{title:s,children:(0,n.jsx)(sp,{copyable:{text:s,tooltips:["Copy","Copied!"]},style:{maxWidth:t,display:"inline-block",verticalAlign:"bottom",fontFamily:sx,fontSize:12},ellipsis:!0,children:s})}):(0,n.jsx)(sp,{type:"secondary",children:"-"})}let{Text:sf}=e6.default;function sj(e){let{prompt:s=0,completion:t=0,total:a=0}=e;return(0,n.jsxs)(sf,{children:[a.toLocaleString()," (",s.toLocaleString()," prompt tokens + ",t.toLocaleString()," completion tokens)"]})}let{Text:sv}=e6.default;function sy(e){let{data:s}=e;return s?(0,n.jsx)("div",{style:{maxHeight:400,overflow:"auto",background:"#fafafa",padding:12,borderRadius:4},children:(0,n.jsx)("div",{className:"[&_[role='tree']]:bg-white [&_[role='tree']]:text-slate-900",children:(0,n.jsx)(eR.gc,{data:s,style:eR.jF,clickToExpandNode:!0})})}):(0,n.jsx)(sv,{type:"secondary",children:"No data"})}var sb=t(59352),sN=t(70464),sw=t(49638);let{Text:s_}=e6.default;function sk(e){let{log:s,onClose:t,onPrevious:a,onNext:l,statusLabel:r,statusColor:i,environment:o}=e,d=s.custom_llm_provider||"",c=d?(0,eh.dr)(d):null;return(0,n.jsxs)("div",{style:{padding:"16px 24px",borderBottom:"1px solid ".concat(sh),backgroundColor:"#fff",position:"sticky",top:0,zIndex:10},children:[(0,n.jsx)(sS,{model:s.model,providerLogo:null==c?void 0:c.logo,providerName:null==c?void 0:c.displayName}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[(0,n.jsx)(sC,{requestId:s.request_id}),(0,n.jsx)(sL,{onPrevious:a,onNext:l,onClose:t})]}),(0,n.jsx)(sE,{log:s,statusLabel:r,statusColor:i,environment:o})]})}function sS(e){let{model:s,providerLogo:t,providerName:a}=e;return(0,n.jsxs)(e8.Z,{size:8,style:{marginBottom:8},children:[t&&(0,n.jsx)("img",{src:t,alt:a||"Provider",style:{width:24,height:24},onError:e=>{e.target.style.display="none"}}),(0,n.jsxs)(e8.Z,{size:8,direction:"horizontal",children:[(0,n.jsx)(s_,{strong:!0,style:{fontSize:14},children:s}),a&&(0,n.jsx)(s_,{type:"secondary",style:{fontSize:12},children:a})]})]})}function sC(e){let{requestId:s}=e;return(0,n.jsx)("div",{style:{flex:1,minWidth:0},children:(0,n.jsx)(m.Z,{title:s,children:(0,n.jsx)(s_,{strong:!0,copyable:{text:s,tooltips:["Copy Request ID","Copied!"]},style:{fontSize:16,fontFamily:sx,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:s})})})}function sL(e){let{onPrevious:s,onNext:t,onClose:a}=e,l={border:"1px solid #d9d9d9",borderRadius:4,padding:"0 4px",fontSize:12,fontFamily:"monospace",marginLeft:4,background:"#fafafa"};return(0,n.jsxs)(e8.Z,{size:4,split:(0,n.jsx)("div",{style:{width:1,height:20,background:sh}}),children:[(0,n.jsxs)(P.ZP,{type:"text",size:"small",onClick:s,children:[(0,n.jsx)(sb.Z,{}),(0,n.jsx)("span",{style:l,children:"K"})]}),(0,n.jsxs)(P.ZP,{type:"text",size:"small",onClick:t,children:[(0,n.jsx)(sN.Z,{}),(0,n.jsx)("span",{style:l,children:"J"})]}),(0,n.jsx)(m.Z,{title:"ESC to close",children:(0,n.jsx)(P.ZP,{type:"text",icon:(0,n.jsx)(sw.Z,{}),onClick:a})})]})}function sE(e){let{log:s,statusLabel:t,statusColor:a,environment:l}=e;return(0,n.jsxs)(e8.Z,{size:12,children:[(0,n.jsx)(si.Z,{color:a,children:t}),(0,n.jsxs)(si.Z,{children:["Env: ",l]}),(0,n.jsxs)(e8.Z,{size:8,children:[(0,n.jsx)(s_,{type:"secondary",style:{fontSize:13},children:d()(s.startTime).format("MMM D, YYYY h:mm:ss A")}),(0,n.jsxs)(s_,{type:"secondary",style:{fontSize:13},children:["(",d()(s.startTime).fromNow(),")"]})]})]})}function sT(e){if("string"==typeof e)try{return JSON.parse(e)}catch(e){}return e}function sM(e){if("string"==typeof e)try{return JSON.parse(e)}catch(e){}return e}var sD=t(58630),sZ=t(77565),sz=t(56609);let{Text:sA}=e6.default;function sR(e){var s;let{tool:t}=e,a=Object.entries((null===(s=t.parameters)||void 0===s?void 0:s.properties)||{}).map(e=>{var s,a;let[l,n]=e;return{key:l,name:l,type:n.type||"any",description:n.description||"-",required:(null===(a=t.parameters)||void 0===a?void 0:null===(s=a.required)||void 0===s?void 0:s.includes(l))||!1}}),l=[{title:"Parameter",dataIndex:"name",key:"name",render:(e,s)=>(0,n.jsxs)(sA,{code:!0,children:[e,s.required&&(0,n.jsx)(sA,{type:"danger",children:"*"})]})},{title:"Type",dataIndex:"type",key:"type",render:e=>(0,n.jsx)(sA,{code:!0,style:{color:"#1890ff"},children:e})},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,n.jsx)(sA,{type:"secondary",children:e})}];return(0,n.jsxs)("div",{children:[t.description&&(0,n.jsx)("div",{style:{marginBottom:16},children:(0,n.jsx)(sA,{style:{lineHeight:1.6},children:t.description})}),a.length>0&&(0,n.jsxs)("div",{children:[(0,n.jsx)(sA,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Parameters"}),(0,n.jsx)(sz.Z,{dataSource:a,columns:l,pagination:!1,size:"small",bordered:!0})]}),t.called&&t.callData&&(0,n.jsxs)("div",{style:{marginTop:16},children:[(0,n.jsx)(sA,{type:"secondary",style:{fontSize:12,display:"block",marginBottom:8},children:"Called With"}),(0,n.jsx)("div",{style:{background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:4,padding:12},children:(0,n.jsx)("pre",{style:{margin:0,fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:JSON.stringify(t.callData.arguments,null,2)})})]})]})}function sI(e){let{tool:s}=e,t={type:"function",function:{name:s.name,description:s.description,parameters:s.parameters}};return(0,n.jsx)("pre",{style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:12,background:"#fafafa",padding:12,borderRadius:4,maxHeight:300,overflow:"auto"},children:JSON.stringify(t,null,2)})}let{Text:sO}=e6.default;function sP(e){let{tool:s}=e,[t,a]=(0,c.useState)("formatted");return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:12},children:[(0,n.jsx)(sO,{type:"secondary",style:{fontSize:12},children:"Description"}),(0,n.jsxs)(so.ZP.Group,{size:"small",value:t,onChange:e=>a(e.target.value),children:[(0,n.jsx)(so.ZP.Button,{value:"formatted",children:"Formatted"}),(0,n.jsx)(so.ZP.Button,{value:"json",children:"JSON"})]})]}),"formatted"===t?(0,n.jsx)(sR,{tool:s}):(0,n.jsx)(sI,{tool:s})]})}let{Text:sB}=e6.default;function sH(e){let{tool:s}=e,[t,a]=(0,c.useState)(!1);return(0,n.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:8,overflow:"hidden"},children:[(0,n.jsxs)("div",{onClick:()=>a(!t),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",background:t?"#fafafa":"#fff",transition:"background 0.2s"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,n.jsx)(sD.Z,{style:{color:"#8c8c8c",fontSize:14}}),(0,n.jsxs)(sB,{style:{fontSize:14},children:[s.index,". ",s.name]})]}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,n.jsx)(si.Z,{color:s.called?"blue":"default",children:s.called?"called":"not called"}),t?(0,n.jsx)(sN.Z,{style:{fontSize:12,color:"#8c8c8c"}}):(0,n.jsx)(sZ.Z,{style:{fontSize:12,color:"#8c8c8c"}})]})]}),t&&(0,n.jsx)("div",{style:{padding:"16px",borderTop:"1px solid #f0f0f0",background:"#fff"},children:(0,n.jsx)(sP,{tool:s})})]})}let{Text:sK}=e6.default;function sq(e){let{log:s}=e,t=function(e){let s=function(e){let s=sM(e.proxy_server_request||e.messages);return!s||Array.isArray(s)?[]:"object"==typeof s&&s.tools&&Array.isArray(s.tools)?s.tools:[]}(e);if(0===s.length)return[];let t=function(e){let s=sM(e.response);if(!s||"object"!=typeof s)return[];let t=s.choices;if(Array.isArray(t)&&t.length>0){let e=t[0].message;if(e&&Array.isArray(e.tool_calls))return e.tool_calls}return[]}(e),a=new Set(t.map(e=>{var s;return null===(s=e.function)||void 0===s?void 0:s.name}).filter(Boolean)),l=new Map;return t.forEach(e=>{var s,t;let a=null===(s=e.function)||void 0===s?void 0:s.name;a&&l.set(a,{id:e.id,name:a,arguments:function(e){try{return JSON.parse(e)}catch(e){return{}}}((null===(t=e.function)||void 0===t?void 0:t.arguments)||"{}")})}),s.map((e,s)=>{let t=e.function||{name:"Tool ".concat(s+1)},n=t.name||"Tool ".concat(s+1);return{index:s+1,name:n,description:t.description||"",parameters:t.parameters||{},called:a.has(n),callData:l.get(n)}})}(s);if(0===t.length)return null;let a=t.length,l=t.filter(e=>e.called).length,r=t.slice(0,2).map(e=>e.name).join(", "),i=t.length>2;return(0,n.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,n.jsx)(u.default,{expandIconPosition:"start",items:[{key:"1",label:(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[(0,n.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Tools"}),(0,n.jsxs)(sK,{type:"secondary",style:{fontSize:14},children:[a," provided, ",l," called"]}),(0,n.jsxs)(sK,{type:"secondary",style:{fontSize:14},children:["• ",r,i&&"..."]})]}),children:(0,n.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:t.map(e=>(0,n.jsx)(sH,{tool:e},e.name))})}]})})}let sF=(e,s)=>{var t,a;let l=[];(null==e?void 0:e.messages)&&Array.isArray(e.messages)&&e.messages.forEach(e=>{l.push({role:e.role||"user",content:sY(e.content),toolCallId:e.tool_call_id})});let n=null,r=null==s?void 0:null===(a=s.choices)||void 0===a?void 0:null===(t=a[0])||void 0===t?void 0:t.message;return r&&(n={role:r.role||"assistant",content:r.content||"",toolCalls:sU(r.tool_calls)}),{requestMessages:l,responseMessage:n}},sY=e=>"string"==typeof e?e:Array.isArray(e)?e.map(e=>"string"==typeof e?e:"text"===e.type?e.text:"image_url"===e.type?"[Image]":JSON.stringify(e)).join("\n"):JSON.stringify(e),sU=e=>{if(e&&Array.isArray(e))return e.map(e=>{var s,t;return{id:e.id||"",name:(null===(s=e.function)||void 0===s?void 0:s.name)||"unknown",arguments:sV(null===(t=e.function)||void 0===t?void 0:t.arguments)}})},sV=e=>{if(!e)return{};if("string"==typeof e)try{return JSON.parse(e)}catch(s){return{raw:e}}return e};var sW=t(42264),sJ=t(61340),sG=t(23639);let{Text:sQ}=e6.default;function s$(e){let{type:s,tokens:t,cost:a,onCopy:l,isCollapsed:r,onToggleCollapse:i}=e;return(0,n.jsxs)("div",{onClick:i,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 16px",borderBottom:r?"none":"1px solid #f0f0f0",background:"#fafafa",cursor:i?"pointer":"default",transition:"background 0.15s ease"},onMouseEnter:e=>{i&&(e.currentTarget.style.background="#f5f5f5")},onMouseLeave:e=>{e.currentTarget.style.background="#fafafa"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[i&&(0,n.jsx)("div",{style:{display:"flex",alignItems:"center"},children:r?(0,n.jsx)(sN.Z,{style:{fontSize:10,color:"#8c8c8c"}}):(0,n.jsx)(sb.Z,{style:{fontSize:10,color:"#8c8c8c"}})}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["input"===s?(0,n.jsx)(sJ.Z,{style:{color:"#8c8c8c",fontSize:14}}):(0,n.jsx)("span",{style:{fontSize:14,filter:"grayscale(1)",opacity:.6},children:"✨"}),(0,n.jsx)(sQ,{style:{fontWeight:500,fontSize:14},children:"input"===s?"Input":"Output"})]}),void 0!==t&&(0,n.jsxs)(sQ,{type:"secondary",style:{fontSize:12},children:["Tokens: ",t.toLocaleString()]}),void 0!==a&&(0,n.jsxs)(sQ,{type:"secondary",style:{fontSize:12},children:["Cost: $",a.toFixed(6)]})]}),(0,n.jsx)(m.Z,{title:"Copy",children:(0,n.jsx)(P.ZP,{type:"text",size:"small",icon:(0,n.jsx)(sG.Z,{}),onClick:e=>{e.stopPropagation(),l()}})})]})}let{Text:sX}=e6.default;function s0(e){let{label:s,content:t,defaultExpanded:a=!1}=e,[l,r]=(0,c.useState)(a),[i,o]=(0,c.useState)(!1),d=(null==t?void 0:t.length)||0;return t&&0!==d?(0,n.jsxs)("div",{style:{marginBottom:8},children:[(0,n.jsxs)("div",{onClick:()=>r(!l),onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:i?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:l?4:0},children:[l?(0,n.jsx)(sN.Z,{style:{fontSize:10,color:"#8c8c8c"}}):(0,n.jsx)(sZ.Z,{style:{fontSize:10,color:"#8c8c8c"}}),(0,n.jsx)(sX,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:s}),(0,n.jsxs)(sX,{type:"secondary",style:{fontSize:10},children:["(",d.toLocaleString()," chars)"]})]}),(0,n.jsx)("div",{style:{maxHeight:l?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:l?1:0},children:(0,n.jsx)("div",{style:{paddingLeft:16,fontSize:13,lineHeight:1.7,color:"#262626",borderLeft:"1px solid #f0f0f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:t})})]}):null}let{Text:s1}=e6.default;function s2(e){let{tool:s,compact:t=!1}=e;return(0,n.jsxs)("div",{style:{background:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:6,padding:t?"6px 10px":"10px 14px",marginTop:8,fontFamily:"monospace",fontSize:12,position:"relative"},children:[(0,n.jsx)("div",{style:{position:"absolute",top:-8,left:12,background:"#fff",padding:"0 6px",fontSize:10,color:"#8c8c8c",border:"1px solid #e9ecef",borderRadius:3},children:"function"}),(0,n.jsx)(s1,{strong:!0,style:{fontSize:13,display:"block",marginBottom:6},children:s.name}),Object.keys(s.arguments).length>0&&(0,n.jsx)("div",{children:Object.entries(s.arguments).map(e=>{let[s,t]=e;return(0,n.jsxs)("div",{style:{marginBottom:2},children:[(0,n.jsxs)(s1,{type:"secondary",style:{fontSize:12},children:[s,":"," "]}),(0,n.jsx)(s1,{style:{fontSize:12},children:JSON.stringify(t)})]},s)})})]})}let{Text:s4}=e6.default;function s5(e){let{label:s,content:t,toolCalls:a,isCompact:l=!1}=e,r=t&&"null"!==t&&t.length>0?t:null,i=a&&a.length>0;return r||i?(0,n.jsxs)("div",{style:{marginBottom:l?8:0},children:[(0,n.jsx)(s4,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase",display:"block",marginBottom:3},children:s}),r&&(0,n.jsx)("div",{style:{fontSize:13,lineHeight:1.7,color:"#262626",whiteSpace:"pre-wrap",wordBreak:"break-word",marginBottom:i?6:0},children:r}),i&&(0,n.jsx)("div",{children:a.map((e,s)=>(0,n.jsx)(s2,{tool:e,compact:l},e.id||s))})]}):null}let{Text:s3}=e6.default;function s6(e){let{messages:s}=e,[t,a]=(0,c.useState)(!1),[l,r]=(0,c.useState)(!1);return 0===s.length?null:(0,n.jsxs)("div",{style:{marginBottom:8},children:[(0,n.jsxs)("div",{onClick:()=>a(!t),onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",padding:"4px 0",borderRadius:4,background:l?"#f5f5f5":"transparent",transition:"background 0.15s ease",marginBottom:t?4:0},children:[t?(0,n.jsx)(sN.Z,{style:{fontSize:10,color:"#8c8c8c"}}):(0,n.jsx)(sZ.Z,{style:{fontSize:10,color:"#8c8c8c"}}),(0,n.jsxs)(s3,{type:"secondary",style:{fontSize:10,letterSpacing:"0.5px",textTransform:"uppercase"},children:["HISTORY (",s.length," message",1!==s.length?"s":"",")"]})]}),(0,n.jsx)("div",{style:{maxHeight:t?"2000px":"0px",overflow:"hidden",transition:"max-height 0.2s ease-out, opacity 0.2s ease-out",opacity:t?1:0},children:(0,n.jsx)("div",{style:{paddingLeft:16,borderLeft:"1px solid #f0f0f0"},children:s.map((e,s)=>(0,n.jsx)(s5,{label:e.role.toUpperCase(),content:e.content,toolCalls:e.toolCalls,isCompact:!0},s))})})]})}function s8(e){let{messages:s,promptTokens:t,inputCost:a}=e,[l,r]=(0,c.useState)(!1);if(0===s.length)return null;let i=s.find(e=>"system"===e.role),o=s.filter(e=>"system"!==e.role),d=o.length>0?o[o.length-1]:null,m=o.slice(0,-1);return(0,n.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,marginBottom:8,overflow:"hidden"},children:[(0,n.jsx)(s$,{type:"input",tokens:t,cost:a,onCopy:()=>{let e=JSON.stringify(s,null,2);navigator.clipboard.writeText(e),sW.ZP.success("Input copied")},isCollapsed:l,onToggleCollapse:()=>r(!l)}),(0,n.jsx)("div",{style:{maxHeight:l?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:l?0:1},children:(0,n.jsxs)("div",{style:{padding:"12px 16px"},children:[i&&(0,n.jsx)(s0,{label:"SYSTEM",content:i.content,defaultExpanded:!!(i.content&&i.content.length<200)}),m.length>0&&(0,n.jsx)(s6,{messages:m}),d&&(0,n.jsx)(s5,{label:d.role.toUpperCase(),content:d.content,toolCalls:d.toolCalls})]})})]})}let{Text:s7}=e6.default;function s9(e){let{message:s,completionTokens:t,outputCost:a}=e,[l,r]=(0,c.useState)(!1),i=()=>{if(!s)return;let e=JSON.stringify(s,null,2);navigator.clipboard.writeText(e),sW.ZP.success("Output copied")};return s?(0,n.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,n.jsx)(s$,{type:"output",tokens:t,cost:a,onCopy:i,isCollapsed:l,onToggleCollapse:()=>r(!l)}),(0,n.jsx)("div",{style:{maxHeight:l?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:l?0:1},children:(0,n.jsx)("div",{style:{padding:"12px 16px"},children:(0,n.jsx)(s5,{label:"ASSISTANT",content:s.content,toolCalls:s.toolCalls})})})]}):(0,n.jsxs)("div",{style:{border:"1px solid #f0f0f0",borderRadius:6,overflow:"hidden"},children:[(0,n.jsx)(s$,{type:"output",tokens:t,cost:a,onCopy:i,isCollapsed:l,onToggleCollapse:()=>r(!l)}),(0,n.jsx)("div",{style:{maxHeight:l?"0px":"10000px",overflow:"hidden",transition:"max-height 0.3s ease-out, opacity 0.3s ease-out",opacity:l?0:1},children:(0,n.jsx)("div",{style:{padding:"12px 16px"},children:(0,n.jsx)(s7,{type:"secondary",style:{fontSize:13,fontStyle:"italic"},children:"No response data available"})})})]})}function te(e){let{request:s,response:t,metrics:a}=e,{requestMessages:l,responseMessage:r}=sF(s,t);return(0,n.jsxs)("div",{children:[(0,n.jsx)(s8,{messages:l,promptTokens:null==a?void 0:a.prompt_tokens,inputCost:null==a?void 0:a.input_cost}),(0,n.jsx)(s9,{message:r,completionTokens:null==a?void 0:a.completion_tokens,outputCost:null==a?void 0:a.output_cost})]})}let{Text:ts}=e6.default;function tt(e){var s,t,a,l;let{open:r,onClose:i,logEntry:o,onOpenSettings:d,allLogs:m=[],onSelectLog:u}=e,[x,h]=(0,c.useState)(sm),{selectNextLog:p,selectPreviousLog:g}=function(e){let{isOpen:s,currentLog:t,allLogs:a,onClose:l,onSelectLog:n}=e;(0,c.useEffect)(()=>{let e=e=>{var t;if(!((t=e.target)instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&s)switch(e.key){case"Escape":l();break;case"j":case"J":i();break;case"k":case"K":r()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[s,t,a]);let r=()=>{if(!t||!a.length||!n)return;let e=a.findIndex(e=>e.request_id===t.request_id);e{if(!t||!a.length||!n)return;let e=a.findIndex(e=>e.request_id===t.request_id);e>0&&n(a[e-1])};return{selectNextLog:r,selectPreviousLog:i}}({isOpen:r,currentLog:o,allLogs:m,onClose:i,onSelectLog:u});if(!o)return null;let f=o.metadata||{},j="failure"===f.status,v=j?f.error_information:null,y=!!(s=o.messages)&&(Array.isArray(s)?s.length>0:"object"==typeof s&&Object.keys(s).length>0),b=!!(t=o.response)&&Object.keys(sT(t)).length>0,N=!y&&!b,w=null==f?void 0:f.guardrail_information,_=Array.isArray(w)?w:w?[w]:[],k=_.length>0,S=_.reduce((e,s)=>{let t=null==s?void 0:s.masked_entity_count;return t?e+Object.values(t).reduce((e,s)=>"number"==typeof s?e+s:e,0):e},0),C=0===_.length?"-":1===_.length?null!==(l=null===(a=_[0])||void 0===a?void 0:a.guardrail_name)&&void 0!==l?l:"-":"".concat(_.length," guardrails"),L=f.vector_store_request_metadata&&Array.isArray(f.vector_store_request_metadata)&&f.vector_store_request_metadata.length>0,T="failure"===f.status?"Failure":"Success",M="failure"===f.status?"error":"success",D=(null==f?void 0:f.user_api_key_team_alias)||"default";return(0,n.jsxs)(sa.Z,{title:null,placement:"right",onClose:i,open:r,width:"60%",closable:!1,mask:!0,maskClosable:!0,styles:{body:{padding:0,overflow:"hidden"},header:{display:"none"}},children:[(0,n.jsx)(sk,{log:o,onClose:i,onPrevious:g,onNext:p,statusLabel:T,statusColor:M,environment:D}),(0,n.jsxs)("div",{style:{height:"calc(100vh - 100px)",overflowY:"auto",padding:"".concat(sc," ").concat(sc," 0")},children:[j&&v&&(0,n.jsx)(sl.Z,{type:"error",showIcon:!0,message:"Request Failed",description:(0,n.jsx)(ta,{errorInfo:v}),className:"mb-6"}),o.request_tags&&Object.keys(o.request_tags).length>0&&(0,n.jsx)(tl,{tags:o.request_tags}),(0,n.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,n.jsx)(sn.Z,{title:"Request Details",size:"small",bordered:!1,style:{marginBottom:0},children:(0,n.jsxs)(sr.Z,{column:2,size:"small",children:[(0,n.jsx)(sr.Z.Item,{label:"Model",children:o.model}),(0,n.jsx)(sr.Z.Item,{label:"Provider",children:o.custom_llm_provider||"-"}),(0,n.jsx)(sr.Z.Item,{label:"Call Type",children:o.call_type}),(0,n.jsx)(sr.Z.Item,{label:"Model ID",children:(0,n.jsx)(sg,{value:o.model_id})}),(0,n.jsx)(sr.Z.Item,{label:"API Base",children:(0,n.jsx)(sg,{value:o.api_base,maxWidth:200})}),o.requester_ip_address&&(0,n.jsx)(sr.Z.Item,{label:"IP Address",children:o.requester_ip_address}),k&&(0,n.jsx)(sr.Z.Item,{label:"Guardrail",children:(0,n.jsx)(tn,{label:C,maskedCount:S})})]})})}),(0,n.jsx)(tr,{logEntry:o,metadata:f}),(0,n.jsx)(eC,{costBreakdown:null==f?void 0:f.cost_breakdown,totalSpend:o.spend||0}),(0,n.jsx)(sq,{log:o}),N&&(0,n.jsx)("div",{className:"mb-6",children:(0,n.jsx)(e_,{show:N,onOpenSettings:d})}),(0,n.jsx)(ti,{hasResponse:b,getRawRequest:()=>sT(o.proxy_server_request||o.messages),getFormattedResponse:()=>j&&v?{error:{message:v.error_message||"An error occurred",type:v.error_class||"error",code:v.error_code||"unknown",param:null}}:sT(o.response),logEntry:o}),k&&(0,n.jsx)(E,{data:w}),L&&(0,n.jsx)(st,{data:f.vector_store_request_metadata}),o.metadata&&Object.keys(o.metadata).length>0&&(0,n.jsx)(to,{metadata:o.metadata}),(0,n.jsx)("div",{style:{height:sc}})]})]})}function ta(e){let{errorInfo:s}=e;return(0,n.jsxs)("div",{children:[s.error_code&&(0,n.jsxs)("div",{children:[(0,n.jsx)(ts,{strong:!0,children:"Error Code:"})," ",s.error_code]}),s.error_message&&(0,n.jsxs)("div",{children:[(0,n.jsx)(ts,{strong:!0,children:"Message:"})," ",s.error_message]})]})}function tl(e){let{tags:s}=e;return(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden p-4 mb-6",children:[(0,n.jsx)(ts,{strong:!0,style:{display:"block",marginBottom:8,fontSize:16},children:"Tags"}),(0,n.jsx)(e8.Z,{size:8,wrap:!0,children:Object.entries(s).map(e=>{let[s,t]=e;return(0,n.jsxs)(si.Z,{children:[s,": ",String(t)]},s)})})]})}function tn(e){let{label:s,maskedCount:t}=e;return(0,n.jsxs)(e8.Z,{size:8,children:[(0,n.jsx)("span",{children:s}),t>0&&(0,n.jsxs)(si.Z,{color:"blue",children:[t," masked"]})]})}function tr(e){var s,t,a,l;let{logEntry:r,metadata:i}=e,o=r.cache_hit||(null==i?void 0:null===(s=i.additional_usage_values)||void 0===s?void 0:s.cache_read_input_tokens)&&i.additional_usage_values.cache_read_input_tokens>0;return(0,n.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,n.jsx)(sn.Z,{title:"Metrics",size:"small",bordered:!1,style:{marginBottom:0},children:(0,n.jsxs)(sr.Z,{column:2,size:"small",children:[(0,n.jsx)(sr.Z.Item,{label:"Tokens",children:(0,n.jsx)(sj,{prompt:r.prompt_tokens,completion:r.completion_tokens,total:r.total_tokens})}),(0,n.jsxs)(sr.Z.Item,{label:"Cost",children:["$",(0,T.pw)(r.spend||0,8)]}),(0,n.jsxs)(sr.Z.Item,{label:"Duration",children:[null===(t=r.duration)||void 0===t?void 0:t.toFixed(3)," s"]}),o&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(sr.Z.Item,{label:"Cache Hit",children:(0,n.jsx)(si.Z,{color:r.cache_hit?"green":"default",children:r.cache_hit||"None"})}),(null==i?void 0:null===(a=i.additional_usage_values)||void 0===a?void 0:a.cache_read_input_tokens)>0&&(0,n.jsx)(sr.Z.Item,{label:"Cache Read Tokens",children:(0,T.pw)(i.additional_usage_values.cache_read_input_tokens)}),(null==i?void 0:null===(l=i.additional_usage_values)||void 0===l?void 0:l.cache_creation_input_tokens)>0&&(0,n.jsx)(sr.Z.Item,{label:"Cache Creation Tokens",children:(0,T.pw)(i.additional_usage_values.cache_creation_input_tokens)})]}),(null==i?void 0:i.litellm_overhead_time_ms)!==void 0&&null!==i.litellm_overhead_time_ms&&(0,n.jsxs)(sr.Z.Item,{label:"LiteLLM Overhead",children:[i.litellm_overhead_time_ms.toFixed(2)," ms"]}),(0,n.jsx)(sr.Z.Item,{label:"Start Time",children:d()(r.startTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")}),(0,n.jsx)(sr.Z.Item,{label:"End Time",children:d()(r.endTime).format("YYYY-MM-DDTHH:mm:ss.SSS[Z]")})]})})})}function ti(e){let{hasResponse:s,getRawRequest:t,getFormattedResponse:a,logEntry:l}=e,[r,i]=(0,c.useState)(sm),[o,d]=(0,c.useState)("pretty"),m=l.spend||0,x=l.prompt_tokens||0,h=l.completion_tokens||0,p=x+h;return(0,n.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,n.jsx)(u.default,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},onClick:e=>{e.target.closest(".ant-radio-group")&&e.stopPropagation()},children:[(0,n.jsx)("h3",{className:"text-lg font-medium text-gray-900",style:{margin:0},children:"Request & Response"}),(0,n.jsxs)(so.ZP.Group,{size:"small",value:o,onChange:e=>d(e.target.value),children:[(0,n.jsx)(so.ZP.Button,{value:"pretty",children:"Pretty"}),(0,n.jsx)(so.ZP.Button,{value:"json",children:"JSON"})]})]}),children:(0,n.jsx)("div",{children:"pretty"===o?(0,n.jsx)(te,{request:t(),response:a(),metrics:{prompt_tokens:x,completion_tokens:h,input_cost:p>0?m*x/p:0,output_cost:p>0?m*h/p:0}}):(0,n.jsx)(sd.default,{activeKey:r,onChange:e=>i(e),tabBarExtraContent:(0,n.jsx)(ts,{copyable:{text:JSON.stringify(r===sm?t():a(),null,2),tooltips:["Copy JSON","Copied!"]},disabled:r===su&&!s}),items:[{key:sm,label:"Request",children:(0,n.jsx)("div",{style:{paddingTop:16,paddingBottom:16},children:(0,n.jsx)(sy,{data:t(),mode:"formatted"})})},{key:su,label:"Response",children:(0,n.jsx)("div",{style:{paddingTop:16,paddingBottom:16},children:s?(0,n.jsx)(sy,{data:a(),mode:"formatted"}):(0,n.jsx)("div",{style:{textAlign:"center",padding:20,color:"#999",fontStyle:"italic"},children:"Response data not available"})})}]})})}]})})}function to(e){let{metadata:s}=e;return(0,n.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden mb-6",children:(0,n.jsx)(u.default,{defaultActiveKey:["1"],expandIconPosition:"start",items:[{key:"1",label:(0,n.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"Metadata"}),children:(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:8},children:(0,n.jsx)(ts,{copyable:{text:JSON.stringify(s,null,2),tooltips:["Copy Metadata","Copied!"]}})}),(0,n.jsx)("pre",{style:{maxHeight:300,overflowY:"auto",fontSize:12,fontFamily:sx,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(s,null,2)})]})}]})})}function td(e){var s,t;let{accessToken:a,token:l,userRole:o,userID:m,allTeams:u,premiumUser:x}=e,[h,p]=(0,c.useState)(""),[g,f]=(0,c.useState)(!1),[j,v]=(0,c.useState)(!1),[y,b]=(0,c.useState)(1),[N]=(0,c.useState)(50),w=(0,c.useRef)(null),_=(0,c.useRef)(null),k=(0,c.useRef)(null),[S,C]=(0,c.useState)(d()().subtract(24,"hours").format("YYYY-MM-DDTHH:mm")),[L,E]=(0,c.useState)(d()().format("YYYY-MM-DDTHH:mm")),[T,M]=(0,c.useState)(!1),[H,K]=(0,c.useState)(!1),[q,F]=(0,c.useState)(""),[Y,U]=(0,c.useState)(""),[V,W]=(0,c.useState)(""),[G,Q]=(0,c.useState)(""),[$,X]=(0,c.useState)(""),[ee,es]=(0,c.useState)(null),[et,ea]=(0,c.useState)(null),[el,en]=(0,c.useState)(""),[er,ex]=(0,c.useState)(""),[eh,ep]=(0,c.useState)(o&&B.lo.includes(o)),[eg,ef]=(0,c.useState)("request logs"),[ev,ey]=(0,c.useState)(null),[eb,eN]=(0,c.useState)(!1),[e_,ek]=(0,c.useState)(null),[eS,eC]=(0,c.useState)(!1),eL=(0,r.NL)(),[eE,eA]=(0,c.useState)(()=>{let e=sessionStorage.getItem("isLiveTail");return null===e||JSON.parse(e)});(0,c.useEffect)(()=>{sessionStorage.setItem("isLiveTail",JSON.stringify(eE))},[eE]);let[eR,eI]=(0,c.useState)({value:24,unit:"hours"});(0,c.useEffect)(()=>{(async()=>{et&&a&&es({...(await (0,ec.keyInfoV1Call)(a,et)).info,token:et,api_key:et})})()},[et,a]),(0,c.useEffect)(()=>{function e(e){w.current&&!w.current.contains(e.target)&&v(!1),_.current&&!_.current.contains(e.target)&&f(!1),k.current&&!k.current.contains(e.target)&&K(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,c.useEffect)(()=>{o&&B.lo.includes(o)&&ep(!0)},[o]);let eO=(0,i.a)({queryKey:["logs","table",y,N,S,L,V,G,eh?m:null,el,$],queryFn:async()=>{if(!a||!l||!o||!m)return{data:[],total:0,page:1,page_size:N,total_pages:0};let e=d()(S).utc().format("YYYY-MM-DD HH:mm:ss"),s=T?d()(L).utc().format("YYYY-MM-DD HH:mm:ss"):d()().utc().format("YYYY-MM-DD HH:mm:ss"),t=await (0,ec.uiSpendLogsCall)(a,G||void 0,V||void 0,void 0,e,s,y,N,eh?m:void 0,er,el,$);return await ez(t.data,e,a,eL),t.data=t.data.map(s=>{let t=eL.getQueryData(["logDetails",s.request_id,e]);return(null==t?void 0:t.messages)&&(null==t?void 0:t.response)&&(s.messages=t.messages,s.response=t.response),s}),t},enabled:!!a&&!!l&&!!o&&!!m&&"request logs"===eg,refetchInterval:!!eE&&1===y&&15e3,refetchIntervalInBackground:!0}),eP=eO.data||{data:[],total:0,page:1,page_size:N||10,total_pages:1},{filters:eB,filteredLogs:eH,allTeams:eK,allKeyAliases:eq,handleFilterChange:eY,handleFilterReset:eU}=function(e){let{logs:s,accessToken:t,startTime:a,endTime:l,pageSize:n=eM.d,isCustomDate:r,setCurrentPage:o,userID:m,userRole:u}=e,x=(0,c.useMemo)(()=>({[eD.TEAM_ID]:"",[eD.KEY_HASH]:"",[eD.REQUEST_ID]:"",[eD.MODEL]:"",[eD.USER_ID]:"",[eD.END_USER]:"",[eD.STATUS]:"",[eD.KEY_ALIAS]:"",[eD.ERROR_CODE]:"",[eD.ERROR_MESSAGE]:""}),[]),[h,p]=(0,c.useState)(x),[g,f]=(0,c.useState)({data:[],total:0,page:1,page_size:50,total_pages:0}),j=(0,c.useRef)(0),v=(0,c.useCallback)(async function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!t)return;console.log("Filters being sent to API:",e);let i=Date.now();j.current=i;let o=d()(a).utc().format("YYYY-MM-DD HH:mm:ss"),c=r?d()(l).utc().format("YYYY-MM-DD HH:mm:ss"):d()().utc().format("YYYY-MM-DD HH:mm:ss");try{let a=await (0,ec.uiSpendLogsCall)(t,e[eD.KEY_HASH]||void 0,e[eD.TEAM_ID]||void 0,e[eD.REQUEST_ID]||void 0,o,c,s,n,e[eD.USER_ID]||void 0,e[eD.END_USER]||void 0,e[eD.STATUS]||void 0,e[eD.MODEL]||void 0,e[eD.KEY_ALIAS]||void 0,e[eD.ERROR_CODE]||void 0,e[eD.ERROR_MESSAGE]||void 0);i===j.current&&a.data&&f(a)}catch(e){console.error("Error searching users:",e)}},[t,a,l,r,n]),y=(0,c.useMemo)(()=>eT()((e,s)=>v(e,s),300),[v]);(0,c.useEffect)(()=>()=>y.cancel(),[y]);let b=(0,i.a)({queryKey:["allKeys"],queryFn:async()=>{if(!t)throw Error("Access token required");return await (0,eo.LO)(t)},enabled:!!t}).data||[],N=(0,c.useMemo)(()=>!!(h[eD.KEY_ALIAS]||h[eD.KEY_HASH]||h[eD.REQUEST_ID]||h[eD.USER_ID]||h[eD.END_USER]||h[eD.ERROR_CODE]||h[eD.ERROR_MESSAGE]),[h]),w=(0,c.useMemo)(()=>{if(!s||!s.data)return{data:[],total:0,page:1,page_size:50,total_pages:0};if(N)return s;let e=[...s.data];return h[eD.TEAM_ID]&&(e=e.filter(e=>e.team_id===h[eD.TEAM_ID])),h[eD.STATUS]&&(e=e.filter(e=>"success"===h[eD.STATUS]?!e.status||"success"===e.status:e.status===h[eD.STATUS])),h[eD.MODEL]&&(e=e.filter(e=>e.model===h[eD.MODEL])),h[eD.KEY_HASH]&&(e=e.filter(e=>e.api_key===h[eD.KEY_HASH])),h[eD.END_USER]&&(e=e.filter(e=>e.end_user===h[eD.END_USER])),h[eD.ERROR_CODE]&&(e=e.filter(e=>{let s=(e.metadata||{}).error_information;return s&&s.error_code===h[eD.ERROR_CODE]})),{data:e,total:s.total,page:s.page,page_size:s.page_size,total_pages:s.total_pages}},[s,h,N]),_=(0,c.useMemo)(()=>N?g&&g.data&&g.data.length>0?g:s||{data:[],total:0,page:1,page_size:50,total_pages:0}:w,[N,g,w,s]),{data:k}=(0,i.a)({queryKey:["allTeamsForLogFilters",t],queryFn:async()=>t&&await (0,eo.IE)(t)||[],enabled:!!t});return{filters:h,filteredLogs:_,allKeyAliases:b,allTeams:k,handleFilterChange:e=>{p(s=>{let t={...s,...e};for(let e of Object.keys(x))e in t||(t[e]=x[e]);return JSON.stringify(t)!==JSON.stringify(s)&&(o(1),y(t,1)),t})},handleFilterReset:()=>{p(x),f({data:[],total:0,page:1,page_size:50,total_pages:0}),y(x,1)}}}({logs:eP,accessToken:a,startTime:S,endTime:L,pageSize:N,isCustomDate:T,setCurrentPage:b,userID:m,userRole:o}),eV=(0,c.useCallback)(async e=>{if(a)try{let s=(await (0,ec.keyListCall)(a,null,null,e,null,null,y,N)).keys.find(s=>s.key_alias===e);s&&Q(s.token)}catch(e){console.error("Error fetching key hash for alias:",e)}},[a,y,N]);(0,c.useEffect)(()=>{a&&(eB["Team ID"]?W(eB["Team ID"]):W(""),en(eB.Status||""),X(eB.Model||""),ex(eB["End User"]||""),eB["Key Hash"]?Q(eB["Key Hash"]):eB["Key Alias"]?eV(eB["Key Alias"]):Q(""))},[eB,a,eV]);let eW=(0,i.a)({queryKey:["sessionLogs",e_],queryFn:async()=>{if(!a||!e_)return{data:[],total:0,page:1,page_size:50,total_pages:1};let e=await (0,ec.sessionSpendLogsCall)(a,e_);return{data:e.data||e||[],total:(e.data||e||[]).length,page:1,page_size:1e3,total_pages:1}},enabled:!!a&&!!e_});if(!a||!l||!o||!m)return null;let eJ=eH.data.filter(e=>!h||e.request_id.includes(h)||e.model.includes(h)||e.user&&e.user.includes(h)).map(e=>({...e,duration:(Date.parse(e.endTime)-Date.parse(e.startTime))/1e3,onKeyHashClick:e=>ea(e),onSessionClick:e=>{e&&ek(e)}}))||[],eG=(null===(t=eW.data)||void 0===t?void 0:null===(s=t.data)||void 0===s?void 0:s.map(e=>({...e,onKeyHashClick:e=>ea(e),onSessionClick:e=>{}})))||[],eQ=e=>{ey(e),eN(!0)},e$=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=new Set;return e.forEach(e=>{let a=e.metadata||{};if("failure"===a.status&&a.error_information){let e=a.error_information.error_code;e&&(!s||e.toLowerCase().includes(s.toLowerCase()))&&t.add(e)}}),Array.from(t).map(e=>({label:e,value:e}))},eX=[{name:"Team ID",label:"Team ID",isSearchable:!0,searchFn:async e=>u&&0!==u.length?u.filter(s=>s.team_id.toLowerCase().includes(e.toLowerCase())||s.team_alias&&s.team_alias.toLowerCase().includes(e.toLowerCase())).map(e=>({label:"".concat(e.team_alias||e.team_id," (").concat(e.team_id,")"),value:e.team_id})):[]},{name:"Status",label:"Status",isSearchable:!1,options:[{label:"Success",value:"success"},{label:"Failure",value:"failure"}]},{name:"Model",label:"Model",isSearchable:!1},{name:"Key Alias",label:"Key Alias",isSearchable:!0,searchFn:async e=>a?(await (0,eo.LO)(a)).filter(s=>s.toLowerCase().includes(e.toLowerCase())).map(e=>({label:e,value:e})):[]},{name:"End User",label:"End User",isSearchable:!0,searchFn:async e=>{if(!a)return[];let s=await (0,ec.allEndUsersCall)(a);return((null==s?void 0:s.map(e=>e.user_id))||[]).filter(s=>s.toLowerCase().includes(e.toLowerCase())).map(e=>({label:e,value:e}))}},{name:"Error Code",label:"Error Code",isSearchable:!0,searchFn:async e=>e$(eP.data,e)},{name:"Key Hash",label:"Key Hash",isSearchable:!1},{name:"Error Message",label:"Error Message",isSearchable:!1}];if(e_&&eW.data)return(0,n.jsx)("div",{className:"w-full p-6",children:(0,n.jsx)(eF,{sessionId:e_,logs:eW.data.data,onBack:()=>ek(null)})});let e0=[{label:"Last 15 Minutes",value:15,unit:"minutes"},{label:"Last Hour",value:1,unit:"hours"},{label:"Last 4 Hours",value:4,unit:"hours"},{label:"Last 24 Hours",value:24,unit:"hours"},{label:"Last 7 Days",value:7,unit:"days"}],e2=e0.find(e=>e.value===eR.value&&e.unit===eR.unit),e4=T?eZ(T,S,L):null==e2?void 0:e2.label;return(0,n.jsxs)("div",{className:"w-full max-w-screen p-6 overflow-x-hidden box-border",children:[(0,n.jsxs)(A.Z,{defaultIndex:0,onIndexChange:e=>ef(0===e?"request logs":"audit logs"),children:[(0,n.jsxs)(R.Z,{children:[(0,n.jsx)(z.Z,{children:"Request Logs"}),(0,n.jsx)(z.Z,{children:"Audit Logs"}),(0,n.jsx)(z.Z,{children:"Deleted Keys"}),(0,n.jsx)(z.Z,{children:"Deleted Teams"})]}),(0,n.jsxs)(O.Z,{children:[(0,n.jsxs)(I.Z,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsx)("h1",{className:"text-xl font-semibold",children:e_?(0,n.jsxs)(n.Fragment,{children:["Session: ",(0,n.jsx)("span",{className:"font-mono",children:e_}),(0,n.jsx)("button",{className:"ml-4 px-3 py-1 text-sm border rounded hover:bg-gray-50",onClick:()=>ek(null),children:"← Back to All Logs"})]}):"Request Logs"}),!e_&&(0,n.jsx)(e1.Z,{dot:!0,children:(0,n.jsx)(P.ZP,{icon:(0,n.jsx)(D.Z,{}),onClick:()=>eC(!0),title:"Spend Logs Settings"})})]}),ee&&et&&ee.api_key===et?(0,n.jsx)(em.Z,{keyId:et,keyData:ee,teams:u,onClose:()=>ea(null),backButtonText:"Back to Logs"}):e_?(0,n.jsx)("div",{className:"bg-white rounded-lg shadow",children:(0,n.jsx)(eu.w,{columns:ej,data:eG,onRowClick:eQ})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ed.Z,{options:eX,onApplyFilters:eY,onResetFilters:eU}),(0,n.jsx)(ss,{isVisible:eS,onCancel:()=>eC(!1),onSuccess:()=>eC(!1)}),(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full box-border",children:[(0,n.jsx)("div",{className:"border-b px-6 py-4 w-full max-w-full box-border",children:(0,n.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between space-y-4 md:space-y-0 w-full max-w-full box-border",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full max-w-full box-border",children:[(0,n.jsxs)("div",{className:"relative w-64 min-w-0 flex-shrink-0",children:[(0,n.jsx)("input",{type:"text",placeholder:"Search by Request ID",className:"w-full px-3 py-2 pl-8 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500",value:h,onChange:e=>p(e.target.value)}),(0,n.jsx)("svg",{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-shrink",children:[(0,n.jsxs)("div",{className:"relative z-50",ref:k,children:[(0,n.jsxs)("button",{onClick:()=>K(!H),className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",children:[(0,n.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e4]}),H&&(0,n.jsx)("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border p-2 z-50",children:(0,n.jsxs)("div",{className:"space-y-1",children:[e0.map(e=>(0,n.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ".concat(e4===e.label?"bg-blue-50 text-blue-600":""),onClick:()=>{E(d()().format("YYYY-MM-DDTHH:mm")),C(d()().subtract(e.value,e.unit).format("YYYY-MM-DDTHH:mm")),eI({value:e.value,unit:e.unit}),M(!1),K(!1)},children:e.label},e.label)),(0,n.jsx)("div",{className:"border-t my-2"}),(0,n.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm hover:bg-gray-50 rounded-md ".concat(T?"bg-blue-50 text-blue-600":""),onClick:()=>M(!T),children:"Custom Range"})]})})]}),(0,n.jsx)(()=>(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"text-sm font-medium text-gray-900",children:"Live Tail"}),(0,n.jsx)(Z.Z,{color:"green",checked:eE,defaultChecked:!0,onChange:eA})]}),{}),(0,n.jsxs)("button",{onClick:()=>{eO.refetch()},className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",title:"Refresh data",children:[(0,n.jsx)("svg",{className:"w-4 h-4 ".concat(eO.isFetching?"animate-spin":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),(0,n.jsx)("span",{children:"Refresh"})]})]}),T&&(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("div",{children:(0,n.jsx)("input",{type:"datetime-local",value:S,onChange:e=>{C(e.target.value),b(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})}),(0,n.jsx)("span",{className:"text-gray-500",children:"to"}),(0,n.jsx)("div",{children:(0,n.jsx)("input",{type:"datetime-local",value:L,onChange:e=>{E(e.target.value),b(1)},className:"px-3 py-2 border rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})})]})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsxs)("span",{className:"text-sm text-gray-700 whitespace-nowrap",children:["Showing ",eO.isLoading?"...":eH?(y-1)*N+1:0," -"," ",eO.isLoading?"...":eH?Math.min(y*N,eH.total):0," ","of ",eO.isLoading?"...":eH?eH.total:0," results"]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsxs)("span",{className:"text-sm text-gray-700 min-w-[90px]",children:["Page ",eO.isLoading?"...":y," of"," ",eO.isLoading?"...":eH?eH.total_pages:1]}),(0,n.jsx)("button",{onClick:()=>b(e=>Math.max(1,e-1)),disabled:eO.isLoading||1===y,className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,n.jsx)("button",{onClick:()=>b(e=>Math.min(eH.total_pages||1,e+1)),disabled:eO.isLoading||y===(eH.total_pages||1),className:"px-3 py-1 text-sm border rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})]})}),eE&&1===y&&(0,n.jsxs)("div",{className:"mb-4 px-4 py-2 bg-green-50 border border-greem-200 rounded-md flex items-center justify-between",children:[(0,n.jsx)("div",{className:"flex items-center gap-2",children:(0,n.jsx)("span",{className:"text-sm text-green-700",children:"Auto-refreshing every 15 seconds"})}),(0,n.jsx)("button",{onClick:()=>eA(!1),className:"text-sm text-green-600 hover:text-green-800",children:"Stop"})]}),(0,n.jsx)(eu.w,{columns:ej,data:eJ,onRowClick:eQ})]})]})]}),(0,n.jsx)(I.Z,{children:(0,n.jsx)(ew,{userID:m,userRole:o,token:l,accessToken:a,isActive:"audit logs"===eg,premiumUser:x,allTeams:u})}),(0,n.jsx)(I.Z,{children:(0,n.jsx)(J,{})}),(0,n.jsx)(I.Z,{children:(0,n.jsx)(ei,{})})]})]}),(0,n.jsx)(tt,{open:eb,onClose:()=>{eN(!1)},logEntry:ev,onOpenSettings:()=>eC(!0),allLogs:eJ,onSelectLog:e=>{ey(e)}})]})}function tc(e){var s,t,a,l,r,i,o,d,c,u,x,h;let{row:p,onOpenSettings:g}=e,f=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){}return e},j=p.original.metadata||{},v="failure"===j.status,y=v?j.error_information:null,b=p.original.messages&&(Array.isArray(p.original.messages)?p.original.messages.length>0:Object.keys(p.original.messages).length>0),N=p.original.response&&Object.keys(f(p.original.response)).length>0,w=j.vector_store_request_metadata&&Array.isArray(j.vector_store_request_metadata)&&j.vector_store_request_metadata.length>0,_=null===(s=p.original.metadata)||void 0===s?void 0:s.guardrail_information,k=Array.isArray(_)?_:_?[_]:[],S=k.length>0,C=k.reduce((e,s)=>{let t=null==s?void 0:s.masked_entity_count;return t?e+Object.values(t).reduce((e,s)=>"number"==typeof s?e+s:e,0):e},0),L=1===k.length?null!==(h=null===(t=k[0])||void 0===t?void 0:t.guardrail_name)&&void 0!==h?h:"-":k.length>1?"".concat(k.length," guardrails"):"-",D=(0,M.aS)(p.original.request_id,64);return(0,n.jsxs)("div",{className:"p-6 bg-gray-50 space-y-6 w-full max-w-full overflow-hidden box-border",children:[(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow w-full max-w-full overflow-hidden",children:[(0,n.jsx)("div",{className:"p-4 border-b",children:(0,n.jsx)("h3",{className:"text-lg font-medium",children:"Request Details"})}),(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 p-4 w-full max-w-full overflow-hidden",children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Request ID:"}),p.original.request_id.length>64?(0,n.jsx)(m.Z,{title:p.original.request_id,children:(0,n.jsx)("span",{className:"font-mono text-sm",children:D})}):(0,n.jsx)("span",{className:"font-mono text-sm",children:p.original.request_id})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Model:"}),(0,n.jsx)("span",{children:p.original.model})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Model ID:"}),(0,n.jsx)("span",{children:p.original.model_id})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Call Type:"}),(0,n.jsx)("span",{children:p.original.call_type})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Provider:"}),(0,n.jsx)("span",{children:p.original.custom_llm_provider||"-"})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"API Base:"}),(0,n.jsx)(m.Z,{title:p.original.api_base||"-",children:(0,n.jsx)("span",{className:"max-w-[15ch] truncate block",children:p.original.api_base||"-"})})]}),(null==p?void 0:null===(a=p.original)||void 0===a?void 0:a.requester_ip_address)&&(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"IP Address:"}),(0,n.jsx)("span",{children:null==p?void 0:null===(l=p.original)||void 0===l?void 0:l.requester_ip_address})]}),S&&(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Guardrail:"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"font-mono",children:L}),C>0&&(0,n.jsxs)("span",{className:"ml-2 px-2 py-0.5 bg-blue-50 text-blue-700 rounded-md text-xs font-medium",children:[C," masked"]})]})]})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Tokens:"}),(0,n.jsxs)("span",{children:[p.original.total_tokens," (",p.original.prompt_tokens," prompt tokens +"," ",p.original.completion_tokens," completion tokens)"]})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Cache Read Tokens:"}),(0,n.jsx)("span",{children:(0,T.pw)((null===(i=p.original.metadata)||void 0===i?void 0:null===(r=i.additional_usage_values)||void 0===r?void 0:r.cache_read_input_tokens)||0)})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Cache Creation Tokens:"}),(0,n.jsx)("span",{children:(0,T.pw)(null===(o=p.original.metadata)||void 0===o?void 0:o.additional_usage_values.cache_creation_input_tokens)})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Cost:"}),(0,n.jsxs)("span",{children:["$",(0,T.pw)(p.original.spend||0,6)]})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Cache Hit:"}),(0,n.jsx)("span",{children:p.original.cache_hit})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Status:"}),(0,n.jsx)("span",{className:"px-2 py-1 rounded-md text-xs font-medium inline-block text-center w-16 ".concat("failure"!==((null===(d=p.original.metadata)||void 0===d?void 0:d.status)||"Success").toLowerCase()?"bg-green-100 text-green-800":"bg-red-100 text-red-800"),children:"failure"!==((null===(c=p.original.metadata)||void 0===c?void 0:c.status)||"Success").toLowerCase()?"Success":"Failure"})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Start Time:"}),(0,n.jsx)("span",{children:p.original.startTime})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"End Time:"}),(0,n.jsx)("span",{children:p.original.endTime})]}),(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"Duration:"}),(0,n.jsxs)("span",{children:[p.original.duration," s."]})]}),(null===(u=p.original.metadata)||void 0===u?void 0:u.litellm_overhead_time_ms)!==void 0&&(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("span",{className:"font-medium w-1/3",children:"LiteLLM Overhead:"}),(0,n.jsxs)("span",{children:[p.original.metadata.litellm_overhead_time_ms," ms"]})]})]})]})]}),(0,n.jsx)(eC,{costBreakdown:null===(x=p.original.metadata)||void 0===x?void 0:x.cost_breakdown,totalSpend:p.original.spend||0}),(0,n.jsx)(e_,{show:!b&&!N,onOpenSettings:g}),(0,n.jsx)("div",{className:"w-full max-w-full overflow-hidden",children:(0,n.jsx)(eI,{row:p,hasMessages:b,hasResponse:N,hasError:v,errorInfo:y,getRawRequest:()=>{var e;return(null===(e=p.original)||void 0===e?void 0:e.proxy_server_request)?f(p.original.proxy_server_request):f(p.original.messages)},formattedResponse:()=>v&&y?{error:{message:y.error_message||"An error occurred",type:y.error_class||"error",code:y.error_code||"unknown",param:null}}:f(p.original.response)})}),S&&(0,n.jsx)(E,{data:_}),w&&(0,n.jsx)(st,{data:j.vector_store_request_metadata}),v&&y&&(0,n.jsx)(eL,{errorInfo:y}),p.original.request_tags&&Object.keys(p.original.request_tags).length>0&&(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,n.jsx)("div",{className:"flex justify-between items-center p-4 border-b",children:(0,n.jsx)("h3",{className:"text-lg font-medium",children:"Request Tags"})}),(0,n.jsx)("div",{className:"p-4",children:(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(p.original.request_tags).map(e=>{let[s,t]=e;return(0,n.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[s,": ",String(t)]},s)})})})]}),p.original.metadata&&Object.keys(p.original.metadata).length>0&&(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center p-4 border-b",children:[(0,n.jsx)("h3",{className:"text-lg font-medium",children:"Metadata"}),(0,n.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(JSON.stringify(p.original.metadata,null,2))},className:"p-1 hover:bg-gray-200 rounded",title:"Copy metadata",children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,n.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})]}),(0,n.jsx)("div",{className:"p-4 overflow-auto max-h-64",children:(0,n.jsx)("pre",{className:"text-xs font-mono whitespace-pre-wrap break-all",children:JSON.stringify(p.original.metadata,null,2)})})]})]})}}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/7799-a8559d23e5deb5b9.js b/litellm/proxy/_experimental/out/_next/static/chunks/7799-a8559d23e5deb5b9.js
new file mode 100644
index 00000000000..e2b0069f477
--- /dev/null
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/7799-a8559d23e5deb5b9.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7799],{69993:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(1119),n=r(2265),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},i=r(55015),l=n.forwardRef(function(e,t){return n.createElement(i.Z,(0,o.Z)({},e,{ref:t,icon:a}))})},47323:function(e,t,r){r.d(t,{Z:function(){return f}});var o=r(5853),n=r(2265),a=r(47187),i=r(7084),l=r(13241),c=r(1153),s=r(26898);let d={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},u={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},m={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},b=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,c.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,c.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,l.q)((0,c.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,c.bM)(t,s.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.q)((0,c.bM)(t,s.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,c.bM)(t,s.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,l.q)((0,c.bM)(t,s.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},g=(0,c.fn)("Icon"),f=n.forwardRef((e,t)=>{let{icon:r,variant:s="simple",tooltip:f,size:p=i.u8.SM,color:h,className:v}=e,k=(0,o._T)(e,["icon","variant","tooltip","size","color","className"]),w=b(s,h),{tooltipProps:x,getReferenceProps:y}=(0,a.l)();return n.createElement("span",Object.assign({ref:(0,c.lq)([t,x.refs.setReference]),className:(0,l.q)(g("root"),"inline-flex shrink-0 items-center justify-center",w.bgColor,w.textColor,w.borderColor,w.ringColor,m[s].rounded,m[s].border,m[s].shadow,m[s].ring,d[p].paddingX,d[p].paddingY,v)},y,k),n.createElement(a.Z,Object.assign({text:f},x)),n.createElement(r,{className:(0,l.q)(g("icon"),"shrink-0",u[p].height,u[p].width)}))});f.displayName="Icon"},59341:function(e,t,r){r.d(t,{Z:function(){return R}});var o=r(5853),n=r(71049),a=r(11323),i=r(2265),l=r(66797),c=r(40099),s=r(74275),d=r(59456),u=r(93980),m=r(65573),b=r(67561),g=r(87550),f=r(628),p=r(80281),h=r(31370),v=r(20131),k=r(38929),w=r(52307),x=r(52724),y=r(7935);let C=(0,i.createContext)(null);C.displayName="GroupContext";let E=i.Fragment,j=Object.assign((0,k.yV)(function(e,t){var r;let o=(0,i.useId)(),E=(0,p.Q)(),j=(0,g.B)(),{id:O=E||"headlessui-switch-".concat(o),disabled:N=j||!1,checked:S,defaultChecked:M,onChange:Z,name:T,value:R,form:z,autoFocus:L=!1,...B}=e,q=(0,i.useContext)(C),[P,H]=(0,i.useState)(null),I=(0,i.useRef)(null),F=(0,b.T)(I,t,null===q?null:q.setSwitch,H),W=(0,s.L)(M),[D,_]=(0,c.q)(S,Z,null!=W&&W),A=(0,d.G)(),[X,K]=(0,i.useState)(!1),V=(0,u.z)(()=>{K(!0),null==_||_(!D),A.nextFrame(()=>{K(!1)})}),Y=(0,u.z)(e=>{if((0,h.P)(e.currentTarget))return e.preventDefault();e.preventDefault(),V()}),G=(0,u.z)(e=>{e.key===x.R.Space?(e.preventDefault(),V()):e.key===x.R.Enter&&(0,v.g)(e.currentTarget)}),Q=(0,u.z)(e=>e.preventDefault()),$=(0,y.wp)(),U=(0,w.zH)(),{isFocusVisible:J,focusProps:ee}=(0,n.F)({autoFocus:L}),{isHovered:et,hoverProps:er}=(0,a.X)({isDisabled:N}),{pressed:eo,pressProps:en}=(0,l.x)({disabled:N}),ea=(0,i.useMemo)(()=>({checked:D,disabled:N,hover:et,focus:J,active:eo,autofocus:L,changing:X}),[D,et,J,eo,N,X,L]),ei=(0,k.dG)({id:O,ref:F,role:"switch",type:(0,m.f)(e,P),tabIndex:-1===e.tabIndex?0:null!=(r=e.tabIndex)?r:0,"aria-checked":D,"aria-labelledby":$,"aria-describedby":U,disabled:N||void 0,autoFocus:L,onClick:Y,onKeyUp:G,onKeyPress:Q},ee,er,en),el=(0,i.useCallback)(()=>{if(void 0!==W)return null==_?void 0:_(W)},[_,W]),ec=(0,k.L6)();return i.createElement(i.Fragment,null,null!=T&&i.createElement(f.Mt,{disabled:N,data:{[T]:R||"on"},overrides:{type:"checkbox",checked:D},form:z,onReset:el}),ec({ourProps:ei,theirProps:B,slot:ea,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,o]=(0,i.useState)(null),[n,a]=(0,y.bE)(),[l,c]=(0,w.fw)(),s=(0,i.useMemo)(()=>({switch:r,setSwitch:o}),[r,o]),d=(0,k.L6)();return i.createElement(c,{name:"Switch.Description",value:l},i.createElement(a,{name:"Switch.Label",value:n,props:{htmlFor:null==(t=s.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},i.createElement(C.Provider,{value:s},d({ourProps:{},theirProps:e,slot:{},defaultTag:E,name:"Switch.Group"}))))},Label:y.__,Description:w.dk});var O=r(44140),N=r(26898),S=r(13241),M=r(1153),Z=r(47187);let T=(0,M.fn)("Switch"),R=i.forwardRef((e,t)=>{let{checked:r,defaultChecked:n=!1,onChange:a,color:l,name:c,error:s,errorMessage:d,disabled:u,required:m,tooltip:b,id:g}=e,f=(0,o._T)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),p={bgColor:l?(0,M.bM)(l,N.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:l?(0,M.bM)(l,N.K.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[h,v]=(0,O.Z)(n,r),[k,w]=(0,i.useState)(!1),{tooltipProps:x,getReferenceProps:y}=(0,Z.l)(300);return i.createElement("div",{className:"flex flex-row items-center justify-start"},i.createElement(Z.Z,Object.assign({text:b},x)),i.createElement("div",Object.assign({ref:(0,M.lq)([t,x.refs.setReference]),className:(0,S.q)(T("root"),"flex flex-row relative h-5")},f,y),i.createElement("input",{type:"checkbox",className:(0,S.q)(T("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:c,required:m,checked:h,onChange:e=>{e.preventDefault()}}),i.createElement(j,{checked:h,onChange:e=>{v(e),null==a||a(e)},disabled:u,className:(0,S.q)(T("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>w(!0),onBlur:()=>w(!1),id:g},i.createElement("span",{className:(0,S.q)(T("sr-only"),"sr-only")},"Switch ",h?"on":"off"),i.createElement("span",{"aria-hidden":"true",className:(0,S.q)(T("background"),h?p.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),i.createElement("span",{"aria-hidden":"true",className:(0,S.q)(T("round"),h?(0,S.q)(p.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",k?(0,S.q)("ring-2",p.ringColor):"")}))),s&&d?i.createElement("p",{className:(0,S.q)(T("errorMessage"),"text-sm text-red-500 mt-1 ")},d):null)});R.displayName="Switch"},49804:function(e,t,r){r.d(t,{Z:function(){return s}});var o=r(5853),n=r(13241),a=r(1153),i=r(2265),l=r(9496);let c=(0,a.fn)("Col"),s=i.forwardRef((e,t)=>{let{numColSpan:r=1,numColSpanSm:a,numColSpanMd:s,numColSpanLg:d,children:u,className:m}=e,b=(0,o._T)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),g=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return i.createElement("div",Object.assign({ref:t,className:(0,n.q)(c("root"),(()=>{let e=g(r,l.PT),t=g(a,l.SP),o=g(s,l.VS),i=g(d,l._w);return(0,n.q)(e,t,o,i)})(),m)},b),u)});s.displayName="Col"},21626:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(5853),n=r(2265),a=r(13241);let i=(0,r(1153).fn)("Table"),l=n.forwardRef((e,t)=>{let{children:r,className:l}=e,c=(0,o._T)(e,["children","className"]);return n.createElement("div",{className:(0,a.q)(i("root"),"overflow-auto",l)},n.createElement("table",Object.assign({ref:t,className:(0,a.q)(i("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},c),r))});l.displayName="Table"},97214:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(5853),n=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableBody"),l=n.forwardRef((e,t)=>{let{children:r,className:l}=e,c=(0,o._T)(e,["children","className"]);return n.createElement(n.Fragment,null,n.createElement("tbody",Object.assign({ref:t,className:(0,a.q)(i("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",l)},c),r))});l.displayName="TableBody"},28241:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(5853),n=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableCell"),l=n.forwardRef((e,t)=>{let{children:r,className:l}=e,c=(0,o._T)(e,["children","className"]);return n.createElement(n.Fragment,null,n.createElement("td",Object.assign({ref:t,className:(0,a.q)(i("root"),"align-middle whitespace-nowrap text-left p-4",l)},c),r))});l.displayName="TableCell"},58834:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(5853),n=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableHead"),l=n.forwardRef((e,t)=>{let{children:r,className:l}=e,c=(0,o._T)(e,["children","className"]);return n.createElement(n.Fragment,null,n.createElement("thead",Object.assign({ref:t,className:(0,a.q)(i("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",l)},c),r))});l.displayName="TableHead"},69552:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(5853),n=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableHeaderCell"),l=n.forwardRef((e,t)=>{let{children:r,className:l}=e,c=(0,o._T)(e,["children","className"]);return n.createElement(n.Fragment,null,n.createElement("th",Object.assign({ref:t,className:(0,a.q)(i("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content-strong","dark:text-dark-tremor-content-strong",l)},c),r))});l.displayName="TableHeaderCell"},71876:function(e,t,r){r.d(t,{Z:function(){return l}});var o=r(5853),n=r(2265),a=r(13241);let i=(0,r(1153).fn)("TableRow"),l=n.forwardRef((e,t)=>{let{children:r,className:l}=e,c=(0,o._T)(e,["children","className"]);return n.createElement(n.Fragment,null,n.createElement("tr",Object.assign({ref:t,className:(0,a.q)(i("row"),l)},c),r))});l.displayName="TableRow"},33866:function(e,t,r){r.d(t,{Z:function(){return z}});var o=r(2265),n=r(36760),a=r.n(n),i=r(66632),l=r(93350),c=r(19722),s=r(71744),d=r(93463),u=r(12918),m=r(18536),b=r(71140),g=r(99320);let f=new d.E4("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),p=new d.E4("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),h=new d.E4("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),v=new d.E4("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),k=new d.E4("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),w=new d.E4("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),x=e=>{let{componentCls:t,iconCls:r,antCls:o,badgeShadowSize:n,textFontSize:a,textFontSizeSM:i,statusSize:l,dotSize:c,textFontWeight:s,indicatorHeight:b,indicatorHeightSM:g,marginXS:x,calc:y}=e,C="".concat(o,"-scroll-number"),E=(0,m.Z)(e,(e,r)=>{let{darkColor:o}=r;return{["&".concat(t," ").concat(t,"-color-").concat(e)]:{background:o,["&:not(".concat(t,"-count)")]:{color:o},"a:hover &":{background:o}}}});return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.Wf)(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,["".concat(t,"-count")]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:b,height:b,color:e.badgeTextColor,fontWeight:s,fontSize:a,lineHeight:(0,d.bf)(b),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:y(b).div(2).equal(),boxShadow:"0 0 0 ".concat((0,d.bf)(n)," ").concat(e.badgeShadowColor),transition:"background ".concat(e.motionDurationMid),a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},["".concat(t,"-count-sm")]:{minWidth:g,height:g,fontSize:i,lineHeight:(0,d.bf)(g),borderRadius:y(g).div(2).equal()},["".concat(t,"-multiple-words")]:{padding:"0 ".concat((0,d.bf)(e.paddingXS)),bdi:{unicodeBidi:"plaintext"}},["".concat(t,"-dot")]:{zIndex:e.indicatorZIndex,width:c,minWidth:c,height:c,background:e.badgeColor,borderRadius:"100%",boxShadow:"0 0 0 ".concat((0,d.bf)(n)," ").concat(e.badgeShadowColor)},["".concat(t,"-count, ").concat(t,"-dot, ").concat(C,"-custom-component")]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",["&".concat(r,"-spin")]:{animationName:w,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},["&".concat(t,"-status")]:{lineHeight:"inherit",verticalAlign:"baseline",["".concat(t,"-status-dot")]:{position:"relative",top:-1,display:"inline-block",width:l,height:l,verticalAlign:"middle",borderRadius:"50%"},["".concat(t,"-status-success")]:{backgroundColor:e.colorSuccess},["".concat(t,"-status-processing")]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:n,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:f,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},["".concat(t,"-status-default")]:{backgroundColor:e.colorTextPlaceholder},["".concat(t,"-status-error")]:{backgroundColor:e.colorError},["".concat(t,"-status-warning")]:{backgroundColor:e.colorWarning},["".concat(t,"-status-text")]:{marginInlineStart:x,color:e.colorText,fontSize:e.fontSize}}}),E),{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:p,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["".concat(t,"-zoom-leave")]:{animationName:h,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},["&".concat(t,"-not-a-wrapper")]:{["".concat(t,"-zoom-appear, ").concat(t,"-zoom-enter")]:{animationName:v,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["".concat(t,"-zoom-leave")]:{animationName:k,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},["&:not(".concat(t,"-status)")]:{verticalAlign:"middle"},["".concat(C,"-custom-component, ").concat(t,"-count")]:{transform:"none"},["".concat(C,"-custom-component, ").concat(C)]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[C]:{overflow:"hidden",transition:"all ".concat(e.motionDurationMid," ").concat(e.motionEaseOutBack),["".concat(C,"-only")]:{position:"relative",display:"inline-block",height:b,transition:"all ".concat(e.motionDurationSlow," ").concat(e.motionEaseOutBack),WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",["> p".concat(C,"-only-unit")]:{height:b,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},["".concat(C,"-symbol")]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",["".concat(t,"-count, ").concat(t,"-dot, ").concat(C,"-custom-component")]:{transform:"translate(-50%, -50%)"}}})}},y=e=>{let{fontHeight:t,lineWidth:r,marginXS:o,colorBorderBg:n}=e,a=e.colorTextLightSolid,i=e.colorError,l=e.colorErrorHover;return(0,b.IX)(e,{badgeFontHeight:t,badgeShadowSize:r,badgeTextColor:a,badgeColor:i,badgeColorHover:l,badgeShadowColor:n,badgeProcessingDuration:"1.2s",badgeRibbonOffset:o,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},C=e=>{let{fontSize:t,lineHeight:r,fontSizeSM:o,lineWidth:n}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*r)-2*n,indicatorHeightSM:t,dotSize:o/2,textFontSize:o,textFontSizeSM:o,textFontWeight:"normal",statusSize:o/2}};var E=(0,g.I$)("Badge",e=>x(y(e)),C);let j=e=>{let{antCls:t,badgeFontHeight:r,marginXS:o,badgeRibbonOffset:n,calc:a}=e,i="".concat(t,"-ribbon"),l=(0,m.Z)(e,(e,t)=>{let{darkColor:r}=t;return{["&".concat(i,"-color-").concat(e)]:{background:r,color:r}}});return{["".concat(t,"-ribbon-wrapper")]:{position:"relative"},[i]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,u.Wf)(e)),{position:"absolute",top:o,padding:"0 ".concat((0,d.bf)(e.paddingXS)),color:e.colorPrimary,lineHeight:(0,d.bf)(r),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,["".concat(i,"-text")]:{color:e.badgeTextColor},["".concat(i,"-corner")]:{position:"absolute",top:"100%",width:n,height:n,color:"currentcolor",border:"".concat((0,d.bf)(a(n).div(2).equal())," solid"),transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),l),{["&".concat(i,"-placement-end")]:{insetInlineEnd:a(n).mul(-1).equal(),borderEndEndRadius:0,["".concat(i,"-corner")]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},["&".concat(i,"-placement-start")]:{insetInlineStart:a(n).mul(-1).equal(),borderEndStartRadius:0,["".concat(i,"-corner")]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}};var O=(0,g.I$)(["Badge","Ribbon"],e=>j(y(e)),C);let N=e=>{let t;let{prefixCls:r,value:n,current:i,offset:l=0}=e;return l&&(t={position:"absolute",top:"".concat(l,"00%"),left:0}),o.createElement("span",{style:t,className:a()("".concat(r,"-only-unit"),{current:i})},n)};var S=e=>{let t,r;let{prefixCls:n,count:a,value:i}=e,l=Number(i),c=Math.abs(a),[s,d]=o.useState(l),[u,m]=o.useState(c),b=()=>{d(l),m(c)};if(o.useEffect(()=>{let e=setTimeout(b,1e3);return()=>clearTimeout(e)},[l]),s===l||Number.isNaN(l)||Number.isNaN(s))t=[o.createElement(N,Object.assign({},e,{key:l,current:!0}))],r={transition:"none"};else{t=[];let n=l+10,a=[];for(let e=l;e<=n;e+=1)a.push(e);let i=ue%10===s);t=(i<0?a.slice(0,d+1):a.slice(d)).map((t,r)=>o.createElement(N,Object.assign({},e,{key:t,value:t%10,offset:i<0?r-d:r,current:r===d}))),r={transform:"translateY(".concat(-function(e,t,r){let o=e,n=0;for(;(o+10)%10!==t;)o+=r,n+=r;return n}(s,l,i),"00%)")}}return o.createElement("span",{className:"".concat(n,"-only"),style:r,onTransitionEnd:b},t)},M=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let Z=o.forwardRef((e,t)=>{let{prefixCls:r,count:n,className:i,motionClassName:l,style:d,title:u,show:m,component:b="sup",children:g}=e,f=M(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:p}=o.useContext(s.E_),h=p("scroll-number",r),v=Object.assign(Object.assign({},f),{"data-show":m,style:d,className:a()(h,i,l),title:u}),k=n;if(n&&Number(n)%1==0){let e=String(n).split("");k=o.createElement("bdi",null,e.map((t,r)=>o.createElement(S,{prefixCls:h,count:Number(n),value:t,key:e.length-r})))}return((null==d?void 0:d.borderColor)&&(v.style=Object.assign(Object.assign({},d),{boxShadow:"0 0 0 1px ".concat(d.borderColor," inset")})),g)?(0,c.Tm)(g,e=>({className:a()("".concat(h,"-custom-component"),null==e?void 0:e.className,l)})):o.createElement(b,Object.assign({},v,{ref:t}),k)});var T=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);nt.indexOf(o[n])&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r};let R=o.forwardRef((e,t)=>{var r,n,d,u,m;let{prefixCls:b,scrollNumberPrefixCls:g,children:f,status:p,text:h,color:v,count:k=null,overflowCount:w=99,dot:x=!1,size:y="default",title:C,offset:j,style:O,className:N,rootClassName:S,classNames:M,styles:R,showZero:z=!1}=e,L=T(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:B,direction:q,badge:P}=o.useContext(s.E_),H=B("badge",b),[I,F,W]=E(H),D=k>w?"".concat(w,"+"):k,_="0"===D||0===D||"0"===h||0===h,A=null===k||_&&!z,X=(null!=p||null!=v)&&A,K=null!=p||!_,V=x&&!_,Y=V?"":D,G=(0,o.useMemo)(()=>((null==Y||""===Y)&&(null==h||""===h)||_&&!z)&&!V,[Y,_,z,V,h]),Q=(0,o.useRef)(k);G||(Q.current=k);let $=Q.current,U=(0,o.useRef)(Y);G||(U.current=Y);let J=U.current,ee=(0,o.useRef)(V);G||(ee.current=V);let et=(0,o.useMemo)(()=>{if(!j)return Object.assign(Object.assign({},null==P?void 0:P.style),O);let e={marginTop:j[1]};return"rtl"===q?e.left=Number.parseInt(j[0],10):e.right=-Number.parseInt(j[0],10),Object.assign(Object.assign(Object.assign({},e),null==P?void 0:P.style),O)},[q,j,O,null==P?void 0:P.style]),er=null!=C?C:"string"==typeof $||"number"==typeof $?$:void 0,eo=!G&&(0===h?z:!!h&&!0!==h),en=eo?o.createElement("span",{className:"".concat(H,"-status-text")},h):null,ea=$&&"object"==typeof $?(0,c.Tm)($,e=>({style:Object.assign(Object.assign({},et),e.style)})):void 0,ei=(0,l.o2)(v,!1),el=a()(null==M?void 0:M.indicator,null===(r=null==P?void 0:P.classNames)||void 0===r?void 0:r.indicator,{["".concat(H,"-status-dot")]:X,["".concat(H,"-status-").concat(p)]:!!p,["".concat(H,"-color-").concat(v)]:ei}),ec={};v&&!ei&&(ec.color=v,ec.background=v);let es=a()(H,{["".concat(H,"-status")]:X,["".concat(H,"-not-a-wrapper")]:!f,["".concat(H,"-rtl")]:"rtl"===q},N,S,null==P?void 0:P.className,null===(n=null==P?void 0:P.classNames)||void 0===n?void 0:n.root,null==M?void 0:M.root,F,W);if(!f&&X&&(h||K||!A)){let e=et.color;return I(o.createElement("span",Object.assign({},L,{className:es,style:Object.assign(Object.assign(Object.assign({},null==R?void 0:R.root),null===(d=null==P?void 0:P.styles)||void 0===d?void 0:d.root),et)}),o.createElement("span",{className:el,style:Object.assign(Object.assign(Object.assign({},null==R?void 0:R.indicator),null===(u=null==P?void 0:P.styles)||void 0===u?void 0:u.indicator),ec)}),eo&&o.createElement("span",{style:{color:e},className:"".concat(H,"-status-text")},h)))}return I(o.createElement("span",Object.assign({ref:t},L,{className:es,style:Object.assign(Object.assign({},null===(m=null==P?void 0:P.styles)||void 0===m?void 0:m.root),null==R?void 0:R.root)}),f,o.createElement(i.ZP,{visible:!G,motionName:"".concat(H,"-zoom"),motionAppear:!1,motionDeadline:1e3},e=>{var t,r;let{className:n}=e,i=B("scroll-number",g),l=ee.current,c=a()(null==M?void 0:M.indicator,null===(t=null==P?void 0:P.classNames)||void 0===t?void 0:t.indicator,{["".concat(H,"-dot")]:l,["".concat(H,"-count")]:!l,["".concat(H,"-count-sm")]:"small"===y,["".concat(H,"-multiple-words")]:!l&&J&&J.toString().length>1,["".concat(H,"-status-").concat(p)]:!!p,["".concat(H,"-color-").concat(v)]:ei}),s=Object.assign(Object.assign(Object.assign({},null==R?void 0:R.indicator),null===(r=null==P?void 0:P.styles)||void 0===r?void 0:r.indicator),et);return v&&!ei&&((s=s||{}).background=v),o.createElement(Z,{prefixCls:i,show:!G,motionClassName:n,className:c,count:J,title:er,style:s,key:"scrollNumber"},ea)}),en))});R.Ribbon=e=>{let{className:t,prefixCls:r,style:n,color:i,children:c,text:d,placement:u="end",rootClassName:m}=e,{getPrefixCls:b,direction:g}=o.useContext(s.E_),f=b("ribbon",r),p="".concat(f,"-wrapper"),[h,v,k]=O(f,p),w=(0,l.o2)(i,!1),x=a()(f,"".concat(f,"-placement-").concat(u),{["".concat(f,"-rtl")]:"rtl"===g,["".concat(f,"-color-").concat(i)]:w},t),y={},C={};return i&&!w&&(y.background=i,C.color=i),h(o.createElement("div",{className:a()(p,m,v,k)},c,o.createElement("div",{className:a()(x,v),style:Object.assign(Object.assign({},y),n)},o.createElement("span",{className:"".concat(f,"-text")},d),o.createElement("div",{className:"".concat(f,"-corner"),style:C}))))};var z=R},2651:function(e,t,r){r.d(t,{Z:function(){return k}});var o=r(93463),n=r(11938),a=r(70774),i=r(73602),l=r(91691),c=r(25119),s=r(37628),d=r(32417),u=r(4877),m=r(57943),b=r(12789),g=r(54558);let f=(e,t)=>new g.t(e).setA(t).toRgbString(),p=(e,t)=>new g.t(e).lighten(t).toHexString(),h=e=>{let t=(0,m.R_)(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},v=(e,t)=>{let r=e||"#000",o=t||"#fff";return{colorBgBase:r,colorTextBase:o,colorText:f(o,.85),colorTextSecondary:f(o,.65),colorTextTertiary:f(o,.45),colorTextQuaternary:f(o,.25),colorFill:f(o,.18),colorFillSecondary:f(o,.12),colorFillTertiary:f(o,.08),colorFillQuaternary:f(o,.04),colorBgSolid:f(o,.95),colorBgSolidHover:f(o,1),colorBgSolidActive:f(o,.9),colorBgElevated:p(r,12),colorBgContainer:p(r,8),colorBgLayout:p(r,0),colorBgSpotlight:p(r,26),colorBgBlur:f(o,.04),colorBorder:p(r,26),colorBorderSecondary:p(r,19)}};var k={defaultSeed:c.u_.token,useToken:function(){let[e,t,r]=(0,l.ZP)();return{theme:e,token:t,hashId:r}},defaultAlgorithm:s.Z,darkAlgorithm:(e,t)=>{let r=Object.keys(a.M).map(t=>{let r=(0,m.R_)(e[t],{theme:"dark"});return Array.from({length:10},()=>1).reduce((e,o,n)=>(e["".concat(t,"-").concat(n+1)]=r[n],e["".concat(t).concat(n+1)]=r[n],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{}),o=null!=t?t:(0,s.Z)(e),n=(0,b.Z)(e,{generateColorPalettes:h,generateNeutralColorPalettes:v});return Object.assign(Object.assign(Object.assign(Object.assign({},o),r),n),{colorPrimaryBg:n.colorPrimaryBorder,colorPrimaryBgHover:n.colorPrimaryBorderHover})},compactAlgorithm:(e,t)=>{let r=null!=t?t:(0,s.Z)(e),o=r.fontSizeSM,n=r.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),function(e){let{sizeUnit:t,sizeStep:r}=e,o=r-2;return{sizeXXL:t*(o+10),sizeXL:t*(o+6),sizeLG:t*(o+2),sizeMD:t*(o+2),sizeMS:t*(o+1),size:t*o,sizeSM:t*o,sizeXS:t*(o-1),sizeXXS:t*(o-1)}}(null!=t?t:e)),(0,u.Z)(o)),{controlHeight:n}),(0,d.Z)(Object.assign(Object.assign({},r),{controlHeight:n})))},getDesignToken:e=>{let t=(null==e?void 0:e.algorithm)?(0,o.jG)(e.algorithm):n.Z,r=Object.assign(Object.assign({},a.Z),null==e?void 0:e.token);return(0,o.t2)(r,{override:null==e?void 0:e.token},t,i.Z)},defaultConfig:c.u_,_internalContext:c.Mj}},15051:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},49322:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},3577:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]])},99397:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},69076:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},73247:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},92369:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},32489:function(e,t,r){r.d(t,{Z:function(){return o}});let o=(0,r(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},10900:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});t.Z=n},91777:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});t.Z=n},47686:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});t.Z=n},82182:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});t.Z=n},79814:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))});t.Z=n},3477:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});t.Z=n},53410:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});t.Z=n},93416:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});t.Z=n},91126:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=n},77355:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=n},22452:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});t.Z=n},25327:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))});t.Z=n},3497:function(e,t,r){var o=r(2265);let n=o.forwardRef(function(e,t){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"}))});t.Z=n}}]);
\ No newline at end of file
diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/2409-43d87f56841bda3f.js b/litellm/proxy/_experimental/out/_next/static/chunks/7840-0952e7293502ce83.js
similarity index 78%
rename from litellm/proxy/_experimental/out/_next/static/chunks/2409-43d87f56841bda3f.js
rename to litellm/proxy/_experimental/out/_next/static/chunks/7840-0952e7293502ce83.js
index 779c52c12a6..24564bbd43a 100644
--- a/litellm/proxy/_experimental/out/_next/static/chunks/2409-43d87f56841bda3f.js
+++ b/litellm/proxy/_experimental/out/_next/static/chunks/7840-0952e7293502ce83.js
@@ -1 +1 @@
-(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2409],{23639:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1119),o=n(2265),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},a=n(55015),i=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:l}))})},13377:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1119),o=n(2265),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},a=n(55015),i=o.forwardRef(function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:l}))})},92237:function(e,t,n){"use strict";n.d(t,{Z:function(){return Q}});var r=n(83145),o=n(2265),l=n(13377),a=n(36760),i=n.n(a),c=n(31474),s=n(45287),u=n(27380),d=n(50506),p=n(18694),f=n(28791),m=n(10281),g=n(71744),b=n(55274),y=n(99981),v=n(1119),h={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},x=n(55015),O=o.forwardRef(function(e,t){return o.createElement(x.Z,(0,v.Z)({},e,{ref:t,icon:h}))}),w=n(95814),E=n(19722),S=n(34766),j=n(72801),k=e=>{let{prefixCls:t,"aria-label":n,className:r,style:l,direction:a,maxLength:c,autoSize:s=!0,value:u,onSave:d,onCancel:p,onEnd:f,component:m,enterIcon:g=o.createElement(O,null)}=e,b=o.useRef(null),y=o.useRef(!1),v=o.useRef(null),[h,x]=o.useState(u);o.useEffect(()=>{x(u)},[u]),o.useEffect(()=>{var e;if(null===(e=b.current)||void 0===e?void 0:e.resizableTextArea){let{textArea:e}=b.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let k=()=>{d(h.trim())},[C,Z,R]=(0,j.Z)(t),I=i()(t,"".concat(t,"-edit-content"),{["".concat(t,"-rtl")]:"rtl"===a,["".concat(t,"-").concat(m)]:!!m},r,Z,R);return C(o.createElement("div",{className:I,style:l},o.createElement(S.Z,{ref:b,maxLength:c,value:h,onChange:e=>{let{target:t}=e;x(t.value.replace(/[\n\r]/g,""))},onKeyDown:e=>{let{keyCode:t}=e;y.current||(v.current=t)},onKeyUp:e=>{let{keyCode:t,ctrlKey:n,altKey:r,metaKey:o,shiftKey:l}=e;v.current!==t||y.current||n||r||o||l||(t===w.Z.ENTER?(k(),null==f||f()):t===w.Z.ESC&&p())},onCompositionStart:()=>{y.current=!0},onCompositionEnd:()=>{y.current=!1},onBlur:()=>{k()},"aria-label":n,rows:1,autoSize:s}),null!==g?(0,E.Tm)(g,{className:"".concat(t,"-edit-content-confirm")}):null))},C=n(49211),Z=n.n(C),R=n(58525),I=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t&&null==e?[]:Array.isArray(e)?e:[e]},T=e=>{let{copyConfig:t,children:n}=e,[r,l]=o.useState(!1),[a,i]=o.useState(!1),c=o.useRef(null),s=()=>{c.current&&clearTimeout(c.current)},u={};return t.format&&(u.format=t.format),o.useEffect(()=>s,[]),{copied:r,copyLoading:a,onClick:(0,R.Z)(e=>{var r,o,a,d;return r=void 0,o=void 0,a=void 0,d=function*(){var r;null==e||e.preventDefault(),null==e||e.stopPropagation(),i(!0);try{let o="function"==typeof t.text?yield t.text():t.text;Z()(o||I(n,!0).join("")||"",u),i(!1),l(!0),s(),c.current=setTimeout(()=>{l(!1)},3e3),null===(r=t.onCopy)||void 0===r||r.call(t,e)}catch(e){throw i(!1),e}},new(a||(a=Promise))(function(e,t){function n(e){try{i(d.next(e))}catch(e){t(e)}}function l(e){try{i(d.throw(e))}catch(e){t(e)}}function i(t){var r;t.done?e(t.value):((r=t.value)instanceof a?r:new a(function(e){e(r)})).then(n,l)}i((d=d.apply(r,o||[])).next())})})}};function D(e,t){return o.useMemo(()=>{let n=!!e;return[n,Object.assign(Object.assign({},t),n&&"object"==typeof e?e:null)]},[e])}var H=e=>{let t=(0,o.useRef)(void 0);return(0,o.useEffect)(()=>{t.current=e}),t.current},M=(e,t,n)=>(0,o.useMemo)(()=>!0===e?{title:null!=t?t:n}:(0,o.isValidElement)(e)?{title:e}:"object"==typeof e?Object.assign({title:null!=t?t:n},e):{title:e},[e,t,n]),P=n(55056),z=n(9738),B=n(23639),A=n(61935);function N(e){return!1===e?[!1,!1]:Array.isArray(e)?e:[e]}function L(e,t,n){return!0===e||void 0===e?t:e||n&&t}let W=e=>["string","number"].includes(typeof e);var F=e=>{let{prefixCls:t,copied:n,locale:r,iconOnly:l,tooltips:a,icon:c,tabIndex:s,onCopy:u,loading:d}=e,p=N(a),f=N(c),{copied:m,copy:g}=null!=r?r:{},b=n?m:g,v=L(p[n?1:0],b),h="string"==typeof v?v:b;return o.createElement(y.Z,{title:v},o.createElement("button",{type:"button",className:i()("".concat(t,"-copy"),{["".concat(t,"-copy-success")]:n,["".concat(t,"-copy-icon-only")]:l}),onClick:u,"aria-label":h,tabIndex:s},n?L(f[1],o.createElement(z.Z,null),!0):L(f[0],d?o.createElement(A.Z,null):o.createElement(B.Z,null),!0)))};let U=o.forwardRef((e,t)=>{let{style:n,children:r}=e,l=o.useRef(null);return o.useImperativeHandle(t,()=>({isExceed:()=>{let e=l.current;return e.scrollHeight>e.clientHeight},getHeight:()=>l.current.clientHeight})),o.createElement("span",{"aria-hidden":!0,ref:l,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},n)},r)}),V=e=>e.reduce((e,t)=>e+(W(t)?String(t).length:1),0);function _(e,t){let n=0,r=[];for(let o=0;ot){let e=t-n;return r.push(String(l).slice(0,e)),r}r.push(l),n=a}return e}let q={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function $(e){let{enableMeasure:t,width:n,text:l,children:a,rows:i,expanded:c,miscDeps:d,onEllipsis:p}=e,f=o.useMemo(()=>(0,s.Z)(l),[l]),m=o.useMemo(()=>V(f),[l]),g=o.useMemo(()=>a(f,!1),[l]),[b,y]=o.useState(null),v=o.useRef(null),h=o.useRef(null),x=o.useRef(null),O=o.useRef(null),w=o.useRef(null),[E,S]=o.useState(!1),[j,k]=o.useState(0),[C,Z]=o.useState(0),[R,I]=o.useState(null);(0,u.Z)(()=>{t&&n&&m?k(1):k(0)},[n,l,i,t,f]),(0,u.Z)(()=>{var e,t,n,r;if(1===j)k(2),I(h.current&&getComputedStyle(h.current).whiteSpace);else if(2===j){let o=!!(null===(e=x.current)||void 0===e?void 0:e.isExceed());k(o?3:4),y(o?[0,m]:null),S(o);let l=(null===(t=x.current)||void 0===t?void 0:t.getHeight())||0;Z(Math.max(l,(1===i?0:(null===(n=O.current)||void 0===n?void 0:n.getHeight())||0)+((null===(r=w.current)||void 0===r?void 0:r.getHeight())||0))+1),p(o)}},[j]);let T=b?Math.ceil((b[0]+b[1])/2):0;(0,u.Z)(()=>{var e;let[t,n]=b||[0,0];if(t!==n){let r=((null===(e=v.current)||void 0===e?void 0:e.getHeight())||0)>C,o=T;n-t==1&&(o=r?t:n),y(r?[t,o]:[o,n])}},[b,T]);let D=o.useMemo(()=>{if(!t)return a(f,!1);if(3!==j||!b||b[0]!==b[1]){let e=a(f,!1);return[4,0].includes(j)?e:o.createElement("span",{style:Object.assign(Object.assign({},q),{WebkitLineClamp:i})},e)}return a(c?f:_(f,b[0]),E)},[c,j,b,f].concat((0,r.Z)(d))),H={width:n,margin:0,padding:0,whiteSpace:"nowrap"===R?"normal":"inherit"};return o.createElement(o.Fragment,null,D,2===j&&o.createElement(o.Fragment,null,o.createElement(U,{style:Object.assign(Object.assign(Object.assign({},H),q),{WebkitLineClamp:i}),ref:x},g),o.createElement(U,{style:Object.assign(Object.assign(Object.assign({},H),q),{WebkitLineClamp:i-1}),ref:O},g),o.createElement(U,{style:Object.assign(Object.assign(Object.assign({},H),q),{WebkitLineClamp:1}),ref:w},a([],!0))),3===j&&b&&b[0]!==b[1]&&o.createElement(U,{style:Object.assign(Object.assign({},H),{top:400}),ref:v},a(_(f,T),!0)),1===j&&o.createElement("span",{style:{whiteSpace:"inherit"},ref:h}))}var X=e=>{let{enableEllipsis:t,isEllipsis:n,children:r,tooltipProps:l}=e;return(null==l?void 0:l.title)&&t?o.createElement(y.Z,Object.assign({open:!!n&&void 0},l),r):r},G=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let K=["delete","mark","code","underline","strong","keyboard","italic"];var Q=o.forwardRef((e,t)=>{var n;let{prefixCls:a,className:v,style:h,type:x,disabled:O,children:w,ellipsis:E,editable:S,copyable:j,component:C,title:Z}=e,R=G(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:I,direction:z}=o.useContext(g.E_),[B]=(0,b.Z)("Text"),A=o.useRef(null),N=o.useRef(null),L=I("typography",a),U=(0,p.Z)(R,K),[V,_]=D(S),[q,Q]=(0,d.Z)(!1,{value:_.editing}),{triggerType:J=["icon"]}=_,Y=e=>{var t;e&&(null===(t=_.onStart)||void 0===t||t.call(_)),Q(e)},ee=H(q);(0,u.Z)(()=>{var e;!q&&ee&&(null===(e=N.current)||void 0===e||e.focus())},[q]);let et=e=>{null==e||e.preventDefault(),Y(!0)},[en,er]=D(j),{copied:eo,copyLoading:el,onClick:ea}=T({copyConfig:er,children:w}),[ei,ec]=o.useState(!1),[es,eu]=o.useState(!1),[ed,ep]=o.useState(!1),[ef,em]=o.useState(!1),[eg,eb]=o.useState(!0),[ey,ev]=D(E,{expandable:!1,symbol:e=>e?null==B?void 0:B.collapse:null==B?void 0:B.expand}),[eh,ex]=(0,d.Z)(ev.defaultExpanded||!1,{value:ev.expanded}),eO=ey&&(!eh||"collapsible"===ev.expandable),{rows:ew=1}=ev,eE=o.useMemo(()=>eO&&(void 0!==ev.suffix||ev.onEllipsis||ev.expandable||V||en),[eO,ev,V,en]);(0,u.Z)(()=>{ey&&!eE&&(ec((0,m.G)("webkitLineClamp")),eu((0,m.G)("textOverflow")))},[eE,ey]);let[eS,ej]=o.useState(eO),ek=o.useMemo(()=>!eE&&(1===ew?es:ei),[eE,es,ei]);(0,u.Z)(()=>{ej(ek&&eO)},[ek,eO]);let eC=eO&&(eS?ef:ed),eZ=eO&&1===ew&&eS,eR=eO&&ew>1&&eS,eI=(e,t)=>{var n;ex(t.expanded),null===(n=ev.onExpand)||void 0===n||n.call(ev,e,t)},[eT,eD]=o.useState(0),eH=e=>{var t;ep(e),ed!==e&&(null===(t=ev.onEllipsis)||void 0===t||t.call(ev,e))};o.useEffect(()=>{let e=A.current;if(ey&&eS&&e){let t=function(e){let t=document.createElement("em");e.appendChild(t);let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}(e);ef!==t&&em(t)}},[ey,eS,w,eR,eg,eT]),o.useEffect(()=>{let e=A.current;if("undefined"==typeof IntersectionObserver||!e||!eS||!eO)return;let t=new IntersectionObserver(()=>{eb(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[eS,eO]);let eM=M(ev.tooltip,_.text,w),eP=o.useMemo(()=>{if(ey&&!eS)return[_.text,w,Z,eM.title].find(W)},[ey,eS,Z,eM.title,eC]);if(q)return o.createElement(k,{value:null!==(n=_.text)&&void 0!==n?n:"string"==typeof w?w:"",onSave:e=>{var t;null===(t=_.onChange)||void 0===t||t.call(_,e),Y(!1)},onCancel:()=>{var e;null===(e=_.onCancel)||void 0===e||e.call(_),Y(!1)},onEnd:_.onEnd,prefixCls:L,className:v,style:h,direction:z,component:C,maxLength:_.maxLength,autoSize:_.autoSize,enterIcon:_.enterIcon});let ez=()=>{let{expandable:e,symbol:t}=ev;return e?o.createElement("button",{type:"button",key:"expand",className:"".concat(L,"-").concat(eh?"collapse":"expand"),onClick:e=>eI(e,{expanded:!eh}),"aria-label":eh?B.collapse:null==B?void 0:B.expand},"function"==typeof t?t(eh):t):null},eB=()=>{if(!V)return;let{icon:e,tooltip:t,tabIndex:n}=_,r=(0,s.Z)(t)[0]||(null==B?void 0:B.edit),a="string"==typeof r?r:"";return J.includes("icon")?o.createElement(y.Z,{key:"edit",title:!1===t?"":r},o.createElement("button",{type:"button",ref:N,className:"".concat(L,"-edit"),onClick:et,"aria-label":a,tabIndex:n},e||o.createElement(l.Z,{role:"button"}))):null},eA=()=>en?o.createElement(F,Object.assign({key:"copy"},er,{prefixCls:L,copied:eo,locale:B,onCopy:ea,loading:el,iconOnly:null==w})):null,eN=e=>[e&&ez(),eB(),eA()],eL=e=>[e&&!eh&&o.createElement("span",{"aria-hidden":!0,key:"ellipsis"},"..."),ev.suffix,eN(e)];return o.createElement(c.Z,{onResize:e=>{let{offsetWidth:t}=e;eD(t)},disabled:!eO},n=>o.createElement(X,{tooltipProps:eM,enableEllipsis:eO,isEllipsis:eC},o.createElement(P.Z,Object.assign({className:i()({["".concat(L,"-").concat(x)]:x,["".concat(L,"-disabled")]:O,["".concat(L,"-ellipsis")]:ey,["".concat(L,"-ellipsis-single-line")]:eZ,["".concat(L,"-ellipsis-multiple-line")]:eR},v),prefixCls:a,style:Object.assign(Object.assign({},h),{WebkitLineClamp:eR?ew:void 0}),component:C,ref:(0,f.sQ)(n,A,t),direction:z,onClick:J.includes("text")?et:void 0,"aria-label":null==eP?void 0:eP.toString(),title:Z},U),o.createElement($,{enableMeasure:eO&&!eS,text:w,rows:ew,width:eT,onEllipsis:eH,expanded:eh,miscDeps:[eo,eh,el,V,en,B].concat((0,r.Z)(K.map(t=>e[t])))},(t,n)=>(function(e,t){let{mark:n,code:r,underline:l,delete:a,strong:i,keyboard:c,italic:s}=e,u=t;function d(e,t){t&&(u=o.createElement(e,{},u))}return d("strong",i),d("u",l),d("del",a),d("code",r),d("mark",n),d("kbd",c),d("i",s),u})(e,o.createElement(o.Fragment,null,t.length>0&&n&&!eh&&eP?o.createElement("span",{key:"show-content","aria-hidden":!0},t):t,eL(n)))))))})},6833:function(e,t,n){"use strict";var r=n(2265),o=n(92237),l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let a=[1,2,3,4,5],i=r.forwardRef((e,t)=>{let{level:n=1,children:i}=e,c=l(e,["level","children"]),s=a.includes(n)?"h".concat(n):"h1";return r.createElement(o.Z,Object.assign({ref:t},c,{component:s}),i)});t.Z=i},55056:function(e,t,n){"use strict";var r=n(2265),o=n(36760),l=n.n(o),a=n(28791),i=n(71744),c=n(72801),s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o