@intent-hq/web 2.364.0 → 2.364.1

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 (222) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{mqQotRJc.js → -5c15-eL.js} +1 -1
  3. package/web/app/immutable/chunks/{DEpemsrt.js → -cgVf6p5.js} +1 -1
  4. package/web/app/immutable/chunks/{VRkOAck5.js → 1rUouahZ.js} +14 -14
  5. package/web/app/immutable/chunks/{C5BxUEY3.js → 29BR2jNs.js} +1 -1
  6. package/web/app/immutable/chunks/2aOnW-4O.js +8 -0
  7. package/web/app/immutable/chunks/{BSH9hEiM.js → 5KYoqZab.js} +1 -1
  8. package/web/app/immutable/chunks/{JYGux4ol.js → 5OTCXuAE.js} +1 -1
  9. package/web/app/immutable/chunks/{C_OJiJwX.js → 5S2X8Cqu.js} +1 -1
  10. package/web/app/immutable/chunks/{CAYnSUTm.js → 5fOtBsk1.js} +1 -1
  11. package/web/app/immutable/chunks/{DqRQMsVa.js → 5x1QjrMw.js} +1 -1
  12. package/web/app/immutable/chunks/Ae4NLLo7.js +5 -0
  13. package/web/app/immutable/chunks/{DVuRD5Ts.js → AyNPL8hA.js} +2 -2
  14. package/web/app/immutable/chunks/{Cj221eij.js → B0AIN2Bd.js} +2 -2
  15. package/web/app/immutable/chunks/{BmzlwbPY.js → B6KgHQwC.js} +2 -2
  16. package/web/app/immutable/chunks/{DdLmt8cE.js → B94nn_J1.js} +1 -1
  17. package/web/app/immutable/chunks/{BYiNzddZ.js → B9CrrjC-.js} +1 -1
  18. package/web/app/immutable/chunks/{BqmFcDk_.js → B9wBi5AY.js} +2 -2
  19. package/web/app/immutable/chunks/BAMy3zRo.js +1 -0
  20. package/web/app/immutable/chunks/{NlYAToKM.js → BE3-5jz7.js} +1 -1
  21. package/web/app/immutable/chunks/{Cx-QCPs8.js → BNAMRMVT.js} +3 -3
  22. package/web/app/immutable/chunks/{DkLqnpG_.js → BNDiUjt6.js} +1 -1
  23. package/web/app/immutable/chunks/{5whVpQ1T.js → BOQsgaO1.js} +1 -1
  24. package/web/app/immutable/chunks/{CMycmgOT.js → BOznkADd.js} +1 -1
  25. package/web/app/immutable/chunks/{DgFR5XAS.js → BPwnX40x.js} +1 -1
  26. package/web/app/immutable/chunks/{DFki5ik9.js → BR7bsAqd.js} +3 -3
  27. package/web/app/immutable/chunks/{DbO5SFoI.js → BRNFjIOs.js} +1 -1
  28. package/web/app/immutable/chunks/{Dj2Np84B.js → BTHkr-Pv.js} +1 -1
  29. package/web/app/immutable/chunks/{BrjNzF-s.js → BV4u77vc.js} +2 -2
  30. package/web/app/immutable/chunks/BV_D1-BM.js +1 -0
  31. package/web/app/immutable/chunks/{DvkLliQ2.js → BY77Nm-Z.js} +1 -1
  32. package/web/app/immutable/chunks/{CN14fp-q.js → BYDdz4Ge.js} +1 -1
  33. package/web/app/immutable/chunks/BYR1LxfZ.js +1 -0
  34. package/web/app/immutable/chunks/{BAXp8CdK.js → B__qxspK.js} +1 -1
  35. package/web/app/immutable/chunks/{DvDwZZxh.js → Bc--form.js} +22 -22
  36. package/web/app/immutable/chunks/{H6y0h2mr.js → BdHMV0Ti.js} +1 -1
  37. package/web/app/immutable/chunks/{CjFuF_md.js → BdSXWXEZ.js} +1 -1
  38. package/web/app/immutable/chunks/{mTpKup-n.js → BdmRyKCf.js} +1 -1
  39. package/web/app/immutable/chunks/{B-Xd7Iia.js → Bhq_T8D6.js} +6 -6
  40. package/web/app/immutable/chunks/{DQSfr_ea.js → BiCt4TBj.js} +1 -1
  41. package/web/app/immutable/chunks/{Cpi4ssvk.js → Bj1i6i6_.js} +1 -1
  42. package/web/app/immutable/chunks/{Ds-n24vW.js → BoLx4-aT.js} +1 -1
  43. package/web/app/immutable/chunks/{CohLOzmV.js → Bpuhugma.js} +3 -3
  44. package/web/app/immutable/chunks/{DJr7zMRE.js → BuOmiQbE.js} +6 -6
  45. package/web/app/immutable/chunks/BwEAQU2l.js +1 -0
  46. package/web/app/immutable/chunks/{D0s73M3N.js → C0VLOUoY.js} +1 -1
  47. package/web/app/immutable/chunks/{C4IxG4Wb.js → C1TCPb-1.js} +1 -1
  48. package/web/app/immutable/chunks/C2E3XD1o.js +1 -0
  49. package/web/app/immutable/chunks/{C3PPHFEU.js → C31SD8_g.js} +1 -1
  50. package/web/app/immutable/chunks/{BxXaf5o1.js → C8zMMCnQ.js} +1 -1
  51. package/web/app/immutable/chunks/{Bvlr1E1Y.js → CAbdPsFF.js} +1 -1
  52. package/web/app/immutable/chunks/{CL8gKbrl.js → CAjI8-Gb.js} +3 -3
  53. package/web/app/immutable/chunks/{D_baEUtX.js → CDvfrZi7.js} +1 -1
  54. package/web/app/immutable/chunks/{dWnFDoxX.js → CEEAQIdx.js} +1 -1
  55. package/web/app/immutable/chunks/{YPO7uOte.js → CHAuC75S.js} +1 -1
  56. package/web/app/immutable/chunks/{CtdVHw_g.js → CHrWfKbR.js} +1 -1
  57. package/web/app/immutable/chunks/{Bjn36dw0.js → CNuVRrwB.js} +1 -1
  58. package/web/app/immutable/chunks/{D5Qd4J-d.js → CPhS8cGP.js} +1 -1
  59. package/web/app/immutable/chunks/{PIV69RBI.js → CQSI5ASZ.js} +1 -1
  60. package/web/app/immutable/chunks/CQejBdMj.js +1 -0
  61. package/web/app/immutable/chunks/{ig6utCTb.js → CSM7ZxS7.js} +3 -3
  62. package/web/app/immutable/chunks/{BRU94MJX.js → CUNh5j03.js} +1 -1
  63. package/web/app/immutable/chunks/CXNFHS6a.js +1 -0
  64. package/web/app/immutable/chunks/{BaDKWIdd.js → CXOOFUlR.js} +1 -1
  65. package/web/app/immutable/chunks/{BTTV7TCH.js → CYkqpOjL.js} +2 -2
  66. package/web/app/immutable/chunks/{OtD6re_S.js → CZUggW-r.js} +1 -1
  67. package/web/app/immutable/chunks/{CKyCqjPF.js → Cbl8RojE.js} +1 -1
  68. package/web/app/immutable/chunks/{DZ6LWDQd.js → CciOj3su.js} +1 -1
  69. package/web/app/immutable/chunks/{BSYMJefb.js → CdYmqkhV.js} +1 -1
  70. package/web/app/immutable/chunks/{CzkNbc1D.js → CdtD_Pls.js} +13 -13
  71. package/web/app/immutable/chunks/{hryztIjn.js → CgMOv0N3.js} +12 -12
  72. package/web/app/immutable/chunks/{BE8VMwpc.js → Ch9x8EwV.js} +1 -1
  73. package/web/app/immutable/chunks/Cj-LzC0F.js +1 -0
  74. package/web/app/immutable/chunks/{BQSAkcqY.js → CkJ9fl03.js} +1 -1
  75. package/web/app/immutable/chunks/{AVoh4VTC.js → ClTDucyC.js} +1 -1
  76. package/web/app/immutable/chunks/{Cy3NIKSC.js → CmMChym_.js} +1 -1
  77. package/web/app/immutable/chunks/{BqPORjnM.js → Co4JTGKs.js} +9 -9
  78. package/web/app/immutable/chunks/{CnmNapGz.js → CofCBGqz.js} +1 -1
  79. package/web/app/immutable/chunks/{87lVsicR.js → CqAj2web.js} +1 -1
  80. package/web/app/immutable/chunks/{CeUIG-AJ.js → Cqvl3_cz.js} +1 -1
  81. package/web/app/immutable/chunks/{D3mO5vU_.js → Cr2m0lJA.js} +1 -1
  82. package/web/app/immutable/chunks/{Ck_xb83V.js → CrH6Qn0l.js} +1 -1
  83. package/web/app/immutable/chunks/{DWGb9pxm.js → Cv_kydag.js} +1 -1
  84. package/web/app/immutable/chunks/{DFDdR2U9.js → CwTiQx8t.js} +1 -1
  85. package/web/app/immutable/chunks/{POHABHCK.js → CxY2WRK_.js} +1 -1
  86. package/web/app/immutable/chunks/{DmuliVKW.js → Cyka4KjZ.js} +1 -1
  87. package/web/app/immutable/chunks/{0QA5VGU4.js → D3pwkbOk.js} +1 -1
  88. package/web/app/immutable/chunks/{nztcgo8P.js → D4t_4btJ.js} +1 -1
  89. package/web/app/immutable/chunks/{Dgn8ZpRu.js → D6xMv_kl.js} +1 -1
  90. package/web/app/immutable/chunks/{BNfARN_F.js → D8EQ_NzN.js} +1 -1
  91. package/web/app/immutable/chunks/D8r4O1jq.js +1 -0
  92. package/web/app/immutable/chunks/{CykEdx-W.js → D9QQZoyW.js} +1 -1
  93. package/web/app/immutable/chunks/{CqBptZ8X.js → DAJx524I.js} +1 -1
  94. package/web/app/immutable/chunks/{HqSElE-c.js → DAfmeVOj.js} +1 -1
  95. package/web/app/immutable/chunks/{D7MT3yD-.js → DDnGZw3Y.js} +1 -1
  96. package/web/app/immutable/chunks/{BNAZ2Rt6.js → DEM3rYWD.js} +1 -1
  97. package/web/app/immutable/chunks/{DyyYJol2.js → DI9n2SbN.js} +1 -1
  98. package/web/app/immutable/chunks/DIVxwKug.js +1 -0
  99. package/web/app/immutable/chunks/{rR8QPumw.js → DJLdmlzr.js} +1 -1
  100. package/web/app/immutable/chunks/{DfhHfqhL.js → DKPxGiW8.js} +1 -1
  101. package/web/app/immutable/chunks/{B0rliDN3.js → DLsi41pQ.js} +1 -1
  102. package/web/app/immutable/chunks/{6jr3VdyK.js → DN0IZvlS.js} +1 -1
  103. package/web/app/immutable/chunks/{C5PnDdXL.js → DNLHkust.js} +1 -1
  104. package/web/app/immutable/chunks/{BbEAZfsy.js → DPdvl6GX.js} +3 -3
  105. package/web/app/immutable/chunks/DQOW95_s.js +1 -0
  106. package/web/app/immutable/chunks/{ZKkDq-P-.js → DQbiqwlg.js} +1 -1
  107. package/web/app/immutable/chunks/DQe63BYb.js +1 -0
  108. package/web/app/immutable/chunks/{Dq9OF9pM.js → DQkakWIg.js} +1 -1
  109. package/web/app/immutable/chunks/{3ZtIgkap.js → DQxndXal.js} +1 -1
  110. package/web/app/immutable/chunks/{iNwdZbUg.js → DSsilqwx.js} +1 -1
  111. package/web/app/immutable/chunks/DUe1LhB5.js +1 -0
  112. package/web/app/immutable/chunks/{BC1D5GEA.js → DWtd5nsa.js} +1 -1
  113. package/web/app/immutable/chunks/DXgzYfi5.js +3 -0
  114. package/web/app/immutable/chunks/{Nm2FoBJH.js → DZ7XU-pR.js} +2 -2
  115. package/web/app/immutable/chunks/{B3fyFrOb.js → D_hew37e.js} +1 -1
  116. package/web/app/immutable/chunks/DdY5bfKP.js +2 -0
  117. package/web/app/immutable/chunks/{D_QJjGCV.js → DesjI55h.js} +1 -1
  118. package/web/app/immutable/chunks/Dh5K_PAi.js +19 -0
  119. package/web/app/immutable/chunks/{DxCx5XQm.js → Diytskg0.js} +2 -2
  120. package/web/app/immutable/chunks/{BdsGrZ4p.js → DjlCXPOX.js} +1 -1
  121. package/web/app/immutable/chunks/{yEDshBdX.js → DkC9ufwp.js} +2 -2
  122. package/web/app/immutable/chunks/{Dw_aK2j4.js → DlaT5FCI.js} +1 -1
  123. package/web/app/immutable/chunks/Dm52nWQl.js +2 -0
  124. package/web/app/immutable/chunks/Dnq0RttT.js +1 -0
  125. package/web/app/immutable/chunks/DqJhO4fJ.js +1 -0
  126. package/web/app/immutable/chunks/Dvne-Ir2.js +2 -0
  127. package/web/app/immutable/chunks/{D4X04avC.js → DvpMokIP.js} +1 -1
  128. package/web/app/immutable/chunks/{CNDBXBk-.js → Fmnom-WY.js} +1 -1
  129. package/web/app/immutable/chunks/{pX3ccDfB.js → Fn6ahMKB.js} +1 -1
  130. package/web/app/immutable/chunks/{DjG8KKys.js → GBgYT_ZX.js} +1 -1
  131. package/web/app/immutable/chunks/{DIItTOwX.js → IrpNn5wU.js} +3 -3
  132. package/web/app/immutable/chunks/{CpnOQhdi.js → KNCDDVpM.js} +1 -1
  133. package/web/app/immutable/chunks/{wk7oHW77.js → L1CVuhoA.js} +1 -1
  134. package/web/app/immutable/chunks/L2rlqKcj.js +2 -0
  135. package/web/app/immutable/chunks/{D-knecCH.js → LCA3JZcm.js} +1 -1
  136. package/web/app/immutable/chunks/{CL65_thQ.js → P4d4jObP.js} +4 -4
  137. package/web/app/immutable/chunks/{C5McJHje.js → QOnR7uhL.js} +1 -1
  138. package/web/app/immutable/chunks/{CXDGznW-.js → RxXbQ6vw.js} +1 -1
  139. package/web/app/immutable/chunks/{DI490Bmi.js → TUps9RpP.js} +1 -1
  140. package/web/app/immutable/chunks/{z6JLSmfj.js → VoYmOMPQ.js} +1 -1
  141. package/web/app/immutable/chunks/{DlJLDJJk.js → W4AmvBtV.js} +1 -1
  142. package/web/app/immutable/chunks/{BelBIFFw.js → X8rZbYSf.js} +1 -1
  143. package/web/app/immutable/chunks/{BklVytxZ.js → XBL2PUH3.js} +1 -1
  144. package/web/app/immutable/chunks/{Ay4jwPDw.js → Yg15Fv79.js} +1 -1
  145. package/web/app/immutable/chunks/{CPwBA0nW.js → b4HmlJRj.js} +1 -1
  146. package/web/app/immutable/chunks/{CRVH_KqP.js → cW-FS3Hn.js} +1 -1
  147. package/web/app/immutable/chunks/{DZ5zwyOA.js → dI5geiaR.js} +1 -1
  148. package/web/app/immutable/chunks/{C5tNj-Jh.js → dPtMfkm0.js} +1 -1
  149. package/web/app/immutable/chunks/{CmG2ox2r.js → ljWjPDYU.js} +1 -1
  150. package/web/app/immutable/chunks/{sRJ09sjC.js → mFjej5z1.js} +1 -1
  151. package/web/app/immutable/chunks/mQ4MH-tV.js +1 -0
  152. package/web/app/immutable/chunks/{CT_o8OHz.js → n8Ge9yma.js} +1 -1
  153. package/web/app/immutable/chunks/{CsExfDOB.js → nSREvQTr.js} +1 -1
  154. package/web/app/immutable/chunks/{BVY6rM-6.js → rxpX-lzF.js} +1 -1
  155. package/web/app/immutable/chunks/{Bzqjim1v.js → sw8cXEEZ.js} +1 -1
  156. package/web/app/immutable/chunks/{CAdDuqvN.js → tUh5DIgC.js} +1 -1
  157. package/web/app/immutable/entry/app.CKUvXYjF.js +4 -0
  158. package/web/app/immutable/entry/start.Duym94rE.js +1 -0
  159. package/web/app/immutable/nodes/{0.Djeu0Ip5.js → 0.CvO-mxHr.js} +1 -1
  160. package/web/app/immutable/nodes/{1.HrNCoXRZ.js → 1.BtWqHfI3.js} +1 -1
  161. package/web/app/immutable/nodes/{10.DNXZHrOy.js → 10.Nju4TcJi.js} +16 -16
  162. package/web/app/immutable/nodes/11.CgfONc28.js +41 -0
  163. package/web/app/immutable/nodes/{14.BbAQHg9a.js → 14.ZYJrREbk.js} +1 -1
  164. package/web/app/immutable/nodes/15.D-Bp6Ntm.js +3 -0
  165. package/web/app/immutable/nodes/{17.j1ivQdm8.js → 17.BkSzuVJm.js} +1 -1
  166. package/web/app/immutable/nodes/{19.BvmHWXqZ.js → 19.BKl-3eGA.js} +2 -2
  167. package/web/app/immutable/nodes/2.Dm8vrux7.js +13 -0
  168. package/web/app/immutable/nodes/{3.DKraOS36.js → 3.C2D88Bxw.js} +1 -1
  169. package/web/app/immutable/nodes/{4.X4jAWXKh.js → 4.rK9rlcpX.js} +1 -1
  170. package/web/app/immutable/nodes/5.B_0c1Txa.js +1 -0
  171. package/web/app/immutable/nodes/{6.CRKhGbIu.js → 6.VlU3nsvH.js} +2 -2
  172. package/web/app/immutable/nodes/{7.JP33qT6J.js → 7.Cl8Ow18g.js} +1 -1
  173. package/web/app/immutable/nodes/{8.ha2l89uZ.js → 8.o6a_9hX2.js} +1 -1
  174. package/web/app/immutable/nodes/{9.xEw44K6Y.js → 9.DJAscTto.js} +7 -7
  175. package/web/app/version.json +1 -1
  176. package/web/index.html +9 -9
  177. package/web/app/immutable/chunks/5yRFpTfe.js +0 -1
  178. package/web/app/immutable/chunks/8gFeUK_j.js +0 -1
  179. package/web/app/immutable/chunks/B79XDXv3.js +0 -1
  180. package/web/app/immutable/chunks/BHIQzxKp.js +0 -1
  181. package/web/app/immutable/chunks/BIlpFO9I.js +0 -1
  182. package/web/app/immutable/chunks/BPrTYnJY.js +0 -1
  183. package/web/app/immutable/chunks/BYQ9dA2L.js +0 -1
  184. package/web/app/immutable/chunks/BZgmGdmB.js +0 -2
  185. package/web/app/immutable/chunks/Bf0CE2Dp.js +0 -3
  186. package/web/app/immutable/chunks/BpMs8swj.js +0 -1
  187. package/web/app/immutable/chunks/C2cNFCLG.js +0 -8
  188. package/web/app/immutable/chunks/C3B9kB5Y.js +0 -5
  189. package/web/app/immutable/chunks/CROhcjdD.js +0 -1
  190. package/web/app/immutable/chunks/CVGDR84i.js +0 -1
  191. package/web/app/immutable/chunks/CZSYR5E4.js +0 -1
  192. package/web/app/immutable/chunks/C_bzTU5z.js +0 -2
  193. package/web/app/immutable/chunks/CbMvnQ1O.js +0 -1
  194. package/web/app/immutable/chunks/Cc2R8pz2.js +0 -1
  195. package/web/app/immutable/chunks/CckT345F.js +0 -1
  196. package/web/app/immutable/chunks/Ch6f6WdI.js +0 -1
  197. package/web/app/immutable/chunks/Cn4uSlRl.js +0 -1
  198. package/web/app/immutable/chunks/Cq181fzK.js +0 -1
  199. package/web/app/immutable/chunks/CsSwkVtG.js +0 -1
  200. package/web/app/immutable/chunks/D6HTpHv8.js +0 -1
  201. package/web/app/immutable/chunks/D6XYtHit.js +0 -1
  202. package/web/app/immutable/chunks/DZkRidEi.js +0 -1
  203. package/web/app/immutable/chunks/DbZW1-v_.js +0 -1
  204. package/web/app/immutable/chunks/DgZQ2BGb.js +0 -1
  205. package/web/app/immutable/chunks/Dgd792da.js +0 -1
  206. package/web/app/immutable/chunks/Di0efO8O.js +0 -1
  207. package/web/app/immutable/chunks/DpqAXGKG.js +0 -1
  208. package/web/app/immutable/chunks/DtTEznMa.js +0 -1
  209. package/web/app/immutable/chunks/DxFa1LF2.js +0 -1
  210. package/web/app/immutable/chunks/Nkei2qsP.js +0 -1
  211. package/web/app/immutable/chunks/V3BQ1JVB.js +0 -2
  212. package/web/app/immutable/chunks/g35usiE6.js +0 -1
  213. package/web/app/immutable/chunks/i6wj5gsf.js +0 -1
  214. package/web/app/immutable/chunks/lTy7LZ6T.js +0 -1
  215. package/web/app/immutable/chunks/qYMhD4I9.js +0 -19
  216. package/web/app/immutable/chunks/zxaYX3sa.js +0 -2
  217. package/web/app/immutable/entry/app.DYkCJ91A.js +0 -4
  218. package/web/app/immutable/entry/start.D-Nj7dg6.js +0 -1
  219. package/web/app/immutable/nodes/11.CXsVCwU5.js +0 -41
  220. package/web/app/immutable/nodes/15.B-QShExj.js +0 -3
  221. package/web/app/immutable/nodes/2.CxHJUQ0N.js +0 -13
  222. package/web/app/immutable/nodes/5.B2O8zZr6.js +0 -1
