pulse-dashboard 1.2.8 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +63 -11
  3. package/.next/fallback-build-manifest.json +6 -4
  4. package/.next/next-minimal-server.js.nft.json +1 -1
  5. package/.next/next-server.js.nft.json +1 -1
  6. package/.next/prerender-manifest.json +15 -3
  7. package/.next/required-server-files.json +55 -13
  8. package/.next/server/app/_global-error/page/build-manifest.json +13 -8
  9. package/.next/server/app/_global-error/page.js +7 -6
  10. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  11. package/.next/server/app/_global-error/page_client-reference-manifest.js +8 -3
  12. package/.next/server/app/_global-error.html +1 -1
  13. package/.next/server/app/_global-error.meta +19 -5
  14. package/.next/server/app/_global-error.rsc +17 -13
  15. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +21 -4
  16. package/.next/server/app/_global-error.segments/_tree.segment.rsc +2 -1
  17. package/.next/server/app/_not-found/page/build-manifest.json +13 -8
  18. package/.next/server/app/_not-found/page.js +11 -9
  19. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  20. package/.next/server/app/_not-found/page_client-reference-manifest.js +9 -3
  21. package/.next/server/app/_not-found.html +2 -2
  22. package/.next/server/app/_not-found.meta +24 -6
  23. package/.next/server/app/_not-found.rsc +23 -21
  24. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +28 -4
  25. package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -2
  26. package/.next/server/app/api/analyze-test/route/build-manifest.json +4 -1
  27. package/.next/server/app/api/analyze-test/route.js +4 -3
  28. package/.next/server/app/api/analyze-test/route.js.nft.json +1 -1
  29. package/.next/server/app/api/analyze-test/route_client-reference-manifest.js +5 -3
  30. package/.next/server/app/api/assets/[...slug]/route/build-manifest.json +4 -1
  31. package/.next/server/app/api/assets/[...slug]/route.js +4 -4
  32. package/.next/server/app/api/assets/[...slug]/route.js.nft.json +1 -1
  33. package/.next/server/app/api/assets/[...slug]/route_client-reference-manifest.js +5 -3
  34. package/.next/server/app/api/current-run/route/build-manifest.json +4 -1
  35. package/.next/server/app/api/current-run/route.js +4 -3
  36. package/.next/server/app/api/current-run/route.js.nft.json +1 -1
  37. package/.next/server/app/api/current-run/route_client-reference-manifest.js +5 -3
  38. package/.next/server/app/api/historical-trends/route/build-manifest.json +4 -1
  39. package/.next/server/app/api/historical-trends/route/server-reference-manifest.json +32 -1
  40. package/.next/server/app/api/historical-trends/route.js +5 -4
  41. package/.next/server/app/api/historical-trends/route.js.nft.json +1 -1
  42. package/.next/server/app/api/historical-trends/route_client-reference-manifest.js +5 -3
  43. package/.next/server/app/api/report-config/route/build-manifest.json +4 -1
  44. package/.next/server/app/api/report-config/route.js +4 -3
  45. package/.next/server/app/api/report-config/route.js.nft.json +1 -1
  46. package/.next/server/app/api/report-config/route_client-reference-manifest.js +5 -3
  47. package/.next/server/app/api/reports/[filename]/route/build-manifest.json +4 -1
  48. package/.next/server/app/api/reports/[filename]/route.js +4 -3
  49. package/.next/server/app/api/reports/[filename]/route.js.nft.json +1 -1
  50. package/.next/server/app/api/reports/[filename]/route_client-reference-manifest.js +5 -3
  51. package/.next/server/app/api/run-command/route/build-manifest.json +4 -1
  52. package/.next/server/app/api/run-command/route.js +4 -3
  53. package/.next/server/app/api/run-command/route.js.nft.json +1 -1
  54. package/.next/server/app/api/run-command/route_client-reference-manifest.js +5 -3
  55. package/.next/server/app/index.html +2 -2
  56. package/.next/server/app/index.meta +19 -5
  57. package/.next/server/app/index.rsc +26 -17
  58. package/.next/server/app/index.segments/__PAGE__.segment.rsc +31 -5
  59. package/.next/server/app/index.segments/_tree.segment.rsc +3 -2
  60. package/.next/server/app/page/build-manifest.json +13 -8
  61. package/.next/server/app/page/react-loadable-manifest.json +1 -1
  62. package/.next/server/app/page/server-reference-manifest.json +3 -5
  63. package/.next/server/app/page.js +13 -10
  64. package/.next/server/app/page.js.nft.json +1 -1
  65. package/.next/server/app/page_client-reference-manifest.js +9 -3
  66. package/.next/server/app/test/[testId]/page/build-manifest.json +13 -8
  67. package/.next/server/app/test/[testId]/page/server-reference-manifest.json +3 -5
  68. package/.next/server/app/test/[testId]/page.js +13 -10
  69. package/.next/server/app/test/[testId]/page.js.nft.json +1 -1
  70. package/.next/server/app/test/[testId]/page_client-reference-manifest.js +9 -3
  71. package/.next/server/chunks/[externals]__1bks6n1-hi3u2._.js +3 -0
  72. package/.next/server/chunks/[root-of-the-server]__08mw5-21_l0y0._.js +3 -0
  73. package/.next/server/chunks/[root-of-the-server]__0ainik_9ptfd4._.js +3 -0
  74. package/.next/server/chunks/[root-of-the-server]__0d2a-3_xzfq9t._.js +3 -0
  75. package/.next/server/chunks/[root-of-the-server]__0k8r_2i_c7804._.js +3 -0
  76. package/.next/server/chunks/[root-of-the-server]__0ku061j3k9q9v._.js +3 -0
  77. package/.next/server/chunks/[root-of-the-server]__1iga9nxrdvdxp._.js +63 -0
  78. package/.next/server/chunks/[root-of-the-server]__1l48ghhplu7u9._.js +3 -0
  79. package/.next/server/chunks/[turbopack]_runtime.js +342 -247
  80. package/.next/server/chunks/_021wero7wk5g-._.js +3 -0
  81. package/.next/server/chunks/_0f66qkfi1bpbn._.js +4 -0
  82. package/.next/server/chunks/_0omvyrynvgj4q._.js +3 -0
  83. package/.next/server/chunks/_0rj3uq83vare4._.js +3 -0
  84. package/.next/server/chunks/_1bftf09jweaep._.js +3 -0
  85. package/.next/server/chunks/_1e44q68l7kg3i._.js +3 -0
  86. package/.next/server/chunks/_next-internal_server_app_api_analyze-test_route_actions_mjs_0uo58g5gzd0uc._.js +3 -0
  87. package/.next/server/chunks/_next-internal_server_app_api_assets_[___slug]_route_actions_mjs_04b62p5ullv5v._.js +3 -0
  88. package/.next/server/chunks/_next-internal_server_app_api_current-run_route_actions_mjs_05xzsg3gk7k2q._.js +3 -0
  89. package/.next/server/chunks/_next-internal_server_app_api_report-config_route_actions_mjs_175cyh31s_2_h._.js +3 -0
  90. package/.next/server/chunks/_next-internal_server_app_api_reports_[filename]_route_actions_mjs_1803al6ouhkyr._.js +3 -0
  91. package/.next/server/chunks/_next-internal_server_app_api_run-command_route_actions_mjs_0o7ewtw5zp6ao._.js +3 -0
  92. package/.next/server/chunks/ssr/[root-of-the-server]__077mujmfcjrlq._.js +3 -0
  93. package/.next/server/chunks/ssr/[root-of-the-server]__0954o-19g2le2._.js +3 -0
  94. package/.next/server/chunks/ssr/[root-of-the-server]__0bqmj2mimgfp2._.js +3 -0
  95. package/.next/server/chunks/ssr/[root-of-the-server]__0dv9b4zkg5hdn._.js +3 -0
  96. package/.next/server/chunks/ssr/[root-of-the-server]__0ivd4vt5v8vsz._.js +3 -0
  97. package/.next/server/chunks/ssr/[root-of-the-server]__10tkfx-ofp61y._.js +3 -0
  98. package/.next/server/chunks/ssr/[root-of-the-server]__19zw3uu3ckhlo._.js +3 -0
  99. package/.next/server/chunks/ssr/[root-of-the-server]__1hsaagmb2fvap._.js +14 -0
  100. package/.next/server/chunks/ssr/[root-of-the-server]__1i9r59yk4i69p._.js +3 -0
  101. package/.next/server/chunks/ssr/[root-of-the-server]__1jljxgnhlm87p._.js +3 -0
  102. package/.next/server/chunks/ssr/[root-of-the-server]__1ycj5t-2qcq3e._.js +3 -0
  103. package/.next/server/chunks/ssr/[turbopack]_runtime.js +342 -247
  104. package/.next/server/chunks/ssr/_0-a_-dy7ui975._.js +5 -0
  105. package/.next/server/chunks/ssr/_04dqze6ixrsvs._.js +4 -0
  106. package/.next/server/chunks/ssr/_0x914xxedzmgf._.js +32 -0
  107. package/.next/server/chunks/ssr/_1-bq-mvkidpbm._.js +27 -0
  108. package/.next/server/chunks/ssr/_1z0ejft8z3bqp._.js +3 -0
  109. package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_mjs_1ctekssbjfw_g._.js +3 -0
  110. package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_mjs_1ghl5fbynabiq._.js +3 -0
  111. package/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js +33 -0
  112. package/.next/server/chunks/ssr/node_modules_0mtji6mpjxw71._.js +3 -0
  113. package/.next/server/chunks/ssr/{node_modules_@swc_helpers_cjs__interop_require_default_cjs_11~q6fv._.js → node_modules_@swc_helpers_cjs__interop_require_default_cjs_1ztp13a5szri_._.js} +1 -1
  114. package/.next/server/chunks/ssr/node_modules_next_dist_1dylt_x2lwntt._.js +3 -0
  115. package/.next/server/chunks/ssr/node_modules_next_dist_1tvl46c87-b1a._.js +8 -0
  116. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0bew68i643j53._.js +33 -0
  117. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_1vdct3pkbqi_w._.js +3 -0
  118. package/.next/server/chunks/ssr/{node_modules_next_dist_client_components_builtin_forbidden_0ghu-f7.js → node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js} +2 -2
  119. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js +3 -0
  120. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_not-found_1vvgosrc2w28f.js +3 -0
  121. package/.next/server/chunks/ssr/{node_modules_next_dist_client_components_builtin_unauthorized_0cjv-23.js → node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js} +2 -2
  122. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_03a44q3-aihnz.js +3 -0
  123. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0k6_l1jr3jsqq.js +3 -0
  124. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0min3q4oeyf8a.js +3 -0
  125. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z4y02i7.js +3 -0
  126. package/.next/server/chunks/ssr/src_0aglj-npucwwk._.js +23 -0
  127. package/.next/server/chunks/ssr/src_components_ui_toaster_tsx_0ll6bbq4_t7m_._.js +3 -0
  128. package/.next/server/middleware-build-manifest.js +63 -11
  129. package/.next/server/prefetch-hints.json +34 -1
  130. package/.next/server/preview-props.json +5 -0
  131. package/.next/server/server-reference-manifest.js +1 -1
  132. package/.next/server/server-reference-manifest.json +27 -13
  133. package/.next/static/chunks/06u3fo34cc4ga.js +1 -0
  134. package/.next/static/chunks/07ceko_qv-n_d.js +1 -0
  135. package/.next/static/chunks/17tig9fuzy99m.js +1 -0
  136. package/.next/static/chunks/1axqivg23ezfb.js +1 -0
  137. package/.next/static/chunks/1e2nvb4q-3vse.js +1 -0
  138. package/.next/static/chunks/1ltrs9eixy8gu.js +3 -0
  139. package/.next/static/chunks/1n-k9_9iohc4w.js +1 -0
  140. package/.next/static/chunks/1oyrxi90x4jw8.js +31 -0
  141. package/.next/static/chunks/2510hisbrlwfi.js +1 -0
  142. package/.next/static/chunks/2viv-yky3p-jf.js +1 -0
  143. package/.next/static/chunks/3-ptszisyxsi8.js +5 -0
  144. package/.next/static/chunks/3f-g_qcegf3q4.js +22 -0
  145. package/.next/static/chunks/3j6vhmh5ev771.js +1 -0
  146. package/.next/static/chunks/3qtedoc85mjel.js +1 -0
  147. package/.next/static/chunks/3vukeef84f3mg.js +1 -0
  148. package/.next/static/chunks/3z98c46ozxe__.js +1 -0
  149. package/.next/static/chunks/turbopack-2lihmh2pdnr2x.js +1 -0
  150. package/package.json +3 -3
  151. package/.next/server/app/_global-error.segments/_full.segment.rsc +0 -14
  152. package/.next/server/app/_global-error.segments/_head.segment.rsc +0 -5
  153. package/.next/server/app/_global-error.segments/_index.segment.rsc +0 -5
  154. package/.next/server/app/_not-found.segments/_full.segment.rsc +0 -23
  155. package/.next/server/app/_not-found.segments/_head.segment.rsc +0 -6
  156. package/.next/server/app/_not-found.segments/_index.segment.rsc +0 -7
  157. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +0 -5
  158. package/.next/server/app/index.segments/_full.segment.rsc +0 -19
  159. package/.next/server/app/index.segments/_head.segment.rsc +0 -6
  160. package/.next/server/app/index.segments/_index.segment.rsc +0 -7
  161. package/.next/server/chunks/[externals]__0m-sipc._.js +0 -3
  162. package/.next/server/chunks/[externals]__124ywe.._.js +0 -3
  163. package/.next/server/chunks/[root-of-the-server]__0126wt3._.js +0 -3
  164. package/.next/server/chunks/[root-of-the-server]__016m3l7._.js +0 -3
  165. package/.next/server/chunks/[root-of-the-server]__0bgp.n9._.js +0 -3
  166. package/.next/server/chunks/[root-of-the-server]__0jh2b8b._.js +0 -3
  167. package/.next/server/chunks/[root-of-the-server]__0k26p~k._.js +0 -3
  168. package/.next/server/chunks/[root-of-the-server]__0nglzhr._.js +0 -13
  169. package/.next/server/chunks/[root-of-the-server]__0x8r-.9._.js +0 -3
  170. package/.next/server/chunks/_next-internal_server_app_api_analyze-test_route_actions_0.saobd.js +0 -3
  171. package/.next/server/chunks/_next-internal_server_app_api_assets_[___slug]_route_actions_0rqs88g.js +0 -3
  172. package/.next/server/chunks/_next-internal_server_app_api_current-run_route_actions_10w286-.js +0 -3
  173. package/.next/server/chunks/_next-internal_server_app_api_historical-trends_route_actions_0tfs591.js +0 -3
  174. package/.next/server/chunks/_next-internal_server_app_api_report-config_route_actions_0lzyt8k.js +0 -3
  175. package/.next/server/chunks/_next-internal_server_app_api_reports_[filename]_route_actions_0emat-g.js +0 -3
  176. package/.next/server/chunks/_next-internal_server_app_api_run-command_route_actions_0uxr5bx.js +0 -3
  177. package/.next/server/chunks/node_modules_next_dist_06kebd7._.js +0 -4
  178. package/.next/server/chunks/ssr/[root-of-the-server]__0.zquoa._.js +0 -3
  179. package/.next/server/chunks/ssr/[root-of-the-server]__05ct2gl._.js +0 -3
  180. package/.next/server/chunks/ssr/[root-of-the-server]__0eqd2za._.js +0 -33
  181. package/.next/server/chunks/ssr/[root-of-the-server]__0jmj6g1._.js +0 -4
  182. package/.next/server/chunks/ssr/[root-of-the-server]__0mgphg.._.js +0 -3
  183. package/.next/server/chunks/ssr/[root-of-the-server]__0uyy96m._.js +0 -4
  184. package/.next/server/chunks/ssr/[root-of-the-server]__0v5vgt4._.js +0 -3
  185. package/.next/server/chunks/ssr/[root-of-the-server]__0we7bel._.js +0 -3
  186. package/.next/server/chunks/ssr/[root-of-the-server]__10xgshr._.js +0 -33
  187. package/.next/server/chunks/ssr/_0dvn4a6._.js +0 -6
  188. package/.next/server/chunks/ssr/_0jkkbka._.js +0 -7
  189. package/.next/server/chunks/ssr/_0nfs~1l._.js +0 -5
  190. package/.next/server/chunks/ssr/_0pa59oo._.js +0 -3
  191. package/.next/server/chunks/ssr/_11mmbg~._.js +0 -5
  192. package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0k77kol.js +0 -3
  193. package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0eq97pa.js +0 -3
  194. package/.next/server/chunks/ssr/node_modules_09w7yel._.js +0 -33
  195. package/.next/server/chunks/ssr/node_modules_0aem7sr._.js +0 -19
  196. package/.next/server/chunks/ssr/node_modules_next_dist_0h9llsw._.js +0 -6
  197. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0inhx6q._.js +0 -3
  198. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0lgvd_..js +0 -3
  199. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_01ycdec.js +0 -4
  200. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0bj8dkg.js +0 -4
  201. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0cvrgh7.js +0 -4
  202. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0rc3ul_.js +0 -4
  203. package/.next/server/chunks/ssr/src_0udngk~._.js +0 -23
  204. package/.next/server/chunks/ssr/src_components_ui_toaster_tsx_0cainpy._.js +0 -3
  205. package/.next/static/chunks/00g8rbqi0h8lk.js +0 -1
  206. package/.next/static/chunks/01xlw8hd842-c.js +0 -1
  207. package/.next/static/chunks/04j4.hz_cv-pf.js +0 -1
  208. package/.next/static/chunks/07uz2g0_38qia.js +0 -4
  209. package/.next/static/chunks/0b8rufmwi4-6v.js +0 -1
  210. package/.next/static/chunks/0fwam_-pec8pg.js +0 -2
  211. package/.next/static/chunks/0gsquco4lyvb4.js +0 -1
  212. package/.next/static/chunks/0h4bq73pogmtb.js +0 -1
  213. package/.next/static/chunks/0imfvrlr~2q89.js +0 -31
  214. package/.next/static/chunks/0m5-x6u~hwh1m.js +0 -1
  215. package/.next/static/chunks/0mzwfspg4216r.js +0 -1
  216. package/.next/static/chunks/0p.r891xm97do.js +0 -1
  217. package/.next/static/chunks/0w0gkm45qpujx.js +0 -5
  218. package/.next/static/chunks/0~ariudu4in54.js +0 -1
  219. package/.next/static/chunks/13mqc.b~s2gjo.js +0 -1
  220. package/.next/static/chunks/15y_~8vy363bg.js +0 -3
  221. package/.next/static/chunks/16navnbzwbp36.js +0 -1
  222. package/.next/static/chunks/17~ltcjkf11xe.js +0 -3
  223. package/.next/static/chunks/1860zsbcg5z1o.js +0 -1
  224. package/.next/static/chunks/turbopack-11rw6yhug.je0.js +0 -1
  225. /package/.next/static/{RgESZIprcZznm98mxUv-O → 5NYK4iijm2Nff3usU87JA}/_buildManifest.js +0 -0
  226. /package/.next/static/{RgESZIprcZznm98mxUv-O → 5NYK4iijm2Nff3usU87JA}/_clientMiddlewareManifest.js +0 -0
  227. /package/.next/static/{RgESZIprcZznm98mxUv-O → 5NYK4iijm2Nff3usU87JA}/_ssgManifest.js +0 -0
  228. /package/.next/static/chunks/{03~yq9q893hmn.js → 0cz1d0mv5g_q7.js} +0 -0
  229. /package/.next/static/chunks/{14rqub-mhf1rm.css → 3vfh62-53kqxb.css} +0 -0
