promptfoo 0.71.1 → 0.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +1 -1
- package/dist/src/constants.d.ts +1 -0
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.js +6 -1
- package/dist/src/constants.js.map +1 -1
- package/dist/src/providers/manualInput.d.ts +15 -0
- package/dist/src/providers/manualInput.d.ts.map +1 -0
- package/dist/src/providers/manualInput.js +52 -0
- package/dist/src/providers/manualInput.js.map +1 -0
- package/dist/src/providers/mistral.d.ts.map +1 -1
- package/dist/src/providers/mistral.js +7 -0
- package/dist/src/providers/mistral.js.map +1 -1
- package/dist/src/providers.d.ts.map +1 -1
- package/dist/src/providers.js +8 -4
- package/dist/src/providers.js.map +1 -1
- package/dist/src/redteam/plugins/harmful.d.ts.map +1 -1
- package/dist/src/redteam/plugins/harmful.js +20 -17
- package/dist/src/redteam/plugins/harmful.js.map +1 -1
- package/dist/src/redteam/providers/iterative.js +1 -1
- package/dist/src/redteam/providers/iterative.js.map +1 -1
- package/dist/src/redteam/providers/iterativeImage.js +1 -1
- package/dist/src/redteam/providers/iterativeImage.js.map +1 -1
- package/dist/src/types.d.ts +2 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/updates.d.ts.map +1 -1
- package/dist/src/updates.js +2 -4
- package/dist/src/updates.js.map +1 -1
- package/dist/src/util/index.d.ts +1 -1
- package/dist/src/util/index.d.ts.map +1 -1
- package/dist/src/util/index.js +11 -10
- package/dist/src/util/index.js.map +1 -1
- package/dist/src/web/nextui/404/index.html +1 -1
- package/dist/src/web/nextui/404.html +1 -1
- package/dist/src/web/nextui/_next/static/chunks/{258-9bad5f8846b93785.js → 258-4acb452fe85cff6f.js} +2 -2
- package/dist/src/web/nextui/_next/static/chunks/{540-ab57db4fdf86cc8a.js → 448-4da3bf74eae4996a.js} +7 -7
- package/dist/src/web/nextui/_next/static/chunks/53-fae6e50ace6c83a1.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/{106-40e3e363c957c313.js → 578-8efe57f906f7573c.js} +6 -6
- package/dist/src/web/nextui/_next/static/chunks/737-dbd25d447fbc5006.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/{531-efd0c50e833e81f1.js → 905-0da344cee75690e7.js} +4 -4
- package/dist/src/web/nextui/_next/static/chunks/932-75585b3be8ce494d.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/973-ffe3726c956d08ef.js +2 -0
- package/dist/src/web/nextui/_next/static/chunks/app/auth/login/page-2e6452987650f232.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/auth/signup/page-d81a6cfb22f8b8a2.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/datasets/page-73b93abb6a46ca0e.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/not-found-fe10d5df88bc44ef.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/{page-7bc08c50ac222ddd.js → page-81aa116b34ef4a6b.js} +1 -1
- package/dist/src/web/nextui/_next/static/chunks/app/eval/page-56e122e6f2a64557.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/layout-ed6af4caf66026a5.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/{page-e07a0ddbf3d6e21c.js → page-122e9cfa52eb218a.js} +1 -1
- package/dist/src/web/nextui/_next/static/chunks/app/progress/page-aa447776a6487d50.js +1 -0
- package/dist/src/web/nextui/_next/static/chunks/app/prompts/{page-50e27c24c9e255bd.js → page-ac63288a243a9872.js} +1 -1
- package/dist/src/web/nextui/_next/static/chunks/app/report/{page-6716acff9825da98.js → page-be70065fb1472831.js} +1 -1
- package/dist/src/web/nextui/_next/static/chunks/app/setup/{page-59d712c1f56ecac6.js → page-b19fc52e084a3efe.js} +1 -1
- package/dist/src/web/nextui/_next/static/chunks/{main-app-929a26b3c8cd3f7a.js → main-app-7a1376166cb8b72e.js} +1 -1
- package/dist/src/web/nextui/auth/login/index.html +1 -1
- package/dist/src/web/nextui/auth/login/index.txt +3 -3
- package/dist/src/web/nextui/auth/signup/index.html +1 -1
- package/dist/src/web/nextui/auth/signup/index.txt +3 -3
- package/dist/src/web/nextui/datasets/index.html +1 -1
- package/dist/src/web/nextui/datasets/index.txt +3 -3
- package/dist/src/web/nextui/eval/index.html +1 -1
- package/dist/src/web/nextui/eval/index.txt +3 -3
- package/dist/src/web/nextui/index.html +1 -1
- package/dist/src/web/nextui/index.txt +2 -2
- package/dist/src/web/nextui/progress/index.html +1 -1
- package/dist/src/web/nextui/progress/index.txt +3 -3
- package/dist/src/web/nextui/prompts/index.html +1 -1
- package/dist/src/web/nextui/prompts/index.txt +3 -3
- package/dist/src/web/nextui/report/index.html +1 -1
- package/dist/src/web/nextui/report/index.txt +3 -3
- package/dist/src/web/nextui/setup/index.html +1 -27
- package/dist/src/web/nextui/setup/index.txt +3 -3
- package/dist/src/web/server.d.ts.map +1 -1
- package/dist/src/web/server.js +2 -1
- package/dist/src/web/server.js.map +1 -1
- package/package.json +1 -1
- package/dist/src/web/nextui/_next/static/chunks/215-f97c02cbf00861f3.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/611-d73a08bebf1d6f3c.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/770-8ec8b39ce6f615c4.js +0 -2
- package/dist/src/web/nextui/_next/static/chunks/858-9393537662061ee7.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/873-177b84c58d904b5a.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/auth/login/page-3bd92b90dc19429b.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/auth/signup/page-557ff1f8c491e68a.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/datasets/page-4f93aacd25866d60.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/not-found-ce320e6d1e6d1d23.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/eval/page-b26513300f6f0273.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/layout-1b9c6b87155ccc6f.js +0 -1
- package/dist/src/web/nextui/_next/static/chunks/app/progress/page-e8235b15bd64fb03.js +0 -1
- /package/dist/src/web/nextui/_next/static/{FqU2doca_2rkP7LW_2ZLN → 9oVNcJw_yPT1Zu44NMAgc}/_buildManifest.js +0 -0
- /package/dist/src/web/nextui/_next/static/{FqU2doca_2rkP7LW_2ZLN → 9oVNcJw_yPT1Zu44NMAgc}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[53],{56343:function(e,t,r){"use strict";var n=r(71851);t.Z=void 0;var o=n(r(99570)),i=r(24004);t.Z=(0,o.default)((0,i.jsx)("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z"}),"BugReport")},89335:function(e,t,r){"use strict";var n=r(71851);t.Z=void 0;var o=n(r(99570)),i=r(24004);t.Z=(0,o.default)((0,i.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday")},95707:function(e,t,r){"use strict";var n=r(71851);t.Z=void 0;var o=n(r(99570)),i=r(24004);t.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkMode")},9327:function(e,t,r){"use strict";var n=r(71851);t.Z=void 0;var o=n(r(99570)),i=r(24004);t.Z=(0,o.default)((0,i.jsx)("path",{d:"M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1m-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1"}),"Forum")},98629:function(e,t,r){"use strict";var n=r(71851);t.Z=void 0,function(e,t){if((t||!e||!e.__esModule)&&null!==e&&("object"==typeof e||"function"==typeof e)){var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(n,i,l):n[i]=e[i]}n.default=e,r&&r.set(e,n)}}(r(14978));var o=n(r(99570)),i=r(24004);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}t.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub")},86768:function(e,t,r){"use strict";var n=r(71851);t.Z=void 0;var o=n(r(99570)),i=r(24004);t.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info")},80378:function(e,t,r){"use strict";var n=r(71851);t.Z=void 0;var o=n(r(99570)),i=r(24004);t.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightMode")},16783:function(e,t,r){"use strict";var n=r(71851);t.Z=void 0;var o=n(r(99570)),i=r(24004);t.Z=(0,o.default)([(0,i.jsx)("path",{d:"M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1m0 13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5z"},"0"),(0,i.jsx)("path",{d:"M17.5 10.5c.88 0 1.73.09 2.5.26V9.24c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99M13 12.49v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26V11.9c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.3-4.5.83m4.5 1.84c-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26v-1.52c-.79-.16-1.64-.24-2.5-.24"},"1")],"MenuBook")},99570:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.createSvgIcon}});var n=r(28166)},31657:function(e,t,r){"use strict";r.d(t,{Z:function(){return M}});var n=r(94312),o=r(79042),i=r(14978),a=r(53468),l=r(3982),u=r(31608),s=r(87286),c=r(97491),d=r(24004),f=(0,c.Z)((0,d.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person"),p=r(25800),m=r(46213);function v(e){return(0,m.ZP)("MuiAvatar",e)}(0,p.Z)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);var h=r(97580);let g=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],y=e=>{let{classes:t,variant:r,colorDefault:n}=e;return(0,l.Z)({root:["root",r,n&&"colorDefault"],img:["img"],fallback:["fallback"]},v,t)},b=(0,u.ZP)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],r.colorDefault&&t.colorDefault]}})(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:(0,o.Z)({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:(0,o.Z)({backgroundColor:e.palette.grey[400]},e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})))}]})),Z=(0,u.ZP)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),x=(0,u.ZP)(f,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"}),w=i.forwardRef(function(e,t){let r=(0,s.i)({props:e,name:"MuiAvatar"}),{alt:l,children:u,className:c,component:f="div",slots:p={},slotProps:m={},imgProps:v,sizes:w,src:M,srcSet:S,variant:C="circular"}=r,P=(0,n.Z)(r,g),_=null,j=function({crossOrigin:e,referrerPolicy:t,src:r,srcSet:n}){let[o,a]=i.useState(!1);return i.useEffect(()=>{if(!r&&!n)return;a(!1);let o=!0,i=new Image;return i.onload=()=>{o&&a("loaded")},i.onerror=()=>{o&&a("error")},i.crossOrigin=e,i.referrerPolicy=t,i.src=r,n&&(i.srcset=n),()=>{o=!1}},[e,t,r,n]),o}((0,o.Z)({},v,{src:M,srcSet:S})),k=M||S,O=k&&"error"!==j,z=(0,o.Z)({},r,{colorDefault:!O,component:f,variant:C}),R=y(z),[I,E]=(0,h.Z)("img",{className:R.img,elementType:Z,externalForwardedProps:{slots:p,slotProps:{img:(0,o.Z)({},v,m.img)}},additionalProps:{alt:l,src:M,srcSet:S,sizes:w},ownerState:z});return _=O?(0,d.jsx)(I,(0,o.Z)({},E)):u||0===u?u:k&&l?l[0]:(0,d.jsx)(x,{ownerState:z,className:R.fallback}),(0,d.jsx)(b,(0,o.Z)({as:f,ownerState:z,className:(0,a.Z)(R.root,c),ref:t},P,{children:_}))});var M=w},49567:function(e,t,r){"use strict";r.d(t,{Z:function(){return Z}});var n=r(79042),o=r(94312),i=r(14978),a=r(53468),l=r(36975),u=r(60805),s=r(86251),c=r(83927),d=r(24004);let f=["className","component"];var p=r(64872),m=r(51867),v=r(40018),h=r(25800);let g=(0,h.Z)("MuiBox",["root"]),y=(0,m.Z)(),b=function(e={}){let{themeId:t,defaultTheme:r,defaultClassName:p="MuiBox-root",generateClassName:m}=e,v=(0,l.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(u.Z),h=i.forwardRef(function(e,i){let l=(0,c.Z)(r),u=(0,s.Z)(e),{className:h,component:g="div"}=u,y=(0,o.Z)(u,f);return(0,d.jsx)(v,(0,n.Z)({as:g,ref:i,className:(0,a.Z)(h,m?m(p):p),theme:t&&l[t]||l},y))});return h}({themeId:v.Z,defaultTheme:y,defaultClassName:g.root,generateClassName:p.Z.generate});var Z=b},77656:function(e,t,r){"use strict";r.d(t,{Z:function(){return w}});var n=r(94312),o=r(79042),i=r(14978),a=r(53468),l=r(3982),u=r(13477),s=r(31608),c=r(87286),d=r(30151),f=r(81427),p=r(25800),m=r(46213);function v(e){return(0,m.ZP)("MuiIconButton",e)}let h=(0,p.Z)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);var g=r(24004);let y=["edge","children","className","color","disabled","disableFocusRipple","size"],b=e=>{let{classes:t,disabled:r,color:n,edge:o,size:i}=e,a={root:["root",r&&"disabled","default"!==n&&`color${(0,f.Z)(n)}`,o&&`edge${(0,f.Z)(o)}`,`size${(0,f.Z)(i)}`]};return(0,l.Z)(a,v,t)},Z=(0,s.ZP)(d.Z,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,"default"!==r.color&&t[`color${(0,f.Z)(r.color)}`],r.edge&&t[`edge${(0,f.Z)(r.edge)}`],t[`size${(0,f.Z)(r.size)}`]]}})(({theme:e,ownerState:t})=>(0,o.Z)({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12}),({theme:e,ownerState:t})=>{var r;let n=null==(r=(e.vars||e).palette)?void 0:r[t.color];return(0,o.Z)({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&(0,o.Z)({color:null==n?void 0:n.main},!t.disableRipple&&{"&:hover":(0,o.Z)({},n&&{backgroundColor:e.vars?`rgba(${n.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,u.Fq)(n.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${h.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),x=i.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiIconButton"}),{edge:i=!1,children:l,className:u,color:s="default",disabled:d=!1,disableFocusRipple:f=!1,size:p="medium"}=r,m=(0,n.Z)(r,y),v=(0,o.Z)({},r,{edge:i,color:s,disabled:d,disableFocusRipple:f,size:p}),h=b(v);return(0,g.jsx)(Z,(0,o.Z)({className:(0,a.Z)(h.root,u),centerRipple:!0,focusRipple:!f,disabled:d,ref:t},m,{ownerState:v,children:l}))});var w=x},52062:function(e,t,r){"use strict";r.d(t,{Z:function(){return j}});var n=r(94312),o=r(79042),i=r(14978),a=r(53468),l=r(3982),u=r(81427),s=r(31608),c=r(87286),d=r(94988),f=r(41776),p=r(63147),m=r(25800),v=r(46213);function h(e){return(0,v.ZP)("MuiLink",e)}let g=(0,m.Z)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var y=r(69897),b=r(13477);let Z={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},x=e=>Z[e]||e;var w=({theme:e,ownerState:t})=>{let r=x(t.color),n=(0,y.DW)(e,`palette.${r}`,!1)||t.color,o=(0,y.DW)(e,`palette.${r}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:(0,b.Fq)(n,.4)},M=r(24004);let S=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],C=e=>{let{classes:t,component:r,focusVisible:n,underline:o}=e,i={root:["root",`underline${(0,u.Z)(o)}`,"button"===r&&"button",n&&"focusVisible"]};return(0,l.Z)(i,h,t)},P=(0,s.ZP)(p.Z,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`underline${(0,u.Z)(r.underline)}`],"button"===r.component&&t.button]}})(({theme:e,ownerState:t})=>(0,o.Z)({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&(0,o.Z)({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:w({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${g.focusVisible}`]:{outline:"auto"}})),_=i.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiLink"}),{className:l,color:u="primary",component:s="a",onBlur:p,onFocus:m,TypographyClasses:v,underline:h="always",variant:g="inherit",sx:y}=r,b=(0,n.Z)(r,S),{isFocusVisibleRef:x,onBlur:w,onFocus:_,ref:j}=(0,d.Z)(),[k,O]=i.useState(!1),z=(0,f.Z)(t,j),R=(0,o.Z)({},r,{color:u,component:s,focusVisible:k,underline:h,variant:g}),I=C(R);return(0,M.jsx)(P,(0,o.Z)({color:u,className:(0,a.Z)(I.root,l),classes:v,component:s,onBlur:e=>{w(e),!1===x.current&&O(!1),p&&p(e)},onFocus:e=>{_(e),!0===x.current&&O(!0),m&&m(e)},ref:z,ownerState:R,variant:g,sx:[...Object.keys(Z).includes(u)?[]:[{color:u}],...Array.isArray(y)?y:[y]]},b))});var j=_},96212:function(e,t,r){"use strict";r.d(t,{f:function(){return i}});var n=r(25800),o=r(46213);function i(e){return(0,o.ZP)("MuiListItemIcon",e)}let a=(0,n.Z)("MuiListItemIcon",["root","alignItemsFlexStart"]);t.Z=a},53975:function(e,t,r){"use strict";r.d(t,{L:function(){return i}});var n=r(25800),o=r(46213);function i(e){return(0,o.ZP)("MuiListItemText",e)}let a=(0,n.Z)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);t.Z=a},96976:function(e,t,r){"use strict";r.d(t,{Z:function(){return j}});var n=r(94312),o=r(79042),i=r(14978),a=r(53468),l=r(3982),u=r(13477),s=r(31608),c=r(11874),d=r(87286),f=r(11112),p=r(30151),m=r(16656),v=r(41776),h=r(25800);let g=(0,h.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);var y=r(96212),b=r(53975),Z=r(46213);function x(e){return(0,Z.ZP)("MuiMenuItem",e)}let w=(0,h.Z)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var M=r(24004);let S=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],C=e=>{let{disabled:t,dense:r,divider:n,disableGutters:i,selected:a,classes:u}=e,s=(0,l.Z)({root:["root",r&&"dense",t&&"disabled",!i&&"gutters",n&&"divider",a&&"selected"]},x,u);return(0,o.Z)({},u,s)},P=(0,s.ZP)(p.Z,{shouldForwardProp:e=>(0,c.Z)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>(0,o.Z)({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${w.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,u.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${w.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,u.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${w.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,u.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,u.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${w.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${w.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${g.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${g.inset}`]:{marginLeft:52},[`& .${b.Z.root}`]:{marginTop:0,marginBottom:0},[`& .${b.Z.inset}`]:{paddingLeft:36},[`& .${y.Z.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&(0,o.Z)({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${y.Z.root} svg`]:{fontSize:"1.25rem"}}))),_=i.forwardRef(function(e,t){let r;let l=(0,d.i)({props:e,name:"MuiMenuItem"}),{autoFocus:u=!1,component:s="li",dense:c=!1,divider:p=!1,disableGutters:h=!1,focusVisibleClassName:g,role:y="menuitem",tabIndex:b,className:Z}=l,x=(0,n.Z)(l,S),w=i.useContext(f.Z),_=i.useMemo(()=>({dense:c||w.dense||!1,disableGutters:h}),[w.dense,c,h]),j=i.useRef(null);(0,m.Z)(()=>{u&&j.current&&j.current.focus()},[u]);let k=(0,o.Z)({},l,{dense:_.dense,divider:p,disableGutters:h}),O=C(l),z=(0,v.Z)(j,t);return l.disabled||(r=void 0!==b?b:-1),(0,M.jsx)(f.Z.Provider,{value:_,children:(0,M.jsx)(P,(0,o.Z)({ref:z,role:y,tabIndex:r,component:s,focusVisibleClassName:(0,a.Z)(O.focusVisible,g),className:(0,a.Z)(O.root,Z)},x,{ownerState:k,classes:O}))})});var j=_},32414:function(e,t,r){"use strict";r.d(t,{Z:function(){return P}});var n=r(94312),o=r(79042),i=r(14978),a=r(53468),l=r(41238),u=r(46213),s=r(3982),c=r(14059),d=r(48976),f=r(86251),p=r(23437),m=r(5044),v=r(86605),h=r(24004);let g=["component","direction","spacing","divider","children","className","useFlexGap"],y=(0,p.Z)(),b=(0,c.Z)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function Z(e){return(0,d.Z)({props:e,name:"MuiStack",defaultTheme:y})}let x=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],w=({ownerState:e,theme:t})=>{let r=(0,o.Z)({display:"flex",flexDirection:"column"},(0,m.k9)({theme:t},(0,m.P$)({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e})));if(e.spacing){let n=(0,v.hB)(t),o=Object.keys(t.breakpoints.values).reduce((t,r)=>(("object"==typeof e.spacing&&null!=e.spacing[r]||"object"==typeof e.direction&&null!=e.direction[r])&&(t[r]=!0),t),{}),i=(0,m.P$)({values:e.direction,base:o}),a=(0,m.P$)({values:e.spacing,base:o});"object"==typeof i&&Object.keys(i).forEach((e,t,r)=>{let n=i[e];if(!n){let n=t>0?i[r[t-1]]:"column";i[e]=n}}),r=(0,l.Z)(r,(0,m.k9)({theme:t},a,(t,r)=>e.useFlexGap?{gap:(0,v.NA)(n,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${x(r?i[r]:e.direction)}`]:(0,v.NA)(n,t)}}))}return(0,m.dt)(t.breakpoints,r)};var M=r(31608),S=r(87286);let C=function(e={}){let{createStyledComponent:t=b,useThemeProps:r=Z,componentName:l="MuiStack"}=e,c=()=>(0,s.Z)({root:["root"]},e=>(0,u.ZP)(l,e),{}),d=t(w),p=i.forwardRef(function(e,t){let l=r(e),u=(0,f.Z)(l),{component:s="div",direction:p="column",spacing:m=0,divider:v,children:y,className:b,useFlexGap:Z=!1}=u,x=(0,n.Z)(u,g),w=c();return(0,h.jsx)(d,(0,o.Z)({as:s,ownerState:{direction:p,spacing:m,useFlexGap:Z},ref:t,className:(0,a.Z)(w.root,b)},x,{children:v?function(e,t){let r=i.Children.toArray(e).filter(Boolean);return r.reduce((e,n,o)=>(e.push(n),o<r.length-1&&e.push(i.cloneElement(t,{key:`separator-${o}`})),e),[])}(y,v):y}))});return p}({createStyledComponent:(0,M.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,S.i)({props:e,name:"MuiStack"})});var P=C},63147:function(e,t,r){"use strict";r.d(t,{Z:function(){return M}});var n=r(94312),o=r(79042),i=r(14978),a=r(53468),l=r(86251),u=r(3982),s=r(31608),c=r(87286),d=r(81427),f=r(25800),p=r(46213);function m(e){return(0,p.ZP)("MuiTypography",e)}(0,f.Z)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var v=r(24004);let h=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],g=e=>{let{align:t,gutterBottom:r,noWrap:n,paragraph:o,variant:i,classes:a}=e,l={root:["root",i,"inherit"!==e.align&&`align${(0,d.Z)(t)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return(0,u.Z)(l,m,a)},y=(0,s.ZP)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],"inherit"!==r.align&&t[`align${(0,d.Z)(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>(0,o.Z)({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),b={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Z={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},x=e=>Z[e]||e,w=i.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiTypography"}),i=x(r.color),u=(0,l.Z)((0,o.Z)({},r,{color:i})),{align:s="inherit",className:d,component:f,gutterBottom:p=!1,noWrap:m=!1,paragraph:Z=!1,variant:w="body1",variantMapping:M=b}=u,S=(0,n.Z)(u,h),C=(0,o.Z)({},u,{align:s,color:i,className:d,component:f,gutterBottom:p,noWrap:m,paragraph:Z,variant:w,variantMapping:M}),P=f||(Z?"p":M[w]||b[w])||"span",_=g(C);return(0,v.jsx)(y,(0,o.Z)({as:P,ref:t,ownerState:C,className:(0,a.Z)(_.root,d)},S))});var M=w},61191:function(e,t,r){"use strict";r.d(t,{Z:function(){return x}});var n=r(79042),o=r(94312),i=r(14978);let a=i.createContext(null);function l(){let e=i.useContext(a);return e}let u="function"==typeof Symbol&&Symbol.for;var s=u?Symbol.for("mui.nested"):"__THEME_NESTED__",c=r(24004),d=function(e){let{children:t,theme:r}=e,o=l(),u=i.useMemo(()=>{let e=null===o?r:function(e,t){if("function"==typeof t){let r=t(e);return r}return(0,n.Z)({},e,t)}(o,r);return null!=e&&(e[s]=null!==o),e},[r,o]);return(0,c.jsx)(a.Provider,{value:u,children:t})},f=r(86894),p=r(3583),m=r(19617),v=r(41773);let h={};function g(e,t,r,o=!1){return i.useMemo(()=>{let i=e&&t[e]||t;if("function"==typeof r){let a=r(i),l=e?(0,n.Z)({},t,{[e]:a}):a;return o?()=>l:l}return e?(0,n.Z)({},t,{[e]:r}):(0,n.Z)({},t,r)},[e,t,r,o])}var y=function(e){let{children:t,theme:r,themeId:n}=e,o=(0,p.Z)(h),i=l()||h,a=g(n,o,r),u=g(n,i,r,!0),s="rtl"===a.direction;return(0,c.jsx)(d,{theme:u,children:(0,c.jsx)(f.T.Provider,{value:a,children:(0,c.jsx)(m.Z,{value:s,children:(0,c.jsx)(v.Z,{value:null==a?void 0:a.components,children:t})})})})},b=r(40018);let Z=["theme"];function x(e){let{theme:t}=e,r=(0,o.Z)(e,Z),i=t[b.Z];return(0,c.jsx)(y,(0,n.Z)({},r,{themeId:i?b.Z:void 0,theme:i||t}))}},28166:function(e,t,r){"use strict";r.r(t),r.d(t,{capitalize:function(){return o.Z},createChainedFunction:function(){return i},createSvgIcon:function(){return a.Z},debounce:function(){return l.Z},deprecatedPropType:function(){return u},isMuiElement:function(){return s.Z},ownerDocument:function(){return c.Z},ownerWindow:function(){return d.Z},requirePropFactory:function(){return f},setRef:function(){return p},unstable_ClassNameGenerator:function(){return x},unstable_useEnhancedEffect:function(){return m.Z},unstable_useId:function(){return v.Z},unsupportedProp:function(){return h},useControlled:function(){return g.Z},useEventCallback:function(){return y.Z},useForkRef:function(){return b.Z},useIsFocusVisible:function(){return Z.Z}});var n=r(64872),o=r(81427),i=r(19737).Z,a=r(97491),l=r(86229),u=function(e,t){return()=>null},s=r(89261),c=r(62302),d=r(81729);r(79042);var f=function(e,t){return()=>null},p=r(45361).Z,m=r(16656),v=r(78404),h=function(e,t,r,n,o){return null},g=r(68681),y=r(41405),b=r(41776),Z=r(94988);let x={configure:e=>{n.Z.configure(e)}}},78404:function(e,t,r){"use strict";var n=r(6788);t.Z=n.Z},97580:function(e,t,r){"use strict";r.d(t,{Z:function(){return f}});var n=r(79042),o=r(94312),i=r(76008),a=r(94789),l=r(3791),u=r(98980);let s=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],c=["component","slots","slotProps"],d=["component"];function f(e,t){let{className:r,elementType:f,ownerState:p,externalForwardedProps:m,getSlotOwnerState:v,internalForwardedProps:h}=t,g=(0,o.Z)(t,s),{component:y,slots:b={[e]:void 0},slotProps:Z={[e]:void 0}}=m,x=(0,o.Z)(m,c),w=b[e]||f,M=(0,a.x)(Z[e],p),S=(0,l.L)((0,n.Z)({className:r},g,{externalForwardedProps:"root"===e?x:void 0,externalSlotProps:M})),{props:{component:C},internalRef:P}=S,_=(0,o.Z)(S.props,d),j=(0,i.Z)(P,null==M?void 0:M.ref,t.ref),k=v?v(_):{},O=(0,n.Z)({},p,k),z="root"===e?C||y:C,R=(0,u.$)(w,(0,n.Z)({},"root"===e&&!y&&!b[e]&&h,"root"!==e&&!b[e]&&h,_,z&&{as:z},{ref:j}),O);return Object.keys(k).forEach(e=>{delete R[e]}),[w,R]}},38127:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n,o=r(14978),i=r(82063),a=r(38409),l=r(3583);let u=(n||(n=r.t(o,2))).useSyncExternalStore;function s(e,t={}){let r=(0,l.Z)(),n="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:s=!1,matchMedia:c=n?window.matchMedia:null,ssrMatchMedia:d=null,noSsr:f=!1}=(0,a.Z)({name:"MuiUseMediaQuery",props:t,theme:r}),p="function"==typeof e?e(r):e;p=p.replace(/^@media( ?)/m,"");let m=(void 0!==u?function(e,t,r,n,i){let a=o.useCallback(()=>t,[t]),l=o.useMemo(()=>{if(i&&r)return()=>r(e).matches;if(null!==n){let{matches:t}=n(e);return()=>t}return a},[a,e,n,i,r]),[s,c]=o.useMemo(()=>{if(null===r)return[a,()=>()=>{}];let t=r(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]},[a,r,e]),d=u(c,s,l);return d}:function(e,t,r,n,a){let[l,u]=o.useState(()=>a&&r?r(e).matches:n?n(e).matches:t);return(0,i.Z)(()=>{let t=!0;if(!r)return;let n=r(e),o=()=>{t&&u(n.matches)};return o(),n.addListener(o),()=>{t=!1,n.removeListener(o)}},[e,r]),l})(p,s,c,d,f);return m}},95643:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return y}});let n=r(69278),o=r(29325),i=o._(r(14978)),a=r(9389),l=n._(r(25525)),u=r(56963),s=r(53191),c=r(40078);r(80115);let d=r(4079),f=n._(r(4793)),p={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function m(e,t,r,n,o,i){let a=null==e?void 0:e.src;if(!e||e["data-loaded-src"]===a)return;e["data-loaded-src"]=a;let l="decode"in e?e.decode():Promise.resolve();l.catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("blur"===t&&o(!0),null==r?void 0:r.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,o=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>o,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{o=!0,t.stopPropagation()}})}(null==n?void 0:n.current)&&n.current(e)}})}function v(e){let[t,r]=i.version.split("."),n=parseInt(t,10),o=parseInt(r,10);return n>18||18===n&&o>=3?{fetchPriority:e}:{fetchpriority:e}}let h=(0,i.forwardRef)((e,t)=>{let{src:r,srcSet:n,sizes:o,height:a,width:l,decoding:u,className:s,style:c,fetchPriority:d,placeholder:f,loading:p,unoptimized:h,fill:g,onLoadRef:y,onLoadingCompleteRef:b,setBlurComplete:Z,setShowAltText:x,onLoad:w,onError:M,...S}=e;return i.default.createElement("img",{...S,...v(d),loading:p,width:l,height:a,decoding:u,"data-nimg":g?"fill":"1",className:s,style:c,sizes:o,srcSet:n,src:r,ref:(0,i.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(M&&(e.src=e.src),e.complete&&m(e,f,y,b,Z,h))},[r,f,y,b,Z,M,h,t]),onLoad:e=>{let t=e.currentTarget;m(t,f,y,b,Z,h)},onError:e=>{x(!0),"blur"===f&&Z(!0),M&&M(e)}})});function g(e){let{isAppRouter:t,imgAttributes:r}=e,n={as:"image",imageSrcSet:r.srcSet,imageSizes:r.sizes,crossOrigin:r.crossOrigin,referrerPolicy:r.referrerPolicy,...v(r.fetchPriority)};return t?((0,a.preload)(r.src,n),null):i.default.createElement(l.default,null,i.default.createElement("link",{key:"__nimg-"+r.src+r.srcSet+r.sizes,rel:"preload",href:r.srcSet?void 0:r.src,...n}))}let y=(0,i.forwardRef)((e,t)=>{let r=(0,i.useContext)(d.RouterContext),n=(0,i.useContext)(c.ImageConfigContext),o=(0,i.useMemo)(()=>{let e=p||n||s.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r}},[n]),{onLoad:a,onLoadingComplete:l}=e,m=(0,i.useRef)(a);(0,i.useEffect)(()=>{m.current=a},[a]);let v=(0,i.useRef)(l);(0,i.useEffect)(()=>{v.current=l},[l]);let[y,b]=(0,i.useState)(!1),[Z,x]=(0,i.useState)(!1),{props:w,meta:M}=(0,u.getImgProps)(e,{defaultLoader:f.default,imgConf:o,blurComplete:y,showAltText:Z});return i.default.createElement(i.default.Fragment,null,i.default.createElement(h,{...w,unoptimized:M.unoptimized,placeholder:M.placeholder,fill:M.fill,onLoadRef:m,onLoadingCompleteRef:v,setBlurComplete:b,setShowAltText:x,ref:t}),M.priority?i.default.createElement(g,{isAppRouter:!r,imgAttributes:w}):null)});("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)},45177:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return i}});let n=r(69278),o=n._(r(14978)),i=o.default.createContext({})},94860:function(e,t){"use strict";function r(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return r}})},56963:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return l}}),r(80115);let n=r(5289),o=r(53191);function i(e){return void 0!==e.default}function a(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function l(e,t){var r;let l,u,s,{src:c,sizes:d,unoptimized:f=!1,priority:p=!1,loading:m,className:v,quality:h,width:g,height:y,fill:b=!1,style:Z,onLoad:x,onLoadingComplete:w,placeholder:M="empty",blurDataURL:S,fetchPriority:C,layout:P,objectFit:_,objectPosition:j,lazyBoundary:k,lazyRoot:O,...z}=e,{imgConf:R,showAltText:I,blurComplete:E,defaultLoader:T}=t,$=R||o.imageConfigDefault;if("allSizes"in $)l=$;else{let e=[...$.deviceSizes,...$.imageSizes].sort((e,t)=>e-t),t=$.deviceSizes.sort((e,t)=>e-t);l={...$,allSizes:e,deviceSizes:t}}let A=z.loader||T;delete z.loader,delete z.srcSet;let F="__next_img_default"in A;if(F){if("custom"===l.loader)throw Error('Image with src "'+c+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=A;A=t=>{let{config:r,...n}=t;return e(n)}}if(P){"fill"===P&&(b=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[P];e&&(Z={...Z,...e});let t={responsive:"100vw",fill:"100vw"}[P];t&&!d&&(d=t)}let L="",N=a(g),D=a(y);if("object"==typeof(r=c)&&(i(r)||void 0!==r.src)){let e=i(c)?c.default:c;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(u=e.blurWidth,s=e.blurHeight,S=S||e.blurDataURL,L=e.src,!b){if(N||D){if(N&&!D){let t=N/e.width;D=Math.round(e.height*t)}else if(!N&&D){let t=D/e.height;N=Math.round(e.width*t)}}else N=e.width,D=e.height}}let B=!p&&("lazy"===m||void 0===m);(!(c="string"==typeof c?c:L)||c.startsWith("data:")||c.startsWith("blob:"))&&(f=!0,B=!1),l.unoptimized&&(f=!0),F&&c.endsWith(".svg")&&!l.dangerouslyAllowSVG&&(f=!0),p&&(C="high");let V=a(h),H=Object.assign(b?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:_,objectPosition:j}:{},I?{}:{color:"transparent"},Z),W="blur"===M&&S&&!E?{backgroundSize:H.objectFit||"cover",backgroundPosition:H.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:'url("data:image/svg+xml;charset=utf-8,'+(0,n.getImageBlurSvg)({widthInt:N,heightInt:D,blurWidth:u,blurHeight:s,blurDataURL:S,objectFit:H.objectFit})+'")'}:{},G=function(e){let{config:t,src:r,unoptimized:n,width:o,quality:i,sizes:a,loader:l}=e;if(n)return{src:r,srcSet:void 0,sizes:void 0};let{widths:u,kind:s}=function(e,t,r){let{deviceSizes:n,allSizes:o}=e;if(r){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let n;n=e.exec(r);n)t.push(parseInt(n[2]));if(t.length){let e=.01*Math.min(...t);return{widths:o.filter(t=>t>=n[0]*e),kind:"w"}}return{widths:o,kind:"w"}}if("number"!=typeof t)return{widths:n,kind:"w"};let i=[...new Set([t,2*t].map(e=>o.find(t=>t>=e)||o[o.length-1]))];return{widths:i,kind:"x"}}(t,o,a),c=u.length-1;return{sizes:a||"w"!==s?a:"100vw",srcSet:u.map((e,n)=>l({config:t,src:r,quality:i,width:e})+" "+("w"===s?e:n+1)+s).join(", "),src:l({config:t,src:r,quality:i,width:u[c]})}}({config:l,src:c,unoptimized:f,width:N,quality:V,sizes:d,loader:A}),q={...z,loading:B?"lazy":m,fetchPriority:C,width:N,height:D,decoding:"async",className:v,style:{...H,...W},sizes:G.sizes,srcSet:G.srcSet,src:G.src},U={unoptimized:f,priority:p,placeholder:M,fill:b};return{props:q,meta:U}}},25525:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{defaultHead:function(){return c},default:function(){return m}});let n=r(69278),o=r(29325),i=o._(r(14978)),a=n._(r(35919)),l=r(45177),u=r(14155),s=r(94860);function c(e){void 0===e&&(e=!1);let t=[i.default.createElement("meta",{charSet:"utf-8"})];return e||t.push(i.default.createElement("meta",{name:"viewport",content:"width=device-width"})),t}function d(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===i.default.Fragment?e.concat(i.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}r(80115);let f=["name","httpEquiv","charSet","itemProp"];function p(e,t){let{inAmpMode:r}=t;return e.reduce(d,[]).reverse().concat(c(r).reverse()).filter(function(){let e=new Set,t=new Set,r=new Set,n={};return o=>{let i=!0,a=!1;if(o.key&&"number"!=typeof o.key&&o.key.indexOf("$")>0){a=!0;let t=o.key.slice(o.key.indexOf("$")+1);e.has(t)?i=!1:e.add(t)}switch(o.type){case"title":case"base":t.has(o.type)?i=!1:t.add(o.type);break;case"meta":for(let e=0,t=f.length;e<t;e++){let t=f[e];if(o.props.hasOwnProperty(t)){if("charSet"===t)r.has(t)?i=!1:r.add(t);else{let e=o.props[t],r=n[t]||new Set;("name"!==t||!a)&&r.has(e)?i=!1:(r.add(e),n[t]=r)}}}}return i}}()).reverse().map((e,t)=>{let n=e.key||t;if(!r&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,i.default.cloneElement(e,t)}return i.default.cloneElement(e,{key:n})})}let m=function(e){let{children:t}=e,r=(0,i.useContext)(l.AmpStateContext),n=(0,i.useContext)(u.HeadManagerContext);return i.default.createElement(a.default,{reduceComponentsToState:p,headManager:n,inAmpMode:(0,s.isInAmpMode)(r)},t)};("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)},5289:function(e,t){"use strict";function r(e){let{widthInt:t,heightInt:r,blurWidth:n,blurHeight:o,blurDataURL:i,objectFit:a}=e,l=n?40*n:t,u=o?40*o:r,s=l&&u?"viewBox='0 0 "+l+" "+u+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+s+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(s?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+i+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},40078:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return a}});let n=r(69278),o=n._(r(14978)),i=r(53191),a=o.default.createContext(i.imageConfigDefault)},53191:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});let r=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",remotePatterns:[],unoptimized:!1}},74354:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return s},unstable_getImgProps:function(){return u}});let n=r(69278),o=r(56963),i=r(80115),a=r(95643),l=n._(r(4793)),u=e=>{(0,i.warnOnce)("Warning: unstable_getImgProps() is experimental and may change or be removed at any time. Use at your own risk.");let{props:t}=(0,o.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}},s=a.Image},4793:function(e,t){"use strict";function r(e){let{config:t,src:r,width:n,quality:o}=e;return t.path+"?url="+encodeURIComponent(r)+"&w="+n+"&q="+(o||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n}}),r.__next_img_default=!0;let n=r},35919:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let n=r(29325),o=n._(r(14978)),i=o.useLayoutEffect,a=o.useEffect;function l(e){let{headManager:t,reduceComponentsToState:r}=e;function n(){if(t&&t.mountedInstances){let n=o.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(n,e))}}return i(()=>{var r;return null==t||null==(r=t.mountedInstances)||r.add(e.children),()=>{var r;null==t||null==(r=t.mountedInstances)||r.delete(e.children)}}),i(()=>(t&&(t._pendingUpdate=n),()=>{t&&(t._pendingUpdate=n)})),a(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},80115:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},65246:function(e){e.exports={style:{fontFamily:"'__Inter_c19315', '__Inter_Fallback_c19315'",fontStyle:"normal"},className:"__className_c19315"}},47051:function(e,t,r){e.exports=r(74354)},28891:function(e,t,r){e.exports=r(98556)},77580:function(e){var t,r,n,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function l(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u=[],s=!1,c=-1;function d(){s&&n&&(s=!1,n.length?u=n.concat(u):c=-1,u.length&&f())}function f(){if(!s){var e=l(d);s=!0;for(var t=u.length;t;){for(n=u,u=[];++c<t;)n&&n[c].run();c=-1,t=u.length}n=null,s=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new p(e,t)),1!==u.length||s||l(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}}]);
|
package/dist/src/web/nextui/_next/static/chunks/{106-40e3e363c957c313.js → 578-8efe57f906f7573c.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[578],{35185:function(e,t,r){"use strict";var n=r(71851);t.Z=void 0;var o=n(r(99570)),i=r(24004);t.Z=(0,o.default)((0,i.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy")},5592:function(e,t,r){"use strict";var n=r(71851);t.Z=void 0;var o=n(r(99570)),i=r(24004);t.Z=(0,o.default)((0,i.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete")},14931:function(e,t,r){"use strict";var n=r(71851);t.Z=void 0;var o=n(r(99570)),i=r(24004);t.Z=(0,o.default)((0,i.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit")},75307:function(e,t,r){"use strict";var n=r(71851);t.Z=void 0;var o=n(r(99570)),i=r(24004);t.Z=(0,o.default)((0,i.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings")},11615:function(e,t,r){"use strict";r.d(t,{Z:function(){return M}});var n=r(94312),o=r(79042),i=r(14978),a=r(53468),s=r(3982),l=r(10088),u=r(81427),c=r(87286),d=r(31608),f=r(25800),v=r(46213);function h(e){return(0,v.ZP)("MuiCircularProgress",e)}(0,f.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var p=r(24004);let m=["className","color","disableShrink","size","style","thickness","value","variant"],g=e=>e,y,S,b,Z,w=(0,l.F4)(y||(y=g`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
100% {
|
|
7
7
|
transform: rotate(360deg);
|
|
8
8
|
}
|
|
9
|
-
`)),
|
|
9
|
+
`)),x=(0,l.F4)(S||(S=g`
|
|
10
10
|
0% {
|
|
11
11
|
stroke-dasharray: 1px, 200px;
|
|
12
12
|
stroke-dashoffset: 0;
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
stroke-dasharray: 100px, 200px;
|
|
22
22
|
stroke-dashoffset: -125px;
|
|
23
23
|
}
|
|
24
|
-
`)),
|
|
24
|
+
`)),E=e=>{let{classes:t,variant:r,color:n,disableShrink:o}=e,i={root:["root",r,`color${(0,u.Z)(n)}`],svg:["svg"],circle:["circle",`circle${(0,u.Z)(r)}`,o&&"circleDisableShrink"]};return(0,s.Z)(i,h,t)},k=(0,d.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t[`color${(0,u.Z)(r.color)}`]]}})(({ownerState:e,theme:t})=>(0,o.Z)({display:"inline-block"},"determinate"===e.variant&&{transition:t.transitions.create("transform")},"inherit"!==e.color&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>"indeterminate"===e.variant&&(0,l.iv)(b||(b=g`
|
|
25
25
|
animation: ${0} 1.4s linear infinite;
|
|
26
|
-
`),w)),
|
|
26
|
+
`),w)),P=(0,d.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),T=(0,d.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.circle,t[`circle${(0,u.Z)(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>(0,o.Z)({stroke:"currentColor"},"determinate"===e.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink&&(0,l.iv)(Z||(Z=g`
|
|
27
27
|
animation: ${0} 1.4s ease-in-out infinite;
|
|
28
|
-
`),
|
|
28
|
+
`),x)),C=i.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiCircularProgress"}),{className:i,color:s="primary",disableShrink:l=!1,size:u=40,style:d,thickness:f=3.6,value:v=0,variant:h="indeterminate"}=r,g=(0,n.Z)(r,m),y=(0,o.Z)({},r,{color:s,disableShrink:l,size:u,thickness:f,value:v,variant:h}),S=E(y),b={},Z={},w={};if("determinate"===h){let e=2*Math.PI*((44-f)/2);b.strokeDasharray=e.toFixed(3),w["aria-valuenow"]=Math.round(v),b.strokeDashoffset=`${((100-v)/100*e).toFixed(3)}px`,Z.transform="rotate(-90deg)"}return(0,p.jsx)(k,(0,o.Z)({className:(0,a.Z)(S.root,i),style:(0,o.Z)({width:u,height:u},Z,d),ownerState:y,ref:t,role:"progressbar"},w,g,{children:(0,p.jsx)(P,{className:S.svg,ownerState:y,viewBox:"22 22 44 44",children:(0,p.jsx)(T,{className:S.circle,style:b,ownerState:y,cx:44,cy:44,r:(44-f)/2,fill:"none",strokeWidth:f})})}))});var M=C},8541:function(e,t,r){"use strict";r.d(t,{Z:function(){return b}});var n=r(94312),o=r(79042),i=r(14978),a=r(53468),s=r(3982),l=r(31608),u=r(11874),c=r(87286),d=r(63147),f=r(25800),v=r(46213);function h(e){return(0,v.ZP)("MuiDialogContentText",e)}(0,f.Z)("MuiDialogContentText",["root"]);var p=r(24004);let m=["children","className"],g=e=>{let{classes:t}=e,r=(0,s.Z)({root:["root"]},h,t);return(0,o.Z)({},t,r)},y=(0,l.ZP)(d.Z,{shouldForwardProp:e=>(0,u.Z)(e)||"classes"===e,name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),S=i.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiDialogContentText"}),{className:i}=r,s=(0,n.Z)(r,m),l=g(s);return(0,p.jsx)(y,(0,o.Z)({component:"p",variant:"body1",color:"text.secondary",ref:t,ownerState:s,className:(0,a.Z)(l.root,i)},r,{classes:l}))});var b=S},32414:function(e,t,r){"use strict";r.d(t,{Z:function(){return P}});var n=r(94312),o=r(79042),i=r(14978),a=r(53468),s=r(41238),l=r(46213),u=r(3982),c=r(14059),d=r(48976),f=r(86251),v=r(23437),h=r(5044),p=r(86605),m=r(24004);let g=["component","direction","spacing","divider","children","className","useFlexGap"],y=(0,v.Z)(),S=(0,c.Z)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function b(e){return(0,d.Z)({props:e,name:"MuiStack",defaultTheme:y})}let Z=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],w=({ownerState:e,theme:t})=>{let r=(0,o.Z)({display:"flex",flexDirection:"column"},(0,h.k9)({theme:t},(0,h.P$)({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e})));if(e.spacing){let n=(0,p.hB)(t),o=Object.keys(t.breakpoints.values).reduce((t,r)=>(("object"==typeof e.spacing&&null!=e.spacing[r]||"object"==typeof e.direction&&null!=e.direction[r])&&(t[r]=!0),t),{}),i=(0,h.P$)({values:e.direction,base:o}),a=(0,h.P$)({values:e.spacing,base:o});"object"==typeof i&&Object.keys(i).forEach((e,t,r)=>{let n=i[e];if(!n){let n=t>0?i[r[t-1]]:"column";i[e]=n}}),r=(0,s.Z)(r,(0,h.k9)({theme:t},a,(t,r)=>e.useFlexGap?{gap:(0,p.NA)(n,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Z(r?i[r]:e.direction)}`]:(0,p.NA)(n,t)}}))}return(0,h.dt)(t.breakpoints,r)};var x=r(31608),E=r(87286);let k=function(e={}){let{createStyledComponent:t=S,useThemeProps:r=b,componentName:s="MuiStack"}=e,c=()=>(0,u.Z)({root:["root"]},e=>(0,l.ZP)(s,e),{}),d=t(w),v=i.forwardRef(function(e,t){let s=r(e),l=(0,f.Z)(s),{component:u="div",direction:v="column",spacing:h=0,divider:p,children:y,className:S,useFlexGap:b=!1}=l,Z=(0,n.Z)(l,g),w=c();return(0,m.jsx)(d,(0,o.Z)({as:u,ownerState:{direction:v,spacing:h,useFlexGap:b},ref:t,className:(0,a.Z)(w.root,S)},Z,{children:p?function(e,t){let r=i.Children.toArray(e).filter(Boolean);return r.reduce((e,n,o)=>(e.push(n),o<r.length-1&&e.push(i.cloneElement(t,{key:`separator-${o}`})),e),[])}(y,p):y}))});return v}({createStyledComponent:(0,x.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,E.i)({props:e,name:"MuiStack"})});var P=k},61451:function(e,t,r){"use strict";r.d(t,{Z:function(){return y}});var n=r(79042),o=r(94312),i=r(14978),a=r(53468),s=r(3982),l=r(87286),u=r(31608),c=r(25800),d=r(46213);function f(e){return(0,d.ZP)("MuiTableContainer",e)}(0,c.Z)("MuiTableContainer",["root"]);var v=r(24004);let h=["className","component"],p=e=>{let{classes:t}=e;return(0,s.Z)({root:["root"]},f,t)},m=(0,u.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),g=i.forwardRef(function(e,t){let r=(0,l.i)({props:e,name:"MuiTableContainer"}),{className:i,component:s="div"}=r,u=(0,o.Z)(r,h),c=(0,n.Z)({},r,{component:s}),d=p(c);return(0,v.jsx)(m,(0,n.Z)({ref:t,as:s,className:(0,a.Z)(d.root,i),ownerState:c},u))});var y=g},71544:function(e,t,r){"use strict";r(14978);var n=r(97491),o=r(24004);t.Z=(0,n.Z)((0,o.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},97580:function(e,t,r){"use strict";r.d(t,{Z:function(){return f}});var n=r(79042),o=r(94312),i=r(76008),a=r(94789),s=r(3791),l=r(98980);let u=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],c=["component","slots","slotProps"],d=["component"];function f(e,t){let{className:r,elementType:f,ownerState:v,externalForwardedProps:h,getSlotOwnerState:p,internalForwardedProps:m}=t,g=(0,o.Z)(t,u),{component:y,slots:S={[e]:void 0},slotProps:b={[e]:void 0}}=h,Z=(0,o.Z)(h,c),w=S[e]||f,x=(0,a.x)(b[e],v),E=(0,s.L)((0,n.Z)({className:r},g,{externalForwardedProps:"root"===e?Z:void 0,externalSlotProps:x})),{props:{component:k},internalRef:P}=E,T=(0,o.Z)(E.props,d),C=(0,i.Z)(P,null==x?void 0:x.ref,t.ref),M=p?p(T):{},D=(0,n.Z)({},v,M),j="root"===e?k||y:k,z=(0,l.$)(w,(0,n.Z)({},"root"===e&&!y&&!S[e]&&m,"root"!==e&&!S[e]&&m,T,j&&{as:j},{ref:C}),D);return Object.keys(M).forEach(e=>{delete z[e]}),[w,z]}},77580:function(e){var t,r,n,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l=[],u=!1,c=-1;function d(){u&&n&&(u=!1,n.length?l=n.concat(l):c=-1,l.length&&f())}function f(){if(!u){var e=s(d);u=!0;for(var t=l.length;t;){for(n=l,l=[];++c<t;)n&&n[c].run();c=-1,t=l.length}n=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new v(e,t)),1!==l.length||u||s(f)},v.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}},69179:function(e,t,r){"use strict";r.d(t,{SV:function(){return a}});var n=r(14978);let o=(0,n.createContext)(null),i={didCatch:!1,error:null};class a extends n.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=i}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(null!==e){for(var t,r,n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];null===(t=(r=this.props).onReset)||void 0===t||t.call(r,{args:o,reason:"imperative-api"}),this.setState(i)}}componentDidCatch(e,t){var r,n;null===(r=(n=this.props).onError)||void 0===r||r.call(n,e,t)}componentDidUpdate(e,t){let{didCatch:r}=this.state,{resetKeys:n}=this.props;if(r&&null!==t.error&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((e,r)=>!Object.is(e,t[r]))}(e.resetKeys,n)){var o,a;null===(o=(a=this.props).onReset)||void 0===o||o.call(a,{next:n,prev:e.resetKeys,reason:"keys"}),this.setState(i)}}render(){let{children:e,fallbackRender:t,FallbackComponent:r,fallback:i}=this.props,{didCatch:a,error:s}=this.state,l=e;if(a){let e={error:s,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)l=t(e);else if(r)l=(0,n.createElement)(r,e);else if(null===i||(0,n.isValidElement)(i))l=i;else throw s}return(0,n.createElement)(o.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},l)}}},98880:function(e,t,r){"use strict";/**
|
|
29
29
|
* @license React
|
|
30
30
|
* use-sync-external-store-shim.production.min.js
|
|
31
31
|
*
|
|
@@ -41,4 +41,4 @@
|
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/var n=r(14978),o=r(99424),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useSyncExternalStore,s=n.useRef,l=n.useEffect,u=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=u(function(){function e(e){if(!l){if(l=!0,a=e,e=n(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return s=t}return s=e}if(t=s,i(a,e))return t;var r=n(e);return void 0!==o&&o(t,r)?t:(a=e,s=r)}var a,s,l=!1,u=void 0===r?null:r;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,r,n,o]);var v=a(e,d[0],d[1]);return l(function(){f.hasValue=!0,f.value=v},[v]),c(v),v}},99424:function(e,t,r){"use strict";e.exports=r(98880)},35345:function(e,t,r){"use strict";e.exports=r(59529)},79685:function(e,t,r){"use strict";r.d(t,{Ue:function(){return f}});let n=e=>{let t;let r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,i={setState:n,getState:o,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},a=t=e(n,o,i);return i},o=e=>e?n(e):n;var i=r(14978),a=r(35345);let{useDebugValue:s}=i,{useSyncExternalStoreWithSelector:l}=a,u=!1,c=e=>e,d=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");let t="function"==typeof e?o(e):e,r=(e,r)=>(function(e,t=c,r){r&&!u&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),u=!0);let n=l(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return s(n),n})(t,e,r);return Object.assign(r,t),r},f=e=>e?d(e):d},74595:function(e,t,r){"use strict";function n(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(n=r.getItem(e))?n:null;return i instanceof Promise?i.then(o):o(i)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}r.d(t,{FL:function(){return n},tJ:function(){return s}});let o=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>o(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>o(t)(e)}}},i=(e,t)=>(r,n,i)=>{let a,s,l={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,c=new Set,d=new Set;try{a=l.getStorage()}catch(e){}if(!a)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),r(...e)},n,i);let f=o(l.serialize),v=()=>{let e;let t=l.partialize({...n()}),r=f({state:t,version:l.version}).then(e=>a.setItem(l.name,e)).catch(t=>{e=t});if(e)throw e;return r},h=i.setState;i.setState=(e,t)=>{h(e,t),v()};let
|
|
44
|
+
*/var n=r(14978),o=r(99424),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useSyncExternalStore,s=n.useRef,l=n.useEffect,u=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=u(function(){function e(e){if(!l){if(l=!0,a=e,e=n(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return s=t}return s=e}if(t=s,i(a,e))return t;var r=n(e);return void 0!==o&&o(t,r)?t:(a=e,s=r)}var a,s,l=!1,u=void 0===r?null:r;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,r,n,o]);var v=a(e,d[0],d[1]);return l(function(){f.hasValue=!0,f.value=v},[v]),c(v),v}},99424:function(e,t,r){"use strict";e.exports=r(98880)},35345:function(e,t,r){"use strict";e.exports=r(59529)},79685:function(e,t,r){"use strict";r.d(t,{Ue:function(){return f}});let n=e=>{let t;let r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,i={setState:n,getState:o,getInitialState:()=>a,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},a=t=e(n,o,i);return i},o=e=>e?n(e):n;var i=r(14978),a=r(35345);let{useDebugValue:s}=i,{useSyncExternalStoreWithSelector:l}=a,u=!1,c=e=>e,d=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");let t="function"==typeof e?o(e):e,r=(e,r)=>(function(e,t=c,r){r&&!u&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),u=!0);let n=l(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return s(n),n})(t,e,r);return Object.assign(r,t),r},f=e=>e?d(e):d},74595:function(e,t,r){"use strict";function n(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(n=r.getItem(e))?n:null;return i instanceof Promise?i.then(o):o(i)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}r.d(t,{FL:function(){return n},tJ:function(){return s}});let o=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>o(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>o(t)(e)}}},i=(e,t)=>(r,n,i)=>{let a,s,l={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,c=new Set,d=new Set;try{a=l.getStorage()}catch(e){}if(!a)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),r(...e)},n,i);let f=o(l.serialize),v=()=>{let e;let t=l.partialize({...n()}),r=f({state:t,version:l.version}).then(e=>a.setItem(l.name,e)).catch(t=>{e=t});if(e)throw e;return r},h=i.setState;i.setState=(e,t)=>{h(e,t),v()};let p=e((...e)=>{r(...e),v()},n,i),m=()=>{var e;if(!a)return;u=!1,c.forEach(e=>e(n()));let t=(null==(e=l.onRehydrateStorage)?void 0:e.call(l,n()))||void 0;return o(a.getItem.bind(a))(l.name).then(e=>{if(e)return l.deserialize(e)}).then(e=>{if(e){if("number"!=typeof e.version||e.version===l.version)return e.state;if(l.migrate)return l.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(s=l.merge(e,null!=(t=n())?t:p),!0),v()}).then(()=>{null==t||t(s,void 0),u=!0,d.forEach(e=>e(s))}).catch(e=>{null==t||t(void 0,e)})};return i.persist={setOptions:e=>{l={...l,...e},e.getStorage&&(a=e.getStorage())},clearStorage:()=>{null==a||a.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>m(),hasHydrated:()=>u,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},m(),s||p},a=(e,t)=>(r,i,a)=>{let s,l={storage:n(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,c=new Set,d=new Set,f=l.storage;if(!f)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),r(...e)},i,a);let v=()=>{let e=l.partialize({...i()});return f.setItem(l.name,{state:e,version:l.version})},h=a.setState;a.setState=(e,t)=>{h(e,t),v()};let p=e((...e)=>{r(...e),v()},i,a);a.getInitialState=()=>p;let m=()=>{var e,t;if(!f)return;u=!1,c.forEach(e=>{var t;return e(null!=(t=i())?t:p)});let n=(null==(t=l.onRehydrateStorage)?void 0:t.call(l,null!=(e=i())?e:p))||void 0;return o(f.getItem.bind(f))(l.name).then(e=>{if(e){if("number"!=typeof e.version||e.version===l.version)return e.state;if(l.migrate)return l.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(s=l.merge(e,null!=(t=i())?t:p),!0),v()}).then(()=>{null==n||n(s,void 0),s=i(),u=!0,d.forEach(e=>e(s))}).catch(e=>{null==n||n(void 0,e)})};return a.persist={setOptions:e=>{l={...l,...e},e.storage&&(f=e.storage)},clearStorage:()=>{null==f||f.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>m(),hasHydrated:()=>u,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},l.skipHydration||m(),s||p},s=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),i(e,t)):a(e,t)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[737],{49532:function(e,t,n){"use strict";let s,l;async function a(){if(s||(l||(l=fetch("/api/config").then(e=>e.json()).then(e=>s=e.apiBaseUrl)),await l),void 0===s)throw Error("API base URL is undefined");return s}n.d(t,{b:function(){return a}})},15737:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return tl}});var s=n(24004),l=n(14978),a=n(77580);let r=a.env.NEXT_PUBLIC_PROMPTFOO_REMOTE_API_BASE_URL||a.env.NEXT_PUBLIC_PROMPTFOO_BASE_URL||a.env.PROMPTFOO_REMOTE_API_BASE_URL||"https://api.promptfoo.dev",i=a.env.NEXT_PUBLIC_PROMPTFOO_BASE_URL||a.env.PROMPTFOO_REMOTE_APP_BASE_URL||"https://app.promptfoo.dev";a?.stdout?.columns&&a?.stdout?.columns>10&&a?.stdout?.columns;var o=n(49532);let c=(0,l.createContext)(void 0),d=e=>{let{children:t}=e,[n,a]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{let e=e=>{"Shift"===e.key&&a(!0)},t=e=>{"Shift"===e.key&&a(!1)};return window.addEventListener("keydown",e),window.addEventListener("keyup",t),()=>{window.removeEventListener("keydown",e),window.removeEventListener("keyup",t)}},[]),(0,s.jsx)(c.Provider,{value:n,children:t})};var u=n(42671),h=n(6363);let p=(0,l.createContext)(void 0),m=()=>{let e=(0,l.useContext)(p);if(!e)throw Error("useToast must be used within a ToastProvider");return e},x=e=>{let{children:t}=e,[n,a]=(0,l.useState)({message:"",severity:"info",open:!1}),r=()=>{a(e=>({...e,open:!1}))};return(0,s.jsxs)(p.Provider,{value:{showToast:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info";a({message:e,severity:t,open:!0})}},children:[t,(0,s.jsx)(u.Z,{open:n.open,autoHideDuration:6e3,onClose:r,children:(0,s.jsx)(h.Z,{onClose:r,severity:n.severity,children:n.message})})]})};var g=n(52428),v=n(11615),j=n(12594),f=n(28891),b=n(74997),y=n(93179),Z=n(47887),w=n(43205),C=n(5592),k=n(14931),S=n(75307),R=n(17178),I=n(42610),N=n(49567),E=n(40982),P=n(24362),F=n(885),T=n(39813),D=n(1852),M=n(57027),O=n(94941),L=n(36273),A=n(96976),U=n(8508),W=n(34304),z=n(32414),_=n(67339),V=n(65969),B=n(63147),J=n(14059),H=n(23223),K=n(94068),G=n(29794),X=n(22701),q=n(51956),Y=n(82669),$=n(37803),Q=n(65068),ee=n(70417),et=n(21303),en=n(61451),es=n(26485),el=n(30021),ea=n(32162),er=n.n(ea),ei=e=>{let{open:t,onClose:n,recentEvals:a,onRecentEvalSelected:r,title:i,description:o}=e,[c,d]=(0,l.useState)(""),[u,h]=(0,l.useState)(-1),p=l.useRef(null),m=l.useRef(null),x=()=>{n(),d(""),h(-1)},g=a.filter(e=>er()(c.toLowerCase(),e.label.toLowerCase())||"string"==typeof e.description&&er()(c.toLowerCase(),e.description.toLowerCase())),v=e=>{r(e),x()},j=l.useCallback(()=>{if(u>=0&&m.current){let e=m.current.querySelectorAll("tbody tr"),t=Math.min(u+3,e.length-1);e[t]&&e[t].scrollIntoView({behavior:"smooth",block:"nearest"})}},[u]);l.useEffect(()=>{j()},[j]),l.useEffect(()=>{t&&(h(0),setTimeout(()=>{var e;null===(e=p.current)||void 0===e||e.focus()},0))},[t]);let f=l.useId();return(0,s.jsxs)(G.Z,{open:t,onClose:x,maxWidth:"md",fullWidth:!0,children:[i?(0,s.jsx)(Y.Z,{children:i}):null,(0,s.jsxs)(q.Z,{children:[o?(0,s.jsx)(N.Z,{sx:{mb:4},children:o}):null,(0,s.jsxs)(N.Z,{sx:{width:"100%",mt:2},children:[(0,s.jsx)(_.Z,{fullWidth:!0,variant:"outlined",placeholder:"Search",value:c,onChange:e=>{d(e.target.value),h(0)},onKeyDown:e=>{if(e.stopPropagation(),t)switch(e.key){case"ArrowDown":e.preventDefault(),h(e=>Math.min(e+1,g.length-1));break;case"ArrowUp":e.preventDefault(),h(e=>Math.max(e-1,0));break;case"Enter":e.preventDefault(),u>=0&&u<g.length?v(g[u].evalId):g.length>0&&v(g[0].evalId);break;case"Escape":e.preventDefault(),x()}},sx:{mb:2},inputRef:p,id:"eval-selector-search-".concat(f)}),(0,s.jsx)(en.Z,{component:$.Z,sx:{height:"600px",overflow:"auto"},ref:m,children:(0,s.jsxs)(Q.Z,{stickyHeader:!0,children:[(0,s.jsx)(es.Z,{children:(0,s.jsxs)(el.Z,{children:[(0,s.jsx)(et.Z,{children:"Created"}),(0,s.jsx)(et.Z,{children:"Description"}),(0,s.jsx)(et.Z,{children:"# Tests"})]})}),(0,s.jsx)(ee.Z,{children:g.length>0?g.map((e,t)=>(0,s.jsxs)(el.Z,{hover:!0,onClick:()=>v(e.evalId),sx:{cursor:"pointer",backgroundColor:t===u?"rgba(255, 255, 0, 0.1)":"inherit"},children:[(0,s.jsx)(et.Z,{children:new Date(e.createdAt).toLocaleString()}),(0,s.jsx)(et.Z,{children:e.description||e.label}),(0,s.jsx)(et.Z,{children:e.numTests})]},e.evalId)):(0,s.jsx)(el.Z,{children:(0,s.jsx)(et.Z,{colSpan:3,align:"center",sx:{py:4},children:(0,s.jsxs)(N.Z,{sx:{textAlign:"center",color:"text.secondary"},children:[(0,s.jsx)(N.Z,{sx:{fontSize:"3rem",mb:2},children:"\uD83D\uDD0D"}),(0,s.jsx)(B.Z,{variant:"h6",gutterBottom:!0,children:"No evaluations found"}),(0,s.jsx)(B.Z,{variant:"body2",children:"Try adjusting your search or create a new evaluation"})]})})})})]})})]})]}),(0,s.jsx)(X.Z,{children:(0,s.jsx)(E.Z,{onClick:x,children:"Cancel"})})]})},eo=n(37204),ec=n(79685),ed=n(74595);let eu={getItem:async e=>await (0,eo.U2)(e)||null,setItem:async(e,t)=>{await (0,eo.t8)(e,t)},removeItem:async e=>{await (0,eo.IV)(e)}},eh=(0,ec.Ue)()((0,ed.tJ)((e,t)=>({evalId:null,setEvalId:t=>e(()=>({evalId:t})),author:null,setAuthor:t=>e(()=>({author:t})),table:null,setTable:t=>e(()=>({table:t})),config:null,setConfig:t=>e(()=>({config:t})),maxTextLength:250,setMaxTextLength:t=>e(()=>({maxTextLength:t})),wordBreak:"break-word",setWordBreak:t=>e(()=>({wordBreak:t})),showInferenceDetails:!0,setShowInferenceDetails:t=>e(()=>({showInferenceDetails:t})),renderMarkdown:!1,setRenderMarkdown:t=>e(()=>({renderMarkdown:t})),prettifyJson:!1,setPrettifyJson:t=>e(()=>({prettifyJson:t})),showPrompts:!1,setShowPrompts:t=>e(()=>({showPrompts:t})),showPassFail:!0,setShowPassFail:t=>e(()=>({showPassFail:t})),inComparisonMode:!1,setInComparisonMode:t=>e(()=>({inComparisonMode:t}))}),{name:"ResultsViewStorage",storage:(0,ed.FL)(()=>eu)}));var ep=function(e){let{initialEvals:t,onComparisonEvalSelected:n}=e,{evalId:a}=eh(),[r,i]=(0,l.useState)(!1),[c,d]=(0,l.useState)(t),u=async()=>{try{let e=await (0,o.b)(),n=a||t[0].evalId,s=await fetch("".concat(e,"/api/results/").concat(n),{cache:"no-store"}),l=await s.json(),r=l.data.datasetId;if(!r){console.error("No datasetId found for current eval "+n);return}let i=await fetch("".concat(e,"/api/results?datasetId=").concat(r),{cache:"no-store"}),c=await i.json();d(c.data.filter(e=>e.evalId!==n))}catch(e){console.error("Error fetching recent evals:",e)}},h=()=>{i(!1)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(V.Z,{title:"Combine this eval with another eval run",placement:"left",children:(0,s.jsxs)(A.Z,{onClick:()=>{u(),i(!0)},children:[(0,s.jsx)(M.Z,{children:(0,s.jsx)(K.Z,{fontSize:"small"})}),(0,s.jsx)(O.Z,{children:"Compare with another eval"})]})}),(0,s.jsx)(ei,{open:r,onClose:h,recentEvals:c,onRecentEvalSelected:e=>{n(e),h()},title:"Select an eval to compare",description:"Only evals with the same dataset can be compared."})]})},em=n(26110),ex=n(48931),eg=n(99645),ev=n(77656);function ej(e){let{open:t,onClose:a}=e,{config:r}=eh(),i=l.useRef(null),[o,c]=l.useState(!1),[d,u]=l.useState("");l.useEffect(()=>{t&&(async()=>{let{default:e}=await Promise.resolve().then(n.bind(n,34235));u(e.dump(r))})()},[t,r]);let h=()=>{c(!1),a()};return(0,s.jsxs)(G.Z,{open:t,onClose:h,"aria-labelledby":"config-dialog-title",maxWidth:"md",fullWidth:!0,children:[(0,s.jsx)(Y.Z,{id:"config-dialog-title",children:(0,s.jsxs)(N.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,s.jsx)(B.Z,{variant:"h6",style:{flexGrow:1},children:"Config"}),(0,s.jsxs)(N.Z,{children:[(0,s.jsx)(V.Z,{title:"Copy to clipboard",children:(0,s.jsx)(ev.Z,{onClick:()=>{i.current&&(i.current.select(),document.execCommand("copy"),c(!0))},children:o?(0,s.jsx)(em.Z,{}):(0,s.jsx)(eg.Z,{})})}),(0,s.jsx)(V.Z,{title:"Download .yaml",children:(0,s.jsx)(ev.Z,{onClick:()=>{let e=new Blob([d],{type:"text/yaml;charset=utf-8"}),t=URL.createObjectURL(e),n=document.createElement("a");n.href=t,n.download="config.yaml",document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)},children:(0,s.jsx)(ex.Z,{})})})]})]})}),(0,s.jsx)(q.Z,{children:(0,s.jsx)(B.Z,{variant:"body1",component:"div",children:(0,s.jsx)("textarea",{ref:i,readOnly:!0,value:d,style:{width:"100%",minHeight:"400px",fontFamily:"monospace",border:"1px solid #ccc"}})})}),(0,s.jsx)(X.Z,{children:(0,s.jsx)(E.Z,{onClick:h,color:"primary",children:"Close"})})]})}var ef=n(79715),eb=n(34235),ey=function(){let{table:e,config:t,evalId:n}=eh(),[a,r]=l.useState(!1),i=(e,t)=>{let n=URL.createObjectURL(e),s=document.createElement("a");s.href=n,s.download=t,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(n)},o=()=>{r(!1)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(A.Z,{onClick:()=>{r(!0)},children:[(0,s.jsx)(M.Z,{children:(0,s.jsx)(ex.Z,{fontSize:"small"})}),(0,s.jsx)(O.Z,{children:"Download"})]}),(0,s.jsx)(G.Z,{onClose:o,open:a,children:(0,s.jsx)(q.Z,{children:(0,s.jsxs)(z.Z,{direction:"column",spacing:2,sx:{width:"100%"},children:[(0,s.jsx)(E.Z,{onClick:()=>{let e=eb.default.dump(t),n=new Blob([e],{type:"text/yaml;charset=utf-8"});i(n,"promptfooconfig.yaml"),o()},startIcon:(0,s.jsx)(ex.Z,{}),fullWidth:!0,sx:{justifyContent:"flex-start"},children:"Download YAML Config"}),(0,s.jsx)(E.Z,{onClick:()=>{if(!e){alert("No table data");return}let t=[],s=[...e.head.vars,...e.head.prompts.map(e=>"[".concat(e.provider,"] ").concat(e.label))];t.push(s),e.body.forEach(e=>{let n=[...e.vars,...e.outputs.map(e=>{let{pass:t,text:n}=e;return(t?"[PASS] ":"[FAIL] ")+n})];t.push(n)});let l=(0,ef.P)(t),a=new Blob([l],{type:"text/csv;charset=utf-8;"});i(a,"".concat(n,"-table.csv")),o()},startIcon:(0,s.jsx)(ex.Z,{}),fullWidth:!0,sx:{justifyContent:"flex-start"},children:"Download Table CSV"}),(0,s.jsx)(E.Z,{onClick:()=>{if(!e){alert("No table data");return}let t=new Blob([JSON.stringify(e,null,2)],{type:"application/json"});i(t,"".concat(n,"-table.json")),o()},startIcon:(0,s.jsx)(ex.Z,{}),fullWidth:!0,sx:{justifyContent:"flex-start"},children:"Download Table JSON"}),(0,s.jsx)(E.Z,{onClick:()=>{if(!e){alert("No table data");return}let t=e.body.map((t,n)=>({chosen:t.outputs.filter(e=>e.pass).map(e=>e.text),rejected:t.outputs.filter(e=>!e.pass).map(e=>e.text),vars:t.test.vars,providers:e.head.prompts.map(e=>e.provider),prompts:e.head.prompts.map(e=>e.label||e.display||e.raw)})),s=new Blob([JSON.stringify(t,null,2)],{type:"application/json"});i(s,"".concat(n,"-dpo.json")),o()},startIcon:(0,s.jsx)(ex.Z,{}),fullWidth:!0,sx:{justifyContent:"flex-start"},children:"Download DPO JSON"})]})})})]})},eZ=n(49653),ew=e=>{let{recentEvals:t,onRecentEvalSelected:n,currentEval:a}=e,[r,i]=(0,l.useState)(!1),o="undefined"!=typeof navigator&&-1!==navigator.platform.toUpperCase().indexOf("MAC"),c=()=>{i(!0)};return l.useEffect(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),c())};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(V.Z,{title:o?"Search for Evals (⌘ + K)":"Search for Evals (Ctrl + K)",arrow:!0,children:(0,s.jsx)(ev.Z,{onClick:c,color:"primary",size:"small",children:(0,s.jsx)(eZ.Z,{})})}),(0,s.jsx)(ei,{title:"Open an Eval",open:r,onClose:()=>{i(!1)},recentEvals:t,onRecentEvalSelected:n})]})},eC=n(69179),ek=n(92715),eS=n(92863),eR=n(36001);let eI=["#fd7f6f","#7eb0d5","#b2e061","#bd7ebe","#ffb55a","#ffee65","#beb9db","#fdcce5","#8bd3c7"];function eN(e){let{table:t}=e,n=(0,l.useRef)(null),a=(0,l.useRef)(null);return(0,l.useEffect)(()=>{if(!n.current)return;a.current&&a.current.destroy();let e=t.body.flatMap(e=>e.outputs.map(e=>e.score)),s=Math.min(...e),l=(Math.ceil(Math.max(...e))-Math.floor(s))/10,r=Array.from({length:11},(e,t)=>parseFloat((Math.floor(s)+t*l).toFixed(2))),i=t.head.prompts.map((e,n)=>{let s=t.body.flatMap(e=>e.outputs[n].score),a=r.map(e=>s.filter(t=>t>=e&&t<e+l).length);return{label:"Column ".concat(n+1),data:a,backgroundColor:eI[n%eI.length]}});a.current=new eR.kL(n.current,{type:"bar",data:{labels:r,datasets:i},options:{animation:!1,plugins:{title:{display:!0,text:"Score Distribution"},legend:{display:!1},tooltip:{callbacks:{title:function(e){let t=e[0].datasetIndex;return"Column ".concat(t+1)},label:function(e){let t=e.dataIndex,n=r[t],s=r[t+1];return s?"".concat(n," <= score < ").concat(s):"".concat(n," <= score")}}}}}})},[t]),(0,s.jsx)("canvas",{ref:n,style:{maxHeight:"300px"}})}function eE(e){let{table:t}=e,n=(0,l.useRef)(null),a=(0,l.useRef)(null);return(0,l.useEffect)(()=>{if(!n.current)return;a.current&&a.current.destroy();let e=t.head.prompts.map((e,n)=>{let s=t.body.flatMap(e=>e.outputs[n]),l=s.filter(e=>e.pass).length,a=l/s.length*100;return{label:"Column ".concat(n+1),data:[a],backgroundColor:eI[n%eI.length]}});a.current=new eR.kL(n.current,{type:"bar",data:{labels:["Pass Rate (%)"],datasets:e},options:{animation:!1,plugins:{title:{display:!0,text:"Pass rate"},legend:{display:!0}}}})},[t]),(0,s.jsx)("canvas",{ref:n,style:{maxHeight:"300px"}})}function eP(e){let{table:t}=e,n=(0,l.useRef)(null),a=(0,l.useRef)(null),[r,i]=(0,l.useState)(0),[o,c]=(0,l.useState)(1),[d,u]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{if(!n.current)return;a.current&&a.current.destroy();let e=t.body.flatMap(e=>e.outputs.map(e=>e.score)),s=Math.min(...e),l=Math.max(...e),i=t.body.map(e=>{let t=e.outputs[r].score,n=e.outputs[o].score;return{x:t,y:n,backgroundColor:n>t?"green":n<t?"red":"gray"}});a.current=new eR.kL(n.current,{type:"scatter",data:{datasets:[{data:i,backgroundColor:i.map(e=>e.backgroundColor)},{type:"line",data:[{x:s,y:s},{x:l,y:l}],borderColor:"gray",borderWidth:1,borderDash:[5,5],pointRadius:0}]},options:{animation:!1,plugins:{legend:{display:!1},tooltip:{callbacks:{label:function(e){let n=t.body[e.dataIndex],s=n.outputs[0].text,l=n.outputs[1].text;return s.length>30&&(s=s.substring(0,30)+"..."),l.length>30&&(l=l.substring(0,30)+"..."),"Output 1: ".concat(s,"\nOutput 2: ").concat(l)}}}},scales:{x:{title:{display:!0,text:"Prompt ".concat(r+1," Score")},ticks:{callback:function(e,t,n){let s=String(Math.round(100*Number(e)));return t===n.length-1&&(s+="%"),s}}},y:{title:{display:!0,text:"Prompt ".concat(o+1," Score")},ticks:{callback:function(e,t,n){let s=String(Math.round(100*Number(e)));return t===n.length-1&&(s+="%"),s}}}}}})},[t,r,o]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(G.Z,{open:d,onClose:()=>u(!1),children:[(0,s.jsx)(Y.Z,{children:"Compare prompt outputs"}),(0,s.jsxs)(q.Z,{children:[(0,s.jsx)(T.Z,{sx:{m:1,minWidth:120},children:(0,s.jsx)(W.Z,{value:r,onChange:e=>i(Number(e.target.value)),children:t.head.prompts.map((e,t)=>(0,s.jsxs)(A.Z,{value:t,children:["Prompt ",t+1]},t))})}),(0,s.jsx)(T.Z,{sx:{m:1,minWidth:120},children:(0,s.jsx)(W.Z,{value:o,onChange:e=>c(Number(e.target.value)),children:t.head.prompts.map((e,t)=>(0,s.jsxs)(A.Z,{value:t,children:["Prompt ",t+1]},t))})})]})]}),(0,s.jsx)("canvas",{ref:n,style:{maxHeight:"300px",cursor:"pointer"},onClick:()=>u(!0)})]})}function eF(e){let{table:t}=e,n=(0,l.useRef)(null),a=(0,l.useRef)(null);return(0,l.useEffect)(()=>{var e;if(!n.current)return;a.current&&a.current.destroy();let s=Object.keys((null===(e=t.head.prompts[0].metrics)||void 0===e?void 0:e.namedScores)||{}),l=t.head.prompts.map((e,n)=>{let l=s.map(n=>{var s;let l=(null===(s=e.metrics)||void 0===s?void 0:s.namedScores[n])||0,a=Math.max(...t.head.prompts.map(e=>{var t;return(null===(t=e.metrics)||void 0===t?void 0:t.namedScores[n])||0}));return l/a});return{label:"".concat(t.head.prompts[n].provider),data:l,backgroundColor:eI[n%eI.length]}});a.current=new eR.kL(n.current,{type:"bar",data:{labels:s,datasets:l},options:{scales:{x:{grid:{display:!1}},y:{ticks:{callback:function(e,t,n){let s=String(Math.round(100*Number(e)));return t===n.length-1&&(s+="%"),s}}}},plugins:{tooltip:{callbacks:{title:function(e){return e[0].dataset.label},label:function(e){let t=e.parsed.y;return"".concat(s[e.dataIndex],": ").concat((100*t).toFixed(2),"% pass rate")}}}}}})},[t]),(0,s.jsx)("canvas",{ref:n,style:{maxHeight:"300px"}})}eR.kL.register(eR.vn,eR.ST,eR.ho,eR.uw,eR.f$,eR.ZL,eR.jn,eR.od,eR.u,eR.wL);var eT=l.memo(function(e){var t;let{columnVisibility:n}=e,a=(0,eS.Z)();eR.kL.defaults.color="dark"===a.palette.mode?"#aaa":"#666";let[r,i]=(0,l.useState)(!0),{table:o}=eh();if(!o||!r||o.head.prompts.length<2)return null;let c=o.body.flatMap(e=>e.outputs.map(e=>e.score)),d=new Set(c);return 1===d.size?null:(0,s.jsx)(eC.SV,{fallback:null,children:(0,s.jsxs)($.Z,{style:{position:"relative",padding:a.spacing(3)},children:[(0,s.jsx)(ev.Z,{style:{position:"absolute",right:0,top:0},onClick:()=>i(!1),children:(0,s.jsx)(ek.Z,{})}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",width:"100%"},children:[(0,s.jsx)("div",{style:{width:"33%"},children:(0,s.jsx)(eE,{table:o})}),(0,s.jsx)("div",{style:{width:"33%"},children:d.size<=3&&Object.keys((null===(t=o.head.prompts[0].metrics)||void 0===t?void 0:t.namedScores)||{}).length>1?(0,s.jsx)(eF,{table:o}):(0,s.jsx)(eN,{table:o})}),(0,s.jsx)("div",{style:{width:"33%"},children:(0,s.jsx)(eP,{table:o})})]})]})})}),eD=n(36128),eM=n(9317),eO=n(20286);n(55974);var eL=e=>{let{lookup:t,metricTotals:n,onSearchTextChange:l}=e;return t&&Object.keys(t).length?(0,s.jsx)("div",{className:"custom-metric-container",children:Object.entries(t).map(e=>{let[t,a]=e;return t&&void 0!==a?(0,s.jsxs)("span",{onClick:()=>l&&l("metric=".concat(t,":[^0]")),className:l?"clickable":"",children:[t,":"," ",n&&n[t]?(0,s.jsxs)(s.Fragment,{children:[(a/n[t]*100).toFixed(2),"% (",a,"/",n[t],")"]}):a]},t):null})}):null},eA=n(35185),eU=n(613);function eW(e){let{gradingResults:t}=e;return t?(0,s.jsxs)(N.Z,{mt:2,children:[(0,s.jsx)(B.Z,{variant:"subtitle1",children:"Assertions"}),(0,s.jsx)(en.Z,{children:(0,s.jsxs)(Q.Z,{children:[(0,s.jsx)(es.Z,{children:(0,s.jsxs)(el.Z,{children:[(0,s.jsx)(et.Z,{style:{fontWeight:"bold"},children:"Pass"}),(0,s.jsx)(et.Z,{style:{fontWeight:"bold"},children:"Score"}),(0,s.jsx)(et.Z,{style:{fontWeight:"bold"},children:"Type"}),(0,s.jsx)(et.Z,{style:{fontWeight:"bold"},children:"Value"}),(0,s.jsx)(et.Z,{style:{fontWeight:"bold"},children:"Reason"})]})}),(0,s.jsx)(ee.Z,{children:t.map((e,t)=>{var n,l,a;return e?(0,s.jsxs)(el.Z,{children:[(0,s.jsx)(et.Z,{children:e.pass?"✅":"❌"}),(0,s.jsx)(et.Z,{children:null===(n=e.score)||void 0===n?void 0:n.toFixed(2)}),(0,s.jsx)(et.Z,{children:(null===(l=e.assertion)||void 0===l?void 0:l.type)||""}),(0,s.jsx)(et.Z,{style:{whiteSpace:"pre-wrap"},children:(null===(a=e.assertion)||void 0===a?void 0:a.value)?String(e.assertion.value):"-"}),(0,s.jsx)(et.Z,{style:{whiteSpace:"pre-wrap"},children:e.reason})]},t):null})})]})})]}):null}function ez(e){let{open:t,onClose:n,prompt:a,provider:r,output:i,gradingResults:o,metadata:c}=e,[d,u]=(0,l.useState)(!1);(0,l.useEffect)(()=>{u(!1)},[a]);let h=async e=>{await navigator.clipboard.writeText(e),u(!0)};return(0,s.jsxs)(G.Z,{open:t,onClose:n,fullWidth:!0,maxWidth:"lg",children:[(0,s.jsxs)(Y.Z,{children:["Details",r&&": ".concat(r)]}),(0,s.jsxs)(q.Z,{children:[(0,s.jsxs)(N.Z,{mb:2,children:[(0,s.jsx)(B.Z,{variant:"subtitle1",style:{marginBottom:"1rem"},children:"Prompt"}),(0,s.jsx)(eU.u,{readOnly:!0,value:a,style:{width:"100%",padding:"0.75rem"},maxRows:20}),(0,s.jsx)(ev.Z,{onClick:()=>h(a),style:{position:"absolute",right:"10px",top:"10px"},children:d?(0,s.jsx)(em.Z,{}):(0,s.jsx)(eA.Z,{})})]}),(null==c?void 0:c.redteamFinalPrompt)&&(0,s.jsxs)(N.Z,{my:2,children:[(0,s.jsx)(B.Z,{variant:"subtitle1",style:{marginBottom:"1rem",marginTop:"1rem"},children:"Modified User Input (Red Team)"}),(0,s.jsx)(eU.u,{readOnly:!0,maxRows:20,value:c.redteamFinalPrompt,style:{width:"100%",padding:"0.75rem"}})]}),i&&(0,s.jsxs)(N.Z,{my:2,children:[(0,s.jsx)(B.Z,{variant:"subtitle1",style:{marginBottom:"1rem",marginTop:"1rem"},children:"Output"}),(0,s.jsx)(eU.u,{readOnly:!0,maxRows:20,value:i,style:{width:"100%",padding:"0.75rem"}})]}),(0,s.jsx)(eW,{gradingResults:o})]}),(0,s.jsx)(X.Z,{children:(0,s.jsx)(E.Z,{onClick:n,children:"Close"})})]})}var e_=n(12431),eV=n(8541),eB=function(){let e=(0,eS.Z)(),[t,n]=l.useState(!1),a=()=>{n(!1)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{style:{textAlign:"center",marginTop:20,marginBottom:40},children:(0,s.jsx)(E.Z,{variant:"text",color:"primary",startIcon:(0,s.jsx)(e_.Z,{}),onClick:()=>{n(!0)},children:"Generate test cases"})}),(0,s.jsxs)(G.Z,{open:t,onClose:a,children:[(0,s.jsx)(Y.Z,{children:"Run on Command Line"}),(0,s.jsx)(q.Z,{children:(0,s.jsxs)(eV.Z,{children:[(0,s.jsx)("p",{children:"This feature is in beta. UI coming soon."}),(0,s.jsxs)("p",{children:["Run"," ",(0,s.jsx)(N.Z,{component:"code",sx:{backgroundColor:"dark"===e.palette.mode?"#424242":"#f0f0f0",padding:"2px 4px",borderRadius:"4px"},children:"promptfoo generate dataset"}),"to generate test cases on the command line."]})]})}),(0,s.jsx)(X.Z,{children:(0,s.jsx)(E.Z,{onClick:a,color:"primary",children:"Close"})})]})]})};function eJ(e){return"string"==typeof e||"number"==typeof e?e.toString().length:Array.isArray(e)?e.reduce((e,t)=>e+eJ(t),0):l.isValidElement(e)&&e.props.children?l.Children.toArray(e.props.children).reduce((e,t)=>e+eJ(t),0):0}let eH=l.memo(function(e){let t,{text:n,maxLength:a}=e,[r,i]=l.useState(!0),o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if("string"==typeof e||"number"==typeof e){let n=e.toString();return n.slice(0,a-t)}if(Array.isArray(e)){let n=[],s=t;for(let t of e){let e=eJ(t);if(s+e>a){n.push(o(t,s));break}n.push(t),s+=e}return n}if(l.isValidElement(e)&&e.props.children){let n=eJ(e.props.children);if(n>a-t)return l.cloneElement(e,{...e.props,children:o(e.props.children,t)})}return e};t=l.isValidElement(n)||"string"==typeof n?n:JSON.stringify(n);let c=r?o(t):t,d=eJ(t)>a;return(0,s.jsxs)("div",{style:{cursor:d?"pointer":"normal"},onClick:()=>{i(!r)},children:[c,r&&eJ(t)>a&&(0,s.jsx)("span",{children:"..."})]})});var eK=n(59682),eG=n(62268),eX=n(38640),eq=n.n(eX),eY=n(33352),e$=n(73490),eQ=n(24495);n(16658);var e0=e=>{let{failReasons:t}=e,[n,a]=(0,l.useState)(0);return t.length<1?null:(0,s.jsxs)("div",{className:"fail-reason",children:[t.length>1&&(0,s.jsxs)("span",{className:"fail-reason-carousel-controls",children:[(0,s.jsx)(ev.Z,{onClick:()=>{a(e=>e>0?e-1:t.length-1)},children:(0,s.jsx)(e$.Z,{sx:{fontSize:12}})}),(0,s.jsxs)("span",{children:[n+1,"/",t.length]}),(0,s.jsx)(ev.Z,{onClick:()=>{a(e=>e<t.length-1?e+1:0)},children:(0,s.jsx)(eQ.Z,{sx:{fontSize:12}})})]}),t[n].trim().split("\n").map((e,t)=>(0,s.jsxs)(l.Fragment,{children:[e,(0,s.jsx)("br",{})]},t))]})},e1=e=>{let{open:t,contextText:n,commentText:l,onClose:a,onSave:r,onChange:i}=e;return(0,s.jsxs)(G.Z,{open:t,onClose:a,fullWidth:!0,maxWidth:"sm",children:[(0,s.jsx)(Y.Z,{children:"Edit Comment"}),(0,s.jsxs)(q.Z,{children:[(0,s.jsx)(N.Z,{sx:{backgroundColor:"#f0f0f0",padding:2,marginBottom:2},children:n}),(0,s.jsx)(_.Z,{autoFocus:!0,margin:"dense",type:"text",fullWidth:!0,multiline:!0,rows:4,value:l,onChange:e=>i(e.target.value)})]}),(0,s.jsxs)(X.Z,{children:[(0,s.jsx)(E.Z,{onClick:r,color:"primary",variant:"contained",children:"Save"}),(0,s.jsx)(E.Z,{onClick:a,color:"primary",children:"Cancel"})]})]})};let e2=()=>{let e=(0,l.useContext)(c);if(void 0===e)throw Error("useShiftKey must be used within a ShiftKeyProvider");return e};var e3=n(19116);let e5=l.memo(function(e){var t,n,a,r,i,o,c,d,u,h,p,m,x;let g,v,j,f,b,y,{output:Z,maxTextLength:w,rowIndex:C,promptIndex:k,onRating:S,firstOutput:R,showDiffs:I,searchText:N,showStats:E}=e,{renderMarkdown:P,prettifyJson:F,showPrompts:T,showPassFail:D,inComparisonMode:M}=eh(),[O,L]=l.useState(!1),[A,U]=l.useState(!1),[W,z]=l.useState(null),_=e=>{z(e||null),U(!A)},[B,J]=l.useState(!1),[H,K]=l.useState((null===(t=Z.gradingResult)||void 0===t?void 0:t.comment)||""),G=()=>{J(!0)},X="string"==typeof Z.text?Z.text:JSON.stringify(Z.text),q=[];if(!Z.pass&&X.includes("---")&&(q=((null===(h=Z.gradingResult)||void 0===h?void 0:h.componentResults)||[]).filter(e=>!!e&&!e.pass).map(e=>e.reason),X=X.split("---").slice(1).join("---")),I&&R){let e,t="string"==typeof R.text?R.text:JSON.stringify(R.text);t.includes("---")&&(t=t.split("---").slice(1).join("---"));try{JSON.parse(t),JSON.parse(X),e=(0,e3.CT)(t,X)}catch(n){e=t.includes(". ")&&X.includes(". ")?(0,e3.SY)(t,X):(0,e3.NV)(t,X)}g=(0,s.jsx)(s.Fragment,{children:e.map((e,t)=>e.added?(0,s.jsx)("ins",{children:e.value},t):e.removed?(0,s.jsx)("del",{children:e.value},t):(0,s.jsx)("span",{children:e.value},t))})}if(N)try{let e;let t=RegExp(N,"gi"),n=[];for(;null!==(e=t.exec(X));)n.push({start:e.index,end:t.lastIndex});g=(0,s.jsx)(s.Fragment,{children:n.length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{children:X.substring(0,n[0].start)},"text-before"),n.map((e,t)=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"search-highlight",children:X.substring(e.start,e.end)},"match-"+t),(0,s.jsx)("span",{children:X.substring(e.end,n[t+1]?n[t+1].start:X.length)},"text-after-"+t)]}))]}):(0,s.jsx)("span",{children:X},"no-match")})}catch(e){console.error("Invalid regular expression:",e.message)}else if(P&&!I)g=(0,s.jsx)(eO.U,{remarkPlugins:[eY.Z],components:{img:e=>{let{src:t,alt:n}=e;return(0,s.jsx)("img",{loading:"lazy",src:t,alt:n,onClick:()=>_(t),style:{cursor:"pointer"}})}},children:X});else if(F)try{g=(0,s.jsx)("pre",{children:JSON.stringify(JSON.parse(X),null,2)})}catch(e){}let Y=l.useCallback(e=>{var t;S(e,void 0,null===(t=Z.gradingResult)||void 0===t?void 0:t.comment)},[S,null===(n=Z.gradingResult)||void 0===n?void 0:n.comment]),$=l.useCallback(()=>{let e=prompt("Set test score (0.0 - 1.0):",String(Z.score));if(null!==e){let n=parseFloat(e);if(!isNaN(n)&&n>=0&&n<=1){var t;S(void 0,n,null===(t=Z.gradingResult)||void 0===t?void 0:t.comment)}else alert("Invalid score. Please enter a value between 0.0 and 1.0.")}},[S,Z.score,null===(a=Z.gradingResult)||void 0===a?void 0:a.comment]),[Q,ee]=l.useState(!1),et=l.useCallback(()=>{navigator.clipboard.writeText(Z.text),ee(!0)},[Z.text]);if(Z.latencyMs&&(j=(0,s.jsxs)("span",{children:[Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(Z.latencyMs)," ms"]})),null===(r=Z.tokenUsage)||void 0===r?void 0:r.completion){let e=Z.tokenUsage.completion/(Z.latencyMs/1e3);f=(0,s.jsx)("span",{children:Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(e)})}if(Z.cost&&(b=(0,s.jsxs)("span",{children:["$",Z.cost.toPrecision(2)]})),null===(i=Z.tokenUsage)||void 0===i?void 0:i.cached)v=(0,s.jsxs)("span",{children:[Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(Z.tokenUsage.cached)," ","(cached)"]});else if(null===(o=Z.tokenUsage)||void 0===o?void 0:o.total){let e=Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(null!==(p=Z.tokenUsage.prompt)&&void 0!==p?p:0),t=Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(null!==(m=Z.tokenUsage.completion)&&void 0!==m?m:0),n=Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(Z.tokenUsage.total);v=(0,s.jsx)(V.Z,{title:"".concat(e," prompt tokens + ").concat(t," completion tokens = ").concat(n," total"),children:(0,s.jsxs)("span",{children:[n,("0"!==e||"0"!==t)&&" (".concat(e,"+").concat(t,")")]})})}let en=(null===(c=Z.gradingResult)||void 0===c?void 0:c.comment)&&"!highlight"!==Z.gradingResult.comment?(0,s.jsx)("div",{className:"comment",onClick:G,children:Z.gradingResult.comment}):null,es=E?(0,s.jsxs)("div",{className:"cell-detail",children:[v&&(0,s.jsxs)("div",{className:"stat-item",children:[(0,s.jsx)("strong",{children:"Tokens:"})," ",v]}),j&&(0,s.jsxs)("div",{className:"stat-item",children:[(0,s.jsx)("strong",{children:"Latency:"})," ",j]}),f&&(0,s.jsxs)("div",{className:"stat-item",children:[(0,s.jsx)("strong",{children:"Tokens/Sec:"})," ",f]}),b&&(0,s.jsxs)("div",{className:"stat-item",children:[(0,s.jsx)("strong",{children:"Cost:"})," ",b]})]}):null,el=e2(),ea=(0,s.jsxs)("div",{className:"cell-actions",children:[el&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"action",onClick:et,onMouseDown:e=>e.preventDefault(),children:(0,s.jsx)(V.Z,{title:"Copy output to clipboard",children:(0,s.jsx)("span",{children:Q?"✅":"\uD83D\uDCCB"})})}),(0,s.jsx)("span",{className:"action",onClick:()=>{let e;H.startsWith("!highlight")?S(void 0,void 0,e=H.slice(10).trim()):S(void 0,void 0,e=("!highlight "+H).trim()),K(e)},onMouseDown:e=>e.preventDefault(),children:(0,s.jsx)(V.Z,{title:"Toggle test highlight",children:(0,s.jsx)("span",{children:"\uD83C\uDF1F"})})})]}),Z.prompt&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"action",onClick:()=>{L(!0)},children:(0,s.jsx)(V.Z,{title:"View output and test details",children:(0,s.jsx)("span",{children:"\uD83D\uDD0E"})})}),(0,s.jsx)(ez,{open:O,onClose:()=>{L(!1)},prompt:Z.prompt,provider:Z.provider,gradingResults:null===(d=Z.gradingResult)||void 0===d?void 0:d.componentResults,output:X,metadata:Z.metadata})]}),(0,s.jsx)("span",{className:"action",onClick:()=>Y(!0),children:(0,s.jsx)(V.Z,{title:"Mark test passed (score 1.0)",children:(0,s.jsx)("span",{children:"\uD83D\uDC4D"})})}),(0,s.jsx)("span",{className:"action",onClick:()=>Y(!1),children:(0,s.jsx)(V.Z,{title:"Mark test failed (score 0.0)",children:(0,s.jsx)("span",{children:"\uD83D\uDC4E"})})}),(0,s.jsx)("span",{className:"action",onClick:$,children:(0,s.jsx)(V.Z,{title:"Set test score",children:(0,s.jsx)("span",{children:"\uD83D\uDD22"})})}),(0,s.jsx)("span",{className:"action",onClick:G,children:(0,s.jsx)(V.Z,{title:"Edit comment",children:(0,s.jsx)("span",{children:"✏️"})})})]}),er={};(null===(u=Z.gradingResult)||void 0===u?void 0:u.comment)==="!highlight"&&(er.backgroundColor="#ffffeb");let ei=0,eo=0,ec=Z.gradingResult;if(ec?ec.componentResults?ec.componentResults.forEach(e=>{(null==e?void 0:e.pass)?ei++:eo++}):(ei=ec.pass?1:0,eo=ec.pass?0:1):Z.pass?ei=1:Z.pass||(eo=1),1===eo&&1===ei)y=(0,s.jsxs)(s.Fragment,{children:["".concat(eo," FAIL")," ","".concat(ei," PASS")]});else{let e="";eo>1||ei>1&&eo>0?e="".concat(eo," FAIL"):1===eo&&(e="FAIL");let t="";ei>1||eo>1&&ei>0?t="".concat(ei," PASS"):1===ei&&0===eo&&(t="PASS");let n=e&&t?" ":"";y=(0,s.jsxs)(s.Fragment,{children:[e,n,t]})}let ed=null===(x=Z.score)||0===x||1===x?"":"(".concat(x.toFixed(2),")");return(0,s.jsxs)("div",{className:"cell",style:er,children:[D&&(0,s.jsx)(s.Fragment,{children:Z.pass?(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"status pass",children:[(0,s.jsxs)("div",{className:"pill",children:[y,ed&&(0,s.jsxs)("span",{className:"score",children:[" ",ed]})]}),(0,s.jsx)(eL,{lookup:Z.namedScores})]})}):(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"status fail",children:[(0,s.jsxs)("div",{className:"pill",children:[y,ed&&(0,s.jsxs)("span",{className:"score",children:[" ",ed]})]}),(0,s.jsx)(eL,{lookup:Z.namedScores}),(0,s.jsx)("span",{className:"fail-reason",children:(0,s.jsx)(e0,{failReasons:q})})]})})}),T&&R.prompt&&(0,s.jsxs)("div",{className:"prompt",children:[(0,s.jsx)("span",{className:"pill",children:"Prompt"}),Z.prompt]}),(0,s.jsx)(eH,{text:g||X,maxLength:w}),en,es,ea,A&&W&&(0,s.jsx)("div",{className:"lightbox",onClick:()=>_(),children:(0,s.jsx)("img",{src:W,alt:"Lightbox"})}),(0,s.jsx)(e1,{open:B,contextText:Z.text,commentText:H,onClose:()=>{J(!1)},onSave:()=>{S(void 0,void 0,H),J(!1)},onChange:K})]})});function e4(e){let{text:t,maxLength:n,expandedText:a,resourceId:r,className:i}=e,[o,c]=l.useState(!1);return(0,s.jsxs)("div",{className:"".concat(i||""),children:[(0,s.jsx)(eH,{text:t,maxLength:n}),a&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(V.Z,{title:"View prompt",children:(0,s.jsx)("span",{className:"action",onClick:()=>{c(!0)},children:"\uD83D\uDD0E"})}),(0,s.jsx)(ez,{open:o,onClose:()=>{c(!1)},prompt:a}),r&&(0,s.jsx)(V.Z,{title:"View other evals and datasets for this prompt",children:(0,s.jsx)("span",{className:"action",children:(0,s.jsx)(eq(),{href:"/prompts/?id=".concat(r),target:"_blank",children:(0,s.jsx)(eK.Z,{fontSize:"small"})})})})]})]})}n(93207);var e7=l.memo(function(e){let{maxTextLength:t,columnVisibility:n,wordBreak:a,filterMode:r,failureFilter:i,searchText:c,showStats:d,onFailureFilterToggle:u,onSearchTextChange:h}=e,{evalId:p,table:x,setTable:g,inComparisonMode:v}=eh(),{showToast:j}=m();(0,y.Z)(x,"Table should be defined");let{head:f,body:b}=x,Z=l.useCallback(async(e,t,n,s,l)=>{var a,r;let i=[...b],c={...i[e]},d=[...c.outputs],u=null!=n?n:d[t].pass,h=void 0===s?n?1:0:s||0;d[t].pass=u,d[t].score=h;let m=(null===(a=d[t].gradingResult)||void 0===a?void 0:a.componentResults)||[];if(void 0!==n){let e=m.findIndex(e=>{var t;return(null===(t=e.assertion)||void 0===t?void 0:t.type)==="human"}),t={pass:u,score:h,reason:"Manual result (overrides all other grading results)",comment:l,assertion:{type:"human"}};-1!==e?m[e]=t:m.push(t)}let x={...d[t].gradingResult||{},pass:u,score:h,reason:"Manual result (overrides all other grading results)",comment:l,assertion:(null===(r=d[t].gradingResult)||void 0===r?void 0:r.assertion)||null,componentResults:m};d[t].gradingResult=x,c.outputs=d,i[e]=c;let y={head:f,body:i};if(g(y),v)j("Ratings are not saved in comparison mode","warning");else try{let e=await fetch("".concat(await (0,o.b)(),"/api/eval/").concat(p),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({table:y})});if(!e.ok)throw Error("Network response was not ok")}catch(e){console.error("Failed to update table:",e)}},[b,f,g,p,v,j]),w=Object.keys(n).length>0,C=l.useMemo(()=>{try{return RegExp(c,"i")}catch(e){return console.error("Invalid regular expression:",e.message),null}},[c]),k=l.useMemo(()=>{try{return b.map((e,t)=>({...e,outputs:e.outputs.map((e,n)=>({...e,originalRowIndex:t,originalPromptIndex:n}))})).filter(e=>{let t=!0;return"failures"===r?t=e.outputs.some((e,t)=>{let s="Prompt ".concat(t+1);return i[s]&&!e.pass&&(!w||n[s])}):"different"===r?t=!e.outputs.every(t=>t.text===e.outputs[0].text):"highlights"===r&&(console.log(e.outputs[0].text),t=e.outputs.some(e=>{var t,n;return null===(n=e.gradingResult)||void 0===n?void 0:null===(t=n.comment)||void 0===t?void 0:t.startsWith("!highlight")})),!!t&&(!c||!C||e.outputs.some(t=>{var n,s;let l=e.vars.map(e=>"var=".concat(e)).join(" "),a="".concat(t.text," ").concat(Object.keys(t.namedScores).map(e=>"metric=".concat(e,":").concat(t.namedScores[e])).join(" ")," ").concat((null===(n=t.gradingResult)||void 0===n?void 0:n.reason)||""," ").concat((null===(s=t.gradingResult)||void 0===s?void 0:s.comment)||""),r="".concat(l," ").concat(a);return C.test(r)}))})}catch(e){return console.error("Invalid regular expression:",e.message),b}},[b,i,r,c,n,w,C]),[S,R]=l.useState({pageIndex:0,pageSize:50});l.useEffect(()=>{R(e=>({...e,pageIndex:0}))},[i,r,c]);let I=l.useMemo(()=>f.prompts.map((e,t)=>b.reduce((e,n)=>e+(n.outputs[t].pass?1:0),0)),[f.prompts,b]),F=l.useMemo(()=>f.prompts.map((e,t)=>b.reduce((e,n)=>{var s,l;return e+((null===(l=n.outputs[t].gradingResult)||void 0===l?void 0:null===(s=l.componentResults)||void 0===s?void 0:s.length)||0)},0)),[f.prompts,b]),T=l.useMemo(()=>f.prompts.map((e,t)=>b.reduce((e,n)=>{var s;let l=null===(s=n.outputs[t].gradingResult)||void 0===s?void 0:s.componentResults;return e+(l?l.filter(e=>null==e?void 0:e.pass).length:0)},0)),[f.prompts,b]),D=l.useMemo(()=>I.reduce((e,t,n,s)=>t>s[e]?n:e,0),[I]),M=I[D],O=l.useMemo(()=>(0,eD.Cl)(),[]),{renderMarkdown:L}=eh(),U=l.useMemo(()=>f.vars.length>0?[O.group({id:"vars",header:()=>(0,s.jsx)("span",{className:"font-bold",children:"Variables"}),columns:f.vars.map((e,n)=>O.accessor(e=>e.vars[n],{id:"Variable ".concat(n+1),header:()=>(0,s.jsx)(e4,{text:e,maxLength:t,className:"font-bold"}),cell:e=>{let n=e.getValue();return(0,s.jsx)("div",{className:"cell",children:L?(0,s.jsx)(eO.U,{remarkPlugins:[eY.Z],children:n}):(0,s.jsx)(eH,{text:n,maxLength:t})})},size:50}))})]:[],[O,f.vars,t,L]),z=l.useCallback((e,t)=>k[e].outputs[t],[k]),V=l.useCallback(e=>k[e].outputs[0],[k]),J=l.useMemo(()=>{let e={};return null==x||x.body.forEach(t=>{var n;null===(n=t.test.assert)||void 0===n||n.forEach(t=>{t.metric&&(e[t.metric]=(e[t.metric]||0)+1),"assert"in t&&Array.isArray(t.assert)&&t.assert.forEach(t=>{"metric"in t&&t.metric&&(e[t.metric]=(e[t.metric]||0)+1)})})}),e},[x]),H=l.useMemo(()=>[O.group({id:"prompts",header:()=>(0,s.jsx)("span",{className:"font-bold",children:"Outputs"}),columns:f.prompts.map((e,n)=>O.accessor(e=>(function(e){if("string"==typeof e){let t=e.startsWith("[PASS]"),n=e;return e.startsWith("[PASS]")?n=n.slice(6):e.startsWith("[FAIL]")&&(n=n.slice(6)),{text:n,pass:t,score:t?1:0}}return e})(e.outputs[n]),{id:"Prompt ".concat(n+1),header:()=>{var l,a,o,c,p,m,x,g;let v=I[n]&&b.length?(I[n]/b.length*100).toFixed(2):"0.00",j=I[n]===M&&0!==M,f="Prompt ".concat(n+1),y=i[f]||!1,Z=d?(0,s.jsxs)("div",{className:"prompt-detail",children:[F[n]?(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Asserts:"})," ",T[n],"/",F[n]," passed"]}):null,(null===(l=e.metrics)||void 0===l?void 0:l.totalLatencyMs)?(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Avg Latency:"})," ",Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(e.metrics.totalLatencyMs/b.length)," ","ms"]}):null,(null===(o=e.metrics)||void 0===o?void 0:null===(a=o.tokenUsage)||void 0===a?void 0:a.total)?(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Avg Tokens:"})," ",Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(e.metrics.tokenUsage.total/b.length)]}):null,(null===(c=e.metrics)||void 0===c?void 0:c.totalLatencyMs)&&(null===(m=e.metrics)||void 0===m?void 0:null===(p=m.tokenUsage)||void 0===p?void 0:p.completion)?(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Tokens/Sec:"})," ",Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(e.metrics.tokenUsage.completion/(e.metrics.totalLatencyMs/1e3))]}):null,(null===(x=e.metrics)||void 0===x?void 0:x.cost)?(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Cost:"})," $",e.metrics.cost.toPrecision(2)]}):null]}):null,w=e.provider?e.provider.split(":"):[],C=w.length>1?(0,s.jsxs)(s.Fragment,{children:[w[0],":",(0,s.jsx)("strong",{children:w.slice(1).join(":")})]}):(0,s.jsx)("strong",{children:e.provider});return(0,s.jsxs)("div",{className:"output-header",children:[(0,s.jsxs)("div",{className:"pills",children:[e.provider?(0,s.jsx)("div",{className:"provider",children:C}):null,(0,s.jsx)("div",{className:"summary",children:(0,s.jsxs)("div",{className:"highlight ".concat(j?"success":""),children:[(0,s.jsxs)("strong",{children:[v,"% passing"]})," (",I[n],"/",b.length," cases)"]})}),(null===(g=e.metrics)||void 0===g?void 0:g.namedScores)&&Object.keys(e.metrics.namedScores).length>0?(0,s.jsx)(eL,{lookup:e.metrics.namedScores,metricTotals:J,onSearchTextChange:h}):null]}),(0,s.jsx)(e4,{className:"prompt-container",text:e.label||e.display||e.raw,expandedText:e.raw,maxLength:t,resourceId:e.id}),Z,"failures"===r&&(0,s.jsx)(eG.Z,{sx:{"& .MuiFormControlLabel-label":{fontSize:"0.75rem"}},control:(0,s.jsx)(P.Z,{checked:y,onChange:e=>u(f,e.target.checked)}),label:"Show failures"})]})},cell:e=>{var l,a;let i=z(e.row.index,n);return(0,s.jsx)(e5,{output:i,maxTextLength:t,rowIndex:e.row.index,promptIndex:n,onRating:Z.bind(null,null!==(l=i.originalRowIndex)&&void 0!==l?l:e.row.index,null!==(a=i.originalPromptIndex)&&void 0!==a?a:n),firstOutput:V(e.row.index),showDiffs:"different"===r,searchText:c,showStats:d})}}))})],[b.length,O,i,r,V,z,Z,f.prompts,M,t,J,F,T,I,u,h,c,d]),K=l.useMemo(()=>{let e=b.some(e=>e.description);return e?{accessorFn:e=>e.description||"",id:"description",header:()=>(0,s.jsx)("span",{className:"font-bold",children:"Description"}),cell:e=>(0,s.jsx)("div",{className:"cell",children:(0,s.jsx)(eH,{text:String(e.getValue()),maxLength:t})}),size:50}:null},[b,t]),G=l.useMemo(()=>{let e=[];return K&&e.push(K),e.push(...U,...H),e},[K,U,H]),X=(0,eM.b7)({data:k,columns:G,columnResizeMode:"onChange",getCoreRowModel:(0,eD.sC)(),getPaginationRowModel:(0,eD.G_)(),state:{columnVisibility:n,pagination:S}});return(0,s.jsxs)("div",{children:[(0,s.jsxs)("table",{className:"results-table firefox-fix ".concat(t<=25?"compact":""),style:{wordBreak:a},children:[(0,s.jsx)("thead",{children:X.getHeaderGroups().map(e=>(0,s.jsx)("tr",{className:"header",children:e.headers.map(e=>(0,s.jsxs)("th",{colSpan:e.colSpan,style:{width:e.getSize()},children:[e.isPlaceholder?null:(0,eM.ie)(e.column.columnDef.header,e.getContext()),(0,s.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:"resizer ".concat(e.column.getIsResizing()?"isResizing":"")})]},e.id))},e.id))}),(0,s.jsx)("tbody",{children:X.getRowModel().rows.map((e,t)=>{let n=!1;return(0,s.jsx)("tr",{children:e.getVisibleCells().map(e=>{let l=e.column.id.startsWith("Variable")||"description"===e.column.id,a=!l&&!n;return a&&(n=!0),(0,s.jsx)("td",{style:{width:e.column.getSize()},className:"".concat(l?"variable":""," ").concat(0!==t||l?"":"first-prompt-row"," ").concat(a?"first-prompt-col":""),children:(0,eM.ie)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)})})]}),X.getPageCount()>1&&(0,s.jsxs)(N.Z,{className:"pagination",mx:1,sx:{display:"flex",alignItems:"center",gap:2},children:[(0,s.jsx)(E.Z,{onClick:()=>{R(e=>({...e,pageIndex:Math.max(e.pageIndex-1,0)})),window.scrollTo(0,0)},disabled:0===X.getState().pagination.pageIndex,variant:"contained",children:"Previous"}),(0,s.jsxs)(B.Z,{component:"span",sx:{display:"flex",alignItems:"center",gap:1},children:["Page",(0,s.jsx)(_.Z,{size:"small",type:"number",value:X.getState().pagination.pageIndex+1,onChange:e=>{let t=e.target.value?Number(e.target.value)-1:0;R(e=>({...e,pageIndex:Math.min(Math.max(t,0),X.getPageCount()-1)}))},InputProps:{style:{width:"60px",textAlign:"center"}},variant:"outlined"}),(0,s.jsxs)("span",{children:["of ",X.getPageCount()]})]}),(0,s.jsx)(E.Z,{onClick:()=>{R(e=>({...e,pageIndex:Math.min(e.pageIndex+1,X.getPageCount()-1)})),window.scrollTo(0,0)},disabled:X.getState().pagination.pageIndex+1>=X.getPageCount(),variant:"contained",children:"Next"}),(0,s.jsxs)(B.Z,{component:"span",sx:{display:"flex",alignItems:"center",gap:1},children:[(0,s.jsxs)(W.Z,{value:S.pageSize,onChange:e=>{R({pageIndex:0,pageSize:Number(e.target.value)}),window.scrollTo(0,0)},displayEmpty:!0,inputProps:{"aria-label":"Results per page"},size:"small",sx:{m:1,minWidth:80},children:[(0,s.jsx)(A.Z,{value:10,children:"10"}),(0,s.jsx)(A.Z,{value:50,children:"50"}),(0,s.jsx)(A.Z,{value:100,children:"100"}),(0,s.jsx)(A.Z,{value:500,children:"500"}),(0,s.jsx)(A.Z,{value:1e3,children:"1000"})]}),(0,s.jsx)("span",{children:"results per page"})]})]}),(0,s.jsx)(eB,{})]})}),e6=n(22695),e8=e=>{let{open:t,onClose:n}=e,{maxTextLength:l,setMaxTextLength:a,wordBreak:r,setWordBreak:i,showInferenceDetails:o,setShowInferenceDetails:c,renderMarkdown:d,setRenderMarkdown:u,prettifyJson:h,setPrettifyJson:p,showPrompts:m,setShowPrompts:x,showPassFail:g,setShowPassFail:v}=eh();return(0,s.jsxs)(G.Z,{open:t,onClose:n,fullWidth:!0,maxWidth:"sm",children:[(0,s.jsx)(Y.Z,{children:"Table View Settings"}),(0,s.jsxs)(q.Z,{children:[(0,s.jsx)(N.Z,{children:(0,s.jsx)(V.Z,{title:"Forcing line breaks makes it easier to adjust column widths to your liking",placement:"right",children:(0,s.jsx)(eG.Z,{control:(0,s.jsx)(P.Z,{checked:"break-all"===r,onChange:e=>i(e.target.checked?"break-all":"break-word")}),label:"Force line breaks"})})}),(0,s.jsx)(N.Z,{children:(0,s.jsx)(eG.Z,{control:(0,s.jsx)(P.Z,{checked:d,onChange:e=>u(e.target.checked)}),label:"Render model outputs as Markdown"})}),(0,s.jsx)(N.Z,{children:(0,s.jsx)(eG.Z,{control:(0,s.jsx)(P.Z,{checked:h,onChange:e=>p(e.target.checked)}),label:"Prettify JSON outputs"})}),(0,s.jsx)(N.Z,{children:(0,s.jsx)(V.Z,{title:"Show the final prompt that produced the output in each cell.",placement:"right",children:(0,s.jsx)(eG.Z,{control:(0,s.jsx)(P.Z,{checked:m,onChange:e=>x(e.target.checked)}),label:"Show full prompt in output cell"})})}),(0,s.jsx)(N.Z,{children:(0,s.jsx)(V.Z,{title:"Show pass/fail status for each output.",placement:"right",children:(0,s.jsx)(eG.Z,{control:(0,s.jsx)(P.Z,{checked:g,onChange:e=>v(e.target.checked)}),label:"Show pass/fail status"})})}),(0,s.jsx)(N.Z,{children:(0,s.jsx)(V.Z,{title:"Show detailed inference statistics such as latency, tokens used, cost, etc.",placement:"right",children:(0,s.jsx)(eG.Z,{control:(0,s.jsx)(P.Z,{checked:o,onChange:e=>c(e.target.checked)}),label:"Show inference details"})})}),(0,s.jsxs)(N.Z,{maxWidth:"sm",children:[(0,s.jsxs)(B.Z,{mt:2,children:["Max text length: ",l]}),(0,s.jsx)(e6.ZP,{min:25,max:1e3,value:l,onChange:(e,t)=>a(t)})]})]}),(0,s.jsx)(X.Z,{children:(0,s.jsx)(E.Z,{onClick:n,children:"Close"})})]})},e9=e=>{let{open:t,onClose:n,shareUrl:a}=e,r=(0,l.useRef)(null),[i,o]=(0,l.useState)(!1),c=()=>{n(),o(!1)};return(0,s.jsxs)(G.Z,{open:t,onClose:c,PaperProps:{style:{minWidth:"min(660px, 100%)"}},children:[(0,s.jsx)(Y.Z,{children:"Your eval is ready to share"}),(0,s.jsxs)(q.Z,{children:[(0,s.jsx)(_.Z,{inputRef:r,value:a,fullWidth:!0,InputProps:{readOnly:!0,endAdornment:(0,s.jsx)(ev.Z,{onClick:()=>{r.current&&(r.current.select(),document.execCommand("copy"),o(!0))},children:i?(0,s.jsx)(em.Z,{}):(0,s.jsx)(eg.Z,{})})}}),(0,s.jsx)(eV.Z,{sx:{fontSize:"0.75rem"},children:"Shared URLs are deleted after 2 weeks."})]}),(0,s.jsx)(X.Z,{children:(0,s.jsx)(E.Z,{onClick:c,color:"primary",children:"Close"})})]})};n(58022);let te=(0,J.Z)(z.Z)(e=>{let{theme:t}=e;return{maxWidth:"100%",flexWrap:"wrap",[t.breakpoints.down("sm")]:{flexDirection:"column"}}});function tt(e){var t;let{recentEvals:n,onRecentEvalSelected:a,defaultEvalId:c}=e,d=(0,f.useRouter)(),h=(0,f.useSearchParams)(),{author:p,table:m,setTable:x,config:g,setConfig:j,maxTextLength:b,wordBreak:z,showInferenceDetails:J,evalId:K,inComparisonMode:G,setInComparisonMode:X}=eh(),{setStateFromConfig:q}=(0,Z.o)(),[Y,$]=l.useState((null==h?void 0:h.get("search"))||""),[Q]=(0,H.Nr)(Y,1e3),ee=e=>{$(e)},[et,en]=l.useState({}),es=l.useCallback((e,t)=>{en(n=>({...n,[e]:t}))},[en]);(0,y.Z)(m,"Table data must be loaded before rendering ResultsView");let{head:el}=m,[ea,er]=l.useState("all"),[ei,eo]=l.useState(!1),[ec,ed]=l.useState(""),[eu,em]=l.useState(!1),[ex,eg]=l.useState(null),ev=async()=>{em(!0);try{let e=await fetch("".concat(r,"/api/eval"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:{version:2,createdAt:new Date().toISOString(),results:{table:m},config:g}})}),{id:t}=await e.json(),n="".concat(i,"/eval/").concat(t);ed(n),eo(!0)}catch(e){alert("Sorry, something went wrong.")}finally{em(!1)}},ef=async e=>{eg(null);try{var t;let s=await fetch("".concat(await (0,o.b)(),"/api/results/").concat(e),{cache:"no-store"}),l=await s.json(),a=l.data.results.table,r={head:{prompts:[...m.head.prompts.map(e=>{var t;return{...e,label:"[".concat(K||c||(null===(t=n[0])||void 0===t?void 0:t.evalId)||"Eval A","] ").concat(e.label||"")}}),...a.head.prompts.map(t=>({...t,label:"[".concat(e,"] ").concat(t.label||"")}))],vars:m.head.vars},body:m.body.map((e,t)=>{var n;return{...e,outputs:[...e.outputs,...(null===(n=a.body[t])||void 0===n?void 0:n.outputs)||[]]}})};x(r),j({...g,...l.data.config,description:'Combined: "'.concat((null==g?void 0:g.description)||"Eval A",'" and "').concat((null===(t=l.data.config)||void 0===t?void 0:t.description)||"Eval B",'"')}),X(!0)}catch(e){console.error("Error fetching comparison eval:",e),alert("Failed to load comparison eval. Please try again.")}},eb=l.useMemo(()=>m.body.some(e=>e.description),[m.body]),eZ=l.useMemo(()=>[...eb?[{value:"description",label:"Description"}]:[],...el.vars.map((e,t)=>({value:"Variable ".concat(t+1),label:"Var ".concat(t+1,": ").concat(el.vars[t].length>100?el.vars[t].slice(0,97)+"...":el.vars[t]),group:"Variables"})),...el.prompts.map((e,t)=>{let n=el.prompts[t],s=n.label||n.display||n.raw;return{value:"Prompt ".concat(t+1),label:"Prompt ".concat(t+1,": ").concat(s.length>100?s.slice(0,97)+"...":s),group:"Prompts"}})],[el.vars,el.prompts,eb]),[eC,ek]=l.useState(!1),[eS,eR]=l.useState(!1),[eI,eN]=l.useState({}),[eE,eP]=l.useState(eZ.map(e=>e.value)),eF=async()=>{(0,y.Z)(g,"Config must be loaded before clicking its description");let e=window.prompt("Enter new description:",g.description);if(null!==e&&e!==g.description){let t={...g,description:e};try{let e=await fetch("".concat(await (0,o.b)(),"/api/eval/").concat(K),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:t})});if(!e.ok)throw Error("Network response was not ok");j(t)}catch(e){console.error("Failed to update table:",e)}}},eD=async()=>{if(window.confirm("Are you sure you want to delete this evaluation?"))try{let e=await fetch("".concat(await (0,o.b)(),"/api/eval/").concat(K),{method:"DELETE"});if(!e.ok)throw Error("Network response was not ok");d.push("/")}catch(e){console.error("Failed to delete evaluation:",e),alert("Failed to delete evaluation")}},[eM,eO]=l.useState(!1),eL=async()=>{K&&(await navigator.clipboard.writeText(K),eO(!0),setTimeout(()=>{eO(!1)},1e3))};return(0,s.jsxs)("div",{style:{marginLeft:"1rem",marginRight:"1rem"},children:[(0,s.jsxs)(te,{direction:"row",mb:2,spacing:1,alignItems:"center",className:"eval-header",children:[n&&n.length>0&&(0,s.jsx)(ew,{recentEvals:n,onRecentEvalSelected:a,currentEval:n.find(e=>e.evalId===K)||null}),!G&&(0,s.jsx)(B.Z,{variant:"h5",sx:{display:"flex",alignItems:"center"},children:(0,s.jsx)(V.Z,{title:"Click to edit description",children:(0,s.jsx)("span",{className:"description",onClick:eF,children:(null==g?void 0:g.description)||K})})}),(null==g?void 0:g.description)&&K&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(V.Z,{title:"Click to copy",children:(0,s.jsx)(F.Z,{size:"small",label:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("strong",{children:"ID:"})," ",K]}),sx:{opacity:.7,cursor:"pointer"},onClick:eL})}),(0,s.jsx)(u.Z,{open:eM,autoHideDuration:1e3,onClose:()=>eO(!1),message:"Eval id copied to clipboard"})]}),(0,s.jsx)(V.Z,{title:p?"":"Set eval author with `promptfoo config set email`",children:(0,s.jsx)(F.Z,{size:"small",label:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("strong",{children:"Author:"})," ",p||"Unknown"]}),sx:{opacity:.7}})})]}),(0,s.jsxs)(te,{direction:"row",spacing:4,alignItems:"center",children:[(0,s.jsx)(N.Z,{children:(0,s.jsxs)(T.Z,{sx:{m:1,minWidth:200,maxWidth:350},size:"small",children:[(0,s.jsx)(D.Z,{id:"visible-columns-label",children:"Columns"}),(0,s.jsx)(W.Z,{labelId:"visible-columns-label",id:"visible-columns",multiple:!0,value:eE,onChange:e=>{let{target:{value:t}}=e;eP("string"==typeof t?t.split(","):t);let n=[...eb?["description"]:[],...el.vars.map((e,t)=>"Variable ".concat(t+1)),...el.prompts.map((e,t)=>"Prompt ".concat(t+1))],s={};n.forEach(e=>{s[e]=("string"==typeof t?t.split(","):t).includes(e)}),eN(s)},input:(0,s.jsx)(U.Z,{label:"Visible columns"}),renderValue:e=>e.join(", "),children:eZ.map(e=>(0,s.jsxs)(A.Z,{dense:!0,value:e.value,children:[(0,s.jsx)(P.Z,{checked:eE.indexOf(e.value)>-1}),(0,s.jsx)(O.Z,{primary:e.label})]},e.value))})]})}),(0,s.jsx)(N.Z,{children:(0,s.jsxs)(T.Z,{sx:{minWidth:180},size:"small",children:[(0,s.jsx)(D.Z,{id:"failure-filter-mode-label",children:"Display"}),(0,s.jsxs)(W.Z,{labelId:"filter-mode-label",id:"filter-mode",value:ea,onChange:e=>{let t=e.target.value;er(t);let n={};el.prompts.forEach((e,s)=>{n["Prompt ".concat(s+1)]="failures"===t}),en(n)},label:"Filter",children:[(0,s.jsx)(A.Z,{value:"all",children:"Show all results"}),(0,s.jsx)(A.Z,{value:"failures",children:"Show failures only"}),(0,s.jsx)(A.Z,{value:"different",children:"Show different only"}),(0,s.jsx)(A.Z,{value:"highlights",children:"Show highlights only"})]})]})}),(0,s.jsx)(N.Z,{children:(0,s.jsx)(_.Z,{sx:{minWidth:180},size:"small",label:"Search",placeholder:"Text or regex",value:Y,onChange:e=>ee(e.target.value)})}),(0,s.jsx)(N.Z,{flexGrow:1}),(0,s.jsx)(N.Z,{display:"flex",justifyContent:"flex-end",children:(0,s.jsxs)(te,{direction:"row",spacing:2,children:[(0,s.jsx)(E.Z,{color:"primary",onClick:e=>{eg(e.currentTarget)},startIcon:(0,s.jsx)(w.Z,{}),children:"Eval actions"}),g&&(0,s.jsxs)(L.Z,{id:"eval-actions-menu",anchorEl:ex,keepMounted:!0,open:!!ex,onClose:()=>{eg(null)},children:[(0,s.jsx)(ep,{initialEvals:n,onComparisonEvalSelected:ef}),(0,s.jsx)(V.Z,{title:"View the configuration that defines this eval",placement:"left",children:(0,s.jsxs)(A.Z,{onClick:()=>ek(!0),children:[(0,s.jsx)(M.Z,{children:(0,s.jsx)(I.Z,{fontSize:"small"})}),"View YAML"]})}),(0,s.jsx)(V.Z,{title:"Edit this eval in the web UI",placement:"left",children:(0,s.jsxs)(A.Z,{onClick:()=>{q(g),d.push("/setup/")},children:[(0,s.jsx)(M.Z,{children:(0,s.jsx)(k.Z,{fontSize:"small"})}),"Edit Eval"]})}),(0,s.jsx)(ey,{}),(null==g?void 0:g.sharing)&&(0,s.jsx)(V.Z,{title:"Generate a unique URL that others can access",placement:"left",children:(0,s.jsxs)(A.Z,{onClick:ev,disabled:eu,children:[(0,s.jsx)(M.Z,{children:eu?(0,s.jsx)(v.Z,{size:16}):(0,s.jsx)(R.Z,{fontSize:"small"})}),"Share"]})}),(0,s.jsx)(V.Z,{title:"Delete this eval",placement:"left",children:(0,s.jsxs)(A.Z,{onClick:eD,children:[(0,s.jsx)(M.Z,{children:(0,s.jsx)(C.Z,{fontSize:"small"})}),"Delete"]})})]}),(0,s.jsx)(V.Z,{title:"Edit table view settings",placement:"bottom",children:(0,s.jsx)(E.Z,{color:"primary",onClick:()=>eR(!0),startIcon:(0,s.jsx)(S.Z,{}),children:"Table Settings"})}),(null==g?void 0:null===(t=g.metadata)||void 0===t?void 0:t.redteam)&&(0,s.jsx)(V.Z,{title:"View vulnerability scan report",placement:"bottom",children:(0,s.jsx)(E.Z,{color:"primary",startIcon:(0,s.jsx)(I.Z,{}),onClick:()=>{var e;return d.push("/report/?evalId=".concat(K||c||(null===(e=n[0])||void 0===e?void 0:e.evalId)))},children:"Vulnerability Report"})})]})})]}),(0,s.jsx)(eT,{columnVisibility:eI}),(0,s.jsx)(e7,{maxTextLength:b,columnVisibility:eI,wordBreak:z,showStats:J,filterMode:ea,failureFilter:et,searchText:Q,onFailureFilterToggle:es,onSearchTextChange:ee}),(0,s.jsx)(ej,{open:eC,onClose:()=>ek(!1)}),(0,s.jsx)(e9,{open:ei,onClose:()=>eo(!1),shareUrl:ec}),(0,s.jsx)(e8,{open:eS,onClose:()=>eR(!1)})]})}async function tn(){let e=(0,j.createClientComponentClient)(),{data:{user:t}}=await e.auth.getUser();(0,y.Z)(t,"User not logged in");let{data:n,error:s}=await e.from("EvaluationResult").select("id, createdAt").eq("user_id",t.id).order("createdAt",{ascending:!1}).limit(100);return n||[]}async function ts(e){let t=(0,j.createClientComponentClient)(),{data:n,error:s}=await t.from("EvaluationResult").select("*").eq("id",e).single();return n}function tl(e){var t;let{fetchId:n,preloadedData:a,recentEvals:i,defaultEvalId:c}=e,u=(0,f.useRouter)(),{table:h,setTable:p,setConfig:m,setEvalId:j,setAuthor:Z,setInComparisonMode:w}=eh(),[C,k]=l.useState(!1),[S,R]=l.useState(!1),[I,N]=l.useState(i||[]),E=async()=>{let e=await fetch("".concat(await (0,o.b)(),"/api/results"),{cache:"no-store"}),t=await e.json();return N(t.data),t.data},P=l.useCallback(async e=>{let t=await fetch("".concat(await (0,o.b)(),"/api/results/").concat(e),{cache:"no-store"}),n=await t.json();p(n.data.results.table),m(n.data.config),Z(n.data.author),j(e)},[p,m,j,Z]),F=async e=>{g.Ox?(k(!1),u.push("/eval/remote:".concat(encodeURIComponent(e)))):u.push("/eval/?evalId=".concat(encodeURIComponent(e)))},[T,D]=l.useState(c||(null===(t=I[0])||void 0===t?void 0:t.evalId)),M=(0,f.useSearchParams)(),O=M?M.get("evalId"):null;return(l.useEffect(()=>{if(O){let e=async()=>{await P(O),k(!0),D(O),E()};e()}else if(a){var e;p(null===(e=a.data.results)||void 0===e?void 0:e.table),m(a.data.config),Z(a.data.author||null),k(!0)}else if(n){let e=async()=>{var e;let t="".concat(r,"/api/eval/").concat(n);console.log("Fetching eval from remote server",t);let s=await fetch(t);if(!s.ok){R(!0);return}let l=await s.json();p(null===(e=l.data.results)||void 0===e?void 0:e.table),m(l.data.config),Z(l.data.author||null),k(!0)};e()}else if(g.T8)(0,o.b)().then(e=>{let t=(0,b.io)(e);return t.on("init",e=>{console.log("Initialized socket connection",e),k(!0),p(null==e?void 0:e.results.table),m(null==e?void 0:e.config),Z((null==e?void 0:e.author)||null),E().then(e=>{var t,n;D(null===(t=e[0])||void 0===t?void 0:t.id),j(null===(n=e[0])||void 0===n?void 0:n.id)})}),t.on("update",e=>{console.log("Received data update",e),p(e.results.table),m(e.config),Z(e.author||null),E().then(e=>{var t;let n=null===(t=e[0])||void 0===t?void 0:t.id;n&&(D(n),j(n))})}),()=>{t.disconnect()}});else if(g.Ox)tn().then(e=>{N(e.map(e=>({evalId:e.id,datasetId:null,label:e.createdAt,createdAt:new Date(e.createdAt).getTime(),description:"None",numTests:-1}))),e.length>0&&ts(e[0].id).then(t=>{(0,y.Z)(t,"Eval not found");let n=t.results,s=t.config;D(e[0].id),p(n.table),m(s),Z(null),k(!0)})});else{let e=async()=>{let e=await E();if(!(e.length>0))return(0,s.jsx)("div",{className:"notice",children:"No evals yet. Share some evals to this server and they will appear here."});{let t=await (0,o.b)(),n=e[0].id,s=await fetch("".concat(t,"/api/results/").concat(n)),l=await s.json();p(l.data.results.table),m(l.data.config),Z(l.data.author||null),k(!0),D(n),j(n)}};e()}w(!1)},[n,p,m,Z,j,P,a,D,O,w]),S)?(0,s.jsx)("div",{className:"notice",children:"404 Eval not found"}):C&&h?(0,s.jsx)(x,{children:(0,s.jsx)(d,{children:(0,s.jsx)(tt,{defaultEvalId:T,recentEvals:I,onRecentEvalSelected:F})})}):(0,s.jsxs)("div",{className:"notice",children:[(0,s.jsx)("div",{children:(0,s.jsx)(v.Z,{size:22})}),(0,s.jsx)("div",{children:"Waiting for eval data"})]})}n(94455)},52428:function(e,t,n){"use strict";n.d(t,{Ox:function(){return a},T8:function(){return l},eA:function(){return r}});var s=n(77580);let l=!s.env.NEXT_PUBLIC_PROMPTFOO_BUILD_STANDALONE_SERVER,a=!!s.env.NEXT_PUBLIC_PROMPTFOO_USE_SUPABASE,r=""},47887:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var s=n(79685),l=n(74595);let a=(0,s.Ue)()((0,l.tJ)((e,t)=>({env:{},testCases:[],description:"",providers:[],prompts:[],defaultTest:{},evaluateOptions:{},scenarios:[],setEnv:t=>e({env:t}),setTestCases:t=>e({testCases:t}),setDescription:t=>e({description:t}),setProviders:t=>e({providers:t}),setPrompts:t=>e({prompts:t}),setDefaultTest:t=>e({defaultTest:t}),setEvaluateOptions:t=>e({evaluateOptions:t}),setScenarios:t=>e({scenarios:t}),setStateFromConfig:t=>{let n={};t.description&&(n.description=t.description||""),t.tests&&(n.testCases=t.tests),t.providers&&(n.providers=t.providers),t.prompts&&("string"==typeof t.prompts?n.prompts=[t.prompts]:Array.isArray(t.prompts)?n.prompts=t.prompts.filter(e=>"string"==typeof e&&!e.endsWith(".txt")&&!e.endsWith(".json")&&!e.endsWith(".yaml")):console.warn("Invalid prompts config",t.prompts)),t.defaultTest&&(n.defaultTest=t.defaultTest),t.evaluateOptions&&(n.evaluateOptions=t.evaluateOptions),t.scenarios&&(n.scenarios=t.scenarios),e(n)},getTestSuite:()=>{let{description:e,testCases:n,providers:s,prompts:l,env:a,scenarios:r}=t();return{env:a,description:e,providers:s,prompts:l,tests:n,scenarios:r}}}),{name:"promptfoo",skipHydration:!0}))},55974:function(){},94455:function(){},16658:function(){},93207:function(){},58022:function(){}}]);
|