@piwitests/server 0.24.0 → 0.25.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 (438) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{DbmGeOus.js → 5nOoVJzL.js} +1 -1
  3. package/.output/public/_nuxt/6DSY_93j.js +1 -0
  4. package/.output/public/_nuxt/7vRR5W2L.js +1 -0
  5. package/.output/public/_nuxt/{DM3bDZC6.js → 9Dtlg-K4.js} +1 -1
  6. package/.output/public/_nuxt/9Yziijlb.js +1 -0
  7. package/.output/public/_nuxt/{BakMHV79.js → B-onBCAB.js} +1 -1
  8. package/.output/public/_nuxt/B2bK5uNR.js +1 -0
  9. package/.output/public/_nuxt/{BkM2KXUo.js → B63B19Iv.js} +2 -2
  10. package/.output/public/_nuxt/{BFxvHlO9.js → B77w1Eib.js} +1 -1
  11. package/.output/public/_nuxt/{Drw8yQg6.js → BC5bqlfM.js} +1 -1
  12. package/.output/public/_nuxt/{CJ1rmnk4.js → BF5JDf9_.js} +1 -1
  13. package/.output/public/_nuxt/BFVrl1ss.js +1 -0
  14. package/.output/public/_nuxt/{CjtjQV60.js → BIHMeNW-.js} +1 -1
  15. package/.output/public/_nuxt/BKqOGcst.js +1 -0
  16. package/.output/public/_nuxt/{Bme1UkOl.js → BLqooxh5.js} +1 -1
  17. package/.output/public/_nuxt/{D0Kop4bS.js → BMfTUMYy.js} +1 -1
  18. package/.output/public/_nuxt/{V9p3z39z.js → BOrnSpTA.js} +1 -1
  19. package/.output/public/_nuxt/{DEvYVl9M.js → BPQNVV4M.js} +1 -1
  20. package/.output/public/_nuxt/{DuOH5jcQ.js → BSKLNgre.js} +1 -1
  21. package/.output/public/_nuxt/BTCWUyBX.js +1 -0
  22. package/.output/public/_nuxt/BUYmGTVP.js +1 -0
  23. package/.output/public/_nuxt/{CgkXEZMo.js → BWddBCom.js} +1 -1
  24. package/.output/public/_nuxt/{B33YjaHr.js → BYQ9lXQb.js} +1 -1
  25. package/.output/public/_nuxt/BYWQ47QQ.js +5 -0
  26. package/.output/public/_nuxt/{BvAfKk6C.js → BYnqoVCE.js} +1 -1
  27. package/.output/public/_nuxt/{-COcylA_.js → BaU2hm4B.js} +1 -1
  28. package/.output/public/_nuxt/{6Z_ZwH8I.js → BbXvpkBp.js} +1 -1
  29. package/.output/public/_nuxt/Bb_925DD.js +1 -0
  30. package/.output/public/_nuxt/BcHU1KNK.js +1 -0
  31. package/.output/public/_nuxt/BdUGUwvE.js +1 -0
  32. package/.output/public/_nuxt/{DPZBpFOX.js → BeQq85yJ.js} +2 -2
  33. package/.output/public/_nuxt/Bg8yOdSf.js +1 -0
  34. package/.output/public/_nuxt/BhzfJaPC.js +1 -0
  35. package/.output/public/_nuxt/{D1vqYZsL.js → Bkb-0yS0.js} +4 -4
  36. package/.output/public/_nuxt/BmweLu9g.js +2 -0
  37. package/.output/public/_nuxt/Boyv6hLW.js +1 -0
  38. package/.output/public/_nuxt/{BtSGUY-7.js → Bq4xEWLF.js} +4 -4
  39. package/.output/public/_nuxt/{CMuzkARi.js → BraJd4EA.js} +1 -1
  40. package/.output/public/_nuxt/BvXrhZ8k.js +1 -0
  41. package/.output/public/_nuxt/{B8H4XydJ.js → Bw4oIhct.js} +1 -1
  42. package/.output/public/_nuxt/BxSrScjV.js +1 -0
  43. package/.output/public/_nuxt/Byqt8JHG.js +1 -0
  44. package/.output/public/_nuxt/{C5TrTuWv.js → BzBaMPgu.js} +3 -3
  45. package/.output/public/_nuxt/{BKrWWV14.js → C1-8_6cB.js} +1 -1
  46. package/.output/public/_nuxt/{CjBktNrC.js → C7SG50jD.js} +1 -1
  47. package/.output/public/_nuxt/{BkxRbXIj.js → C8WgBDU1.js} +1 -1
  48. package/.output/public/_nuxt/C8uZoJVq.js +1 -0
  49. package/.output/public/_nuxt/{Bg93Rnts.js → CBQXv4bU.js} +2 -2
  50. package/.output/public/_nuxt/CDEmotIt.js +1 -0
  51. package/.output/public/_nuxt/CIBOv3Ge.js +2 -0
  52. package/.output/public/_nuxt/CO7j4p5r.js +1 -0
  53. package/.output/public/_nuxt/COMhp7lz.js +1 -0
  54. package/.output/public/_nuxt/{CsV7pmcT.js → CPiLUjjx.js} +1 -1
  55. package/.output/public/_nuxt/{D_y2VS8k.js → CTYlay1H.js} +1 -1
  56. package/.output/public/_nuxt/{VACXezo0.js → CVEk4D8I.js} +1 -1
  57. package/.output/public/_nuxt/{P5uOaRUZ.js → CbuK1HIv.js} +1 -1
  58. package/.output/public/_nuxt/{opyDpgSw.js → CdLqOMvN.js} +1 -1
  59. package/.output/public/_nuxt/CdM2qNYM.js +2 -0
  60. package/.output/public/_nuxt/Ch8sGLqE.js +1 -0
  61. package/.output/public/_nuxt/CkdznmkX.js +1 -0
  62. package/.output/public/_nuxt/{B1LUinhp.js → Cmuwgbf4.js} +1 -1
  63. package/.output/public/_nuxt/{Ce5_Tq63.js → CnRNwiuE.js} +1 -1
  64. package/.output/public/_nuxt/{Bp3FRuEm.js → CnsaoeEq.js} +1 -1
  65. package/.output/public/_nuxt/{BUnwEAjq.js → Cp0V2FeW.js} +1 -1
  66. package/.output/public/_nuxt/Cvw4EFTy.js +17 -0
  67. package/.output/public/_nuxt/CwDej2Lz.js +1 -0
  68. package/.output/public/_nuxt/D-wlhH6J.js +1 -0
  69. package/.output/public/_nuxt/D5Mhpp98.js +1 -0
  70. package/.output/public/_nuxt/{CDTeSrLO.js → D8ixf-ZR.js} +5 -5
  71. package/.output/public/_nuxt/{DMWfVJCj.js → DBvdRbTA.js} +2 -2
  72. package/.output/public/_nuxt/DDho3MJD.js +1 -0
  73. package/.output/public/_nuxt/DEGHW4pO.js +1 -0
  74. package/.output/public/_nuxt/{BoNKdx5o.js → DHSYRMJp.js} +1 -1
  75. package/.output/public/_nuxt/DH_LEqhd.js +2 -0
  76. package/.output/public/_nuxt/{BVLqydCr.js → DIqik40e.js} +1 -1
  77. package/.output/public/_nuxt/DLwuL-qR.js +1 -0
  78. package/.output/public/_nuxt/{CIpF9l75.js → DPDFGVb_.js} +2 -2
  79. package/.output/public/_nuxt/DRNHuVn4.js +2 -0
  80. package/.output/public/_nuxt/{DcR0Mmdl.js → DUtYU4Sb.js} +1 -1
  81. package/.output/public/_nuxt/{opwuUqHG.js → DWl73MJR.js} +1 -1
  82. package/.output/public/_nuxt/{BCGljaM0.js → DWz_bHNP.js} +1 -1
  83. package/.output/public/_nuxt/{DGq4A2Pd.js → D_SCB-z2.js} +1 -1
  84. package/.output/public/_nuxt/{DMAiMrNr.js → D_j436ND.js} +1 -1
  85. package/.output/public/_nuxt/DamzjN7l.js +1 -0
  86. package/.output/public/_nuxt/Db5xe__T.js +1 -0
  87. package/.output/public/_nuxt/{CpcrljrH.js → DcUBmKKE.js} +1 -1
  88. package/.output/public/_nuxt/DiP18sFE.js +1 -0
  89. package/.output/public/_nuxt/Die1200X.js +1 -0
  90. package/.output/public/_nuxt/{BN1zZw5b.js → DihSeDlY.js} +4 -4
  91. package/.output/public/_nuxt/{DzZpIs4W.js → DkGXOZRW.js} +1 -1
  92. package/.output/public/_nuxt/{C7fq_rHE.js → DnOtRv65.js} +1 -1
  93. package/.output/public/_nuxt/DnV-BkUA.js +1 -0
  94. package/.output/public/_nuxt/DpeRrg68.js +1 -0
  95. package/.output/public/_nuxt/Dq6_-84R.js +1 -0
  96. package/.output/public/_nuxt/DqKFKS1b.js +1 -0
  97. package/.output/public/_nuxt/DrbO0dl5.js +6 -0
  98. package/.output/public/_nuxt/{Qo6oszaF.js → Ds8_6Fzl.js} +1 -1
  99. package/.output/public/_nuxt/{BtbpLWDs.js → DvewDI9t.js} +1 -1
  100. package/.output/public/_nuxt/E26Y1NWH.js +1 -0
  101. package/.output/public/_nuxt/Hp-_W7z4.js +1 -0
  102. package/.output/public/_nuxt/OanUGF_v.js +1 -0
  103. package/.output/public/_nuxt/{CX_G-FHC.js → RSS6R9Te.js} +13 -13
  104. package/.output/public/_nuxt/{BmzxRbcg.js → VqLetC2g.js} +1 -1
  105. package/.output/public/_nuxt/WCZdf9Ln.js +1 -0
  106. package/.output/public/_nuxt/{DF6Mes5z.js → Yl6iqHwK.js} +4 -4
  107. package/.output/public/_nuxt/builds/latest.json +1 -1
  108. package/.output/public/_nuxt/builds/meta/03f2d81b-8c58-4ea8-9a9d-7553c8ca4af6.json +1 -0
  109. package/.output/public/_nuxt/{entry.DzPSf_u5.css → entry.DVKh2Fd6.css} +1 -1
  110. package/.output/public/_nuxt/iUf7K_JR.js +1 -0
  111. package/.output/public/_nuxt/{C8Paf_V1.js → kDEwM7SQ.js} +1 -1
  112. package/.output/public/_nuxt/{Bd8B-yeR.js → knaDbxMJ.js} +1 -1
  113. package/.output/public/_nuxt/lnpLc047.js +1 -0
  114. package/.output/public/_nuxt/{CD8ZzAFC.js → mhvG7mu8.js} +1 -1
  115. package/.output/public/_nuxt/{BgABj4Ty.js → qUaN2ZW8.js} +4 -4
  116. package/.output/public/_nuxt/qeqzb80l.js +1 -0
  117. package/.output/public/_nuxt/{Fsw2W4TA.js → uj92NYTx.js} +2 -2
  118. package/.output/public/_nuxt/vOZZ2cLi.js +1 -0
  119. package/.output/public/_nuxt/{CGHV0Y2d.js → zAFiz2Mg.js} +1 -1
  120. package/.output/public/demo/seed.version.json +2 -2
  121. package/.output/server/chunks/build/{Alert-He-UxEt6.mjs → Alert-BhTWQzM5.mjs} +2 -2
  122. package/.output/server/chunks/build/Alert-BhTWQzM5.mjs.map +1 -0
  123. package/.output/server/chunks/build/{Breadcrumb-DEP2dVCZ.mjs → Breadcrumb-BJnPB2AW.mjs} +3 -3
  124. package/.output/server/chunks/build/Breadcrumb-BJnPB2AW.mjs.map +1 -0
  125. package/.output/server/chunks/build/{BreadcrumbNav-y6nMDYcR.mjs → BreadcrumbNav-C6Cun6tF.mjs} +3 -3
  126. package/.output/server/chunks/build/BreadcrumbNav-C6Cun6tF.mjs.map +1 -0
  127. package/.output/server/chunks/build/{BrowserBadge-DIASU8Gf.mjs → BrowserBadge-T1KRMIXA.mjs} +4 -4
  128. package/.output/server/chunks/build/BrowserBadge-T1KRMIXA.mjs.map +1 -0
  129. package/.output/server/chunks/build/{ChartCard-ZTsCvItQ.mjs → ChartCard-D_asI_WF.mjs} +2 -2
  130. package/.output/server/chunks/build/ChartCard-D_asI_WF.mjs.map +1 -0
  131. package/.output/server/chunks/build/{ChartMarkerTooltip-u_1DUHh-.mjs → ChartMarkerTooltip-DscESDg7.mjs} +3 -3
  132. package/.output/server/chunks/build/ChartMarkerTooltip-DscESDg7.mjs.map +1 -0
  133. package/.output/server/chunks/build/{Checkbox-BisdHf8n.mjs → Checkbox-Y9ZiIRkJ.mjs} +6 -6
  134. package/.output/server/chunks/build/Checkbox-Y9ZiIRkJ.mjs.map +1 -0
  135. package/.output/server/chunks/build/{CodeBlock-B8BNtZAe.mjs → CodeBlock-Bnn_ps9O.mjs} +4 -4
  136. package/.output/server/chunks/build/CodeBlock-Bnn_ps9O.mjs.map +1 -0
  137. package/.output/server/chunks/build/{DashboardNavbar-D7-3zBUU.mjs → DashboardNavbar-D37dPEtR.mjs} +3 -3
  138. package/.output/server/chunks/build/DashboardNavbar-D37dPEtR.mjs.map +1 -0
  139. package/.output/server/chunks/build/{DashboardSidebarToggle-C3HdHvlE.mjs → DashboardSidebarToggle-DzwsZHVx.mjs} +2 -2
  140. package/.output/server/chunks/build/DashboardSidebarToggle-DzwsZHVx.mjs.map +1 -0
  141. package/.output/server/chunks/build/{DataLocationCard-CC2-lHiP.mjs → DataLocationCard-CUXgZQEs.mjs} +4 -4
  142. package/.output/server/chunks/build/DataLocationCard-CUXgZQEs.mjs.map +1 -0
  143. package/.output/server/chunks/build/{DesktopRunLocallyButton-iNzrDsEs.mjs → DesktopRunLocallyButton-BCmQklj6.mjs} +15 -76
  144. package/.output/server/chunks/build/DesktopRunLocallyButton-BCmQklj6.mjs.map +1 -0
  145. package/.output/server/chunks/build/{DiagnosisPanel-BVb2LgHu.mjs → DiagnosisPanel-haHS2azn.mjs} +7 -7
  146. package/.output/server/chunks/build/DiagnosisPanel-haHS2azn.mjs.map +1 -0
  147. package/.output/server/chunks/build/{DiagnosisResult-xVgZlfKK.mjs → DiagnosisResult-DqTIOelM.mjs} +10 -10
  148. package/.output/server/chunks/build/DiagnosisResult-DqTIOelM.mjs.map +1 -0
  149. package/.output/server/chunks/build/{DurationValue-UX9uajQJ.mjs → DurationValue-D6fQEi5S.mjs} +2 -2
  150. package/.output/server/chunks/build/DurationValue-D6fQEi5S.mjs.map +1 -0
  151. package/.output/server/chunks/build/{EmptyState-DC2q_7TD.mjs → EmptyState-C-mCzGhO.mjs} +2 -2
  152. package/.output/server/chunks/build/EmptyState-C-mCzGhO.mjs.map +1 -0
  153. package/.output/server/chunks/build/{EntityLinks-Dzn73fbq.mjs → EntityLinks-CRJQM9Vy.mjs} +3 -3
  154. package/.output/server/chunks/build/EntityLinks-CRJQM9Vy.mjs.map +1 -0
  155. package/.output/server/chunks/build/{EnvManagedBadge-C-agmABK.mjs → EnvManagedBadge-hyelwXrw.mjs} +4 -4
  156. package/.output/server/chunks/build/EnvManagedBadge-hyelwXrw.mjs.map +1 -0
  157. package/.output/server/chunks/build/{ErrorState-CktYyeEZ.mjs → ErrorState-9UPssp7w.mjs} +2 -2
  158. package/.output/server/chunks/build/ErrorState-9UPssp7w.mjs.map +1 -0
  159. package/.output/server/chunks/build/{FeatureUnavailable-DHFkwI7t.mjs → FeatureUnavailable-CDw3__eq.mjs} +3 -3
  160. package/.output/server/chunks/build/FeatureUnavailable-CDw3__eq.mjs.map +1 -0
  161. package/.output/server/chunks/build/{FormField-GYHKiSI6.mjs → FormField-8vSc-3mb.mjs} +2 -2
  162. package/.output/server/chunks/build/FormField-8vSc-3mb.mjs.map +1 -0
  163. package/.output/server/chunks/build/{GetStartedWizard-BpcGYsm2.mjs → GetStartedWizard-Dp_tjhry.mjs} +4 -4
  164. package/.output/server/chunks/build/GetStartedWizard-Dp_tjhry.mjs.map +1 -0
  165. package/.output/server/chunks/build/{HelpHint-plioHKA0.mjs → HelpHint-Bfyo3ar6.mjs} +4 -4
  166. package/.output/server/chunks/build/HelpHint-Bfyo3ar6.mjs.map +1 -0
  167. package/.output/server/chunks/build/{LoadingState-CwpfmI0W.mjs → LoadingState-CxfFwac9.mjs} +2 -2
  168. package/.output/server/chunks/build/LoadingState-CxfFwac9.mjs.map +1 -0
  169. package/.output/server/chunks/build/{MarkerBadge-Biz5--h2.mjs → MarkerBadge-DmubzeuF.mjs} +2 -2
  170. package/.output/server/chunks/build/MarkerBadge-DmubzeuF.mjs.map +1 -0
  171. package/.output/server/chunks/build/{MetaStripGroup-A0a72vt5.mjs → MetaStripGroup-C-cNBfC9.mjs} +6 -6
  172. package/.output/server/chunks/build/MetaStripGroup-C-cNBfC9.mjs.map +1 -0
  173. package/.output/server/chunks/build/{Modal-hKLvVFNp.mjs → Modal-DcNzjvnm.mjs} +2 -2
  174. package/.output/server/chunks/build/Modal-DcNzjvnm.mjs.map +1 -0
  175. package/.output/server/chunks/build/{NavbarActions-_YjrSUat.mjs → NavbarActions-VCHW0u67.mjs} +2 -2
  176. package/.output/server/chunks/build/NavbarActions-VCHW0u67.mjs.map +1 -0
  177. package/.output/server/chunks/build/{NavigationMenu-RfBOyS32.mjs → NavigationMenu-DG6V0R9Y.mjs} +4 -4
  178. package/.output/server/chunks/build/NavigationMenu-DG6V0R9Y.mjs.map +1 -0
  179. package/.output/server/chunks/build/{OpenInIdeLink-Jp6SzEtD.mjs → OpenInIdeLink-CLj2cTkc.mjs} +5 -5
  180. package/.output/server/chunks/build/{OpenInIdeLink-Jp6SzEtD.mjs.map → OpenInIdeLink-CLj2cTkc.mjs.map} +1 -1
  181. package/.output/server/chunks/build/{ProjectTestCasesTable-DxOTfhi4.mjs → ProjectTestCasesTable-BNd5Fn_G.mjs} +15 -15
  182. package/.output/server/chunks/build/{ProjectTestCasesTable-DxOTfhi4.mjs.map → ProjectTestCasesTable-BNd5Fn_G.mjs.map} +1 -1
  183. package/.output/server/chunks/build/{RovingFocusItem-BOSx1Z9Z.mjs → RovingFocusItem-DkZadRuK.mjs} +2 -2
  184. package/.output/server/chunks/build/RovingFocusItem-DkZadRuK.mjs.map +1 -0
  185. package/.output/server/chunks/build/{RunReports-nuLb-Nm3.mjs → RunReports-CnyGcU8K.mjs} +3 -3
  186. package/.output/server/chunks/build/RunReports-CnyGcU8K.mjs.map +1 -0
  187. package/.output/server/chunks/build/{RunStatusBadge-CvWmcFYM.mjs → RunStatusBadge-DTqX18X-.mjs} +3 -3
  188. package/.output/server/chunks/build/RunStatusBadge-DTqX18X-.mjs.map +1 -0
  189. package/.output/server/chunks/build/{SectionCard-DHAFvJxm.mjs → SectionCard-taTpPtua.mjs} +3 -3
  190. package/.output/server/chunks/build/SectionCard-taTpPtua.mjs.map +1 -0
  191. package/.output/server/chunks/build/{Select-CEyw7HGK.mjs → Select-BChKOOsc.mjs} +3 -3
  192. package/.output/server/chunks/build/Select-BChKOOsc.mjs.map +1 -0
  193. package/.output/server/chunks/build/{SelectMenu-C02Hs2_F.mjs → SelectMenu-DLkMyBsW.mjs} +4 -4
  194. package/.output/server/chunks/build/{SelectMenu-C02Hs2_F.mjs.map → SelectMenu-DLkMyBsW.mjs.map} +1 -1
  195. package/.output/server/chunks/build/{Separator-lrN70ODV.mjs → Separator-Dn-4PN3P.mjs} +2 -2
  196. package/.output/server/chunks/build/Separator-Dn-4PN3P.mjs.map +1 -0
  197. package/.output/server/chunks/build/{SettingsField-tRmytcEJ.mjs → SettingsField-BLO1C7uY.mjs} +6 -6
  198. package/.output/server/chunks/build/SettingsField-BLO1C7uY.mjs.map +1 -0
  199. package/.output/server/chunks/build/{Slideover-D6cRIqch.mjs → Slideover-BiDJaQrt.mjs} +3 -3
  200. package/.output/server/chunks/build/Slideover-BiDJaQrt.mjs.map +1 -0
  201. package/.output/server/chunks/build/{Switch-R2n82ncQ.mjs → Switch-Ca3fYrSH.mjs} +4 -4
  202. package/.output/server/chunks/build/Switch-Ca3fYrSH.mjs.map +1 -0
  203. package/.output/server/chunks/build/{Table-qZdnm9t2.mjs → Table-DQb34a0A.mjs} +2 -2
  204. package/.output/server/chunks/build/Table-DQb34a0A.mjs.map +1 -0
  205. package/.output/server/chunks/build/{Tabs-BDP7MWl4.mjs → Tabs-_ALhm_oG.mjs} +3 -3
  206. package/.output/server/chunks/build/Tabs-_ALhm_oG.mjs.map +1 -0
  207. package/.output/server/chunks/build/{TestCaseHistoryChart-CKDXQ2GI.mjs → TestCaseHistoryChart-D-TEUsZ8.mjs} +3 -3
  208. package/.output/server/chunks/build/TestCaseHistoryChart-D-TEUsZ8.mjs.map +1 -0
  209. package/.output/server/chunks/build/{TestMetaBadges-BlyKmfeP.mjs → TestMetaBadges-G2dAHnT-.mjs} +2 -2
  210. package/.output/server/chunks/build/TestMetaBadges-G2dAHnT-.mjs.map +1 -0
  211. package/.output/server/chunks/build/{TestStatusBar-CvsmKJ4D.mjs → TestStatusBar-CseETAdn.mjs} +2 -2
  212. package/.output/server/chunks/build/TestStatusBar-CseETAdn.mjs.map +1 -0
  213. package/.output/server/chunks/build/{Textarea-DpmpM-lN.mjs → Textarea-CXOoRq7y.mjs} +2 -2
  214. package/.output/server/chunks/build/Textarea-CXOoRq7y.mjs.map +1 -0
  215. package/.output/server/chunks/build/{Tooltip-BI3WQErw.mjs → Tooltip-trltUr5c.mjs} +2 -2
  216. package/.output/server/chunks/build/Tooltip-trltUr5c.mjs.map +1 -0
  217. package/.output/server/chunks/build/{VisuallyHiddenInput-D4E5aJCQ.mjs → VisuallyHiddenInput-CGURvg3N.mjs} +2 -2
  218. package/.output/server/chunks/build/VisuallyHiddenInput-CGURvg3N.mjs.map +1 -0
  219. package/.output/server/chunks/build/{_id_-w7YCSiiy.mjs → _id_-B-G4eG5U.mjs} +40 -40
  220. package/.output/server/chunks/build/{_id_-w7YCSiiy.mjs.map → _id_-B-G4eG5U.mjs.map} +1 -1
  221. package/.output/server/chunks/build/{_id_-T965GKYC.mjs → _id_-Cnzg8n21.mjs} +41 -38
  222. package/.output/server/chunks/build/_id_-Cnzg8n21.mjs.map +1 -0
  223. package/.output/server/chunks/build/{_id_-wiULjAVc.mjs → _id_-Dp_d6gT7.mjs} +62 -54
  224. package/.output/server/chunks/build/{_id_-wiULjAVc.mjs.map → _id_-Dp_d6gT7.mjs.map} +1 -1
  225. package/.output/server/chunks/build/{_id_-26komi8G.mjs → _id_-t2AWaYuK.mjs} +46 -46
  226. package/.output/server/chunks/build/{_id_-26komi8G.mjs.map → _id_-t2AWaYuK.mjs.map} +1 -1
  227. package/.output/server/chunks/build/{about-B3V_OEiu.mjs → about-BFsHkJwE.mjs} +8 -8
  228. package/.output/server/chunks/build/about-BFsHkJwE.mjs.map +1 -0
  229. package/.output/server/chunks/build/{account-DpBdYE46.mjs → account-CZAq8kVg.mjs} +8 -8
  230. package/.output/server/chunks/build/account-CZAq8kVg.mjs.map +1 -0
  231. package/.output/server/chunks/build/{ai-DYhpzbqp.mjs → ai-BGP3GcCR.mjs} +20 -20
  232. package/.output/server/chunks/build/{ai-DYhpzbqp.mjs.map → ai-BGP3GcCR.mjs.map} +1 -1
  233. package/.output/server/chunks/build/{analytics-CZJEU0an.mjs → analytics-CXl5OWV-.mjs} +25 -25
  234. package/.output/server/chunks/build/{analytics-CZJEU0an.mjs.map → analytics-CXl5OWV-.mjs.map} +1 -1
  235. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  236. package/.output/server/chunks/build/{default-CQa_bmAf.mjs → default-4ixAePum.mjs} +208 -76
  237. package/.output/server/chunks/build/default-4ixAePum.mjs.map +1 -0
  238. package/.output/server/chunks/build/{docs-C8bndVXg.mjs → docs-Cgsd01H9.mjs} +16 -16
  239. package/.output/server/chunks/build/{docs-C8bndVXg.mjs.map → docs-Cgsd01H9.mjs.map} +1 -1
  240. package/.output/server/chunks/build/{edit-BdfF9er2.mjs → edit-BEQ-ozj9.mjs} +436 -40
  241. package/.output/server/chunks/build/edit-BEQ-ozj9.mjs.map +1 -0
  242. package/.output/server/chunks/build/{fetch-tkz5_OA-.mjs → fetch-B5TVXZ1s.mjs} +2 -2
  243. package/.output/server/chunks/build/fetch-B5TVXZ1s.mjs.map +1 -0
  244. package/.output/server/chunks/build/{forgot-password-swZRcvXE.mjs → forgot-password-mqE1mpDI.mjs} +4 -4
  245. package/.output/server/chunks/build/forgot-password-mqE1mpDI.mjs.map +1 -0
  246. package/.output/server/chunks/build/{help-content-C876a9WD.mjs → help-content-Bc99BajS.mjs} +6 -1
  247. package/.output/server/chunks/build/help-content-Bc99BajS.mjs.map +1 -0
  248. package/.output/server/chunks/build/{import-B27Sv7h5.mjs → import-DqDDTcSc.mjs} +14 -14
  249. package/.output/server/chunks/build/import-DqDDTcSc.mjs.map +1 -0
  250. package/.output/server/chunks/build/{index-ID913tUa.mjs → index-Bpdj6TXV.mjs} +5 -5
  251. package/.output/server/chunks/build/index-Bpdj6TXV.mjs.map +1 -0
  252. package/.output/server/chunks/build/{index-Dq6nk6OB.mjs → index-DBFsIsjA.mjs} +180 -188
  253. package/.output/server/chunks/build/{index-Dq6nk6OB.mjs.map → index-DBFsIsjA.mjs.map} +1 -1
  254. package/.output/server/chunks/build/{index-C7m32bRI.mjs → index-DSufXCZq.mjs} +22 -18
  255. package/.output/server/chunks/build/index-DSufXCZq.mjs.map +1 -0
  256. package/.output/server/chunks/build/{index-BdZmxLtC.mjs → index-WXE60AXk.mjs} +24 -24
  257. package/.output/server/chunks/build/{index-BdZmxLtC.mjs.map → index-WXE60AXk.mjs.map} +1 -1
  258. package/.output/server/chunks/build/{index-ByWTzqF6.mjs → index-okKjrRhL.mjs} +15 -4
  259. package/.output/server/chunks/build/index-okKjrRhL.mjs.map +1 -0
  260. package/.output/server/chunks/build/{isValueEqualOrExist-D4lZ8uRY.mjs → isValueEqualOrExist-C-9DzL4K.mjs} +2 -2
  261. package/.output/server/chunks/build/isValueEqualOrExist-C-9DzL4K.mjs.map +1 -0
  262. package/.output/server/chunks/build/{login-hxCF06JT.mjs → login-eQ88UoBW.mjs} +6 -6
  263. package/.output/server/chunks/build/login-eQ88UoBW.mjs.map +1 -0
  264. package/.output/server/chunks/build/{mcp-BVW1llyW.mjs → mcp-frcSP2Zg.mjs} +13 -13
  265. package/.output/server/chunks/build/mcp-frcSP2Zg.mjs.map +1 -0
  266. package/.output/server/chunks/build/{notifications-Dn-evqXM.mjs → notifications-DAtRd5V6.mjs} +14 -14
  267. package/.output/server/chunks/build/notifications-DAtRd5V6.mjs.map +1 -0
  268. package/.output/server/chunks/build/{performance-CV8qm94u.mjs → performance-BcQzGXE7.mjs} +13 -13
  269. package/.output/server/chunks/build/performance-BcQzGXE7.mjs.map +1 -0
  270. package/.output/server/chunks/build/{pr-feedback-gKDz8LyA.mjs → pr-feedback-BHtgvegy.mjs} +11 -11
  271. package/.output/server/chunks/build/pr-feedback-BHtgvegy.mjs.map +1 -0
  272. package/.output/server/chunks/build/{reset-password-DtEISa1I.mjs → reset-password-DMHrp14-.mjs} +4 -4
  273. package/.output/server/chunks/build/reset-password-DMHrp14-.mjs.map +1 -0
  274. package/.output/server/chunks/build/server.mjs +32 -32
  275. package/.output/server/chunks/build/{settings-BJDnuLpc.mjs → settings-Bo5OETop.mjs} +11 -11
  276. package/.output/server/chunks/build/settings-Bo5OETop.mjs.map +1 -0
  277. package/.output/server/chunks/build/{settings-metadata-DnAK4Rzg.mjs → settings-metadata-BHbsWQ2g.mjs} +2 -2
  278. package/.output/server/chunks/build/settings-metadata-BHbsWQ2g.mjs.map +1 -0
  279. package/.output/server/chunks/build/{setup-BO9tXa_G.mjs → setup-DAXcxuNY.mjs} +18 -18
  280. package/.output/server/chunks/build/{setup-BO9tXa_G.mjs.map → setup-DAXcxuNY.mjs.map} +1 -1
  281. package/.output/server/chunks/build/{storage-zN92cA9q.mjs → storage-BPK0fVwx.mjs} +12 -12
  282. package/.output/server/chunks/build/storage-BPK0fVwx.mjs.map +1 -0
  283. package/.output/server/chunks/build/{tags-CJFnoyQc.mjs → tags-CoxErA5m.mjs} +8 -8
  284. package/.output/server/chunks/build/tags-CoxErA5m.mjs.map +1 -0
  285. package/.output/server/chunks/build/{test-cases-0Q6rT73d.mjs → test-cases-D8rn-0le.mjs} +27 -27
  286. package/.output/server/chunks/build/test-cases-D8rn-0le.mjs.map +1 -0
  287. package/.output/server/chunks/build/{test-functions-DVRJgiWo.mjs → test-functions-pWs9mhbJ.mjs} +12 -12
  288. package/.output/server/chunks/build/test-functions-pWs9mhbJ.mjs.map +1 -0
  289. package/.output/server/chunks/build/{useCopyRich-BM9GTjJi.mjs → useCopyRich-BqVfhnoH.mjs} +27 -16
  290. package/.output/server/chunks/build/{useCopyRich-BM9GTjJi.mjs.map → useCopyRich-BqVfhnoH.mjs.map} +1 -1
  291. package/.output/server/chunks/build/{useDesktopDownload-Dyf0fR47.mjs → useDesktopDownload-l80DQJ9e.mjs} +2 -2
  292. package/.output/server/chunks/build/useDesktopDownload-l80DQJ9e.mjs.map +1 -0
  293. package/.output/server/chunks/build/{useDesktopLocalRuns-k7Gw3Fv3.mjs → useDesktopLocalRuns-Dil3YzyU.mjs} +68 -6
  294. package/.output/server/chunks/build/useDesktopLocalRuns-Dil3YzyU.mjs.map +1 -0
  295. package/.output/server/chunks/build/{useDesktopProjectLink-WwLte59P.mjs → useDesktopProjectLink-BnIONB--.mjs} +21 -4
  296. package/.output/server/chunks/build/useDesktopProjectLink-BnIONB--.mjs.map +1 -0
  297. package/.output/server/chunks/build/{useFormControl-8skMOTIf.mjs → useFormControl-CXKztoWk.mjs} +2 -2
  298. package/.output/server/chunks/build/useFormControl-CXKztoWk.mjs.map +1 -0
  299. package/.output/server/chunks/build/{useOpenInIde-D74FmDNg.mjs → useOpenInIde-CbbYW3pd.mjs} +2 -2
  300. package/.output/server/chunks/build/useOpenInIde-CbbYW3pd.mjs.map +1 -0
  301. package/.output/server/chunks/build/{useSettingsNav-BLTHducV.mjs → useSettingsNav-C6NpD4Ab.mjs} +2 -2
  302. package/.output/server/chunks/build/useSettingsNav-C6NpD4Ab.mjs.map +1 -0
  303. package/.output/server/chunks/build/{users-C9bjOBde.mjs → users-C2MuCf5G.mjs} +9 -9
  304. package/.output/server/chunks/build/users-C2MuCf5G.mjs.map +1 -0
  305. package/.output/server/chunks/nitro/nitro.mjs +677 -670
  306. package/.output/server/package.json +1 -1
  307. package/package.json +1 -1
  308. package/.output/public/_nuxt/03FA4-rI.js +0 -1
  309. package/.output/public/_nuxt/5a7jHE9s.js +0 -1
  310. package/.output/public/_nuxt/7ZHq6PCI.js +0 -1
  311. package/.output/public/_nuxt/98sAB6Gu.js +0 -1
  312. package/.output/public/_nuxt/B--J7VNt.js +0 -1
  313. package/.output/public/_nuxt/B69RP95P.js +0 -1
  314. package/.output/public/_nuxt/B8Xm4_S_.js +0 -1
  315. package/.output/public/_nuxt/BBhrClA9.js +0 -1
  316. package/.output/public/_nuxt/BPXqL9vK.js +0 -1
  317. package/.output/public/_nuxt/BWMSVSNM.js +0 -1
  318. package/.output/public/_nuxt/B_r0xHVS.js +0 -1
  319. package/.output/public/_nuxt/BevElZaK.js +0 -1
  320. package/.output/public/_nuxt/BfA6lfg4.js +0 -1
  321. package/.output/public/_nuxt/BjaRappk.js +0 -1
  322. package/.output/public/_nuxt/Bn0jaRxI.js +0 -1
  323. package/.output/public/_nuxt/BrUBOQ0y.js +0 -1
  324. package/.output/public/_nuxt/BwEN1fJ1.js +0 -1
  325. package/.output/public/_nuxt/C-XjxjG5.js +0 -1
  326. package/.output/public/_nuxt/C3W_wyr9.js +0 -1
  327. package/.output/public/_nuxt/C7D5Wl7T.js +0 -1
  328. package/.output/public/_nuxt/COuZu9FO.js +0 -2
  329. package/.output/public/_nuxt/CX5Q0dZ8.js +0 -1
  330. package/.output/public/_nuxt/Cf4MFOuf.js +0 -1
  331. package/.output/public/_nuxt/Cq33x7yV.js +0 -1
  332. package/.output/public/_nuxt/Cu2Q4iPh.js +0 -1
  333. package/.output/public/_nuxt/CyLcEDg2.js +0 -2
  334. package/.output/public/_nuxt/D1Y43xM1.js +0 -2
  335. package/.output/public/_nuxt/D2rZosKf.js +0 -6
  336. package/.output/public/_nuxt/D7jpwkRG.js +0 -5
  337. package/.output/public/_nuxt/D8NAb7VE.js +0 -1
  338. package/.output/public/_nuxt/D8vguZKg.js +0 -17
  339. package/.output/public/_nuxt/DH5H1DJh.js +0 -1
  340. package/.output/public/_nuxt/DL8knjzi.js +0 -1
  341. package/.output/public/_nuxt/DMsm-RGQ.js +0 -1
  342. package/.output/public/_nuxt/DMtrFQqi.js +0 -2
  343. package/.output/public/_nuxt/DVEGfqtt.js +0 -2
  344. package/.output/public/_nuxt/DaNC-xl1.js +0 -1
  345. package/.output/public/_nuxt/DcLbz6DV.js +0 -1
  346. package/.output/public/_nuxt/DhYznn-U.js +0 -1
  347. package/.output/public/_nuxt/DhuRRlmK.js +0 -1
  348. package/.output/public/_nuxt/DuO5wfAC.js +0 -1
  349. package/.output/public/_nuxt/DvEsAuE9.js +0 -1
  350. package/.output/public/_nuxt/Dz6g_QJT.js +0 -1
  351. package/.output/public/_nuxt/DzzNS-K1.js +0 -1
  352. package/.output/public/_nuxt/LwoTUb-r.js +0 -1
  353. package/.output/public/_nuxt/OfPjZaky.js +0 -1
  354. package/.output/public/_nuxt/T5UuMUxA.js +0 -1
  355. package/.output/public/_nuxt/UY8pjaZA.js +0 -1
  356. package/.output/public/_nuxt/YmCeJkZ2.js +0 -1
  357. package/.output/public/_nuxt/builds/meta/70224ee0-4d1f-45d2-b380-2ecb18064bf1.json +0 -1
  358. package/.output/public/_nuxt/fXUwH_3d.js +0 -1
  359. package/.output/public/_nuxt/sVV8xB9f.js +0 -1
  360. package/.output/public/_nuxt/xa5UHCot.js +0 -1
  361. package/.output/server/chunks/build/Alert-He-UxEt6.mjs.map +0 -1
  362. package/.output/server/chunks/build/Breadcrumb-DEP2dVCZ.mjs.map +0 -1
  363. package/.output/server/chunks/build/BreadcrumbNav-y6nMDYcR.mjs.map +0 -1
  364. package/.output/server/chunks/build/BrowserBadge-DIASU8Gf.mjs.map +0 -1
  365. package/.output/server/chunks/build/ChartCard-ZTsCvItQ.mjs.map +0 -1
  366. package/.output/server/chunks/build/ChartMarkerTooltip-u_1DUHh-.mjs.map +0 -1
  367. package/.output/server/chunks/build/Checkbox-BisdHf8n.mjs.map +0 -1
  368. package/.output/server/chunks/build/CodeBlock-B8BNtZAe.mjs.map +0 -1
  369. package/.output/server/chunks/build/DashboardNavbar-D7-3zBUU.mjs.map +0 -1
  370. package/.output/server/chunks/build/DashboardSidebarToggle-C3HdHvlE.mjs.map +0 -1
  371. package/.output/server/chunks/build/DataLocationCard-CC2-lHiP.mjs.map +0 -1
  372. package/.output/server/chunks/build/DesktopRunLocallyButton-iNzrDsEs.mjs.map +0 -1
  373. package/.output/server/chunks/build/DiagnosisPanel-BVb2LgHu.mjs.map +0 -1
  374. package/.output/server/chunks/build/DiagnosisResult-xVgZlfKK.mjs.map +0 -1
  375. package/.output/server/chunks/build/DurationValue-UX9uajQJ.mjs.map +0 -1
  376. package/.output/server/chunks/build/EmptyState-DC2q_7TD.mjs.map +0 -1
  377. package/.output/server/chunks/build/EntityLinks-Dzn73fbq.mjs.map +0 -1
  378. package/.output/server/chunks/build/EnvManagedBadge-C-agmABK.mjs.map +0 -1
  379. package/.output/server/chunks/build/ErrorState-CktYyeEZ.mjs.map +0 -1
  380. package/.output/server/chunks/build/FeatureUnavailable-DHFkwI7t.mjs.map +0 -1
  381. package/.output/server/chunks/build/FormField-GYHKiSI6.mjs.map +0 -1
  382. package/.output/server/chunks/build/GetStartedWizard-BpcGYsm2.mjs.map +0 -1
  383. package/.output/server/chunks/build/HelpHint-plioHKA0.mjs.map +0 -1
  384. package/.output/server/chunks/build/LoadingState-CwpfmI0W.mjs.map +0 -1
  385. package/.output/server/chunks/build/MarkerBadge-Biz5--h2.mjs.map +0 -1
  386. package/.output/server/chunks/build/MetaStripGroup-A0a72vt5.mjs.map +0 -1
  387. package/.output/server/chunks/build/Modal-hKLvVFNp.mjs.map +0 -1
  388. package/.output/server/chunks/build/NavbarActions-_YjrSUat.mjs.map +0 -1
  389. package/.output/server/chunks/build/NavigationMenu-RfBOyS32.mjs.map +0 -1
  390. package/.output/server/chunks/build/RovingFocusItem-BOSx1Z9Z.mjs.map +0 -1
  391. package/.output/server/chunks/build/RunReports-nuLb-Nm3.mjs.map +0 -1
  392. package/.output/server/chunks/build/RunStatusBadge-CvWmcFYM.mjs.map +0 -1
  393. package/.output/server/chunks/build/SectionCard-DHAFvJxm.mjs.map +0 -1
  394. package/.output/server/chunks/build/Select-CEyw7HGK.mjs.map +0 -1
  395. package/.output/server/chunks/build/Separator-lrN70ODV.mjs.map +0 -1
  396. package/.output/server/chunks/build/SettingsField-tRmytcEJ.mjs.map +0 -1
  397. package/.output/server/chunks/build/Slideover-D6cRIqch.mjs.map +0 -1
  398. package/.output/server/chunks/build/Switch-R2n82ncQ.mjs.map +0 -1
  399. package/.output/server/chunks/build/Table-qZdnm9t2.mjs.map +0 -1
  400. package/.output/server/chunks/build/Tabs-BDP7MWl4.mjs.map +0 -1
  401. package/.output/server/chunks/build/TestCaseHistoryChart-CKDXQ2GI.mjs.map +0 -1
  402. package/.output/server/chunks/build/TestMetaBadges-BlyKmfeP.mjs.map +0 -1
  403. package/.output/server/chunks/build/TestStatusBar-CvsmKJ4D.mjs.map +0 -1
  404. package/.output/server/chunks/build/Textarea-DpmpM-lN.mjs.map +0 -1
  405. package/.output/server/chunks/build/Tooltip-BI3WQErw.mjs.map +0 -1
  406. package/.output/server/chunks/build/VisuallyHiddenInput-D4E5aJCQ.mjs.map +0 -1
  407. package/.output/server/chunks/build/_id_-T965GKYC.mjs.map +0 -1
  408. package/.output/server/chunks/build/about-B3V_OEiu.mjs.map +0 -1
  409. package/.output/server/chunks/build/account-DpBdYE46.mjs.map +0 -1
  410. package/.output/server/chunks/build/default-CQa_bmAf.mjs.map +0 -1
  411. package/.output/server/chunks/build/edit-BdfF9er2.mjs.map +0 -1
  412. package/.output/server/chunks/build/fetch-tkz5_OA-.mjs.map +0 -1
  413. package/.output/server/chunks/build/forgot-password-swZRcvXE.mjs.map +0 -1
  414. package/.output/server/chunks/build/help-content-C876a9WD.mjs.map +0 -1
  415. package/.output/server/chunks/build/import-B27Sv7h5.mjs.map +0 -1
  416. package/.output/server/chunks/build/index-ByWTzqF6.mjs.map +0 -1
  417. package/.output/server/chunks/build/index-C7m32bRI.mjs.map +0 -1
  418. package/.output/server/chunks/build/index-ID913tUa.mjs.map +0 -1
  419. package/.output/server/chunks/build/isValueEqualOrExist-D4lZ8uRY.mjs.map +0 -1
  420. package/.output/server/chunks/build/login-hxCF06JT.mjs.map +0 -1
  421. package/.output/server/chunks/build/mcp-BVW1llyW.mjs.map +0 -1
  422. package/.output/server/chunks/build/notifications-Dn-evqXM.mjs.map +0 -1
  423. package/.output/server/chunks/build/performance-CV8qm94u.mjs.map +0 -1
  424. package/.output/server/chunks/build/pr-feedback-gKDz8LyA.mjs.map +0 -1
  425. package/.output/server/chunks/build/reset-password-DtEISa1I.mjs.map +0 -1
  426. package/.output/server/chunks/build/settings-BJDnuLpc.mjs.map +0 -1
  427. package/.output/server/chunks/build/settings-metadata-DnAK4Rzg.mjs.map +0 -1
  428. package/.output/server/chunks/build/storage-zN92cA9q.mjs.map +0 -1
  429. package/.output/server/chunks/build/tags-CJFnoyQc.mjs.map +0 -1
  430. package/.output/server/chunks/build/test-cases-0Q6rT73d.mjs.map +0 -1
  431. package/.output/server/chunks/build/test-functions-DVRJgiWo.mjs.map +0 -1
  432. package/.output/server/chunks/build/useDesktopDownload-Dyf0fR47.mjs.map +0 -1
  433. package/.output/server/chunks/build/useDesktopLocalRuns-k7Gw3Fv3.mjs.map +0 -1
  434. package/.output/server/chunks/build/useDesktopProjectLink-WwLte59P.mjs.map +0 -1
  435. package/.output/server/chunks/build/useFormControl-8skMOTIf.mjs.map +0 -1
  436. package/.output/server/chunks/build/useOpenInIde-D74FmDNg.mjs.map +0 -1
  437. package/.output/server/chunks/build/useSettingsNav-BLTHducV.mjs.map +0 -1
  438. package/.output/server/chunks/build/users-C9bjOBde.mjs.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{ak as Z,ab as Q,v as a,r as q,d as ee,I as ue,a as W,o as b,e as T,f as i,g as d,h as s,j as te,k as f,b as t,c as E,t as C,l as U,F as K,_ as de,x as z,G as pe,m as me,J as fe,C as ve,aq as he,ar as ge}from"./BzBaMPgu.js";import{_ as be}from"./BSKLNgre.js";import{u as oe,R as le,L as X,b as _e,_ as ke,l as ye}from"./BFVrl1ss.js";import{_ as xe}from"./Db5xe__T.js";import{_ as we}from"./CnRNwiuE.js";import{_ as je}from"./Bg8yOdSf.js";import{_ as Re}from"./C8uZoJVq.js";import{_ as Ce}from"./Cmuwgbf4.js";import{_ as Se}from"./BbXvpkBp.js";import{u as ne}from"./vOZZ2cLi.js";import{a as Ie}from"./CDEmotIt.js";import{b as Le}from"./7vRR5W2L.js";function se(v,o){const c=a(()=>[...new Set(Q(o).map(k=>k.filePath).filter(Boolean))]),r=q([]),u=a(()=>c.value.length>0&&r.value.length===c.value.length);async function _(k){const j=Z(),y=Q(v);if(r.value=[],!(!j||!k||y==null||c.value.length===0))try{const L=await j.invoke("desktop_check_local_specs",{projectId:String(y),files:c.value});r.value=L?.missing??[]}catch{}}return{specFiles:c,missingSpecs:r,wrongFolder:u,checkSpecs:_}}function ae(v){const o=q(null),c=a(()=>!!o.value?.exists&&o.value.playwrightCli==null);async function r(){const u=Z(),_=Q(v);if(o.value=null,!(!u||_==null))try{o.value=await u.invoke("desktop_check_local_env",{projectId:String(_)})}catch{}}return{env:o,playwrightMissing:c,checkEnv:r}}const $e={class:"flex items-center gap-2 min-w-0"},Me={class:"space-y-4"},Pe={key:0,class:"space-y-3"},Ee={class:"text-sm text-muted"},Ue={class:"flex items-center justify-between gap-3"},Oe={class:"flex items-center gap-2 min-w-0 text-sm"},Ve={class:"text-xs break-all"},De={class:"grid grid-cols-2 gap-3"},Fe={class:"text-xs"},Ne={class:"text-xs"},Be={class:"text-xs"},Te={key:0},ze={class:"mt-1"},Ae={class:"space-y-1"},He={class:"flex items-center justify-end w-full gap-2"},qe=ee({__name:"DesktopRunLocallyModal",props:fe({projectId:{},projectLabel:{},cases:{}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:open"],setup(v){const o=v,c=ue(v,"open"),r=oe(),{link:u,busy:_,pickAndLink:k}=ne(()=>o.projectId),{missingSpecs:j,wrongFolder:y,checkSpecs:L}=se(()=>o.projectId,()=>o.cases),{playwrightMissing:G,checkEnv:A}=ae(()=>o.projectId),$=a(()=>!!u.value?.exists),p=a({get:()=>r.getProjectOptions(o.projectId),set:m=>r.saveProjectOptions(o.projectId,m)}),x=a({get:()=>p.value.mode,set:m=>p.value={...p.value,mode:m}}),F=a({get:()=>p.value.runMode,set:m=>p.value={...p.value,runMode:m}}),g=a({get:()=>p.value.trace,set:m=>p.value={...p.value,trace:m}}),O=a({get:()=>p.value.repeatEach,set:m=>p.value={...p.value,repeatEach:m}}),w=le,N=X;W([c,()=>u.value?.path,$],()=>{c.value&&(L($.value),A())});const M=a(()=>_e(o.cases,p.value)),J=a(()=>M.value.map(m=>m.display).join(`
2
+ `));function P(){r.startRun({projectId:o.projectId,projectLabel:o.projectLabel,cases:o.cases}),c.value=!1}return(m,e)=>{const S=de,V=me,B=xe,R=te,H=we,D=je,l=pe,n=Re,I=Ce,Y=Se;return b(),T(Y,{open:c.value,"onUpdate:open":e[6]||(e[6]=h=>c.value=h),ui:{content:"max-w-2xl"}},{header:i(()=>[d("div",$e,[s(S,{name:"i-lucide-monitor-play",class:"size-5 text-primary shrink-0"}),e[7]||(e[7]=d("h2",{class:"text-base font-semibold truncate"},"Run tests locally",-1)),s(V,{color:"neutral",variant:"subtle",size:"sm"},{default:i(()=>[f(C(v.cases.length)+" test"+C(v.cases.length===1?"":"s"),1)]),_:1})])]),body:i(()=>[d("div",Me,[t($)?(b(),E(K,{key:1},[d("div",Ue,[d("div",Oe,[s(S,{name:"i-lucide-folder-check",class:"size-4 text-success shrink-0"}),d("code",Ve,C(t(u)?.path),1)]),s(R,{size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-folder-search",loading:t(_),onClick:t(k)},{default:i(()=>[...e[9]||(e[9]=[f(" Change ",-1)])]),_:1},8,["loading","onClick"])]),d("div",De,[s(D,{label:"Select tests by",name:"mode"},{default:i(()=>[s(H,{modelValue:t(x),"onUpdate:modelValue":e[0]||(e[0]=h=>z(x)?x.value=h:null),items:t(w),class:"w-full"},null,8,["modelValue","items"])]),_:1}),s(D,{label:"Browser",name:"runMode"},{default:i(()=>[s(H,{modelValue:t(F),"onUpdate:modelValue":e[1]||(e[1]=h=>z(F)?F.value=h:null),items:t(N),class:"w-full"},null,8,["modelValue","items"])]),_:1}),s(D,{label:"Repeat each",name:"repeatEach",description:"Run every test N times — flake reproduction."},{default:i(()=>[s(l,{modelValue:t(O),"onUpdate:modelValue":e[2]||(e[2]=h=>z(O)?O.value=h:null),modelModifiers:{number:!0},type:"number",min:"1",max:"1000",class:"w-full"},null,8,["modelValue"])]),_:1}),s(D,{label:"Trace",name:"trace",description:"Force trace recording (--trace=on)."},{default:i(()=>[s(n,{modelValue:t(g),"onUpdate:modelValue":e[3]||(e[3]=h=>z(g)?g.value=h:null)},null,8,["modelValue"])]),_:1})]),t(G)?(b(),T(B,{key:0,color:"warning",variant:"soft",icon:"i-lucide-package-x",title:"No Playwright installation found"},{description:i(()=>[e[10]||(e[10]=f(" Neither ",-1)),d("code",Fe,C(t(u)?.path),1),e[11]||(e[11]=f(" nor its parents hold a ",-1)),e[12]||(e[12]=d("code",{class:"text-xs"},"node_modules",-1)),e[13]||(e[13]=f(" with Playwright. Run your package manager's install in the checkout first — the app executes that folder's own Playwright. ",-1))]),_:1})):U("",!0),t(j).length>0?(b(),T(B,{key:1,color:"warning",variant:"soft",icon:"i-lucide-file-question",title:t(y)?"None of these tests are in the linked folder":"Some tests are not in the linked folder"},{description:i(()=>[d("p",null,[e[14]||(e[14]=f(" Not found under ",-1)),d("code",Ne,C(t(u)?.path),1),e[15]||(e[15]=f(": ",-1)),d("code",Be,C(t(j)[0]),1),t(j).length>1?(b(),E("span",Te," and "+C(t(j).length-1)+" more",1)):U("",!0),e[16]||(e[16]=f(". ",-1))]),d("p",ze,[t(y)?(b(),E(K,{key:0},[f(" This project is probably linked to a different checkout than the one these tests come from. ")],64)):(b(),E(K,{key:1},[f(" Running anyway is fine when your Playwright config puts them elsewhere. ")],64))]),t(y)?(b(),T(R,{key:0,size:"xs",color:"warning",variant:"soft",icon:"i-lucide-folder-search",class:"mt-2",loading:t(_),onClick:t(k)},{default:i(()=>[...e[17]||(e[17]=[f(" Choose the right folder… ",-1)])]),_:1},8,["loading","onClick"])):U("",!0)]),_:1},8,["title"])):U("",!0),d("div",Ae,[e[18]||(e[18]=d("div",{class:"text-xs text-muted"},"Runs in the linked folder",-1)),s(I,{code:t(J),lang:"sh"},null,8,["code"])]),e[19]||(e[19]=d("p",{class:"text-xs text-muted"}," The run streams into the Local runs tray and keeps going while you browse. Results are reported by the folder's own Playwright config — with the Piwi reporter set up, the new run appears in this app automatically. ",-1))],64)):(b(),E("div",Pe,[d("p",Ee," Link "+C(v.projectLabel||"this project")+" to its local checkout — the folder that contains these tests. Piwi runs that folder's own Playwright with the app's bundled Node, so nothing else needs to be installed. ",1),t(u)&&!t(u).exists?(b(),T(B,{key:0,color:"warning",variant:"soft",icon:"i-lucide-folder-x",title:"The linked folder no longer exists",description:t(u).path},null,8,["description"])):U("",!0),s(R,{icon:"i-lucide-folder-plus",loading:t(_),onClick:t(k)},{default:i(()=>[...e[8]||(e[8]=[f("Choose folder…",-1)])]),_:1},8,["loading","onClick"])]))])]),footer:i(()=>[d("div",He,[s(R,{color:"neutral",variant:"ghost",onClick:e[4]||(e[4]=h=>c.value=!1)},{default:i(()=>[...e[20]||(e[20]=[f("Close",-1)])]),_:1}),s(R,{icon:"i-lucide-play",disabled:!t($)||t(M).length===0||t(_),onClick:e[5]||(e[5]=h=>P())},{default:i(()=>[...e[21]||(e[21]=[f("Run",-1)])]),_:1},8,["disabled"])])]),_:1},8,["open"])}}}),Ge=Object.assign(qe,{__name:"DesktopRunLocallyModal"}),Je={key:0,class:"inline-flex"},Ye={key:0,class:"absolute -top-1 -right-1 size-2 rounded-full bg-warning"},Ke=8e3,Qe=ee({__name:"DesktopRunLocallyButton",props:{projectId:{},projectLabel:{},cases:{},label:{},presetOptions:{}},setup(v){const o=v,c=q(!1);ve(()=>{c.value=!!Z()});const r=oe(),{link:u,busy:_,pickAndLink:k,refresh:j}=ne(()=>o.projectId),{missingSpecs:y,wrongFolder:L,checkSpecs:G}=se(()=>o.projectId,()=>o.cases),{playwrightMissing:A,checkEnv:$}=ae(()=>o.projectId),{copy:p}=Ie(),x=q(!1);W(x,l=>{l||j()});const F=a(()=>c.value&&o.projectId!=null&&o.cases.length>0),g=a(()=>!!u.value?.exists),O=a(()=>!g.value||L.value||A.value);W([c,()=>u.value?.path,g],()=>{c.value&&(G(g.value),$())});const w=a(()=>({...r.getProjectOptions(o.projectId??""),...o.presetOptions})),N=a(()=>r.latestForProject(o.projectId)),M=a(()=>N.value?.status==="running"),J=he({interval:1e3}),P=a(()=>{const l=N.value;return!l||!l.finishedAt||l.status!=="passed"&&l.status!=="failed"?null:J.value-l.finishedAt<Ke?l:null}),m=a(()=>`${o.cases.length} test${o.cases.length===1?"":"s"}`),e=a(()=>X.find(l=>l.value===w.value.runMode)?.label??"Headless"),S=a(()=>{const l=N.value;if(l&&M.value)return{label:ye(l),color:"info",icon:void 0,tooltip:"A local run is going — view its output"};if(P.value){const n=P.value.status==="passed";return{label:n?"Passed":P.value.exitCode!=null?`Failed (exit ${P.value.exitCode})`:"Failed",color:n?"success":"error",icon:n?"i-lucide-check":"i-lucide-x",tooltip:"View the run output"}}return g.value?{label:o.label??"Run locally",color:"warning",icon:"i-lucide-monitor-play",tooltip:`Run ${m.value} on this machine · ${e.value} · in ${u.value?.path}`}:{label:o.label??"Run locally",color:"warning",icon:"i-lucide-monitor-play",tooltip:"Link this project to its local checkout to run tests here"}});function V(l){o.projectId!=null&&r.startRun({projectId:o.projectId,projectLabel:o.projectLabel,cases:o.cases,options:{...o.presetOptions,...l},persistOptions:o.presetOptions?!1:void 0})}function B(){if(M.value||P.value){r.trayOpen.value=!0;return}if(O.value){x.value=!0;return}V()}function R(l){o.projectId!=null&&r.saveProjectOptions(o.projectId,l)}const H=[1,5,10,20,50,100],D=a(()=>{const l=[];return g.value?L.value?l.push([{type:"label",label:"Tests not found in the linked folder"},{label:"Choose the right folder…",icon:"i-lucide-folder-search",onSelect:()=>{k()}},{label:"Run anyway",icon:"i-lucide-play",onSelect:()=>V()}]):A.value&&l.push([{type:"label",label:"No Playwright found in the linked folder"},{label:"Re-check after installing",icon:"i-lucide-refresh-cw",onSelect:n=>{n.preventDefault(),$()}},{label:"Run anyway",icon:"i-lucide-play",onSelect:()=>V()}]):l.push([{type:"label",label:u.value?"The linked folder is missing":"No folder linked yet"},{label:"Choose folder…",icon:"i-lucide-folder-plus",onSelect:()=>{k()}}]),g.value&&(l.push([{type:"label",label:`Run ${m.value}`},...X.map(n=>({label:n.label,icon:n.icon,type:"checkbox",checked:w.value.runMode===n.value,disabled:M.value,onSelect:()=>V({runMode:n.value})}))]),l.push([{label:"Record trace",icon:"i-lucide-film",type:"checkbox",checked:w.value.trace,onSelect:n=>{n.preventDefault(),R({trace:!w.value.trace})}},{label:`Repeat each (× ${w.value.repeatEach})`,icon:"i-lucide-repeat",children:H.map(n=>({label:`× ${n}`,type:"checkbox",checked:w.value.repeatEach===n,onSelect:I=>{I.preventDefault(),R({repeatEach:n})}}))},{label:"Select tests by",icon:"i-lucide-list-filter",children:le.map(n=>({label:n.label,type:"checkbox",checked:w.value.mode===n.value,onSelect:I=>{I.preventDefault(),R({mode:n.value})}}))}]),l.push([{label:"Run with options…",icon:"i-lucide-sliders-horizontal",onSelect:()=>x.value=!0},{label:"Copy as command",icon:"i-lucide-clipboard",onSelect:()=>{p(Le(o.cases,{mode:w.value.mode}),{toast:"Command copied"})}}])),l.push([{label:r.activeCount.value>0?`Local runs (${r.activeCount.value} active)`:"Local runs",icon:"i-lucide-terminal",onSelect:()=>r.trayOpen.value=!0}]),g.value&&!L.value&&y.value.length>0&&l[l.length-1].unshift({type:"label",label:`${y.value.length} spec${y.value.length===1?"":"s"} not in the linked folder`}),g.value&&l.push([{type:"label",label:u.value.path,class:"font-mono text-[11px] break-all font-normal"},{label:"Change linked folder…",icon:"i-lucide-folder-search",onSelect:()=>{k()}}]),l});return(l,n)=>{const I=te,Y=be,h=ge,ie=ke,ce=Ge;return t(F)?(b(),E("span",Je,[s(ie,{size:"xs"},{default:i(()=>[s(Y,{text:t(S).tooltip},{default:i(()=>[s(I,{size:"xs",color:t(S).color,variant:"subtle",icon:t(S).icon,loading:t(M),disabled:t(_),onClick:B},{default:i(()=>[f(C(t(S).label),1)]),_:1},8,["color","icon","loading","disabled"])]),_:1},8,["text"]),s(h,{items:t(D),content:{align:"end"},ui:{content:"min-w-56"}},{default:i(()=>[s(I,{size:"xs",color:t(S).color,variant:"subtle",icon:"i-lucide-chevron-down","aria-label":"Run options",class:"relative"},{default:i(()=>[t(O)?(b(),E("span",Ye)):U("",!0)]),_:1},8,["color"])]),_:1},8,["items"])]),_:1}),s(ce,{open:t(x),"onUpdate:open":n[0]||(n[0]=re=>z(x)?x.value=re:null),"project-id":v.projectId,"project-label":v.projectLabel,cases:v.cases},null,8,["open","project-id","project-label","cases"])])):U("",!0)}}}),rt=Object.assign(Qe,{__name:"DesktopRunLocallyButton"});export{rt as _};
@@ -1 +1 @@
1
- import{u as j}from"./BCGljaM0.js";import{h as b,c8 as m}from"./C5TrTuWv.js";const g="piwi-browser-notify";function a(){return{projects:{}}}function y(e){try{const n=JSON.parse(e);if(typeof n!="object"||n===null)return a();const c={};if(n.projects&&typeof n.projects=="object")for(const[i,r]of Object.entries(n.projects)){const u=Number(i);Number.isNaN(u)||r&&typeof r=="object"&&Array.isArray(r.events)&&(c[u]={events:r.events.filter(f=>typeof f=="string")})}return{projects:c}}catch{return a()}}const h=m(!0);let l=null,p=null;function S(){p||h.run(()=>{l=j(g,{default:()=>"",maxAge:3600*24*365,sameSite:"lax",path:"/",secure:location.protocol==="https:",encode:e=>encodeURIComponent(e),decode:e=>decodeURIComponent(e)}),p=b({get:()=>{const e=l.value;return e?y(e):a()},set:e=>{l.value=JSON.stringify(e)}})})}function O(){S();const e=p;function n(t){return e.value.projects[t]??{events:[]}}function c(t,o){if(o.length===0){const s={...e.value};delete s.projects[t],e.value=s}else e.value={...e.value,projects:{...e.value.projects,[t]:{events:o}}}}function i(t,o){const s=n(t).events,v=s.includes(o)?s.filter(d=>d!==o):[...s,o];c(t,v)}function r(t){return n(t).events.length>0}function u(t,o){return n(t).events.includes(o)}function f(){return Object.values(e.value.projects).some(t=>t.events.length>0)}return{getProject:n,setEvents:c,toggleEvent:i,isSubscribed:r,isEventSubscribed:u,hasAnySubscription:f,stored:e}}export{O as u};
1
+ import{u as j}from"./DWz_bHNP.js";import{v as b,c8 as m}from"./BzBaMPgu.js";const g="piwi-browser-notify";function a(){return{projects:{}}}function y(e){try{const n=JSON.parse(e);if(typeof n!="object"||n===null)return a();const c={};if(n.projects&&typeof n.projects=="object")for(const[i,r]of Object.entries(n.projects)){const u=Number(i);Number.isNaN(u)||r&&typeof r=="object"&&Array.isArray(r.events)&&(c[u]={events:r.events.filter(f=>typeof f=="string")})}return{projects:c}}catch{return a()}}const S=m(!0);let l=null,p=null;function h(){p||S.run(()=>{l=j(g,{default:()=>"",maxAge:3600*24*365,sameSite:"lax",path:"/",secure:location.protocol==="https:",encode:e=>encodeURIComponent(e),decode:e=>decodeURIComponent(e)}),p=b({get:()=>{const e=l.value;return e?y(e):a()},set:e=>{l.value=JSON.stringify(e)}})})}function O(){h();const e=p;function n(t){return e.value.projects[t]??{events:[]}}function c(t,o){if(o.length===0){const s={...e.value};delete s.projects[t],e.value=s}else e.value={...e.value,projects:{...e.value.projects,[t]:{events:o}}}}function i(t,o){const s=n(t).events,v=s.includes(o)?s.filter(d=>d!==o):[...s,o];c(t,v)}function r(t){return n(t).events.length>0}function u(t,o){return n(t).events.includes(o)}function f(){return Object.values(e.value.projects).some(t=>t.events.length>0)}return{getProject:n,setEvents:c,toggleEvent:i,isSubscribed:r,isEventSubscribed:u,hasAnySubscription:f,stored:e}}export{O as u};
@@ -0,0 +1 @@
1
+ import{d as T,o as r,c as x,h as p,b as a,_ as U,t as E,l as h,g as k,e as _,f as y,k as L,j,v as w,m as N,r as b,a as O,F as D,z as S,D as Z,G as R,x as C,K as G}from"./BzBaMPgu.js";import{a as K}from"./CDEmotIt.js";const M=[{provider:"jira",tests:[/^https:\/\/([^./]+)\.atlassian\.net\/browse\//i,/^https:\/\/[^/]+\/jira\/software\/c\/projects\//i,/^https:\/\/[^/]+\/.+\/browse\//i],keyExtract:/\/([A-Z][A-Z0-9_]+-\d+)(?:\?|$|#)/i},{provider:"github-issue",tests:[/^https:\/\/github\.com\/[^/]+\/[^/]+\/issues\//i],keyExtract:/\/issues\/(\d+)/},{provider:"github-pr",tests:[/^https:\/\/github\.com\/[^/]+\/[^/]+\/pull\//i],keyExtract:/\/pull\/(\d+)/},{provider:"gitlab-issue",tests:[/^https:\/\/(gitlab\.[^/]+|[^/]+\.gitlab\.io)\/[^/]+\/[^/]+\/-\/issues\//i],keyExtract:/\/issues\/(\d+)/},{provider:"gitlab-mr",tests:[/^https:\/\/(gitlab\.[^/]+|[^/]+\.gitlab\.io)\/[^/]+\/[^/]+\/-\/merge_requests\//i],keyExtract:/\/merge_requests\/(\d+)/},{provider:"bitbucket",tests:[/^https:\/\/bitbucket\.org\/[^/]+\/[^/]+\/pull-requests\//i],keyExtract:/\/pull-requests\/(\d+)/},{provider:"confluence",tests:[/^https:\/\/([^./]+)\.atlassian\.net\/wiki\//i]},{provider:"slack",tests:[/^https:\/\/[^/]+\.slack\.com\//i]},{provider:"linear",tests:[/^https:\/\/linear\.app\//i],keyExtract:/\/([A-Za-z]+-\d+)(?:\/|\?|$|#)/},{provider:"notion",tests:[/^https:\/\/(www\.)?notion\.so\//i]}];function H(t){for(const c of M)if(c.tests.some(e=>e.test(t)))return c.provider;return"generic"}function z(t){return{jira:"i-simple-icons-jira","github-issue":"i-simple-icons-github","github-pr":"i-simple-icons-github","gitlab-issue":"i-simple-icons-gitlab","gitlab-mr":"i-simple-icons-gitlab",bitbucket:"i-simple-icons-bitbucket",confluence:"i-simple-icons-confluence",slack:"i-simple-icons-slack",linear:"i-simple-icons-linear",notion:"i-simple-icons-notion",generic:"i-lucide-link"}[t]}const J={class:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 group hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors"},Q={key:0,class:"font-mono text-primary font-medium"},W=["title"],X=T({__name:"LinkChip",props:{link:{},removable:{type:Boolean}},emits:["remove"],setup(t,{emit:c}){const e=t,v=c,g=w(()=>e.link.title||e.link.key||e.link.url.replace(/^https?:\/\//,"").slice(0,50)),o=w(()=>z(e.link.provider));return(s,l)=>{const d=U,f=N,m=j;return r(),x("span",J,[p(d,{name:a(o),class:"w-3.5 h-3.5 shrink-0"},null,8,["name"]),t.link.key?(r(),x("span",Q,E(t.link.key),1)):h("",!0),k("span",{class:"max-w-48 truncate",title:t.link.title||t.link.url},E(a(g)),9,W),t.link.statusText?(r(),_(f,{key:1,color:t.link.statusColor||"neutral",variant:"subtle",size:"xs"},{default:y(()=>[L(E(t.link.statusText),1)]),_:1},8,["color"])):h("",!0),p(m,{to:t.link.url,target:"_blank",size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-external-link",class:"opacity-0 group-hover:opacity-100 transition-opacity -my-1"},null,8,["to"]),t.removable?(r(),_(m,{key:2,size:"xs",variant:"ghost",color:"error",icon:"i-lucide-x",class:"opacity-0 group-hover:opacity-100 transition-opacity -my-1",onClick:l[0]||(l[0]=I=>v("remove",t.link.id))})):h("",!0)])}}}),Y=Object.assign(X,{__name:"LinkChip"}),tt={class:"flex flex-wrap items-center gap-1.5"},et={class:"relative"},it={class:"flex justify-end gap-2"},st=T({__name:"EntityLinks",props:{entityType:{},entityId:{},links:{}},emits:["updated"],setup(t,{emit:c}){const e=t,v=c,{copy:g}=K(),o=b(e.links??[]),s=b(""),l=b(!1),d=b(!1),f=w(()=>{try{return s.value?H(s.value):null}catch{return null}}),m=w(()=>f.value?z(f.value):null);async function I(){const n=await $fetch("/api/links",{params:{entityType:e.entityType,entityId:e.entityId}});o.value=n.links}async function B(){if(!(!s.value||d.value)){d.value=!0;try{const n=await $fetch("/api/links",{method:"POST",body:{entityType:e.entityType,entityId:e.entityId,url:s.value}});o.value.push(n.link),s.value="",l.value=!1,v("updated")}catch(n){g(n?.data?.message||"Failed to add link",{toast:!0})}finally{d.value=!1}}}async function V(n){try{await $fetch(`/api/links/${n}`,{method:"DELETE"}),o.value=o.value.filter(i=>i.id!==n),v("updated")}catch{g("Failed to remove link",{toast:!0})}}return O(()=>[e.entityType,e.entityId],()=>{e.links?o.value=e.links:I()},{immediate:!0}),(n,i)=>{const A=Y,$=j,P=R,q=U,F=G;return r(),x("div",tt,[(r(!0),x(D,null,S(a(o),u=>(r(),_(A,{key:u.id,link:u,removable:"",onRemove:V},null,8,["link"]))),128)),p(F,{open:a(l),"onUpdate:open":i[2]||(i[2]=u=>C(l)?l.value=u:null)},{content:y(()=>[k("form",{class:"p-3 space-y-3 min-w-72",onSubmit:Z(B,["prevent"])},[i[5]||(i[5]=k("p",{class:"text-sm font-medium"},"Add link",-1)),k("div",et,[p(P,{modelValue:a(s),"onUpdate:modelValue":i[0]||(i[0]=u=>C(s)?s.value=u:null),placeholder:"https://...",size:"sm",class:"w-full",autofocus:""},null,8,["modelValue"]),a(m)?(r(),_(q,{key:0,name:a(m),class:"absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"},null,8,["name"])):h("",!0)]),k("div",it,[p($,{size:"xs",variant:"ghost",color:"neutral",onClick:i[1]||(i[1]=u=>l.value=!1)},{default:y(()=>[...i[3]||(i[3]=[L(" Cancel ",-1)])]),_:1}),p($,{size:"xs",color:"primary",type:"submit",loading:a(d),disabled:!a(s).trim()},{default:y(()=>[...i[4]||(i[4]=[L(" Add ",-1)])]),_:1},8,["loading","disabled"])])],32)]),default:y(()=>[p($,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-plus",class:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",title:"Add link"})]),_:1},8,["open"])])}}}),ot=Object.assign(st,{__name:"EntityLinks"});export{ot as _};
@@ -1,5 +1,5 @@
1
- import{_ as me,a as de}from"./Cu2Q4iPh.js";import{_ as pe,a as fe}from"./opyDpgSw.js";import{_ as he}from"./DcLbz6DV.js";import{d as H,o as n,c as a,F as B,y as T,i,t as c,k as s,v as g,m as R,f as U,h as x,az as _e,M as se,r as N,j as $,_ as Y,E as oe,l as Z,s as ee,g as P,q as Q,A as ae,p as xe,e as ye}from"./C5TrTuWv.js";import{_ as ge}from"./DcR0Mmdl.js";import{_ as be}from"./BBhrClA9.js";import{_ as ve}from"./Ce5_Tq63.js";import{_ as ke}from"./BfA6lfg4.js";import{_ as $e}from"./B1LUinhp.js";import{e as we}from"./DMtrFQqi.js";import{_ as Ae}from"./BFxvHlO9.js";import{a as je,u as Ue}from"./T5UuMUxA.js";import{u as re}from"./CsV7pmcT.js";import"./BCGljaM0.js";import"./DaNC-xl1.js";import"./fXUwH_3d.js";const Se=["get","post","put","patch","delete","head","options","trace"];function Ce(e){switch(e.toLowerCase()){case"get":return"success";case"post":return"info";case"put":case"patch":return"warning";case"delete":return"error";default:return"neutral"}}function Oe(e,t){return`op-${e}-${t}`.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function qe(e){const t=new Map;for(const[r,o]of Object.entries(e?.paths??{})){if(!o)continue;const u=o.parameters??[];for(const p of Se){const v=o[p];if(!v)continue;const f=v.tags?.[0]??"Other",y={path:r,method:p,operation:v,parameters:[...u,...v.parameters??[]],tag:f,anchor:Oe(p,r)},A=t.get(f);A?A.push(y):t.set(f,[y])}}return[...t.entries()].map(([r,o])=>({tag:r,operations:o})).sort((r,o)=>r.tag.localeCompare(o.tag))}function ie(e,t){return Array.isArray(e.security)?e.security.length>0:Array.isArray(t?.security)&&t.security.length>0}function Be(e){return Array.isArray(e.security)&&e.security.length===0}function D(e,t){if(!e?.$ref)return e;const r=/^#\/components\/schemas\/(.+)$/.exec(e.$ref);return r?.[1]?t?.components?.schemas?.[r[1]]??e:e}const Re=["administrator","reporter","user"];function ne(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Te(e){const t=e["x-required-roles"];if(!t||t.length===0)return null;const r=Re.every(o=>t.includes(o));return{roles:t,label:r?"Any signed-in user":t.map(ne).join(" or "),shortLabel:r?"Any user":t.map(o=>o==="administrator"?"Admin":ne(o)).join(" / "),elevated:!r&&!t.includes("user")}}function te(e){if(!e)return"any";if(e.$ref)return e.$ref.split("/").pop()??"object";const t=Array.isArray(e.type)?e.type.join(" | "):e.type;if(t==="array"){const r=e.items;return`array<${r?te(r):"any"}>`}return!t&&e.properties||!t&&(e.oneOf||e.anyOf||e.allOf)?"object":t??"any"}const Pe={class:"space-y-2"},Ve={class:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5"},Le={class:"font-mono text-primary"},ze={class:"text-xs text-muted font-mono"},Ie={key:0,class:"text-xs text-dimmed font-mono"},Ne={key:1,class:"text-xs font-medium text-error"},De={key:0,class:"text-muted mt-0.5"},Ee={key:1,class:"text-xs text-dimmed mt-0.5"},Je={class:"font-mono"},Me=H({__name:"ApiSchema",props:{schema:{},spec:{default:null},depth:{default:0}},setup(e){const t=e,r=x(()=>D(t.schema,t.spec)??t.schema),o=x(()=>{const f=r.value.type==="array"?D(r.value.items,t.spec):r.value,y=f?.properties;if(!y)return[];const A=new Set(f?.required??[]);return Object.entries(y).map(([h,j])=>({name:h,required:A.has(h),schema:D(j,t.spec)??j}))}),u=x(()=>(t.depth??0)<6);function p(f){const y=f.type==="array"?D(f.items,t.spec):f;return!!(y?.properties&&Object.keys(y.properties).length>0)}function v(f){return(f.enum??[]).map(y=>JSON.stringify(y)).join(", ")}return(f,y)=>{const A=le;return n(),a("div",Pe,[(n(!0),a(B,null,T(s(o),h=>(n(),a("div",{key:h.name,class:"text-sm"},[i("div",Ve,[i("code",Le,c(h.name),1),i("span",ze,c(("schemaTypeLabel"in f?f.schemaTypeLabel:s(te))(h.schema)),1),h.schema.format?(n(),a("span",Ie,"("+c(h.schema.format)+")",1)):g("",!0),h.required?(n(),a("span",Ne,"required")):g("",!0)]),h.schema.description?(n(),a("p",De,c(h.schema.description),1)):g("",!0),h.schema.enum?.length?(n(),a("p",Ee,[y[0]||(y[0]=R(" Allowed values: ",-1)),i("span",Je,c(v(h.schema)),1)])):g("",!0),s(u)&&p(h.schema)?(n(),U(A,{key:2,schema:h.schema,spec:e.spec,depth:(e.depth??0)+1,class:"mt-1.5 border-l border-default pl-3"},null,8,["schema","spec","depth"])):g("",!0)]))),128))])}}}),le=Object.assign(Me,{__name:"ApiSchema"});function He(){return{token:_e("piwi-api-token","")}}function We(e,t){return e.replace(/\{([^}]+)\}/g,(r,o)=>{const u=t[o];return u?encodeURIComponent(u):r})}function Fe(e){const t=new URLSearchParams;for(const[o,u]of Object.entries(e))u!==void 0&&u!==""&&t.append(o,u);const r=t.toString();return r?`?${r}`:""}function K(e,t,r=0){const o=D(e,t);if(!o||r>6)return null;if(o.example!==void 0)return o.example;if(o.default!==void 0)return o.default;if(o.enum?.length)return o.enum[0];const u=Array.isArray(o.type)?o.type.find(p=>p!=="null"):o.type;if(u==="object"||!u&&o.properties){const p={};for(const[v,f]of Object.entries(o.properties??{}))p[v]=K(f,t,r+1);return p}if(u==="array")return[K(o.items,t,r+1)];switch(u){case"string":return o.format==="date-time"?"2024-01-01T00:00:00Z":o.format==="date"?"2024-01-01":o.format==="uuid"?"00000000-0000-0000-0000-000000000000":"string";case"integer":case"number":return 0;case"boolean":return!1;default:return null}}function Qe(e,t){const r=e.requestBody?.content?.["application/json"]?.schema;return r?JSON.stringify(K(r,t),null,2):null}function Ge(e){return!!e.requestBody?.content?.["application/json"]}function X(e){return`'${e.replace(/'/g,"'\\''")}'`}function Xe({method:e,url:t,headers:r,body:o}){const u=["curl"];e.toUpperCase()!=="GET"&&u.push("-X",e.toUpperCase());for(const[p,v]of Object.entries(r))u.push("-H",X(`${p}: ${v}`));return o&&u.push("-d",X(o)),u.push(X(t)),u.join(" ")}function Ze({method:e,url:t,headers:r,body:o}){const u=[` method: ${JSON.stringify(e.toUpperCase())},`];return Object.keys(r).length&&u.push(` headers: ${JSON.stringify(r)},`),o&&u.push(` body: ${JSON.stringify(o)},`),`const res = await fetch(${JSON.stringify(t)}, {
1
+ import{_ as me,a as de}from"./D5Mhpp98.js";import{_ as pe,a as fe}from"./CdLqOMvN.js";import{_ as he}from"./Hp-_W7z4.js";import{d as H,o as n,c as a,F as B,z as T,g as i,t as c,b as s,l as g,k as R,e as U,v as x,ay as _e,M as se,r as N,h as $,j as Y,G as oe,x as Z,m as ee,f as P,i as G,B as ae,_ as xe,s as ye}from"./BzBaMPgu.js";import{_ as ge}from"./DUtYU4Sb.js";import{_ as be}from"./Db5xe__T.js";import{_ as ve}from"./CnRNwiuE.js";import{_ as ke}from"./Die1200X.js";import{_ as $e}from"./Cmuwgbf4.js";import{e as we}from"./CdM2qNYM.js";import{_ as Ae}from"./B77w1Eib.js";import{a as je,u as Ue}from"./CDEmotIt.js";import{u as re}from"./CPiLUjjx.js";import"./DWz_bHNP.js";import"./DDho3MJD.js";import"./E26Y1NWH.js";const Se=["get","post","put","patch","delete","head","options","trace"];function Ce(e){switch(e.toLowerCase()){case"get":return"success";case"post":return"info";case"put":case"patch":return"warning";case"delete":return"error";default:return"neutral"}}function Oe(e,t){return`op-${e}-${t}`.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function qe(e){const t=new Map;for(const[r,o]of Object.entries(e?.paths??{})){if(!o)continue;const u=o.parameters??[];for(const p of Se){const v=o[p];if(!v)continue;const f=v.tags?.[0]??"Other",y={path:r,method:p,operation:v,parameters:[...u,...v.parameters??[]],tag:f,anchor:Oe(p,r)},A=t.get(f);A?A.push(y):t.set(f,[y])}}return[...t.entries()].map(([r,o])=>({tag:r,operations:o})).sort((r,o)=>r.tag.localeCompare(o.tag))}function ie(e,t){return Array.isArray(e.security)?e.security.length>0:Array.isArray(t?.security)&&t.security.length>0}function Be(e){return Array.isArray(e.security)&&e.security.length===0}function D(e,t){if(!e?.$ref)return e;const r=/^#\/components\/schemas\/(.+)$/.exec(e.$ref);return r?.[1]?t?.components?.schemas?.[r[1]]??e:e}const Re=["administrator","reporter","user"];function ne(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Te(e){const t=e["x-required-roles"];if(!t||t.length===0)return null;const r=Re.every(o=>t.includes(o));return{roles:t,label:r?"Any signed-in user":t.map(ne).join(" or "),shortLabel:r?"Any user":t.map(o=>o==="administrator"?"Admin":ne(o)).join(" / "),elevated:!r&&!t.includes("user")}}function te(e){if(!e)return"any";if(e.$ref)return e.$ref.split("/").pop()??"object";const t=Array.isArray(e.type)?e.type.join(" | "):e.type;if(t==="array"){const r=e.items;return`array<${r?te(r):"any"}>`}return!t&&e.properties||!t&&(e.oneOf||e.anyOf||e.allOf)?"object":t??"any"}const Pe={class:"space-y-2"},Ve={class:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5"},Le={class:"font-mono text-primary"},ze={class:"text-xs text-muted font-mono"},Ie={key:0,class:"text-xs text-dimmed font-mono"},Ne={key:1,class:"text-xs font-medium text-error"},De={key:0,class:"text-muted mt-0.5"},Ee={key:1,class:"text-xs text-dimmed mt-0.5"},Je={class:"font-mono"},Me=H({__name:"ApiSchema",props:{schema:{},spec:{default:null},depth:{default:0}},setup(e){const t=e,r=x(()=>D(t.schema,t.spec)??t.schema),o=x(()=>{const f=r.value.type==="array"?D(r.value.items,t.spec):r.value,y=f?.properties;if(!y)return[];const A=new Set(f?.required??[]);return Object.entries(y).map(([h,j])=>({name:h,required:A.has(h),schema:D(j,t.spec)??j}))}),u=x(()=>(t.depth??0)<6);function p(f){const y=f.type==="array"?D(f.items,t.spec):f;return!!(y?.properties&&Object.keys(y.properties).length>0)}function v(f){return(f.enum??[]).map(y=>JSON.stringify(y)).join(", ")}return(f,y)=>{const A=le;return n(),a("div",Pe,[(n(!0),a(B,null,T(s(o),h=>(n(),a("div",{key:h.name,class:"text-sm"},[i("div",Ve,[i("code",Le,c(h.name),1),i("span",ze,c(("schemaTypeLabel"in f?f.schemaTypeLabel:s(te))(h.schema)),1),h.schema.format?(n(),a("span",Ie,"("+c(h.schema.format)+")",1)):g("",!0),h.required?(n(),a("span",Ne,"required")):g("",!0)]),h.schema.description?(n(),a("p",De,c(h.schema.description),1)):g("",!0),h.schema.enum?.length?(n(),a("p",Ee,[y[0]||(y[0]=R(" Allowed values: ",-1)),i("span",Je,c(v(h.schema)),1)])):g("",!0),s(u)&&p(h.schema)?(n(),U(A,{key:2,schema:h.schema,spec:e.spec,depth:(e.depth??0)+1,class:"mt-1.5 border-l border-default pl-3"},null,8,["schema","spec","depth"])):g("",!0)]))),128))])}}}),le=Object.assign(Me,{__name:"ApiSchema"});function He(){return{token:_e("piwi-api-token","")}}function We(e,t){return e.replace(/\{([^}]+)\}/g,(r,o)=>{const u=t[o];return u?encodeURIComponent(u):r})}function Fe(e){const t=new URLSearchParams;for(const[o,u]of Object.entries(e))u!==void 0&&u!==""&&t.append(o,u);const r=t.toString();return r?`?${r}`:""}function K(e,t,r=0){const o=D(e,t);if(!o||r>6)return null;if(o.example!==void 0)return o.example;if(o.default!==void 0)return o.default;if(o.enum?.length)return o.enum[0];const u=Array.isArray(o.type)?o.type.find(p=>p!=="null"):o.type;if(u==="object"||!u&&o.properties){const p={};for(const[v,f]of Object.entries(o.properties??{}))p[v]=K(f,t,r+1);return p}if(u==="array")return[K(o.items,t,r+1)];switch(u){case"string":return o.format==="date-time"?"2024-01-01T00:00:00Z":o.format==="date"?"2024-01-01":o.format==="uuid"?"00000000-0000-0000-0000-000000000000":"string";case"integer":case"number":return 0;case"boolean":return!1;default:return null}}function Ge(e,t){const r=e.requestBody?.content?.["application/json"]?.schema;return r?JSON.stringify(K(r,t),null,2):null}function Qe(e){return!!e.requestBody?.content?.["application/json"]}function X(e){return`'${e.replace(/'/g,"'\\''")}'`}function Xe({method:e,url:t,headers:r,body:o}){const u=["curl"];e.toUpperCase()!=="GET"&&u.push("-X",e.toUpperCase());for(const[p,v]of Object.entries(r))u.push("-H",X(`${p}: ${v}`));return o&&u.push("-d",X(o)),u.push(X(t)),u.join(" ")}function Ze({method:e,url:t,headers:r,body:o}){const u=[` method: ${JSON.stringify(e.toUpperCase())},`];return Object.keys(r).length&&u.push(` headers: ${JSON.stringify(r)},`),o&&u.push(` body: ${JSON.stringify(o)},`),`const res = await fetch(${JSON.stringify(t)}, {
2
2
  ${u.join(`
3
3
  `)}
4
4
  });
5
- const data = await res.json();`}const Ke={class:"rounded-lg border border-default bg-default/50 p-3 space-y-3"},Ye={class:"flex items-center justify-between gap-2"},et={key:0,class:"space-y-1"},tt={key:1,class:"space-y-1.5"},st=["title"],nt={key:2,class:"space-y-1.5"},ot=["title"],at={key:3,class:"space-y-1"},rt={key:4,class:"text-xs text-dimmed"},it={key:5,class:"space-y-1.5"},lt={class:"flex items-center gap-2 text-xs"},ct={class:"text-dimmed"},ut={class:"max-h-80 overflow-auto"},mt={key:6,class:"text-xs text-error"},dt={class:"space-y-1.5"},pt={class:"flex gap-1"},ft=H({__name:"ApiTryIt",props:{item:{},spec:{}},setup(e){const t=e,r=ae(),o=r.public.demoMode,u=(r.app?.baseURL??"/").replace(/\/$/,""),{token:p}=He(),v=x(()=>ie(t.item.operation,t.spec)),f=x(()=>t.item.parameters.filter(O=>O.in==="path")),y=x(()=>t.item.parameters.filter(O=>O.in==="query")),A=se(Object.fromEntries(f.value.map(O=>[O.name,""]))),h=se(Object.fromEntries(y.value.map(O=>[O.name,""]))),j=x(()=>Ge(t.item.operation)),S=x(()=>!!t.item.operation.requestBody?.content?.["multipart/form-data"]&&!j.value),w=N(Qe(t.item.operation,t.spec)??""),l=x(()=>j.value&&w.value.trim()?w.value:void 0),d=x(()=>u+We(t.item.path,A)+Fe(h)),C=x(()=>{const O={};return l.value&&(O["Content-Type"]="application/json"),v.value&&p.value&&(O.Authorization=`Bearer ${p.value}`),O}),q=x(()=>window.location.origin+d.value),L=x(()=>Xe({method:t.item.method,url:q.value,headers:C.value,body:l.value})),I=x(()=>Ze({method:t.item.method,url:q.value,headers:C.value,body:l.value})),_=N("curl"),m=N(!1),V=N(null),z=N(null);async function ce(){m.value=!0,V.value=null,z.value=null;const O=performance.now();try{const b={...C.value};o&&(b["x-demo-user-id"]=localStorage.getItem("piwi-demo-user-id")||"1");const E=await fetch(d.value,{method:t.item.method.toUpperCase(),headers:b,body:l.value,credentials:"same-origin"}),J=Math.round(performance.now()-O),W=await E.text();let F=W;try{F=JSON.stringify(JSON.parse(W),null,2)}catch{}z.value={status:E.status,statusText:E.statusText,ok:E.ok,timeMs:J,body:F}}catch(b){V.value=we(b)}finally{m.value=!1}}return(O,b)=>{const E=Y,J=oe,W=ve,F=ke,ue=ee,G=$e;return n(),a("div",Ke,[i("div",Ye,[b[4]||(b[4]=i("h4",{class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},"Try it out",-1)),$(E,{size:"xs",color:"primary",icon:"i-lucide-play",loading:s(m),label:"Send",onClick:ce},null,8,["loading"])]),s(v)?(n(),a("div",et,[b[5]||(b[5]=i("label",{class:"text-xs text-dimmed"},"Authorization — Bearer token",-1)),$(J,{modelValue:s(p),"onUpdate:modelValue":b[0]||(b[0]=k=>Z(p)?p.value=k:null),type:"password",placeholder:"pd_…",size:"sm",class:"w-full",ui:{base:"font-mono"}},null,8,["modelValue"])])):g("",!0),s(f).length?(n(),a("div",tt,[b[6]||(b[6]=i("label",{class:"text-xs text-dimmed"},"Path parameters",-1)),(n(!0),a(B,null,T(s(f),k=>(n(),a("div",{key:k.name,class:"flex items-center gap-2"},[i("code",{class:"text-xs font-mono text-primary w-28 shrink-0 truncate",title:k.name},c(k.name),9,st),$(J,{modelValue:s(A)[k.name],"onUpdate:modelValue":M=>s(A)[k.name]=M,placeholder:k.name,size:"sm",class:"flex-1",ui:{base:"font-mono"}},null,8,["modelValue","onUpdate:modelValue","placeholder"])]))),128))])):g("",!0),s(y).length?(n(),a("div",nt,[b[7]||(b[7]=i("label",{class:"text-xs text-dimmed"},"Query parameters",-1)),(n(!0),a(B,null,T(s(y),k=>(n(),a("div",{key:k.name,class:"flex items-center gap-2"},[i("code",{class:"text-xs font-mono text-primary w-28 shrink-0 truncate",title:k.name},c(k.name),9,ot),k.schema?.enum?.length?(n(),U(W,{key:0,modelValue:s(h)[k.name],"onUpdate:modelValue":M=>s(h)[k.name]=M,items:["",...k.schema.enum.map(String)],size:"sm",class:"flex-1"},null,8,["modelValue","onUpdate:modelValue","items"])):(n(),U(J,{key:1,modelValue:s(h)[k.name],"onUpdate:modelValue":M=>s(h)[k.name]=M,placeholder:k.name,size:"sm",class:"flex-1",ui:{base:"font-mono"}},null,8,["modelValue","onUpdate:modelValue","placeholder"]))]))),128))])):g("",!0),s(j)?(n(),a("div",at,[b[8]||(b[8]=i("label",{class:"text-xs text-dimmed"},"Request body — application/json",-1)),$(F,{modelValue:s(w),"onUpdate:modelValue":b[1]||(b[1]=k=>Z(w)?w.value=k:null),rows:6,class:"w-full",ui:{base:"font-mono text-xs"}},null,8,["modelValue"])])):s(S)?(n(),a("p",rt,[...b[9]||(b[9]=[R(" This endpoint expects ",-1),i("code",{class:"font-mono"},"multipart/form-data",-1),R(" (file upload) — use the cURL sample below as a starting point. ",-1)])])):g("",!0),s(z)?(n(),a("div",it,[i("div",lt,[$(ue,{color:s(z).ok?"success":"error",variant:"subtle",class:"font-mono"},{default:P(()=>[R(c(s(z).status)+" "+c(s(z).statusText),1)]),_:1},8,["color"]),i("span",ct,c(s(z).timeMs)+" ms",1)]),i("div",ut,[$(G,{code:s(z).body,lang:"json"},null,8,["code"])])])):s(V)?(n(),a("p",mt,"Request failed: "+c(s(V)),1)):g("",!0),i("div",dt,[i("div",pt,[i("button",{type:"button",class:Q(["text-xs px-2 py-0.5 rounded-md transition-colors",s(_)==="curl"?"bg-elevated text-highlighted":"text-muted hover:text-highlighted"]),onClick:b[2]||(b[2]=k=>_.value="curl")}," cURL ",2),i("button",{type:"button",class:Q(["text-xs px-2 py-0.5 rounded-md transition-colors",s(_)==="fetch"?"bg-elevated text-highlighted":"text-muted hover:text-highlighted"]),onClick:b[3]||(b[3]=k=>_.value="fetch")}," JavaScript ",2)]),s(_)==="curl"?(n(),U(G,{key:0,code:s(L),lang:"bash"},null,8,["code"])):(n(),U(G,{key:1,code:s(I),lang:"javascript"},null,8,["code"]))])])}}}),ht=Object.assign(ft,{__name:"ApiTryIt"}),_t=["id"],xt=["aria-expanded"],yt={class:"font-mono text-sm text-highlighted break-all"},gt={class:"text-sm text-muted truncate hidden sm:inline flex-1"},bt={key:0,class:"px-3 pb-3 pt-1 space-y-4 border-t border-default"},vt={key:0,class:"text-sm font-medium text-highlighted sm:hidden"},kt={key:1,class:"text-sm text-muted"},$t={key:2,class:"flex items-center gap-1.5 text-xs"},wt={class:"text-muted font-medium"},At={key:0,class:"space-y-1.5"},jt={class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},Ut={class:"space-y-2"},St={class:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5"},Ct={class:"font-mono text-primary"},Ot={class:"text-xs text-muted font-mono"},qt={key:0,class:"text-xs font-medium text-error"},Bt={key:0,class:"text-muted mt-0.5"},Rt={key:1,class:"text-xs text-dimmed mt-0.5"},Tt={class:"font-mono"},Pt={key:3,class:"space-y-1.5"},Vt={class:"text-xs text-dimmed font-mono"},Lt={key:4,class:"space-y-1.5"},zt={class:"flex items-baseline gap-2"},It={class:"text-muted"},Nt={class:"text-xs text-dimmed font-mono"},Dt=H({__name:"ApiOperation",props:{item:{},spec:{}},setup(e){const t=e,r=N(!1),o=x(()=>ie(t.item.operation,t.spec)),u=x(()=>Be(t.item.operation)),p=x(()=>Te(t.item.operation)),v=x(()=>u.value?"Public — no authentication required":p.value?p.value.label:o.value?"Requires authentication":null),f=x(()=>t.item.parameters.filter(l=>l.in==="path")),y=x(()=>t.item.parameters.filter(l=>l.in==="query")),A=x(()=>t.item.parameters.filter(l=>l.in==="header")),h=x(()=>Object.entries(t.item.operation.requestBody?.content??{}).map(([l,d])=>({contentType:l,schema:D(d.schema,t.spec)}))),j=x(()=>Object.entries(t.item.operation.responses??{}).map(([l,d])=>({status:l,description:d.description,entries:Object.entries(d.content??{}).map(([C,q])=>({contentType:C,schema:D(q.schema,t.spec)}))}))),S=x(()=>t.item.path.split(/(\{[^}]+\})/g).map(l=>({text:l,isParam:l.startsWith("{")})));function w(l){return l.startsWith("2")?"text-success":l.startsWith("3")?"text-info":l.startsWith("4")?"text-warning":l.startsWith("5")?"text-error":"text-muted"}return(l,d)=>{const C=ee,q=xe,L=le,I=ht;return n(),a("div",{id:e.item.anchor,class:"border border-default rounded-lg bg-elevated/20 scroll-mt-20"},[i("button",{type:"button",class:"w-full flex items-center gap-3 px-3 py-2.5 text-left cursor-pointer","aria-expanded":s(r),onClick:d[0]||(d[0]=_=>r.value=!s(r))},[$(C,{color:("methodBadgeColor"in l?l.methodBadgeColor:s(Ce))(e.item.method),variant:"subtle",class:"font-mono uppercase shrink-0 w-16 justify-center"},{default:P(()=>[R(c(e.item.method),1)]),_:1},8,["color"]),i("code",yt,[(n(!0),a(B,null,T(s(S),(_,m)=>(n(),a("span",{key:m,class:Q(_.isParam?"text-warning":"")},c(_.text),3))),128))]),i("span",gt,c(e.item.operation.summary),1),s(p)?.elevated?(n(),U(C,{key:0,color:"warning",variant:"subtle",size:"sm",icon:"i-lucide-shield",class:"shrink-0 ml-auto sm:ml-0",title:`Requires role: ${s(p).label}`},{default:P(()=>[R(c(s(p).shortLabel),1)]),_:1},8,["title"])):s(u)?(n(),U(C,{key:1,color:"neutral",variant:"subtle",size:"sm",class:"shrink-0 ml-auto sm:ml-0"},{default:P(()=>[...d[1]||(d[1]=[R(" Public ",-1)])]),_:1})):s(o)?(n(),U(q,{key:2,name:"i-lucide-lock",class:"size-3.5 text-dimmed shrink-0 ml-auto sm:ml-0",title:"Requires authentication"})):g("",!0),$(q,{name:s(r)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-4 text-dimmed shrink-0"},null,8,["name"])],8,xt),s(r)?(n(),a("div",bt,[e.item.operation.summary?(n(),a("p",vt,c(e.item.operation.summary),1)):g("",!0),e.item.operation.description?(n(),a("p",kt,c(e.item.operation.description),1)):g("",!0),s(v)?(n(),a("div",$t,[$(q,{name:s(p)?.elevated?"i-lucide-shield":"i-lucide-users",class:"size-3.5 text-dimmed shrink-0"},null,8,["name"]),d[2]||(d[2]=i("span",{class:"text-dimmed"},"Access",-1)),i("span",wt,c(s(v)),1)])):g("",!0),(n(!0),a(B,null,T([{label:"Path parameters",params:s(f)},{label:"Query parameters",params:s(y)},{label:"Header parameters",params:s(A)}],_=>(n(),a(B,{key:_.label},[_.params.length?(n(),a("div",At,[i("h4",jt,c(_.label),1),i("div",Ut,[(n(!0),a(B,null,T(_.params,m=>(n(),a("div",{key:m.name,class:"text-sm"},[i("div",St,[i("code",Ct,c(m.name),1),i("span",Ot,c(("schemaTypeLabel"in l?l.schemaTypeLabel:s(te))(m.schema)),1),m.required?(n(),a("span",qt,"required")):g("",!0)]),m.description?(n(),a("p",Bt,c(m.description),1)):g("",!0),m.schema?.enum?.length?(n(),a("p",Rt,[d[3]||(d[3]=R(" Allowed values: ",-1)),i("span",Tt,c(m.schema.enum.map(V=>JSON.stringify(V)).join(", ")),1)])):g("",!0)]))),128))])])):g("",!0)],64))),128)),s(h).length?(n(),a("div",Pt,[d[4]||(d[4]=i("h4",{class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},"Request body",-1)),(n(!0),a(B,null,T(s(h),_=>(n(),a("div",{key:_.contentType,class:"space-y-1.5"},[i("code",Vt,c(_.contentType),1),_.schema?(n(),U(L,{key:0,schema:_.schema,spec:e.spec},null,8,["schema","spec"])):g("",!0)]))),128))])):g("",!0),s(j).length?(n(),a("div",Lt,[d[5]||(d[5]=i("h4",{class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},"Responses",-1)),(n(!0),a(B,null,T(s(j),_=>(n(),a("div",{key:_.status,class:"text-sm"},[i("div",zt,[i("code",{class:Q(["font-mono font-semibold",w(_.status)])},c(_.status),3),i("span",It,c(_.description),1)]),(n(!0),a(B,null,T(_.entries,m=>(n(),a("div",{key:m.contentType,class:"mt-1 pl-3 border-l border-default"},[i("code",Nt,c(m.contentType),1),m.schema?(n(),U(L,{key:0,schema:m.schema,spec:e.spec,class:"mt-1"},null,8,["schema","spec"])):g("",!0)]))),128))]))),128))])):g("",!0),$(I,{item:e.item,spec:e.spec},null,8,["item","spec"])])):g("",!0)],8,_t)}}}),Et=Object.assign(Dt,{__name:"ApiOperation"}),Jt={class:"max-w-4xl mx-auto px-4 sm:px-6 py-6 space-y-6"},Mt={class:"space-y-3"},Ht={class:"flex flex-wrap items-center gap-2"},Wt={class:"text-xl font-semibold text-highlighted"},Ft={key:0,class:"text-sm text-muted"},Qt={key:1,class:"flex items-center gap-2 text-sm"},Gt={class:"flex flex-wrap items-center gap-2"},Xt={class:"text-xs text-dimmed"},Zt={key:0,class:"flex flex-wrap gap-1.5"},Kt=["href"],Yt={class:"text-dimmed"},es={key:1,class:"space-y-8"},ts=["id"],ss={class:"text-sm font-semibold uppercase tracking-wide text-dimmed"},ns={class:"text-dimmed/60"},os=H({__name:"ApiReference",props:{spec:{},specUrl:{}},setup(e){const t=e,{copy:r,copied:o}=je(),{isDesktop:u,download:p}=re(),v=N("");function f(w){u&&(w.preventDefault(),p(t.specUrl,"piwi-openapi.json"))}const y=x(()=>qe(t.spec)),A=x(()=>y.value.reduce((w,l)=>w+l.operations.length,0)),h=x(()=>{const w=v.value.trim().toLowerCase();return w?y.value.map(l=>({tag:l.tag,operations:l.operations.filter(d=>`${d.method} ${d.path} ${d.operation.summary??""} ${d.operation.description??""} ${d.tag}`.toLowerCase().includes(w))})).filter(l=>l.operations.length>0):y.value}),j=x(()=>t.spec.servers?.[0]?.url??"");function S(w){return`tag-${w.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}`}return(w,l)=>{const d=ee,C=Y,q=be,L=oe,I=Et,_=Ae;return n(),a("div",Jt,[i("header",Mt,[i("div",Ht,[i("h1",Wt,c(e.spec.info?.title??"API Reference"),1),e.spec.info?.version?(n(),U(d,{key:0,color:"neutral",variant:"subtle",class:"font-mono"},{default:P(()=>[R(" v"+c(e.spec.info.version),1)]),_:1})):g("",!0)]),e.spec.info?.description?(n(),a("p",Ft,c(e.spec.info.description),1)):g("",!0),s(j)?(n(),a("div",Qt,[l[2]||(l[2]=i("span",{class:"text-dimmed"},"Base URL",-1)),$(C,{label:s(j),color:"neutral",variant:"subtle",size:"xs",icon:s(o)?"i-lucide-check":"i-lucide-copy",class:"font-mono",onClick:l[0]||(l[0]=m=>s(r)(s(j),{toast:!0}))},null,8,["label","icon"])])):g("",!0),i("div",Gt,[$(C,{to:e.specUrl,target:"_blank",external:"",color:"neutral",variant:"outline",size:"xs",icon:"i-lucide-file-json",label:"Raw OpenAPI spec",onClick:f},null,8,["to"]),i("span",Xt,c(s(A))+" endpoints",1)]),$(q,{color:"info",variant:"subtle",icon:"i-lucide-terminal",title:"Windows users",description:"curl examples below use Unix syntax — run them in Git Bash / WSL, or use PowerShell's Invoke-RestMethod instead."})]),$(L,{modelValue:s(v),"onUpdate:modelValue":l[1]||(l[1]=m=>Z(v)?v.value=m:null),icon:"i-lucide-search",placeholder:"Filter endpoints by path, method, or description…",size:"md",class:"w-full",ui:{root:"sticky top-0 z-10"}},null,8,["modelValue"]),!s(v)&&s(y).length>1?(n(),a("div",Zt,[(n(!0),a(B,null,T(s(y),m=>(n(),a("a",{key:m.tag,href:`#${S(m.tag)}`,class:"text-xs px-2 py-1 rounded-md bg-elevated text-muted hover:text-highlighted hover:bg-accented transition-colors"},[R(c(m.tag)+" ",1),i("span",Yt,c(m.operations.length),1)],8,Kt))),128))])):g("",!0),s(h).length?(n(),a("div",es,[(n(!0),a(B,null,T(s(h),m=>(n(),a("section",{key:m.tag,id:S(m.tag),class:"space-y-2 scroll-mt-4"},[i("h2",ss,[R(c(m.tag)+" ",1),i("span",ns,"("+c(m.operations.length)+")",1)]),(n(!0),a(B,null,T(m.operations,V=>(n(),U(I,{key:V.anchor,item:V,spec:e.spec},null,8,["item","spec"]))),128))],8,ts))),128))])):(n(),U(_,{key:2,icon:"i-lucide-search-x",text:"No endpoints match your filter."}))])}}}),as=Object.assign(os,{__name:"ApiReference"}),rs={key:1,class:"p-6"},is={class:"flex flex-wrap justify-center gap-2 mt-1"},ws=H({__name:"docs",setup(e){const r=ae().public.demoMode,o=r?"/demo/_openapi.json":"/_openapi.json",{isDesktop:u,download:p}=re();function v(j){u&&(j.preventDefault(),p(o,"piwi-openapi.json"))}ye({title:"API Reference — Piwi Dashboard"});const{data:f,status:y,error:A,refresh:h}=Ue(o,{key:"openapi-spec",lazy:!0,server:!r},"$4tSR2TuzBP");return(j,S)=>{const w=me,l=de,d=fe,C=he,q=Y,L=ge,I=as,_=pe;return n(),U(_,{id:"docs"},{header:P(()=>[$(d,null,{leading:P(()=>[$(w),$(l,{items:[{label:"API Reference",icon:"i-lucide-book-open"}]})]),_:1})]),body:P(()=>[s(y)==="pending"||!s(f)&&!s(A)?(n(),U(C,{key:0,text:"Loading API reference…"})):s(A)||!s(f)?(n(),a("div",rs,[$(L,{text:"Couldn't load the API reference UI."},{action:P(()=>[S[3]||(S[3]=i("p",{class:"text-sm text-muted max-w-sm"},"The raw OpenAPI spec is still available directly.",-1)),i("div",is,[$(q,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:S[0]||(S[0]=()=>s(h)())},{default:P(()=>[...S[1]||(S[1]=[R(" Retry ",-1)])]),_:1}),$(q,{to:s(o),target:"_blank",external:"",size:"sm",variant:"outline",icon:"i-lucide-file-json",onClick:v},{default:P(()=>[...S[2]||(S[2]=[R(" Raw OpenAPI spec ",-1)])]),_:1},8,["to"])])]),_:1})])):(n(),U(I,{key:2,spec:s(f),"spec-url":s(o)},null,8,["spec","spec-url"]))]),_:1})}}});export{ws as default};
5
+ const data = await res.json();`}const Ke={class:"rounded-lg border border-default bg-default/50 p-3 space-y-3"},Ye={class:"flex items-center justify-between gap-2"},et={key:0,class:"space-y-1"},tt={key:1,class:"space-y-1.5"},st=["title"],nt={key:2,class:"space-y-1.5"},ot=["title"],at={key:3,class:"space-y-1"},rt={key:4,class:"text-xs text-dimmed"},it={key:5,class:"space-y-1.5"},lt={class:"flex items-center gap-2 text-xs"},ct={class:"text-dimmed"},ut={class:"max-h-80 overflow-auto"},mt={key:6,class:"text-xs text-error"},dt={class:"space-y-1.5"},pt={class:"flex gap-1"},ft=H({__name:"ApiTryIt",props:{item:{},spec:{}},setup(e){const t=e,r=ae(),o=r.public.demoMode,u=(r.app?.baseURL??"/").replace(/\/$/,""),{token:p}=He(),v=x(()=>ie(t.item.operation,t.spec)),f=x(()=>t.item.parameters.filter(O=>O.in==="path")),y=x(()=>t.item.parameters.filter(O=>O.in==="query")),A=se(Object.fromEntries(f.value.map(O=>[O.name,""]))),h=se(Object.fromEntries(y.value.map(O=>[O.name,""]))),j=x(()=>Qe(t.item.operation)),S=x(()=>!!t.item.operation.requestBody?.content?.["multipart/form-data"]&&!j.value),w=N(Ge(t.item.operation,t.spec)??""),l=x(()=>j.value&&w.value.trim()?w.value:void 0),d=x(()=>u+We(t.item.path,A)+Fe(h)),C=x(()=>{const O={};return l.value&&(O["Content-Type"]="application/json"),v.value&&p.value&&(O.Authorization=`Bearer ${p.value}`),O}),q=x(()=>window.location.origin+d.value),L=x(()=>Xe({method:t.item.method,url:q.value,headers:C.value,body:l.value})),I=x(()=>Ze({method:t.item.method,url:q.value,headers:C.value,body:l.value})),_=N("curl"),m=N(!1),V=N(null),z=N(null);async function ce(){m.value=!0,V.value=null,z.value=null;const O=performance.now();try{const b={...C.value};o&&(b["x-demo-user-id"]=localStorage.getItem("piwi-demo-user-id")||"1");const E=await fetch(d.value,{method:t.item.method.toUpperCase(),headers:b,body:l.value,credentials:"same-origin"}),J=Math.round(performance.now()-O),W=await E.text();let F=W;try{F=JSON.stringify(JSON.parse(W),null,2)}catch{}z.value={status:E.status,statusText:E.statusText,ok:E.ok,timeMs:J,body:F}}catch(b){V.value=we(b)}finally{m.value=!1}}return(O,b)=>{const E=Y,J=oe,W=ve,F=ke,ue=ee,Q=$e;return n(),a("div",Ke,[i("div",Ye,[b[4]||(b[4]=i("h4",{class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},"Try it out",-1)),$(E,{size:"xs",color:"primary",icon:"i-lucide-play",loading:s(m),label:"Send",onClick:ce},null,8,["loading"])]),s(v)?(n(),a("div",et,[b[5]||(b[5]=i("label",{class:"text-xs text-dimmed"},"Authorization — Bearer token",-1)),$(J,{modelValue:s(p),"onUpdate:modelValue":b[0]||(b[0]=k=>Z(p)?p.value=k:null),type:"password",placeholder:"pd_…",size:"sm",class:"w-full",ui:{base:"font-mono"}},null,8,["modelValue"])])):g("",!0),s(f).length?(n(),a("div",tt,[b[6]||(b[6]=i("label",{class:"text-xs text-dimmed"},"Path parameters",-1)),(n(!0),a(B,null,T(s(f),k=>(n(),a("div",{key:k.name,class:"flex items-center gap-2"},[i("code",{class:"text-xs font-mono text-primary w-28 shrink-0 truncate",title:k.name},c(k.name),9,st),$(J,{modelValue:s(A)[k.name],"onUpdate:modelValue":M=>s(A)[k.name]=M,placeholder:k.name,size:"sm",class:"flex-1",ui:{base:"font-mono"}},null,8,["modelValue","onUpdate:modelValue","placeholder"])]))),128))])):g("",!0),s(y).length?(n(),a("div",nt,[b[7]||(b[7]=i("label",{class:"text-xs text-dimmed"},"Query parameters",-1)),(n(!0),a(B,null,T(s(y),k=>(n(),a("div",{key:k.name,class:"flex items-center gap-2"},[i("code",{class:"text-xs font-mono text-primary w-28 shrink-0 truncate",title:k.name},c(k.name),9,ot),k.schema?.enum?.length?(n(),U(W,{key:0,modelValue:s(h)[k.name],"onUpdate:modelValue":M=>s(h)[k.name]=M,items:["",...k.schema.enum.map(String)],size:"sm",class:"flex-1"},null,8,["modelValue","onUpdate:modelValue","items"])):(n(),U(J,{key:1,modelValue:s(h)[k.name],"onUpdate:modelValue":M=>s(h)[k.name]=M,placeholder:k.name,size:"sm",class:"flex-1",ui:{base:"font-mono"}},null,8,["modelValue","onUpdate:modelValue","placeholder"]))]))),128))])):g("",!0),s(j)?(n(),a("div",at,[b[8]||(b[8]=i("label",{class:"text-xs text-dimmed"},"Request body — application/json",-1)),$(F,{modelValue:s(w),"onUpdate:modelValue":b[1]||(b[1]=k=>Z(w)?w.value=k:null),rows:6,class:"w-full",ui:{base:"font-mono text-xs"}},null,8,["modelValue"])])):s(S)?(n(),a("p",rt,[...b[9]||(b[9]=[R(" This endpoint expects ",-1),i("code",{class:"font-mono"},"multipart/form-data",-1),R(" (file upload) — use the cURL sample below as a starting point. ",-1)])])):g("",!0),s(z)?(n(),a("div",it,[i("div",lt,[$(ue,{color:s(z).ok?"success":"error",variant:"subtle",class:"font-mono"},{default:P(()=>[R(c(s(z).status)+" "+c(s(z).statusText),1)]),_:1},8,["color"]),i("span",ct,c(s(z).timeMs)+" ms",1)]),i("div",ut,[$(Q,{code:s(z).body,lang:"json"},null,8,["code"])])])):s(V)?(n(),a("p",mt,"Request failed: "+c(s(V)),1)):g("",!0),i("div",dt,[i("div",pt,[i("button",{type:"button",class:G(["text-xs px-2 py-0.5 rounded-md transition-colors",s(_)==="curl"?"bg-elevated text-highlighted":"text-muted hover:text-highlighted"]),onClick:b[2]||(b[2]=k=>_.value="curl")}," cURL ",2),i("button",{type:"button",class:G(["text-xs px-2 py-0.5 rounded-md transition-colors",s(_)==="fetch"?"bg-elevated text-highlighted":"text-muted hover:text-highlighted"]),onClick:b[3]||(b[3]=k=>_.value="fetch")}," JavaScript ",2)]),s(_)==="curl"?(n(),U(Q,{key:0,code:s(L),lang:"bash"},null,8,["code"])):(n(),U(Q,{key:1,code:s(I),lang:"javascript"},null,8,["code"]))])])}}}),ht=Object.assign(ft,{__name:"ApiTryIt"}),_t=["id"],xt=["aria-expanded"],yt={class:"font-mono text-sm text-highlighted break-all"},gt={class:"text-sm text-muted truncate hidden sm:inline flex-1"},bt={key:0,class:"px-3 pb-3 pt-1 space-y-4 border-t border-default"},vt={key:0,class:"text-sm font-medium text-highlighted sm:hidden"},kt={key:1,class:"text-sm text-muted"},$t={key:2,class:"flex items-center gap-1.5 text-xs"},wt={class:"text-muted font-medium"},At={key:0,class:"space-y-1.5"},jt={class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},Ut={class:"space-y-2"},St={class:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5"},Ct={class:"font-mono text-primary"},Ot={class:"text-xs text-muted font-mono"},qt={key:0,class:"text-xs font-medium text-error"},Bt={key:0,class:"text-muted mt-0.5"},Rt={key:1,class:"text-xs text-dimmed mt-0.5"},Tt={class:"font-mono"},Pt={key:3,class:"space-y-1.5"},Vt={class:"text-xs text-dimmed font-mono"},Lt={key:4,class:"space-y-1.5"},zt={class:"flex items-baseline gap-2"},It={class:"text-muted"},Nt={class:"text-xs text-dimmed font-mono"},Dt=H({__name:"ApiOperation",props:{item:{},spec:{}},setup(e){const t=e,r=N(!1),o=x(()=>ie(t.item.operation,t.spec)),u=x(()=>Be(t.item.operation)),p=x(()=>Te(t.item.operation)),v=x(()=>u.value?"Public — no authentication required":p.value?p.value.label:o.value?"Requires authentication":null),f=x(()=>t.item.parameters.filter(l=>l.in==="path")),y=x(()=>t.item.parameters.filter(l=>l.in==="query")),A=x(()=>t.item.parameters.filter(l=>l.in==="header")),h=x(()=>Object.entries(t.item.operation.requestBody?.content??{}).map(([l,d])=>({contentType:l,schema:D(d.schema,t.spec)}))),j=x(()=>Object.entries(t.item.operation.responses??{}).map(([l,d])=>({status:l,description:d.description,entries:Object.entries(d.content??{}).map(([C,q])=>({contentType:C,schema:D(q.schema,t.spec)}))}))),S=x(()=>t.item.path.split(/(\{[^}]+\})/g).map(l=>({text:l,isParam:l.startsWith("{")})));function w(l){return l.startsWith("2")?"text-success":l.startsWith("3")?"text-info":l.startsWith("4")?"text-warning":l.startsWith("5")?"text-error":"text-muted"}return(l,d)=>{const C=ee,q=xe,L=le,I=ht;return n(),a("div",{id:e.item.anchor,class:"border border-default rounded-lg bg-elevated/20 scroll-mt-20"},[i("button",{type:"button",class:"w-full flex items-center gap-3 px-3 py-2.5 text-left cursor-pointer","aria-expanded":s(r),onClick:d[0]||(d[0]=_=>r.value=!s(r))},[$(C,{color:("methodBadgeColor"in l?l.methodBadgeColor:s(Ce))(e.item.method),variant:"subtle",class:"font-mono uppercase shrink-0 w-16 justify-center"},{default:P(()=>[R(c(e.item.method),1)]),_:1},8,["color"]),i("code",yt,[(n(!0),a(B,null,T(s(S),(_,m)=>(n(),a("span",{key:m,class:G(_.isParam?"text-warning":"")},c(_.text),3))),128))]),i("span",gt,c(e.item.operation.summary),1),s(p)?.elevated?(n(),U(C,{key:0,color:"warning",variant:"subtle",size:"sm",icon:"i-lucide-shield",class:"shrink-0 ml-auto sm:ml-0",title:`Requires role: ${s(p).label}`},{default:P(()=>[R(c(s(p).shortLabel),1)]),_:1},8,["title"])):s(u)?(n(),U(C,{key:1,color:"neutral",variant:"subtle",size:"sm",class:"shrink-0 ml-auto sm:ml-0"},{default:P(()=>[...d[1]||(d[1]=[R(" Public ",-1)])]),_:1})):s(o)?(n(),U(q,{key:2,name:"i-lucide-lock",class:"size-3.5 text-dimmed shrink-0 ml-auto sm:ml-0",title:"Requires authentication"})):g("",!0),$(q,{name:s(r)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-4 text-dimmed shrink-0"},null,8,["name"])],8,xt),s(r)?(n(),a("div",bt,[e.item.operation.summary?(n(),a("p",vt,c(e.item.operation.summary),1)):g("",!0),e.item.operation.description?(n(),a("p",kt,c(e.item.operation.description),1)):g("",!0),s(v)?(n(),a("div",$t,[$(q,{name:s(p)?.elevated?"i-lucide-shield":"i-lucide-users",class:"size-3.5 text-dimmed shrink-0"},null,8,["name"]),d[2]||(d[2]=i("span",{class:"text-dimmed"},"Access",-1)),i("span",wt,c(s(v)),1)])):g("",!0),(n(!0),a(B,null,T([{label:"Path parameters",params:s(f)},{label:"Query parameters",params:s(y)},{label:"Header parameters",params:s(A)}],_=>(n(),a(B,{key:_.label},[_.params.length?(n(),a("div",At,[i("h4",jt,c(_.label),1),i("div",Ut,[(n(!0),a(B,null,T(_.params,m=>(n(),a("div",{key:m.name,class:"text-sm"},[i("div",St,[i("code",Ct,c(m.name),1),i("span",Ot,c(("schemaTypeLabel"in l?l.schemaTypeLabel:s(te))(m.schema)),1),m.required?(n(),a("span",qt,"required")):g("",!0)]),m.description?(n(),a("p",Bt,c(m.description),1)):g("",!0),m.schema?.enum?.length?(n(),a("p",Rt,[d[3]||(d[3]=R(" Allowed values: ",-1)),i("span",Tt,c(m.schema.enum.map(V=>JSON.stringify(V)).join(", ")),1)])):g("",!0)]))),128))])])):g("",!0)],64))),128)),s(h).length?(n(),a("div",Pt,[d[4]||(d[4]=i("h4",{class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},"Request body",-1)),(n(!0),a(B,null,T(s(h),_=>(n(),a("div",{key:_.contentType,class:"space-y-1.5"},[i("code",Vt,c(_.contentType),1),_.schema?(n(),U(L,{key:0,schema:_.schema,spec:e.spec},null,8,["schema","spec"])):g("",!0)]))),128))])):g("",!0),s(j).length?(n(),a("div",Lt,[d[5]||(d[5]=i("h4",{class:"text-xs font-semibold uppercase tracking-wide text-dimmed"},"Responses",-1)),(n(!0),a(B,null,T(s(j),_=>(n(),a("div",{key:_.status,class:"text-sm"},[i("div",zt,[i("code",{class:G(["font-mono font-semibold",w(_.status)])},c(_.status),3),i("span",It,c(_.description),1)]),(n(!0),a(B,null,T(_.entries,m=>(n(),a("div",{key:m.contentType,class:"mt-1 pl-3 border-l border-default"},[i("code",Nt,c(m.contentType),1),m.schema?(n(),U(L,{key:0,schema:m.schema,spec:e.spec,class:"mt-1"},null,8,["schema","spec"])):g("",!0)]))),128))]))),128))])):g("",!0),$(I,{item:e.item,spec:e.spec},null,8,["item","spec"])])):g("",!0)],8,_t)}}}),Et=Object.assign(Dt,{__name:"ApiOperation"}),Jt={class:"max-w-4xl mx-auto px-4 sm:px-6 py-6 space-y-6"},Mt={class:"space-y-3"},Ht={class:"flex flex-wrap items-center gap-2"},Wt={class:"text-xl font-semibold text-highlighted"},Ft={key:0,class:"text-sm text-muted"},Gt={key:1,class:"flex items-center gap-2 text-sm"},Qt={class:"flex flex-wrap items-center gap-2"},Xt={class:"text-xs text-dimmed"},Zt={key:0,class:"flex flex-wrap gap-1.5"},Kt=["href"],Yt={class:"text-dimmed"},es={key:1,class:"space-y-8"},ts=["id"],ss={class:"text-sm font-semibold uppercase tracking-wide text-dimmed"},ns={class:"text-dimmed/60"},os=H({__name:"ApiReference",props:{spec:{},specUrl:{}},setup(e){const t=e,{copy:r,copied:o}=je(),{isDesktop:u,download:p}=re(),v=N("");function f(w){u&&(w.preventDefault(),p(t.specUrl,"piwi-openapi.json"))}const y=x(()=>qe(t.spec)),A=x(()=>y.value.reduce((w,l)=>w+l.operations.length,0)),h=x(()=>{const w=v.value.trim().toLowerCase();return w?y.value.map(l=>({tag:l.tag,operations:l.operations.filter(d=>`${d.method} ${d.path} ${d.operation.summary??""} ${d.operation.description??""} ${d.tag}`.toLowerCase().includes(w))})).filter(l=>l.operations.length>0):y.value}),j=x(()=>t.spec.servers?.[0]?.url??"");function S(w){return`tag-${w.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}`}return(w,l)=>{const d=ee,C=Y,q=be,L=oe,I=Et,_=Ae;return n(),a("div",Jt,[i("header",Mt,[i("div",Ht,[i("h1",Wt,c(e.spec.info?.title??"API Reference"),1),e.spec.info?.version?(n(),U(d,{key:0,color:"neutral",variant:"subtle",class:"font-mono"},{default:P(()=>[R(" v"+c(e.spec.info.version),1)]),_:1})):g("",!0)]),e.spec.info?.description?(n(),a("p",Ft,c(e.spec.info.description),1)):g("",!0),s(j)?(n(),a("div",Gt,[l[2]||(l[2]=i("span",{class:"text-dimmed"},"Base URL",-1)),$(C,{label:s(j),color:"neutral",variant:"subtle",size:"xs",icon:s(o)?"i-lucide-check":"i-lucide-copy",class:"font-mono",onClick:l[0]||(l[0]=m=>s(r)(s(j),{toast:!0}))},null,8,["label","icon"])])):g("",!0),i("div",Qt,[$(C,{to:e.specUrl,target:"_blank",external:"",color:"neutral",variant:"outline",size:"xs",icon:"i-lucide-file-json",label:"Raw OpenAPI spec",onClick:f},null,8,["to"]),i("span",Xt,c(s(A))+" endpoints",1)]),$(q,{color:"info",variant:"subtle",icon:"i-lucide-terminal",title:"Windows users",description:"curl examples below use Unix syntax — run them in Git Bash / WSL, or use PowerShell's Invoke-RestMethod instead."})]),$(L,{modelValue:s(v),"onUpdate:modelValue":l[1]||(l[1]=m=>Z(v)?v.value=m:null),icon:"i-lucide-search",placeholder:"Filter endpoints by path, method, or description…",size:"md",class:"w-full",ui:{root:"sticky top-0 z-10"}},null,8,["modelValue"]),!s(v)&&s(y).length>1?(n(),a("div",Zt,[(n(!0),a(B,null,T(s(y),m=>(n(),a("a",{key:m.tag,href:`#${S(m.tag)}`,class:"text-xs px-2 py-1 rounded-md bg-elevated text-muted hover:text-highlighted hover:bg-accented transition-colors"},[R(c(m.tag)+" ",1),i("span",Yt,c(m.operations.length),1)],8,Kt))),128))])):g("",!0),s(h).length?(n(),a("div",es,[(n(!0),a(B,null,T(s(h),m=>(n(),a("section",{key:m.tag,id:S(m.tag),class:"space-y-2 scroll-mt-4"},[i("h2",ss,[R(c(m.tag)+" ",1),i("span",ns,"("+c(m.operations.length)+")",1)]),(n(!0),a(B,null,T(m.operations,V=>(n(),U(I,{key:V.anchor,item:V,spec:e.spec},null,8,["item","spec"]))),128))],8,ts))),128))])):(n(),U(_,{key:2,icon:"i-lucide-search-x",text:"No endpoints match your filter."}))])}}}),as=Object.assign(os,{__name:"ApiReference"}),rs={key:1,class:"p-6"},is={class:"flex flex-wrap justify-center gap-2 mt-1"},ws=H({__name:"docs",setup(e){const r=ae().public.demoMode,o=r?"/demo/_openapi.json":"/_openapi.json",{isDesktop:u,download:p}=re();function v(j){u&&(j.preventDefault(),p(o,"piwi-openapi.json"))}ye({title:"API Reference — Piwi Dashboard"});const{data:f,status:y,error:A,refresh:h}=Ue(o,{key:"openapi-spec",lazy:!0,server:!r},"$4tSR2TuzBP");return(j,S)=>{const w=me,l=de,d=fe,C=he,q=Y,L=ge,I=as,_=pe;return n(),U(_,{id:"docs"},{header:P(()=>[$(d,null,{leading:P(()=>[$(w),$(l,{items:[{label:"API Reference",icon:"i-lucide-book-open"}]})]),_:1})]),body:P(()=>[s(y)==="pending"||!s(f)&&!s(A)?(n(),U(C,{key:0,text:"Loading API reference…"})):s(A)||!s(f)?(n(),a("div",rs,[$(L,{text:"Couldn't load the API reference UI."},{action:P(()=>[S[3]||(S[3]=i("p",{class:"text-sm text-muted max-w-sm"},"The raw OpenAPI spec is still available directly.",-1)),i("div",is,[$(q,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:S[0]||(S[0]=()=>s(h)())},{default:P(()=>[...S[1]||(S[1]=[R(" Retry ",-1)])]),_:1}),$(q,{to:s(o),target:"_blank",external:"",size:"sm",variant:"outline",icon:"i-lucide-file-json",onClick:v},{default:P(()=>[...S[2]||(S[2]=[R(" Raw OpenAPI spec ",-1)])]),_:1},8,["to"])])]),_:1})])):(n(),U(I,{key:2,spec:s(f),"spec-url":s(o)},null,8,["spec","spec-url"]))]),_:1})}}});export{ws as default};
@@ -0,0 +1,2 @@
1
+ import{d as _,o as l,e as p,f as u,h as d,_ as f,i as g,b as a,v as o}from"./BzBaMPgu.js";import{_ as v}from"./BSKLNgre.js";import{g as x}from"./qeqzb80l.js";const h=_({__name:"EnvManagedBadge",props:{envVars:{},size:{default:"sm"}},setup(r){const s=r,i=o(()=>{switch(s.size){case"xs":return"size-3";case"md":return"size-4";default:return"size-3.5"}}),c=o(()=>{if(!s.envVars?.length)return"Managed by environment variable";const e=s.envVars.map(n=>{const t=x(n).description;return t?`${n} — ${t}`:n});return e.length===1?`Set via ${e[0]}`:["Set via environment variables:",...e].join(`
2
+ `)});return(e,n)=>{const t=f,m=v;return l(),p(m,{text:a(c),ui:{content:"whitespace-pre-line max-w-sm"}},{default:u(()=>[d(t,{name:"i-lucide-lock",class:g(["text-gray-400",a(i)])},null,8,["class"])]),_:1},8,["text"])}}}),$=Object.assign(h,{__name:"EnvManagedBadge"});export{$ as _};
@@ -1 +1 @@
1
- import{d as n,o as s,c as o,j as c,p as r,i as l,t as i,V as d,q as m}from"./C5TrTuWv.js";const _={class:"text-sm text-red-500"},p=n({__name:"ErrorState",props:{text:{},icon:{default:"i-lucide-circle-alert"},padded:{type:Boolean,default:!0}},setup(e){return(t,u)=>{const a=r;return s(),o("div",{role:"alert",class:m(["flex flex-col items-center justify-center gap-2 text-center",e.padded&&"p-4"])},[c(a,{name:e.icon,class:"size-5 text-red-400"},null,8,["name"]),l("p",_,i(e.text),1),d(t.$slots,"action")],2)}}}),f=Object.assign(p,{__name:"ErrorState"});export{f as _};
1
+ import{d as n,o as s,c as o,h as c,_ as r,g as l,t as i,V as d,i as m}from"./BzBaMPgu.js";const _={class:"text-sm text-red-500"},p=n({__name:"ErrorState",props:{text:{},icon:{default:"i-lucide-circle-alert"},padded:{type:Boolean,default:!0}},setup(e){return(t,u)=>{const a=r;return s(),o("div",{role:"alert",class:m(["flex flex-col items-center justify-center gap-2 text-center",e.padded&&"p-4"])},[c(a,{name:e.icon,class:"size-5 text-red-400"},null,8,["name"]),l("p",_,i(e.text),1),d(t.$slots,"action")],2)}}}),f=Object.assign(p,{__name:"ErrorState"});export{f as _};
@@ -1,2 +1,2 @@
1
- import{r as f,h as l}from"./C5TrTuWv.js";const d="piwi-diagnosis-notifications";function I(){const i=f("default"),s=new Set,t=f(!0);"Notification"in window&&(i.value=Notification.permission),localStorage.getItem(d)==="false"&&(t.value=!1);const n=l(()=>"Notification"in window),c=l(()=>n.value&&i.value==="granted"&&t.value);async function m(){if(!n.value)return;const e=await Notification.requestPermission();i.value=e}function g(){t.value=!t.value,localStorage.setItem(d,String(t.value))}function v(e,o){r({clusterId:o,summary:e.summary,rootCause:e.rootCause,category:e.category,confidence:e.confidence})}function r(e){if(!c.value||s.has(e.clusterId))return;const o=[e.summary||e.rootCause];e.category&&o.push(`Category: ${e.category}`),e.confidence&&o.push(`Confidence: ${e.confidence}`);const u=o.join(`
1
+ import{r as f,v as l}from"./BzBaMPgu.js";const d="piwi-diagnosis-notifications";function I(){const i=f("default"),s=new Set,t=f(!0);"Notification"in window&&(i.value=Notification.permission),localStorage.getItem(d)==="false"&&(t.value=!1);const n=l(()=>"Notification"in window),c=l(()=>n.value&&i.value==="granted"&&t.value);async function m(){if(!n.value)return;const e=await Notification.requestPermission();i.value=e}function g(){t.value=!t.value,localStorage.setItem(d,String(t.value))}function v(e,o){r({clusterId:o,summary:e.summary,rootCause:e.rootCause,category:e.category,confidence:e.confidence})}function r(e){if(!c.value||s.has(e.clusterId))return;const o=[e.summary||e.rootCause];e.category&&o.push(`Category: ${e.category}`),e.confidence&&o.push(`Confidence: ${e.confidence}`);const u=o.join(`
2
2
  `);if(!u)return;const a=new Notification("Piwi diagnosis complete",{body:u,tag:`diagnosis-${e.clusterId}`,icon:"/logo.svg"});a.onclick=()=>{window.focus(),a.close()},s.add(e.clusterId)}return{permission:i,supported:n,active:c,requestPermission:m,toggleEnabled:g,notify:v,notifyFromPayload:r}}export{I as u};
@@ -1 +1 @@
1
- import{r as C,J as I,bk as N,an as D,bl as X,L as G,aT as K,$ as Y,a3 as U,a6 as Q,bb as Z,a4 as V,a5 as H,o as W,f as F,W as ee,k as p,_ as te,h as z,a8 as J,bm as oe,l as R,g as ne,V as ie,q as ae,X as re}from"./C5TrTuWv.js";const se=3456e4;function le(e,a,t){const n=e.indexOf(";",a);return n===-1?t:n}function ue(e,a,t){const n=e.indexOf("=",a);return n<t?n:-1}function M(e,a,t){if(a===t)return"";let n=a,i=t;do{const l=e.charCodeAt(n);if(l!==32&&l!==9)break}while(++n<i);for(;i>n;){const l=e.charCodeAt(i-1);if(l!==32&&l!==9)break;i--}return e.slice(n,i)}const ce=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function de(e,a){const t=new ce,n=e.length;if(n<2)return t;const i=a?.decode||fe,l=a?.allowMultiple||!1;let o=0;do{const c=ue(e,o,n);if(c===-1)break;const u=le(e,o,n);if(c>u){o=e.lastIndexOf(";",c-1)+1;continue}const r=M(e,o,c);if(a?.filter&&!a.filter(r)){o=u+1;continue}const f=i(M(e,c+1,u));if(l){const d=t[r];d===void 0?t[r]=f:Array.isArray(d)?d.push(f):t[r]=[d,f]}else t[r]===void 0&&(t[r]=f);o=u+1}while(o<n);return t}function fe(e){if(!e.includes("%"))return e;try{return decodeURIComponent(e)}catch{return e}}const pe=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,ve=/^[\u0021-\u003A\u003C-\u007E]*$/,he=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,me=/^[\u0020-\u003A\u003C-\u007E]*$/,ge=Object.prototype.toString;function $(e,a,t){const n=typeof e=="object"&&e!==null,i=n?a:t,l=i?.stringify||JSON.stringify,o=n?e:{...t,name:e,value:a==null?"":typeof a=="string"?a:l(a)},c=i?.encode||encodeURIComponent;if(!pe.test(o.name))throw new TypeError(`argument name is invalid: ${o.name}`);const u=o.value?c(o.value):"";if(!ve.test(u))throw new TypeError(`argument val is invalid: ${o.value}`);if(!o.secure){if(o.partitioned)throw new TypeError("Partitioned cookies must have the Secure attribute");if(o.sameSite&&String(o.sameSite).toLowerCase()==="none")throw new TypeError("SameSite=None cookies must have the Secure attribute");if(o.name.length>9&&o.name.charCodeAt(0)===95&&o.name.charCodeAt(1)===95){const f=o.name.toLowerCase();if(f.startsWith("__secure-")||f.startsWith("__host-"))throw new TypeError(`${o.name} cookies must have the Secure attribute`)}}if(o.name.length>7&&o.name.charCodeAt(0)===95&&o.name.charCodeAt(1)===95&&o.name.toLowerCase().startsWith("__host-")){if(o.path!=="/")throw new TypeError("__Host- cookies must have Path=/");if(o.domain)throw new TypeError("__Host- cookies must not have a Domain attribute")}let r=o.name+"="+u;if(o.maxAge!==void 0){if(!Number.isInteger(o.maxAge))throw new TypeError(`option maxAge is invalid: ${o.maxAge}`);r+="; Max-Age="+Math.max(0,Math.min(o.maxAge,se))}if(o.domain){if(!he.test(o.domain))throw new TypeError(`option domain is invalid: ${o.domain}`);r+="; Domain="+o.domain}if(o.path){if(!me.test(o.path))throw new TypeError(`option path is invalid: ${o.path}`);r+="; Path="+o.path}if(o.expires){if(!be(o.expires)||!Number.isFinite(o.expires.valueOf()))throw new TypeError(`option expires is invalid: ${o.expires}`);r+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(r+="; HttpOnly"),o.secure&&(r+="; Secure"),o.partitioned&&(r+="; Partitioned"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():void 0){case"low":r+="; Priority=Low";break;case"medium":r+="; Priority=Medium";break;case"high":r+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${o.priority}`)}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:case"strict":r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"none":r+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${o.sameSite}`)}return r}function be(e){return ge.call(e)==="[object Date]"}function g(e){if(typeof e!="object")return e;var a,t,n=Object.prototype.toString.call(e);if(n==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){t=new e.constructor;for(a in e)e.hasOwnProperty(a)&&t[a]!==e[a]&&(t[a]=g(e[a]))}else{t={};for(a in e)a==="__proto__"?Object.defineProperty(t,a,{value:g(e[a]),configurable:!0,enumerable:!0,writable:!0}):t[a]=g(e[a])}return t}if(n==="[object Array]"){for(a=e.length,t=Array(a);a--;)t[a]=g(e[a]);return t}return n==="[object Set]"?(t=new Set,e.forEach(function(i){t.add(g(i))}),t):n==="[object Map]"?(t=new Map,e.forEach(function(i,l){t.set(g(l),g(i))}),t):n==="[object Date]"?new Date(+e):n==="[object RegExp]"?(t=new RegExp(e.source,e.flags),t.lastIndex=e.lastIndex,t):n==="[object DataView]"?new e.constructor(g(e.buffer)):n==="[object ArrayBuffer]"?e.slice(0):n.slice(-6)==="Array]"?new e.constructor(e):e}function ye(e){if(e!=="undefined")try{const a=JSON.parse(e);return typeof a=="number"&&String(a)!==e?e:a}catch{return e}}const Se={path:"/",watch:!0,decode:e=>e&&ye(decodeURIComponent(e)),encode:e=>{if(typeof e!="string"||e==="undefined")return encodeURIComponent(JSON.stringify(e));try{if(typeof JSON.parse(e)!="string")return encodeURIComponent(JSON.stringify(e))}catch{}return encodeURIComponent(e)},refresh:!1},j=globalThis.cookieStore;function we(e,a){const t={...Se,...a};t.filter??=r=>r===e;const n=B(t)||{};let i;t.maxAge!==void 0?i=t.maxAge*1e3:t.expires&&(i=t.expires.getTime()-Date.now());const l=i!==void 0&&i<=0,o=l||n[e]===void 0||n[e]===null,c=g(l?void 0:n[e]??t.default?.()),u=i&&!l?Oe(c,i,t.watch&&t.watch!=="shallow"):C(c);{let r=null;try{!j&&typeof BroadcastChannel<"u"&&(r=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const f=(h=!1)=>{if(!h&&(t.readonly||K(u.value,n[e])))return;const b=u.value===null||u.value===void 0?void 0:t.encode(u.value);Ee(e,b,t),n[e]=g(u.value),r?.postMessage({value:t.encode(u.value)})},d=h=>{const b=h.refresh?B(t)?.[e]:t.decode(h.value);y=!0,u.value=b,n[e]=g(b),G(()=>{y=!1})};let y=!1;const S=!!N();if(S&&D(()=>{y=!0,f(),r?.close()}),j){const h=b=>{const A=b.changed.find(E=>E.name===e),L=b.deleted.find(E=>E.name===e);A&&d({value:A.value}),L&&d({value:null})};j.addEventListener("change",h),S&&D(()=>j.removeEventListener("change",h))}else r&&(r.onmessage=({data:h})=>d(h));t.watch&&I(u,()=>{y||f(t.refresh)},{deep:t.watch!=="shallow"}),o&&f(o)}return u}function B(e={}){return de(document.cookie,e)}const Ce=e=>e;function ke(e){const{encode:a,decode:t,...n}=e;return{...n,encode:Ce}}function ze(e,a,t={}){const n=ke(t);return a===void 0?$(e,"",{...n,maxAge:-1}):$(e,a,n)}function Ee(e,a,t={}){document.cookie=ze(e,a,t)}const P=2147483647;function Oe(e,a,t){let n,i,l=0;const o=t?C(e):{value:e};return N()&&D(()=>{i?.(),clearTimeout(n)}),X((c,u)=>{t&&(i=I(o,u));function r(){const d=a-l,y=d<P?d:P;n=setTimeout(()=>{if(l+=y,l<a)return r();o.value=void 0,u()},y)}function f(){l=0,clearTimeout(n),r()}return{get(){return c(),o.value},set(d){f(),o.value=d,u()}}})}const[Te,xe]=Y("DashboardGroup"),qe={base:"lg:hidden",variants:{side:{left:"",right:""}}},Re=Object.assign({inheritAttrs:!1},{__name:"UDashboardSidebarToggle",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"},side:{type:String,required:!1,default:"left"},ui:{type:Object,required:!1},label:{type:String,required:!1},activeColor:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},class:{type:null,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},exactActiveClass:{type:String,required:!1},viewTransition:{type:Boolean,required:!1}},setup(e){const t=U("dashboardSidebarToggle",e),n=Q(Z(t,"icon","side","class")),{t:i}=V(),l=H(),{sidebarOpen:o,toggleSidebar:c}=Te({sidebarOpen:C(!1),toggleSidebar:()=>{}}),u=z(()=>J({extend:qe,...l.ui?.dashboardSidebarToggle||{}}));return(r,f)=>(W(),F(te,ee({...p(n),icon:p(t).icon||(p(o)?p(l).ui.icons.close:p(l).ui.icons.menu),"aria-label":p(o)?p(i)("dashboardSidebarToggle.close"):p(i)("dashboardSidebarToggle.open"),...r.$attrs},{class:u.value({class:[p(t).ui?.base,p(t).class],side:p(t).side}),onClick:p(c)}),null,16,["class","onClick"]))}});function je(e,a={},{collapsed:t=C(!1)}={}){const n=C(null),i=z(()=>({side:"left",minSize:0,maxSize:100,defaultSize:0,storage:"cookie",persistent:!0,collapsible:!1,collapsedSize:0,resizable:!0,unit:"%",...R(a)?a.value:a})),{dir:l}=V(),o={size:i.value.defaultSize,collapsed:p(t)??!1},c=i.value.persistent&&(i.value.resizable||i.value.collapsible)?i.value.storage==="cookie"?we(e,{...i.value.storageOptions,default:()=>o}):oe(e,o,void 0,i.value.storageOptions):C(o),u=s=>{c.value?Object.assign(c.value,s):c.value={...o,...s}},r=z({get:()=>c.value?.collapsed??o.collapsed,set:s=>{i.value.collapsible&&(R(t)&&(t.value=s),u({collapsed:s}))}}),f=C(i.value.defaultSize),d=z({get:()=>c.value?.size??i.value.defaultSize,set:s=>{u({size:s})}}),y=z(()=>r.value?i.value.collapsedSize:d.value),S=C(!1),h=()=>i.value.unit==="rem"?Number.parseFloat(getComputedStyle(document.documentElement).fontSize):1,b=(s,v,O,T)=>{if(!n.value||!i.value.resizable)return;const q=n.value.parentElement?.offsetWidth||1,k=l.value==="rtl";let m;k?m=i.value.side==="left"?v-s:s-v:m=i.value.side==="left"?s-v:v-s;const w=O+m;let _;if(i.value.unit==="rem"?_=w/T:i.value.unit==="px"?_=w:_=w/q*100,i.value.collapsible&&_<i.value.collapsedSize+4){x(!0);return}else r.value&&x(!1);d.value=Math.min(i.value.maxSize,Math.max(i.value.minSize,_))},A=s=>{if(!n.value||!i.value.resizable)return;s.preventDefault(),s.stopPropagation();const v=n.value.getBoundingClientRect().width;if(!v)return;const O=s.clientX,T=v,q=h();S.value=!0;const k=w=>{b(w.clientX,O,T,q)},m=()=>{S.value=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",m)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",m)},L=s=>{if(!n.value||!i.value.resizable||!s.touches[0])return;s.preventDefault(),s.stopPropagation();const v=n.value.getBoundingClientRect().width;if(!v)return;const O=s.touches[0].clientX,T=v,q=h();S.value=!0;const k=w=>{w.touches[0]&&b(w.touches[0].clientX,O,T,q)},m=()=>{S.value=!1,document.removeEventListener("touchmove",k),document.removeEventListener("touchend",m),document.removeEventListener("touchcancel",m)};document.addEventListener("touchmove",k,{passive:!1}),document.addEventListener("touchend",m),document.addEventListener("touchcancel",m)},E=s=>{!n.value||!i.value.resizable||(s.preventDefault(),s.stopPropagation(),r.value&&x(!1),d.value=i.value.defaultSize)},x=s=>{if(!i.value.collapsible)return;const v=s??!r.value;v&&!r.value?f.value=d.value:!v&&r.value&&(d.value=f.value),r.value=v};return R(t)&&c.value?.collapsed&&(t.value=c.value.collapsed),R(t)&&I(t,s=>{i.value.collapsible&&c.value?.collapsed!==s&&(r.value=s)}),{el:n,size:y,isDragging:S,isCollapsed:r,onMouseDown:A,onTouchStart:L,onDoubleClick:E,collapse:x}}const _e={base:"hidden lg:block touch-none select-none cursor-ew-resize relative before:absolute before:inset-y-0 before:-left-1.5 before:-right-1.5 before:z-1"},Le={__name:"UDashboardResizeHandle",props:{as:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(e){const t=U("dashboardResizeHandle",e),n=H(),i=z(()=>J({extend:_e,...n.ui?.dashboardResizeHandle||{}}));return(l,o)=>(W(),F(p(re),{as:p(t).as,role:"separator",class:ae(i.value({class:[p(t).ui?.base,p(t).class]}))},{default:ne(()=>[ie(l.$slots,"default")]),_:3},8,["as","class"]))}};export{Re as _,Te as a,je as b,Le as c,xe as p,we as u};
1
+ import{r as C,a as I,bj as N,an as D,bk as J,L as G,aS as K,$ as Y,a3 as U,a6 as Q,ba as Z,a4 as V,a5 as H,o as W,e as F,W as ee,b as p,j as te,v as k,a8 as X,bl as oe,x as j,f as ne,V as ie,i as ae,X as re}from"./BzBaMPgu.js";const se=3456e4;function le(e,a,t){const n=e.indexOf(";",a);return n===-1?t:n}function ue(e,a,t){const n=e.indexOf("=",a);return n<t?n:-1}function M(e,a,t){if(a===t)return"";let n=a,i=t;do{const l=e.charCodeAt(n);if(l!==32&&l!==9)break}while(++n<i);for(;i>n;){const l=e.charCodeAt(i-1);if(l!==32&&l!==9)break;i--}return e.slice(n,i)}const ce=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function de(e,a){const t=new ce,n=e.length;if(n<2)return t;const i=a?.decode||fe,l=a?.allowMultiple||!1;let o=0;do{const c=ue(e,o,n);if(c===-1)break;const u=le(e,o,n);if(c>u){o=e.lastIndexOf(";",c-1)+1;continue}const r=M(e,o,c);if(a?.filter&&!a.filter(r)){o=u+1;continue}const f=i(M(e,c+1,u));if(l){const d=t[r];d===void 0?t[r]=f:Array.isArray(d)?d.push(f):t[r]=[d,f]}else t[r]===void 0&&(t[r]=f);o=u+1}while(o<n);return t}function fe(e){if(!e.includes("%"))return e;try{return decodeURIComponent(e)}catch{return e}}const pe=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,ve=/^[\u0021-\u003A\u003C-\u007E]*$/,he=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,me=/^[\u0020-\u003A\u003C-\u007E]*$/,ge=Object.prototype.toString;function $(e,a,t){const n=typeof e=="object"&&e!==null,i=n?a:t,l=i?.stringify||JSON.stringify,o=n?e:{...t,name:e,value:a==null?"":typeof a=="string"?a:l(a)},c=i?.encode||encodeURIComponent;if(!pe.test(o.name))throw new TypeError(`argument name is invalid: ${o.name}`);const u=o.value?c(o.value):"";if(!ve.test(u))throw new TypeError(`argument val is invalid: ${o.value}`);if(!o.secure){if(o.partitioned)throw new TypeError("Partitioned cookies must have the Secure attribute");if(o.sameSite&&String(o.sameSite).toLowerCase()==="none")throw new TypeError("SameSite=None cookies must have the Secure attribute");if(o.name.length>9&&o.name.charCodeAt(0)===95&&o.name.charCodeAt(1)===95){const f=o.name.toLowerCase();if(f.startsWith("__secure-")||f.startsWith("__host-"))throw new TypeError(`${o.name} cookies must have the Secure attribute`)}}if(o.name.length>7&&o.name.charCodeAt(0)===95&&o.name.charCodeAt(1)===95&&o.name.toLowerCase().startsWith("__host-")){if(o.path!=="/")throw new TypeError("__Host- cookies must have Path=/");if(o.domain)throw new TypeError("__Host- cookies must not have a Domain attribute")}let r=o.name+"="+u;if(o.maxAge!==void 0){if(!Number.isInteger(o.maxAge))throw new TypeError(`option maxAge is invalid: ${o.maxAge}`);r+="; Max-Age="+Math.max(0,Math.min(o.maxAge,se))}if(o.domain){if(!he.test(o.domain))throw new TypeError(`option domain is invalid: ${o.domain}`);r+="; Domain="+o.domain}if(o.path){if(!me.test(o.path))throw new TypeError(`option path is invalid: ${o.path}`);r+="; Path="+o.path}if(o.expires){if(!be(o.expires)||!Number.isFinite(o.expires.valueOf()))throw new TypeError(`option expires is invalid: ${o.expires}`);r+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(r+="; HttpOnly"),o.secure&&(r+="; Secure"),o.partitioned&&(r+="; Partitioned"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():void 0){case"low":r+="; Priority=Low";break;case"medium":r+="; Priority=Medium";break;case"high":r+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${o.priority}`)}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:case"strict":r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"none":r+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${o.sameSite}`)}return r}function be(e){return ge.call(e)==="[object Date]"}function g(e){if(typeof e!="object")return e;var a,t,n=Object.prototype.toString.call(e);if(n==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){t=new e.constructor;for(a in e)e.hasOwnProperty(a)&&t[a]!==e[a]&&(t[a]=g(e[a]))}else{t={};for(a in e)a==="__proto__"?Object.defineProperty(t,a,{value:g(e[a]),configurable:!0,enumerable:!0,writable:!0}):t[a]=g(e[a])}return t}if(n==="[object Array]"){for(a=e.length,t=Array(a);a--;)t[a]=g(e[a]);return t}return n==="[object Set]"?(t=new Set,e.forEach(function(i){t.add(g(i))}),t):n==="[object Map]"?(t=new Map,e.forEach(function(i,l){t.set(g(l),g(i))}),t):n==="[object Date]"?new Date(+e):n==="[object RegExp]"?(t=new RegExp(e.source,e.flags),t.lastIndex=e.lastIndex,t):n==="[object DataView]"?new e.constructor(g(e.buffer)):n==="[object ArrayBuffer]"?e.slice(0):n.slice(-6)==="Array]"?new e.constructor(e):e}function ye(e){if(e!=="undefined")try{const a=JSON.parse(e);return typeof a=="number"&&String(a)!==e?e:a}catch{return e}}const Se={path:"/",watch:!0,decode:e=>e&&ye(decodeURIComponent(e)),encode:e=>{if(typeof e!="string"||e==="undefined")return encodeURIComponent(JSON.stringify(e));try{if(typeof JSON.parse(e)!="string")return encodeURIComponent(JSON.stringify(e))}catch{}return encodeURIComponent(e)},refresh:!1},R=globalThis.cookieStore;function we(e,a){const t={...Se,...a};t.filter??=r=>r===e;const n=B(t)||{};let i;t.maxAge!==void 0?i=t.maxAge*1e3:t.expires&&(i=t.expires.getTime()-Date.now());const l=i!==void 0&&i<=0,o=l||n[e]===void 0||n[e]===null,c=g(l?void 0:n[e]??t.default?.()),u=i&&!l?Oe(c,i,t.watch&&t.watch!=="shallow"):C(c);{let r=null;try{!R&&typeof BroadcastChannel<"u"&&(r=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const f=(h=!1)=>{if(!h&&(t.readonly||K(u.value,n[e])))return;const b=u.value===null||u.value===void 0?void 0:t.encode(u.value);Ee(e,b,t),n[e]=g(u.value),r?.postMessage({value:t.encode(u.value)})},d=h=>{const b=h.refresh?B(t)?.[e]:t.decode(h.value);y=!0,u.value=b,n[e]=g(b),G(()=>{y=!1})};let y=!1;const S=!!N();if(S&&D(()=>{y=!0,f(),r?.close()}),R){const h=b=>{const _=b.changed.find(E=>E.name===e),L=b.deleted.find(E=>E.name===e);_&&d({value:_.value}),L&&d({value:null})};R.addEventListener("change",h),S&&D(()=>R.removeEventListener("change",h))}else r&&(r.onmessage=({data:h})=>d(h));t.watch&&I(u,()=>{y||f(t.refresh)},{deep:t.watch!=="shallow"}),o&&f(o)}return u}function B(e={}){return de(document.cookie,e)}const Ce=e=>e;function ze(e){const{encode:a,decode:t,...n}=e;return{...n,encode:Ce}}function ke(e,a,t={}){const n=ze(t);return a===void 0?$(e,"",{...n,maxAge:-1}):$(e,a,n)}function Ee(e,a,t={}){document.cookie=ke(e,a,t)}const P=2147483647;function Oe(e,a,t){let n,i,l=0;const o=t?C(e):{value:e};return N()&&D(()=>{i?.(),clearTimeout(n)}),J((c,u)=>{t&&(i=I(o,u));function r(){const d=a-l,y=d<P?d:P;n=setTimeout(()=>{if(l+=y,l<a)return r();o.value=void 0,u()},y)}function f(){l=0,clearTimeout(n),r()}return{get(){return c(),o.value},set(d){f(),o.value=d,u()}}})}const[Te,xe]=Y("DashboardGroup"),qe={base:"lg:hidden",variants:{side:{left:"",right:""}}},je=Object.assign({inheritAttrs:!1},{__name:"UDashboardSidebarToggle",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"},side:{type:String,required:!1,default:"left"},ui:{type:Object,required:!1},label:{type:String,required:!1},activeColor:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},class:{type:null,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},exactActiveClass:{type:String,required:!1},viewTransition:{type:Boolean,required:!1}},setup(e){const t=U("dashboardSidebarToggle",e),n=Q(Z(t,"icon","side","class")),{t:i}=V(),l=H(),{sidebarOpen:o,toggleSidebar:c}=Te({sidebarOpen:C(!1),toggleSidebar:()=>{}}),u=k(()=>X({extend:qe,...l.ui?.dashboardSidebarToggle||{}}));return(r,f)=>(W(),F(te,ee({...p(n),icon:p(t).icon||(p(o)?p(l).ui.icons.close:p(l).ui.icons.menu),"aria-label":p(o)?p(i)("dashboardSidebarToggle.close"):p(i)("dashboardSidebarToggle.open"),...r.$attrs},{class:u.value({class:[p(t).ui?.base,p(t).class],side:p(t).side}),onClick:p(c)}),null,16,["class","onClick"]))}});function Re(e,a={},{collapsed:t=C(!1)}={}){const n=C(null),i=k(()=>({side:"left",minSize:0,maxSize:100,defaultSize:0,storage:"cookie",persistent:!0,collapsible:!1,collapsedSize:0,resizable:!0,unit:"%",...j(a)?a.value:a})),{dir:l}=V(),o={size:i.value.defaultSize,collapsed:p(t)??!1},c=i.value.persistent&&(i.value.resizable||i.value.collapsible)?i.value.storage==="cookie"?we(e,{...i.value.storageOptions,default:()=>o}):oe(e,o,void 0,i.value.storageOptions):C(o),u=s=>{c.value?Object.assign(c.value,s):c.value={...o,...s}},r=k({get:()=>c.value?.collapsed??o.collapsed,set:s=>{i.value.collapsible&&(j(t)&&(t.value=s),u({collapsed:s}))}}),f=C(i.value.defaultSize),d=k({get:()=>c.value?.size??i.value.defaultSize,set:s=>{u({size:s})}}),y=k(()=>r.value?i.value.collapsedSize:d.value),S=C(!1),h=()=>i.value.unit==="rem"?Number.parseFloat(getComputedStyle(document.documentElement).fontSize):1,b=(s,v,O,T)=>{if(!n.value||!i.value.resizable)return;const q=n.value.parentElement?.offsetWidth||1,z=l.value==="rtl";let m;z?m=i.value.side==="left"?v-s:s-v:m=i.value.side==="left"?s-v:v-s;const w=O+m;let A;if(i.value.unit==="rem"?A=w/T:i.value.unit==="px"?A=w:A=w/q*100,i.value.collapsible&&A<i.value.collapsedSize+4){x(!0);return}else r.value&&x(!1);d.value=Math.min(i.value.maxSize,Math.max(i.value.minSize,A))},_=s=>{if(!n.value||!i.value.resizable)return;s.preventDefault(),s.stopPropagation();const v=n.value.getBoundingClientRect().width;if(!v)return;const O=s.clientX,T=v,q=h();S.value=!0;const z=w=>{b(w.clientX,O,T,q)},m=()=>{S.value=!1,document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",m)};document.addEventListener("mousemove",z),document.addEventListener("mouseup",m)},L=s=>{if(!n.value||!i.value.resizable||!s.touches[0])return;s.preventDefault(),s.stopPropagation();const v=n.value.getBoundingClientRect().width;if(!v)return;const O=s.touches[0].clientX,T=v,q=h();S.value=!0;const z=w=>{w.touches[0]&&b(w.touches[0].clientX,O,T,q)},m=()=>{S.value=!1,document.removeEventListener("touchmove",z),document.removeEventListener("touchend",m),document.removeEventListener("touchcancel",m)};document.addEventListener("touchmove",z,{passive:!1}),document.addEventListener("touchend",m),document.addEventListener("touchcancel",m)},E=s=>{!n.value||!i.value.resizable||(s.preventDefault(),s.stopPropagation(),r.value&&x(!1),d.value=i.value.defaultSize)},x=s=>{if(!i.value.collapsible)return;const v=s??!r.value;v&&!r.value?f.value=d.value:!v&&r.value&&(d.value=f.value),r.value=v};return j(t)&&c.value?.collapsed&&(t.value=c.value.collapsed),j(t)&&I(t,s=>{i.value.collapsible&&c.value?.collapsed!==s&&(r.value=s)}),{el:n,size:y,isDragging:S,isCollapsed:r,onMouseDown:_,onTouchStart:L,onDoubleClick:E,collapse:x}}const Ae={base:"hidden lg:block touch-none select-none cursor-ew-resize relative before:absolute before:inset-y-0 before:-left-1.5 before:-right-1.5 before:z-1"},Le={__name:"UDashboardResizeHandle",props:{as:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(e){const t=U("dashboardResizeHandle",e),n=H(),i=k(()=>X({extend:Ae,...n.ui?.dashboardResizeHandle||{}}));return(l,o)=>(W(),F(p(re),{as:p(t).as,role:"separator",class:ae(i.value({class:[p(t).ui?.base,p(t).class]}))},{default:ne(()=>[ie(l.$slots,"default")]),_:3},8,["as","class"]))}};export{je as _,Te as a,Re as b,Le as c,xe as p,we as u};
@@ -1 +1 @@
1
- import{_ as m}from"./BvAfKk6C.js";import{d,o as t,c as r,R as l,i as n,j as s,t as a,s as x,g as k,m as u,v as o}from"./C5TrTuWv.js";const g={class:"p-2 text-sm text-gray-900 dark:text-gray-100 space-y-1"},_={class:"text-xs text-muted"},y={key:0,class:"text-xs"},h={key:1,class:"text-xs text-muted"},p=d({__name:"ChartMarkerTooltip",props:{marker:{},pos:{}},setup(e){return(v,f)=>{const c=m,i=x;return e.marker?(t(),r("div",{key:0,class:"fixed z-50 pointer-events-none bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 max-w-[260px]",style:l({left:`${e.pos.x}px`,top:`${e.pos.y}px`})},[n("div",g,[s(c,{marker:e.marker},null,8,["marker"]),n("div",_,a(new Date(e.marker.occurredAt).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})),1),e.marker.environment?(t(),r("div",y,[s(i,{color:"neutral",variant:"subtle",size:"xs"},{default:k(()=>[u(a(e.marker.environment),1)]),_:1})])):o("",!0),e.marker.description?(t(),r("p",h,a(e.marker.description),1)):o("",!0)])],4)):o("",!0)}}}),B=Object.assign(p,{__name:"ChartMarkerTooltip"});export{B as _};
1
+ import{_ as m}from"./BYnqoVCE.js";import{d,o as t,c as r,R as l,g as n,h as s,t as a,m as x,f as k,k as u,l as o}from"./BzBaMPgu.js";const g={class:"p-2 text-sm text-gray-900 dark:text-gray-100 space-y-1"},_={class:"text-xs text-muted"},h={key:0,class:"text-xs"},y={key:1,class:"text-xs text-muted"},p=d({__name:"ChartMarkerTooltip",props:{marker:{},pos:{}},setup(e){return(f,v)=>{const c=m,i=x;return e.marker?(t(),r("div",{key:0,class:"fixed z-50 pointer-events-none bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 max-w-[260px]",style:l({left:`${e.pos.x}px`,top:`${e.pos.y}px`})},[n("div",g,[s(c,{marker:e.marker},null,8,["marker"]),n("div",_,a(new Date(e.marker.occurredAt).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})),1),e.marker.environment?(t(),r("div",h,[s(i,{color:"neutral",variant:"subtle",size:"xs"},{default:k(()=>[u(a(e.marker.environment),1)]),_:1})])):o("",!0),e.marker.description?(t(),r("p",y,a(e.marker.description),1)):o("",!0)])],4)):o("",!0)}}}),B=Object.assign(p,{__name:"ChartMarkerTooltip"});export{B as _};
@@ -1 +1 @@
1
- import{d as _,f as i,ac as h,g as l,o as s,V as o,i as a,p as k,q as g,v as n,m as c,t as m,c as r,F as p}from"./C5TrTuWv.js";import{_ as y}from"./B69RP95P.js";import{_ as C}from"./C8Paf_V1.js";const $={class:"flex items-start justify-between gap-2"},b={class:"flex items-center gap-2 min-w-0"},x={class:"min-w-0"},v={class:"text-lg font-medium inline-flex items-center gap-1"},w={key:0,class:"text-sm text-gray-500 mt-0.5"},S={key:0,class:"flex items-center gap-1 shrink-0"},B=_({__name:"SectionCard",props:{title:{},icon:{},subtitle:{},count:{},iconClass:{default:"text-primary"},help:{}},setup(t){return(e,V)=>{const u=k,d=y,f=C;return s(),i(f,null,h({header:l(()=>[a("div",$,[a("div",b,[t.icon?(s(),i(u,{key:0,name:t.icon,class:g(["w-5 h-5 shrink-0",t.iconClass])},null,8,["name","class"])):n("",!0),a("div",x,[a("h3",v,[c(m(t.title),1),t.count!=null?(s(),r(p,{key:0},[c(" ("+m(t.count)+")",1)],64)):n("",!0),t.help?(s(),i(d,{key:1,topic:t.help},null,8,["topic"])):n("",!0)]),t.subtitle||e.$slots.subtitle?(s(),r("p",w,[o(e.$slots,"subtitle",{},()=>[c(m(t.subtitle),1)])])):n("",!0)])]),e.$slots.actions?(s(),r("div",S,[o(e.$slots,"actions")])):n("",!0)])]),default:l(()=>[o(e.$slots,"default")]),_:2},[e.$slots.footer?{name:"footer",fn:l(()=>[o(e.$slots,"footer")]),key:"0"}:void 0]),1024)}}}),H=Object.assign(B,{__name:"SectionCard"});export{H as _};
1
+ import{d as _,e as i,ac as h,f as l,o as s,V as o,g as a,_ as k,i as g,l as n,k as c,t as m,c as r,F as y}from"./BzBaMPgu.js";import{_ as p}from"./qeqzb80l.js";import{_ as C}from"./kDEwM7SQ.js";const $={class:"flex items-start justify-between gap-2"},b={class:"flex items-center gap-2 min-w-0"},x={class:"min-w-0"},v={class:"text-lg font-medium inline-flex items-center gap-1"},w={key:0,class:"text-sm text-gray-500 mt-0.5"},S={key:0,class:"flex items-center gap-1 shrink-0"},B=_({__name:"SectionCard",props:{title:{},icon:{},subtitle:{},count:{},iconClass:{default:"text-primary"},help:{}},setup(t){return(e,V)=>{const u=k,d=p,f=C;return s(),i(f,null,h({header:l(()=>[a("div",$,[a("div",b,[t.icon?(s(),i(u,{key:0,name:t.icon,class:g(["w-5 h-5 shrink-0",t.iconClass])},null,8,["name","class"])):n("",!0),a("div",x,[a("h3",v,[c(m(t.title),1),t.count!=null?(s(),r(y,{key:0},[c(" ("+m(t.count)+")",1)],64)):n("",!0),t.help?(s(),i(d,{key:1,topic:t.help},null,8,["topic"])):n("",!0)]),t.subtitle||e.$slots.subtitle?(s(),r("p",w,[o(e.$slots,"subtitle",{},()=>[c(m(t.subtitle),1)])])):n("",!0)])]),e.$slots.actions?(s(),r("div",S,[o(e.$slots,"actions")])):n("",!0)])]),default:l(()=>[o(e.$slots,"default")]),_:2},[e.$slots.footer?{name:"footer",fn:l(()=>[o(e.$slots,"footer")]),key:"0"}:void 0]),1024)}}}),H=Object.assign(B,{__name:"SectionCard"});export{H as _};
@@ -0,0 +1 @@
1
+ import{_ as Y}from"./D5Mhpp98.js";import{_ as Z}from"./Ds8_6Fzl.js";import{_ as tt}from"./DH_LEqhd.js";import{_ as et}from"./BC5bqlfM.js";import{_ as st,a as at}from"./CdLqOMvN.js";import{_ as ot}from"./BMfTUMYy.js";import{d as rt,u as nt,w,a as it,s as lt,e as u,f as a,v as j,o as r,g as i,t as l,b as t,l as d,c as m,h as o,m as ct,k as _,H as ut,j as dt,F as S,z as D,i as mt,_ as _t,r as pt,n as ft}from"./BzBaMPgu.js";import{_ as gt}from"./BF5JDf9_.js";import{_ as ht}from"./Ch8sGLqE.js";import{_ as yt}from"./qeqzb80l.js";import{_ as xt}from"./B-onBCAB.js";import{_ as bt}from"./9Dtlg-K4.js";import{_ as vt}from"./C8WgBDU1.js";import{_ as kt}from"./BSKLNgre.js";import{_ as $t}from"./CBQXv4bU.js";import{_ as jt}from"./B77w1Eib.js";import{_ as Rt}from"./D_j436ND.js";import{_ as Ct}from"./DLwuL-qR.js";import{f as Tt,j as wt}from"./CdM2qNYM.js";import{u as I}from"./CDEmotIt.js";import"./DWz_bHNP.js";import"./BFVrl1ss.js";import"./7vRR5W2L.js";import"./vOZZ2cLi.js";import"./Db5xe__T.js";import"./CnRNwiuE.js";import"./DDho3MJD.js";import"./Bg8yOdSf.js";import"./CTYlay1H.js";import"./C8uZoJVq.js";import"./WCZdf9Ln.js";import"./Boyv6hLW.js";import"./Cmuwgbf4.js";import"./BbXvpkBp.js";import"./BTCWUyBX.js";import"./BcHU1KNK.js";import"./D_SCB-z2.js";import"./BYnqoVCE.js";import"./D7W_4Sqc.js";import"./CbuK1HIv.js";import"./BOrnSpTA.js";import"./kDEwM7SQ.js";const St={class:"flex flex-col gap-4 p-4","data-shot":"test-case-detail"},Dt={class:"flex items-start gap-4 flex-wrap"},It={class:"flex-1 min-w-0"},zt={class:"text-xl font-bold truncate"},Lt={key:1,class:"flex items-center gap-2 mt-2"},Nt={key:0,class:"grid grid-cols-1 lg:grid-cols-2 gap-4"},Pt={class:"flex items-center gap-1 flex-wrap max-h-[200px] overflow-y-auto py-1"},Ut={key:0,class:"text-sm text-gray-400"},Et={key:1,class:"text-center py-6 text-gray-400"},At={class:"text-xs whitespace-nowrap"},Bt={class:"text-gray-500"},Vt={class:"text-gray-400 ml-1"},Ft={key:1,class:"text-gray-400"},Kt=["title"],Ht={class:"flex justify-end"},Mt={class:"space-y-2"},Ot={class:"flex items-center gap-2 min-w-0"},Gt={class:"text-sm truncate"},Qt={key:0,class:"text-xs text-gray-400 shrink-0"},Be=rt({__name:"[id]",async setup(qt){let p,y;const h=nt().params.id,{data:s,refresh:z}=([p,y]=w(()=>I(`/api/test-cases/${h}`,"$IiVoRdAdzb")),p=await p,y(),p),{data:f}=([p,y]=w(()=>I(`/api/test-cases/${h}/history`,"$cuQ0G6KeIS")),p=await p,y(),p),R=pt([]);it(()=>s.value?.project?.id,async n=>{if(n)try{R.value=(await $fetch(`/api/projects/${n}/markers`)).markers??[]}catch{}},{immediate:!0});function L(){const n=s.value?.project?.id;n&&ft(`/projects/${n}?tab=timeline`)}lt(j(()=>({title:`${s.value?.title||`Test case #${h}`} — Piwi Dashboard`})));const x=j(()=>{const n=s.value;return!n||!n.totalRuns?null:Math.round((n.passedRuns+n.skippedRuns)/n.totalRuns*100)}),N=j(()=>s.value?.filePath?[{filePath:s.value.filePath,title:s.value.title,line:null}]:[]),P=n=>n==="open"?"error":n==="resolved"?"success":"neutral",U=[{accessorKey:"startTime",header:"Date"},{accessorKey:"status",header:"Status"},{accessorKey:"duration",header:"Duration"},{accessorKey:"retries",header:"Retries"},{accessorKey:"runId",header:"Run"},{accessorKey:"error",header:"Error"},{id:"actions",header:"Actions"}];return(n,c)=>{const E=Y,A=Z,B=tt,V=et,F=at,K=ot,b=ct,v=dt,k=ut,g=gt,C=ht,H=yt,M=xt,O=bt,T=vt,G=kt,Q=_t,q=$t,J=jt,$=Rt,W=Ct,X=st;return r(),u(X,{id:"test-case-evolution"},{header:a(()=>[o(F,null,{leading:a(()=>[o(E),o(A,{items:[{label:"Home",icon:"i-lucide-house",to:"/"},{label:"Projects",to:"/projects"},...t(s)?.project?.id?[{label:t(s).project.name||"Project",to:`/projects/${t(s).project.id}`}]:[{label:"Project"}],{label:t(s)?.title||`Test case #${t(h)}`}]},null,8,["items"])]),right:a(()=>[o(B,{"project-id":t(s)?.project?.id,"project-label":t(s)?.project?.label??t(s)?.project?.name,cases:t(N),label:"Reproduce locally","preset-options":{mode:"grep",repeatEach:20,trace:!0},class:"mr-2"},null,8,["project-id","project-label","cases"]),o(V,{actions:[{label:"Refresh",icon:"i-lucide-refresh-cw",onClick:()=>t(z)()}]},null,8,["actions"])]),_:1})]),body:a(()=>[i("div",St,[i("div",Dt,[i("div",It,[i("h1",zt,l(t(s)?.title),1),t(s)?.filePath?(r(),u(K,{key:0,"file-path":t(s).filePath,"project-key":t(s)?.project?.id,"project-name":t(s)?.project?.name,class:"text-sm text-gray-500 mt-0.5"},null,8,["file-path","project-key","project-name"])):d("",!0),t(s)?.project?(r(),m("div",Lt,[o(b,{color:"neutral",variant:"soft",size:"xs",class:"font-mono"},{default:a(()=>[_(l(t(s).project.name),1)]),_:1}),t(s)?.flakyRuns>0?(r(),u(b,{key:0,color:"warning",variant:"soft",size:"xs"},{default:a(()=>[_(l(t(s).flakyRuns)+" flaky run"+l(t(s).flakyRuns===1?"":"s"),1)]),_:1})):d("",!0)])):d("",!0)]),t(s)?.lastExecutionId?(r(),u(k,{key:0,to:`/test-run-cases/${t(s).lastExecutionId}`,class:"shrink-0"},{default:a(()=>[o(v,{size:"sm",variant:"outline","trailing-icon":"i-lucide-arrow-right"},{default:a(()=>[...c[0]||(c[0]=[_(" Latest execution ",-1)])]),_:1})]),_:1},8,["to"])):d("",!0)]),o(M,null,{default:a(()=>[o(g,{label:"Total runs",value:t(s)?.totalRuns??0},null,8,["value"]),o(g,{label:"Pass rate",value:t(x)!==null?`${t(x)}%`:"—","value-class":(t(x)??0)>=80?"text-green-600":(t(x)??0)>=50?"text-yellow-600":"text-red-600"},null,8,["value","value-class"]),o(g,{label:"Failed",value:t(s)?.failedRuns??0,"value-class":"text-red-600"},null,8,["value"]),o(g,{label:"Avg duration"},{default:a(()=>[o(C,{ms:t(s)?.avgDuration},null,8,["ms"])]),_:1}),o(g,{label:"Flaky",value:t(s)?.flakyRuns??0,"value-class":(t(s)?.flakyRuns??0)>0?"text-purple-600":""},{label:a(()=>[c[1]||(c[1]=_(" Flaky ",-1)),o(H,{topic:"case.flaky-count"})]),_:1},8,["value","value-class"]),o(g,{label:"Last run",size:"sm",value:t(s)?.lastRunAt?("formatRelativeTime"in n?n.formatRelativeTime:t(Tt))(t(s).lastRunAt):"—"},null,8,["value"])]),_:1}),t(f)&&t(f).length>1?(r(),m("div",Nt,[o(T,{title:"Duration trend",icon:"i-lucide-trending-up",help:"case.history-chart"},{default:a(()=>[o(O,{data:t(f),height:200,markers:t(R),onMarkerClick:L},null,8,["data","markers"])]),_:1}),o(T,{title:"Status history",icon:"i-lucide-check-circle",help:"case.sparkline"},{default:a(()=>[i("div",Pt,[(r(!0),m(S,null,D(t(f),(e,Wt)=>(r(),u(G,{key:e.id,text:`Run #${e.runId}: ${e.status} — ${new Date(e.startTime).toLocaleDateString("en-US",{month:"short",day:"numeric"})}`},{default:a(()=>[o(k,{to:`/test-run-cases/${e.id}`,class:mt([{"bg-red-500 hover:bg-red-600":e.status==="failed"||e.status==="timedOut","bg-green-500 hover:bg-green-600":e.status==="passed","bg-yellow-500 hover:bg-yellow-600":e.status==="skipped","bg-gray-400 hover:bg-gray-500":!["passed","failed","skipped","timedOut"].includes(e.status)},"size-3.5 rounded-sm inline-block transition-colors"]),title:`Run #${e.runId}: ${e.status}`},null,8,["to","class","title"])]),_:2},1032,["text"]))),128)),t(f).length===0?(r(),m("span",Ut,"No history yet")):d("",!0)])]),_:1})])):t(f)&&t(f).length<=1?(r(),m("div",Et,[o(Q,{name:"i-lucide-trending-up",class:"size-6 mx-auto mb-1"}),c[2]||(c[2]=i("p",{class:"text-sm"},"Need at least 2 runs to show trends.",-1))])):d("",!0),o($,{icon:"i-lucide-list-checks",title:`Recent executions (${t(s)?.recentExecutions?.length??0})`},{default:a(()=>[t(s)?.recentExecutions?.length?(r(),u(q,{key:0,data:t(s).recentExecutions,columns:U,ui:{base:"table-fixed border-separate border-spacing-0",thead:"[&>tr]:bg-elevated/50 [&>tr]:after:content-none",tbody:"[&>tr]:last:[&>td]:border-b-0",th:"first:rounded-l-lg last:rounded-r-lg border-y border-default first:border-l last:border-r",td:"border-b border-default"}},{"startTime-cell":a(({row:e})=>[i("span",At,[i("span",Bt,l(new Date(e.original.startTime).toLocaleDateString("en-US",{month:"short",day:"numeric"})),1),i("span",Vt,l(new Date(e.original.startTime).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})),1)])]),"status-cell":a(({row:e})=>[o(b,{color:("getStatusColor"in n?n.getStatusColor:t(wt))(e.original.status),variant:"subtle",class:"capitalize"},{default:a(()=>[_(l(e.original.status),1)]),_:2},1032,["color"])]),"duration-cell":a(({row:e})=>[e.original.duration!==null?(r(),u(C,{key:0,ms:e.original.duration},null,8,["ms"])):(r(),m("span",Ft,"—"))]),"retries-cell":a(({row:e})=>[_(l(e.original.retries&&e.original.retries>0?e.original.retries:""),1)]),"runId-cell":a(({row:e})=>[o(k,{to:`/test-runs/${e.original.runId}`,class:"text-primary hover:underline"},{default:a(()=>[_(l(e.original.runLabel?`${e.original.runLabel} (#${e.original.runId})`:`#${e.original.runId}`),1)]),_:2},1032,["to"])]),"error-cell":a(({row:e})=>[e.original.error?(r(),m("span",{key:0,class:"text-red-600 text-xs truncate max-w-xs block",title:e.original.error},l(e.original.error.length>80?`${e.original.error.substring(0,80)}…`:e.original.error),9,Kt)):d("",!0)]),"actions-header":a(()=>[...c[3]||(c[3]=[i("div",{class:"text-right"},"Actions",-1)])]),"actions-cell":a(({row:e})=>[i("div",Ht,[o(v,{to:`/test-run-cases/${e.original.id}`,size:"sm",variant:"outline","trailing-icon":"i-lucide-arrow-right"},{default:a(()=>[...c[4]||(c[4]=[_(" View ",-1)])]),_:1},8,["to"])])]),_:1},8,["data"])):(r(),u(J,{key:1,icon:"i-lucide-inbox",text:"No executions yet"}))]),_:1},8,["title"]),t(s)?.failureClusters?.length?(r(),u($,{key:2,icon:"i-lucide-bug",title:`Failure clusters (${t(s).failureClusters.length})`,help:"cluster.concept"},{default:a(()=>[i("div",Mt,[(r(!0),m(S,null,D(t(s).failureClusters,e=>(r(),m("div",{key:e.id,class:"flex items-center justify-between py-2 px-2 rounded hover:bg-gray-50 dark:hover:bg-gray-800"},[i("div",Ot,[o(b,{color:P(e.status),variant:"soft",size:"xs",class:"capitalize"},{default:a(()=>[_(l(e.status),1)]),_:2},1032,["color"]),i("span",Gt,l(e.signature),1),e.occurrences>1?(r(),m("span",Qt,l(e.occurrences)+" occurrences ",1)):d("",!0)]),o(v,{to:`/failure-clusters/${e.id}`,size:"xs",variant:"outline","trailing-icon":"i-lucide-arrow-right"},{default:a(()=>[...c[5]||(c[5]=[_(" View ",-1)])]),_:1},8,["to"])]))),128))])]),_:1},8,["title"])):d("",!0),t(s)?.links?.length?(r(),u($,{key:3,icon:"i-lucide-link",title:"Links",help:"shared.entity-links"},{default:a(()=>[o(W,{"entity-type":"test_case","entity-id":Number(t(h)),links:t(s).links??null},null,8,["entity-id","links"])]),_:1})):d("",!0)])]),_:1})}}});export{Be as default};
@@ -0,0 +1 @@
1
+ import{a2 as $,a3 as S,a4 as C,a5 as V,o as a,e as l,f as j,V as c,b as r,aJ as B,W as d,_ as A,i as s,l as o,g as N,c as u,k as m,t as x,F as b,z as w,j as p,X as O,v as P,a8 as F}from"./BzBaMPgu.js";const I={slots:{root:"relative overflow-hidden w-full rounded-lg p-4 flex gap-2.5",wrapper:"min-w-0 flex-1 flex flex-col",title:"text-sm font-medium",description:"text-sm opacity-90",icon:"shrink-0 size-5",avatar:"shrink-0",avatarSize:"2xl",actions:"flex flex-wrap gap-1.5 shrink-0",close:"p-0"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},orientation:{horizontal:{root:"items-center",actions:"items-center"},vertical:{root:"items-start",actions:"items-start mt-2.5"}},title:{true:{description:"mt-1"}}},compoundVariants:[{color:"primary",variant:"solid",class:{root:"bg-primary text-inverted"}},{color:"secondary",variant:"solid",class:{root:"bg-secondary text-inverted"}},{color:"success",variant:"solid",class:{root:"bg-success text-inverted"}},{color:"info",variant:"solid",class:{root:"bg-info text-inverted"}},{color:"warning",variant:"solid",class:{root:"bg-warning text-inverted"}},{color:"error",variant:"solid",class:{root:"bg-error text-inverted"}},{color:"primary",variant:"outline",class:{root:"text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"outline",class:{root:"text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"outline",class:{root:"text-success ring ring-inset ring-success/25"}},{color:"info",variant:"outline",class:{root:"text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"outline",class:{root:"text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"outline",class:{root:"text-error ring ring-inset ring-error/25"}},{color:"primary",variant:"soft",class:{root:"bg-primary/10 text-primary"}},{color:"secondary",variant:"soft",class:{root:"bg-secondary/10 text-secondary"}},{color:"success",variant:"soft",class:{root:"bg-success/10 text-success"}},{color:"info",variant:"soft",class:{root:"bg-info/10 text-info"}},{color:"warning",variant:"soft",class:{root:"bg-warning/10 text-warning"}},{color:"error",variant:"soft",class:{root:"bg-error/10 text-error"}},{color:"primary",variant:"subtle",class:{root:"bg-primary/10 text-primary ring ring-inset ring-primary/25"}},{color:"secondary",variant:"subtle",class:{root:"bg-secondary/10 text-secondary ring ring-inset ring-secondary/25"}},{color:"success",variant:"subtle",class:{root:"bg-success/10 text-success ring ring-inset ring-success/25"}},{color:"info",variant:"subtle",class:{root:"bg-info/10 text-info ring ring-inset ring-info/25"}},{color:"warning",variant:"subtle",class:{root:"bg-warning/10 text-warning ring ring-inset ring-warning/25"}},{color:"error",variant:"subtle",class:{root:"bg-error/10 text-error ring ring-inset ring-error/25"}},{color:"neutral",variant:"solid",class:{root:"text-inverted bg-inverted"}},{color:"neutral",variant:"outline",class:{root:"text-highlighted bg-default ring ring-inset ring-default"}},{color:"neutral",variant:"soft",class:{root:"text-highlighted bg-elevated/50"}},{color:"neutral",variant:"subtle",class:{root:"text-highlighted bg-elevated/50 ring ring-inset ring-accented"}}],defaultVariants:{color:"primary",variant:"solid"}},D={__name:"UAlert",props:{as:{type:null,required:!1},title:{type:String,required:!1},description:{type:String,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},orientation:{type:null,required:!1,default:"vertical"},actions:{type:Array,required:!1},close:{type:[Boolean,Object],required:!1},closeIcon:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},emits:["update:open"],setup(h,{emit:k}){const z=h,q=k,i=$(),t=S("alert",z),{t:_}=C(),f=V(),e=P(()=>F({extend:I,...f.ui?.alert||{}})({color:t.color,variant:t.variant,orientation:t.orientation,title:!!t.title||!!i.title}));return(n,y)=>(a(),l(r(O),{as:r(t).as,"data-orientation":r(t).orientation,"data-slot":"root",class:s(e.value.root({class:[r(t).ui?.root,r(t).class]}))},{default:j(()=>[c(n.$slots,"leading",{ui:e.value},()=>[r(t).avatar?(a(),l(B,d({key:0,size:r(t).ui?.avatarSize||e.value.avatarSize()},r(t).avatar,{"data-slot":"avatar",class:e.value.avatar({class:r(t).ui?.avatar})}),null,16,["size","class"])):r(t).icon?(a(),l(A,{key:1,name:r(t).icon,"data-slot":"icon",class:s(e.value.icon({class:r(t).ui?.icon}))},null,8,["name","class"])):o("",!0)]),N("div",{"data-slot":"wrapper",class:s(e.value.wrapper({class:r(t).ui?.wrapper}))},[r(t).title||i.title?(a(),u("div",{key:0,"data-slot":"title",class:s(e.value.title({class:r(t).ui?.title}))},[c(n.$slots,"title",{},()=>[m(x(r(t).title),1)])],2)):o("",!0),r(t).description||i.description?(a(),u("div",{key:1,"data-slot":"description",class:s(e.value.description({class:r(t).ui?.description}))},[c(n.$slots,"description",{},()=>[m(x(r(t).description),1)])],2)):o("",!0),r(t).orientation==="vertical"&&(r(t).actions?.length||i.actions)?(a(),u("div",{key:2,"data-slot":"actions",class:s(e.value.actions({class:r(t).ui?.actions}))},[c(n.$slots,"actions",{},()=>[(a(!0),u(b,null,w(r(t).actions,(g,v)=>(a(),l(p,d({key:v,size:"xs"},{ref_for:!0},g),null,16))),128))])],2)):o("",!0)],2),r(t).orientation==="horizontal"&&(r(t).actions?.length||i.actions)||r(t).close?(a(),u("div",{key:0,"data-slot":"actions",class:s(e.value.actions({class:r(t).ui?.actions,orientation:"horizontal"}))},[r(t).orientation==="horizontal"&&(r(t).actions?.length||i.actions)?c(n.$slots,"actions",{key:0},()=>[(a(!0),u(b,null,w(r(t).actions,(g,v)=>(a(),l(p,d({key:v,size:"xs"},{ref_for:!0},g),null,16))),128))]):o("",!0),c(n.$slots,"close",{ui:e.value},()=>[r(t).close?(a(),l(p,d({key:0,icon:r(t).closeIcon||r(f).ui.icons.close,color:"neutral",variant:"link","aria-label":r(_)("alert.close")},typeof r(t).close=="object"?r(t).close:{},{"data-slot":"close",class:e.value.close({class:r(t).ui?.close}),onClick:y[0]||(y[0]=g=>q("update:open",!1))}),null,16,["icon","aria-label","class"])):o("",!0)])],2)):o("",!0)]),_:3},8,["as","data-orientation","class"]))}};export{D as _};
@@ -1 +1 @@
1
- import{b1 as l,aT as s}from"./C5TrTuWv.js";function t(r,i){return l(r)?!1:Array.isArray(r)?r.some(a=>s(a,i)):s(r,i)}export{t as i};
1
+ import{b0 as l,aS as s}from"./BzBaMPgu.js";function t(r,i){return l(r)?!1:Array.isArray(r)?r.some(a=>s(a,i)):s(r,i)}export{t as i};
@@ -0,0 +1 @@
1
+ import{_ as Ee,a as Re}from"./DvewDI9t.js";import{d as H,I as le,a as se,o as l,e as w,f as c,g as s,h as r,G,x as W,b as o,c as p,_ as ne,F as U,z as F,i as ie,k as A,t as P,l as x,J as X,r as R,v as D,L as $e,j as re,w as ae,q as Oe,ac as Le,M as z}from"./BzBaMPgu.js";import{_ as Be}from"./qeqzb80l.js";import{_ as me}from"./C8uZoJVq.js";import{_ as fe}from"./CnRNwiuE.js";import{_ as ve}from"./Bg8yOdSf.js";import{_ as ge}from"./DRNHuVn4.js";import{_ as Fe}from"./BbXvpkBp.js";import{h as We}from"./BcHU1KNK.js";import{_ as ye}from"./D_j436ND.js";import{_ as Ne}from"./Ch8sGLqE.js";import{u as oe}from"./CDEmotIt.js";import{_ as De}from"./Die1200X.js";import{p as Xe,g as qe}from"./VqLetC2g.js";import"./Db5xe__T.js";import"./CTYlay1H.js";import"./DDho3MJD.js";import"./WCZdf9Ln.js";import"./Boyv6hLW.js";import"./BSKLNgre.js";import"./kDEwM7SQ.js";import"./CdM2qNYM.js";const je={class:"space-y-3"},Ke={key:0,class:"flex items-center justify-center gap-2 py-8 text-gray-400"},ze={key:1,class:"py-8 text-center text-sm text-gray-400"},He={key:2,class:"max-h-96 overflow-y-auto space-y-px"},Ge=["onClick"],Qe={class:"flex-1 min-w-0"},Ye={class:"text-sm font-medium leading-snug truncate"},Ze={key:0,class:"text-gray-500 font-normal"},Je={class:"text-xs text-gray-400 leading-snug mt-0.5"},et={key:3,class:"italic text-gray-500"},tt={key:0,class:"flex items-center gap-1 shrink-0 pt-0.5"},st=["title"],at=["title"],ot={key:0,class:"py-8 text-center text-sm text-gray-400"},lt=H({__name:"ModelPickerModal",props:X({models:{},selected:{},loading:{type:Boolean}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:X(["select"],["update:open"]),setup(a,{emit:M}){function C(y){return y?y>=1e6?`${(y/1e6).toFixed(1)}M`:y>=1e3?`${Math.round(y/1e3)}K`:String(y):""}const v=a,i=M,I=le(a,"open"),_=R(null),d=R("");se(I,y=>{y&&$e(()=>_.value?.focus())});const n=D(()=>{const y=d.value.toLowerCase();return y?v.models.filter(h=>h.id.toLowerCase().includes(y)||(h.label?.toLowerCase()??"").includes(y)):v.models}),k={image:{icon:"i-lucide-image",label:"Image input"},pdf:{icon:"i-lucide-file-text",label:"PDF input"},code:{icon:"i-lucide-code",label:"Code execution"},thinking:{icon:"i-lucide-brain",label:"Extended thinking"},json:{icon:"i-lucide-braces",label:"Structured output"},text:{icon:"i-lucide-type",label:"Text"},audio:{icon:"i-lucide-music",label:"Audio"}};function V(y){return y.map(h=>{const g=h.indexOf("→");if(g!==-1){const E=h.slice(0,g),O=h.slice(g+1);return{inputs:E.split("+").filter(Boolean),outputs:O.split("+").filter(Boolean)}}return{inputs:[h],outputs:[]}})}function $(y){i("select",y),I.value=!1,d.value=""}return(y,h)=>{const g=G,E=ne,O=Fe;return l(),w(O,{open:I.value,"onUpdate:open":h[1]||(h[1]=f=>I.value=f),title:"Select a model",ui:{content:"max-w-2xl"}},{body:c(()=>[s("div",je,[r(g,{ref_key:"searchInput",ref:_,modelValue:o(d),"onUpdate:modelValue":h[0]||(h[0]=f=>W(d)?d.value=f:null),placeholder:"Search models…",icon:"i-lucide-search",size:"sm"},null,8,["modelValue"]),a.models.length===0&&a.loading?(l(),p("div",Ke,[r(E,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),h[2]||(h[2]=s("span",{class:"text-sm"},"Loading models…",-1))])):a.models.length===0?(l(),p("div",ze," No models available — check your provider configuration ")):(l(),p("div",He,[(l(!0),p(U,null,F(o(n),f=>(l(),p("button",{key:f.id,class:ie(["w-full text-left px-4 py-3 rounded-lg hover:bg-elevated transition-colors border border-transparent hover:border-default flex items-start gap-4",a.selected===f.id?"bg-primary/10 ring-1 ring-inset ring-primary/30 border-primary/30":""]),onClick:b=>$(f.id)},[s("div",Qe,[s("p",Ye,[A(P(f.id)+" ",1),f.label&&f.label!==f.id?(l(),p("span",Ze," — "+P(f.label),1)):x("",!0)]),s("p",Je,[f.contextLength?(l(),p(U,{key:0},[A(P(C(f.contextLength))+" ctx",1)],64)):x("",!0),f.maxTokens?(l(),p(U,{key:1},[A(" · up to "+P(C(f.maxTokens))+" out",1)],64)):x("",!0),f.pricing?.prompt?(l(),p(U,{key:2},[A(" · $"+P(f.pricing.prompt)+" / $"+P(f.pricing.completion??"?")+" per 1M",1)],64)):x("",!0),!f.contextLength&&!f.maxTokens&&!f.pricing?.prompt?(l(),p("span",et,"No additional info")):x("",!0)])]),f.modalities?.length?(l(),p("div",tt,[(l(!0),p(U,null,F(V(f.modalities),b=>(l(),p(U,{key:b.inputs.join()+"→"+b.outputs.join()},[(l(!0),p(U,null,F(b.inputs,T=>(l(),p("span",{key:"in-"+T,title:k[T]?.label??T,class:"inline-flex items-center justify-center size-6 rounded-md bg-gray-100 dark:bg-gray-800 text-gray-500 hover:text-primary transition-colors"},[r(E,{name:k[T]?.icon??"i-lucide-cpu",class:"size-3.5"},null,8,["name"])],8,st))),128)),b.outputs.length?(l(),w(E,{key:0,name:"i-lucide-arrow-right",class:"size-3 text-gray-400 shrink-0"})):x("",!0),(l(!0),p(U,null,F(b.outputs,T=>(l(),p("span",{key:"out-"+T,title:k[T]?.label??T,class:"inline-flex items-center justify-center size-6 rounded-md bg-gray-100 dark:bg-gray-800 text-gray-500 hover:text-primary transition-colors"},[r(E,{name:k[T]?.icon??"i-lucide-cpu",class:"size-3.5"},null,8,["name"])],8,at))),128))],64))),128))])):x("",!0)],10,Ge))),128)),o(n).length===0?(l(),p("div",ot,' No models match "'+P(o(d))+'" ',1)):x("",!0)]))])]),_:1},8,["open"])}}}),nt=Object.assign(lt,{__name:"ModelPickerModal"}),it={class:"flex gap-2"},rt=H({__name:"ModelFieldInput",props:X({provider:{},providerResolved:{},reuse:{type:Boolean},models:{},loadingModels:{type:Boolean},placeholderAnthropic:{},placeholderOpenai:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:X(["loadModels"],["update:modelValue"]),setup(a,{emit:M}){const C=M,v=le(a,"modelValue"),i=R(!1);return(I,_)=>{const d=G,n=re,k=nt;return l(),p(U,null,[s("div",it,[r(d,{modelValue:v.value,"onUpdate:modelValue":_[0]||(_[0]=V=>v.value=V),placeholder:a.providerResolved==="anthropic"?a.placeholderAnthropic:a.placeholderOpenai,class:"flex-1"},null,8,["modelValue","placeholder"]),a.providerResolved?(l(),w(n,{key:0,size:"sm",variant:"soft",onClick:_[1]||(_[1]=V=>{C("loadModels"),i.value=!0})},{default:c(()=>[..._[4]||(_[4]=[A(" Choose model… ",-1)])]),_:1})):x("",!0)]),r(k,{open:o(i),"onUpdate:open":_[2]||(_[2]=V=>W(i)?i.value=V:null),models:a.models,selected:v.value,loading:a.loadingModels,onSelect:_[3]||(_[3]=V=>v.value=V)},null,8,["open","models","selected","loading"])],64)}}}),dt=Object.assign(rt,{__name:"ModelFieldInput"}),ct={class:"flex items-start justify-between gap-3"},ut={class:"flex items-start gap-2"},pt={class:"font-medium inline-flex items-center gap-1"},mt={class:"text-sm text-gray-500"},ft={class:"inline-flex items-center gap-1"},vt={class:"inline-flex items-center gap-1"},gt={class:"inline-flex items-center gap-1"},yt={key:3,class:"flex justify-end"},ht=H({__name:"AiRoleConfigForm",props:X({meta:{},hasApiKey:{type:Boolean},reuseOptions:{},providerOptions:{},presetOptions:{},disabled:{type:Boolean},envManaged:{type:Boolean},models:{},loadingModels:{type:Boolean},providerResolved:{},testing:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:X(["applyPreset","loadModels","test"],["update:modelValue"]),setup(a,{emit:M}){const C=a,v=M,i=le(a,"modelValue"),I=D({get:()=>i.value.reuse??"own",set:d=>i.value.reuse=d==="own"?null:d}),_=D(()=>We(C.meta.help));return(d,n)=>{const k=ne,V=Be,$=me,y=fe,h=ve,g=ge,E=G,O=dt,f=re;return l(),p("div",{class:ie(["rounded-lg border border-default p-4 space-y-4",a.meta.optional&&!i.value.enabled?"opacity-80":""])},[s("div",ct,[s("div",ut,[r(k,{name:a.meta.icon,class:"size-5 mt-0.5 text-primary"},null,8,["name"]),s("div",null,[s("p",pt,[A(P(a.meta.title)+" ",1),r(V,{topic:a.meta.help},null,8,["topic"])]),s("p",mt,P(a.meta.blurb),1)])]),a.meta.optional?(l(),w($,{key:0,modelValue:i.value.enabled,"onUpdate:modelValue":n[0]||(n[0]=b=>i.value.enabled=b),disabled:a.disabled&&!a.envManaged,"aria-label":a.meta.enableLabel},null,8,["modelValue","disabled","aria-label"])):x("",!0)]),!a.meta.optional||i.value.enabled?(l(),p(U,{key:0},[a.meta.reuseTargets.length?(l(),w(h,{key:0,label:"Provider source"},{default:c(()=>[r(y,{modelValue:o(I),"onUpdate:modelValue":n[1]||(n[1]=b=>W(I)?I.value=b:null),items:a.reuseOptions,disabled:a.disabled&&!a.envManaged,class:"w-full"},null,8,["modelValue","items","disabled"])]),_:1})):x("",!0),i.value.reuse?x("",!0):(l(),p(U,{key:1},[r(h,{label:"Provider"},{label:c(()=>[s("span",ft,[n[9]||(n[9]=A(" Provider ",-1)),a.disabled?(l(),w(g,{key:0,"env-vars":o(_)},null,8,["env-vars"])):x("",!0)])]),default:c(()=>[r(y,{modelValue:i.value.provider,"onUpdate:modelValue":n[2]||(n[2]=b=>i.value.provider=b),items:a.providerOptions,disabled:a.disabled,placeholder:"Choose a provider…",class:"w-full"},null,8,["modelValue","items","disabled"])]),_:1}),i.value.provider==="openai"?(l(),w(h,{key:0,label:"Preset",description:"Pick a known provider to auto-fill the URL and model, then adjust as needed"},{default:c(()=>[r(y,{items:a.presetOptions,placeholder:"Choose a preset…",disabled:a.disabled,class:"w-full","onUpdate:modelValue":n[3]||(n[3]=b=>v("applyPreset",b))},null,8,["items","disabled"])]),_:1})):x("",!0),i.value.provider?(l(),w(h,{key:1,label:"API key",description:a.hasApiKey?"Leave empty to keep the stored key, clear and save to remove it":"Required for Anthropic; optional for local OpenAI-compatible servers"},{label:c(()=>[s("span",vt,[n[10]||(n[10]=A(" API key ",-1)),a.disabled?(l(),w(g,{key:0,"env-vars":o(_)},null,8,["env-vars"])):x("",!0)])]),default:c(()=>[r(E,{modelValue:i.value.apiKey,"onUpdate:modelValue":n[4]||(n[4]=b=>i.value.apiKey=b),type:"password",placeholder:a.hasApiKey?"•••••••• (unchanged)":"sk-…",disabled:a.disabled,class:"w-full font-mono"},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["description"])):x("",!0),i.value.provider==="openai"?(l(),w(h,{key:2,label:"Base URL",description:"Required, e.g. http://localhost:11434/v1"},{label:c(()=>[s("span",gt,[n[11]||(n[11]=A(" Base URL ",-1)),a.disabled?(l(),w(g,{key:0,"env-vars":o(_)},null,8,["env-vars"])):x("",!0)])]),default:c(()=>[r(E,{modelValue:i.value.baseUrl,"onUpdate:modelValue":n[5]||(n[5]=b=>i.value.baseUrl=b),placeholder:"http://localhost:11434/v1",disabled:a.disabled,class:"w-full"},null,8,["modelValue","disabled"])]),_:1})):x("",!0)],64)),i.value.reuse||i.value.provider?(l(),w(h,{key:2,label:"Model",description:i.value.reuse?"Leave empty to use the reused role's model":void 0},{default:c(()=>[r(O,{modelValue:i.value.model,"onUpdate:modelValue":n[6]||(n[6]=b=>i.value.model=b),provider:i.value.provider,"provider-resolved":a.providerResolved,reuse:!!i.value.reuse,models:a.models,"loading-models":a.loadingModels,"placeholder-anthropic":a.meta.modelPlaceholderAnthropic,"placeholder-openai":a.meta.modelPlaceholderOpenai,onLoadModels:n[7]||(n[7]=b=>v("loadModels"))},null,8,["modelValue","provider","provider-resolved","reuse","models","loading-models","placeholder-anthropic","placeholder-openai"])]),_:1},8,["description"])):x("",!0),a.providerResolved?(l(),p("div",yt,[r(f,{size:"xs",color:"neutral",variant:"soft",icon:"i-lucide-plug",loading:a.testing,onClick:n[8]||(n[8]=b=>v("test"))},{default:c(()=>[...n[12]||(n[12]=[A(" Test connection ",-1)])]),_:1},8,["loading"])])):x("",!0)],64)):x("",!0)],2)}}}),bt=Object.assign(ht,{__name:"AiRoleConfigForm"}),_t={key:0,class:"space-y-3"},xt={class:"text-sm text-gray-500"},kt={key:0,class:"text-sm text-gray-500"},It={key:1,class:"overflow-x-auto"},At={class:"w-full text-sm"},Mt={class:"px-2 py-2"},St={class:"font-mono text-xs"},Vt={class:"text-xs text-gray-400"},Pt={class:"text-right px-2 py-2"},Tt=["title"],wt=["title"],Ct={class:"text-right px-2 py-2"},Ut={key:1,class:"flex items-center gap-2 py-4 text-muted"},Et=H({__name:"AiUsagePanel",async setup(a){let M,C;const v=R(30),i=[{label:"Last 7 days",value:7},{label:"Last 30 days",value:30},{label:"Last 90 days",value:90}],{data:I,pending:_}=([M,C]=ae(()=>oe("/api/settings/ai/usage",{query:{days:v}},"$Q4bVv0_V0W")),M=await M,C(),M);function d(n){return n>=1e6?`${(n/1e6).toFixed(1)}M`:n>=1e3?`${(n/1e3).toFixed(1)}k`:String(n)}return(n,k)=>{const V=fe,$=Ne,y=ne,h=ye;return l(),w(h,{icon:"i-lucide-activity",title:"AI usage"},{actions:c(()=>[r(V,{modelValue:o(v),"onUpdate:modelValue":k[0]||(k[0]=g=>W(v)?v.value=g:null),items:i,size:"sm",class:"w-36"},null,8,["modelValue"])]),default:c(()=>[o(I)?(l(),p("div",_t,[s("p",xt,P(d(o(I).totals.diagnoses))+" diagnoses · "+P(d(o(I).totals.inputTokens))+" input tokens · "+P(d(o(I).totals.outputTokens))+" output tokens ",1),o(I).byModel.length===0?(l(),p("p",kt,"No AI calls recorded in this period.")):(l(),p("div",It,[s("table",At,[k[1]||(k[1]=s("thead",null,[s("tr",{class:"text-xs text-gray-500 uppercase tracking-wider border-b border-default"},[s("th",{class:"text-left px-2 py-2 font-medium"},"Model"),s("th",{class:"text-right px-2 py-2 font-medium"},"Diagnoses"),s("th",{class:"text-right px-2 py-2 font-medium"},"Failed"),s("th",{class:"text-right px-2 py-2 font-medium"},"Input tokens"),s("th",{class:"text-right px-2 py-2 font-medium"},"Output tokens"),s("th",{class:"text-right px-2 py-2 font-medium"},"Avg duration")])],-1)),s("tbody",null,[(l(!0),p(U,null,F(o(I).byModel,g=>(l(),p("tr",{key:`${g.provider??"unknown"}/${g.model}`,class:"border-b last:border-b-0 border-default"},[s("td",Mt,[s("span",St,P(g.model),1),s("span",Vt," · "+P(g.provider??"unknown"),1)]),s("td",Pt,P(g.diagnoses),1),s("td",{class:ie(["text-right px-2 py-2",g.failed>0?"text-red-600 dark:text-red-400":""])},P(g.failed),3),s("td",{class:"text-right px-2 py-2",title:g.inputTokens.toLocaleString()},P(d(g.inputTokens)),9,Tt),s("td",{class:"text-right px-2 py-2",title:g.outputTokens.toLocaleString()},P(d(g.outputTokens)),9,wt),s("td",Ct,[r($,{ms:g.avgDurationMs},null,8,["ms"])])]))),128))])])]))])):o(_)?(l(),p("div",Ut,[r(y,{name:"i-lucide-loader-circle",class:"size-4 animate-spin"}),k[2]||(k[2]=s("span",{class:"text-sm"},"Loading usage…",-1))])):x("",!0)]),_:1})}}}),Rt=Object.assign(Et,{__name:"AiUsagePanel"}),$t=[{key:"sampleErrorChars",label:"Error text characters",envVar:"PIWI_AI_MAX_SAMPLE_ERROR_CHARS",description:"Max characters of raw error text (per error block).",min:200,max:5e4},{key:"scmPatchBudget",label:"SCM patch budget",envVar:"PIWI_AI_MAX_SCM_PATCH_BUDGET",description:"Total characters of diff patches across changed files.",min:0,max:5e4},{key:"affectedTests",label:"Affected tests",envVar:"PIWI_AI_MAX_AFFECTED_TESTS",description:"Max affected tests listed.",min:1,max:200},{key:"steps",label:"Test steps",envVar:"PIWI_AI_MAX_STEPS",description:"Max recent test steps included.",min:1,max:200},{key:"consoleEntries",label:"Console entries",envVar:"PIWI_AI_MAX_CONSOLE_ENTRIES",description:"Max console error/warning entries included.",min:0,max:200},{key:"consoleEntryChars",label:"Console entry characters",envVar:"PIWI_AI_MAX_CONSOLE_ENTRY_CHARS",description:"Max characters per console entry.",min:50,max:5e3},{key:"networkRequests",label:"Network requests",envVar:"PIWI_AI_MAX_NETWORK_REQUESTS",description:"Max failed network requests included.",min:0,max:200},{key:"ariaSnapshotChars",label:"ARIA snapshot characters",envVar:"PIWI_AI_MAX_ARIA_SNAPSHOT_CHARS",description:"Max characters of the page ARIA snapshot.",min:0,max:5e4},{key:"testSourceChars",label:"Test source characters",envVar:"PIWI_AI_MAX_TEST_SOURCE_CHARS",description:"Max characters of the test source snippet.",min:0,max:5e4},{key:"maxSourceFiles",label:"Full source files",envVar:"PIWI_AI_MAX_SOURCE_FILES",description:"Max full source files fetched from SCM to ground patches (0 disables).",min:0,max:20},{key:"sourceFileChars",label:"Source file characters",envVar:"PIWI_AI_MAX_SOURCE_FILE_CHARS",description:"Max characters per fetched full source file.",min:0,max:5e4},{key:"serverLogEntries",label:"Server log entries",envVar:"PIWI_AI_MAX_SERVER_LOG_ENTRIES",description:"Max backend server log entries (from X-Piwi-Logs header) included.",min:0,max:200},{key:"serverLogEntryChars",label:"Server log entry characters",envVar:"PIWI_AI_MAX_SERVER_LOG_ENTRY_CHARS",description:"Max characters per backend server log entry.",min:50,max:5e3},{key:"serverTraceSpans",label:"Server trace spans",envVar:"PIWI_AI_MAX_SERVER_TRACE_SPANS",description:"Max backend server spans (from X-Piwi-Trace header) included (0 disables).",min:0,max:500},{key:"maxImages",label:"Max screenshots",envVar:"PIWI_AI_MAX_IMAGES",description:"Max screenshots auto-included in the diagnosis context.",min:0,max:20},{key:"maxPassedPeers",label:"Max passed peers",envVar:"PIWI_AI_MAX_PASSED_PEERS",description:"Max peer tests in the same file listed when they passed.",min:0,max:100},{key:"maxConsoleWindow",label:"Console window entries",envVar:"PIWI_AI_MAX_CONSOLE_WINDOW",description:"Max console entries of any type in the window before failure.",min:0,max:200},{key:"slowRequestMs",label:"Slow request threshold (ms)",envVar:"PIWI_AI_SLOW_REQUEST_MS",description:"Network request duration threshold for flagging as slow.",min:100,max:3e4},{key:"maxTraceActions",label:"Trace actions",envVar:"PIWI_AI_MAX_TRACE_ACTIONS",description:"Max actions extracted from trace ZIP for failing-action context (0 disables).",min:0,max:50},{key:"traceDomChars",label:"Trace DOM excerpt characters",envVar:"PIWI_AI_TRACE_DOM_CHARS",description:"Max characters for the trace-derived DOM/ARIA excerpt in failing-action context.",min:0,max:2e4},{key:"traceStackFrames",label:"Trace stack frames",envVar:"PIWI_AI_MAX_TRACE_STACK_FRAMES",description:"Max call-stack frames (with source windows) from the trace (0 disables).",min:0,max:50},{key:"traceNetworkRequests",label:"Trace network requests",envVar:"PIWI_AI_MAX_TRACE_NETWORK_REQUESTS",description:"Max requests from the trace network stream (0 disables).",min:0,max:200},{key:"domSnapshotChars",label:"DOM snapshot characters",envVar:"PIWI_AI_MAX_DOM_SNAPSHOT_CHARS",description:"Max characters of the failure-time DOM snapshot rendered from the trace (0 disables).",min:0,max:5e4},{key:"imageMaxEdge",label:"Screenshot max edge (px)",envVar:"PIWI_AI_IMAGE_MAX_EDGE",description:"Screenshots are downscaled to at most this many pixels on the long edge before being sent.",min:512,max:8192},{key:"aiStepIntents",label:"AI-step intents",envVar:"PIWI_AI_MAX_STEP_INTENTS",description:"Max AI-step intent mappings (prompt → compiled locator) included (0 disables the section).",min:0,max:100}],Ot={class:"space-y-6"},Lt={class:"space-y-5"},Bt={class:"flex items-center gap-3"},Ft={class:"flex items-center gap-2 justify-end"},Wt={class:"flex justify-end"},Nt={class:"flex justify-end"},Dt={class:"grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-3"},Xt={class:"flex justify-end gap-2"},ps=H({__name:"ai",async setup(a){let M,C;const v=Oe(),{data:i,refresh:I}=([M,C]=ae(()=>oe("/api/settings/ai","$5FSQHzGDZ4")),M=await M,C(),M);function _(){return{enabled:!1,reuse:null,provider:"",model:"",baseUrl:"",apiKey:""}}const d=z({diagnosis:_(),research:_(),embedding:_()}),n=R(!1),k=R(""),V=R(""),$=R(!1),y=R(!1),h=R(!1),g=z({diagnosis:!1,research:!1,embedding:!1}),E=z({diagnosis:[],research:[],embedding:[]}),O=z({diagnosis:!1,research:!1,embedding:!1});function f(t){const e=d[t];return e.reuse?d[e.reuse]?.provider||"":e.provider}async function b(t){const e=d[t],m=f(t),S=e.reuse?d[e.reuse]:e,ee=S.apiKey||void 0;O[t]=!0;try{const te=await $fetch("/api/settings/ai/models",{method:"POST",body:{role:t,provider:m,baseUrl:S.baseUrl||void 0,apiKey:ee}});E[t]=te.models}catch{E[t]=[]}finally{O[t]=!1}}const T=[{key:"diagnosis",title:"Diagnosis model",icon:"i-lucide-stethoscope",help:"settings.ai-provider",optional:!1,enableLabel:"",blurb:"The main model that writes the final diagnosis. Required to enable AI features.",reuseTargets:[],modelPlaceholderAnthropic:"claude-opus-4-8",modelPlaceholderOpenai:"e.g. gpt-4o, llama3.1"},{key:"research",title:"Research model",icon:"i-lucide-search",help:"settings.ai-research",optional:!0,enableLabel:"Two-stage diagnosis",blurb:"A cheaper/faster model that pre-analyzes the failure before the diagnosis model writes the final answer. Also used for cluster naming and merge adjudication.",reuseTargets:["diagnosis"],modelPlaceholderAnthropic:"e.g. claude-haiku-4-5",modelPlaceholderOpenai:"e.g. llama-3.1-8b-instant"},{key:"embedding",title:"Embedding model",icon:"i-lucide-vector-square",help:"settings.embedding-model",optional:!0,enableLabel:"Semantic clustering",blurb:"Embeds failures so semantically-similar errors group together (used by failure clustering).",reuseTargets:["diagnosis","research"],modelPlaceholderAnthropic:"— Anthropic has no embeddings API —",modelPlaceholderOpenai:"e.g. text-embedding-3-small"}],de=[{label:"Anthropic API",value:"anthropic"},{label:"OpenAI-compatible",value:"openai"}],he=de.filter(t=>t.value!=="anthropic"),be=D(()=>{const t={};for(const e of T)t[e.key]=[{label:"Configure its own provider",value:"own"},...e.reuseTargets.filter(m=>d[m].enabled||m==="diagnosis").filter(m=>e.key!=="embedding"||d[m].provider==="openai").map(m=>({label:`Reuse ${T.find(S=>S.key===m).title.toLowerCase()}`,value:m}))];return t}),N=D(()=>!!i.value?.envManaged),_e=Xe(qe("ai"));se(i,t=>{if(t){for(const e of T){const m=t.roles[e.key],S=d[e.key];S.enabled=!!m,S.reuse=m?.reuse??null,S.provider=m?.provider??"",S.model=m?.model??"",S.baseUrl=m?.baseUrl??"",S.apiKey=""}n.value=t.autoDiagnose,k.value=t.customInstructions||""}},{immediate:!0});function xe(t){return!!i.value?.roles[t]?.hasApiKey}const ce=[{label:"ollama (local)",baseUrl:"http://localhost:11434/v1",model:"llama3.1"},{label:"LM Studio (local)",baseUrl:"http://localhost:1234/v1",model:""},{label:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",model:"meta-llama/llama-3.1-8b-instruct"},{label:"Groq",baseUrl:"https://api.groq.com/openai/v1",model:"llama-3.1-8b-instant"},{label:"OpenAI",baseUrl:"https://api.openai.com/v1",model:"gpt-4o"},{label:"Mistral AI",baseUrl:"https://api.mistral.ai/v1",model:"mistral-small-latest"},{label:"Custom",baseUrl:"",model:""}],ke=ce.map(t=>({label:t.label,value:t.label}));function Ie(t,e){const m=ce.find(S=>S.label===e);!m||m.label==="Custom"||(d[t].baseUrl=m.baseUrl,d[t].model=m.model)}function Q(t){const e=d[t];if(!e.enabled)return null;if(e.reuse)return{reuse:e.reuse,model:e.model||void 0};const m={provider:e.provider,model:e.model||void 0,baseUrl:e.baseUrl||void 0};return e.apiKey!==""&&(m.apiKey=e.apiKey),m}async function Ae(){$.value=!0;try{!N&&(!d.diagnosis.enabled||!d.diagnosis.provider)?await $fetch("/api/settings/ai",{method:"PUT",body:{roles:null,autoDiagnose:n.value}}):await $fetch("/api/settings/ai",{method:"PUT",body:{roles:{diagnosis:Q("diagnosis"),research:Q("research"),embedding:Q("embedding")},autoDiagnose:n.value}}),await I();for(const t of T)d[t.key].apiKey="";v.add({title:"Settings saved",color:"success"})}catch(t){v.add({title:"Save failed",description:String(t?.message??t),color:"error"})}finally{$.value=!1}}async function Me(){h.value=!0;try{await $fetch("/api/settings/ai",{method:"PUT",body:{scmToken:V.value||null}}),await I(),V.value="",v.add({title:"SCM token saved",color:"success"})}catch(t){v.add({title:"Save failed",description:String(t?.message??t),color:"error"})}finally{h.value=!1}}async function Se(){y.value=!0;try{await $fetch("/api/settings/ai",{method:"PUT",body:{customInstructions:k.value||null}}),await I(),v.add({title:"Instructions saved",color:"success"})}catch(t){v.add({title:"Save failed",description:String(t?.message??t),color:"error"})}finally{y.value=!1}}async function Ve(t){g[t]=!0;try{const e=d[t],m=e.reuse?d[e.reuse]:e,S=await $fetch("/api/settings/ai/test",{method:"POST",body:{role:t,provider:m.provider||void 0,apiKey:m.apiKey||void 0,model:e.model||(e.reuse?m.model:"")||void 0,baseUrl:m.baseUrl||void 0}});S.success?v.add({title:"Connection successful",description:`Model: ${S.model}`,color:"success"}):v.add({title:"Connection failed",description:S.error||"Unknown error",color:"error"})}catch(e){v.add({title:"Connection failed",description:String(e?.message??e),color:"error"})}finally{g[t]=!1}}const{data:L}=([M,C]=ae(()=>oe("/api/settings/ai/limits","$qHhpP8mBYb")),M=await M,C(),M),Y=$t,q=z({}),Z=R(!1),J=D(()=>new Set(L.value?.envManaged??[]));se(L,t=>{if(t)for(const e of Y)q[e.key]=t.limits[e.key]},{immediate:!0});async function Pe(){Z.value=!0;try{L.value=await $fetch("/api/settings/ai/limits",{method:"PUT",body:{limits:q}}),v.add({title:"Context limits saved",color:"success"})}catch(t){v.add({title:"Failed to save context limits",description:String(t?.message??t),color:"error"})}finally{Z.value=!1}}function Te(){if(L.value)for(const t of Y)J.value.has(t.key)||(q[t.key]=L.value.defaults[t.key])}return(t,e)=>{const m=Ee,S=bt,ee=me,te=Re,j=re,K=ye,we=Rt,ue=G,pe=ve,Ce=De,Ue=ge;return l(),p("div",Ot,[o(N)?(l(),w(m,{key:0,"env-vars":o(_e)},null,8,["env-vars"])):x("",!0),r(K,{icon:"i-lucide-sparkles",title:"Model providers",help:"settings.ai-provider"},{subtitle:c(()=>[...e[3]||(e[3]=[A(" Configure a complete provider for each model role. Optional roles can reuse another role's provider so you don't re-enter credentials. ",-1)])]),footer:c(()=>[s("div",Ft,[r(j,{color:"primary",loading:o($),icon:"i-lucide-save",onClick:Ae},{default:c(()=>[...e[5]||(e[5]=[A(" Save ",-1)])]),_:1},8,["loading"])])]),default:c(()=>[s("div",Lt,[(l(),p(U,null,F(T,u=>r(S,{key:u.key,modelValue:o(d)[u.key],"onUpdate:modelValue":B=>o(d)[u.key]=B,meta:u,"has-api-key":xe(u.key),"reuse-options":o(be)[u.key],"provider-options":u.key==="embedding"?o(he):de,"preset-options":o(ke),disabled:o(N),"env-managed":o(N),"provider-resolved":f(u.key),models:o(E)[u.key],"loading-models":o(O)[u.key],testing:o(g)[u.key],onApplyPreset:B=>Ie(u.key,B),onLoadModels:B=>b(u.key),onTest:B=>Ve(u.key)},null,8,["modelValue","onUpdate:modelValue","meta","has-api-key","reuse-options","provider-options","preset-options","disabled","env-managed","provider-resolved","models","loading-models","testing","onApplyPreset","onLoadModels","onTest"])),64)),r(te,{label:"Auto-diagnose",help:"settings.auto-diagnose","env-managed":o(N)},{default:c(()=>[s("div",Bt,[r(ee,{modelValue:o(n),"onUpdate:modelValue":e[0]||(e[0]=u=>W(n)?n.value=u:null),disabled:o(N)||!o(d).diagnosis.enabled},null,8,["modelValue","disabled"]),e[4]||(e[4]=s("span",{class:"text-sm text-gray-500"}," Automatically diagnose new failure clusters when a run finishes — up to 3 clusters per run (research + diagnosis call each), plus one batched call to title new clusters ",-1))])]),_:1},8,["env-managed"])])]),_:1}),r(we),r(K,{title:"Repository access",help:"project.scm-token"},{subtitle:c(()=>[...e[6]||(e[6]=[A(" Optional — required for private repositories. Per-project tokens override this. ",-1)])]),footer:c(()=>[s("div",Wt,[r(j,{color:"primary",loading:o(h),icon:"i-lucide-save",onClick:Me},{default:c(()=>[...e[7]||(e[7]=[A(" Save token ",-1)])]),_:1},8,["loading"])])]),default:c(()=>[r(pe,{label:"SCM token",description:o(i)?.hasScmToken?"Leave empty to keep the stored token, enter a new value to replace it, or save empty to remove it":"Personal access token with read access to repository contents. Supports GitHub (ghp_), GitLab (glpat-), and Bitbucket tokens."},{default:c(()=>[r(ue,{modelValue:o(V),"onUpdate:modelValue":e[1]||(e[1]=u=>W(V)?V.value=u:null),type:"password",placeholder:o(i)?.hasScmToken?"•••••••• (unchanged)":"ghp_..., glpat-..., or Bitbucket token",class:"w-full font-mono"},null,8,["modelValue","placeholder"])]),_:1},8,["description"])]),_:1}),r(K,{title:"Global analysis instructions",help:"settings.ai-instructions"},{footer:c(()=>[s("div",Nt,[r(j,{color:"primary",loading:o(y),icon:"i-lucide-save",onClick:Se},{default:c(()=>[...e[8]||(e[8]=[A(" Save instructions ",-1)])]),_:1},8,["loading"])])]),default:c(()=>[r(Ce,{modelValue:o(k),"onUpdate:modelValue":e[2]||(e[2]=u=>W(k)?k.value=u:null),rows:6,placeholder:"e.g. Always suggest running failing tests with --repeat-each 5 to confirm flakiness. Prefer network-level evidence over ARIA snapshots. Recommend git bisect when a commit range is available.",class:"w-full font-mono text-sm"},null,8,["modelValue"]),e[9]||(e[9]=s("p",{class:"text-xs text-gray-400 mt-2"}," These instructions are appended to the base system prompt. They shape how the AI analyzes failures but cannot override the response schema or confidence requirement. ",-1))]),_:1}),r(K,{title:"Diagnosis context limits",help:"settings.ai-limits"},{subtitle:c(()=>[...e[10]||(e[10]=[A(" Leave a field empty to use its default; env-managed fields are read-only. ",-1)])]),footer:c(()=>[s("div",Xt,[r(j,{color:"neutral",variant:"ghost",size:"sm",onClick:Te},{default:c(()=>[...e[11]||(e[11]=[A("Reset to defaults",-1)])]),_:1}),r(j,{color:"primary",loading:o(Z),icon:"i-lucide-save",size:"sm",onClick:Pe},{default:c(()=>[...e[12]||(e[12]=[A(" Save limits ",-1)])]),_:1},8,["loading"])])]),default:c(()=>[s("div",Dt,[(l(!0),p(U,null,F(o(Y),u=>(l(),w(pe,{key:u.key,label:u.label,description:u.description,hint:`default ${o(L)?.defaults[u.key]??""}`},{default:c(()=>[r(ue,{modelValue:o(q)[u.key],"onUpdate:modelValue":B=>o(q)[u.key]=B,modelModifiers:{number:!0},type:"number",min:u.min,max:u.max,disabled:o(J).has(u.key),placeholder:`default ${o(L)?.defaults[u.key]??""}`,class:"w-full"},Le({_:2},[o(J).has(u.key)?{name:"trailing",fn:c(()=>[r(Ue,{"env-vars":[u.envVar]},null,8,["env-vars"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","min","max","disabled","placeholder"])]),_:2},1032,["label","description","hint"]))),128))])]),_:1}),r(K,{icon:"i-lucide-shield-check",title:"Privacy notice",help:"settings.privacy"},{default:c(()=>[...e[13]||(e[13]=[s("div",{class:"space-y-2 text-sm text-gray-600 dark:text-gray-400"},[s("p",null,"When diagnosing a failure cluster, the following data is sent to the configured LLM provider:"),s("ul",{class:"list-disc list-inside space-y-1 ml-2"},[s("li",null,"Normalized error signature and sample raw error text"),s("li",null,"Test titles and file paths for affected tests"),s("li",null,"Browser info, test steps, console error/warning entries (excerpts)"),s("li",null,"Failed network request URLs and status codes"),s("li",null,"ARIA page snapshot (if collected)"),s("li",null," Commit SHA range since last passing run, plus changed file names and diff patches fetched from GitHub/GitLab/Bitbucket (if a repository token is configured or the repo is public) ")]),s("p",{class:"mt-2"},[A(" API keys are stored encrypted in the application database (admin-only access). For stricter setups, use the "),s("code",{class:"font-mono text-xs"},"PIWI_AI_*"),A(" environment variables instead of the UI. ")])],-1)])]),_:1})])}}});export{ps as default};
@@ -0,0 +1 @@
1
+ import{a2 as Z,a3 as K,Z as Q,a5 as Y,aM as ee,aN as ie,aO as ae,a as se,C as le,L as w,o as n,e as d,f as te,g as ne,W as B,b as i,V as b,c as A,i as r,_ as k,aJ as re,l as g,X as oe,v as ue,aP as de,a8 as ge}from"./BzBaMPgu.js";const ce={slots:{root:"relative inline-flex items-center",base:["w-full rounded-md border-0 appearance-none placeholder:text-dimmed disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute start-0 flex items-start",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute end-0 flex items-start",trailingIcon:"shrink-0 text-dimmed"},variants:{fieldGroup:{horizontal:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"},vertical:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"}},size:{xs:{base:"px-2 py-1 text-sm/4 gap-1",leading:"ps-2 inset-y-1",trailing:"pe-2 inset-y-1",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},sm:{base:"px-2.5 py-1.5 text-sm/4 gap-1.5",leading:"ps-2.5 inset-y-1.5",trailing:"pe-2.5 inset-y-1.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},md:{base:"px-2.5 py-1.5 text-base/5 gap-1.5",leading:"ps-2.5 inset-y-1.5",trailing:"pe-2.5 inset-y-1.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},lg:{base:"px-3 py-2 text-base/5 gap-2",leading:"ps-3 inset-y-2",trailing:"pe-3 inset-y-2",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3 inset-y-2",trailing:"pe-3 inset-y-2",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent focus:outline-none"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},fixed:{false:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},autoresize:{true:{base:"resize-none"}}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"outline-primary/25 focus-visible:outline-3 focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"outline-secondary/25 focus-visible:outline-3 focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"outline-success/25 focus-visible:outline-3 focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"outline-info/25 focus-visible:outline-3 focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"outline-warning/25 focus-visible:outline-3 focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"outline-error/25 focus-visible:outline-3 focus-visible:ring-error"},{color:"primary",variant:["soft","ghost"],class:"outline-primary/25 focus-visible:outline-3"},{color:"secondary",variant:["soft","ghost"],class:"outline-secondary/25 focus-visible:outline-3"},{color:"success",variant:["soft","ghost"],class:"outline-success/25 focus-visible:outline-3"},{color:"info",variant:["soft","ghost"],class:"outline-info/25 focus-visible:outline-3"},{color:"warning",variant:["soft","ghost"],class:"outline-warning/25 focus-visible:outline-3"},{color:"error",variant:["soft","ghost"],class:"outline-error/25 focus-visible:outline-3"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"outline-inverted/25 focus-visible:outline-3 focus-visible:ring-inverted"},{color:"neutral",variant:["soft","ghost"],class:"outline-inverted/25 focus-visible:outline-3"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}},{fixed:!1,size:"xs",class:"md:text-xs"},{fixed:!1,size:"sm",class:"md:text-xs"},{fixed:!1,size:"md",class:"md:text-sm"},{fixed:!1,size:"lg",class:"md:text-sm"}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},fe=["id","value","name","rows","placeholder","disabled","required"],me=Object.assign({inheritAttrs:!1},{__name:"UTextarea",props:{as:{type:null,required:!1},id:{type:String,required:!1},name:{type:String,required:!1},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},autoresize:{type:Boolean,required:!1},autoresizeDelay:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},rows:{type:Number,required:!1,default:3},maxrows:{type:Number,required:!1,default:0},highlight:{type:Boolean,required:!1},fixed:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},emits:["update:modelValue","blur","change"],setup(S,{expose:V,emit:M}){const y=S,c=M,o=Z(),e=K("textarea",y),f=Q(e,"modelValue",c,{defaultValue:e.defaultValue}),N=Y(),{emitFormFocus:h,emitFormBlur:C,emitFormInput:_,emitFormChange:F,size:T,color:$,id:R,name:D,highlight:O,disabled:P,ariaAttrs:j}=ee(y,{deferInputValidation:!0}),{isLeading:p,isTrailing:x,leadingIconName:z,trailingIconName:q}=ie(e),s=ue(()=>ge({extend:ce,...N.ui?.textarea||{}})({color:$.value??e.color,variant:e.variant,size:T?.value??e.size,loading:e.loading,highlight:O.value??e.highlight,fixed:e.fixed,autoresize:e.autoresize,leading:p.value||!!e.avatar||!!o.leading,trailing:x.value||!!o.trailing})),l=ae("textareaRef");function I(a){e.modelModifiers?.trim&&(typeof a=="string"||a===null||a===void 0)&&(a=a?.trim()??null),e.modelModifiers?.number&&(a=de(a)),e.modelModifiers?.nullable&&(a||=null),e.modelModifiers?.optional&&!e.modelModifiers?.nullable&&a!==null&&(a||=void 0),f.value=a,_()}function H(a){u(),e.modelModifiers?.lazy||I(a.target.value)}function L(a){const t=a.target.value;e.modelModifiers?.lazy&&I(t),e.modelModifiers?.trim&&(a.target.value=t.trim()),F(),c("change",a)}function E(a){C(),c("blur",a)}function G(){e.autofocus&&l.value?.focus()}function u(){if(e.autoresize&&l.value){l.value.rows=e.rows;const a=l.value.style.overflow;l.value.style.overflow="hidden";const t=window.getComputedStyle(l.value),m=Number.parseInt(t.paddingTop),J=Number.parseInt(t.paddingBottom),U=m+J,W=Number.parseInt(t.lineHeight),{scrollHeight:X}=l.value,v=(X-U)/W;v>e.rows&&(l.value.rows=e.maxrows?Math.min(v,e.maxrows):v),l.value.style.overflow=a}}return se(f,()=>{w(u)}),le(()=>{setTimeout(()=>{G()},e.autofocusDelay),setTimeout(async()=>{await w(),u()},e.autoresizeDelay)}),V({textareaRef:l,autoResize:u}),(a,t)=>(n(),d(i(oe),{as:i(e).as,"data-slot":a.$attrs["data-slot"]??"root",class:r(s.value.root({class:[i(e).ui?.root,i(e).class]}))},{default:te(()=>[ne("textarea",B({id:i(R),ref_key:"textareaRef",ref:l,value:i(f),name:i(D),rows:i(e).rows,placeholder:i(e).placeholder,class:s.value.base({class:i(e).ui?.base}),disabled:i(P),required:i(e).required},{...a.$attrs,...i(j)},{"data-slot":"base",onInput:H,onBlur:E,onChange:L,onFocus:t[0]||(t[0]=(...m)=>i(h)&&i(h)(...m))}),null,16,fe),b(a.$slots,"default",{ui:s.value}),i(p)||i(e).avatar||o.leading?(n(),A("span",{key:0,"data-slot":"leading",class:r(s.value.leading({class:i(e).ui?.leading}))},[b(a.$slots,"leading",{ui:s.value},()=>[i(p)&&i(z)?(n(),d(k,{key:0,name:i(z),"data-slot":"leadingIcon",class:r(s.value.leadingIcon({class:i(e).ui?.leadingIcon}))},null,8,["name","class"])):i(e).avatar?(n(),d(re,B({key:1,size:i(e).ui?.leadingAvatarSize||s.value.leadingAvatarSize()},i(e).avatar,{"data-slot":"leadingAvatar",class:s.value.leadingAvatar({class:i(e).ui?.leadingAvatar})}),null,16,["size","class"])):g("",!0)])],2)):g("",!0),i(x)||o.trailing?(n(),A("span",{key:1,"data-slot":"trailing",class:r(s.value.trailing({class:i(e).ui?.trailing}))},[b(a.$slots,"trailing",{ui:s.value},()=>[i(q)?(n(),d(k,{key:0,name:i(q),"data-slot":"trailingIcon",class:r(s.value.trailingIcon({class:i(e).ui?.trailingIcon}))},null,8,["name","class"])):g("",!0)])],2)):g("",!0)]),_:3},8,["as","data-slot","class"]))}});export{me as _};