@chrisjowen/wheelhouse 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/build/client/_app/immutable/chunks/{BFhVmACN.js → 9-2CzHQD.js} +1 -1
  2. package/build/client/_app/immutable/chunks/9-2CzHQD.js.br +0 -0
  3. package/build/client/_app/immutable/chunks/9-2CzHQD.js.gz +0 -0
  4. package/build/client/_app/immutable/chunks/{BBJBkIrw.js → BDyfTgsS.js} +1 -1
  5. package/build/client/_app/immutable/chunks/BDyfTgsS.js.br +3 -0
  6. package/build/client/_app/immutable/chunks/BDyfTgsS.js.gz +0 -0
  7. package/build/client/_app/immutable/chunks/{Lo9Y985M.js → BFQWRmh7.js} +1 -1
  8. package/build/client/_app/immutable/chunks/BFQWRmh7.js.br +0 -0
  9. package/build/client/_app/immutable/chunks/BFQWRmh7.js.gz +0 -0
  10. package/build/client/_app/immutable/chunks/{DZhp5Clk.js → BLxVvWay.js} +1 -1
  11. package/build/client/_app/immutable/chunks/BLxVvWay.js.br +0 -0
  12. package/build/client/_app/immutable/chunks/BLxVvWay.js.gz +0 -0
  13. package/build/client/_app/immutable/chunks/{CogyHa6-.js → BNxvXFfv.js} +1 -1
  14. package/build/client/_app/immutable/chunks/BNxvXFfv.js.br +0 -0
  15. package/build/client/_app/immutable/chunks/BNxvXFfv.js.gz +0 -0
  16. package/build/client/_app/immutable/chunks/{D9uOQyZY.js → BPOpB19z.js} +1 -1
  17. package/build/client/_app/immutable/chunks/BPOpB19z.js.br +0 -0
  18. package/build/client/_app/immutable/chunks/BPOpB19z.js.gz +0 -0
  19. package/build/client/_app/immutable/chunks/BSAgOLZf.js +1 -0
  20. package/build/client/_app/immutable/chunks/BSAgOLZf.js.br +0 -0
  21. package/build/client/_app/immutable/chunks/BSAgOLZf.js.gz +0 -0
  22. package/build/client/_app/immutable/chunks/BfiwDiDR.js +2 -0
  23. package/build/client/_app/immutable/chunks/BfiwDiDR.js.br +0 -0
  24. package/build/client/_app/immutable/chunks/BfiwDiDR.js.gz +0 -0
  25. package/build/client/_app/immutable/chunks/{CLy6GMrT.js → CBNJeKYi.js} +1 -1
  26. package/build/client/_app/immutable/chunks/CBNJeKYi.js.br +0 -0
  27. package/build/client/_app/immutable/chunks/CBNJeKYi.js.gz +0 -0
  28. package/build/client/_app/immutable/chunks/{CM7YbvcE.js → CCSre-H4.js} +1 -1
  29. package/build/client/_app/immutable/chunks/CCSre-H4.js.br +0 -0
  30. package/build/client/_app/immutable/chunks/CCSre-H4.js.gz +0 -0
  31. package/build/client/_app/immutable/chunks/{DQWdnL7h.js → CYgerXrU.js} +1 -1
  32. package/build/client/_app/immutable/chunks/CYgerXrU.js.br +0 -0
  33. package/build/client/_app/immutable/chunks/CYgerXrU.js.gz +0 -0
  34. package/build/client/_app/immutable/chunks/{caSIyyev.js → D1bykXRr.js} +1 -1
  35. package/build/client/_app/immutable/chunks/D1bykXRr.js.br +0 -0
  36. package/build/client/_app/immutable/chunks/D1bykXRr.js.gz +0 -0
  37. package/build/client/_app/immutable/chunks/{CEkqhJ8-.js → D47Q9TSK.js} +1 -1
  38. package/build/client/_app/immutable/chunks/D47Q9TSK.js.br +0 -0
  39. package/build/client/_app/immutable/chunks/D47Q9TSK.js.gz +0 -0
  40. package/build/client/_app/immutable/chunks/{BdTUpAzj.js → DLbYUJ4B.js} +1 -1
  41. package/build/client/_app/immutable/chunks/DLbYUJ4B.js.br +0 -0
  42. package/build/client/_app/immutable/chunks/DLbYUJ4B.js.gz +0 -0
  43. package/build/client/_app/immutable/chunks/{n-cYDyaA.js → DcwUckFP.js} +1 -1
  44. package/build/client/_app/immutable/chunks/DcwUckFP.js.br +0 -0
  45. package/build/client/_app/immutable/chunks/DcwUckFP.js.gz +0 -0
  46. package/build/client/_app/immutable/chunks/{D90Ga_Id.js → DhkAM2zE.js} +1 -1
  47. package/build/client/_app/immutable/chunks/DhkAM2zE.js.br +0 -0
  48. package/build/client/_app/immutable/chunks/DhkAM2zE.js.gz +0 -0
  49. package/build/client/_app/immutable/chunks/{A55xgzkD.js → Dpd_B5b-.js} +1 -1
  50. package/build/client/_app/immutable/chunks/Dpd_B5b-.js.br +0 -0
  51. package/build/client/_app/immutable/chunks/Dpd_B5b-.js.gz +0 -0
  52. package/build/client/_app/immutable/chunks/{Blcu9fuE.js → Dw-B6NqN.js} +1 -1
  53. package/build/client/_app/immutable/chunks/Dw-B6NqN.js.br +0 -0
  54. package/build/client/_app/immutable/chunks/Dw-B6NqN.js.gz +0 -0
  55. package/build/client/_app/immutable/chunks/{s_exGbLS.js → Dybu9Tl2.js} +1 -1
  56. package/build/client/_app/immutable/chunks/Dybu9Tl2.js.br +0 -0
  57. package/build/client/_app/immutable/chunks/Dybu9Tl2.js.gz +0 -0
  58. package/build/client/_app/immutable/chunks/{CuH1GpU9.js → PyVjjQ7z.js} +1 -1
  59. package/build/client/_app/immutable/chunks/PyVjjQ7z.js.br +0 -0
  60. package/build/client/_app/immutable/chunks/PyVjjQ7z.js.gz +0 -0
  61. package/build/client/_app/immutable/entry/{app.BgHDSK-f.js → app.T9vftEzW.js} +2 -2
  62. package/build/client/_app/immutable/entry/app.T9vftEzW.js.br +0 -0
  63. package/build/client/_app/immutable/entry/app.T9vftEzW.js.gz +0 -0
  64. package/build/client/_app/immutable/entry/start.DQc5g5Tu.js +1 -0
  65. package/build/client/_app/immutable/entry/start.DQc5g5Tu.js.br +0 -0
  66. package/build/client/_app/immutable/entry/start.DQc5g5Tu.js.gz +0 -0
  67. package/build/client/_app/immutable/nodes/{0.DuFkC-WN.js → 0.CpWdFWTY.js} +1 -1
  68. package/build/client/_app/immutable/nodes/0.CpWdFWTY.js.br +0 -0
  69. package/build/client/_app/immutable/nodes/0.CpWdFWTY.js.gz +0 -0
  70. package/build/client/_app/immutable/nodes/{1.BXoD9o7T.js → 1.D0NGKWDz.js} +1 -1
  71. package/build/client/_app/immutable/nodes/1.D0NGKWDz.js.br +0 -0
  72. package/build/client/_app/immutable/nodes/1.D0NGKWDz.js.gz +0 -0
  73. package/build/client/_app/immutable/nodes/{10.Cei28q9Z.js → 10.Ci7MkSUL.js} +1 -1
  74. package/build/client/_app/immutable/nodes/10.Ci7MkSUL.js.br +0 -0
  75. package/build/client/_app/immutable/nodes/10.Ci7MkSUL.js.gz +0 -0
  76. package/build/client/_app/immutable/nodes/{11.BstaTigc.js → 11.D_y0B-9H.js} +1 -1
  77. package/build/client/_app/immutable/nodes/11.D_y0B-9H.js.br +0 -0
  78. package/build/client/_app/immutable/nodes/11.D_y0B-9H.js.gz +0 -0
  79. package/build/client/_app/immutable/nodes/{12.C26mRRF_.js → 12.CKxPW2RY.js} +1 -1
  80. package/build/client/_app/immutable/nodes/12.CKxPW2RY.js.br +0 -0
  81. package/build/client/_app/immutable/nodes/12.CKxPW2RY.js.gz +0 -0
  82. package/build/client/_app/immutable/nodes/{13.D5cvQijt.js → 13.DZyxOX0t.js} +1 -1
  83. package/build/client/_app/immutable/nodes/13.DZyxOX0t.js.br +0 -0
  84. package/build/client/_app/immutable/nodes/13.DZyxOX0t.js.gz +0 -0
  85. package/build/client/_app/immutable/nodes/{14.ixNG0i6M.js → 14.BUbAnBHk.js} +1 -1
  86. package/build/client/_app/immutable/nodes/14.BUbAnBHk.js.br +0 -0
  87. package/build/client/_app/immutable/nodes/14.BUbAnBHk.js.gz +0 -0
  88. package/build/client/_app/immutable/nodes/{15.U-YpZ2mY.js → 15.BtPEMzbF.js} +1 -1
  89. package/build/client/_app/immutable/nodes/15.BtPEMzbF.js.br +0 -0
  90. package/build/client/_app/immutable/nodes/15.BtPEMzbF.js.gz +0 -0
  91. package/build/client/_app/immutable/nodes/{16.DYyQlMIj.js → 16.DvC3Yq2k.js} +1 -1
  92. package/build/client/_app/immutable/nodes/16.DvC3Yq2k.js.br +0 -0
  93. package/build/client/_app/immutable/nodes/16.DvC3Yq2k.js.gz +0 -0
  94. package/build/client/_app/immutable/nodes/{17.CjNdiCZc.js → 17.CwxcyNhq.js} +1 -1
  95. package/build/client/_app/immutable/nodes/17.CwxcyNhq.js.br +0 -0
  96. package/build/client/_app/immutable/nodes/17.CwxcyNhq.js.gz +0 -0
  97. package/build/client/_app/immutable/nodes/{19.aX3EJcGD.js → 19.DjDChLR4.js} +1 -1
  98. package/build/client/_app/immutable/nodes/19.DjDChLR4.js.br +0 -0
  99. package/build/client/_app/immutable/nodes/19.DjDChLR4.js.gz +0 -0
  100. package/build/client/_app/immutable/nodes/{2.MoMLMEsA.js → 2.BPYs8aMA.js} +1 -1
  101. package/build/client/_app/immutable/nodes/2.BPYs8aMA.js.br +0 -0
  102. package/build/client/_app/immutable/nodes/2.BPYs8aMA.js.gz +0 -0
  103. package/build/client/_app/immutable/nodes/{20.BcpIwTNR.js → 20.MdyDTrbR.js} +1 -1
  104. package/build/client/_app/immutable/nodes/20.MdyDTrbR.js.br +0 -0
  105. package/build/client/_app/immutable/nodes/20.MdyDTrbR.js.gz +0 -0
  106. package/build/client/_app/immutable/nodes/{21.BdNRERDN.js → 21.CRYb46Qk.js} +1 -1
  107. package/build/client/_app/immutable/nodes/21.CRYb46Qk.js.br +0 -0
  108. package/build/client/_app/immutable/nodes/21.CRYb46Qk.js.gz +0 -0
  109. package/build/client/_app/immutable/nodes/{22.UIlcgKG0.js → 22.CSKHHZHk.js} +1 -1
  110. package/build/client/_app/immutable/nodes/22.CSKHHZHk.js.br +0 -0
  111. package/build/client/_app/immutable/nodes/22.CSKHHZHk.js.gz +0 -0
  112. package/build/client/_app/immutable/nodes/{23.B59tMz3Z.js → 23.woGfpbdg.js} +1 -1
  113. package/build/client/_app/immutable/nodes/23.woGfpbdg.js.br +0 -0
  114. package/build/client/_app/immutable/nodes/23.woGfpbdg.js.gz +0 -0
  115. package/build/client/_app/immutable/nodes/{24.DQjTWFAo.js → 24.j9aSFNGe.js} +1 -1
  116. package/build/client/_app/immutable/nodes/24.j9aSFNGe.js.br +0 -0
  117. package/build/client/_app/immutable/nodes/24.j9aSFNGe.js.gz +0 -0
  118. package/build/client/_app/immutable/nodes/25.s65SW_W1.js +15 -0
  119. package/build/client/_app/immutable/nodes/25.s65SW_W1.js.br +0 -0
  120. package/build/client/_app/immutable/nodes/25.s65SW_W1.js.gz +0 -0
  121. package/build/client/_app/immutable/nodes/{26.Bqb00dxX.js → 26.ByPiyYJ7.js} +1 -1
  122. package/build/client/_app/immutable/nodes/26.ByPiyYJ7.js.br +0 -0
  123. package/build/client/_app/immutable/nodes/26.ByPiyYJ7.js.gz +0 -0
  124. package/build/client/_app/immutable/nodes/{28.DAJOyPmp.js → 28.BSl2UHEO.js} +1 -1
  125. package/build/client/_app/immutable/nodes/28.BSl2UHEO.js.br +0 -0
  126. package/build/client/_app/immutable/nodes/28.BSl2UHEO.js.gz +0 -0
  127. package/build/client/_app/immutable/nodes/{3.CU4V9yAo.js → 3.HsKQfKyI.js} +1 -1
  128. package/build/client/_app/immutable/nodes/3.HsKQfKyI.js.br +0 -0
  129. package/build/client/_app/immutable/nodes/3.HsKQfKyI.js.gz +0 -0
  130. package/build/client/_app/immutable/nodes/{4.CIKGpO-h.js → 4.-M81LW8I.js} +1 -1
  131. package/build/client/_app/immutable/nodes/4.-M81LW8I.js.br +0 -0
  132. package/build/client/_app/immutable/nodes/4.-M81LW8I.js.gz +0 -0
  133. package/build/client/_app/immutable/nodes/{6.DV-LKwUi.js → 6.BD9phDQV.js} +1 -1
  134. package/build/client/_app/immutable/nodes/6.BD9phDQV.js.br +0 -0
  135. package/build/client/_app/immutable/nodes/6.BD9phDQV.js.gz +0 -0
  136. package/build/client/_app/immutable/nodes/{7.tNzUdkoK.js → 7.BMkpfE5W.js} +1 -1
  137. package/build/client/_app/immutable/nodes/7.BMkpfE5W.js.br +0 -0
  138. package/build/client/_app/immutable/nodes/7.BMkpfE5W.js.gz +0 -0
  139. package/build/client/_app/immutable/nodes/{8._d4-szlB.js → 8.Cn4W7RJ_.js} +1 -1
  140. package/build/client/_app/immutable/nodes/8.Cn4W7RJ_.js.br +0 -0
  141. package/build/client/_app/immutable/nodes/8.Cn4W7RJ_.js.gz +0 -0
  142. package/build/client/_app/immutable/nodes/{9.CIkGA4QL.js → 9.Bq63Tfhm.js} +1 -1
  143. package/build/client/_app/immutable/nodes/9.Bq63Tfhm.js.br +0 -0
  144. package/build/client/_app/immutable/nodes/9.Bq63Tfhm.js.gz +0 -0
  145. package/build/client/_app/version.json +1 -1
  146. package/build/client/_app/version.json.br +0 -0
  147. package/build/client/_app/version.json.gz +0 -0
  148. package/build/handler.js +4 -4
  149. package/build/index.js +4 -4
  150. package/build/server/chunks/chunks/{detail.js-kIQeRhX8.js → detail.js-CGQe7z_8.js} +2 -2
  151. package/build/server/chunks/chunks/{feedback.js-Cn_aMwGt.js → feedback.js-DFYYSHv7.js} +2 -2
  152. package/build/server/chunks/chunks/{internal.js--IrZpGIw.js → internal.js-7Q5kbRuG.js} +3 -3
  153. package/build/server/chunks/chunks/{keychain.js-EzFAr7ky.js → keychain.js-BdHjaAlL.js} +2 -2
  154. package/build/server/chunks/chunks/{marketplace-service.js-BWJLUgci.js → marketplace-service.js-CQOQRR1u.js} +2 -2
  155. package/build/server/chunks/chunks/{page.js-uCRgTfkr.js → page.js-QC-F57n7.js} +2 -2
  156. package/build/server/chunks/chunks/{previewhelper2.js-CheYey18.js → previewhelper2.js-OKBLOZKR.js} +2 -2
  157. package/build/server/chunks/chunks/{repo.js-mwBuCebU.js → repo.js-PsQPQrLd.js} +2 -2
  158. package/build/server/chunks/chunks/{runtime.js-DOQwJsyV.js → runtime.js-COzWLifC.js} +141 -8
  159. package/build/server/chunks/chunks/{service.js-BhegRU14.js → service.js-CoOFU7OT.js} +2 -2
  160. package/build/server/chunks/chunks/{service2.js-CjX60BFh.js → service2.js-C0HakbfJ.js} +102 -13
  161. package/build/server/chunks/chunks/{starter.js-BoD-v_RX.js → starter.js-T4H-Lhtt.js} +2 -2
  162. package/build/server/chunks/chunks/{terminal.js-s8yEF1TY.js → terminal.js-BUurgI6D.js} +10 -2
  163. package/build/server/chunks/chunks/{view.js-DRvLRn9a.js → view.js-SsG5PnKg.js} +2 -2
  164. package/build/server/chunks/entries/endpoints/api/apps/_op_/{_server.ts.js-LjS85cY1.js → _server.ts.js-9IZtZaIU.js} +4 -4
  165. package/build/server/chunks/entries/endpoints/api/cloud/{_server.ts.js-CPapFlxB.js → _server.ts.js-C6EL6yba.js} +3 -3
  166. package/build/server/chunks/entries/endpoints/api/cloud/previews/{_server.ts.js-C5rpQOtz.js → _server.ts.js-DjpSof2Z.js} +4 -4
  167. package/build/server/chunks/entries/endpoints/api/events/{_server.ts.js-Bh9CCsJR.js → _server.ts.js-kYR7zdIE.js} +4 -4
  168. package/build/server/chunks/entries/endpoints/api/files/{_server.ts.js-B81tIgYM.js → _server.ts.js-NUiqoG3u.js} +4 -4
  169. package/build/server/chunks/entries/endpoints/api/firstmate/chat/{_server.ts.js-DJe3RKYn.js → _server.ts.js-DBIPvmn-.js} +4 -4
  170. package/build/server/chunks/entries/endpoints/api/firstmate/commands/{_server.ts.js-DrNM-EZz.js → _server.ts.js-CZ6CEIWk.js} +4 -4
  171. package/build/server/chunks/entries/endpoints/api/firstmate/dismiss/{_server.ts.js-CyHX-fjj.js → _server.ts.js-BiZ4SNIF.js} +4 -4
  172. package/build/server/chunks/entries/endpoints/api/firstmate/input/{_server.ts.js-BGNA3rRL.js → _server.ts.js-CUAlzyVJ.js} +4 -4
  173. package/build/server/chunks/entries/endpoints/api/firstmate/interrupt/{_server.ts.js-gxW-vjq6.js → _server.ts.js-Byzc5IkK.js} +4 -4
  174. package/build/server/chunks/entries/endpoints/api/firstmate/messages/{_server.ts.js-CjKZKlSx.js → _server.ts.js-BayDk84h.js} +4 -4
  175. package/build/server/chunks/entries/endpoints/api/firstmate/pick/{_server.ts.js-Bf6fufw1.js → _server.ts.js-B1cXfwS_.js} +4 -4
  176. package/build/server/chunks/entries/endpoints/api/firstmate/reactions/{_server.ts.js-CunTg6B4.js → _server.ts.js-DE9D2_oI.js} +4 -4
  177. package/build/server/chunks/entries/endpoints/api/firstmate/start/{_server.ts.js-BFn0GxSV.js → _server.ts.js-JkVmLb_6.js} +4 -4
  178. package/build/server/chunks/entries/endpoints/api/fleet/{_server.ts.js-BPiDH1by.js → _server.ts.js-Dzh8VNFt.js} +4 -4
  179. package/build/server/chunks/entries/endpoints/api/gateway/{_server.ts.js-CH_ZiSS9.js → _server.ts.js-C7Zd4J2x.js} +4 -4
  180. package/build/server/chunks/entries/endpoints/api/health/{_server.ts.js-CHeUHBaj.js → _server.ts.js-CRp1TQsv.js} +4 -4
  181. package/build/server/chunks/entries/endpoints/api/inbox/{_server.ts.js-B6-h2R89.js → _server.ts.js-a4UwbswF.js} +4 -4
  182. package/build/server/chunks/entries/endpoints/api/inbox/report/{_server.ts.js-CtXL8XCq.js → _server.ts.js-BCwu9M_t.js} +4 -4
  183. package/build/server/chunks/entries/endpoints/api/insights/{_server.ts.js-CdsJGtOe.js → _server.ts.js-C4CgXyCW.js} +4 -4
  184. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/config/{_server.ts.js-yVkcjBkv.js → _server.ts.js-Dye6RTP6.js} +4 -4
  185. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/{_server.ts.js-BLyJO_Mo.js → _server.ts.js-Vr3iTNTg.js} +5 -5
  186. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/summary/{_server.ts.js-Dp9Lk4LX.js → _server.ts.js-D2ZC4sxZ.js} +6 -6
  187. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/icon/_icon_/{_server.ts.js-BKYjzuX1.js → _server.ts.js-BulTXo7c.js} +4 -4
  188. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/load/{_server.ts.js-DXIA842d.js → _server.ts.js-BH7-CeAP.js} +2 -2
  189. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/ui/_...path_/{_server.ts.js-DkhsnbSG.js → _server.ts.js-CwBrnFnK.js} +4 -4
  190. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/update/{_server.ts.js-SeWa829w.js → _server.ts.js-PgW7ZklF.js} +2 -2
  191. package/build/server/chunks/entries/endpoints/api/plugins/{_server.ts.js-CIQPuCVw.js → _server.ts.js-DUlrUTo-.js} +4 -4
  192. package/build/server/chunks/entries/endpoints/api/plugins/inspect/{_server.ts.js-DT0sbWwu.js → _server.ts.js-dYnuJJfy.js} +2 -2
  193. package/build/server/chunks/entries/endpoints/api/plugins/install/{_server.ts.js-Cn2rbNUE.js → _server.ts.js-XMy5OTYg.js} +2 -2
  194. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/{_server.ts.js-D8cqx7e8.js → _server.ts.js-C5kBp5Y6.js} +5 -5
  195. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/icon/_name_/{_server.ts.js-DNxzMqSL.js → _server.ts.js-D1qrraqa.js} +5 -5
  196. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/registries/{_server.ts.js-CMrMjFz3.js → _server.ts.js-DN1UDT_a.js} +5 -5
  197. package/build/server/chunks/entries/endpoints/api/plugins/updates/{_server.ts.js-Dk4WI0lC.js → _server.ts.js-_1QDJM7X.js} +2 -2
  198. package/build/server/chunks/entries/endpoints/api/previews/check/{_server.ts.js-CybVxq0q.js → _server.ts.js-YFKgwEtn.js} +4 -4
  199. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/{_server.ts.js-Du0F1uRC.js → _server.ts.js-CuuiERKz.js} +5 -5
  200. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/commands/{_server.ts.js-DktLe6aY.js → _server.ts.js-zWD7NB0B.js} +5 -5
  201. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/consent/{_server.ts.js-B3AFWOQ5.js → _server.ts.js-mdx5Ypsj.js} +5 -5
  202. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/draft/{_server.ts.js-CFZKkvHd.js → _server.ts.js-9XfoohP9.js} +5 -5
  203. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/file/{_server.ts.js-DOuE8mQe.js → _server.ts.js-CU3jD7va.js} +5 -5
  204. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/test/{_server.ts.js-Dnqj-B1I.js → _server.ts.js-CzkjQDwv.js} +5 -5
  205. package/build/server/chunks/entries/endpoints/api/second-mates/_id_/peek/{_server.ts.js-CsQ9Iy4e.js → _server.ts.js-nWkAqEZ8.js} +4 -4
  206. package/build/server/chunks/entries/endpoints/api/services/{_server.ts.js-Q9_2hESc.js → _server.ts.js-DC9F8JHt.js} +4 -4
  207. package/build/server/chunks/entries/endpoints/api/setup/{_server.ts.js-fJhkF-dq.js → _server.ts.js-SEqnGhCL.js} +11 -5
  208. package/build/server/chunks/entries/endpoints/api/slots/{_server.ts.js-DE5Za2Qf.js → _server.ts.js-CL95AcTk.js} +4 -4
  209. package/build/server/chunks/entries/endpoints/api/tasks/_id_/{_server.ts.js-B_Wi2EUQ.js → _server.ts.js-Bt5x_SZo.js} +5 -5
  210. package/build/server/chunks/entries/endpoints/api/tasks/_id_/artifacts/_...name_/{_server.ts.js-ESVAlaL0.js → _server.ts.js-pcCn9wpf.js} +4 -4
  211. package/build/server/chunks/entries/endpoints/api/tasks/_id_/diff/{_server.ts.js-BYen5YjB.js → _server.ts.js-DABhamdk.js} +4 -4
  212. package/build/server/chunks/entries/endpoints/api/tasks/_id_/output/{_server.ts.js-D9JD2y98.js → _server.ts.js-7_Kx5O15.js} +4 -4
  213. package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/{_server.ts.js-BcZEsLxW.js → _server.ts.js-Dkhl8MfB.js} +4 -4
  214. package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/helper/{_server.ts.js-nEQ-LWc3.js → _server.ts.js-rXi5YwLW.js} +5 -5
  215. package/build/server/chunks/entries/endpoints/api/vault/{_server.ts.js-BglmY8Dv.js → _server.ts.js-BIOZoKJd.js} +4 -4
  216. package/build/server/chunks/entries/endpoints/api/wheelhouse/source/{_server.ts.js-Dcu4o_kg.js → _server.ts.js-DxSvWHt3.js} +2 -2
  217. package/build/server/chunks/entries/endpoints/api/wheelhouse/update/{_server.ts.js-D8DNzTCl.js → _server.ts.js-BlDUZ37s.js} +2 -2
  218. package/build/server/chunks/entries/endpoints/api/wheelhouse/upgrade/{_server.ts.js-C88U185K.js → _server.ts.js-h5V0DXDf.js} +2 -2
  219. package/build/server/chunks/entries/endpoints/tasks/_id_/review/{_server.ts.js-D5X3NXNQ.js → _server.ts.js-BPDLxKL3.js} +4 -4
  220. package/build/server/chunks/entries/{hooks.server.js-BoVfKVBv.js → hooks.server.js-BEJdV2uP.js} +4 -4
  221. package/build/server/chunks/entries/pages/{_layout.server.ts.js-DonkPB5v.js → _layout.server.ts.js-oNFsG-OO.js} +2 -2
  222. package/build/server/chunks/entries/pages/{_page.server.ts.js-BPlndbwo.js → _page.server.ts.js-C8__0-1Q.js} +2 -2
  223. package/build/server/chunks/entries/pages/decisions/{_page.server.ts.js-D0TSKupF.js → _page.server.ts.js-CNJeecwR.js} +2 -2
  224. package/build/server/chunks/entries/pages/deck/{_page.server.ts.js-DGxVR_vz.js → _page.server.ts.js-BoXXVnMS.js} +2 -2
  225. package/build/server/chunks/entries/pages/files/{_page.server.ts.js-Ccs1E7eE.js → _page.server.ts.js-CyRGlXO9.js} +2 -2
  226. package/build/server/chunks/entries/pages/harbour/{_page.server.ts.js-DdVNEwXK.js → _page.server.ts.js-D0LotbNu.js} +2 -2
  227. package/build/server/chunks/entries/pages/headroom/{_page.server.ts.js-DJkL5LjM.js → _page.server.ts.js-DRsPRpSl.js} +2 -2
  228. package/build/server/chunks/entries/pages/inbox/{_page.server.ts.js-zxQIlwfl.js → _page.server.ts.js-Doid6WR6.js} +2 -2
  229. package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/{_page.server.ts.js-XD-2cABX.js → _page.server.ts.js-32XfdeNC.js} +2 -2
  230. package/build/server/chunks/entries/pages/projects/_id_/{_page.server.ts.js-BgCyi1X-.js → _page.server.ts.js-GB2nEYS5.js} +3 -3
  231. package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/{_page.server.ts.js-fo0xabfK.js → _page.server.ts.js-oV82J3pC.js} +3 -3
  232. package/build/server/chunks/entries/pages/projects/_id_/passage/{_page.server.ts.js-Cbg44XDV.js → _page.server.ts.js-I99LutNo.js} +4 -4
  233. package/build/server/chunks/entries/pages/projects/_id_/passage/edit/{_page.server.ts.js-BUp_Y-KL.js → _page.server.ts.js-CWe-F3jJ.js} +2 -2
  234. package/build/server/chunks/entries/pages/remotes/{_page.server.ts.js-0-aDiI-u.js → _page.server.ts.js-CO0S-Fse.js} +2 -2
  235. package/build/server/chunks/entries/pages/settings/cloud/{_page.server.ts.js-DUYpwlCw.js → _page.server.ts.js-BIthp0dE.js} +2 -2
  236. package/build/server/chunks/entries/pages/settings/gateway/{_page.server.ts.js-B-EvG_LJ.js → _page.server.ts.js-Bq7pjP9S.js} +2 -2
  237. package/build/server/chunks/entries/pages/settings/plugins/{_page.server.ts.js-e1XEpYYO.js → _page.server.ts.js-Ds4udNs6.js} +2 -2
  238. package/build/server/chunks/entries/pages/settings/plugins/_plugin_/{_page.server.ts.js-DQlX1ZXD.js → _page.server.ts.js-BhTYPz8W.js} +2 -2
  239. package/build/server/chunks/entries/pages/settings/setup/{_page.server.ts.js-3vhPyRFz.js → _page.server.ts.js-DopSQLu-.js} +2 -2
  240. package/build/server/chunks/entries/pages/settings/update/{_page.server.ts.js-CmGgMlAh.js → _page.server.ts.js-qmulQ-ge.js} +2 -2
  241. package/build/server/chunks/entries/pages/setup/{_page.server.ts.js-CcUv_Pl5.js → _page.server.ts.js-DMr69bTz.js} +3 -3
  242. package/build/server/chunks/entries/pages/setup/{_page.svelte.js-CB6DNUFE.js → _page.svelte.js-BZsw7k9z.js} +104 -21
  243. package/build/server/chunks/entries/pages/tasks/_id_/{_page.server.ts.js-BSp2WAoD.js → _page.server.ts.js-BKT9Gezs.js} +3 -3
  244. package/build/server/chunks/entries/pages/tasks/_id_/doc/{_page.server.ts.js-BUVzUDIr.js → _page.server.ts.js-DKQ7Sfzc.js} +2 -2
  245. package/build/server/chunks/entries/pages/time/{_page.server.ts.js-CthFCAvj.js → _page.server.ts.js-D7dBFLqV.js} +2 -2
  246. package/build/server/chunks/{handler-CoNcksE3.js → handler-MmGfFHL5.js} +3 -3
  247. package/build/server/chunks/{index.js-DeIgBt_r.js → index.js-FOiuKHW9.js} +2 -2
  248. package/build/server/chunks/{manifest.js-DABDEm-u.js → manifest.js-CogJYoYY.js} +86 -86
  249. package/build/server/chunks/nodes/{0.js-YKoWN0t_.js → 0.js-CRw2ZJSU.js} +6 -6
  250. package/build/server/chunks/nodes/{1.js-BrhSX20y.js → 1.js-BlgG2zLX.js} +2 -2
  251. package/build/server/chunks/nodes/{10.js-DfgINkv2.js → 10.js-B7T0NyU9.js} +2 -2
  252. package/build/server/chunks/nodes/{11.js-DiTSd3ll.js → 11.js-FvEHh38s.js} +6 -6
  253. package/build/server/chunks/nodes/{12.js-50Nn94Ac.js → 12.js-D2nyk1fY.js} +7 -7
  254. package/build/server/chunks/nodes/{13.js-Bqj2sWs_.js → 13.js-DG_t6I8D.js} +7 -7
  255. package/build/server/chunks/nodes/{14.js-Cv1hpyWZ.js → 14.js-C8iMqGSa.js} +8 -8
  256. package/build/server/chunks/nodes/{15.js-D7gELe63.js → 15.js-P4N2OjCp.js} +7 -7
  257. package/build/server/chunks/nodes/{16.js-DCHbFZQk.js → 16.js-CW-Li1Rg.js} +6 -6
  258. package/build/server/chunks/nodes/{17.js-CRE1rbZ5.js → 17.js-C3BmyWNh.js} +2 -2
  259. package/build/server/chunks/nodes/{19.js-CFuW5rd2.js → 19.js-gCrSgnZV.js} +6 -6
  260. package/build/server/chunks/nodes/{2.js-BgPLJqKL.js → 2.js-D1lhh7rv.js} +6 -6
  261. package/build/server/chunks/nodes/{20.js-DGixTdKt.js → 20.js-cFxZhrOi.js} +6 -6
  262. package/build/server/chunks/nodes/{21.js-fW8cmY-P.js → 21.js-B_sxxEjx.js} +6 -6
  263. package/build/server/chunks/nodes/{22.js-BLhqsr4_.js → 22.js-B9hMJudF.js} +6 -6
  264. package/build/server/chunks/nodes/{23.js-I9w_LkUL.js → 23.js-CevV9EAu.js} +7 -7
  265. package/build/server/chunks/nodes/{24.js-Dbyn5eyG.js → 24.js-DKin1eiP.js} +4 -4
  266. package/build/server/chunks/nodes/{25.js-Dc-E-pmn.js → 25.js-BA26f5_P.js} +8 -8
  267. package/build/server/chunks/nodes/{26.js-Cqr1BLCa.js → 26.js-D-DeStzU.js} +7 -7
  268. package/build/server/chunks/nodes/{27.js-JKZQuSb7.js → 27.js-JuHjQHNw.js} +6 -6
  269. package/build/server/chunks/nodes/{28.js-BN16VFpu.js → 28.js-CfTvF44g.js} +6 -6
  270. package/build/server/chunks/nodes/{3.js-CZln8kr1.js → 3.js-CPeXHwiv.js} +6 -6
  271. package/build/server/chunks/nodes/{4.js-mbQFO9SD.js → 4.js-o_aK1zpE.js} +6 -6
  272. package/build/server/chunks/nodes/{5.js-gufn1Eo1.js → 5.js-D8wPPlRj.js} +5 -5
  273. package/build/server/chunks/nodes/{6.js-Cdfpyr6S.js → 6.js-DMotGXmq.js} +6 -6
  274. package/build/server/chunks/nodes/{7.js-DRJdiMQL.js → 7.js-BiY2LNIQ.js} +6 -6
  275. package/build/server/chunks/nodes/{8.js-B4stLJHw.js → 8.js-DANIuNFx.js} +6 -6
  276. package/build/server/chunks/nodes/{9.js-DYcjt0Hs.js → 9.js-DusPVGyL.js} +2 -2
  277. package/dist/cli.js +200 -69
  278. package/dist/wh-vault.js +1 -1
  279. package/package.json +1 -1
  280. package/build/client/_app/immutable/chunks/A55xgzkD.js.br +0 -0
  281. package/build/client/_app/immutable/chunks/A55xgzkD.js.gz +0 -0
  282. package/build/client/_app/immutable/chunks/BBJBkIrw.js.br +0 -0
  283. package/build/client/_app/immutable/chunks/BBJBkIrw.js.gz +0 -0
  284. package/build/client/_app/immutable/chunks/BFhVmACN.js.br +0 -0
  285. package/build/client/_app/immutable/chunks/BFhVmACN.js.gz +0 -0
  286. package/build/client/_app/immutable/chunks/BdTUpAzj.js.br +0 -0
  287. package/build/client/_app/immutable/chunks/BdTUpAzj.js.gz +0 -0
  288. package/build/client/_app/immutable/chunks/Blcu9fuE.js.br +0 -0
  289. package/build/client/_app/immutable/chunks/Blcu9fuE.js.gz +0 -0
  290. package/build/client/_app/immutable/chunks/CEkqhJ8-.js.br +0 -0
  291. package/build/client/_app/immutable/chunks/CEkqhJ8-.js.gz +0 -0
  292. package/build/client/_app/immutable/chunks/CLy6GMrT.js.br +0 -0
  293. package/build/client/_app/immutable/chunks/CLy6GMrT.js.gz +0 -0
  294. package/build/client/_app/immutable/chunks/CM7YbvcE.js.br +0 -0
  295. package/build/client/_app/immutable/chunks/CM7YbvcE.js.gz +0 -0
  296. package/build/client/_app/immutable/chunks/CogyHa6-.js.br +0 -0
  297. package/build/client/_app/immutable/chunks/CogyHa6-.js.gz +0 -0
  298. package/build/client/_app/immutable/chunks/CuH1GpU9.js.br +0 -0
  299. package/build/client/_app/immutable/chunks/CuH1GpU9.js.gz +0 -0
  300. package/build/client/_app/immutable/chunks/D90Ga_Id.js.br +0 -0
  301. package/build/client/_app/immutable/chunks/D90Ga_Id.js.gz +0 -0
  302. package/build/client/_app/immutable/chunks/D9uOQyZY.js.br +0 -0
  303. package/build/client/_app/immutable/chunks/D9uOQyZY.js.gz +0 -0
  304. package/build/client/_app/immutable/chunks/DQWdnL7h.js.br +0 -0
  305. package/build/client/_app/immutable/chunks/DQWdnL7h.js.gz +0 -0
  306. package/build/client/_app/immutable/chunks/DZhp5Clk.js.br +0 -0
  307. package/build/client/_app/immutable/chunks/DZhp5Clk.js.gz +0 -0
  308. package/build/client/_app/immutable/chunks/DjTSkyf1.js +0 -2
  309. package/build/client/_app/immutable/chunks/DjTSkyf1.js.br +0 -0
  310. package/build/client/_app/immutable/chunks/DjTSkyf1.js.gz +0 -0
  311. package/build/client/_app/immutable/chunks/Lo9Y985M.js.br +0 -0
  312. package/build/client/_app/immutable/chunks/Lo9Y985M.js.gz +0 -0
  313. package/build/client/_app/immutable/chunks/caSIyyev.js.br +0 -0
  314. package/build/client/_app/immutable/chunks/caSIyyev.js.gz +0 -0
  315. package/build/client/_app/immutable/chunks/n-cYDyaA.js.br +0 -0
  316. package/build/client/_app/immutable/chunks/n-cYDyaA.js.gz +0 -0
  317. package/build/client/_app/immutable/chunks/s_exGbLS.js.br +0 -2
  318. package/build/client/_app/immutable/chunks/s_exGbLS.js.gz +0 -0
  319. package/build/client/_app/immutable/chunks/yQaRdTPY.js +0 -1
  320. package/build/client/_app/immutable/chunks/yQaRdTPY.js.br +0 -0
  321. package/build/client/_app/immutable/chunks/yQaRdTPY.js.gz +0 -0
  322. package/build/client/_app/immutable/entry/app.BgHDSK-f.js.br +0 -0
  323. package/build/client/_app/immutable/entry/app.BgHDSK-f.js.gz +0 -0
  324. package/build/client/_app/immutable/entry/start.Cv7YY8BY.js +0 -1
  325. package/build/client/_app/immutable/entry/start.Cv7YY8BY.js.br +0 -0
  326. package/build/client/_app/immutable/entry/start.Cv7YY8BY.js.gz +0 -0
  327. package/build/client/_app/immutable/nodes/0.DuFkC-WN.js.br +0 -0
  328. package/build/client/_app/immutable/nodes/0.DuFkC-WN.js.gz +0 -0
  329. package/build/client/_app/immutable/nodes/1.BXoD9o7T.js.br +0 -0
  330. package/build/client/_app/immutable/nodes/1.BXoD9o7T.js.gz +0 -0
  331. package/build/client/_app/immutable/nodes/10.Cei28q9Z.js.br +0 -0
  332. package/build/client/_app/immutable/nodes/10.Cei28q9Z.js.gz +0 -0
  333. package/build/client/_app/immutable/nodes/11.BstaTigc.js.br +0 -0
  334. package/build/client/_app/immutable/nodes/11.BstaTigc.js.gz +0 -0
  335. package/build/client/_app/immutable/nodes/12.C26mRRF_.js.br +0 -0
  336. package/build/client/_app/immutable/nodes/12.C26mRRF_.js.gz +0 -0
  337. package/build/client/_app/immutable/nodes/13.D5cvQijt.js.br +0 -0
  338. package/build/client/_app/immutable/nodes/13.D5cvQijt.js.gz +0 -0
  339. package/build/client/_app/immutable/nodes/14.ixNG0i6M.js.br +0 -0
  340. package/build/client/_app/immutable/nodes/14.ixNG0i6M.js.gz +0 -0
  341. package/build/client/_app/immutable/nodes/15.U-YpZ2mY.js.br +0 -0
  342. package/build/client/_app/immutable/nodes/15.U-YpZ2mY.js.gz +0 -0
  343. package/build/client/_app/immutable/nodes/16.DYyQlMIj.js.br +0 -0
  344. package/build/client/_app/immutable/nodes/16.DYyQlMIj.js.gz +0 -0
  345. package/build/client/_app/immutable/nodes/17.CjNdiCZc.js.br +0 -0
  346. package/build/client/_app/immutable/nodes/17.CjNdiCZc.js.gz +0 -0
  347. package/build/client/_app/immutable/nodes/19.aX3EJcGD.js.br +0 -0
  348. package/build/client/_app/immutable/nodes/19.aX3EJcGD.js.gz +0 -0
  349. package/build/client/_app/immutable/nodes/2.MoMLMEsA.js.br +0 -0
  350. package/build/client/_app/immutable/nodes/2.MoMLMEsA.js.gz +0 -0
  351. package/build/client/_app/immutable/nodes/20.BcpIwTNR.js.br +0 -0
  352. package/build/client/_app/immutable/nodes/20.BcpIwTNR.js.gz +0 -0
  353. package/build/client/_app/immutable/nodes/21.BdNRERDN.js.br +0 -0
  354. package/build/client/_app/immutable/nodes/21.BdNRERDN.js.gz +0 -0
  355. package/build/client/_app/immutable/nodes/22.UIlcgKG0.js.br +0 -0
  356. package/build/client/_app/immutable/nodes/22.UIlcgKG0.js.gz +0 -0
  357. package/build/client/_app/immutable/nodes/23.B59tMz3Z.js.br +0 -0
  358. package/build/client/_app/immutable/nodes/23.B59tMz3Z.js.gz +0 -0
  359. package/build/client/_app/immutable/nodes/24.DQjTWFAo.js.br +0 -0
  360. package/build/client/_app/immutable/nodes/24.DQjTWFAo.js.gz +0 -0
  361. package/build/client/_app/immutable/nodes/25.DX_SiK1J.js +0 -14
  362. package/build/client/_app/immutable/nodes/25.DX_SiK1J.js.br +0 -0
  363. package/build/client/_app/immutable/nodes/25.DX_SiK1J.js.gz +0 -0
  364. package/build/client/_app/immutable/nodes/26.Bqb00dxX.js.br +0 -0
  365. package/build/client/_app/immutable/nodes/26.Bqb00dxX.js.gz +0 -0
  366. package/build/client/_app/immutable/nodes/28.DAJOyPmp.js.br +0 -0
  367. package/build/client/_app/immutable/nodes/28.DAJOyPmp.js.gz +0 -0
  368. package/build/client/_app/immutable/nodes/3.CU4V9yAo.js.br +0 -0
  369. package/build/client/_app/immutable/nodes/3.CU4V9yAo.js.gz +0 -0
  370. package/build/client/_app/immutable/nodes/4.CIKGpO-h.js.br +0 -0
  371. package/build/client/_app/immutable/nodes/4.CIKGpO-h.js.gz +0 -0
  372. package/build/client/_app/immutable/nodes/6.DV-LKwUi.js.br +0 -0
  373. package/build/client/_app/immutable/nodes/6.DV-LKwUi.js.gz +0 -0
  374. package/build/client/_app/immutable/nodes/7.tNzUdkoK.js.br +0 -0
  375. package/build/client/_app/immutable/nodes/7.tNzUdkoK.js.gz +0 -0
  376. package/build/client/_app/immutable/nodes/8._d4-szlB.js.br +0 -0
  377. package/build/client/_app/immutable/nodes/8._d4-szlB.js.gz +0 -0
  378. package/build/client/_app/immutable/nodes/9.CIkGA4QL.js.br +0 -0
  379. package/build/client/_app/immutable/nodes/9.CIkGA4QL.js.gz +0 -0