@@ -1,4 +1,4 @@
1
- import{g as Jt}from"./BVY6rM-6.js";import{g as Zt}from"./D3mO5vU_.js";import{s as $t}from"./DjG8KKys.js";import{b as C,a$ as e1,ay as Z,X as Ae,a1 as t1,aP as s1,bh as at,a_ as i1,aZ as r1,b0 as a1,V as n1,U as u1,Y as o1,z as l1,ax as c1,J as h1,aq as st,as as d1,$ as it,aW as rt,r as p1,a2 as f1,N as g1,am as b1,aU as k1,ab as A1,x as m1,aT as C1,p as S1}from"./VRkOAck5.js";import{c as D1}from"./BNAZ2Rt6.js";import{aR as T1}from"./C5PnDdXL.js";var E1="flowchart-",y1=["laneRole","laneIndex","drawnExtent"];function Wt(s){if(!s||typeof s!="object")return s;const i={...s};for(const a of y1)Reflect.deleteProperty(i,a);return i}C(Wt,"withoutInternalKeys");var Pe,x1=(Pe=class{constructor(){this.vertexCounter=0,this.config=Ae(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=i1,this.setAccDescription=r1,this.setDiagramTitle=a1,this.getAccTitle=n1,this.getAccDescription=u1,this.getDiagramTitle=o1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return l1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const a of this.vertices.values())if(a.id===i)return this.diagramId?`${this.diagramId}-${a.domId}`:a.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,a,n,r,l,g,o={},m){if(!i||i.trim().length===0)return;let d;if(m!==void 0){let f;m.includes(`
1
+ import{g as Jt}from"./rxpX-lzF.js";import{g as Zt}from"./Cr2m0lJA.js";import{s as $t}from"./GBgYT_ZX.js";import{b as C,a$ as e1,ay as Z,X as Ae,a1 as t1,aP as s1,bh as at,a_ as i1,aZ as r1,b0 as a1,V as n1,U as u1,Y as o1,z as l1,ax as c1,J as h1,aq as st,as as d1,$ as it,aW as rt,r as p1,a2 as f1,N as g1,am as b1,aU as k1,ab as A1,x as m1,aT as C1,p as S1}from"./1rUouahZ.js";import{c as D1}from"./DEM3rYWD.js";import{aR as T1}from"./DNLHkust.js";var E1="flowchart-",y1=["laneRole","laneIndex","drawnExtent"];function Wt(s){if(!s||typeof s!="object")return s;const i={...s};for(const a of y1)Reflect.deleteProperty(i,a);return i}C(Wt,"withoutInternalKeys");var Pe,x1=(Pe=class{constructor(){this.vertexCounter=0,this.config=Ae(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=i1,this.setAccDescription=r1,this.setDiagramTitle=a1,this.getAccTitle=n1,this.getAccDescription=u1,this.getDiagramTitle=o1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return l1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const a of this.vertices.values())if(a.id===i)return this.diagramId?`${this.diagramId}-${a.domId}`:a.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,a,n,r,l,g,o={},m){if(!i||i.trim().length===0)return;let d;if(m!==void 0){let f;m.includes(`
2
2
  `)?f=m+`
3
3
  `:f=`{
4
4
  `+m+`
@@ -1 +1 @@
1
- import{g as o,r as l,d as t}from"./PIV69RBI.js";import{p as m}from"./BaDKWIdd.js";import{b as n,ay as s}from"./VRkOAck5.js";import{M as p,d as u}from"./Dh4nEdmB.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),y=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),g={parse:n(e=>{t.clear(),s.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const i=r.value;s.debug("[Railroad Parser] Parsed rules:",i.rules.length),y(i),s.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},h={parser:g,db:t,renderer:l,styles:o};export{h as diagram};
1
+ import{g as o,r as l,d as t}from"./CQSI5ASZ.js";import{p as m}from"./CXOOFUlR.js";import{b as n,ay as s}from"./1rUouahZ.js";import{M as p,d as u}from"./Dh4nEdmB.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),y=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),g={parse:n(e=>{t.clear(),s.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const i=r.value;s.debug("[Railroad Parser] Parsed rules:",i.rules.length),y(i),s.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},h={parser:g,db:t,renderer:l,styles:o};export{h as diagram};
@@ -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"./VRkOAck5.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"./1rUouahZ.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 +1 @@
1
- import{g_ as O,gG as J,Jc as P,K0 as U,D6 as q,tP as K,uM as N,AC as V,AD as j,Ja as z,Jb as M,AE as Q}from"./R0MaWbXb.js";import{selectWorkspaceTabOrder as f,selectCurrentWorkspaceTabId as S,selectLastClosedWorkspaceTab as X}from"./JomiOJSD.js";import{i as Y,q as Z,b as ee,j as te,l as ae}from"./j0LslCAy.js";import{g as ne}from"./D_baEUtX.js";import{bm as l}from"./CP7YuMeh.js";import{z as oe,S as y}from"./BxW5KyMH.js";import{B as h,S as x,P as ce}from"./BzSCYrIF.js";import{aa as le,a8 as E}from"./DxCx5XQm.js";import{g as se}from"./CChKNWYM.js";function A(e,a){const n=f.select(e.state),o=S.select(e.state);if(!o)return null;const c=n.indexOf(o),s=c+(a==="left"?-1:1),p=n[s];return c<0||!p?null:(e.dispatch(K(o,p,a==="left"?"before":"after")),o)}function B(e){const a=S.select(e);return a&&f.select(e).includes(a)?a:null}function m(e,a,n){const o=B(e.state),c=o?`/workspace/${o}`:ne(e.state);return a!==c&&n(c),o}function ie(e,a,n,o){return e.dispatch(O(a)),m(e,n,o),a}function I(e,a){const o=a.match(/^\/workspace\/([^/]+)/)?.[1];return o?o==="new"?null:o:null}function R(e,a,n,o){if(n==="/")return D(e,a==="next"?0:"last",n,o);e.dispatch(a==="next"?z():M());const c=S.select(e.state);if(!c)return null;const s=`/workspace/${c}`;return n!==s&&o(s),c}function re(e,a,n){const o=I(e,a);return o?ie(e,o,a,n):null}function pe(e,a,n){const o=I(e,a);if(!o)return null;const c=Y.select(e.state,o);if(!c)return null;const s=c.tabs.find(v=>v.id===c.activeTabId),p=c.tabs.length===0&&c.activeTabId===null,g=Z.select(e.state,o)>1&&(p||c.tabs.length===1&&s!==void 0&&s.closable!==!1);if((!s||s.closable===!1)&&!g)return null;const T=n??se(o)?.availableCanvasWidth??void 0;return e.dispatch(J(o,void 0,T)),s?.id??c.id}function ue(e,a){const n=e.state.panelLayout.byWorkspaceId[a];return!n||n.restoreStatus==="pending"?!1:ee.select(e.state,a).length===0}function de(e,a,n){B(e.state)||e.dispatch(P(0)),m(e,a,n)}function L(e,a,{navigate:n,closeWindow:o}){return o?(o(),"window"):(m(e,a,n),null)}function be(e,a,n){const o=I(e,a);return o?pe(e,a,n.availableCanvasWidth)!==null?"panel":ue(e,o)?(e.dispatch(O(o)),f.select(e.state).length>0?(de(e,a,n.navigate),"workspace"):L(e,a,n)??"workspace"):null:f.select(e.state).length>0?null:L(e,a,n)}function fe(e,a,n){return e.dispatch(Q()),m(e,a,n)}function ke(e,a,n){const o=a.match(/^\/workspace\/([^/]+)/),c=o&&o[1]!=="new"?o[1]:null,s=X.select(e.state),p=c?ae.select(e.state,c):null;return c&&p&&(!s||p.closedAt>=s.closedAt)?p.kind==="column"?(e.dispatch(V(c)),"column"):(e.dispatch(j(c)),p.kind):s?(fe(e,a,n),"workspace"):null}function _e(e,a){const n=a.match(/^\/workspace\/([^/]+)/),o=n&&n[1]!=="new"?n[1]:null;if(!o)return null;const c=N(o);return e.dispatch(c),te.select(e.state,o)}function D(e,a,n,o){const c=f.select(e.state),s=a==="last"?c.length-1:a;return s<0||s>=c.length?null:(e.dispatch(P(s)),m(e,n,o))}function We({isMac:e,register:a,store:n,getCurrentPath:o,navigate:c,openNewWorkspace:s,getRailMachineIds:p,onCreateAgent:g,onCreateNote:T,onCreateTerminal:v,onCreateBrowser:G,onWorkspaceTabMoved:W,closeWindow:F,resolveBinding:w}){const r=e?{meta:!0}:{ctrl:!0},$=oe("TOGGLE_SIDEBAR",e),k=t=>()=>t(o()),H=t=>()=>{const i=o().match(/^\/workspace\/([^/]+)/);i?.[1]&&i[1]!=="new"&&t(i[1])},u=t=>w?{binding:()=>w(t)}:{},_=t=>w?.(t)??ce(t);a({...u("global.new-space"),...r,key:"n",global:!0,description:l.workspace_shortcuts_newSpace_description(),action:s}),a({...u("panel.toggle-sidebar"),...$,global:!0,description:y.TOGGLE_SIDEBAR.label,action:()=>n.dispatch(U())}),a({...u("navigation.new-tab"),...r,key:"t",global:!0,description:l.workspace_shortcuts_newPanel_description(),action:k(t=>_e(n,t))});for(const[t,i,b,d]of[["workspace.new-agent","a",l.ui_shortcuts_newAgent_label(),g],["workspace.new-note","n",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_note_label()}),T],["workspace.new-terminal","t",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_terminal_label()}),v],["workspace.new-browser","b",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_browser_label()}),G]])d&&a({...u(t),...r,key:i,alt:!0,global:!0,allowInTerminal:!0,description:b,action:H(d)});a({...u("navigation.close-tab"),...r,key:"w",global:!0,description:l.workspace_shortcuts_closePanelTab_description(),action:k(t=>be(n,t,{navigate:c,closeWindow:F}))}),a({...u("navigation.close-space-tab"),...r,key:"w",shift:!0,global:!0,description:l.workspace_shortcuts_closeSpaceTab_description(),action:k(t=>re(n,t,c))}),a({...u("navigation.reopen-tab"),...r,key:"t",shift:!0,global:!0,description:l.workspace_shortcuts_reopenClosedTabOrSpace_description(),action:k(t=>ke(n,t,c))}),a({...u("navigation.move-space-tab-left"),...r,key:"ArrowLeft",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_LEFT.label,action:()=>{const t=A(n,"left");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}}),a({...u("navigation.move-space-tab-right"),...r,key:"ArrowRight",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_RIGHT.label,action:()=>{const t=A(n,"right");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}});for(const[t,i]of[["next",!1],["previous",!0]]){a({...u(t==="next"?"global.next-space":"global.previous-space"),key:"Tab",ctrl:!0,shift:i,global:!0,description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))});const b=t==="next"?"global.next-space-alt":"global.previous-space-alt";a({...u(b),...r,key:t==="next"?"}":"{",shift:!0,global:!0,allowInTerminal:!0,preferLocal:!0,enabled:d=>!w||!h(b,d,w,e),description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))})}const C=t=>{t===1?c("/"):D(n,t===9?"last":t-2,o(),c)};for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>_("navigation.go-to-device").replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>E.select(n.state)&&!h("navigation.go-to-device",i,_,e),description:l.machineRail_nav_ariaLabel(),action:()=>{const i=p?.()??le.select(n.state).map(d=>d.id),b=i[t===9?i.length-1:t-1];b&&n.dispatch(q(b))}});for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>x["navigation.go-to-device"].replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>!E.select(n.state)&&_("navigation.go-to-tab")===x["navigation.go-to-tab"]&&!h("navigation.go-to-device",i,_,e),description:l.ui_shortcuts_goToTab_label(),action:()=>C(t)});for(let t=1;t<=9;t++)a({binding:()=>_("navigation.go-to-tab").replace(/([1-8])-9$/,String(t)),...r,alt:!0,key:String(t),global:!0,allowInTerminal:!0,enabled:i=>!h("navigation.go-to-tab",i,_,e),description:t===1?l.home_navigation_description():t===9?l.workspace_shortcuts_selectLastSpaceTab_description():l.workspace_shortcuts_selectSpaceTab_description({digit:t}),action:()=>C(t)})}export{be as c,We as r};
1
+ import{g_ as O,gG as J,Jc as P,K0 as U,D6 as q,tP as K,uM as N,AC as V,AD as j,Ja as z,Jb as M,AE as Q}from"./R0MaWbXb.js";import{selectWorkspaceTabOrder as f,selectCurrentWorkspaceTabId as S,selectLastClosedWorkspaceTab as X}from"./JomiOJSD.js";import{i as Y,q as Z,b as ee,j as te,l as ae}from"./j0LslCAy.js";import{g as ne}from"./CDvfrZi7.js";import{bm as l}from"./CP7YuMeh.js";import{z as oe,S as y}from"./BxW5KyMH.js";import{B as h,S as x,P as ce}from"./BzSCYrIF.js";import{aa as le,a8 as E}from"./Diytskg0.js";import{g as se}from"./CChKNWYM.js";function A(e,a){const n=f.select(e.state),o=S.select(e.state);if(!o)return null;const c=n.indexOf(o),s=c+(a==="left"?-1:1),p=n[s];return c<0||!p?null:(e.dispatch(K(o,p,a==="left"?"before":"after")),o)}function B(e){const a=S.select(e);return a&&f.select(e).includes(a)?a:null}function m(e,a,n){const o=B(e.state),c=o?`/workspace/${o}`:ne(e.state);return a!==c&&n(c),o}function ie(e,a,n,o){return e.dispatch(O(a)),m(e,n,o),a}function I(e,a){const o=a.match(/^\/workspace\/([^/]+)/)?.[1];return o?o==="new"?null:o:null}function R(e,a,n,o){if(n==="/")return D(e,a==="next"?0:"last",n,o);e.dispatch(a==="next"?z():M());const c=S.select(e.state);if(!c)return null;const s=`/workspace/${c}`;return n!==s&&o(s),c}function re(e,a,n){const o=I(e,a);return o?ie(e,o,a,n):null}function pe(e,a,n){const o=I(e,a);if(!o)return null;const c=Y.select(e.state,o);if(!c)return null;const s=c.tabs.find(v=>v.id===c.activeTabId),p=c.tabs.length===0&&c.activeTabId===null,g=Z.select(e.state,o)>1&&(p||c.tabs.length===1&&s!==void 0&&s.closable!==!1);if((!s||s.closable===!1)&&!g)return null;const T=n??se(o)?.availableCanvasWidth??void 0;return e.dispatch(J(o,void 0,T)),s?.id??c.id}function ue(e,a){const n=e.state.panelLayout.byWorkspaceId[a];return!n||n.restoreStatus==="pending"?!1:ee.select(e.state,a).length===0}function de(e,a,n){B(e.state)||e.dispatch(P(0)),m(e,a,n)}function L(e,a,{navigate:n,closeWindow:o}){return o?(o(),"window"):(m(e,a,n),null)}function be(e,a,n){const o=I(e,a);return o?pe(e,a,n.availableCanvasWidth)!==null?"panel":ue(e,o)?(e.dispatch(O(o)),f.select(e.state).length>0?(de(e,a,n.navigate),"workspace"):L(e,a,n)??"workspace"):null:f.select(e.state).length>0?null:L(e,a,n)}function fe(e,a,n){return e.dispatch(Q()),m(e,a,n)}function ke(e,a,n){const o=a.match(/^\/workspace\/([^/]+)/),c=o&&o[1]!=="new"?o[1]:null,s=X.select(e.state),p=c?ae.select(e.state,c):null;return c&&p&&(!s||p.closedAt>=s.closedAt)?p.kind==="column"?(e.dispatch(V(c)),"column"):(e.dispatch(j(c)),p.kind):s?(fe(e,a,n),"workspace"):null}function _e(e,a){const n=a.match(/^\/workspace\/([^/]+)/),o=n&&n[1]!=="new"?n[1]:null;if(!o)return null;const c=N(o);return e.dispatch(c),te.select(e.state,o)}function D(e,a,n,o){const c=f.select(e.state),s=a==="last"?c.length-1:a;return s<0||s>=c.length?null:(e.dispatch(P(s)),m(e,n,o))}function We({isMac:e,register:a,store:n,getCurrentPath:o,navigate:c,openNewWorkspace:s,getRailMachineIds:p,onCreateAgent:g,onCreateNote:T,onCreateTerminal:v,onCreateBrowser:G,onWorkspaceTabMoved:W,closeWindow:F,resolveBinding:w}){const r=e?{meta:!0}:{ctrl:!0},$=oe("TOGGLE_SIDEBAR",e),k=t=>()=>t(o()),H=t=>()=>{const i=o().match(/^\/workspace\/([^/]+)/);i?.[1]&&i[1]!=="new"&&t(i[1])},u=t=>w?{binding:()=>w(t)}:{},_=t=>w?.(t)??ce(t);a({...u("global.new-space"),...r,key:"n",global:!0,description:l.workspace_shortcuts_newSpace_description(),action:s}),a({...u("panel.toggle-sidebar"),...$,global:!0,description:y.TOGGLE_SIDEBAR.label,action:()=>n.dispatch(U())}),a({...u("navigation.new-tab"),...r,key:"t",global:!0,description:l.workspace_shortcuts_newPanel_description(),action:k(t=>_e(n,t))});for(const[t,i,b,d]of[["workspace.new-agent","a",l.ui_shortcuts_newAgent_label(),g],["workspace.new-note","n",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_note_label()}),T],["workspace.new-terminal","t",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_terminal_label()}),v],["workspace.new-browser","b",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_browser_label()}),G]])d&&a({...u(t),...r,key:i,alt:!0,global:!0,allowInTerminal:!0,description:b,action:H(d)});a({...u("navigation.close-tab"),...r,key:"w",global:!0,description:l.workspace_shortcuts_closePanelTab_description(),action:k(t=>be(n,t,{navigate:c,closeWindow:F}))}),a({...u("navigation.close-space-tab"),...r,key:"w",shift:!0,global:!0,description:l.workspace_shortcuts_closeSpaceTab_description(),action:k(t=>re(n,t,c))}),a({...u("navigation.reopen-tab"),...r,key:"t",shift:!0,global:!0,description:l.workspace_shortcuts_reopenClosedTabOrSpace_description(),action:k(t=>ke(n,t,c))}),a({...u("navigation.move-space-tab-left"),...r,key:"ArrowLeft",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_LEFT.label,action:()=>{const t=A(n,"left");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}}),a({...u("navigation.move-space-tab-right"),...r,key:"ArrowRight",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_RIGHT.label,action:()=>{const t=A(n,"right");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}});for(const[t,i]of[["next",!1],["previous",!0]]){a({...u(t==="next"?"global.next-space":"global.previous-space"),key:"Tab",ctrl:!0,shift:i,global:!0,description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))});const b=t==="next"?"global.next-space-alt":"global.previous-space-alt";a({...u(b),...r,key:t==="next"?"}":"{",shift:!0,global:!0,allowInTerminal:!0,preferLocal:!0,enabled:d=>!w||!h(b,d,w,e),description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))})}const C=t=>{t===1?c("/"):D(n,t===9?"last":t-2,o(),c)};for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>_("navigation.go-to-device").replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>E.select(n.state)&&!h("navigation.go-to-device",i,_,e),description:l.machineRail_nav_ariaLabel(),action:()=>{const i=p?.()??le.select(n.state).map(d=>d.id),b=i[t===9?i.length-1:t-1];b&&n.dispatch(q(b))}});for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>x["navigation.go-to-device"].replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>!E.select(n.state)&&_("navigation.go-to-tab")===x["navigation.go-to-tab"]&&!h("navigation.go-to-device",i,_,e),description:l.ui_shortcuts_goToTab_label(),action:()=>C(t)});for(let t=1;t<=9;t++)a({binding:()=>_("navigation.go-to-tab").replace(/([1-8])-9$/,String(t)),...r,alt:!0,key:String(t),global:!0,allowInTerminal:!0,enabled:i=>!h("navigation.go-to-tab",i,_,e),description:t===1?l.home_navigation_description():t===9?l.workspace_shortcuts_selectLastSpaceTab_description():l.workspace_shortcuts_selectSpaceTab_description({digit:t}),action:()=>C(t)})}export{be as c,We as r};
@@ -1 +1 @@
1
- import{J as h}from"./C5PnDdXL.js";import{c as v}from"./ChTqQfQN.js";import{O as d}from"./BxW5KyMH.js";const g=v("AttachmentImageUrl");function y(t,n){const r=n.split("/").filter(e=>e.length>0).map(e=>encodeURIComponent(e)).join("/");return`workspace-file://${t}/${r}`}const u=new Map,a=new Map;let f=0,m=!1;function p(){m||(m=!0,d(()=>{f+=1,u.clear(),a.clear()}))}function A(t,n){u.delete(`${t}/${n}`)}function F(t,n,r){p();let e=!1,i=!1,o=!1;async function l(){if(!e){if(i){o=!0;return}i=!0;try{const c=await $(t,n);e||r(c)}finally{i=!1,o&&(o=!1,l())}}}const s=d(()=>{l()});return l(),{imageFailed(){e||(A(t,n),r(null))},dispose(){e=!0,s()}}}function $(t,n){p();const r=f,e=`${t}/${n}`,i=u.get(e);if(i)return Promise.resolve(i);const o=a.get(e);if(o)return o;const l=(async()=>{try{const s=await h({attachmentId:n,workspaceId:t});if(r!==f)return null;if(!s.exists)return g.warn("Attachment file missing on disk",{attachmentId:n}),null;const c=y(t,s.path);return u.set(e,c),c}catch(s){return g.warn("Failed to resolve attachment image",{attachmentId:n,error:s}),null}finally{r===f&&a.delete(e)}})();return a.set(e,l),l}export{A as e,F as o,$ as r};
1
+ import{J as h}from"./DNLHkust.js";import{c as v}from"./ChTqQfQN.js";import{O as d}from"./BxW5KyMH.js";const g=v("AttachmentImageUrl");function y(t,n){const r=n.split("/").filter(e=>e.length>0).map(e=>encodeURIComponent(e)).join("/");return`workspace-file://${t}/${r}`}const u=new Map,a=new Map;let f=0,m=!1;function p(){m||(m=!0,d(()=>{f+=1,u.clear(),a.clear()}))}function A(t,n){u.delete(`${t}/${n}`)}function F(t,n,r){p();let e=!1,i=!1,o=!1;async function l(){if(!e){if(i){o=!0;return}i=!0;try{const c=await $(t,n);e||r(c)}finally{i=!1,o&&(o=!1,l())}}}const s=d(()=>{l()});return l(),{imageFailed(){e||(A(t,n),r(null))},dispose(){e=!0,s()}}}function $(t,n){p();const r=f,e=`${t}/${n}`,i=u.get(e);if(i)return Promise.resolve(i);const o=a.get(e);if(o)return o;const l=(async()=>{try{const s=await h({attachmentId:n,workspaceId:t});if(r!==f)return null;if(!s.exists)return g.warn("Attachment file missing on disk",{attachmentId:n}),null;const c=y(t,s.path);return u.set(e,c),c}catch(s){return g.warn("Failed to resolve attachment image",{attachmentId:n,error:s}),null}finally{r===f&&a.delete(e)}})();return a.set(e,l),l}export{A as e,F as o,$ as r};
@@ -1,4 +1,4 @@
1
- import{g as ie}from"./D3mO5vU_.js";import{s as re}from"./DjG8KKys.js";import{b as p,ay as b,X as $,a1 as ae,aP as ne,bh as oe,V as le,a_ as ce,U as he,aZ as de,b0 as ue,Y as fe,T as pe,z as j,r as Se,aW as vt,am as ge,aU as ye,ab as me,aG as Te}from"./VRkOAck5.js";import{c as Ee}from"./BNAZ2Rt6.js";import{aR as _e}from"./C5PnDdXL.js";var At=(function(){var t=p(function(V,o,f,n){for(f=f||{},n=V.length;n--;f[V[n]]=o);return f},"o"),e=[1,2],s=[1,3],a=[1,4],r=[2,4],c=[1,9],h=[1,11],u=[1,16],l=[1,17],m=[1,18],y=[1,19],_=[1,33],L=[1,20],N=[1,21],D=[1,22],S=[1,23],w=[1,24],C=[1,26],F=[1,27],I=[1,28],P=[1,29],v=[1,30],z=[1,31],at=[1,32],nt=[1,35],ot=[1,36],lt=[1,37],ct=[1,38],K=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ht=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],It=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(function(o,f,n,T,E,i,B){var d=i.length-1;switch(E){case 3:return T.setRootDoc(i[d]),i[d];case 4:this.$=[];break;case 5:i[d]!="nl"&&(i[d-1].push(i[d]),this.$=i[d-1]);break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:const Q=i[d-1];Q.description=T.trimColon(i[d]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:const Tt=T.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:Tt};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var G=i[d],X=i[d-2].trim();if(i[d].match(":")){var ut=i[d].split(":");G=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:G,type:"default",description:X};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:T.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),T.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),T.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:T.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:T.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:T.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:T.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:_,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ht,[2,44],{58:[1,56]}),t(ht,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:_,57:K},t(g,[2,17]),t(It,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,72],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(ht,[2,46]),t(ht,[2,47]),t(g,[2,15]),t(g,[2,19]),t(It,r,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,81],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(function(o,f){if(f.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=f,n}},"parseError"),parse:p(function(o){var f=this,n=[0],T=[],E=[null],i=[],B=this.table,d="",G=0,X=0,ut=2,Q=1,Tt=i.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(W.yy[Et]=this.yy[Et]);k.setInput(o,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var _t=k.yylloc;i.push(_t);var ee=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(R){n.length=n.length-2*R,E.length=E.length-R,i.length=i.length-R}p(se,"popStack");function Rt(){var R;return R=T.pop()||k.lex()||Q,typeof R!="number"&&(R instanceof Array&&(T=R,R=T.pop()),R=f.symbols_[R]||R),R}p(Rt,"lex");for(var x,U,O,bt,J={},ft,Y,Nt,pt;;){if(U=n[n.length-1],this.defaultActions[U]?O=this.defaultActions[U]:((x===null||typeof x>"u")&&(x=Rt()),O=B[U]&&B[U][x]),typeof O>"u"||!O.length||!O[0]){var kt="";pt=[];for(ft in B[U])this.terminals_[ft]&&ft>ut&&pt.push("'"+this.terminals_[ft]+"'");k.showPosition?kt="Parse error on line "+(G+1)+`:
1
+ import{g as ie}from"./Cr2m0lJA.js";import{s as re}from"./GBgYT_ZX.js";import{b as p,ay as b,X as $,a1 as ae,aP as ne,bh as oe,V as le,a_ as ce,U as he,aZ as de,b0 as ue,Y as fe,T as pe,z as j,r as Se,aW as vt,am as ge,aU as ye,ab as me,aG as Te}from"./1rUouahZ.js";import{c as Ee}from"./DEM3rYWD.js";import{aR as _e}from"./DNLHkust.js";var At=(function(){var t=p(function(V,o,f,n){for(f=f||{},n=V.length;n--;f[V[n]]=o);return f},"o"),e=[1,2],s=[1,3],a=[1,4],r=[2,4],c=[1,9],h=[1,11],u=[1,16],l=[1,17],m=[1,18],y=[1,19],_=[1,33],L=[1,20],N=[1,21],D=[1,22],S=[1,23],w=[1,24],C=[1,26],F=[1,27],I=[1,28],P=[1,29],v=[1,30],z=[1,31],at=[1,32],nt=[1,35],ot=[1,36],lt=[1,37],ct=[1,38],K=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ht=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],It=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(function(o,f,n,T,E,i,B){var d=i.length-1;switch(E){case 3:return T.setRootDoc(i[d]),i[d];case 4:this.$=[];break;case 5:i[d]!="nl"&&(i[d-1].push(i[d]),this.$=i[d-1]);break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:const Q=i[d-1];Q.description=T.trimColon(i[d]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:const Tt=T.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:Tt};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var G=i[d],X=i[d-2].trim();if(i[d].match(":")){var ut=i[d].split(":");G=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:G,type:"default",description:X};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:T.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),T.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),T.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:T.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:T.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:T.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:T.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:_,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ht,[2,44],{58:[1,56]}),t(ht,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:_,57:K},t(g,[2,17]),t(It,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,72],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(ht,[2,46]),t(ht,[2,47]),t(g,[2,15]),t(g,[2,19]),t(It,r,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,81],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(function(o,f){if(f.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=f,n}},"parseError"),parse:p(function(o){var f=this,n=[0],T=[],E=[null],i=[],B=this.table,d="",G=0,X=0,ut=2,Q=1,Tt=i.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(W.yy[Et]=this.yy[Et]);k.setInput(o,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var _t=k.yylloc;i.push(_t);var ee=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(R){n.length=n.length-2*R,E.length=E.length-R,i.length=i.length-R}p(se,"popStack");function Rt(){var R;return R=T.pop()||k.lex()||Q,typeof R!="number"&&(R instanceof Array&&(T=R,R=T.pop()),R=f.symbols_[R]||R),R}p(Rt,"lex");for(var x,U,O,bt,J={},ft,Y,Nt,pt;;){if(U=n[n.length-1],this.defaultActions[U]?O=this.defaultActions[U]:((x===null||typeof x>"u")&&(x=Rt()),O=B[U]&&B[U][x]),typeof O>"u"||!O.length||!O[0]){var kt="";pt=[];for(ft in B[U])this.terminals_[ft]&&ft>ut&&pt.push("'"+this.terminals_[ft]+"'");k.showPosition?kt="Parse error on line "+(G+1)+`:
2
2
  `+k.showPosition()+`
3
3
  Expecting `+pt.join(", ")+", got '"+(this.terminals_[x]||x)+"'":kt="Parse error on line "+(G+1)+": Unexpected "+(x==Q?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(kt,{text:k.match,token:this.terminals_[x]||x,line:k.yylineno,loc:_t,expected:pt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+x);switch(O[0]){case 1:n.push(x),E.push(k.yytext),i.push(k.yylloc),n.push(O[1]),x=null,X=k.yyleng,d=k.yytext,G=k.yylineno,_t=k.yylloc;break;case 2:if(Y=this.productions_[O[1]][1],J.$=E[E.length-Y],J._$={first_line:i[i.length-(Y||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(Y||1)].first_column,last_column:i[i.length-1].last_column},ee&&(J._$.range=[i[i.length-(Y||1)].range[0],i[i.length-1].range[1]]),bt=this.performAction.apply(J,[d,X,G,W.yy,O[1],E,i].concat(Tt)),typeof bt<"u")return bt;Y&&(n=n.slice(0,-1*Y*2),E=E.slice(0,-1*Y),i=i.slice(0,-1*Y)),n.push(this.productions_[O[1]][0]),E.push(J.$),i.push(J._$),Nt=B[n[n.length-2]][n[n.length-1]],n.push(Nt);break;case 3:return!0}}return!0},"parse")},te=(function(){var V={EOF:1,parseError:p(function(f,n){if(this.yy.parser)this.yy.parser.parseError(f,n);else throw new Error(f)},"parseError"),setInput:p(function(o,f){return this.yy=f||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:p(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var f=o.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:p(function(o){var f=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var T=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===T.length?this.yylloc.first_column:0)+T[T.length-n.length].length-n[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(o){this.unput(this.match.slice(o))},"less"),pastInput:p(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var o=this.pastInput(),f=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{t as ke,bo as r,bm as u,bw as Be,b as Me}from"./CP7YuMeh.js";import{bs as We,ca as Ie,a5 as oe,bS as b,aD as s,bA as ce,b_ as ve,W as me,bn as Ne,c9 as d,aA as a,bl as Pe,bO as ze,aB as pe}from"./CJxGDkBm.js";import{i as Qe}from"./D-7NlBP9.js";import{c as E,e as y,s as Ae,f as K}from"./CPIQ_KTl.js";import{F as D,cs as Oe,az as Ve,aw as qe,d3 as Ue}from"./D-6tK-mW.js";import{f as de}from"./EHSwEMpb.js";import"./BxW5KyMH.js";import{I as Xe}from"./B79XDXv3.js";import"./Cgx7ahJR.js";var je=pe("<span> </span>"),Ge=pe('<div role="search"><div><!> <!> <!></div> <div><!> <!> <!></div></div>');function He(ge,t){if(new.target)return ke({component:He,...ge});We(t,!0);let i=r(t,"query",15,""),c=r(t,"inputRef",15,null),R=r(t,"placeholder",23,()=>u.ui_panelFindBar_find_placeholder()),g=r(t,"disabled",7,!1),x=r(t,"inputDisabled",7,!1),k=r(t,"navigationDisabled",7,!1),_=r(t,"closeDisabled",7,!1),B=r(t,"disableNavigationWhenNoMatches",7,!0),M=r(t,"autofocus",7,!1),W=r(t,"selectOnFocus",7,!0),I=r(t,"focusTrigger",7),N=r(t,"currentMatchIndex",7,0),o=r(t,"totalMatches",7),v=r(t,"resultText",7,void 0),P=r(t,"emptyResultText",23,()=>u.ui_panelFindBar_noMatches_label()),z=r(t,"showResultText",7,!0),Q=r(t,"showResultWhenQueryEmpty",7,!1),A=r(t,"resultFormat",7,"slash"),O=r(t,"resultVariant",7,void 0),m=r(t,"searchAriaLabel",23,()=>u.ui_panelFindBar_search_ariaLabel()),p=r(t,"previousLabel",23,()=>u.ui_panelFindBar_previous_label()),V=r(t,"previousShortcutLabel",7,"Shift+Enter"),q=r(t,"previousKeyShortcuts",7,"Shift+Enter"),U=r(t,"previousTitle",7,void 0),S=r(t,"nextLabel",23,()=>u.ui_panelFindBar_next_label()),X=r(t,"nextShortcutLabel",7,"Enter"),j=r(t,"nextKeyShortcuts",7,"Enter"),G=r(t,"nextTitle",7,void 0),L=r(t,"closeLabel",23,()=>u.ui_panelFindBar_close_label()),H=r(t,"closeShortcutLabel",7,"Esc"),J=r(t,"closeKeyShortcuts",7,"Escape"),Y=r(t,"closeTitle",7,void 0),Z=r(t,"layout",7,"floating"),$=r(t,"class",7),ee=r(t,"inputWrapperClass",7),te=r(t,"inputClass",7),re=r(t,"actionsClass",7),T=r(t,"onPrevious",7),F=r(t,"onNext",7),h=r(t,"onClose",7),ae=r(t,"onQueryChange",7),ne=r(t,"onInput",7),se=r(t,"onKeydown",7);const w=d(()=>i().trim().length>0),le=d(()=>g()||k()||!s(w)||B()&&typeof o()=="number"&&o()<=0),he=d(()=>{if(v()!==void 0)return v();if(!z()||!s(w)&&!Q()||typeof o()!="number")return null;if(o()<=0)return s(w)?P():null;const e=Math.min(Math.max(N()+1,1),o());return A()==="of"?u.ui_panelFindBar_matchOf_label({current:e,total:o()}):`${e} / ${o()}`}),Se=d(()=>O()??(typeof o()=="number"&&o()<=0&&s(w)?"destructive":"muted"));Ie(()=>{(M()||I()!==void 0)&&c()&&!g()&&!x()&&(c().focus(),W()&&c().select())});function Le(){c()?.focus()}function Te(){c()?.blur()}function Fe(){c()?.select()}function ue(e,n){return n?`${e} (${n})`:e}function we(e){i(e.currentTarget.value),ae()?.(i(),e),ne()?.(e)}function Ce(e){se()?.(e),!e.defaultPrevented&&(e.key==="Escape"&&h()&&!_()&&!g()?(e.preventDefault(),h()(e)):e.key==="Enter"&&!s(le)&&(e.preventDefault(),e.shiftKey?T()?.(i(),e):F()?.(i(),e)))}var Ee={focus:Le,blur:Te,select:Fe,get query(){return i()},set query(e=""){i(e),a()},get inputRef(){return c()},set inputRef(e=null){c(e),a()},get placeholder(){return R()},set placeholder(e=u.ui_panelFindBar_find_placeholder()){R(e),a()},get disabled(){return g()},set disabled(e=!1){g(e),a()},get inputDisabled(){return x()},set inputDisabled(e=!1){x(e),a()},get navigationDisabled(){return k()},set navigationDisabled(e=!1){k(e),a()},get closeDisabled(){return _()},set closeDisabled(e=!1){_(e),a()},get disableNavigationWhenNoMatches(){return B()},set disableNavigationWhenNoMatches(e=!0){B(e),a()},get autofocus(){return M()},set autofocus(e=!1){M(e),a()},get selectOnFocus(){return W()},set selectOnFocus(e=!0){W(e),a()},get focusTrigger(){return I()},set focusTrigger(e){I(e),a()},get currentMatchIndex(){return N()},set currentMatchIndex(e=0){N(e),a()},get totalMatches(){return o()},set totalMatches(e){o(e),a()},get resultText(){return v()},set resultText(e=void 0){v(e),a()},get emptyResultText(){return P()},set emptyResultText(e=u.ui_panelFindBar_noMatches_label()){P(e),a()},get showResultText(){return z()},set showResultText(e=!0){z(e),a()},get showResultWhenQueryEmpty(){return Q()},set showResultWhenQueryEmpty(e=!1){Q(e),a()},get resultFormat(){return A()},set resultFormat(e="slash"){A(e),a()},get resultVariant(){return O()},set resultVariant(e=void 0){O(e),a()},get searchAriaLabel(){return m()},set searchAriaLabel(e=u.ui_panelFindBar_search_ariaLabel()){m(e),a()},get previousLabel(){return p()},set previousLabel(e=u.ui_panelFindBar_previous_label()){p(e),a()},get previousShortcutLabel(){return V()},set previousShortcutLabel(e="Shift+Enter"){V(e),a()},get previousKeyShortcuts(){return q()},set previousKeyShortcuts(e="Shift+Enter"){q(e),a()},get previousTitle(){return U()},set previousTitle(e=void 0){U(e),a()},get nextLabel(){return S()},set nextLabel(e=u.ui_panelFindBar_next_label()){S(e),a()},get nextShortcutLabel(){return X()},set nextShortcutLabel(e="Enter"){X(e),a()},get nextKeyShortcuts(){return j()},set nextKeyShortcuts(e="Enter"){j(e),a()},get nextTitle(){return G()},set nextTitle(e=void 0){G(e),a()},get closeLabel(){return L()},set closeLabel(e=u.ui_panelFindBar_close_label()){L(e),a()},get closeShortcutLabel(){return H()},set closeShortcutLabel(e="Esc"){H(e),a()},get closeKeyShortcuts(){return J()},set closeKeyShortcuts(e="Escape"){J(e),a()},get closeTitle(){return Y()},set closeTitle(e=void 0){Y(e),a()},get layout(){return Z()},set layout(e="floating"){Z(e),a()},get class(){return $()},set class(e){$(e),a()},get inputWrapperClass(){return ee()},set inputWrapperClass(e){ee(e),a()},get inputClass(){return te()},set inputClass(e){te(e),a()},get actionsClass(){return re()},set actionsClass(e){re(e),a()},get onPrevious(){return T()},set onPrevious(e){T(e),a()},get onNext(){return F()},set onNext(e){F(e),a()},get onClose(){return h()},set onClose(e){h(e),a()},get onQueryChange(){return ae()},set onQueryChange(e){ae(e),a()},get onInput(){return ne()},set onInput(e){ne(e),a()},get onKeydown(){return se()},set onKeydown(e){se(e),a()},$set:Be,$on:(e,n)=>Me(t,e,n)},f=Ge(),C=oe(f),fe=oe(C);D(fe,{get icon(){return Oe},class:"size-3 shrink-0 text-muted-foreground"});var be=b(fe,2);{let e=d(()=>g()||x()),n=d(()=>y("h-6 w-36 border-0 bg-transparent px-0 py-0 text-sm shadow-none","placeholder:text-muted-foreground",te()));Xe(be,{type:"text",get placeholder(){return R()},get disabled(){return s(e)},noFocusStyle:!0,get class(){return s(n)},get"aria-label"(){return m()},oninput:we,onkeydown:Ce,get ref(){return c()},set ref(l){c(l)},get value(){return i()},set value(l){i(l)}})}var Ke=b(be,2);{var De=e=>{var n=je(),l=Pe(n,!0);ve(_e=>{K(n,1,_e),ze(l,s(he))},[()=>E(y("whitespace-nowrap text-xs tabular-nums",s(Se)==="destructive"?"text-danger":"text-muted-foreground"))]),me(e,n)};Qe(Ke,e=>{s(he)&&e(De)})}ce(C);var ie=b(C,2),ye=oe(ie);{let e=d(()=>U()??ue(p(),V()));de(ye,{type:"button",variant:"ghost-light",size:"icon-xs",class:"rounded-sm",onclick:n=>T()?.(i(),n),get disabled(){return s(le)},get"aria-label"(){return p()},get"aria-keyshortcuts"(){return q()},get title(){return s(e)},children:(n,l)=>{D(n,{get icon(){return Ve},class:"size-3"})},$$slots:{default:!0}})}var xe=b(ye,2);{let e=d(()=>G()??ue(S(),X()));de(xe,{type:"button",variant:"ghost-light",size:"icon-xs",class:"rounded-sm",onclick:n=>F()?.(i(),n),get disabled(){return s(le)},get"aria-label"(){return S()},get"aria-keyshortcuts"(){return j()},get title(){return s(e)},children:(n,l)=>{D(n,{get icon(){return qe},class:"size-3"})},$$slots:{default:!0}})}var Re=b(xe,2);{let e=d(()=>g()||_()),n=d(()=>Y()??ue(L(),H()));de(Re,{type:"button",variant:"ghost-light",size:"icon-xs",class:"rounded-sm",onclick:l=>h()?.(l),get disabled(){return s(e)},get"aria-label"(){return L()},get"aria-keyshortcuts"(){return J()},get title(){return s(n)},children:(l,_e)=>{D(l,{get icon(){return Ue},class:"size-3.5"})},$$slots:{default:!0}})}return ce(ie),ce(f),ve((e,n,l)=>{Ae(f,"aria-label",m()),K(f,1,e),K(C,1,n),K(ie,1,l)},[()=>E(y("inline-flex items-center gap-1 rounded-lg border border-border bg-background/95 px-2 py-1 shadow-lg backdrop-blur supports-[backdrop-filter]:bg-background/90",Z()==="floating"&&"absolute top-2 right-4 z-50",g()&&"pointer-events-none opacity-60",$())),()=>E(y("flex h-7 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/40 px-2",ee())),()=>E(y("flex items-center gap-0.5",re()))]),me(ge,f),Ne(Ee)}export{He as P};
1
+ import{t as ke,bo as r,bm as u,bw as Be,b as Me}from"./CP7YuMeh.js";import{bs as We,ca as Ie,a5 as oe,bS as b,aD as s,bA as ce,b_ as ve,W as me,bn as Ne,c9 as d,aA as a,bl as Pe,bO as ze,aB as pe}from"./CJxGDkBm.js";import{i as Qe}from"./D-7NlBP9.js";import{c as E,e as y,s as Ae,f as K}from"./CPIQ_KTl.js";import{F as D,cs as Oe,az as Ve,aw as qe,d3 as Ue}from"./D-6tK-mW.js";import{f as de}from"./EHSwEMpb.js";import"./BxW5KyMH.js";import{I as Xe}from"./Dnq0RttT.js";import"./Cgx7ahJR.js";var je=pe("<span> </span>"),Ge=pe('<div role="search"><div><!> <!> <!></div> <div><!> <!> <!></div></div>');function He(ge,t){if(new.target)return ke({component:He,...ge});We(t,!0);let i=r(t,"query",15,""),c=r(t,"inputRef",15,null),R=r(t,"placeholder",23,()=>u.ui_panelFindBar_find_placeholder()),g=r(t,"disabled",7,!1),x=r(t,"inputDisabled",7,!1),k=r(t,"navigationDisabled",7,!1),_=r(t,"closeDisabled",7,!1),B=r(t,"disableNavigationWhenNoMatches",7,!0),M=r(t,"autofocus",7,!1),W=r(t,"selectOnFocus",7,!0),I=r(t,"focusTrigger",7),N=r(t,"currentMatchIndex",7,0),o=r(t,"totalMatches",7),v=r(t,"resultText",7,void 0),P=r(t,"emptyResultText",23,()=>u.ui_panelFindBar_noMatches_label()),z=r(t,"showResultText",7,!0),Q=r(t,"showResultWhenQueryEmpty",7,!1),A=r(t,"resultFormat",7,"slash"),O=r(t,"resultVariant",7,void 0),m=r(t,"searchAriaLabel",23,()=>u.ui_panelFindBar_search_ariaLabel()),p=r(t,"previousLabel",23,()=>u.ui_panelFindBar_previous_label()),V=r(t,"previousShortcutLabel",7,"Shift+Enter"),q=r(t,"previousKeyShortcuts",7,"Shift+Enter"),U=r(t,"previousTitle",7,void 0),S=r(t,"nextLabel",23,()=>u.ui_panelFindBar_next_label()),X=r(t,"nextShortcutLabel",7,"Enter"),j=r(t,"nextKeyShortcuts",7,"Enter"),G=r(t,"nextTitle",7,void 0),L=r(t,"closeLabel",23,()=>u.ui_panelFindBar_close_label()),H=r(t,"closeShortcutLabel",7,"Esc"),J=r(t,"closeKeyShortcuts",7,"Escape"),Y=r(t,"closeTitle",7,void 0),Z=r(t,"layout",7,"floating"),$=r(t,"class",7),ee=r(t,"inputWrapperClass",7),te=r(t,"inputClass",7),re=r(t,"actionsClass",7),T=r(t,"onPrevious",7),F=r(t,"onNext",7),h=r(t,"onClose",7),ae=r(t,"onQueryChange",7),ne=r(t,"onInput",7),se=r(t,"onKeydown",7);const w=d(()=>i().trim().length>0),le=d(()=>g()||k()||!s(w)||B()&&typeof o()=="number"&&o()<=0),he=d(()=>{if(v()!==void 0)return v();if(!z()||!s(w)&&!Q()||typeof o()!="number")return null;if(o()<=0)return s(w)?P():null;const e=Math.min(Math.max(N()+1,1),o());return A()==="of"?u.ui_panelFindBar_matchOf_label({current:e,total:o()}):`${e} / ${o()}`}),Se=d(()=>O()??(typeof o()=="number"&&o()<=0&&s(w)?"destructive":"muted"));Ie(()=>{(M()||I()!==void 0)&&c()&&!g()&&!x()&&(c().focus(),W()&&c().select())});function Le(){c()?.focus()}function Te(){c()?.blur()}function Fe(){c()?.select()}function ue(e,n){return n?`${e} (${n})`:e}function we(e){i(e.currentTarget.value),ae()?.(i(),e),ne()?.(e)}function Ce(e){se()?.(e),!e.defaultPrevented&&(e.key==="Escape"&&h()&&!_()&&!g()?(e.preventDefault(),h()(e)):e.key==="Enter"&&!s(le)&&(e.preventDefault(),e.shiftKey?T()?.(i(),e):F()?.(i(),e)))}var Ee={focus:Le,blur:Te,select:Fe,get query(){return i()},set query(e=""){i(e),a()},get inputRef(){return c()},set inputRef(e=null){c(e),a()},get placeholder(){return R()},set placeholder(e=u.ui_panelFindBar_find_placeholder()){R(e),a()},get disabled(){return g()},set disabled(e=!1){g(e),a()},get inputDisabled(){return x()},set inputDisabled(e=!1){x(e),a()},get navigationDisabled(){return k()},set navigationDisabled(e=!1){k(e),a()},get closeDisabled(){return _()},set closeDisabled(e=!1){_(e),a()},get disableNavigationWhenNoMatches(){return B()},set disableNavigationWhenNoMatches(e=!0){B(e),a()},get autofocus(){return M()},set autofocus(e=!1){M(e),a()},get selectOnFocus(){return W()},set selectOnFocus(e=!0){W(e),a()},get focusTrigger(){return I()},set focusTrigger(e){I(e),a()},get currentMatchIndex(){return N()},set currentMatchIndex(e=0){N(e),a()},get totalMatches(){return o()},set totalMatches(e){o(e),a()},get resultText(){return v()},set resultText(e=void 0){v(e),a()},get emptyResultText(){return P()},set emptyResultText(e=u.ui_panelFindBar_noMatches_label()){P(e),a()},get showResultText(){return z()},set showResultText(e=!0){z(e),a()},get showResultWhenQueryEmpty(){return Q()},set showResultWhenQueryEmpty(e=!1){Q(e),a()},get resultFormat(){return A()},set resultFormat(e="slash"){A(e),a()},get resultVariant(){return O()},set resultVariant(e=void 0){O(e),a()},get searchAriaLabel(){return m()},set searchAriaLabel(e=u.ui_panelFindBar_search_ariaLabel()){m(e),a()},get previousLabel(){return p()},set previousLabel(e=u.ui_panelFindBar_previous_label()){p(e),a()},get previousShortcutLabel(){return V()},set previousShortcutLabel(e="Shift+Enter"){V(e),a()},get previousKeyShortcuts(){return q()},set previousKeyShortcuts(e="Shift+Enter"){q(e),a()},get previousTitle(){return U()},set previousTitle(e=void 0){U(e),a()},get nextLabel(){return S()},set nextLabel(e=u.ui_panelFindBar_next_label()){S(e),a()},get nextShortcutLabel(){return X()},set nextShortcutLabel(e="Enter"){X(e),a()},get nextKeyShortcuts(){return j()},set nextKeyShortcuts(e="Enter"){j(e),a()},get nextTitle(){return G()},set nextTitle(e=void 0){G(e),a()},get closeLabel(){return L()},set closeLabel(e=u.ui_panelFindBar_close_label()){L(e),a()},get closeShortcutLabel(){return H()},set closeShortcutLabel(e="Esc"){H(e),a()},get closeKeyShortcuts(){return J()},set closeKeyShortcuts(e="Escape"){J(e),a()},get closeTitle(){return Y()},set closeTitle(e=void 0){Y(e),a()},get layout(){return Z()},set layout(e="floating"){Z(e),a()},get class(){return $()},set class(e){$(e),a()},get inputWrapperClass(){return ee()},set inputWrapperClass(e){ee(e),a()},get inputClass(){return te()},set inputClass(e){te(e),a()},get actionsClass(){return re()},set actionsClass(e){re(e),a()},get onPrevious(){return T()},set onPrevious(e){T(e),a()},get onNext(){return F()},set onNext(e){F(e),a()},get onClose(){return h()},set onClose(e){h(e),a()},get onQueryChange(){return ae()},set onQueryChange(e){ae(e),a()},get onInput(){return ne()},set onInput(e){ne(e),a()},get onKeydown(){return se()},set onKeydown(e){se(e),a()},$set:Be,$on:(e,n)=>Me(t,e,n)},f=Ge(),C=oe(f),fe=oe(C);D(fe,{get icon(){return Oe},class:"size-3 shrink-0 text-muted-foreground"});var be=b(fe,2);{let e=d(()=>g()||x()),n=d(()=>y("h-6 w-36 border-0 bg-transparent px-0 py-0 text-sm shadow-none","placeholder:text-muted-foreground",te()));Xe(be,{type:"text",get placeholder(){return R()},get disabled(){return s(e)},noFocusStyle:!0,get class(){return s(n)},get"aria-label"(){return m()},oninput:we,onkeydown:Ce,get ref(){return c()},set ref(l){c(l)},get value(){return i()},set value(l){i(l)}})}var Ke=b(be,2);{var De=e=>{var n=je(),l=Pe(n,!0);ve(_e=>{K(n,1,_e),ze(l,s(he))},[()=>E(y("whitespace-nowrap text-xs tabular-nums",s(Se)==="destructive"?"text-danger":"text-muted-foreground"))]),me(e,n)};Qe(Ke,e=>{s(he)&&e(De)})}ce(C);var ie=b(C,2),ye=oe(ie);{let e=d(()=>U()??ue(p(),V()));de(ye,{type:"button",variant:"ghost-light",size:"icon-xs",class:"rounded-sm",onclick:n=>T()?.(i(),n),get disabled(){return s(le)},get"aria-label"(){return p()},get"aria-keyshortcuts"(){return q()},get title(){return s(e)},children:(n,l)=>{D(n,{get icon(){return Ve},class:"size-3"})},$$slots:{default:!0}})}var xe=b(ye,2);{let e=d(()=>G()??ue(S(),X()));de(xe,{type:"button",variant:"ghost-light",size:"icon-xs",class:"rounded-sm",onclick:n=>F()?.(i(),n),get disabled(){return s(le)},get"aria-label"(){return S()},get"aria-keyshortcuts"(){return j()},get title(){return s(e)},children:(n,l)=>{D(n,{get icon(){return qe},class:"size-3"})},$$slots:{default:!0}})}var Re=b(xe,2);{let e=d(()=>g()||_()),n=d(()=>Y()??ue(L(),H()));de(Re,{type:"button",variant:"ghost-light",size:"icon-xs",class:"rounded-sm",onclick:l=>h()?.(l),get disabled(){return s(e)},get"aria-label"(){return L()},get"aria-keyshortcuts"(){return J()},get title(){return s(n)},children:(l,_e)=>{D(l,{get icon(){return Ue},class:"size-3.5"})},$$slots:{default:!0}})}return ce(ie),ce(f),ve((e,n,l)=>{Ae(f,"aria-label",m()),K(f,1,e),K(C,1,n),K(ie,1,l)},[()=>E(y("inline-flex items-center gap-1 rounded-lg border border-border bg-background/95 px-2 py-1 shadow-lg backdrop-blur supports-[backdrop-filter]:bg-background/90",Z()==="floating"&&"absolute top-2 right-4 z-50",g()&&"pointer-events-none opacity-60",$())),()=>E(y("flex h-7 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/40 px-2",ee())),()=>E(y("flex items-center gap-0.5",re()))]),me(ge,f),Ne(Ee)}export{He as P};
@@ -1 +1 @@
1
- import{t as kt,bo as i,bw as Mt,bp as Pt,b as Et}from"./CP7YuMeh.js";import{ai as Tt,bs as Vt,c5 as It,aD as t,ca as Oe,bj as Ct,a5 as ie,bS as V,bA as oe,b_ as H,aw as le,aj as O,W as A,bn as Nt,bV as I,c9 as M,bH as c,aA as o,bl as Xe,bO as Ze,a7 as At,ay as zt,aB as R,c0 as Dt}from"./CJxGDkBm.js";import{i as X}from"./D-7NlBP9.js";import{g as Ht}from"./D37abooi.js";import{S as je,n as Je,l as Ft,c as qt}from"./DtPBfWzI.js";import{b as Rt,e as F,c as Z,s as P,f as j,g as q,r as Bt,p as Wt}from"./CPIQ_KTl.js";import{a as Kt}from"./Cc2R8pz2.js";import{b as Ie}from"./NtFyWdpR.js";var Lt=new Set(["$$slots","$$events","$$legacy","ref","value","min","max","step","steps","showSteps","showValue","valuePosition","appearance","disabled","onInteractionStart","onValueChange","oninput","onkeydown","onfocus","onblur","formatValue","class","aria-label","aria-invalid","aria-valuetext","data-slot"]),Ut=R('<input type="number" class="slider-value-input w-full min-w-0 rounded-(--shape-input-radius) border-b border-border bg-transparent text-foreground outline-none [text-align:inherit] svelte-2rnmeq"/>'),Gt=R('<button type="button" class="w-full min-w-0 cursor-text select-none rounded-(--shape-input-radius) text-inherit whitespace-nowrap [text-align:inherit]"> </button>'),Ot=R('<span data-slot="slider-value" class="inline-grid shrink-0 text-[13px] leading-none text-muted-foreground tabular-nums"><!></span>'),Xt=R('<output data-slot="slider-tooltip" class="pointer-events-none absolute top-[-20px] z-30 -translate-x-1/2 whitespace-nowrap rounded-(--shape-input-radius) surface-inverse px-2 py-1 text-xs tabular-nums" aria-hidden="true"> </output>'),Zt=R('<span aria-hidden="true" data-slot="slider-pip" class="pointer-events-none absolute top-1/2 z-10 size-1 -translate-x-1/2 -translate-y-1/2 rounded-full bg-muted-foreground/30"></span>'),jt=R('<div data-slot="slider-root"><!> <div class="relative min-w-0 flex-1 overflow-visible"><input/> <div data-slot="slider-track" role="presentation" class="slider-hit-area relative h-9 w-full cursor-ew-resize overflow-visible svelte-2rnmeq"><!> <span aria-hidden="true" data-slot="slider-track-background"></span> <span aria-hidden="true" data-slot="slider-fill"></span> <span aria-hidden="true" data-slot="slider-preview"></span> <!> <span aria-hidden="true" data-slot="slider-thumb"></span></div></div> <!></div>');function Jt(Ce,r){if(new.target)return kt({component:Jt,...Ce});Vt(r,!0);const Ne=e=>{var n=Ot();let a;var d=ie(n);{var f=m=>{var l=Ut();Bt(l),Ie(l,N=>c(ne,N),()=>t(ne)),H(()=>{P(l,"min",t(u)),P(l,"max",t(x)),P(l,"step",t(s)?"any":t(y)),P(l,"aria-label",ee())}),le("blur",l,He),O("keydown",l,ht),Kt(l,()=>t(ae),N=>c(ae,N)),A(m,l)},v=m=>{var l=Gt(),N=Xe(l,!0);H(St=>{l.disabled=_(),Ze(N,St)},[()=>D()(p())]),O("click",l,vt),A(m,l)};X(d,m=>{t(W)?m(f):m(v,-1)})}oe(n),H(()=>a=q(n,"",a,{"font-variation-settings":"'wght' 500",width:`${t($e)}ch`,"align-self":h()==="top"||h()==="bottom"?"center":void 0,"text-align":h()==="left"||h()==="right"?"right":"center"})),A(e,n)},g=20,Ae=16,J=(g-18)/2;let b=i(r,"ref",15,null),p=i(r,"value",15,0),ue=i(r,"min",7,0),de=i(r,"max",7,100),ce=i(r,"step",7,1),Q=i(r,"steps",7),pe=i(r,"showSteps",7,!1),Y=i(r,"showValue",7,!1),h=i(r,"valuePosition",7,"right"),z=i(r,"appearance",7,"default"),_=i(r,"disabled",7,!1),fe=i(r,"onInteractionStart",7),ve=i(r,"onValueChange",7),me=i(r,"oninput",7),he=i(r,"onkeydown",7),ge=i(r,"onfocus",7),be=i(r,"onblur",7),D=i(r,"formatValue",7,String),$=i(r,"class",7),ee=i(r,"aria-label",7),B=i(r,"aria-invalid",7),we=i(r,"aria-valuetext",7),xe=i(r,"data-slot",7,"slider"),Qe=Pt(r,Lt),te,ne=I(void 0),S=I(!1),ye=I(!1),_e=I(!1),W=I(!1),ae=I(""),w=I(null),Se=I(!1),C=null;const s=M(()=>{if(!Q()?.length)return null;const e=[...new Set(Q().filter(Number.isFinite))].sort((n,a)=>n-a);return e.length?e:null}),u=M(()=>t(s)?.[0]??Number(ue())),x=M(()=>t(s)?.[t(s).length-1]??Number(de())),y=M(()=>Math.max(Number(ce())||1,Number.EPSILON)),ke=M(()=>B()===!0||B()==="true"),Ye=M(()=>we()??D()(p())),$e=M(()=>{const e=t(s)??[t(u),t(x),E(t(u)+t(y)),E(t(x)-t(y))],n=d=>{const[f,v="0"]=String(d).split("e");return Math.max(0,(f.split(".")[1]?.length??0)-Number(v))},a=Math.min(12,Math.max(n(t(u)),n(t(y))));return e.reduce((d,f)=>{const v=String(f),m=D()(f),l=t(s)?v.length:f.toFixed(a).length;return Math.max(d,m.length,l+Math.max(0,m.length-v.length))},1)}),K=M(()=>G(p())),L=M(()=>t(w)===null?null:G(t(w))),U=new je(It(()=>t(K)),"moderate"),Me=new je(Ae,"fast");function et(e){return t(s)?t(s).reduce((n,a)=>Math.abs(a-e)<Math.abs(n-e)?a:n):e}function E(e){const n=Math.max(t(u),Math.min(t(x),e));if(t(s))return et(n);const a=t(u)+Math.round((n-t(u))/t(y))*t(y);return Number(Math.max(t(u),Math.min(t(x),a)).toFixed(12))}function G(e){return t(x)===t(u)?0:Math.max(0,Math.min(1,(e-t(u))/(t(x)-t(u))))}function re(e){return`calc(${e*100}% + ${g/2-e*g}px)`}function tt(e){return`calc(${e*100}% - ${e*g}px)`}function nt(e){return`calc(${e*100}% + ${g/2-J-e*g}px)`}function at(){return t(L)===null?"0px":t(w)===t(u)?`${J}px`:re(Math.min(t(K),t(L)))}function rt(){if(t(L)===null)return"0px";const e=re(t(K));if(t(w)===t(u))return`calc(${e} - ${J}px)`;if(t(w)===t(x))return`calc(100% - ${e} - ${J}px)`;const n=Math.abs(t(L)-t(K));return`calc(${n*100}% - ${n*g}px)`}function ze(e){const n=te.getBoundingClientRect(),a=te.offsetWidth||n.width;if(a<=g||n.width<=0)return t(u);const d=n.width/a,f=(e-n.left)/d,v=Math.max(0,Math.min(1,(f-g/2)/(a-g)));return E(t(u)+v*(t(x)-t(u)))}function st(e){const n=E(e);return n===p()?!1:(p(n),ve()?.(n),!0)}function se(e){if(!b())return;const n=b();n.value=String(e),n.dispatchEvent(new Event("input",{bubbles:!0}))}function it(e){const n=E(e.currentTarget.valueAsNumber);e.currentTarget.value=String(n),st(n),me()?.(e)}function ot(e){c(_e,e.currentTarget.matches(":focus-visible"),!0),ge()?.(e)}function lt(e){c(_e,!1),be()?.(e)}function ut(e){if(he()?.(e),e.defaultPrevented||_())return;const n=t(s)?.indexOf(E(p()))??-1;let a;switch(e.key){case"ArrowRight":case"ArrowUp":a=t(s)?t(s)[Math.min(t(s).length-1,n+1)]:p()+t(y);break;case"ArrowLeft":case"ArrowDown":a=t(s)?t(s)[Math.max(0,n-1)]:p()-t(y);break;case"Home":a=t(u);break;case"End":a=t(x);break;case"PageUp":a=t(s)?t(s)[Math.min(t(s).length-1,n+10)]:p()+t(y)*10;break;case"PageDown":a=t(s)?t(s)[Math.max(0,n-10)]:p()-t(y)*10;break}if(a===void 0)return;e.preventDefault();const d=E(a);d!==p()&&(se(d),e.currentTarget.dispatchEvent(new Event("change",{bubbles:!0})))}function dt(e){if(_()||e.pointerType==="mouse"&&e.button!==0)return;fe()?.(),e.preventDefault(),c(S,!0);const n=ze(e.clientX);se(n),U.set(G(n)),b()?.focus(),e.currentTarget instanceof Element&&"setPointerCapture"in e.currentTarget&&e.currentTarget.setPointerCapture(e.pointerId)}function ct(e){const n=ze(e.clientX);if(!t(S)){c(w,n,!0);return}se(n),U.set(G(n),{instant:!0})}function De(){t(S)&&(c(S,!1),c(w,null),b()&&b().dispatchEvent(new Event("change",{bubbles:!0})))}function pt(){_()||(c(ye,!0),C&&clearTimeout(C),C=setTimeout(()=>c(Se,!0),100))}function ft(){c(ye,!1),c(Se,!1),c(w,null),C&&clearTimeout(C)}async function vt(){_()||h()==="tooltip"||(c(ae,String(p()),!0),c(W,!0),await Dt(),t(ne)?.focus(),t(ne)?.select())}function He(){if(!t(W))return;const e=Number.parseFloat(t(ae));if(c(W,!1),!Number.isFinite(e))return;const n=E(e);se(n),b()&&b().dispatchEvent(new Event("change",{bubbles:!0}))}function mt(){c(W,!1)}function ht(e){e.key==="Enter"?(e.preventDefault(),He()):e.key==="Escape"&&(e.preventDefault(),mt())}Oe(()=>{t(S)||U.set(t(K))}),Oe(()=>{Me.set(t(ye)||t(S)?g:Ae)}),Ct(()=>{C&&clearTimeout(C)});var gt={get ref(){return b()},set ref(e=null){b(e),o()},get value(){return p()},set value(e=0){p(e),o()},get min(){return ue()},set min(e=0){ue(e),o()},get max(){return de()},set max(e=100){de(e),o()},get step(){return ce()},set step(e=1){ce(e),o()},get steps(){return Q()},set steps(e){Q(e),o()},get showSteps(){return pe()},set showSteps(e=!1){pe(e),o()},get showValue(){return Y()},set showValue(e=!1){Y(e),o()},get valuePosition(){return h()},set valuePosition(e="right"){h(e),o()},get appearance(){return z()},set appearance(e="default"){z(e),o()},get disabled(){return _()},set disabled(e=!1){_(e),o()},get onInteractionStart(){return fe()},set onInteractionStart(e){fe(e),o()},get onValueChange(){return ve()},set onValueChange(e){ve(e),o()},get oninput(){return me()},set oninput(e){me(e),o()},get onkeydown(){return he()},set onkeydown(e){he(e),o()},get onfocus(){return ge()},set onfocus(e){ge(e),o()},get onblur(){return be()},set onblur(e){be(e),o()},get formatValue(){return D()},set formatValue(e=String){D(e),o()},get class(){return $()},set class(e){$(e),o()},get"aria-label"(){return ee()},set"aria-label"(e){ee(e),o()},get"aria-invalid"(){return B()},set"aria-invalid"(e){B(e),o()},get"aria-valuetext"(){return we()},set"aria-valuetext"(e){we(e),o()},get"data-slot"(){return xe()},set"data-slot"(e="slider"){xe(e),o()},$set:Mt,$on:(e,n)=>Et(r,e,n)},T=jt(),Fe=ie(T);{var bt=e=>{Ne(e)};X(Fe,e=>{Y()&&(h()==="left"||h()==="top")&&e(bt)})}var Pe=V(Fe,2),Ee=ie(Pe);Rt(Ee,e=>({...Qe,type:"range",min:t(u),max:t(x),step:t(s)?"any":t(y),value:p(),disabled:_(),"aria-label":ee(),"aria-invalid":B(),"aria-valuenow":p(),"aria-valuetext":t(Ye),"data-slot":xe(),class:e,oninput:it,onkeydown:ut,onfocus:ot,onblur:lt}),[()=>F("peer pointer-events-none absolute inset-0 z-20 h-9 w-full cursor-ew-resize opacity-0 outline-none","aria-invalid:accent-danger aria-invalid:ring-1 aria-invalid:ring-danger/25",$())],void 0,void 0,"svelte-2rnmeq",!0),Ie(Ee,e=>b(e),()=>b());var k=V(Ee,2),qe=ie(k);{var wt=e=>{var n=Xt();let a;var d=Xe(n,!0);H((f,v)=>{P(n,"hidden",t(S)),a=q(n,"",a,{left:f,"font-variation-settings":"'wght' 500"}),Ze(d,v)},[()=>re(t(L)??0),()=>D()(t(w))]),Je(1,n,()=>Ft,()=>({tier:"fast",y:4,scale:.98})),Je(2,n,()=>qt,()=>({tier:"fast",y:4,scale:.98})),A(e,n)};X(qe,e=>{t(w)!==null&&t(Se)&&e(wt)})}var Re=V(qe,2),Te=V(Re,2);let Be;var Ve=V(Te,2);let We,Ke;var Le=V(Ve,2);{var xt=e=>{var n=At(),a=zt(n);Ht(a,16,()=>t(s),d=>d,(d,f)=>{var v=Zt();let m;H(l=>m=q(v,"",m,{left:l}),[()=>re(G(f))]),A(d,v)}),A(e,n)};X(Le,e=>{pe()&&t(s)&&e(xt)})}var Ue=V(Le,2);let Ge;oe(k),Ie(k,e=>te=e,()=>te),oe(Pe);var yt=V(Pe,2);{var _t=e=>{Ne(e)};X(yt,e=>{Y()&&(h()==="right"||h()==="bottom")&&e(_t)})}return oe(T),H((e,n,a,d,f,v,m,l,N)=>{P(T,"data-disabled",_()||void 0),P(T,"data-invalid",t(ke)||void 0),P(T,"data-pressed",t(S)||void 0),P(T,"data-appearance",z()),j(T,1,e,"svelte-2rnmeq"),j(Re,1,n,"svelte-2rnmeq"),j(Te,1,a,"svelte-2rnmeq"),Be=q(Te,"",Be,{width:d}),We=j(Ve,1,f,"svelte-2rnmeq",We,{"opacity-0":t(w)===null||t(S)}),Ke=q(Ve,"",Ke,{left:v,width:m}),j(Ue,1,l,"svelte-2rnmeq"),Ge=q(Ue,"",Ge,{left:N,width:`${Me.current}px`,height:`${Me.current}px`})},[()=>Z(F("flex w-full min-w-24 select-none touch-none overflow-visible",h()==="left"||h()==="right"?"flex-row items-center gap-2":"flex-col gap-1",_()&&"pointer-events-none opacity-50",$())),()=>Z(F("absolute inset-x-px top-[9px] h-[18px] overflow-hidden rounded-full border bg-transparent",z()==="overlay"?"border-transparent":"border-border")),()=>Z(F("absolute top-[9px] left-px h-[18px] rounded-full",z()==="overlay"?"bg-transparent":t(ke)?"bg-danger/30 dark:bg-danger/35":"bg-selected/50 dark:bg-accent/40")),()=>nt(U.current),()=>Z(F("pointer-events-none absolute top-[9px] h-[18px] rounded-full transition-opacity duration-spring-fast ease-spring-fast motion-reduce:transition-none",z()==="overlay"?"bg-transparent":"bg-accent/40")),()=>at(),()=>rt(),()=>Z(F("pointer-events-none absolute top-1/2 z-20 -translate-y-1/2 rounded-full border border-border bg-background shadow-(--elevation-raised)",t(_e)&&"outline outline-1 outline-focus-ring outline-offset-2 shadow-none",t(ke)&&"border-danger")),()=>tt(U.current)]),le("pointerenter",k,pt),le("pointerleave",k,ft),O("pointerdown",k,dt),O("pointermove",k,ct),O("pointerup",k,De),le("pointercancel",k,De),A(Ce,T),Nt(gt)}Tt(["keydown","click","pointerdown","pointermove","pointerup"]);const Qt=[{id:"slider-state-matrix",title:"Slider interaction states",states:["default","disabled","invalid","keyboard-focus","arrow-keys","home-end","hover-preview","hover-tooltip","drag-tooltip-hidden","synchronous-drag","spring-settle","inline-value-edit","discrete-steps","step-pips","semantic-track","semantic-thumb","transparent-overlay-track","compact","light","dark","reduced-motion","zoom-200","no-overflow","capture-hover-drag-200ms"],themes:["light","dark"],viewport:"both",reducedMotion:!0}];Wt({id:"slider",source:"src/lib/components/ui/slider/slider.svelte",publicImport:"$lib/components/ui/slider",legacyImports:[],exports:["Slider","sliderMetadata"],category:"primitive",owner:"008-B",callers:["src/features/hud/components/HudHeader.svelte","src/lib/component-catalog/ChatPolishGeometryControls.svelte","src/lib/component-catalog/renderers/FieldPreviewCell.svelte","src/lib/component-catalog/renderers/SettingsCatalogPreview.svelte","src/lib/components/settings/AgentBackendSettings.svelte","src/lib/components/settings/NotificationSettings.svelte","src/lib/components/ui/ZoomPanViewport.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/slider/slider.test.ts",removalGate:"Retain while native range, pointer, keyboard, discrete step, and editing tests pass.",dynamicImports:[],fixtures:Qt});export{Jt as S};
1
+ import{t as kt,bo as i,bw as Mt,bp as Pt,b as Et}from"./CP7YuMeh.js";import{ai as Tt,bs as Vt,c5 as It,aD as t,ca as Oe,bj as Ct,a5 as ie,bS as V,bA as oe,b_ as H,aw as le,aj as O,W as A,bn as Nt,bV as I,c9 as M,bH as c,aA as o,bl as Xe,bO as Ze,a7 as At,ay as zt,aB as R,c0 as Dt}from"./CJxGDkBm.js";import{i as X}from"./D-7NlBP9.js";import{g as Ht}from"./D37abooi.js";import{S as je,n as Je,l as Ft,c as qt}from"./DtPBfWzI.js";import{b as Rt,e as F,c as Z,s as P,f as j,g as q,r as Bt,p as Wt}from"./CPIQ_KTl.js";import{e as Kt}from"./Dnq0RttT.js";import{b as Ie}from"./NtFyWdpR.js";var Lt=new Set(["$$slots","$$events","$$legacy","ref","value","min","max","step","steps","showSteps","showValue","valuePosition","appearance","disabled","onInteractionStart","onValueChange","oninput","onkeydown","onfocus","onblur","formatValue","class","aria-label","aria-invalid","aria-valuetext","data-slot"]),Ut=R('<input type="number" class="slider-value-input w-full min-w-0 rounded-(--shape-input-radius) border-b border-border bg-transparent text-foreground outline-none [text-align:inherit] svelte-2rnmeq"/>'),Gt=R('<button type="button" class="w-full min-w-0 cursor-text select-none rounded-(--shape-input-radius) text-inherit whitespace-nowrap [text-align:inherit]"> </button>'),Ot=R('<span data-slot="slider-value" class="inline-grid shrink-0 text-[13px] leading-none text-muted-foreground tabular-nums"><!></span>'),Xt=R('<output data-slot="slider-tooltip" class="pointer-events-none absolute top-[-20px] z-30 -translate-x-1/2 whitespace-nowrap rounded-(--shape-input-radius) surface-inverse px-2 py-1 text-xs tabular-nums" aria-hidden="true"> </output>'),Zt=R('<span aria-hidden="true" data-slot="slider-pip" class="pointer-events-none absolute top-1/2 z-10 size-1 -translate-x-1/2 -translate-y-1/2 rounded-full bg-muted-foreground/30"></span>'),jt=R('<div data-slot="slider-root"><!> <div class="relative min-w-0 flex-1 overflow-visible"><input/> <div data-slot="slider-track" role="presentation" class="slider-hit-area relative h-9 w-full cursor-ew-resize overflow-visible svelte-2rnmeq"><!> <span aria-hidden="true" data-slot="slider-track-background"></span> <span aria-hidden="true" data-slot="slider-fill"></span> <span aria-hidden="true" data-slot="slider-preview"></span> <!> <span aria-hidden="true" data-slot="slider-thumb"></span></div></div> <!></div>');function Jt(Ce,r){if(new.target)return kt({component:Jt,...Ce});Vt(r,!0);const Ne=e=>{var n=Ot();let a;var d=ie(n);{var f=m=>{var l=Ut();Bt(l),Ie(l,N=>c(ne,N),()=>t(ne)),H(()=>{P(l,"min",t(u)),P(l,"max",t(x)),P(l,"step",t(s)?"any":t(y)),P(l,"aria-label",ee())}),le("blur",l,He),O("keydown",l,ht),Kt(l,()=>t(ae),N=>c(ae,N)),A(m,l)},v=m=>{var l=Gt(),N=Xe(l,!0);H(St=>{l.disabled=_(),Ze(N,St)},[()=>D()(p())]),O("click",l,vt),A(m,l)};X(d,m=>{t(W)?m(f):m(v,-1)})}oe(n),H(()=>a=q(n,"",a,{"font-variation-settings":"'wght' 500",width:`${t($e)}ch`,"align-self":h()==="top"||h()==="bottom"?"center":void 0,"text-align":h()==="left"||h()==="right"?"right":"center"})),A(e,n)},g=20,Ae=16,J=(g-18)/2;let b=i(r,"ref",15,null),p=i(r,"value",15,0),ue=i(r,"min",7,0),de=i(r,"max",7,100),ce=i(r,"step",7,1),Q=i(r,"steps",7),pe=i(r,"showSteps",7,!1),Y=i(r,"showValue",7,!1),h=i(r,"valuePosition",7,"right"),z=i(r,"appearance",7,"default"),_=i(r,"disabled",7,!1),fe=i(r,"onInteractionStart",7),ve=i(r,"onValueChange",7),me=i(r,"oninput",7),he=i(r,"onkeydown",7),ge=i(r,"onfocus",7),be=i(r,"onblur",7),D=i(r,"formatValue",7,String),$=i(r,"class",7),ee=i(r,"aria-label",7),B=i(r,"aria-invalid",7),we=i(r,"aria-valuetext",7),xe=i(r,"data-slot",7,"slider"),Qe=Pt(r,Lt),te,ne=I(void 0),S=I(!1),ye=I(!1),_e=I(!1),W=I(!1),ae=I(""),w=I(null),Se=I(!1),C=null;const s=M(()=>{if(!Q()?.length)return null;const e=[...new Set(Q().filter(Number.isFinite))].sort((n,a)=>n-a);return e.length?e:null}),u=M(()=>t(s)?.[0]??Number(ue())),x=M(()=>t(s)?.[t(s).length-1]??Number(de())),y=M(()=>Math.max(Number(ce())||1,Number.EPSILON)),ke=M(()=>B()===!0||B()==="true"),Ye=M(()=>we()??D()(p())),$e=M(()=>{const e=t(s)??[t(u),t(x),E(t(u)+t(y)),E(t(x)-t(y))],n=d=>{const[f,v="0"]=String(d).split("e");return Math.max(0,(f.split(".")[1]?.length??0)-Number(v))},a=Math.min(12,Math.max(n(t(u)),n(t(y))));return e.reduce((d,f)=>{const v=String(f),m=D()(f),l=t(s)?v.length:f.toFixed(a).length;return Math.max(d,m.length,l+Math.max(0,m.length-v.length))},1)}),K=M(()=>G(p())),L=M(()=>t(w)===null?null:G(t(w))),U=new je(It(()=>t(K)),"moderate"),Me=new je(Ae,"fast");function et(e){return t(s)?t(s).reduce((n,a)=>Math.abs(a-e)<Math.abs(n-e)?a:n):e}function E(e){const n=Math.max(t(u),Math.min(t(x),e));if(t(s))return et(n);const a=t(u)+Math.round((n-t(u))/t(y))*t(y);return Number(Math.max(t(u),Math.min(t(x),a)).toFixed(12))}function G(e){return t(x)===t(u)?0:Math.max(0,Math.min(1,(e-t(u))/(t(x)-t(u))))}function re(e){return`calc(${e*100}% + ${g/2-e*g}px)`}function tt(e){return`calc(${e*100}% - ${e*g}px)`}function nt(e){return`calc(${e*100}% + ${g/2-J-e*g}px)`}function at(){return t(L)===null?"0px":t(w)===t(u)?`${J}px`:re(Math.min(t(K),t(L)))}function rt(){if(t(L)===null)return"0px";const e=re(t(K));if(t(w)===t(u))return`calc(${e} - ${J}px)`;if(t(w)===t(x))return`calc(100% - ${e} - ${J}px)`;const n=Math.abs(t(L)-t(K));return`calc(${n*100}% - ${n*g}px)`}function ze(e){const n=te.getBoundingClientRect(),a=te.offsetWidth||n.width;if(a<=g||n.width<=0)return t(u);const d=n.width/a,f=(e-n.left)/d,v=Math.max(0,Math.min(1,(f-g/2)/(a-g)));return E(t(u)+v*(t(x)-t(u)))}function st(e){const n=E(e);return n===p()?!1:(p(n),ve()?.(n),!0)}function se(e){if(!b())return;const n=b();n.value=String(e),n.dispatchEvent(new Event("input",{bubbles:!0}))}function it(e){const n=E(e.currentTarget.valueAsNumber);e.currentTarget.value=String(n),st(n),me()?.(e)}function ot(e){c(_e,e.currentTarget.matches(":focus-visible"),!0),ge()?.(e)}function lt(e){c(_e,!1),be()?.(e)}function ut(e){if(he()?.(e),e.defaultPrevented||_())return;const n=t(s)?.indexOf(E(p()))??-1;let a;switch(e.key){case"ArrowRight":case"ArrowUp":a=t(s)?t(s)[Math.min(t(s).length-1,n+1)]:p()+t(y);break;case"ArrowLeft":case"ArrowDown":a=t(s)?t(s)[Math.max(0,n-1)]:p()-t(y);break;case"Home":a=t(u);break;case"End":a=t(x);break;case"PageUp":a=t(s)?t(s)[Math.min(t(s).length-1,n+10)]:p()+t(y)*10;break;case"PageDown":a=t(s)?t(s)[Math.max(0,n-10)]:p()-t(y)*10;break}if(a===void 0)return;e.preventDefault();const d=E(a);d!==p()&&(se(d),e.currentTarget.dispatchEvent(new Event("change",{bubbles:!0})))}function dt(e){if(_()||e.pointerType==="mouse"&&e.button!==0)return;fe()?.(),e.preventDefault(),c(S,!0);const n=ze(e.clientX);se(n),U.set(G(n)),b()?.focus(),e.currentTarget instanceof Element&&"setPointerCapture"in e.currentTarget&&e.currentTarget.setPointerCapture(e.pointerId)}function ct(e){const n=ze(e.clientX);if(!t(S)){c(w,n,!0);return}se(n),U.set(G(n),{instant:!0})}function De(){t(S)&&(c(S,!1),c(w,null),b()&&b().dispatchEvent(new Event("change",{bubbles:!0})))}function pt(){_()||(c(ye,!0),C&&clearTimeout(C),C=setTimeout(()=>c(Se,!0),100))}function ft(){c(ye,!1),c(Se,!1),c(w,null),C&&clearTimeout(C)}async function vt(){_()||h()==="tooltip"||(c(ae,String(p()),!0),c(W,!0),await Dt(),t(ne)?.focus(),t(ne)?.select())}function He(){if(!t(W))return;const e=Number.parseFloat(t(ae));if(c(W,!1),!Number.isFinite(e))return;const n=E(e);se(n),b()&&b().dispatchEvent(new Event("change",{bubbles:!0}))}function mt(){c(W,!1)}function ht(e){e.key==="Enter"?(e.preventDefault(),He()):e.key==="Escape"&&(e.preventDefault(),mt())}Oe(()=>{t(S)||U.set(t(K))}),Oe(()=>{Me.set(t(ye)||t(S)?g:Ae)}),Ct(()=>{C&&clearTimeout(C)});var gt={get ref(){return b()},set ref(e=null){b(e),o()},get value(){return p()},set value(e=0){p(e),o()},get min(){return ue()},set min(e=0){ue(e),o()},get max(){return de()},set max(e=100){de(e),o()},get step(){return ce()},set step(e=1){ce(e),o()},get steps(){return Q()},set steps(e){Q(e),o()},get showSteps(){return pe()},set showSteps(e=!1){pe(e),o()},get showValue(){return Y()},set showValue(e=!1){Y(e),o()},get valuePosition(){return h()},set valuePosition(e="right"){h(e),o()},get appearance(){return z()},set appearance(e="default"){z(e),o()},get disabled(){return _()},set disabled(e=!1){_(e),o()},get onInteractionStart(){return fe()},set onInteractionStart(e){fe(e),o()},get onValueChange(){return ve()},set onValueChange(e){ve(e),o()},get oninput(){return me()},set oninput(e){me(e),o()},get onkeydown(){return he()},set onkeydown(e){he(e),o()},get onfocus(){return ge()},set onfocus(e){ge(e),o()},get onblur(){return be()},set onblur(e){be(e),o()},get formatValue(){return D()},set formatValue(e=String){D(e),o()},get class(){return $()},set class(e){$(e),o()},get"aria-label"(){return ee()},set"aria-label"(e){ee(e),o()},get"aria-invalid"(){return B()},set"aria-invalid"(e){B(e),o()},get"aria-valuetext"(){return we()},set"aria-valuetext"(e){we(e),o()},get"data-slot"(){return xe()},set"data-slot"(e="slider"){xe(e),o()},$set:Mt,$on:(e,n)=>Et(r,e,n)},T=jt(),Fe=ie(T);{var bt=e=>{Ne(e)};X(Fe,e=>{Y()&&(h()==="left"||h()==="top")&&e(bt)})}var Pe=V(Fe,2),Ee=ie(Pe);Rt(Ee,e=>({...Qe,type:"range",min:t(u),max:t(x),step:t(s)?"any":t(y),value:p(),disabled:_(),"aria-label":ee(),"aria-invalid":B(),"aria-valuenow":p(),"aria-valuetext":t(Ye),"data-slot":xe(),class:e,oninput:it,onkeydown:ut,onfocus:ot,onblur:lt}),[()=>F("peer pointer-events-none absolute inset-0 z-20 h-9 w-full cursor-ew-resize opacity-0 outline-none","aria-invalid:accent-danger aria-invalid:ring-1 aria-invalid:ring-danger/25",$())],void 0,void 0,"svelte-2rnmeq",!0),Ie(Ee,e=>b(e),()=>b());var k=V(Ee,2),qe=ie(k);{var wt=e=>{var n=Xt();let a;var d=Xe(n,!0);H((f,v)=>{P(n,"hidden",t(S)),a=q(n,"",a,{left:f,"font-variation-settings":"'wght' 500"}),Ze(d,v)},[()=>re(t(L)??0),()=>D()(t(w))]),Je(1,n,()=>Ft,()=>({tier:"fast",y:4,scale:.98})),Je(2,n,()=>qt,()=>({tier:"fast",y:4,scale:.98})),A(e,n)};X(qe,e=>{t(w)!==null&&t(Se)&&e(wt)})}var Re=V(qe,2),Te=V(Re,2);let Be;var Ve=V(Te,2);let We,Ke;var Le=V(Ve,2);{var xt=e=>{var n=At(),a=zt(n);Ht(a,16,()=>t(s),d=>d,(d,f)=>{var v=Zt();let m;H(l=>m=q(v,"",m,{left:l}),[()=>re(G(f))]),A(d,v)}),A(e,n)};X(Le,e=>{pe()&&t(s)&&e(xt)})}var Ue=V(Le,2);let Ge;oe(k),Ie(k,e=>te=e,()=>te),oe(Pe);var yt=V(Pe,2);{var _t=e=>{Ne(e)};X(yt,e=>{Y()&&(h()==="right"||h()==="bottom")&&e(_t)})}return oe(T),H((e,n,a,d,f,v,m,l,N)=>{P(T,"data-disabled",_()||void 0),P(T,"data-invalid",t(ke)||void 0),P(T,"data-pressed",t(S)||void 0),P(T,"data-appearance",z()),j(T,1,e,"svelte-2rnmeq"),j(Re,1,n,"svelte-2rnmeq"),j(Te,1,a,"svelte-2rnmeq"),Be=q(Te,"",Be,{width:d}),We=j(Ve,1,f,"svelte-2rnmeq",We,{"opacity-0":t(w)===null||t(S)}),Ke=q(Ve,"",Ke,{left:v,width:m}),j(Ue,1,l,"svelte-2rnmeq"),Ge=q(Ue,"",Ge,{left:N,width:`${Me.current}px`,height:`${Me.current}px`})},[()=>Z(F("flex w-full min-w-24 select-none touch-none overflow-visible",h()==="left"||h()==="right"?"flex-row items-center gap-2":"flex-col gap-1",_()&&"pointer-events-none opacity-50",$())),()=>Z(F("absolute inset-x-px top-[9px] h-[18px] overflow-hidden rounded-full border bg-transparent",z()==="overlay"?"border-transparent":"border-border")),()=>Z(F("absolute top-[9px] left-px h-[18px] rounded-full",z()==="overlay"?"bg-transparent":t(ke)?"bg-danger/30 dark:bg-danger/35":"bg-selected/50 dark:bg-accent/40")),()=>nt(U.current),()=>Z(F("pointer-events-none absolute top-[9px] h-[18px] rounded-full transition-opacity duration-spring-fast ease-spring-fast motion-reduce:transition-none",z()==="overlay"?"bg-transparent":"bg-accent/40")),()=>at(),()=>rt(),()=>Z(F("pointer-events-none absolute top-1/2 z-20 -translate-y-1/2 rounded-full border border-border bg-background shadow-(--elevation-raised)",t(_e)&&"outline outline-1 outline-focus-ring outline-offset-2 shadow-none",t(ke)&&"border-danger")),()=>tt(U.current)]),le("pointerenter",k,pt),le("pointerleave",k,ft),O("pointerdown",k,dt),O("pointermove",k,ct),O("pointerup",k,De),le("pointercancel",k,De),A(Ce,T),Nt(gt)}Tt(["keydown","click","pointerdown","pointermove","pointerup"]);const Qt=[{id:"slider-state-matrix",title:"Slider interaction states",states:["default","disabled","invalid","keyboard-focus","arrow-keys","home-end","hover-preview","hover-tooltip","drag-tooltip-hidden","synchronous-drag","spring-settle","inline-value-edit","discrete-steps","step-pips","semantic-track","semantic-thumb","transparent-overlay-track","compact","light","dark","reduced-motion","zoom-200","no-overflow","capture-hover-drag-200ms"],themes:["light","dark"],viewport:"both",reducedMotion:!0}];Wt({id:"slider",source:"src/lib/components/ui/slider/slider.svelte",publicImport:"$lib/components/ui/slider",legacyImports:[],exports:["Slider","sliderMetadata"],category:"primitive",owner:"008-B",callers:["src/features/hud/components/HudHeader.svelte","src/lib/component-catalog/ChatPolishGeometryControls.svelte","src/lib/component-catalog/renderers/FieldPreviewCell.svelte","src/lib/component-catalog/renderers/SettingsCatalogPreview.svelte","src/lib/components/settings/AgentBackendSettings.svelte","src/lib/components/settings/NotificationSettings.svelte","src/lib/components/ui/ZoomPanViewport.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/slider/slider.test.ts",removalGate:"Retain while native range, pointer, keyboard, discrete step, and editing tests pass.",dynamicImports:[],fixtures:Qt});export{Jt as S};
@@ -1,4 +1,4 @@
1
- import{g as k1}from"./BVY6rM-6.js";import{g as E1}from"./D3mO5vU_.js";import{s as C1}from"./DjG8KKys.js";import{b as k,a$ as t1,ay as oe,X as Ce,a1 as S1,aP as x1,bh as Gt,a_ as T1,aZ as D1,b0 as _1,V as v1,U as F1,Y as V1,z as I1,ax as s1,J as i1,as as L1,$ as Rt,aW as Ot,r as B1,N as M1,am as y1,aU as w1,ab as N1,x as R1,aT as O1,p as P1}from"./VRkOAck5.js";import{c as G1}from"./BNAZ2Rt6.js";import{aR as U1}from"./C5PnDdXL.js";var tt={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},j1=new Set([tt.SHAPE_UNSUPPORTED,tt.SHAPE_REMOVED,tt.CONTAINMENT_VIOLATION]);new Set(Object.values(tt).filter(s=>!j1.has(s)));var z1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["lean_right","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),W1=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),K1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),$e="roundedRect";function et(s){return s&&(z1.get(s)??s)}k(et,"resolveShapeAlias");function r1(s,i){for(const n of s)if(!n.isGroup){if((!n.shape||n.shape==="squareRect"||n.shape==="rect")&&(n.shape=$e),W1.has(n.shape)){const r=`shape "${n.shape}" was removed in v0.8.1, using "${$e}"`;i?.emitError?i.emitError("SHAPE_REMOVED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e;continue}if(!K1.has(n.shape)){const r=`shape "${n.shape}" is not supported, using "${$e}"`;i?.emitWarning?i.emitWarning("SHAPE_UNSUPPORTED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e}}}k(r1,"normaliseNodeShapes");var Lt=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),a1=Lt.size,o1=k(s=>`af-kind-${s}`,"kindClass"),H1=[...Lt.keys()],u1=k(s=>Math.max(1,s-a1),"containerSlotCount"),l1=k((s,i)=>{const n=a1+s%u1(i);return i>0?n%i:n},"containerSlot");function c1(s,i,n){const r=Ce().themeVariables?.borderColorArray,u=Array.isArray(r)?r.length:0;let l=n.size;for(const c of s??[]){if(c.isGroup||c.shape==="collapsedGroup"){const h=n.get(String(c.id))??l++;c.colorIndex=l1(h,u);continue}const a=i(String(c.id));a&&Lt.has(a)&&(c.cssClasses=`${c.cssClasses??""} ${o1(a)}`.replace(/\s+/g," ").trim())}}k(c1,"assignColorSlots");var n1="agentflow-",Pt=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),Y1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),q1={flow:"flowGroup"};function It(s){if(Array.isArray(s))return s.map(n=>It(n));if(s===null||typeof s!="object")return s;const i={};for(const n of Object.keys(s))n==="__proto__"||n==="constructor"||n==="prototype"||(i[n]=It(s[n]));return i}k(It,"stripPrototypeKeys");function d1(s){let i=!1,n=!1,r=0,u;const l=[];for(const c of s.split(`
1
+ import{g as k1}from"./rxpX-lzF.js";import{g as E1}from"./Cr2m0lJA.js";import{s as C1}from"./GBgYT_ZX.js";import{b as k,a$ as t1,ay as oe,X as Ce,a1 as S1,aP as x1,bh as Gt,a_ as T1,aZ as D1,b0 as _1,V as v1,U as F1,Y as V1,z as I1,ax as s1,J as i1,as as L1,$ as Rt,aW as Ot,r as B1,N as M1,am as y1,aU as w1,ab as N1,x as R1,aT as O1,p as P1}from"./1rUouahZ.js";import{c as G1}from"./DEM3rYWD.js";import{aR as U1}from"./DNLHkust.js";var tt={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},j1=new Set([tt.SHAPE_UNSUPPORTED,tt.SHAPE_REMOVED,tt.CONTAINMENT_VIOLATION]);new Set(Object.values(tt).filter(s=>!j1.has(s)));var z1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["lean_right","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),W1=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),K1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),$e="roundedRect";function et(s){return s&&(z1.get(s)??s)}k(et,"resolveShapeAlias");function r1(s,i){for(const n of s)if(!n.isGroup){if((!n.shape||n.shape==="squareRect"||n.shape==="rect")&&(n.shape=$e),W1.has(n.shape)){const r=`shape "${n.shape}" was removed in v0.8.1, using "${$e}"`;i?.emitError?i.emitError("SHAPE_REMOVED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e;continue}if(!K1.has(n.shape)){const r=`shape "${n.shape}" is not supported, using "${$e}"`;i?.emitWarning?i.emitWarning("SHAPE_UNSUPPORTED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e}}}k(r1,"normaliseNodeShapes");var Lt=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),a1=Lt.size,o1=k(s=>`af-kind-${s}`,"kindClass"),H1=[...Lt.keys()],u1=k(s=>Math.max(1,s-a1),"containerSlotCount"),l1=k((s,i)=>{const n=a1+s%u1(i);return i>0?n%i:n},"containerSlot");function c1(s,i,n){const r=Ce().themeVariables?.borderColorArray,u=Array.isArray(r)?r.length:0;let l=n.size;for(const c of s??[]){if(c.isGroup||c.shape==="collapsedGroup"){const h=n.get(String(c.id))??l++;c.colorIndex=l1(h,u);continue}const a=i(String(c.id));a&&Lt.has(a)&&(c.cssClasses=`${c.cssClasses??""} ${o1(a)}`.replace(/\s+/g," ").trim())}}k(c1,"assignColorSlots");var n1="agentflow-",Pt=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),Y1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),q1={flow:"flowGroup"};function It(s){if(Array.isArray(s))return s.map(n=>It(n));if(s===null||typeof s!="object")return s;const i={};for(const n of Object.keys(s))n==="__proto__"||n==="constructor"||n==="prototype"||(i[n]=It(s[n]));return i}k(It,"stripPrototypeKeys");function d1(s){let i=!1,n=!1,r=0,u;const l=[];for(const c of s.split(`
2
2
  `)){if(u!==void 0){const p=c.length-c.trimStart().length;if(c.trim()===""||p>u){l.push(c);continue}u=void 0}let a=-1;for(let p=0;p<c.length;p++){const A=c[p];if(n)A==="\\"?p++:A==='"'&&(n=!1);else if(i)A==="'"&&(i=!1);else if(A==='"')n=!0;else if(A==="'")i=!0;else if(A==="#"&&(p===0||c[p-1]===" "||c[p-1]===" ")){a=p;break}else A==="["||A==="{"?r++:(A==="]"||A==="}")&&(r=Math.max(0,r-1))}if(i||n||r>0){l.push(c);continue}const h=a>=0?c.slice(0,a):c,g=a>=0?c.slice(a):"";if(/:\s*[>|][\d+-]*\s*$/.test(h)){u=c.length-c.trimStart().length,l.push(c);continue}l.push(h.replace(/,([\t ]*)$/,"$1")+g)}return l.join(`
3
3
  `)}k(d1,"stripLineTrailingCommas");var Ze,X1=(Ze=class{constructor(){this.vertexCounter=0,this.config=Ce(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId="",this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=T1,this.setAccDescription=D1,this.setDiagramTitle=_1,this.getAccTitle=v1,this.getAccDescription=F1,this.getDiagramTitle=V1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return I1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const n of this.vertices.values())if(n.id===i)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,n,r,u,l,c,a={},h,g){if(!i||i.trim().length===0)return;let p;if(h!==void 0){let m;h.includes(`
4
4
  `)?m=h+`
@@ -1,4 +1,4 @@
1
- import{p as tt}from"./BaDKWIdd.js";import{U as et,aZ as at,V as rt,a_ as it,Y as nt,b0 as ot,b as l,ay as E,X as st,q as lt,aX as ct,aH as dt,d as I,B as gt,r as ht,aJ as pt,O as ft}from"./VRkOAck5.js";import{p as ut}from"./Dh4nEdmB.js";import{o as mt}from"./CqBptZ8X.js";var vt=ft.pie,R={sections:new Map,showData:!1},b=R.sections,H=R.showData,St=structuredClone(vt),xt=l(()=>structuredClone(St),"getConfig"),wt=l(()=>{b=new Map,H=R.showData,ht()},"clear"),$t=l(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);b.has(t)||(b.set(t,a),E.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),Ct=l(()=>b,"getSections"),yt=l(t=>{H=t},"setShowData"),Dt=l(()=>H,"getShowData"),U={getConfig:xt,clear:wt,setDiagramTitle:ot,getDiagramTitle:nt,setAccTitle:it,getAccTitle:rt,setAccDescription:at,getAccDescription:et,addSection:$t,getSections:Ct,setShowData:yt,getShowData:Dt},bt=l((t,a)=>{tt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),Tt={parse:l(async t=>{const a=await ut("pie",t);E.debug(a),bt(a,U)},"parse")},At=l(t=>`
1
+ import{p as tt}from"./CXOOFUlR.js";import{U as et,aZ as at,V as rt,a_ as it,Y as nt,b0 as ot,b as l,ay as E,X as st,q as lt,aX as ct,aH as dt,d as I,B as gt,r as ht,aJ as pt,O as ft}from"./1rUouahZ.js";import{p as ut}from"./Dh4nEdmB.js";import{o as mt}from"./DAJx524I.js";var vt=ft.pie,R={sections:new Map,showData:!1},b=R.sections,H=R.showData,St=structuredClone(vt),xt=l(()=>structuredClone(St),"getConfig"),wt=l(()=>{b=new Map,H=R.showData,ht()},"clear"),$t=l(({label:t,value:a})=>{if(a<0)throw new Error(`"${t}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);b.has(t)||(b.set(t,a),E.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),Ct=l(()=>b,"getSections"),yt=l(t=>{H=t},"setShowData"),Dt=l(()=>H,"getShowData"),U={getConfig:xt,clear:wt,setDiagramTitle:ot,getDiagramTitle:nt,setAccTitle:it,getAccTitle:rt,setAccDescription:at,getAccDescription:et,addSection:$t,getSections:Ct,setShowData:yt,getShowData:Dt},bt=l((t,a)=>{tt(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),Tt={parse:l(async t=>{const a=await ut("pie",t);E.debug(a),bt(a,U)},"parse")},At=l(t=>`
2
2
  .pieCircle{
3
3
  stroke: ${t.pieStrokeColor};
4
4
  stroke-width : ${t.pieStrokeWidth};
@@ -1 +1 @@
1
- import"./CJxGDkBm.js";import{p as r}from"./B-Xd7Iia.js";const t={get error(){return r.error},get params(){return r.params},get state(){return r.state},get status(){return r.status},get url(){return r.url}},s=t;export{s as p};
1
+ import"./CJxGDkBm.js";import{p as r}from"./Bhq_T8D6.js";const t={get error(){return r.error},get params(){return r.params},get state(){return r.state},get status(){return r.status},get url(){return r.url}},s=t;export{s as p};
@@ -1 +1 @@
1
- import{t as B,bo as f,bw as D,bq as T,b as W,bm as j,bs as q}from"./CP7YuMeh.js";import{bs as z,cd as L,ca as O,a7 as E,ay as F,W as d,bn as G,aA as h,aD as t,c9 as r,a5 as H,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./CJxGDkBm.js";import{i as R}from"./D-7NlBP9.js";import{C as U}from"./CT_o8OHz.js";import{dD as V}from"./XVOmAVkm.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});z(o,!0);const l=()=>q(b,"$workspace",m),[m,u]=T();let s=f(o,"tab",7),n=f(o,"workspaceId",7);const i=L(n());O(()=>{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:D,$on:(e,a)=>W(o,e,a)},p=E(),y=F(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=H(a),$=J(A,!0);K(a),M(S=>N($,S),[()=>j.layout_chatChanges_noChanges_label()]),d(e,a)};R(y,e=>{t(g).length>0?e(P):e(I,-1)})}d(c,p);var x=G(C);return u(),x}export{Z as default};
1
+ import{t as B,bo as f,bw as D,bq as T,b as W,bm as j,bs as q}from"./CP7YuMeh.js";import{bs as z,cd as L,ca as O,a7 as E,ay as F,W as d,bn as G,aA as h,aD as t,c9 as r,a5 as H,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./CJxGDkBm.js";import{i as R}from"./D-7NlBP9.js";import{C as U}from"./n8Ge9yma.js";import{dD as V}from"./XVOmAVkm.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});z(o,!0);const l=()=>q(b,"$workspace",m),[m,u]=T();let s=f(o,"tab",7),n=f(o,"workspaceId",7);const i=L(n());O(()=>{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:D,$on:(e,a)=>W(o,e,a)},p=E(),y=F(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=H(a),$=J(A,!0);K(a),M(S=>N($,S),[()=>j.layout_chatChanges_noChanges_label()]),d(e,a)};R(y,e=>{t(g).length>0?e(P):e(I,-1)})}d(c,p);var x=G(C);return u(),x}export{Z as default};
@@ -1 +1 @@
1
- import{t as ht,bo as E,bw as $t,bq as It,b as bt,bs as d}from"./CP7YuMeh.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as v,bV as B,aA as U}from"./CJxGDkBm.js";import{k as At}from"./BNCbX7ks.js";import{b as Dt}from"./NtFyWdpR.js";import{I_ as a,eB as Pt,eC as St,o7 as Et,zM as Ut,ob as _t,oc as Tt,Jy as Ft,JN as xt,JD as Nt,vt as Wt,uK as qt}from"./R0MaWbXb.js";import{t as vt}from"./D2MmXC4A.js";import{g as Bt}from"./BrMXrCxP.js";import{dD as Ht,bY as Lt,bN as Ot,bR as Mt,bP as Kt}from"./XVOmAVkm.js";import{af as Jt}from"./CL8gKbrl.js";import{C as Gt}from"./CT_o8OHz.js";import{V as Vt}from"./BYQ9dA2L.js";import{bT as jt,bN as zt,b8 as Yt}from"./C5PnDdXL.js";import{i as Qt}from"./H2jLkRRS.js";function Xt(_,f){if(new.target)return ht({component:Xt,..._});yt(f,!0);const H=()=>d(Z,"$gitRoots$",n),T=()=>d(X,"$workspace",n),L=()=>d(st,"$ftCommits$",n),O=()=>d(ot,"$ftOlderCommits$",n),y=()=>d(tt,"$commitRead$",n),M=()=>d(Y,"$foldUnchanged",n),K=()=>d(z,"$lineWrapping",n),J=()=>d(Q,"$diffSideBySide",n),G=()=>d(at,"$ftLoading$",n),[n,V]=It(),j=e=>{Vt(e,{embedded:!0,showExpand:!0,get expanded(){return t(C)},onToggleExpand:()=>{v(C,!t(C)),t(C)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return M()},onToggleFold:()=>a.dispatch(Nt()),get wrapEnabled(){return K()},onToggleWrap:()=>a.dispatch(xt()),get splitEnabled(){return J()},onToggleSplit:()=>a.dispatch(Ft())})},z=jt(),Y=zt(),Q=Yt();let h=E(f,"tab",7),i=E(f,"workspaceId",7),$=E(f,"isActive",7);const F=Bt(),g=vt(()=>i()),X=Ht(g),Z=Jt(g),w=crypto.randomUUID(),tt=Lt(g,w),c=s(()=>h().data?.commitHash||""),x=s(()=>h().data?.commitMessage||"");k(()=>{const e=i();if(!(!$()||!e||t(r)))return a.dispatch(Pt(e,"history")),()=>a.dispatch(St(e,"history"))});const r=s(()=>h().data?.gitRootId||""),N=s(()=>t(r)&&H().find(e=>e.id===t(r))?.path||""),et=s(()=>t(N)||T()?.worktreePath||T()?.repositoryPath||""),st=Ot(g),ot=Mt(g),at=Kt(g),nt=s(()=>L()||[]),it=s(()=>O()||[]),p=s(()=>t(r)?void 0:t(nt).find(e=>e.hash===t(c))||t(it).find(e=>e.hash===t(c))),A=s(()=>t(p)?.files||[]),D=s(()=>y()?.request.kind==="commitDetails"&&y().request.commitHash===t(c)&&(y().request.gitRootId??"")===t(r)?y():void 0),l=s(()=>t(D)?.result?.kind==="commitDetails"?t(D).result.details:null),rt=s(()=>t(l)?t(l).fileDetails.length>0?t(l).fileDetails:t(l).files.map(e=>({path:e,additions:0,deletions:0})):[]),dt=s(()=>t(D)?.loading??!1);k(()=>{const e=t(c),o=i(),I=t(r);if(!e||!o||t(A).length>0)return;const u=crypto.randomUUID();return a.dispatch(Et(o,w,u,{kind:"commitDetails",commitHash:e,gitRootId:I||void 0})),()=>a.dispatch(Ut(o,w,u))});const ct=s(()=>t(A).length>0?t(A):t(rt));let C=B(!0),R=B(null);const lt=s(()=>t(ct).map(e=>{const o=typeof e=="string"?e:e.path||"",I=typeof e=="string"?0:e.additions||0,u=typeof e=="string"?0:e.deletions||0;return{filePath:Qt(o)?o:`${t(et)}/${o}`,action:"modify",additions:I,deletions:u,toolName:"local",toolCallId:`commit-${t(c)}-${o}`,staged:!1,category:"committed",commitHash:t(c),commitMessage:t(x)}}));k(()=>{!F||!$()||F.registerActions({display:j})});const W=crypto.randomUUID();k(()=>{const e=i();if(!(!($()&&t(r))||!e))return a.dispatch(_t(e,W)),()=>a.dispatch(Tt(e,W))});var mt={get tab(){return h()},set tab(e){h(e),U()},get workspaceId(){return i()},set workspaceId(e){i(e),U()},get isActive(){return $()},set isActive(e){$(e),U()},$set:$t,$on:(e,o)=>bt(f,e,o)},q=Ct(),gt=Rt(q);At(gt,()=>JSON.stringify([i(),t(r),t(c)]),e=>{{let o=s(()=>G()||t(dt)),I=s(()=>t(r)||void 0),u=s(()=>t(N)||void 0),ut=s(()=>({hash:t(c),message:t(x),author:t(p)?.author||t(l)?.author,authorEmail:t(p)?.authorEmail||t(l)?.authorEmail,date:t(p)?.date||t(l)?.date,agentId:t(p)?.agentId,linkedNoteId:t(p)?.linkedNoteId}));Dt(Gt(e,{get isLoading(){return t(o)},get changes(){return t(lt)},get gitRootId(){return t(I)},get gitRootPath(){return t(u)},get commitInfo(){return t(ut)},onOpenAgent:(b,m)=>{const P=m?.metaKey||m?.ctrlKey||!1,S=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(qt(i(),{agentId:b,openInAdjacentPanel:P,sourcePanelId:S}))},onOpenNote:(b,m)=>{const P=m?.metaKey||m?.ctrlKey||!1,S=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Wt(i(),b,{openInAdjacentPanel:P,sourcePanelId:S}))}}),b=>v(R,b,!0),()=>t(R))}}),kt(_,q);var pt=wt(mt);return V(),pt}export{Xt as default};
1
+ import{t as ht,bo as E,bw as $t,bq as It,b as bt,bs as d}from"./CP7YuMeh.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as v,bV as B,aA as U}from"./CJxGDkBm.js";import{k as At}from"./BNCbX7ks.js";import{b as Dt}from"./NtFyWdpR.js";import{I_ as a,eB as Pt,eC as St,o7 as Et,zM as Ut,ob as _t,oc as Tt,Jy as Ft,JN as xt,JD as Nt,vt as Wt,uK as qt}from"./R0MaWbXb.js";import{t as vt}from"./D2MmXC4A.js";import{g as Bt}from"./BrMXrCxP.js";import{dD as Ht,bY as Lt,bN as Ot,bR as Mt,bP as Kt}from"./XVOmAVkm.js";import{af as Jt}from"./CAjI8-Gb.js";import{C as Gt}from"./n8Ge9yma.js";import{V as Vt}from"./DQOW95_s.js";import{bT as jt,bN as zt,b8 as Yt}from"./DNLHkust.js";import{i as Qt}from"./H2jLkRRS.js";function Xt(_,f){if(new.target)return ht({component:Xt,..._});yt(f,!0);const H=()=>d(Z,"$gitRoots$",n),T=()=>d(X,"$workspace",n),L=()=>d(st,"$ftCommits$",n),O=()=>d(ot,"$ftOlderCommits$",n),y=()=>d(tt,"$commitRead$",n),M=()=>d(Y,"$foldUnchanged",n),K=()=>d(z,"$lineWrapping",n),J=()=>d(Q,"$diffSideBySide",n),G=()=>d(at,"$ftLoading$",n),[n,V]=It(),j=e=>{Vt(e,{embedded:!0,showExpand:!0,get expanded(){return t(C)},onToggleExpand:()=>{v(C,!t(C)),t(C)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return M()},onToggleFold:()=>a.dispatch(Nt()),get wrapEnabled(){return K()},onToggleWrap:()=>a.dispatch(xt()),get splitEnabled(){return J()},onToggleSplit:()=>a.dispatch(Ft())})},z=jt(),Y=zt(),Q=Yt();let h=E(f,"tab",7),i=E(f,"workspaceId",7),$=E(f,"isActive",7);const F=Bt(),g=vt(()=>i()),X=Ht(g),Z=Jt(g),w=crypto.randomUUID(),tt=Lt(g,w),c=s(()=>h().data?.commitHash||""),x=s(()=>h().data?.commitMessage||"");k(()=>{const e=i();if(!(!$()||!e||t(r)))return a.dispatch(Pt(e,"history")),()=>a.dispatch(St(e,"history"))});const r=s(()=>h().data?.gitRootId||""),N=s(()=>t(r)&&H().find(e=>e.id===t(r))?.path||""),et=s(()=>t(N)||T()?.worktreePath||T()?.repositoryPath||""),st=Ot(g),ot=Mt(g),at=Kt(g),nt=s(()=>L()||[]),it=s(()=>O()||[]),p=s(()=>t(r)?void 0:t(nt).find(e=>e.hash===t(c))||t(it).find(e=>e.hash===t(c))),A=s(()=>t(p)?.files||[]),D=s(()=>y()?.request.kind==="commitDetails"&&y().request.commitHash===t(c)&&(y().request.gitRootId??"")===t(r)?y():void 0),l=s(()=>t(D)?.result?.kind==="commitDetails"?t(D).result.details:null),rt=s(()=>t(l)?t(l).fileDetails.length>0?t(l).fileDetails:t(l).files.map(e=>({path:e,additions:0,deletions:0})):[]),dt=s(()=>t(D)?.loading??!1);k(()=>{const e=t(c),o=i(),I=t(r);if(!e||!o||t(A).length>0)return;const u=crypto.randomUUID();return a.dispatch(Et(o,w,u,{kind:"commitDetails",commitHash:e,gitRootId:I||void 0})),()=>a.dispatch(Ut(o,w,u))});const ct=s(()=>t(A).length>0?t(A):t(rt));let C=B(!0),R=B(null);const lt=s(()=>t(ct).map(e=>{const o=typeof e=="string"?e:e.path||"",I=typeof e=="string"?0:e.additions||0,u=typeof e=="string"?0:e.deletions||0;return{filePath:Qt(o)?o:`${t(et)}/${o}`,action:"modify",additions:I,deletions:u,toolName:"local",toolCallId:`commit-${t(c)}-${o}`,staged:!1,category:"committed",commitHash:t(c),commitMessage:t(x)}}));k(()=>{!F||!$()||F.registerActions({display:j})});const W=crypto.randomUUID();k(()=>{const e=i();if(!(!($()&&t(r))||!e))return a.dispatch(_t(e,W)),()=>a.dispatch(Tt(e,W))});var mt={get tab(){return h()},set tab(e){h(e),U()},get workspaceId(){return i()},set workspaceId(e){i(e),U()},get isActive(){return $()},set isActive(e){$(e),U()},$set:$t,$on:(e,o)=>bt(f,e,o)},q=Ct(),gt=Rt(q);At(gt,()=>JSON.stringify([i(),t(r),t(c)]),e=>{{let o=s(()=>G()||t(dt)),I=s(()=>t(r)||void 0),u=s(()=>t(N)||void 0),ut=s(()=>({hash:t(c),message:t(x),author:t(p)?.author||t(l)?.author,authorEmail:t(p)?.authorEmail||t(l)?.authorEmail,date:t(p)?.date||t(l)?.date,agentId:t(p)?.agentId,linkedNoteId:t(p)?.linkedNoteId}));Dt(Gt(e,{get isLoading(){return t(o)},get changes(){return t(lt)},get gitRootId(){return t(I)},get gitRootPath(){return t(u)},get commitInfo(){return t(ut)},onOpenAgent:(b,m)=>{const P=m?.metaKey||m?.ctrlKey||!1,S=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(qt(i(),{agentId:b,openInAdjacentPanel:P,sourcePanelId:S}))},onOpenNote:(b,m)=>{const P=m?.metaKey||m?.ctrlKey||!1,S=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Wt(i(),b,{openInAdjacentPanel:P,sourcePanelId:S}))}}),b=>v(R,b,!0),()=>t(R))}}),kt(_,q);var pt=wt(mt);return V(),pt}export{Xt as default};
@@ -1 +1 @@
1
- import{aB as v,b as y}from"./VRkOAck5.js";var w=5,O=1e-5,X=2,Y=.6,R=1e-6;function N(t){const e=[];for(let s=0;s<t.length-1;s++)e.push({a:t[s],b:t[s+1]});return e}y(N,"buildSegmentList");function T(t,e,s,a){const r=e.x-t.x,o=e.y-t.y,i=a.x-s.x,d=a.y-s.y,u=r*d-o*i;if(u===0)return null;const n=s.x-t.x,c=s.y-t.y,p=(n*d-c*i)/u,f=(n*o-c*r)/u;return p<=R||p>=1-R||f<=R||f>=1-R?null:{point:{x:t.x+p*r,y:t.y+p*o},tA:p,tB:f}}y(T,"segmentIntersection");function P(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}y(P,"isHorizontalSeg");function B(t,e,s){if(t.curve!=="rounded")return!1;const a=t.points,r=a[e],o=a[e+1];if(!r||!o)return!1;const i=Math.hypot(o.x-r.x,o.y-r.y),d=s*i,u=e>0?L(a[e-1],r,o,w):null;if(u&&d<u.cutLen)return!0;const n=e+2<a.length?L(r,o,a[e+2],w):null;return n!==null&&i-d<n.cutLen}y(B,"crossingSitsInRoundedCorner");function C(t){const e=[];for(let s=0;s<t.length;s++){const a=t[s],r=N(a.points);for(let o=s+1;o<t.length;o++){const i=t[o],d=N(i.points);for(const[u,n]of r.entries())for(const[c,p]of d.entries()){const f=T(n.a,n.b,p.a,p.b);if(!f||B(a,u,f.tA)||B(i,c,f.tB))continue;const g=P(n),S=P(p);(g!==S?g:!1)?e.push({jumpEdgeId:a.id,otherEdgeId:i.id,segIndex:u,t:f.tA,point:f.point}):e.push({jumpEdgeId:i.id,otherEdgeId:a.id,segIndex:c,t:f.tB,point:f.point})}}}return e}y(C,"findEdgeIntersections");function M(t){const e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}y(M,"fmt");function A(t){return`${M(t.x)},${M(t.y)}`}y(A,"pointToString");function D(t){const e=t.b.x-t.a.x,s=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(s)?e>=0?1:0:s>=0?1:0}y(D,"getArcSweepFlag");function _(t,e){if(t.length<2)return t.map(o=>({...o}));const s=t.map(o=>({...o})),a=e.arrowTypeStart&&v[e.arrowTypeStart];if(a){const o=t[0],i=t[1],d=Math.atan2(i.y-o.y,i.x-o.x);s[0].x=o.x+a*Math.cos(d),s[0].y=o.y+a*Math.sin(d)}const r=e.arrowTypeEnd&&v[e.arrowTypeEnd];if(r){const o=t.length,i=t[o-2],d=t[o-1],u=Math.atan2(d.y-i.y,d.x-i.x);s[o-1].x=d.x-r*Math.cos(u),s[o-1].y=d.y-r*Math.sin(u)}return s}y(_,"applyMarkerOffsets");function k(t,e,s,a,r){const o=t.point.x,i=t.point.y,d={x:o-e*t.r,y:i-s*t.r},u={x:o+e*t.r,y:i+s*t.r},n=[`L${A(d)}`];return r==="arc"?n.push(`A${M(t.r)},${M(t.r)} 0 0 ${a} ${A(u)}`):n.push(`M${A(u)}`),n}y(k,"emitJump");function L(t,e,s,a){const r=e.x-t.x,o=e.y-t.y,i=s.x-e.x,d=s.y-e.y,u=Math.hypot(r,o),n=Math.hypot(i,d);if(u<O||n<O)return null;const c=r/u,p=o/u,f=i/n,g=d/n,S=c*f+p*g,b=Math.max(-1,Math.min(1,S)),m=Math.acos(b);if(m<O||Math.abs(Math.PI-m)<O)return null;const h=Math.min(a/Math.sin(m/2),u/2,n/2);return{startX:e.x-c*h,startY:e.y-p*h,endX:e.x+f*h,endY:e.y+g*h,ctrlX:e.x,ctrlY:e.y,cutLen:h}}y(L,"computeRoundedCorner");function H(t,e,s){const a=t.points;if(a.length<2)return"";const r=_(a,t),o=t.curve==="rounded",i=N(r),d=new Map;for(const n of e){const c=i[n.segIndex];if(!c)continue;const p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),f=d.get(n.segIndex)??[];f.push({t:n.t,point:n.point,d:n.t*p,r:s.jumpRadius}),d.set(n.segIndex,f)}const u=[`M${A(r[0])}`];for(let n=0;n<i.length;n++){const c=i[n],p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),f=p===0?0:(c.b.x-c.a.x)/p,g=p===0?0:(c.b.y-c.a.y)/p,S=D(c);let b=0;if(o&&n>0){const l=L(r[n-1],r[n],r[n+1]??r[n],w);l&&(b=l.cutLen)}let m=p,h=null;o&&n<i.length-1&&(h=L(r[n],r[n+1],r[n+2]??r[n+1],w),h&&(m=p-h.cutLen));const $=s.jumpRadius*Y,x=[...d.get(n)??[]].sort((l,E)=>l.t-E.t).filter(l=>{const E=Math.min(l.d-b,m-l.d)-X;return l.r=Math.min(l.r,E),l.r>=$});for(let l=0;l<x.length-1;l++){const E=x[l+1].d-x[l].d;if(x[l].r+x[l+1].r>E){const I=E/2;x[l].r=Math.min(x[l].r,I),x[l+1].r=Math.min(x[l+1].r,I)}}for(const l of x)l.r<$||u.push(...k(l,f,g,S,s.jumpStyle));o&&h?(u.push(`L${M(h.startX)},${M(h.startY)}`),u.push(`Q${M(h.ctrlX)},${M(h.ctrlY)} ${M(h.endX)},${M(h.endY)}`)):u.push(`L${A(c.b)}`)}return u.join(" ")}y(H,"rewriteEdgePath");function J(t){return/^[\d\s+,.LMelm-]*$/.test(t)}y(J,"isStraightPath");function U(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}y(U,"curveSupportsLineHops");function j(t){if(!t)return null;try{const e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),s=JSON.parse(e);if(!Array.isArray(s))return null;const a=[];for(const r of s)r&&typeof r.x=="number"&&typeof r.y=="number"&&a.push({x:r.x,y:r.y});return a.length>=2?a:null}catch{return null}}y(j,"decodeDataPoints");function F(t,e,s){if(!s.enabled)return;const a=t.node();if(!a)return;const r=new Map;for(const n of e)r.set(n.id,n);const o=new Map;for(const n of a.querySelectorAll("path[data-id]")){const c=n.getAttribute("data-id");c!==null&&!o.has(c)&&o.set(c,n)}const i=[];for(const n of e){const c=o.get(n.id);if(!c)continue;const f=j(c.getAttribute("data-points"))??n.points;i.push({...n,points:f})}const d=C(i);if(d.length===0)return;const u=new Map;for(const n of d){const c=u.get(n.jumpEdgeId)??[];c.push(n),u.set(n.jumpEdgeId,c)}for(const n of i){const c=u.get(n.id);if(!c||c.length===0)continue;const f=r.get(n.id)?.curve;if(f!==void 0&&!U(f))continue;const g=o.get(n.id);if(!g)continue;if(f===void 0){const x=g.getAttribute("d")??"";if(!J(x))continue}const S=g.getAttribute("style")??"",b=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(S),m=b?Number.parseFloat(b[1]):null,h=b?Number.parseFloat(b[2]):null,$=H(n,c,s);if(g.setAttribute("d",$),m!==null&&h!==null&&typeof g.getTotalLength=="function"){const x=g.getTotalLength(),l=Math.max(0,x-m-h),E=`0 ${m} ${l} ${h}`,I=S.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${E};`).replace(/;\s*;+/g,";");g.setAttribute("style",I)}}}y(F,"applyLineJumpsToSvg");export{F as a};
1
+ import{aB as v,b as y}from"./1rUouahZ.js";var w=5,O=1e-5,X=2,Y=.6,R=1e-6;function N(t){const e=[];for(let s=0;s<t.length-1;s++)e.push({a:t[s],b:t[s+1]});return e}y(N,"buildSegmentList");function T(t,e,s,a){const r=e.x-t.x,o=e.y-t.y,i=a.x-s.x,d=a.y-s.y,u=r*d-o*i;if(u===0)return null;const n=s.x-t.x,c=s.y-t.y,p=(n*d-c*i)/u,f=(n*o-c*r)/u;return p<=R||p>=1-R||f<=R||f>=1-R?null:{point:{x:t.x+p*r,y:t.y+p*o},tA:p,tB:f}}y(T,"segmentIntersection");function P(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}y(P,"isHorizontalSeg");function B(t,e,s){if(t.curve!=="rounded")return!1;const a=t.points,r=a[e],o=a[e+1];if(!r||!o)return!1;const i=Math.hypot(o.x-r.x,o.y-r.y),d=s*i,u=e>0?L(a[e-1],r,o,w):null;if(u&&d<u.cutLen)return!0;const n=e+2<a.length?L(r,o,a[e+2],w):null;return n!==null&&i-d<n.cutLen}y(B,"crossingSitsInRoundedCorner");function C(t){const e=[];for(let s=0;s<t.length;s++){const a=t[s],r=N(a.points);for(let o=s+1;o<t.length;o++){const i=t[o],d=N(i.points);for(const[u,n]of r.entries())for(const[c,p]of d.entries()){const f=T(n.a,n.b,p.a,p.b);if(!f||B(a,u,f.tA)||B(i,c,f.tB))continue;const g=P(n),S=P(p);(g!==S?g:!1)?e.push({jumpEdgeId:a.id,otherEdgeId:i.id,segIndex:u,t:f.tA,point:f.point}):e.push({jumpEdgeId:i.id,otherEdgeId:a.id,segIndex:c,t:f.tB,point:f.point})}}}return e}y(C,"findEdgeIntersections");function M(t){const e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}y(M,"fmt");function A(t){return`${M(t.x)},${M(t.y)}`}y(A,"pointToString");function D(t){const e=t.b.x-t.a.x,s=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(s)?e>=0?1:0:s>=0?1:0}y(D,"getArcSweepFlag");function _(t,e){if(t.length<2)return t.map(o=>({...o}));const s=t.map(o=>({...o})),a=e.arrowTypeStart&&v[e.arrowTypeStart];if(a){const o=t[0],i=t[1],d=Math.atan2(i.y-o.y,i.x-o.x);s[0].x=o.x+a*Math.cos(d),s[0].y=o.y+a*Math.sin(d)}const r=e.arrowTypeEnd&&v[e.arrowTypeEnd];if(r){const o=t.length,i=t[o-2],d=t[o-1],u=Math.atan2(d.y-i.y,d.x-i.x);s[o-1].x=d.x-r*Math.cos(u),s[o-1].y=d.y-r*Math.sin(u)}return s}y(_,"applyMarkerOffsets");function k(t,e,s,a,r){const o=t.point.x,i=t.point.y,d={x:o-e*t.r,y:i-s*t.r},u={x:o+e*t.r,y:i+s*t.r},n=[`L${A(d)}`];return r==="arc"?n.push(`A${M(t.r)},${M(t.r)} 0 0 ${a} ${A(u)}`):n.push(`M${A(u)}`),n}y(k,"emitJump");function L(t,e,s,a){const r=e.x-t.x,o=e.y-t.y,i=s.x-e.x,d=s.y-e.y,u=Math.hypot(r,o),n=Math.hypot(i,d);if(u<O||n<O)return null;const c=r/u,p=o/u,f=i/n,g=d/n,S=c*f+p*g,b=Math.max(-1,Math.min(1,S)),m=Math.acos(b);if(m<O||Math.abs(Math.PI-m)<O)return null;const h=Math.min(a/Math.sin(m/2),u/2,n/2);return{startX:e.x-c*h,startY:e.y-p*h,endX:e.x+f*h,endY:e.y+g*h,ctrlX:e.x,ctrlY:e.y,cutLen:h}}y(L,"computeRoundedCorner");function H(t,e,s){const a=t.points;if(a.length<2)return"";const r=_(a,t),o=t.curve==="rounded",i=N(r),d=new Map;for(const n of e){const c=i[n.segIndex];if(!c)continue;const p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),f=d.get(n.segIndex)??[];f.push({t:n.t,point:n.point,d:n.t*p,r:s.jumpRadius}),d.set(n.segIndex,f)}const u=[`M${A(r[0])}`];for(let n=0;n<i.length;n++){const c=i[n],p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),f=p===0?0:(c.b.x-c.a.x)/p,g=p===0?0:(c.b.y-c.a.y)/p,S=D(c);let b=0;if(o&&n>0){const l=L(r[n-1],r[n],r[n+1]??r[n],w);l&&(b=l.cutLen)}let m=p,h=null;o&&n<i.length-1&&(h=L(r[n],r[n+1],r[n+2]??r[n+1],w),h&&(m=p-h.cutLen));const $=s.jumpRadius*Y,x=[...d.get(n)??[]].sort((l,E)=>l.t-E.t).filter(l=>{const E=Math.min(l.d-b,m-l.d)-X;return l.r=Math.min(l.r,E),l.r>=$});for(let l=0;l<x.length-1;l++){const E=x[l+1].d-x[l].d;if(x[l].r+x[l+1].r>E){const I=E/2;x[l].r=Math.min(x[l].r,I),x[l+1].r=Math.min(x[l+1].r,I)}}for(const l of x)l.r<$||u.push(...k(l,f,g,S,s.jumpStyle));o&&h?(u.push(`L${M(h.startX)},${M(h.startY)}`),u.push(`Q${M(h.ctrlX)},${M(h.ctrlY)} ${M(h.endX)},${M(h.endY)}`)):u.push(`L${A(c.b)}`)}return u.join(" ")}y(H,"rewriteEdgePath");function J(t){return/^[\d\s+,.LMelm-]*$/.test(t)}y(J,"isStraightPath");function U(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}y(U,"curveSupportsLineHops");function j(t){if(!t)return null;try{const e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),s=JSON.parse(e);if(!Array.isArray(s))return null;const a=[];for(const r of s)r&&typeof r.x=="number"&&typeof r.y=="number"&&a.push({x:r.x,y:r.y});return a.length>=2?a:null}catch{return null}}y(j,"decodeDataPoints");function F(t,e,s){if(!s.enabled)return;const a=t.node();if(!a)return;const r=new Map;for(const n of e)r.set(n.id,n);const o=new Map;for(const n of a.querySelectorAll("path[data-id]")){const c=n.getAttribute("data-id");c!==null&&!o.has(c)&&o.set(c,n)}const i=[];for(const n of e){const c=o.get(n.id);if(!c)continue;const f=j(c.getAttribute("data-points"))??n.points;i.push({...n,points:f})}const d=C(i);if(d.length===0)return;const u=new Map;for(const n of d){const c=u.get(n.jumpEdgeId)??[];c.push(n),u.set(n.jumpEdgeId,c)}for(const n of i){const c=u.get(n.id);if(!c||c.length===0)continue;const f=r.get(n.id)?.curve;if(f!==void 0&&!U(f))continue;const g=o.get(n.id);if(!g)continue;if(f===void 0){const x=g.getAttribute("d")??"";if(!J(x))continue}const S=g.getAttribute("style")??"",b=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(S),m=b?Number.parseFloat(b[1]):null,h=b?Number.parseFloat(b[2]):null,$=H(n,c,s);if(g.setAttribute("d",$),m!==null&&h!==null&&typeof g.getTotalLength=="function"){const x=g.getTotalLength(),l=Math.max(0,x-m-h),E=`0 ${m} ${l} ${h}`,I=S.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${E};`).replace(/;\s*;+/g,";");g.setAttribute("style",I)}}}y(F,"applyLineJumpsToSvg");export{F as a};