@@ -1,5 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67585,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return s}});let a=e.r(32061);function s({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new a.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,r)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return a}})},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return o}});let a=e.r(43476),s=e.r(74080),l=e.r(63599),n=e.r(9885),i=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=l.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;r.push(...e)}}if(0===r.length)return null;let d=(0,i.getAssetTokenQuery)();return(0,a.jsx)(a.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,n.encodeURIPath)(e)}${d}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,s.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return d}});let a=e.r(43476),s=e.r(71645),l=e.r(67585),n=e.r(52157);function i(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},d=function(e){let t={...o,...e},r=(0,s.lazy)(()=>t.loader().then(i)),d=t.loading;function c(e){let i=d?(0,a.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,c=o?s.Suspense:s.Fragment,u=t.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(n.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(r,{...e})]}):(0,a.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(c,{...o?{fallback:i}:{},children:u})}return c.displayName="LoadableComponent",c}},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let a=e.r(55682)._(e.r(69093));function s(e,t){let r={};"function"==typeof e&&(r.loader=e);let s={...r,...t};return(0,a.default)({...s,modules:s.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return i},formatWithValidation:function(){return d},urlObjectKeys:function(){return o}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let l=e.r(90809)._(e.r(98183)),n=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,a=e.protocol||"",s=e.pathname||"",i=e.hash||"",o=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:r&&(d=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(d+=":"+e.port)),o&&"object"==typeof o&&(o=String(l.urlQueryToSearchParams(o)));let c=e.search||o&&`?${o}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||n.test(a))&&!1!==d?(d="//"+(d||""),s&&"/"!==s[0]&&(s="/"+s)):d||(d=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),s=s.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${a}${d}${s}${c}${i}`}let o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return i(e)}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return l}});let a=e.r(18967),s=e.r(52817);function l(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return g},useLinkStatus:function(){return b}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let l=e.r(90809),n=e.r(43476),i=l._(e.r(71645)),o=e.r(95057),d=e.r(8372),c=e.r(18581),u=e.r(18967),m=e.r(5550);e.r(33525);let h=e.r(88540),p=e.r(91949),f=e.r(73668),x=e.r(9396);function g(t){var r,a;let s,l,g,[b,v]=(0,i.useOptimistic)(p.IDLE_LINK_STATUS),j=(0,i.useRef)(null),{href:w,as:N,children:k,prefetch:C=null,passHref:S,replace:A,shallow:T,scroll:M,onClick:E,onMouseEnter:D,onTouchStart:R,legacyBehavior:P=!1,onNavigate:O,transitionTypes:L,ref:F,unstable_dynamicOnHover:I,..._}=t;s=k,P&&("string"==typeof s||"number"==typeof s)&&(s=(0,n.jsx)("a",{children:s}));let $=i.default.useContext(d.AppRouterContext),z=!1!==C,B=!1!==C?null===(a=C)||"auto"===a?x.FetchStrategy.PPR:x.FetchStrategy.Full:x.FetchStrategy.PPR,H="string"==typeof(r=N||w)?r:(0,o.formatUrl)(r);if(P){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});l=i.default.Children.only(s)}let K=P?l&&"object"==typeof l&&l.ref:F,U=i.default.useCallback(e=>(null!==$&&(j.current=(0,p.mountLinkInstance)(e,H,$,B,z,v)),()=>{j.current&&((0,p.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,p.unmountPrefetchableInstance)(e)}),[z,H,$,B,v]),V={ref:(0,c.useMergedRef)(U,K),onClick(t){P||"function"!=typeof E||E(t),P&&l.props&&"function"==typeof l.props.onClick&&l.props.onClick(t),!$||t.defaultPrevented||function(t,r,a,s,l,n,o){if("u">typeof window){let d,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((d=t.currentTarget.getAttribute("target"))&&"_self"!==d||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,f.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),n){let e=!1;if(n({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:u}=e.r(99781);i.default.startTransition(()=>{u(r,s?"replace":"push",!1===l?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,a.current,o)})}}(t,H,j,A,M,O,L)},onMouseEnter(e){P||"function"!=typeof D||D(e),P&&l.props&&"function"==typeof l.props.onMouseEnter&&l.props.onMouseEnter(e),$&&z&&(0,p.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){P||"function"!=typeof R||R(e),P&&l.props&&"function"==typeof l.props.onTouchStart&&l.props.onTouchStart(e),$&&z&&(0,p.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,u.isAbsoluteUrl)(H)?V.href=H:P&&!S&&("a"!==l.type||"href"in l.props)||(V.href=(0,m.addBasePath)(H)),g=P?i.default.cloneElement(l,V):(0,n.jsx)("a",{..._,...V,children:s}),(0,n.jsx)(y.Provider,{value:b,children:g})}e.r(84508);let y=(0,i.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,i.useContext)(y);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95923,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(57688),s=e.i(87596),l=e.i(15288),n=e.i(2747),i=e.i(29592),o=e.i(75254);let d=(0,o.default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var c=e.i(73884);let u=(0,o.default)("skip-forward",[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]]);var m=e.i(3116),h=e.i(68054),p=e.i(11641);let f=(0,o.default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),x=(0,o.default)("repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]),g=(0,o.default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),y=(0,o.default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),b=(0,o.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]),v=(0,o.default)("memory-stick",[["path",{d:"M12 12v-2",key:"fwoke6"}],["path",{d:"M12 18v-2",key:"qj6yno"}],["path",{d:"M16 12v-2",key:"heuere"}],["path",{d:"M16 18v-2",key:"s1ct0w"}],["path",{d:"M2 11h1.5",key:"15p63e"}],["path",{d:"M20 18v-2",key:"12ehxp"}],["path",{d:"M20.5 11H22",key:"khsy7a"}],["path",{d:"M4 18v-2",key:"1c3oqr"}],["path",{d:"M8 12v-2",key:"1mwtfd"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["rect",{x:"2",y:"6",width:"20",height:"10",rx:"2",key:"1qcswk"}]]),j=(0,o.default)("cog",[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]]),w=(0,o.default)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]),N=(0,o.default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]),k=(0,o.default)("laptop",[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]]);var C=e.i(52571);let S=(0,o.default)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),A=(0,o.default)("briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);var T=e.i(48256),M=e.i(94908),E=e.i(68566);let D=(0,o.default)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]),R=(0,o.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);var P=e.i(77572);let O=(e,r="")=>(0,t.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:Object.entries(e).map(([e,a])=>{var s;let l,n=(e=>{if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return String(e);if(Array.isArray(e))return e.length>0?e.join(", "):"Empty";if("object"==typeof e&&null!==e){let t=Object.entries(e);return 0===t.length?"Empty":t.length<=3?t.map(([e,t])=>{let r=e.replace(/([A-Z])/g," $1").trim();return`${r}: ${String(t)}`}).join(", "):`${t.length} items`}return"N/A"})(a),i="object"==typeof a&&null!==a?JSON.stringify(a,null,2):String(a);return(0,t.jsxs)("div",{className:"flex items-center space-x-2 p-2 rounded-2xl hover:bg-muted/50 transition-all duration-200 group/item",children:[(0,t.jsx)("div",{className:"flex-shrink-0",children:(l=(s=e).toLowerCase()).includes("os")||l.includes("operative system")?(0,t.jsx)(k,{className:"h-4 w-4 text-primary"}):l.includes("cpu")?(0,t.jsx)(b,{className:"h-4 w-4 text-primary"}):l.includes("mem")||l.includes("ram")?(0,t.jsx)(v,{className:"h-4 w-4 text-primary"}):l.includes("node")?(0,t.jsx)(j,{className:"h-4 w-4 text-primary"}):l.includes("playwright")?(0,t.jsx)(w,{className:"h-4 w-4 text-primary"}):l.includes("y playwright")?(0,t.jsx)(N,{className:"h-4 w-4 text-primary"}):l.includes("browser")?(0,t.jsx)(T.Globe,{className:"h-4 w-4 text-primary"}):l.includes("chromium")||l.includes("chrome")?(0,t.jsx)(E.Chrome,{className:"h-4 w-4 text-primary"}):l.includes("firefox")?(0,t.jsx)(T.Globe,{className:"h-4 w-4 text-primary"}):l.includes("webkit")||l.includes("safari")?(0,t.jsx)(M.Compass,{className:"h-4 w-4 text-primary"}):l.includes("provider")&&(s.toLowerCase().includes("ci")||s.toLowerCase().includes("cd"))?(0,t.jsx)(S,{className:"h-4 w-4 text-primary"}):l.includes("job")&&(s.toLowerCase().includes("ci")||s.toLowerCase().includes("cd"))?(0,t.jsx)(A,{className:"h-4 w-4 text-primary"}):l.includes("disk")||l.includes("storage")?(0,t.jsx)(D,{className:"h-4 w-4 text-primary"}):(0,t.jsx)(C.Info,{className:"h-4 w-4 text-primary"})}),(0,t.jsxs)("div",{className:"flex-grow min-w-0",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground truncate",children:e.replace(/([A-Z]+)/g," $1").replace(/([A-Z][a-z])/g," $1").replace(/^./,e=>e.toUpperCase())}),(0,t.jsx)("div",{className:"text-xs font-semibold text-foreground truncate",title:i,children:n})]})]},`${r}${e}`)})});function L({environmentInfo:e,loading:a}){let[s,o]=(0,r.useState)("0");if(a)return(0,t.jsxs)(l.Card,{className:"shadow-lg rounded-xl mt-6",children:[(0,t.jsxs)(l.CardHeader,{children:[(0,t.jsx)(n.Skeleton,{className:"h-6 w-48 mb-1"}),(0,t.jsx)(n.Skeleton,{className:"h-4 w-3/4"})]}),(0,t.jsx)(l.CardContent,{className:"space-y-3",children:[void 0,void 0,void 0,void 0].map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)(n.Skeleton,{className:"h-5 w-5 rounded-full"}),(0,t.jsx)(n.Skeleton,{className:"h-4 w-1/4"}),(0,t.jsx)(n.Skeleton,{className:"h-4 w-1/2"})]},r))})]});if(!e||(Array.isArray(e)?0===e.length:0===Object.keys(e).length))return(0,t.jsxs)(l.Card,{className:"shadow-lg rounded-xl mt-6",children:[(0,t.jsxs)(l.CardHeader,{children:[(0,t.jsxs)(l.CardTitle,{className:"text-lg font-semibold text-primary flex items-center",children:[(0,t.jsx)(y,{className:"h-5 w-5 mr-2"})," System Information"]}),(0,t.jsx)(l.CardDescription,{className:"text-xs",children:"Details about the test execution environment."})]}),(0,t.jsx)(l.CardContent,{children:(0,t.jsxs)(i.Alert,{variant:"default",className:"border-muted-foreground/30",children:[(0,t.jsx)(C.Info,{className:"h-4 w-4"}),(0,t.jsx)(i.AlertTitle,{children:"No Environment Data"}),(0,t.jsx)(i.AlertDescription,{children:"Environment information is not available in the current report."})]})})]});let d=Array.isArray(e);return(0,t.jsxs)(l.Card,{className:"shadow-lg rounded-xl mt-6 hover:shadow-2xl transition-all duration-300 border-0 bg-gradient-to-br from-card via-card to-card/95 group",children:[(0,t.jsx)(l.CardHeader,{className:"pb-3",children:(0,t.jsxs)("div",{className:"flex flex-row items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(l.CardTitle,{className:"text-base font-semibold text-foreground group-hover:text-primary transition-colors flex items-center",children:[(0,t.jsx)(y,{className:"h-4 w-4 mr-2"})," System Information",d&&(0,t.jsxs)("span",{className:"ml-2 text-xs font-normal text-muted-foreground flex items-center gap-1",children:[(0,t.jsx)(R,{className:"h-3 w-3"}),e.length," ",1===e.length?"Shard":"Shards"]})]}),(0,t.jsx)(l.CardDescription,{className:"text-xs mt-1",children:d?"Environment details from each test shard":"Test execution environment details"})]}),(0,t.jsx)("div",{className:"h-9 w-9 rounded-full bg-gradient-to-br from-primary/10 to-primary/5 flex items-center justify-center",children:d?(0,t.jsx)(R,{className:"h-4 w-4 text-primary"}):(0,t.jsx)(k,{className:"h-4 w-4 text-primary"})})]})}),(0,t.jsx)(l.CardContent,{className:"pt-0",children:d?(0,t.jsxs)(P.Tabs,{value:s,onValueChange:o,className:"w-full",children:[(0,t.jsx)(P.TabsList,{className:"w-fit max-w-full h-auto p-1 bg-muted/50 flex justify-start overflow-x-auto",children:e.map((e,r)=>(0,t.jsxs)(P.TabsTrigger,{value:String(r),className:"text-xs px-3 py-1.5 data-[state=active]:bg-primary/10 flex-shrink-0",children:["Shard ",r+1]},r))}),e.map((e,r)=>(0,t.jsx)(P.TabsContent,{value:String(r),className:"mt-4",children:O(e,`shard-${r}-`)},r))]}):O(e)})]})}var F=e.i(70703),I=e.i(95150);let _=(0,F.default)(()=>e.A(51558).then(e=>e.DashboardOverviewCharts),{loadableGenerated:{modules:[78472]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"grid gap-6 md:grid-cols-1 lg:grid-cols-2 mt-6",children:[...Array(6)].map((e,r)=>(0,t.jsxs)(l.Card,{className:"shadow-lg rounded-xl",children:[(0,t.jsxs)(l.CardHeader,{children:[(0,t.jsx)(n.Skeleton,{className:"h-5 w-3/4 rounded-xl"}),(0,t.jsx)(n.Skeleton,{className:"h-4 w-1/2 mt-1 rounded-xl"})]}),(0,t.jsx)(l.CardContent,{children:(0,t.jsx)(n.Skeleton,{className:"h-48 w-full rounded-2xl"})})]},`loader-chart-${r}`))})});function $(e){if(0===e)return"0s";let t=Math.floor(e/1e3%60),r=Math.floor(e/6e4%60),a=Math.floor(e/36e5%24),s="";return a>0&&(s+=`${a}h `),r>0&&(s+=`${r}m `),(t>0||0===a&&0===r)&&(s+=`${t}s`),s.trim()||"0s"}function z({currentRun:e,loading:r,error:a,onMetricClick:s}){let o=e?.run,y=e?.run?.environment||e?.environment;if(a&&!o)return(0,t.jsxs)(i.Alert,{variant:"destructive",className:"col-span-full md:col-span-2 lg:col-span-5",children:[(0,t.jsx)(h.Terminal,{className:"h-4 w-4"}),(0,t.jsx)(i.AlertTitle,{children:"Error Fetching Summary Metrics"}),(0,t.jsx)(i.AlertDescription,{children:a})]});if(r&&!o)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-5",children:[void 0,void 0,void 0,void 0,void 0].map((e,r)=>(0,t.jsxs)(l.Card,{className:"shadow-lg rounded-xl",children:[(0,t.jsxs)(l.CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,t.jsx)(n.Skeleton,{className:"h-5 w-24"}),(0,t.jsx)(n.Skeleton,{className:"h-6 w-6"})]}),(0,t.jsxs)(l.CardContent,{children:[(0,t.jsx)(n.Skeleton,{className:"h-8 w-16"}),(0,t.jsx)(n.Skeleton,{className:"h-4 w-32 mt-1"})]})]},r))}),(0,t.jsx)(L,{environmentInfo:null,loading:!0,error:null}),(0,t.jsx)("div",{className:"grid gap-6 md:grid-cols-1 lg:grid-cols-2 mt-6",children:[...Array(6)].map((e,r)=>(0,t.jsxs)(l.Card,{className:"shadow-lg rounded-xl",children:[(0,t.jsxs)(l.CardHeader,{children:[(0,t.jsx)(n.Skeleton,{className:"h-5 w-3/4 rounded-xl"}),(0,t.jsx)(n.Skeleton,{className:"h-4 w-1/2 mt-1 rounded-xl"})]}),(0,t.jsx)(l.CardContent,{children:(0,t.jsx)(n.Skeleton,{className:"h-48 w-full rounded-2xl"})})]},`skeleton-chart-main-${r}`))})]});let b={total:e?.results?.length||0,passed:0,failed:0,skipped:0,flaky:0,totalRetries:0,retriedTests:0,sumDuration:0};e?.results?.forEach(e=>{let t=(0,I.getEffectiveTestStatus)(e);if("passed"===t?b.passed++:"failed"===t||"timedOut"===t?b.failed++:"skipped"===t?b.skipped++:"flaky"===t&&b.flaky++,e.retryHistory&&e.retryHistory.length>0){let t=e.retryHistory.filter(e=>"failed"===e.status||"timedOut"===e.status||"flaky"===e.status);t.length>0&&(b.totalRetries+=t.length,b.retriedTests++)}b.sumDuration+=e.duration||0});let v=b.total>0?b.sumDuration/b.total:0,j=o?[{title:"Total Tests",value:b.total.toString(),icon:(0,t.jsx)(p.ListFilter,{className:"h-5 w-5 text-muted-foreground"}),change:null,filterKey:"all"},{title:"Passed",value:b.passed.toString(),icon:(0,t.jsx)(d,{className:"h-5 w-5 text-[hsl(var(--chart-3))]"}),change:`${b.total>0?(b.passed/b.total*100).toFixed(1):"0.0"}% pass rate`,filterKey:"passed"},{title:"Flaky",value:b.flaky.toString(),icon:(0,t.jsx)(f,{className:"h-5 w-5 text-[hsl(var(--flaky))]"}),change:`${b.total>0?(b.flaky/b.total*100).toFixed(1):"0.0"}% flaky rate`,filterKey:"flaky"},{title:"Failed",value:b.failed.toString(),icon:(0,t.jsx)(c.XCircle,{className:"h-5 w-5 text-destructive"}),change:`${b.total>0?(b.failed/b.total*100).toFixed(1):"0.0"}% fail rate`,filterKey:"failed"},{title:"Skipped",value:b.skipped.toString(),icon:(0,t.jsx)(u,{className:"h-5 w-5 text-[hsl(var(--accent))]"}),change:`${b.total>0?(b.skipped/b.total*100).toFixed(1):"0.0"}% skip rate`,filterKey:"skipped"},{title:"Total Retries Count",value:b.totalRetries.toString(),icon:(0,t.jsx)(x,{className:"h-5 w-5 text-orange-500"}),change:`${b.retriedTests} tests retried`,filterKey:null},{title:"Avg. Test Time",value:$(v),icon:(0,t.jsx)(g,{className:"h-5 w-5 text-yellow-500"}),change:"Average per test",filterKey:null},{title:"Duration",value:$(o.duration),icon:(0,t.jsx)(m.Clock,{className:"h-5 w-5 text-primary"}),change:"Total execution time",filterKey:null}]:[],w=e=>{e&&s&&s(e)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-4 mb-8 p-6 lg:p-8 bg-muted/20 backdrop-blur-md border border-border/40 rounded-[2.5rem] shadow-inner",children:[j.map(e=>(0,t.jsxs)(l.Card,{className:`relative overflow-hidden shadow-2xl hover:shadow-[0_20px_50px_rgba(8,_112,_184,_0.3)] transition-all duration-500 rounded-2xl border-0 bg-gradient-to-br from-card via-card to-card/80 backdrop-blur-sm group ${e.filterKey&&s?"cursor-pointer hover:scale-[1.02]":""}`,onClick:()=>w(e.filterKey),tabIndex:e.filterKey&&s?0:-1,onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&e.filterKey&&s&&w(e.filterKey)},role:e.filterKey&&s?"button":void 0,"aria-label":e.filterKey&&s?`View ${e.filterKey} tests`:void 0,children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500"}),(0,t.jsxs)(l.CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2 relative z-10",children:[(0,t.jsx)(l.CardTitle,{className:"text-sm font-semibold text-muted-foreground/90 uppercase tracking-wide",children:e.title}),(0,t.jsx)("div",{className:"h-9 w-9 rounded-full bg-gradient-to-br from-primary/10 to-primary/5 flex items-center justify-center backdrop-blur-sm",children:e.icon})]}),(0,t.jsxs)(l.CardContent,{className:"relative z-10",children:[(0,t.jsx)("div",{className:"text-4xl font-extrabold bg-gradient-to-br from-foreground to-foreground/60 bg-clip-text text-transparent",children:e.value}),e.change&&(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground/70 pt-1.5",children:e.change})]})]},e.title)),r&&o&&[...Array(5-j.length)].map((e,r)=>(0,t.jsxs)(l.Card,{className:"shadow-lg rounded-xl",children:[(0,t.jsxs)(l.CardHeader,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,t.jsx)(n.Skeleton,{className:"h-5 w-24"}),(0,t.jsx)(n.Skeleton,{className:"h-6 w-6"})]}),(0,t.jsxs)(l.CardContent,{children:[(0,t.jsx)(n.Skeleton,{className:"h-8 w-16"}),(0,t.jsx)(n.Skeleton,{className:"h-4 w-32 mt-1"})]})]},`loading-${r}`))]}),(0,t.jsx)(L,{environmentInfo:y,loading:r,error:a}),(0,t.jsx)(_,{currentRun:e,loading:r,error:a})]})}var B=e.i(73443),H=e.i(87486),K=e.i(22016),U=e.i(95468),V=e.i(63209);let W=(0,o.default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var q=e.i(63059),G=e.i(75157);function X({status:e}){switch(e){case"passed":return(0,t.jsx)(U.CheckCircle2,{className:"h-5 w-5 text-[hsl(var(--chart-3))]"});case"failed":return(0,t.jsx)(c.XCircle,{className:"h-5 w-5 text-destructive"});case"skipped":return(0,t.jsx)(V.AlertCircle,{className:"h-5 w-5 text-[hsl(var(--accent))]"});case"timedOut":return(0,t.jsx)(m.Clock,{className:"h-5 w-5 text-destructive"});case"flaky":return(0,t.jsx)(f,{className:"h-5 w-5 text-[hsl(var(--flaky))]"});case"pending":return(0,t.jsx)(m.Clock,{className:"h-5 w-5 text-primary animate-pulse"});default:return(0,t.jsx)(C.Info,{className:"h-5 w-5 text-muted-foreground"})}}function Y({test:e}){var s;let l=(0,r.useMemo)(()=>e.screenshots&&Array.isArray(e.screenshots)?e.screenshots.slice(0,4).map((e,t)=>({name:function(e,t="Attachment"){return e&&"string"==typeof e&&e.split(/[/\\]/).pop()||t}(e,`Screenshot ${t+1}`),path:e,contentType:"image/png","data-ai-hint":"test screenshot thumbnail"})):[],[e.screenshots]),n=(0,r.useMemo)(()=>{if(!e.annotations||!Array.isArray(e.annotations))return null;let t=e.annotations.find(e=>"pulse_severity"===e.type);return t?.description||null},[e.annotations]),i=e.errorMessage||l.length>0,o=function(e){if(!e)return"";let t=e.split(" > ");return t[t.length-1]||e}(e.name),d=e.retryHistory?e.retryHistory.filter(e=>"passed"!==e.status&&"skipped"!==e.status).length:0;return(0,t.jsxs)("div",{className:"border-b border-border last:border-b-0 py-3 hover:bg-muted/20 transition-colors duration-200 px-4 rounded-2xl mb-2 shadow-md bg-card hover:shadow-lg",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3 flex-1 min-w-0",children:[(0,t.jsx)(X,{status:e.status}),(0,t.jsx)(K.default,{href:`/test/${e.id}`,className:"font-medium text-foreground text-sm md:text-base hover:underline truncate",title:e.name,children:o})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 ml-2 flex-shrink-0 flex-wrap gap-1",children:[e.tags&&e.tags.length>0&&e.tags.map((e,r)=>(0,t.jsx)(H.Badge,{variant:"outline",className:"text-xs px-2 py-0.5 rounded-xl border",style:{backgroundColor:"#808080",color:"#fff"},children:e},`tag-${r}`)),d>0&&(0,t.jsxs)(H.Badge,{variant:"outline",className:"retry-badge text-xs px-2 py-0.5 rounded-xl border",style:{backgroundColor:"#ff9800",color:"#fff",borderColor:"#f57c00"},children:["Retry Count: ",d]}),n&&(0,t.jsx)(H.Badge,{variant:"outline",className:"capitalize text-xs px-2 py-0.5 rounded-xl border-0",style:function(e){switch(e.toLowerCase()){case"minor":return{backgroundColor:"#006064",color:"#fff"};case"low":return{backgroundColor:"#FFA07A",color:"#fff"};case"medium":return{backgroundColor:"#577A11",color:"#fff"};case"high":return{backgroundColor:"#B71C1C",color:"#fff"};case"critical":return{backgroundColor:"#64158A",color:"#fff"};default:return{backgroundColor:"hsl(var(--muted))",color:"hsl(var(--muted-foreground))"}}}(n),children:n}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground w-20 text-right",children:(s=e.duration)<1e3?`${s}ms`:`${(s/1e3).toFixed(2)}s`}),(0,t.jsx)(K.default,{href:`/test/${e.id}`,"aria-label":`View details for ${o}`,children:(0,t.jsx)(q.ChevronRight,{className:"h-5 w-5 text-muted-foreground hover:text-primary transition-colors"})})]})]}),i&&(0,t.jsx)(B.Accordion,{type:"single",collapsible:!0,className:"w-full mt-2",children:(0,t.jsxs)(B.AccordionItem,{value:"details",className:"border-none",children:[(0,t.jsx)(B.AccordionTrigger,{className:"text-xs py-1 px-1 hover:no-underline text-muted-foreground justify-start hover:bg-accent/10 rounded-xl [&[data-state=open]>svg]:ml-2",children:"Quick Look"}),(0,t.jsxs)(B.AccordionContent,{className:"pt-2 pl-2 pr-2 pb-1 bg-muted/30 rounded-2xl",children:[e.errorMessage&&(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("h4",{className:"font-semibold text-xs text-destructive mb-1",children:"Error:"}),(0,t.jsx)("pre",{className:"bg-destructive/10 text-xs p-2 rounded-xl whitespace-pre-wrap break-all font-code max-h-20 overflow-y-auto",children:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,G.ansiToHtml)(e.errorMessage)}})})]}),l.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"font-semibold text-xs text-primary mb-1",children:"Screenshots:"}),(0,t.jsx)("div",{className:"mt-1 grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-1",children:l.map((e,r)=>{let s=(0,G.getAssetPath)(e.path);return"#"===s?null:(0,t.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"relative aspect-video rounded-xl overflow-hidden group border hover:border-primary shadow-sm",children:[(0,t.jsx)(a.default,{src:s,alt:e.name,fill:!0,style:{objectFit:"cover"},className:"group-hover:scale-105 transition-transform duration-300","data-ai-hint":e["data-ai-hint"]}),(0,t.jsx)("div",{className:"absolute inset-0 bg-black/30 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-center justify-center",children:(0,t.jsx)(W,{className:"h-6 w-6 text-white"})})]},`img-thumb-${r}`)})})]}),!e.errorMessage&&0===l.length&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"No error or screenshots for quick look. Click to view full details."})]})]})})]})}var Z=e.i(64659);let J=(0,o.default)("funnel-x",[["path",{d:"M12.531 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14v6a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341l.427-.473",key:"ol2ft2"}],["path",{d:"m16.5 3.5 5 5",key:"15e6fa"}],["path",{d:"m21.5 3.5-5 5",key:"m0lwru"}]]),Q=(0,o.default)("repeat-1",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}],["path",{d:"M11 10h1v4",key:"70cz1p"}]]),ee=(0,o.default)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]);var et=e.i(94918),er=e.i(93479),ea=e.i(67489),es=e.i(48425),el=r.forwardRef((e,r)=>(0,t.jsx)(es.Primitive.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));el.displayName="Label";var en=e.i(25913);let ei=(0,en.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),eo=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(el,{ref:a,className:(0,G.cn)(ei(),e),...r}));eo.displayName=el.displayName;var ed=e.i(19455),ec=e.i(37822);function eu(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function em(...e){return t=>{let r=!1,a=e.map(e=>{let a=eu(e,t);return r||"function"!=typeof a||(r=!0),a});if(r)return()=>{for(let t=0;t<a.length;t++){let r=a[t];"function"==typeof r?r():eu(e[t],null)}}}}function eh(...e){return r.useCallback(em(...e),e)}function ep(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e?.(a),!1===r||!a.defaultPrevented)return t?.(a)}}"u">typeof window&&window.document&&window.document.createElement;var ef=globalThis?.document?r.useLayoutEffect:()=>{};e.i(83986);var ex=r[" useInsertionEffect ".trim().toString()]||ef;Symbol("RADIX:SYNC_STATE");var eg=e=>{var t;let a,s,{present:l,children:n}=e,i=function(e){var t,a;let[s,l]=r.useState(),n=r.useRef(null),i=r.useRef(e),o=r.useRef("none"),[d,c]=(t=e?"mounted":"unmounted",a={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},r.useReducer((e,t)=>a[e][t]??e,t));return r.useEffect(()=>{let e=ey(n.current);o.current="mounted"===d?e:"none"},[d]),ef(()=>{let t=n.current,r=i.current;if(r!==e){let a=o.current,s=ey(t);e?c("MOUNT"):"none"===s||t?.display==="none"?c("UNMOUNT"):r&&a!==s?c("ANIMATION_OUT"):c("UNMOUNT"),i.current=e}},[e,c]),ef(()=>{if(s){let e,t=s.ownerDocument.defaultView??window,r=r=>{let a=ey(n.current).includes(CSS.escape(r.animationName));if(r.target===s&&a&&(c("ANIMATION_END"),!i.current)){let r=s.style.animationFillMode;s.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===s.style.animationFillMode&&(s.style.animationFillMode=r)})}},a=e=>{e.target===s&&(o.current=ey(n.current))};return s.addEventListener("animationstart",a),s.addEventListener("animationcancel",r),s.addEventListener("animationend",r),()=>{t.clearTimeout(e),s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",r),s.removeEventListener("animationend",r)}}c("ANIMATION_END")},[s,c]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:r.useCallback(e=>{n.current=e?getComputedStyle(e):null,l(e)},[])}}(l),o="function"==typeof n?n({present:i.isPresent}):r.Children.only(n),d=eh(i.ref,(t=o,(s=(a=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?t.ref:(s=(a=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof n||i.isPresent?r.cloneElement(o,{ref:d}):null};function ey(e){return e?.animationName||"none"}eg.displayName="Presence",e.i(74080);var eb=Symbol("radix.slottable");function ev(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===eb}var ej=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,a)=>{var s,l;let n,i,o,d=(l=s=`Primitive.${a}`,(n=r.forwardRef((e,t)=>{let{children:a,...s}=e;if(r.isValidElement(a)){var l;let e,n,i=(l=a,(n=(e=Object.getOwnPropertyDescriptor(l.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?l.ref:(n=(e=Object.getOwnPropertyDescriptor(l,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?l.props.ref:l.props.ref||l.ref),o=function(e,t){let r={...t};for(let a in t){let s=e[a],l=t[a];/^on[A-Z]/.test(a)?s&&l?r[a]=(...e)=>{let t=l(...e);return s(...e),t}:s&&(r[a]=s):"style"===a?r[a]={...s,...l}:"className"===a&&(r[a]=[s,l].filter(Boolean).join(" "))}return{...e,...r}}(s,a.props);return a.type!==r.Fragment&&(o.ref=t?em(t,i):i),r.cloneElement(a,o)}return r.Children.count(a)>1?r.Children.only(null):null})).displayName=`${l}.SlotClone`,i=n,(o=r.forwardRef((e,a)=>{let{children:s,...l}=e,n=r.Children.toArray(s),o=n.find(ev);if(o){let e=o.props.children,s=n.map(t=>t!==o?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,t.jsx)(i,{...l,ref:a,children:r.isValidElement(e)?r.cloneElement(e,void 0,s):null})}return(0,t.jsx)(i,{...l,ref:a,children:s})})).displayName=`${s}.Slot`,o),c=r.forwardRef((e,r)=>{let{asChild:s,...l}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(s?d:a,{...l,ref:r})});return c.displayName=`Primitive.${a}`,{...e,[a]:c}},{}),ew="Checkbox",[eN,ek]=function(e,a=[]){let s=[],l=()=>{let t=s.map(e=>r.createContext(e));return function(a){let s=a?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...a,[e]:s}}),[a,s])}};return l.scopeName=e,[function(a,l){let n=r.createContext(l),i=s.length;s=[...s,l];let o=a=>{let{scope:s,children:l,...o}=a,d=s?.[e]?.[i]||n,c=r.useMemo(()=>o,Object.values(o));return(0,t.jsx)(d.Provider,{value:c,children:l})};return o.displayName=a+"Provider",[o,function(t,s){let o=s?.[e]?.[i]||n,d=r.useContext(o);if(d)return d;if(void 0!==l)return l;throw Error(`\`${t}\` must be used within \`${a}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let a=()=>{let a=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let s=a.reduce((t,{useScope:r,scopeName:a})=>{let s=r(e)[`__scope${a}`];return{...t,...s}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return a.scopeName=t.scopeName,a}(l,...a)]}(ew),[eC,eS]=eN(ew);function eA(e){let{__scopeCheckbox:a,checked:s,children:l,defaultChecked:n,disabled:i,form:o,name:d,onCheckedChange:c,required:u,value:m="on",internal_do_not_use_render:h}=e,[p,f]=function({prop:e,defaultProp:t,onChange:a=()=>{},caller:s}){let[l,n,i]=function({defaultProp:e,onChange:t}){let[a,s]=r.useState(e),l=r.useRef(a),n=r.useRef(t);return ex(()=>{n.current=t},[t]),r.useEffect(()=>{l.current!==a&&(n.current?.(a),l.current=a)},[a,l]),[a,s,n]}({defaultProp:t,onChange:a}),o=void 0!==e,d=o?e:l;{let t=r.useRef(void 0!==e);r.useEffect(()=>{let e=t.current;if(e!==o){let t=o?"controlled":"uncontrolled";console.warn(`${s} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=o},[o,s])}return[d,r.useCallback(t=>{if(o){let r="function"==typeof t?t(e):t;r!==e&&i.current?.(r)}else n(t)},[o,e,n,i])]}({prop:s,defaultProp:n??!1,onChange:c,caller:ew}),[x,g]=r.useState(null),[y,b]=r.useState(null),v=r.useRef(!1),j=!x||!!o||!!x.closest("form"),w={checked:p,disabled:i,setChecked:f,control:x,setControl:g,name:d,form:o,value:m,hasConsumerStoppedPropagationRef:v,required:u,defaultChecked:!eL(n)&&n,isFormControl:j,bubbleInput:y,setBubbleInput:b};return(0,t.jsx)(eC,{scope:a,...w,children:"function"==typeof h?h(w):l})}var eT="CheckboxTrigger",eM=r.forwardRef(({__scopeCheckbox:e,onKeyDown:a,onClick:s,...l},n)=>{let{control:i,value:o,disabled:d,checked:c,required:u,setControl:m,setChecked:h,hasConsumerStoppedPropagationRef:p,isFormControl:f,bubbleInput:x}=eS(eT,e),g=eh(n,m),y=r.useRef(c);return r.useEffect(()=>{let e=i?.form;if(e){let t=()=>h(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[i,h]),(0,t.jsx)(ej.button,{type:"button",role:"checkbox","aria-checked":eL(c)?"mixed":c,"aria-required":u,"data-state":eF(c),"data-disabled":d?"":void 0,disabled:d,value:o,...l,ref:g,onKeyDown:ep(a,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:ep(s,e=>{h(e=>!!eL(e)||!e),x&&f&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())})})});eM.displayName=eT;var eE=r.forwardRef((e,r)=>{let{__scopeCheckbox:a,name:s,checked:l,defaultChecked:n,required:i,disabled:o,value:d,onCheckedChange:c,form:u,...m}=e;return(0,t.jsx)(eA,{__scopeCheckbox:a,checked:l,defaultChecked:n,disabled:o,required:i,onCheckedChange:c,name:s,form:u,value:d,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eM,{...m,ref:r,__scopeCheckbox:a}),e&&(0,t.jsx)(eO,{__scopeCheckbox:a})]})})});eE.displayName=ew;var eD="CheckboxIndicator",eR=r.forwardRef((e,r)=>{let{__scopeCheckbox:a,forceMount:s,...l}=e,n=eS(eD,a);return(0,t.jsx)(eg,{present:s||eL(n.checked)||!0===n.checked,children:(0,t.jsx)(ej.span,{"data-state":eF(n.checked),"data-disabled":n.disabled?"":void 0,...l,ref:r,style:{pointerEvents:"none",...e.style}})})});eR.displayName=eD;var eP="CheckboxBubbleInput",eO=r.forwardRef(({__scopeCheckbox:e,...a},s)=>{let l,{control:n,hasConsumerStoppedPropagationRef:i,checked:o,defaultChecked:d,required:c,disabled:u,name:m,value:h,form:p,bubbleInput:f,setBubbleInput:x}=eS(eP,e),g=eh(s,x),y=(l=r.useRef({value:o,previous:o}),r.useMemo(()=>(l.current.value!==o&&(l.current.previous=l.current.value,l.current.value=o),l.current.previous),[o])),b=function(e){let[t,a]=r.useState(void 0);return ef(()=>{if(e){a({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,s;if(!Array.isArray(t)||!t.length)return;let l=t[0];if("borderBoxSize"in l){let e=l.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,s=t.blockSize}else r=e.offsetWidth,s=e.offsetHeight;a({width:r,height:s})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}a(void 0)},[e]),t}(n);r.useEffect(()=>{if(!f)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!i.current;if(y!==o&&e){let r=new Event("click",{bubbles:t});f.indeterminate=eL(o),e.call(f,!eL(o)&&o),f.dispatchEvent(r)}},[f,y,o,i]);let v=r.useRef(!eL(o)&&o);return(0,t.jsx)(ej.input,{type:"checkbox","aria-hidden":!0,defaultChecked:d??v.current,required:c,disabled:u,name:m,value:h,form:p,...a,tabIndex:-1,ref:g,style:{...a.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function eL(e){return"indeterminate"===e}function eF(e){return eL(e)?"indeterminate":e?"checked":"unchecked"}eO.displayName=eP;var eI=e.i(43531);let e_=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(eE,{ref:a,className:(0,G.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...r,children:(0,t.jsx)(eR,{className:(0,G.cn)("flex items-center justify-center text-current"),children:(0,t.jsx)(eI.Check,{className:"h-4 w-4"})})}));e_.displayName=eE.displayName;var e$=e.i(59684),ez=e.i(74911);let eB=["all","passed","failed","skipped","flaky"],eH=["--suite-color-1-hsl","--suite-color-2-hsl","--suite-color-3-hsl","--suite-color-4-hsl","--suite-color-5-hsl"];function eK({report:e,loading:a,error:s,initialFilter:o}){let[d,p]=(0,r.useState)(o||"all"),[x,g]=(0,r.useState)(""),[y,b]=(0,r.useState)([]),[v,j]=(0,r.useState)([]),[w,N]=(0,r.useState)(!1),[k,S]=(0,r.useState)("all"),[A,T]=(0,r.useState)(["all"]),[M,E]=(0,r.useState)("all"),[D,R]=(0,r.useState)(["all"]),[P,O]=(0,r.useState)(!1),{toast:L}=(0,ez.useToast)();(0,r.useEffect)(()=>{o&&p(o)},[o]),(0,r.useEffect)(()=>{if(e?.results){let t=new Set,r=new Set,a=new Set;e.results.forEach(e=>{e.tags?.forEach(e=>t.add(e)),e.browser&&r.add(e.browser),e.suiteName?a.add(e.suiteName):a.add("Untitled Suite")}),j(Array.from(t).sort()),T(["all",...Array.from(r).sort()]),R(["all",...Array.from(a).sort()])}},[e]);let F=(0,r.useMemo)(()=>"all"!==d||""!==x||y.length>0||"all"!==k||"all"!==M||P,[d,x,y,k,M,P]),_=(0,r.useMemo)(()=>{if(!e?.results)return[];let t=e.results.filter(e=>{let t=(0,I.getEffectiveTestStatus)(e),r=!1;r="all"===d||("flaky"===d?"flaky"===t:"passed"===d?"passed"===t:"failed"===d?"failed"===t||"timedOut"===t:"skipped"===d?"skipped"===t:t===d);let a=(e.name||"").toLowerCase().includes(x.toLowerCase())||(e.suiteName||"").toLowerCase().includes(x.toLowerCase()),s=0===y.length||e.tags&&e.tags.some(e=>y.includes(e)),l="all"===k||e.browser===k,n=e.suiteName||"Untitled Suite",i="all"===M||n===M,o=e.retryHistory?e.retryHistory.filter(e=>"passed"!==e.status&&"skipped"!==e.status).length:0,c=!P||P&&o>0;return r&&a&&s&&l&&i&&c}),r=new Map;return t.forEach(e=>{let t=e.suiteName||"Untitled Suite";r.has(t)||r.set(t,{tests:[],stats:{total:0,passed:0,failed:0,skipped:0,pending:0,flaky:0}});let a=r.get(t);a.tests.push(e),a.stats.total++;let s=(0,I.getEffectiveTestStatus)(e);"flaky"===s?a.stats.flaky++:"passed"===s?a.stats.passed++:"failed"===s||"timedOut"===s?a.stats.failed++:"skipped"===s?a.stats.skipped++:"pending"===s&&a.stats.pending++}),Array.from(r.entries()).map(([e,t])=>({title:e,tests:t.tests,stats:t.stats})).sort((e,t)=>t.stats.failed-e.stats.failed||t.stats.total-e.stats.total||e.title.localeCompare(t.title))},[e,d,x,y,k,M,P]);return a?(0,t.jsx)("div",{className:"space-y-6 p-6 lg:p-8 bg-muted/20 backdrop-blur-md border border-border/40 rounded-[2.5rem] shadow-inner",children:(0,t.jsxs)(l.Card,{className:"shadow-xl",children:[(0,t.jsxs)(l.CardHeader,{children:[(0,t.jsx)(n.Skeleton,{className:"h-6 w-48"}),(0,t.jsx)(n.Skeleton,{className:"h-4 w-64 mt-1"})]}),(0,t.jsxs)(l.CardContent,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-6 p-6 border rounded-xl bg-muted/50 shadow-lg",children:[(0,t.jsx)(n.Skeleton,{className:"h-10 w-full"}),(0,t.jsx)(n.Skeleton,{className:"h-10 w-full"}),(0,t.jsx)(n.Skeleton,{className:"h-10 w-full"}),(0,t.jsx)(n.Skeleton,{className:"h-10 w-full"}),(0,t.jsx)(n.Skeleton,{className:"h-10 w-full"}),(0,t.jsx)(n.Skeleton,{className:"h-10 w-full"}),(0,t.jsx)(n.Skeleton,{className:"h-10 w-full"})]}),[void 0,void 0,void 0].map((e,r)=>(0,t.jsxs)("div",{className:"space-y-2 p-2 border rounded-2xl shadow-md",children:[(0,t.jsx)(n.Skeleton,{className:"h-5 w-1/3"}),(0,t.jsx)(n.Skeleton,{className:"h-8 w-full"}),(0,t.jsx)(n.Skeleton,{className:"h-8 w-full"})]},r))]})]})}):s?(0,t.jsx)("div",{className:"space-y-6 p-6 lg:p-8 bg-muted/20 backdrop-blur-md border border-border/40 rounded-[2.5rem] shadow-inner",children:(0,t.jsxs)(i.Alert,{variant:"destructive",className:"mt-4 shadow-md",children:[(0,t.jsx)(h.Terminal,{className:"h-4 w-4"}),(0,t.jsx)(i.AlertTitle,{children:"Error Fetching Test Results"}),(0,t.jsx)(i.AlertDescription,{children:s})]})}):e&&e.results&&0!==e.results.length?(0,t.jsx)("div",{className:"space-y-6 p-6 lg:p-8 bg-muted/20 backdrop-blur-md border border-border/40 rounded-[2.5rem] shadow-inner",children:(0,t.jsxs)(l.Card,{className:"shadow-xl",children:[(0,t.jsxs)(l.CardHeader,{className:"flex flex-row items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(l.CardTitle,{className:"text-2xl font-headline text-primary",children:"Test Results"}),(e.metadata?.generatedAt||e.run?.timestamp)&&(0,t.jsxs)(l.CardDescription,{children:["Last updated:"," ",new Date(e.metadata.generatedAt||e.run.timestamp).toLocaleString()]})]}),(0,t.jsxs)(ed.Button,{onClick:()=>{if(!e||!e.results||0===e.results.length)return void L({title:"Export Failed",description:"No data available to export.",variant:"destructive"});let t=["id","name","suiteName","status","duration","startTime","endTime","browser","retries","tags","stdout","stderr","workerId"],r=e=>{if(null==e)return"";let t=String(e);return(t.includes(",")||t.includes('"')||t.includes("\n"))&&(t=`"${t.replace(/"/g,'""')}"`),t},a=t.map(r).join(",")+"\n";e.results.forEach(e=>{let s=t.map(t=>{let a;switch(t){case"tags":a=e.tags?e.tags.join("; "):"";break;case"stdout":a=e.stdout?e.stdout.join("\\n"):"";break;case"stderr":a=e.errorMessage||"";break;case"workerId":a=void 0!==e.workerId&&null!==e.workerId?String(e.workerId):"";break;default:a=e[t]}return r(a)});a+=s.join(",")+"\n"});let s=new Blob([a],{type:"text/csv;charset=utf-8;"}),l=URL.createObjectURL(s),n=document.createElement("a");n.setAttribute("href",l);let i="data";if(e.run&&e.run.id&&"string"==typeof e.run.id&&""!==e.run.id.trim()){let t=e.run.id.trim().split("-");t.length>1&&"run"===t[0].toLowerCase()&&t[1]&&""!==t[1].trim()?i=t[1]:t.length>0&&""!==t[0].trim()&&(i=t[0])}else if(e.run&&e.run.timestamp)try{i=String(new Date(e.run.timestamp).getTime())}catch(e){}let o=`run-${i}.csv`;n.setAttribute("download",o),n.style.visibility="hidden",document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(l),L({title:"Export Successful",description:`${o} has been downloaded.`})},variant:"outline",size:"sm",className:"ml-auto rounded-xl shadow-md",children:[(0,t.jsx)(et.FileSpreadsheet,{className:"mr-2 h-4 w-4"}),"Export as CSV"]})]}),(0,t.jsxs)(l.CardContent,{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"p-6 border rounded-xl bg-muted/50 shadow-lg space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-6 gap-y-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(eo,{htmlFor:"status-filter",className:"text-sm font-medium text-muted-foreground",children:"Filter by Status"}),(0,t.jsxs)(ea.Select,{value:d,onValueChange:e=>p(e),children:[(0,t.jsx)(ea.SelectTrigger,{id:"status-filter",className:"w-full bg-background shadow-inner rounded-xl",children:(0,t.jsx)(ea.SelectValue,{placeholder:"Select status"})}),(0,t.jsx)(ea.SelectContent,{className:"rounded-xl",children:eB.map(e=>(0,t.jsx)(ea.SelectItem,{value:e,className:"capitalize",children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(eo,{htmlFor:"search-filter",className:"text-sm font-medium text-muted-foreground",children:"Search by Name/Suite"}),(0,t.jsx)(er.Input,{id:"search-filter",type:"text",placeholder:"Enter test or suite name...",value:x,onChange:e=>g(e.target.value),className:"w-full bg-background shadow-inner rounded-xl"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(eo,{className:"text-sm font-medium text-muted-foreground",children:"Filter by Tags"}),(0,t.jsxs)(ec.Popover,{open:w,onOpenChange:N,children:[(0,t.jsx)(ec.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)(ed.Button,{variant:"outline",className:"w-full bg-background shadow-inner justify-between rounded-xl",children:[y.length>0?`Tags (${y.length})`:"Select Tags",(0,t.jsx)(Z.ChevronDown,{className:"ml-2 h-4 w-4 opacity-50"})]})}),(0,t.jsxs)(ec.PopoverContent,{className:"w-[var(--radix-popover-trigger-width)] p-0 rounded-xl",align:"start",children:[(0,t.jsx)("div",{className:"p-2 border-b",children:(0,t.jsx)("p",{className:"text-sm font-medium",children:"Filter by Tags"})}),(0,t.jsx)(e$.ScrollArea,{className:"h-48",children:(0,t.jsx)("div",{className:"p-2 space-y-1",children:v.length>0?v.map(e=>(0,t.jsxs)(eo,{htmlFor:`tag-${e}`,className:"flex items-center space-x-2 p-1.5 rounded-xl hover:bg-accent/10 cursor-pointer",children:[(0,t.jsx)(e_,{id:`tag-${e}`,checked:y.includes(e),onCheckedChange:t=>{b(r=>!0===t?[...r,e]:r.filter(t=>t!==e))},className:"rounded-xl"}),(0,t.jsx)("span",{children:e})]},e)):(0,t.jsx)("p",{className:"text-xs text-muted-foreground p-2",children:"No tags available in this report."})})}),y.length>0&&(0,t.jsx)("div",{className:"p-2 border-t flex justify-end",children:(0,t.jsx)(ed.Button,{variant:"ghost",size:"sm",onClick:()=>b([]),children:"Clear selected"})})]})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(eo,{htmlFor:"browser-filter",className:"text-sm font-medium text-muted-foreground",children:"Filter by Browser"}),(0,t.jsxs)(ea.Select,{value:k,onValueChange:S,children:[(0,t.jsx)(ea.SelectTrigger,{id:"browser-filter",className:"w-full bg-background shadow-inner rounded-xl",children:(0,t.jsx)(ea.SelectValue,{placeholder:"Select browser"})}),(0,t.jsx)(ea.SelectContent,{className:"rounded-xl",children:A.map(e=>(0,t.jsx)(ea.SelectItem,{value:e,className:"capitalize",children:"all"===e?"All Browsers":e},e))})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(eo,{htmlFor:"suite-filter",className:"text-sm font-medium text-muted-foreground",children:"Filter by Test Suite"}),(0,t.jsxs)(ea.Select,{value:M,onValueChange:E,children:[(0,t.jsx)(ea.SelectTrigger,{id:"suite-filter",className:"w-full bg-background shadow-inner rounded-xl",children:(0,t.jsx)(ea.SelectValue,{placeholder:"Select test suite"})}),(0,t.jsx)(ea.SelectContent,{className:"rounded-xl",children:D.map(e=>(0,t.jsx)(ea.SelectItem,{value:e,className:"capitalize truncate",children:"all"===e?"All Suites":e.length>40?e.substring(0,37)+"...":e},e))})]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2 pt-5",children:[(0,t.jsx)(e_,{id:"retries-filter",checked:P,onCheckedChange:e=>O(!!e),className:"rounded-xl"}),(0,t.jsxs)(eo,{htmlFor:"retries-filter",className:"text-sm font-medium text-muted-foreground cursor-pointer flex items-center",children:[(0,t.jsx)(Q,{className:"h-4 w-4 mr-1.5 text-muted-foreground"}),"Retries Only"]})]})]}),F&&(0,t.jsx)("div",{className:"mt-4 flex justify-end",children:(0,t.jsxs)(ed.Button,{variant:"ghost",onClick:()=>{p("all"),g(""),b([]),S("all"),E("all"),O(!1)},className:"text-sm rounded-xl",children:[(0,t.jsx)(J,{className:"mr-2 h-4 w-4"}),"Clear All Filters"]})})]}),y.length>0&&(0,t.jsxs)("div",{className:"mb-4 flex flex-wrap gap-2 items-center",children:[(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Active tags:"}),y.map(e=>(0,t.jsxs)(H.Badge,{variant:"secondary",className:"flex items-center rounded-full",children:[e,(0,t.jsx)("button",{type:"button","aria-label":`Remove ${e} filter`,onClick:()=>{b(t=>t.filter(t=>t!==e))},className:"ml-1.5 p-0.5 rounded-full hover:bg-muted-foreground/20 focus:outline-none focus:ring-1 focus:ring-ring",children:(0,t.jsx)(c.XCircle,{className:"h-3.5 w-3.5"})})]},e))]}),_.length>0?(0,t.jsx)(B.Accordion,{type:"multiple",className:"w-full space-y-3",children:_.map((e,r)=>(0,t.jsxs)(B.AccordionItem,{value:`suite-${e.title.replace(/\s+/g,"-")}-${r}`,className:"border rounded-xl shadow-lg bg-card hover:shadow-xl transition-shadow duration-300",children:[(0,t.jsx)(B.AccordionTrigger,{className:"p-4 hover:no-underline text-left w-full group",children:(0,t.jsx)("div",{className:"flex justify-between items-center w-full",children:(0,t.jsxs)("div",{className:"flex-grow min-w-0",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold group-hover:opacity-80 transition-opacity",title:e.title,style:{color:`hsl(var(${eH[r%eH.length]}))`},children:e.title}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-x-3 gap-y-1.5 mt-2",children:[(0,t.jsxs)(H.Badge,{variant:"outline",className:"text-xs border-muted-foreground/50",children:[(0,t.jsx)(ee,{className:"mr-1.5 h-3 w-3 text-muted-foreground"}),"Total: ",e.stats.total]}),(0,t.jsxs)(H.Badge,{variant:"outline",className:"text-xs",style:{color:"hsl(var(--chart-3))",borderColor:"hsl(var(--chart-3) / 0.5)"},children:[(0,t.jsx)(U.CheckCircle2,{className:"mr-1.5 h-3 w-3"}),"Passed: ",e.stats.passed]}),e.stats.flaky>0&&(0,t.jsxs)(H.Badge,{variant:"outline",className:"text-xs",style:{color:"hsl(var(--flaky))",borderColor:"hsl(var(--flaky) / 0.5)"},children:[(0,t.jsx)(f,{className:"mr-1.5 h-3 w-3 text-[hsl(var(--flaky))]"}),(0,t.jsxs)("span",{className:"text-[hsl(var(--flaky))]",children:["Flaky: ",e.stats.flaky]})]}),(0,t.jsxs)(H.Badge,{variant:"outline",className:"text-xs",style:{color:"hsl(var(--destructive))",borderColor:"hsl(var(--destructive) / 0.5)"},children:[(0,t.jsx)(c.XCircle,{className:"mr-1.5 h-3 w-3"}),"Failed: ",e.stats.failed]}),(0,t.jsxs)(H.Badge,{variant:"outline",className:"text-xs",style:{color:"hsl(var(--accent))",borderColor:"hsl(var(--accent) / 0.5)"},children:[(0,t.jsx)(u,{className:"mr-1.5 h-3 w-3"}),"Skipped: ",e.stats.skipped]}),e.stats.pending>0&&(0,t.jsxs)(H.Badge,{variant:"outline",className:"text-xs",style:{color:"hsl(var(--primary))",borderColor:"hsl(var(--primary) / 0.5)"},children:[(0,t.jsx)(m.Clock,{className:"mr-1.5 h-3 w-3"}),"Pending: ",e.stats.pending]})]})]})})}),(0,t.jsx)(B.AccordionContent,{className:"p-4 pt-0",children:e.tests.length>0?(0,t.jsx)(e$.ScrollArea,{className:"h-[600px] pr-4",children:(0,t.jsx)("div",{className:"space-y-1 mt-2",children:e.tests.map(e=>(0,t.jsx)(Y,{test:e},e.id))})}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-2",children:"No tests in this suite match the current filters."})})]},`suite-${e.title.replace(/\s+/g,"-")}-${r}`))}):(0,t.jsxs)("div",{className:"text-center py-8",children:[(0,t.jsx)("p",{className:"text-muted-foreground text-lg",children:"No test results match your current filters."}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Try adjusting the status, search term, or tag filters."})]})]})]})}):(0,t.jsx)("div",{className:"space-y-6 p-6 lg:p-8 bg-muted/20 backdrop-blur-md border border-border/40 rounded-[2.5rem] shadow-inner",children:(0,t.jsxs)(l.Card,{className:"shadow-xl",children:[(0,t.jsx)(l.CardHeader,{className:"flex flex-row items-center justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(l.CardTitle,{className:"text-2xl font-headline text-primary",children:"Test Results"}),(e?.metadata?.generatedAt||e?.run?.timestamp)&&(0,t.jsxs)(l.CardDescription,{children:["Last updated:"," ",new Date(e.metadata?.generatedAt||e.run?.timestamp||Date.now()).toLocaleString()]})]})}),(0,t.jsx)(l.CardContent,{children:(0,t.jsxs)(i.Alert,{className:"shadow-sm rounded-2xl",children:[(0,t.jsx)(C.Info,{className:"h-4 w-4"}),(0,t.jsx)(i.AlertTitle,{children:"No Test Data"}),(0,t.jsx)(i.AlertDescription,{children:"No test results available. Ensure 'playwright-pulse-report.json' exists in 'pulse-report/' and is correctly formatted, or that the data source is providing results."})]})})]})})}var eU=e.i(29228),eV=e.i(55706),eW=e.i(85183),eq=e.i(93230),eG=e.i(72526),eX=e.i(34239),eY=e.i(59559),eZ=e.i(44098),eJ=e.i(9694),eQ=e.i(75225),e0=e.i(83966),e1=e.i(7670),e2=e.i(73050),e4=e.i(71223),e3=e.i(86966),e5=e.i(29873),e6=e.i(78948),e8=e.i(98892),e7=e.i(72733),e9=e.i(38279),te=e.i(97865),tt=e.i(69212),tr=e.i(62728),ta=e.i(94395),ts=e.i(98770),tl=e.i(81977),tn=["layout","type","stroke","connectNulls","isRange","ref"],ti=["key"];function to(e){return(to="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function td(e,t){if(null==e)return{};var r,a,s=function(e,t){if(null==e)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)r=l[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}function tc(){return(tc=Object.assign.bind()).apply(this,arguments)}function tu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function tm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tu(Object(r),!0).forEach(function(t){tg(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tu(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function th(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,ty(a.key),a)}}function tp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tp=function(){return!!e})()}function tf(e){return(tf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tx(e,t){return(tx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tg(e,t,r){return(t=ty(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ty(e){var t=function(e,t){if("object"!=to(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=to(a))return a;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==to(t)?t:t+""}var tb=function(e){var t,a;function s(){var e,t,r;if(!(this instanceof s))throw TypeError("Cannot call a class as a function");for(var a=arguments.length,l=Array(a),n=0;n<a;n++)l[n]=arguments[n];return t=s,r=[].concat(l),t=tf(t),tg(e=function(e,t){if(t&&("object"===to(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var r=e;if(void 0===r)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(this,tp()?Reflect.construct(t,r||[],tf(this).constructor):t.apply(this,r)),"state",{isAnimationFinished:!0}),tg(e,"id",(0,ta.uniqueId)("recharts-area-")),tg(e,"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),(0,e4.default)(t)&&t()}),tg(e,"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),(0,e4.default)(t)&&t()}),e}if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");return s.prototype=Object.create(e&&e.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),e&&tx(s,e),t=[{key:"renderDots",value:function(e,t,a){var l=this.props.isAnimationActive,n=this.state.isAnimationFinished;if(l&&!n)return null;var i=this.props,o=i.dot,d=i.points,c=i.dataKey,u=(0,tl.filterProps)(this.props,!1),m=(0,tl.filterProps)(o,!0),h=d.map(function(e,t){var r=tm(tm(tm({key:"dot-".concat(t),r:3},u),m),{},{index:t,cx:e.x,cy:e.y,dataKey:c,value:e.value,payload:e.payload,points:d});return s.renderDotItem(o,r)}),p={clipPath:e?"url(#clipPath-".concat(t?"":"dots-").concat(a,")"):null};return r.default.createElement(te.Layer,tc({className:"recharts-area-dots"},p),h)}},{key:"renderHorizontalRect",value:function(e){var t=this.props,a=t.baseLine,s=t.points,l=t.strokeWidth,n=s[0].x,i=s[s.length-1].x,o=e*Math.abs(n-i),d=(0,e3.default)(s.map(function(e){return e.y||0}));return((0,ta.isNumber)(a)&&"number"==typeof a?d=Math.max(a,d):a&&Array.isArray(a)&&a.length&&(d=Math.max((0,e3.default)(a.map(function(e){return e.y||0})),d)),(0,ta.isNumber)(d))?r.default.createElement("rect",{x:n<i?n:n-o,y:0,width:o,height:Math.floor(d+(l?parseInt("".concat(l),10):1))}):null}},{key:"renderVerticalRect",value:function(e){var t=this.props,a=t.baseLine,s=t.points,l=t.strokeWidth,n=s[0].y,i=s[s.length-1].y,o=e*Math.abs(n-i),d=(0,e3.default)(s.map(function(e){return e.x||0}));return((0,ta.isNumber)(a)&&"number"==typeof a?d=Math.max(a,d):a&&Array.isArray(a)&&a.length&&(d=Math.max((0,e3.default)(a.map(function(e){return e.x||0})),d)),(0,ta.isNumber)(d))?r.default.createElement("rect",{x:0,y:n<i?n:n-o,width:d+(l?parseInt("".concat(l),10):1),height:Math.floor(o)}):null}},{key:"renderClipRect",value:function(e){return"vertical"===this.props.layout?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:"renderAreaStatically",value:function(e,t,a,s){var l=this.props,n=l.layout,i=l.type,o=l.stroke,d=l.connectNulls,c=l.isRange,u=(l.ref,td(l,tn));return r.default.createElement(te.Layer,{clipPath:a?"url(#clipPath-".concat(s,")"):null},r.default.createElement(e7.Curve,tc({},(0,tl.filterProps)(u,!0),{points:e,connectNulls:d,type:i,baseLine:t,layout:n,stroke:"none",className:"recharts-area-area"})),"none"!==o&&r.default.createElement(e7.Curve,tc({},(0,tl.filterProps)(this.props,!1),{className:"recharts-area-curve",layout:n,type:i,connectNulls:d,fill:"none",points:e})),"none"!==o&&c&&r.default.createElement(e7.Curve,tc({},(0,tl.filterProps)(this.props,!1),{className:"recharts-area-curve",layout:n,type:i,connectNulls:d,fill:"none",points:t})))}},{key:"renderAreaWithAnimation",value:function(e,t){var a=this,s=this.props,l=s.points,n=s.baseLine,i=s.isAnimationActive,o=s.animationBegin,d=s.animationDuration,c=s.animationEasing,u=s.animationId,m=this.state,h=m.prevPoints,p=m.prevBaseLine;return r.default.createElement(e2.default,{begin:o,duration:d,isActive:i,easing:c,from:{t:0},to:{t:1},key:"area-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(s){var i=s.t;if(h){var o,d=h.length/l.length,c=l.map(function(e,t){var r=Math.floor(t*d);if(h[r]){var a=h[r],s=(0,ta.interpolateNumber)(a.x,e.x),l=(0,ta.interpolateNumber)(a.y,e.y);return tm(tm({},e),{},{x:s(i),y:l(i)})}return e});return o=(0,ta.isNumber)(n)&&"number"==typeof n?(0,ta.interpolateNumber)(p,n)(i):(0,e5.default)(n)||(0,e6.default)(n)?(0,ta.interpolateNumber)(p,0)(i):n.map(function(e,t){var r=Math.floor(t*d);if(p[r]){var a=p[r],s=(0,ta.interpolateNumber)(a.x,e.x),l=(0,ta.interpolateNumber)(a.y,e.y);return tm(tm({},e),{},{x:s(i),y:l(i)})}return e}),a.renderAreaStatically(c,o,e,t)}return r.default.createElement(te.Layer,null,r.default.createElement("defs",null,r.default.createElement("clipPath",{id:"animationClipPath-".concat(t)},a.renderClipRect(i))),r.default.createElement(te.Layer,{clipPath:"url(#animationClipPath-".concat(t,")")},a.renderAreaStatically(l,n,e,t)))})}},{key:"renderArea",value:function(e,t){var r=this.props,a=r.points,s=r.baseLine,l=r.isAnimationActive,n=this.state,i=n.prevPoints,o=n.prevBaseLine,d=n.totalLength;return l&&a&&a.length&&(!i&&d>0||!(0,e8.default)(i,a)||!(0,e8.default)(o,s))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(a,s,e,t)}},{key:"render",value:function(){var e,t=this.props,a=t.hide,s=t.dot,l=t.points,n=t.className,i=t.top,o=t.left,d=t.xAxis,c=t.yAxis,u=t.width,m=t.height,h=t.isAnimationActive,p=t.id;if(a||!l||!l.length)return null;var f=this.state.isAnimationFinished,x=1===l.length,g=(0,e1.default)("recharts-area",n),y=d&&d.allowDataOverflow,b=c&&c.allowDataOverflow,v=y||b,j=(0,e5.default)(p)?this.id:p,w=null!=(e=(0,tl.filterProps)(s,!1))?e:{r:3,strokeWidth:2},N=w.r,k=w.strokeWidth,C=((0,tl.hasClipDot)(s)?s:{}).clipDot,S=void 0===C||C,A=2*(void 0===N?3:N)+(void 0===k?2:k);return r.default.createElement(te.Layer,{className:g},y||b?r.default.createElement("defs",null,r.default.createElement("clipPath",{id:"clipPath-".concat(j)},r.default.createElement("rect",{x:y?o:o-u/2,y:b?i:i-m/2,width:y?u:2*u,height:b?m:2*m})),!S&&r.default.createElement("clipPath",{id:"clipPath-dots-".concat(j)},r.default.createElement("rect",{x:o-A/2,y:i-A/2,width:u+A,height:m+A}))):null,x?null:this.renderArea(v,j),(s||x)&&this.renderDots(v,S,j),(!h||f)&&tt.LabelList.renderCallByParent(this.props,l))}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}:e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null}}],t&&th(s.prototype,t),a&&th(s,a),Object.defineProperty(s,"prototype",{writable:!1}),s}(r.PureComponent);tg(tb,"displayName","Area"),tg(tb,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!tr.Global.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),tg(tb,"getBaseValue",function(e,t,r,a){var s=e.layout,l=e.baseValue,n=t.props.baseValue,i=null!=n?n:l;if((0,ta.isNumber)(i)&&"number"==typeof i)return i;var o="horizontal"===s?a:r,d=o.scale.domain();if("number"===o.type){var c=Math.max(d[0],d[1]),u=Math.min(d[0],d[1]);return"dataMin"===i?u:"dataMax"===i||c<0?c:Math.max(Math.min(d[0],d[1]),0)}return"dataMin"===i?d[0]:"dataMax"===i?d[1]:d[0]}),tg(tb,"getComposedData",function(e){var t,r=e.props,a=e.item,s=e.xAxis,l=e.yAxis,n=e.xAxisTicks,i=e.yAxisTicks,o=e.bandSize,d=e.dataKey,c=e.stackedData,u=e.dataStartIndex,m=e.displayedData,h=e.offset,p=r.layout,f=c&&c.length,x=tb.getBaseValue(r,a,s,l),g="horizontal"===p,y=!1,b=m.map(function(e,t){f?r=c[u+t]:Array.isArray(r=(0,ts.getValueByDataKey)(e,d))?y=!0:r=[x,r];var r,a=null==r[1]||f&&null==(0,ts.getValueByDataKey)(e,d);return g?{x:(0,ts.getCateCoordinateOfLine)({axis:s,ticks:n,bandSize:o,entry:e,index:t}),y:a?null:l.scale(r[1]),value:r,payload:e}:{x:a?null:s.scale(r[1]),y:(0,ts.getCateCoordinateOfLine)({axis:l,ticks:i,bandSize:o,entry:e,index:t}),value:r,payload:e}});return t=f||y?b.map(function(e){var t=Array.isArray(e.value)?e.value[0]:null;return g?{x:e.x,y:null!=t&&null!=e.y?l.scale(t):null}:{x:null!=t?s.scale(t):null,y:e.y}}):g?l.scale(x):s.scale(x),tm({points:b,baseLine:t,layout:p,isRange:y},h)}),tg(tb,"renderDotItem",function(e,t){var a;if(r.default.isValidElement(e))a=r.default.cloneElement(e,t);else if((0,e4.default)(e))a=e(t);else{var s=(0,e1.default)("recharts-area-dot","boolean"!=typeof e?e.className:""),l=t.key,n=td(t,ti);a=r.default.createElement(e9.Dot,tc({},n,{key:l,className:s}))}return a});var tv=e.i(44171),tj=(0,e0.generateCategoricalChart)({chartName:"AreaChart",GraphicalChild:tb,axisComponents:[{axisType:"xAxis",AxisComp:eW.XAxis},{axisType:"yAxis",AxisComp:eq.YAxis}],formatAxisMap:tv.formatAxisMap});let tw=(0,o.default)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);var tN=e.i(61911);let tk=({active:e,payload:r,label:a})=>e&&r&&r.length?(0,t.jsxs)("div",{className:"custom-recharts-tooltip",children:[(0,t.jsx)("p",{className:"label",children:`Date: ${a}`}),r.map((e,r)=>(0,t.jsx)("p",{style:{color:e.color},className:"text-xs",children:`${e.name}: ${e.value?.toLocaleString()}${e.unit||""}`},`item-${r}`))]}):null,tC=({active:e,payload:r})=>{if(e&&r&&r.length){let e=r[0].payload,a=new Date(e.dateRaw).toLocaleString();return(0,t.jsxs)("div",{className:"bg-[#0a0a0aeb] p-3 rounded-xl shadow-2xl border border-white/10 text-white min-w-[180px] backdrop-blur-sm",children:[(0,t.jsxs)("p",{className:"font-bold text-sm mb-0.5",children:["Run ",new Date(e.dateRaw).getTime()]}),(0,t.jsxs)("p",{className:"text-[11px] text-gray-400 mb-2",children:["Date: ",a]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-[13px] mb-1",children:[(0,t.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#ff9800]"}),(0,t.jsxs)("span",{children:["Duration: ",(0,t.jsxs)("span",{className:"font-bold",children:[e.durationSeconds,"s"]})]})]}),(0,t.jsxs)("p",{className:"text-[13px] mt-2 pt-2 border-t border-white/10 text-gray-300",children:["Tests: ",e.totalTests]})]})}return null},tS=r.memo(({trends:e,loading:a,error:s,currentResults:o})=>{let d=r.useRef(null),c=r.useRef(null),u=r.useRef(null),m=r.useRef(null),p=r.useRef(null),f=r.useMemo(()=>e&&0!==e.length?e.map((e,t)=>({...e,date:new Date(e.date).toLocaleDateString("en-CA",{month:"short",day:"numeric"}),durationSeconds:parseFloat((e.duration/1e3).toFixed(2)),workerCount:e.workerCount,flaky:e.flaky||0,runLabel:`Run ${t+1}`,dateRaw:e.date})):[],[e]),x=r.useMemo(()=>{if(console.log("[Describe Duration Chart] currentResults:",o?.length,"items"),!o||0===o.length)return console.log("[Describe Duration Chart] No current results"),[];let e=new Map,t=!1;if(o.forEach(r=>{if(r.describe){let a=r.describe;if(!a||"n/a"===a.trim().toLowerCase()||""===a.trim())return;t=!0;let s=r.spec_file||"Unknown File",l=`${s}::${a}`;e.has(l)||e.set(l,{duration:0,file:s,describe:a}),e.get(l).duration+=r.duration}}),!t)return console.log("[Describe Duration Chart] No valid describe blocks found"),[];let r=Array.from(e.values()).map(e=>({describe:e.describe,duration:e.duration,durationSeconds:parseFloat((e.duration/1e3).toFixed(2)),file:e.file}));return console.log("[Describe Duration Chart] Processed data:",r.length,"describe blocks"),r},[o]),g=r.useMemo(()=>{if(!o||0===o.length)return{series:[],categories:[]};let e=["Critical","High","Medium","Low","Minor"],t=[0,0,0,0,0],r=[0,0,0,0,0],a=[0,0,0,0,0],s=[0,0,0,0,0];return o.forEach(l=>{let n=l.severity||"Medium",i=String(l.status).toLowerCase(),o=e.indexOf(n);-1===o&&(o=2),"passed"===i?t[o]++:"flaky"===i?s[o]++:"failed"===i||"timedout"===i||"interrupted"===i?r[o]++:a[o]++}),{series:[{name:"Passed",data:t},{name:"Failed",data:r},{name:"Flaky",data:s},{name:"Skipped",data:a}],categories:e}},[o]);if(a)return(0,t.jsxs)(l.Card,{className:"shadow-xl rounded-xl backdrop-blur-md bg-card/80 border-border/50",children:[(0,t.jsx)(l.CardHeader,{children:(0,t.jsxs)(l.CardTitle,{className:"flex items-center text-2xl font-headline text-primary",children:[(0,t.jsx)(tw,{className:"h-7 w-7 mr-2"}),"Historical Trend Analysis"]})}),(0,t.jsx)(l.CardContent,{className:"space-y-8 p-6",children:[void 0,void 0,void 0].map((e,r)=>(0,t.jsxs)("div",{className:"bg-muted/30 p-4 rounded-2xl shadow-inner",children:[(0,t.jsx)(n.Skeleton,{className:"h-6 w-1/3 mb-4 rounded-xl bg-muted/50"}),(0,t.jsx)(n.Skeleton,{className:"h-64 w-full rounded-xl bg-muted/50"})]},r))})]});if(s)return(0,t.jsxs)(i.Alert,{variant:"destructive",className:"mt-4 shadow-md rounded-2xl",children:[(0,t.jsx)(h.Terminal,{className:"h-4 w-4"}),(0,t.jsx)(i.AlertTitle,{children:"Error Fetching Historical Trends"}),(0,t.jsx)(i.AlertDescription,{children:s})]});if(!e||0===e.length)return(0,t.jsxs)(l.Card,{className:"shadow-xl rounded-xl backdrop-blur-md bg-card/80 border-border/50",children:[(0,t.jsx)(l.CardHeader,{children:(0,t.jsxs)(l.CardTitle,{className:"flex items-center text-2xl font-headline text-primary",children:[(0,t.jsx)(tw,{className:"h-7 w-7 mr-2"}),"Historical Trend Analysis"]})}),(0,t.jsx)(l.CardContent,{className:"p-6",children:(0,t.jsxs)(i.Alert,{className:"rounded-2xl border-primary/30 bg-primary/5 text-primary",children:[(0,t.jsx)(C.Info,{className:"h-5 w-5 text-primary/80"}),(0,t.jsx)(i.AlertTitle,{className:"font-semibold",children:"No Historical Data"}),(0,t.jsx)(i.AlertDescription,{children:"No historical trend data available. Ensure 'trend-*.json' files exist in 'pulse-report/history/' and are correctly formatted."})]})})]});let y=f.some(e=>"number"==typeof e.workerCount&&e.workerCount>0);return(0,t.jsxs)(l.Card,{className:"shadow-xl rounded-xl backdrop-blur-md bg-card/80 border-border/50",children:[(0,t.jsx)(l.CardHeader,{children:(0,t.jsxs)(l.CardTitle,{className:"text-2xl font-headline text-primary flex items-center",children:[(0,t.jsx)(tw,{className:"h-7 w-7 mr-2"}),"Historical Trend Analysis"]})}),(0,t.jsxs)(l.CardContent,{className:"space-y-10 p-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)("h4",{className:"text-xl font-semibold text-foreground",children:"Test Outcomes Over Time"})}),(0,t.jsx)("div",{ref:d,className:"w-full h-[350px] bg-muted/30 p-4 rounded-2xl shadow-inner",children:(0,t.jsx)(eZ.ResponsiveContainer,{width:"100%",height:"100%",children:(0,t.jsxs)(eU.LineChart,{data:f,margin:{top:5,right:20,left:0,bottom:5},children:[(0,t.jsx)(eG.CartesianGrid,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),(0,t.jsx)(eW.XAxis,{dataKey:"date",stroke:"hsl(var(--muted-foreground))",tick:{fontSize:12}}),(0,t.jsx)(eq.YAxis,{stroke:"hsl(var(--muted-foreground))",tick:{fontSize:12}}),(0,t.jsx)(eX.Tooltip,{content:(0,t.jsx)(tk,{}),cursor:{fill:"hsl(var(--muted))",fillOpacity:.2}}),(0,t.jsx)(eY.Legend,{wrapperStyle:{fontSize:"12px",paddingTop:"10px"}}),(0,t.jsx)(eV.Line,{type:"monotone",dataKey:"totalTests",name:"Total Tests",stroke:"hsl(var(--chart-2))",strokeWidth:2,dot:{r:3},activeDot:{r:6}}),(0,t.jsx)(eV.Line,{type:"monotone",dataKey:"passed",name:"Passed",stroke:"hsl(var(--chart-3))",strokeWidth:2,dot:{r:3},activeDot:{r:6}}),(0,t.jsx)(eV.Line,{type:"monotone",dataKey:"failed",name:"Failed",stroke:"hsl(var(--chart-4))",strokeWidth:2,dot:{r:3},activeDot:{r:6}}),(0,t.jsx)(eV.Line,{type:"monotone",dataKey:"flaky",name:"Flaky",stroke:"hsl(var(--flaky))",strokeWidth:2,dot:{r:3},activeDot:{r:6}}),(0,t.jsx)(eV.Line,{type:"monotone",dataKey:"skipped",name:"Skipped",stroke:"hsl(var(--chart-5))",strokeWidth:2,dot:{r:3},activeDot:{r:6}})]})})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)("h4",{className:"text-xl font-semibold text-foreground",children:"Test Duration Over Time"})}),(0,t.jsx)("div",{ref:c,className:"w-full h-[350px] bg-muted/30 p-4 rounded-2xl shadow-inner",children:(0,t.jsx)(eZ.ResponsiveContainer,{width:"100%",height:"100%",children:(0,t.jsxs)(tj,{data:f,margin:{top:5,right:20,left:0,bottom:5},children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:"colorDuration",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"5%",stopColor:"#ff9800",stopOpacity:.4}),(0,t.jsx)("stop",{offset:"95%",stopColor:"#ff9800",stopOpacity:0})]})}),(0,t.jsx)(eG.CartesianGrid,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),(0,t.jsx)(eW.XAxis,{dataKey:"runLabel",stroke:"hsl(var(--muted-foreground))",tick:{fontSize:12}}),(0,t.jsx)(eq.YAxis,{stroke:"hsl(var(--muted-foreground))",tick:{fontSize:12},unit:"s",name:"Seconds"}),(0,t.jsx)(eX.Tooltip,{content:(0,t.jsx)(tC,{}),cursor:{stroke:"#ff9800",strokeWidth:1}}),(0,t.jsx)(eY.Legend,{wrapperStyle:{fontSize:"12px",paddingTop:"10px"}}),(0,t.jsx)(tb,{type:"monotone",dataKey:"durationSeconds",name:"Duration (s)",stroke:"#ff9800",fillOpacity:1,fill:"url(#colorDuration)",strokeWidth:2.5,dot:{r:4,fill:"#ff9800",stroke:"#fff",strokeWidth:2},activeDot:{r:6,fill:"#ff9800",stroke:"#fff",strokeWidth:2}})]})})})]}),x.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)("h4",{className:"text-xl font-semibold text-foreground",children:"Test Describe Duration"})}),(0,t.jsx)("div",{ref:u,className:"w-full h-[400px] bg-muted/30 p-4 rounded-2xl shadow-inner",children:(0,t.jsx)(eZ.ResponsiveContainer,{width:"100%",height:"100%",children:(0,t.jsxs)(eJ.BarChart,{data:x,margin:{top:5,right:20,left:0,bottom:5},children:[(0,t.jsx)(eG.CartesianGrid,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),(0,t.jsx)(eW.XAxis,{dataKey:"describe",hide:!0,tick:!1,axisLine:!1}),(0,t.jsx)(eq.YAxis,{stroke:"hsl(var(--muted-foreground))",tick:{fontSize:12},label:{value:"Total Duration (s)",angle:-90,position:"insideLeft",style:{textAnchor:"middle"}}}),(0,t.jsx)(eX.Tooltip,{content:({active:e,payload:r})=>{if(e&&r&&r.length){let e=r[0].payload;return(0,t.jsxs)("div",{className:"custom-recharts-tooltip",children:[(0,t.jsx)("p",{className:"label font-semibold",children:`Describe: ${e.describe}`}),(0,t.jsx)("p",{className:"text-xs",style:{opacity:.8},children:`File: ${e.file}`}),(0,t.jsx)("p",{className:"text-xs",style:{color:r[0].color},children:`Duration: ${e.durationSeconds}s`})]})}return null},cursor:{fill:"hsl(var(--muted))",fillOpacity:.2}}),(0,t.jsx)(eY.Legend,{wrapperStyle:{fontSize:"12px",paddingTop:"10px"}}),(0,t.jsx)(eQ.Bar,{dataKey:"durationSeconds",name:"Duration (s)",fill:"hsl(var(--accent))",radius:[4,4,0,0]})]})})})]}),g.series.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsx)("h4",{className:"text-xl font-semibold text-foreground",children:"Severity Distribution"})}),(0,t.jsx)("div",{ref:m,className:"w-full h-[400px] bg-muted/30 p-4 rounded-2xl shadow-inner",children:(0,t.jsx)(eZ.ResponsiveContainer,{width:"100%",height:"100%",children:(0,t.jsxs)(eJ.BarChart,{data:g.categories.map((e,t)=>{let r={severity:e};return g.series.forEach(e=>{r[e.name]=e.data[t]}),r}),margin:{top:5,right:20,left:0,bottom:5},children:[(0,t.jsx)(eG.CartesianGrid,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),(0,t.jsx)(eW.XAxis,{dataKey:"severity",stroke:"hsl(var(--muted-foreground))",tick:{fontSize:12}}),(0,t.jsx)(eq.YAxis,{stroke:"hsl(var(--muted-foreground))",tick:{fontSize:12},label:{value:"Test Count",angle:-90,position:"insideLeft",style:{textAnchor:"middle"}}}),(0,t.jsx)(eX.Tooltip,{content:({active:e,payload:r})=>{if(e&&r&&r.length){let e=r.filter(e=>e.value&&Number(e.value)>0);return 0===e.length?null:(0,t.jsxs)("div",{className:"custom-recharts-tooltip",children:[(0,t.jsx)("p",{className:"label font-semibold",children:`Severity: ${r[0].payload.severity}`}),e.map((e,r)=>(0,t.jsx)("p",{className:"text-xs",style:{color:e.color},children:`${e.name}: ${e.value}`},`item-${r}`)),(0,t.jsx)("p",{className:"text-xs font-semibold mt-1",children:`Total: ${e.reduce((e,t)=>e+(t.value||0),0)}`})]})}return null},cursor:{fill:"hsl(var(--muted))",fillOpacity:.2}}),(0,t.jsx)(eY.Legend,{wrapperStyle:{fontSize:"12px",paddingTop:"10px"}}),(0,t.jsx)(eQ.Bar,{dataKey:"Passed",stackId:"a",fill:"hsl(var(--chart-3))",radius:[0,0,0,0]}),(0,t.jsx)(eQ.Bar,{dataKey:"Failed",stackId:"a",fill:"hsl(var(--chart-4))",radius:[0,0,0,0]}),(0,t.jsx)(eQ.Bar,{dataKey:"Flaky",stackId:"a",fill:"hsl(var(--flaky))",radius:[0,0,0,0]}),(0,t.jsx)(eQ.Bar,{dataKey:"Skipped",stackId:"a",fill:"hsl(var(--chart-5))",radius:[4,4,0,0]})]})})})]}),y&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,t.jsxs)("h4",{className:"text-xl font-semibold text-foreground flex items-center",children:[(0,t.jsx)(tN.Users,{className:"h-5 w-5 mr-2 text-primary"})," Active Worker Count Over Time"]})}),(0,t.jsx)("div",{ref:p,className:"w-full h-[350px] bg-muted/30 p-4 rounded-2xl shadow-inner",children:(0,t.jsx)(eZ.ResponsiveContainer,{width:"100%",height:"100%",children:(0,t.jsxs)(eU.LineChart,{data:f.filter(e=>"number"==typeof e.workerCount),margin:{top:5,right:20,left:0,bottom:5},children:[(0,t.jsx)(eG.CartesianGrid,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),(0,t.jsx)(eW.XAxis,{dataKey:"date",stroke:"hsl(var(--muted-foreground))",tick:{fontSize:12}}),(0,t.jsx)(eq.YAxis,{stroke:"hsl(var(--muted-foreground))",tick:{fontSize:12},allowDecimals:!1,domain:["dataMin","dataMax"]}),(0,t.jsx)(eX.Tooltip,{content:(0,t.jsx)(tk,{}),cursor:{fill:"hsl(var(--muted))",fillOpacity:.2}}),(0,t.jsx)(eY.Legend,{wrapperStyle:{fontSize:"12px",paddingTop:"10px"}}),(0,t.jsx)(eV.Line,{type:"monotone",dataKey:"workerCount",name:"Active Workers",stroke:"hsl(var(--chart-info))",strokeWidth:2,dot:{r:3},activeDot:{r:6},connectNulls:!1})]})})}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-2",children:"Note: This chart shows the number of unique worker IDs detected in each historical run. Runs without worker information will not be plotted."})]})]})]})});tS.displayName="TrendAnalysis";var tA=e.i(95187);let tT=(0,tA.createServerReference)("0009e5f2f02111be8b23328e5713eb34687e624ccf",tA.callServer,void 0,tA.findSourceMapURL,"getFlakyTestsAnalysis"),tM=(0,o.default)("calendar-days",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]),tE=(0,o.default)("chart-bar-big",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["rect",{x:"7",y:"13",width:"9",height:"4",rx:"1",key:"1iip1u"}],["rect",{x:"7",y:"5",width:"12",height:"4",rx:"1",key:"1anskk"}]]);function tD({status:e}){let r={},a=(0,t.jsx)(m.Clock,{className:"h-3 w-3 mr-1"}),s=e;switch(e){case"passed":r={backgroundColor:"hsl(var(--chart-3) / 0.1)",color:"hsl(var(--chart-3))",borderColor:"hsl(var(--chart-3) / 0.3)"},a=(0,t.jsx)(d,{className:"h-3 w-3 mr-1",style:{color:"hsl(var(--chart-3))"}}),s="passed";break;case"failed":case"timedOut":r={backgroundColor:"hsl(var(--destructive) / 0.1)",color:"hsl(var(--destructive))",borderColor:"hsl(var(--destructive) / 0.3)"},a=(0,t.jsx)(c.XCircle,{className:"h-3 w-3 mr-1",style:{color:"hsl(var(--destructive))"}}),s="failed"===e?"failed":"timedOut";break;case"skipped":r={backgroundColor:"hsl(var(--accent) / 0.1)",color:"hsl(var(--accent))",borderColor:"hsl(var(--accent) / 0.3)"},a=(0,t.jsx)(u,{className:"h-3 w-3 mr-1",style:{color:"hsl(var(--accent))"}}),s="skipped";break;case"pending":r={backgroundColor:"hsl(var(--primary) / 0.1)",color:"hsl(var(--primary))",borderColor:"hsl(var(--primary) / 0.3)"},a=(0,t.jsx)(m.Clock,{className:"h-3 w-3 mr-1",style:{color:"hsl(var(--primary))"}}),s="pending";break;default:r={backgroundColor:"hsl(var(--muted) / 0.5)",color:"hsl(var(--muted-foreground))",borderColor:"hsl(var(--border))"}}return(0,t.jsxs)(H.Badge,{variant:"outline",className:"capitalize text-xs px-2 py-0.5 whitespace-nowrap border",style:r,children:[a,s]})}function tR(){let[e,a]=(0,r.useState)(null),[s,o]=(0,r.useState)(!0),[u,m]=(0,r.useState)(null);if((0,r.useEffect)(()=>{!async function(){o(!0),m(null);let e=await tT();e.success&&e.currentFlakyTests&&e.historicalFlakyTests?a({currentFlakyTests:e.currentFlakyTests,historicalFlakyTests:e.historicalFlakyTests}):m(e.error||"Failed to fetch flaky test analysis."),o(!1)}()},[]),s)return(0,t.jsx)("div",{className:"space-y-6 p-6 lg:p-8 bg-muted/20 backdrop-blur-md border border-border/40 rounded-[2.5rem] shadow-inner",children:(0,t.jsxs)(l.Card,{className:"shadow-xl",children:[(0,t.jsxs)(l.CardHeader,{children:[(0,t.jsx)(n.Skeleton,{className:"h-7 w-48 mb-1"}),(0,t.jsx)(n.Skeleton,{className:"h-4 w-3/4"})]}),(0,t.jsx)(l.CardContent,{className:"space-y-4",children:[void 0,void 0,void 0].map((e,r)=>(0,t.jsxs)("div",{className:"p-4 border rounded-2xl space-y-2",children:[(0,t.jsx)(n.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(n.Skeleton,{className:"h-4 w-1/2"}),(0,t.jsx)(n.Skeleton,{className:"h-4 w-1/3"})]},r))})]})});if(u)return(0,t.jsx)("div",{className:"space-y-6 p-6 lg:p-8 bg-muted/20 backdrop-blur-md border border-border/40 rounded-[2.5rem] shadow-inner",children:(0,t.jsxs)(i.Alert,{variant:"destructive",children:[(0,t.jsx)(h.Terminal,{className:"h-4 w-4"}),(0,t.jsx)(i.AlertTitle,{children:"Flaky Test Analysis Error"}),(0,t.jsx)(i.AlertDescription,{children:u})]})});let p=(e,r)=>0===e.length?(0,t.jsxs)(i.Alert,{className:"mt-4",children:[(0,t.jsx)(d,{className:"h-4 w-4"}),(0,t.jsx)(i.AlertTitle,{children:"No Flaky Tests"}),(0,t.jsx)(i.AlertDescription,{children:r})]}):(0,t.jsx)(B.Accordion,{type:"multiple",className:"w-full space-y-3 mt-4",children:e.map((e,r)=>(0,t.jsxs)(B.AccordionItem,{value:`flaky-${e.id}-${r}`,className:"border rounded-2xl bg-card hover:bg-muted/20 transition-colors",children:[(0,t.jsx)(B.AccordionTrigger,{className:"p-4 text-left hover:no-underline",children:(0,t.jsxs)("div",{className:"flex flex-col w-full",children:[(0,t.jsx)(K.default,{href:`/test/${e.id}`,className:"hover:underline text-base font-semibold text-primary",onClick:e=>e.stopPropagation(),children:(e=>{if(!e)return"Unknown Test";let t=e.split(" > ");return t[t.length-1]||e})(e.name)}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Suite: ",e.suiteName]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs mt-2 items-center",children:[(0,t.jsxs)(H.Badge,{variant:"outline",style:{borderColor:"hsl(var(--chart-3))",color:"hsl(var(--chart-3))"},children:[(0,t.jsx)(d,{className:"h-3 w-3 mr-1.5"})," ",e.passedCount," Passed"]}),(0,t.jsxs)(H.Badge,{variant:"outline",style:{borderColor:"hsl(var(--destructive))",color:"hsl(var(--destructive))"},children:[(0,t.jsx)(c.XCircle,{className:"h-3 w-3 mr-1.5"})," ",e.failedCount," Failed"]}),(0,t.jsxs)(H.Badge,{variant:"secondary",children:[(0,t.jsx)(tE,{className:"h-3 w-3 mr-1.5"})," ",e.totalRuns," Total Runs"]}),(0,t.jsxs)(H.Badge,{variant:"outline",className:"text-xs",children:[(0,t.jsx)(tM,{className:"h-3 w-3 mr-1.5"}),"Seen: ",new Date(e.firstSeen).toLocaleDateString()," - ",new Date(e.lastSeen).toLocaleDateString()]})]})]})}),(0,t.jsxs)(B.AccordionContent,{className:"p-4 pt-0",children:[(0,t.jsxs)("h4",{className:"text-sm font-semibold mb-2 text-foreground",children:["Run History (",e.occurrences.length,"):"]}),(0,t.jsx)("div",{className:"max-h-60 overflow-y-auto space-y-1.5 pr-2",children:e.occurrences.map((e,r)=>(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs p-1.5 bg-muted/30 rounded-xl",children:[(0,t.jsx)("span",{children:new Date(e.runTimestamp).toLocaleString()}),(0,t.jsx)(tD,{status:e.status})]},r))})]})]},e.id+r))});return(0,t.jsx)("div",{className:"space-y-6 p-6 lg:p-8 bg-muted/20 backdrop-blur-md border border-border/40 rounded-[2.5rem] shadow-inner",children:(0,t.jsxs)(l.Card,{className:"shadow-xl",children:[(0,t.jsxs)(l.CardHeader,{children:[(0,t.jsxs)(l.CardTitle,{className:"text-2xl font-headline text-primary flex items-center",children:[(0,t.jsx)(x,{className:"h-7 w-7 mr-2"}),"Flaky Test Analysis"]}),(0,t.jsx)(l.CardDescription,{children:"Analysis of tests that have shown inconsistent pass/fail behavior across current and historical runs."})]}),(0,t.jsx)(l.CardContent,{children:(0,t.jsxs)(P.Tabs,{defaultValue:"current",className:"w-full",children:[(0,t.jsxs)(P.TabsList,{className:"grid w-full grid-cols-2 bg-muted/50",children:[(0,t.jsxs)(P.TabsTrigger,{value:"current",className:"font-semibold",children:["Current Run (",e?.currentFlakyTests.length||0,")"]}),(0,t.jsxs)(P.TabsTrigger,{value:"historical",className:"font-semibold",children:["Historical Run (",e?.historicalFlakyTests.length||0,")"]})]}),(0,t.jsx)(P.TabsContent,{value:"current",children:p(e?.currentFlakyTests||[],"No tests were identified as flaky in the current run.")}),(0,t.jsx)(P.TabsContent,{value:"historical",children:p(e?.historicalFlakyTests||[],"No tests were identified as flaky based on historical pattern analysis.")})]})})]})})}var tP=e.i(81140),tO=e.i(20783),tL=e.i(30030),tF=e.i(69340),tI=e.i(99682),t_=e.i(35804),t$="Switch",[tz,tB]=(0,tL.createContextScope)(t$),[tH,tK]=tz(t$),tU=r.forwardRef((e,a)=>{let{__scopeSwitch:s,name:l,checked:n,defaultChecked:i,required:o,disabled:d,value:c="on",onCheckedChange:u,form:m,...h}=e,[p,f]=r.useState(null),x=(0,tO.useComposedRefs)(a,e=>f(e)),g=r.useRef(!1),y=!p||m||!!p.closest("form"),[b=!1,v]=(0,tF.useControllableState)({prop:n,defaultProp:i,onChange:u});return(0,t.jsxs)(tH,{scope:s,checked:b,disabled:d,children:[(0,t.jsx)(es.Primitive.button,{type:"button",role:"switch","aria-checked":b,"aria-required":o,"data-state":tG(b),"data-disabled":d?"":void 0,disabled:d,value:c,...h,ref:x,onClick:(0,tP.composeEventHandlers)(e.onClick,e=>{v(e=>!e),y&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})}),y&&(0,t.jsx)(tq,{control:p,bubbles:!g.current,name:l,value:c,checked:b,required:o,disabled:d,form:m,style:{transform:"translateX(-100%)"}})]})});tU.displayName=t$;var tV="SwitchThumb",tW=r.forwardRef((e,r)=>{let{__scopeSwitch:a,...s}=e,l=tK(tV,a);return(0,t.jsx)(es.Primitive.span,{"data-state":tG(l.checked),"data-disabled":l.disabled?"":void 0,...s,ref:r})});tW.displayName=tV;var tq=e=>{let{control:a,checked:s,bubbles:l=!0,...n}=e,i=r.useRef(null),o=(0,tI.usePrevious)(s),d=(0,t_.useSize)(a);return r.useEffect(()=>{let e=i.current,t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(o!==s&&t){let r=new Event("click",{bubbles:l});t.call(e,s),e.dispatchEvent(r)}},[o,s,l]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s,...n,tabIndex:-1,ref:i,style:{...e.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function tG(e){return e?"checked":"unchecked"}let tX=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(tU,{className:(0,G.cn)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...r,ref:a,children:(0,t.jsx)(tW,{className:(0,G.cn)("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));function tY(){let[e,a]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e,t=localStorage.getItem("pulse-theme");a(e=t?"dark"===t:document.documentElement.classList.contains("dark")),e&&!document.documentElement.classList.contains("dark")?document.documentElement.classList.add("dark"):!e&&document.documentElement.classList.contains("dark")&&document.documentElement.classList.remove("dark")},[]),(0,t.jsxs)(l.Card,{className:"shadow-xl",children:[(0,t.jsxs)(l.CardHeader,{children:[(0,t.jsx)(l.CardTitle,{className:"text-2xl font-headline text-primary",children:"Settings"}),(0,t.jsx)(l.CardDescription,{children:"Customize the appearance of the dashboard."})]}),(0,t.jsx)(l.CardContent,{children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border rounded-2xl bg-card/70 shadow-sm",children:[(0,t.jsx)(eo,{htmlFor:"theme-toggle",className:"text-base font-medium text-foreground",children:"Theme"}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:e?"Dark Mode":"Light Mode"}),(0,t.jsx)(tX,{id:"theme-toggle",checked:e,onCheckedChange:e=>{a(e),e?(document.documentElement.classList.add("dark"),localStorage.setItem("pulse-theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("pulse-theme","light"))},"aria-label":"Toggle theme"})]})]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-4 text-center text-base font-medium text-foreground",children:"Your theme preference is saved in your browser."}),(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border rounded-2xl bg-card/70 shadow-sm",children:[(0,t.jsx)("span",{children:"Learn more from Documentation Website: "}),(0,t.jsx)("a",{className:"text-l font-headline text-primary underline hover:text-primary-dark transition-colors",href:"https://arghajit47.github.io/playwright-pulse-dashboard/",target:"_blank",rel:"noopener noreferrer",children:"Pulse Dashboard"})]})]})})]})}tX.displayName=tU.displayName;let tZ=(0,o.default)("list-x",[["path",{d:"M16 5H3",key:"m91uny"}],["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 19H3",key:"zzsher"}],["path",{d:"m15.5 9.5 5 5",key:"ytk86i"}],["path",{d:"m20.5 9.5-5 5",key:"17o44f"}]]),tJ=(0,o.default)("search-slash",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),tQ=[{name:"Timeout Errors",keywords:["timeout","exceeded"],description:"Tests that failed due to exceeding a specified time limit for an operation."},{name:"Locator/Selector Errors",keywords:["locator","selector","getByRole","getByText","getByLabel","getByPlaceholder","element not found","no element found"],description:"Failures related to finding or interacting with UI elements on the page."},{name:"Assertion Errors",keywords:["expect(","expected","assertion failed"],description:"Tests where a specific condition or value did not meet the expected criteria."},{name:"Strict Mode Violations",keywords:["strict mode violation"],description:"Failures caused by Playwright's strict mode, often when a locator resolves to multiple elements."},{name:"Navigation Errors",keywords:["navigation failed","page.goto","frame.goto"],description:"Errors that occurred during page navigation actions."}],t0="Other Errors";function t1(e){if(!e)return"Unknown Test";let t=e.split(" > ");return t[t.length-1]||e}function t2(){let{currentRun:e,loadingCurrent:a,errorCurrent:o}=(0,s.useTestData)(),c=(0,r.useMemo)(()=>{if(!e?.results)return{categories:[],totalFailed:0};let t=e.results.filter(e=>"failed"===e.status||"timedOut"===e.status),r=new Map;t.forEach(e=>{r.has(e.name)||r.set(e.name,e)});let a=Array.from(r.values()),s=new Map;a.forEach(e=>{let t=(e.errorMessage||"Unknown error").replace(/\u001b\[[0-9;]*[mGKH]/g,"").toLowerCase(),r=!1;for(let a of tQ)if(a.keywords.some(e=>t.includes(e.toLowerCase()))){s.has(a.name)||s.set(a.name,{tests:[],exampleErrorMessages:[]}),s.get(a.name).tests.push(e),s.get(a.name).exampleErrorMessages.length<3&&s.get(a.name).exampleErrorMessages.push(e.errorMessage),r=!0;break}!r&&(s.has(t0)||s.set(t0,{tests:[],exampleErrorMessages:[]}),s.get(t0).tests.push(e),s.get(t0).exampleErrorMessages.length<3&&s.get(t0).exampleErrorMessages.push(e.errorMessage))});let l=[];return s.forEach((e,t)=>{l.push({categoryName:t,count:e.tests.length,tests:e.tests,exampleErrorMessages:e.exampleErrorMessages})}),l.sort((e,t)=>t.count-e.count),{categories:l,totalFailed:a.length}},[e]);if(a)return(0,t.jsx)("div",{className:"space-y-6 p-6 lg:p-8 bg-muted/20 backdrop-blur-md border border-border/40 rounded-[2.5rem] shadow-inner",children:[void 0,void 0,void 0].map((e,r)=>(0,t.jsxs)(l.Card,{className:"shadow-lg",children:[(0,t.jsxs)(l.CardHeader,{children:[(0,t.jsx)(n.Skeleton,{className:"h-7 w-1/2 mb-2"}),(0,t.jsx)(n.Skeleton,{className:"h-4 w-3/4"})]}),(0,t.jsxs)(l.CardContent,{children:[(0,t.jsx)(n.Skeleton,{className:"h-10 w-full"}),(0,t.jsx)(n.Skeleton,{className:"h-10 w-full mt-2"})]})]},r))});if(o)return(0,t.jsxs)(i.Alert,{variant:"destructive",className:"shadow-md",children:[(0,t.jsx)(h.Terminal,{className:"h-4 w-4"}),(0,t.jsx)(i.AlertTitle,{children:"Error Fetching Data"}),(0,t.jsx)(i.AlertDescription,{children:o})]});if(!e||!e.results)return(0,t.jsxs)(i.Alert,{className:"shadow-md",children:[(0,t.jsx)(C.Info,{className:"h-4 w-4"}),(0,t.jsx)(i.AlertTitle,{children:"No Data Available"}),(0,t.jsx)(i.AlertDescription,{children:"The current run report ('playwright-pulse-report.json') could not be loaded or is empty."})]});let u=c.totalFailed;return 0===u?(0,t.jsxs)(i.Alert,{variant:"default",className:"shadow-md border-green-500 bg-green-50 dark:bg-green-900/30",children:[(0,t.jsx)(d,{className:"h-5 w-5 text-green-600"}),(0,t.jsx)(i.AlertTitle,{className:"text-green-700 dark:text-green-400",children:"No Failures Found!"}),(0,t.jsx)(i.AlertDescription,{className:"text-green-600 dark:text-green-300",children:"Excellent! There are no failed or timed out tests in the current run report."})]}):0===c.categories.length&&u>0?(0,t.jsxs)(i.Alert,{className:"shadow-md",children:[(0,t.jsx)(tJ,{className:"h-4 w-4"}),(0,t.jsx)(i.AlertTitle,{children:"Failures Present, But Not Categorized"}),(0,t.jsxs)(i.AlertDescription,{children:["There are ",u,' failures in the current report, but they did not match any predefined categories. They might be listed under "Other Errors" if that category appears.']})]}):(0,t.jsxs)("div",{className:"space-y-6 p-6 lg:p-8 bg-muted/20 backdrop-blur-md border border-border/40 rounded-[2.5rem] shadow-inner",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-8",children:[(0,t.jsx)(l.Card,{className:"shadow-lg hover:shadow-2xl transition-all duration-300 rounded-xl border-0 bg-gradient-to-br from-destructive/10 via-card to-card/95",children:(0,t.jsx)(l.CardContent,{className:"p-6",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Total Failures"}),(0,t.jsx)("p",{className:"text-3xl font-bold text-destructive mt-2",children:u})]}),(0,t.jsx)(tZ,{className:"h-12 w-12 text-destructive opacity-20"})]})})}),(0,t.jsx)(l.Card,{className:"shadow-lg hover:shadow-2xl transition-all duration-300 rounded-xl border-0 bg-gradient-to-br from-primary/10 via-card to-card/95",children:(0,t.jsx)(l.CardContent,{className:"p-6",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Categories"}),(0,t.jsx)("p",{className:"text-3xl font-bold text-primary mt-2",children:c.categories.length})]}),(0,t.jsx)(h.Terminal,{className:"h-12 w-12 text-primary opacity-20"})]})})}),(0,t.jsx)(l.Card,{className:"shadow-lg hover:shadow-2xl transition-all duration-300 rounded-xl border-0 bg-gradient-to-br from-accent/10 via-card to-card/95",children:(0,t.jsx)(l.CardContent,{className:"p-6",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"Most Common"}),(0,t.jsx)("p",{className:"text-lg font-bold text-foreground mt-2 truncate",children:c.categories[0]?.categoryName||"N/A"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[c.categories[0]?.count||0," tests"]})]}),(0,t.jsx)(C.Info,{className:"h-12 w-12 text-accent opacity-20"})]})})})]}),c.categories.map((e,r)=>{let a=tQ.find(t=>t.name===e.categoryName),s=e.exampleErrorMessages[0],n=s?(0,G.ansiToHtml)(s.substring(0,150)):"",i=s&&s.length>150;return(0,t.jsxs)(l.Card,{className:"shadow-lg hover:shadow-2xl transition-all duration-300 rounded-xl border-0 bg-gradient-to-br from-card via-card to-card/95 group",children:[(0,t.jsxs)(l.CardHeader,{className:"border-b border-border/50 bg-muted/20",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"h-12 w-12 rounded-full bg-gradient-to-br from-destructive/20 to-destructive/10 flex items-center justify-center",children:(0,t.jsx)(tZ,{className:"h-6 w-6 text-destructive"})}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(l.CardTitle,{className:"text-xl font-semibold text-foreground group-hover:text-primary transition-colors flex items-center gap-2",children:[e.categoryName,(0,t.jsx)(H.Badge,{variant:"destructive",className:"text-xs font-semibold",children:e.count})]}),a?.description&&(0,t.jsx)(l.CardDescription,{className:"text-xs mt-1",children:a.description})]})]}),(0,t.jsxs)("div",{className:"text-right",children:[(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Category #",r+1]}),(0,t.jsxs)("p",{className:"text-sm font-semibold text-foreground",children:[(e.count/u*100).toFixed(1),"%"]})]})]}),e.categoryName===t0&&s&&(0,t.jsxs)("div",{className:"mt-3 p-3 rounded-2xl bg-muted/50 border border-border/30",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:"Example error snippet:"}),(0,t.jsxs)("p",{className:"text-xs text-foreground font-mono",children:[(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:n}}),i?"...":""]})]})]}),(0,t.jsx)(l.CardContent,{className:"pt-4",children:e.tests.length>0?(0,t.jsx)(B.Accordion,{type:"multiple",className:"w-full space-y-3",children:e.tests.map((r,a)=>(0,t.jsxs)(B.AccordionItem,{value:`${e.categoryName}-${r.id}-${a}`,className:"border border-border/50 rounded-2xl bg-card hover:bg-muted/30 transition-all duration-200 hover:shadow-md overflow-hidden",children:[(0,t.jsx)(B.AccordionTrigger,{className:"px-4 py-3 text-left hover:no-underline group/trigger",children:(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"h-2 w-2 rounded-full bg-destructive flex-shrink-0"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:"font-medium text-sm text-foreground group-hover/trigger:text-primary transition-colors truncate",title:t1(r.name),children:t1(r.name)}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",title:r.suiteName,children:["Suite: ",r.suiteName||"N/A"]})]})]})}),(0,t.jsx)(B.AccordionContent,{className:"px-4 pb-4 pt-2 bg-muted/10",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)(K.default,{href:`/test/${r.id}`,className:"inline-flex items-center gap-1 text-xs text-primary hover:underline font-medium",children:[(0,t.jsx)(q.ChevronRight,{className:"h-3 w-3"}),"View full test details"]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)(h.Terminal,{className:"h-3 w-3 text-destructive"}),(0,t.jsx)("h5",{className:"text-xs font-semibold text-foreground",children:"Error Message:"})]}),(0,t.jsx)(e$.ScrollArea,{className:"max-h-40 w-full rounded-2xl border border-border/30",children:(0,t.jsx)("pre",{className:"text-xs whitespace-pre-wrap break-words font-mono bg-muted/50 p-3",children:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,G.ansiToHtml)(r.errorMessage||"No error message captured.")}})})})]})]})})]},`${e.categoryName}-${r.id}-${a}`))}):(0,t.jsxs)("div",{className:"text-center py-8",children:[(0,t.jsx)(tJ,{className:"h-12 w-12 text-muted-foreground mx-auto mb-3 opacity-50"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No tests found in this category."})]})})]},e.categoryName)}),0===c.categories.length&&(0,t.jsxs)(i.Alert,{className:"shadow-lg rounded-xl border-0 bg-gradient-to-br from-muted/50 to-card",children:[(0,t.jsx)(tJ,{className:"h-5 w-5"}),(0,t.jsx)(i.AlertTitle,{className:"text-lg",children:"No Failures Categorized"}),(0,t.jsx)(i.AlertDescription,{children:"Could not categorize any failures based on the current rules."})]})]})}let t4=(0,o.default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var t3=e.i(78583);let t5=(0,o.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),t6=(0,o.default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);function t8(){let[e,a]=(0,r.useState)(null),[s,n]=(0,r.useState)({}),o=[{id:"attachment",name:"Generate Attachment Based Report",command:"npx generate-pulse-report",icon:t6,description:"Generates a comprehensive report with attachments including screenshots, videos, and traces.",outputFile:"playwright-pulse-report.html"},{id:"embedded",name:"Generate Embedded Single File Report",command:"npx generate-report",icon:t3.FileText,description:"Creates a self-contained HTML report with all assets embedded inline.",outputFile:"playwright-pulse-static-report.html"},{id:"email",name:"Generate Email Report",command:"npx generate-email-report",icon:t5,description:"Produces an email-optimized report format suitable for direct email distribution.",outputFile:"pulse-email-summary.html"}],d=async e=>{a(e.id),n(t=>({...t,[e.id]:null}));try{let t=await fetch("/api/run-command",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e.command})}),r=await t.json();t.ok&&r.success?n(t=>({...t,[e.id]:{success:!0,message:"Command executed successfully!"}})):n(t=>({...t,[e.id]:{success:!1,message:r.error||"Command execution failed"}}))}catch(t){n(t=>({...t,[e.id]:{success:!1,message:"Failed to execute command. Please try running it manually in your terminal."}}))}finally{a(null)}};return(0,t.jsxs)("div",{className:"space-y-6 p-6 lg:p-8 bg-muted/20 backdrop-blur-md border border-border/40 rounded-[2.5rem] shadow-inner",children:[(0,t.jsxs)(i.Alert,{children:[(0,t.jsx)(t3.FileText,{className:"h-4 w-4"}),(0,t.jsxs)(i.AlertDescription,{children:["These commands require ",(0,t.jsx)("strong",{children:"playwright-pulse-report"})," to be installed in your project. Run commands to generate different report formats from your test results."]})]}),(0,t.jsxs)(i.Alert,{children:[(0,t.jsx)(C.Info,{className:"h-4 w-4"}),(0,t.jsxs)(i.AlertDescription,{children:[(0,t.jsx)("strong",{children:"Note:"})," These report generation commands are only valid if the report directory is ",(0,t.jsx)("strong",{children:"'pulse-report'"}),", default report folder. Otherwise kindly use the CLI commands, for custom report directory."]})]}),(0,t.jsx)("div",{className:"grid gap-6 md:grid-cols-1 lg:grid-cols-1",children:o.map(r=>{let a=r.icon,n=s[r.id];return(0,t.jsxs)(l.Card,{className:"hover:shadow-lg transition-shadow",children:[(0,t.jsx)(l.CardHeader,{children:(0,t.jsx)("div",{className:"flex items-start justify-between",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"p-2 rounded-2xl bg-primary/10",children:(0,t.jsx)(a,{className:"h-6 w-6 text-primary"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(l.CardTitle,{className:"text-lg",children:r.name}),(0,t.jsx)(l.CardDescription,{className:"mt-1",children:r.description})]})]})})}),(0,t.jsx)(l.CardContent,{children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"bg-muted p-3 rounded-xl font-mono text-sm",children:(0,t.jsx)("code",{children:r.command})}),n&&(0,t.jsx)(i.Alert,{variant:n.success?"default":"destructive",children:(0,t.jsx)(i.AlertDescription,{children:n.message})}),(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsxs)(ed.Button,{onClick:()=>d(r),disabled:e===r.id,className:"flex-1",variant:"default",children:[(0,t.jsx)(t4,{className:"h-4 w-4 mr-2"}),e===r.id?"Running...":"Re-run"]}),(0,t.jsxs)(ed.Button,{onClick:()=>{let e,t;return e=window.location.origin,t=`${e}/api/reports/${r.outputFile}`,void window.open(t,"_blank","noopener,noreferrer")},variant:"outline",className:"flex-1",children:[(0,t.jsx)(W,{className:"h-4 w-4 mr-2"}),"View"]})]})]})})]},r.id)})})]})}var t7=e.i(91918);let t9=(0,o.default)("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);var re="horizontal",rt=["horizontal","vertical"],rr=r.forwardRef((e,r)=>{var a;let{decorative:s,orientation:l=re,...n}=e,i=(a=l,rt.includes(a))?l:re;return(0,t.jsx)(es.Primitive.div,{"data-orientation":i,...s?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"},...n,ref:r})});rr.displayName="Separator";let ra=r.forwardRef(({className:e,orientation:r="horizontal",decorative:a=!0,...s},l)=>(0,t.jsx)(rr,{ref:l,decorative:a,orientation:r,className:(0,G.cn)("shrink-0 bg-border","horizontal"===r?"h-[1px] w-full":"h-full w-[1px]",e),...s}));ra.displayName=rr.displayName;var rs=e.i(10772),rl=e.i(26330),rn=e.i(65491),ri=e.i(74606),ro=e.i(96626),rd=e.i(3536),rc=e.i(85369),ru=e.i(86312),rm="Dialog",[rh,rp]=(0,tL.createContextScope)(rm),[rf,rx]=rh(rm),rg=e=>{let{__scopeDialog:a,children:s,open:l,defaultOpen:n,onOpenChange:i,modal:o=!0}=e,d=r.useRef(null),c=r.useRef(null),[u=!1,m]=(0,tF.useControllableState)({prop:l,defaultProp:n,onChange:i});return(0,t.jsx)(rf,{scope:a,triggerRef:d,contentRef:c,contentId:(0,rs.useId)(),titleId:(0,rs.useId)(),descriptionId:(0,rs.useId)(),open:u,onOpenChange:m,onOpenToggle:r.useCallback(()=>m(e=>!e),[m]),modal:o,children:s})};rg.displayName=rm;var ry="DialogTrigger";r.forwardRef((e,r)=>{let{__scopeDialog:a,...s}=e,l=rx(ry,a),n=(0,tO.useComposedRefs)(r,l.triggerRef);return(0,t.jsx)(es.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":rI(l.open),...s,ref:n,onClick:(0,tP.composeEventHandlers)(e.onClick,l.onOpenToggle)})}).displayName=ry;var rb="DialogPortal",[rv,rj]=rh(rb,{forceMount:void 0}),rw=e=>{let{__scopeDialog:a,forceMount:s,children:l,container:n}=e,i=rx(rb,a);return(0,t.jsx)(rv,{scope:a,forceMount:s,children:r.Children.map(l,e=>(0,t.jsx)(ro.Presence,{present:s||i.open,children:(0,t.jsx)(ri.Portal,{asChild:!0,container:n,children:e})}))})};rw.displayName=rb;var rN="DialogOverlay",rk=r.forwardRef((e,r)=>{let a=rj(rN,e.__scopeDialog),{forceMount:s=a.forceMount,...l}=e,n=rx(rN,e.__scopeDialog);return n.modal?(0,t.jsx)(ro.Presence,{present:s||n.open,children:(0,t.jsx)(rC,{...l,ref:r})}):null});rk.displayName=rN;var rC=r.forwardRef((e,r)=>{let{__scopeDialog:a,...s}=e,l=rx(rN,a);return(0,t.jsx)(rc.RemoveScroll,{as:t7.Slot,allowPinchZoom:!0,shards:[l.contentRef],children:(0,t.jsx)(es.Primitive.div,{"data-state":rI(l.open),...s,ref:r,style:{pointerEvents:"auto",...s.style}})})}),rS="DialogContent",rA=r.forwardRef((e,r)=>{let a=rj(rS,e.__scopeDialog),{forceMount:s=a.forceMount,...l}=e,n=rx(rS,e.__scopeDialog);return(0,t.jsx)(ro.Presence,{present:s||n.open,children:n.modal?(0,t.jsx)(rT,{...l,ref:r}):(0,t.jsx)(rM,{...l,ref:r})})});rA.displayName=rS;var rT=r.forwardRef((e,a)=>{let s=rx(rS,e.__scopeDialog),l=r.useRef(null),n=(0,tO.useComposedRefs)(a,s.contentRef,l);return r.useEffect(()=>{let e=l.current;if(e)return(0,ru.hideOthers)(e)},[]),(0,t.jsx)(rE,{...e,ref:n,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,tP.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:(0,tP.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,tP.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault())})}),rM=r.forwardRef((e,a)=>{let s=rx(rS,e.__scopeDialog),l=r.useRef(!1),n=r.useRef(!1);return(0,t.jsx)(rE,{...e,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(l.current||s.triggerRef.current?.focus(),t.preventDefault()),l.current=!1,n.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(l.current=!0,"pointerdown"===t.detail.originalEvent.type&&(n.current=!0));let r=t.target;s.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&n.current&&t.preventDefault()}})}),rE=r.forwardRef((e,a)=>{let{__scopeDialog:s,trapFocus:l,onOpenAutoFocus:n,onCloseAutoFocus:i,...o}=e,d=rx(rS,s),c=r.useRef(null),u=(0,tO.useComposedRefs)(a,c);return(0,rd.useFocusGuards)(),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(rn.FocusScope,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:n,onUnmountAutoFocus:i,children:(0,t.jsx)(rl.DismissableLayer,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":rI(d.open),...o,ref:u,onDismiss:()=>d.onOpenChange(!1)})}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(rB,{titleId:d.titleId}),(0,t.jsx)(rH,{contentRef:c,descriptionId:d.descriptionId})]})]})}),rD="DialogTitle",rR=r.forwardRef((e,r)=>{let{__scopeDialog:a,...s}=e,l=rx(rD,a);return(0,t.jsx)(es.Primitive.h2,{id:l.titleId,...s,ref:r})});rR.displayName=rD;var rP="DialogDescription",rO=r.forwardRef((e,r)=>{let{__scopeDialog:a,...s}=e,l=rx(rP,a);return(0,t.jsx)(es.Primitive.p,{id:l.descriptionId,...s,ref:r})});rO.displayName=rP;var rL="DialogClose",rF=r.forwardRef((e,r)=>{let{__scopeDialog:a,...s}=e,l=rx(rL,a);return(0,t.jsx)(es.Primitive.button,{type:"button",...s,ref:r,onClick:(0,tP.composeEventHandlers)(e.onClick,()=>l.onOpenChange(!1))})});function rI(e){return e?"open":"closed"}rF.displayName=rL;var r_="DialogTitleWarning",[r$,rz]=(0,tL.createContext)(r_,{contentName:rS,titleName:rD,docsSlug:"dialog"}),rB=({titleId:e})=>{let t=rz(r_),a=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
-
3
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
-
5
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return r.useEffect(()=>{e&&(document.getElementById(e)||console.error(a))},[a,e]),null},rH=({contentRef:e,descriptionId:t})=>{let a=rz("DialogDescriptionWarning"),s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${a.contentName}}.`;return r.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},rK=e.i(37727);let rU=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(rk,{className:(0,G.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r,ref:a}));rU.displayName=rk.displayName;let rV=(0,en.cva)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),rW=r.forwardRef(({side:e="right",className:r,children:a,...s},l)=>(0,t.jsxs)(rw,{children:[(0,t.jsx)(rU,{}),(0,t.jsxs)(rA,{ref:l,className:(0,G.cn)(rV({side:e}),r),...s,children:[a,(0,t.jsxs)(rF,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,t.jsx)(rK.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));rW.displayName=rA.displayName,r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(rR,{ref:a,className:(0,G.cn)("text-lg font-semibold text-foreground",e),...r})).displayName=rR.displayName,r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(rO,{ref:a,className:(0,G.cn)("text-sm text-muted-foreground",e),...r})).displayName=rO.displayName;var rq=e.i(46798);let rG=r.createContext(null);function rX(){let e=r.useContext(rG);if(!e)throw Error("useSidebar must be used within a SidebarProvider.");return e}let rY=r.forwardRef(({defaultOpen:e=!0,open:a,onOpenChange:s,className:l,style:n,children:i,...o},d)=>{let c=function(){let[e,t]=r.useState(void 0);return r.useEffect(()=>{let e=window.matchMedia("(max-width: 767px)"),r=()=>{t(window.innerWidth<768)};return e.addEventListener("change",r),t(window.innerWidth<768),()=>e.removeEventListener("change",r)},[]),!!e}(),[u,m]=r.useState(!1),[h,p]=r.useState(e),f=a??h,x=r.useCallback(e=>{let t="function"==typeof e?e(f):e;s?s(t):p(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[s,f]),g=r.useCallback(()=>c?m(e=>!e):x(e=>!e),[c,x,m]);r.useEffect(()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),g())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[g]);let y=f?"expanded":"collapsed",b=r.useMemo(()=>({state:y,open:f,setOpen:x,isMobile:c,openMobile:u,setOpenMobile:m,toggleSidebar:g}),[y,f,x,c,u,m,g]);return(0,t.jsx)(rG.Provider,{value:b,children:(0,t.jsx)(rq.TooltipProvider,{delayDuration:0,children:(0,t.jsx)("div",{style:{"--sidebar-width":"320px","--sidebar-width-icon":"3.5rem",...n},className:(0,G.cn)("group/sidebar-wrapper flex min-h-svh w-full",l),ref:d,...o,children:i})})})});rY.displayName="SidebarProvider";let rZ=r.forwardRef(({side:e="left",collapsible:r="icon",className:a,children:s,...l},n)=>{let{isMobile:i,state:o,openMobile:d,setOpenMobile:c}=rX();return i?(0,t.jsxs)(rg,{open:d,onOpenChange:c,children:[(0,t.jsx)(rU,{className:"bg-black/60 backdrop-blur-sm"}),(0,t.jsx)(rW,{"data-sidebar":"sidebar","data-mobile":"true",className:(0,G.cn)("w-[var(--sidebar-width)] p-0 text-[--color-text-primary] border-r-0","bg-[--glass-bg] backdrop-blur-[20px] saturate-180 border-r border-[--glass-border]"),style:{"--sidebar-width":"320px"},side:e,children:(0,t.jsx)("div",{className:"flex h-full w-full flex-col",children:s})})]}):(0,t.jsx)("aside",{ref:n,"data-sidebar":"sidebar","data-state":o,"data-collapsible":r,"data-side":e,className:(0,G.cn)("group hidden h-svh h-[100dvh] flex-shrink-0 flex-col md:flex sticky top-0","bg-[--glass-bg] backdrop-blur-[20px] saturate-180","border-[--glass-border]","left"===e?"border-r":"border-l","transition-all duration-300 ease-in-out","collapsed"===o?"w-[var(--sidebar-width-icon)]":"w-[var(--sidebar-width)]",a),...l,children:(0,t.jsx)("div",{className:"flex h-full w-full flex-col",children:s})})});rZ.displayName="Sidebar";let rJ=r.forwardRef(({className:e,onClick:r,...a},s)=>{let{toggleSidebar:l}=rX();return(0,t.jsxs)(ed.Button,{ref:s,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:(0,G.cn)("h-7 w-7 md:hidden",e),onClick:e=>{r?.(e),l()},...a,children:[(0,t.jsx)(t9,{}),(0,t.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});rJ.displayName="SidebarTrigger";let rQ=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("main",{ref:a,className:(0,G.cn)("relative flex min-h-svh flex-1 flex-col bg-background",e),...r}));rQ.displayName="SidebarInset";let r0=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,"data-sidebar":"header",className:(0,G.cn)("flex flex-col gap-4 p-6",e),...r}));r0.displayName="SidebarHeader";let r1=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,"data-sidebar":"content",className:(0,G.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-6","group-data-[collapsible=icon][data-state=collapsed]:p-2 group-data-[collapsible=icon][data-state=collapsed]:overflow-hidden",e),...r}));r1.displayName="SidebarContent";let r2=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("ul",{ref:a,"data-sidebar":"menu",className:(0,G.cn)("flex w-full min-w-0 flex-col gap-1",e),...r}));r2.displayName="SidebarMenu";let r4=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:(0,G.cn)("group/menu-item relative",e),...r}));r4.displayName="SidebarMenuItem";let r3=(0,en.cva)("peer/menu-button relative flex w-full items-center gap-4 overflow-hidden rounded-xl p-4 text-left text-[0.95rem] font-medium outline-none transition-all duration-300 ease-in-out disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"text-[--color-text-secondary] hover:text-[--color-primary] hover:bg-[--color-hover] hover:translate-x-1 hover:shadow-md data-[active=true]:bg-primary/10 data-[active=true]:text-primary data-[active=true]:font-semibold data-[active=true]:shadow-lg"}},defaultVariants:{variant:"default"}}),r5=r.forwardRef(({asChild:e=!1,isActive:r=!1,variant:a="default",tooltip:s,className:l,children:n,...i},o)=>{let d=e?t7.Slot:"button",{isMobile:c,state:u}=rX(),m=(0,t.jsxs)(d,{ref:o,"data-sidebar":"menu-button","data-active":r,className:(0,G.cn)(r3({variant:a}),"group-data-[collapsible=icon][data-state=collapsed]:size-12 group-data-[collapsible=icon][data-state=collapsed]:justify-center group-data-[collapsible=icon][data-state=collapsed]:p-0","group-data-[collapsible=icon][data-state=collapsed]:[&>span:last-child]:hidden",l),...i,children:[(0,t.jsx)("div",{className:(0,G.cn)("absolute top-0 left-[-100%] w-full h-full bg-gradient-to-r from-primary/10 to-transparent opacity-50 transition-all duration-400 ease-in-out","peer-hover/menu-button:left-0 peer-data-[active=true]/menu-button:left-0")}),n]});return s?("string"==typeof s&&(s={children:s}),(0,t.jsxs)(rq.Tooltip,{children:[(0,t.jsx)(rq.TooltipTrigger,{asChild:!0,children:m}),(0,t.jsx)(rq.TooltipContent,{side:"right",align:"center",className:(0,G.cn)("collapsed"!==u||c?"hidden":"block"),...s,children:s.children})]})):m});r5.displayName="SidebarMenuButton";let r6=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,"data-sidebar":"footer",className:(0,G.cn)("flex flex-col gap-2 p-6 mt-auto",e),...r}));r6.displayName="SidebarFooter";let r8=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(ra,{ref:a,"data-sidebar":"separator",className:(0,G.cn)("mx-2 w-auto bg-[--color-border]","group-data-[state=collapsed]:mx-auto group-data-[state=collapsed]:my-2 group-data-[state=collapsed]:h-auto group-data-[state=collapsed]:w-8/12",e),...r}));r8.displayName="SidebarSeparator",r.forwardRef(({className:e,...r},a)=>(0,t.jsx)("div",{ref:a,"data-sidebar":"group",className:(0,G.cn)("relative flex w-full min-w-0 flex-col",e),...r})).displayName="SidebarGroup",r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(er.Input,{ref:a,"data-sidebar":"input",className:(0,G.cn)("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-[--color-primary]",e),...r})).displayName="SidebarInput";let r7=(0,o.default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),r9=(0,o.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),ae=(0,o.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["PulseDashboard",0,function(){let e,{currentRun:l,historicalTrends:n,loadingCurrent:i,loadingHistorical:o,errorCurrent:d,errorHistorical:c}=(0,s.useTestData)(),[u,m]=(0,r.useState)("dashboard"),[p,f]=(0,r.useState)(void 0),[g,y]=(0,r.useState)("#7737BF");(0,r.useEffect)(()=>{"live-results"!==u&&p&&f(void 0)},[u,p]);let b=[{id:"dashboard",label:"Dashboard",icon:r7,description:"Real-time Playwright Test Execution Monitoring & Analysis Overview",labelColorVar:"--sidebar-tab-dashboard-color-hsl"},{id:"live-results",label:"Test Results",icon:ee,description:"Detailed view of the latest test run results with filters.",labelColorVar:"--sidebar-tab-results-color-hsl"},{id:"trend-analysis",label:"Trend Analysis",icon:tw,description:"Historical data visualization for test performance.",labelColorVar:"--sidebar-tab-trends-color-hsl"},{id:"flaky-tests",label:"Flaky Tests",icon:x,description:"Analysis of historically flaky tests.",labelColorVar:"--sidebar-tab-flaky-color-hsl"},{id:"failure-categorization",label:"Failure Categorization",icon:tZ,description:"Categorize and view common failure types.",labelColorVar:"--sidebar-tab-failures-color-hsl"},{id:"pulse-command",label:"Pulse Command",icon:h.Terminal,description:"Generate various report formats using playwright-pulse-report commands.",labelColorVar:"--sidebar-tab-command-color-hsl"},{id:"settings",label:"Settings",icon:r9,description:"Configure dashboard appearance and preferences.",labelColorVar:"--sidebar-tab-settings-color-hsl"}],v=b.find(e=>"settings"===e.id),j=b.filter(e=>"settings"!==e.id),w=b.find(e=>e.id===u);switch(u){case"dashboard":default:e=(0,t.jsx)(z,{currentRun:l,loading:i,error:d,onMetricClick:e=>{f(e),m("live-results")}});break;case"live-results":e=(0,t.jsx)(eK,{report:l,loading:i,error:d,initialFilter:p});break;case"trend-analysis":e=(0,t.jsx)(tS,{trends:n,loading:o,error:c,currentResults:l?.results});break;case"flaky-tests":e=(0,t.jsx)(tR,{});break;case"failure-categorization":e=(0,t.jsx)(t2,{});break;case"pulse-command":e=(0,t.jsx)(t8,{});break;case"settings":e=(0,t.jsx)(tY,{})}return(0,t.jsxs)(rY,{defaultOpen:!0,children:[(0,t.jsxs)(rZ,{collapsible:"icon",className:"border-r border-sidebar-border shadow-lg",children:[(0,t.jsxs)(r0,{className:"p-4 group-data-[collapsible=icon]:p-2 flex items-center justify-between group-data-[collapsible=icon]:justify-center border-b border-sidebar-border",children:[(0,t.jsxs)(K.default,{href:"/",className:"flex items-center",onClick:()=>m("dashboard"),children:[(0,t.jsx)(a.default,{src:"https://ocpaxmghzmfbuhxzxzae.supabase.co/storage/v1/object/public/images/pulse-report/playwright_pulse_icon.png",alt:"Pulse Dashboard Logo",width:120,height:30,style:{objectFit:"fill"},className:"transition-all duration-200","data-ai-hint":"pulse logo"}),(0,t.jsx)("span",{style:{marginLeft:"10px",color:"#489ef9",fontWeight:900},children:"PULSE DASHBOARD"})]}),(0,t.jsx)(rJ,{className:"md:hidden"})]}),(0,t.jsx)(r1,{children:(0,t.jsx)(r2,{children:j.map(e=>(0,t.jsx)(r4,{children:(0,t.jsxs)(r5,{onClick:()=>{m(e.id)},isActive:u===e.id,tooltip:{children:e.label,side:"right",align:"center"},children:[(0,t.jsx)(e.icon,{className:"h-5 w-5"}),(0,t.jsx)("span",{style:u===e.id?void 0:e.labelColorVar?{color:`hsl(var(${e.labelColorVar}))`}:void 0,children:e.label})]})},e.id))})}),(0,t.jsxs)(r6,{className:"p-2 mt-auto border-t border-sidebar-border",children:[v&&(0,t.jsx)(r2,{className:"group-data-[collapsible=icon]:py-2",children:(0,t.jsx)(r4,{children:(0,t.jsxs)(r5,{onClick:()=>{m(v.id)},isActive:u===v.id,tooltip:{children:v.label,side:"right",align:"center"},children:[(0,t.jsx)(v.icon,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"group-data-[collapsible=icon]:hidden",style:u===v.id?void 0:v.labelColorVar?{color:`hsl(var(${v.labelColorVar}))`}:void 0,children:v.label})]})})}),(0,t.jsxs)("div",{className:"pt-2 group-data-[collapsible=icon]:hidden",children:[(0,t.jsx)(r8,{className:"my-1 group-data-[collapsible=icon]:hidden"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-1.5 text-xs p-2",children:[(0,t.jsx)(ae,{className:"h-3.5 w-3.5 text-sidebar-foreground/70"}),(0,t.jsx)("span",{className:"font-medium text-sidebar-foreground",children:"Pulse"}),(0,t.jsx)("span",{className:"text-muted-foreground/80",children:"v1.1.0"})]})]})]})]}),(0,t.jsx)(rQ,{children:(0,t.jsxs)("div",{className:"container mx-auto p-6 md:p-8 space-y-6 min-h-screen flex flex-col rounded-[2rem] shadow-lg bg-background",children:[(0,t.jsxs)("header",{className:"mb-0",children:[(0,t.jsx)("h1",{className:"text-3xl font-bold font-headline text-primary tracking-tight",children:w?.label||"Pulse Dashboard"}),(0,t.jsx)("p",{className:"text-md text-muted-foreground mt-1",children:w?.description||"Real-time Playwright Test Execution Monitoring & Analysis Overview"}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground mt-2",children:["Latest Run Date:"," ",i?(0,t.jsx)("span",{className:"text-muted-foreground",children:"Loading..."}):l?.run?.timestamp?(0,t.jsx)("span",{className:"text-muted-foreground font-medium",children:new Date(l.run.timestamp).toLocaleString()}):d?(0,t.jsx)("span",{className:"text-destructive font-medium",children:"Error loading data"}):(0,t.jsx)("span",{className:"text-muted-foreground font-medium",children:"Not available"})]})]}),(0,t.jsx)("main",{className:"flex-grow mt-6",children:e}),(0,t.jsxs)("footer",{style:{padding:"0.5rem",textAlign:"center",fontFamily:"'Segoe UI', system-ui, sans-serif",marginTop:"auto"},className:"text-foreground",children:[(0,t.jsxs)("div",{style:{display:"inline-flex",alignItems:"center",gap:"0.5rem",fontSize:"0.9rem",fontWeight:600,letterSpacing:"0.5px"},children:[(0,t.jsx)("span",{children:"Created by"}),(0,t.jsx)("a",{href:"https://github.com/Arghajit47",target:"_blank",rel:"noopener noreferrer",style:{color:g,fontWeight:700,fontStyle:"italic",textDecoration:"none",transition:"all 0.2s ease"},onMouseOver:()=>y("#BF5C37"),onMouseOut:()=>y("#7737BF"),children:"Arghajit Singha"})]}),(0,t.jsx)("div",{style:{marginTop:"0.5rem",fontSize:"0.75rem"},className:"text-muted-foreground",children:"Crafted with precision"})]})]})})]})}],95923)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,77855,e=>{"use strict";var t,r=e.i(43476),n=e.i(74911),i=e.i(71645),s=e.i(74080);function o(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function a(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function l(...e){return t=>{let r=!1,n=e.map(e=>{let n=a(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():a(e[t],null)}}}}function u(...e){return i.useCallback(l(...e),e)}function d(e,t=[]){let n=[],s=()=>{let t=n.map(e=>i.createContext(e));return function(r){let n=r?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return s.scopeName=e,[function(t,s){let o=i.createContext(s),a=n.length;n=[...n,s];let l=t=>{let{scope:n,children:s,...l}=t,u=n?.[e]?.[a]||o,d=i.useMemo(()=>l,Object.values(l));return(0,r.jsx)(u.Provider,{value:d,children:s})};return l.displayName=t+"Provider",[l,function(r,n){let l=n?.[e]?.[a]||o,u=i.useContext(l);if(u)return u;if(void 0!==s)return s;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(s,...t)]}function c(e){var t;let n,s=(t=e,(n=i.forwardRef((e,t)=>{let{children:r,...n}=e;if(i.isValidElement(r)){var s;let e,o,a=(s=r,(o=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(o=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),u=function(e,t){let r={...t};for(let n in t){let i=e[n],s=t[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...e)=>{let t=s(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...s}:"className"===n&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==i.Fragment&&(u.ref=t?l(t,a):a),i.cloneElement(r,u)}return i.Children.count(r)>1?i.Children.only(null):null})).displayName=`${t}.SlotClone`,n),o=i.forwardRef((e,t)=>{let{children:n,...o}=e,a=i.Children.toArray(n),l=a.find(p);if(l){let e=l.props.children,n=a.map(t=>t!==l?t:i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null);return(0,r.jsx)(s,{...o,ref:t,children:i.isValidElement(e)?i.cloneElement(e,void 0,n):null})}return(0,r.jsx)(s,{...o,ref:t,children:n})});return o.displayName=`${e}.Slot`,o}"u">typeof window&&window.document&&window.document.createElement;var f=Symbol("radix.slottable");function p(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===f}var m=new WeakMap;function v(e,t){var r,n;let i,s,o;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let a=(r=e,n=t,i=r.length,(o=(s=h(n))>=0?s:i+s)<0||o>=i?-1:o);return -1===a?void 0:e[a]}function h(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],m.set(this,!0)}set(e,t){return m.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),s=this.#e.length,o=h(e),a=o>=0?o:s+o,l=a<0||a>=s?-1:a;if(l===this.size||i&&l===this.size-1||-1===l)return this.set(t,r),this;let u=this.size+ +!i;o<0&&a++;let d=[...this.#e],c=!1;for(let e=a;e<u;e++)if(a===e){let s=d[e];d[e]===t&&(s=d[e+1]),i&&this.delete(t),n=this.get(s),this.set(t,r)}else{c||d[e-1]!==t||(c=!0);let r=d[c?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=v(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=v(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return v(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}});var y=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=c(`Primitive.${t}`),s=i.forwardRef((e,i)=>{let{asChild:s,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,r.jsx)(s?n:t,{...o,ref:i})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function w(e,t){e&&s.flushSync(()=>e.dispatchEvent(t))}function x(e){let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}var g="dismissableLayer.update",E=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),b=i.forwardRef((e,n)=>{let{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:c,onDismiss:f,...p}=e,m=i.useContext(E),[v,h]=i.useState(null),w=v?.ownerDocument??globalThis?.document,[,b]=i.useState({}),R=u(n,e=>h(e)),C=Array.from(m.layers),[P]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),j=C.indexOf(P),k=v?C.indexOf(v):-1,S=m.layersWithOutsidePointerEventsDisabled.size>0,O=k>=j,L=function(e,t=globalThis?.document){let r=x(e),n=i.useRef(!1),s=i.useRef(()=>{});return i.useEffect(()=>{let e=e=>{if(e.target&&!n.current){let n=function(){N("dismissableLayer.pointerDownOutside",r,i,{discrete:!0})},i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",s.current),s.current=n,t.addEventListener("click",s.current,{once:!0})):n()}else t.removeEventListener("click",s.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{let t=e.target,r=[...m.branches].some(e=>e.contains(t));O&&!r&&(l?.(e),c?.(e),e.defaultPrevented||f?.())},w),A=function(e,t=globalThis?.document){let r=x(e),n=i.useRef(!1);return i.useEffect(()=>{let e=e=>{e.target&&!n.current&&N("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{let t=e.target;![...m.branches].some(e=>e.contains(t))&&(d?.(e),c?.(e),e.defaultPrevented||f?.())},w);return!function(e,t=globalThis?.document){let r=x(e);i.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{k===m.layers.size-1&&(a?.(e),!e.defaultPrevented&&f&&(e.preventDefault(),f()))},w),i.useEffect(()=>{if(v)return s&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(t=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(v)),m.layers.add(v),T(),()=>{s&&1===m.layersWithOutsidePointerEventsDisabled.size&&(w.body.style.pointerEvents=t)}},[v,w,s,m]),i.useEffect(()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),T())},[v,m]),i.useEffect(()=>{let e=()=>b({});return document.addEventListener(g,e),()=>document.removeEventListener(g,e)},[]),(0,r.jsx)(y.div,{...p,ref:R,style:{pointerEvents:S?O?"auto":"none":void 0,...e.style},onFocusCapture:o(e.onFocusCapture,A.onFocusCapture),onBlurCapture:o(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:o(e.onPointerDownCapture,L.onPointerDownCapture)})});b.displayName="DismissableLayer";var R=i.forwardRef((e,t)=>{let n=i.useContext(E),s=i.useRef(null),o=u(t,s);return i.useEffect(()=>{let e=s.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,r.jsx)(y.div,{...e,ref:o})});function T(){let e=new CustomEvent(g);document.dispatchEvent(e)}function N(e,t,r,{discrete:n}){let i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?w(i,s):i.dispatchEvent(s)}R.displayName="DismissableLayerBranch";var C=globalThis?.document?i.useLayoutEffect:()=>{},P=i.forwardRef((e,t)=>{let{container:n,...o}=e,[a,l]=i.useState(!1);C(()=>l(!0),[]);let u=n||a&&globalThis?.document?.body;return u?s.default.createPortal((0,r.jsx)(y.div,{...o,ref:t}),u):null});P.displayName="Portal";var j=e=>{var t;let r,n,{present:s,children:o}=e,a=function(e){var t,r;let[n,s]=i.useState(),o=i.useRef(null),a=i.useRef(e),l=i.useRef("none"),[u,d]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},i.useReducer((e,t)=>r[e][t]??e,t));return i.useEffect(()=>{let e=k(o.current);l.current="mounted"===u?e:"none"},[u]),C(()=>{let t=o.current,r=a.current;if(r!==e){let n=l.current,i=k(t);e?d("MOUNT"):"none"===i||t?.display==="none"?d("UNMOUNT"):r&&n!==i?d("ANIMATION_OUT"):d("UNMOUNT"),a.current=e}},[e,d]),C(()=>{if(n){let e,t=n.ownerDocument.defaultView??window,r=r=>{let i=k(o.current).includes(CSS.escape(r.animationName));if(r.target===n&&i&&(d("ANIMATION_END"),!a.current)){let r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},i=e=>{e.target===n&&(l.current=k(o.current))};return n.addEventListener("animationstart",i),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",i),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:i.useCallback(e=>{o.current=e?getComputedStyle(e):null,s(e)},[])}}(s),l="function"==typeof o?o({present:a.isPresent}):i.Children.only(o),d=u(a.ref,(t=l,(n=(r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof o||a.isPresent?i.cloneElement(l,{ref:d}):null};function k(e){return e?.animationName||"none"}j.displayName="Presence",e.i(83986);var S=i[" useInsertionEffect ".trim().toString()]||C;Symbol("RADIX:SYNC_STATE");var O=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),L=i.forwardRef((e,t)=>(0,r.jsx)(y.span,{...e,ref:t,style:{...O,...e.style}}));L.displayName="VisuallyHidden";var A="ToastProvider",[D,M,I]=function(e){let t=e+"CollectionProvider",[n,s]=d(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=e=>{let{scope:t,children:n}=e,s=i.default.useRef(null),a=i.default.useRef(new Map).current;return(0,r.jsx)(o,{scope:t,itemMap:a,collectionRef:s,children:n})};l.displayName=t;let f=e+"CollectionSlot",p=c(f),m=i.default.forwardRef((e,t)=>{let{scope:n,children:i}=e,s=u(t,a(f,n).collectionRef);return(0,r.jsx)(p,{ref:s,children:i})});m.displayName=f;let v=e+"CollectionItemSlot",h="data-radix-collection-item",y=c(v),w=i.default.forwardRef((e,t)=>{let{scope:n,children:s,...o}=e,l=i.default.useRef(null),d=u(t,l),c=a(v,n);return i.default.useEffect(()=>(c.itemMap.set(l,{ref:l,...o}),()=>void c.itemMap.delete(l))),(0,r.jsx)(y,{...{[h]:""},ref:d,children:s})});return w.displayName=v,[{Provider:l,Slot:m,ItemSlot:w},function(t){let r=a(e+"CollectionConsumer",t);return i.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},s]}("Toast"),[F,_]=d("Toast",[I]),[z,W]=F(A),$=e=>{let{__scopeToast:t,label:n="Notification",duration:s=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:l}=e,[u,d]=i.useState(null),[c,f]=i.useState(0),p=i.useRef(!1),m=i.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${A}\`. Expected non-empty \`string\`.`),(0,r.jsx)(D.Provider,{scope:t,children:(0,r.jsx)(z,{scope:t,label:n,duration:s,swipeDirection:o,swipeThreshold:a,toastCount:c,viewport:u,onViewportChange:d,onToastAdd:i.useCallback(()=>f(e=>e+1),[]),onToastRemove:i.useCallback(()=>f(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:m,children:l})})};$.displayName=A;var U="ToastViewport",K=["F8"],V="toast.viewportPause",B="toast.viewportResume",X=i.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:s=K,label:o="Notifications ({hotkey})",...a}=e,l=W(U,n),d=M(n),c=i.useRef(null),f=i.useRef(null),p=i.useRef(null),m=i.useRef(null),v=u(t,m,l.onViewportChange),h=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=l.toastCount>0;i.useEffect(()=>{let e=e=>{0!==s.length&&s.every(t=>e[t]||e.code===t)&&m.current?.focus()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s]),i.useEffect(()=>{let e=c.current,t=m.current;if(w&&e&&t){let r=()=>{if(!l.isClosePausedRef.current){let e=new CustomEvent(V);t.dispatchEvent(e),l.isClosePausedRef.current=!0}},n=()=>{if(l.isClosePausedRef.current){let e=new CustomEvent(B);t.dispatchEvent(e),l.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||n()},s=()=>{e.contains(document.activeElement)||n()};return e.addEventListener("focusin",r),e.addEventListener("focusout",i),e.addEventListener("pointermove",r),e.addEventListener("pointerleave",s),window.addEventListener("blur",r),window.addEventListener("focus",n),()=>{e.removeEventListener("focusin",r),e.removeEventListener("focusout",i),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",s),window.removeEventListener("blur",r),window.removeEventListener("focus",n)}}},[w,l.isClosePausedRef]);let x=i.useCallback(({tabbingDirection:e})=>{let t=d().map(t=>{let r=t.ref.current,n=[r,...function(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}(r)];return"forwards"===e?n:n.reverse()});return("forwards"===e?t.reverse():t).flat()},[d]);return i.useEffect(()=>{let e=m.current;if(e){let t=t=>{let r=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!r){let r=document.activeElement,n=t.shiftKey;if(t.target===e&&n)return void f.current?.focus();let i=x({tabbingDirection:n?"backwards":"forwards"}),s=i.findIndex(e=>e===r);ed(i.slice(s+1))?t.preventDefault():n?f.current?.focus():p.current?.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}},[d,x]),(0,r.jsxs)(R,{ref:c,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&(0,r.jsx)(H,{ref:f,onFocusFromOutsideViewport:()=>{ed(x({tabbingDirection:"forwards"}))}}),(0,r.jsx)(D.Slot,{scope:n,children:(0,r.jsx)(y.ol,{tabIndex:-1,...a,ref:v})}),w&&(0,r.jsx)(H,{ref:p,onFocusFromOutsideViewport:()=>{ed(x({tabbingDirection:"backwards"}))}})]})});X.displayName=U;var q="ToastFocusProxy",H=i.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:i,...s}=e,o=W(q,n);return(0,r.jsx)(L,{tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:e=>{let t=e.relatedTarget;o.viewport?.contains(t)||i()}})});H.displayName=q;var Y="Toast",Z=i.forwardRef((e,t)=>{let{forceMount:n,open:s,defaultOpen:a,onOpenChange:l,...u}=e,[d,c]=function({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[s,o,a]=function({defaultProp:e,onChange:t}){let[r,n]=i.useState(e),s=i.useRef(r),o=i.useRef(t);return S(()=>{o.current=t},[t]),i.useEffect(()=>{s.current!==r&&(o.current?.(r),s.current=r)},[r,s]),[r,n,o]}({defaultProp:t,onChange:r}),l=void 0!==e,u=l?e:s;{let t=i.useRef(void 0!==e);i.useEffect(()=>{let e=t.current;if(e!==l){let t=l?"controlled":"uncontrolled";console.warn(`${n} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,n])}return[u,i.useCallback(t=>{if(l){let r="function"==typeof t?t(e):t;r!==e&&a.current?.(r)}else o(t)},[l,e,o,a])]}({prop:s,defaultProp:a??!0,onChange:l,caller:Y});return(0,r.jsx)(j,{present:n||d,children:(0,r.jsx)(Q,{open:d,...u,ref:t,onClose:()=>c(!1),onPause:x(e.onPause),onResume:x(e.onResume),onSwipeStart:o(e.onSwipeStart,e=>{e.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:o(e.onSwipeMove,e=>{let{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${r}px`)}),onSwipeCancel:o(e.onSwipeCancel,e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:o(e.onSwipeEnd,e=>{let{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${r}px`),c(!1)})})})});Z.displayName=Y;var[G,J]=F(Y,{onClose(){}}),Q=i.forwardRef((e,t)=>{let{__scopeToast:n,type:a="foreground",duration:l,open:d,onClose:c,onEscapeKeyDown:f,onPause:p,onResume:m,onSwipeStart:v,onSwipeMove:h,onSwipeCancel:w,onSwipeEnd:g,...E}=e,R=W(Y,n),[T,N]=i.useState(null),C=u(t,e=>N(e)),P=i.useRef(null),j=i.useRef(null),k=l||R.duration,S=i.useRef(0),O=i.useRef(k),L=i.useRef(0),{onToastAdd:A,onToastRemove:M}=R,I=x(()=>{T?.contains(document.activeElement)&&R.viewport?.focus(),c()}),F=i.useCallback(e=>{e&&e!==1/0&&(window.clearTimeout(L.current),S.current=new Date().getTime(),L.current=window.setTimeout(I,e))},[I]);i.useEffect(()=>{let e=R.viewport;if(e){let t=()=>{F(O.current),m?.()},r=()=>{let e=new Date().getTime()-S.current;O.current=O.current-e,window.clearTimeout(L.current),p?.()};return e.addEventListener(V,r),e.addEventListener(B,t),()=>{e.removeEventListener(V,r),e.removeEventListener(B,t)}}},[R.viewport,k,p,m,F]),i.useEffect(()=>{d&&!R.isClosePausedRef.current&&F(k)},[d,k,R.isClosePausedRef,F]),i.useEffect(()=>(A(),()=>M()),[A,M]);let _=i.useMemo(()=>T?function e(t){let r=[];return Array.from(t.childNodes).forEach(t=>{var n;if(t.nodeType===t.TEXT_NODE&&t.textContent&&r.push(t.textContent),(n=t).nodeType===n.ELEMENT_NODE){let n=t.ariaHidden||t.hidden||"none"===t.style.display,i=""===t.dataset.radixToastAnnounceExclude;if(!n)if(i){let e=t.dataset.radixToastAnnounceAlt;e&&r.push(e)}else r.push(...e(t))}}),r}(T):null,[T]);return R.viewport?(0,r.jsxs)(r.Fragment,{children:[_&&(0,r.jsx)(ee,{__scopeToast:n,role:"status","aria-live":"foreground"===a?"assertive":"polite",children:_}),(0,r.jsx)(G,{scope:n,onClose:I,children:s.createPortal((0,r.jsx)(D.ItemSlot,{scope:n,children:(0,r.jsx)(b,{asChild:!0,onEscapeKeyDown:o(f,()=>{R.isFocusedToastEscapeKeyDownRef.current||I(),R.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,r.jsx)(y.li,{tabIndex:0,"data-state":d?"open":"closed","data-swipe-direction":R.swipeDirection,...E,ref:C,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:o(e.onKeyDown,e=>{"Escape"===e.key&&(f?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(R.isFocusedToastEscapeKeyDownRef.current=!0,I()))}),onPointerDown:o(e.onPointerDown,e=>{0===e.button&&(P.current={x:e.clientX,y:e.clientY})}),onPointerMove:o(e.onPointerMove,e=>{if(!P.current)return;let t=e.clientX-P.current.x,r=e.clientY-P.current.y,n=!!j.current,i=["left","right"].includes(R.swipeDirection),s=["left","up"].includes(R.swipeDirection)?Math.min:Math.max,o=i?s(0,t):0,a=i?0:s(0,r),l="touch"===e.pointerType?10:2,u={x:o,y:a},d={originalEvent:e,delta:u};n?(j.current=u,el("toast.swipeMove",h,d,{discrete:!1})):eu(u,R.swipeDirection,l)?(j.current=u,el("toast.swipeStart",v,d,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(r)>l)&&(P.current=null)}),onPointerUp:o(e.onPointerUp,e=>{let t=j.current,r=e.target;if(r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),j.current=null,P.current=null,t){let r=e.currentTarget,n={originalEvent:e,delta:t};eu(t,R.swipeDirection,R.swipeThreshold)?el("toast.swipeEnd",g,n,{discrete:!0}):el("toast.swipeCancel",w,n,{discrete:!0}),r.addEventListener("click",e=>e.preventDefault(),{once:!0})}})})})}),R.viewport)})]}):null}),ee=e=>{let{__scopeToast:t,children:n,...s}=e,o=W(Y,t),[a,l]=i.useState(!1),[u,d]=i.useState(!1);return function(e=()=>{}){let t=x(e);C(()=>{let e=0,r=0;return e=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(r)}},[t])}(()=>l(!0)),i.useEffect(()=>{let e=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(e)},[]),u?null:(0,r.jsx)(P,{asChild:!0,children:(0,r.jsx)(L,{...s,children:a&&(0,r.jsxs)(r.Fragment,{children:[o.label," ",n]})})})},et=i.forwardRef((e,t)=>{let{__scopeToast:n,...i}=e;return(0,r.jsx)(y.div,{...i,ref:t})});et.displayName="ToastTitle";var er=i.forwardRef((e,t)=>{let{__scopeToast:n,...i}=e;return(0,r.jsx)(y.div,{...i,ref:t})});er.displayName="ToastDescription";var en="ToastAction",ei=i.forwardRef((e,t)=>{let{altText:n,...i}=e;return n.trim()?(0,r.jsx)(ea,{altText:n,asChild:!0,children:(0,r.jsx)(eo,{...i,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${en}\`. Expected non-empty \`string\`.`),null)});ei.displayName=en;var es="ToastClose",eo=i.forwardRef((e,t)=>{let{__scopeToast:n,...i}=e,s=J(es,n);return(0,r.jsx)(ea,{asChild:!0,children:(0,r.jsx)(y.button,{type:"button",...i,ref:t,onClick:o(e.onClick,s.onClose)})})});eo.displayName=es;var ea=i.forwardRef((e,t)=>{let{__scopeToast:n,altText:i,...s}=e;return(0,r.jsx)(y.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...s,ref:t})});function el(e,t,r,{discrete:n}){let i=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?w(i,s):i.dispatchEvent(s)}var eu=(e,t,r=0)=>{let n=Math.abs(e.x),i=Math.abs(e.y),s=n>i;return"left"===t||"right"===t?s&&n>r:!s&&i>r};function ed(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}var ec=e.i(25913),ef=e.i(37727),ep=e.i(75157);let em=i.forwardRef(({className:e,...t},n)=>(0,r.jsx)(X,{ref:n,className:(0,ep.cn)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));em.displayName=X.displayName;let ev=(0,ec.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),eh=i.forwardRef(({className:e,variant:t,...n},i)=>(0,r.jsx)(Z,{ref:i,className:(0,ep.cn)(ev({variant:t}),e),...n}));eh.displayName=Z.displayName,i.forwardRef(({className:e,...t},n)=>(0,r.jsx)(ei,{ref:n,className:(0,ep.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t})).displayName=ei.displayName;let ey=i.forwardRef(({className:e,...t},n)=>(0,r.jsx)(eo,{ref:n,className:(0,ep.cn)("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,r.jsx)(ef.X,{className:"h-4 w-4"})}));ey.displayName=eo.displayName;let ew=i.forwardRef(({className:e,...t},n)=>(0,r.jsx)(et,{ref:n,className:(0,ep.cn)("text-sm font-semibold",e),...t}));ew.displayName=et.displayName;let ex=i.forwardRef(({className:e,...t},n)=>(0,r.jsx)(er,{ref:n,className:(0,ep.cn)("text-sm opacity-90",e),...t}));ex.displayName=er.displayName,e.s(["Toaster",0,function(){let{toasts:e}=(0,n.useToast)();return(0,r.jsxs)($,{children:[e.map(function({id:e,title:t,description:n,action:i,...s}){return(0,r.jsxs)(eh,{...s,children:[(0,r.jsxs)("div",{className:"grid gap-1",children:[t&&(0,r.jsx)(ew,{children:t}),n&&(0,r.jsx)(ex,{children:n})]}),i,(0,r.jsx)(ey,{})]},e)}),(0,r.jsx)(em,{})]})}],77855)}]);