@intent-hq/web 2.386.0 → 2.387.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 (325) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{-VR23WhZ.js → -2rOENSl.js} +1 -1
  3. package/web/app/immutable/chunks/{B4F7GG5Q.js → -hTxjwFO.js} +1 -1
  4. package/web/app/immutable/chunks/{D5xlMOwU.js → 0Kw0mmSW.js} +1 -1
  5. package/web/app/immutable/chunks/{B9kUdNbG.js → 6NStP9u7.js} +1 -1
  6. package/web/app/immutable/chunks/{Dm3wAkDL.js → 6uD0LviT.js} +1 -1
  7. package/web/app/immutable/chunks/{BeUuk8D1.js → 9fNNDfgo.js} +1 -1
  8. package/web/app/immutable/chunks/{COBhx_l-.js → AXzVloaq.js} +1 -1
  9. package/web/app/immutable/chunks/{DDdsJrHq.js → AfZNmzF0.js} +1 -1
  10. package/web/app/immutable/chunks/{D2Tzo4Hp.js → B-bGycam.js} +1 -1
  11. package/web/app/immutable/chunks/{Bf_4e4N2.js → B0RPkrmZ.js} +1 -1
  12. package/web/app/immutable/chunks/{Bv_0mmoe.js → B1TtNV9x.js} +1 -1
  13. package/web/app/immutable/chunks/{CM9GoLV5.js → B3QTKmHy.js} +1 -1
  14. package/web/app/immutable/chunks/{DaOKbar2.js → B3ziY5oo.js} +2 -2
  15. package/web/app/immutable/chunks/{BolJpU8l.js → B6-aVrNf.js} +4 -4
  16. package/web/app/immutable/chunks/{D5A9atQX.js → B79iAtSu.js} +2 -2
  17. package/web/app/immutable/chunks/{Di_ao8Rc.js → B7esq_NU.js} +1 -1
  18. package/web/app/immutable/chunks/{bojY7ttK.js → B9BALnhr.js} +1 -1
  19. package/web/app/immutable/chunks/{BYYtBM5R.js → B9GWGWit.js} +1 -1
  20. package/web/app/immutable/chunks/{BCFB88Wl.js → BAAQt1ZW.js} +1 -1
  21. package/web/app/immutable/chunks/{Bk14_fvY.js → BC5HDfRR.js} +1 -1
  22. package/web/app/immutable/chunks/BC6tIXxU.js +1 -0
  23. package/web/app/immutable/chunks/{HcbkpXC1.js → BFMlH_mp.js} +2 -2
  24. package/web/app/immutable/chunks/{h5ZeHogL.js → BFi0zRRv.js} +1 -1
  25. package/web/app/immutable/chunks/{fC3yz20p.js → BH3eRhvI.js} +1 -1
  26. package/web/app/immutable/chunks/{Dyx6ysl7.js → BIfjK4Wy.js} +1 -1
  27. package/web/app/immutable/chunks/{Cpw2gXhG.js → BJEUIKTL.js} +1 -1
  28. package/web/app/immutable/chunks/{3Kr2ijlK.js → BJbm_MWC.js} +1 -1
  29. package/web/app/immutable/chunks/{BweHPPaS.js → BK0IkwFP.js} +2 -2
  30. package/web/app/immutable/chunks/{BqCTtUhB.js → BLMhg4vm.js} +1 -1
  31. package/web/app/immutable/chunks/{DFKO8V-Y.js → BLhJfI63.js} +1 -1
  32. package/web/app/immutable/chunks/{9AJtSub0.js → BNDTLRE1.js} +1 -1
  33. package/web/app/immutable/chunks/{COsxNPUV.js → BOyRg328.js} +1 -1
  34. package/web/app/immutable/chunks/{BbWnSSTS.js → BP-cDE7g.js} +1 -1
  35. package/web/app/immutable/chunks/{DOir9M0E.js → BPscmH6M.js} +1 -1
  36. package/web/app/immutable/chunks/{DtQHtXEW.js → BQ8hOnRo.js} +1 -1
  37. package/web/app/immutable/chunks/{BCuI_zgX.js → BQhBnAuP.js} +1 -1
  38. package/web/app/immutable/chunks/{Dpvv-9m3.js → BRRnx9NG.js} +1 -1
  39. package/web/app/immutable/chunks/{C8TrySMt.js → BSt1DBgt.js} +1 -1
  40. package/web/app/immutable/chunks/{IG43rVtJ.js → BSu_WKe5.js} +1 -1
  41. package/web/app/immutable/chunks/{DY5rw8pn.js → BUsnh1ZW.js} +1 -1
  42. package/web/app/immutable/chunks/{DNDJdxKs.js → BVYisuIY.js} +1 -1
  43. package/web/app/immutable/chunks/{CF_a5Llj.js → BVmCM-pH.js} +1 -1
  44. package/web/app/immutable/chunks/{DQvAX2eX.js → BWJopR_X.js} +1 -1
  45. package/web/app/immutable/chunks/{DIWzdBfB.js → BXlN4FOb.js} +1 -1
  46. package/web/app/immutable/chunks/{C6Wi6O6n.js → BaOiWDrc.js} +1 -1
  47. package/web/app/immutable/chunks/{Nrq0Uf9_.js → Bajx4HLb.js} +1 -1
  48. package/web/app/immutable/chunks/{DdRupUfV.js → Bbae4OrB.js} +2 -2
  49. package/web/app/immutable/chunks/{i8jM24jD.js → Bbs1UlDC.js} +1 -1
  50. package/web/app/immutable/chunks/{DyLERSuu.js → BcrN1yjB.js} +1 -1
  51. package/web/app/immutable/chunks/{0y7aytZM.js → BfQFKWzJ.js} +1 -1
  52. package/web/app/immutable/chunks/{Df4a242o.js → Bj4IsLvN.js} +1 -1
  53. package/web/app/immutable/chunks/{DBwdk2-0.js → BkcO6l5G.js} +1 -1
  54. package/web/app/immutable/chunks/{C6afU4he.js → Bl72eYFn.js} +1 -1
  55. package/web/app/immutable/chunks/{TN7R9Ny0.js → BlAMrm5X.js} +1 -1
  56. package/web/app/immutable/chunks/{BPDyvu9A.js → BlJAndP6.js} +1 -1
  57. package/web/app/immutable/chunks/{B1xM1EBM.js → Blt813S0.js} +1 -1
  58. package/web/app/immutable/chunks/{Pyf1FzKM.js → Bm3beBRj.js} +1 -1
  59. package/web/app/immutable/chunks/{CFdI48b2.js → BmM9C7Gu.js} +1 -1
  60. package/web/app/immutable/chunks/{BqrahRdk.js → Bmm_g7di.js} +4 -4
  61. package/web/app/immutable/chunks/{3LCOBHm6.js → BoUQWR1c.js} +1 -1
  62. package/web/app/immutable/chunks/{Cwg3XF5F.js → BoZ2kJyE.js} +1 -1
  63. package/web/app/immutable/chunks/{Dde9Z_vp.js → BpXDXz8J.js} +1 -1
  64. package/web/app/immutable/chunks/{DX2U4Mz9.js → BpwKnO7b.js} +3 -3
  65. package/web/app/immutable/chunks/{CQ5BHnSj.js → Bq7euxCs.js} +1 -1
  66. package/web/app/immutable/chunks/{CGUVvS8r.js → Bsdq-idi.js} +1 -1
  67. package/web/app/immutable/chunks/{DbUDL_oo.js → Bsru2omj.js} +1 -1
  68. package/web/app/immutable/chunks/{DEKjIPd8.js → Bstq-Mm1.js} +1 -1
  69. package/web/app/immutable/chunks/{COlfJVPs.js → Bt11uxE8.js} +4 -4
  70. package/web/app/immutable/chunks/{DxWgWHgi.js → BtchneSc.js} +1 -1
  71. package/web/app/immutable/chunks/{QA00-uqv.js → Bu67WlMm.js} +1 -1
  72. package/web/app/immutable/chunks/{CfnXjWQL.js → BuTcdZo7.js} +1 -1
  73. package/web/app/immutable/chunks/{aixoUWDq.js → BuXXIZt7.js} +1 -1
  74. package/web/app/immutable/chunks/{E8oicBhU.js → BudPFdIj.js} +1 -1
  75. package/web/app/immutable/chunks/{DxuwadpA.js → BuiwW61u.js} +1 -1
  76. package/web/app/immutable/chunks/{DJb2lMGn.js → BvjgIPau.js} +1 -1
  77. package/web/app/immutable/chunks/{Dh-HeAnQ.js → BxTCsbTV.js} +1 -1
  78. package/web/app/immutable/chunks/{awY5HvZY.js → ByBw1QkA.js} +1 -1
  79. package/web/app/immutable/chunks/{CnQVxh95.js → Byr10Y9u.js} +1 -1
  80. package/web/app/immutable/chunks/{DfgH7-YK.js → C-y1uW-U.js} +1 -1
  81. package/web/app/immutable/chunks/{De2a277N.js → C07_BcWL.js} +1 -1
  82. package/web/app/immutable/chunks/{maZzJmVw.js → C2zt__Wj.js} +1 -1
  83. package/web/app/immutable/chunks/{B-MjuJTx.js → C4t02ICg.js} +2 -2
  84. package/web/app/immutable/chunks/{CnMzOGNL.js → C53ouDFl.js} +1 -1
  85. package/web/app/immutable/chunks/{YbqMJoDi.js → C6rcni5e.js} +1 -1
  86. package/web/app/immutable/chunks/{Ksiiix3Q.js → C7ajdkO4.js} +1 -1
  87. package/web/app/immutable/chunks/{DU1c0itA.js → C8Wy-uTf.js} +1 -1
  88. package/web/app/immutable/chunks/{BCiWc-GH.js → CACH34FC.js} +1 -1
  89. package/web/app/immutable/chunks/{CY0EK8Cm.js → CAiDxi6i.js} +3 -3
  90. package/web/app/immutable/chunks/{bIL0xbKX.js → CBbdbU2x.js} +1 -1
  91. package/web/app/immutable/chunks/{BB-hf8IY.js → CCzan1r_.js} +4 -4
  92. package/web/app/immutable/chunks/{BE08e7Se.js → CD9WEaPg.js} +1 -1
  93. package/web/app/immutable/chunks/{EQgYvydQ.js → CEap7Fwz.js} +1 -1
  94. package/web/app/immutable/chunks/{lSLkjC_I.js → CG28d89U.js} +1 -1
  95. package/web/app/immutable/chunks/{DeY70dof.js → CGdXewiA.js} +1 -1
  96. package/web/app/immutable/chunks/{_HPNXgkR.js → CHApvLbz.js} +3 -3
  97. package/web/app/immutable/chunks/{CdGl_2eX.js → CIWQMI37.js} +1 -1
  98. package/web/app/immutable/chunks/{BRPJcG-m.js → CIlqcFRn.js} +1 -1
  99. package/web/app/immutable/chunks/{DcMTwn77.js → CJ7hw6mW.js} +1 -1
  100. package/web/app/immutable/chunks/{DvnO7gWT.js → CKcb8dge.js} +3 -3
  101. package/web/app/immutable/chunks/{Ly7eBIj5.js → CMsGHYhn.js} +1 -1
  102. package/web/app/immutable/chunks/{v7JbBbwR.js → CNl453qs.js} +1 -1
  103. package/web/app/immutable/chunks/{DJJ2Xrlq.js → COVS9Crf.js} +1 -1
  104. package/web/app/immutable/chunks/{CaMRSd1-.js → CPdyCf2B.js} +1 -1
  105. package/web/app/immutable/chunks/{CGHwi-2H.js → CQA1q0F9.js} +1 -1
  106. package/web/app/immutable/chunks/{D9_wDL10.js → CS6HVyHp.js} +1 -1
  107. package/web/app/immutable/chunks/{DgzMHcMD.js → CSlvwZw1.js} +1 -1
  108. package/web/app/immutable/chunks/{QIFiwjW0.js → CTVz-pXS.js} +3 -3
  109. package/web/app/immutable/chunks/{zFAkpaJn.js → CTowDLQa.js} +1 -1
  110. package/web/app/immutable/chunks/{BwVjpKmH.js → CULu7FSf.js} +1 -1
  111. package/web/app/immutable/chunks/{XMluVOSf.js → CUxtJz1o.js} +1 -1
  112. package/web/app/immutable/chunks/{BVyOECUU.js → CV5qbjYN.js} +1 -1
  113. package/web/app/immutable/chunks/{Bj4j6g-o.js → CVd7xnlx.js} +1 -1
  114. package/web/app/immutable/chunks/{9R_52XLX.js → CW4vzFn_.js} +1 -1
  115. package/web/app/immutable/chunks/{TXPMw3n4.js → CY2g-8Xo.js} +1 -1
  116. package/web/app/immutable/chunks/{BDbFQqI8.js → CY4ZK6xA.js} +3 -3
  117. package/web/app/immutable/chunks/{BXHbm15d.js → CZB2ndi9.js} +1 -1
  118. package/web/app/immutable/chunks/{CjLfgoGI.js → CZex5Cac.js} +1 -1
  119. package/web/app/immutable/chunks/{7EQMYysM.js → C_4qh07f.js} +1 -1
  120. package/web/app/immutable/chunks/{MoxNukrR.js → CbQ8NVeY.js} +1 -1
  121. package/web/app/immutable/chunks/{-8AxW0IA.js → CbQYR4R2.js} +3 -3
  122. package/web/app/immutable/chunks/{DY1YVoxv.js → CcgSaDDB.js} +1 -1
  123. package/web/app/immutable/chunks/CeeeYtIE.js +1 -0
  124. package/web/app/immutable/chunks/{De0cdeOU.js → CfIVswBm.js} +1 -1
  125. package/web/app/immutable/chunks/{CvSLeFQo.js → CfaCrhAh.js} +1 -1
  126. package/web/app/immutable/chunks/{CSb1CnpN.js → CggFXl4B.js} +1 -1
  127. package/web/app/immutable/chunks/{Dt3xwKL6.js → Chg0KuUy.js} +2 -2
  128. package/web/app/immutable/chunks/{3Qz3qAhk.js → Ci75CkmK.js} +1 -1
  129. package/web/app/immutable/chunks/{BVcaPXq9.js → CisSEUth.js} +1 -1
  130. package/web/app/immutable/chunks/{D6_ybykj.js → Ck8ZqpbB.js} +1 -1
  131. package/web/app/immutable/chunks/{DKupjKLn.js → ClQE9kQf.js} +1 -1
  132. package/web/app/immutable/chunks/{DSDM77x3.js → ClSbVEed.js} +1 -1
  133. package/web/app/immutable/chunks/{DAVG7sIL.js → CmhKJ6Ie.js} +1 -1
  134. package/web/app/immutable/chunks/{tHETzssD.js → CndJcn8K.js} +1 -1
  135. package/web/app/immutable/chunks/{BIkt0YE0.js → Co9CFvqw.js} +1 -1
  136. package/web/app/immutable/chunks/{Bb8ARnaK.js → CoAfXTHr.js} +1 -1
  137. package/web/app/immutable/chunks/CoCy46Yy.js +1 -0
  138. package/web/app/immutable/chunks/{DXDbxM_W.js → CoOgBJzu.js} +1 -1
  139. package/web/app/immutable/chunks/{BYJh9adv.js → Cq8MD_3v.js} +1 -1
  140. package/web/app/immutable/chunks/{DsOS7N8Z.js → CqGq5PHb.js} +1 -1
  141. package/web/app/immutable/chunks/{BmLlDCoW.js → CrL2Nk6a.js} +1 -1
  142. package/web/app/immutable/chunks/{BNJkKc31.js → CrZlcn4Y.js} +1 -1
  143. package/web/app/immutable/chunks/{Bu3PKqut.js → CrpUtGFn.js} +1 -1
  144. package/web/app/immutable/chunks/{BthojcF8.js → CrvtnK13.js} +2 -2
  145. package/web/app/immutable/chunks/{BNFvOw36.js → CrwLq8nY.js} +1 -1
  146. package/web/app/immutable/chunks/{BHJpo3VA.js → Cs-DtA5c.js} +1 -1
  147. package/web/app/immutable/chunks/{DcLVN86K.js → CtDIyzmZ.js} +1 -1
  148. package/web/app/immutable/chunks/{D5evzUZd.js → Cuqu6DgP.js} +1 -1
  149. package/web/app/immutable/chunks/{Drf1gLyo.js → Cw2fqKk9.js} +1 -1
  150. package/web/app/immutable/chunks/{FQkCsxt2.js → CwCTYQp7.js} +1 -1
  151. package/web/app/immutable/chunks/{DbxqdYAO.js → CxMr7p-O.js} +3 -3
  152. package/web/app/immutable/chunks/{DZjSAGjX.js → Cyr0PKv3.js} +1 -1
  153. package/web/app/immutable/chunks/{mRUS_S7Z.js → CzTSi5lc.js} +1 -1
  154. package/web/app/immutable/chunks/{BGo6FK-0.js → CzjElr82.js} +1 -1
  155. package/web/app/immutable/chunks/{BKFxm3WK.js → D-DyBHf9.js} +1 -1
  156. package/web/app/immutable/chunks/{CFB2mNds.js → D-aEx3GL.js} +2 -2
  157. package/web/app/immutable/chunks/{COSIRxZC.js → D1R1FWjP.js} +1 -1
  158. package/web/app/immutable/chunks/{B18ybwa0.js → D1YPh_5n.js} +1 -1
  159. package/web/app/immutable/chunks/{ByZL9dMf.js → D24Of5Kd.js} +1 -1
  160. package/web/app/immutable/chunks/{PkPZtGfM.js → D25lWS8Q.js} +1 -1
  161. package/web/app/immutable/chunks/{CW979n9w.js → D2ch709U.js} +1 -1
  162. package/web/app/immutable/chunks/{yqEyUNVG.js → D2kIeaeO.js} +1 -1
  163. package/web/app/immutable/chunks/{C4M_mNFP.js → D2y-zN_4.js} +1 -1
  164. package/web/app/immutable/chunks/{UQ6MIVTw.js → D3waRWO1.js} +1 -1
  165. package/web/app/immutable/chunks/{2aKRVAvL.js → D48_y-cl.js} +1 -1
  166. package/web/app/immutable/chunks/{x-RVzKqZ.js → D49zWKPf.js} +1 -1
  167. package/web/app/immutable/chunks/{CIoJPvjg.js → D5wnbxHp.js} +1 -1
  168. package/web/app/immutable/chunks/{C21Z9LLF.js → D7AX9X0W.js} +1 -1
  169. package/web/app/immutable/chunks/{BtMIAxno.js → DCL7QtVR.js} +1 -1
  170. package/web/app/immutable/chunks/{0b3rkAam.js → DEQDOTA1.js} +1 -1
  171. package/web/app/immutable/chunks/{BdY8OnZP.js → DGK5CsQK.js} +1 -1
  172. package/web/app/immutable/chunks/{BdlYeRHB.js → DGj-492Z.js} +2 -2
  173. package/web/app/immutable/chunks/{W05hyx94.js → DIEHuZ8f.js} +1 -1
  174. package/web/app/immutable/chunks/{CJke1tnU.js → DIoT8eB4.js} +1 -1
  175. package/web/app/immutable/chunks/{CIKXOyvw.js → DJivXy66.js} +2 -2
  176. package/web/app/immutable/chunks/{CUeOEnqq.js → DKeBnsgS.js} +1 -1
  177. package/web/app/immutable/chunks/DLO_0egf.js +1 -0
  178. package/web/app/immutable/chunks/{UnM4qztD.js → DLttsd3i.js} +1 -1
  179. package/web/app/immutable/chunks/{DGdWzkgm.js → DMV5KQix.js} +1 -1
  180. package/web/app/immutable/chunks/{ChKOG1mU.js → DNZCPKpq.js} +1 -1
  181. package/web/app/immutable/chunks/{BhtJVlVx.js → DNnmVx8j.js} +1 -1
  182. package/web/app/immutable/chunks/DP0K41jk.js +1 -0
  183. package/web/app/immutable/chunks/{CaHWSiOY.js → DP2r4UWt.js} +1 -1
  184. package/web/app/immutable/chunks/{21kfe-mS.js → DPG1HUgG.js} +1 -1
  185. package/web/app/immutable/chunks/{r5JNAzEM.js → DPjr22dV.js} +1 -1
  186. package/web/app/immutable/chunks/{CZ5zON0R.js → DPmNtGFj.js} +1 -1
  187. package/web/app/immutable/chunks/{Bb-hI5du.js → DQ8CqY9L.js} +2 -2
  188. package/web/app/immutable/chunks/{3IpMTtMx.js → DQpDIYyw.js} +1 -1
  189. package/web/app/immutable/chunks/{B8foSZsl.js → DRLJuUwT.js} +1 -1
  190. package/web/app/immutable/chunks/{CTTICX_5.js → DRXgE6SQ.js} +1 -1
  191. package/web/app/immutable/chunks/{Bn4F-JIh.js → DU1ubslo.js} +1 -1
  192. package/web/app/immutable/chunks/{BIcof04i.js → DUFN_Pzm.js} +1 -1
  193. package/web/app/immutable/chunks/{BcYVm7io.js → DWqaYE81.js} +1 -1
  194. package/web/app/immutable/chunks/{CB8gRmKb.js → DXI99C-u.js} +1 -1
  195. package/web/app/immutable/chunks/{C9ij7Z2h.js → D_5u7gP_.js} +1 -1
  196. package/web/app/immutable/chunks/{BD7jFvJp.js → D_AhXAPc.js} +1 -1
  197. package/web/app/immutable/chunks/{COS4Sgoi.js → DaMlaKH_.js} +2 -2
  198. package/web/app/immutable/chunks/{hRfDutUE.js → Db1BGAZN.js} +1 -1
  199. package/web/app/immutable/chunks/{yy2JFRyT.js → DcRqMoeH.js} +1 -1
  200. package/web/app/immutable/chunks/{BWI85bGY.js → Dd3UnPYB.js} +1 -1
  201. package/web/app/immutable/chunks/{CYq58ltZ.js → DdLy5J3P.js} +1 -1
  202. package/web/app/immutable/chunks/{CRUcTVFP.js → DezlVQ1h.js} +1 -1
  203. package/web/app/immutable/chunks/{OMssb4xF.js → Dga6E45c.js} +1 -1
  204. package/web/app/immutable/chunks/{BoEcbLG-.js → DgtVALrr.js} +1 -1
  205. package/web/app/immutable/chunks/{B-4i031c.js → DhVLJG6D.js} +1 -1
  206. package/web/app/immutable/chunks/{BRdQpeCl.js → DkERMj5B.js} +1 -1
  207. package/web/app/immutable/chunks/{A3z9XWMi.js → DkJYBjJg.js} +1 -1
  208. package/web/app/immutable/chunks/{Djah0WfC.js → DkOk28fz.js} +1 -1
  209. package/web/app/immutable/chunks/{kAav5o2h.js → Dk_Hc5oq.js} +1 -1
  210. package/web/app/immutable/chunks/{Dbr8gjWS.js → DlfbUU6o.js} +1 -1
  211. package/web/app/immutable/chunks/{DdjeekcY.js → DlwTP-AJ.js} +1 -1
  212. package/web/app/immutable/chunks/{6SOEgr71.js → Dm98YBgx.js} +3 -3
  213. package/web/app/immutable/chunks/{DAI6QH7D.js → DmWvRjk6.js} +1 -1
  214. package/web/app/immutable/chunks/{CyHe7TdT.js → DmpdpJAo.js} +1 -1
  215. package/web/app/immutable/chunks/{DIad5c9_.js → Dn_aCJkC.js} +1 -1
  216. package/web/app/immutable/chunks/{DIQ-xR1q.js → Do-SaITx.js} +1 -1
  217. package/web/app/immutable/chunks/{BPpACIC2.js → DoY7_Wfd.js} +1 -1
  218. package/web/app/immutable/chunks/{Z8DHXl17.js → DqEoTQds.js} +1 -1
  219. package/web/app/immutable/chunks/{TyVpf8MX.js → DtVrXGBM.js} +1 -1
  220. package/web/app/immutable/chunks/{CsilY7l9.js → DtkIwON_.js} +1 -1
  221. package/web/app/immutable/chunks/{CDxV78M0.js → DuoQQplG.js} +1 -1
  222. package/web/app/immutable/chunks/{Y_tkjygB.js → DwGyIIXK.js} +1 -1
  223. package/web/app/immutable/chunks/{LdXAlc1O.js → DwbEs_9r.js} +1 -1
  224. package/web/app/immutable/chunks/{CvusaaYc.js → DwiE5WsI.js} +1 -1
  225. package/web/app/immutable/chunks/{BW2en5Js.js → DxSE2XEK.js} +1 -1
  226. package/web/app/immutable/chunks/{jyNUu-ZR.js → DxnZvDv0.js} +1 -1
  227. package/web/app/immutable/chunks/{Bx7gCv2M.js → Dy9FYRX8.js} +1 -1
  228. package/web/app/immutable/chunks/{yMcNgg0D.js → DzTn7KcX.js} +1 -1
  229. package/web/app/immutable/chunks/{rsUVVEzx.js → ELYZilX0.js} +1 -1
  230. package/web/app/immutable/chunks/{DOZ82gYM.js → ExR0UceK.js} +1 -1
  231. package/web/app/immutable/chunks/{BlRGZv8u.js → FLpsgWeB.js} +1 -1
  232. package/web/app/immutable/chunks/{C1La-Fme.js → GTsIF2uA.js} +1 -1
  233. package/web/app/immutable/chunks/{BpLxj3s3.js → HLNbJ-7M.js} +1 -1
  234. package/web/app/immutable/chunks/{D22j4iWy.js → Hi2H4bj8.js} +1 -1
  235. package/web/app/immutable/chunks/{dFhS46gw.js → I9b9apiN.js} +1 -1
  236. package/web/app/immutable/chunks/{UqcU95a7.js → Idk978zJ.js} +1 -1
  237. package/web/app/immutable/chunks/{C_wfHKmM.js → Ii0VTY5h.js} +1 -1
  238. package/web/app/immutable/chunks/{CTqRHXfu.js → ItBm4ElA.js} +1 -1
  239. package/web/app/immutable/chunks/{Dduwpj0a.js → Jk9a4xPx.js} +1 -1
  240. package/web/app/immutable/chunks/{B0kNPCxU.js → KtEuoG00.js} +1 -1
  241. package/web/app/immutable/chunks/{Btst3lgy.js → L3K71tUU.js} +1 -1
  242. package/web/app/immutable/chunks/{DzpuLv6U.js → Lk7a_7W9.js} +1 -1
  243. package/web/app/immutable/chunks/{DpxbS0Pj.js → Mmc_61iE.js} +1 -1
  244. package/web/app/immutable/chunks/{7i0OJtNQ.js → R5lmOJFS.js} +1 -1
  245. package/web/app/immutable/chunks/{8jO_MBKF.js → RTRAqswA.js} +1 -1
  246. package/web/app/immutable/chunks/{BOnTc4ny.js → T-5C1GqS.js} +1 -1
  247. package/web/app/immutable/chunks/{DpESY8ko.js → UYAhegVx.js} +1 -1
  248. package/web/app/immutable/chunks/{CUA9hM4m.js → UsbmbYa0.js} +1 -1
  249. package/web/app/immutable/chunks/{DyXOhKE5.js → VcnbZvDh.js} +1 -1
  250. package/web/app/immutable/chunks/{77KTvr2w.js → WvHbj6rB.js} +1 -1
  251. package/web/app/immutable/chunks/{BCVhFPNJ.js → XK8g38bo.js} +1 -1
  252. package/web/app/immutable/chunks/{BbfEcBPg.js → Y2a1lhL9.js} +1 -1
  253. package/web/app/immutable/chunks/YLhFQnIu.js +1 -0
  254. package/web/app/immutable/chunks/{VTJf_qPn.js → YeOAvjnW.js} +1 -1
  255. package/web/app/immutable/chunks/{BrDfJqC4.js → _3Ca9E4W.js} +1 -1
  256. package/web/app/immutable/chunks/{DhaHSPPQ.js → _duPkHC1.js} +1 -1
  257. package/web/app/immutable/chunks/{Cpgxz5sK.js → aR8LYT4O.js} +1 -1
  258. package/web/app/immutable/chunks/{DjNuITHM.js → cEIzYo-d.js} +1 -1
  259. package/web/app/immutable/chunks/{cfiNEg68.js → cPsAlOmH.js} +1 -1
  260. package/web/app/immutable/chunks/{HeVxSGdr.js → cc1gQUub.js} +1 -1
  261. package/web/app/immutable/chunks/{Dh438xC0.js → cpPIph2M.js} +2 -2
  262. package/web/app/immutable/chunks/{CPWMushE.js → d028N8d2.js} +1 -1
  263. package/web/app/immutable/chunks/{DC1xYxUn.js → ewL2yuZ8.js} +1 -1
  264. package/web/app/immutable/chunks/{DlMrAlfA.js → g08hegP2.js} +1 -1
  265. package/web/app/immutable/chunks/{Bax102l4.js → gHZWxIPZ.js} +1 -1
  266. package/web/app/immutable/chunks/{CLqqc_hU.js → gJJMUdOI.js} +1 -1
  267. package/web/app/immutable/chunks/{D7yetF0v.js → gwv5JQYH.js} +1 -1
  268. package/web/app/immutable/chunks/{Cerl373K.js → iAKTK0Nq.js} +1 -1
  269. package/web/app/immutable/chunks/{BxU747mj.js → j5ppcWWU.js} +1 -1
  270. package/web/app/immutable/chunks/{E1uoF1cW.js → jAIXVFR4.js} +1 -1
  271. package/web/app/immutable/chunks/{B3OJ_2Dd.js → kvtKUeBe.js} +1 -1
  272. package/web/app/immutable/chunks/{B3JbrKDZ.js → lZ7zkdkp.js} +1 -1
  273. package/web/app/immutable/chunks/{DpvQ3NRH.js → mUNs8NSR.js} +1 -1
  274. package/web/app/immutable/chunks/{CueOVPTy.js → oBIu7LTI.js} +1 -1
  275. package/web/app/immutable/chunks/{DZSbMOPJ.js → oHUzFHtp.js} +2 -2
  276. package/web/app/immutable/chunks/{BhYFIrRM.js → pHYq50Ny.js} +1 -1
  277. package/web/app/immutable/chunks/{24f6N9l0.js → pJyYpzre.js} +1 -1
  278. package/web/app/immutable/chunks/{ico0GHoP.js → qm1BBGRe.js} +13 -13
  279. package/web/app/immutable/chunks/{BjdIR-od.js → qoDJOBiM.js} +1 -1
  280. package/web/app/immutable/chunks/{C6rz0msZ.js → r2R1I-D0.js} +1 -1
  281. package/web/app/immutable/chunks/{DrkDJmY5.js → rlNXEIUc.js} +1 -1
  282. package/web/app/immutable/chunks/{DzBJS0Lp.js → scTXKJzg.js} +1 -1
  283. package/web/app/immutable/chunks/{CDxGu9F5.js → tVmNccZ-.js} +1 -1
  284. package/web/app/immutable/chunks/{DQBViT5w.js → w-7j2Qtq.js} +1 -1
  285. package/web/app/immutable/chunks/{ChOMtuod.js → x2AHvZeQ.js} +1 -1
  286. package/web/app/immutable/chunks/{B2OS2WTh.js → xPYDsdm4.js} +1 -1
  287. package/web/app/immutable/chunks/{DOLX5oss.js → xzksWQ-h.js} +1 -1
  288. package/web/app/immutable/chunks/{CJEwuNO9.js → ygDvZWWC.js} +1 -1
  289. package/web/app/immutable/chunks/{DgjIVRdE.js → z91bgOZ6.js} +1 -1
  290. package/web/app/immutable/chunks/{Y4bYs1dr.js → z_SeEaJQ.js} +1 -1
  291. package/web/app/immutable/chunks/{hstOawAs.js → zxxqPN9_.js} +1 -1
  292. package/web/app/immutable/entry/{app.gkm8TnXW.js → app.DOLk01Bm.js} +3 -3
  293. package/web/app/immutable/entry/start.CIQw0TYU.js +1 -0
  294. package/web/app/immutable/nodes/{0.xKtnYOA2.js → 0.qPBEcapg.js} +1 -1
  295. package/web/app/immutable/nodes/{1.BMx4VsW1.js → 1.Bi3sNEdL.js} +1 -1
  296. package/web/app/immutable/nodes/10.DHyl6QAs.js +39 -0
  297. package/web/app/immutable/nodes/{11._cAIrch_.js → 11.pqpLvrmB.js} +1 -1
  298. package/web/app/immutable/nodes/{12.DOoAvwLA.js → 12.C5GV0W_U.js} +1 -1
  299. package/web/app/immutable/nodes/{13.Coj_sRB4.js → 13.BpCKbOND.js} +1 -1
  300. package/web/app/immutable/nodes/{14.AVrz3ZLQ.js → 14.DomreN-2.js} +3 -3
  301. package/web/app/immutable/nodes/{15.BGK-JRWm.js → 15.CKbUOFrf.js} +1 -1
  302. package/web/app/immutable/nodes/{16.CMkcwVoI.js → 16.BcdRdVBS.js} +1 -1
  303. package/web/app/immutable/nodes/{17.BS5un5d0.js → 17.C5h-oNNo.js} +1 -1
  304. package/web/app/immutable/nodes/{18._hTG2-17.js → 18.vgJOUK1N.js} +1 -1
  305. package/web/app/immutable/nodes/{19.DuCFyr_N.js → 19.3QLuvvWY.js} +2 -2
  306. package/web/app/immutable/nodes/{2.uAqDAg4D.js → 2.CSj73FLT.js} +4 -4
  307. package/web/app/immutable/nodes/{20.C1pW6BvW.js → 20.CuOgTm-x.js} +1 -1
  308. package/web/app/immutable/nodes/{3.M-EbuqKW.js → 3.BUbQ5Tes.js} +1 -1
  309. package/web/app/immutable/nodes/{4.ByPZ1Nrn.js → 4.Byn29Mul.js} +1 -1
  310. package/web/app/immutable/nodes/{5.DKAjjuf7.js → 5.CMHzkmR-.js} +1 -1
  311. package/web/app/immutable/nodes/{6.DOc_YxMK.js → 6.N0CPg2uE.js} +1 -1
  312. package/web/app/immutable/nodes/{7.gFNAyoNX.js → 7.4Szvqobl.js} +1 -1
  313. package/web/app/immutable/nodes/{8.C_Kp8pWz.js → 8.BKw9KMbS.js} +1 -1
  314. package/web/app/immutable/nodes/{9.C6HX35Sq.js → 9.BBJWosck.js} +4 -4
  315. package/web/app/version.json +1 -1
  316. package/web/generated/paraglide.js +44 -44
  317. package/web/index.html +18 -18
  318. package/web/app/immutable/chunks/B2LBPAIA.js +0 -1
  319. package/web/app/immutable/chunks/BUTuN2nE.js +0 -1
  320. package/web/app/immutable/chunks/CH-Qi35K.js +0 -1
  321. package/web/app/immutable/chunks/DWvCfaBg.js +0 -1
  322. package/web/app/immutable/chunks/Da8rtzmJ.js +0 -1
  323. package/web/app/immutable/chunks/wBNgrgMC.js +0 -1
  324. package/web/app/immutable/entry/start.CMMmzvCE.js +0 -1
  325. package/web/app/immutable/nodes/10.HyXPJR8g.js +0 -39
