@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,2 +1,2 @@
1
- import{t as Vt,bo as ee,_ as Yr,bw as zt,bs as ce,bq as ir,b as At,bm as c}from"./CP7YuMeh.js";import{bs as Wt,ca as pe,aD as e,bH as f,a5 as T,bA as x,W as l,bn as Nt,bV as N,c9 as n,aA as te,c6 as Ut,ay as ne,be as Ze,b$ as tt,b_ as k,bO as g,bS as p,bl as S,aB as P,bj as Xr,aw as rt,ai as Gr,c5 as rr,a as yr,a7 as je,aj as gt,cd as Jr,br as Zr}from"./CJxGDkBm.js";import{i as Q}from"./D-7NlBP9.js";import{k as Pr}from"./BNCbX7ks.js";import{g as Ct}from"./D37abooi.js";import{c as Rt}from"./BlMDLo1p.js";import{b as $r}from"./NtFyWdpR.js";import{I_ as j,nL as kr,vY as Ir,vX as Cr,Le as Qr,Lf as ea,eB as ta,eC as ra,KG as fr,lW as Jt,C8 as vr,sp as pr,o7 as aa,zM as oa,a8 as gr,Jx as ia,JN as na,nl as sa,iM as la,nN as da,vp as ca,A7 as ua,KF as fa}from"./R0MaWbXb.js";import{g as va}from"./BrMXrCxP.js";import{a as pa,h as ga,j as ma,c as _a,d as ha,i as wa,e as ba,f as mr,g as xa,b as Zt}from"./ByjIYjlL.js";import{bL as ya,bY as Pa,dD as $a}from"./XVOmAVkm.js";import{w as _r,d as ka}from"./r6lTa47w.js";import{f as Ia}from"./j0LslCAy.js";import{m as Qt}from"./BwmV61YP.js";import{f as Ce}from"./EHSwEMpb.js";import{h as Ca}from"./BxW5KyMH.js";import"./o_xwUHUt.js";import{s as at,g as It,f as hr}from"./CPIQ_KTl.js";import{F as et,ac as Sa,au as Fa,aZ as Da,b3 as jt,ct as Ta,cu as Ea,bm as Ra,cS as Ma,c9 as Ua}from"./D-6tK-mW.js";import{S as wr}from"./Nkei2qsP.js";import{c as ja}from"./ChTqQfQN.js";import"./Br9QHzNh.js";import{$ as La}from"./CzkNbc1D.js";import{i as er,b as Va,a as za}from"./H2jLkRRS.js";import{C as ar,p as Aa}from"./DEDVy4_0.js";import{M as Wa}from"./C3B9kB5Y.js";import{l as tr,m as Sr}from"./DoKfR2tM.js";import"./CsZB1L8p.js";import{E as Na}from"./DZkRidEi.js";import{a as Ba}from"./D6XYtHit.js";import"./CROhcjdD.js";import{M as Mt}from"./C4IxG4Wb.js";import{V as Oa}from"./BYQ9dA2L.js";import{bT as Ha,b7 as qa}from"./C5PnDdXL.js";import{g as Ka}from"./BE6ifuX1.js";import{G as Ya}from"./BzSCYrIF.js";import{g as Xa,W as Ga}from"./BJ_tOrj6.js";import{b as Ja,h as Za}from"./BF8nXhuw.js";import{t as Qa}from"./DgIx8gya.js";const Fr=j.createSelector((X,w)=>kr(X.pdfPreview.previews,w));var eo=P('<div class="flex shrink-0 flex-wrap items-center justify-center gap-2 border-b border-border p-2"><!> <span aria-live="polite"> </span> <!> <!> <span> </span> <!></div> <div class="min-h-0 flex-1 overflow-auto p-4"><canvas class="mx-auto block" role="img"></canvas></div>',1),to=P('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function or(X,w){if(new.target)return Vt({component:or,...X});Wt(w,!0);const ye=()=>ce(we,"$preview",ot),[ot,re]=ir();let y=ee(w,"workspaceId",7),ae=ee(w,"filePath",7),Pe=ee(w,"gitRootId",7);const Se=crypto.randomUUID(),we=Fr(Se),ge=new WeakMap;let J=N(null),Ye=N(void 0),V=N(1),B=N(1),se=N(!0),me=N(!1),Fe=N(null),A=N(0);const be=n(()=>ye()?.error??e(Fe)),De=n(()=>e(be)==="missing"?c.file_pdf_missing_error():e(be)==="large"?c.file_pdf_large_error():e(be)==="invalid"?c.file_pdf_invalid_error():e(be)==="password"?c.file_pdf_password_error():c.file_pdf_load_error());pe(()=>{const d=y(),I=ae();e(A);const b=crypto.randomUUID();return j.dispatch(Ir(Se,b,d,I,...Pe()?[{gitRootId:Pe()}]:[])),()=>{j.dispatch(Cr(Se,b))}}),pe(()=>{const d=ye()?.url;let I=!1,b;if(f(J,null),f(Fe,null),f(se,!0),f(V,1),f(B,1),!!d)return(async()=>{try{const{loadPdfDocument:W}=await Yr(async()=>{const{loadPdfDocument:_e}=await import("./cb1JHFKl.js");return{loadPdfDocument:_e}},[],import.meta.url);if(I)return;b=W(d);const M=await b.promise;I||f(J,M)}catch(W){if(I)return;f(Fe,W instanceof Error&&W.name==="PasswordException"?"password":W instanceof Error&&W.name==="InvalidPDFException"?"invalid":"load",!0)}finally{I||f(se,!1)}})(),()=>{I=!0,b?.destroy()}}),pe(()=>{const d=e(J),I=e(Ye),b=e(V),W=e(B);if(!d||!I)return;let M=!1,_e,E;const oe=()=>{if(!E)return;const Y=(ge.get(E)??1)-1;Y?ge.set(E,Y):(ge.delete(E),E.cleanup()),E=void 0};return f(me,!0),(async()=>{try{if(E=await d.getPage(b),ge.set(E,(ge.get(E)??0)+1),M){oe();return}const Y=E.getViewport({scale:W}),Z=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(Y.width*Y.height)));I.width=Math.ceil(Y.width*Z),I.height=Math.ceil(Y.height*Z),I.style.width=`${Y.width}px`,I.style.height=`${Y.height}px`,_e=E.render({canvas:I,viewport:Y,transform:[Z,0,0,Z,0,0]}),await _e.promise}catch{M||f(Fe,"invalid")}finally{M||f(me,!1)}})(),()=>{M=!0,_e?.cancel(),_e?_e.promise.then(oe,oe):oe()}});var Ne={get workspaceId(){return y()},set workspaceId(d){y(d),te()},get filePath(){return ae()},set filePath(d){ae(d),te()},get gitRootId(){return Pe()},set gitRootId(d){Pe(d),te()},$set:zt,$on:(d,I)=>At(w,d,I)},Le=to(),Be=T(Le);{var o=d=>{{const I=W=>{Ze();var M=tt();k(()=>g(M,e(De))),l(W,M)};let b=n(()=>c.ui_combobox_retry_label());Na(d,{onRetry:()=>Ut(A),get retryLabel(){return e(b)},class:"m-auto",message:I,$$slots:{message:!0}})}},i=d=>{{let I=n(()=>c.file_pdf_loading_label());Ba(d,{get label(){return e(I)},count:1,class:"p-4"})}},F=d=>{var I=eo(),b=ne(I),W=T(b);{let ue=n(()=>e(V)<=1);Ce(W,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Ut(V,-1),children:(Ee,Ve)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.file_pdf_previous_label()]),l(Ee,fe)},$$slots:{default:!0}})}var M=p(W,2),_e=S(M,!0),E=p(M,2);{let ue=n(()=>e(V)>=e(J).numPages);Ce(E,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Ut(V),children:(Ee,Ve)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.file_pdf_next_label()]),l(Ee,fe)},$$slots:{default:!0}})}var oe=p(E,2);{let ue=n(()=>e(B)<=.25);Ce(oe,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.max(.25,e(B)-.25),!0),children:(Ee,Ve)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.editor_fileViewer_zoomOut_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}var Y=p(oe,2),Z=S(Y,!0),it=p(Y,2);{let ue=n(()=>e(B)>=3);Ce(it,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.min(3,e(B)+.25),!0),children:(Ee,Ve)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.editor_fileViewer_zoomIn_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}x(b);var nt=p(b,2),st=T(nt);let ut;$r(st,ue=>f(Ye,ue),()=>e(Ye)),x(nt),k((ue,Ee,Ve)=>{g(_e,ue),g(Z,Ee),at(nt,"aria-busy",e(me)),at(st,"aria-label",Ve),ut=It(st,"",ut,{visibility:e(me)?"hidden":"visible"})},[()=>c.file_pdf_page_label({page:tr(e(V)),total:tr(e(J).numPages)}),()=>Sr(e(B),{style:"percent"}),()=>c.file_pdf_canvas_ariaLabel({name:ae(),page:tr(e(V))})]),l(d,I)};Q(Be,d=>{e(be)?d(o):e(se)||ye()?.status==="loading"?d(i,1):e(J)&&d(F,2)})}x(Le),l(X,Le);var Te=Nt(Ne);return re(),Te}const ro=j.createSelector((X,w)=>kr(X.videoPreview.previews,w));var ao=P('<p role="status"> </p>'),oo=P('<p role="alert"> </p>'),io=P('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),no=P('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),so=P('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Dr(X,w){if(new.target)return Vt({component:Dr,...X});Wt(w,!0);const ye=()=>ce(Ye,"$preview",ot),[ot,re]=ir();let y=ee(w,"sourceUrl",7),ae=ee(w,"fileName",7),Pe=ee(w,"allowDownload",7),Se=ee(w,"downloading",7),we=ee(w,"onDownload",7),ge=N(null);const J=crypto.randomUUID(),Ye=ro(J),V=n(()=>ye()?.status==="loading"),B=n(()=>e(ge)??ye()?.error);let se=!1,me=!1;Xr(()=>{me=!0,j.dispatch(Qr(J))});function Fe(){if(me||e(V))return;const i=y().startsWith("workspace-file://")?new URL(y()):null;if(se||!i||!i.pathname.toLowerCase().endsWith(".mp4")){f(ge,"unsupported");return}se=!0,i.searchParams.set("preview","h264"),j.dispatch(ea(J,i.hostname,i.toString()))}function A(i){if(me)return;const F=i.currentTarget.error?.code;F===2?f(ge,"network"):F!==1&&Fe()}var be={get sourceUrl(){return y()},set sourceUrl(i){y(i),te()},get fileName(){return ae()},set fileName(i){ae(i),te()},get allowDownload(){return Pe()},set allowDownload(i){Pe(i),te()},get downloading(){return Se()},set downloading(i){Se(i),te()},get onDownload(){return we()},set onDownload(i){we(i),te()},$set:zt,$on:(i,F)=>At(w,i,F)},De=so(),Ne=T(De);{var Le=i=>{var F=io(),Te=T(F),d=S(Te,!0),I=p(Te,2);{var b=E=>{var oe=ao(),Y=S(oe,!0);k(Z=>g(Y,Z),[()=>c.editor_fileViewer_videoPreparing_label()]),l(E,oe)},W=E=>{var oe=oo(),Y=S(oe,!0);k(Z=>g(Y,Z),[()=>e(B)==="network"?c.editor_fileViewer_videoLoad_error():c.editor_fileViewer_videoUnsupported_label()]),l(E,oe)};Q(I,E=>{e(V)?E(b):E(W,-1)})}var M=p(I,2);{var _e=E=>{Ce(E,{variant:"secondary",size:"sm",get onclick(){return we()},get disabled(){return Se()},children:(oe,Y)=>{Ze();var Z=tt();k(it=>g(Z,it),[()=>c.layout_fileTab_downloadFile_label()]),l(oe,Z)},$$slots:{default:!0}})};Q(M,E=>{Pe()&&E(_e)})}x(F),k(()=>g(d,ae())),l(i,F)},Be=i=>{var F=no(),Te=S(F,!0);k(d=>{at(F,"src",ye()?.url??y()),g(Te,d)},[()=>c.editor_fileViewer_videoUnsupported_label()]),rt("error",F,A),rt("loadedmetadata",F,d=>{d.currentTarget.videoWidth===0&&Fe()}),l(i,F)};Q(Ne,i=>{e(B)||e(V)?i(Le):i(Be,-1)})}x(De),l(X,De);var o=Nt(be);return re(),o}var lo=P('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),co=P('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="w-px h-5 bg-border mx-1"></div> <!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),uo=P('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),fo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"></path></svg></div> <div class="text-sm text-subtle mb-4"> </div> <audio controls="" class="w-full max-w-md"><source/> </audio></div>'),vo=P("<!> ",1),po=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg></div> <p class="text-sm text-subtle mb-4"> </p> <!></div>'),go=P('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),mo=P('<td class="border border-border px-2 py-1 text-xs"> </td>'),_o=P("<tr></tr>"),ho=P('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),wo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),bo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),xo=P('<div class="h-full flex flex-col"><!></div>');function Lt(X,w){if(new.target)return Vt({component:Lt,...X});Wt(w,!0);const ye=t=>{var a=lo(),u=ne(a);{let O=n(()=>c.editor_fileViewer_zoomOut_tooltip());Ce(u,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:oe,get title(){return e(O)},children:(D,L)=>{et(D,{get icon(){return Ta},size:"sm"})},$$slots:{default:!0}})}var m=p(u,2),h=S(m,!0),R=p(m,2);{let O=n(()=>c.editor_fileViewer_zoomIn_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:E,get title(){return e(O)},children:(D,L)=>{et(D,{get icon(){return Ea},size:"sm"})},$$slots:{default:!0}})}Ze(2),k(()=>g(h,e(Fe))),l(t,a)},ot=ja("FileViewer");let re=ee(w,"filePath",7),y=ee(w,"fileContent",7,""),ae=ee(w,"sourceUrl",7),Pe=ee(w,"language",7),Se=ee(w,"isBinary",7),we=ee(w,"allowDownload",7,!0),ge=ee(w,"onDownload",7),J=ee(w,"downloading",7,!1);const Ye=t=>{const a=t.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","webp","bmp","ico","avif"].includes(a)?"image":a==="svg"?"svg":["mp4","webm","ogg","mov","avi"].includes(a)?"video":["mp3","wav","ogg","m4a","flac"].includes(a)?"audio":a==="pdf"?"pdf":["md","markdown"].includes(a)?"markdown":a==="json"?"json":a==="csv"?"csv":["yaml","yml"].includes(a)?"yaml":a==="xml"?"xml":["zip","tar","gz","rar","7z","bz2"].includes(a)?"archive":["exe","dll","so","dylib","wasm"].includes(a)?"binary":"text"},V=n(()=>Ye(re())),B=n(()=>re().split("/").pop()||c.editor_fileViewer_unknown_fallback());let se=N(100),me=N(0);const Fe=n(()=>Sr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let A=N(!1),be=N(0),De=N(0),Ne=N(0),Le=N(0),Be=N(!1),o=null;function i(){const t=o;o=null,f(Be,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function F(t){if(t.button!==0||!t.isPrimary||o)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),o={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},f(Be,!0),t.preventDefault()}function Te(t){if(!(!o||t.pointerId!==o.pointerId)){if((t.buttons&1)===0){i();return}f(Ne,o.viewport.scrollLeft,!0),f(Le,o.viewport.scrollTop,!0),f(be,e(be)+(t.clientX-o.x)),f(De,e(De)+(t.clientY-o.y)),o.x=t.clientX,o.y=t.clientY}}function d(t){t.pointerId===o?.pointerId&&i()}pe(()=>{re(),ae(),e(se),e(me),f(Ne,0),f(Le,0)}),pe(()=>(re(),ae(),rr(()=>{i(),f(be,0),f(De,0)}),i));const I=t=>{const a=t.split(".").pop()?.toLowerCase();return a==="jpg"||a==="jpeg"?"image/jpeg":a==="png"?"image/png":a==="gif"?"image/gif":a==="webp"?"image/webp":"application/octet-stream"},b=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},W=()=>{if(ae())return ae();if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():Se()?`data:${I(re())};base64,${y()}`:`data:${I(re())};base64,${y()}`;if(y()instanceof ArrayBuffer){const a=new Uint8Array(y()).reduce((m,h)=>m+String.fromCharCode(h),""),u=btoa(a);return`data:${I(re())};base64,${u}`}return""},M=()=>{if(ae())return ae();const t=b(re());if(!t)return"";if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():`data:${t};base64,${y()}`;const a=new Uint8Array(y()),u=[],m=32768;for(let h=0;h<a.length;h+=m)u.push(String.fromCharCode(...a.subarray(h,h+m)));return`data:${t};base64,${btoa(u.join(""))}`},_e=()=>{const t=typeof y()=="string"?new TextEncoder().encode(y()):new Uint8Array(y()),a=[],u=32768;for(let m=0;m<t.length;m+=u)a.push(String.fromCharCode(...t.subarray(m,m+u)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},E=()=>{f(se,Math.min(e(se)+25,500),!0)},oe=()=>{f(se,Math.max(e(se)-25,25),!0)},Y=()=>{f(me,(e(me)+90)%360)},Z=()=>{if(!we()||J())return;if(ge()){ge()();return}const t=document.createElement("a");t.href=e(V)==="video"?M():e(V)==="svg"?_e():W(),t.download=e(B),t.click()},it=async()=>{try{const t=W(),a=new Image;a.crossOrigin="anonymous";const u=await new Promise((m,h)=>{a.onload=()=>{const R=document.createElement("canvas");R.width=a.naturalWidth,R.height=a.naturalHeight;const O=R.getContext("2d");if(!O){h(new Error("Failed to get canvas context"));return}O.drawImage(a,0,0),R.toBlob(D=>{D?m(D):h(new Error("Failed to create blob from canvas"))},"image/png",1)},a.onerror=()=>h(new Error("Failed to load image")),a.src=t});await navigator.clipboard.write([new ClipboardItem({"image/png":u})]),f(A,!0),setTimeout(()=>f(A,!1),2e3)}catch(t){ot.error("Failed to copy image:",t)}},nt=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},st=t=>t.split(`
2
- `).map(u=>u.split(",").map(m=>m.trim()));var ut={get filePath(){return re()},set filePath(t){re(t),te()},get fileContent(){return y()},set fileContent(t=""){y(t),te()},get sourceUrl(){return ae()},set sourceUrl(t){ae(t),te()},get language(){return Pe()},set language(t){Pe(t),te()},get isBinary(){return Se()},set isBinary(t){Se(t),te()},get allowDownload(){return we()},set allowDownload(t=!0){we(t),te()},get onDownload(){return ge()},set onDownload(t){ge(t),te()},get downloading(){return J()},set downloading(t=!1){J(t),te()},$set:zt,$on:(t,a)=>At(w,t,a)},ue=xo();rt("blur",yr,i);var Ee=T(ue);{var Ve=t=>{var a=co(),u=T(a),m=T(u);ye(m);var h=p(m,2);{let he=n(()=>c.editor_fileViewer_rotate_tooltip());Ce(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Y,get title(){return e(he)},children:($e,He)=>{et($e,{get icon(){return Sa},size:"sm"})},$$slots:{default:!0}})}var R=p(h,4);{let he=n(()=>c.editor_fileViewer_copyImage_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:it,get title(){return e(he)},children:($e,He)=>{var ke=je(),Ft=ne(ke);{var Dt=Ie=>{et(Ie,{get icon(){return Fa},size:"sm",class:"text-green-500"})},Ge=Ie=>{et(Ie,{get icon(){return Da},size:"sm"})};Q(Ft,Ie=>{e(A)?Ie(Dt):Ie(Ge,-1)})}l($e,ke)},$$slots:{default:!0}})}var O=p(R,2);{let he=n(()=>!we()||J()),$e=n(()=>c.editor_fileViewer_download_tooltip());Ce(O,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Z,get disabled(){return e(he)},get title(){return e($e)},children:(He,ke)=>{et(He,{get icon(){return jt},size:"sm"})},$$slots:{default:!0}})}var D=p(O,2),L=S(D,!0);x(u);var H=p(u,2),xe=S(H);x(a),k(he=>{g(L,e(B)),hr(H,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(Be)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),It(H,`--pan-scroll-x: ${e(Ne)??""}px; --pan-scroll-y: ${e(Le)??""}px;`),at(xe,"src",he),at(xe,"alt",e(B)),It(xe,`translate: ${e(be)??""}px ${e(De)??""}px; transform: scale(${e(se)/100}) rotate(${e(me)??""}deg); transition: transform 0.2s;`)},[()=>W()]),gt("pointerdown",H,F),gt("pointermove",H,Te),gt("pointerup",H,d),rt("pointercancel",H,d),rt("lostpointercapture",H,d),l(t,a)},fe=t=>{var a=uo(),u=T(a),m=T(u);ye(m);var h=p(m,2);{let H=n(()=>!we()||J()),xe=n(()=>c.editor_fileViewer_download_tooltip());Ce(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Z,get disabled(){return e(H)},get title(){return e(xe)},children:(he,$e)=>{et(he,{get icon(){return jt},size:"sm"})},$$slots:{default:!0}})}var R=p(h,2),O=S(R,!0);x(u);var D=p(u,2),L=S(D);x(a),k(H=>{g(O,e(B)),hr(D,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(Be)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),It(D,`--pan-scroll-x: ${e(Ne)??""}px; --pan-scroll-y: ${e(Le)??""}px;`),at(L,"src",H),at(L,"alt",e(B)),It(L,`translate: ${e(be)??""}px ${e(De)??""}px; transform: scale(${e(se)/100});`)},[()=>_e()]),gt("pointerdown",D,F),gt("pointermove",D,Te),gt("pointerup",D,d),rt("pointercancel",D,d),rt("lostpointercapture",D,d),l(t,a)},ze=t=>{const a=n(M);var u=je(),m=ne(u);Pr(m,()=>re()+e(a),h=>{Dr(h,{get sourceUrl(){return e(a)},get fileName(){return e(B)},get allowDownload(){return we()},get downloading(){return J()},onDownload:Z})}),l(t,u)},mt=t=>{var a=fo(),u=p(T(a),2),m=S(u,!0),h=p(u,2),R=T(h),O=p(R);x(h),x(a),k((D,L)=>{g(m,e(B)),at(R,"src",D),g(O,` ${L??""}`)},[()=>W(),()=>c.editor_fileViewer_audioUnsupported_label()]),l(t,a)},Bt=t=>{var a=po(),u=p(T(a),2),m=S(u,!0),h=p(u,2);{let R=n(()=>!we()||J());Ce(h,{size:"sm",variant:"secondary",onclick:Z,get disabled(){return e(R)},children:(O,D)=>{var L=vo(),H=ne(L);et(H,{get icon(){return jt},size:"sm",class:"mr-2"});var xe=p(H);k(he=>g(xe,` ${he??""}`),[()=>c.editor_fileViewer_downloadPdf_label()]),l(O,L)},$$slots:{default:!0}})}x(a),k(R=>g(m,R),[()=>c.editor_fileViewer_pdfUnavailable_label()]),l(t,a)},Ot=t=>{{let a=n(()=>nt(y().toString()));ar(t,{get value(){return e(a)},language:"json",get fileName(){return re()},lineNumbers:!0,readOnly:!0})}},Oe=t=>{const a=n(()=>st(y().toString()));var u=ho(),m=T(u),h=T(m),R=T(h);Ct(R,23,()=>e(a)[0]||[],(D,L)=>`header-${L}-${D}`,(D,L)=>{var H=go(),xe=S(H,!0);k(()=>g(xe,e(L))),l(D,H)}),x(R),x(h);var O=p(h);Ct(O,23,()=>e(a).slice(1),(D,L)=>`row-${L}`,(D,L,H)=>{var xe=_o();Ct(xe,23,()=>e(L),(he,$e)=>`cell-${e(H)}-${$e}`,(he,$e)=>{var He=mo(),ke=S(He,!0);k(()=>g(ke,e($e))),l(he,He)}),x(xe),l(D,xe)}),x(O),x(m),x(u),l(t,u)},Xe=t=>{var a=wo(),u=p(T(a),2),m=S(u,!0),h=p(u,2),R=S(h,!0);x(a),k(O=>{g(m,e(B)),g(R,O)},[()=>c.editor_fileViewer_archive_label()]),l(t,a)},Ht=t=>{var a=bo(),u=p(T(a),2),m=S(u,!0),h=p(u,2),R=S(h,!0);x(a),k(O=>{g(m,e(B)),g(R,O)},[()=>c.editor_fileViewer_binary_label()]),l(t,a)},St=t=>{{let a=n(()=>y().toString());ar(t,{get value(){return e(a)},get language(){return Pe()},get fileName(){return re()},lineNumbers:!0,highlightActiveLine:!0})}};Q(Ee,t=>{e(V)==="image"?t(Ve):e(V)==="svg"?t(fe,1):e(V)==="video"?t(ze,2):e(V)==="audio"?t(mt,3):e(V)==="pdf"?t(Bt,4):e(V)==="json"?t(Ot,5):e(V)==="csv"?t(Oe,6):e(V)==="archive"?t(Xe,7):e(V)==="binary"?t(Ht,8):t(St,-1)})}return x(ue),l(X,ue),Nt(ut)}Gr(["pointerdown","pointermove","pointerup"]);const yo=/access denied|permission denied|outside (?:the )?workspace/i,Po=/file not found|no such file or directory/i;function $o(X){return yo.test(X)?"access-denied":X===c.files_read_notFound_error()||Po.test(X)?"not-found":"generic"}function ko(X){switch(X){case"access-denied":return c.layout_fileTab_errorAccessDenied_label();case"not-found":return c.layout_fileTab_errorNotFound_label();case"generic":return c.layout_fileTab_errorGeneric_label()}}var Io=P("<!> <!>",1),Co=P("<!> <!> <!>",1),So=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p> </p> <p class="text-xs"> </p></div>'),br=P('<div class="flex h-full items-center justify-center p-4 text-subtle"><p role="alert"> </p></div>'),Fo=P('<div class="flex h-full items-center justify-center text-subtle"><p> </p></div>'),xr=P('<div class="flex items-center justify-center h-full text-subtle"><p> </p></div>'),Do=P('<div class="flex items-center gap-3"><!> <!></div>'),To=P('<div class="flex flex-col h-full"><div class="flex-1 p-4 space-y-2"></div></div>'),Eo=P('<p class="text-xs"> </p>'),Ro=P("<li><!></li>"),Mo=P('<p class="text-xs mt-2"> </p> <ul class="flex flex-col items-center gap-1"></ul>',1),Uo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p class="text-danger" role="alert"> </p> <p class="text-xs font-mono"> </p> <!> <!></div>'),jo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-3 p-4"><p> </p> <p class="text-xs break-all"> </p> <!></div>'),Lo=P('<div class="h-full overflow-auto p-4"><!></div>');function Vo(X,w){if(new.target)return Vt({component:Vo,...X});Wt(w,!0);const ye=()=>ce(Ot,"$workspace",A),ot=()=>ce(_e,"$fileContentStore",A),re=()=>ce(E,"$fileLoadingStore",A),y=()=>ce(oe,"$fileSavingStore",A),ae=()=>ce(Y,"$fileErrorStore",A),Pe=()=>ce(Z,"$fileErrorInfoStore",A),Se=()=>ce(it,"$homeView$",A),we=()=>ce(nt,"$fileNotFoundCandidatesStore",A),ge=()=>ce(st,"$isFileBinaryStore",A),J=()=>ce(ut,"$isFileDirtyStore",A),Ye=()=>ce(ue,"$fileLastUpdatedStore",A),V=()=>ce(Ee,"$ftChanges$",A),B=()=>ce(Bt,"$gutterRead$",A),se=()=>ce(Le,"$lineWrapping",A),me=()=>ce(Be,"$diffIndicators",A),Fe=()=>ce(ze,"$rootMediaPreview",A),[A,be]=ir(),De=r=>{var s=Io(),$=ne(s);{var C=de=>{var Ae=je(),qe=ne(Ae);Rt(qe,()=>Mt,(pt,xt)=>{xt(pt,{get icon(){return Ra},get label(){return e(he)},disabled:!0})}),l(de,Ae)};Q($,de=>{!e(_t)&&!e(b)&&!e(L)&&de(C)})}var le=p($,2);{var Re=de=>{{let Ae=n(()=>!e(Tt)||!e(Ge)),qe=n(()=>!e(b)&&(!e(Tt)||!e(Ge)));Oa(de,{embedded:!0,showFold:!1,showSplit:!1,get showPreview(){return e(Tt)},get previewEnabled(){return e(Ge)},onTogglePreview:()=>f(Ge,!e(Ge)),get showWrap(){return e(Ae)},get wrapEnabled(){return se()},onToggleWrap:()=>j.dispatch(na()),get showDiff(){return e(qe)},get diffEnabled(){return me()},onToggleDiff:()=>j.dispatch(ia())})}};Q(le,de=>{o().filePath&&!e(_t)&&!e(L)&&de(Re)})}l(r,s)},Ne=r=>{var s=je(),$=ne(s);{var C=le=>{var Re=Co(),de=ne(Re);{var Ae=We=>{var Je=je(),dt=ne(Je);{let yt=n(()=>c.layout_fileTab_goToChanges_tooltip());Rt(dt,()=>Mt,(Pt,$t)=>{$t(Pt,{get icon(){return Ua},get label(){return e(yt)},onclick:zr})})}l(We,Je)};Q(de,We=>{e(Rr)&&We(Ae)})}var qe=p(de,2);{var pt=We=>{var Je=je(),dt=ne(Je);{let yt=n(()=>c.layout_fileTab_downloadFile_label()),Pt=n(()=>!e(wt)||e(lt));Rt(dt,()=>Mt,($t,Yt)=>{Yt($t,{get icon(){return jt},get label(){return e(yt)},onclick:Et,get disabled(){return e(Pt)}})})}l(We,Je)};Q(qe,We=>{e(Qe)&&We(pt)})}var xt=p(qe,2);{let We=n(()=>c.layout_fileTab_deleteFile_tooltip());Rt(xt,()=>Mt,(Je,dt)=>{dt(Je,{get icon(){return Ma},get label(){return e(We)},onclick:Ar,destructive:!0})})}l(le,Re)};Q($,le=>{o().filePath&&!e(_t)&&!e(b)&&le(C)})}l(r,s)},Le=Ha(),Be=qa();let o=ee(w,"tab",7),i=ee(w,"workspaceId",7),F=ee(w,"isActive",7),Te=ee(w,"isPanelFocused",7);pe(()=>{const r=i();if(!(!F()||!r||e(d)))return j.dispatch(ta(r,"files")),()=>j.dispatch(ra(r,"files"))});const d=n(()=>typeof o().data?.gitRootId=="string"?o().data.gitRootId:void 0),I=n(()=>typeof o().data?.gitRootPath=="string"?o().data.gitRootPath:void 0),b=n(()=>!!e(d)),W=n(()=>o().filePath?Ia(o().filePath,e(d)):o().filePath),M=Jr(e(W));pe(()=>{M.set(e(W))});const _e=pa(i(),M),E=ga(i(),M),oe=ma(i(),M),Y=_a(i(),M),Z=ha(i(),M),it=Qa(i()),nt=wa(i(),M),st=ba(i(),M),ut=mr(i(),M),ue=xa(i(),M),Ee=ya(i()),Ve=va(),fe=crypto.randomUUID(),ze=Fr(fe),mt=`file-gutter:${crypto.randomUUID()}`,Bt=Pa(i(),mt),Ot=$a(i()),Oe=n(()=>ye()?.worktreePath||ye()?.repositoryPath||ye()?.path||null),Xe=n(ot),Ht=Xa();pe(()=>{e(Xe)!==null&&e(Xe)!==void 0&&Ht?.markContentLoaded()});const St=n(re),t=n(y),a=n(ae),u=n(()=>e(a)?$o(e(a)):"generic"),m=n(()=>e(a)?Ja(Pe()):null);let h=N(0),R=!1;pe(()=>{const r=Se();if(!r||r.unavailable){R=!1;return}e(m)&&!R&&(R=!0,rr(()=>Ut(h)))});const O=5,D=n(()=>(we()??[]).slice(0,O)),L=n(ge),H=n(J),xe=n(Ye),he=n(()=>e(t)?c.ui_saveIndicator_saving_tooltip():e(H)?c.ui_saveIndicator_autoSaving_tooltip():c.ui_saveIndicator_saved_tooltip());let $e=N(null),He=N(Zr([])),ke=N(null),Ft=N(void 0),Dt=N(void 0),Ge=N(!0);pe(()=>{const r=o().data?.line,s=o().data?.jumpTimestamp;!r||s!==void 0&&s===e(Dt)||(f(Dt,s,!0),f(Ft,{line:r},!0),f(Ge,!1))});const Ie=n(()=>e(d)?_r(o().filePath,e(I)):null),_t=n(()=>e(d)?!e(Ie):!!(o().filePath&&(Va(o().filePath)||e(Oe)&&za(o().filePath,e(Oe))))),ht=n(()=>o().filePath&&e(Oe)?er(o().filePath)?o().filePath:`${e(Oe)}/${o().filePath}`:null),ft=n(()=>!!o().filePath&&/\.pdf$/i.test(o().filePath)),vt=n(()=>!!o().filePath&&/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(o().filePath)),Qe=n(()=>i()&&/^[A-Za-z0-9._-]+$/.test(i())?_r(o().filePath,e(Oe)):null),Tr=n(()=>!e(d)&&e(Qe)?e(Qe).split("/").slice(0,-1).join("/"):void 0),qt=n(()=>e(ft)||e(vt)?e(Qe):null),nr=n(()=>e(d)&&e(vt)?{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",mp4:"video/mp4",webm:"video/webm"}[o().filePath?.split(".").pop()?.toLowerCase()??""]:void 0);pe(()=>{if(!F()||!e(d)||!e(Ie)||!e(nr))return;const r=crypto.randomUUID();return j.dispatch(Ir(fe,r,i(),e(Ie),{gitRootId:e(d),mimeType:e(nr)})),()=>j.dispatch(Cr(fe,r))});let lt=N(!1);const wt=n(()=>!!e(Qe)&&!e(St)&&(!e(vt)||e(ke)===e(Qe))),sr=n(()=>e(ke)&&i()?`workspace-file://${i()}/${e(ke).split("/").map(encodeURIComponent).join("/")}`:null),Kt=n(()=>o().filePath?da(o().filePath):"plaintext"),Tt=n(()=>e(Kt)==="markdown");pe(()=>{if(!F()||e(ft)||e(d))return;const r=e(qt),s=o().filePath,$=i(),C=o().id;if(f(ke,null),!r||!s||!$)return;let le=!1;const Re=()=>!le&&i()===$&&o().id===C&&o().filePath===s;return(async()=>{let de=!1;try{de=(await Ca("file.stat",{workspaceId:$,path:r}))?.isFile===!0}catch{}if(!Re())return;if(de){f(ke,r,!0);return}if(!/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(r)){f(ke,r,!0);return}const{candidates:Ae,truncated:qe}=await La($,r);if(Re()){if(!qe&&Ae.length===1){j.dispatch(fr($,s,Ae[0],C));return}f(ke,r,!0)}})(),()=>{le=!0}});function Er(r,s){return!!(r.file===s||r.relativePath===s||r.relativePath&&s.endsWith("/"+r.relativePath)||r.file&&s.endsWith("/"+r.file)||r.relativePath&&r.relativePath.endsWith("/"+s)||r.file&&r.file.endsWith("/"+s))}const bt=n(()=>e(b)||!o().filePath?null:V().find(r=>Er(r,o().filePath))??null),Rr=n(()=>!!e(bt));pe(()=>{if(e(b))return;const r=i(),s=o().filePath,$=e(Oe);return()=>{if(!r||!s)return;const C=Zt.select(j.state,r,s);if(C?.kind!=="editable-text")return;const le=Jt(C.localContent),Re=mr.select(j.state,r,s),de=er(s)?s:$?`${$}/${s}`:null;Re&&de&&j.dispatch(vr(r,s,de,le))}}),pe(()=>{const r=o().filePath,s=e(ht),$=i();if(e(h),!F())return;const C=!e(d)&&!!r&&er(r)&&!e(Oe);r&&$&&!e(_t)&&!e(vt)&&!e(ft)&&!C&&(e(d)&&e(Ie)&&e(W)?j.dispatch(pr($,e(W),s??r,{gitRoot:{id:e(d),relativePath:e(Ie)}})):j.dispatch(pr($,r,s??r)))});function Mr(){return e(Xe)??""}function Ur(r){e(b)||e(L)||!o().filePath||!i()||!e(ht)||j.dispatch(fa(i(),o().filePath,Jt(r)))}function jr(){if(e(b)||e(L)||!o().filePath||!e(ht)||e(Xe)===null||e(t))return;const r=Zt.select(j.state,i(),o().filePath);r?.kind==="editable-text"&&j.dispatch(vr(i(),o().filePath,e(ht),Jt(r.localContent)))}function Lr(r){const s=o().filePath;!s||!i()||(j.dispatch(ua(i(),s)),j.dispatch(fr(i(),s,r,o().id)))}pe(()=>{const r=o().filePath,s=e(bt);if(!r||!s){f(He,[],!0);return}if(!F())return;const $=i(),C=crypto.randomUUID();return j.dispatch(aa($,mt,C,{kind:"diffs",path:r,staged:s.stage==="staged"})),()=>{j.dispatch(oa($,mt,C))}}),pe(()=>{const r=B(),s=r?.result?.kind==="diffs"?r.result.chunks:[],$=s.find(C=>C.file===o().filePath)??s[0];f(He,$?Aa($.chunks.map(C=>({oldStart:C.oldStart,oldLines:C.oldLines,newStart:C.newStart,newLines:C.newLines,lines:C.lines.map(le=>(le.type===gr.Addition?"+":le.type===gr.Deletion?"-":" ")+le.content)}))):[],!0)});function Vr(r){const s=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),$=Re=>Ya(r,Ka(Re),s);if($("editor.save")){r.preventDefault(),e(H)&&!e(t)&&jr();return}const C=$("editor.undo")?"undo":$("editor.redo")?"redo":$("editor.toggle-task-list")?"toggle-task-list":$("editor.copy")?"copy":$("editor.select-all")?"select-all":null;if(!C||e(b)&&C!=="copy"&&C!=="select-all")return;C!=="toggle-task-list"&&e($e)?.runShortcut(C)&&r.preventDefault()}function zr(r){if(!o().filePath||!e(bt))return;const s=r?.metaKey||r?.ctrlKey||!1,C=r?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;j.dispatch(ca(i(),e(bt),{filePath:o().filePath,changeId:e(bt).id,openInAdjacentPanel:s,sourcePanelId:C}))}async function Et(){const r=e(Qe);if(!(e(b)||!r||!i()||!e(wt)||e(lt))){f(lt,!0);try{const s=await ka(i(),r,e(Oe));!s?.success&&!s?.canceled&&Qt.error(s?.error?.message||c.layout_fileTab_downloadFailed_error())}catch{Qt.error(c.layout_fileTab_downloadFailed_error())}finally{f(lt,!1)}}}function Ar(){const r=e(ht);if(e(b)||!o().filePath||!i()||!r)return;const s=sa(Zt.select(j.state,i(),o().filePath));if(!s){Qt.error(c.ui_reversibleActions_failed_error({message:c.fileExplorer_tree_undoUnavailable_error()}));return}j.dispatch(la(i(),o().filePath,{absolutePath:r,tabId:o().id,snapshot:s}))}pe(()=>{if(!Ve||!F())return;const r={isDirty:!e(b)&&e(H),isSaving:!e(b)&&e(t)};rr(()=>{Ve.registerActions({display:De,actions:Ne}),Ve.registerState(r)})});var Wr={get tab(){return o()},set tab(r){o(r),te()},get workspaceId(){return i()},set workspaceId(r){i(r),te()},get isActive(){return F()},set isActive(r){F(r),te()},get isPanelFocused(){return Te()},set isPanelFocused(r){Te(r),te()},$set:zt,$on:(r,s)=>At(w,r,s)},lr=je();rt("keydown",yr,r=>F()&&Vr(r));var Nr=ne(lr);{var Br=r=>{var s=je(),$=ne(s);Pr($,()=>o().filePath,C=>{var le=je(),Re=ne(le);{var de=_=>{var v=So(),U=T(v),q=S(U,!0),z=p(U,2),Me=S(z,!0);x(v),k(G=>{g(q,G),g(Me,o().filePath)},[()=>c.layout_fileTab_outsideWorkspace_label()]),l(_,v)},Ae=_=>{var v=je(),U=ne(v);{var q=z=>{or(z,{get workspaceId(){return i()},get filePath(){return e(Ie)},get gitRootId(){return e(d)}})};Q(U,z=>{F()&&z(q)})}l(_,v)},qe=_=>{var v=je(),U=ne(v);{var q=G=>{var K=br(),ie=T(K),Ue=S(ie,!0);x(K),k(ve=>g(Ue,ve),[()=>c.layout_fileTab_errorLoading_label()]),l(G,K)},z=G=>{Lt(G,{get filePath(){return o().filePath},get sourceUrl(){return Fe().url},allowDownload:!1})},Me=G=>{var K=Fo(),ie=T(K),Ue=S(ie,!0);x(K),k(ve=>g(Ue,ve),[()=>c.layout_fileTab_preparing_label()]),l(G,K)};Q(U,G=>{Fe()?.error?G(q):Fe()?.url?G(z,1):G(Me,-1)})}l(_,v)},pt=_=>{var v=je(),U=ne(v);{var q=z=>{or(z,{get workspaceId(){return i()},get filePath(){return e(qt)}})};Q(U,z=>{F()&&z(q)})}l(_,v)},xt=_=>{var v=br(),U=T(v),q=S(U,!0);x(v),k(z=>g(q,z),[()=>c.file_pdf_load_error()]),l(_,v)},We=_=>{{let v=n(()=>e(ke)??o().filePath),U=n(()=>!e(b)&&e(wt));Lt(_,{get filePath(){return e(v)},get sourceUrl(){return e(sr)},onDownload:Et,get allowDownload(){return e(U)},get downloading(){return e(lt)}})}},Je=_=>{var v=xr(),U=T(v),q=S(U,!0);x(v),k(z=>g(q,z),[()=>c.layout_fileTab_preparing_label()]),l(_,v)},dt=_=>{var v=To(),U=T(v);Ct(U,20,()=>[...Array(20).keys()],q=>q,(q,z)=>{var Me=Do(),G=T(Me);wr(G,{class:"h-3 w-8 shrink-0"});var K=p(G,2);wr(K,{class:"h-3",style:`width: ${30+Math.random()*60}%`}),x(Me),l(q,Me)}),x(U),x(v),l(_,v)},yt=_=>{{let v=n(()=>Za(e(m)));Ga(_,{get view(){return e(v)}})}},Pt=_=>{var v=Uo(),U=T(v),q=S(U,!0),z=p(U,2),Me=S(z,!0),G=p(z,2);{var K=ve=>{var Ke=Eo(),ct=S(Ke,!0);k(()=>g(ct,e(a))),l(ve,Ke)};Q(G,ve=>{e(u)==="generic"&&ve(K)})}var ie=p(G,2);{var Ue=ve=>{var Ke=Mo(),ct=ne(Ke),Xt=S(ct,!0),dr=p(ct,2);Ct(dr,20,()=>e(D),kt=>kt,(kt,cr)=>{var Gt=Ro(),qr=T(Gt);Ce(qr,{variant:"link",size:"compact",class:"h-auto p-0 font-mono text-xs",onclick:()=>Lr(cr),children:(Kr,zo)=>{Ze();var ur=tt();k(()=>g(ur,cr)),l(Kr,ur)},$$slots:{default:!0}}),x(Gt),l(kt,Gt)}),x(dr),k(kt=>g(Xt,kt),[()=>c.layout_fileTab_didYouMean_label()]),l(ve,Ke)};Q(ie,ve=>{e(D).length>0&&ve(Ue)})}x(v),k(ve=>{g(q,ve),g(Me,o().filePath)},[()=>ko(e(u))]),l(_,v)},$t=_=>{var v=jo(),U=T(v),q=S(U,!0),z=p(U,2),Me=S(z,!0),G=p(z,2);{var K=ie=>{{let Ue=n(()=>!e(wt)||e(lt));Ce(ie,{variant:"secondary",size:"sm",onclick:Et,get disabled(){return e(Ue)},children:(ve,Ke)=>{Ze();var ct=tt();k(Xt=>g(ct,Xt),[()=>c.layout_fileTab_downloadFile_label()]),l(ve,ct)},$$slots:{default:!0}})}};Q(G,ie=>{!e(b)&&e(Qe)&&ie(K)})}x(v),k(ie=>{g(q,ie),g(Me,o().filePath)},[()=>c.editor_fileViewer_binary_label()]),l(_,v)},Yt=_=>{const v=n(()=>o().filePath?.toLowerCase().endsWith(".svg"));var U=je(),q=ne(U);{var z=K=>{{let ie=n(()=>o().filePath||""),Ue=n(()=>!e(b)&&e(wt));Lt(K,{get filePath(){return e(ie)},get fileContent(){return e(Xe)},get language(){return e(Kt)},get isBinary(){return e(L)},onDownload:Et,get allowDownload(){return e(Ue)},get downloading(){return e(lt)}})}},Me=K=>{var ie=Lo(),Ue=T(ie);Wa(Ue,{get content(){return e(Xe)},get workspaceId(){return i()},get relativeMediaBase(){return e(Tr)},renderRichFencesAsCode:!0,renderDiagrams:!0}),x(ie),l(K,ie)},G=K=>{var ie=Mr,Ue=Ur;{let ve=n(()=>me()?e(He):[]);$r(ar(K,{get value(){return ie()},set value(Ke){Ue(Ke)},get language(){return e(Kt)},get readOnly(){return e(b)},get fileName(){return o().filePath},get workspaceId(){return i()},get filePath(){return o().filePath},get lineWrapping(){return se()},get lineChanges(){return e(ve)},get jumpTo(){return e(Ft)},get externalContentVersion(){return e(xe)},get isPanelFocused(){return Te()}}),Ke=>f($e,Ke,!0),()=>e($e))}};Q(q,K=>{e(v)?K(z):e(Tt)&&e(Ge)?K(Me,1):K(G,-1)})}l(_,U)},Hr=_=>{var v=xr(),U=T(v),q=S(U,!0);x(v),k(z=>g(q,z),[()=>c.layout_fileTab_preparing_label()]),l(_,v)};Q(Re,_=>{e(_t)?_(de):e(d)&&e(ft)&&e(Ie)?_(Ae,1):e(d)&&e(vt)?_(qe,2):e(ft)&&e(qt)?_(pt,3):e(ft)?_(xt,4):e(sr)?_(We,5):e(vt)?_(Je,6):e(St)?_(dt,7):e(m)?_(yt,8):e(a)?_(Pt,9):e(L)?_($t,10):e(Xe)!==null?_(Yt,11):_(Hr,-1)})}l(C,le)}),l(r,s)};Q(Nr,r=>{o().filePath&&r(Br)})}l(X,lr);var Or=Nt(Wr);return be(),Or}export{Vo as default};
1
+ import{t as Vt,bo as ee,_ as Yr,bw as zt,bs as ce,bq as ir,b as At,bm as c}from"./CP7YuMeh.js";import{bs as Wt,ca as pe,aD as e,bH as f,a5 as T,bA as x,W as l,bn as Nt,bV as N,c9 as n,aA as te,c6 as Ut,ay as ne,be as Ze,b$ as tt,b_ as k,bO as g,bS as p,bl as S,aB as P,bj as Xr,aw as rt,ai as Gr,c5 as rr,a as yr,a7 as je,aj as gt,cd as Jr,br as Zr}from"./CJxGDkBm.js";import{i as Q}from"./D-7NlBP9.js";import{k as Pr}from"./BNCbX7ks.js";import{g as Ct}from"./D37abooi.js";import{c as Rt}from"./BlMDLo1p.js";import{b as $r}from"./NtFyWdpR.js";import{I_ as j,nL as kr,vY as Ir,vX as Cr,Le as Qr,Lf as ea,eB as ta,eC as ra,KG as fr,lW as Jt,C8 as vr,sp as pr,o7 as aa,zM as oa,a8 as gr,Jx as ia,JN as na,nl as sa,iM as la,nN as da,vp as ca,A7 as ua,KF as fa}from"./R0MaWbXb.js";import{g as va}from"./BrMXrCxP.js";import{a as pa,h as ga,j as ma,c as _a,d as ha,i as wa,e as ba,f as mr,g as xa,b as Zt}from"./ByjIYjlL.js";import{bL as ya,bY as Pa,dD as $a}from"./XVOmAVkm.js";import{w as _r,d as ka}from"./r6lTa47w.js";import{f as Ia}from"./j0LslCAy.js";import{m as Qt}from"./BwmV61YP.js";import{f as Ce}from"./EHSwEMpb.js";import{h as Ca}from"./BxW5KyMH.js";import"./o_xwUHUt.js";import{s as at,g as It,f as hr}from"./CPIQ_KTl.js";import{F as et,ac as Sa,au as Fa,aZ as Da,b3 as jt,ct as Ta,cu as Ea,bm as Ra,cS as Ma,c9 as Ua}from"./D-6tK-mW.js";import{E as ja,b as La,S as wr}from"./mQ4MH-tV.js";import{c as Va}from"./ChTqQfQN.js";import"./Br9QHzNh.js";import{$ as za}from"./CdtD_Pls.js";import{i as er,b as Aa,a as Wa}from"./H2jLkRRS.js";import{C as ar,p as Na}from"./DEDVy4_0.js";import{M as Ba}from"./Ae4NLLo7.js";import{l as tr,m as Sr}from"./DoKfR2tM.js";import"./CsZB1L8p.js";import"./CXNFHS6a.js";import{M as Mt}from"./C1TCPb-1.js";import{V as Oa}from"./DQOW95_s.js";import{bT as Ha,b7 as qa}from"./DNLHkust.js";import{g as Ka}from"./BE6ifuX1.js";import{G as Ya}from"./BzSCYrIF.js";import{g as Xa,W as Ga}from"./BJ_tOrj6.js";import{b as Ja,h as Za}from"./BF8nXhuw.js";import{t as Qa}from"./DgIx8gya.js";const Fr=j.createSelector((X,w)=>kr(X.pdfPreview.previews,w));var eo=P('<div class="flex shrink-0 flex-wrap items-center justify-center gap-2 border-b border-border p-2"><!> <span aria-live="polite"> </span> <!> <!> <span> </span> <!></div> <div class="min-h-0 flex-1 overflow-auto p-4"><canvas class="mx-auto block" role="img"></canvas></div>',1),to=P('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function or(X,w){if(new.target)return Vt({component:or,...X});Wt(w,!0);const ye=()=>ce(we,"$preview",ot),[ot,re]=ir();let y=ee(w,"workspaceId",7),ae=ee(w,"filePath",7),Pe=ee(w,"gitRootId",7);const Se=crypto.randomUUID(),we=Fr(Se),ge=new WeakMap;let J=N(null),Ye=N(void 0),V=N(1),B=N(1),se=N(!0),me=N(!1),Fe=N(null),A=N(0);const be=n(()=>ye()?.error??e(Fe)),De=n(()=>e(be)==="missing"?c.file_pdf_missing_error():e(be)==="large"?c.file_pdf_large_error():e(be)==="invalid"?c.file_pdf_invalid_error():e(be)==="password"?c.file_pdf_password_error():c.file_pdf_load_error());pe(()=>{const d=y(),I=ae();e(A);const b=crypto.randomUUID();return j.dispatch(Ir(Se,b,d,I,...Pe()?[{gitRootId:Pe()}]:[])),()=>{j.dispatch(Cr(Se,b))}}),pe(()=>{const d=ye()?.url;let I=!1,b;if(f(J,null),f(Fe,null),f(se,!0),f(V,1),f(B,1),!!d)return(async()=>{try{const{loadPdfDocument:W}=await Yr(async()=>{const{loadPdfDocument:_e}=await import("./cb1JHFKl.js");return{loadPdfDocument:_e}},[],import.meta.url);if(I)return;b=W(d);const M=await b.promise;I||f(J,M)}catch(W){if(I)return;f(Fe,W instanceof Error&&W.name==="PasswordException"?"password":W instanceof Error&&W.name==="InvalidPDFException"?"invalid":"load",!0)}finally{I||f(se,!1)}})(),()=>{I=!0,b?.destroy()}}),pe(()=>{const d=e(J),I=e(Ye),b=e(V),W=e(B);if(!d||!I)return;let M=!1,_e,E;const oe=()=>{if(!E)return;const Y=(ge.get(E)??1)-1;Y?ge.set(E,Y):(ge.delete(E),E.cleanup()),E=void 0};return f(me,!0),(async()=>{try{if(E=await d.getPage(b),ge.set(E,(ge.get(E)??0)+1),M){oe();return}const Y=E.getViewport({scale:W}),Z=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(Y.width*Y.height)));I.width=Math.ceil(Y.width*Z),I.height=Math.ceil(Y.height*Z),I.style.width=`${Y.width}px`,I.style.height=`${Y.height}px`,_e=E.render({canvas:I,viewport:Y,transform:[Z,0,0,Z,0,0]}),await _e.promise}catch{M||f(Fe,"invalid")}finally{M||f(me,!1)}})(),()=>{M=!0,_e?.cancel(),_e?_e.promise.then(oe,oe):oe()}});var Ne={get workspaceId(){return y()},set workspaceId(d){y(d),te()},get filePath(){return ae()},set filePath(d){ae(d),te()},get gitRootId(){return Pe()},set gitRootId(d){Pe(d),te()},$set:zt,$on:(d,I)=>At(w,d,I)},Le=to(),Be=T(Le);{var o=d=>{{const I=W=>{Ze();var M=tt();k(()=>g(M,e(De))),l(W,M)};let b=n(()=>c.ui_combobox_retry_label());ja(d,{onRetry:()=>Ut(A),get retryLabel(){return e(b)},class:"m-auto",message:I,$$slots:{message:!0}})}},i=d=>{{let I=n(()=>c.file_pdf_loading_label());La(d,{get label(){return e(I)},count:1,class:"p-4"})}},F=d=>{var I=eo(),b=ne(I),W=T(b);{let ue=n(()=>e(V)<=1);Ce(W,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Ut(V,-1),children:(Ee,Ve)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.file_pdf_previous_label()]),l(Ee,fe)},$$slots:{default:!0}})}var M=p(W,2),_e=S(M,!0),E=p(M,2);{let ue=n(()=>e(V)>=e(J).numPages);Ce(E,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Ut(V),children:(Ee,Ve)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.file_pdf_next_label()]),l(Ee,fe)},$$slots:{default:!0}})}var oe=p(E,2);{let ue=n(()=>e(B)<=.25);Ce(oe,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.max(.25,e(B)-.25),!0),children:(Ee,Ve)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.editor_fileViewer_zoomOut_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}var Y=p(oe,2),Z=S(Y,!0),it=p(Y,2);{let ue=n(()=>e(B)>=3);Ce(it,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.min(3,e(B)+.25),!0),children:(Ee,Ve)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.editor_fileViewer_zoomIn_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}x(b);var nt=p(b,2),st=T(nt);let ut;$r(st,ue=>f(Ye,ue),()=>e(Ye)),x(nt),k((ue,Ee,Ve)=>{g(_e,ue),g(Z,Ee),at(nt,"aria-busy",e(me)),at(st,"aria-label",Ve),ut=It(st,"",ut,{visibility:e(me)?"hidden":"visible"})},[()=>c.file_pdf_page_label({page:tr(e(V)),total:tr(e(J).numPages)}),()=>Sr(e(B),{style:"percent"}),()=>c.file_pdf_canvas_ariaLabel({name:ae(),page:tr(e(V))})]),l(d,I)};Q(Be,d=>{e(be)?d(o):e(se)||ye()?.status==="loading"?d(i,1):e(J)&&d(F,2)})}x(Le),l(X,Le);var Te=Nt(Ne);return re(),Te}const ro=j.createSelector((X,w)=>kr(X.videoPreview.previews,w));var ao=P('<p role="status"> </p>'),oo=P('<p role="alert"> </p>'),io=P('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),no=P('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),so=P('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Dr(X,w){if(new.target)return Vt({component:Dr,...X});Wt(w,!0);const ye=()=>ce(Ye,"$preview",ot),[ot,re]=ir();let y=ee(w,"sourceUrl",7),ae=ee(w,"fileName",7),Pe=ee(w,"allowDownload",7),Se=ee(w,"downloading",7),we=ee(w,"onDownload",7),ge=N(null);const J=crypto.randomUUID(),Ye=ro(J),V=n(()=>ye()?.status==="loading"),B=n(()=>e(ge)??ye()?.error);let se=!1,me=!1;Xr(()=>{me=!0,j.dispatch(Qr(J))});function Fe(){if(me||e(V))return;const i=y().startsWith("workspace-file://")?new URL(y()):null;if(se||!i||!i.pathname.toLowerCase().endsWith(".mp4")){f(ge,"unsupported");return}se=!0,i.searchParams.set("preview","h264"),j.dispatch(ea(J,i.hostname,i.toString()))}function A(i){if(me)return;const F=i.currentTarget.error?.code;F===2?f(ge,"network"):F!==1&&Fe()}var be={get sourceUrl(){return y()},set sourceUrl(i){y(i),te()},get fileName(){return ae()},set fileName(i){ae(i),te()},get allowDownload(){return Pe()},set allowDownload(i){Pe(i),te()},get downloading(){return Se()},set downloading(i){Se(i),te()},get onDownload(){return we()},set onDownload(i){we(i),te()},$set:zt,$on:(i,F)=>At(w,i,F)},De=so(),Ne=T(De);{var Le=i=>{var F=io(),Te=T(F),d=S(Te,!0),I=p(Te,2);{var b=E=>{var oe=ao(),Y=S(oe,!0);k(Z=>g(Y,Z),[()=>c.editor_fileViewer_videoPreparing_label()]),l(E,oe)},W=E=>{var oe=oo(),Y=S(oe,!0);k(Z=>g(Y,Z),[()=>e(B)==="network"?c.editor_fileViewer_videoLoad_error():c.editor_fileViewer_videoUnsupported_label()]),l(E,oe)};Q(I,E=>{e(V)?E(b):E(W,-1)})}var M=p(I,2);{var _e=E=>{Ce(E,{variant:"secondary",size:"sm",get onclick(){return we()},get disabled(){return Se()},children:(oe,Y)=>{Ze();var Z=tt();k(it=>g(Z,it),[()=>c.layout_fileTab_downloadFile_label()]),l(oe,Z)},$$slots:{default:!0}})};Q(M,E=>{Pe()&&E(_e)})}x(F),k(()=>g(d,ae())),l(i,F)},Be=i=>{var F=no(),Te=S(F,!0);k(d=>{at(F,"src",ye()?.url??y()),g(Te,d)},[()=>c.editor_fileViewer_videoUnsupported_label()]),rt("error",F,A),rt("loadedmetadata",F,d=>{d.currentTarget.videoWidth===0&&Fe()}),l(i,F)};Q(Ne,i=>{e(B)||e(V)?i(Le):i(Be,-1)})}x(De),l(X,De);var o=Nt(be);return re(),o}var lo=P('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),co=P('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="w-px h-5 bg-border mx-1"></div> <!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),uo=P('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),fo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"></path></svg></div> <div class="text-sm text-subtle mb-4"> </div> <audio controls="" class="w-full max-w-md"><source/> </audio></div>'),vo=P("<!> ",1),po=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg></div> <p class="text-sm text-subtle mb-4"> </p> <!></div>'),go=P('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),mo=P('<td class="border border-border px-2 py-1 text-xs"> </td>'),_o=P("<tr></tr>"),ho=P('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),wo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),bo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),xo=P('<div class="h-full flex flex-col"><!></div>');function Lt(X,w){if(new.target)return Vt({component:Lt,...X});Wt(w,!0);const ye=t=>{var a=lo(),u=ne(a);{let O=n(()=>c.editor_fileViewer_zoomOut_tooltip());Ce(u,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:oe,get title(){return e(O)},children:(D,L)=>{et(D,{get icon(){return Ta},size:"sm"})},$$slots:{default:!0}})}var m=p(u,2),h=S(m,!0),R=p(m,2);{let O=n(()=>c.editor_fileViewer_zoomIn_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:E,get title(){return e(O)},children:(D,L)=>{et(D,{get icon(){return Ea},size:"sm"})},$$slots:{default:!0}})}Ze(2),k(()=>g(h,e(Fe))),l(t,a)},ot=Va("FileViewer");let re=ee(w,"filePath",7),y=ee(w,"fileContent",7,""),ae=ee(w,"sourceUrl",7),Pe=ee(w,"language",7),Se=ee(w,"isBinary",7),we=ee(w,"allowDownload",7,!0),ge=ee(w,"onDownload",7),J=ee(w,"downloading",7,!1);const Ye=t=>{const a=t.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","webp","bmp","ico","avif"].includes(a)?"image":a==="svg"?"svg":["mp4","webm","ogg","mov","avi"].includes(a)?"video":["mp3","wav","ogg","m4a","flac"].includes(a)?"audio":a==="pdf"?"pdf":["md","markdown"].includes(a)?"markdown":a==="json"?"json":a==="csv"?"csv":["yaml","yml"].includes(a)?"yaml":a==="xml"?"xml":["zip","tar","gz","rar","7z","bz2"].includes(a)?"archive":["exe","dll","so","dylib","wasm"].includes(a)?"binary":"text"},V=n(()=>Ye(re())),B=n(()=>re().split("/").pop()||c.editor_fileViewer_unknown_fallback());let se=N(100),me=N(0);const Fe=n(()=>Sr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let A=N(!1),be=N(0),De=N(0),Ne=N(0),Le=N(0),Be=N(!1),o=null;function i(){const t=o;o=null,f(Be,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function F(t){if(t.button!==0||!t.isPrimary||o)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),o={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},f(Be,!0),t.preventDefault()}function Te(t){if(!(!o||t.pointerId!==o.pointerId)){if((t.buttons&1)===0){i();return}f(Ne,o.viewport.scrollLeft,!0),f(Le,o.viewport.scrollTop,!0),f(be,e(be)+(t.clientX-o.x)),f(De,e(De)+(t.clientY-o.y)),o.x=t.clientX,o.y=t.clientY}}function d(t){t.pointerId===o?.pointerId&&i()}pe(()=>{re(),ae(),e(se),e(me),f(Ne,0),f(Le,0)}),pe(()=>(re(),ae(),rr(()=>{i(),f(be,0),f(De,0)}),i));const I=t=>{const a=t.split(".").pop()?.toLowerCase();return a==="jpg"||a==="jpeg"?"image/jpeg":a==="png"?"image/png":a==="gif"?"image/gif":a==="webp"?"image/webp":"application/octet-stream"},b=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},W=()=>{if(ae())return ae();if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():Se()?`data:${I(re())};base64,${y()}`:`data:${I(re())};base64,${y()}`;if(y()instanceof ArrayBuffer){const a=new Uint8Array(y()).reduce((m,h)=>m+String.fromCharCode(h),""),u=btoa(a);return`data:${I(re())};base64,${u}`}return""},M=()=>{if(ae())return ae();const t=b(re());if(!t)return"";if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():`data:${t};base64,${y()}`;const a=new Uint8Array(y()),u=[],m=32768;for(let h=0;h<a.length;h+=m)u.push(String.fromCharCode(...a.subarray(h,h+m)));return`data:${t};base64,${btoa(u.join(""))}`},_e=()=>{const t=typeof y()=="string"?new TextEncoder().encode(y()):new Uint8Array(y()),a=[],u=32768;for(let m=0;m<t.length;m+=u)a.push(String.fromCharCode(...t.subarray(m,m+u)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},E=()=>{f(se,Math.min(e(se)+25,500),!0)},oe=()=>{f(se,Math.max(e(se)-25,25),!0)},Y=()=>{f(me,(e(me)+90)%360)},Z=()=>{if(!we()||J())return;if(ge()){ge()();return}const t=document.createElement("a");t.href=e(V)==="video"?M():e(V)==="svg"?_e():W(),t.download=e(B),t.click()},it=async()=>{try{const t=W(),a=new Image;a.crossOrigin="anonymous";const u=await new Promise((m,h)=>{a.onload=()=>{const R=document.createElement("canvas");R.width=a.naturalWidth,R.height=a.naturalHeight;const O=R.getContext("2d");if(!O){h(new Error("Failed to get canvas context"));return}O.drawImage(a,0,0),R.toBlob(D=>{D?m(D):h(new Error("Failed to create blob from canvas"))},"image/png",1)},a.onerror=()=>h(new Error("Failed to load image")),a.src=t});await navigator.clipboard.write([new ClipboardItem({"image/png":u})]),f(A,!0),setTimeout(()=>f(A,!1),2e3)}catch(t){ot.error("Failed to copy image:",t)}},nt=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},st=t=>t.split(`
2
+ `).map(u=>u.split(",").map(m=>m.trim()));var ut={get filePath(){return re()},set filePath(t){re(t),te()},get fileContent(){return y()},set fileContent(t=""){y(t),te()},get sourceUrl(){return ae()},set sourceUrl(t){ae(t),te()},get language(){return Pe()},set language(t){Pe(t),te()},get isBinary(){return Se()},set isBinary(t){Se(t),te()},get allowDownload(){return we()},set allowDownload(t=!0){we(t),te()},get onDownload(){return ge()},set onDownload(t){ge(t),te()},get downloading(){return J()},set downloading(t=!1){J(t),te()},$set:zt,$on:(t,a)=>At(w,t,a)},ue=xo();rt("blur",yr,i);var Ee=T(ue);{var Ve=t=>{var a=co(),u=T(a),m=T(u);ye(m);var h=p(m,2);{let he=n(()=>c.editor_fileViewer_rotate_tooltip());Ce(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Y,get title(){return e(he)},children:($e,He)=>{et($e,{get icon(){return Sa},size:"sm"})},$$slots:{default:!0}})}var R=p(h,4);{let he=n(()=>c.editor_fileViewer_copyImage_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:it,get title(){return e(he)},children:($e,He)=>{var ke=je(),Ft=ne(ke);{var Dt=Ie=>{et(Ie,{get icon(){return Fa},size:"sm",class:"text-green-500"})},Ge=Ie=>{et(Ie,{get icon(){return Da},size:"sm"})};Q(Ft,Ie=>{e(A)?Ie(Dt):Ie(Ge,-1)})}l($e,ke)},$$slots:{default:!0}})}var O=p(R,2);{let he=n(()=>!we()||J()),$e=n(()=>c.editor_fileViewer_download_tooltip());Ce(O,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Z,get disabled(){return e(he)},get title(){return e($e)},children:(He,ke)=>{et(He,{get icon(){return jt},size:"sm"})},$$slots:{default:!0}})}var D=p(O,2),L=S(D,!0);x(u);var H=p(u,2),xe=S(H);x(a),k(he=>{g(L,e(B)),hr(H,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(Be)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),It(H,`--pan-scroll-x: ${e(Ne)??""}px; --pan-scroll-y: ${e(Le)??""}px;`),at(xe,"src",he),at(xe,"alt",e(B)),It(xe,`translate: ${e(be)??""}px ${e(De)??""}px; transform: scale(${e(se)/100}) rotate(${e(me)??""}deg); transition: transform 0.2s;`)},[()=>W()]),gt("pointerdown",H,F),gt("pointermove",H,Te),gt("pointerup",H,d),rt("pointercancel",H,d),rt("lostpointercapture",H,d),l(t,a)},fe=t=>{var a=uo(),u=T(a),m=T(u);ye(m);var h=p(m,2);{let H=n(()=>!we()||J()),xe=n(()=>c.editor_fileViewer_download_tooltip());Ce(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Z,get disabled(){return e(H)},get title(){return e(xe)},children:(he,$e)=>{et(he,{get icon(){return jt},size:"sm"})},$$slots:{default:!0}})}var R=p(h,2),O=S(R,!0);x(u);var D=p(u,2),L=S(D);x(a),k(H=>{g(O,e(B)),hr(D,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(Be)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),It(D,`--pan-scroll-x: ${e(Ne)??""}px; --pan-scroll-y: ${e(Le)??""}px;`),at(L,"src",H),at(L,"alt",e(B)),It(L,`translate: ${e(be)??""}px ${e(De)??""}px; transform: scale(${e(se)/100});`)},[()=>_e()]),gt("pointerdown",D,F),gt("pointermove",D,Te),gt("pointerup",D,d),rt("pointercancel",D,d),rt("lostpointercapture",D,d),l(t,a)},ze=t=>{const a=n(M);var u=je(),m=ne(u);Pr(m,()=>re()+e(a),h=>{Dr(h,{get sourceUrl(){return e(a)},get fileName(){return e(B)},get allowDownload(){return we()},get downloading(){return J()},onDownload:Z})}),l(t,u)},mt=t=>{var a=fo(),u=p(T(a),2),m=S(u,!0),h=p(u,2),R=T(h),O=p(R);x(h),x(a),k((D,L)=>{g(m,e(B)),at(R,"src",D),g(O,` ${L??""}`)},[()=>W(),()=>c.editor_fileViewer_audioUnsupported_label()]),l(t,a)},Bt=t=>{var a=po(),u=p(T(a),2),m=S(u,!0),h=p(u,2);{let R=n(()=>!we()||J());Ce(h,{size:"sm",variant:"secondary",onclick:Z,get disabled(){return e(R)},children:(O,D)=>{var L=vo(),H=ne(L);et(H,{get icon(){return jt},size:"sm",class:"mr-2"});var xe=p(H);k(he=>g(xe,` ${he??""}`),[()=>c.editor_fileViewer_downloadPdf_label()]),l(O,L)},$$slots:{default:!0}})}x(a),k(R=>g(m,R),[()=>c.editor_fileViewer_pdfUnavailable_label()]),l(t,a)},Ot=t=>{{let a=n(()=>nt(y().toString()));ar(t,{get value(){return e(a)},language:"json",get fileName(){return re()},lineNumbers:!0,readOnly:!0})}},Oe=t=>{const a=n(()=>st(y().toString()));var u=ho(),m=T(u),h=T(m),R=T(h);Ct(R,23,()=>e(a)[0]||[],(D,L)=>`header-${L}-${D}`,(D,L)=>{var H=go(),xe=S(H,!0);k(()=>g(xe,e(L))),l(D,H)}),x(R),x(h);var O=p(h);Ct(O,23,()=>e(a).slice(1),(D,L)=>`row-${L}`,(D,L,H)=>{var xe=_o();Ct(xe,23,()=>e(L),(he,$e)=>`cell-${e(H)}-${$e}`,(he,$e)=>{var He=mo(),ke=S(He,!0);k(()=>g(ke,e($e))),l(he,He)}),x(xe),l(D,xe)}),x(O),x(m),x(u),l(t,u)},Xe=t=>{var a=wo(),u=p(T(a),2),m=S(u,!0),h=p(u,2),R=S(h,!0);x(a),k(O=>{g(m,e(B)),g(R,O)},[()=>c.editor_fileViewer_archive_label()]),l(t,a)},Ht=t=>{var a=bo(),u=p(T(a),2),m=S(u,!0),h=p(u,2),R=S(h,!0);x(a),k(O=>{g(m,e(B)),g(R,O)},[()=>c.editor_fileViewer_binary_label()]),l(t,a)},St=t=>{{let a=n(()=>y().toString());ar(t,{get value(){return e(a)},get language(){return Pe()},get fileName(){return re()},lineNumbers:!0,highlightActiveLine:!0})}};Q(Ee,t=>{e(V)==="image"?t(Ve):e(V)==="svg"?t(fe,1):e(V)==="video"?t(ze,2):e(V)==="audio"?t(mt,3):e(V)==="pdf"?t(Bt,4):e(V)==="json"?t(Ot,5):e(V)==="csv"?t(Oe,6):e(V)==="archive"?t(Xe,7):e(V)==="binary"?t(Ht,8):t(St,-1)})}return x(ue),l(X,ue),Nt(ut)}Gr(["pointerdown","pointermove","pointerup"]);const yo=/access denied|permission denied|outside (?:the )?workspace/i,Po=/file not found|no such file or directory/i;function $o(X){return yo.test(X)?"access-denied":X===c.files_read_notFound_error()||Po.test(X)?"not-found":"generic"}function ko(X){switch(X){case"access-denied":return c.layout_fileTab_errorAccessDenied_label();case"not-found":return c.layout_fileTab_errorNotFound_label();case"generic":return c.layout_fileTab_errorGeneric_label()}}var Io=P("<!> <!>",1),Co=P("<!> <!> <!>",1),So=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p> </p> <p class="text-xs"> </p></div>'),br=P('<div class="flex h-full items-center justify-center p-4 text-subtle"><p role="alert"> </p></div>'),Fo=P('<div class="flex h-full items-center justify-center text-subtle"><p> </p></div>'),xr=P('<div class="flex items-center justify-center h-full text-subtle"><p> </p></div>'),Do=P('<div class="flex items-center gap-3"><!> <!></div>'),To=P('<div class="flex flex-col h-full"><div class="flex-1 p-4 space-y-2"></div></div>'),Eo=P('<p class="text-xs"> </p>'),Ro=P("<li><!></li>"),Mo=P('<p class="text-xs mt-2"> </p> <ul class="flex flex-col items-center gap-1"></ul>',1),Uo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p class="text-danger" role="alert"> </p> <p class="text-xs font-mono"> </p> <!> <!></div>'),jo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-3 p-4"><p> </p> <p class="text-xs break-all"> </p> <!></div>'),Lo=P('<div class="h-full overflow-auto p-4"><!></div>');function Vo(X,w){if(new.target)return Vt({component:Vo,...X});Wt(w,!0);const ye=()=>ce(Ot,"$workspace",A),ot=()=>ce(_e,"$fileContentStore",A),re=()=>ce(E,"$fileLoadingStore",A),y=()=>ce(oe,"$fileSavingStore",A),ae=()=>ce(Y,"$fileErrorStore",A),Pe=()=>ce(Z,"$fileErrorInfoStore",A),Se=()=>ce(it,"$homeView$",A),we=()=>ce(nt,"$fileNotFoundCandidatesStore",A),ge=()=>ce(st,"$isFileBinaryStore",A),J=()=>ce(ut,"$isFileDirtyStore",A),Ye=()=>ce(ue,"$fileLastUpdatedStore",A),V=()=>ce(Ee,"$ftChanges$",A),B=()=>ce(Bt,"$gutterRead$",A),se=()=>ce(Le,"$lineWrapping",A),me=()=>ce(Be,"$diffIndicators",A),Fe=()=>ce(ze,"$rootMediaPreview",A),[A,be]=ir(),De=r=>{var s=Io(),$=ne(s);{var C=de=>{var Ae=je(),qe=ne(Ae);Rt(qe,()=>Mt,(pt,xt)=>{xt(pt,{get icon(){return Ra},get label(){return e(he)},disabled:!0})}),l(de,Ae)};Q($,de=>{!e(_t)&&!e(b)&&!e(L)&&de(C)})}var le=p($,2);{var Re=de=>{{let Ae=n(()=>!e(Tt)||!e(Ge)),qe=n(()=>!e(b)&&(!e(Tt)||!e(Ge)));Oa(de,{embedded:!0,showFold:!1,showSplit:!1,get showPreview(){return e(Tt)},get previewEnabled(){return e(Ge)},onTogglePreview:()=>f(Ge,!e(Ge)),get showWrap(){return e(Ae)},get wrapEnabled(){return se()},onToggleWrap:()=>j.dispatch(na()),get showDiff(){return e(qe)},get diffEnabled(){return me()},onToggleDiff:()=>j.dispatch(ia())})}};Q(le,de=>{o().filePath&&!e(_t)&&!e(L)&&de(Re)})}l(r,s)},Ne=r=>{var s=je(),$=ne(s);{var C=le=>{var Re=Co(),de=ne(Re);{var Ae=We=>{var Je=je(),dt=ne(Je);{let yt=n(()=>c.layout_fileTab_goToChanges_tooltip());Rt(dt,()=>Mt,(Pt,$t)=>{$t(Pt,{get icon(){return Ua},get label(){return e(yt)},onclick:zr})})}l(We,Je)};Q(de,We=>{e(Rr)&&We(Ae)})}var qe=p(de,2);{var pt=We=>{var Je=je(),dt=ne(Je);{let yt=n(()=>c.layout_fileTab_downloadFile_label()),Pt=n(()=>!e(wt)||e(lt));Rt(dt,()=>Mt,($t,Yt)=>{Yt($t,{get icon(){return jt},get label(){return e(yt)},onclick:Et,get disabled(){return e(Pt)}})})}l(We,Je)};Q(qe,We=>{e(Qe)&&We(pt)})}var xt=p(qe,2);{let We=n(()=>c.layout_fileTab_deleteFile_tooltip());Rt(xt,()=>Mt,(Je,dt)=>{dt(Je,{get icon(){return Ma},get label(){return e(We)},onclick:Ar,destructive:!0})})}l(le,Re)};Q($,le=>{o().filePath&&!e(_t)&&!e(b)&&le(C)})}l(r,s)},Le=Ha(),Be=qa();let o=ee(w,"tab",7),i=ee(w,"workspaceId",7),F=ee(w,"isActive",7),Te=ee(w,"isPanelFocused",7);pe(()=>{const r=i();if(!(!F()||!r||e(d)))return j.dispatch(ta(r,"files")),()=>j.dispatch(ra(r,"files"))});const d=n(()=>typeof o().data?.gitRootId=="string"?o().data.gitRootId:void 0),I=n(()=>typeof o().data?.gitRootPath=="string"?o().data.gitRootPath:void 0),b=n(()=>!!e(d)),W=n(()=>o().filePath?Ia(o().filePath,e(d)):o().filePath),M=Jr(e(W));pe(()=>{M.set(e(W))});const _e=pa(i(),M),E=ga(i(),M),oe=ma(i(),M),Y=_a(i(),M),Z=ha(i(),M),it=Qa(i()),nt=wa(i(),M),st=ba(i(),M),ut=mr(i(),M),ue=xa(i(),M),Ee=ya(i()),Ve=va(),fe=crypto.randomUUID(),ze=Fr(fe),mt=`file-gutter:${crypto.randomUUID()}`,Bt=Pa(i(),mt),Ot=$a(i()),Oe=n(()=>ye()?.worktreePath||ye()?.repositoryPath||ye()?.path||null),Xe=n(ot),Ht=Xa();pe(()=>{e(Xe)!==null&&e(Xe)!==void 0&&Ht?.markContentLoaded()});const St=n(re),t=n(y),a=n(ae),u=n(()=>e(a)?$o(e(a)):"generic"),m=n(()=>e(a)?Ja(Pe()):null);let h=N(0),R=!1;pe(()=>{const r=Se();if(!r||r.unavailable){R=!1;return}e(m)&&!R&&(R=!0,rr(()=>Ut(h)))});const O=5,D=n(()=>(we()??[]).slice(0,O)),L=n(ge),H=n(J),xe=n(Ye),he=n(()=>e(t)?c.ui_saveIndicator_saving_tooltip():e(H)?c.ui_saveIndicator_autoSaving_tooltip():c.ui_saveIndicator_saved_tooltip());let $e=N(null),He=N(Zr([])),ke=N(null),Ft=N(void 0),Dt=N(void 0),Ge=N(!0);pe(()=>{const r=o().data?.line,s=o().data?.jumpTimestamp;!r||s!==void 0&&s===e(Dt)||(f(Dt,s,!0),f(Ft,{line:r},!0),f(Ge,!1))});const Ie=n(()=>e(d)?_r(o().filePath,e(I)):null),_t=n(()=>e(d)?!e(Ie):!!(o().filePath&&(Aa(o().filePath)||e(Oe)&&Wa(o().filePath,e(Oe))))),ht=n(()=>o().filePath&&e(Oe)?er(o().filePath)?o().filePath:`${e(Oe)}/${o().filePath}`:null),ft=n(()=>!!o().filePath&&/\.pdf$/i.test(o().filePath)),vt=n(()=>!!o().filePath&&/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(o().filePath)),Qe=n(()=>i()&&/^[A-Za-z0-9._-]+$/.test(i())?_r(o().filePath,e(Oe)):null),Tr=n(()=>!e(d)&&e(Qe)?e(Qe).split("/").slice(0,-1).join("/"):void 0),qt=n(()=>e(ft)||e(vt)?e(Qe):null),nr=n(()=>e(d)&&e(vt)?{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",mp4:"video/mp4",webm:"video/webm"}[o().filePath?.split(".").pop()?.toLowerCase()??""]:void 0);pe(()=>{if(!F()||!e(d)||!e(Ie)||!e(nr))return;const r=crypto.randomUUID();return j.dispatch(Ir(fe,r,i(),e(Ie),{gitRootId:e(d),mimeType:e(nr)})),()=>j.dispatch(Cr(fe,r))});let lt=N(!1);const wt=n(()=>!!e(Qe)&&!e(St)&&(!e(vt)||e(ke)===e(Qe))),sr=n(()=>e(ke)&&i()?`workspace-file://${i()}/${e(ke).split("/").map(encodeURIComponent).join("/")}`:null),Kt=n(()=>o().filePath?da(o().filePath):"plaintext"),Tt=n(()=>e(Kt)==="markdown");pe(()=>{if(!F()||e(ft)||e(d))return;const r=e(qt),s=o().filePath,$=i(),C=o().id;if(f(ke,null),!r||!s||!$)return;let le=!1;const Re=()=>!le&&i()===$&&o().id===C&&o().filePath===s;return(async()=>{let de=!1;try{de=(await Ca("file.stat",{workspaceId:$,path:r}))?.isFile===!0}catch{}if(!Re())return;if(de){f(ke,r,!0);return}if(!/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(r)){f(ke,r,!0);return}const{candidates:Ae,truncated:qe}=await za($,r);if(Re()){if(!qe&&Ae.length===1){j.dispatch(fr($,s,Ae[0],C));return}f(ke,r,!0)}})(),()=>{le=!0}});function Er(r,s){return!!(r.file===s||r.relativePath===s||r.relativePath&&s.endsWith("/"+r.relativePath)||r.file&&s.endsWith("/"+r.file)||r.relativePath&&r.relativePath.endsWith("/"+s)||r.file&&r.file.endsWith("/"+s))}const bt=n(()=>e(b)||!o().filePath?null:V().find(r=>Er(r,o().filePath))??null),Rr=n(()=>!!e(bt));pe(()=>{if(e(b))return;const r=i(),s=o().filePath,$=e(Oe);return()=>{if(!r||!s)return;const C=Zt.select(j.state,r,s);if(C?.kind!=="editable-text")return;const le=Jt(C.localContent),Re=mr.select(j.state,r,s),de=er(s)?s:$?`${$}/${s}`:null;Re&&de&&j.dispatch(vr(r,s,de,le))}}),pe(()=>{const r=o().filePath,s=e(ht),$=i();if(e(h),!F())return;const C=!e(d)&&!!r&&er(r)&&!e(Oe);r&&$&&!e(_t)&&!e(vt)&&!e(ft)&&!C&&(e(d)&&e(Ie)&&e(W)?j.dispatch(pr($,e(W),s??r,{gitRoot:{id:e(d),relativePath:e(Ie)}})):j.dispatch(pr($,r,s??r)))});function Mr(){return e(Xe)??""}function Ur(r){e(b)||e(L)||!o().filePath||!i()||!e(ht)||j.dispatch(fa(i(),o().filePath,Jt(r)))}function jr(){if(e(b)||e(L)||!o().filePath||!e(ht)||e(Xe)===null||e(t))return;const r=Zt.select(j.state,i(),o().filePath);r?.kind==="editable-text"&&j.dispatch(vr(i(),o().filePath,e(ht),Jt(r.localContent)))}function Lr(r){const s=o().filePath;!s||!i()||(j.dispatch(ua(i(),s)),j.dispatch(fr(i(),s,r,o().id)))}pe(()=>{const r=o().filePath,s=e(bt);if(!r||!s){f(He,[],!0);return}if(!F())return;const $=i(),C=crypto.randomUUID();return j.dispatch(aa($,mt,C,{kind:"diffs",path:r,staged:s.stage==="staged"})),()=>{j.dispatch(oa($,mt,C))}}),pe(()=>{const r=B(),s=r?.result?.kind==="diffs"?r.result.chunks:[],$=s.find(C=>C.file===o().filePath)??s[0];f(He,$?Na($.chunks.map(C=>({oldStart:C.oldStart,oldLines:C.oldLines,newStart:C.newStart,newLines:C.newLines,lines:C.lines.map(le=>(le.type===gr.Addition?"+":le.type===gr.Deletion?"-":" ")+le.content)}))):[],!0)});function Vr(r){const s=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),$=Re=>Ya(r,Ka(Re),s);if($("editor.save")){r.preventDefault(),e(H)&&!e(t)&&jr();return}const C=$("editor.undo")?"undo":$("editor.redo")?"redo":$("editor.toggle-task-list")?"toggle-task-list":$("editor.copy")?"copy":$("editor.select-all")?"select-all":null;if(!C||e(b)&&C!=="copy"&&C!=="select-all")return;C!=="toggle-task-list"&&e($e)?.runShortcut(C)&&r.preventDefault()}function zr(r){if(!o().filePath||!e(bt))return;const s=r?.metaKey||r?.ctrlKey||!1,C=r?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;j.dispatch(ca(i(),e(bt),{filePath:o().filePath,changeId:e(bt).id,openInAdjacentPanel:s,sourcePanelId:C}))}async function Et(){const r=e(Qe);if(!(e(b)||!r||!i()||!e(wt)||e(lt))){f(lt,!0);try{const s=await ka(i(),r,e(Oe));!s?.success&&!s?.canceled&&Qt.error(s?.error?.message||c.layout_fileTab_downloadFailed_error())}catch{Qt.error(c.layout_fileTab_downloadFailed_error())}finally{f(lt,!1)}}}function Ar(){const r=e(ht);if(e(b)||!o().filePath||!i()||!r)return;const s=sa(Zt.select(j.state,i(),o().filePath));if(!s){Qt.error(c.ui_reversibleActions_failed_error({message:c.fileExplorer_tree_undoUnavailable_error()}));return}j.dispatch(la(i(),o().filePath,{absolutePath:r,tabId:o().id,snapshot:s}))}pe(()=>{if(!Ve||!F())return;const r={isDirty:!e(b)&&e(H),isSaving:!e(b)&&e(t)};rr(()=>{Ve.registerActions({display:De,actions:Ne}),Ve.registerState(r)})});var Wr={get tab(){return o()},set tab(r){o(r),te()},get workspaceId(){return i()},set workspaceId(r){i(r),te()},get isActive(){return F()},set isActive(r){F(r),te()},get isPanelFocused(){return Te()},set isPanelFocused(r){Te(r),te()},$set:zt,$on:(r,s)=>At(w,r,s)},lr=je();rt("keydown",yr,r=>F()&&Vr(r));var Nr=ne(lr);{var Br=r=>{var s=je(),$=ne(s);Pr($,()=>o().filePath,C=>{var le=je(),Re=ne(le);{var de=_=>{var v=So(),U=T(v),q=S(U,!0),z=p(U,2),Me=S(z,!0);x(v),k(G=>{g(q,G),g(Me,o().filePath)},[()=>c.layout_fileTab_outsideWorkspace_label()]),l(_,v)},Ae=_=>{var v=je(),U=ne(v);{var q=z=>{or(z,{get workspaceId(){return i()},get filePath(){return e(Ie)},get gitRootId(){return e(d)}})};Q(U,z=>{F()&&z(q)})}l(_,v)},qe=_=>{var v=je(),U=ne(v);{var q=G=>{var K=br(),ie=T(K),Ue=S(ie,!0);x(K),k(ve=>g(Ue,ve),[()=>c.layout_fileTab_errorLoading_label()]),l(G,K)},z=G=>{Lt(G,{get filePath(){return o().filePath},get sourceUrl(){return Fe().url},allowDownload:!1})},Me=G=>{var K=Fo(),ie=T(K),Ue=S(ie,!0);x(K),k(ve=>g(Ue,ve),[()=>c.layout_fileTab_preparing_label()]),l(G,K)};Q(U,G=>{Fe()?.error?G(q):Fe()?.url?G(z,1):G(Me,-1)})}l(_,v)},pt=_=>{var v=je(),U=ne(v);{var q=z=>{or(z,{get workspaceId(){return i()},get filePath(){return e(qt)}})};Q(U,z=>{F()&&z(q)})}l(_,v)},xt=_=>{var v=br(),U=T(v),q=S(U,!0);x(v),k(z=>g(q,z),[()=>c.file_pdf_load_error()]),l(_,v)},We=_=>{{let v=n(()=>e(ke)??o().filePath),U=n(()=>!e(b)&&e(wt));Lt(_,{get filePath(){return e(v)},get sourceUrl(){return e(sr)},onDownload:Et,get allowDownload(){return e(U)},get downloading(){return e(lt)}})}},Je=_=>{var v=xr(),U=T(v),q=S(U,!0);x(v),k(z=>g(q,z),[()=>c.layout_fileTab_preparing_label()]),l(_,v)},dt=_=>{var v=To(),U=T(v);Ct(U,20,()=>[...Array(20).keys()],q=>q,(q,z)=>{var Me=Do(),G=T(Me);wr(G,{class:"h-3 w-8 shrink-0"});var K=p(G,2);wr(K,{class:"h-3",style:`width: ${30+Math.random()*60}%`}),x(Me),l(q,Me)}),x(U),x(v),l(_,v)},yt=_=>{{let v=n(()=>Za(e(m)));Ga(_,{get view(){return e(v)}})}},Pt=_=>{var v=Uo(),U=T(v),q=S(U,!0),z=p(U,2),Me=S(z,!0),G=p(z,2);{var K=ve=>{var Ke=Eo(),ct=S(Ke,!0);k(()=>g(ct,e(a))),l(ve,Ke)};Q(G,ve=>{e(u)==="generic"&&ve(K)})}var ie=p(G,2);{var Ue=ve=>{var Ke=Mo(),ct=ne(Ke),Xt=S(ct,!0),dr=p(ct,2);Ct(dr,20,()=>e(D),kt=>kt,(kt,cr)=>{var Gt=Ro(),qr=T(Gt);Ce(qr,{variant:"link",size:"compact",class:"h-auto p-0 font-mono text-xs",onclick:()=>Lr(cr),children:(Kr,zo)=>{Ze();var ur=tt();k(()=>g(ur,cr)),l(Kr,ur)},$$slots:{default:!0}}),x(Gt),l(kt,Gt)}),x(dr),k(kt=>g(Xt,kt),[()=>c.layout_fileTab_didYouMean_label()]),l(ve,Ke)};Q(ie,ve=>{e(D).length>0&&ve(Ue)})}x(v),k(ve=>{g(q,ve),g(Me,o().filePath)},[()=>ko(e(u))]),l(_,v)},$t=_=>{var v=jo(),U=T(v),q=S(U,!0),z=p(U,2),Me=S(z,!0),G=p(z,2);{var K=ie=>{{let Ue=n(()=>!e(wt)||e(lt));Ce(ie,{variant:"secondary",size:"sm",onclick:Et,get disabled(){return e(Ue)},children:(ve,Ke)=>{Ze();var ct=tt();k(Xt=>g(ct,Xt),[()=>c.layout_fileTab_downloadFile_label()]),l(ve,ct)},$$slots:{default:!0}})}};Q(G,ie=>{!e(b)&&e(Qe)&&ie(K)})}x(v),k(ie=>{g(q,ie),g(Me,o().filePath)},[()=>c.editor_fileViewer_binary_label()]),l(_,v)},Yt=_=>{const v=n(()=>o().filePath?.toLowerCase().endsWith(".svg"));var U=je(),q=ne(U);{var z=K=>{{let ie=n(()=>o().filePath||""),Ue=n(()=>!e(b)&&e(wt));Lt(K,{get filePath(){return e(ie)},get fileContent(){return e(Xe)},get language(){return e(Kt)},get isBinary(){return e(L)},onDownload:Et,get allowDownload(){return e(Ue)},get downloading(){return e(lt)}})}},Me=K=>{var ie=Lo(),Ue=T(ie);Ba(Ue,{get content(){return e(Xe)},get workspaceId(){return i()},get relativeMediaBase(){return e(Tr)},renderRichFencesAsCode:!0,renderDiagrams:!0}),x(ie),l(K,ie)},G=K=>{var ie=Mr,Ue=Ur;{let ve=n(()=>me()?e(He):[]);$r(ar(K,{get value(){return ie()},set value(Ke){Ue(Ke)},get language(){return e(Kt)},get readOnly(){return e(b)},get fileName(){return o().filePath},get workspaceId(){return i()},get filePath(){return o().filePath},get lineWrapping(){return se()},get lineChanges(){return e(ve)},get jumpTo(){return e(Ft)},get externalContentVersion(){return e(xe)},get isPanelFocused(){return Te()}}),Ke=>f($e,Ke,!0),()=>e($e))}};Q(q,K=>{e(v)?K(z):e(Tt)&&e(Ge)?K(Me,1):K(G,-1)})}l(_,U)},Hr=_=>{var v=xr(),U=T(v),q=S(U,!0);x(v),k(z=>g(q,z),[()=>c.layout_fileTab_preparing_label()]),l(_,v)};Q(Re,_=>{e(_t)?_(de):e(d)&&e(ft)&&e(Ie)?_(Ae,1):e(d)&&e(vt)?_(qe,2):e(ft)&&e(qt)?_(pt,3):e(ft)?_(xt,4):e(sr)?_(We,5):e(vt)?_(Je,6):e(St)?_(dt,7):e(m)?_(yt,8):e(a)?_(Pt,9):e(L)?_($t,10):e(Xe)!==null?_(Yt,11):_(Hr,-1)})}l(C,le)}),l(r,s)};Q(Nr,r=>{o().filePath&&r(Br)})}l(X,lr);var Or=Nt(Wr);return be(),Or}export{Vo as default};
@@ -1,4 +1,4 @@
1
- import{g as ze}from"./D3mO5vU_.js";import{s as Xe}from"./DjG8KKys.js";import{b as m,W as Be,a_ as Je,V as Ze,aZ as et,U as tt,b0 as st,Y as it,X as Ne,ay as qe,r as rt,am as nt,aU as at,ab as lt,aG as ct,_ as ot,a1 as ht,aP as ut,bh as ft}from"./VRkOAck5.js";var Ce=(function(){var e=m(function($,i,n,o){for(n=n||{},o=$.length;o--;n[$[o]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],f=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],c=[1,22],S=[2,7],d=[1,26],_=[1,27],b=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],w=[1,24],D=[1,31],O=[1,32],M=[1,30],R=[1,39],g=[1,40],p=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ae=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ve=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],we=[1,74],De=[1,75],Oe=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:m(function(i,n,o,s,E,t,de){var l=t.length-1;switch(E){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:f},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:f},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:f},{1:[2,2]},{4:17,5:c,7:13,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:c,7:42,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:43,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:44,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:45,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:46,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:47,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:48,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:49,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:50,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(p,[2,17]),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),{30:60,33:62,75:P,89:R,90:g},{30:63,33:62,75:P,89:R,90:g},{30:64,33:62,75:P,89:R,90:g},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ae,[2,81]),e(Ae,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{62:77,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{30:78,33:62,75:P,89:R,90:g},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:R,90:g},{5:[1,95]},{30:96,33:62,75:P,89:R,90:g},{5:[1,97]},{30:98,33:62,75:P,89:R,90:g},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(p,[2,59],{76:U}),e(p,[2,64],{76:Me}),{33:103,75:[1,102],89:R,90:g},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(p,[2,57],{76:Me}),e(p,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:R,90:g},{33:120,89:R,90:g},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(T,[2,68]),e(p,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(p,[2,28]),{5:[1,127]},e(p,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(p,[2,47]),{5:[1,131]},e(p,[2,48]),e(p,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:R,90:g},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(p,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(p,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(p,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(p,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(p,[2,44]),e(p,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:m(function(i,n){if(n.recoverable)this.trace(i);else{var o=new Error(i);throw o.hash=n,o}},"parseError"),parse:m(function(i){var n=this,o=[0],s=[],E=[null],t=[],de=this.table,l="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),y=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);y.setInput(i,G.yy),G.yy.lexer=y,G.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Ie=y.yylloc;t.push(Ie);var je=y.options&&y.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ge(k){o.length=o.length-2*k,E.length=E.length-k,t.length=t.length-k}m(Ge,"popStack");function Ue(){var k;return k=s.pop()||y.lex()||Pe,typeof k!="number"&&(k instanceof Array&&(s=k,k=s.pop()),k=n.symbols_[k]||k),k}m(Ue,"lex");for(var I,z,N,ke,J={},ye,F,Ye,_e;;){if(z=o[o.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=Ue()),N=de[z]&&de[z][I]),typeof N>"u"||!N.length||!N[0]){var Te="";_e=[];for(ye in de[z])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");y.showPosition?Te="Parse error on line "+(ge+1)+`:
1
+ import{g as ze}from"./Cr2m0lJA.js";import{s as Xe}from"./GBgYT_ZX.js";import{b as m,W as Be,a_ as Je,V as Ze,aZ as et,U as tt,b0 as st,Y as it,X as Ne,ay as qe,r as rt,am as nt,aU as at,ab as lt,aG as ct,_ as ot,a1 as ht,aP as ut,bh as ft}from"./1rUouahZ.js";var Ce=(function(){var e=m(function($,i,n,o){for(n=n||{},o=$.length;o--;n[$[o]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],f=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],c=[1,22],S=[2,7],d=[1,26],_=[1,27],b=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],w=[1,24],D=[1,31],O=[1,32],M=[1,30],R=[1,39],g=[1,40],p=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ae=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ve=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],we=[1,74],De=[1,75],Oe=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:m(function(i,n,o,s,E,t,de){var l=t.length-1;switch(E){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:f},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:f},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:f},{1:[2,2]},{4:17,5:c,7:13,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:c,7:42,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:43,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:44,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:45,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:46,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:47,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:48,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:49,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:50,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(p,[2,17]),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),{30:60,33:62,75:P,89:R,90:g},{30:63,33:62,75:P,89:R,90:g},{30:64,33:62,75:P,89:R,90:g},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ae,[2,81]),e(Ae,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{62:77,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{30:78,33:62,75:P,89:R,90:g},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:R,90:g},{5:[1,95]},{30:96,33:62,75:P,89:R,90:g},{5:[1,97]},{30:98,33:62,75:P,89:R,90:g},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(p,[2,59],{76:U}),e(p,[2,64],{76:Me}),{33:103,75:[1,102],89:R,90:g},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(p,[2,57],{76:Me}),e(p,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:R,90:g},{33:120,89:R,90:g},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(T,[2,68]),e(p,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(p,[2,28]),{5:[1,127]},e(p,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(p,[2,47]),{5:[1,131]},e(p,[2,48]),e(p,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:R,90:g},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(p,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(p,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(p,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(p,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(p,[2,44]),e(p,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:m(function(i,n){if(n.recoverable)this.trace(i);else{var o=new Error(i);throw o.hash=n,o}},"parseError"),parse:m(function(i){var n=this,o=[0],s=[],E=[null],t=[],de=this.table,l="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),y=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);y.setInput(i,G.yy),G.yy.lexer=y,G.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Ie=y.yylloc;t.push(Ie);var je=y.options&&y.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ge(k){o.length=o.length-2*k,E.length=E.length-k,t.length=t.length-k}m(Ge,"popStack");function Ue(){var k;return k=s.pop()||y.lex()||Pe,typeof k!="number"&&(k instanceof Array&&(s=k,k=s.pop()),k=n.symbols_[k]||k),k}m(Ue,"lex");for(var I,z,N,ke,J={},ye,F,Ye,_e;;){if(z=o[o.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=Ue()),N=de[z]&&de[z][I]),typeof N>"u"||!N.length||!N[0]){var Te="";_e=[];for(ye in de[z])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");y.showPosition?Te="Parse error on line "+(ge+1)+`:
2
2
  `+y.showPosition()+`
3
3
  Expecting `+_e.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Te="Parse error on line "+(ge+1)+": Unexpected "+(I==Pe?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Te,{text:y.match,token:this.terminals_[I]||I,line:y.yylineno,loc:Ie,expected:_e})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+I);switch(N[0]){case 1:o.push(I),E.push(y.yytext),t.push(y.yylloc),o.push(N[1]),I=null,$e=y.yyleng,l=y.yytext,ge=y.yylineno,Ie=y.yylloc;break;case 2:if(F=this.productions_[N[1]][1],J.$=E[E.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},je&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),ke=this.performAction.apply(J,[l,$e,ge,G.yy,N[1],E,t].concat(We)),typeof ke<"u")return ke;F&&(o=o.slice(0,-1*F*2),E=E.slice(0,-1*F),t=t.slice(0,-1*F)),o.push(this.productions_[N[1]][0]),E.push(J.$),t.push(J._$),Ye=de[o[o.length-2]][o[o.length-1]],o.push(Ye);break;case 3:return!0}}return!0},"parse")},He=(function(){var $={EOF:1,parseError:m(function(n,o){if(this.yy.parser)this.yy.parser.parseError(n,o);else throw new Error(n)},"parseError"),setInput:m(function(i,n){return this.yy=n||this.yy||{},this._input=i,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:m(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:m(function(i){var n=i.length,o=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var s=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),o.length-1&&(this.yylineno-=o.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:o?(o.length===s.length?this.yylloc.first_column:0)+s[s.length-o.length].length-o[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(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:m(function(i){this.unput(this.match.slice(i))},"less"),pastInput:m(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{p as z}from"./BaDKWIdd.js";import{b as f,q as B,aX as E,B as F,ay as $,a_ as P,V as A,b0 as W,Y as _,U as N,aZ as Y,W as L,O as M,r as O}from"./VRkOAck5.js";import{p as I}from"./Dh4nEdmB.js";var U=M.packet,u,C=(u=class{constructor(){this.packet=[],this.setAccTitle=P,this.getAccTitle=A,this.setDiagramTitle=W,this.getDiagramTitle=_,this.getAccDescription=N,this.setAccDescription=Y}getConfig(){const t=B({...U,...L().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){O(),this.packet=[]}},f(u,"PacketDB"),u),X=1e4,j=f((e,t)=>{z(e,t);let r=-1,s=[],i=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:o,bits:d,label:g}of e.blocks){if(a!==void 0&&o!==void 0&&o<a)throw new Error(`Packet block ${a} - ${o} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${o??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(o??=a+(d??1)-1,d??=o-a+1,r=o,$.debug(`Packet block ${a} - ${r} with label ${g}`);s.length<=l+1&&t.getPacket().length<X;){const[c,p]=q({start:a,end:o,bits:d,label:g},i,l);if(s.push(c),c.end+1===i*l&&(t.pushWord(s),s=[],i++),!p)break;({start:a,end:o,bits:d,label:g}=p)}}t.pushWord(s)},"populate"),q=f((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const s=t*r-1,i=t*r;return[{start:e.start,end:s,label:e.label,bits:s-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},"getNextFittingBlock"),S={parser:{yy:void 0},parse:f(async e=>{const t=await I("packet",e),r=S.parser?.yy;if(!(r instanceof C))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");$.debug(t),j(t,r)},"parse")},G=f((e,t,r,s)=>{const i=s.db,l=i.getConfig(),{rowHeight:a,paddingY:o,bitWidth:d,bitsPerRow:g}=l,c=i.getPacket(),p=i.getDiagramTitle(),m=a+o,n=m*(c.length+1)-(p?0:a),h=d*g+2,k=E(t);k.attr("viewBox",`0 0 ${h} ${n}`),F(k,n,h,l.useMaxWidth);for(const[x,b]of c.entries())H(k,b,x,l);k.append("text").text(p).attr("x",h/2).attr("y",n-m/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),H=f((e,t,r,{rowHeight:s,paddingX:i,paddingY:l,bitWidth:a,bitsPerRow:o,showBits:d,bitOrder:g})=>{const c=e.append("g"),p=r*(s+l)+l,m=g==="descending";for(const n of t){const h=n.end-n.start+1,k=n.start%o,b=(m?o-k-h:k)*a+1,w=h*a-i;if(c.append("rect").attr("x",b).attr("y",p).attr("width",w).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",b+w/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(n.label),!d)continue;const[D,T]=m?[n.end,n.start]:[n.start,n.end],v=h===1,y=p-2;c.append("text").attr("x",b+(v?w/2:0)).attr("y",y).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",v?"middle":"start").text(D),v||c.append("text").attr("x",b+w).attr("y",y).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(T)}},"drawWord"),K={draw:G},V={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},Z=f(({packet:e}={})=>{const t=B(V,e);return`
1
+ import{p as z}from"./CXOOFUlR.js";import{b as f,q as B,aX as E,B as F,ay as $,a_ as P,V as A,b0 as W,Y as _,U as N,aZ as Y,W as L,O as M,r as O}from"./1rUouahZ.js";import{p as I}from"./Dh4nEdmB.js";var U=M.packet,u,C=(u=class{constructor(){this.packet=[],this.setAccTitle=P,this.getAccTitle=A,this.setDiagramTitle=W,this.getDiagramTitle=_,this.getAccDescription=N,this.setAccDescription=Y}getConfig(){const t=B({...U,...L().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){O(),this.packet=[]}},f(u,"PacketDB"),u),X=1e4,j=f((e,t)=>{z(e,t);let r=-1,s=[],i=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:o,bits:d,label:g}of e.blocks){if(a!==void 0&&o!==void 0&&o<a)throw new Error(`Packet block ${a} - ${o} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${o??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(o??=a+(d??1)-1,d??=o-a+1,r=o,$.debug(`Packet block ${a} - ${r} with label ${g}`);s.length<=l+1&&t.getPacket().length<X;){const[c,p]=q({start:a,end:o,bits:d,label:g},i,l);if(s.push(c),c.end+1===i*l&&(t.pushWord(s),s=[],i++),!p)break;({start:a,end:o,bits:d,label:g}=p)}}t.pushWord(s)},"populate"),q=f((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const s=t*r-1,i=t*r;return[{start:e.start,end:s,label:e.label,bits:s-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},"getNextFittingBlock"),S={parser:{yy:void 0},parse:f(async e=>{const t=await I("packet",e),r=S.parser?.yy;if(!(r instanceof C))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");$.debug(t),j(t,r)},"parse")},G=f((e,t,r,s)=>{const i=s.db,l=i.getConfig(),{rowHeight:a,paddingY:o,bitWidth:d,bitsPerRow:g}=l,c=i.getPacket(),p=i.getDiagramTitle(),m=a+o,n=m*(c.length+1)-(p?0:a),h=d*g+2,k=E(t);k.attr("viewBox",`0 0 ${h} ${n}`),F(k,n,h,l.useMaxWidth);for(const[x,b]of c.entries())H(k,b,x,l);k.append("text").text(p).attr("x",h/2).attr("y",n-m/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),H=f((e,t,r,{rowHeight:s,paddingX:i,paddingY:l,bitWidth:a,bitsPerRow:o,showBits:d,bitOrder:g})=>{const c=e.append("g"),p=r*(s+l)+l,m=g==="descending";for(const n of t){const h=n.end-n.start+1,k=n.start%o,b=(m?o-k-h:k)*a+1,w=h*a-i;if(c.append("rect").attr("x",b).attr("y",p).attr("width",w).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",b+w/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(n.label),!d)continue;const[D,T]=m?[n.end,n.start]:[n.start,n.end],v=h===1,y=p-2;c.append("text").attr("x",b+(v?w/2:0)).attr("y",y).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",v?"middle":"start").text(D),v||c.append("text").attr("x",b+w).attr("y",y).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(T)}},"drawWord"),K={draw:G},V={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},Z=f(({packet:e}={})=>{const t=B(V,e);return`
2
2
  .packetByte {
3
3
  font-size: ${t.byteFontSize};
4
4
  }