promptfoo 0.80.1 → 0.80.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/package.json +3 -2
  2. package/dist/src/providers/cohere.d.ts +12 -1
  3. package/dist/src/providers/cohere.d.ts.map +1 -1
  4. package/dist/src/providers/cohere.js +65 -1
  5. package/dist/src/providers/cohere.js.map +1 -1
  6. package/dist/src/providers.d.ts.map +1 -1
  7. package/dist/src/providers.js +13 -2
  8. package/dist/src/providers.js.map +1 -1
  9. package/dist/src/python/pythonUtils.js +1 -1
  10. package/dist/src/python/pythonUtils.js.map +1 -1
  11. package/dist/src/python/wrapper.py +2 -2
  12. package/dist/src/redteam/constants.d.ts +1 -1
  13. package/dist/src/redteam/constants.d.ts.map +1 -1
  14. package/dist/src/redteam/constants.js +0 -1
  15. package/dist/src/redteam/constants.js.map +1 -1
  16. package/dist/src/redteam/plugins/harmful.d.ts.map +1 -1
  17. package/dist/src/redteam/plugins/harmful.js +3 -2
  18. package/dist/src/redteam/plugins/harmful.js.map +1 -1
  19. package/dist/src/web/nextui/404/index.html +1 -1
  20. package/dist/src/web/nextui/404.html +1 -1
  21. package/dist/src/web/nextui/_next/static/chunks/258-4cedd08c1664b5de.js +1 -0
  22. package/dist/src/web/nextui/_next/static/chunks/{947-94ff53974301d426.js → 331-15dd9f932990d5bd.js} +4 -4
  23. package/dist/src/web/nextui/_next/static/chunks/{962-3281929f7790c813.js → 415-f4cc6df99e1d251e.js} +1 -1
  24. package/dist/src/web/nextui/_next/static/chunks/459-2e6701613d682903.js +1 -0
  25. package/dist/src/web/nextui/_next/static/chunks/{577-f9ba150349bd60d0.js → 577-d04b6ac55136510a.js} +1 -1
  26. package/dist/src/web/nextui/_next/static/chunks/app/eval/[id]/{page-e24502f7b480ebd4.js → page-03861be8c5e5a085.js} +1 -1
  27. package/dist/src/web/nextui/_next/static/chunks/app/eval/{page-b57c790219de0e23.js → page-f70bebead3e6df20.js} +1 -1
  28. package/dist/src/web/nextui/_next/static/chunks/app/{layout-7036f8cd6b7ea7c4.js → layout-2e2c3acd3eb844ec.js} +1 -1
  29. package/dist/src/web/nextui/_next/static/chunks/app/progress/{page-ea10abd41ddd664a.js → page-7d99e97219b86a6b.js} +1 -1
  30. package/dist/src/web/nextui/_next/static/chunks/app/report/{page-08095713de946c4b.js → page-804c81b4b408e927.js} +1 -1
  31. package/dist/src/web/nextui/auth/login/index.html +1 -1
  32. package/dist/src/web/nextui/auth/login/index.txt +2 -2
  33. package/dist/src/web/nextui/auth/signup/index.html +1 -1
  34. package/dist/src/web/nextui/auth/signup/index.txt +2 -2
  35. package/dist/src/web/nextui/datasets/index.html +1 -1
  36. package/dist/src/web/nextui/datasets/index.txt +2 -2
  37. package/dist/src/web/nextui/eval/index.html +1 -1
  38. package/dist/src/web/nextui/eval/index.txt +3 -3
  39. package/dist/src/web/nextui/index.html +1 -1
  40. package/dist/src/web/nextui/index.txt +2 -2
  41. package/dist/src/web/nextui/progress/index.html +1 -1
  42. package/dist/src/web/nextui/progress/index.txt +3 -3
  43. package/dist/src/web/nextui/prompts/index.html +1 -1
  44. package/dist/src/web/nextui/prompts/index.txt +2 -2
  45. package/dist/src/web/nextui/report/index.html +1 -1
  46. package/dist/src/web/nextui/report/index.txt +3 -3
  47. package/dist/src/web/nextui/setup/index.html +1 -1
  48. package/dist/src/web/nextui/setup/index.txt +2 -2
  49. package/dist/test/pythonWrapper.test.js +1 -1
  50. package/dist/test/pythonWrapper.test.js.map +1 -1
  51. package/package.json +3 -2
  52. package/dist/src/web/nextui/_next/static/chunks/258-59883c2dde806753.js +0 -1
  53. package/dist/src/web/nextui/_next/static/chunks/798-b5823c11472542e4.js +0 -1
  54. /package/dist/src/web/nextui/_next/static/{4g83QE2PQZm7LGbW5jz-e → Hfl51Uf4v_sDVja58NEDI}/_buildManifest.js +0 -0
  55. /package/dist/src/web/nextui/_next/static/{4g83QE2PQZm7LGbW5jz-e → Hfl51Uf4v_sDVja58NEDI}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="preload" as="font" href="/_next/static/media/a34f9d1faa5f3315-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/de0307797e31a3e6.css" data-precedence="next"/><link rel="preload" as="style" href="/_next/static/css/32384cb640d2265e.css"/><link rel="preload" href="/_next/static/chunks/webpack-22e0e23bc00c2c23.js" as="script"/><link rel="preload" href="/_next/static/chunks/b6261da7-e9d81a4364ddd0c0.js" as="script"/><link rel="preload" href="/_next/static/chunks/730-3eb7255cd813a727.js" as="script"/><link rel="preload" href="/_next/static/chunks/main-app-cf76b7c55faa5c9b.js" as="script"/><title>promptfoo</title><meta name="description" content="LLM testing and evaluation"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta property="og:image" content="https://www.promptfoo.dev/img/thumbnail.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://www.promptfoo.dev/img/thumbnail.png"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="__className_85e967"><script src="/_next/static/chunks/webpack-22e0e23bc00c2c23.js" async=""></script><script src="/_next/static/chunks/b6261da7-e9d81a4364ddd0c0.js" async=""></script><script src="/_next/static/chunks/730-3eb7255cd813a727.js" async=""></script><script src="/_next/static/chunks/main-app-cf76b7c55faa5c9b.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/a34f9d1faa5f3315-s.p.woff2\",{\"as\":\"font\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/de0307797e31a3e6.css\",{\"as\":\"style\"}]\n0:\"$L3\"\n"])</script><script>self.__next_f.push([1,"4:HL[\"/_next/static/css/32384cb640d2265e.css\",{\"as\":\"style\"}]\n"])</script><script>self.__next_f.push([1,"5:I{\"id\":83507,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"default\",\"async\":false}\n7:I{\"id\":6020,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"\",\"async\":false}\n8:I{\"id\":5071,\"chunks\":[\"148:static/chunks/148-f6a1a312ab2d360a.js\",\"640:static/chunks/640-0f757e2fe135173d.js\",\"193:stati"])</script><script>self.__next_f.push([1,"c/chunks/193-fbb29b23a7b3df82.js\",\"65:static/chunks/65-d3958feb29430005.js\",\"132:static/chunks/132-d6bea93785831786.js\",\"962:static/chunks/962-3281929f7790c813.js\",\"185:static/chunks/app/layout-7036f8cd6b7ea7c4.js\"],\"name\":\"PageShell\",\"async\":false}\n9:I{\"id\":27883,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"default\",\"async\":false}\na:I{\"id\":46785,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00"])</script><script>self.__next_f.push([1,"c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"default\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"3:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/de0307797e31a3e6.css\",\"precedence\":\"next\"}]],[\"$\",\"$L5\",null,{\"buildId\":\"4g83QE2PQZm7LGbW5jz-e\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/report/\",\"initialTree\":[\"\",{\"children\":[\"report\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialHead\":\"$L6\",\"globalErrorComponent\":\"$7\",\"children\":[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__className_85e967\",\"children\":[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"report\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$Lb\",\"$Lc\",null],\"segment\":\"__PAGE__\"},\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/32384cb640d2265e.css\",\"precedence\":\"next\"}]]}],\"segment\":\"report\"},\"styles\":[]}]}]}]}],null]}]]\n"])</script><script>self.__next_f.push([1,"d:I{\"id\":69914,\"chunks\":[\"949:static/chunks/565431e5-7b9122ac20f7a0ae.js\",\"799:static/chunks/a5c829b0-07a2c92898a6780c.js\",\"148:static/chunks/148-f6a1a312ab2d360a.js\",\"193:static/chunks/193-fbb29b23a7b3df82.js\",\"391:static/chunks/391-9f6f260597339469.js\",\"654:static/chunks/654-7ef84f69b226e6ab.js\",\"65:static/chunks/65-d3958feb29430005.js\",\"276:static/chunks/276-b1a73ab92831c2f8.js\",\"874:static/chunks/874-66f90697795eddbc.js\",\"264:static/chunks/264-f97b27096cb02f29.js\",\"798:static/chunks/798-b5823c11472542e4.js\",\"577:static/chunks/577-f9ba150349bd60d0.js\",\"420:static/chunks/app/report/page-08095713de946c4b.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"c:[\"$\",\"$Ld\",null,{}]\n"])</script><script>self.__next_f.push([1,"6:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"promptfoo\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"LLM testing and evaluation\"}],[\"$\",\"meta\",\"3\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:image\",\"content\":\"https://www.promptfoo.dev/img/thumbnail.png\"}],[\"$\",\"meta\",\"5\",{\"name\":\"twitter:card\",\"content\":\"summary\"}],[\"$\",\"meta\",\"6\",{\"name\":\"twitter:image\",\"content\":\"https://www.promptfoo.dev/img/thumbnail.png\"}],[\"$\",\"meta\",\"7\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"b:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="preload" as="font" href="/_next/static/media/a34f9d1faa5f3315-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/de0307797e31a3e6.css" data-precedence="next"/><link rel="preload" as="style" href="/_next/static/css/32384cb640d2265e.css"/><link rel="preload" href="/_next/static/chunks/webpack-22e0e23bc00c2c23.js" as="script"/><link rel="preload" href="/_next/static/chunks/b6261da7-e9d81a4364ddd0c0.js" as="script"/><link rel="preload" href="/_next/static/chunks/730-3eb7255cd813a727.js" as="script"/><link rel="preload" href="/_next/static/chunks/main-app-cf76b7c55faa5c9b.js" as="script"/><title>promptfoo</title><meta name="description" content="LLM testing and evaluation"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta property="og:image" content="https://www.promptfoo.dev/img/thumbnail.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://www.promptfoo.dev/img/thumbnail.png"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="__className_85e967"><script src="/_next/static/chunks/webpack-22e0e23bc00c2c23.js" async=""></script><script src="/_next/static/chunks/b6261da7-e9d81a4364ddd0c0.js" async=""></script><script src="/_next/static/chunks/730-3eb7255cd813a727.js" async=""></script><script src="/_next/static/chunks/main-app-cf76b7c55faa5c9b.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/a34f9d1faa5f3315-s.p.woff2\",{\"as\":\"font\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/de0307797e31a3e6.css\",{\"as\":\"style\"}]\n0:\"$L3\"\n"])</script><script>self.__next_f.push([1,"4:HL[\"/_next/static/css/32384cb640d2265e.css\",{\"as\":\"style\"}]\n"])</script><script>self.__next_f.push([1,"5:I{\"id\":83507,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"default\",\"async\":false}\n7:I{\"id\":6020,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"\",\"async\":false}\n8:I{\"id\":5071,\"chunks\":[\"148:static/chunks/148-f6a1a312ab2d360a.js\",\"640:static/chunks/640-0f757e2fe135173d.js\",\"193:stati"])</script><script>self.__next_f.push([1,"c/chunks/193-fbb29b23a7b3df82.js\",\"65:static/chunks/65-d3958feb29430005.js\",\"132:static/chunks/132-d6bea93785831786.js\",\"415:static/chunks/415-f4cc6df99e1d251e.js\",\"185:static/chunks/app/layout-2e2c3acd3eb844ec.js\"],\"name\":\"PageShell\",\"async\":false}\n9:I{\"id\":27883,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"default\",\"async\":false}\na:I{\"id\":46785,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00"])</script><script>self.__next_f.push([1,"c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"default\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"3:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/de0307797e31a3e6.css\",\"precedence\":\"next\"}]],[\"$\",\"$L5\",null,{\"buildId\":\"Hfl51Uf4v_sDVja58NEDI\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/report/\",\"initialTree\":[\"\",{\"children\":[\"report\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialHead\":\"$L6\",\"globalErrorComponent\":\"$7\",\"children\":[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__className_85e967\",\"children\":[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"report\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$Lb\",\"$Lc\",null],\"segment\":\"__PAGE__\"},\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/32384cb640d2265e.css\",\"precedence\":\"next\"}]]}],\"segment\":\"report\"},\"styles\":[]}]}]}]}],null]}]]\n"])</script><script>self.__next_f.push([1,"d:I{\"id\":69914,\"chunks\":[\"949:static/chunks/565431e5-7b9122ac20f7a0ae.js\",\"799:static/chunks/a5c829b0-07a2c92898a6780c.js\",\"148:static/chunks/148-f6a1a312ab2d360a.js\",\"193:static/chunks/193-fbb29b23a7b3df82.js\",\"391:static/chunks/391-9f6f260597339469.js\",\"654:static/chunks/654-7ef84f69b226e6ab.js\",\"65:static/chunks/65-d3958feb29430005.js\",\"276:static/chunks/276-b1a73ab92831c2f8.js\",\"874:static/chunks/874-66f90697795eddbc.js\",\"264:static/chunks/264-f97b27096cb02f29.js\",\"459:static/chunks/459-2e6701613d682903.js\",\"577:static/chunks/577-d04b6ac55136510a.js\",\"420:static/chunks/app/report/page-804c81b4b408e927.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"c:[\"$\",\"$Ld\",null,{}]\n"])</script><script>self.__next_f.push([1,"6:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"promptfoo\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"LLM testing and evaluation\"}],[\"$\",\"meta\",\"3\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:image\",\"content\":\"https://www.promptfoo.dev/img/thumbnail.png\"}],[\"$\",\"meta\",\"5\",{\"name\":\"twitter:card\",\"content\":\"summary\"}],[\"$\",\"meta\",\"6\",{\"name\":\"twitter:image\",\"content\":\"https://www.promptfoo.dev/img/thumbnail.png\"}],[\"$\",\"meta\",\"7\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"b:null\n"])</script></body></html>
@@ -1,12 +1,12 @@
1
1
  1:HL["/_next/static/media/a34f9d1faa5f3315-s.p.woff2",{"as":"font","type":"font/woff2"}]
2
2
  2:HL["/_next/static/css/de0307797e31a3e6.css",{"as":"style"}]
3
- 0:["4g83QE2PQZm7LGbW5jz-e",[[["",{"children":["report",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L3",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/de0307797e31a3e6.css","precedence":"next"}]],"$L4"]]]]
3
+ 0:["Hfl51Uf4v_sDVja58NEDI",[[["",{"children":["report",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L3",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/de0307797e31a3e6.css","precedence":"next"}]],"$L4"]]]]
4
4
  5:HL["/_next/static/css/32384cb640d2265e.css",{"as":"style"}]
5
- 6:I{"id":5071,"chunks":["148:static/chunks/148-f6a1a312ab2d360a.js","640:static/chunks/640-0f757e2fe135173d.js","193:static/chunks/193-fbb29b23a7b3df82.js","65:static/chunks/65-d3958feb29430005.js","132:static/chunks/132-d6bea93785831786.js","962:static/chunks/962-3281929f7790c813.js","185:static/chunks/app/layout-7036f8cd6b7ea7c4.js"],"name":"PageShell","async":false}
5
+ 6:I{"id":5071,"chunks":["148:static/chunks/148-f6a1a312ab2d360a.js","640:static/chunks/640-0f757e2fe135173d.js","193:static/chunks/193-fbb29b23a7b3df82.js","65:static/chunks/65-d3958feb29430005.js","132:static/chunks/132-d6bea93785831786.js","415:static/chunks/415-f4cc6df99e1d251e.js","185:static/chunks/app/layout-2e2c3acd3eb844ec.js"],"name":"PageShell","async":false}
6
6
  7:I{"id":27883,"chunks":["272:static/chunks/webpack-22e0e23bc00c2c23.js","470:static/chunks/b6261da7-e9d81a4364ddd0c0.js","730:static/chunks/730-3eb7255cd813a727.js"],"name":"default","async":false}
7
7
  8:I{"id":46785,"chunks":["272:static/chunks/webpack-22e0e23bc00c2c23.js","470:static/chunks/b6261da7-e9d81a4364ddd0c0.js","730:static/chunks/730-3eb7255cd813a727.js"],"name":"default","async":false}
8
8
  3:[null,["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_85e967","children":["$","$L6",null,{"children":["$","$L7",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$L8",null,{}],"templateStyles":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":"$undefined","childProp":{"current":["$","$L7",null,{"parallelRouterKey":"children","segmentPath":["children","report","children"],"error":"$undefined","errorStyles":"$undefined","loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"template":["$","$L8",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$L9","$La",null],"segment":"__PAGE__"},"styles":[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/32384cb640d2265e.css","precedence":"next"}]]}],"segment":"report"},"styles":[]}]}]}]}],null]
9
9
  4:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"promptfoo"}],["$","meta","2",{"name":"description","content":"LLM testing and evaluation"}],["$","meta","3",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","4",{"property":"og:image","content":"https://www.promptfoo.dev/img/thumbnail.png"}],["$","meta","5",{"name":"twitter:card","content":"summary"}],["$","meta","6",{"name":"twitter:image","content":"https://www.promptfoo.dev/img/thumbnail.png"}],["$","meta","7",{"name":"next-size-adjust"}]]
10
- b:I{"id":69914,"chunks":["949:static/chunks/565431e5-7b9122ac20f7a0ae.js","799:static/chunks/a5c829b0-07a2c92898a6780c.js","148:static/chunks/148-f6a1a312ab2d360a.js","193:static/chunks/193-fbb29b23a7b3df82.js","391:static/chunks/391-9f6f260597339469.js","654:static/chunks/654-7ef84f69b226e6ab.js","65:static/chunks/65-d3958feb29430005.js","276:static/chunks/276-b1a73ab92831c2f8.js","874:static/chunks/874-66f90697795eddbc.js","264:static/chunks/264-f97b27096cb02f29.js","798:static/chunks/798-b5823c11472542e4.js","577:static/chunks/577-f9ba150349bd60d0.js","420:static/chunks/app/report/page-08095713de946c4b.js"],"name":"","async":false}
10
+ b:I{"id":69914,"chunks":["949:static/chunks/565431e5-7b9122ac20f7a0ae.js","799:static/chunks/a5c829b0-07a2c92898a6780c.js","148:static/chunks/148-f6a1a312ab2d360a.js","193:static/chunks/193-fbb29b23a7b3df82.js","391:static/chunks/391-9f6f260597339469.js","654:static/chunks/654-7ef84f69b226e6ab.js","65:static/chunks/65-d3958feb29430005.js","276:static/chunks/276-b1a73ab92831c2f8.js","874:static/chunks/874-66f90697795eddbc.js","264:static/chunks/264-f97b27096cb02f29.js","459:static/chunks/459-2e6701613d682903.js","577:static/chunks/577-d04b6ac55136510a.js","420:static/chunks/app/report/page-804c81b4b408e927.js"],"name":"","async":false}
11
11
  a:["$","$Lb",null,{}]
12
12
  9:null
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="preload" as="font" href="/_next/static/media/a34f9d1faa5f3315-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/de0307797e31a3e6.css" data-precedence="next"/><link rel="preload" as="style" href="/_next/static/css/edcd6f0b6c902fde.css"/><link rel="preload" href="/_next/static/chunks/webpack-22e0e23bc00c2c23.js" as="script"/><link rel="preload" href="/_next/static/chunks/b6261da7-e9d81a4364ddd0c0.js" as="script"/><link rel="preload" href="/_next/static/chunks/730-3eb7255cd813a727.js" as="script"/><link rel="preload" href="/_next/static/chunks/main-app-cf76b7c55faa5c9b.js" as="script"/><title>promptfoo</title><meta name="description" content="LLM testing and evaluation"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta property="og:image" content="https://www.promptfoo.dev/img/thumbnail.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://www.promptfoo.dev/img/thumbnail.png"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="__className_85e967"><script src="/_next/static/chunks/webpack-22e0e23bc00c2c23.js" async=""></script><script src="/_next/static/chunks/b6261da7-e9d81a4364ddd0c0.js" async=""></script><script src="/_next/static/chunks/730-3eb7255cd813a727.js" async=""></script><script src="/_next/static/chunks/main-app-cf76b7c55faa5c9b.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/a34f9d1faa5f3315-s.p.woff2\",{\"as\":\"font\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/de0307797e31a3e6.css\",{\"as\":\"style\"}]\n0:\"$L3\"\n"])</script><script>self.__next_f.push([1,"4:HL[\"/_next/static/css/edcd6f0b6c902fde.css\",{\"as\":\"style\"}]\n"])</script><script>self.__next_f.push([1,"5:I{\"id\":83507,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"default\",\"async\":false}\n7:I{\"id\":6020,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"\",\"async\":false}\n8:I{\"id\":5071,\"chunks\":[\"148:static/chunks/148-f6a1a312ab2d360a.js\",\"640:static/chunks/640-0f757e2fe135173d.js\",\"193:stati"])</script><script>self.__next_f.push([1,"c/chunks/193-fbb29b23a7b3df82.js\",\"65:static/chunks/65-d3958feb29430005.js\",\"132:static/chunks/132-d6bea93785831786.js\",\"962:static/chunks/962-3281929f7790c813.js\",\"185:static/chunks/app/layout-7036f8cd6b7ea7c4.js\"],\"name\":\"PageShell\",\"async\":false}\n9:I{\"id\":27883,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"default\",\"async\":false}\na:I{\"id\":46785,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00"])</script><script>self.__next_f.push([1,"c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"default\",\"async\":false}\nc:I{\"id\":27382,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"default\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"d:I{\"id\":83013,\"chunks\":[\"148:static/chunks/148-f6a1a312ab2d360a.js\",\"640:static/chunks/640-0f757e2fe135173d.js\",\"193:static/chunks/193-fbb29b23a7b3df82.js\",\"391:static/chunks/391-9f6f260597339469.js\",\"654:static/chunks/654-7ef84f69b226e6ab.js\",\"65:static/chunks/65-d3958feb29430005.js\",\"975:static/chunks/975-db84f98b8dd028ab.js\",\"276:static/chunks/276-b1a73ab92831c2f8.js\",\"874:static/chunks/874-66f90697795eddbc.js\",\"235:static/chunks/235-2bbcbc3cd37eef0f.js\",\"264:static/chunks/264-f97b27096cb02f29.js\",\"734:static/chunks/734-d2ca9e7d051c494c.js\",\"972:static/chunks/972-cbb6d905c3a19e41.js\",\"325:static/chunks/325-07eac9e397582e87.js\",\"413:static/chunks/app/setup/page-1e593de415907683.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"3:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/de0307797e31a3e6.css\",\"precedence\":\"next\"}]],[\"$\",\"$L5\",null,{\"buildId\":\"4g83QE2PQZm7LGbW5jz-e\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/setup/\",\"initialTree\":[\"\",{\"children\":[\"setup\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialHead\":\"$L6\",\"globalErrorComponent\":\"$7\",\"children\":[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__className_85e967\",\"children\":[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"setup\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$Lb\",[\"$\",\"$Lc\",null,{\"propsForComponent\":{\"params\":{}},\"Component\":\"$d\"}],null],\"segment\":\"__PAGE__\"},\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/edcd6f0b6c902fde.css\",\"precedence\":\"next\"}]]}],\"segment\":\"setup\"},\"styles\":[]}]}]}]}],null]}]]\n"])</script><script>self.__next_f.push([1,"6:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"promptfoo\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"LLM testing and evaluation\"}],[\"$\",\"meta\",\"3\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:image\",\"content\":\"https://www.promptfoo.dev/img/thumbnail.png\"}],[\"$\",\"meta\",\"5\",{\"name\":\"twitter:card\",\"content\":\"summary\"}],[\"$\",\"meta\",\"6\",{\"name\":\"twitter:image\",\"content\":\"https://www.promptfoo.dev/img/thumbnail.png\"}],[\"$\",\"meta\",\"7\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"b:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><link rel="preload" as="font" href="/_next/static/media/a34f9d1faa5f3315-s.p.woff2" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/de0307797e31a3e6.css" data-precedence="next"/><link rel="preload" as="style" href="/_next/static/css/edcd6f0b6c902fde.css"/><link rel="preload" href="/_next/static/chunks/webpack-22e0e23bc00c2c23.js" as="script"/><link rel="preload" href="/_next/static/chunks/b6261da7-e9d81a4364ddd0c0.js" as="script"/><link rel="preload" href="/_next/static/chunks/730-3eb7255cd813a727.js" as="script"/><link rel="preload" href="/_next/static/chunks/main-app-cf76b7c55faa5c9b.js" as="script"/><title>promptfoo</title><meta name="description" content="LLM testing and evaluation"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta property="og:image" content="https://www.promptfoo.dev/img/thumbnail.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://www.promptfoo.dev/img/thumbnail.png"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="__className_85e967"><script src="/_next/static/chunks/webpack-22e0e23bc00c2c23.js" async=""></script><script src="/_next/static/chunks/b6261da7-e9d81a4364ddd0c0.js" async=""></script><script src="/_next/static/chunks/730-3eb7255cd813a727.js" async=""></script><script src="/_next/static/chunks/main-app-cf76b7c55faa5c9b.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/a34f9d1faa5f3315-s.p.woff2\",{\"as\":\"font\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/de0307797e31a3e6.css\",{\"as\":\"style\"}]\n0:\"$L3\"\n"])</script><script>self.__next_f.push([1,"4:HL[\"/_next/static/css/edcd6f0b6c902fde.css\",{\"as\":\"style\"}]\n"])</script><script>self.__next_f.push([1,"5:I{\"id\":83507,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"default\",\"async\":false}\n7:I{\"id\":6020,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"\",\"async\":false}\n8:I{\"id\":5071,\"chunks\":[\"148:static/chunks/148-f6a1a312ab2d360a.js\",\"640:static/chunks/640-0f757e2fe135173d.js\",\"193:stati"])</script><script>self.__next_f.push([1,"c/chunks/193-fbb29b23a7b3df82.js\",\"65:static/chunks/65-d3958feb29430005.js\",\"132:static/chunks/132-d6bea93785831786.js\",\"415:static/chunks/415-f4cc6df99e1d251e.js\",\"185:static/chunks/app/layout-2e2c3acd3eb844ec.js\"],\"name\":\"PageShell\",\"async\":false}\n9:I{\"id\":27883,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"default\",\"async\":false}\na:I{\"id\":46785,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00"])</script><script>self.__next_f.push([1,"c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"default\",\"async\":false}\nc:I{\"id\":27382,\"chunks\":[\"272:static/chunks/webpack-22e0e23bc00c2c23.js\",\"470:static/chunks/b6261da7-e9d81a4364ddd0c0.js\",\"730:static/chunks/730-3eb7255cd813a727.js\"],\"name\":\"default\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"d:I{\"id\":83013,\"chunks\":[\"148:static/chunks/148-f6a1a312ab2d360a.js\",\"640:static/chunks/640-0f757e2fe135173d.js\",\"193:static/chunks/193-fbb29b23a7b3df82.js\",\"391:static/chunks/391-9f6f260597339469.js\",\"654:static/chunks/654-7ef84f69b226e6ab.js\",\"65:static/chunks/65-d3958feb29430005.js\",\"975:static/chunks/975-db84f98b8dd028ab.js\",\"276:static/chunks/276-b1a73ab92831c2f8.js\",\"874:static/chunks/874-66f90697795eddbc.js\",\"235:static/chunks/235-2bbcbc3cd37eef0f.js\",\"264:static/chunks/264-f97b27096cb02f29.js\",\"734:static/chunks/734-d2ca9e7d051c494c.js\",\"972:static/chunks/972-cbb6d905c3a19e41.js\",\"325:static/chunks/325-07eac9e397582e87.js\",\"413:static/chunks/app/setup/page-1e593de415907683.js\"],\"name\":\"\",\"async\":false}\n"])</script><script>self.__next_f.push([1,"3:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/de0307797e31a3e6.css\",\"precedence\":\"next\"}]],[\"$\",\"$L5\",null,{\"buildId\":\"Hfl51Uf4v_sDVja58NEDI\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/setup/\",\"initialTree\":[\"\",{\"children\":[\"setup\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialHead\":\"$L6\",\"globalErrorComponent\":\"$7\",\"children\":[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"__className_85e967\",\"children\":[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"setup\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"loading\":\"$undefined\",\"loadingStyles\":\"$undefined\",\"hasLoading\":false,\"template\":[\"$\",\"$La\",null,{}],\"templateStyles\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"childProp\":{\"current\":[\"$Lb\",[\"$\",\"$Lc\",null,{\"propsForComponent\":{\"params\":{}},\"Component\":\"$d\"}],null],\"segment\":\"__PAGE__\"},\"styles\":[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/edcd6f0b6c902fde.css\",\"precedence\":\"next\"}]]}],\"segment\":\"setup\"},\"styles\":[]}]}]}]}],null]}]]\n"])</script><script>self.__next_f.push([1,"6:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"promptfoo\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"LLM testing and evaluation\"}],[\"$\",\"meta\",\"3\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:image\",\"content\":\"https://www.promptfoo.dev/img/thumbnail.png\"}],[\"$\",\"meta\",\"5\",{\"name\":\"twitter:card\",\"content\":\"summary\"}],[\"$\",\"meta\",\"6\",{\"name\":\"twitter:image\",\"content\":\"https://www.promptfoo.dev/img/thumbnail.png\"}],[\"$\",\"meta\",\"7\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"b:null\n"])</script></body></html>
@@ -1,8 +1,8 @@
1
1
  1:HL["/_next/static/media/a34f9d1faa5f3315-s.p.woff2",{"as":"font","type":"font/woff2"}]
2
2
  2:HL["/_next/static/css/de0307797e31a3e6.css",{"as":"style"}]
3
- 0:["4g83QE2PQZm7LGbW5jz-e",[[["",{"children":["setup",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L3",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/de0307797e31a3e6.css","precedence":"next"}]],"$L4"]]]]
3
+ 0:["Hfl51Uf4v_sDVja58NEDI",[[["",{"children":["setup",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L3",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/de0307797e31a3e6.css","precedence":"next"}]],"$L4"]]]]
4
4
  5:HL["/_next/static/css/edcd6f0b6c902fde.css",{"as":"style"}]
5
- 6:I{"id":5071,"chunks":["148:static/chunks/148-f6a1a312ab2d360a.js","640:static/chunks/640-0f757e2fe135173d.js","193:static/chunks/193-fbb29b23a7b3df82.js","65:static/chunks/65-d3958feb29430005.js","132:static/chunks/132-d6bea93785831786.js","962:static/chunks/962-3281929f7790c813.js","185:static/chunks/app/layout-7036f8cd6b7ea7c4.js"],"name":"PageShell","async":false}
5
+ 6:I{"id":5071,"chunks":["148:static/chunks/148-f6a1a312ab2d360a.js","640:static/chunks/640-0f757e2fe135173d.js","193:static/chunks/193-fbb29b23a7b3df82.js","65:static/chunks/65-d3958feb29430005.js","132:static/chunks/132-d6bea93785831786.js","415:static/chunks/415-f4cc6df99e1d251e.js","185:static/chunks/app/layout-2e2c3acd3eb844ec.js"],"name":"PageShell","async":false}
6
6
  7:I{"id":27883,"chunks":["272:static/chunks/webpack-22e0e23bc00c2c23.js","470:static/chunks/b6261da7-e9d81a4364ddd0c0.js","730:static/chunks/730-3eb7255cd813a727.js"],"name":"default","async":false}
7
7
  8:I{"id":46785,"chunks":["272:static/chunks/webpack-22e0e23bc00c2c23.js","470:static/chunks/b6261da7-e9d81a4364ddd0c0.js","730:static/chunks/730-3eb7255cd813a727.js"],"name":"default","async":false}
8
8
  a:I{"id":27382,"chunks":["272:static/chunks/webpack-22e0e23bc00c2c23.js","470:static/chunks/b6261da7-e9d81a4364ddd0c0.js","730:static/chunks/730-3eb7255cd813a727.js"],"name":"default","async":false}
@@ -36,7 +36,7 @@ describe('Python Wrapper', () => {
36
36
  expect.stringContaining('promptfoo-python-output-json'),
37
37
  ]),
38
38
  }));
39
- expect(fs_1.promises.writeFile).toHaveBeenCalledWith(expect.stringContaining('promptfoo-python-input-json'), expect.any(String));
39
+ expect(fs_1.promises.writeFile).toHaveBeenCalledWith(expect.stringContaining('promptfoo-python-input-json'), expect.any(String), 'utf-8');
40
40
  expect(fs_1.promises.readFile).toHaveBeenCalledWith(expect.stringContaining('promptfoo-python-output-json'), 'utf-8');
41
41
  expect(fs_1.promises.unlink).toHaveBeenCalledTimes(2); // Once for input JSON, once for output JSON
42
42
  });
@@ -1 +1 @@
1
- {"version":3,"file":"pythonWrapper.test.js","sourceRoot":"","sources":["../../test/pythonWrapper.test.ts"],"names":[],"mappings":";;AAAA,2BAAoC;AACpC,+CAA2C;AAC3C,2DAAsD;AACtD,mDAAsD;AAEtD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AACxB,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAC3B,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAC1B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;IACrB,QAAQ,EAAE;QACR,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE;QACpB,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE;QACnB,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;KAClB;CACF,CAAC,CAAC,CAAC;AAEJ,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,UAAU,CAAC,GAAG,EAAE;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C;YAEzD,MAAM,CAAC,aAAE,CAAC,MAAM,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,gFAAgF;QAC9H,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "promptfoo",
3
3
  "description": "LLM eval & testing toolkit",
4
4
  "author": "Ian Webster",
5
- "version": "0.80.1",
5
+ "version": "0.80.3",
6
6
  "license": "MIT",
7
7
  "type": "commonjs",
8
8
  "repository": {
@@ -105,6 +105,7 @@
105
105
  "esbuild": "^0.23.1",
106
106
  "eslint": "^8.57.0",
107
107
  "eslint-plugin-jest": "28.6.0",
108
+ "eslint-plugin-react-hooks": "4.6.2",
108
109
  "eslint-plugin-unicorn": "^55.0.0",
109
110
  "eslint-plugin-unused-imports": "^3.2.0",
110
111
  "jest": "^29.7.0",
@@ -121,7 +122,7 @@
121
122
  "zod-to-json-schema": "^3.23.2"
122
123
  },
123
124
  "dependencies": {
124
- "@anthropic-ai/sdk": "^0.26.1",
125
+ "@anthropic-ai/sdk": "^0.27.0",
125
126
  "@apidevtools/json-schema-ref-parser": "^11.7.0",
126
127
  "@googleapis/sheets": "^9.3.0",
127
128
  "ajv": "^8.17.1",
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[258],{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}})},55258:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return to}});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(18960),h=n(67070);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 v=n(52428),g=n(6882),j=n(12594),f=n(28891),b=n(10804),y=n(93179),Z=n(47887),w=n(11116),C=n(46446),S=n(13391),k=n(98507),E=n(93295),I=n(72467),N=n(95198),R=n(49605),P=n(79245),F=n(49050),T=n(27760),D=n(47827),M=n(84081),O=n(81679),L=n(50819),A=n(8864),U=n(38212),W=n(33932),z=n(39114),V=n(90923),_=n(10654),B=n(13457),J=n(21975),H=n(78276),K=n(72303),X=n(72053),G=n(94106),Y=n(89394),q=n(42834),$=n(26337),Q=n(91797),ee=n(29872),et=n(73701),en=n(39279),es=n(30666),el=n(15795),ea=n(66988),er=n(98489),ei=n(43226),eo=n(32162),ec=n.n(eo),ed=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)},v=a.filter(e=>ec()(c.toLowerCase(),e.label.toLowerCase())||"string"==typeof e.description&&ec()(c.toLowerCase(),e.description.toLowerCase())),g=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)(Y.Z,{open:t,onClose:x,maxWidth:"md",fullWidth:!0,children:[i?(0,s.jsx)(Q.Z,{children:i}):null,(0,s.jsxs)($.Z,{children:[o?(0,s.jsx)(P.Z,{sx:{mb:4},children:o}):null,(0,s.jsxs)(P.Z,{sx:{width:"100%",mt:2},children:[(0,s.jsx)(J.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,v.length-1));break;case"ArrowUp":e.preventDefault(),h(e=>Math.max(e-1,0));break;case"Enter":e.preventDefault(),u>=0&&u<v.length?g(v[u].evalId):v.length>0&&g(v[0].evalId);break;case"Escape":e.preventDefault(),x()}},sx:{mb:2},inputRef:p,id:"eval-selector-search-".concat(f)}),(0,s.jsx)(el.Z,{component:ee.Z,sx:{height:"600px",overflow:"auto"},ref:m,children:(0,s.jsxs)(et.Z,{stickyHeader:!0,children:[(0,s.jsx)(ea.Z,{children:(0,s.jsxs)(er.Z,{children:[(0,s.jsx)(es.Z,{children:"Created"}),(0,s.jsx)(es.Z,{children:"Description"}),(0,s.jsx)(es.Z,{children:"# Tests"})]})}),(0,s.jsx)(en.Z,{children:v.length>0?v.map((e,t)=>(0,s.jsxs)(er.Z,{hover:!0,onClick:()=>g(e.evalId),sx:{cursor:"pointer",backgroundColor:t===u?"rgba(255, 255, 0, 0.1)":"inherit"},children:[(0,s.jsx)(es.Z,{children:new Date(e.createdAt).toLocaleString()}),(0,s.jsx)(es.Z,{children:e.description||e.label}),(0,s.jsx)(es.Z,{children:e.numTests})]},e.evalId)):(0,s.jsx)(er.Z,{children:(0,s.jsx)(es.Z,{colSpan:3,align:"center",sx:{py:4},children:(0,s.jsxs)(P.Z,{sx:{textAlign:"center",color:"text.secondary"},children:[(0,s.jsx)(P.Z,{sx:{fontSize:"3rem",mb:2},children:"\uD83D\uDD0D"}),(0,s.jsx)(ei.Z,{variant:"h6",gutterBottom:!0,children:"No evaluations found"}),(0,s.jsx)(ei.Z,{variant:"body2",children:"Try adjusting your search or create a new evaluation"})]})})})})]})})]})]}),(0,s.jsx)(q.Z,{children:(0,s.jsx)(F.Z,{onClick:x,children:"Cancel"})})]})},eu=n(37204),eh=n(94660),ep=n(74810);let em={getItem:async e=>await (0,eu.U2)(e)||null,setItem:async(e,t)=>{await (0,eu.t8)(e,t)},removeItem:async e=>{await (0,eu.IV)(e)}},ex=(0,eh.Ue)()((0,ep.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})),columnStates:{},setColumnState:(t,n)=>e(e=>({columnStates:{...e.columnStates,[t]:n}}))}),{name:"ResultsViewStorage",storage:(0,ep.FL)(()=>em)}));var ev=function(e){let{initialEvals:t,onComparisonEvalSelected:n}=e,{evalId:a}=ex(),[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)(H.Z,{title:"Combine this eval with another eval run",placement:"left",children:(0,s.jsxs)(z.Z,{onClick:()=>{u(),i(!0)},children:[(0,s.jsx)(A.Z,{children:(0,s.jsx)(G.Z,{fontSize:"small"})}),(0,s.jsx)(U.Z,{children:"Compare with another eval"})]})}),(0,s.jsx)(ed,{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."})]})},eg=n(54719),ej=n(52481),ef=n(7175),eb=n(52653);function ey(e){let{open:t,onClose:a}=e,{config:r}=ex(),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)(Y.Z,{open:t,onClose:h,"aria-labelledby":"config-dialog-title",maxWidth:"md",fullWidth:!0,children:[(0,s.jsx)(Q.Z,{id:"config-dialog-title",children:(0,s.jsxs)(P.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,s.jsx)(ei.Z,{variant:"h6",style:{flexGrow:1},children:"Config"}),(0,s.jsxs)(P.Z,{children:[(0,s.jsx)(H.Z,{title:"Copy to clipboard",children:(0,s.jsx)(eb.Z,{onClick:()=>{i.current&&(i.current.select(),document.execCommand("copy"),c(!0))},children:o?(0,s.jsx)(eg.Z,{}):(0,s.jsx)(ef.Z,{})})}),(0,s.jsx)(H.Z,{title:"Download .yaml",children:(0,s.jsx)(eb.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)(ej.Z,{})})})]})]})}),(0,s.jsx)($.Z,{children:(0,s.jsx)(ei.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)(q.Z,{children:(0,s.jsx)(F.Z,{onClick:h,color:"primary",children:"Close"})})]})}var eZ=n(79715),ew=n(34235),eC=function(){let{table:e,config:t,evalId:n}=ex(),[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)(z.Z,{onClick:()=>{r(!0)},children:[(0,s.jsx)(A.Z,{children:(0,s.jsx)(ej.Z,{fontSize:"small"})}),(0,s.jsx)(U.Z,{children:"Download"})]}),(0,s.jsx)(Y.Z,{onClose:o,open:a,children:(0,s.jsx)($.Z,{children:(0,s.jsxs)(B.Z,{direction:"column",spacing:2,sx:{width:"100%"},children:[(0,s.jsx)(F.Z,{onClick:()=>{let e=ew.default.dump(t),n=new Blob([e],{type:"text/yaml;charset=utf-8"});i(n,"promptfooconfig.yaml"),o()},startIcon:(0,s.jsx)(ej.Z,{}),fullWidth:!0,sx:{justifyContent:"flex-start"},children:"Download YAML Config"}),(0,s.jsx)(F.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,eZ.P)(t),a=new Blob([l],{type:"text/csv;charset=utf-8;"});i(a,"".concat(n,"-table.csv")),o()},startIcon:(0,s.jsx)(ej.Z,{}),fullWidth:!0,sx:{justifyContent:"flex-start"},children:"Download Table CSV"}),(0,s.jsx)(F.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)(ej.Z,{}),fullWidth:!0,sx:{justifyContent:"flex-start"},children:"Download Table JSON"}),(0,s.jsx)(F.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)(ej.Z,{}),fullWidth:!0,sx:{justifyContent:"flex-start"},children:"Download DPO JSON"})]})})})]})},eS=n(58991),ek=e=>{let{recentEvals:t,onRecentEvalSelected:n}=e,[a,r]=(0,l.useState)(!1),i="undefined"!=typeof navigator&&/Mac|iPod|iPhone|iPad/.test(navigator.userAgent),o=()=>{r(!0)};return l.useEffect(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),o())};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(H.Z,{title:i?"Search for Evals (⌘ + K)":"Search for Evals (Ctrl + K)",children:(0,s.jsx)(eb.Z,{onClick:o,size:"large",children:(0,s.jsx)(eS.Z,{})})}),(0,s.jsx)(ed,{title:"Open an Eval",open:a,onClose:()=>{r(!1)},recentEvals:t,onRecentEvalSelected:n})]})},eE=n(69179),eI=n(33533),eN=n(41101),eR=n(36001);let eP=["#fd7f6f","#7eb0d5","#b2e061","#bd7ebe","#ffb55a","#ffee65","#beb9db","#fdcce5","#8bd3c7"];function eF(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)=>Number.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:eP[n%eP.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 eT(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:eP[n%eP.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 eD(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)(Y.Z,{open:d,onClose:()=>u(!1),children:[(0,s.jsx)(Q.Z,{children:"Compare prompt outputs"}),(0,s.jsxs)($.Z,{children:[(0,s.jsx)(M.Z,{sx:{m:1,minWidth:120},children:(0,s.jsx)(_.Z,{value:r,onChange:e=>i(Number(e.target.value)),children:t.head.prompts.map((e,t)=>(0,s.jsxs)(z.Z,{value:t,children:["Prompt ",t+1]},t))})}),(0,s.jsx)(M.Z,{sx:{m:1,minWidth:120},children:(0,s.jsx)(_.Z,{value:o,onChange:e=>c(Number(e.target.value)),children:t.head.prompts.map((e,t)=>(0,s.jsxs)(z.Z,{value:t,children:["Prompt ",t+1]},t))})})]})]}),(0,s.jsx)("canvas",{ref:n,style:{maxHeight:"300px",cursor:"pointer"},onClick:()=>u(!0)})]})}function eM(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:eP[n%eP.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 eO=l.memo(function(e){var t;let{columnVisibility:n}=e,a=(0,eN.Z)();eR.kL.defaults.color="dark"===a.palette.mode?"#aaa":"#666";let[r,i]=(0,l.useState)(!0),{table:o}=ex();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)(eE.SV,{fallback:null,children:(0,s.jsxs)(ee.Z,{sx:{position:"relative",padding:3,mt:2},children:[(0,s.jsx)(eb.Z,{style:{position:"absolute",right:0,top:0},onClick:()=>i(!1),children:(0,s.jsx)(eI.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)(eT,{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)(eM,{table:o}):(0,s.jsx)(eF,{table:o})}),(0,s.jsx)("div",{style:{width:"33%"},children:(0,s.jsx)(eD,{table:o})})]})]})})}),eL=n(7660),eA=n(3216),eU=n(5971);n(55974);var eW=e=>{let{lookup:t,metricTotals:n,onSearchTextChange:a}=e,[r,i]=l.useState(!1);if(!t||!Object.keys(t).length)return null;let o=Object.entries(t),c=r?o:o.slice(0,10);return(0,s.jsxs)("div",{className:"custom-metric-container",children:[c.map(e=>{let[t,l]=e;return t&&void 0!==l?(0,s.jsxs)("span",{onClick:()=>a&&a("metric=".concat(t,":")),className:a?"clickable":"",children:[t,":"," ",n&&n[t]?(0,s.jsxs)(s.Fragment,{children:[(l/n[t]*100).toFixed(2),"% (",l.toFixed(2),"/",n[t].toFixed(2),")"]}):l.toFixed(2)]},t):null}),o.length>10&&(0,s.jsx)("span",{className:"clickable",onClick:()=>i(!r),children:r?"Show less":"Show more..."})]})},ez=n(39329),eV=n(64748);function e_(e,t){return e.length<=t?e:e.slice(0,t)+"..."}function eB(e){let{gradingResults:t}=e,[n,a]=(0,l.useState)({});if(!t)return null;let r=e=>{a(t=>({...t,[e]:!t[e]}))};return(0,s.jsxs)(P.Z,{mt:2,children:[(0,s.jsx)(ei.Z,{variant:"subtitle1",children:"Assertions"}),(0,s.jsx)(el.Z,{children:(0,s.jsxs)(et.Z,{children:[(0,s.jsx)(ea.Z,{children:(0,s.jsxs)(er.Z,{children:[(0,s.jsx)(es.Z,{style:{fontWeight:"bold"},children:"Pass"}),(0,s.jsx)(es.Z,{style:{fontWeight:"bold"},children:"Score"}),(0,s.jsx)(es.Z,{style:{fontWeight:"bold"},children:"Type"}),(0,s.jsx)(es.Z,{style:{fontWeight:"bold"},children:"Value"}),(0,s.jsx)(es.Z,{style:{fontWeight:"bold"},children:"Reason"})]})}),(0,s.jsx)(en.Z,{children:t.map((e,t)=>{var l,a,i;if(!e)return null;let o=(null===(l=e.assertion)||void 0===l?void 0:l.value)?"object"==typeof e.assertion.value?JSON.stringify(e.assertion.value,null,2):String(e.assertion.value):"-",c=e_(o,300),d=n[t]||!1;return(0,s.jsxs)(er.Z,{children:[(0,s.jsx)(es.Z,{children:e.pass?"✅":"❌"}),(0,s.jsx)(es.Z,{children:null===(a=e.score)||void 0===a?void 0:a.toFixed(2)}),(0,s.jsx)(es.Z,{children:(null===(i=e.assertion)||void 0===i?void 0:i.type)||""}),(0,s.jsx)(es.Z,{style:{whiteSpace:"pre-wrap",cursor:"pointer"},onClick:()=>r(t),children:d?o:c}),(0,s.jsx)(es.Z,{style:{whiteSpace:"pre-wrap"},children:e.reason})]},t)})})]})})]})}function eJ(e){let{open:t,onClose:n,prompt:a,provider:r,output:i,gradingResults:o,metadata:c}=e,[d,u]=(0,l.useState)(!1),[h,p]=(0,l.useState)({});(0,l.useEffect)(()=>{u(!1)},[a]);let m=async e=>{await navigator.clipboard.writeText(e),u(!0)},x=e=>{p(t=>({...t,[e]:!t[e]}))};return(0,s.jsxs)(Y.Z,{open:t,onClose:n,fullWidth:!0,maxWidth:"lg",children:[(0,s.jsxs)(Q.Z,{children:["Details",r&&": ".concat(r)]}),(0,s.jsxs)($.Z,{children:[(0,s.jsxs)(P.Z,{mb:2,children:[(0,s.jsx)(ei.Z,{variant:"subtitle1",style:{marginBottom:"1rem"},children:"Prompt"}),(0,s.jsx)(eV.Z,{readOnly:!0,value:a,style:{width:"100%",padding:"0.75rem"},maxRows:20}),(0,s.jsx)(eb.Z,{onClick:()=>m(a),style:{position:"absolute",right:"10px",top:"10px"},children:d?(0,s.jsx)(eg.Z,{}):(0,s.jsx)(ez.Z,{})})]}),(null==c?void 0:c.redteamFinalPrompt)&&(0,s.jsxs)(P.Z,{my:2,children:[(0,s.jsx)(ei.Z,{variant:"subtitle1",style:{marginBottom:"1rem",marginTop:"1rem"},children:"Modified User Input (Red Team)"}),(0,s.jsx)(eV.Z,{readOnly:!0,maxRows:20,value:c.redteamFinalPrompt,style:{width:"100%",padding:"0.75rem"}})]}),i&&(0,s.jsxs)(P.Z,{my:2,children:[(0,s.jsx)(ei.Z,{variant:"subtitle1",style:{marginBottom:"1rem",marginTop:"1rem"},children:"Output"}),(0,s.jsx)(eV.Z,{readOnly:!0,maxRows:20,value:i,style:{width:"100%",padding:"0.75rem"}})]}),(0,s.jsx)(eB,{gradingResults:o}),c&&Object.keys(c).length>0&&(0,s.jsxs)(P.Z,{my:2,children:[(0,s.jsx)(ei.Z,{variant:"subtitle1",style:{marginBottom:"1rem",marginTop:"1rem"},children:"Metadata"}),(0,s.jsx)(el.Z,{children:(0,s.jsxs)(et.Z,{size:"small",children:[(0,s.jsx)(ea.Z,{children:(0,s.jsxs)(er.Z,{children:[(0,s.jsx)(es.Z,{children:(0,s.jsx)("strong",{children:"Key"})}),(0,s.jsx)(es.Z,{children:(0,s.jsx)("strong",{children:"Value"})})]})}),(0,s.jsx)(en.Z,{children:Object.entries(c).map(e=>{let[t,n]=e,l="string"==typeof n?n:JSON.stringify(n),a=e_(l,300),r=h[t]||!1;return(0,s.jsxs)(er.Z,{children:[(0,s.jsx)(es.Z,{children:t}),(0,s.jsx)(es.Z,{style:{whiteSpace:"pre-wrap",cursor:"pointer"},onClick:()=>x(t),children:r?l:a})]},t)})})]})})]})]}),(0,s.jsx)(q.Z,{children:(0,s.jsx)(F.Z,{onClick:n,children:"Close"})})]})}var eH=n(89396),eK=n(64173),eX=function(){let e=(0,eN.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)(F.Z,{variant:"text",color:"primary",startIcon:(0,s.jsx)(eH.Z,{}),onClick:()=>{n(!0)},children:"Generate test cases"})}),(0,s.jsxs)(Y.Z,{open:t,onClose:a,children:[(0,s.jsx)(Q.Z,{children:"Run on Command Line"}),(0,s.jsx)($.Z,{children:(0,s.jsxs)(eK.Z,{children:[(0,s.jsx)("p",{children:"This feature is in beta. UI coming soon."}),(0,s.jsxs)("p",{children:["Run"," ",(0,s.jsx)(P.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)(q.Z,{children:(0,s.jsx)(F.Z,{onClick:a,color:"primary",children:"Close"})})]})]})};function eG(e){return"string"==typeof e||"number"==typeof e?e.toString().length:Array.isArray(e)?e.reduce((e,t)=>e+eG(t),0):l.isValidElement(e)&&e.props.children?l.Children.toArray(e.props.children).reduce((e,t)=>e+eG(t),0):0}let eY=l.memo(function(e){let t,{text:n,maxLength:a}=e,[r,i]=l.useState(!0),o=()=>{i(!r)},c=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=eG(t);if(s+e>a){n.push(c(t,s));break}n.push(t),s+=e}return n}if(l.isValidElement(e)&&e.props.children){let n=eG(e.props.children);if(n>a-t)return l.cloneElement(e,{...e.props,children:c(e.props.children,t)})}return e};t=l.isValidElement(n)||"string"==typeof n?n:JSON.stringify(n);let d=r?c(t):t,u=eG(t)>a;return(0,s.jsxs)("div",{style:{cursor:u?"pointer":"normal"},onMouseDown:e=>{let t=e.clientX,n=e.clientY,s=e=>{let l=e.clientX,a=e.clientY;5>Math.abs(l-t)&&5>Math.abs(a-n)&&o(),document.removeEventListener("mouseup",s)};document.addEventListener("mouseup",s)},children:[d,r&&eG(t)>a&&(0,s.jsx)("span",{children:"..."})]})});var eq=n(45391),e$=n(40182),eQ=n(38640),e0=n.n(eQ),e1=n(33352),e2=n(15014),e3=n(65101);n(16658);var e5=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)(eb.Z,{onClick:()=>{a(e=>e>0?e-1:t.length-1)},children:(0,s.jsx)(e2.Z,{sx:{fontSize:12}})}),(0,s.jsxs)("span",{children:[n+1,"/",t.length]}),(0,s.jsx)(eb.Z,{onClick:()=>{a(e=>e<t.length-1?e+1:0)},children:(0,s.jsx)(e3.Z,{sx:{fontSize:12}})})]}),t[n].trim().split("\n").map((e,t)=>(0,s.jsxs)(l.Fragment,{children:[e,(0,s.jsx)("br",{})]},t))]})},e4=e=>{let{open:t,contextText:n,commentText:l,onClose:a,onSave:r,onChange:i}=e,o="dark"===(0,eN.Z)().palette.mode;return(0,s.jsxs)(Y.Z,{open:t,onClose:a,fullWidth:!0,maxWidth:"sm",children:[(0,s.jsx)(Q.Z,{children:"Edit Comment"}),(0,s.jsxs)($.Z,{children:[(0,s.jsx)(P.Z,{sx:{backgroundColor:o?"#1e1e1e":"#f0f0f0",padding:2,marginBottom:2},children:n}),(0,s.jsx)(J.Z,{autoFocus:!0,margin:"dense",type:"text",fullWidth:!0,multiline:!0,rows:4,value:l,onChange:e=>i(e.target.value)})]}),(0,s.jsxs)(q.Z,{children:[(0,s.jsx)(F.Z,{onClick:r,color:"primary",variant:"contained",children:"Save"}),(0,s.jsx)(F.Z,{onClick:a,color:"primary",children:"Cancel"})]})]})};let e8=()=>{let e=(0,l.useContext)(c);if(void 0===e)throw Error("useShiftKey must be used within a ShiftKeyProvider");return e};var e7=n(68192);let e9=l.memo(function(e){var t,n,a,r,i,o,c,d,u,h,p,m,x;let v,g,j,f,b,y,{output:Z,maxTextLength:w,rowIndex:C,promptIndex:S,onRating:k,firstOutput:E,showDiffs:I,searchText:N,showStats:R}=e,{renderMarkdown:P,prettifyJson:F,showPrompts:T,showPassFail:D}=ex(),[M,O]=l.useState(!1),[L,A]=l.useState(!1),[U,W]=l.useState(null),z=e=>{W(e||null),A(!L)},[V,_]=l.useState(!1),[B,J]=l.useState((null===(t=Z.gradingResult)||void 0===t?void 0:t.comment)||""),K=()=>{_(!0)},X="string"==typeof Z.text?Z.text:JSON.stringify(Z.text),G=[];if(!Z.pass&&X.includes("---")&&(G=((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&&E){let e,t="string"==typeof E.text?E.text:JSON.stringify(E.text);t.includes("---")&&(t=t.split("---").slice(1).join("---"));try{JSON.parse(t),JSON.parse(X),e=(0,e7.CT)(t,X)}catch(n){e=t.includes(". ")&&X.includes(". ")?(0,e7.SY)(t,X):(0,e7.NV)(t,X)}v=(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});v=(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)v=(0,s.jsx)(eU.U,{remarkPlugins:[e1.Z],components:{img:e=>{let{src:t,alt:n}=e;return(0,s.jsx)("img",{loading:"lazy",src:t,alt:n,onClick:()=>z(t),style:{cursor:"pointer"}})}},children:X});else if(F)try{v=(0,s.jsx)("pre",{children:JSON.stringify(JSON.parse(X),null,2)})}catch(e){}let Y=l.useCallback(e=>{var t;k(e,void 0,null===(t=Z.gradingResult)||void 0===t?void 0:t.comment)},[k,null===(n=Z.gradingResult)||void 0===n?void 0:n.comment]),q=l.useCallback(()=>{let e=prompt("Set test score (0.0 - 1.0):",String(Z.score));if(null!==e){let n=Number.parseFloat(e);if(!Number.isNaN(n)&&n>=0&&n<=1){var t;k(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.")}},[k,Z.score,null===(a=Z.gradingResult)||void 0===a?void 0:a.comment]),[$,Q]=l.useState(!1),ee=l.useCallback(()=>{navigator.clipboard.writeText(Z.text),Q(!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)g=(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);g=(0,s.jsx)(H.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 et=(null===(c=Z.gradingResult)||void 0===c?void 0:c.comment)&&"!highlight"!==Z.gradingResult.comment?(0,s.jsx)("div",{className:"comment",onClick:K,children:Z.gradingResult.comment}):null,en=R?(0,s.jsxs)("div",{className:"cell-detail",children:[g&&(0,s.jsxs)("div",{className:"stat-item",children:[(0,s.jsx)("strong",{children:"Tokens:"})," ",g]}),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,es=e8(),el=(0,s.jsxs)("div",{className:"cell-actions",children:[es&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"action",onClick:ee,onMouseDown:e=>e.preventDefault(),children:(0,s.jsx)(H.Z,{title:"Copy output to clipboard",children:(0,s.jsx)("span",{children:$?"✅":"\uD83D\uDCCB"})})}),(0,s.jsx)("span",{className:"action",onClick:()=>{let e;B.startsWith("!highlight")?k(void 0,void 0,e=B.slice(10).trim()):k(void 0,void 0,e=("!highlight "+B).trim()),J(e)},onMouseDown:e=>e.preventDefault(),children:(0,s.jsx)(H.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:()=>{O(!0)},children:(0,s.jsx)(H.Z,{title:"View output and test details",children:(0,s.jsx)("span",{children:"\uD83D\uDD0E"})})}),(0,s.jsx)(eJ,{open:M,onClose:()=>{O(!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)(H.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)(H.Z,{title:"Mark test failed (score 0.0)",children:(0,s.jsx)("span",{children:"\uD83D\uDC4E"})})}),(0,s.jsx)("span",{className:"action",onClick:q,children:(0,s.jsx)(H.Z,{title:"Set test score",children:(0,s.jsx)("span",{children:"\uD83D\uDD22"})})}),(0,s.jsx)("span",{className:"action",onClick:K,children:(0,s.jsx)(H.Z,{title:"Edit comment",children:(0,s.jsx)("span",{children:"✏️"})})})]}),ea={};(null===(u=Z.gradingResult)||void 0===u?void 0:u.comment)==="!highlight"&&(ea.backgroundColor="#ffffeb");let er=0,ei=0,eo=Z.gradingResult;if(eo?eo.componentResults?eo.componentResults.forEach(e=>{(null==e?void 0:e.pass)?er++:ei++}):(er=eo.pass?1:0,ei=eo.pass?0:1):Z.pass?er=1:Z.pass||(ei=1),1===ei&&1===er)y=(0,s.jsxs)(s.Fragment,{children:["".concat(ei," FAIL")," ","".concat(er," PASS")]});else{let e="";ei>1||er>1&&ei>0?e="".concat(ei," FAIL"):1===ei&&(e="FAIL");let t="";er>1||ei>1&&er>0?t="".concat(er," PASS"):1===er&&0===ei&&(t="PASS");let n=e&&t?" ":"";y=(0,s.jsxs)(s.Fragment,{children:[e,n,t]})}let ec=null===(x=Z.score)||0===x||1===x?"":"(".concat(x.toFixed(2),")");return(0,s.jsxs)("div",{className:"cell",style:ea,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,ec&&(0,s.jsxs)("span",{className:"score",children:[" ",ec]})]}),(0,s.jsx)(eW,{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,ec&&(0,s.jsxs)("span",{className:"score",children:[" ",ec]})]}),(0,s.jsx)(eW,{lookup:Z.namedScores}),(0,s.jsx)("span",{className:"fail-reason",children:(0,s.jsx)(e5,{failReasons:G})})]})})}),T&&E.prompt&&(0,s.jsxs)("div",{className:"prompt",children:[(0,s.jsx)("span",{className:"pill",children:"Prompt"}),Z.prompt]}),(0,s.jsx)(eY,{text:v||X,maxLength:w}),et,en,el,L&&U&&(0,s.jsx)("div",{className:"lightbox",onClick:()=>z(),children:(0,s.jsx)("img",{src:U,alt:"Lightbox"})}),(0,s.jsx)(e4,{open:V,contextText:Z.text,commentText:B,onClose:()=>{_(!1)},onSave:()=>{k(void 0,void 0,B),_(!1)},onChange:J})]})});function e6(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)(eY,{text:t,maxLength:n}),a&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(H.Z,{title:"View prompt",children:(0,s.jsx)("span",{className:"action",onClick:()=>{c(!0)},children:"\uD83D\uDD0E"})}),(0,s.jsx)(eJ,{open:o,onClose:()=>{c(!1)},prompt:a}),r&&(0,s.jsx)(H.Z,{title:"View other evals and datasets for this prompt",children:(0,s.jsx)("span",{className:"action",children:(0,s.jsx)(e0(),{href:"/prompts/?id=".concat(r),target:"_blank",children:(0,s.jsx)(eq.Z,{fontSize:"small"})})})})]})]})}n(93207);var te=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:v,config:g,inComparisonMode:j}=ex(),{showToast:f}=m();(0,y.Z)(x,"Table should be defined");let{head:b,body:Z}=x,w=l.useCallback(async(e,t,n,s,l)=>{var a,r;let i=[...Z],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.push(t):m[e]=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 g={head:b,body:i};if(v(g),j)f("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:g})});if(!e.ok)throw Error("Network response was not ok")}catch(e){console.error("Failed to update table:",e)}},[Z,b,v,p,j,f]),C=Object.keys(n).length>0,S=l.useMemo(()=>{try{return RegExp(c,"i")}catch(e){return console.error("Invalid regular expression:",e.message),null}},[c]),k=l.useMemo(()=>{try{return Z.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&&(!C||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||!S||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 S.test(r)}))})}catch(e){return console.error("Invalid regular expression:",e.message),Z}},[Z,i,r,c,n,C,S]),[E,I]=l.useState({pageIndex:0,pageSize:50});l.useEffect(()=>{I(e=>({...e,pageIndex:0}))},[i,r,c]);let N=l.useMemo(()=>b.prompts.map((e,t)=>Z.reduce((e,n)=>e+(n.outputs[t].pass?1:0),0)),[b.prompts,Z]),R=l.useMemo(()=>b.prompts.map((e,t)=>Z.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)),[b.prompts,Z]),D=l.useMemo(()=>b.prompts.map((e,t)=>Z.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)),[b.prompts,Z]),M=l.useMemo(()=>N.reduce((e,t,n,s)=>t>s[e]?n:e,0),[N]),O=N[M],L=l.useMemo(()=>(0,eL.Cl)(),[]),{renderMarkdown:A}=ex(),U=l.useMemo(()=>b.vars.length>0?[L.group({id:"vars",header:()=>(0,s.jsx)("span",{className:"font-bold",children:"Variables"}),columns:b.vars.map((e,n)=>L.accessor(e=>e.vars[n],{id:"Variable ".concat(n+1),header:()=>(0,s.jsx)(e6,{text:e,maxLength:t,className:"font-bold"}),cell:e=>{let n=e.getValue();return(0,s.jsx)("div",{className:"cell",children:A?(0,s.jsx)(eU.U,{remarkPlugins:[e1.Z],children:n}):(0,s.jsx)(eY,{text:n,maxLength:t})})},size:50}))})]:[],[L,b.vars,t,A]),W=l.useCallback((e,t)=>k[e].outputs[t],[k]),V=l.useCallback(e=>k[e].outputs[0],[k]),B=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]),K=l.useMemo(()=>[L.group({id:"prompts",header:()=>(0,s.jsx)("span",{className:"font-bold",children:"Outputs"}),columns:b.prompts.map((e,n)=>L.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,v;let j=N[n]&&Z.length?(N[n]/Z.length*100).toFixed(2):"0.00",f=N[n]===O&&0!==O,b="Prompt ".concat(n+1),y=i[b]||!1,w=d?(0,s.jsxs)("div",{className:"prompt-detail",children:[R[n]?(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Asserts:"})," ",D[n],"/",R[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/Z.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/Z.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,C=Array.isArray(null==g?void 0:g.providers)?g.providers[n]:void 0,S=e.provider?e.provider.split(":"):[],k=(0,s.jsx)(H.Z,{title:C?(0,s.jsx)("pre",{children:ew.default.dump(C)}):"",children:S.length>1?(0,s.jsxs)(s.Fragment,{children:[S[0],":",(0,s.jsx)("strong",{children:S.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:k}):null,(0,s.jsx)("div",{className:"summary",children:(0,s.jsxs)("div",{className:"highlight ".concat(f?"success":""),children:[(0,s.jsxs)("strong",{children:[j,"% passing"]})," (",N[n],"/",Z.length," cases)"]})}),(null===(v=e.metrics)||void 0===v?void 0:v.namedScores)&&Object.keys(e.metrics.namedScores).length>0?(0,s.jsx)(eW,{lookup:e.metrics.namedScores,metricTotals:B,onSearchTextChange:h}):null]}),(0,s.jsx)(e6,{className:"prompt-container",text:e.label||e.display||e.raw,expandedText:e.raw,maxLength:t,resourceId:e.id}),w,"failures"===r&&(0,s.jsx)(e$.Z,{sx:{"& .MuiFormControlLabel-label":{fontSize:"0.75rem"}},control:(0,s.jsx)(T.Z,{checked:y,onChange:e=>u(b,e.target.checked)}),label:"Show failures"})]})},cell:e=>{var l,a;let i=W(e.row.index,n);return(0,s.jsx)(e9,{output:i,maxTextLength:t,rowIndex:e.row.index,promptIndex:n,onRating:w.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})}}))})],[Z.length,null==g?void 0:g.providers,L,i,r,V,W,w,b.prompts,O,t,B,R,D,N,u,h,c,d]),X=l.useMemo(()=>{let e=Z.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)(eY,{text:String(e.getValue()),maxLength:t})}),size:50}:null},[Z,t]),G=l.useMemo(()=>{let e=[];return X&&e.push(X),e.push(...U,...K),e},[X,U,K]),Y=(0,eA.b7)({data:k,columns:G,columnResizeMode:"onChange",getCoreRowModel:(0,eL.sC)(),getPaginationRowModel:(0,eL.G_)(),state:{columnVisibility:n,pagination:E}});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:Y.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,eA.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:Y.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,eA.ie)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)})})]}),Y.getPageCount()>1&&(0,s.jsxs)(P.Z,{className:"pagination",mx:1,sx:{display:"flex",alignItems:"center",gap:2},children:[(0,s.jsx)(F.Z,{onClick:()=>{I(e=>({...e,pageIndex:Math.max(e.pageIndex-1,0)})),window.scrollTo(0,0)},disabled:0===Y.getState().pagination.pageIndex,variant:"contained",children:"Previous"}),(0,s.jsxs)(ei.Z,{component:"span",sx:{display:"flex",alignItems:"center",gap:1},children:["Page",(0,s.jsx)(J.Z,{size:"small",type:"number",value:Y.getState().pagination.pageIndex+1,onChange:e=>{let t=e.target.value?Number(e.target.value)-1:0;I(e=>({...e,pageIndex:Math.min(Math.max(t,0),Y.getPageCount()-1)}))},InputProps:{style:{width:"60px",textAlign:"center"}},variant:"outlined"}),(0,s.jsxs)("span",{children:["of ",Y.getPageCount()]})]}),(0,s.jsx)(F.Z,{onClick:()=>{I(e=>({...e,pageIndex:Math.min(e.pageIndex+1,Y.getPageCount()-1)})),window.scrollTo(0,0)},disabled:Y.getState().pagination.pageIndex+1>=Y.getPageCount(),variant:"contained",children:"Next"}),(0,s.jsxs)(ei.Z,{component:"span",sx:{display:"flex",alignItems:"center",gap:1},children:[(0,s.jsxs)(_.Z,{value:E.pageSize,onChange:e=>{I({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)(z.Z,{value:10,children:"10"}),(0,s.jsx)(z.Z,{value:50,children:"50"}),(0,s.jsx)(z.Z,{value:100,children:"100"}),(0,s.jsx)(z.Z,{value:500,children:"500"}),(0,s.jsx)(z.Z,{value:1e3,children:"1000"})]}),(0,s.jsx)("span",{children:"results per page"})]})]}),(0,s.jsx)(eX,{})]})}),tt=n(4451),tn=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:v,setShowPassFail:g}=ex();return(0,s.jsxs)(Y.Z,{open:t,onClose:n,fullWidth:!0,maxWidth:"sm",children:[(0,s.jsx)(Q.Z,{children:"Table View Settings"}),(0,s.jsxs)($.Z,{children:[(0,s.jsx)(P.Z,{children:(0,s.jsx)(H.Z,{title:"Forcing line breaks makes it easier to adjust column widths to your liking",placement:"right",children:(0,s.jsx)(e$.Z,{control:(0,s.jsx)(T.Z,{checked:"break-all"===r,onChange:e=>i(e.target.checked?"break-all":"break-word")}),label:"Force line breaks"})})}),(0,s.jsx)(P.Z,{children:(0,s.jsx)(e$.Z,{control:(0,s.jsx)(T.Z,{checked:d,onChange:e=>u(e.target.checked)}),label:"Render model outputs as Markdown"})}),(0,s.jsx)(P.Z,{children:(0,s.jsx)(e$.Z,{control:(0,s.jsx)(T.Z,{checked:h,onChange:e=>p(e.target.checked)}),label:"Prettify JSON outputs"})}),(0,s.jsx)(P.Z,{children:(0,s.jsx)(H.Z,{title:"Show the final prompt that produced the output in each cell.",placement:"right",children:(0,s.jsx)(e$.Z,{control:(0,s.jsx)(T.Z,{checked:m,onChange:e=>x(e.target.checked)}),label:"Show full prompt in output cell"})})}),(0,s.jsx)(P.Z,{children:(0,s.jsx)(H.Z,{title:"Show pass/fail status for each output.",placement:"right",children:(0,s.jsx)(e$.Z,{control:(0,s.jsx)(T.Z,{checked:v,onChange:e=>g(e.target.checked)}),label:"Show pass/fail status"})})}),(0,s.jsx)(P.Z,{children:(0,s.jsx)(H.Z,{title:"Show detailed inference statistics such as latency, tokens used, cost, etc.",placement:"right",children:(0,s.jsx)(e$.Z,{control:(0,s.jsx)(T.Z,{checked:o,onChange:e=>c(e.target.checked)}),label:"Show inference details"})})}),(0,s.jsxs)(P.Z,{maxWidth:"sm",children:[(0,s.jsxs)(ei.Z,{mt:2,children:["Max text length: ",l]}),(0,s.jsx)(tt.ZP,{min:25,max:1e3,value:l,onChange:(e,t)=>a(t)})]})]}),(0,s.jsx)(q.Z,{children:(0,s.jsx)(F.Z,{onClick:n,children:"Close"})})]})},ts=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)(Y.Z,{open:t,onClose:c,PaperProps:{style:{minWidth:"min(660px, 100%)"}},children:[(0,s.jsx)(Q.Z,{children:"Your eval is ready to share"}),(0,s.jsxs)($.Z,{children:[(0,s.jsx)(J.Z,{inputRef:r,value:a,fullWidth:!0,InputProps:{readOnly:!0,endAdornment:(0,s.jsx)(eb.Z,{onClick:()=>{r.current&&(r.current.select(),document.execCommand("copy"),o(!0))},children:i?(0,s.jsx)(eg.Z,{}):(0,s.jsx)(ef.Z,{})})}}),(0,s.jsx)(eK.Z,{sx:{fontSize:"0.75rem"},children:"Shared URLs are deleted after 2 weeks."})]}),(0,s.jsx)(q.Z,{children:(0,s.jsx)(F.Z,{onClick:c,color:"primary",children:"Close"})})]})};n(58022);let tl=(0,K.Z)(B.Z)(e=>{let{theme:t}=e;return{maxWidth:"100%",flexWrap:"wrap",[t.breakpoints.down("sm")]:{flexDirection:"column"}}});function ta(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:j,setConfig:b,maxTextLength:B,wordBreak:K,showInferenceDetails:G,evalId:Y,setInComparisonMode:q,columnStates:$,setColumnState:Q}=ex(),{setStateFromConfig:ee}=(0,Z.o)(),[et,en]=l.useState((null==h?void 0:h.get("search"))||""),[es]=(0,X.Nr)(et,1e3),el=e=>{en(e)},[ea,er]=l.useState({}),ei=l.useCallback((e,t)=>{er(n=>({...n,[e]:t}))},[er]);(0,y.Z)(m,"Table data must be loaded before rendering ResultsView");let{head:eo}=m,[ec,eu]=l.useState("all"),[eh,ep]=l.useState(!1),[em,eg]=l.useState(""),[ej,ef]=l.useState(!1),[eb,eZ]=l.useState(null),ew=Y||c||"default",eS=async()=>{ef(!0);let e="";try{if(v.T8){let t=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:j}})}),{id:n}=await t.json();e="".concat(i,"/eval/").concat(n)}else e="".concat(window.location.host,"/eval/?evalId=").concat(Y);eg(e),ep(!0)}catch(e){alert("Sorry, something went wrong.")}finally{ef(!1)}},eE=async e=>{eZ(null);try{var t;let n=await fetch("".concat(await (0,o.b)(),"/api/results/").concat(e),{cache:"no-store"}),s=await n.json(),l=s.data.results.table,a={head:{prompts:[...m.head.prompts.map(e=>({...e,label:"[".concat(Y||c||"Eval A","] ").concat(e.label||"")})),...l.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=l.body[t])||void 0===n?void 0:n.outputs)||[]]}})};x(a),b({...j,...s.data.config,description:'Combined: "'.concat((null==j?void 0:j.description)||"Eval A",'" and "').concat((null===(t=s.data.config)||void 0===t?void 0:t.description)||"Eval B",'"')}),q(!0)}catch(e){console.error("Error fetching comparison eval:",e),alert("Failed to load comparison eval. Please try again.")}},eI=l.useMemo(()=>m.body.some(e=>e.description),[m.body]),eN=eo.prompts.map((e,t)=>{let n=e.label||e.display||e.raw;return{value:"Prompt ".concat(t+1),label:"Prompt ".concat(t+1,": ").concat(n&&n.length>100?n.slice(0,100)+"...":n||""),group:"Prompts"}}),eR=l.useMemo(()=>[...eI?[{value:"description",label:"Description"}]:[],...eo.vars.map((e,t)=>({value:"Variable ".concat(t+1),label:"Var ".concat(t+1,": ").concat(eo.vars[t].length>100?eo.vars[t].slice(0,97)+"...":eo.vars[t]),group:"Variables"})),...eN],[eo.vars,eN,eI]),[eP,eF]=l.useState(!1),[eT,eD]=l.useState(!1),eM=l.useMemo(()=>[...eI?["description"]:[],...eo.vars.map((e,t)=>"Variable ".concat(t+1)),...eo.prompts.map((e,t)=>"Prompt ".concat(t+1))],[eI,eo.vars,eo.prompts]),eL=$[ew]||{selectedColumns:[],columnVisibility:{}},eA=l.useCallback(e=>{let t={};eM.forEach(n=>{t[n]=e.includes(n)}),Q(ew,{selectedColumns:e,columnVisibility:t})},[eM,Q,ew]);l.useEffect(()=>{0!==eL.selectedColumns.length&&eL.selectedColumns.every(e=>eM.includes(e))||eA(eM)},[eM,eL.selectedColumns,eA]);let eU=l.useCallback(e=>{let t=Array.isArray(e.target.value)?e.target.value:e.target.value.split(",");eA(t)},[eA]),eW=async()=>{(0,y.Z)(j,"Config must be loaded before clicking its description");let e=window.prompt("Enter new description:",j.description);if(null!==e&&e!==j.description){let t={...j,description:e};try{let e=await fetch("".concat(await (0,o.b)(),"/api/eval/").concat(Y),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:t})});if(!e.ok)throw Error("Network response was not ok");b(t)}catch(e){console.error("Failed to update table:",e)}}},ez=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(Y),{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")}},[eV,e_]=l.useState(!1),[eB,eJ]=l.useState(!1),eH=async()=>{Y&&(await navigator.clipboard.writeText(Y),e_(!0),setTimeout(()=>{e_(!1)},1e3))};return(0,s.jsxs)("div",{style:{marginLeft:"1rem",marginRight:"1rem"},children:[(0,s.jsxs)(tl,{direction:"row",mb:3,spacing:1,alignItems:"center",className:"eval-header",children:[(0,s.jsxs)(P.Z,{sx:{display:"flex",alignItems:"center",width:"100%",maxWidth:250},children:[(0,s.jsx)(J.Z,{variant:"outlined",size:"small",fullWidth:!0,value:(null==j?void 0:j.description)||Y||"",InputProps:{readOnly:!0,startAdornment:(0,s.jsx)(O.Z,{position:"start",children:(0,s.jsx)(N.Z,{})}),endAdornment:(0,s.jsx)(O.Z,{position:"end",children:(0,s.jsx)(w.Z,{})})},onClick:()=>eJ(!0),placeholder:"Search or select an eval...",sx:{cursor:"pointer"}}),(0,s.jsx)(ed,{open:eB,onClose:()=>eJ(!1),recentEvals:n,onRecentEvalSelected:a,title:"Select an Eval"})]}),(null==j?void 0:j.description)&&Y&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(H.Z,{title:"Click to copy",children:(0,s.jsx)(D.Z,{size:"small",label:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("strong",{children:"ID:"})," ",Y]}),sx:{opacity:.7,cursor:"pointer"},onClick:eH})}),(0,s.jsx)(u.Z,{open:eV,autoHideDuration:1e3,onClose:()=>e_(!1),message:"Eval id copied to clipboard"})]}),(0,s.jsx)(H.Z,{title:p?"":"Set eval author with `promptfoo config set email`",children:(0,s.jsx)(D.Z,{size:"small",label:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("strong",{children:"Author:"})," ",p||"Unknown"]}),sx:{opacity:.7}})})]}),(0,s.jsxs)(tl,{direction:"row",spacing:1,alignItems:"center",children:[(0,s.jsx)(P.Z,{children:(0,s.jsxs)(M.Z,{sx:{minWidth:200,maxWidth:350},size:"small",children:[(0,s.jsx)(L.Z,{id:"visible-columns-label",children:"Columns"}),(0,s.jsx)(_.Z,{labelId:"visible-columns-label",id:"visible-columns",multiple:!0,value:eL.selectedColumns,onChange:eU,input:(0,s.jsx)(V.Z,{label:"Visible columns"}),renderValue:e=>e.join(", "),children:eR.map(e=>(0,s.jsxs)(z.Z,{dense:!0,value:e.value,children:[(0,s.jsx)(T.Z,{checked:eL.selectedColumns.includes(e.value)}),(0,s.jsx)(U.Z,{primary:e.label})]},e.value))})]})}),(0,s.jsx)(P.Z,{children:(0,s.jsxs)(M.Z,{sx:{minWidth:180},size:"small",children:[(0,s.jsx)(L.Z,{id:"failure-filter-mode-label",children:"Display"}),(0,s.jsxs)(_.Z,{labelId:"filter-mode-label",id:"filter-mode",value:ec,onChange:e=>{let t=e.target.value;eu(t);let n={};eo.prompts.forEach((e,s)=>{n["Prompt ".concat(s+1)]="failures"===t}),er(n)},label:"Filter",children:[(0,s.jsx)(z.Z,{value:"all",children:"Show all results"}),(0,s.jsx)(z.Z,{value:"failures",children:"Show failures only"}),(0,s.jsx)(z.Z,{value:"different",children:"Show different only"}),(0,s.jsx)(z.Z,{value:"highlights",children:"Show highlights only"})]})]})}),(0,s.jsx)(P.Z,{children:(0,s.jsx)(J.Z,{sx:{minWidth:180},size:"small",label:"Search",placeholder:"Text or regex",value:et,onChange:e=>el(e.target.value)})}),(0,s.jsx)(P.Z,{flexGrow:1}),(0,s.jsx)(P.Z,{display:"flex",justifyContent:"flex-end",children:(0,s.jsxs)(tl,{direction:"row",spacing:2,children:[(0,s.jsx)(F.Z,{color:"primary",onClick:e=>{eZ(e.currentTarget)},startIcon:(0,s.jsx)(w.Z,{}),children:"Eval actions"}),j&&(0,s.jsxs)(W.Z,{id:"eval-actions-menu",anchorEl:eb,keepMounted:!0,open:!!eb,onClose:()=>{eZ(null)},children:[(0,s.jsx)(H.Z,{title:"Edit the name of this eval",placement:"left",children:(0,s.jsxs)(z.Z,{onClick:eW,children:[(0,s.jsx)(A.Z,{children:(0,s.jsx)(S.Z,{fontSize:"small"})}),"Edit name"]})}),(0,s.jsx)(H.Z,{title:"Edit this eval in the web UI",placement:"left",children:(0,s.jsxs)(z.Z,{onClick:()=>{ee(j),d.push("/setup/")},children:[(0,s.jsx)(A.Z,{children:(0,s.jsx)(k.Z,{fontSize:"small"})}),"Edit and re-run"]})}),(0,s.jsx)(ev,{initialEvals:n,onComparisonEvalSelected:eE}),(0,s.jsx)(H.Z,{title:"View the configuration that defines this eval",placement:"left",children:(0,s.jsxs)(z.Z,{onClick:()=>eF(!0),children:[(0,s.jsx)(A.Z,{children:(0,s.jsx)(R.Z,{fontSize:"small"})}),"View YAML"]})}),(0,s.jsx)(eC,{}),(null==j?void 0:j.sharing)&&(0,s.jsx)(H.Z,{title:"Generate a unique URL that others can access",placement:"left",children:(0,s.jsxs)(z.Z,{onClick:eS,disabled:ej,children:[(0,s.jsx)(A.Z,{children:ej?(0,s.jsx)(g.Z,{size:16}):(0,s.jsx)(I.Z,{fontSize:"small"})}),"Share"]})}),(0,s.jsx)(H.Z,{title:"Delete this eval",placement:"left",children:(0,s.jsxs)(z.Z,{onClick:ez,children:[(0,s.jsx)(A.Z,{children:(0,s.jsx)(C.Z,{fontSize:"small"})}),"Delete"]})})]}),(0,s.jsx)(H.Z,{title:"Edit table view settings",placement:"bottom",children:(0,s.jsx)(F.Z,{color:"primary",onClick:()=>eD(!0),startIcon:(0,s.jsx)(E.Z,{}),children:"Table Settings"})}),((null==j?void 0:j.redteam)||(null==j?void 0:null===(t=j.metadata)||void 0===t?void 0:t.redteam))&&(0,s.jsx)(H.Z,{title:"View vulnerability scan report",placement:"bottom",children:(0,s.jsx)(F.Z,{color:"primary",variant:"contained",startIcon:(0,s.jsx)(R.Z,{}),onClick:()=>d.push("/report/?evalId=".concat(Y||c)),children:"Vulnerability Report"})})]})})]}),(0,s.jsx)(eO,{columnVisibility:eL.columnVisibility}),(0,s.jsx)(te,{maxTextLength:B,columnVisibility:eL.columnVisibility,wordBreak:K,showStats:G,filterMode:ec,failureFilter:ea,searchText:es,onFailureFilterToggle:ei,onSearchTextChange:el}),(0,s.jsx)(ey,{open:eP,onClose:()=>eF(!1)}),(0,s.jsx)(ts,{open:eh,onClose:()=>ep(!1),shareUrl:em}),(0,s.jsx)(tn,{open:eT,onClose:()=>eD(!1)}),(0,s.jsx)(ek,{recentEvals:n,onRecentEvalSelected:a})]})}async function tr(){let e=(0,j.createClientComponentClient)(),{data:{user:t}}=await e.auth.getUser();(0,y.Z)(t,"User not logged in");let{data:n}=await e.from("EvaluationResult").select("id, createdAt").eq("user_id",t.id).order("createdAt",{ascending:!1}).limit(100);return n||[]}async function ti(e){let t=(0,j.createClientComponentClient)(),{data:n}=await t.from("EvaluationResult").select("*").eq("id",e).single();return n}function to(e){var t;let{fetchId:n,preloadedData:a,recentEvals:i,defaultEvalId:c}=e,u=(0,f.useRouter)(),{table:h,setTable:p,config:m,setConfig:j,evalId:Z,setEvalId:w,setAuthor:C,setInComparisonMode:S}=ex(),[k,E]=l.useState(!1),[I,N]=l.useState(!1),[R,P]=l.useState(i||[]),F=async()=>{let e=await fetch("".concat(await (0,o.b)(),"/api/results"),{cache:"no-store"}),t=await e.json();return P(t.data),t.data},T=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),j(n.data.config),C(n.data.author),w(e)},[p,j,w,C]),D=async e=>{v.Ox?(E(!1),u.push("/eval/remote:".concat(encodeURIComponent(e)))):u.push("/eval/?evalId=".concat(encodeURIComponent(e)))},[M,O]=l.useState(c||(null===(t=R[0])||void 0===t?void 0:t.evalId)),L=(0,f.useSearchParams)(),A=L?L.get("evalId"):null;return(l.useEffect(()=>{if(A){console.log("Eval init: Fetching eval by id",A);let e=async()=>{await T(A),E(!0),O(A),F()};e()}else if(a){var e;console.log("Eval init: Using preloaded data"),p(null===(e=a.data.results)||void 0===e?void 0:e.table),j(a.data.config),C(a.data.author||null),E(!0)}else if(n){console.log("Eval init: Fetching eval",n);let e=async()=>{var e;let t=v.T8?r:"",s="".concat(t,"/api/eval/").concat(n);console.log("Fetching eval from remote server",s);let l=await fetch(s);if(!l.ok){N(!0);return}let a=await l.json();p(null===(e=a.data.results)||void 0===e?void 0:e.table),j(a.data.config),C(a.data.author||null),E(!0)};e()}else if(v.T8)console.log("Eval init: Using local server websocket"),(0,o.b)().then(e=>{let t=(0,b.io)(e);return t.on("init",e=>{console.log("Initialized socket connection",e),E(!0),p(null==e?void 0:e.results.table),j(null==e?void 0:e.config),C((null==e?void 0:e.author)||null),F().then(e=>{var t,n,s;O(null===(t=e[0])||void 0===t?void 0:t.evalId),console.log("setting default eval id",null===(n=e[0])||void 0===n?void 0:n.evalId),w(null===(s=e[0])||void 0===s?void 0:s.evalId)})}),t.on("update",e=>{console.log("Received data update",e),p(e.results.table),j(e.config),C(e.author||null),F().then(e=>{var t;let n=null===(t=e[0])||void 0===t?void 0:t.evalId;n&&(O(n),w(n))})}),()=>{t.disconnect()}});else if(v.Ox)console.log("Eval init: Using Supabase"),tr().then(e=>{P(e.map(e=>({evalId:e.id,datasetId:null,label:e.createdAt,createdAt:new Date(e.createdAt).getTime(),description:"None",numTests:-1}))),e.length>0&&ti(e[0].id).then(t=>{(0,y.Z)(t,"Eval not found");let n=t.results,s=t.config;O(e[0].id),p(n.table),j(s),C(null),E(!0)})});else{console.log("Eval init: Fetching eval via recent");let e=async()=>{let e=await F();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].evalId,s=await fetch("".concat(t,"/api/results/").concat(n)),l=await s.json();p(l.data.results.table),j(l.data.config),C(l.data.author||null),E(!0),O(n),w(n)}};e()}S(!1)},[n,p,j,C,w,T,a,O,A,S]),l.useEffect(()=>{document.title="".concat((null==m?void 0:m.description)||Z||"Eval"," | promptfoo")},[m,Z]),I)?(0,s.jsx)("div",{className:"notice",children:"404 Eval not found"}):k&&h?(0,s.jsx)(x,{children:(0,s.jsx)(d,{children:(0,s.jsx)(ta,{defaultEvalId:M,recentEvals:R,onRecentEvalSelected:D})})}):(0,s.jsxs)("div",{className:"notice",children:[(0,s.jsx)("div",{children:(0,s.jsx)(g.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(94660),l=n(74810);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(){}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[798],{52481:function(e,t,r){var a=r(71851);t.Z=void 0;var n=a(r(80984)),o=r(24004);t.Z=(0,n.default)((0,o.jsx)("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download")},78342:function(e,t,r){r.d(t,{f:function(){return o}});var a=r(26520),n=r(25702);function o(e){return(0,n.ZP)("MuiListItemIcon",e)}let l=(0,a.Z)("MuiListItemIcon",["root","alignItemsFlexStart"]);t.Z=l},38212:function(e,t,r){var a=r(94312),n=r(79042),o=r(14978),l=r(53468),i=r(95600),s=r(43226),u=r(77820),d=r(19996),c=r(35843),p=r(69660),m=r(24004);let v=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],b=e=>{let{classes:t,inset:r,primary:a,secondary:n,dense:o}=e;return(0,i.Z)({root:["root",r&&"inset",o&&"dense",a&&n&&"multiline"],primary:["primary"],secondary:["secondary"]},p.L,t)},h=(0,c.ZP)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[{[`& .${p.Z.primary}`]:t.primary},{[`& .${p.Z.secondary}`]:t.secondary},t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})(({ownerState:e})=>(0,n.Z)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),f=o.forwardRef(function(e,t){let r=(0,d.i)({props:e,name:"MuiListItemText"}),{children:i,className:c,disableTypography:p=!1,inset:f=!1,primary:y,primaryTypographyProps:g,secondary:Z,secondaryTypographyProps:x}=r,k=(0,a.Z)(r,v),{dense:S}=o.useContext(u.Z),w=null!=y?y:i,L=Z,C=(0,n.Z)({},r,{disableTypography:p,inset:f,primary:!!w,secondary:!!L,dense:S}),$=b(C);return null==w||w.type===s.Z||p||(w=(0,m.jsx)(s.Z,(0,n.Z)({variant:S?"body2":"body1",className:$.primary,component:null!=g&&g.variant?void 0:"span",display:"block"},g,{children:w}))),null==L||L.type===s.Z||p||(L=(0,m.jsx)(s.Z,(0,n.Z)({variant:"body2",className:$.secondary,color:"text.secondary",display:"block"},x,{children:L}))),(0,m.jsxs)(h,(0,n.Z)({className:(0,l.Z)($.root,c),ownerState:C,ref:t},k,{children:[w,L]}))});t.Z=f},69660:function(e,t,r){r.d(t,{L:function(){return o}});var a=r(26520),n=r(25702);function o(e){return(0,n.ZP)("MuiListItemText",e)}let l=(0,a.Z)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);t.Z=l},39114:function(e,t,r){r.d(t,{Z:function(){return P}});var a=r(94312),n=r(79042),o=r(14978),l=r(53468),i=r(95600),s=r(24871),u=r(35843),d=r(22630),c=r(19996),p=r(77820),m=r(84008),v=r(88519),b=r(37663),h=r(26520);let f=(0,h.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);var y=r(78342),g=r(69660),Z=r(25702);function x(e){return(0,Z.ZP)("MuiMenuItem",e)}let k=(0,h.Z)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var S=r(24004);let w=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],L=e=>{let{disabled:t,dense:r,divider:a,disableGutters:o,selected:l,classes:s}=e,u=(0,i.Z)({root:["root",r&&"dense",t&&"disabled",!o&&"gutters",a&&"divider",l&&"selected"]},x,s);return(0,n.Z)({},s,u)},C=(0,u.ZP)(m.Z,{shouldForwardProp:e=>(0,d.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,n.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"}},[`&.${k.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,s.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${k.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,s.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${k.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,s.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,s.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${k.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${k.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${f.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${f.inset}`]:{marginLeft:52},[`& .${g.Z.root}`]:{marginTop:0,marginBottom:0},[`& .${g.Z.inset}`]:{paddingLeft:36},[`& .${y.Z.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&(0,n.Z)({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${y.Z.root} svg`]:{fontSize:"1.25rem"}}))),$=o.forwardRef(function(e,t){let r;let i=(0,c.i)({props:e,name:"MuiMenuItem"}),{autoFocus:s=!1,component:u="li",dense:d=!1,divider:m=!1,disableGutters:h=!1,focusVisibleClassName:f,role:y="menuitem",tabIndex:g,className:Z}=i,x=(0,a.Z)(i,w),k=o.useContext(p.Z),$=o.useMemo(()=>({dense:d||k.dense||!1,disableGutters:h}),[k.dense,d,h]),P=o.useRef(null);(0,v.Z)(()=>{s&&P.current&&P.current.focus()},[s]);let M=(0,n.Z)({},i,{dense:$.dense,divider:m,disableGutters:h}),R=L(i),T=(0,b.Z)(P,t);return i.disabled||(r=void 0!==g?g:-1),(0,S.jsx)(p.Z.Provider,{value:$,children:(0,S.jsx)(C,(0,n.Z)({ref:T,role:y,tabIndex:r,component:u,focusVisibleClassName:(0,l.Z)(R.focusVisible,f),className:(0,l.Z)(R.root,Z)},x,{ownerState:M,classes:R}))})});var P=$},4451:function(e,t,r){let a;r.d(t,{ZP:function(){return ee}});var n=r(94312),o=r(79042),l=r(14978),i=r(53468),s=r(95600),u=r(24871),d=r(19086),c=r(73208),p=r(48348),m=r(96278),v=r(34625),b=r(59104),h=r(37916),f=r(95137),y=r(1091),g=r(78136),Z={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},x=r(1535);function k(e,t){return e-t}function S(e,t){var r;let{index:a}=null!=(r=e.reduce((e,r,a)=>{let n=Math.abs(t-r);return null===e||n<e.distance||n===e.distance?{distance:n,index:a}:e},null))?r:{};return a}function w(e,t){if(void 0!==t.current&&e.changedTouches){for(let r=0;r<e.changedTouches.length;r+=1){let a=e.changedTouches[r];if(a.identifier===t.current)return{x:a.clientX,y:a.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function L({values:e,newValue:t,index:r}){let a=e.slice();return a[r]=t,a.sort(k)}function C({sliderRef:e,activeIndex:t,setActive:r}){var a,n,o;let l=(0,m.Z)(e.current);null!=(a=e.current)&&a.contains(l.activeElement)&&Number(null==l||null==(n=l.activeElement)?void 0:n.getAttribute("data-index"))===t||null==(o=e.current)||o.querySelector(`[type="range"][data-index="${t}"]`).focus(),r&&r(t)}function $(e,t){return"number"==typeof e&&"number"==typeof t?e===t:"object"==typeof e&&"object"==typeof t&&function(e,t,r=(e,t)=>e===t){return e.length===t.length&&e.every((e,a)=>r(e,t[a]))}(e,t)}let P={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},M=e=>e;function R(){return void 0===a&&(a="undefined"==typeof CSS||"function"!=typeof CSS.supports||CSS.supports("touch-action","none")),a}var T=r(35843),z=r(19996),N=r(58112),j=e=>!e||!(0,p.Z)(e),A=r(28702),I=r(26520),O=r(25702);function E(e){return(0,O.ZP)("MuiSlider",e)}let F=(0,I.Z)("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]);var V=r(24004);let D=e=>{let{open:t}=e,r={offset:(0,i.Z)(t&&F.valueLabelOpen),circle:F.valueLabelCircle,label:F.valueLabelLabel};return r},B=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function Y(e){return e}let H=(0,T.ZP)("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`color${(0,A.Z)(r.color)}`],"medium"!==r.size&&t[`size${(0,A.Z)(r.size)}`],r.marked&&t.marked,"vertical"===r.orientation&&t.vertical,"inverted"===r.track&&t.trackInverted,!1===r.track&&t.trackFalse]}})(({theme:e})=>{var t;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${F.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${F.dragging}`]:{[`& .${F.thumb}, & .${F.track}`]:{transition:"none"}},variants:[...Object.keys((null!=(t=e.vars)?t:e).palette).filter(t=>{var r;return(null!=(r=e.vars)?r:e).palette[t].main}).map(t=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),q=(0,T.ZP)("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),W=(0,T.ZP)("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>{var t;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys((null!=(t=e.vars)?t:e).palette).filter(t=>{var r;return(null!=(r=e.vars)?r:e).palette[t].main}).map(t=>({props:{color:t,track:"inverted"},style:(0,o.Z)({},e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:(0,o.Z)({backgroundColor:(0,u.$n)(e.palette[t].main,.62),borderColor:(0,u.$n)(e.palette[t].main,.62)},e.applyStyles("dark",{backgroundColor:(0,u._j)(e.palette[t].main,.5)}),e.applyStyles("dark",{borderColor:(0,u._j)(e.palette[t].main,.5)})))}))]}}),_=(0,T.ZP)("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.thumb,t[`thumbColor${(0,A.Z)(r.color)}`],"medium"!==r.size&&t[`thumbSize${(0,A.Z)(r.size)}`]]}})(({theme:e})=>{var t;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${F.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.keys((null!=(t=e.vars)?t:e).palette).filter(t=>{var r;return(null!=(r=e.vars)?r:e).palette[t].main}).map(t=>({props:{color:t},style:{[`&:hover, &.${F.focusVisible}`]:(0,o.Z)({},e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${(0,u.Fq)(e.palette[t].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${F.active}`]:(0,o.Z)({},e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${(0,u.Fq)(e.palette[t].main,.16)}`})}}))]}}),X=(0,T.ZP)(function(e){let{children:t,className:r,value:a}=e,n=D(e);return t?l.cloneElement(t,{className:(0,i.Z)(t.props.className)},(0,V.jsxs)(l.Fragment,{children:[t.props.children,(0,V.jsx)("span",{className:(0,i.Z)(n.offset,r),"aria-hidden":!0,children:(0,V.jsx)("span",{className:n.circle,children:(0,V.jsx)("span",{className:n.label,children:a})})})]})):null},{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e})=>(0,o.Z)({zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${F.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${F.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})),K=(0,T.ZP)("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>(0,N.Z)(e)&&"markActive"!==e,overridesResolver:(e,t)=>{let{markActive:r}=e;return[t.mark,r&&t.markActive]}})(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]})),G=(0,T.ZP)("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>(0,N.Z)(e)&&"markLabelActive"!==e,overridesResolver:(e,t)=>t.markLabel})(({theme:e})=>(0,o.Z)({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]})),U=e=>{let{disabled:t,dragging:r,marked:a,orientation:n,track:o,classes:l,color:i,size:u}=e,d={root:["root",t&&"disabled",r&&"dragging",a&&"marked","vertical"===n&&"vertical","inverted"===o&&"trackInverted",!1===o&&"trackFalse",i&&`color${(0,A.Z)(i)}`,u&&`size${(0,A.Z)(u)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",u&&`thumbSize${(0,A.Z)(u)}`,i&&`thumbColor${(0,A.Z)(i)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return(0,s.Z)(d,E,l)},J=({children:e})=>e,Q=l.forwardRef(function(e,t){var r,a,s,u,T,N,A,I,O,E,F,D,Q,ee,et,er,ea,en,eo,el,ei,es,eu,ed;let ec=(0,z.i)({props:e,name:"MuiSlider"}),ep=(0,d.V)(),{"aria-label":em,"aria-valuetext":ev,"aria-labelledby":eb,component:eh="span",components:ef={},componentsProps:ey={},color:eg="primary",classes:eZ,className:ex,disableSwap:ek=!1,disabled:eS=!1,getAriaLabel:ew,getAriaValueText:eL,marks:eC=!1,max:e$=100,min:eP=0,orientation:eM="horizontal",shiftStep:eR=10,size:eT="medium",step:ez=1,scale:eN=Y,slotProps:ej,slots:eA,track:eI="normal",valueLabelDisplay:eO="off",valueLabelFormat:eE=Y}=ec,eF=(0,n.Z)(ec,B),eV=(0,o.Z)({},ec,{isRtl:ep,max:e$,min:eP,classes:eZ,disabled:eS,disableSwap:ek,orientation:eM,marks:eC,color:eg,size:eT,step:ez,shiftStep:eR,scale:eN,track:eI,valueLabelDisplay:eO,valueLabelFormat:eE}),{axisProps:eD,getRootProps:eB,getHiddenInputProps:eY,getThumbProps:eH,open:eq,active:eW,axis:e_,focusedThumbIndex:eX,range:eK,dragging:eG,marks:eU,values:eJ,trackOffset:eQ,trackLeap:e0,getThumbStyle:e1}=function(e){let{"aria-labelledby":t,defaultValue:r,disabled:a=!1,disableSwap:n=!1,isRtl:i=!1,marks:s=!1,max:u=100,min:d=0,name:c,onChange:p,onChangeCommitted:T,orientation:z="horizontal",rootRef:N,scale:j=M,step:A=1,shiftStep:I=10,tabIndex:O,value:E}=e,F=l.useRef(),[V,D]=l.useState(-1),[B,Y]=l.useState(-1),[H,q]=l.useState(!1),W=l.useRef(0),[_,X]=(0,v.Z)({controlled:E,default:null!=r?r:d,name:"Slider"}),K=p&&((e,t,r)=>{let a=e.nativeEvent||e,n=new a.constructor(a.type,a);Object.defineProperty(n,"target",{writable:!0,value:{value:t,name:c}}),p(n,t,r)}),G=Array.isArray(_),U=G?_.slice().sort(k):[_];U=U.map(e=>null==e?d:(0,b.Z)(e,d,u));let J=!0===s&&null!==A?[...Array(Math.floor((u-d)/A)+1)].map((e,t)=>({value:d+A*t})):s||[],Q=J.map(e=>e.value),{isFocusVisibleRef:ee,onBlur:et,onFocus:er,ref:ea}=(0,h.Z)(),[en,eo]=l.useState(-1),el=l.useRef(),ei=(0,f.Z)(ea,el),es=(0,f.Z)(N,ei),eu=e=>t=>{var r;let a=Number(t.currentTarget.getAttribute("data-index"));er(t),!0===ee.current&&eo(a),Y(a),null==e||null==(r=e.onFocus)||r.call(e,t)},ed=e=>t=>{var r;et(t),!1===ee.current&&eo(-1),Y(-1),null==e||null==(r=e.onBlur)||r.call(e,t)},ec=(e,t)=>{let r=Number(e.currentTarget.getAttribute("data-index")),a=U[r],o=Q.indexOf(a),l=t;if(J&&null==A){let e=Q[Q.length-1];l=l>e?e:l<Q[0]?Q[0]:l<a?Q[o-1]:Q[o+1]}if(l=(0,b.Z)(l,d,u),G){n&&(l=(0,b.Z)(l,U[r-1]||-1/0,U[r+1]||1/0));let e=l;l=L({values:U,newValue:l,index:r});let t=r;n||(t=l.indexOf(e)),C({sliderRef:el,activeIndex:t})}X(l),eo(r),K&&!$(l,_)&&K(e,l,r),T&&T(e,l)},ep=e=>t=>{var r;if(null!==A){let e=Number(t.currentTarget.getAttribute("data-index")),r=U[e],a=null;("ArrowLeft"===t.key||"ArrowDown"===t.key)&&t.shiftKey||"PageDown"===t.key?a=Math.max(r-I,d):(("ArrowRight"===t.key||"ArrowUp"===t.key)&&t.shiftKey||"PageUp"===t.key)&&(a=Math.min(r+I,u)),null!==a&&(ec(t,a),t.preventDefault())}null==e||null==(r=e.onKeyDown)||r.call(e,t)};(0,y.Z)(()=>{if(a&&el.current.contains(document.activeElement)){var e;null==(e=document.activeElement)||e.blur()}},[a]),a&&-1!==V&&D(-1),a&&-1!==en&&eo(-1);let em=e=>t=>{var r;null==(r=e.onChange)||r.call(e,t),ec(t,t.target.valueAsNumber)},ev=l.useRef(),eb=z;i&&"horizontal"===z&&(eb+="-reverse");let eh=({finger:e,move:t=!1})=>{let r,a;let{current:o}=el,{width:l,height:i,bottom:s,left:c}=o.getBoundingClientRect();if(r=0===eb.indexOf("vertical")?(s-e.y)/i:(e.x-c)/l,-1!==eb.indexOf("-reverse")&&(r=1-r),a=(u-d)*r+d,A)a=function(e,t,r){let a=Math.round((e-r)/t)*t+r;return Number(a.toFixed(function(e){if(1>Math.abs(e)){let t=e.toExponential().split("e-"),r=t[0].split(".")[1];return(r?r.length:0)+parseInt(t[1],10)}let t=e.toString().split(".")[1];return t?t.length:0}(t)))}(a,A,d);else{let e=S(Q,a);a=Q[e]}a=(0,b.Z)(a,d,u);let p=0;if(G){p=t?ev.current:S(U,a),n&&(a=(0,b.Z)(a,U[p-1]||-1/0,U[p+1]||1/0));let e=a;a=L({values:U,newValue:a,index:p}),n&&t||(p=a.indexOf(e),ev.current=p)}return{newValue:a,activeIndex:p}},ef=(0,g.Z)(e=>{let t=w(e,F);if(!t)return;if(W.current+=1,"mousemove"===e.type&&0===e.buttons){ey(e);return}let{newValue:r,activeIndex:a}=eh({finger:t,move:!0});C({sliderRef:el,activeIndex:a,setActive:D}),X(r),!H&&W.current>2&&q(!0),K&&!$(r,_)&&K(e,r,a)}),ey=(0,g.Z)(e=>{let t=w(e,F);if(q(!1),!t)return;let{newValue:r}=eh({finger:t,move:!0});D(-1),"touchend"===e.type&&Y(-1),T&&T(e,r),F.current=void 0,eZ()}),eg=(0,g.Z)(e=>{if(a)return;R()||e.preventDefault();let t=e.changedTouches[0];null!=t&&(F.current=t.identifier);let r=w(e,F);if(!1!==r){let{newValue:t,activeIndex:a}=eh({finger:r});C({sliderRef:el,activeIndex:a,setActive:D}),X(t),K&&!$(t,_)&&K(e,t,a)}W.current=0;let n=(0,m.Z)(el.current);n.addEventListener("touchmove",ef,{passive:!0}),n.addEventListener("touchend",ey,{passive:!0})}),eZ=l.useCallback(()=>{let e=(0,m.Z)(el.current);e.removeEventListener("mousemove",ef),e.removeEventListener("mouseup",ey),e.removeEventListener("touchmove",ef),e.removeEventListener("touchend",ey)},[ey,ef]);l.useEffect(()=>{let{current:e}=el;return e.addEventListener("touchstart",eg,{passive:R()}),()=>{e.removeEventListener("touchstart",eg),eZ()}},[eZ,eg]),l.useEffect(()=>{a&&eZ()},[a,eZ]);let ex=e=>t=>{var r;if(null==(r=e.onMouseDown)||r.call(e,t),a||t.defaultPrevented||0!==t.button)return;t.preventDefault();let n=w(t,F);if(!1!==n){let{newValue:e,activeIndex:r}=eh({finger:n});C({sliderRef:el,activeIndex:r,setActive:D}),X(e),K&&!$(e,_)&&K(t,e,r)}W.current=0;let o=(0,m.Z)(el.current);o.addEventListener("mousemove",ef,{passive:!0}),o.addEventListener("mouseup",ey)},ek=((G?U[0]:d)-d)*100/(u-d),eS=(U[U.length-1]-d)*100/(u-d)-ek,ew=e=>t=>{var r;null==(r=e.onMouseOver)||r.call(e,t);let a=Number(t.currentTarget.getAttribute("data-index"));Y(a)},eL=e=>t=>{var r;null==(r=e.onMouseLeave)||r.call(e,t),Y(-1)};return{active:V,axis:eb,axisProps:P,dragging:H,focusedThumbIndex:en,getHiddenInputProps:(r={})=>{var n;let l=(0,x.Z)(r),s={onChange:em(l||{}),onFocus:eu(l||{}),onBlur:ed(l||{}),onKeyDown:ep(l||{})},p=(0,o.Z)({},l,s);return(0,o.Z)({tabIndex:O,"aria-labelledby":t,"aria-orientation":z,"aria-valuemax":j(u),"aria-valuemin":j(d),name:c,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":null!=(n=e.step)?n:void 0,disabled:a},r,p,{style:(0,o.Z)({},Z,{direction:i?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:(e={})=>{let t=(0,x.Z)(e),r={onMouseDown:ex(t||{})},a=(0,o.Z)({},t,r);return(0,o.Z)({},e,{ref:es},a)},getThumbProps:(e={})=>{let t=(0,x.Z)(e),r={onMouseOver:ew(t||{}),onMouseLeave:eL(t||{})};return(0,o.Z)({},e,t,r)},marks:J,open:B,range:G,rootRef:es,trackLeap:eS,trackOffset:ek,values:U,getThumbStyle:e=>({pointerEvents:-1!==V&&V!==e?"none":void 0})}}((0,o.Z)({},eV,{rootRef:t}));eV.marked=eU.length>0&&eU.some(e=>e.label),eV.dragging=eG,eV.focusedThumbIndex=eX;let e2=U(eV),e5=null!=(r=null!=(a=null==eA?void 0:eA.root)?a:ef.Root)?r:H,e4=null!=(s=null!=(u=null==eA?void 0:eA.rail)?u:ef.Rail)?s:q,e6=null!=(T=null!=(N=null==eA?void 0:eA.track)?N:ef.Track)?T:W,e8=null!=(A=null!=(I=null==eA?void 0:eA.thumb)?I:ef.Thumb)?A:_,e3=null!=(O=null!=(E=null==eA?void 0:eA.valueLabel)?E:ef.ValueLabel)?O:X,e9=null!=(F=null!=(D=null==eA?void 0:eA.mark)?D:ef.Mark)?F:K,e7=null!=(Q=null!=(ee=null==eA?void 0:eA.markLabel)?ee:ef.MarkLabel)?Q:G,te=null!=(et=null!=(er=null==eA?void 0:eA.input)?er:ef.Input)?et:"input",tt=null!=(ea=null==ej?void 0:ej.root)?ea:ey.root,tr=null!=(en=null==ej?void 0:ej.rail)?en:ey.rail,ta=null!=(eo=null==ej?void 0:ej.track)?eo:ey.track,tn=null!=(el=null==ej?void 0:ej.thumb)?el:ey.thumb,to=null!=(ei=null==ej?void 0:ej.valueLabel)?ei:ey.valueLabel,tl=null!=(es=null==ej?void 0:ej.mark)?es:ey.mark,ti=null!=(eu=null==ej?void 0:ej.markLabel)?eu:ey.markLabel,ts=null!=(ed=null==ej?void 0:ej.input)?ed:ey.input,tu=(0,c.Z)({elementType:e5,getSlotProps:eB,externalSlotProps:tt,externalForwardedProps:eF,additionalProps:(0,o.Z)({},j(e5)&&{as:eh}),ownerState:(0,o.Z)({},eV,null==tt?void 0:tt.ownerState),className:[e2.root,ex]}),td=(0,c.Z)({elementType:e4,externalSlotProps:tr,ownerState:eV,className:e2.rail}),tc=(0,c.Z)({elementType:e6,externalSlotProps:ta,additionalProps:{style:(0,o.Z)({},eD[e_].offset(eQ),eD[e_].leap(e0))},ownerState:(0,o.Z)({},eV,null==ta?void 0:ta.ownerState),className:e2.track}),tp=(0,c.Z)({elementType:e8,getSlotProps:eH,externalSlotProps:tn,ownerState:(0,o.Z)({},eV,null==tn?void 0:tn.ownerState),className:e2.thumb}),tm=(0,c.Z)({elementType:e3,externalSlotProps:to,ownerState:(0,o.Z)({},eV,null==to?void 0:to.ownerState),className:e2.valueLabel}),tv=(0,c.Z)({elementType:e9,externalSlotProps:tl,ownerState:eV,className:e2.mark}),tb=(0,c.Z)({elementType:e7,externalSlotProps:ti,ownerState:eV,className:e2.markLabel}),th=(0,c.Z)({elementType:te,getSlotProps:eY,externalSlotProps:ts,ownerState:eV});return(0,V.jsxs)(e5,(0,o.Z)({},tu,{children:[(0,V.jsx)(e4,(0,o.Z)({},td)),(0,V.jsx)(e6,(0,o.Z)({},tc)),eU.filter(e=>e.value>=eP&&e.value<=e$).map((e,t)=>{let r;let a=(e.value-eP)*100/(e$-eP),n=eD[e_].offset(a);return r=!1===eI?-1!==eJ.indexOf(e.value):"normal"===eI&&(eK?e.value>=eJ[0]&&e.value<=eJ[eJ.length-1]:e.value<=eJ[0])||"inverted"===eI&&(eK?e.value<=eJ[0]||e.value>=eJ[eJ.length-1]:e.value>=eJ[0]),(0,V.jsxs)(l.Fragment,{children:[(0,V.jsx)(e9,(0,o.Z)({"data-index":t},tv,!(0,p.Z)(e9)&&{markActive:r},{style:(0,o.Z)({},n,tv.style),className:(0,i.Z)(tv.className,r&&e2.markActive)})),null!=e.label?(0,V.jsx)(e7,(0,o.Z)({"aria-hidden":!0,"data-index":t},tb,!(0,p.Z)(e7)&&{markLabelActive:r},{style:(0,o.Z)({},n,tb.style),className:(0,i.Z)(e2.markLabel,tb.className,r&&e2.markLabelActive),children:e.label})):null]},t)}),eJ.map((e,t)=>{let r=(e-eP)*100/(e$-eP),a=eD[e_].offset(r),n="off"===eO?J:e3;return(0,V.jsx)(n,(0,o.Z)({},!(0,p.Z)(n)&&{valueLabelFormat:eE,valueLabelDisplay:eO,value:"function"==typeof eE?eE(eN(e),t):eE,index:t,open:eq===t||eW===t||"on"===eO,disabled:eS},tm,{children:(0,V.jsx)(e8,(0,o.Z)({"data-index":t},tp,{className:(0,i.Z)(e2.thumb,tp.className,eW===t&&e2.active,eX===t&&e2.focusVisible),style:(0,o.Z)({},a,e1(t),tp.style),children:(0,V.jsx)(te,(0,o.Z)({"data-index":t,"aria-label":ew?ew(t):em,"aria-valuenow":eN(e),"aria-labelledby":eb,"aria-valuetext":eL?eL(eN(e),t):ev,value:eJ[t]},th))}))}),t)})]}))});var ee=Q},37204:function(e,t,r){let a;function n(e){return new Promise((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)})}function o(){return a||(a=function(e,t){let r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(t);let a=n(r);return(e,r)=>a.then(a=>r(a.transaction(t,e).objectStore(t)))}("keyval-store","keyval")),a}function l(e,t=o()){return t("readonly",t=>n(t.get(e)))}function i(e,t,r=o()){return r("readwrite",r=>(r.put(t,e),n(r.transaction)))}function s(e,t=o()){return t("readwrite",t=>(t.delete(e),n(t.transaction)))}r.d(t,{IV:function(){return s},U2:function(){return l},t8:function(){return i}})}}]);