@@ -1,2 +1,2 @@
1
- import{i as tr}from"./Bo073DIH.js";import"./DsnmJJEf.js";import{l as De,p as Ee,u as Fe,g as e,f as he,s as n,a as i,b as Me,i as k,m as ar,h as m,r as v,v as ke,c as l,j as Le,n as Ce,y as me,t as z,d as E,q as nr,o as H}from"./D46tdsTs.js";import{i as c}from"./DWAM9c1z.js";import{c as or}from"./DT69KRC9.js";import{s as D,e as Oe,a as ge,f as we}from"./BLivoCTk.js";import{s as Pe,r as Ue,p as fe}from"./z5Xef_-v.js";import{a as ir}from"./BCUUi0V0.js";import{p as ye,u as Re,P as sr,L as Ne,c as Se,M as We,d as dr,C as lr}from"./D9uOQyZY.js";import{f as cr,a as vr,g as ur,e as mr,i as fr}from"./C_4BzEag.js";import{L as _e}from"./mFoHRvWK.js";import{F as ze,h as hr,m as pr}from"./yFOoFovD.js";import{d as gr}from"./BVXUMEgB.js";import{I as Ge}from"./B4gzexCn.js";import{E as Ae}from"./DE_ENZzQ.js";import{C as _r}from"./CwCeO535.js";import{G as Ke}from"./925dP-Ir.js";import{M as xr}from"./DK0g50g1.js";import{H as qe}from"./4dIDSPSf.js";import{S as br}from"./BcI7hzdQ.js";import{C as kr}from"./DSINNCaW.js";import{C as wr}from"./DZQxk93J.js";import{X as yr}from"./CSU-6kdN.js";var Cr=new Set(["$$slots","$$events","$$legacy"]);function zr(t,r){let o=Ue(r,Cr);const a={name:"layout-dashboard",size:24,node:[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1"}]]};Ge(t,Pe(()=>o,{get icon(){return a}}))}var Ar=new Set(["$$slots","$$events","$$legacy"]);function Tr(t,r){let o=Ue(r,Ar);const a={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01"}],["path",{d:"M12 8v4"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z"}]],aliases:["alert-octagon"]};Ge(t,Pe(()=>o,{get icon(){return a}}))}const Dr=28,Er=300,Te=(t,r={})=>({choice:t,picks:null,decided:null,...r}),Mr={merge:[{label:"Merge",choice:"approve"},{label:"Not yet",choice:"skip"}],preview:[{label:"Sign it off",choice:"approve"},{label:"Request changes",choice:"fix"}],hold:[{label:"Go ahead",choice:"approve"},{label:"Not like this",choice:"fix"}],decision:[{label:"Go ahead",choice:"approve"},{label:"Change course",choice:"fix"}],blocked:[{label:"Go ahead",choice:"approve"},{label:"Try another way",choice:"fix"}],review:[{label:"Keep it as is",choice:"approve"},{label:"Fix it",choice:"fix"},{label:"Leave it for later",choice:"skip"}]},Ir=/^(?:which|what|how|where|who|when|why)\b/i;function Fr(t){const r=(t??"").match(/[^.?!]*\?/g),o=r?.[r.length-1]?.trim();return!!o&&Ir.test(o)}function Be(t){const r=t.choices;if(r){const[p]=r.calls;return r.calls.length===1&&p.options.length?{kind:"choice",prompt:p.prompt,from:"card",options:p.options.map(h=>({id:h.id,label:h.label,detail:h.detail,recommended:h.recommended,answer:Te("approve",{picks:{[p.id]:h.id}})}))}:{kind:"picks",prompt:null,choices:r,from:"card"}}if((t.kind==="hold"||t.kind==="decision")&&Fr(t.question))return{kind:"text",prompt:null,from:"card"};const o=t.recommendation?.choice??(t.kind==="merge"?"approve":null),a=Mr[t.kind],q=a.map(p=>({id:p.choice,label:p.label,detail:null,recommended:p.choice===o,answer:Te(p.choice)}));return{kind:a.length===2?"buttons":"choice",prompt:null,options:q,from:"card"}}const Xe=/```decision-form[^\n]*\n([\s\S]*?)(?:```|$)/g,He=/\s*\((?:recommended|rec)\)\s*/i,Lr=/^\(written(?: answer)?\)$/i,je=t=>t.replace(/\s+/g," ").trim();function na(t){const r=[...t.matchAll(Xe)],o=r[r.length-1]?.[1];if(o===void 0)return null;let a=null,q=!1;const p=[];for(const G of o.split(`
1
+ import{i as tr}from"./Bo073DIH.js";import"./DsnmJJEf.js";import{l as De,p as Ee,u as Fe,g as e,f as he,s as n,a as i,b as Me,i as k,m as ar,h as m,r as v,v as ke,c as l,j as Le,n as Ce,y as me,t as z,d as E,q as nr,o as H}from"./D46tdsTs.js";import{i as c}from"./DWAM9c1z.js";import{c as or}from"./DT69KRC9.js";import{s as D,e as Oe,a as ge,f as we}from"./BLivoCTk.js";import{s as Pe,r as Ue,p as fe}from"./z5Xef_-v.js";import{a as ir}from"./BCUUi0V0.js";import{p as ye,u as Re,P as sr,L as Ne,c as Se,M as We,d as dr,C as lr}from"./BPOpB19z.js";import{f as cr,a as vr,g as ur,e as mr,i as fr}from"./C_4BzEag.js";import{L as _e}from"./mFoHRvWK.js";import{F as ze,h as hr,m as pr}from"./yFOoFovD.js";import{d as gr}from"./BVXUMEgB.js";import{I as Ge}from"./B4gzexCn.js";import{E as Ae}from"./DE_ENZzQ.js";import{C as _r}from"./CwCeO535.js";import{G as Ke}from"./925dP-Ir.js";import{M as xr}from"./DK0g50g1.js";import{H as qe}from"./4dIDSPSf.js";import{S as br}from"./BcI7hzdQ.js";import{C as kr}from"./DSINNCaW.js";import{C as wr}from"./DZQxk93J.js";import{X as yr}from"./CSU-6kdN.js";var Cr=new Set(["$$slots","$$events","$$legacy"]);function zr(t,r){let o=Ue(r,Cr);const a={name:"layout-dashboard",size:24,node:[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1"}]]};Ge(t,Pe(()=>o,{get icon(){return a}}))}var Ar=new Set(["$$slots","$$events","$$legacy"]);function Tr(t,r){let o=Ue(r,Ar);const a={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01"}],["path",{d:"M12 8v4"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z"}]],aliases:["alert-octagon"]};Ge(t,Pe(()=>o,{get icon(){return a}}))}const Dr=28,Er=300,Te=(t,r={})=>({choice:t,picks:null,decided:null,...r}),Mr={merge:[{label:"Merge",choice:"approve"},{label:"Not yet",choice:"skip"}],preview:[{label:"Sign it off",choice:"approve"},{label:"Request changes",choice:"fix"}],hold:[{label:"Go ahead",choice:"approve"},{label:"Not like this",choice:"fix"}],decision:[{label:"Go ahead",choice:"approve"},{label:"Change course",choice:"fix"}],blocked:[{label:"Go ahead",choice:"approve"},{label:"Try another way",choice:"fix"}],review:[{label:"Keep it as is",choice:"approve"},{label:"Fix it",choice:"fix"},{label:"Leave it for later",choice:"skip"}]},Ir=/^(?:which|what|how|where|who|when|why)\b/i;function Fr(t){const r=(t??"").match(/[^.?!]*\?/g),o=r?.[r.length-1]?.trim();return!!o&&Ir.test(o)}function Be(t){const r=t.choices;if(r){const[p]=r.calls;return r.calls.length===1&&p.options.length?{kind:"choice",prompt:p.prompt,from:"card",options:p.options.map(h=>({id:h.id,label:h.label,detail:h.detail,recommended:h.recommended,answer:Te("approve",{picks:{[p.id]:h.id}})}))}:{kind:"picks",prompt:null,choices:r,from:"card"}}if((t.kind==="hold"||t.kind==="decision")&&Fr(t.question))return{kind:"text",prompt:null,from:"card"};const o=t.recommendation?.choice??(t.kind==="merge"?"approve":null),a=Mr[t.kind],q=a.map(p=>({id:p.choice,label:p.label,detail:null,recommended:p.choice===o,answer:Te(p.choice)}));return{kind:a.length===2?"buttons":"choice",prompt:null,options:q,from:"card"}}const Xe=/```decision-form[^\n]*\n([\s\S]*?)(?:```|$)/g,He=/\s*\((?:recommended|rec)\)\s*/i,Lr=/^\(written(?: answer)?\)$/i,je=t=>t.replace(/\s+/g," ").trim();function na(t){const r=[...t.matchAll(Xe)],o=r[r.length-1]?.[1];if(o===void 0)return null;let a=null,q=!1;const p=[];for(const G of o.split(`
2
2
  `)){const te=G.trim();if(!te)continue;const K=/^[-*•]\s+(.*)$/.exec(te)?.[1];if(K===void 0){a??=je(te);continue}if(Lr.test(K.trim())){q=!0;continue}const ae=He.test(K),$=je(K.replace(He," ")),j=$.search(/:\s|\s[–—]\s/),ie=(j>0?$.slice(0,j):$).trim().slice(0,Er),A=j>0&&$.slice(j).replace(/^[:–—]?\s*/,"").trim()||null;ie&&p.push({id:`o${p.length+1}`,label:ie,detail:A,recommended:ae,answer:Te("approve",{decided:ie})})}return p.length?{kind:p.length===2&&p.every(G=>!G.detail&&G.label.length<=Dr)?"buttons":"choice",prompt:a,options:p,from:"firstmate"}:q||a?{kind:"text",prompt:a,from:"firstmate"}:null}const oa=t=>t.replace(Xe,"").trim();function Or(t){if(!t.detail||t.label.length>3)return t.label;const r=t.detail.length>40?t.detail.slice(0,39).trimEnd()+"…":t.detail;return`${t.label} (${r})`}function Ye(t){return t.kind==="buttons"||t.kind==="choice"?t.options.find(r=>r.recommended)??null:null}function ia(t,r){if(r.picks)return r.picks;if(t&&(t.kind==="buttons"||t.kind==="choice")){const o=t.options.find(a=>a.answer.choice===r.choice&&!a.answer.decided);if(o)return o.label}return r.label}const Rr=(t,r,o,a)=>tr.answer(t,r.choice,o,a,r.picks,r.decided);async function sa(t,r){const o=Ye(Be(t));return o?Rr(t,o.answer,null,r):!1}var Nr=l('<div class="overflow-hidden rounded-t-md border-b"><!></div>'),Sr=l('<span class="inline-flex items-center gap-1 text-muted-foreground" data-where-preview="down"><!>Preview stopped</span>'),qr=l('<a target="_blank" rel="noreferrer" class="inline-flex items-center gap-1 text-muted-foreground hover:text-foreground hover:underline max-md:min-h-11"> <!></a>'),Hr=l('<button type="button" class="inline-flex cursor-pointer items-center gap-1 font-medium text-sea hover:underline max-md:min-h-11" aria-haspopup="dialog" data-where-preview=""><!>Open the preview</button> <!>',1),jr=l('<span class="inline-flex items-center gap-1 text-muted-foreground" data-where-board="down"><!>Board stopped</span>'),Pr=l('<a target="_blank" rel="noreferrer" class="inline-flex items-center gap-1 font-medium text-sea hover:underline max-md:min-h-11" data-where-board=""><!>Open the board<!></a>'),Ur=l('<div class="mt-2.5 rounded-md border bg-background/60 text-xs" data-decision-where=""><!> <div class="flex flex-wrap items-center gap-x-3 gap-y-1.5 px-3 py-2"><span class="text-muted-foreground">Where it is</span> <!> <!></div></div>'),Wr=l("<!> <!>",1);function Gr(t,r){Ee(r,!0);const o=k(()=>r.card.evidence),a=k(()=>e(o).previewTask??(e(o).preview?Re(e(o).preview):null)),q=k(()=>e(o).board?Re(e(o).board):null);Fe(()=>{if(e(a))return ye.watch(e(a))}),Fe(()=>{if(e(q))return ye.watch(e(q))});const p=k(()=>e(a)?ye.checks[e(a)]:void 0),h=k(()=>e(q)?ye.checks[e(q)]:void 0),G=k(()=>e(p)?.state==="down"),te=k(()=>e(h)?.state==="down"),K=k(()=>e(p)?.url??e(o).preview),ae=w=>w?URL.parse(w)?.host??w:"",$=k(()=>r.card.kind==="preview"&&!!e(o).preview);let j=ar(null);const ie=w=>ke(j,{from:w.currentTarget.getBoundingClientRect()},!0);var A=Wr(),B=he(A);{var ee=w=>{var S=Ur(),M=m(S);{var g=_=>{var R=Nr(),oe=m(R);{var de=x=>{Ne(x,{get taskId(){return e(o).previewTask},compact:!0,toolbar:!1,onopen:()=>ke(j,{from:null},!0)})},le=x=>{Ne(x,{get url(){return e(o).preview},compact:!0,toolbar:!1,onopen:()=>ke(j,{from:null},!0)})};c(oe,x=>{e(o).previewTask?x(de):x(le,-1)})}v(R),i(_,R)};c(M,_=>{e($)&&e(a)&&_(g)})}var y=n(M,2),I=n(m(y),2);{var V=_=>{var R=Le(),oe=he(R);{var de=x=>{var u=Sr(),f=m(u);Se(f,{class:"size-3.5 shrink-0","aria-hidden":"true"}),Ce(),v(u),i(x,u)},le=x=>{var u=Hr(),f=he(u),T=m(f);We(T,{class:"size-3.5 shrink-0","aria-hidden":"true"}),Ce(),v(f);var F=n(f,2);{var J=P=>{var C=qr(),X=m(C,!0),U=n(X);Ae(U,{class:"size-3.5 shrink-0","aria-hidden":"true"}),v(C),z(Y=>{D(C,"href",e(K)),D(C,"title",e(K)),E(X,Y)},[()=>ae(e(o).preview)]),i(P,C)};c(F,P=>{e(K)&&P(J)})}me("click",f,ie),i(x,u)};c(oe,x=>{e(G)?x(de):x(le,-1)})}i(_,R)};c(I,_=>{e(o).preview&&_(V)})}var ne=n(I,2);{var O=_=>{var R=Le(),oe=he(R);{var de=x=>{var u=jr(),f=m(u);Se(f,{class:"size-3.5 shrink-0","aria-hidden":"true"}),Ce(),v(u),i(x,u)},le=x=>{var u=Pr(),f=m(u);zr(f,{class:"size-3.5 shrink-0","aria-hidden":"true"});var T=n(f,2);Ae(T,{class:"size-3.5 shrink-0","aria-hidden":"true"}),v(u),z(()=>{D(u,"href",e(o).board),D(u,"title",e(o).board)}),i(x,u)};c(oe,x=>{e(te)?x(de):x(le,-1)})}i(_,R)};c(ne,_=>{e(o).board&&_(O)})}v(y),v(S),i(w,S)};c(B,w=>{(e(o).preview||e(o).board)&&w(ee)})}var re=n(B,2);{var se=w=>{sr(w,{get taskId(){return e(o).previewTask},get title(){return r.card.taskTitle},get url(){return e(o).preview},get from(){return e(j).from},onclose:()=>ke(j,null)})};c(re,w=>{e(j)&&e(o).preview&&w(se)})}i(t,A),Me()}De(["click"]);var Kr=l('<button class="inline-flex cursor-pointer items-center gap-1 text-sea hover:underline"><!> <span class="ml-1 font-mono break-all text-muted-foreground"> </span></button> <a class="ml-2 text-sea underline-offset-2 hover:underline" data-doc-link="">Open in the reader</a>',1),Br=l('<span class="inline-flex items-center gap-1 text-muted-foreground"><!>Report <span class="font-mono break-all"> </span> (not found)</span>'),Xr=l('<p class="text-danger" role="alert"> </p>'),Yr=l('<p class="text-muted-foreground">Reading the report…</p>'),Qr=l('<div class="chat-md"></div>'),Vr=l('<div class="mt-2 max-h-[28rem] overflow-y-auto rounded-md border bg-background/60 px-3 py-2 text-sm"><!></div>'),Jr=l('<div class="mt-2 text-xs"><!> <!></div>'),Zr=l('<span class="font-normal"> </span>'),$r=l('<span class="mr-1.5 rounded bg-danger/10 px-1 text-xs font-medium text-danger">Serious</span>'),et=l('<p class="mt-0.5 font-mono text-xs text-muted-foreground"> </p>'),rt=l('<p class="mt-1 text-xs leading-relaxed text-muted-foreground"><!></p>'),tt=l('<li><p class="leading-snug"><!><!></p> <!> <!></li>'),at=l('<ol class="space-y-2.5"></ol>'),nt=l('<div><p class="text-xs font-medium text-muted-foreground">As Firstmate wrote it</p> <p class="mt-0.5 leading-relaxed text-muted-foreground"><!></p></div>'),ot=l('<p class="leading-relaxed whitespace-pre-line text-muted-foreground"><!></p>'),it=l('<span class="ml-1.5 text-muted-foreground"> </span>'),st=l('<li><a target="_blank" rel="noreferrer" class="inline-flex items-center gap-1 break-all text-sea hover:underline"><!> </a><!></li>'),dt=l('<li class="inline-flex items-center gap-1 text-muted-foreground"><!>Findings file <span class="font-mono break-all"> </span></li>'),lt=l('<ul class="flex flex-col gap-1 text-xs"><!> <!></ul>'),ct=l('<li><a target="_blank" rel="noreferrer" class="block"><img class="h-20 w-32 rounded border object-cover object-top" loading="lazy"/></a></li>'),vt=l('<ul class="flex flex-wrap gap-2"></ul>'),ut=l('<div class="mt-2 space-y-3 rounded-md border bg-background/60 p-3 text-sm"><!> <!> <!> <!> <!></div>'),mt=l('<button class="touch-target mt-3 flex cursor-pointer items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground">Evidence<!><!></button> <!>',1),ft=l("<!> <!> <!>",1);function ht(t,r){Ee(r,!0);let o=fe(r,"expanded",3,!1);const a=k(()=>r.card.evidence),q=k(()=>r.card.choices),p=k(()=>!!(e(a).text||e(a).findings.length||e(a).pr||e(a).screenshots.length||e(a).file||e(q)));let h=nr({open:!1,text:null,error:null});async function G(){h.open=!h.open;const A=e(a).report?.url;if(!(!h.open||h.text!==null||!A))try{const B=await fetch(A);if(!B.ok)throw new Error;h.text=await B.text(),h.error=null}catch{h.error="The report could not be read."}}var te=ft(),K=he(te);Gr(K,{get card(){return r.card}});var ae=n(K,2);{var $=A=>{var B=Jr(),ee=m(B);{var re=M=>{var g=Kr(),y=he(g),I=m(y);ze(I,{class:"size-3.5 shrink-0","aria-hidden":"true"});var V=n(I,1,!0),ne=n(V),O=H(ne,!0);v(y);var _=n(y,2);z(R=>{D(y,"aria-expanded",h.open),E(V,h.open?"Hide the report":"Read the report"),E(O,e(a).report.path),D(_,"href",R)},[()=>gr(e(a).report.path)]),me("click",y,G),i(M,g)},se=M=>{var g=Br(),y=m(g);ze(y,{class:"size-3.5 shrink-0","aria-hidden":"true"});var I=n(y,2),V=H(I,!0);Ce(),v(g),z(()=>E(V,e(a).report.path)),i(M,g)};c(ee,M=>{e(a).report.url?M(re):M(se,-1)})}var w=n(ee,2);{var S=M=>{var g=Vr(),y=m(g);{var I=O=>{var _=Xr(),R=H(_,!0);z(()=>E(R,h.error)),i(O,_)},V=O=>{var _=Yr();i(O,_)},ne=O=>{var _=Qr();hr(_,()=>pr(h.text),!0),v(_),i(O,_)};c(y,O=>{h.error?O(I):h.text===null?O(V,1):O(ne,-1)})}v(g),i(M,g)};c(w,M=>{h.open&&M(S)})}v(B),i(A,B)};c(ae,A=>{e(a).report&&A($)})}var j=n(ae,2);{var ie=A=>{var B=mt(),ee=he(B),re=n(m(ee));{let g=k(()=>o()?"rotate-180":"");_r(re,{get class(){return`size-3.5 transition-transform ${e(g)??""}`},"aria-hidden":"true"})}var se=n(re);{var w=g=>{var y=Zr(),I=H(y);z(()=>E(I,`${e(a).findings.length?` · ${e(a).findings.length} ${e(a).findings.length===1?"finding":"findings"}`:""}${e(a).pr?" · pull request":""}${e(a).screenshots.length?` · ${e(a).screenshots.length} ${e(a).screenshots.length===1?"screenshot":"screenshots"}`:""}`)),i(g,y)};c(se,g=>{o()||g(w)})}v(ee);var S=n(ee,2);{var M=g=>{var y=ut(),I=m(y);{var V=u=>{var f=at();Oe(f,21,()=>e(a).findings,T=>T.id,(T,F)=>{var J=tt(),P=m(J),C=m(P);{var X=N=>{var Z=$r();i(N,Z)};c(C,N=>{e(F).serious&&N(X)})}var U=n(C);_e(U,{get text(){return e(F).summary}}),v(P);var Y=n(P,2);{var ve=N=>{var Z=et(),ue=H(Z,!0);z(()=>E(ue,e(F).where)),i(N,Z)};c(Y,N=>{e(F).where&&N(ve)})}var xe=n(Y,2);{var be=N=>{var Z=rt(),ue=m(Z);_e(ue,{get text(){return e(F).detail}}),v(Z),i(N,Z)};c(xe,N=>{e(F).detail&&N(be)})}v(J),i(T,J)}),v(f),i(u,f)};c(I,u=>{e(a).findings.length&&u(V)})}var ne=n(I,2);{var O=u=>{var f=nt(),T=n(m(f),2),F=m(T);_e(F,{get text(){return r.card.question}}),v(T),v(f),i(u,f)};c(ne,u=>{e(q)&&u(O)})}var _=n(ne,2);{var R=u=>{var f=ot(),T=m(f);_e(T,{get text(){return e(a).text}}),v(f),i(u,f)};c(_,u=>{e(a).text&&u(R)})}var oe=n(_,2);{var de=u=>{var f=lt(),T=m(f);{var F=C=>{var X=st(),U=m(X),Y=m(U);Ke(Y,{class:"size-3.5 shrink-0","aria-hidden":"true"});var ve=n(Y,1,!0);v(U);var xe=n(U);{var be=N=>{var Z=it(),ue=H(Z);z(()=>E(ue,`· checks ${e(a).checks??""}`)),i(N,Z)};c(xe,N=>{e(a).checks&&N(be)})}v(X),z(()=>{D(U,"href",e(a).pr.url),E(ve,e(a).pr.url)}),i(C,X)};c(T,C=>{e(a).pr&&C(F)})}var J=n(T,2);{var P=C=>{var X=dt(),U=m(X);ze(U,{class:"size-3.5 shrink-0","aria-hidden":"true"});var Y=n(U,2),ve=H(Y,!0);v(X),z(()=>E(ve,e(a).file)),i(C,X)};c(J,C=>{e(a).file&&C(P)})}v(f),i(u,f)};c(oe,u=>{(e(a).pr||e(a).file)&&u(de)})}var le=n(oe,2);{var x=u=>{var f=vt();Oe(f,21,()=>e(a).screenshots,T=>T.url,(T,F)=>{var J=ct(),P=m(J),C=H(P);v(J),z(()=>{D(P,"href",e(F).url),D(C,"src",e(F).url),D(C,"alt",e(F).name)}),i(T,J)}),v(f),i(u,f)};c(le,u=>{e(a).screenshots.length&&u(x)})}v(y),i(g,y)};c(S,g=>{o()&&g(M)})}z(()=>D(ee,"aria-expanded",o())),me("click",ee,function(...g){r.onToggle?.apply(this,g)}),i(A,B)};c(j,A=>{e(p)&&A(ie)})}i(t,te),Me()}De(["click"]);const pt=7;function da(t,r,o){const a=t.filter(h=>!cr(h)&&vr(h)),q=o-pt*864e5,p=r.filter(h=>Date.parse(h.decidedAt)>=q).sort((h,G)=>Date.parse(G.decidedAt)-Date.parse(h.decidedAt));return{open:a,made:p,count:a.length+p.length}}const gt=t=>t.length>90?t.slice(0,87).trimEnd()+"…":t;function la(t){const r=t.calls[0],o=`I'd decide differently on "${gt(r?.question??t.taskTitle)}" (your call: ${r?.verdict??t.verdict}). `;return`/?chat=${encodeURIComponent(t.taskId)}&draft=${encodeURIComponent(o)}`}const _t=t=>`/?decision=${encodeURIComponent(t)}`;var xt=l('<span class="rounded-sm border px-1.5 text-[0.95rem] leading-[1.15rem] font-semibold tracking-[0.08em] text-muted-foreground [font-variant-caps:all-small-caps]"> </span>'),bt=l('<span class="rounded bg-muted px-1.5 text-xs leading-[1.15rem] font-medium text-foreground/80"> </span>'),kt=l('<span class="ml-auto text-xs text-muted-foreground tabular-nums"> </span>'),wt=l('<span class="text-muted-foreground">· <!></span>'),yt=l('<p class="mt-2.5 border-l-2 border-brass pl-2.5 text-sm leading-snug"><span class="font-medium"> </span><!></p>'),Ct=l('<p class="mt-3 text-sm text-danger" role="alert"> </p>'),zt=l("<kbd>Enter</kbd>"),At=l("<kbd>a</kbd>"),Tt=l('<button class="inline-flex min-h-11 cursor-pointer items-center gap-1.5 rounded-md border bg-background px-3 text-sm font-medium transition-colors hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50 sm:min-h-9" data-agree=""><!> <!></button>'),Dt=l('<a class="inline-flex min-h-11 items-center gap-1.5 rounded-md border bg-background px-3 text-sm font-medium transition-colors hover:bg-accent sm:min-h-9" title="Open the pull request to review it; this answers nothing" data-review-pr=""><!>Review<!></a>'),Et=l("<kbd>l</kbd>"),Mt=l('<button class="inline-flex min-h-11 cursor-pointer items-center gap-1.5 rounded-md px-2.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground sm:min-h-9"><!>Ask me later<!></button>'),It=l("<kbd>c</kbd>"),Ft=l('<button class="inline-flex min-h-11 cursor-pointer items-center gap-1.5 rounded-md px-2.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50 sm:min-h-9" title="No answer needed: Firstmate records it closed."><!>Close<!></button>'),Lt=l('<p class="mt-2 text-sm text-danger" role="alert"> </p>'),Ot=l('<article><header class="flex flex-wrap items-center gap-x-2 gap-y-1"><!> <span><!> </span> <!> <span class="text-xs text-muted-foreground"> </span> <!></header> <h3 class="mt-2 font-sans text-base leading-snug font-medium text-foreground sm:text-[1.05rem]"><!></h3> <a class="touch-target mt-0.5 block text-xs text-muted-foreground hover:text-foreground hover:underline"> </a> <!> <!> <!> <div class="mt-3 flex flex-wrap items-center gap-1.5" role="group" aria-label="Answer"><a class="inline-flex min-h-11 items-center gap-1.5 rounded-md border border-sea bg-sea px-3 text-sm font-medium text-on-accent transition-colors hover:bg-sea/90 sm:min-h-9" title="Open it in the Firstmate chat, with the form that fits it and room to talk it through" data-chat-about=""><!>Chat about this<!></a> <!> <!> <!> <!></div> <!></article>');function ca(t,r){Ee(r,!0);let o=fe(r,"project",3,null),a=fe(r,"active",3,!1),q=fe(r,"expanded",3,!1),p=fe(r,"shortcuts",3,!1),h=fe(r,"canAnswer",3,!0),G=fe(r,"error",3,null);const te={review:{label:"Review question",icon:br},decision:{label:"Decision",icon:qe},blocked:{label:"Stuck",icon:Tr},hold:{label:"Your call",icon:qe},merge:{label:"Merge call",icon:Ke},preview:{label:"Preview sign-off",icon:We}},K=k(()=>te[r.card.kind]),ae=k(()=>r.card.owner==="captain"),$=k(()=>r.card.recommendation),j=k(()=>ur(r.card)),ie=k(()=>_t(r.card.id)),A=k(()=>r.card.evidence.pr?dr.review(r.card.projectId,r.card.evidence.pr):null),B=k(()=>!!r.onClose&&mr(r.card)),ee=k(()=>r.card.choices?.intro||r.card.question),re=k(()=>Ye(Be(r.card))),se=k(()=>e(re)?Or(e(re)):""),w="ml-0.5 hidden rounded border border-current/30 px-1 font-mono text-[0.7rem] leading-4 opacity-70 sm:inline";var S=Ot(),M=m(S),g=m(M);{var y=s=>{var d=xt(),b=H(d,!0);z(()=>E(b,o())),i(s,d)};c(g,s=>{o()&&s(y)})}var I=n(g,2),V=m(I);or(V,()=>e(K).icon,(s,d)=>{d(s,{class:"size-3","aria-hidden":"true"})});var ne=n(V,1,!0);v(I);var O=n(I,2);{var _=s=>{var d=bt(),b=H(d);z(()=>{D(d,"data-second-mate",r.card.secondMate.id),E(b,`From second mate ${r.card.secondMate.id??""}`)}),i(s,d)};c(O,s=>{r.card.secondMate&&s(_)})}var R=n(O,2),oe=H(R,!0),de=n(R,2);{var le=s=>{var d=kt(),b=H(d,!0);z(Q=>E(b,Q),[()=>ir(r.card.askedAt,r.now)]),i(s,d)};c(de,s=>{r.card.askedAt&&s(le)})}v(M);var x=n(M,2),u=m(x);_e(u,{get text(){return e(ee)}}),v(x);var f=n(x,2),T=H(f,!0),F=n(f,2);{var J=s=>{var d=yt(),b=m(d),Q=H(b),ce=n(b);{var L=W=>{var pe=wt(),rr=n(m(pe));_e(rr,{get text(){return e($).text}}),v(pe),i(W,pe)};c(ce,W=>{e($)&&W(L)})}v(d),z(()=>E(Q,`Firstmate recommends${e(re)?`: ${e(se)}`:""}`)),i(s,d)};c(F,s=>{(e($)||e(re))&&s(J)})}var P=n(F,2);ht(P,{get card(){return r.card},get expanded(){return q()},get onToggle(){return r.onToggle}});var C=n(P,2);{var X=s=>{var d=Ct(),b=H(d);z(Q=>E(b,`Not delivered to Firstmate: ${Q??""}. ${r.card.sent.detail??"Try again."??""}`),[()=>r.card.sent.picks??fr(r.card,r.card.sent.choice)]),i(s,d)};c(C,s=>{r.card.sent?.delivery==="failed"&&!G()&&s(X)})}var U=n(C,2),Y=m(U),ve=m(Y);xr(ve,{class:"size-3.5","aria-hidden":"true"});var xe=n(ve,2);{var be=s=>{var d=zt();ge(d,1,we(w)),i(s,d)};c(xe,s=>{p()&&s(be)})}v(Y);var N=n(Y,2);{var Z=s=>{var d=Tt(),b=m(d);kr(b,{class:"size-3.5","aria-hidden":"true"});var Q=n(b),ce=n(Q);{var L=W=>{var pe=At();ge(pe,1,we(w)),i(W,pe)};c(ce,W=>{p()&&W(L)})}v(d),z(()=>{d.disabled=!h(),D(d,"title",`Send Firstmate's recommendation: ${e(se)??""}`),E(Q,`Agree: ${e(se)??""}`)}),me("click",d,function(...W){r.onAgree?.apply(this,W)}),i(s,d)};c(N,s=>{e(re)&&s(Z)})}var ue=n(N,2);{var Qe=s=>{var d=Dt(),b=m(d);lr(b,{class:"size-3.5","aria-hidden":"true"});var Q=n(b,2);{var ce=L=>{Ae(L,{class:"size-3.5","aria-hidden":"true"})};c(Q,L=>{e(A).external&&L(ce)})}v(d),z(()=>{D(d,"href",e(A).href),D(d,"target",e(A).external?"_blank":void 0),D(d,"rel",e(A).external?"noreferrer":void 0)}),i(s,d)};c(ue,s=>{e(A)&&s(Qe)})}var Ie=n(ue,2);{var Ve=s=>{var d=Mt(),b=m(d);wr(b,{class:"size-3.5","aria-hidden":"true"});var Q=n(b,2);{var ce=L=>{var W=Et();ge(W,1,we(w)),i(L,W)};c(Q,L=>{p()&&L(ce)})}v(d),me("click",d,function(...L){r.onLater?.apply(this,L)}),i(s,d)};c(Ie,s=>{r.onLater&&s(Ve)})}var Je=n(Ie,2);{var Ze=s=>{var d=Ft(),b=m(d);yr(b,{class:"size-3.5","aria-hidden":"true"});var Q=n(b,2);{var ce=L=>{var W=It();ge(W,1,we(w)),i(L,W)};c(Q,L=>{p()&&L(ce)})}v(d),z(()=>d.disabled=!h()),me("click",d,function(...L){r.onClose?.apply(this,L)}),i(s,d)};c(Je,s=>{e(B)&&s(Ze)})}v(U);var $e=n(U,2);{var er=s=>{var d=Lt(),b=H(d,!0);z(()=>E(b,G())),i(s,d)};c($e,s=>{G()&&s(er)})}v(S),z(()=>{D(S,"id",`card-${r.card.id??""}`),ge(S,1,`scroll-mt-24 rounded-lg border border-l-[3px] bg-card text-card-foreground transition-shadow ${e(ae)?"border-l-sea":"border-l-brass"} ${a()?"shadow-[0_0_0_2px_var(--ring)]":""} px-4 pt-3.5 pb-3 sm:px-5`),D(S,"aria-current",a()?"true":void 0),D(S,"data-decision-card",r.card.owner),ge(I,1,`flex items-center gap-1 rounded px-1.5 text-xs leading-[1.15rem] font-medium ${e(ae)?"bg-sea/10 text-sea":"bg-muted text-foreground/80"}`),E(ne,e(K).label),E(oe,e(ae)?"Waiting on you":r.card.secondMate?"Its second mate is handling it; yours to take over if you want":"Firstmate is handling it; yours to take over if you want"),D(f,"href",e(j)),E(T,r.card.taskTitle),D(Y,"href",e(ie))}),me("focusin",S,function(...s){r.onFocus?.apply(this,s)}),me("pointerdown",S,function(...s){r.onFocus?.apply(this,s)}),i(t,S),Me()}De(["focusin","pointerdown","click"]);export{ca as D,zr as L,Tr as O,sa as a,Er as b,la as c,_t as d,Be as e,na as f,ht as g,da as h,Rr as i,ia as j,oa as w};
@@ -1 +1 @@
1
- import"./DsnmJJEf.js";import{i as n}from"./DKlgDTCT.js";import{p as h,a as s,b as v,c as i,o as c,t as u,g as o,d as b,r as g}from"./D46tdsTs.js";import{e as _,s as f}from"./BLivoCTk.js";import{p as d}from"./s_exGbLS.js";import{L as x}from"./cwI46DFb.js";var O=i('<a class="nav-tab shrink-0"> </a>'),L=i('<nav class="-ml-2.5 no-scrollbar flex gap-1 overflow-x-auto" aria-label="Logbook"></nav>');function K(l,p){h(p,!1),n();var r=L();_(r,5,()=>x,t=>t.href,(t,e)=>{var a=O(),m=c(a,!0);u(()=>{f(a,"href",o(e).href),f(a,"aria-current",d.url.pathname===o(e).href?"page":void 0),b(m,o(e).label)}),s(t,a)}),g(r),s(l,r),v()}export{K as I};
1
+ import"./DsnmJJEf.js";import{i as n}from"./DKlgDTCT.js";import{p as h,a as s,b as v,c as i,o as c,t as u,g as o,d as b,r as g}from"./D46tdsTs.js";import{e as _,s as f}from"./BLivoCTk.js";import{p as d}from"./Dybu9Tl2.js";import{L as x}from"./cwI46DFb.js";var O=i('<a class="nav-tab shrink-0"> </a>'),L=i('<nav class="-ml-2.5 no-scrollbar flex gap-1 overflow-x-auto" aria-label="Logbook"></nav>');function K(l,p){h(p,!1),n();var r=L();_(r,5,()=>x,t=>t.href,(t,e)=>{var a=O(),m=c(a,!0);u(()=>{f(a,"href",o(e).href),f(a,"aria-current",d.url.pathname===o(e).href?"page":void 0),b(m,o(e).label)}),s(t,a)}),g(r),s(l,r),v()}export{K as I};
@@ -0,0 +1,3 @@
1
+ x@����eR�_wO.�\�=B��o��\J<���X��"L���;K�q��"�Mx���ܗI����(A�vA�F��%Kf�*�-r����)k=�Jh`�G
2
+ j�Ha�@��Y�ǕU��dc�2tXen��&��)�,e�ި���}z;�پ�?��_ҧm��I�FT��J��P쮩�H�{P�L["�ľrĒT��� �Dv�\={�]��D���d�������xT� W��Q���eX�q$4��B���+*p�R�PI�R��`s��Y���:bi���.���0:�c-�kHI��8�Zͬ�CCXJ]DJ��JJ��j�V9�|5��rk�Z�󙣤
3
+ :ںT��0j��v�
@@ -1,3 +1,3 @@
1
- import"./DsnmJJEf.js";import{s as ye,r as ke,p as Z}from"./z5Xef_-v.js";import{I as Te}from"./B4gzexCn.js";import{l as se,p as de,u as D,g as e,A as oe,v as _,h as k,r as y,t as z,x as le,a as c,b as ue,m as O,i as ie,s as g,o as N,d as w,y as ne,c as T,w as U,f as ve,q as Ee}from"./D46tdsTs.js";import{i as X}from"./DWAM9c1z.js";import{s as V,d as Ce,a as te,e as Se}from"./BLivoCTk.js";import{b as re}from"./RbWQh321.js";import{c as fe,m as Me}from"./BCUUi0V0.js";import{e as Le,l as ee,c as ae}from"./D90Ga_Id.js";import{b as ce,a as Oe}from"./D9uOQyZY.js";import{S as me}from"./13cncWIw.js";import{X as Ne}from"./CSU-6kdN.js";var ze=new Set(["$$slots","$$events","$$legacy"]);function pt(r,a){let n=ke(a,ze);const d={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2"}]]};Te(r,ye(()=>n,{get icon(){return d}}))}const Ie="No screenshots saved",Ae="No live preview reported",Pe="No pull request recorded",ht=r=>r.attention?.owner==="captain"&&r.attention.kind==="review";function Fe(r){return r<=0?Ie:`${r} ${r===1?"screenshot":"screenshots"}`}function xt(r,a=null){const n=a??[],d=a?n.length:r.screenshots,u=r.preview?.url??r.passage.link?.url??null;return{shots:n,shotsText:Fe(d),preview:u?{url:u}:null,previewText:u?"Live preview":Ae,pr:r.pr?{url:r.pr.url,label:r.pr.number?`PR #${r.pr.number}`:"Pull request"}:null,prText:r.pr?r.pr.number?`PR #${r.pr.number}`:"Pull request":Pe}}const pe={full:1e3,window:2e3},He=80,he=1.45,Re=11,We=32;function je(r){let a=0;for(const n of r)a=Math.max(a,[...n.trimEnd()].length);return Math.max(He,a)}function Xe(r){const a=r.lineHeight??he,n=Math.max(1,Math.floor(r.cols)),d=r.width/(n*(r.charWidth>0?r.charWidth:.6)),u=Number.isFinite(d)?Math.min(We,Math.max(Re,d)):13,o=Math.floor(u*10)/10,s=Math.max(1,Math.floor(Math.max(0,r.height)/(o*a)));return{fontSize:o,cols:n,rows:s}}function Qe({load:r,intervalMs:a,onresult:n,onerror:d,doc:u}){let o=!1,s=!1,t;const E=()=>{clearTimeout(t),o||(t=setTimeout(x,a))},x=async()=>{if(!(o||s)){if(u.hidden)return E();s=!0;try{const m=await r();o||n(m)}catch(m){o||d(m instanceof Error?m:new Error(String(m)))}finally{s=!1}E()}},C=()=>{!u.hidden&&!s&&(clearTimeout(t),x())};return u.addEventListener("visibilitychange",C),x(),()=>{o=!0,clearTimeout(t),u.removeEventListener("visibilitychange",C)}}function xe(r,a,n,d,u=document){const o=`/api/tasks/${encodeURIComponent(r)}/output?lines=${a}`;return Qe({load:async()=>{const s=await fetch(o);if(!s.ok)throw new Error(`HTTP ${s.status}`);return await s.json()},intervalMs:n,doc:u,...d})}var De=T('<pre class="mt-auto whitespace-pre" aria-label="The worker’s terminal"> </pre>'),Ue=T('<p class="grid flex-1 place-items-center px-4 text-center font-sans text-sm text-terminal-foreground/60"><!></p>'),Ve=T('<div class="flex h-full flex-col"><div class="flex shrink-0 items-center gap-2 border-b border-terminal-foreground/15 px-4 py-2.5 text-sm sm:px-6"><!> <span class="min-w-0 truncate font-medium"> </span> <span class="hidden text-terminal-foreground/60 sm:inline"> </span> <span class="ml-auto hidden text-xs text-terminal-foreground/60 sm:inline">Esc to close</span> <button type="button" class="-mr-2 flex size-8 items-center justify-center rounded-md text-terminal-foreground/80 hover:bg-terminal-foreground/10 hover:text-terminal-foreground sm:ml-2" aria-label="Close the full-screen console"><!></button></div> <div class="flex min-h-0 flex-1 flex-col overflow-auto font-mono"><!></div></div>'),Ge=T('<dialog class="m-0 h-dvh max-h-none w-dvw max-w-none overflow-hidden bg-terminal p-0 text-terminal-foreground backdrop:bg-black/70"><!></dialog>');function Be(r,a){de(a,!0);let n=Z(a,"open",15,!1);const d=200,u=16;let o=O(null),s=O(null),t=O(null),E=O(!1),x=O(0),C=O(0),m=O(.6),H=!0;D(()=>{if(e(o))if(n()&&!e(o).open){H=!0;const v=e(o);Le(document.documentElement).then(()=>{!n()||!v.isConnected?ee(document.documentElement):v.open||v.showModal()})}else!n()&&e(o).open&&e(o).close()}),D(()=>{if(!n())return;const v=document.documentElement;let h=!1;const f=()=>{document.fullscreenElement===v?h=!0:h&&(h=!1,n(!1))};return document.addEventListener("fullscreenchange",f),()=>{document.removeEventListener("fullscreenchange",f),ee(v)}}),D(()=>{if(!n())return;oe(()=>ae.open++);const v=xe(a.task.id,d,pe.full,{onresult:h=>{_(t,h,!0),_(E,!1)},onerror:()=>_(E,!0)});return()=>{v(),oe(()=>ae.open--)}}),D(()=>{if(!e(s))return;const v=getComputedStyle(e(s)).fontFamily,h=document.createElement("canvas").getContext("2d");if(!h)return;h.font=`100px ${v}`;const f=h.measureText("M".repeat(10)).width/1e3;f>0&&_(m,f)});const P=ie(()=>e(t)?.available?e(t).lines:[]),R=ie(()=>Xe({width:e(x)-2*u,height:e(C)-2*u,cols:je(e(P)),charWidth:e(m)}));D(()=>{e(t),e(R),e(s)&&H&&(e(s).scrollTop=e(s).scrollHeight)});const G=()=>{e(s)&&(H=e(s).scrollHeight-e(s).scrollTop-e(s).clientHeight<24)};var I=Ge(),J=k(I);{var K=v=>{var h=Ve(),f=k(h),l=k(f);me(l,{class:"size-4 text-terminal-foreground/70","aria-hidden":"true"});var p=g(l,2),W=N(p,!0),S=g(p,2),B=N(S),A=g(S,4),F=k(A);Ne(F,{class:"size-4"}),y(A),y(f);var i=g(f,2),M=k(i);{var ge=b=>{var j=De();let Y;var $=N(j,!0);z(q=>{V(j,"data-cols",e(R).cols),V(j,"data-rows",e(R).rows),Y=Ce(j,"",Y,{padding:"16px","font-size":`${e(R).fontSize??""}px`,"line-height":he}),w($,q)},[()=>e(P).join(`
1
+ import"./DsnmJJEf.js";import{s as ye,r as ke,p as Z}from"./z5Xef_-v.js";import{I as Te}from"./B4gzexCn.js";import{l as se,p as de,u as D,g as e,A as oe,v as _,h as k,r as y,t as z,x as le,a as c,b as ue,m as O,i as ie,s as g,o as N,d as w,y as ne,c as T,w as U,f as ve,q as Ee}from"./D46tdsTs.js";import{i as X}from"./DWAM9c1z.js";import{s as V,d as Ce,a as te,e as Se}from"./BLivoCTk.js";import{b as re}from"./RbWQh321.js";import{c as fe,m as Me}from"./BCUUi0V0.js";import{e as Le,l as ee,c as ae}from"./DhkAM2zE.js";import{b as ce,a as Oe}from"./BPOpB19z.js";import{S as me}from"./13cncWIw.js";import{X as Ne}from"./CSU-6kdN.js";var ze=new Set(["$$slots","$$events","$$legacy"]);function pt(r,a){let n=ke(a,ze);const d={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2"}]]};Te(r,ye(()=>n,{get icon(){return d}}))}const Ie="No screenshots saved",Ae="No live preview reported",Pe="No pull request recorded",ht=r=>r.attention?.owner==="captain"&&r.attention.kind==="review";function Fe(r){return r<=0?Ie:`${r} ${r===1?"screenshot":"screenshots"}`}function xt(r,a=null){const n=a??[],d=a?n.length:r.screenshots,u=r.preview?.url??r.passage.link?.url??null;return{shots:n,shotsText:Fe(d),preview:u?{url:u}:null,previewText:u?"Live preview":Ae,pr:r.pr?{url:r.pr.url,label:r.pr.number?`PR #${r.pr.number}`:"Pull request"}:null,prText:r.pr?r.pr.number?`PR #${r.pr.number}`:"Pull request":Pe}}const pe={full:1e3,window:2e3},He=80,he=1.45,Re=11,We=32;function je(r){let a=0;for(const n of r)a=Math.max(a,[...n.trimEnd()].length);return Math.max(He,a)}function Xe(r){const a=r.lineHeight??he,n=Math.max(1,Math.floor(r.cols)),d=r.width/(n*(r.charWidth>0?r.charWidth:.6)),u=Number.isFinite(d)?Math.min(We,Math.max(Re,d)):13,o=Math.floor(u*10)/10,s=Math.max(1,Math.floor(Math.max(0,r.height)/(o*a)));return{fontSize:o,cols:n,rows:s}}function Qe({load:r,intervalMs:a,onresult:n,onerror:d,doc:u}){let o=!1,s=!1,t;const E=()=>{clearTimeout(t),o||(t=setTimeout(x,a))},x=async()=>{if(!(o||s)){if(u.hidden)return E();s=!0;try{const m=await r();o||n(m)}catch(m){o||d(m instanceof Error?m:new Error(String(m)))}finally{s=!1}E()}},C=()=>{!u.hidden&&!s&&(clearTimeout(t),x())};return u.addEventListener("visibilitychange",C),x(),()=>{o=!0,clearTimeout(t),u.removeEventListener("visibilitychange",C)}}function xe(r,a,n,d,u=document){const o=`/api/tasks/${encodeURIComponent(r)}/output?lines=${a}`;return Qe({load:async()=>{const s=await fetch(o);if(!s.ok)throw new Error(`HTTP ${s.status}`);return await s.json()},intervalMs:n,doc:u,...d})}var De=T('<pre class="mt-auto whitespace-pre" aria-label="The worker’s terminal"> </pre>'),Ue=T('<p class="grid flex-1 place-items-center px-4 text-center font-sans text-sm text-terminal-foreground/60"><!></p>'),Ve=T('<div class="flex h-full flex-col"><div class="flex shrink-0 items-center gap-2 border-b border-terminal-foreground/15 px-4 py-2.5 text-sm sm:px-6"><!> <span class="min-w-0 truncate font-medium"> </span> <span class="hidden text-terminal-foreground/60 sm:inline"> </span> <span class="ml-auto hidden text-xs text-terminal-foreground/60 sm:inline">Esc to close</span> <button type="button" class="-mr-2 flex size-8 items-center justify-center rounded-md text-terminal-foreground/80 hover:bg-terminal-foreground/10 hover:text-terminal-foreground sm:ml-2" aria-label="Close the full-screen console"><!></button></div> <div class="flex min-h-0 flex-1 flex-col overflow-auto font-mono"><!></div></div>'),Ge=T('<dialog class="m-0 h-dvh max-h-none w-dvw max-w-none overflow-hidden bg-terminal p-0 text-terminal-foreground backdrop:bg-black/70"><!></dialog>');function Be(r,a){de(a,!0);let n=Z(a,"open",15,!1);const d=200,u=16;let o=O(null),s=O(null),t=O(null),E=O(!1),x=O(0),C=O(0),m=O(.6),H=!0;D(()=>{if(e(o))if(n()&&!e(o).open){H=!0;const v=e(o);Le(document.documentElement).then(()=>{!n()||!v.isConnected?ee(document.documentElement):v.open||v.showModal()})}else!n()&&e(o).open&&e(o).close()}),D(()=>{if(!n())return;const v=document.documentElement;let h=!1;const f=()=>{document.fullscreenElement===v?h=!0:h&&(h=!1,n(!1))};return document.addEventListener("fullscreenchange",f),()=>{document.removeEventListener("fullscreenchange",f),ee(v)}}),D(()=>{if(!n())return;oe(()=>ae.open++);const v=xe(a.task.id,d,pe.full,{onresult:h=>{_(t,h,!0),_(E,!1)},onerror:()=>_(E,!0)});return()=>{v(),oe(()=>ae.open--)}}),D(()=>{if(!e(s))return;const v=getComputedStyle(e(s)).fontFamily,h=document.createElement("canvas").getContext("2d");if(!h)return;h.font=`100px ${v}`;const f=h.measureText("M".repeat(10)).width/1e3;f>0&&_(m,f)});const P=ie(()=>e(t)?.available?e(t).lines:[]),R=ie(()=>Xe({width:e(x)-2*u,height:e(C)-2*u,cols:je(e(P)),charWidth:e(m)}));D(()=>{e(t),e(R),e(s)&&H&&(e(s).scrollTop=e(s).scrollHeight)});const G=()=>{e(s)&&(H=e(s).scrollHeight-e(s).scrollTop-e(s).clientHeight<24)};var I=Ge(),J=k(I);{var K=v=>{var h=Ve(),f=k(h),l=k(f);me(l,{class:"size-4 text-terminal-foreground/70","aria-hidden":"true"});var p=g(l,2),W=N(p,!0),S=g(p,2),B=N(S),A=g(S,4),F=k(A);Ne(F,{class:"size-4"}),y(A),y(f);var i=g(f,2),M=k(i);{var ge=b=>{var j=De();let Y;var $=N(j,!0);z(q=>{V(j,"data-cols",e(R).cols),V(j,"data-rows",e(R).rows),Y=Ce(j,"",Y,{padding:"16px","font-size":`${e(R).fontSize??""}px`,"line-height":he}),w($,q)},[()=>e(P).join(`
2
2
  `)]),c(b,j)},_e=b=>{var j=Ue(),Y=k(j);{var $=L=>{var Q=U("Could not reach the Wheelhouse server.");c(L,Q)},q=L=>{var Q=U("Reading the worker’s terminal…");c(L,Q)},be=L=>{var Q=U();z(()=>w(Q,e(t).reason)),c(L,Q)},we=L=>{var Q=U("The terminal is empty.");c(L,Q)};X(Y,L=>{e(E)?L($):e(t)?e(t).available?L(we,-1):L(be,2):L(q,1)})}y(j),c(b,j)};X(M,b=>{e(P).length?b(ge):b(_e,-1)})}y(i),re(i,b=>_(s,b),()=>e(s)),y(h),z(b=>{w(W,a.task.shortTitle),w(B,`· live console, read-only${b??""}`)},[()=>e(t)?.capturedAt?` · ${fe(e(t).capturedAt)}`:""]),ne("click",A,()=>n(!1)),le("scroll",i,G),ce(i,"clientWidth",b=>_(x,b)),ce(i,"clientHeight",b=>_(C,b)),c(v,h)};X(J,v=>{n()&&v(K)})}y(I),re(I,v=>_(o,v),()=>e(o)),z(()=>{V(I,"aria-label",`${a.task.shortTitle??""}: live console`),V(I,"data-console-fullscreen",a.task.id)}),le("close",I,()=>{ee(document.documentElement),n(!1)}),c(r,I),ue()}se(["click"]);var Je=T('<pre class="flex min-h-0 flex-1 flex-col justify-end overflow-hidden px-3 py-2 font-mono text-xs leading-[1.45] whitespace-pre max-md:[overflow-wrap:anywhere] max-md:whitespace-pre-wrap" aria-label="Latest lines of the worker’s terminal"> </pre>'),Ke=T('<p class="grid flex-1 place-items-center px-4 text-center text-xs text-terminal-foreground/60"><!></p>'),Ye=T('<div><button type="button" class="absolute inset-0 z-10 rounded-[inherit] focus-visible:ring-3 focus-visible:ring-ring/60 focus-visible:outline-none" title="Open full screen"></button> <div class="flex items-center gap-1.5 border-b border-terminal-foreground/10 px-3 py-1.5 text-xs text-terminal-foreground/60"><!> <span class="max-md:whitespace-nowrap">Live console</span> <span class="ml-auto max-md:min-w-0 max-md:truncate"> </span> <!></div> <!></div> <!>',1);function gt(r,a){de(a,!0);let n=Z(a,"lines",3,12),d=Z(a,"class",3,"");const u=24;let o=O(null),s=O(!1),t=O(null),E=O(!1),x=O(!1);D(()=>{if(!e(o))return;const l=new IntersectionObserver(([p])=>_(s,p.isIntersecting,!0),{rootMargin:"100px"});return l.observe(e(o)),()=>l.disconnect()}),D(()=>{if(!(!e(s)||ae.open>0))return xe(a.task.id,n()+u,pe.window,{onresult:l=>{_(t,l,!0),_(E,!1)},onerror:()=>_(E,!0)})}),D(()=>{a.onsample?.(e(t)?.available&&e(t).lines.length?{line:Me(e(t).lines),capturedAt:e(t).capturedAt}:null)});var C=Ye(),m=ve(C),H=k(m),P=g(H,2),R=k(P);me(R,{class:"size-3","aria-hidden":"true"});var G=g(R,4),I=N(G),J=g(G,2);Oe(J,{class:"size-3.5 text-terminal-foreground/60 transition-colors group-hover/console:text-terminal-foreground","aria-hidden":"true"}),y(P);var K=g(P,2);{var v=l=>{var p=Je(),W=N(p,!0);z(S=>w(W,S),[()=>e(t).lines.slice(-n()).join(`
3
3
  `)]),c(l,p)},h=l=>{var p=Ke(),W=k(p);{var S=i=>{var M=U("Could not reach the Wheelhouse server.");c(i,M)},B=i=>{var M=U("Reading the worker’s terminal…");c(i,M)},A=i=>{var M=U();z(()=>w(M,e(t).reason)),c(i,M)},F=i=>{var M=U("The terminal is empty.");c(i,M)};X(W,i=>{e(E)?i(S):e(t)?e(t).available?i(F,-1):i(A,2):i(B,1)})}y(p),c(l,p)};X(K,l=>{e(t)?.available&&e(t).lines.length?l(v):l(h,-1)})}y(m),re(m,l=>_(o,l),()=>e(o));var f=g(m,2);Be(f,{get task(){return a.task},get open(){return e(x)},set open(l){_(x,l,!0)}}),z(l=>{te(m,1,`group/console relative z-10 flex aspect-[16/10] flex-col overflow-hidden rounded-sm border bg-terminal text-terminal-foreground ${d()??""}`),V(m,"data-console",a.task.id),V(H,"aria-label",`Open ${a.task.shortTitle??""}’s live console full screen`),w(I,`read-only${l??""}`)},[()=>e(t)?.capturedAt?` · ${fe(e(t).capturedAt)}`:""]),ne("click",H,()=>_(x,!0)),c(r,C),ue()}se(["click"]);var Ze=T('<p class="mt-1.5 leading-relaxed whitespace-pre-line text-muted-foreground" data-question-detail=""> </p>'),$e=T('<!> <button type="button" class="touch-target mt-1 text-xs text-muted-foreground hover:text-foreground hover:underline"> </button>',1),qe=T('<p class="mt-0.5 leading-relaxed"> </p>'),et=T('<div class="mt-2 border-l-2 border-brass/60 pl-2.5" data-question-call=""><p class="text-xs text-muted-foreground">Firstmate decided: <span class="font-medium text-foreground"> </span></p> <!></div>'),tt=T('<li><div class="flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1"><p class="text-xs text-muted-foreground"> </p> <span> </span></div> <p class="mt-1 leading-relaxed"> </p> <!> <!></li>'),rt=T('<ol class="space-y-2" data-questions=""></ol>');function _t(r,a){let n=Z(a,"size",3,"page"),d=Ee({});const u={waiting:{label:"Waiting on Firstmate",class:"bg-warning/10 text-warning"},answered:{label:"Answered",class:"bg-success/10 text-success"},closed:{label:"Closed without an answer",class:"bg-muted text-muted-foreground"}};var o=rt();Se(o,23,()=>a.questions,s=>s.id,(s,t,E)=>{var x=tt(),C=k(x),m=k(C),H=N(m),P=g(m,2),R=N(P,!0);y(C);var G=g(C,2),I=N(G,!0),J=g(G,2);{var K=f=>{var l=$e(),p=ve(l);{var W=A=>{var F=Ze(),i=N(F,!0);z(()=>w(i,e(t).detail)),c(A,F)};X(p,A=>{d[e(t).id]&&A(W)})}var S=g(p,2),B=N(S,!0);z(()=>{V(S,"aria-expanded",!!d[e(t).id]),w(B,d[e(t).id]?"Show less":"Show the whole question")}),ne("click",S,()=>d[e(t).id]=!d[e(t).id]),c(f,l)};X(J,f=>{e(t).detail&&f(K)})}var v=g(J,2);{var h=f=>{var l=et(),p=k(l),W=g(k(p)),S=N(W,!0);y(p);var B=g(p,2);{var A=F=>{var i=qe(),M=N(i,!0);z(()=>w(M,e(t).reason)),c(F,i)};X(B,F=>{e(t).reason&&F(A)})}y(l),z(()=>w(S,e(t).verdict)),c(f,l)};X(v,f=>{e(t).verdict&&f(h)})}y(x),z(()=>{te(x,1,`rounded-md border border-hair bg-card ${n()==="card"?"px-2.5 py-2 text-xs":"px-3 py-2.5 text-sm"}`),V(x,"data-question",e(t).status),w(H,`Question ${e(E)+1}${e(t).where?` · ${e(t).where}`:""}${e(t).serious?" · marked serious":""}`),te(P,1,`rounded-full px-2 py-0.5 text-xs font-medium ${u[e(t).status].class??""}`),w(R,u[e(t).status].label),w(I,e(t).summary)}),c(s,x)}),y(o),c(r,o)}se(["click"]);export{gt as C,pt as I,_t as Q,ht as a,xt as r,Fe as s};
@@ -1,3 +1,3 @@
1
- import"./DsnmJJEf.js";import{aF as Ue,p as ve,j as G,f as l,a as r,b as ge,g as e,h as se,aa as Ve,r as oe,i as P,c as T,l as Ee,m as U,q as Je,s as u,n as W,w as j,v as a,t as ue,d as fe,x as Ke,y as Me,o as Be}from"./D46tdsTs.js";import{i as V}from"./DWAM9c1z.js";import{c as _}from"./DT69KRC9.js";import{l as Qe,r as Ce,a as ze,f as Le}from"./BLivoCTk.js";import{a as Te}from"./Cqz3pSYE.js";import{p as C,r as we,s as le}from"./z5Xef_-v.js";import{p as Xe}from"./s_exGbLS.js";import{c as Ye,D as et,b as be,m as tt,a as rt}from"./BnAtF53u.js";import{D as at,a as st,b as ot,c as lt,d as xe,P as nt,e as it,i as dt,f as ut,m as ft}from"./A55xgzkD.js";import{s as Fe}from"./DTJjRJA0.js";import{B as X}from"./oiLSZkWa.js";import{C as vt,d as gt,b as ct,i as pt}from"./CEkqhJ8-.js";import{P as mt}from"./CmMBsPrQ.js";import{L as _t}from"./BXPZKlNj.js";import{T as ht}from"./DDbzEejx.js";var $t=new Set(["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]),bt=T("<button><!></button>");function xt(H,s){const z=Ue();ve(s,!0);let F=C(s,"id",19,()=>Ye(z)),O=C(s,"ref",15,null),k=C(s,"disabled",3,!1),t=we(s,$t);const p=et.create({id:be(()=>F()),ref:be(()=>O(),m=>O(m)),disabled:be(()=>!!k())}),b=P(()=>tt(t,p.props));var n=G(),f=l(n);{var Z=m=>{var D=G(),E=l(D);Fe(E,()=>s.child,()=>({props:e(b)})),r(m,D)},ne=m=>{var D=bt();Qe(D,()=>({...e(b)}));var E=se(D);Fe(E,()=>s.children??Ve),oe(D),r(m,D)};V(f,m=>{s.child?m(Z):m(ne,-1)})}r(H,n),ge()}var wt=new Set(["$$slots","$$events","$$legacy","ref","type"]);function Oe(H,s){ve(s,!0);let z=C(s,"ref",15,null),F=C(s,"type",3,"button"),O=we(s,wt);var k=G(),t=l(k);_(t,()=>rt,(p,b)=>{b(p,le({"data-slot":"dialog-close",get type(){return F()}},()=>O,{get ref(){return z()},set ref(n){z(n)}}))}),r(H,k),ge()}var yt=new Set(["$$slots","$$events","$$legacy","ref","type"]);function Pt(H,s){ve(s,!0);let z=C(s,"ref",15,null),F=C(s,"type",3,"button"),O=we(s,yt);var k=G(),t=l(k);_(t,()=>xt,(p,b)=>{b(p,le({"data-slot":"dialog-trigger",get type(){return F()}},()=>O,{get ref(){return z()},set ref(n){z(n)}}))}),r(H,k),ge()}var kt=T("<!> ",1),ae=T("<!> <!>",1),Dt=T('<p class="flex items-start gap-2 rounded-md border border-danger/40 px-3 py-2 text-xs text-danger" role="alert"><!> </p>'),It=T("<!>Fetching…",1),St=T('<form class="grid gap-4" id="install-plugin-form"><label class="grid gap-1"><span class="text-xs font-medium">Repository</span> <input name="repository" placeholder="org/repo" autocomplete="off" spellcheck="false"/> <span class="text-xs text-muted-foreground">On github.com, such as chrisjowen/improve.</span></label> <label class="grid gap-1"><span class="text-xs font-medium">Version <span class="font-normal text-muted-foreground">(optional)</span></span> <input name="ref" placeholder="tag, branch or commit" autocomplete="off" spellcheck="false"/> <span class="text-xs text-muted-foreground">Leave it empty for the default branch. A tag keeps it on that release.</span></label> <!></form> <!>',1),At=T('<p class="text-xs text-danger" role="alert"> </p>'),Re=T("<!> <!> <!>",1),Bt=T("<p> </p>");function Jt(H,s){ve(s,!0);let z=C(s,"busy",19,()=>[]),F=C(s,"suggested",3,null),O=C(s,"label",3,"Install plugin"),k=U(!1),t=U("form"),p=U(""),b=U(""),n=U(null),f=U(null),Z=U(Je({}));const ne=P(()=>/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(e(p).trim())),m=P(()=>e(f)?ft(e(f),e(Z)):null),D=()=>Xe.data.sessionToken,E="h-9 rounded-md border border-input bg-background px-2.5 font-mono text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring";function ye(){a(t,"form"),a(n,null),a(f,null)}async function We(Y){if(Y.preventDefault(),!e(ne)||e(t)==="looking")return;a(t,"looking"),a(n,null);const L=await gt({repo:e(p).trim(),ref:e(b).trim()||null},D());if(!L.ok){a(n,L.error,!0),a(t,"form");return}a(f,L.value,!0),a(Z,dt(L.value),!0),a(t,"review")}async function je(){if(!e(f)||e(m))return;a(t,"saving"),a(n,null);const Y=ct(),L=await pt(e(f),ut(e(Z)),D());if(!L.ok){a(n,L.error,!0),a(t,"review");return}a(t,"restarting"),a(t,await Y?"done":"slow",!0)}var Pe=G(),Ge=l(Pe);_(Ge,()=>it,(Y,L)=>{L(Y,{onOpenChange:J=>{J&&(e(t)==="done"||e(t)==="slow")&&(a(p,""),a(b,""),ye()),J&&e(t)==="form"&&F()&&!e(p)&&a(p,F())},get open(){return e(k)},set open(J){a(k,J,!0)},children:(J,Ct)=>{var ke=ae(),De=l(ke);{const ce=(ee,te)=>{X(ee,le(()=>(te?.()).props,{variant:"outline",size:"sm",children:(Se,pe)=>{var re=kt(),ie=l(re);mt(ie,{});var me=u(ie,1,!0);ue(()=>fe(me,O())),r(Se,re)},$$slots:{default:!0}}))};_(De,()=>Pt,(ee,te)=>{te(ee,{child:ce,$$slots:{child:!0}})})}var He=u(De,2);{let ce=P(()=>e(t)==="saving"||e(t)==="restarting"?"ignore":"close");_(He,()=>at,(ee,te)=>{te(ee,{class:"max-h-[calc(100dvh-2rem)] overflow-y-auto sm:max-w-lg",get interactOutsideBehavior(){return e(ce)},children:(Ie,Se)=>{var pe=ae(),re=l(pe);_(re,()=>st,(x,I)=>{I(x,{children:(h,S)=>{var w=ae(),A=l(w);_(A,()=>ot,(i,v)=>{v(i,{class:"font-display text-lg",children:(q,d)=>{W();var g=j("Install a plugin from GitHub");r(q,g)},$$slots:{default:!0}})});var o=u(A,2);_(o,()=>lt,(i,v)=>{v(i,{children:(q,d)=>{var g=G(),B=l(g);{var $=c=>{var R=j("Check what it is and where it comes from before you install it.");r(c,R)},y=c=>{var R=j(`Wheelhouse fetches the repository, pins the exact commit and shows you its manifest first.
1
+ import"./DsnmJJEf.js";import{aF as Ue,p as ve,j as G,f as l,a as r,b as ge,g as e,h as se,aa as Ve,r as oe,i as P,c as T,l as Ee,m as U,q as Je,s as u,n as W,w as j,v as a,t as ue,d as fe,x as Ke,y as Me,o as Be}from"./D46tdsTs.js";import{i as V}from"./DWAM9c1z.js";import{c as _}from"./DT69KRC9.js";import{l as Qe,r as Ce,a as ze,f as Le}from"./BLivoCTk.js";import{a as Te}from"./Cqz3pSYE.js";import{p as C,r as we,s as le}from"./z5Xef_-v.js";import{p as Xe}from"./Dybu9Tl2.js";import{c as Ye,D as et,b as be,m as tt,a as rt}from"./BnAtF53u.js";import{D as at,a as st,b as ot,c as lt,d as xe,P as nt,e as it,i as dt,f as ut,m as ft}from"./Dpd_B5b-.js";import{s as Fe}from"./DTJjRJA0.js";import{B as X}from"./oiLSZkWa.js";import{C as vt,d as gt,b as ct,i as pt}from"./D47Q9TSK.js";import{P as mt}from"./CmMBsPrQ.js";import{L as _t}from"./BXPZKlNj.js";import{T as ht}from"./DDbzEejx.js";var $t=new Set(["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]),bt=T("<button><!></button>");function xt(H,s){const z=Ue();ve(s,!0);let F=C(s,"id",19,()=>Ye(z)),O=C(s,"ref",15,null),k=C(s,"disabled",3,!1),t=we(s,$t);const p=et.create({id:be(()=>F()),ref:be(()=>O(),m=>O(m)),disabled:be(()=>!!k())}),b=P(()=>tt(t,p.props));var n=G(),f=l(n);{var Z=m=>{var D=G(),E=l(D);Fe(E,()=>s.child,()=>({props:e(b)})),r(m,D)},ne=m=>{var D=bt();Qe(D,()=>({...e(b)}));var E=se(D);Fe(E,()=>s.children??Ve),oe(D),r(m,D)};V(f,m=>{s.child?m(Z):m(ne,-1)})}r(H,n),ge()}var wt=new Set(["$$slots","$$events","$$legacy","ref","type"]);function Oe(H,s){ve(s,!0);let z=C(s,"ref",15,null),F=C(s,"type",3,"button"),O=we(s,wt);var k=G(),t=l(k);_(t,()=>rt,(p,b)=>{b(p,le({"data-slot":"dialog-close",get type(){return F()}},()=>O,{get ref(){return z()},set ref(n){z(n)}}))}),r(H,k),ge()}var yt=new Set(["$$slots","$$events","$$legacy","ref","type"]);function Pt(H,s){ve(s,!0);let z=C(s,"ref",15,null),F=C(s,"type",3,"button"),O=we(s,yt);var k=G(),t=l(k);_(t,()=>xt,(p,b)=>{b(p,le({"data-slot":"dialog-trigger",get type(){return F()}},()=>O,{get ref(){return z()},set ref(n){z(n)}}))}),r(H,k),ge()}var kt=T("<!> ",1),ae=T("<!> <!>",1),Dt=T('<p class="flex items-start gap-2 rounded-md border border-danger/40 px-3 py-2 text-xs text-danger" role="alert"><!> </p>'),It=T("<!>Fetching…",1),St=T('<form class="grid gap-4" id="install-plugin-form"><label class="grid gap-1"><span class="text-xs font-medium">Repository</span> <input name="repository" placeholder="org/repo" autocomplete="off" spellcheck="false"/> <span class="text-xs text-muted-foreground">On github.com, such as chrisjowen/improve.</span></label> <label class="grid gap-1"><span class="text-xs font-medium">Version <span class="font-normal text-muted-foreground">(optional)</span></span> <input name="ref" placeholder="tag, branch or commit" autocomplete="off" spellcheck="false"/> <span class="text-xs text-muted-foreground">Leave it empty for the default branch. A tag keeps it on that release.</span></label> <!></form> <!>',1),At=T('<p class="text-xs text-danger" role="alert"> </p>'),Re=T("<!> <!> <!>",1),Bt=T("<p> </p>");function Jt(H,s){ve(s,!0);let z=C(s,"busy",19,()=>[]),F=C(s,"suggested",3,null),O=C(s,"label",3,"Install plugin"),k=U(!1),t=U("form"),p=U(""),b=U(""),n=U(null),f=U(null),Z=U(Je({}));const ne=P(()=>/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(e(p).trim())),m=P(()=>e(f)?ft(e(f),e(Z)):null),D=()=>Xe.data.sessionToken,E="h-9 rounded-md border border-input bg-background px-2.5 font-mono text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring";function ye(){a(t,"form"),a(n,null),a(f,null)}async function We(Y){if(Y.preventDefault(),!e(ne)||e(t)==="looking")return;a(t,"looking"),a(n,null);const L=await gt({repo:e(p).trim(),ref:e(b).trim()||null},D());if(!L.ok){a(n,L.error,!0),a(t,"form");return}a(f,L.value,!0),a(Z,dt(L.value),!0),a(t,"review")}async function je(){if(!e(f)||e(m))return;a(t,"saving"),a(n,null);const Y=ct(),L=await pt(e(f),ut(e(Z)),D());if(!L.ok){a(n,L.error,!0),a(t,"review");return}a(t,"restarting"),a(t,await Y?"done":"slow",!0)}var Pe=G(),Ge=l(Pe);_(Ge,()=>it,(Y,L)=>{L(Y,{onOpenChange:J=>{J&&(e(t)==="done"||e(t)==="slow")&&(a(p,""),a(b,""),ye()),J&&e(t)==="form"&&F()&&!e(p)&&a(p,F())},get open(){return e(k)},set open(J){a(k,J,!0)},children:(J,Ct)=>{var ke=ae(),De=l(ke);{const ce=(ee,te)=>{X(ee,le(()=>(te?.()).props,{variant:"outline",size:"sm",children:(Se,pe)=>{var re=kt(),ie=l(re);mt(ie,{});var me=u(ie,1,!0);ue(()=>fe(me,O())),r(Se,re)},$$slots:{default:!0}}))};_(De,()=>Pt,(ee,te)=>{te(ee,{child:ce,$$slots:{child:!0}})})}var He=u(De,2);{let ce=P(()=>e(t)==="saving"||e(t)==="restarting"?"ignore":"close");_(He,()=>at,(ee,te)=>{te(ee,{class:"max-h-[calc(100dvh-2rem)] overflow-y-auto sm:max-w-lg",get interactOutsideBehavior(){return e(ce)},children:(Ie,Se)=>{var pe=ae(),re=l(pe);_(re,()=>st,(x,I)=>{I(x,{children:(h,S)=>{var w=ae(),A=l(w);_(A,()=>ot,(i,v)=>{v(i,{class:"font-display text-lg",children:(q,d)=>{W();var g=j("Install a plugin from GitHub");r(q,g)},$$slots:{default:!0}})});var o=u(A,2);_(o,()=>lt,(i,v)=>{v(i,{children:(q,d)=>{var g=G(),B=l(g);{var $=c=>{var R=j("Check what it is and where it comes from before you install it.");r(c,R)},y=c=>{var R=j(`Wheelhouse fetches the repository, pins the exact commit and shows you its manifest first.
2
2
  Nothing runs until you install it.`);r(c,R)};V(B,c=>{e(t)==="review"?c($):c(y,-1)})}r(q,g)},$$slots:{default:!0}})}),r(h,w)},$$slots:{default:!0}})});var ie=u(re,2);{var me=x=>{var I=St(),h=l(I),S=se(h),w=u(se(S),2);Ce(w),ze(w,1,Le(E)),W(2),oe(S);var A=u(S,2),o=u(se(A),2);Ce(o),ze(o,1,Le(E)),W(2),oe(A);var i=u(A,2);{var v=d=>{var g=Dt(),B=se(g);ht(B,{class:"mt-0.5 size-3.5 shrink-0"});var $=u(B,1,!0);oe(g),ue(()=>fe($,e(n))),r(d,g)};V(i,d=>{e(n)&&d(v)})}oe(h);var q=u(h,2);_(q,()=>xe,(d,g)=>{g(d,{children:(B,$)=>{var y=ae(),c=l(y);{const N=(K,M)=>{X(K,le(()=>(M?.()).props,{variant:"ghost",children:(he,Ae)=>{W();var $e=j("Cancel");r(he,$e)},$$slots:{default:!0}}))};_(c,()=>Oe,(K,M)=>{M(K,{child:N,$$slots:{child:!0}})})}var R=u(c,2);{let N=P(()=>!e(ne)||e(t)==="looking");X(R,{type:"submit",form:"install-plugin-form",get disabled(){return e(N)},children:(K,M)=>{var _e=G(),he=l(_e);{var Ae=Q=>{var de=It(),Ne=l(de);_t(Ne,{class:"animate-spin"}),W(),r(Q,de)},$e=Q=>{var de=j("Look it up");r(Q,de)};V(he,Q=>{e(t)==="looking"?Q(Ae):Q($e,-1)})}r(K,_e)},$$slots:{default:!0}})}r(B,y)},$$slots:{default:!0}})}),Ke("submit",h,We),Me("input",w,()=>a(n,null)),Te(w,()=>e(p),d=>a(p,d)),Te(o,()=>e(b),d=>a(b,d)),r(x,I)},Ze=x=>{var I=Re(),h=l(I);nt(h,{get preview(){return e(f)},get busy(){return z()},get answers(){return e(Z)},set answers(o){a(Z,o,!0)}});var S=u(h,2);{var w=o=>{var i=At(),v=Be(i,!0);ue(()=>fe(v,e(n))),r(o,i)};V(S,o=>{e(n)&&o(w)})}var A=u(S,2);_(A,()=>xe,(o,i)=>{i(o,{children:(v,q)=>{var d=ae(),g=l(d);X(g,{variant:"ghost",onclick:ye,children:($,y)=>{W();var c=j("Back");r($,c)},$$slots:{default:!0}});var B=u(g,2);{let $=P(()=>!!e(m)),y=P(()=>e(m)?`${e(m).title} is needed`:void 0);X(B,{onclick:je,get disabled(){return e($)},get title(){return e(y)},children:(c,R)=>{W();var N=j("Install and restart");r(c,N)},$$slots:{default:!0}})}r(v,d)},$$slots:{default:!0}})}),r(x,I)},qe=x=>{var I=Re(),h=l(I);{let o=P(()=>e(f).id),i=P(()=>e(f).commit.slice(0,7)),v=P(()=>e(t)==="saving"||e(t)==="restarting"||e(t)==="done"||e(t)==="slow"?e(t):"saving");vt(h,{get label(){return`Install ${e(o)??""} at ${e(i)??""}`},get phase(){return e(v)}})}var S=u(h,2);{var w=o=>{var i=Bt(),v=Be(i);ue(()=>fe(v,`${e(f).name??""}
3
3
  ${e(f).version??""} is installed and Wheelhouse restarted. Its row shows whether it loaded.`)),r(o,i)};V(S,o=>{e(t)==="done"&&o(w)})}var A=u(S,2);_(A,()=>xe,(o,i)=>{i(o,{children:(v,q)=>{var d=G(),g=l(d);{const B=($,y)=>{let c=()=>(y?.()).props;{let R=P(()=>e(t)==="saving"||e(t)==="restarting");X($,le(c,{get disabled(){return e(R)},children:(N,K)=>{W();var M=j("Done");r(N,M)},$$slots:{default:!0}}))}};_(g,()=>Oe,($,y)=>{y($,{child:B,$$slots:{child:!0}})})}r(v,d)},$$slots:{default:!0}})}),r(x,I)};V(ie,x=>{e(t)==="form"||e(t)==="looking"?x(me):e(t)==="review"&&e(f)?x(Ze,1):e(f)&&x(qe,2)})}r(Ie,pe)},$$slots:{default:!0}})})}r(J,ke)},$$slots:{default:!0}})}),r(H,Pe),ge()}Ee(["input"]);export{Oe as D,Jt as I};
@@ -1 +1 @@
1
- import{m as h,g as c,v as d,q as g}from"./D46tdsTs.js";import{p}from"./s_exGbLS.js";const y=5e3,v=3e3;function w(m,e,a){let r="connecting",n=null,t=null,s=null;const l=i=>{r=i,a(i)},u=()=>{t&&clearTimeout(t),t=null,l("lost")},o=()=>{s=null;const i=new EventSource(m);n=i,i.addEventListener("open",()=>{t&&clearTimeout(t),t=null,l("open")}),i.addEventListener("error",()=>{if(i.readyState===EventSource.CLOSED){i.close(),u(),s??=setTimeout(o,v);return}r!=="lost"&&l("connecting"),t??=setTimeout(u,y)}),e(i)};return o(),()=>{t&&clearTimeout(t),s&&clearTimeout(s),n?.close(),n=null}}const L="wheelhouse-live",S="wheelhouse-live-leader",A=2*6e4;class T{#e=h(null);get fleet(){return c(this.#e)}set fleet(e){d(this.#e,e,!0)}#t=h(null);get health(){return c(this.#t)}set health(e){d(this.#t,e,!0)}#s=h(null);get messages(){return c(this.#s)}set messages(e){d(this.#s,e,!0)}#a=h("connecting");get connection(){return c(this.#a)}set connection(e){d(this.#a,e,!0)}#n=h(g(Date.now()));get now(){return c(this.#n)}set now(e){d(this.#n,e,!0)}#r=h(0);get revision(){return c(this.#r)}set revision(e){d(this.#r,e,!0)}#l=h(!1);get leader(){return c(this.#l)}set leader(e){d(this.#l,e,!0)}claim=()=>!0;alertListeners=new Set;restartListeners=new Set;serverId=null;latest={};recentAlerts=new Map;channel=null;stop=null;onAlert(e){return this.alertListeners.add(e),()=>this.alertListeners.delete(e)}onRestart(e){return this.restartListeners.add(e),()=>this.restartListeners.delete(e)}connect(){if(this.stop)return()=>{};const e=setInterval(()=>this.now=Date.now(),15e3),r=typeof BroadcastChannel<"u"&&!!globalThis.navigator?.locks?this.share():this.lead();return this.stop=()=>{clearInterval(e),r(),this.stop=null},this.stop}share(){const e=new BroadcastChannel(L);this.channel=e,e.onmessage=n=>{const t=n.data;t.t==="hello"?this.leader&&this.replay():t.t==="connection"?this.leader||(this.connection=t.state):this.leader||this.apply(t.e)};const a=new AbortController;let r=()=>{};return navigator.locks.request(S,{signal:a.signal},()=>{const n=this.lead();return new Promise(t=>{r=()=>{n(),t()}})}).catch(()=>{}),e.postMessage({t:"hello"}),()=>{a.abort(),r(),e.close(),this.channel=null}}lead(){this.leader=!0;const e=n=>{this.connection=n,this.post({t:"connection",state:n})},r=w("/api/events",n=>{const t=(s,l)=>n.addEventListener(s,u=>{const o=l(JSON.parse(u.data));this.remember(o),this.apply(o),this.post({t:"event",e:o}),o.type==="fleet"&&e("open")});t("server",s=>({type:"server",data:s})),t("fleet",s=>({type:"fleet",data:s})),t("health",s=>({type:"health",data:s})),t("messages",s=>({type:"messages",data:s})),t("alert",s=>({type:"alert",data:s,fresh:this.claim(s)})),t("settled",s=>({type:"settled",data:s})),t("alerts",s=>({type:"alerts",data:s.map(l=>{const u=this.claim(l);return{alert:l,fresh:u&&Date.now()-Date.parse(l.at)<=A}})}))},e);return()=>{r(),this.leader=!1}}remember(e){if(e.type==="alert")this.recentAlerts.set(e.data.id,e.data);else if(e.type==="settled")this.recentAlerts.delete(e.data);else if(e.type==="alerts")for(const a of e.data)this.recentAlerts.set(a.alert.id,a.alert);else this.latest[e.type]=e.data;for(const a of[...this.recentAlerts.keys()].slice(0,-40))this.recentAlerts.delete(a)}replay(){this.post({t:"connection",state:this.connection}),this.latest.fleet&&this.post({t:"event",e:{type:"fleet",data:this.latest.fleet}}),this.latest.health&&this.post({t:"event",e:{type:"health",data:this.latest.health}}),this.latest.messages&&this.post({t:"event",e:{type:"messages",data:this.latest.messages}}),this.latest.server&&this.post({t:"event",e:{type:"server",data:this.latest.server}});const e=[...this.recentAlerts.values()].map(a=>({alert:a,fresh:!1}));this.post({t:"event",e:{type:"alerts",data:e}})}apply(e){switch(e.type){case"fleet":this.fleet=e.data,this.revision++,this.connection="open";break;case"health":this.health=e.data;break;case"messages":this.messages=e.data;break;case"server":{const a=this.serverId!==null&&this.serverId!==e.data.id;if(this.serverId=e.data.id,a)for(const r of this.restartListeners)r();break}default:for(const a of this.alertListeners)a(e)}}post(e){try{this.channel?.postMessage(e)}catch{}}}const f=new T;function k(){return f.fleet??p.data.fleet??null}function C(){return f.health??p.data.health??null}function M(){return f.messages??p.data.messages??null}export{M as a,C as b,k as c,f as l,w};
1
+ import{m as h,g as c,v as d,q as g}from"./D46tdsTs.js";import{p}from"./Dybu9Tl2.js";const y=5e3,v=3e3;function w(m,e,a){let r="connecting",n=null,t=null,s=null;const l=i=>{r=i,a(i)},u=()=>{t&&clearTimeout(t),t=null,l("lost")},o=()=>{s=null;const i=new EventSource(m);n=i,i.addEventListener("open",()=>{t&&clearTimeout(t),t=null,l("open")}),i.addEventListener("error",()=>{if(i.readyState===EventSource.CLOSED){i.close(),u(),s??=setTimeout(o,v);return}r!=="lost"&&l("connecting"),t??=setTimeout(u,y)}),e(i)};return o(),()=>{t&&clearTimeout(t),s&&clearTimeout(s),n?.close(),n=null}}const L="wheelhouse-live",S="wheelhouse-live-leader",A=2*6e4;class T{#e=h(null);get fleet(){return c(this.#e)}set fleet(e){d(this.#e,e,!0)}#t=h(null);get health(){return c(this.#t)}set health(e){d(this.#t,e,!0)}#s=h(null);get messages(){return c(this.#s)}set messages(e){d(this.#s,e,!0)}#a=h("connecting");get connection(){return c(this.#a)}set connection(e){d(this.#a,e,!0)}#n=h(g(Date.now()));get now(){return c(this.#n)}set now(e){d(this.#n,e,!0)}#r=h(0);get revision(){return c(this.#r)}set revision(e){d(this.#r,e,!0)}#l=h(!1);get leader(){return c(this.#l)}set leader(e){d(this.#l,e,!0)}claim=()=>!0;alertListeners=new Set;restartListeners=new Set;serverId=null;latest={};recentAlerts=new Map;channel=null;stop=null;onAlert(e){return this.alertListeners.add(e),()=>this.alertListeners.delete(e)}onRestart(e){return this.restartListeners.add(e),()=>this.restartListeners.delete(e)}connect(){if(this.stop)return()=>{};const e=setInterval(()=>this.now=Date.now(),15e3),r=typeof BroadcastChannel<"u"&&!!globalThis.navigator?.locks?this.share():this.lead();return this.stop=()=>{clearInterval(e),r(),this.stop=null},this.stop}share(){const e=new BroadcastChannel(L);this.channel=e,e.onmessage=n=>{const t=n.data;t.t==="hello"?this.leader&&this.replay():t.t==="connection"?this.leader||(this.connection=t.state):this.leader||this.apply(t.e)};const a=new AbortController;let r=()=>{};return navigator.locks.request(S,{signal:a.signal},()=>{const n=this.lead();return new Promise(t=>{r=()=>{n(),t()}})}).catch(()=>{}),e.postMessage({t:"hello"}),()=>{a.abort(),r(),e.close(),this.channel=null}}lead(){this.leader=!0;const e=n=>{this.connection=n,this.post({t:"connection",state:n})},r=w("/api/events",n=>{const t=(s,l)=>n.addEventListener(s,u=>{const o=l(JSON.parse(u.data));this.remember(o),this.apply(o),this.post({t:"event",e:o}),o.type==="fleet"&&e("open")});t("server",s=>({type:"server",data:s})),t("fleet",s=>({type:"fleet",data:s})),t("health",s=>({type:"health",data:s})),t("messages",s=>({type:"messages",data:s})),t("alert",s=>({type:"alert",data:s,fresh:this.claim(s)})),t("settled",s=>({type:"settled",data:s})),t("alerts",s=>({type:"alerts",data:s.map(l=>{const u=this.claim(l);return{alert:l,fresh:u&&Date.now()-Date.parse(l.at)<=A}})}))},e);return()=>{r(),this.leader=!1}}remember(e){if(e.type==="alert")this.recentAlerts.set(e.data.id,e.data);else if(e.type==="settled")this.recentAlerts.delete(e.data);else if(e.type==="alerts")for(const a of e.data)this.recentAlerts.set(a.alert.id,a.alert);else this.latest[e.type]=e.data;for(const a of[...this.recentAlerts.keys()].slice(0,-40))this.recentAlerts.delete(a)}replay(){this.post({t:"connection",state:this.connection}),this.latest.fleet&&this.post({t:"event",e:{type:"fleet",data:this.latest.fleet}}),this.latest.health&&this.post({t:"event",e:{type:"health",data:this.latest.health}}),this.latest.messages&&this.post({t:"event",e:{type:"messages",data:this.latest.messages}}),this.latest.server&&this.post({t:"event",e:{type:"server",data:this.latest.server}});const e=[...this.recentAlerts.values()].map(a=>({alert:a,fresh:!1}));this.post({t:"event",e:{type:"alerts",data:e}})}apply(e){switch(e.type){case"fleet":this.fleet=e.data,this.revision++,this.connection="open";break;case"health":this.health=e.data;break;case"messages":this.messages=e.data;break;case"server":{const a=this.serverId!==null&&this.serverId!==e.data.id;if(this.serverId=e.data.id,a)for(const r of this.restartListeners)r();break}default:for(const a of this.alertListeners)a(e)}}post(e){try{this.channel?.postMessage(e)}catch{}}}const f=new T;function k(){return f.fleet??p.data.fleet??null}function C(){return f.health??p.data.health??null}function M(){return f.messages??p.data.messages??null}export{M as a,C as b,k as c,f as l,w};
@@ -1,4 +1,4 @@
1
- import"./DsnmJJEf.js";import{s as _e,r as me,p as W}from"./z5Xef_-v.js";import{I as ze,t as It}from"./B4gzexCn.js";import{p as st}from"./s_exGbLS.js";import{a as jt,o as Ct}from"./D8OKqJm7.js";import{k as Wt,A as Ft,m as M,q as it,g as t,v as b,l as lt,p as Fe,u as We,h as c,s as u,r as l,t as D,a as p,b as Ke,i as _,bE as Kt,o as F,d as O,j as Be,f as Ae,c as f,y as L,n as fe,bF as Et,z as Ut,G as gt,x as Mt,aB as Bt}from"./D46tdsTs.js";import{i as $}from"./DWAM9c1z.js";import{a as Le,s as R,f as Yt,d as ut,l as Gt,e as rt,i as Jt,r as Vt,b as Xt}from"./BLivoCTk.js";import{b as Ge}from"./RbWQh321.js";import{z as Qt}from"./DJNADPa5.js";import{a as Dt,f as Zt,s as ea,P as ta}from"./n-cYDyaA.js";import{c as aa}from"./CogyHa6-.js";import{p as nt}from"./DVy4dK4b.js";import{k as ra,X as Ye}from"./CSU-6kdN.js";import{R as Pt}from"./DtHooIpl.js";import{E as At}from"./DE_ENZzQ.js";import{h as na,m as sa}from"./yFOoFovD.js";import{a as Lt}from"./Cqz3pSYE.js";import{S as ia}from"./BXN538J3.js";import{c as Rt}from"./BC4SXzSU.js";import{M as pt}from"./DK0g50g1.js";import{A as oa}from"./DGyqUFtt.js";import{C as la}from"./CwCeO535.js";import{C as da}from"./DSINNCaW.js";import{P as xt}from"./CmMBsPrQ.js";import{s as ca,a as bt}from"./DfZeJIs0.js";class mt{#e=new WeakMap;#t;#r;static entries=new WeakMap;constructor(e){this.#r=e}observe(e,a){var r=this.#e.get(e)||new Set;return r.add(a),this.#e.set(e,r),this.#s().observe(e,this.#r),()=>{var o=this.#e.get(e);o.delete(a),o.size===0&&(this.#e.delete(e),this.#t.unobserve(e))}}#s(){return this.#t??(this.#t=new ResizeObserver(e=>{for(var a of e){mt.entries.set(a.target,a);for(var r of this.#e.get(a.target)||[])r(a)}}))}}var ua=new mt({box:"border-box"});function wt(n,e,a){var r=ua.observe(n,()=>a(n[e]));Wt(()=>(Ft(()=>a(n[e])),r))}var va=new Set(["$$slots","$$events","$$legacy"]);function On(n,e){let a=me(e,va);const r={name:"compass",size:24,node:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var ha=new Set(["$$slots","$$events","$$legacy"]);function vt(n,e){let a=me(e,ha);const r={name:"crosshair",size:24,node:[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var pa=new Set(["$$slots","$$events","$$legacy"]);function _t(n,e){let a=me(e,pa);const r={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6"}],["path",{d:"m21 3-7 7"}],["path",{d:"m3 21 7-7"}],["path",{d:"M9 21H3v-6"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var fa=new Set(["$$slots","$$events","$$legacy"]);function ma(n,e){let a=me(e,fa);const r={name:"mic",size:24,node:[["path",{d:"M12 19v3"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var ga=new Set(["$$slots","$$events","$$legacy"]);function yt(n,e){let a=me(e,ga);const r={name:"monitor-off",size:24,node:[["path",{d:"M12 17v4"}],["path",{d:"M17 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 1.184-1.826"}],["path",{d:"m2 2 20 20"}],["path",{d:"M8 21h8"}],["path",{d:"M8.656 3H20a2 2 0 0 1 2 2v10a2 2 0 0 1-.293 1.042"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var xa=new Set(["$$slots","$$events","$$legacy"]);function kt(n,e){let a=me(e,xa);const r={name:"monitor-play",size:24,node:[["path",{d:"M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z"}],["path",{d:"M12 17v4"}],["path",{d:"M8 21h8"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var ba=new Set(["$$slots","$$events","$$legacy"]);function wa(n,e){let a=me(e,ba);const r={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var _a=new Set(["$$slots","$$events","$$legacy"]);function ya(n,e){let a=me(e,_a);const r={name:"mouse-pointer-click",size:24,node:[["path",{d:"M14 4.1 12 6"}],["path",{d:"m5.1 8-2.9-.8"}],["path",{d:"m6 12-1.9 2"}],["path",{d:"M7.2 2.2 8 5.1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var ka=new Set(["$$slots","$$events","$$legacy"]);function za(n,e){let a=me(e,ka);const r={name:"panel-right-close",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M15 3v18"}],["path",{d:"m8 9 3 3-3 3"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var Sa=new Set(["$$slots","$$events","$$legacy"]);function $a(n,e){let a=me(e,Sa);const r={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var Ta=new Set(["$$slots","$$events","$$legacy"]);function Ca(n,e){let a=me(e,Ta);const r={name:"smartphone",size:24,node:[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2"}],["path",{d:"M12 18h.01"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var Ea=new Set(["$$slots","$$events","$$legacy"]);function Ma(n,e){let a=me(e,Ea);const r={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}const Da="{url}";function Pa(n,e,a){const r=e&&Object.hasOwn(n,e)?n[e]:null;return typeof r!="string"?{href:a.url,external:!0}:{href:r.replace(Da,encodeURIComponent(a.url)),external:!1}}const Nn={review(n,e){const a=st.data?.pullRequestTabs??{};return Pa(a,n,e)}},Aa=15e3,Ot=n=>`url:${n}`,La=n=>n.startsWith("url:")?`/api/previews/check?url=${encodeURIComponent(n.slice(4))}`:`/api/tasks/${encodeURIComponent(n)}/preview`,Ra=5e3;class Oa{#e=M(it({}));get checks(){return t(this.#e)}set checks(e){b(this.#e,e,!0)}#t=M(it({}));get failed(){return t(this.#t)}set failed(e){b(this.#t,e,!0)}watching=new Map;running=new Map;unlisten=null;stopped(e){return this.checks[e]?.state==="down"}watch(e){const a=this.watching.get(e);a?a.count++:(this.watching.set(e,{count:1,timer:null}),this.refresh(e)),this.listen();let r=!1;return()=>{if(r)return;r=!0;const o=this.watching.get(e);!o||--o.count>0||(o.timer&&clearTimeout(o.timer),this.watching.delete(e),this.watching.size||(this.unlisten?.(),this.unlisten=null))}}refresh(e){const a=this.running.get(e);if(a)return a;const r=this.load(e).finally(()=>{this.running.delete(e),this.schedule(e)});return this.running.set(e,r),r}clear(){for(const e of this.watching.values())e.timer&&clearTimeout(e.timer);this.watching.clear(),this.unlisten?.(),this.unlisten=null,this.checks={},this.failed={}}async load(e){try{const a=await fetch(La(e));if(!a.ok)throw new Error(String(a.status));this.checks[e]=await a.json(),this.failed[e]=!1}catch{this.failed[e]=!0}}schedule(e){const a=this.watching.get(e);if(!a)return;a.timer&&clearTimeout(a.timer);const r=this.checks[e]?.state==="live"?Aa:Ra;a.timer=setTimeout(()=>{a.timer=null,document.visibilityState!=="hidden"&&this.refresh(e)},r)}listen(){if(this.unlisten)return;const e=()=>{if(document.visibilityState!=="hidden")for(const a of this.watching.keys())this.refresh(a)};window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),this.unlisten=()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}}}const Qe=new Oa,zt=500,Ze=n=>n.replace(/\s+/g," ").trim(),Na=(n,e)=>n.length>e?n.slice(0,e-1).trimEnd()+"…":n;function ht(n){const e=n.y<.3333333333333333?"top":n.y<.6666666666666666?"middle":"bottom",a=n.x<1/3?"left":n.x<2/3?"":"right";return e==="middle"&&!a?"the middle":`the ${e}${a?` ${a}`:""}`}const Ha={button:"button",a:"link",input:"box",textarea:"box",select:"menu",img:"picture",h1:"heading",h2:"heading",h3:"heading",h4:"heading",label:"label",li:"item"};function qa(n,e,a){const r=n?.closest('button, a, input, textarea, select, img, h1, h2, h3, h4, label, li, [role="button"]')??n;if(r&&r.tagName!=="HTML"&&r.tagName!=="BODY"){const o=r.tagName.toLowerCase(),s=r.getAttribute("role")==="button"?"button":Ha[o]??"part of the page",i=Na(Ze(r.value||r.getAttribute("aria-label")||r.getAttribute("alt")||r.textContent||""),60);return{kind:"element",label:i?`the “${i}” ${s}`:`a ${s} near ${ht(e)}`,detail:`<${o}>${i?` “${i}”`:""}, near ${ht(e)} of the page`}}return{kind:"spot",label:`a spot near ${ht(e)} of the page`,detail:`${Math.round(e.x*100)}% across and ${Math.round(e.y*100)}% down the part of the page in view (${a.w}×${a.h})`}}const Ia=/^Preview feedback for (\S+) \((.+)\), sent together from the Preview tab \(([^)\n]*)\):$/,ja=/^Feedback for (\S+) \((.+)\), sent together from the “([^“”\n]+)” plugin \(([a-z][a-z0-9-]*)\)(?:, about (.+))?:$/,Wa="Firstmate: pass these to this task’s worker, the same task (start no new one). You may add notes of your own, marked as yours.",Fa=n=>n.flatMap((e,a)=>[`${a+1}. ${Ze(e.text)}`,...e.points&&Ze(e.points)?[` Points at: ${Ze(e.points)}`]:[]]);function Ka(n,e,a){return[`Preview feedback for ${n.id} (${Ze(n.title)}), sent together from the Preview tab (${e}):`,...Fa(a.map(r=>({text:r.text,points:r.points?.label??null}))),"",Wa].join(`
1
+ import"./DsnmJJEf.js";import{s as _e,r as me,p as W}from"./z5Xef_-v.js";import{I as ze,t as It}from"./B4gzexCn.js";import{p as st}from"./Dybu9Tl2.js";import{a as jt,o as Ct}from"./D8OKqJm7.js";import{k as Wt,A as Ft,m as M,q as it,g as t,v as b,l as lt,p as Fe,u as We,h as c,s as u,r as l,t as D,a as p,b as Ke,i as _,bE as Kt,o as F,d as O,j as Be,f as Ae,c as f,y as L,n as fe,bF as Et,z as Ut,G as gt,x as Mt,aB as Bt}from"./D46tdsTs.js";import{i as $}from"./DWAM9c1z.js";import{a as Le,s as R,f as Yt,d as ut,l as Gt,e as rt,i as Jt,r as Vt,b as Xt}from"./BLivoCTk.js";import{b as Ge}from"./RbWQh321.js";import{z as Qt}from"./DJNADPa5.js";import{a as Dt,f as Zt,s as ea,P as ta}from"./DcwUckFP.js";import{c as aa}from"./BNxvXFfv.js";import{p as nt}from"./DVy4dK4b.js";import{k as ra,X as Ye}from"./CSU-6kdN.js";import{R as Pt}from"./DtHooIpl.js";import{E as At}from"./DE_ENZzQ.js";import{h as na,m as sa}from"./yFOoFovD.js";import{a as Lt}from"./Cqz3pSYE.js";import{S as ia}from"./BXN538J3.js";import{c as Rt}from"./BC4SXzSU.js";import{M as pt}from"./DK0g50g1.js";import{A as oa}from"./DGyqUFtt.js";import{C as la}from"./CwCeO535.js";import{C as da}from"./DSINNCaW.js";import{P as xt}from"./CmMBsPrQ.js";import{s as ca,a as bt}from"./DfZeJIs0.js";class mt{#e=new WeakMap;#t;#r;static entries=new WeakMap;constructor(e){this.#r=e}observe(e,a){var r=this.#e.get(e)||new Set;return r.add(a),this.#e.set(e,r),this.#s().observe(e,this.#r),()=>{var o=this.#e.get(e);o.delete(a),o.size===0&&(this.#e.delete(e),this.#t.unobserve(e))}}#s(){return this.#t??(this.#t=new ResizeObserver(e=>{for(var a of e){mt.entries.set(a.target,a);for(var r of this.#e.get(a.target)||[])r(a)}}))}}var ua=new mt({box:"border-box"});function wt(n,e,a){var r=ua.observe(n,()=>a(n[e]));Wt(()=>(Ft(()=>a(n[e])),r))}var va=new Set(["$$slots","$$events","$$legacy"]);function On(n,e){let a=me(e,va);const r={name:"compass",size:24,node:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var ha=new Set(["$$slots","$$events","$$legacy"]);function vt(n,e){let a=me(e,ha);const r={name:"crosshair",size:24,node:[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var pa=new Set(["$$slots","$$events","$$legacy"]);function _t(n,e){let a=me(e,pa);const r={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6"}],["path",{d:"m21 3-7 7"}],["path",{d:"m3 21 7-7"}],["path",{d:"M9 21H3v-6"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var fa=new Set(["$$slots","$$events","$$legacy"]);function ma(n,e){let a=me(e,fa);const r={name:"mic",size:24,node:[["path",{d:"M12 19v3"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var ga=new Set(["$$slots","$$events","$$legacy"]);function yt(n,e){let a=me(e,ga);const r={name:"monitor-off",size:24,node:[["path",{d:"M12 17v4"}],["path",{d:"M17 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 1.184-1.826"}],["path",{d:"m2 2 20 20"}],["path",{d:"M8 21h8"}],["path",{d:"M8.656 3H20a2 2 0 0 1 2 2v10a2 2 0 0 1-.293 1.042"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var xa=new Set(["$$slots","$$events","$$legacy"]);function kt(n,e){let a=me(e,xa);const r={name:"monitor-play",size:24,node:[["path",{d:"M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z"}],["path",{d:"M12 17v4"}],["path",{d:"M8 21h8"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var ba=new Set(["$$slots","$$events","$$legacy"]);function wa(n,e){let a=me(e,ba);const r={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var _a=new Set(["$$slots","$$events","$$legacy"]);function ya(n,e){let a=me(e,_a);const r={name:"mouse-pointer-click",size:24,node:[["path",{d:"M14 4.1 12 6"}],["path",{d:"m5.1 8-2.9-.8"}],["path",{d:"m6 12-1.9 2"}],["path",{d:"M7.2 2.2 8 5.1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var ka=new Set(["$$slots","$$events","$$legacy"]);function za(n,e){let a=me(e,ka);const r={name:"panel-right-close",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M15 3v18"}],["path",{d:"m8 9 3 3-3 3"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var Sa=new Set(["$$slots","$$events","$$legacy"]);function $a(n,e){let a=me(e,Sa);const r={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var Ta=new Set(["$$slots","$$events","$$legacy"]);function Ca(n,e){let a=me(e,Ta);const r={name:"smartphone",size:24,node:[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2"}],["path",{d:"M12 18h.01"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}var Ea=new Set(["$$slots","$$events","$$legacy"]);function Ma(n,e){let a=me(e,Ea);const r={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]]};ze(n,_e(()=>a,{get icon(){return r}}))}const Da="{url}";function Pa(n,e,a){const r=e&&Object.hasOwn(n,e)?n[e]:null;return typeof r!="string"?{href:a.url,external:!0}:{href:r.replace(Da,encodeURIComponent(a.url)),external:!1}}const Nn={review(n,e){const a=st.data?.pullRequestTabs??{};return Pa(a,n,e)}},Aa=15e3,Ot=n=>`url:${n}`,La=n=>n.startsWith("url:")?`/api/previews/check?url=${encodeURIComponent(n.slice(4))}`:`/api/tasks/${encodeURIComponent(n)}/preview`,Ra=5e3;class Oa{#e=M(it({}));get checks(){return t(this.#e)}set checks(e){b(this.#e,e,!0)}#t=M(it({}));get failed(){return t(this.#t)}set failed(e){b(this.#t,e,!0)}watching=new Map;running=new Map;unlisten=null;stopped(e){return this.checks[e]?.state==="down"}watch(e){const a=this.watching.get(e);a?a.count++:(this.watching.set(e,{count:1,timer:null}),this.refresh(e)),this.listen();let r=!1;return()=>{if(r)return;r=!0;const o=this.watching.get(e);!o||--o.count>0||(o.timer&&clearTimeout(o.timer),this.watching.delete(e),this.watching.size||(this.unlisten?.(),this.unlisten=null))}}refresh(e){const a=this.running.get(e);if(a)return a;const r=this.load(e).finally(()=>{this.running.delete(e),this.schedule(e)});return this.running.set(e,r),r}clear(){for(const e of this.watching.values())e.timer&&clearTimeout(e.timer);this.watching.clear(),this.unlisten?.(),this.unlisten=null,this.checks={},this.failed={}}async load(e){try{const a=await fetch(La(e));if(!a.ok)throw new Error(String(a.status));this.checks[e]=await a.json(),this.failed[e]=!1}catch{this.failed[e]=!0}}schedule(e){const a=this.watching.get(e);if(!a)return;a.timer&&clearTimeout(a.timer);const r=this.checks[e]?.state==="live"?Aa:Ra;a.timer=setTimeout(()=>{a.timer=null,document.visibilityState!=="hidden"&&this.refresh(e)},r)}listen(){if(this.unlisten)return;const e=()=>{if(document.visibilityState!=="hidden")for(const a of this.watching.keys())this.refresh(a)};window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),this.unlisten=()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}}}const Qe=new Oa,zt=500,Ze=n=>n.replace(/\s+/g," ").trim(),Na=(n,e)=>n.length>e?n.slice(0,e-1).trimEnd()+"…":n;function ht(n){const e=n.y<.3333333333333333?"top":n.y<.6666666666666666?"middle":"bottom",a=n.x<1/3?"left":n.x<2/3?"":"right";return e==="middle"&&!a?"the middle":`the ${e}${a?` ${a}`:""}`}const Ha={button:"button",a:"link",input:"box",textarea:"box",select:"menu",img:"picture",h1:"heading",h2:"heading",h3:"heading",h4:"heading",label:"label",li:"item"};function qa(n,e,a){const r=n?.closest('button, a, input, textarea, select, img, h1, h2, h3, h4, label, li, [role="button"]')??n;if(r&&r.tagName!=="HTML"&&r.tagName!=="BODY"){const o=r.tagName.toLowerCase(),s=r.getAttribute("role")==="button"?"button":Ha[o]??"part of the page",i=Na(Ze(r.value||r.getAttribute("aria-label")||r.getAttribute("alt")||r.textContent||""),60);return{kind:"element",label:i?`the “${i}” ${s}`:`a ${s} near ${ht(e)}`,detail:`<${o}>${i?` “${i}”`:""}, near ${ht(e)} of the page`}}return{kind:"spot",label:`a spot near ${ht(e)} of the page`,detail:`${Math.round(e.x*100)}% across and ${Math.round(e.y*100)}% down the part of the page in view (${a.w}×${a.h})`}}const Ia=/^Preview feedback for (\S+) \((.+)\), sent together from the Preview tab \(([^)\n]*)\):$/,ja=/^Feedback for (\S+) \((.+)\), sent together from the “([^“”\n]+)” plugin \(([a-z][a-z0-9-]*)\)(?:, about (.+))?:$/,Wa="Firstmate: pass these to this task’s worker, the same task (start no new one). You may add notes of your own, marked as yours.",Fa=n=>n.flatMap((e,a)=>[`${a+1}. ${Ze(e.text)}`,...e.points&&Ze(e.points)?[` Points at: ${Ze(e.points)}`]:[]]);function Ka(n,e,a){return[`Preview feedback for ${n.id} (${Ze(n.title)}), sent together from the Preview tab (${e}):`,...Fa(a.map(r=>({text:r.text,points:r.points?.label??null}))),"",Wa].join(`
2
2
  `)}function Hn(n){const e=n.replace(/\r\n?/g,`
3
3
  `).split(`
4
4
  `),a=Ia.exec(e[0]??""),r=a?null:ja.exec(e[0]??""),o=a??r;if(!o)return null;const s=[];for(const i of e.slice(1)){const d=/^\d+\. (.+)$/.exec(i);if(d){s.push({text:d[1],points:null});continue}const h=/^ {3}Points at: (.+)$/.exec(i);h&&s.length&&(s[s.length-1].points=h[1])}return s.length?{taskId:o[1],title:o[2],url:a?a[3]:null,plugin:r?{id:r[4],name:r[3],subject:r[5]??null}:null,items:s}:null}var Ua=f('<button type="button" class="rounded p-1 hover:bg-accent hover:text-foreground max-md:grid max-md:size-11 max-md:place-items-center"><!></button>'),Ba=f('<a target="_blank" rel="noreferrer" class="inline-flex shrink-0 items-center gap-1 rounded px-1 py-0.5 text-sea hover:underline max-md:min-h-11">Open in new tab<!></a>'),Ya=f('<button type="button" class="inline-flex shrink-0 items-center gap-1 rounded px-1.5 py-0.5 font-medium text-foreground hover:bg-accent max-md:min-h-11" data-preview-fullscreen=""><!>Full screen</button>'),Ga=f('<div class="flex items-center gap-2 text-xs text-muted-foreground"><span class="min-w-0 flex-1 truncate font-mono"> </span> <!> <!> <!></div>'),Ja=f('<iframe referrerpolicy="no-referrer" loading="lazy"></iframe>'),Va=f('<button type="button" class="absolute inset-0 cursor-zoom-in" aria-label="Open the preview full size" data-preview-open=""><span class="absolute right-2.5 bottom-2.5 flex items-center gap-1.5 rounded-md border border-hair bg-card/95 px-2 py-1 text-xs font-medium text-foreground opacity-0 shadow-sm transition-opacity group-focus-within:opacity-100 group-hover:opacity-100"><!>Open full size</span></button>'),Xa=f("<!> <!>",1),Qa=f('<button type="button" class="absolute inset-0 cursor-crosshair bg-sea/5 ring-2 ring-sea ring-inset" aria-label="Point at part of the page" data-preview-pointing=""><span class="pointer-events-none absolute top-3 left-1/2 flex -translate-x-1/2 items-center gap-2 rounded-full bg-sea px-3.5 py-1.5 text-sm text-on-accent shadow-lg"><!>Click the part you mean</span></button>'),Za=f('<span class="pointer-events-none absolute size-5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white bg-sea shadow-md ring-2 ring-sea/40" aria-hidden="true" data-preview-pin=""></span>'),er=f('<iframe referrerpolicy="no-referrer"></iframe> <!>',1),tr=f('<span class="block text-xs"> </span>'),ar=f('<div class="flex items-start gap-2.5 px-4 py-3 text-muted-foreground" data-preview-notice=""><!> <p class="min-w-0 text-sm"><span> </span> <!></p></div>'),rr=f('<p class="text-sm"> </p>'),nr=f('<!> <p class="mt-2 text-sm font-medium"> </p> <p class="mt-1 text-xs"> </p>',1),sr=f('<div class="grid size-full place-items-center p-4 text-center text-muted-foreground" data-preview-notice=""><div><!></div></div>'),ir=f("<div><!> <div><!></div></div>");function or(n,e){Fe(e,!0);let a=W(e,"taskId",3,null),r=W(e,"url",3,null),o=W(e,"compact",3,!1),s=W(e,"fill",3,!1),i=W(e,"desktop",3,!1),d=W(e,"toolbar",3,!0),h=W(e,"pointing",3,!1),g=W(e,"pin",3,null),P=M(null);function N(T){const k=T.currentTarget.getBoundingClientRect(),H=T.clientX-k.left,q=T.clientY-k.top;let U=null;const be=t($e)?t(le):1;try{U=t(P)?.contentDocument?.elementFromPoint(H/be,q/be)??null}catch{U=null}const se={x:k.width?H/k.width:0,y:k.height?q/k.height:0};e.onpoint?.(qa(U,se,{w:Math.round(k.width),h:Math.round(k.height)}),se)}const ie={w:1280,h:800};let ue=M(0),Y=M(0),oe=M(0);const ge=_(()=>a()??Ot(r()??""));We(()=>Qe.watch(t(ge)));const K=_(()=>Qe.checks[t(ge)]??null),re=_(()=>!!Qe.failed[t(ge)]),G=_(()=>t(K)?.state==="live"),ne=_(()=>t(K)?.url??null),ve=_(()=>t(ne)&&t(K)?Dt.view(t(ne)):null),Q=_(()=>t(ve)?Zt(t(ve),location.origin):""),le=_(()=>t(Y)?t(Y)/ie.w:0),$e=_(()=>s()&&i()&&t(le)>0&&t(le)<1);function Te(){Kt(ue),Qe.refresh(t(ge))}var Re={reload:Te},xe=ir(),he=c(xe);{var Oe=T=>{var k=Ga(),H=c(k),q=F(H,!0),U=u(H,2);{var be=z=>{var E=Ua(),V=c(E);Pt(V,{class:"size-3.5"}),l(E),D(()=>{R(E,"aria-label",t(G)?"Reload the preview":"Check the preview again"),R(E,"title",t(G)?"Reload":"Check again")}),L("click",E,Te),p(z,E)};$(U,z=>{(t(G)||t(K)?.state==="blocked"||t(K)?.state==="down")&&z(be)})}var se=u(U,2);{var Ce=z=>{var E=Ba(),V=u(c(E));At(V,{class:"size-3.5","aria-hidden":"true"}),l(E),D(()=>R(E,"href",t(ve))),p(z,E)};$(se,z=>{(t(G)||t(K)?.state==="blocked")&&z(Ce)})}var J=u(se,2);{var I=z=>{var E=Ya(),V=c(E);_t(V,{class:"size-3.5","aria-hidden":"true"}),fe(),l(E),L("click",E,function(...ce){e.onfullscreen?.apply(this,ce)}),p(z,E)};$(J,z=>{e.onfullscreen&&t(G)&&z(I)})}l(k),D(()=>{R(H,"title",t(ne)??void 0),O(q,t(ne)??"Live preview")}),p(T,k)};$(he,T=>{d()&&T(Oe)})}var pe=u(he,2),y=c(pe);{var A=T=>{var k=Be(),H=Ae(k);ra(H,()=>`${t(ve)} ${t(ue)}`,q=>{var U=Be(),be=Ae(U);{var se=J=>{var I=Xa(),z=Ae(I);{var E=C=>{var S=Ja();D(()=>{R(S,"src",t(ve)),R(S,"title",`Live preview of ${t(ne)??""}`),R(S,"sandbox",t(Q)),S.inert=!!e.onopen,Le(S,1,`absolute top-0 left-0 origin-top-left border-0 bg-white ${e.onopen?"pointer-events-none":""}`),ut(S,`width:${ie.w}px;height:${ie.h}px;transform:scale(${t(le)??""})`)}),p(C,S)};$(z,C=>{t(le)&&C(E)})}var V=u(z,2);{var ce=C=>{var S=Va(),Z=c(S),ee=c(Z);_t(ee,{class:"size-3.5","aria-hidden":"true"}),fe(),l(Z),l(S),L("click",S,function(...m){e.onopen?.apply(this,m)}),p(C,S)};$(V,C=>{e.onopen&&C(ce)})}p(J,I)},Ce=J=>{var I=er(),z=Ae(I);Ge(z,C=>b(P,C),()=>t(P));var E=u(z,2);{var V=C=>{var S=Qa(),Z=c(S),ee=c(Z);ya(ee,{class:"size-4","aria-hidden":"true"}),fe(),l(Z),l(S),L("click",S,N),p(C,S)},ce=C=>{var S=Za();D(()=>ut(S,`left:${g().x*100}%;top:${g().y*100}%`)),p(C,S)};$(E,C=>{h()?C(V):g()&&C(ce,1)})}D(()=>{R(z,"src",t(ve)),R(z,"title",`Live preview of ${t(ne)??""}`),R(z,"sandbox",t(Q)),Le(z,1,Yt(t($e)?"absolute top-0 left-0 origin-top-left border-0 bg-white":"size-full border-0 bg-white")),ut(z,t($e)?`width:${ie.w}px;height:${t(oe)/t(le)}px;transform:scale(${t(le)})`:void 0)}),p(J,I)};$(be,J=>{o()?J(se):J(Ce,-1)})}p(q,U)}),p(T,k)},de=T=>{const k=_(()=>!t(K)&&!t(re)),H=_(()=>t(k)?"Checking the preview…":t(re)?"Could not check the preview":t(K)?.state==="down"?"Preview stopped":t(K)?.state==="blocked"?"Preview cannot be embedded":t(K)?.state==="refused"?"Preview not shown here":"No live preview reported"),q=_(()=>t(k)?"":t(re)?"Wheelhouse did not answer; it will try again.":t(K)?.state==="blocked"?`${t(K).reason} Open it in a new tab instead.`:t(K)?.reason??"");var U=Be(),be=Ae(U);{var se=J=>{var I=ar(),z=c(I);{var E=ee=>{yt(ee,{class:"mt-0.5 size-4 shrink-0","aria-hidden":"true"})};$(z,ee=>{t(k)||ee(E)})}var V=u(z,2),ce=c(V),C=F(ce,!0),S=u(ce,2);{var Z=ee=>{var m=tr(),w=F(m,!0);D(()=>O(w,t(q))),p(ee,m)};$(S,ee=>{t(q)&&ee(Z)})}l(V),l(I),D(()=>{Le(ce,1,`font-medium ${t(k)?"":"text-foreground"}`),O(C,t(H))}),p(J,I)},Ce=J=>{var I=sr(),z=c(I),E=c(z);{var V=C=>{var S=rr(),Z=F(S,!0);D(()=>O(Z,t(H))),p(C,S)},ce=C=>{var S=nr(),Z=Ae(S);yt(Z,{class:"mx-auto size-6","aria-hidden":"true"});var ee=u(Z,2),m=F(ee,!0),w=u(ee,2),v=F(w,!0);D(()=>{O(m,t(H)),O(v,t(q))}),p(C,S)};$(E,C=>{t(k)?C(V):C(ce,-1)})}l(z),l(I),p(J,I)};$(be,J=>{o()?J(se):J(Ce,-1)})}p(T,U)};$(y,T=>{t(G)&&t(ve)?T(A):T(de,-1)})}return l(pe),l(xe),D(()=>{Le(xe,1,`min-w-0 ${s()?"flex h-full flex-col":""}`),R(xe,"data-live-preview",t(K)?.state??"checking"),Le(pe,1,`group relative w-full overflow-hidden bg-muted/40 ${d()?"mt-1.5 rounded-lg border":""} ${o()?t(G)?"aspect-[16/10]":"":s()?"min-h-0 flex-1":t(G)?"h-[70vh] min-h-80":"h-40"}`)}),wt(pe,"clientWidth",T=>b(Y,T)),wt(pe,"clientHeight",T=>b(oe,T)),p(n,xe),Ke(Re)}lt(["click"]);const St="wheelhouse-preview-helper",Nt=()=>({said:[],list:[],asking:!1,error:null,sent:null}),lr=Object.freeze(Nt()),Xe=()=>crypto.randomUUID();class dr{#e=M(it({}));get byTask(){return t(this.#e)}set byTask(e){b(this.#e,e,!0)}loaded=!1;load(){if(!this.loaded){this.loaded=!0;try{const e=JSON.parse(localStorage.getItem(St)??"{}");if(e&&typeof e=="object"){for(const a of Object.values(e))a.asking=!1;this.byTask=e}}catch{this.byTask={}}}}save(){try{localStorage.setItem(St,JSON.stringify(this.byTask))}catch{}}view(e){return this.byTask[e]??lr}of(e){return this.load(),this.byTask[e]||(this.byTask[e]=Nt()),this.byTask[e]}async ask(e,a,r,o){const s=this.of(e),i=a.trim();if(!i&&!r||s.asking)return;s.said.push({id:Xe(),who:"captain",text:i||"What about this?",points:r}),s.asking=!0,s.error=null,this.save();const d=s.said.filter(h=>!h.notice).map(h=>({who:h.who,text:h.text,points:h.points??null}));try{const h=await fetch(`/api/tasks/${encodeURIComponent(e)}/preview/helper`,{method:"POST",headers:{"content-type":"application/json",[ia]:o},body:JSON.stringify({turns:d,list:s.list.map(P=>P.text)})}),g=await h.json().catch(()=>null);!h.ok||!g?.reply?s.error=g?.message??`The helper could not answer (${h.status}).`:s.said.push({id:Xe(),who:"helper",text:g.reply,suggest:g.suggest.map(P=>({text:P,added:!1}))})}catch{s.error="Wheelhouse could not be reached. Try again."}finally{s.asking=!1,this.save()}}accept(e,a,r){const o=this.of(e),s=o.said.findIndex(h=>h.id===a),i=o.said[s]?.suggest?.[r];if(!i||i.added)return;i.added=!0;const d=o.said.slice(0,s).reverse().find(h=>h.who==="captain");o.list.push({id:Xe(),text:i.text,points:d?.points??null}),o.sent=null,this.save()}addOwn(e,a,r=null){const o=a.trim().slice(0,zt);if(!o)return;const s=this.of(e);s.list.push({id:Xe(),text:o,points:r}),s.sent=null,this.save()}edit(e,a,r){const o=this.of(e).list.find(s=>s.id===a);o&&(o.text=r.slice(0,zt),this.save())}remove(e,a){const r=this.of(e),o=r.list.find(s=>s.id===a);r.list=r.list.filter(s=>s.id!==a);for(const s of r.said)for(const i of s.suggest??[])o&&i.text===o.text&&(i.added=!1);this.save()}async send(e,a,r){const o=this.of(e.id),s=o.list.filter(g=>g.text.trim());if(!s.length)return!1;o.error=null;const i=await ea(Ka(e,a,s),r,e.id);if(!i.ok)return o.error=i.error,this.save(),!1;o.sent={at:new Date().toISOString(),count:s.length};const d=e.id.lastIndexOf("@"),h=d>0?`second mate ${e.id.slice(d+1)}`:"Firstmate";return o.list=[],o.said.push({id:Xe(),who:"helper",notice:!0,text:`Sent to ${h}: ${s.length} ${s.length===1?"note":"notes"}, which it passes to this task. Keep going if you spot more; they make a new list.`}),this.save(),!0}clear(e){const a=this.of(e);a.said=[],a.error=null,this.save()}}const He=new dr;var cr=new Set(["$$slots","$$events","$$legacy","ref","value","class","data-slot"]),ur=f("<textarea></textarea>");function vr(n,e){Fe(e,!0);let a=W(e,"ref",15,null),r=W(e,"value",15),o=W(e,"data-slot",3,"textarea"),s=me(e,cr);var i=ur();Et(i),Gt(i,d=>({"data-slot":o(),class:d,...s}),[()=>Rt("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e.class)]),Ge(i,d=>a(d),()=>a()),Lt(i,r),p(n,i),Ke()}const hr={unsupported:"This browser cannot turn speech into text. Chrome and Edge can; you can still type.",blocked:"The microphone is blocked for Wheelhouse. Allow it from the icon in the address bar, then try again.","no-microphone":"No microphone was found. Connect one, then try again.","no-speech":"Nothing was heard. Try again a little closer to the microphone.",network:"The browser’s speech service could not be reached. Check the connection and try again.",failed:"Dictation stopped unexpectedly. Try again, or type instead."};function $t(){if(typeof window>"u")return null;const n=window;return n.SpeechRecognition??n.webkitSpeechRecognition??null}const pr={"not-allowed":"blocked","service-not-allowed":"blocked","audio-capture":"no-microphone","no-speech":"no-speech",network:"network","language-not-supported":"unsupported"},ot=n=>n.trim().split(/\s+/).filter(Boolean),fr=(n,e)=>n.toLowerCase().replace(/[^\p{L}\p{N}]/gu,"")===e.toLowerCase().replace(/[^\p{L}\p{N}]/gu,""),Ht=(n,e)=>e.length<=n.length&&e.every((a,r)=>fr(a,n[r]));function Tt(n,e){const a=ot(n);return!a.length||Ht(ot(e),a)?e:/\s$/.test(n)||/^\s/.test(e)?n+e:`${n} ${e}`}function mr(n,e){const a=ot(n),r=ot(e);return!a.length||!Ht(r,a)?e:r.slice(a.length).join(" ")}const gr={privacyNote:"Dictation uses your browser’s speech service. In Chrome that sends what you say to Google to turn it into text, only while the microphone is on.",supported:()=>$t()!==null,start(n,e){const a=$t();if(!a)return e.problem("unsupported"),e.end(),{stop(){},abort(){}};const r=new a;r.lang=n,r.continuous=!0,r.interimResults=!0,r.onresult=o=>{let s="",i="";for(let d=0;d<o.results.length;d++){const h=o.results[d];h.isFinal?s=Tt(s,h[0].transcript):i=Tt(i,h[0].transcript)}e.text(s,mr(s,i))},r.onerror=o=>{o.error!=="aborted"&&e.problem(pr[o.error]??"failed")},r.onend=()=>e.end();try{r.start()}catch{e.problem("failed"),e.end()}return{stop:()=>r.stop(),abort:()=>r.abort()}}};let xr=gr;const ft=()=>xr,br=2e3;class wr{#e=M(null);get owner(){return t(this.#e)}set owner(e){b(this.#e,e)}#t=M("idle");get phase(){return t(this.#t)}set phase(e){b(this.#t,e,!0)}#r=M(0);get startedAt(){return t(this.#r)}set startedAt(e){b(this.#r,e,!0)}#s=M(null);get problem(){return t(this.#s)}set problem(e){b(this.#s,e,!0)}#n=null;#a=null;#i=null;active(e){return this.owner===e&&this.phase!=="idle"}start(e,a,r=_r()){this.phase!=="idle"&&this.commit();const o=ft();if(this.owner=e,this.problem=null,!o.supported()){this.problem="unsupported";return}this.#a=a,a.begin(),this.phase="listening",this.startedAt=Date.now();let s=null;const i=()=>s===null||this.#n===s;s=o.start(r,{text:(d,h)=>{i()&&this.#a===a&&a.show(...yr(d,h))},problem:d=>{i()&&(this.problem=d)},end:()=>{i()&&this.#a===a&&this.#o("finish")}}),this.#a===a&&(this.#n=s)}stop(){this.phase==="listening"&&(this.phase="stopping",this.#n?.stop(),this.#i=setTimeout(()=>this.#o("finish"),br))}commit(){this.phase!=="idle"&&this.#o("finish")}cancel(){this.phase!=="idle"&&this.#o("revert")}dismiss(){this.problem=null}#o(e){const a=this.#n,r=this.#a;this.#n=null,this.#a=null,this.#i&&clearTimeout(this.#i),this.#i=null,this.phase="idle",a?.abort(),r?.[e]()}}const ae=new wr;function _r(){return typeof navigator<"u"&&navigator.language?navigator.language:"en-US"}function yr(n,e){const a=n.replace(/\s+/g," ").trim(),r=e.replace(/\s+/g," ").trim();return[a,a&&r?` ${r}`:r]}const qt=n=>n&&!/\s$/.test(n)?" ":"",kr=n=>/^[\p{L}\p{N}]/u.test(n)?" ":"";function zr(n){let e="",a="",r="",o=!1;const s=(i,d)=>{n.value=i;try{n.setSelectionRange(d,d)}catch{}n.dispatchEvent(new Event("input",{bubbles:!0}))};return{begin(){e=n.value;const i=n.selectionStart??e.length,d=n.selectionEnd??i;a=e.slice(0,i),r=e.slice(d),o=!1},show(i,d){const h=i+d;if(!h)return;const g=a+qt(a)+h;s(g+kr(r)+r,g.length),o=!0},finish(){},revert(){o&&s(e,a.length),o=!1}}}function qn(n,e){let a=null,r=null,o="";const s=i=>{const d=document.createRange();d.setStartAfter(i),d.collapse(!0);const h=window.getSelection();h?.removeAllRanges(),h?.addRange(d)};return{begin(){const i=window.getSelection();let d;i?.rangeCount&&n.contains(i.getRangeAt(0).startContainer)?(d=i.getRangeAt(0),r=d.extractContents()):(d=document.createRange(),d.selectNodeContents(n),d.collapse(!1),r=null);const h=document.createRange();h.setStart(n,0),h.setEnd(d.startContainer,d.startOffset),o=qt(h.toString().replace(/\u00a0/g," ")),a=document.createElement("span"),a.dataset.dictation="",d.insertNode(a)},show(i,d){if(!a)return;const h=document.createTextNode(i||d?o+i:""),g=document.createElement("span");g.className="dictation-forming",g.textContent=d,a.replaceChildren(h,...d?[g]:[]),e()},finish(){if(!a)return;const i=a.textContent??"";if(i){const d=document.createTextNode(i);a.replaceWith(d),(n.contains(document.activeElement)||document.activeElement===n)&&s(d)}else a.replaceWith(r??"");a=null,r=null,e()},revert(){a?.replaceWith(r??""),a=null,r=null,e()}}}const Sr=n=>n.code==="Space"&&n.shiftKey&&(n.metaKey||n.ctrlKey)&&!n.altKey,$r=450;function Tr(n,e,a){let r=0;const o=i=>{if(Sr(i)){if(i.preventDefault(),i.repeat)return;ae.active(e)?(r=0,ae.stop()):(r=Date.now(),a());return}ae.active(e)&&(i.key==="Escape"?(i.preventDefault(),i.stopPropagation(),r=0,ae.cancel()):["Shift","Control","Meta","Alt","CapsLock"].includes(i.key)||(r=0,ae.commit()))},s=i=>{if(!r||!(i.code==="Space"||["Shift","Meta","Control"].includes(i.key)))return;const d=Date.now()-r;r=0,d>=$r&&ae.active(e)&&ae.stop()};return n.addEventListener("keydown",o),n.addEventListener("keyup",s),()=>{n.removeEventListener("keydown",o),n.removeEventListener("keyup",s)}}var Cr=f('<span class="tabular text-xs text-muted-foreground svelte-1uxx7q9" data-dictation-time=""> </span>'),Er=f('<div class="absolute right-0 bottom-full z-30 mb-2 w-72 rounded-md border bg-popover p-3 text-left text-xs leading-relaxed text-popover-foreground shadow-md svelte-1uxx7q9" role="dialog" aria-label="Before you dictate" data-dictation-note=""><p class="svelte-1uxx7q9"> </p> <p class="mt-1.5 text-muted-foreground svelte-1uxx7q9">Words appear in the box for you to check; nothing is sent until you send it.</p> <div class="mt-2.5 flex justify-end gap-2 svelte-1uxx7q9"><button type="button" class="rounded-md px-2 py-1 text-muted-foreground hover:bg-muted hover:text-foreground svelte-1uxx7q9">Not now</button> <button type="button" class="rounded-md bg-primary px-2.5 py-1 font-medium text-primary-foreground svelte-1uxx7q9">Start dictating</button></div></div>'),Mr=f('<div class="absolute right-0 bottom-full z-30 mb-2 flex w-72 items-start gap-2 rounded-md border bg-popover p-3 text-left text-xs leading-relaxed text-popover-foreground shadow-md svelte-1uxx7q9" role="alert" data-dictation-problem=""><p class="min-w-0 flex-1 svelte-1uxx7q9"> </p> <button type="button" class="-m-1 rounded-sm p-1 text-muted-foreground hover:text-foreground svelte-1uxx7q9" aria-label="Dismiss"><!></button></div>'),Dr=f('<span class="relative inline-flex shrink-0 items-center gap-1.5 svelte-1uxx7q9"><!> <button type="button"><!></button> <span class="sr-only svelte-1uxx7q9" aria-live="polite"> </span> <!></span>');function Pr(n,e){Fe(e,!0);let a=W(e,"label",3,"Dictate"),r=W(e,"size",3,"md"),o=W(e,"disabled",3,!1),s=W(e,"listening",15,!1);const i={};Ut(()=>{s(ae.active(i))});const d=_(()=>s()&&ae.phase==="stopping"),h=_(()=>ae.owner===i?ae.problem:null);let g=M(!1),P=M(it(Date.now())),N=M("Ctrl+Shift+Space");const ie="wheelhouse.voice.noted";let ue=!1;function Y(){if(ue)return!0;try{return localStorage.getItem(ie)==="1"}catch{return!1}}function oe(){if(o())return;const y=ft();if(y.supported()&&y.privacyNote&&!Y()){b(g,!0);return}ae.start(i,e.target()),e.field?.focus()}function ge(){ue=!0;try{localStorage.setItem(ie,"1")}catch{}b(g,!1),oe()}function K(){s()?ae.stop():t(g)?b(g,!1):oe()}const re=_(()=>{const y=Math.max(0,Math.floor((t(P)-ae.startedAt)/1e3));return`${Math.floor(y/60)}:${String(y%60).padStart(2,"0")}`});We(()=>{/Mac|iPhone|iPad/.test(navigator.platform)&&b(N,"⌘⇧Space")}),We(()=>{if(!s())return;b(P,Date.now(),!0);const y=setInterval(()=>b(P,Date.now(),!0),250);return()=>clearInterval(y)}),We(()=>{if(e.field)return Tr(e.field,i,oe)}),We(()=>{if(!s()&&!t(g))return;const y=A=>{A.key!=="Escape"||A.defaultPrevented||(A.preventDefault(),s()&&ae.cancel(),b(g,!1))};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)}),jt(()=>{ae.active(i)&&ae.commit()});var G=Dr(),ne=c(G);{var ve=y=>{var A=Cr(),de=F(A,!0);D(()=>O(de,t(d)?"Finishing…":t(re))),p(y,A)};$(ne,y=>{s()&&y(ve)})}var Q=u(ne,2),le=c(Q);{var $e=y=>{{let A=_(()=>r()==="md"?"size-3.5 fill-current":"size-3 fill-current");Ma(y,{get class(){return t(A)}})}},Te=y=>{{let A=_(()=>r()==="md"?"size-4.5":"size-4");ma(y,{get class(){return t(A)}})}};$(le,y=>{s()?y($e):y(Te,-1)})}l(Q);var Re=u(Q,2),xe=F(Re,!0),he=u(Re,2);{var Oe=y=>{var A=Er(),de=c(A),T=F(de,!0),k=u(de,4),H=c(k),q=u(H,2);l(k),l(A),D(U=>O(T,U),[()=>ft().privacyNote]),L("click",H,()=>b(g,!1)),L("click",q,ge),p(y,A)},pe=y=>{var A=Mr(),de=c(A),T=F(de,!0),k=u(de,2),H=c(k);Ye(H,{class:"size-3.5"}),l(k),l(A),D(()=>O(T,hr[t(h)])),L("click",k,()=>ae.dismiss()),p(y,A)};$(he,y=>{t(g)?y(Oe):t(h)&&y(pe,1)})}l(G),D(()=>{R(Q,"aria-label",s()?"Stop dictating":a()),R(Q,"aria-pressed",s()),R(Q,"title",s()?"Stop dictating · Esc cancels":`${a()} (${t(N)}; hold for push-to-talk)`),Q.disabled=o(),R(Q,"data-dictating",s()?"":void 0),Le(Q,1,`mic flex shrink-0 cursor-pointer items-center justify-center rounded-full transition-colors disabled:cursor-not-allowed disabled:opacity-30 ${r()==="md"?"size-9 max-md:size-11":`size-7 ${nt.current?"touch-target":""}`} ${s()?"bg-danger/10 text-danger":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,"svelte-1uxx7q9"),O(xe,s()?"Listening":"")}),L("mousedown",Q,y=>y.preventDefault()),L("click",Q,K),p(n,G),Ke()}lt(["mousedown","click"]);var Ar=new Set(["$$slots","$$events","$$legacy","value","class"]),Lr=f('<div class="relative w-full min-w-0"><!> <div class="absolute right-1.5 bottom-1.5"><!></div></div>');function Rr(n,e){Fe(e,!0);let a=W(e,"value",15),r=me(e,Ar),o=M(null),s=M(!1);var i=Lr(),d=c(i);{let P=_(()=>Rt(e.class,t(s)?"pr-24":"pr-10"));vr(d,_e({get class(){return t(P)}},()=>r,{get ref(){return t(o)},set ref(N){b(o,N,!0)},get value(){return a()},set value(N){a(N)}}))}var h=u(d,2),g=c(h);{let P=_(()=>!!e.disabled);Pr(g,{get field(){return t(o)},target:()=>zr(t(o)),size:"sm",get disabled(){return t(P)},get listening(){return t(s)},set listening(N){b(s,N,!0)}})}l(h),l(i),p(n,i),Ke()}var Or=f('<span class="inline-flex max-w-[85%] items-center gap-1 rounded-md bg-sea/10 px-2 py-0.5 text-xs text-sea"><!><span class="truncate"> </span></span>'),Nr=f('<li class="flex flex-col items-end gap-1" data-said="captain"><!> <p class="max-w-[85%] rounded-xl rounded-br-sm border border-[var(--bubble-captain-border)] bg-[var(--bubble-captain)] px-3 py-2 text-sm leading-relaxed whitespace-pre-wrap"> </p></li>'),Hr=f('<a href="/" class="text-xs text-sea hover:underline">See it in the chat</a>'),qr=f('<span class="inline-flex items-center gap-1 text-xs text-success"><!>On your list</span>'),Ir=f('<button class="inline-flex cursor-pointer items-center gap-1 rounded-md bg-sea px-2.5 py-1 text-xs font-medium text-on-accent hover:bg-sea/90" data-add-to-list=""><!>Add to the list</button>'),jr=f('<div class="mt-2 rounded-md border bg-card px-3 py-2" data-suggestion=""><p class="text-sm leading-snug"> </p> <div class="mt-1.5"><!></div></div>'),Wr=f('<li class="flex gap-2.5" data-said="helper"><span class="mt-0.5 grid size-6 shrink-0 place-items-center rounded-full border border-brass bg-card text-sea" aria-hidden="true"><!></span> <div class="min-w-0 flex-1"><div></div> <!> <!></div></li>'),Fr=f('<li class="flex gap-1 py-1 pl-9" role="status" aria-label="The helper is answering"><span class="size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:-0.3s]"></span> <span class="size-1.5 animate-bounce rounded-full bg-muted-foreground [animation-delay:-0.15s]"></span> <span class="size-1.5 animate-bounce rounded-full bg-muted-foreground"></span></li>'),Kr=f('<li class="text-sm text-danger" role="alert"> </li>'),Ur=f('<div class="flex items-center gap-1.5 px-2.5 pt-2"><span class="inline-flex min-w-0 items-center gap-1 rounded-md bg-sea/10 px-2 py-0.5 text-xs text-sea" data-attached=""><!><span class="truncate"> </span></span> <button class="flex size-5 cursor-pointer items-center justify-center rounded text-muted-foreground hover:bg-muted" aria-label="Not about this part"><!></button></div>'),Br=f('<span class="text-xs text-muted-foreground">· not sent yet</span>'),Yr=f('<p class="text-xs text-muted-foreground"> </p>'),Gr=f('<li class="group flex items-start gap-2 rounded-md border bg-background px-2 py-1"><span class="mt-0.5 w-4 shrink-0 text-right text-xs text-muted-foreground tabular-nums"> </span> <div class="min-w-0 flex-1"><textarea rows="1" maxlength="500" class="no-scrollbar block field-sizing-content w-full resize-none rounded bg-transparent text-sm leading-snug outline-none focus:bg-accent/40 max-md:text-base"></textarea> <!></div> <button class="flex size-6 shrink-0 cursor-pointer items-center justify-center rounded text-muted-foreground opacity-60 group-hover:opacity-100 hover:bg-muted hover:text-foreground max-md:size-11" aria-label="Remove from the list"><!></button></li>'),Jr=f('<ol class="flex flex-col gap-1.5"></ol>'),Vr=f('<p class="text-xs text-muted-foreground">Empty so far. Add what the helper suggests, or write your own below.</p>'),Xr=f('<div class="no-scrollbar max-h-48 overflow-y-auto px-4"><!> <form class="mt-1.5 flex items-center gap-1"><!> <input maxlength="500" placeholder="Add your own" aria-label="Add your own feedback" class="h-7 min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground max-md:h-11 max-md:text-base"/></form></div>'),Qr=f(`<section class="flex min-h-0 flex-col rounded-lg border bg-panel" aria-label="Talk about this preview" data-preview-helper=""><header class="border-b px-4 py-3"><h2 class="flex items-center gap-2 text-base"><!>Talk it through</h2> <p class="mt-0.5 text-xs text-muted-foreground">A helper that sees only this preview. Nothing goes to Firstmate until you send.</p></header> <div class="no-scrollbar min-h-40 flex-1 overflow-y-auto px-4 py-4"><ol class="flex flex-col gap-4"><li class="flex gap-2.5"><span class="mt-0.5 grid size-6 shrink-0 place-items-center rounded-full border border-brass bg-card text-sea" aria-hidden="true"><!></span> <p class="min-w-0 flex-1 text-sm leading-relaxed">I can see this preview, its screenshots, the task’s instructions and what the worker has
@@ -0,0 +1 @@
1
+ import{o as y}from"./D8OKqJm7.js";import{aa as p,bD as N,m as u,g as f,v as d}from"./D46tdsTs.js";const h=[];function k(e,t=p){let n=null;const s=new Set;function r(o){if(N(e,o)&&(e=o,n)){const c=!h.length;for(const l of s)l[1](),h.push(l,e);if(c){for(let l=0;l<h.length;l+=2)h[l][0](h[l+1]);h.length=0}}}function i(o){r(o(e))}function a(o,c=p){const l=[o,c];return s.add(l),s.size===1&&(n=t(r,i)||p),o(e),()=>{s.delete(l),s.size===0&&n&&(n(),n=null)}}return{set:r,update:i,subscribe:a}}const L="1794588247317";new URL("sveltekit-internal://");function D(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function H(e){return e.split("%25").map(decodeURI).join("%25")}function K(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function B({href:e}){return e.split("#")[0]}function O(){}function x(...e){let t=5381;for(const n of e)if(typeof n=="string"){let s=n.length;for(;s;)t=t*33^n.charCodeAt(--s)}else if(ArrayBuffer.isView(n)){const s=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let r=s.length;for(;r;)t=t*33^s[--r]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;function $(e){const t=atob(e),n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n}const q=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&b.delete(m(e)),q(e,t));const b=new Map;function W(e,t){const n=m(e,t),s=document.querySelector(n);if(s?.textContent){s.remove();let{body:r,...i}=JSON.parse(s.textContent);s.getAttribute("data-b64")!==null&&(r=$(r));const o=s.getAttribute("data-ttl");return o&&b.set(n,{body:r,init:i,ttl:1e3*Number(o)}),Promise.resolve(new Response(r,i))}return window.fetch(e,t)}function X(e,t,n){if(b.size>0){const s=m(e,n),r=b.get(s);if(r){if(performance.now()<r.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(r.body,r.init);b.delete(s)}}return window.fetch(t,n)}function m(e,t){let s=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const r=[];t.headers&&r.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&r.push(t.body),s+=`[data-hash="${x(...r)}"]`}return s}const C=globalThis.__sveltekit_tmibb3?.base??"",P=globalThis.__sveltekit_tmibb3?.assets??C??"",J="sveltekit:snapshot",M="sveltekit:scroll",F="sveltekit:states",Q="sveltekit:pageurl",Z="sveltekit:history",ee="sveltekit:navigation",v={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},E=location.origin;function te(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function ne(){return{x:pageXOffset,y:pageYOffset}}function g(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const S={...v,"":v.hover};function T(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function se(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=T(e)}}function re(e,t,n){let s;try{if(s=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&s.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";s.hash=`#${o}${s.hash}`}}catch{}const r=e instanceof SVGAElement?e.target.baseVal:e.target,i=!s||!!r||V(s,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),a=s?.origin===E&&e.hasAttribute("download");return{url:s,external:i,target:r,download:a}}function oe(e){let t=null,n=null,s=null,r=null,i=null,a=null,o=e;for(;o&&o!==document.documentElement;)s===null&&(s=g(o,"preload-code")),r===null&&(r=g(o,"preload-data")),t===null&&(t=g(o,"keepfocus")),n===null&&(n=g(o,"noscroll")),i===null&&(i=g(o,"reload")),a===null&&(a=g(o,"replacestate")),o=T(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:S[s??"off"],preload_data:S[r??"off"],keepfocus:c(t),noscroll:c(n),reload:c(i),replace_state:c(a)}}function ae(e){const t=k(e);let n=!0;function s(){n=!0,t.update(a=>a)}function r(a){n=!1,t.set(a)}function i(a){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&a(o=c)})}return{notify:s,set:r,subscribe:i}}const U={v:O};function ie(){const{set:e,subscribe:t}=k(!1);let n;async function s(){clearTimeout(n);try{const r=await fetch(`${P}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const a=(await r.json()).version!==L;return a&&(e(!0),U.v(),clearTimeout(n)),a}catch{return!1}}return{subscribe:t,check:s}}function V(e,t,n){return e.origin!==E||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function le(e){}const I=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...I];const j=new Set([...I]);[...j];let w,A,_;const G=y.toString().includes("$$")||/function \w+\(\) \{\}/.test(y.toString()),R="a:";G?(w={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(R)},A={current:null},_={current:!1}):(w=new class{#e=u({});get data(){return f(this.#e)}set data(t){d(this.#e,t)}#t=u(null);get form(){return f(this.#t)}set form(t){d(this.#t,t)}#n=u(null);get error(){return f(this.#n)}set error(t){d(this.#n,t)}#s=u({});get params(){return f(this.#s)}set params(t){d(this.#s,t)}#r=u({id:null});get route(){return f(this.#r)}set route(t){d(this.#r,t)}#o=u({});get state(){return f(this.#o)}set state(t){d(this.#o,t)}#a=u(-1);get status(){return f(this.#a)}set status(t){d(this.#a,t)}#i=u(new URL(R));get url(){return f(this.#i)}set url(t){d(this.#i,t)}},A=new class{#e=u(null);get current(){return f(this.#e)}set current(t){d(this.#e,t)}},_=new class{#e=u(!1);get current(){return f(this.#e)}set current(t){d(this.#e,t)}},U.v=()=>_.current=!0);function de(e){Object.assign(w,e)}export{Z as H,ee as N,Q as P,F as S,A as a,C as b,oe as c,B as d,K as e,se as f,re as g,D as h,V as i,ie as j,ae as k,v as l,H as m,O as n,E as o,w as p,J as q,te as r,ne as s,X as t,de as u,W as v,k as w,M as x,le as y};
@@ -0,0 +1,2 @@
1
+ import{s as yt}from"./D8OKqJm7.js";import{H as B,N as Y,r as me,n as N,i as je,b as T,s as $,a as Se,f as tt,g as Ie,c as oe,d as be,S as Oe,P as rt,p as I,o as Ne,e as wt,h as vt,u as De,j as bt,w as Et,k as Xe,l as X,m as At,q as nt,t as kt,v as St,x as at}from"./BSAgOLZf.js";import{G as se,a8 as It,A as Rt}from"./D46tdsTs.js";class te{constructor(t,r){this.status=t,typeof r=="string"?this.body={message:r}:r?this.body=r:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class xe{constructor(t,r){try{new Headers({location:r})}catch{throw new Error(`Invalid redirect location ${JSON.stringify(r)}: this string contains characters that cannot be used in HTTP headers`)}this.status=t,this.location=r}}class Ce extends Error{constructor(t,r,n){super(n),this.status=t,this.text=r}}const Pt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,Lt=/^\/\((?:[^)]+)\)$/;function Tt(e){const t=[];return{pattern:e==="/"||Lt.test(e)?/^\/$/:new RegExp(`^${jt(e).map(n=>{const i=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(n);if(i)return t.push({name:i[1],matcher:i[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const a=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(n);if(a)return t.push({name:a[1],matcher:a[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!n)return;const o=n.split(/\[(.+?)\](?!\])/);return"/"+o.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return Ee(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return Ee(String.fromCharCode(...c.slice(2).split("-").map(w=>parseInt(w,16))));const l=Pt.exec(c),[,d,p,u,h]=l;return t.push({name:u,matcher:h,optional:!!d,rest:!!p,chained:p?f===1&&o[0]==="":!1}),p?"([^]*?)":d?"([^/]*)?":"([^/]+?)"}return Ee(c)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function jt(e){return e.slice(1).split("/").filter(Ut)}function Ot(e,t,r){const n={},i=e.slice(1),a=i.filter(s=>s!==void 0);let o=0;for(let s=0;s<t.length;s+=1){const c=t[s];let f=i[s-o];if(c.chained&&c.rest&&o&&(f=i.slice(s-o,s+1).filter(l=>l).join("/"),o=0),f===void 0)if(c.rest)f="";else continue;if(!c.matcher||r[c.matcher](f)){n[c.name]=f;const l=t[s+1],d=i[s+1];l&&!l.rest&&l.optional&&d&&c.chained&&(o=0),!l&&!d&&Object.keys(n).length===a.length&&(o=0);continue}if(c.optional&&c.chained){o++;continue}return}if(!o)return n}function Ee(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Nt({nodes:e,server_loads:t,dictionary:r,matchers:n}){const i=new Set(t);return Object.entries(r).map(([s,[c,f,l]])=>{const{pattern:d,params:p}=Tt(s),u={id:s,exec:h=>{const w=d.exec(h);if(w)return Ot(w,p,n)},errors:[1,...l||[]].map(h=>e[h]),layouts:[0,...f||[]].map(o),leaf:a(c)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(s){const c=s<0;return c&&(s=~s),[c,e[s]]}function o(s){return s===void 0?s:[i.has(s),e[s]]}}function ot(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ze(e,t,r=JSON.stringify){const n=r(t);try{sessionStorage[e]=n}catch{}}const Dt=-1,xt=-2,Ct=-3,Bt=-4,Mt=-5,$t=-6,Ft=-7,st=2**32-1,Re=st-1;function Vt(e){return!(!Number.isInteger(e)||e<0||e>Re)}function qt(e){return!(!Number.isInteger(e)||e<0||e>st)}function Ht(e){return Uint8Array.fromBase64(e).buffer}function Yt(e){return Uint8Array.from(Buffer.from(e,"base64")).buffer}function Kt(e){const t=atob(e),r=t.length,n=new Uint8Array(r);for(let i=0;i<r;i++)n[i]=t.charCodeAt(i);return n.buffer}const Gt=typeof Uint8Array.fromBase64=="function",Xt=typeof process=="object"&&process.versions?.node!==void 0,zt=Gt?Ht:Xt?Yt:Kt;function Wt(e,t){return e}const Jt=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get,We=typeof SharedArrayBuffer>"u"?void 0:Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype,"byteLength").get,Zt={fromPrimitive:e=>e,fromISOString:e=>new Date(e),fromStringValue:(e,t)=>e==="URL"?new URL(t):e==="URLSearchParams"?new URLSearchParams(t):Temporal[e.slice(9)].from(t),fromArrayBuffer:e=>e,fromRegExpInfo:(e,t)=>new RegExp(e,t),fromViewInfo:(e,t,r,n)=>{try{Jt.call(t)}catch(a){if(!We)throw a;We.call(t)}const i=globalThis[e];return r!==void 0?new i(t,r,n):new i(t)},box:e=>Object(e),createArray:e=>new Array(e),createSparseArray:e=>{const t=[];return t[Re]=void 0,delete t[Re],t.length=e,t},createObject:()=>({}),createNullPrototypeObject:()=>Object.create(null),createSet:()=>new Set,createMap:()=>new Map,set:(e,t,r)=>{e[t]=r},addValue:(e,t)=>{e.add(t)},addEntry:(e,t,r)=>{e.set(t,r)}},Qt=Object.freeze(Zt);function er(e,t,r){const n=Wt(Qt);if(typeof e=="number")return s(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const i=e,a=Array(i.length);let o=null;function s(c,f=!1){if(c===Dt)return n.fromPrimitive(void 0);if(c===Ct)return n.fromPrimitive(NaN);if(c===Bt)return n.fromPrimitive(1/0);if(c===Mt)return n.fromPrimitive(-1/0);if(c===$t)return n.fromPrimitive(-0);if(f||typeof c!="number")throw new Error("Invalid input");if(c in a)return a[c];if(c>=i.length)throw new Error("Invalid input");const l=i[c];if(!l||typeof l!="object")a[c]=n.fromPrimitive(l);else if(Array.isArray(l))if(typeof l[0]=="string"){const d=l[0],p=t&&Object.hasOwn(t,d)?t[d]:void 0;if(p){let u=l[1];if(typeof u!="number"&&(u=i.push(l[1])-1),Object.hasOwn(a,u))return a[c]=p(a[u]);if(o??=new Set,o.has(u))throw new Error("Invalid circular reference");return o.add(u),a[c]=p(s(u)),o.delete(u),a[c]}switch(d){case"Date":a[c]=n.fromISOString(l[1]);break;case"Set":const u=n.createSet();a[c]=u;for(let _=1;_<l.length;_+=1)n.addValue(u,s(l[_]));break;case"Map":const h=n.createMap();a[c]=h;for(let _=1;_<l.length;_+=2)n.addEntry(h,s(l[_]),s(l[_+1]));break;case"RegExp":a[c]=n.fromRegExpInfo(l[1],l[2]);break;case"Object":{const _=l[1];if(typeof i[_]=="object"&&i[_][0]!=="BigInt")throw new Error("Invalid input");a[c]=n.box(s(_));break}case"BigInt":a[c]=n.fromPrimitive(BigInt(l[1]));break;case"null":const w=n.createNullPrototypeObject();a[c]=w;for(let _=1;_<l.length;_+=2){const m=l[_];if(typeof m!="string")throw new Error("Cannot parse an object with a non-string key");if(m==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");n.set(w,m,s(l[_+1]))}break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Float16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":case"DataView":{if(i[l[1]][0]!=="ArrayBuffer")throw new Error("Invalid data");const _=s(l[1]);a[c]=n.fromViewInfo(d,_,l[2],l[3]);break}case"ArrayBuffer":{const _=l[1];if(typeof _!="string")throw new Error("Invalid ArrayBuffer encoding");a[c]=n.fromArrayBuffer(zt(_));break}case"URL":case"URLSearchParams":case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{a[c]=n.fromStringValue(d,l[1]);break}default:throw new Error(`Unknown type ${d}`)}}else if(l[0]===Ft){const d=l[1];if(!qt(d))throw new Error("Invalid input");const p=n.createSparseArray(d);a[c]=p;for(let u=2;u<l.length;u+=2){const h=l[u];if(!Vt(h)||h>=d)throw new Error("Invalid input");n.set(p,h,s(l[u+1]))}}else{const d=n.createArray(l.length);a[c]=d;for(let p=0;p<l.length;p+=1){const u=l[p];u!==xt&&n.set(d,p,s(u))}}else{const d=n.createObject();a[c]=d;for(const p of Object.keys(l)){if(p==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");n.set(d,p,s(l[p]))}}return a[c]}return s(0)}function tr(e){return e.filter(t=>t!=null)}const rr="x-sveltekit-invalidated",nr="x-sveltekit-trailing-slash";function F(e,t){return e+"/"+t}function ie(e){return e instanceof te||e instanceof Ce?e.status:500}function ar(e){return e instanceof Ce?e.text:"Internal Error"}const or="/__data.json",sr=".html__data.json";function ir(e){return e.endsWith(".html")?e.replace(/\.html$/,sr):e.replace(/\/$/,"")+or}async function*cr(e,t){let r=!1,n="";const i=new TextDecoder;for(;;){let a=n.indexOf(t);for(;a!==-1;)yield n.slice(0,a),n=n.slice(a+t.length),a=n.indexOf(t);if(r){n&&(yield n);return}const o=await e.read();r=o.done,o.value&&(n+=i.decode(o.value,{stream:!0})),r&&(n+=i.decode())}}async function*lr(e){for await(const t of cr(e,`
2
+ `)){const r=t.trim();r&&(yield JSON.parse(r))}}const{onMount:fr}=yt,ur=Rt??(e=>e()),dr=new Set(["icon","shortcut icon","apple-touch-icon"]);let z=null;const x=ot(at)??{},Z=ot(nt)??{},D={url:Xe({}),page:Xe({}),navigating:Et(null),updated:bt()};function Be(e){x[e]=$()}function hr(e,t){let r=e+1;for(;x[r];)delete x[r],r+=1;for(r=t+1;Z[r];)delete Z[r],r+=1}function K(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(N)}async function it(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(T||"/");e&&await e.update()}}let Me,Pe,ce,O,Le,E;const le=[],fe=[];let L=null;function Q(){L?.fork?.then(e=>e?.discard()),L=null,V={element:void 0,href:void 0}}const ae=new Map,$e=new Set,ct=new Set,q=new Set;let g={branch:[],error:null,url:null,nav:null},Fe=!1,ue=!1,Je=!0,ee=!1,W=!1,lt=!1,re=!1,ge,k,R,U;const J=new Set;let Ae;const de=new Map,he=new Map;async function Ur(e,t,r){if(globalThis.__sveltekit_tmibb3.data){const{q:a={},p:o={},l:s={},f:c={}}=globalThis.__sveltekit_tmibb3.data;for(const f in a)a[f];for(const f in s)s[f];for(const f in c)c[f];for(const f in o)o[f]}document.URL!==location.href&&(location.href=location.href),E=e,await e.hooks.init?.(),Me=Nt(e),O=document.documentElement,Le=t,Pe=e.nodes[0],ce=e.nodes[1],Pe(),ce(),k=history.state?.[B],R=history.state?.[Y],k||(k=R=Date.now(),history.replaceState({...history.state,[B]:k,[Y]:R},""));const n=x[k];function i(){n&&(history.scrollRestoration="manual",scrollTo(n.x,n.y))}r?(i(),await kr(Le,r)):(await H({type:"enter",url:me(E.hash?Rr(new URL(location.href)):location.href),replace_state:!0}),i()),Ar()}async function pr(e=!0,t=!0){if(await(Ae||=Promise.resolve()),!Ae)return;Ae=null;const r=U={},n=await ne(g.url,!0);Q();const i=new Map;if(re){for(const o of de.values())for(const{resource:s}of o.values())s.refresh();for(const[o,s]of he)for(const[c,{resource:f}]of s){const l=F(o,c),d=f.reconnect();d.catch(N),i.set(l,d)}}if(e){const o=I.state,s=n&&await Ye(n);if(!s||r!==U)return;if(s.type==="redirect")return Ve(new URL(s.location,g.url).href,{replaceState:!0},1,r);t||(s.props.page.state=o),De(s.props.page),g={...s.state,nav:g.nav},Te(),ge.$set(s.props)}else Te();const a=[];for(const o of de.values())for(const{resource:s}of o.values())a.push(s);for(const[o,s]of he)for(const c of s.keys()){const f=F(o,c),l=i.get(f);l&&a.push(l)}await Promise.all(a).catch(N)}function Te(){le.length=0,re=!1}function ft(e){fe.some(t=>t?.snapshot)&&(Z[e]=fe.map(t=>t?.snapshot?.capture()))}function ut(e){Z[e]?.forEach((t,r)=>{fe[r]?.snapshot?.restore(t)})}function Ze(){Be(k),ze(at,x),ft(R),ze(nt,Z)}async function Ve(e,t,r,n){let i,a;t.invalidateAll&&Q(),await H({type:"goto",url:me(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:r,nav_token:n,accept:()=>{if(t.invalidateAll){re=!0,i=new Set;for(const[o,s]of de)for(const[c,f]of s)f.resource?.reset(),i.add(F(o,c));a=new Set;for(const[o,s]of he)for(const c of s.keys())a.add(F(o,c))}t.invalidate&&t.invalidate.forEach(Er)}}),t.invalidateAll&&se().then(se).then(()=>{for(const[o,s]of de)for(const[c,{resource:f}]of s)i?.has(F(o,c))&&f.start();for(const[o,s]of he)for(const[c,{resource:f}]of s)a?.has(F(o,c))&&f.reconnect()})}async function _r(e){if(e.id!==L?.id){Q();const t={};J.add(t),L={id:e.id,token:t,promise:Ye({...e,preload:t}).then(r=>(J.delete(t),r.type==="loaded"&&r.state.error&&Q(),r)),fork:null}}return L.promise}async function ke(e){const t=(await ne(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(r=>r[1]()))}async function dt(e,t,r){const n={params:g.params,route:{id:g.route?.id??null},url:new URL(location.href)};if(g={...e.state,nav:n},De(e.props.page),ge=new E.root({target:t,props:{...e.props,stores:D,components:fe},hydrate:r,sync:!1,transformError:void 0}),await Promise.resolve(),r){const i={from:null,to:{...n,scroll:x[k]??$()},willUnload:!1,type:"enter",complete:Promise.resolve()};q.forEach(a=>a(i))}ut(R),ue=!0}async function pe({url:e,params:t,branch:r,errors:n,status:i,error:a,route:o,form:s}){let c="never";if(T&&(e.pathname===T||e.pathname===T+"/"))c="always";else for(const h of r)h?.slash!==void 0&&(c=h.slash);e.pathname=vt(e.pathname,c),e.search=e.search;const f={type:"loaded",state:{url:e,params:t,branch:r,error:a,route:o},props:{constructors:tr(r).map(h=>h.node.component),page:we(I)}};s!==void 0&&(f.props.form=s);let l={},d=!I,p=0;for(let h=0;h<Math.max(r.length,g.branch.length);h+=1){const w=r[h],_=g.branch[h];w?.data!==_?.data&&(d=!0),w&&(l={...l,...w.data},d&&(f.props[`data_${p}`]=l),p+=1)}return(!g.url||e.href!==g.url.href||g.error!==a||s!==void 0&&s!==I.form||d)&&(f.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:d?l:I.data}),f}async function qe({loader:e,parent:t,url:r,params:n,route:i,server_data_node:a}){let o=null;const s={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();return{node:c,loader:e,server:a,universal:c.universal?.load?{type:"data",data:o,uses:s}:null,data:o??a?.data??null,slash:c.universal?.trailingSlash??a?.slash}}function mr(e,t,r){let n=e instanceof Request?e.url:e;const i=new URL(n,r);i.origin===r.origin&&(n=i.href.slice(r.origin.length));const a=ue?kt(n,i.href,t):St(n,t);return{resolved:i,promise:a}}function Qe(e,t,r,n,i,a){if(re)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&r)return!0;for(const o of i.search_params)if(n.has(o))return!0;for(const o of i.params)if(a[o]!==g.params[o])return!0;for(const o of i.dependencies)if(le.some(s=>s(new URL(o))))return!0;return!1}function He(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function gr(e,t){if(!e)return new Set(t.searchParams.keys());const r=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const n of r){const i=e.searchParams.getAll(n),a=t.searchParams.getAll(n);i.every(o=>a.includes(o))&&a.every(o=>i.includes(o))&&r.delete(n)}return r}function et({error:e,url:t,route:r,params:n}){return{type:"loaded",state:{error:e,url:t,route:r,params:n,branch:[]},props:{page:we(I),constructors:[]}}}async function Ye({id:e,invalidating:t,url:r,params:n,route:i,preload:a}){if(L?.id===e)return J.delete(L.token),L.promise;const{errors:o,layouts:s,leaf:c}=i,f=[...s,c];o.forEach(y=>y?.().catch(N)),f.forEach(y=>y?.[1]().catch(N));let l=null;const d=g.url?e!==_e(g.url):!1,p=g.route?i.id!==g.route.id:!1,u=gr(g.url,r);let h=!1;{const y=f.map((v,A)=>{const S=g.branch[A],b=!!v?.[0]&&(S?.loader!==v[1]||Qe(h,p,d,u,S.server?.uses,n));return b&&(h=!0),b});if(y.some(Boolean)){try{l=await _t(r,y)}catch(v){const A=await M(v,{url:r,params:n,route:{id:e}});return a&&J.has(a)?et({error:A,url:r,params:n,route:i}):ye({status:ie(v),error:A,url:r,route:i})}if(l.type==="redirect")return l}}const w=l?.nodes;let _=!1;const m=f.map(async(y,v)=>{if(!y)return;const A=g.branch[v],S=w?.[v];if((!S||S.type==="skip")&&y[1]===A?.loader&&!Qe(_,p,d,u,A.universal?.uses,n))return A;if(_=!0,S?.type==="error")throw S;return qe({loader:y[1],url:r,params:n,route:i,parent:async()=>{const j={};for(let C=0;C<v;C+=1)Object.assign(j,(await m[C])?.data);return j},server_data_node:He(S===void 0&&y[0]?{type:"skip"}:S??null,y[0]?A?.server:void 0)})});for(const y of m)y.catch(N);const P=[];for(let y=0;y<f.length;y+=1)if(f[y])try{P.push(await m[y])}catch(v){if(v instanceof xe)return{type:"redirect",location:v.location};if(a&&J.has(a))return et({error:await M(v,{params:n,url:r,route:{id:i.id}}),url:r,params:n,route:i});let A=ie(v),S;if(w?.includes(v))A=v.status??A,S=v.error;else if(v instanceof te)S=v.body;else{if(await D.updated.check())return await it(),await K(r);S=await M(v,{params:n,url:r,route:{id:i.id}})}const b=await yr(y,P,o);return b?pe({url:r,params:n,branch:P.slice(0,b.idx).concat(b.node),errors:o,status:A,error:S,route:i}):await pt(r,{id:i.id},S,A)}else P.push(void 0);return pe({url:r,params:n,branch:P,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function yr(e,t,r){for(;e--;)if(r[e]){let n=e;for(;!t[n];)n-=1;try{return{idx:n+1,node:{node:await r[e](),loader:r[e],data:{},server:null,universal:null}}}catch{continue}}}async function ye({status:e,error:t,url:r,route:n}){const i={};let a=null;if(E.server_loads[0]===0)try{const s=await _t(r,[!0]);if(s.type!=="data"||s.nodes[0]&&s.nodes[0].type!=="data")throw 0;a=s.nodes[0]??null}catch(s){if(!(s instanceof te&&s.status===404)&&(r.origin!==Ne||r.pathname!==location.pathname||Fe))return await K(r)}try{const o=await qe({loader:Pe,url:r,params:i,route:n,parent:()=>Promise.resolve({}),server_data_node:He(a)}),s={node:await ce(),loader:ce,universal:null,server:null,data:null};return pe({url:r,params:i,branch:[o,s],status:e,error:t,errors:[],route:null})}catch(o){if(o instanceof xe){await Ve(new URL(o.location,location.href),{},0);return}const s=await E.get_error_template(),c=await M(o,{url:r,params:i,route:n}),f=String(c?.message??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),l=s({status:e,message:f}),d=new DOMParser().parseFromString(l,"text/html");throw document.documentElement.replaceChild(document.adoptNode(d.head),document.head),document.documentElement.replaceChild(document.adoptNode(d.body),document.body),o}}async function wr(e){const t=e.href;if(ae.has(t))return ae.get(t);let r;try{const n=(async()=>{let i=await E.hooks.reroute({url:new URL(e),fetch:async(a,o)=>mr(a,o,e).promise})??e;if(typeof i=="string"){const a=new URL(e);E.hash?a.hash=i:a.pathname=i,i=a}return i})();ae.set(t,n),r=await n}catch{ae.delete(t);return}return r}async function ne(e,t){if(e&&!je(e,T,E.hash)){const r=await wr(e);if(!r)return;const n=vr(r);for(const i of Me){const a=i.exec(n);if(a)return{id:_e(e),invalidating:t,route:i,params:wt(a),url:e}}}}function vr(e){return At(E.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(T.length))||"/"}function _e(e){return(E.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ht({url:e,type:t,intent:r,delta:n,event:i,scroll:a}){let o=!1;const s=Ge(g,r,e,t,a??null);n!==void 0&&(s.navigation.delta=n),i!==void 0&&(s.navigation.event=i);const c={...s.navigation,cancel:()=>{o=!0,s.reject(new Error("navigation cancelled"))}};return ee||$e.forEach(f=>f(c)),o?null:s}async function H({type:e,url:t,popped:r,keepfocus:n,noscroll:i,replace_state:a,state:o={},redirect_count:s=0,nav_token:c={},accept:f=N,block:l=N,event:d}){const p=U;U=c;const u=await ne(t,!1),h=e==="enter"?Ge(g,u,t,e):ht({url:t,type:e,delta:r?.delta,intent:u,scroll:r?.scroll,event:d});if(!h){l(),U===c&&(U=p);return}const w=k,_=R;f(),ee=!0,ue&&h.navigation.type!=="enter"&&D.navigating.set(Se.current=h.navigation);let m=u&&await Ye(u);if(!m){if(je(t,T,E.hash))return await K(t,a);m=await pt(t,{id:null},await M(new Ce(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,a)}if(t=u?.url||t,U!==c){h.reject(new Error("navigation aborted"));return}if(!m)return;if(m.type==="redirect"){if(s<20){await H({type:e,url:new URL(m.location,t),popped:r,keepfocus:n,noscroll:i,replace_state:a,state:o,redirect_count:s+1,nav_token:c}),h.fulfil(void 0);return}if(m=await ye({status:500,error:await M(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}}),!m)return}else if(m.props.page.status>=400&&await D.updated.check())return await it(),await K(t,a);if(Te(),Be(w),ft(_),m.props.page.url.pathname!==t.pathname&&(t.pathname=m.props.page.url.pathname),o=r?r.state:o,!r){const b=a?0:1,j={[B]:k+=b,[Y]:R+=b,[Oe]:o};(a?history.replaceState:history.pushState).call(history,j,"",t),a||hr(k,R)}const P=u&&L?.id===u.id?L.fork:null;L?.fork&&!P?Q():(L=null,V={element:void 0,href:void 0}),m.props.page.state=o;let y;if(ue){const b=(await Promise.all(Array.from(ct,G=>G(h.navigation)))).filter(G=>typeof G=="function");if(b.length>0){let G=function(){b.forEach(ve=>{q.delete(ve)})};b.push(G),b.forEach(ve=>{q.add(ve)})}const j=h.navigation.to;g={...m.state,nav:{params:j.params,route:j.route,url:j.url}},m.props.page&&(m.props.page.url=t),!n&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();const C=P&&await P;C?y=C.commit():(z=null,ge.$set(m.props),z&&Object.assign(m.props.page,z),De(m.props.page),y=It?.()),lt=!0}else await dt(m,Le,!1);const{activeElement:v}=document;if(await y,await se(),await se(),U!==c){h.reject(new Error("navigation aborted"));return}m.props.page&&z&&Object.assign(m.props.page,z);let A=null;if(Je){const b=r?r.scroll:i?$():null;b?scrollTo(b.x,b.y):(A=t.hash&&document.getElementById(gt(t)))?A.scrollIntoView():scrollTo(0,0)}const S=document.activeElement!==v&&document.activeElement!==document.body;!n&&!S&&Ir(t,!A),Je=!0,ee=!1,h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=$()),q.forEach(b=>b(h.navigation)),e==="popstate"&&ut(R),D.navigating.set(Se.current=null)}async function pt(e,t,r,n,i){return e.origin===Ne&&e.pathname===location.pathname&&!Fe?await ye({status:n,error:r,url:e,route:t}):await K(e,i)}let V={element:void 0,href:void 0};function br(){let e,t;O.addEventListener("mousemove",o=>{const s=o.target;clearTimeout(e),e=setTimeout(()=>{i(s,X.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],X.tap)}O.addEventListener("mousedown",r),O.addEventListener("touchstart",r,{passive:!0});const n=new IntersectionObserver(o=>{for(const s of o)s.isIntersecting&&(ke(new URL(s.target.href)),n.unobserve(s.target))},{threshold:0});async function i(o,s){const c=tt(o,O),f=c===V.element&&c?.href===V.href&&s>=t;if(!c||f)return;const{url:l,external:d,download:p}=Ie(c,T,E.hash);if(d||p)return;const u=oe(c),h=l&&_e(g.url)===_e(l);if(!(u.reload||h))if(s<=u.preload_data){V={element:c,href:c.href},t=X.tap;const w=await ne(l,!1);if(!w)return;_r(w)}else s<=u.preload_code&&(V={element:c,href:c.href},t=s,ke(l))}function a(){n.disconnect();for(const o of O.querySelectorAll("a")){const{url:s,external:c,download:f}=Ie(o,T,E.hash);if(c||f)continue;const l=oe(o);l.reload||(l.preload_code===X.viewport&&n.observe(o),l.preload_code===X.eager&&ke(s))}}q.add(a),a()}function M(e,t){if(e instanceof te)return e.body;const r=ie(e),n=ar(e);return E.hooks.handleError({error:e,event:t,status:r,message:n})??{message:n}}function Ke(e,t){fr(()=>(e.add(t),()=>{e.delete(t)}))}function jr(e){Ke(q,e)}function Or(e){Ke($e,e)}function Nr(e){Ke(ct,e)}function Dr(e,t={}){return e=new URL(me(e)),e.origin!==Ne?Promise.reject(new Error("goto: invalid URL")):Ve(e,t,0)}function Er(e){if(typeof e=="function")le.push(e);else{const{href:t}=new URL(e,location.href);le.push(r=>r.href===t)}}function xr(){return re=!0,pr()}function Cr(e,t){const r={[B]:k,[Y]:R,[rt]:I.url.href,[Oe]:t};history.replaceState(r,"",me(e)),I.state=t,ge.$set({page:ur(()=>we(I))})}function Ar(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let r=!1;if(Ze(),!ee){const n=Ge(g,void 0,null,"leave"),i={...n.navigation,cancel:()=>{r=!0,n.reject(new Error("navigation cancelled"))}};$e.forEach(a=>a(i))}r?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ze()}),navigator.connection?.saveData||br(),O.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const r=tt(t.composedPath()[0],O);if(!r)return;const{url:n,external:i,target:a,download:o}=Ie(r,T,E.hash);if(!n)return;if(a==="_parent"||a==="_top"){if(window.parent!==window)return}else if(a&&a!=="_self")return;const s=oe(r);if(!(r instanceof SVGAElement)&&n.protocol!==location.protocol&&!(n.protocol==="https:"||n.protocol==="http:")||o)return;const[f,l]=(E.hash?n.hash.replace(/^#/,""):n.href).split("#"),d=f===be(location);if(i||s.reload&&(!d||!l)){ht({url:n,type:"link",event:t})?ee=!0:t.preventDefault();return}if(l!==void 0&&d){const[,p]=g.url.href.split("#");if(p===l){if(t.preventDefault(),l===""||l==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=r.ownerDocument.getElementById(decodeURIComponent(l));u&&(u.scrollIntoView(),u.focus())}return}if(W=!0,Be(k),e(n),!s.replace_state)return;W=!1}t.preventDefault(),await new Promise(p=>{requestAnimationFrame(()=>{setTimeout(p,0)}),setTimeout(p,100)}),await H({type:"link",url:n,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??n.href===location.href,event:t})}),O.addEventListener("submit",t=>{if(t.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(t.target),n=t.submitter;if((n?.formTarget||r.target)==="_blank"||(n?.formMethod||r.method)!=="get")return;const o=new URL(n?.hasAttribute("formaction")&&n?.formAction||r.action);if(je(o,T,!1))return;const s=t.target,c=oe(s);if(c.reload)return;t.preventDefault(),t.stopPropagation();const f=new FormData(s,n);o.search=new URLSearchParams(f).toString(),H({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!Ue){if(t.state?.[B]){const r=t.state[B];if(U={},r===k)return;const n=x[r],i=t.state[Oe]??{},a=new URL(t.state[rt]??location.href),o=t.state[Y],s=g.url?be(location)===be(g.url):!1;if(o===R&&(lt||s)){i!==I.state&&(I.state=i),e(a),x[k]=$(),n&&scrollTo(n.x,n.y),k=r;return}const f=r-k;await H({type:"popstate",url:a,popped:{state:i,scroll:n,delta:f},accept:()=>{k=r,R=o},block:()=>{history.go(-f)},nav_token:U,event:t})}else if(!W){const r=new URL(location.href);e(r),E.hash&&location.reload()}}}),addEventListener("hashchange",()=>{W&&(W=!1,history.replaceState({...history.state,[B]:++k,[Y]:R},"",location.href))});for(const t of document.querySelectorAll("link"))dr.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&D.navigating.set(Se.current=null)});function e(t){g.url=I.url=t,D.page.set(we(I)),D.page.notify()}}async function kr(e,{status:t=200,error:r,node_ids:n,params:i,route:a,server_route:o,data:s,form:c}){Fe=!0;const f=new URL(location.href);let l;({params:i={},route:a={id:null}}=await ne(f,!1)||{}),l=Me.find(({id:u})=>u===a.id);let d,p=!0;try{const u=n.map(async(w,_)=>{const m=s[_];return m?.uses&&(m.uses=mt(m.uses)),qe({loader:E.nodes[w],url:f,params:i,route:a,parent:async()=>{const P={};for(let y=0;y<_;y+=1)Object.assign(P,(await u[y]).data);return P},server_data_node:He(m)})}),h=await Promise.all(u);if(l){const w=l.layouts;for(let _=0;_<w.length;_++)w[_]||h.splice(_,0,void 0)}d=await pe({url:f,params:i,branch:h,status:t,error:r,errors:l?.errors,form:c,route:l??null})}catch(u){if(u instanceof xe)return await K(new URL(u.location,location.href));d=await ye({status:ie(u),error:await M(u,{url:f,params:i,route:a}),url:f,route:a}),e.textContent="",p=!1}d&&(d.props.page&&(d.props.page.state={}),await dt(d,e,p))}async function _t(e,t){const r=new URL(e);r.pathname=ir(e.pathname),e.pathname.endsWith("/")&&r.searchParams.append(nr,"1"),r.searchParams.append(rr,t.map(a=>a?"1":"0").join(""));const n=window.fetch,i=await n(r.href,{});if(!i.ok){let a;throw i.headers.get("content-type")?.includes("application/json")?a=await i.json():i.status===404?a="Not Found":i.status===500&&(a="Internal Error"),new te(i.status,a)}return new Promise((a,o)=>{Sr(a,i).catch(o)})}async function Sr(e,t){const r=t.body.getReader(),n=new Map;function i(a){return er(a,{...E.decoders,Promise:o=>new Promise((s,c)=>{n.set(o,{fulfil:s,reject:c})})})}for await(const a of lr(r)){if(a.type==="redirect")return e(a);if(a.type==="data")a.nodes?.forEach(o=>{o?.type==="data"&&(o.uses=mt(o.uses),o.data=i(o.data))}),e(a);else if(a.type==="chunk"){const{id:o,data:s,error:c}=a,f=n.get(o);n.delete(o),c?f.reject(i(c)):f.fulfil(i(s))}}}function mt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Ue=!1;function Ir(e,t=!0){const r=document.querySelector("[autofocus]");if(r)r.focus();else{const n=gt(e);if(n&&document.getElementById(n)){const{x:a,y:o}=$();setTimeout(()=>{const s=history.state;Ue=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(s,"",e),t&&scrollTo(a,o),Ue=!1})}else{const a=document.body,o=a.getAttribute("tabindex");a.tabIndex=-1,a.focus({preventScroll:!0,focusVisible:!1}),o!==null?a.setAttribute("tabindex",o):a.removeAttribute("tabindex")}const i=getSelection();if(i&&i.type!=="None"){const a=[];for(let o=0;o<i.rangeCount;o+=1)a.push(i.getRangeAt(o));setTimeout(()=>{if(i.rangeCount===a.length){for(let o=0;o<i.rangeCount;o+=1){const s=a[o],c=i.getRangeAt(o);if(s.commonAncestorContainer!==c.commonAncestorContainer||s.startContainer!==c.startContainer||s.endContainer!==c.endContainer||s.startOffset!==c.startOffset||s.endOffset!==c.endOffset)return}i.removeAllRanges()}})}}}function Ge(e,t,r,n,i=null){let a,o;const s=new Promise((f,l)=>{a=f,o=l});return s.catch(N),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:$()},to:r&&{params:t?.params??null,route:{id:t?.route?.id??null},url:r,scroll:i},willUnload:!t,type:n,complete:s},fulfil:a,reject:o}}function we(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Rr(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function gt(e){let t;if(E.hash){const[,,r]=e.hash.split("#",3);t=r??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{jr as a,Or as b,Dr as g,xr as i,Nr as o,Cr as r,Ur as s};