@@ -1 +1 @@
1
- import{t as ee,bo as i,bw as te,b as ae,br as qe,bs as xe,bq as He,bp as Ke,bm as N}from"./DWvCfaBg.js";import{bs as re,b_ as $,aD as t,W as h,bA as q,bn as se,c9 as v,aA as l,aB as z,bV as O,br as Ve,ca as Me,bH as T,a5 as Q,bl as Z,bS as M,bO as be,ay as B,a7 as ke,aw as ze,bz as Pe}from"./3SdAC2_C.js";import{f as W}from"./Drf1gLyo.js";import{Y as Xe}from"./CIKXOyvw.js";import{F as I,cF as Ye,bF as Ae,d3 as Re,aC as Ge,cr as Je,bn as Qe,bi as Ze,bh as et,bg as tt}from"./D7yetF0v.js";import{ay as at,aB as rt}from"./DpvQ3NRH.js";import{f as st}from"./CZ5zON0R.js";import{g as nt,i as it,I as lt}from"./CueOVPTy.js";import{s as E,g as ot,f as De}from"./BCuI_zgX.js";import{a as Te}from"./CFB2mNds.js";import{i as S}from"./VTJf_qPn.js";import{n as J,l as Ce,c as Le}from"./BlRGZv8u.js";import{m as ct}from"./W05hyx94.js";import{a as ut}from"./BOnTc4ny.js";import{al as mt,j as pe}from"./awY5HvZY.js";var dt=z('<span class="svelte-dywwvd"></span>'),vt=z('<span class="waveform svelte-dywwvd" aria-hidden="true" data-dictation-waveform=""></span>');function Ue(w,a){if(new.target)return ee({component:Ue,...w});re(a,!0);let g=i(a,"levels",7);const r=v(()=>{const s=g().slice(-Te).map(m=>Number.isFinite(m)?Math.min(1,Math.max(0,m)):0);return[...new Array(Te-s.length).fill(0),...s]});var d={get levels(){return g()},set levels(s){g(s),l()},$set:te,$on:(s,m)=>ae(a,s,m)},_=vt();return nt(_,21,()=>t(r),it,(s,m)=>{var c=dt();let x;$(()=>{E(c,"data-level",t(m)),x=ot(c,"",x,{height:`${2+t(m)*12}px`})}),h(s,c)}),q(_),h(w,_),se(d)}var gt=z('<span class="dictation-meter svelte-1oz1rct"><span class="elapsed svelte-1oz1rct" data-dictation-elapsed=""> </span> <!></span>');function Fe(w,a){if(new.target)return ee({component:Fe,...w});re(a,!0);let g=i(a,"levels",7),r=i(a,"startedAt",7,null),d=i(a,"elapsed",7),_=O(Ve(Date.now()));Me(()=>{if(!(d()!==void 0||r()===null))return T(_,Date.now(),!0),Xe.subscribe(new Date(r()),()=>T(_,Date.now(),!0),"second")});const s=v(()=>d()??st(r()===null?0:t(_)-r()));var m={get levels(){return g()},set levels(u){g(u),l()},get startedAt(){return r()},set startedAt(u=null){r(u),l()},get elapsed(){return d()},set elapsed(u){d(u),l()},$set:te,$on:(u,R)=>ae(a,u,R)},c=gt(),x=Q(c),P=Z(x,!0),C=M(x,2);return Ue(C,{get levels(){return g()}}),q(c),$(()=>be(P,t(s))),h(w,c),se(m)}var ft=new Set(["$$slots","$$events","$$legacy","class"]),pt=z("<!> <!>",1);function bt(w,a){if(new.target)return ee({component:bt,...w});re(a,!0);const g=()=>xe(c,"$levels$",d),r=()=>xe(x,"$startedAt$",d),[d,_]=He();let s=i(a,"class",7,""),m=Ke(a,ft);const c=at(),x=rt();var P={get class(){return s()},set class(u=""){s(u),l()},$set:te,$on:(u,R)=>ae(a,u,R)};{let u=v(()=>`dictation-stop-pill ${s()}`.trim());W(w,qe({variant:"ghost",size:"sm",get class(){return t(u)},"aria-pressed":"true"},()=>m,{children:(R,H)=>{var p=pt(),U=B(p);I(U,{get icon(){return Ye},size:14});var j=M(U,2);Fe(j,{get levels(){return g()},get startedAt(){return r()}}),h(R,p)},$$slots:{default:!0}}))}var C=se(P);return _(),C}var ht=z('<img class="w-full h-full object-cover"/>'),_t=z('<div class="flex size-full items-center justify-center bg-muted text-subtle"><!></div>'),yt=z("<div><!> <!></div> <!>",1),wt=z('<span class="tabular-nums opacity-70 shrink-0" data-testid="attachment-upload-progress"> </span>'),xt=z("<!> <!>",1),kt=z('<div class="w-4 h-4 rounded overflow-hidden shrink-0"><img class="w-full h-full object-cover"/></div>'),zt=z('<div><!> <span class="font-medium truncate max-w-30"> </span> <!> <!></div>');function Pt(w,a){if(new.target)return ee({component:Pt,...w});re(a,!0);let g=i(a,"id",7),r=i(a,"name",7),d=i(a,"type",7,""),_=i(a,"size",7),s=i(a,"file",7),m=i(a,"imageData",7),c=i(a,"imageMimeType",7),x=i(a,"imageUrl",7),P=i(a,"onRemove",7),C=i(a,"class",7,""),u=i(a,"variant",7,"chip"),R=i(a,"thumbnailClass",7,"w-16 h-16"),H=i(a,"disabled",7,!1),p=i(a,"placementStatus",7,void 0),U=i(a,"placementProgress",7,void 0),j=i(a,"placementError",7,void 0),K=i(a,"onRetry",7),V=O(null);const ne=v(()=>mt(c()||d()||s()?.type));let ie=O(null);const y=v(()=>t(ne)?m()&&c()?`data:${pe(c())};base64,${m()}`:x()??t(ie):null);Me(()=>{if(t(ne)&&!(m()&&c())&&s()){const e=URL.createObjectURL(s());return T(ie,e,!0),()=>URL.revokeObjectURL(e)}T(ie,null)});const Se=v(()=>{if(d()==="folder")return Qe;const e=pe(d()||c()||s()?.type);return e.startsWith("image")?Ae:e.includes("javascript")||e.includes("typescript")||e.includes("json")?Ze:e.includes("text")||e.includes("markdown")?et:tt}),le=v(()=>pe(d()||c()||s()?.type).startsWith("image")),Ie=v(()=>{if(p()!=="failed")return;const e=N.chat_attachmentPreview_placementFailed_tooltip({name:r()});return j()?`${e} — ${j()}`:e}),he=v(()=>{if(p()!=="placing"||U()===void 0)return;const e=Math.max(0,Math.min(1,U()));return ct(e,{style:"percent",maximumFractionDigits:0})});let oe=O(!1),ce=O(null);function _e(){u()==="thumbnail"&&t(le)&&t(y)&&T(oe,!0)}function Ee(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),_e())}function $e(e){e.stopPropagation(),P()?.(g())}var je={get id(){return g()},set id(e){g(e),l()},get name(){return r()},set name(e){r(e),l()},get type(){return d()},set type(e=""){d(e),l()},get size(){return _()},set size(e){_(e),l()},get file(){return s()},set file(e){s(e),l()},get imageData(){return m()},set imageData(e){m(e),l()},get imageMimeType(){return c()},set imageMimeType(e){c(e),l()},get imageUrl(){return x()},set imageUrl(e){x(e),l()},get onRemove(){return P()},set onRemove(e){P(e),l()},get class(){return C()},set class(e=""){C(e),l()},get variant(){return u()},set variant(e="chip"){u(e),l()},get thumbnailClass(){return R()},set thumbnailClass(e="w-16 h-16"){R(e),l()},get disabled(){return H()},set disabled(e=!1){H(e),l()},get placementStatus(){return p()},set placementStatus(e=void 0){p(e),l()},get placementProgress(){return U()},set placementProgress(e=void 0){U(e),l()},get placementError(){return j()},set placementError(e=void 0){j(e),l()},get onRetry(){return K()},set onRetry(e){K(e),l()},$set:te,$on:(e,b)=>ae(a,e,b)},ye=ke(),Ne=B(ye);{var Oe=e=>{var b=yt(),D=B(b),X=Q(D);{let A=v(()=>N.chat_attachmentPreview_viewFullSize_ariaLabel({name:r()})),F=v(()=>H()||!t(y));W(X,{variant:"plain",wrapContent:!1,type:"button",get class(){return`${R()??""} rounded-lg overflow-hidden cursor-pointer hover:opacity-90 transition-opacity`},onclick:_e,onkeydown:Ee,get"aria-label"(){return t(A)},get title(){return r()},get disabled(){return t(F)},get ref(){return t(ce)},set ref(L){T(ce,L,!0)},children:(L,ve)=>{var Y=ke(),ge=B(Y);{var n=o=>{var f=ht();$(()=>{E(f,"src",t(y)),E(f,"alt",r())}),ze("error",f,()=>T(V,t(y),!0)),Pe(f),h(o,f)},k=o=>{var f=_t(),G=Q(f);I(G,{get icon(){return Ae},size:"15"}),q(f),h(o,f)};S(ge,o=>{t(y)?o(n):o(k,-1)})}h(L,Y)},$$slots:{default:!0}})}var ue=M(X,2);{var me=A=>{{let F=v(()=>N.chat_attachmentPreview_remove_ariaLabel({name:r()}));W(A,{variant:"ghost",size:"icon-xs",class:"absolute top-0.5 right-0.5 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity duration-spring-fast ease-spring-fast motion-reduce:transition-none bg-background/80 hover:bg-background shadow-sm",onclick:$e,get"aria-label"(){return t(F)},children:(L,ve)=>{I(L,{get icon(){return Re},size:"10"})},$$slots:{default:!0}})}};S(ue,A=>{P()&&A(me)})}q(D);var de=M(D,2);{let A=v(()=>t(y)??"");ut(de,{get imageUrl(){return t(A)},get imageName(){return r()},get openerElement(){return t(ce)},get open(){return t(oe)},set open(F){T(oe,F,!0)}})}$(()=>De(D,1,`relative group shrink-0 ${C()??""}`)),J(1,D,()=>Ce,()=>({tier:"moderate",y:0,scale:.9})),J(2,D,()=>Le,()=>({tier:"fast"})),h(e,b)},Be=e=>{var b=zt(),D=Q(b);{var X=n=>{var k=xt(),o=B(k);lt(o,{size:15,class:"opacity-50 shrink-0"});var f=M(o,2);{var G=fe=>{var we=wt(),We=Z(we,!0);$(()=>be(We,t(he))),h(fe,we)};S(f,fe=>{t(he)!==void 0&&fe(G)})}h(n,k)},ue=n=>{I(n,{get icon(){return Ge},size:"15",class:"shrink-0"})},me=n=>{var k=kt(),o=Z(k);$(()=>{E(o,"src",t(y)),E(o,"alt",r())}),ze("error",o,()=>T(V,t(y),!0)),Pe(o),h(n,k)},de=n=>{I(n,{get icon(){return t(Se)},size:"15",class:"opacity-30 shrink-0"})};S(D,n=>{p()==="placing"?n(X):p()==="failed"?n(ue,1):t(le)&&t(y)&&t(V)!==t(y)?n(me,2):n(de,-1)})}var A=M(D,2),F=Z(A,!0),L=M(A,2);{var ve=n=>{{let k=v(()=>N.chat_attachmentPreview_retryPlacement_ariaLabel({name:r()}));W(n,{variant:"ghost-light",size:"icon-xs",class:"shrink-0 -my-1",onclick:o=>{o.stopPropagation(),K()(g())},get"aria-label"(){return t(k)},"data-testid":"attachment-retry",children:(o,f)=>{I(o,{get icon(){return Je},size:"10"})},$$slots:{default:!0}})}};S(L,n=>{p()==="failed"&&K()&&n(ve)})}var Y=M(L,2);{var ge=n=>{{let k=v(()=>p()==="failed"?"":"opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),o=v(()=>N.chat_attachmentPreview_removeAttachment_ariaLabel());W(n,{variant:"ghost-light",size:"icon-xs",get class(){return`shrink-0 ${t(k)??""} transition-opacity duration-spring-fast ease-spring-fast motion-reduce:transition-none -my-1 -mr-1`},onclick:()=>P()(g()),get"aria-label"(){return t(o)},children:(f,G)=>{I(f,{get icon(){return Re},size:"10"})},$$slots:{default:!0}})}};S(Y,n=>{P()&&n(ge)})}q(b),$(()=>{De(b,1,`flex items-center gap-1.5 px-2 py-0.5 rounded text-xs whitespace-nowrap group shrink-0 ${p()==="failed"?"bg-danger-background/10 text-danger border border-danger/40":"bg-muted/70 text-subtle"} ${C()??""}`),E(b,"data-placement-status",p()),E(b,"title",t(Ie)),be(F,r())}),J(1,b,()=>Ce,()=>({tier:"moderate",y:0,scale:.9})),J(2,b,()=>Le,()=>({tier:"fast"})),h(e,b)};S(Ne,e=>{u()==="thumbnail"&&t(le)&&t(ne)&&(!t(y)||t(V)!==t(y))?e(Oe):e(Be,-1)})}return h(w,ye),se(je)}export{Pt as A,Fe as D,bt as a};
1
+ import{t as ee,bo as i,bw as te,b as ae,br as qe,bs as xe,bq as He,bp as Ke,bm as N}from"./YLhFQnIu.js";import{bs as re,b_ as $,aD as t,W as h,bA as q,bn as se,c9 as v,aA as l,aB as z,bV as O,br as Ve,ca as Me,bH as T,a5 as Q,bl as Z,bS as M,bO as be,ay as B,a7 as ke,aw as ze,bz as Pe}from"./3SdAC2_C.js";import{f as W}from"./Cw2fqKk9.js";import{Y as Xe}from"./DJivXy66.js";import{F as I,cF as Ye,bF as Ae,d3 as Re,aC as Ge,cr as Je,bn as Qe,bi as Ze,bh as et,bg as tt}from"./gwv5JQYH.js";import{ay as at,aB as rt}from"./mUNs8NSR.js";import{f as st}from"./DPmNtGFj.js";import{g as nt,i as it,I as lt}from"./oBIu7LTI.js";import{s as E,g as ot,f as De}from"./BQhBnAuP.js";import{a as Te}from"./D-aEx3GL.js";import{i as S}from"./YeOAvjnW.js";import{n as J,l as Ce,c as Le}from"./FLpsgWeB.js";import{m as ct}from"./DIEHuZ8f.js";import{a as ut}from"./T-5C1GqS.js";import{al as mt,j as pe}from"./ByBw1QkA.js";var dt=z('<span class="svelte-dywwvd"></span>'),vt=z('<span class="waveform svelte-dywwvd" aria-hidden="true" data-dictation-waveform=""></span>');function Ue(w,a){if(new.target)return ee({component:Ue,...w});re(a,!0);let g=i(a,"levels",7);const r=v(()=>{const s=g().slice(-Te).map(m=>Number.isFinite(m)?Math.min(1,Math.max(0,m)):0);return[...new Array(Te-s.length).fill(0),...s]});var d={get levels(){return g()},set levels(s){g(s),l()},$set:te,$on:(s,m)=>ae(a,s,m)},_=vt();return nt(_,21,()=>t(r),it,(s,m)=>{var c=dt();let x;$(()=>{E(c,"data-level",t(m)),x=ot(c,"",x,{height:`${2+t(m)*12}px`})}),h(s,c)}),q(_),h(w,_),se(d)}var gt=z('<span class="dictation-meter svelte-1oz1rct"><span class="elapsed svelte-1oz1rct" data-dictation-elapsed=""> </span> <!></span>');function Fe(w,a){if(new.target)return ee({component:Fe,...w});re(a,!0);let g=i(a,"levels",7),r=i(a,"startedAt",7,null),d=i(a,"elapsed",7),_=O(Ve(Date.now()));Me(()=>{if(!(d()!==void 0||r()===null))return T(_,Date.now(),!0),Xe.subscribe(new Date(r()),()=>T(_,Date.now(),!0),"second")});const s=v(()=>d()??st(r()===null?0:t(_)-r()));var m={get levels(){return g()},set levels(u){g(u),l()},get startedAt(){return r()},set startedAt(u=null){r(u),l()},get elapsed(){return d()},set elapsed(u){d(u),l()},$set:te,$on:(u,R)=>ae(a,u,R)},c=gt(),x=Q(c),P=Z(x,!0),C=M(x,2);return Ue(C,{get levels(){return g()}}),q(c),$(()=>be(P,t(s))),h(w,c),se(m)}var ft=new Set(["$$slots","$$events","$$legacy","class"]),pt=z("<!> <!>",1);function bt(w,a){if(new.target)return ee({component:bt,...w});re(a,!0);const g=()=>xe(c,"$levels$",d),r=()=>xe(x,"$startedAt$",d),[d,_]=He();let s=i(a,"class",7,""),m=Ke(a,ft);const c=at(),x=rt();var P={get class(){return s()},set class(u=""){s(u),l()},$set:te,$on:(u,R)=>ae(a,u,R)};{let u=v(()=>`dictation-stop-pill ${s()}`.trim());W(w,qe({variant:"ghost",size:"sm",get class(){return t(u)},"aria-pressed":"true"},()=>m,{children:(R,H)=>{var p=pt(),U=B(p);I(U,{get icon(){return Ye},size:14});var j=M(U,2);Fe(j,{get levels(){return g()},get startedAt(){return r()}}),h(R,p)},$$slots:{default:!0}}))}var C=se(P);return _(),C}var ht=z('<img class="w-full h-full object-cover"/>'),_t=z('<div class="flex size-full items-center justify-center bg-muted text-subtle"><!></div>'),yt=z("<div><!> <!></div> <!>",1),wt=z('<span class="tabular-nums opacity-70 shrink-0" data-testid="attachment-upload-progress"> </span>'),xt=z("<!> <!>",1),kt=z('<div class="w-4 h-4 rounded overflow-hidden shrink-0"><img class="w-full h-full object-cover"/></div>'),zt=z('<div><!> <span class="font-medium truncate max-w-30"> </span> <!> <!></div>');function Pt(w,a){if(new.target)return ee({component:Pt,...w});re(a,!0);let g=i(a,"id",7),r=i(a,"name",7),d=i(a,"type",7,""),_=i(a,"size",7),s=i(a,"file",7),m=i(a,"imageData",7),c=i(a,"imageMimeType",7),x=i(a,"imageUrl",7),P=i(a,"onRemove",7),C=i(a,"class",7,""),u=i(a,"variant",7,"chip"),R=i(a,"thumbnailClass",7,"w-16 h-16"),H=i(a,"disabled",7,!1),p=i(a,"placementStatus",7,void 0),U=i(a,"placementProgress",7,void 0),j=i(a,"placementError",7,void 0),K=i(a,"onRetry",7),V=O(null);const ne=v(()=>mt(c()||d()||s()?.type));let ie=O(null);const y=v(()=>t(ne)?m()&&c()?`data:${pe(c())};base64,${m()}`:x()??t(ie):null);Me(()=>{if(t(ne)&&!(m()&&c())&&s()){const e=URL.createObjectURL(s());return T(ie,e,!0),()=>URL.revokeObjectURL(e)}T(ie,null)});const Se=v(()=>{if(d()==="folder")return Qe;const e=pe(d()||c()||s()?.type);return e.startsWith("image")?Ae:e.includes("javascript")||e.includes("typescript")||e.includes("json")?Ze:e.includes("text")||e.includes("markdown")?et:tt}),le=v(()=>pe(d()||c()||s()?.type).startsWith("image")),Ie=v(()=>{if(p()!=="failed")return;const e=N.chat_attachmentPreview_placementFailed_tooltip({name:r()});return j()?`${e} — ${j()}`:e}),he=v(()=>{if(p()!=="placing"||U()===void 0)return;const e=Math.max(0,Math.min(1,U()));return ct(e,{style:"percent",maximumFractionDigits:0})});let oe=O(!1),ce=O(null);function _e(){u()==="thumbnail"&&t(le)&&t(y)&&T(oe,!0)}function Ee(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),_e())}function $e(e){e.stopPropagation(),P()?.(g())}var je={get id(){return g()},set id(e){g(e),l()},get name(){return r()},set name(e){r(e),l()},get type(){return d()},set type(e=""){d(e),l()},get size(){return _()},set size(e){_(e),l()},get file(){return s()},set file(e){s(e),l()},get imageData(){return m()},set imageData(e){m(e),l()},get imageMimeType(){return c()},set imageMimeType(e){c(e),l()},get imageUrl(){return x()},set imageUrl(e){x(e),l()},get onRemove(){return P()},set onRemove(e){P(e),l()},get class(){return C()},set class(e=""){C(e),l()},get variant(){return u()},set variant(e="chip"){u(e),l()},get thumbnailClass(){return R()},set thumbnailClass(e="w-16 h-16"){R(e),l()},get disabled(){return H()},set disabled(e=!1){H(e),l()},get placementStatus(){return p()},set placementStatus(e=void 0){p(e),l()},get placementProgress(){return U()},set placementProgress(e=void 0){U(e),l()},get placementError(){return j()},set placementError(e=void 0){j(e),l()},get onRetry(){return K()},set onRetry(e){K(e),l()},$set:te,$on:(e,b)=>ae(a,e,b)},ye=ke(),Ne=B(ye);{var Oe=e=>{var b=yt(),D=B(b),X=Q(D);{let A=v(()=>N.chat_attachmentPreview_viewFullSize_ariaLabel({name:r()})),F=v(()=>H()||!t(y));W(X,{variant:"plain",wrapContent:!1,type:"button",get class(){return`${R()??""} rounded-lg overflow-hidden cursor-pointer hover:opacity-90 transition-opacity`},onclick:_e,onkeydown:Ee,get"aria-label"(){return t(A)},get title(){return r()},get disabled(){return t(F)},get ref(){return t(ce)},set ref(L){T(ce,L,!0)},children:(L,ve)=>{var Y=ke(),ge=B(Y);{var n=o=>{var f=ht();$(()=>{E(f,"src",t(y)),E(f,"alt",r())}),ze("error",f,()=>T(V,t(y),!0)),Pe(f),h(o,f)},k=o=>{var f=_t(),G=Q(f);I(G,{get icon(){return Ae},size:"15"}),q(f),h(o,f)};S(ge,o=>{t(y)?o(n):o(k,-1)})}h(L,Y)},$$slots:{default:!0}})}var ue=M(X,2);{var me=A=>{{let F=v(()=>N.chat_attachmentPreview_remove_ariaLabel({name:r()}));W(A,{variant:"ghost",size:"icon-xs",class:"absolute top-0.5 right-0.5 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity duration-spring-fast ease-spring-fast motion-reduce:transition-none bg-background/80 hover:bg-background shadow-sm",onclick:$e,get"aria-label"(){return t(F)},children:(L,ve)=>{I(L,{get icon(){return Re},size:"10"})},$$slots:{default:!0}})}};S(ue,A=>{P()&&A(me)})}q(D);var de=M(D,2);{let A=v(()=>t(y)??"");ut(de,{get imageUrl(){return t(A)},get imageName(){return r()},get openerElement(){return t(ce)},get open(){return t(oe)},set open(F){T(oe,F,!0)}})}$(()=>De(D,1,`relative group shrink-0 ${C()??""}`)),J(1,D,()=>Ce,()=>({tier:"moderate",y:0,scale:.9})),J(2,D,()=>Le,()=>({tier:"fast"})),h(e,b)},Be=e=>{var b=zt(),D=Q(b);{var X=n=>{var k=xt(),o=B(k);lt(o,{size:15,class:"opacity-50 shrink-0"});var f=M(o,2);{var G=fe=>{var we=wt(),We=Z(we,!0);$(()=>be(We,t(he))),h(fe,we)};S(f,fe=>{t(he)!==void 0&&fe(G)})}h(n,k)},ue=n=>{I(n,{get icon(){return Ge},size:"15",class:"shrink-0"})},me=n=>{var k=kt(),o=Z(k);$(()=>{E(o,"src",t(y)),E(o,"alt",r())}),ze("error",o,()=>T(V,t(y),!0)),Pe(o),h(n,k)},de=n=>{I(n,{get icon(){return t(Se)},size:"15",class:"opacity-30 shrink-0"})};S(D,n=>{p()==="placing"?n(X):p()==="failed"?n(ue,1):t(le)&&t(y)&&t(V)!==t(y)?n(me,2):n(de,-1)})}var A=M(D,2),F=Z(A,!0),L=M(A,2);{var ve=n=>{{let k=v(()=>N.chat_attachmentPreview_retryPlacement_ariaLabel({name:r()}));W(n,{variant:"ghost-light",size:"icon-xs",class:"shrink-0 -my-1",onclick:o=>{o.stopPropagation(),K()(g())},get"aria-label"(){return t(k)},"data-testid":"attachment-retry",children:(o,f)=>{I(o,{get icon(){return Je},size:"10"})},$$slots:{default:!0}})}};S(L,n=>{p()==="failed"&&K()&&n(ve)})}var Y=M(L,2);{var ge=n=>{{let k=v(()=>p()==="failed"?"":"opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),o=v(()=>N.chat_attachmentPreview_removeAttachment_ariaLabel());W(n,{variant:"ghost-light",size:"icon-xs",get class(){return`shrink-0 ${t(k)??""} transition-opacity duration-spring-fast ease-spring-fast motion-reduce:transition-none -my-1 -mr-1`},onclick:()=>P()(g()),get"aria-label"(){return t(o)},children:(f,G)=>{I(f,{get icon(){return Re},size:"10"})},$$slots:{default:!0}})}};S(Y,n=>{P()&&n(ge)})}q(b),$(()=>{De(b,1,`flex items-center gap-1.5 px-2 py-0.5 rounded text-xs whitespace-nowrap group shrink-0 ${p()==="failed"?"bg-danger-background/10 text-danger border border-danger/40":"bg-muted/70 text-subtle"} ${C()??""}`),E(b,"data-placement-status",p()),E(b,"title",t(Ie)),be(F,r())}),J(1,b,()=>Ce,()=>({tier:"moderate",y:0,scale:.9})),J(2,b,()=>Le,()=>({tier:"fast"})),h(e,b)};S(Ne,e=>{u()==="thumbnail"&&t(le)&&t(ne)&&(!t(y)||t(V)!==t(y))?e(Oe):e(Be,-1)})}return h(w,ye),se(je)}export{Pt as A,Fe as D,bt as a};
@@ -1 +1 @@
1
- import{t as B,bo as f,bw as T,bq as W,b as j,bm as q,bs as z}from"./DWvCfaBg.js";import{bs as D,cd as H,ca as L,a7 as O,ay as E,W as d,bn as F,aA as h,aD as t,c9 as r,a5 as G,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./3SdAC2_C.js";import{i as R}from"./VTJf_qPn.js";import{C as U}from"./De2a277N.js";import{dH as V}from"./3Kr2ijlK.js";import{i as X}from"./H2jLkRRS.js";var Y=Q('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p></div>');function Z(c,o){if(new.target)return B({component:Z,...c});D(o,!0);const l=()=>z(b,"$workspace",m),[m,u]=W();let s=f(o,"tab",7),n=f(o,"workspaceId",7);const i=H(n());L(()=>{i.set(n())});const b=V(i),_=r(()=>l()?.worktreePath||l()?.repositoryPath||""),g=r(()=>s().data?.changes||[]),v=r(()=>s().data?.isAggregate||!1),w=r(()=>s().data?.agentId),k=r(()=>t(g).map(e=>{const a=e.filePath&&X(e.filePath)?e.filePath:`${t(_)}/${e.filePath}`;return{...e,filePath:a}}));var C={get tab(){return s()},set tab(e){s(e),h()},get workspaceId(){return n()},set workspaceId(e){n(e),h()},$set:T,$on:(e,a)=>j(o,e,a)},p=O(),y=E(p);{var P=e=>{U(e,{isLoading:!1,get changes(){return t(k)},get isAggregate(){return t(v)},get agentId(){return t(w)},showStagingControls:!0})},I=e=>{var a=Y(),A=G(a),$=J(A,!0);K(a),M(S=>N($,S),[()=>q.layout_chatChanges_noChanges_label()]),d(e,a)};R(y,e=>{t(g).length>0?e(P):e(I,-1)})}d(c,p);var x=F(C);return u(),x}export{Z as default};
1
+ import{t as B,bo as f,bw as T,bq as W,b as j,bm as q,bs as z}from"./YLhFQnIu.js";import{bs as D,cd as H,ca as L,a7 as O,ay as E,W as d,bn as F,aA as h,aD as t,c9 as r,a5 as G,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./3SdAC2_C.js";import{i as R}from"./YeOAvjnW.js";import{C as U}from"./C07_BcWL.js";import{dH as V}from"./BJbm_MWC.js";import{i as X}from"./H2jLkRRS.js";var Y=Q('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p></div>');function Z(c,o){if(new.target)return B({component:Z,...c});D(o,!0);const l=()=>z(b,"$workspace",m),[m,u]=W();let s=f(o,"tab",7),n=f(o,"workspaceId",7);const i=H(n());L(()=>{i.set(n())});const b=V(i),_=r(()=>l()?.worktreePath||l()?.repositoryPath||""),g=r(()=>s().data?.changes||[]),v=r(()=>s().data?.isAggregate||!1),w=r(()=>s().data?.agentId),k=r(()=>t(g).map(e=>{const a=e.filePath&&X(e.filePath)?e.filePath:`${t(_)}/${e.filePath}`;return{...e,filePath:a}}));var C={get tab(){return s()},set tab(e){s(e),h()},get workspaceId(){return n()},set workspaceId(e){n(e),h()},$set:T,$on:(e,a)=>j(o,e,a)},p=O(),y=E(p);{var P=e=>{U(e,{isLoading:!1,get changes(){return t(k)},get isAggregate(){return t(v)},get agentId(){return t(w)},showStagingControls:!0})},I=e=>{var a=Y(),A=G(a),$=J(A,!0);K(a),M(S=>N($,S),[()=>q.layout_chatChanges_noChanges_label()]),d(e,a)};R(y,e=>{t(g).length>0?e(P):e(I,-1)})}d(c,p);var x=F(C);return u(),x}export{Z as default};
@@ -1 +1 @@
1
- import{i as r}from"./CL3a4Hm1.js";import{w as a,I as e}from"./Bqd7fdCF.js";import{Jx as s}from"./CIoJPvjg.js";import{c as t}from"./Pyf1FzKM.js";function C(o,i){return t(s,o,{navigate:i,...a("windowChrome")?{closeWindow:()=>r(e.WINDOW.CLOSE)}:{}})}export{C as closeActiveTab};
1
+ import{i as r}from"./CL3a4Hm1.js";import{w as a,I as e}from"./Bqd7fdCF.js";import{Jx as s}from"./D5wnbxHp.js";import{c as t}from"./Bm3beBRj.js";function C(o,i){return t(s,o,{navigate:i,...a("windowChrome")?{closeWindow:()=>r(e.WINDOW.CLOSE)}:{}})}export{C as closeActiveTab};
@@ -0,0 +1 @@
1
+ import{g as t}from"./YqTahsxp.js";import{Jx as r}from"./D5wnbxHp.js";import{aK as o}from"./mUNs8NSR.js";function l(e){return!e||t().status!=="connected"?null:o.select(r.state,e)}export{l as resolveConnectedWorkspaceKeySlot};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/XMluVOSf.js","/app/immutable/chunks/BolJpU8l.js","/app/immutable/chunks/DWvCfaBg.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/awY5HvZY.js","/app/immutable/chunks/3Kr2ijlK.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/CIoJPvjg.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/DY5rw8pn.js","/app/immutable/chunks/Bu3PKqut.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/D7yetF0v.js","/app/immutable/chunks/Y_tkjygB.js","/app/immutable/chunks/VTJf_qPn.js","/app/immutable/chunks/BCuI_zgX.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/CueOVPTy.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CIKXOyvw.js","/app/immutable/chunks/zFAkpaJn.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BrDfJqC4.js","/app/immutable/chunks/W05hyx94.js","/app/immutable/chunks/CFB2mNds.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/Bb-hI5du.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/DpvQ3NRH.js","/app/immutable/chunks/Btst3lgy.js","/app/immutable/chunks/CQ5BHnSj.js","/app/immutable/chunks/DJJ2Xrlq.js","/app/immutable/chunks/UqcU95a7.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/D5xlMOwU.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/BKD7o1lQ.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/Drf1gLyo.js","/app/immutable/chunks/bIL0xbKX.js","/app/immutable/chunks/BOnTc4ny.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/CTqRHXfu.js","/app/immutable/chunks/DEKjIPd8.js","/app/immutable/chunks/BRdQpeCl.js","/app/immutable/chunks/BlRGZv8u.js","/app/immutable/chunks/B3OJ_2Dd.js","/app/immutable/chunks/B8foSZsl.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/CdGl_2eX.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/77KTvr2w.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/B0kNPCxU.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/Df4a242o.js","/app/immutable/chunks/DeY70dof.js","/app/immutable/chunks/yqEyUNVG.js","/app/immutable/chunks/2aKRVAvL.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/BXHbm15d.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/CsilY7l9.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/DAVG7sIL.js","/app/immutable/chunks/BweHPPaS.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/BbIcudMY.js","/app/immutable/chunks/CUA9hM4m.js","/app/immutable/chunks/CRUcTVFP.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css"])))=>i.map(i=>d[i]);
2
- import{_ as Z}from"./DWvCfaBg.js";import{b as u,ay as o,aD as I,ah as ee,s as te,t as ne,u as se,aL as L,ad as re,ae as ie,a9 as D,Q as S,af as R,X as ae,W as oe,a4 as ce,aR as le,ba as ue,at as de,bh as fe}from"./BolJpU8l.js";import{G as k}from"./-xK_vQQs.js";function P(e,{edgePathsClass:n="edges edgePaths"}={}){const t=e.insert("g").attr("class","root"),r=t.insert("g").attr("class","clusters"),s=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:r,edgePaths:s,edgeLabels:i,nodes:c,rootGroups:t}}u(P,"createLayoutElementGroups");async function T(e,n,t){if(n.label){const{shapeSvg:r,bbox:s}=await de(e,t===void 0?n:{...n,width:t});n.labelBBox={width:s.width,height:s.height},r.remove()}else n.labelBBox={width:0,height:0}}u(T,"measureGroupLabel");async function _(e,n,t){const r=await ee(e,n,t),s=r.node()?.getBBox()??{width:0,height:0};return n.width=s.width,n.height=s.height,r}u(_,"insertMeasuredNode");function B(e,n,t){let r=e;const s=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||s.has(r.parentId))break;s.add(r.parentId),r=n.get(r.parentId)}return t}u(B,"resolveNodeDir");async function M(e,n,t={}){const r=new k({multigraph:!0,compound:!0}),s=[...n.edges],i=ae(),c=P(e),{edgeLabels:f,nodes:a}=c,g=new Map,m=new Map(n.nodes.map(d=>[d.id,d])),C=n.direction,w=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup){if(w){const b=t.unwrapGroupLabels&&d.labelType!=="markdown";await T(a,d,b?Number.POSITIVE_INFINITY:void 0)}r.setNode(d.id,{...d})}else{if(w){const b=await _(a,d,{config:i,dir:B(d,m,C)});g.set(d.id,b)}r.setNode(d.id,{...d})}}));for(const d of s)w&&D(d)&&await R(f,d),r.setEdge(d.start,d.end,{...d},d.id),n.edges.some(E=>E.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:d}=await Z(async()=>{const{captureNodeSizes:b}=await import("./XMluVOSf.js");return{captureNodeSizes:b}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78]),import.meta.url);d(e,n)}return{graph:r,groups:c,nodeElements:g}}u(M,"createGraphWithElements");var l=new Map,h=new Map,A=new Map,ge=u(()=>{h.clear(),A.clear(),l.clear()},"clear"),v=u((e,n)=>{const t=h.get(n)||[];return o.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),be=u((e,n)=>{const t=h.get(n)||[];return o.info("Descendants of ",n," is ",t),o.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),X=u((e,n,t,r)=>{o.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),o.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(i=>{if(n.children(i).length>0)X(i,n,t,r);else{const c=n.node(i);o.info("cp ",i," to ",r," with parent ",e),t.setNode(i,c),r!==n.parent(i)&&(o.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.debug("Setting parent",i,e),t.setParent(i,e)):(o.info("In copy ",e,"root",r,"data",n.node(e),r),o.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const f=n.edges(i);o.debug("Copying Edges",f),f.forEach(a=>{o.info("Edge",a);const g=n.edge(a.v,a.w,a.name);o.info("Edge data",g,r);try{be(a,r)?(o.info("Copying as ",a.v,a.w,g,a.name),t.setEdge(a.v,a.w,g,a.name),o.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",r," clusterId:",e)}catch(m){o.error(m)}})}o.debug("Removing node",i),n.removeNode(i)})},"copy"),G=u((e,n)=>{const t=n.children(e);let r=[...t];for(const s of t)A.set(s,e),r=[...r,...G(s,n)];return r},"extractDescendants"),he=u((e,n,t)=>{const r=e.edges().filter(a=>a.v===n||a.w===n),s=e.edges().filter(a=>a.v===t||a.w===t),i=r.map(a=>({v:a.v===n?t:a.v,w:a.w===n?n:a.w})),c=s.map(a=>({v:a.v,w:a.w}));return i.filter(a=>c.some(g=>a.v===g.v&&a.w===g.w))},"findCommonEdges"),p=u((e,n,t)=>{const r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const i of r){const c=p(i,n,t),f=he(n,t,c);if(c)if(f.length>0)s=c;else return c}return s},"findNonClusterChild"),x=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Ne=u((e,n)=>{if(!e||n>10){o.debug("Opting out, no graph ");return}else o.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug("Cluster identified",t," Replacement id in edges: ",p(t,e,t)),h.set(t,G(t,e)),l.set(t,{id:p(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),s=e.edges();r.length>0?(o.debug("Cluster identified",t,h),s.forEach(i=>{const c=v(i.v,t),f=v(i.w,t);c^f&&(o.debug("Edge: ",i," leaves cluster ",t),o.debug("Descendants of XXX ",t,": ",h.get(t)),l.get(t).externalConnections=!0)})):o.debug("Not a cluster ",t,h)});for(let t of l.keys()){const r=l.get(t).id,s=e.parent(r);s!==t&&l.has(s)&&!l.get(s).externalConnections&&(l.get(t).id=s);const i=e.edges().some(c=>c.v===t);if(r&&l.get(t)?.externalConnections&&i&&$(e,r,t)){const c=me(e,t,e.parent(r));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){const r=e.edge(t);o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let s=t.v,i=t.w;if(o.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(o.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),s=x(t.v),i=x(t.w),e.removeEdge(t.v,t.w,t.name),s!==t.v){const c=e.parent(s);l.get(c).externalConnections=!0,r.fromCluster=t.v}if(i!==t.w){const c=e.parent(i);l.get(c).externalConnections=!0,r.toCluster=t.w}o.debug("Fix Replacing with XXX",s,i,t.name),e.setEdge(s,i,r,t.name)}}),O(e,0),o.trace(l)},"adjustClustersAndEdges"),O=u((e,n)=>{if(n>10){o.error("Bailing out");return}let t=e.nodes(),r=!1;for(const s of t){const i=e.children(s);r=r||i.length>0}if(!r){o.debug("Done, no node has children",e.nodes());return}o.debug("Nodes = ",t,n);for(const s of t)if(o.debug("Extracting node",s,l,l.has(s)&&!l.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",n),!l.has(s))o.debug("Not a cluster",s,n);else if(!l.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){o.debug("Cluster without external connections, without a parent and with children",s,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(s)?.clusterData?.dir&&(c=l.get(s).clusterData.dir,o.debug("Fixing dir",l.get(s).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});X(s,e,f,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:l.get(s).clusterData,label:l.get(s).label,graph:f})}else o.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!l.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),n),o.debug(l);t=e.nodes(),o.debug("New list of nodes",t);for(const s of t){const i=e.node(s);o.debug(" Now next level",s,i),i?.clusterNode&&O(i.graph,n+1)}},"extractor"),F=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(r=>{const s=e.children(r),i=F(e,s);t=[...t,...i]}),t},"sorter"),ye=u(e=>F(e,e.children()),"sortNodesByHierarchy"),$=u((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const s=l.get(r);if(s&&!s.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),me=u((e,n,t)=>{const r=e.children(n)??[];for(const s of r){if(s===t||v(s,t))continue;const i=p(s,e,n);if(i&&!$(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:r,afterPaint:s,paintOptions:i}){const c=n??z;return u(async function(a,g,m,C){const w=g.select("g");(m?.insertMarkers??I)(w,a.markers,a.type,a.diagramId),j();const d={element:w,helpers:m,options:C};d.preparedLayout=await e?.(a,d);const b=await c(a,d),E=await t(a,d),N={...d,measure:b};r?await r(a,N,E):await H(a,N,i),await s?.(a,N,E)},"render")}u(we,"createCommonLayoutRenderer");function j(){te(),ne(),se(),ge()}u(j,"clearLayoutRenderState");async function z(e,{element:n},t){return await M(n,e,t)}u(z,"defaultMeasureLayout");async function H(e,n,t={}){const{measure:r}=n,{groups:s}=r;for(const c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await W(s,c,n,t);const i=V(e.nodes);for(const c of e.edges)Q(c,t)||await Y(s,c,i,e,t,n)}u(H,"paintLayoutData");async function W(e,n,t,r){n.clusterNode?L(n):J(n,t,r)?await re(e.clusters,n):L(n)}u(W,"paintLayoutNode");function J(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(J,"shouldPaintAsCluster");function V(e){const n=new Map;for(const t of e)t?.id&&n.set(t.id,t);return n}u(V,"buildNodeLookup");function Q(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(Q,"shouldSkipPaintEdge");async function Y(e,n,t,r,s,i){const c=ie(e.edgePaths,{...n},s.clusterDb??new Map,r.type,y(n.start,n,t,i,s),y(n.end,n,t,i,s),r.diagramId,q(n,s),r.layoutAlgorithm);D(n)&&(S.has(n.id)||await R(e.edgeLabels,n),K(n,c))}u(Y,"paintLayoutEdge");function y(e,n,t,r,s){return s.getEdgeNode?.(e,n,r)??(e?t.get(e)??{}:{})}u(y,"getRenderedNode");function q(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(q,"shouldSkipIntersect");function K(e,n){const t=n?.updatedPath??n?.originalPath,r=oe(),{subGraphTitleTotalMargin:s}=ce({flowchart:r.flowchart??{}});if(e.label){const i=S.get(e.id),{x:c,y:f}=le(e,n);i.attr("transform",`translate(${c}, ${f+s/2})`)}for(const[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){const{x:f,y:a}=U(e,i,t);ue.get(e.id)[i].attr("transform",`translate(${f}, ${a})`)}}u(K,"positionRenderedEdgeLabel");var ve={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function U(e,n,t){const r=e.terminalLabelCenters?.[n];if(r)return{...r};if(!t)return{x:e.x,y:e.y};const s=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return fe.calcTerminalLabelPosition(s?10:0,ve[n],t)}u(U,"terminalLabelTranslate");export{Ne as a,we as b,l as c,P as d,z as e,p as f,_ as i,ye as s};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CUxtJz1o.js","/app/immutable/chunks/B6-aVrNf.js","/app/immutable/chunks/YLhFQnIu.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/ByBw1QkA.js","/app/immutable/chunks/BJbm_MWC.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/D5wnbxHp.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BUsnh1ZW.js","/app/immutable/chunks/CrpUtGFn.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/gwv5JQYH.js","/app/immutable/chunks/DwGyIIXK.js","/app/immutable/chunks/YeOAvjnW.js","/app/immutable/chunks/BQhBnAuP.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/oBIu7LTI.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/DJivXy66.js","/app/immutable/chunks/CTowDLQa.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/_3Ca9E4W.js","/app/immutable/chunks/DIEHuZ8f.js","/app/immutable/chunks/D-aEx3GL.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DQ8CqY9L.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/mUNs8NSR.js","/app/immutable/chunks/L3K71tUU.js","/app/immutable/chunks/Bq7euxCs.js","/app/immutable/chunks/COVS9Crf.js","/app/immutable/chunks/Idk978zJ.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/0Kw0mmSW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/BKD7o1lQ.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/Cw2fqKk9.js","/app/immutable/chunks/CBbdbU2x.js","/app/immutable/chunks/T-5C1GqS.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/ItBm4ElA.js","/app/immutable/chunks/Bstq-Mm1.js","/app/immutable/chunks/DkERMj5B.js","/app/immutable/chunks/FLpsgWeB.js","/app/immutable/chunks/kvtKUeBe.js","/app/immutable/chunks/DRLJuUwT.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/CIWQMI37.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/WvHbj6rB.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/KtEuoG00.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/Bj4IsLvN.js","/app/immutable/chunks/CGdXewiA.js","/app/immutable/chunks/D2kIeaeO.js","/app/immutable/chunks/D48_y-cl.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/CZB2ndi9.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/DtkIwON_.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/CmhKJ6Ie.js","/app/immutable/chunks/BK0IkwFP.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/BbIcudMY.js","/app/immutable/chunks/UsbmbYa0.js","/app/immutable/chunks/DezlVQ1h.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css"])))=>i.map(i=>d[i]);
2
+ import{_ as Z}from"./YLhFQnIu.js";import{b as u,ay as o,aD as I,ah as ee,s as te,t as ne,u as se,aL as L,ad as re,ae as ie,a9 as D,Q as S,af as R,X as ae,W as oe,a4 as ce,aR as le,ba as ue,at as de,bh as fe}from"./B6-aVrNf.js";import{G as k}from"./-xK_vQQs.js";function P(e,{edgePathsClass:n="edges edgePaths"}={}){const t=e.insert("g").attr("class","root"),r=t.insert("g").attr("class","clusters"),s=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:r,edgePaths:s,edgeLabels:i,nodes:c,rootGroups:t}}u(P,"createLayoutElementGroups");async function T(e,n,t){if(n.label){const{shapeSvg:r,bbox:s}=await de(e,t===void 0?n:{...n,width:t});n.labelBBox={width:s.width,height:s.height},r.remove()}else n.labelBBox={width:0,height:0}}u(T,"measureGroupLabel");async function _(e,n,t){const r=await ee(e,n,t),s=r.node()?.getBBox()??{width:0,height:0};return n.width=s.width,n.height=s.height,r}u(_,"insertMeasuredNode");function B(e,n,t){let r=e;const s=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||s.has(r.parentId))break;s.add(r.parentId),r=n.get(r.parentId)}return t}u(B,"resolveNodeDir");async function M(e,n,t={}){const r=new k({multigraph:!0,compound:!0}),s=[...n.edges],i=ae(),c=P(e),{edgeLabels:f,nodes:a}=c,g=new Map,m=new Map(n.nodes.map(d=>[d.id,d])),C=n.direction,w=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup){if(w){const b=t.unwrapGroupLabels&&d.labelType!=="markdown";await T(a,d,b?Number.POSITIVE_INFINITY:void 0)}r.setNode(d.id,{...d})}else{if(w){const b=await _(a,d,{config:i,dir:B(d,m,C)});g.set(d.id,b)}r.setNode(d.id,{...d})}}));for(const d of s)w&&D(d)&&await R(f,d),r.setEdge(d.start,d.end,{...d},d.id),n.edges.some(E=>E.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:d}=await Z(async()=>{const{captureNodeSizes:b}=await import("./CUxtJz1o.js");return{captureNodeSizes:b}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78]),import.meta.url);d(e,n)}return{graph:r,groups:c,nodeElements:g}}u(M,"createGraphWithElements");var l=new Map,h=new Map,A=new Map,ge=u(()=>{h.clear(),A.clear(),l.clear()},"clear"),v=u((e,n)=>{const t=h.get(n)||[];return o.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),be=u((e,n)=>{const t=h.get(n)||[];return o.info("Descendants of ",n," is ",t),o.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),X=u((e,n,t,r)=>{o.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),o.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(i=>{if(n.children(i).length>0)X(i,n,t,r);else{const c=n.node(i);o.info("cp ",i," to ",r," with parent ",e),t.setNode(i,c),r!==n.parent(i)&&(o.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.debug("Setting parent",i,e),t.setParent(i,e)):(o.info("In copy ",e,"root",r,"data",n.node(e),r),o.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const f=n.edges(i);o.debug("Copying Edges",f),f.forEach(a=>{o.info("Edge",a);const g=n.edge(a.v,a.w,a.name);o.info("Edge data",g,r);try{be(a,r)?(o.info("Copying as ",a.v,a.w,g,a.name),t.setEdge(a.v,a.w,g,a.name),o.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",r," clusterId:",e)}catch(m){o.error(m)}})}o.debug("Removing node",i),n.removeNode(i)})},"copy"),G=u((e,n)=>{const t=n.children(e);let r=[...t];for(const s of t)A.set(s,e),r=[...r,...G(s,n)];return r},"extractDescendants"),he=u((e,n,t)=>{const r=e.edges().filter(a=>a.v===n||a.w===n),s=e.edges().filter(a=>a.v===t||a.w===t),i=r.map(a=>({v:a.v===n?t:a.v,w:a.w===n?n:a.w})),c=s.map(a=>({v:a.v,w:a.w}));return i.filter(a=>c.some(g=>a.v===g.v&&a.w===g.w))},"findCommonEdges"),p=u((e,n,t)=>{const r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const i of r){const c=p(i,n,t),f=he(n,t,c);if(c)if(f.length>0)s=c;else return c}return s},"findNonClusterChild"),x=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Ne=u((e,n)=>{if(!e||n>10){o.debug("Opting out, no graph ");return}else o.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug("Cluster identified",t," Replacement id in edges: ",p(t,e,t)),h.set(t,G(t,e)),l.set(t,{id:p(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),s=e.edges();r.length>0?(o.debug("Cluster identified",t,h),s.forEach(i=>{const c=v(i.v,t),f=v(i.w,t);c^f&&(o.debug("Edge: ",i," leaves cluster ",t),o.debug("Descendants of XXX ",t,": ",h.get(t)),l.get(t).externalConnections=!0)})):o.debug("Not a cluster ",t,h)});for(let t of l.keys()){const r=l.get(t).id,s=e.parent(r);s!==t&&l.has(s)&&!l.get(s).externalConnections&&(l.get(t).id=s);const i=e.edges().some(c=>c.v===t);if(r&&l.get(t)?.externalConnections&&i&&$(e,r,t)){const c=me(e,t,e.parent(r));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){const r=e.edge(t);o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let s=t.v,i=t.w;if(o.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(o.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),s=x(t.v),i=x(t.w),e.removeEdge(t.v,t.w,t.name),s!==t.v){const c=e.parent(s);l.get(c).externalConnections=!0,r.fromCluster=t.v}if(i!==t.w){const c=e.parent(i);l.get(c).externalConnections=!0,r.toCluster=t.w}o.debug("Fix Replacing with XXX",s,i,t.name),e.setEdge(s,i,r,t.name)}}),O(e,0),o.trace(l)},"adjustClustersAndEdges"),O=u((e,n)=>{if(n>10){o.error("Bailing out");return}let t=e.nodes(),r=!1;for(const s of t){const i=e.children(s);r=r||i.length>0}if(!r){o.debug("Done, no node has children",e.nodes());return}o.debug("Nodes = ",t,n);for(const s of t)if(o.debug("Extracting node",s,l,l.has(s)&&!l.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",n),!l.has(s))o.debug("Not a cluster",s,n);else if(!l.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){o.debug("Cluster without external connections, without a parent and with children",s,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(s)?.clusterData?.dir&&(c=l.get(s).clusterData.dir,o.debug("Fixing dir",l.get(s).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});X(s,e,f,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:l.get(s).clusterData,label:l.get(s).label,graph:f})}else o.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!l.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),n),o.debug(l);t=e.nodes(),o.debug("New list of nodes",t);for(const s of t){const i=e.node(s);o.debug(" Now next level",s,i),i?.clusterNode&&O(i.graph,n+1)}},"extractor"),F=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(r=>{const s=e.children(r),i=F(e,s);t=[...t,...i]}),t},"sorter"),ye=u(e=>F(e,e.children()),"sortNodesByHierarchy"),$=u((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const s=l.get(r);if(s&&!s.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),me=u((e,n,t)=>{const r=e.children(n)??[];for(const s of r){if(s===t||v(s,t))continue;const i=p(s,e,n);if(i&&!$(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:r,afterPaint:s,paintOptions:i}){const c=n??z;return u(async function(a,g,m,C){const w=g.select("g");(m?.insertMarkers??I)(w,a.markers,a.type,a.diagramId),j();const d={element:w,helpers:m,options:C};d.preparedLayout=await e?.(a,d);const b=await c(a,d),E=await t(a,d),N={...d,measure:b};r?await r(a,N,E):await H(a,N,i),await s?.(a,N,E)},"render")}u(we,"createCommonLayoutRenderer");function j(){te(),ne(),se(),ge()}u(j,"clearLayoutRenderState");async function z(e,{element:n},t){return await M(n,e,t)}u(z,"defaultMeasureLayout");async function H(e,n,t={}){const{measure:r}=n,{groups:s}=r;for(const c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await W(s,c,n,t);const i=V(e.nodes);for(const c of e.edges)Q(c,t)||await Y(s,c,i,e,t,n)}u(H,"paintLayoutData");async function W(e,n,t,r){n.clusterNode?L(n):J(n,t,r)?await re(e.clusters,n):L(n)}u(W,"paintLayoutNode");function J(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(J,"shouldPaintAsCluster");function V(e){const n=new Map;for(const t of e)t?.id&&n.set(t.id,t);return n}u(V,"buildNodeLookup");function Q(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(Q,"shouldSkipPaintEdge");async function Y(e,n,t,r,s,i){const c=ie(e.edgePaths,{...n},s.clusterDb??new Map,r.type,y(n.start,n,t,i,s),y(n.end,n,t,i,s),r.diagramId,q(n,s),r.layoutAlgorithm);D(n)&&(S.has(n.id)||await R(e.edgeLabels,n),K(n,c))}u(Y,"paintLayoutEdge");function y(e,n,t,r,s){return s.getEdgeNode?.(e,n,r)??(e?t.get(e)??{}:{})}u(y,"getRenderedNode");function q(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(q,"shouldSkipIntersect");function K(e,n){const t=n?.updatedPath??n?.originalPath,r=oe(),{subGraphTitleTotalMargin:s}=ce({flowchart:r.flowchart??{}});if(e.label){const i=S.get(e.id),{x:c,y:f}=le(e,n);i.attr("transform",`translate(${c}, ${f+s/2})`)}for(const[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){const{x:f,y:a}=U(e,i,t);ue.get(e.id)[i].attr("transform",`translate(${f}, ${a})`)}}u(K,"positionRenderedEdgeLabel");var ve={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function U(e,n,t){const r=e.terminalLabelCenters?.[n];if(r)return{...r};if(!t)return{x:e.x,y:e.y};const s=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return fe.calcTerminalLabelPosition(s?10:0,ve[n],t)}u(U,"terminalLabelTranslate");export{Ne as a,we as b,l as c,P as d,z as e,p as f,_ as i,ye as s};
@@ -1 +1 @@
1
- import{f as p}from"./D5xlMOwU.js";import{A as s,z as l}from"./Dh438xC0.js";import{selectScriptOutput as o,selectScriptById as f,selectCanReadScriptDefinition as m}from"./CDxV78M0.js";async function a(i,t,e,r=100){const n=s(o.select(i,t,e)).slice(-r);if(!t||!e)return n;const u=f.select(i,t,e);if(!m.select(i,t,u))return[];try{const c=l(await p.scripts.output(t,e,r));return c.length>0?c.slice(-r):n}catch{return n}}export{a as readScriptContextOutputLines};
1
+ import{f as p}from"./0Kw0mmSW.js";import{A as s,z as l}from"./cpPIph2M.js";import{selectScriptOutput as o,selectScriptById as f,selectCanReadScriptDefinition as m}from"./DuoQQplG.js";async function a(i,t,e,r=100){const n=s(o.select(i,t,e)).slice(-r);if(!t||!e)return n;const u=f.select(i,t,e);if(!m.select(i,t,u))return[];try{const c=l(await p.scripts.output(t,e,r));return c.length>0?c.slice(-r):n}catch{return n}}export{a as readScriptContextOutputLines};
@@ -1 +1 @@
1
- import{t as gt,bo as n,bm as a,bw as Ct,b as pt}from"./DWvCfaBg.js";import{bs as bt,aD as g,bn as yt,aA as o,a5 as z,bS as A,bf as xt,bA as G,W as u,c9 as C,bl as D,b_ as h,bO as W,aB as P,b$ as kt}from"./3SdAC2_C.js";import{i as p}from"./VTJf_qPn.js";import{t as At}from"./Bu3PKqut.js";import"./BCuI_zgX.js";import"./B3OJ_2Dd.js";import"./B0kNPCxU.js";import{D as ht}from"./COBhx_l-.js";import{l}from"./W05hyx94.js";import"./CIKXOyvw.js";import"./77KTvr2w.js";var Wt=P('<p class="type-body"> </p>'),X=P('<p class="type-body text-foreground font-medium"> </p>'),Pt=P('<p class="type-body text-muted-foreground font-normal"> </p>'),Rt=P('<p class="type-body text-muted-foreground font-normal"> <!></p>'),St=P('<div class="space-y-2"><!> <!> <!> <!></div>'),Bt=P('<div class="space-y-4"><!> <!> <!></div>');function Dt(J,e){if(new.target)return gt({component:Dt,...J});bt(e,!0);let b=n(e,"open",15,!1),F=n(e,"static",7,!1),H=n(e,"title",23,()=>a.modals_bulkActionConfirm_title()),S=n(e,"description",7,""),T=n(e,"confirmText",23,()=>a.modals_bulkActionConfirm_confirm_label()),w=n(e,"variant",7,"default"),y=n(e,"initialFocus",7,"confirm"),E=n(e,"body",7),c=n(e,"openPrCount",7,0),x=n(e,"preflightReady",7,!0),I=n(e,"mode",7,"delete"),m=n(e,"activeAgentCount",7,0),d=n(e,"activeHookCount",7,0),_=n(e,"guestCount",7,0),K=n(e,"onConfirm",7),L=n(e,"onCancel",7);const Y=C(()=>m()>0||d()>0||c()>0||_()>0);function Z(){b(!1),L()?.()}async function $(){await K()?.(),b(!1)}var tt={get open(){return b()},set open(t=!1){b(t),o()},get static(){return F()},set static(t=!1){F(t),o()},get title(){return H()},set title(t=a.modals_bulkActionConfirm_title()){H(t),o()},get description(){return S()},set description(t=""){S(t),o()},get confirmText(){return T()},set confirmText(t=a.modals_bulkActionConfirm_confirm_label()){T(t),o()},get variant(){return w()},set variant(t="default"){w(t),o()},get initialFocus(){return y()},set initialFocus(t="confirm"){y(t),o()},get body(){return E()},set body(t){E(t),o()},get openPrCount(){return c()},set openPrCount(t=0){c(t),o()},get preflightReady(){return x()},set preflightReady(t=!0){x(t),o()},get mode(){return I()},set mode(t="delete"){I(t),o()},get activeAgentCount(){return m()},set activeAgentCount(t=0){m(t),o()},get activeHookCount(){return d()},set activeHookCount(t=0){d(t),o()},get guestCount(){return _()},set guestCount(t=0){_(t),o()},get onConfirm(){return K()},set onConfirm(t){K(t),o()},get onCancel(){return L()},set onCancel(t){L(t),o()},$set:Ct,$on:(t,O)=>pt(e,t,O)};{const t=j=>{var q=Bt(),M=z(q);{var it=f=>{var k=Wt(),B=D(k,!0);h(()=>W(B,S())),u(f,k)};p(M,f=>{S()&&f(it)})}var N=A(M,2);{var st=f=>{var k=St(),B=z(k);{var lt=r=>{var i=X(),s=D(i,!0);h(v=>W(s,v),[()=>m()===1?a.modals_deleteWarning_agentsStopped_one({count:l(m())}):a.modals_deleteWarning_agentsStopped_many({count:l(m())})]),u(r,i)};p(B,r=>{m()>0&&r(lt)})}var Q=A(B,2);{var ct=r=>{var i=X(),s=D(i,!0);h(v=>W(s,v),[()=>d()===1?a.modals_deleteWarning_hooksCancelled_one({count:l(d())}):a.modals_deleteWarning_hooksCancelled_many({count:l(d())})]),u(r,i)};p(Q,r=>{d()>0&&r(ct)})}var U=A(Q,2);{var mt=r=>{var i=Pt(),s=D(i,!0);h(v=>W(s,v),[()=>c()===1?a.modals_deleteWarning_openPrs_one({count:l(c())}):a.modals_deleteWarning_openPrs_many({count:l(c())})]),u(r,i)};p(U,r=>{c()>0&&r(mt)})}var dt=A(U,2);{var _t=r=>{var i=Rt(),s=z(i),v=A(s);{var ft=R=>{var V=kt();h(vt=>W(V,vt),[()=>a.modals_bulkActionConfirm_guestsReinvite_description()]),u(R,V)};p(v,R=>{I()==="archive"&&R(ft)})}G(i),h(R=>W(s,`${R??""} `),[()=>_()===1?a.modals_bulkActionConfirm_guestsRemoved_one({count:l(_())}):a.modals_bulkActionConfirm_guestsRemoved_many({count:l(_())})]),u(r,i)};p(dt,r=>{_()>0&&r(_t)})}G(k),u(f,k)};p(N,f=>{g(Y)&&f(st)})}var ut=A(N,2);At(ut,()=>E()??xt),G(q),u(j,q)};let O=C(()=>!x()),et=C(()=>x()&&y()==="confirm"),nt=C(()=>!x()||y()==="cancel"),ot=C(()=>y()==="cancel"?"ignore":"submit"),rt=C(()=>y()==="cancel"?"ignore":"submit"),at=C(()=>w()==="destructive");ht(J,{get static(){return F()},get title(){return H()},get confirmLabel(){return T()},get submitBusy(){return g(O)},get canSubmit(){return x()},get focusSubmit(){return g(et)},get focusCancel(){return g(nt)},get enterKey(){return g(ot)},get modEnter(){return g(rt)},get destructive(){return g(at)},onConfirm:$,onCancel:Z,get open(){return b()},set open(j){b(j)},details:t,$$slots:{details:!0}})}return yt(tt)}export{Dt as B};
1
+ import{t as gt,bo as n,bm as a,bw as Ct,b as pt}from"./YLhFQnIu.js";import{bs as bt,aD as g,bn as yt,aA as o,a5 as z,bS as A,bf as xt,bA as G,W as u,c9 as C,bl as D,b_ as h,bO as W,aB as P,b$ as kt}from"./3SdAC2_C.js";import{i as p}from"./YeOAvjnW.js";import{t as At}from"./CrpUtGFn.js";import"./BQhBnAuP.js";import"./kvtKUeBe.js";import"./KtEuoG00.js";import{D as ht}from"./AXzVloaq.js";import{l}from"./DIEHuZ8f.js";import"./DJivXy66.js";import"./WvHbj6rB.js";var Wt=P('<p class="type-body"> </p>'),X=P('<p class="type-body text-foreground font-medium"> </p>'),Pt=P('<p class="type-body text-muted-foreground font-normal"> </p>'),Rt=P('<p class="type-body text-muted-foreground font-normal"> <!></p>'),St=P('<div class="space-y-2"><!> <!> <!> <!></div>'),Bt=P('<div class="space-y-4"><!> <!> <!></div>');function Dt(J,e){if(new.target)return gt({component:Dt,...J});bt(e,!0);let b=n(e,"open",15,!1),F=n(e,"static",7,!1),H=n(e,"title",23,()=>a.modals_bulkActionConfirm_title()),S=n(e,"description",7,""),T=n(e,"confirmText",23,()=>a.modals_bulkActionConfirm_confirm_label()),w=n(e,"variant",7,"default"),y=n(e,"initialFocus",7,"confirm"),E=n(e,"body",7),c=n(e,"openPrCount",7,0),x=n(e,"preflightReady",7,!0),I=n(e,"mode",7,"delete"),m=n(e,"activeAgentCount",7,0),d=n(e,"activeHookCount",7,0),_=n(e,"guestCount",7,0),K=n(e,"onConfirm",7),L=n(e,"onCancel",7);const Y=C(()=>m()>0||d()>0||c()>0||_()>0);function Z(){b(!1),L()?.()}async function $(){await K()?.(),b(!1)}var tt={get open(){return b()},set open(t=!1){b(t),o()},get static(){return F()},set static(t=!1){F(t),o()},get title(){return H()},set title(t=a.modals_bulkActionConfirm_title()){H(t),o()},get description(){return S()},set description(t=""){S(t),o()},get confirmText(){return T()},set confirmText(t=a.modals_bulkActionConfirm_confirm_label()){T(t),o()},get variant(){return w()},set variant(t="default"){w(t),o()},get initialFocus(){return y()},set initialFocus(t="confirm"){y(t),o()},get body(){return E()},set body(t){E(t),o()},get openPrCount(){return c()},set openPrCount(t=0){c(t),o()},get preflightReady(){return x()},set preflightReady(t=!0){x(t),o()},get mode(){return I()},set mode(t="delete"){I(t),o()},get activeAgentCount(){return m()},set activeAgentCount(t=0){m(t),o()},get activeHookCount(){return d()},set activeHookCount(t=0){d(t),o()},get guestCount(){return _()},set guestCount(t=0){_(t),o()},get onConfirm(){return K()},set onConfirm(t){K(t),o()},get onCancel(){return L()},set onCancel(t){L(t),o()},$set:Ct,$on:(t,O)=>pt(e,t,O)};{const t=j=>{var q=Bt(),M=z(q);{var it=f=>{var k=Wt(),B=D(k,!0);h(()=>W(B,S())),u(f,k)};p(M,f=>{S()&&f(it)})}var N=A(M,2);{var st=f=>{var k=St(),B=z(k);{var lt=r=>{var i=X(),s=D(i,!0);h(v=>W(s,v),[()=>m()===1?a.modals_deleteWarning_agentsStopped_one({count:l(m())}):a.modals_deleteWarning_agentsStopped_many({count:l(m())})]),u(r,i)};p(B,r=>{m()>0&&r(lt)})}var Q=A(B,2);{var ct=r=>{var i=X(),s=D(i,!0);h(v=>W(s,v),[()=>d()===1?a.modals_deleteWarning_hooksCancelled_one({count:l(d())}):a.modals_deleteWarning_hooksCancelled_many({count:l(d())})]),u(r,i)};p(Q,r=>{d()>0&&r(ct)})}var U=A(Q,2);{var mt=r=>{var i=Pt(),s=D(i,!0);h(v=>W(s,v),[()=>c()===1?a.modals_deleteWarning_openPrs_one({count:l(c())}):a.modals_deleteWarning_openPrs_many({count:l(c())})]),u(r,i)};p(U,r=>{c()>0&&r(mt)})}var dt=A(U,2);{var _t=r=>{var i=Rt(),s=z(i),v=A(s);{var ft=R=>{var V=kt();h(vt=>W(V,vt),[()=>a.modals_bulkActionConfirm_guestsReinvite_description()]),u(R,V)};p(v,R=>{I()==="archive"&&R(ft)})}G(i),h(R=>W(s,`${R??""} `),[()=>_()===1?a.modals_bulkActionConfirm_guestsRemoved_one({count:l(_())}):a.modals_bulkActionConfirm_guestsRemoved_many({count:l(_())})]),u(r,i)};p(dt,r=>{_()>0&&r(_t)})}G(k),u(f,k)};p(N,f=>{g(Y)&&f(st)})}var ut=A(N,2);At(ut,()=>E()??xt),G(q),u(j,q)};let O=C(()=>!x()),et=C(()=>x()&&y()==="confirm"),nt=C(()=>!x()||y()==="cancel"),ot=C(()=>y()==="cancel"?"ignore":"submit"),rt=C(()=>y()==="cancel"?"ignore":"submit"),at=C(()=>w()==="destructive");ht(J,{get static(){return F()},get title(){return H()},get confirmLabel(){return T()},get submitBusy(){return g(O)},get canSubmit(){return x()},get focusSubmit(){return g(et)},get focusCancel(){return g(nt)},get enterKey(){return g(ot)},get modEnter(){return g(rt)},get destructive(){return g(at)},onConfirm:$,onCancel:Z,get open(){return b()},set open(j){b(j)},details:t,$$slots:{details:!0}})}return yt(tt)}export{Dt as B};
@@ -1 +1 @@
1
- import{Jx as s,mj as o,nZ as a,nY as i}from"./CIoJPvjg.js";const n=s.createSelector((e,t)=>e.files.byWorkspaceId[t]??o),S=s.createSelector((e,t)=>a(n.select(e,t).files)),c=s.createSelector((e,t,l)=>{if(l)return i(n.select(e,t).files,l)}),d=s.createSelector((e,t,l)=>c.select(e,t,l)?.localContent??null),f=s.createSelector((e,t,l)=>c.select(e,t,l)?.originalContent??null),u=s.createSelector((e,t,l)=>c.select(e,t,l)?.lastUpdated??0),g=s.createSelector((e,t,l)=>c.select(e,t,l)?.loading??!1),C=s.createSelector((e,t,l)=>c.select(e,t,l)?.saving??!1),p=s.createSelector((e,t,l)=>c.select(e,t,l)?.error??null),y=s.createSelector((e,t,l)=>c.select(e,t,l)?.errorInfo??null),I=s.createSelector((e,t,l)=>c.select(e,t,l)?.notFoundCandidates??null),m=s.createSelector((e,t,l)=>c.select(e,t,l)?.isBinary??!1),k=s.createSelector((e,t,l)=>{const r=c.select(e,t,l);return r?r.localContent!==r.originalContent:!1});export{d as a,c as b,p as c,y as d,m as e,k as f,u as g,g as h,I as i,C as j,f as k,S as s};
1
+ import{Jx as s,mj as o,nZ as a,nY as i}from"./D5wnbxHp.js";const n=s.createSelector((e,t)=>e.files.byWorkspaceId[t]??o),S=s.createSelector((e,t)=>a(n.select(e,t).files)),c=s.createSelector((e,t,l)=>{if(l)return i(n.select(e,t).files,l)}),d=s.createSelector((e,t,l)=>c.select(e,t,l)?.localContent??null),f=s.createSelector((e,t,l)=>c.select(e,t,l)?.originalContent??null),u=s.createSelector((e,t,l)=>c.select(e,t,l)?.lastUpdated??0),g=s.createSelector((e,t,l)=>c.select(e,t,l)?.loading??!1),C=s.createSelector((e,t,l)=>c.select(e,t,l)?.saving??!1),p=s.createSelector((e,t,l)=>c.select(e,t,l)?.error??null),y=s.createSelector((e,t,l)=>c.select(e,t,l)?.errorInfo??null),I=s.createSelector((e,t,l)=>c.select(e,t,l)?.notFoundCandidates??null),m=s.createSelector((e,t,l)=>c.select(e,t,l)?.isBinary??!1),k=s.createSelector((e,t,l)=>{const r=c.select(e,t,l);return r?r.localContent!==r.originalContent:!1});export{d as a,c as b,p as c,y as d,m as e,k as f,u as g,g as h,I as i,C as j,f as k,S as s};
@@ -1,4 +1,4 @@
1
- import{c as Gt,aZ as Kt,U as Ht,Y as Yt,b0 as Xt,V as Zt,a_ as Jt,b as w,W as wt,aX as Qt,aW as ot,i as $t,an as te,au as ee,H as ne,B as se,r as ie,q as oe,O as re}from"./BolJpU8l.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];o+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let h=null;for(let b=0;b<a.parentIndex.length;++b)if(f.parentIndex.includes(a.parentIndex[b])){const p=t[a.parentIndex[b]],M=Math.atan2(a.x-p.x,a.y-p.y),E=Math.atan2(f.x-p.x,f.y-p.y);let _=E-M;_<0&&(_+=2*Math.PI);const S=E-_/2;let g=q(y,{x:p.x+p.radius*Math.sin(S),y:p.y+p.radius*Math.cos(S)});g>p.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=lt(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(q(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}function ae(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function le(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*r>=0&&(n=a),Math.abs(f)<o||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Z(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,r=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,p=new Array(b+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let v=0;v<b;++v){const c=n.slice();c[v]=c[v]?c[v]*i:o,p[v+1]=c,p[v+1].fx=t(c),p[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)p[b][c]=v[c];p[b].fx=v.fx}const E=(v,c)=>v.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(p.sort(E),s.history){const x=p.map(d=>{const C=d.slice();return C.fx=d.fx,C.id=d.id,C});x.sort((d,C)=>d.id-C.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x<b;++x)h=Math.max(h,Math.abs(p[0][x]-p[1][x]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let x=0;x<b;++x){_[x]=0;for(let d=0;d<b;++d)_[x]+=p[d][x];_[x]/=b}const c=p[b];if(Z(S,1+f,_,-f,c),S.fx=t(S),S.fx<p[0].fx)Z(m,1+u,_,-u,c),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=p[b-1].fx){let x=!1;if(S.fx>c.fx?(Z(g,1+a,_,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(Z(g,1-a*f,_,a*f,c),g.fx=t(g),g.fx<S.fx?M(g):x=!0),x){if(y>=1)break;for(let d=1;d<p.length;++d)Z(p[d],1-y,p[0],y,p[d]),p[d].fx=t(p[d])}}else M(S)}return p.sort(E),{fx:p[0].fx,x:p[0]}}function ue(t,n,s,e,i,o,r){const l=s.fx,f=$(s.fxprime,n);let u=l,a=l,y=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,M,E){for(let _=0;_<16;++_)if(i=(p+M)/2,Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||u>=E)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,E=u}return 0}for(let p=0;p<10;++p){if(Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ft(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ue(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ft(r,e.fxprime,-1);else{Z(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),h=Math.max(0,$(o,i.fxprime)/y);Z(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||xe,e=n.lossFunction||tt,i=he(t,n),o=s(i,n),r=Object.keys(o),l=[];for(const a of r)l.push(o[a].x),l.push(o[a].y);const u=zt(a=>{const y={};for(let h=0;h<r.length;++h){const b=r[h];y[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(y,i)},l,n).x;for(let a=0;a<r.length;++a){const y=r[a];o[y].x=u[2*a],o[y].y=u[2*a+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const h=String(f.sets[y]),b=`${a};${h}`,p=`${h};${a}`;l.set(b,f.size+(l.get(b)||0)),l.set(p,f.size+(l.get(p)||0))}}for(const f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}const o=[],r=new Set;for(const l of e)if(l.sets.length===1)o.push(l.sets[0]);else if(l.sets.length===2){const f=l.sets[0],u=l.sets[1];r.add(i(l.sets)),r.add(i([u,f]))}o.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<o.length;++l){const f=o[l];for(let u=l+1;u<o.length;++u){const a=o[u];r.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const r=t[2*o],l=t[2*o+1];for(let f=o+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),M=b-y*y;h>0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}function ye(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:r}=de(t,e,i);const l=ut(o.map(ut))/o.length;o=o.map(h=>h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;h<s;++h){const b=ct(o.length*2).map(Math.random),p=fe(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,y={};for(let h=0;h<e.length;++h){const b=e[h];y[b.sets[0]]={x:a[2*h]*l,y:a[2*h+1]*l,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)ft(h.x,l);return y}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const h=y.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[h]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;b<i[y].length;++b)h+=i[y][b].size*i[y][b].weight;o.push({set:y,size:h})});function r(y,h){return h.size-y.size}o.sort(r);const l={};function f(y){return y.set in l}function u(y,h){e[h].x=y.x,e[h].y=y.y,l[h]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const h=o[y].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<b.length;++a){const S=e[b[a].set],g=ht(p.radius,S.radius,b[a].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=a+1;m<b.length;++m){const v=e[b[m].set],c=ht(p.radius,v.radius,b[m].size),x=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,_=M[0];for(const S of M){e[h].x=S.x,e[h].y=S.y;const g=s(e,t);g<E&&(E=g,_=S)}u(_,h)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const r=t[e.sets[0]],l=t[e.sets[1]];i=xt(r.radius,l.radius,q(r,l))}else i=st(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=xt(l.radius,f.radius,q(l,f))}else i=st(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}function me(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const r=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<r&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,y){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,o=dt(e);return Nt(e)}function Ot(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=dt(o);if(r.max===r.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(r.max-r.min),u=s/(l.max-l.min);const a=Math.min(u,f),y=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return Nt(o.map(b=>({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Nt(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in E)return E[x];var d=E[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const C=new Set;d.forEach(k=>{k.size==0&&k.sets.length==1&&C.add(k.sets[0])}),d=d.filter(k=>!k.sets.some(O=>C.has(O)));let I={},D={};if(d.length>0){let k=m(d,{lossFunction:v,distinct:b});l&&(k=Dt(k,r,h)),I=Ot(k,s,e,i,f),D=Lt(I,d,M)}const U={};d.forEach(k=>{k.label&&(U[k.sets]=k.label)});function V(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const F=x.select("svg");n?F.attr("viewBox",`0 0 ${s} ${e}`):F.attr("width",s).attr("height",e);const R={};let T=!1;F.selectAll(".venn-area path").each(function(k){const O=this.getAttribute("d");k.sets.length==1&&O&&!b&&(T=!0,R[k.sets[0]]=Me(O))});function A(k){return O=>{const K=k.sets.map(et=>{let Y=R[et],X=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),X||(X={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-O)+X.x*O,y:Y.y*(1-O)+X.y*O,radius:Y.radius*(1-O)+X.radius*O}});return St(K,p)}}const W=F.selectAll(".venn-area").data(d,k=>k.sets),P=W.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=P.append("path"),G=P.append("text").attr("class","label").text(k=>V(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),G.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function L(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=x;T&&typeof z.transition=="function"?(z=L(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",k=>St(k.sets.map(O=>I[O])),p);const N=z.selectAll("text").filter(k=>k.sets in D).text(k=>V(k)).attr("x",k=>Math.floor(D[k.sets].x)).attr("y",k=>Math.floor(D[k.sets].y));u&&(T?"on"in N?N.on("end",rt(I,V)):N.each("end",rt(I,V)):N.each(rt(I,V)));const j=L(W.exit()).remove();typeof W.transition=="function"&&j.selectAll("path").attrTween("d",A);const Q=j.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(G.style("font-size","0px"),N.style("font-size",y),Q.style("font-size","0px")),{circles:I,textCentres:D,nodes:W,enter:P,update:z,exit:j}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Ct:x,c):v},c}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],y=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const E=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${E+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function jt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],o=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let r=e+1;r<s.length;++r){const l=s[r],f=t[l],u=q(o,f);u+f.radius<=o.radius+1e-10?n[l].push(i):u+o.radius<=f.radius+1e-10&&n[i].push(l)}}return n}function Lt(t,n,s){const e={},i=Ie(t);for(let o=0;o<n.length;++o){const r=n[o].sets,l={},f={};for(let h=0;h<r.length;++h){l[r[h]]=!0;const b=i[r[h]];for(let p=0;p<b.length;++p)f[b[p]]=!0}const u=[],a=[];for(let h in t)h in l?u.push(t[h]):h in f||a.push(t[h]);const y=jt(u,a,s);e[r]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(`
1
+ import{c as Gt,aZ as Kt,U as Ht,Y as Yt,b0 as Xt,V as Zt,a_ as Jt,b as w,W as wt,aX as Qt,aW as ot,i as $t,an as te,au as ee,H as ne,B as se,r as ie,q as oe,O as re}from"./B6-aVrNf.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];o+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let h=null;for(let b=0;b<a.parentIndex.length;++b)if(f.parentIndex.includes(a.parentIndex[b])){const p=t[a.parentIndex[b]],M=Math.atan2(a.x-p.x,a.y-p.y),E=Math.atan2(f.x-p.x,f.y-p.y);let _=E-M;_<0&&(_+=2*Math.PI);const S=E-_/2;let g=q(y,{x:p.x+p.radius*Math.sin(S),y:p.y+p.radius*Math.cos(S)});g>p.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=lt(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(q(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}function ae(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function le(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*r>=0&&(n=a),Math.abs(f)<o||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Z(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,r=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,p=new Array(b+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let v=0;v<b;++v){const c=n.slice();c[v]=c[v]?c[v]*i:o,p[v+1]=c,p[v+1].fx=t(c),p[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)p[b][c]=v[c];p[b].fx=v.fx}const E=(v,c)=>v.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(p.sort(E),s.history){const x=p.map(d=>{const C=d.slice();return C.fx=d.fx,C.id=d.id,C});x.sort((d,C)=>d.id-C.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x<b;++x)h=Math.max(h,Math.abs(p[0][x]-p[1][x]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let x=0;x<b;++x){_[x]=0;for(let d=0;d<b;++d)_[x]+=p[d][x];_[x]/=b}const c=p[b];if(Z(S,1+f,_,-f,c),S.fx=t(S),S.fx<p[0].fx)Z(m,1+u,_,-u,c),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=p[b-1].fx){let x=!1;if(S.fx>c.fx?(Z(g,1+a,_,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(Z(g,1-a*f,_,a*f,c),g.fx=t(g),g.fx<S.fx?M(g):x=!0),x){if(y>=1)break;for(let d=1;d<p.length;++d)Z(p[d],1-y,p[0],y,p[d]),p[d].fx=t(p[d])}}else M(S)}return p.sort(E),{fx:p[0].fx,x:p[0]}}function ue(t,n,s,e,i,o,r){const l=s.fx,f=$(s.fxprime,n);let u=l,a=l,y=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,M,E){for(let _=0;_<16;++_)if(i=(p+M)/2,Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||u>=E)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,E=u}return 0}for(let p=0;p<10;++p){if(Z(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ft(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ue(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ft(r,e.fxprime,-1);else{Z(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),h=Math.max(0,$(o,i.fxprime)/y);Z(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||xe,e=n.lossFunction||tt,i=he(t,n),o=s(i,n),r=Object.keys(o),l=[];for(const a of r)l.push(o[a].x),l.push(o[a].y);const u=zt(a=>{const y={};for(let h=0;h<r.length;++h){const b=r[h];y[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(y,i)},l,n).x;for(let a=0;a<r.length;++a){const y=r[a];o[y].x=u[2*a],o[y].y=u[2*a+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const h=String(f.sets[y]),b=`${a};${h}`,p=`${h};${a}`;l.set(b,f.size+(l.get(b)||0)),l.set(p,f.size+(l.get(p)||0))}}for(const f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}const o=[],r=new Set;for(const l of e)if(l.sets.length===1)o.push(l.sets[0]);else if(l.sets.length===2){const f=l.sets[0],u=l.sets[1];r.add(i(l.sets)),r.add(i([u,f]))}o.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<o.length;++l){const f=o[l];for(let u=l+1;u<o.length;++u){const a=o[u];r.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const r=t[2*o],l=t[2*o+1];for(let f=o+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),M=b-y*y;h>0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}function ye(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:r}=de(t,e,i);const l=ut(o.map(ut))/o.length;o=o.map(h=>h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;h<s;++h){const b=ct(o.length*2).map(Math.random),p=fe(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,y={};for(let h=0;h<e.length;++h){const b=e[h];y[b.sets[0]]={x:a[2*h]*l,y:a[2*h+1]*l,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)ft(h.x,l);return y}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const h=y.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[h]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;b<i[y].length;++b)h+=i[y][b].size*i[y][b].weight;o.push({set:y,size:h})});function r(y,h){return h.size-y.size}o.sort(r);const l={};function f(y){return y.set in l}function u(y,h){e[h].x=y.x,e[h].y=y.y,l[h]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const h=o[y].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<b.length;++a){const S=e[b[a].set],g=ht(p.radius,S.radius,b[a].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=a+1;m<b.length;++m){const v=e[b[m].set],c=ht(p.radius,v.radius,b[m].size),x=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,_=M[0];for(const S of M){e[h].x=S.x,e[h].y=S.y;const g=s(e,t);g<E&&(E=g,_=S)}u(_,h)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const r=t[e.sets[0]],l=t[e.sets[1]];i=xt(r.radius,l.radius,q(r,l))}else i=st(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=xt(l.radius,f.radius,q(l,f))}else i=st(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}function me(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const r=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<r&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,y){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,o=dt(e);return Nt(e)}function Ot(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=dt(o);if(r.max===r.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(r.max-r.min),u=s/(l.max-l.min);const a=Math.min(u,f),y=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return Nt(o.map(b=>({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Nt(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in E)return E[x];var d=E[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const C=new Set;d.forEach(k=>{k.size==0&&k.sets.length==1&&C.add(k.sets[0])}),d=d.filter(k=>!k.sets.some(O=>C.has(O)));let I={},D={};if(d.length>0){let k=m(d,{lossFunction:v,distinct:b});l&&(k=Dt(k,r,h)),I=Ot(k,s,e,i,f),D=Lt(I,d,M)}const U={};d.forEach(k=>{k.label&&(U[k.sets]=k.label)});function V(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const F=x.select("svg");n?F.attr("viewBox",`0 0 ${s} ${e}`):F.attr("width",s).attr("height",e);const R={};let T=!1;F.selectAll(".venn-area path").each(function(k){const O=this.getAttribute("d");k.sets.length==1&&O&&!b&&(T=!0,R[k.sets[0]]=Me(O))});function A(k){return O=>{const K=k.sets.map(et=>{let Y=R[et],X=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),X||(X={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-O)+X.x*O,y:Y.y*(1-O)+X.y*O,radius:Y.radius*(1-O)+X.radius*O}});return St(K,p)}}const W=F.selectAll(".venn-area").data(d,k=>k.sets),P=W.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=P.append("path"),G=P.append("text").attr("class","label").text(k=>V(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),G.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function L(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=x;T&&typeof z.transition=="function"?(z=L(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",k=>St(k.sets.map(O=>I[O])),p);const N=z.selectAll("text").filter(k=>k.sets in D).text(k=>V(k)).attr("x",k=>Math.floor(D[k.sets].x)).attr("y",k=>Math.floor(D[k.sets].y));u&&(T?"on"in N?N.on("end",rt(I,V)):N.each("end",rt(I,V)):N.each(rt(I,V)));const j=L(W.exit()).remove();typeof W.transition=="function"&&j.selectAll("path").attrTween("d",A);const Q=j.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(G.style("font-size","0px"),N.style("font-size",y),Q.style("font-size","0px")),{circles:I,textCentres:D,nodes:W,enter:P,update:z,exit:j}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Ct:x,c):v},c}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],y=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const E=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${E+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function jt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],o=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let r=e+1;r<s.length;++r){const l=s[r],f=t[l],u=q(o,f);u+f.radius<=o.radius+1e-10?n[l].push(i):u+o.radius<=f.radius+1e-10&&n[i].push(l)}}return n}function Lt(t,n,s){const e={},i=Ie(t);for(let o=0;o<n.length;++o){const r=n[o].sets,l={},f={};for(let h=0;h<r.length;++h){l[r[h]]=!0;const b=i[r[h]];for(let p=0;p<b.length;++p)f[b[p]]=!0}const u=[],a=[];for(let h in t)h in l?u.push(t[h]):h in f||a.push(t[h]);const y=jt(u,a,s);e[r]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(`
2
2
  M`,t,n),e.push(`
3
3
  m`,-s,0),e.push(`
4
4
  a`,s,s,0,1,0,s*2,0),e.push(`
@@ -1,4 +1,4 @@
1
- import{m as Ts,j as kt}from"./uXuxG9cN.js";import{bm as l}from"./DWvCfaBg.js";import{Ja as Ct,Jx as i,i as I,c7 as Es,m as F,ih as Rs,nZ as T,qz as xs,mc as Ps,yJ as Ms,nY as j,s1 as wt,yI as vt,s0 as At,iK as Ns,nL as It,nQ as $s,mr as Ls,fV as Tt,m8 as Os,mC as Ds,od as $,iN as Ws,a$ as Ee,aU as ie}from"./CIoJPvjg.js";import{bV as Us,d2 as js,b2 as Fs,aJ as Hs,cn as Bs,bN as qs,bo as zs,bv as Gs,ap as Zs,cK as Ks,cS as Vs,c8 as Qs,bj as Ys}from"./D7yetF0v.js";import{g as Xs,i as Js,a as er}from"./DY5rw8pn.js";import{n as ze,o as Ge,b as q,s as Y,_ as be,e as tr}from"./CIyUrgF0.js";import{a as sr,g as rr,b as nr,i as Ce,C as fe}from"./DypB-Dwi.js";import{Q as ar}from"./CIKXOyvw.js";import{u as or}from"./BrDfJqC4.js";import{d as ir}from"./zFAkpaJn.js";import{l as w,m as cr}from"./W05hyx94.js";var we=(e=>(e.ACTIVATING="activating",e.ACTIVE="active",e.ERROR="error",e))(we||{});function Wi(e){return e.isPending===!0||e.status==="pending"}function lr(e,t){const s=e.provider||e.metadata?.provider||e.config?.provider;if(s)return s;if(e.model)return(Ct(e.model).providerId??t)||void 0}function Ui(e){return e.messages.length>0}function dr(e){return e.filter(t=>t.type==="text").map(t=>t.text??"").join("")}function ur(e){return e.contentBlocks?dr(e.contentBlocks):""}const ji=i.createSelector(e=>e.principal),te=i.createSelector(sr),E=i.createSelector(e=>{const t=e.principal;return t?.status==="ready"&&t.context!==null&&t.context===te.select(e)?t.snapshot:null}),fr=i.createSelector(e=>E.select(e)?.daemonMode??null),Fi=i.createSelector(e=>fr.select(e)==="orchestrator"),Hi=i.createSelector(e=>E.select(e)?.capabilities.agentPlugins===1),Bi=i.createSelector(e=>E.select(e)?.capabilities.messageBlockPages===1),O=i.createSelector(e=>{const t=E.select(e);return t?t.capabilities.hostMembership?t.principal.hostRole??null:t.principal.isAdministrator?"owner":"guest":null}),Z=i.createSelector(e=>O.select(e)==="owner"),Et=i.createSelector(e=>e.principal?.status==="revoked"&&e.principal.context!==null&&e.principal.context===te.select(e)),qi=i.createSelector(e=>{const t=O.select(e);return t==="member"||t==="guest"||Et.select(e)}),zi=i.createSelector(e=>Z.select(e)?te.select(e):null),gr=i.createSelector(e=>{const t=O.select(e);return t==="owner"||t==="member"}),ge=i.createSelector(e=>or.select(e)===!0&&!!E.select(e)&&e.principal.refreshedPresentationVersion===e.principal.presentationVersion),Gi=i.createSelector(e=>{const t=ge.select(e),s=E.select(e)?.capabilities;return{hostMembership:t&&s?.hostMembership===!0,manageHostMembers:t&&s?.hostMembership===!0&&Z.select(e),personalPairing:t&&s?.personalPairing===!0,authenticatedDevices:t&&s?.authenticatedDevices===!0,collaborationIdentity:t&&s?.collaborationIdentity===!0}}),pe=i.createSelector(rr),Zi=i.createSelector(nr),Ki=i.createSelector(e=>gr.select(e)&&(Z.select(e)||ge.select(e))),Vi=i.createSelector(e=>E.select(e)?.capabilities.conversationGoal===1),pr=i.createSelector(e=>E.select(e)?.capabilities.remoteSetupRetry===1),Qi=i.createSelector(e=>pr.select(e)&&Z.select(e));function hr(e,t){const s=e.indexOf("/"),r=s===-1?void 0:e.slice(0,s),n=s===-1?e:e.slice(s+1),a=t?.indexOf("/")??-1,c=t&&a!==-1?t.slice(0,a):void 0;return r&&c&&r.toLowerCase()===c.toLowerCase()?n:e}function Rt(e,t,s){return`${hr(e,s)} #${t}`}function Re(e){return e.resource?.repository.provider==="gitlab"}function Yi(e,t){return`${Re(e)?"!":"#"}${t}`}function mr(e){return e.url??(e.resource||e.monitorAvailability||e.url===null?"":`https://github.com/${e.repo}/pull/${e.prNumber}`)}function _r(e,t){return Re(e)?`${e.repo} !${e.prNumber}`:Rt(e.repo,e.prNumber,t)}function Xi(e){return e.resource?Ts(e.resource):e.monitorAvailability?`unresolved:${e.monitorId}`:`${e.repo.toLowerCase()}#${e.prNumber}`}function Ji(e){switch(e.monitorAvailability?.state){case void 0:case"available":return;case"pending":return l.chat_chatMessage_loading_label();case"reconnect-required":return l.chat_monitoredPrs_status_reconnect();case"restricted":return l.chat_monitoredPrs_status_restricted();case"unresolved":return l.chat_monitoredPrs_status_unresolved();default:return l.chat_monitoredPrs_status_unknown()}}function ec(e){return e.isDraft===null||e.hasConflicts===null||e.isBehind===null||Object.values(e.checks).some(t=>t===null)||e.approvals.have===null||e.approvals.changesRequested===null||e.availability!==void 0&&Object.values(e.availability).some(t=>t!=="available")}function tc(e,t){if(!Re(t)||!t.resource)return e;const s=new URL(t.resource.repository.instanceBaseUrl);return`${e} (${s.host}${s.pathname.replace(/\/$/,"")})`}function xt(e){return e===I.Halted||e===I.Completed||e===I.Error||e===I.Deleted||e==="completed"||e==="failed"||e==="error"||e==="deleted"}function Pt(e){return e.status===I.Halted?!1:!!(e.turnInFlight||e.liveTurnOpen||e.isStreaming||e.isProcessing||e.isResponding||e.isWaitingOnTool||e.lastToolUse?.status?.toLowerCase()==="running")}function Mt(e){return e.status===I.Resuming||xt(e.status)||Pt(e)?!1:!!(e.isWaitingForOtherAgents||e.status===I.Waiting||e.status==="waiting")}function br(e){return xt(e.status)||Mt(e)?!1:!!(Pt(e)||e.activationState==="activating"||e.status===I.Resuming||e.status===I.Active||e.status===I.Processing||e.status==="active"||e.status==="processing"||e.status==="responding"||e.status==="streaming")}function sc(e){return{isStreaming:e.isStreaming,isProcessing:e.isProcessing,isResponding:e.isResponding,turnInFlight:e.turnInFlight,liveTurnOpen:e.liveTurnOpen,isWaitingOnTool:e.isWaitingOnTool,isWaitingForOtherAgents:e.isWaitingForOtherAgents,lastToolUse:e.lastToolUse,activationState:e.activationState,status:e.status}}function yr(e){if(!e)return null;const t=e.lastUserMessage||"";let s=e.lastAgentResponse||"",r;const n=e.digest||void 0,a=e.lastMessageRole==="user"||e.lastMessageRole==="assistant"?e.lastMessageRole:void 0;e.isStreaming&&e.lastToolUse?.name?(r={type:"tool_use",id:`live-tool:${e.id}`,name:e.lastToolUse.name,input:{}},s=""):!s&&!e.isStreaming&&e.lastToolUse?.name&&(r={type:"tool_use",id:`wire-tool:${e.id}`,name:e.lastToolUse.name,input:e.lastToolUse.input??{}});const c=e.metadata?.completionReport||void 0,o=Es(e)??void 0;return{id:e.id,name:e.name||l.chat_chatHeader_newChat_fallback(),status:e.status,lastUserMessage:t,lastResponse:s,lastToolUse:r,fileChanges:(e.fileChanges||[]).map(d=>({path:d.path,action:d.type||d.action||"modify",timestamp:d.timestamp||new Date().toISOString()})),messages:e.messages||[],completionReport:c,digest:n,parentAgentId:o,lastMessageRole:a}}function rc(e,t){if(!e)return"";const s=e.split(`
1
+ import{m as Ts,j as kt}from"./uXuxG9cN.js";import{bm as l}from"./YLhFQnIu.js";import{Ja as Ct,Jx as i,i as I,c7 as Es,m as F,ih as Rs,nZ as T,qz as xs,mc as Ps,yJ as Ms,nY as j,s1 as wt,yI as vt,s0 as At,iK as Ns,nL as It,nQ as $s,mr as Ls,fV as Tt,m8 as Os,mC as Ds,od as $,iN as Ws,a$ as Ee,aU as ie}from"./D5wnbxHp.js";import{bV as Us,d2 as js,b2 as Fs,aJ as Hs,cn as Bs,bN as qs,bo as zs,bv as Gs,ap as Zs,cK as Ks,cS as Vs,c8 as Qs,bj as Ys}from"./gwv5JQYH.js";import{g as Xs,i as Js,a as er}from"./BUsnh1ZW.js";import{n as ze,o as Ge,b as q,s as Y,_ as be,e as tr}from"./CIyUrgF0.js";import{a as sr,g as rr,b as nr,i as Ce,C as fe}from"./DypB-Dwi.js";import{Q as ar}from"./DJivXy66.js";import{u as or}from"./_3Ca9E4W.js";import{d as ir}from"./CTowDLQa.js";import{l as w,m as cr}from"./DIEHuZ8f.js";var we=(e=>(e.ACTIVATING="activating",e.ACTIVE="active",e.ERROR="error",e))(we||{});function Wi(e){return e.isPending===!0||e.status==="pending"}function lr(e,t){const s=e.provider||e.metadata?.provider||e.config?.provider;if(s)return s;if(e.model)return(Ct(e.model).providerId??t)||void 0}function Ui(e){return e.messages.length>0}function dr(e){return e.filter(t=>t.type==="text").map(t=>t.text??"").join("")}function ur(e){return e.contentBlocks?dr(e.contentBlocks):""}const ji=i.createSelector(e=>e.principal),te=i.createSelector(sr),E=i.createSelector(e=>{const t=e.principal;return t?.status==="ready"&&t.context!==null&&t.context===te.select(e)?t.snapshot:null}),fr=i.createSelector(e=>E.select(e)?.daemonMode??null),Fi=i.createSelector(e=>fr.select(e)==="orchestrator"),Hi=i.createSelector(e=>E.select(e)?.capabilities.agentPlugins===1),Bi=i.createSelector(e=>E.select(e)?.capabilities.messageBlockPages===1),O=i.createSelector(e=>{const t=E.select(e);return t?t.capabilities.hostMembership?t.principal.hostRole??null:t.principal.isAdministrator?"owner":"guest":null}),Z=i.createSelector(e=>O.select(e)==="owner"),Et=i.createSelector(e=>e.principal?.status==="revoked"&&e.principal.context!==null&&e.principal.context===te.select(e)),qi=i.createSelector(e=>{const t=O.select(e);return t==="member"||t==="guest"||Et.select(e)}),zi=i.createSelector(e=>Z.select(e)?te.select(e):null),gr=i.createSelector(e=>{const t=O.select(e);return t==="owner"||t==="member"}),ge=i.createSelector(e=>or.select(e)===!0&&!!E.select(e)&&e.principal.refreshedPresentationVersion===e.principal.presentationVersion),Gi=i.createSelector(e=>{const t=ge.select(e),s=E.select(e)?.capabilities;return{hostMembership:t&&s?.hostMembership===!0,manageHostMembers:t&&s?.hostMembership===!0&&Z.select(e),personalPairing:t&&s?.personalPairing===!0,authenticatedDevices:t&&s?.authenticatedDevices===!0,collaborationIdentity:t&&s?.collaborationIdentity===!0}}),pe=i.createSelector(rr),Zi=i.createSelector(nr),Ki=i.createSelector(e=>gr.select(e)&&(Z.select(e)||ge.select(e))),Vi=i.createSelector(e=>E.select(e)?.capabilities.conversationGoal===1),pr=i.createSelector(e=>E.select(e)?.capabilities.remoteSetupRetry===1),Qi=i.createSelector(e=>pr.select(e)&&Z.select(e));function hr(e,t){const s=e.indexOf("/"),r=s===-1?void 0:e.slice(0,s),n=s===-1?e:e.slice(s+1),a=t?.indexOf("/")??-1,c=t&&a!==-1?t.slice(0,a):void 0;return r&&c&&r.toLowerCase()===c.toLowerCase()?n:e}function Rt(e,t,s){return`${hr(e,s)} #${t}`}function Re(e){return e.resource?.repository.provider==="gitlab"}function Yi(e,t){return`${Re(e)?"!":"#"}${t}`}function mr(e){return e.url??(e.resource||e.monitorAvailability||e.url===null?"":`https://github.com/${e.repo}/pull/${e.prNumber}`)}function _r(e,t){return Re(e)?`${e.repo} !${e.prNumber}`:Rt(e.repo,e.prNumber,t)}function Xi(e){return e.resource?Ts(e.resource):e.monitorAvailability?`unresolved:${e.monitorId}`:`${e.repo.toLowerCase()}#${e.prNumber}`}function Ji(e){switch(e.monitorAvailability?.state){case void 0:case"available":return;case"pending":return l.chat_chatMessage_loading_label();case"reconnect-required":return l.chat_monitoredPrs_status_reconnect();case"restricted":return l.chat_monitoredPrs_status_restricted();case"unresolved":return l.chat_monitoredPrs_status_unresolved();default:return l.chat_monitoredPrs_status_unknown()}}function ec(e){return e.isDraft===null||e.hasConflicts===null||e.isBehind===null||Object.values(e.checks).some(t=>t===null)||e.approvals.have===null||e.approvals.changesRequested===null||e.availability!==void 0&&Object.values(e.availability).some(t=>t!=="available")}function tc(e,t){if(!Re(t)||!t.resource)return e;const s=new URL(t.resource.repository.instanceBaseUrl);return`${e} (${s.host}${s.pathname.replace(/\/$/,"")})`}function xt(e){return e===I.Halted||e===I.Completed||e===I.Error||e===I.Deleted||e==="completed"||e==="failed"||e==="error"||e==="deleted"}function Pt(e){return e.status===I.Halted?!1:!!(e.turnInFlight||e.liveTurnOpen||e.isStreaming||e.isProcessing||e.isResponding||e.isWaitingOnTool||e.lastToolUse?.status?.toLowerCase()==="running")}function Mt(e){return e.status===I.Resuming||xt(e.status)||Pt(e)?!1:!!(e.isWaitingForOtherAgents||e.status===I.Waiting||e.status==="waiting")}function br(e){return xt(e.status)||Mt(e)?!1:!!(Pt(e)||e.activationState==="activating"||e.status===I.Resuming||e.status===I.Active||e.status===I.Processing||e.status==="active"||e.status==="processing"||e.status==="responding"||e.status==="streaming")}function sc(e){return{isStreaming:e.isStreaming,isProcessing:e.isProcessing,isResponding:e.isResponding,turnInFlight:e.turnInFlight,liveTurnOpen:e.liveTurnOpen,isWaitingOnTool:e.isWaitingOnTool,isWaitingForOtherAgents:e.isWaitingForOtherAgents,lastToolUse:e.lastToolUse,activationState:e.activationState,status:e.status}}function yr(e){if(!e)return null;const t=e.lastUserMessage||"";let s=e.lastAgentResponse||"",r;const n=e.digest||void 0,a=e.lastMessageRole==="user"||e.lastMessageRole==="assistant"?e.lastMessageRole:void 0;e.isStreaming&&e.lastToolUse?.name?(r={type:"tool_use",id:`live-tool:${e.id}`,name:e.lastToolUse.name,input:{}},s=""):!s&&!e.isStreaming&&e.lastToolUse?.name&&(r={type:"tool_use",id:`wire-tool:${e.id}`,name:e.lastToolUse.name,input:e.lastToolUse.input??{}});const c=e.metadata?.completionReport||void 0,o=Es(e)??void 0;return{id:e.id,name:e.name||l.chat_chatHeader_newChat_fallback(),status:e.status,lastUserMessage:t,lastResponse:s,lastToolUse:r,fileChanges:(e.fileChanges||[]).map(d=>({path:d.path,action:d.type||d.action||"modify",timestamp:d.timestamp||new Date().toISOString()})),messages:e.messages||[],completionReport:c,digest:n,parentAgentId:o,lastMessageRole:a}}function rc(e,t){if(!e)return"";const s=e.split(`
2
2
  `);for(;s.length>0&&s[s.length-1].trim()==="";)s.pop();return s.length===0?"":s.length<=t?s.join(`
3
3
  `):`${s.slice(-t).join(`
4
4
  `)}...`}const Sr={prefix:"fas",iconName:"note-sticky",icon:[16,16,[],"e002","M2 3.75A.75.75 0 0 1 2.75 3h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75ZM2 8a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 8Zm0 4.25a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z"]},b={"file-read":Ys,"file-write":Qs,"file-delete":Vs,terminal:Ks,search:Us,"context-engine":Zs,api:Gs,workspace:zs,note:Sr,meta:qs,agent:Bs,task:Hs,browser:Fs,generic:js},kr=["workspace-mcp_","workspace_mcp_","filesystem_","browser-mcp_","browser_mcp_"],Cr=["_workspace-mcp","-workspace-mcp","_playwright","_browser_mcp","_context_7","_svelte","_npx","_sequential_thinking","_figma","_slack","_sentry","_github","_linear","_notion","_jira"];function Nt(e){return!!e&&/^(mcp__|mcp\.)/i.test(e)}const Ze=/select:\s*mcp(__|\.)/i,wr=/^select:\s*mcp(__|\.)/i;function vr(e,t={}){if(G(e).toLowerCase()==="toolsearch"||typeof t.query=="string"&&wr.test(t.query))return!0;const s=typeof t._acpTitle=="string"?t._acpTitle:"";return Ze.test(e||"")||Ze.test(s)}function G(e){if(!e)return"";const t=e.match(/\/\/local\/mcp\/(.+)$/);t&&(e=t[1]),e=e.replace(/^mcp__[^_]+__/,""),e=e.replace(/^mcp\.[^.]+\./,"");const s=e.toLowerCase();for(const n of kr)if(s.startsWith(n)){e=e.slice(n.length);break}let r=!0;for(;r;){r=!1;const n=e.toLowerCase();for(const a of Cr)if(n.endsWith(a)){e=e.slice(0,-a.length),r=!0;break}}return e}function $t(e){const t=e.trim();return/\s/.test(t)?/^[A-Za-z0-9._-]+:\s/.test(t)?!0:t.split(/\s+/).length>=3:!1}function Lt(e){const t=e.trim().match(/^List\s+directory\s+\x60([^\x60]+)\x60$/i);if(!t)return null;const s=t[1].trim();return s.length===0?null:{category:"file-read",icon:b["file-read"],verb:l.chat_toolClassifier_listContents_label(),subject:x(s)||s,path:N(s)||null,filePath:s||null,isDirectory:!0}}function Ot(e){const t=e.toLowerCase(),s=t.includes("agent")?"agent":t.includes("note")?"note":t.includes("workspace")?"workspace":"generic";return{category:s,icon:b[s],verb:p(e.trim(),120),subject:null,path:null}}const Ar=[{suffix:"_workspace-mcp",source:"workspace-mcp"},{suffix:"-workspace-mcp",source:"workspace-mcp"},{suffix:"_browser_mcp",source:"browser-mcp"},{suffix:"_playwright",source:"playwright"},{suffix:"_sequential_thinking",source:"sequential-thinking"},{suffix:"_context_7",source:"context7"},{suffix:"_figma",source:"figma"},{suffix:"_sentry",source:"sentry"},{suffix:"_github",source:"github"},{suffix:"_linear",source:"linear"},{suffix:"_slack",source:"slack"},{suffix:"_notion",source:"notion"},{suffix:"_jira",source:"jira"},{suffix:"_svelte",source:"svelte"},{suffix:"_npx",source:"npx"}],Ir=[{prefix:"workspace-mcp_",source:"workspace-mcp"},{prefix:"workspace_mcp_",source:"workspace-mcp"},{prefix:"browser-mcp_",source:"browser-mcp"},{prefix:"browser_mcp_",source:"browser-mcp"},{prefix:"filesystem_",source:"filesystem"}],Ke={"github-api":"github",linear:"linear",glean:"glean"},Tr=new Set(["view","codebase-retrieval","codebase_retrieval","launch-process","launch_process","read-process","read_process","write-process","write_process","kill-process","kill_process","list-processes","list_processes","str-replace-editor","str_replace_editor","save-file","save_file","remove-files","remove_files","web-search","web_search","web-fetch","web_fetch","conversation-retrieval","conversation_retrieval","git-commit-retrieval","git_commit_retrieval","bash","read","edit","run","find","grep"]);function Er(e){if(!e)return;const t=e.match(/\/\/local\/mcp\/(.+)$/);t&&(e=t[1]);const s=e.match(/^mcp__([^_]+)__/);if(s)return s[1].toLowerCase();const r=e.match(/^mcp\.([^.]+)\./);if(r)return r[1].toLowerCase();const n=e.toLowerCase();for(const{prefix:a,source:c}of Ir)if(n.startsWith(a))return c;for(const{suffix:a,source:c}of Ar)if(n.endsWith(a))return c;if(Ke[n])return Ke[n];Tr.has(n)}function A(e){return typeof e=="string"?e:e==null?"":String(e)}function p(e,t=50){const s=A(e);return s.length>t?`${s.substring(0,t)}...`:s}function xe(e){if(e==null)return null;if(typeof e=="string")return e;if(Array.isArray(e)){const t=e.filter(s=>s&&typeof s=="object"&&s.type==="text"&&s.text).map(s=>s.text);return t.length>0?t.join(`
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DZSbMOPJ.js","/app/immutable/chunks/DWvCfaBg.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/CIoJPvjg.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/DY5rw8pn.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/Bu3PKqut.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/D5xlMOwU.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/CIKXOyvw.js","/app/immutable/chunks/zFAkpaJn.js","/app/immutable/chunks/BCuI_zgX.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CQ5BHnSj.js","/app/immutable/chunks/D5A9atQX.js","/app/immutable/chunks/BXHbm15d.js","/app/immutable/chunks/VTJf_qPn.js","/app/immutable/chunks/Drf1gLyo.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/CueOVPTy.js","/app/immutable/chunks/Y_tkjygB.js","/app/immutable/chunks/bIL0xbKX.js","/app/immutable/chunks/W05hyx94.js","/app/immutable/chunks/2aKRVAvL.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/D7yetF0v.js","/app/immutable/chunks/BlRGZv8u.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/3Kr2ijlK.js","/app/immutable/chunks/BrDfJqC4.js","/app/immutable/chunks/Btst3lgy.js","/app/immutable/chunks/DJJ2Xrlq.js","/app/immutable/chunks/CGUVvS8r.js","/app/immutable/chunks/TN7R9Ny0.js","/app/immutable/chunks/Bb-hI5du.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CGcJ5lqH.js","/app/immutable/chunks/aixoUWDq.js","/app/immutable/chunks/DpxbS0Pj.js","/app/immutable/chunks/BIkt0YE0.js"])))=>i.map(i=>d[i]);
2
- import{bm as v,_ as h}from"./DWvCfaBg.js";import{a as H}from"./BdWqymET.js";import{br as A,Jx as k,m as T,I0 as C,G$ as D,vu as j,vs as B,vJ as V,nF as z}from"./CIoJPvjg.js";import{bK as $}from"./CFB2mNds.js";import{m as R}from"./BXHbm15d.js";import"./3SdAC2_C.js";import"./BCuI_zgX.js";import"./Bu3PKqut.js";import{R as N,F as g,E as G,Q as O}from"./CIKXOyvw.js";import"./ChTqQfQN.js";import"./2aKRVAvL.js";import{o as K}from"./BrDfJqC4.js";import{i as F}from"./BBWuirRW.js";const L=new WeakMap;function Le(e,t){const a=n=>{n&&n!=="new"?L.set(e,n):L.delete(e)};return a(t),{update:a,destroy(){L.delete(e)}}}function q(e){for(let t=e;t;t=t.parentElement){const a=L.get(t);if(a)return a}}function J(e,t){const a=e?.closest("[data-workspace-link-target]")?.dataset.workspaceLinkTarget;return{openInWorkspace:!!t&&a===t,panelId:e?.closest("[data-panel-id]")?.dataset.panelId,assistantLayoutId:e?.closest("[data-assistant-layout-id]")?.dataset.assistantLayoutId,surfaceWorkspaceId:q(e)}}const s=new H("LinkHandler");async function Q(e,t){try{const a=t.event?.target,n=J(a instanceof Element?a:null,t.workspaceId),o=t.openInWorkspace??n.openInWorkspace,r=o?void 0:t.sourcePanelId||n.panelId,{assistantLayoutId:l}=n,u=t.workspaceId??(n.surfaceWorkspaceId?A(n.surfaceWorkspaceId):void 0);if(t={...t,workspaceId:u,openInWorkspace:o,sourcePanelId:r},t.customHandler&&await t.customHandler(e))return s.debug("Link handled by custom handler",{url:e}),!0;if(/^workspace-asset:/i.test(e.trim()))return R.error(v.ui_linkHandler_assetUnavailable_error()),!1;const i=N(e),{event:d}=t,f=i&&d&&!g(t)?t.githubLinkDefaultAction??K.select(k.state):void 0,c=!f||f==="open-in-app";if(t.workspaceId===T&&!t.forceExternal&&c){const{showAssistantContent:m}=await h(async()=>{const{showAssistantContent:_}=await import("./DZSbMOPJ.js");return{showAssistantContent:_}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url),I=t.rawHref?.startsWith("/workspace/")?t.rawHref:e;if(await m(I,{layoutId:l}))return!0}if(e.startsWith("intent://"))return await X(e,{...t,sourcePanelId:r});if(e.startsWith("devspace://"))return await Y(e,{...t,sourcePanelId:r});const p=ne(e,t.rawHref);if(p)return await re(p.path,{...t,sourcePanelId:r},p.fromResolvedUrl);if(e.startsWith("http://")||e.startsWith("https://")){if(G(e))return s.debug("Auth URL detected, opening in external browser",{url:e}),await w(e);if(t.forceExternal)return await w(e);if(o&&c||g(t))return t.workspaceId?await E(e,t.workspaceId,{...t,assistantLayoutId:l}):(s.debug("No workspaceId available, opening in external browser",{url:e}),await w(e));if(i&&d&&f)switch(f){case"open-in-browser":return await w(e);case"open-in-app":return t.workspaceId?await E(e,t.workspaceId,{...t,assistantLayoutId:l}):await w(e);case"copy-link":return await $(e),!0;case"start-workspace":return k.dispatch(C({...i,url:e})),k.dispatch(D(!0)),!0;case"show-choices":return await oe(e,i,d,t,l)}return await w(e)}return e.startsWith("file://")?t.canOpenFile?.()===!1?!1:await M(e):(s.warn("Unknown link type, falling back to external browser",{url:e}),await w(e))}catch(a){return s.error("Failed to handle link",{url:e,error:a}),!1}}async function X(e,t){try{const{parseIntentLink:a,handleIntentLink:n}=await h(async()=>{const{parseIntentLink:l,handleIntentLink:u}=await import("./D5A9atQX.js");return{parseIntentLink:l,handleIntentLink:u}},__vite__mapDeps([24,1,2,25,11,7,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39,40,22,41,42,23]),import.meta.url),o=a(e);if(t.canOpenFile&&o.type==="file"&&!t.canOpenFile())return!1;const r=o.workspaceId?A(o.workspaceId):t.workspaceId;return o.valid&&o.type!=="workspace"&&await y(r,t),P(t),await n(e,{workspaceId:t.openInWorkspace?r:t.workspaceId,sourcePanelId:t.sourcePanelId,openInAdjacentPanel:t.openInAdjacentPanel??g(t),openInNewAdjacentPanel:t.openInNewAdjacentPanel??!1})}catch(a){return s.error("Failed to handle intent link",{url:e,error:a}),!1}}async function Y(e,t){try{const a=e.match(/^devspace:\/\/terminal\/(.+)$/);if(a){if(!t.workspaceId)return s.warn("Cannot open terminal without workspaceId",{url:e}),!1;const n=decodeURIComponent(a[1]);s.debug("Opening terminal from devspace link",{terminalId:n,workspaceId:t.workspaceId}),await y(t.workspaceId,t),P(t);const o={type:"terminal",title:v.layout_tabTypes_terminal_title(),terminalId:n,closable:!0};return g(t)?k.dispatch(j(t.workspaceId,o,t.sourcePanelId)):k.dispatch(B(t.workspaceId,o)),!0}return s.warn("Unhandled devspace:// link type",{url:e}),!1}catch(a){return s.error("Failed to handle devspace link",{url:e,error:a}),!1}}const Z=/^[a-z][a-z0-9+.-]*:/i,x=/^[a-z]:\/(?!\/)/i;function W(e){return e.replace(/\\/g,"/")}function ee(e){try{return W(decodeURIComponent(e))}catch{return null}}function te(e){return e.split("/").some(t=>t==="..")}function ae(e){const t=e.split("/").filter(a=>a&&a!==".");return t.length===0||t.some(a=>a==="..")?null:t.join("/")}async function y(e,t){if(!t.openInWorkspace||!e)return;const{openAndShowWorkspace:a}=await h(async()=>{const{openAndShowWorkspace:n}=await import("./TN7R9Ny0.js").then(o=>o.s);return{openAndShowWorkspace:n}},__vite__mapDeps([45,4,2,3,5,6,7,8,1,9,10,11,46,47]),import.meta.url);try{await a(e)}catch(n){throw R.error(v.ui_linkHandler_navigationFailed_title(),{description:n instanceof Error?n.message:v.ui_linkHandler_unknownError_label()}),n}}function P(e){!e.workspaceId||!e.sourcePanelId||k.dispatch(z(e.workspaceId,e.sourcePanelId))}function ne(e,t){const a=t??e;if(a){if(a.startsWith("#"))return null;const n=O(a).path;if(!a.startsWith("//")&&(x.test(W(n))||!Z.test(n)))return{path:a,fromResolvedUrl:!1}}if((e.startsWith("http://")||e.startsWith("https://"))&&typeof window<"u")try{const n=new URL(e);if(n.origin===window.location.origin)return{path:n.pathname+n.hash,fromResolvedUrl:!0}}catch{}return null}async function re(e,t,a){try{if(t.canOpenFile?.()===!1)return!1;const n=O(e),o=ee(n.path);if(!o||o.includes("\0"))return!1;let r=o;const{line:l,column:u}=n,{workspaceId:i}=t;if(!i)return s.warn("Cannot open file link without workspaceId",{path:r}),!1;if(te(r))return s.warn("Rejected file link with path traversal",{path:r}),!1;if(r.startsWith("/")||x.test(r)){const{selectWorkspaceById:c}=await h(async()=>{const{selectWorkspaceById:b}=await import("./3Kr2ijlK.js").then(S=>S.ee);return{selectWorkspaceById:b}},__vite__mapDeps([40,10,7,1,2,3,4,5,6,8,9,11,35,30,26,16,17,29,22,14,15,18,41,32]),import.meta.url),p=c.select(k.state,i),m=p?.worktreePath??p?.path,I=m?W(m):void 0,_=I?.endsWith("/")?I.slice(0,-1):I;if(_&&r.startsWith(`${_}/`))r=r.slice(_.length+1);else if(a)r=r.replace(/^\/+/,"");else{s.debug("Absolute path outside workspace root, opening in external editor",{path:r});const b=l===void 0?"":`:${l}${u===void 0?"":`:${u}`}`;return await M(`file://${r}${b}`)}}const d=ae(r);if(!d)return s.warn("Rejected invalid workspace file link",{path:r}),!1;r=d;const f=g(t);return await y(i,t),P(t),k.dispatch(V(i,r,{filePathIsLiteral:!0,line:l,openInAdjacentPanel:f,...t.sourcePanelId?{sourcePanelId:t.sourcePanelId}:{}})),s.debug("Opened file link in workspace file viewer",{path:r,workspaceId:i,line:l}),!0}catch(n){return s.error("Failed to open file link",{target:e,error:n}),!1}}async function oe(e,t,a,{workspaceId:n,openInWorkspace:o,sourcePanelId:r},l){try{const{showLinkActionMenu:u}=await h(async()=>{const{showLinkActionMenu:p}=await import("./CGcJ5lqH.js");return{showLinkActionMenu:p}},__vite__mapDeps([48,2]),import.meta.url),i=a.target instanceof HTMLElement?a.target:null;let d=a instanceof MouseEvent?a.clientX:0,f=a instanceof MouseEvent?a.clientY:0;if(d===0&&f===0&&i){const p=i.getBoundingClientRect();d=p.left,f=p.bottom}const c=u({url:e,gitHubRef:t,x:d,y:f,workspaceId:n,anchorElement:i,openInWorkspace:o??!1,sourcePanelId:r,assistantLayoutId:l});return t.kind==="pr"&&se(c,e),s.debug("Opened link action menu",{url:e,workspaceId:n}),!0}catch(u){return s.warn("Failed to open link action menu, falling back to external browser",{url:e,error:u}),await w(e)}}function se(e,t){h(async()=>{const{loadLinkActionMenuLinkedWorkspaces:a}=await import("./aixoUWDq.js");return{loadLinkActionMenuLinkedWorkspaces:a}},__vite__mapDeps([49,12,13,1,2,3,4,5,6,7,8,9,10,11,14,15,16,17,18,19,20,21,22,23,40,35,30,26,29,41,32,48]),import.meta.url).then(({loadLinkActionMenuLinkedWorkspaces:a})=>a(e,t)).catch(a=>{s.debug("PR workspace lookup unavailable",{url:t,error:a})})}async function ie(e){try{return await y(e,{openInWorkspace:!0}),!0}catch(t){return s.warn("Failed to open linked workspace",{workspaceId:e,error:t}),!1}}async function E(e,t,a={}){if(t===T){try{const{showAssistantContent:o}=await h(async()=>{const{showAssistantContent:r}=await import("./DZSbMOPJ.js");return{showAssistantContent:r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url);if(await o(e,{layoutId:a.assistantLayoutId}))return!0}catch(o){s.warn("Assistant panel unavailable, opening in external browser",{url:e,error:o})}return await w(e)}try{await y(t,a)}catch(o){return s.warn("Failed to enter workspace for in-app link",{url:e,workspaceId:t,error:o}),!1}const n=a.openInWorkspace?void 0:a.sourcePanelId;return await U(e,t,n)}async function U(e,t,a){let n=e,o;try{const{resolveBrowserLinkForOpen:r}=await h(async()=>{const{resolveBrowserLinkForOpen:u}=await import("./DpxbS0Pj.js").then(i=>i.b);return{resolveBrowserLinkForOpen:u}},__vite__mapDeps([50,25,11,7,1,2,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39]),import.meta.url),l=await r(e);n=l.url,o=l.requestedUrl}catch(r){s.warn("URL resolution failed, opening the URL unresolved",{url:e,error:r})}try{P({workspaceId:t,sourcePanelId:a});const{getPanelLayoutManager:r}=await h(async()=>{const{getPanelLayoutManager:u}=await import("./BIkt0YE0.js").then(i=>i.p);return{getPanelLayoutManager:u}},__vite__mapDeps([51,3,4,2,5,6,7,8,1,9,10,11,43]),import.meta.url);return r(t).openBrowserPanel(n,void 0,a,o),s.debug("Opened URL in browser panel",{url:e,targetUrl:n,workspaceId:t}),!0}catch(r){return s.warn("Failed to open URL in browser panel, falling back to external browser",{url:e,error:r}),await w(n)}}async function w(e){try{return await F("shell:openExternal",{url:e}),s.debug("Opened URL in external browser",{url:e}),!0}catch(t){return s.error("Failed to open URL in external browser",{url:e,error:t}),!1}}async function M(e){try{const t=e.replace("file://","");return typeof window<"u"&&window.electronAPI?(await F("shell:openExternal",{url:`vscode://file/${t}`}),s.debug("Opened file in external editor",{filePath:t}),!0):!1}catch(t){return s.error("Failed to open file in external editor",{url:e,error:t}),!1}}function ce(e,t={}){let a=null,n=null,o=null;async function r(){if(!n||!o){const d=await h(()=>import("./CIKXOyvw.js").then(f=>f.K),__vite__mapDeps([14,1,2,11,7,15,10,16,8,17,18]),import.meta.url);n=d.showLinkTooltip,o=d.hideLinkTooltip}}function l(d){const c=d.target.closest("a");if(c?.href&&!c.href.startsWith("intent://")&&!c.href.startsWith("devspace://")){if(c===a)return;a=c;const p=t.workspaceId??c.closest("[data-workspace-id]")?.dataset.workspaceId??c.closest("[data-workspace-surface]")?.dataset.workspaceSurface;r().then(()=>{a===c&&n&&n(c,c.href,p)})}else a&&(a=null,o?.())}function u(d){const c=d.target.closest("a");if(c&&c===a){const p=d.relatedTarget;if(p&&c.contains(p))return;a=null,o?.()}}function i(){a&&(a=null,o?.())}return e.addEventListener("mouseover",l),e.addEventListener("mouseout",u),e.addEventListener("click",i),()=>{e.removeEventListener("mouseover",l),e.removeEventListener("mouseout",u),e.removeEventListener("click",i),o?.()}}const ve=Object.freeze(Object.defineProperty({__proto__:null,createLinkTooltipHandler:ce,handleLink:Q,openInBrowserPanel:U,openInExternalBrowser:w,openLinkInApp:E,openLinkedWorkspace:ie},Symbol.toStringTag,{value:"Module"}));export{E as a,ie as b,ce as c,Q as h,ve as l,w as o,J as r,Le as w};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/oHUzFHtp.js","/app/immutable/chunks/YLhFQnIu.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/D5wnbxHp.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BUsnh1ZW.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/CrpUtGFn.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/0Kw0mmSW.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/DJivXy66.js","/app/immutable/chunks/CTowDLQa.js","/app/immutable/chunks/BQhBnAuP.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/Bq7euxCs.js","/app/immutable/chunks/B79iAtSu.js","/app/immutable/chunks/CZB2ndi9.js","/app/immutable/chunks/YeOAvjnW.js","/app/immutable/chunks/Cw2fqKk9.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/oBIu7LTI.js","/app/immutable/chunks/DwGyIIXK.js","/app/immutable/chunks/CBbdbU2x.js","/app/immutable/chunks/DIEHuZ8f.js","/app/immutable/chunks/D48_y-cl.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/gwv5JQYH.js","/app/immutable/chunks/FLpsgWeB.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/BJbm_MWC.js","/app/immutable/chunks/_3Ca9E4W.js","/app/immutable/chunks/L3K71tUU.js","/app/immutable/chunks/COVS9Crf.js","/app/immutable/chunks/Bsdq-idi.js","/app/immutable/chunks/BlAMrm5X.js","/app/immutable/chunks/DQ8CqY9L.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CGcJ5lqH.js","/app/immutable/chunks/BuXXIZt7.js","/app/immutable/chunks/Mmc_61iE.js","/app/immutable/chunks/Co9CFvqw.js"])))=>i.map(i=>d[i]);
2
+ import{bm as v,_ as h}from"./YLhFQnIu.js";import{a as H}from"./BdWqymET.js";import{br as A,Jx as k,m as T,I0 as C,G$ as D,vu as j,vs as B,vJ as V,nF as z}from"./D5wnbxHp.js";import{bK as $}from"./D-aEx3GL.js";import{m as R}from"./CZB2ndi9.js";import"./3SdAC2_C.js";import"./BQhBnAuP.js";import"./CrpUtGFn.js";import{R as N,F as g,E as G,Q as O}from"./DJivXy66.js";import"./ChTqQfQN.js";import"./D48_y-cl.js";import{o as K}from"./_3Ca9E4W.js";import{i as F}from"./BBWuirRW.js";const L=new WeakMap;function Le(e,t){const a=n=>{n&&n!=="new"?L.set(e,n):L.delete(e)};return a(t),{update:a,destroy(){L.delete(e)}}}function q(e){for(let t=e;t;t=t.parentElement){const a=L.get(t);if(a)return a}}function J(e,t){const a=e?.closest("[data-workspace-link-target]")?.dataset.workspaceLinkTarget;return{openInWorkspace:!!t&&a===t,panelId:e?.closest("[data-panel-id]")?.dataset.panelId,assistantLayoutId:e?.closest("[data-assistant-layout-id]")?.dataset.assistantLayoutId,surfaceWorkspaceId:q(e)}}const s=new H("LinkHandler");async function Q(e,t){try{const a=t.event?.target,n=J(a instanceof Element?a:null,t.workspaceId),o=t.openInWorkspace??n.openInWorkspace,r=o?void 0:t.sourcePanelId||n.panelId,{assistantLayoutId:l}=n,u=t.workspaceId??(n.surfaceWorkspaceId?A(n.surfaceWorkspaceId):void 0);if(t={...t,workspaceId:u,openInWorkspace:o,sourcePanelId:r},t.customHandler&&await t.customHandler(e))return s.debug("Link handled by custom handler",{url:e}),!0;if(/^workspace-asset:/i.test(e.trim()))return R.error(v.ui_linkHandler_assetUnavailable_error()),!1;const i=N(e),{event:d}=t,f=i&&d&&!g(t)?t.githubLinkDefaultAction??K.select(k.state):void 0,c=!f||f==="open-in-app";if(t.workspaceId===T&&!t.forceExternal&&c){const{showAssistantContent:m}=await h(async()=>{const{showAssistantContent:_}=await import("./oHUzFHtp.js");return{showAssistantContent:_}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url),I=t.rawHref?.startsWith("/workspace/")?t.rawHref:e;if(await m(I,{layoutId:l}))return!0}if(e.startsWith("intent://"))return await X(e,{...t,sourcePanelId:r});if(e.startsWith("devspace://"))return await Y(e,{...t,sourcePanelId:r});const p=ne(e,t.rawHref);if(p)return await re(p.path,{...t,sourcePanelId:r},p.fromResolvedUrl);if(e.startsWith("http://")||e.startsWith("https://")){if(G(e))return s.debug("Auth URL detected, opening in external browser",{url:e}),await w(e);if(t.forceExternal)return await w(e);if(o&&c||g(t))return t.workspaceId?await E(e,t.workspaceId,{...t,assistantLayoutId:l}):(s.debug("No workspaceId available, opening in external browser",{url:e}),await w(e));if(i&&d&&f)switch(f){case"open-in-browser":return await w(e);case"open-in-app":return t.workspaceId?await E(e,t.workspaceId,{...t,assistantLayoutId:l}):await w(e);case"copy-link":return await $(e),!0;case"start-workspace":return k.dispatch(C({...i,url:e})),k.dispatch(D(!0)),!0;case"show-choices":return await oe(e,i,d,t,l)}return await w(e)}return e.startsWith("file://")?t.canOpenFile?.()===!1?!1:await M(e):(s.warn("Unknown link type, falling back to external browser",{url:e}),await w(e))}catch(a){return s.error("Failed to handle link",{url:e,error:a}),!1}}async function X(e,t){try{const{parseIntentLink:a,handleIntentLink:n}=await h(async()=>{const{parseIntentLink:l,handleIntentLink:u}=await import("./B79iAtSu.js");return{parseIntentLink:l,handleIntentLink:u}},__vite__mapDeps([24,1,2,25,11,7,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39,40,22,41,42,23]),import.meta.url),o=a(e);if(t.canOpenFile&&o.type==="file"&&!t.canOpenFile())return!1;const r=o.workspaceId?A(o.workspaceId):t.workspaceId;return o.valid&&o.type!=="workspace"&&await y(r,t),P(t),await n(e,{workspaceId:t.openInWorkspace?r:t.workspaceId,sourcePanelId:t.sourcePanelId,openInAdjacentPanel:t.openInAdjacentPanel??g(t),openInNewAdjacentPanel:t.openInNewAdjacentPanel??!1})}catch(a){return s.error("Failed to handle intent link",{url:e,error:a}),!1}}async function Y(e,t){try{const a=e.match(/^devspace:\/\/terminal\/(.+)$/);if(a){if(!t.workspaceId)return s.warn("Cannot open terminal without workspaceId",{url:e}),!1;const n=decodeURIComponent(a[1]);s.debug("Opening terminal from devspace link",{terminalId:n,workspaceId:t.workspaceId}),await y(t.workspaceId,t),P(t);const o={type:"terminal",title:v.layout_tabTypes_terminal_title(),terminalId:n,closable:!0};return g(t)?k.dispatch(j(t.workspaceId,o,t.sourcePanelId)):k.dispatch(B(t.workspaceId,o)),!0}return s.warn("Unhandled devspace:// link type",{url:e}),!1}catch(a){return s.error("Failed to handle devspace link",{url:e,error:a}),!1}}const Z=/^[a-z][a-z0-9+.-]*:/i,x=/^[a-z]:\/(?!\/)/i;function W(e){return e.replace(/\\/g,"/")}function ee(e){try{return W(decodeURIComponent(e))}catch{return null}}function te(e){return e.split("/").some(t=>t==="..")}function ae(e){const t=e.split("/").filter(a=>a&&a!==".");return t.length===0||t.some(a=>a==="..")?null:t.join("/")}async function y(e,t){if(!t.openInWorkspace||!e)return;const{openAndShowWorkspace:a}=await h(async()=>{const{openAndShowWorkspace:n}=await import("./BlAMrm5X.js").then(o=>o.s);return{openAndShowWorkspace:n}},__vite__mapDeps([45,4,2,3,5,6,7,8,1,9,10,11,46,47]),import.meta.url);try{await a(e)}catch(n){throw R.error(v.ui_linkHandler_navigationFailed_title(),{description:n instanceof Error?n.message:v.ui_linkHandler_unknownError_label()}),n}}function P(e){!e.workspaceId||!e.sourcePanelId||k.dispatch(z(e.workspaceId,e.sourcePanelId))}function ne(e,t){const a=t??e;if(a){if(a.startsWith("#"))return null;const n=O(a).path;if(!a.startsWith("//")&&(x.test(W(n))||!Z.test(n)))return{path:a,fromResolvedUrl:!1}}if((e.startsWith("http://")||e.startsWith("https://"))&&typeof window<"u")try{const n=new URL(e);if(n.origin===window.location.origin)return{path:n.pathname+n.hash,fromResolvedUrl:!0}}catch{}return null}async function re(e,t,a){try{if(t.canOpenFile?.()===!1)return!1;const n=O(e),o=ee(n.path);if(!o||o.includes("\0"))return!1;let r=o;const{line:l,column:u}=n,{workspaceId:i}=t;if(!i)return s.warn("Cannot open file link without workspaceId",{path:r}),!1;if(te(r))return s.warn("Rejected file link with path traversal",{path:r}),!1;if(r.startsWith("/")||x.test(r)){const{selectWorkspaceById:c}=await h(async()=>{const{selectWorkspaceById:b}=await import("./BJbm_MWC.js").then(S=>S.ee);return{selectWorkspaceById:b}},__vite__mapDeps([40,10,7,1,2,3,4,5,6,8,9,11,35,30,26,16,17,29,22,14,15,18,41,32]),import.meta.url),p=c.select(k.state,i),m=p?.worktreePath??p?.path,I=m?W(m):void 0,_=I?.endsWith("/")?I.slice(0,-1):I;if(_&&r.startsWith(`${_}/`))r=r.slice(_.length+1);else if(a)r=r.replace(/^\/+/,"");else{s.debug("Absolute path outside workspace root, opening in external editor",{path:r});const b=l===void 0?"":`:${l}${u===void 0?"":`:${u}`}`;return await M(`file://${r}${b}`)}}const d=ae(r);if(!d)return s.warn("Rejected invalid workspace file link",{path:r}),!1;r=d;const f=g(t);return await y(i,t),P(t),k.dispatch(V(i,r,{filePathIsLiteral:!0,line:l,openInAdjacentPanel:f,...t.sourcePanelId?{sourcePanelId:t.sourcePanelId}:{}})),s.debug("Opened file link in workspace file viewer",{path:r,workspaceId:i,line:l}),!0}catch(n){return s.error("Failed to open file link",{target:e,error:n}),!1}}async function oe(e,t,a,{workspaceId:n,openInWorkspace:o,sourcePanelId:r},l){try{const{showLinkActionMenu:u}=await h(async()=>{const{showLinkActionMenu:p}=await import("./CGcJ5lqH.js");return{showLinkActionMenu:p}},__vite__mapDeps([48,2]),import.meta.url),i=a.target instanceof HTMLElement?a.target:null;let d=a instanceof MouseEvent?a.clientX:0,f=a instanceof MouseEvent?a.clientY:0;if(d===0&&f===0&&i){const p=i.getBoundingClientRect();d=p.left,f=p.bottom}const c=u({url:e,gitHubRef:t,x:d,y:f,workspaceId:n,anchorElement:i,openInWorkspace:o??!1,sourcePanelId:r,assistantLayoutId:l});return t.kind==="pr"&&se(c,e),s.debug("Opened link action menu",{url:e,workspaceId:n}),!0}catch(u){return s.warn("Failed to open link action menu, falling back to external browser",{url:e,error:u}),await w(e)}}function se(e,t){h(async()=>{const{loadLinkActionMenuLinkedWorkspaces:a}=await import("./BuXXIZt7.js");return{loadLinkActionMenuLinkedWorkspaces:a}},__vite__mapDeps([49,12,13,1,2,3,4,5,6,7,8,9,10,11,14,15,16,17,18,19,20,21,22,23,40,35,30,26,29,41,32,48]),import.meta.url).then(({loadLinkActionMenuLinkedWorkspaces:a})=>a(e,t)).catch(a=>{s.debug("PR workspace lookup unavailable",{url:t,error:a})})}async function ie(e){try{return await y(e,{openInWorkspace:!0}),!0}catch(t){return s.warn("Failed to open linked workspace",{workspaceId:e,error:t}),!1}}async function E(e,t,a={}){if(t===T){try{const{showAssistantContent:o}=await h(async()=>{const{showAssistantContent:r}=await import("./oHUzFHtp.js");return{showAssistantContent:r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url);if(await o(e,{layoutId:a.assistantLayoutId}))return!0}catch(o){s.warn("Assistant panel unavailable, opening in external browser",{url:e,error:o})}return await w(e)}try{await y(t,a)}catch(o){return s.warn("Failed to enter workspace for in-app link",{url:e,workspaceId:t,error:o}),!1}const n=a.openInWorkspace?void 0:a.sourcePanelId;return await U(e,t,n)}async function U(e,t,a){let n=e,o;try{const{resolveBrowserLinkForOpen:r}=await h(async()=>{const{resolveBrowserLinkForOpen:u}=await import("./Mmc_61iE.js").then(i=>i.b);return{resolveBrowserLinkForOpen:u}},__vite__mapDeps([50,25,11,7,1,2,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39]),import.meta.url),l=await r(e);n=l.url,o=l.requestedUrl}catch(r){s.warn("URL resolution failed, opening the URL unresolved",{url:e,error:r})}try{P({workspaceId:t,sourcePanelId:a});const{getPanelLayoutManager:r}=await h(async()=>{const{getPanelLayoutManager:u}=await import("./Co9CFvqw.js").then(i=>i.p);return{getPanelLayoutManager:u}},__vite__mapDeps([51,3,4,2,5,6,7,8,1,9,10,11,43]),import.meta.url);return r(t).openBrowserPanel(n,void 0,a,o),s.debug("Opened URL in browser panel",{url:e,targetUrl:n,workspaceId:t}),!0}catch(r){return s.warn("Failed to open URL in browser panel, falling back to external browser",{url:e,error:r}),await w(n)}}async function w(e){try{return await F("shell:openExternal",{url:e}),s.debug("Opened URL in external browser",{url:e}),!0}catch(t){return s.error("Failed to open URL in external browser",{url:e,error:t}),!1}}async function M(e){try{const t=e.replace("file://","");return typeof window<"u"&&window.electronAPI?(await F("shell:openExternal",{url:`vscode://file/${t}`}),s.debug("Opened file in external editor",{filePath:t}),!0):!1}catch(t){return s.error("Failed to open file in external editor",{url:e,error:t}),!1}}function ce(e,t={}){let a=null,n=null,o=null;async function r(){if(!n||!o){const d=await h(()=>import("./DJivXy66.js").then(f=>f.K),__vite__mapDeps([14,1,2,11,7,15,10,16,8,17,18]),import.meta.url);n=d.showLinkTooltip,o=d.hideLinkTooltip}}function l(d){const c=d.target.closest("a");if(c?.href&&!c.href.startsWith("intent://")&&!c.href.startsWith("devspace://")){if(c===a)return;a=c;const p=t.workspaceId??c.closest("[data-workspace-id]")?.dataset.workspaceId??c.closest("[data-workspace-surface]")?.dataset.workspaceSurface;r().then(()=>{a===c&&n&&n(c,c.href,p)})}else a&&(a=null,o?.())}function u(d){const c=d.target.closest("a");if(c&&c===a){const p=d.relatedTarget;if(p&&c.contains(p))return;a=null,o?.()}}function i(){a&&(a=null,o?.())}return e.addEventListener("mouseover",l),e.addEventListener("mouseout",u),e.addEventListener("click",i),()=>{e.removeEventListener("mouseover",l),e.removeEventListener("mouseout",u),e.removeEventListener("click",i),o?.()}}const ve=Object.freeze(Object.defineProperty({__proto__:null,createLinkTooltipHandler:ce,handleLink:Q,openInBrowserPanel:U,openInExternalBrowser:w,openLinkInApp:E,openLinkedWorkspace:ie},Symbol.toStringTag,{value:"Module"}));export{E as a,ie as b,ce as c,Q as h,ve as l,w as o,J as r,Le as w};