dorkos 0.120.0 → 0.121.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 (307) hide show
  1. package/dist/bin/cli.js +118 -22
  2. package/dist/browser/native/package-manifest.json +1 -1
  3. package/dist/browser/source-manifest.json +1 -1
  4. package/dist/client/assets/{AboutPage-Y8O56Cz5.js → AboutPage-CtI8gbER.js} +1 -1
  5. package/dist/client/assets/{ActivityErrorState-DlROxqde.js → ActivityErrorState-CHTXfBS7.js} +1 -1
  6. package/dist/client/assets/{ActivityPage-BdV90CV2.js → ActivityPage-B8p4yYJL.js} +1 -1
  7. package/dist/client/assets/{ActivityRow-B5yiD_uD.js → ActivityRow-CSuSz-92.js} +1 -1
  8. package/dist/client/assets/{AdapterIcon-Dyq92Eup.js → AdapterIcon-Qnxn0cE5.js} +1 -1
  9. package/dist/client/assets/{AdapterSetupWizard-D9tqz7Hl.js → AdapterSetupWizard-BG8H-Lld.js} +1 -1
  10. package/dist/client/assets/{AgentOptionRow-BeRqDo7c.js → AgentOptionRow-BWFQFynn.js} +1 -1
  11. package/dist/client/assets/{AgentPicker-BRyYVJZu.js → AgentPicker-CL93SET3.js} +1 -1
  12. package/dist/client/assets/{AgentRequestCard-xX6fAKgO.js → AgentRequestCard-CamX7Tvr.js} +4 -4
  13. package/dist/client/assets/{AppearancePage-DKF9BqRt.js → AppearancePage-rN70_7ih.js} +1 -1
  14. package/dist/client/assets/{ApplyToOverridesDialog-CPvtr_-f.js → ApplyToOverridesDialog-DeWaXbgm.js} +1 -1
  15. package/dist/client/assets/{AttentionSignalRow-vBfioH1A.js → AttentionSignalRow-CKcSWExi.js} +1 -1
  16. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-B50zNtwB.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-BwYaLf2P.js} +1 -1
  17. package/dist/client/assets/{BindingDialog-CSNjws3F.js → BindingDialog-DqPDLYbF.js} +1 -1
  18. package/dist/client/assets/BlintzCanvas-DoAZs5bz.js +1231 -0
  19. package/dist/client/assets/{BlintzCanvas-GgiCXV7C.css → BlintzCanvas-xZ3u3nk7.css} +1 -1
  20. package/dist/client/assets/{CanvasCsvContent-0Mb7uOuA.js → CanvasCsvContent-ViqRJuhW.js} +1 -1
  21. package/dist/client/assets/CanvasFileContent-ClcHZ_l-.js +2 -0
  22. package/dist/client/assets/{CanvasModel3dContent-UokbHY9i.js → CanvasModel3dContent-Cm3msNdQ.js} +2 -2
  23. package/dist/client/assets/{ChatAppsOff-CLRB0YU5.js → ChatAppsOff-D0PbHYqF.js} +1 -1
  24. package/dist/client/assets/{CodeMirrorDiff-B4uFJD6g.js → CodeMirrorDiff-DFNSXeuV.js} +1 -1
  25. package/dist/client/assets/{CodeMirrorEditor-rYOrBAZc.js → CodeMirrorEditor-AgkgsSqN.js} +1 -1
  26. package/dist/client/assets/{CommitmentList-i-IZ4gbr.js → CommitmentList-0V6QivXH.js} +1 -1
  27. package/dist/client/assets/{CommitmentsPage-ChO1JkrE.js → CommitmentsPage-i3XoHwBj.js} +1 -1
  28. package/dist/client/assets/{ComputerResourceView-pLuD2ie6.js → ComputerResourceView-RPoBc-km.js} +1 -1
  29. package/dist/client/assets/{ComputerViewer-D7tPmpY5.js → ComputerViewer-2ugaCd0H.js} +1 -1
  30. package/dist/client/assets/{ConnectionAccessLists-D6VH1vX3.js → ConnectionAccessLists-DaPP4U96.js} +1 -1
  31. package/dist/client/assets/{ConnectionsPage-7x5olD9q.js → ConnectionsPage-BVqYvfk5.js} +2 -2
  32. package/dist/client/assets/{ConventionPage-BTYLWw6p.js → ConventionPage-BoqncrFd.js} +1 -1
  33. package/dist/client/assets/{ExtensionPageRoute-A9AdBBbw.js → ExtensionPageRoute-BrOEeNX3.js} +2 -2
  34. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-ayv0yz1C.js → FloatingTanStackRouterDevtools-CqogiFob-DLwix3K7.js} +1 -1
  35. package/dist/client/assets/HandlePage-B_5GLHsp.js +1 -0
  36. package/dist/client/assets/{HeartbeatPage-Dh6W9Qg5.js → HeartbeatPage-DgXhbaBJ.js} +1 -1
  37. package/dist/client/assets/{KeyEntry-owhPGtw3.js → KeyEntry-CRr32Ae5.js} +1 -1
  38. package/dist/client/assets/{LexicalField-B1NFMLD6.js → LexicalField-DeAoA6yr.js} +1 -1
  39. package/dist/client/assets/{ManagesPage-BAnBmBdo.js → ManagesPage-ZBWYLTZx.js} +1 -1
  40. package/dist/client/assets/{Marketplace-67maxdwz.js → Marketplace-iL5p8Omt.js} +4 -4
  41. package/dist/client/assets/{MarketplaceSourcesView-CzPBNJJj.js → MarketplaceSourcesView-CsNLVOdP.js} +1 -1
  42. package/dist/client/assets/{McpAppFrame-CuObpQTg.js → McpAppFrame-B1WPswgk.js} +1 -1
  43. package/dist/client/assets/{McpSigninBody-B-ayj6bQ.js → McpSigninBody-CJ28yu0o.js} +1 -1
  44. package/dist/client/assets/{Model3dViewer-DRVqxazk.js → Model3dViewer-BIZWdK8g.js} +1 -1
  45. package/dist/client/assets/NamePage-0nr288eM.js +1 -0
  46. package/dist/client/assets/{NewDirectMessageMenu-B3DxayR2.js → NewDirectMessageMenu-DRx9e9kM.js} +1 -1
  47. package/dist/client/assets/{NotificationsPage-BavEo7VZ.js → NotificationsPage-cfqgSuVy.js} +1 -1
  48. package/dist/client/assets/{OpenMeshSwitch-BwkX2Toa.js → OpenMeshSwitch-BIIuKDku.js} +1 -1
  49. package/dist/client/assets/{OperatorIdentityForm-CtWgz2yi.js → OperatorIdentityForm-BKUSGrs6.js} +1 -1
  50. package/dist/client/assets/{PermissionHistory-DvM0F2bS.js → PermissionHistory-Ctdqhib6.js} +1 -1
  51. package/dist/client/assets/{PermissionsPage-D1DJHezV.js → PermissionsPage-CYA_zdrV.js} +1 -1
  52. package/dist/client/assets/{PersonalityPopover-BV-9wfIl.js → PersonalityPopover-BR4Cpr2C.js} +1 -1
  53. package/dist/client/assets/PhotoPage-C3Ir3wlA.js +1 -0
  54. package/dist/client/assets/{PresetPicker-BOQKgYAK.js → PresetPicker-zGvDOqTf.js} +2 -2
  55. package/dist/client/assets/{PreviewRefusedNotice-BdhUln2h.js → PreviewRefusedNotice-D1Tl265t.js} +1 -1
  56. package/dist/client/assets/{ProfileFields-DFRnRR38.js → ProfileFields-T3vVbHRC.js} +1 -1
  57. package/dist/client/assets/{ProfilePanelContainer-CkxX9Dps.js → ProfilePanelContainer-CParzTPA.js} +1 -1
  58. package/dist/client/assets/{ProfileRolePicker-BSYi_luB.js → ProfileRolePicker-BU4eiMKn.js} +1 -1
  59. package/dist/client/assets/{PromptSuggestionChips-r08GqBH1.js → PromptSuggestionChips-CGNQc2Tf.js} +1 -1
  60. package/dist/client/assets/{ReportsToPopover-BcsM5Eia.js → ReportsToPopover-Dj5U_Ppi.js} +1 -1
  61. package/dist/client/assets/{RoomSurface-DaRCf4og.js → RoomSurface-BIyjtxKD.js} +7 -7
  62. package/dist/client/assets/{RoomsPage-CQqsdVvB.js → RoomsPage-Cvs3h6f0.js} +1 -1
  63. package/dist/client/assets/{RunsOnPopover-DFb4xEhP.js → RunsOnPopover-BUlYwRW4.js} +1 -1
  64. package/dist/client/assets/{RuntimeConnectFlow-pKFJlNSJ.js → RuntimeConnectFlow-ChrvjC84.js} +1 -1
  65. package/dist/client/assets/{RuntimeSetupDialog-DvBJbrmj.js → RuntimeSetupDialog-BK9yo7YF.js} +1 -1
  66. package/dist/client/assets/{SessionsPage-CGgnEPh7.js → SessionsPage-CWUwU3US.js} +1 -1
  67. package/dist/client/assets/{SettingsDialog-D0cmzjrH.js → SettingsDialog-BApzy0J8.js} +3 -3
  68. package/dist/client/assets/{SkillsPage-DDoPlsn2.js → SkillsPage-z3XnApNX.js} +1 -1
  69. package/dist/client/assets/{TaskDialogWrapper-DoIVzbKU.js → TaskDialogWrapper-BEWUpAlk.js} +1 -1
  70. package/dist/client/assets/{TasksEmptyState-B68O6dnT.js → TasksEmptyState-CLwpLnIO.js} +2 -2
  71. package/dist/client/assets/{TasksPage-BsBDphim.js → TasksPage-CyHjr9OZ.js} +1 -1
  72. package/dist/client/assets/{TeamComputerEntry-CoQ4EsDm.js → TeamComputerEntry-BHHIofx3.js} +1 -1
  73. package/dist/client/assets/{ToolsPage-Cl1aOpev.js → ToolsPage-CckCco8x.js} +1 -1
  74. package/dist/client/assets/TopologyGraph-Dox7aWP3.js +30 -0
  75. package/dist/client/assets/{TourHost-4O6TJzc-.js → TourHost-CTBewD-a.js} +1 -1
  76. package/dist/client/assets/{UnlinkDialog-DIMY60Fi.js → UnlinkDialog-CFRgExId.js} +1 -1
  77. package/dist/client/assets/{WidgetErrorCard-CzWw_SPD.js → WidgetErrorCard-Dx5oPMlF.js} +23 -23
  78. package/dist/client/assets/_commonjs-dynamic-modules-TDtrdbi3.js +1 -0
  79. package/dist/client/assets/{_shell-BRH2Y-U-.js → _shell-BHUZq_8C.js} +1 -1
  80. package/dist/client/assets/{_shell._home-DG3Vw7S5.js → _shell._home-DnBkgWs4.js} +1 -1
  81. package/dist/client/assets/{_shell._home.activity-COI96oAO.js → _shell._home.activity-CVCC-EEI.js} +1 -1
  82. package/dist/client/assets/{_shell._home.index-CTwsTjcQ.js → _shell._home.index-Ck6jxwIx.js} +1 -1
  83. package/dist/client/assets/{_shell._home.tasks-DOVoPYaf.js → _shell._home.tasks-B7QQAZnA.js} +1 -1
  84. package/dist/client/assets/{_shell._home.workspaces-ApZhnjwy.js → _shell._home.workspaces-DlrRd9tv.js} +1 -1
  85. package/dist/client/assets/{_shell.channels-CRkJHU5R.js → _shell.channels-CiWehoyl.js} +4 -4
  86. package/dist/client/assets/{_shell.connections-bhAK3jnE.js → _shell.connections-CGP5hZHq.js} +1 -1
  87. package/dist/client/assets/{_shell.feedback-requests-k43R8-rW.js → _shell.feedback-requests-BxxNvw6j.js} +1 -1
  88. package/dist/client/assets/_shell.marketplace-BoAmyvPt.js +1 -0
  89. package/dist/client/assets/_shell.marketplace_.sources-BpqWjkGL.js +1 -0
  90. package/dist/client/assets/{_shell.session-D871zZl3.js → _shell.session-KyPj3OxK.js} +17 -17
  91. package/dist/client/assets/{_shell.team-DHCM1QoO.js → _shell.team-CsXH3NkS.js} +4 -4
  92. package/dist/client/assets/_shell.x._extensionId-CfiAgtoq.js +1 -0
  93. package/dist/client/assets/_shell.x._extensionId_._-CfiAgtoq.js +1 -0
  94. package/dist/client/assets/abnfDiagram-WEYOIA3C-CMdkyiQ3.js +1 -0
  95. package/dist/client/assets/{access-copy-BVzi1REx.js → access-copy-CW-z1oMH.js} +1 -1
  96. package/dist/client/assets/arc-Bw7tftQk.js +1 -0
  97. package/dist/client/assets/architectureDiagram-ZHVYKT53-BhpXALtX.js +36 -0
  98. package/dist/client/assets/{banner-3xXXsU5J.js → banner-EomQNDOH.js} +1 -1
  99. package/dist/client/assets/blockDiagram-RJAE7QA3-Bxk_BuZv.js +140 -0
  100. package/dist/client/assets/c4Diagram-XDPPPE54-CYN0FwR8.js +38 -0
  101. package/dist/client/assets/{card-Bt6IU-Bh.js → card-ww4ebz8h.js} +1 -1
  102. package/dist/client/assets/channel-DZpRF3QJ.js +1 -0
  103. package/dist/client/assets/chunk-2E7WHVMD-IPDvYcPa.js +88 -0
  104. package/dist/client/assets/chunk-2Q5K7J3B-DZ5bU5Ax.js +1 -0
  105. package/dist/client/assets/chunk-4EMNKR2T-DrsWxa6Y.js +1 -0
  106. package/dist/client/assets/chunk-55XCU76K-CiBbKG0b.js +1 -0
  107. package/dist/client/assets/chunk-5VM5RSS4-B3K3MUav.js +15 -0
  108. package/dist/client/assets/chunk-JWPE2WC7-CjV5RcIh.js +1 -0
  109. package/dist/client/assets/chunk-VQ5W62QI-CWoRr0H2.js +1 -0
  110. package/dist/client/assets/chunk-XXDRQBXY-E0nvzXiG.js +1 -0
  111. package/dist/client/assets/chunk-ZCHMQSOR-DFop6Lvt.js +2 -0
  112. package/dist/client/assets/classDiagram-v2-4MYWR3UA-B7JJfc9z.js +217 -0
  113. package/dist/client/assets/{command-CWokzKS1.js → command-D4fLpJxA.js} +1 -1
  114. package/dist/client/assets/cose-bilkent-JH36ORCC-BjNppl29.js +1 -0
  115. package/dist/client/assets/{cpu-BzByzE9V.js → cpu-DCe0Yyml.js} +1 -1
  116. package/dist/client/assets/cynefin-EF2NZ3EQ-PmRntJwW.js +141 -0
  117. package/dist/client/assets/cynefinDiagram-WF24UDRP-Ctdbp_Vg.js +62 -0
  118. package/dist/client/assets/cytoscape.esm-BLAcgzS2.js +331 -0
  119. package/dist/client/assets/dagre-NK4GIZVX-5tvLY2ZW.js +4 -0
  120. package/dist/client/assets/defaultLocale-DX6XiGOO.js +1 -0
  121. package/dist/client/assets/diagram-CBK3MWTC-DZO-XBOO.js +24 -0
  122. package/dist/client/assets/diagram-I5XIIV2D-CWBbA1Pv.js +24 -0
  123. package/dist/client/assets/diagram-ODIL2UCW-hP5A1tGl.js +30 -0
  124. package/dist/client/assets/diagram-PFBEJUXE-EI_-RoN7.js +3 -0
  125. package/dist/client/assets/diagram-RJA3I4VV-TrYq9A4Z.js +41 -0
  126. package/dist/client/assets/diagram-TYUNFSNR-BAQq2OM5.js +200 -0
  127. package/dist/client/assets/ebnfDiagram-V4P3TTPT-cKbeW9dQ.js +1 -0
  128. package/dist/client/assets/elk-QONTBCTQ-wpfNPp0q.js +27 -0
  129. package/dist/client/assets/{empty-state-BgnQDiMZ.js → empty-state-DXWQsHMf.js} +1 -1
  130. package/dist/client/assets/erDiagram-KYQIGQAA-Dk0OrvjE.js +99 -0
  131. package/dist/client/assets/{execution-config-D5-SEt2t.js → execution-config-CAyT2Qoo.js} +1 -1
  132. package/dist/client/assets/{file-VHDTQub2.js → file-Bf7D_47y.js} +1 -1
  133. package/dist/client/assets/{file-exclamation-point-DbWvGys0.js → file-exclamation-point-DZXE9_8o.js} +1 -1
  134. package/dist/client/assets/{file-text-BAhi2zct.js → file-text-C1ougnBY.js} +1 -1
  135. package/dist/client/assets/{find-latest-widget-fence-Z0HPVqeK.js → find-latest-widget-fence-B1_-pC-Z.js} +1 -1
  136. package/dist/client/assets/flowDiagram-IUGLLWBU-CdlOoRZV.js +213 -0
  137. package/dist/client/assets/{form-Blrb1xBU.js → form-D7kF-U0d.js} +1 -1
  138. package/dist/client/assets/{format-cron-lKWqEmle.js → format-cron-ZtliseYi.js} +1 -1
  139. package/dist/client/assets/ganttDiagram-R7GPNTJY-x0MJLv5d.js +292 -0
  140. package/dist/client/assets/{git-branch-BObm8Rlz.js → git-branch-B2k77X3Q.js} +1 -1
  141. package/dist/client/assets/gitGraphDiagram-PDYL7XHY-CruCvk7w.js +106 -0
  142. package/dist/client/assets/graph-5PBe05F8.js +1 -0
  143. package/dist/client/assets/{heart-Du7nuefC.js → heart-CmqGJPDc.js} +1 -1
  144. package/dist/client/assets/{highlighted-body-KPVGNVTW-B_GO7V1P.js → highlighted-body-KPVGNVTW-Bqu2cQDj.js} +1 -1
  145. package/dist/client/assets/{image-lightbox-BZ1TV3mN.js → image-lightbox-BBbz-ThL.js} +1 -1
  146. package/dist/client/assets/{image-off-hnjcBIzN.js → image-off-BCtWIY4q.js} +1 -1
  147. package/dist/client/assets/{index-Ch-ON5gw.js → index-1ShgR_xt.js} +1 -1
  148. package/dist/client/assets/{index-DoMJUxt_.js → index-8IAr9b71.js} +1 -1
  149. package/dist/client/assets/{index-EZHlD3gf.js → index-8TfzCkKR.js} +1 -1
  150. package/dist/client/assets/{index-B0tAedq7.js → index-B5rRtvWx.js} +1 -1
  151. package/dist/client/assets/index-B6dEbNhI.js +1 -0
  152. package/dist/client/assets/{index-WxtASL5_.js → index-BCk4wW-T.js} +1 -1
  153. package/dist/client/assets/{index-Ci74HAFs.js → index-BIIH5CXj.js} +1 -1
  154. package/dist/client/assets/{index-CiQxS4Bn.js → index-BXMxoWrk.js} +1 -1
  155. package/dist/client/assets/index-BXZlDqvy.js +74 -0
  156. package/dist/client/assets/{index-Bm0z9mHt.js → index-BfRW2WTx.js} +1 -1
  157. package/dist/client/assets/{index-CCg7yRe1.js → index-BpmmNapD.js} +1 -1
  158. package/dist/client/assets/{index-r_O6CmXY.js → index-BrQGZ6iF.js} +1 -1
  159. package/dist/client/assets/{index-Df7a-2P5.js → index-BuGQxHrf.js} +1 -1
  160. package/dist/client/assets/{index-BP68J4pb.js → index-BzPgsdPn.js} +1 -1
  161. package/dist/client/assets/{index-CqoIjNC2.js → index-C11Ssk2u.js} +2 -2
  162. package/dist/client/assets/{index-BnNTKsbt.js → index-CJ5v2_Cz.js} +1 -1
  163. package/dist/client/assets/{index-4PAAWURd.js → index-CMNc_OrC.js} +1 -1
  164. package/dist/client/assets/{index-BvjuGXcS.js → index-CQ0VLZf-.js} +1 -1
  165. package/dist/client/assets/{index-BaRQVgiN.js → index-ChwNEkM8.js} +1 -1
  166. package/dist/client/assets/index-Cl8trmnL.js +1 -0
  167. package/dist/client/assets/{index-1I8qHZDt.js → index-ClBIPuLA.js} +1 -1
  168. package/dist/client/assets/{index-D6y4WeTi.js → index-Cml5572f.js} +1 -1
  169. package/dist/client/assets/{index-DHYvT3nr.js → index-Cp3yShS8.js} +6 -6
  170. package/dist/client/assets/{index-DB8TDRSm.js → index-CtycM8wY.js} +1 -1
  171. package/dist/client/assets/{index-aXm0xP_2.js → index-Cv0GsC4n.js} +1 -1
  172. package/dist/client/assets/{index-ox3ce99A.js → index-DAdo_yIq.js} +1 -1
  173. package/dist/client/assets/{index-HxT_wkaZ.js → index-DIxzqCwG.js} +1 -1
  174. package/dist/client/assets/{index-Cdyszxoa.js → index-DKDK-3KH.js} +5 -5
  175. package/dist/client/assets/index-DPNBHwcQ.js +1 -0
  176. package/dist/client/assets/{index-BgzgdvDn.js → index-DbDI5BAA.js} +1 -1
  177. package/dist/client/assets/{index-Dc5cpBoO.js → index-DcZPWi_I.js} +248 -248
  178. package/dist/client/assets/{index-CBm3whA-.js → index-Dmn03xST.js} +1 -1
  179. package/dist/client/assets/{index-BeVbHOwX.js → index-Do6eeFps.js} +2 -2
  180. package/dist/client/assets/{index-BtbZpz4b.js → index-DrA03bMq.js} +1 -1
  181. package/dist/client/assets/{index-D5TZCu8j.js → index-DsJWzmWw.js} +1 -1
  182. package/dist/client/assets/{index-DRea_Gi0.js → index-EdJm7ZN-.js} +1 -1
  183. package/dist/client/assets/{index-CQCN6kWR.js → index-JxeBJIuE.js} +1 -1
  184. package/dist/client/assets/{index-BUOcbPfv.js → index-mFOJXyAE.js} +3 -3
  185. package/dist/client/assets/{index-BVKXIbLh.js → index-rWZWP3Wh.js} +1 -1
  186. package/dist/client/assets/{index-DkhM0fDi.js → index-t4Ud6YTX.js} +1 -1
  187. package/dist/client/assets/{index-Lh82Rz5C.js → index-xaMF1mrN.js} +1 -1
  188. package/dist/client/assets/{index-C60RrnTd.js → index-xmk9Ohv9.js} +1 -1
  189. package/dist/client/assets/{index-4GC2fkeO.js → index-yI1r4pSP.js} +1 -1
  190. package/dist/client/assets/{index.esm-DXsF3Bua.js → index.esm-CZZtbPRj.js} +1 -1
  191. package/dist/client/assets/infoDiagram-MVDRKAX5-Bj9DD77n.js +2 -0
  192. package/dist/client/assets/init-Gi6I4Gst.js +1 -0
  193. package/dist/client/assets/{inline-code-DAEoWvTf.js → inline-code-g9PVHZI2.js} +1 -1
  194. package/dist/client/assets/ishikawaDiagram-HPEHV2GE-DckI6dhS.js +70 -0
  195. package/dist/client/assets/journeyDiagram-BOSHW7O7-Ce1GAVa0.js +139 -0
  196. package/dist/client/assets/kanban-definition-FNSA4HC5-Kq5O9rZa.js +89 -0
  197. package/dist/client/assets/katex-DLorvT8M.js +257 -0
  198. package/dist/client/assets/{layers-CsM34LRv.js → layers-D3lEdRF0.js} +1 -1
  199. package/dist/client/assets/{lightbulb-B8JAixK_.js → lightbulb-BFE-KkFU.js} +1 -1
  200. package/dist/client/assets/linear-BT-xgETh.js +1 -0
  201. package/dist/client/assets/{link-2-Csc6okl3.js → link-2-Dvb6g-2Q.js} +1 -1
  202. package/dist/client/assets/{list-runtime-types-DQrZNB7x.js → list-runtime-types-8YGEK3Al.js} +1 -1
  203. package/dist/client/assets/{markdown-content-DPc7aD1j.js → markdown-content-Cqq_QMXA.js} +1 -1
  204. package/dist/client/assets/{mention-pill-8P_w4muj.js → mention-pill-Bnzt4u2l.js} +1 -1
  205. package/dist/client/assets/mermaid.core-dpp59v7L.js +312 -0
  206. package/dist/client/assets/{message-square-off-D5DXu2cY.js → message-square-off-BX2XnEDx.js} +1 -1
  207. package/dist/client/assets/mindmap-definition-6OY57UG3-CFdfJO6g.js +98 -0
  208. package/dist/client/assets/{more-details-DEeu2M-p.js → more-details-B4lBMpKi.js} +1 -1
  209. package/dist/client/assets/ordinal-Cboi1Yqb.js +1 -0
  210. package/dist/client/assets/{owner-notice-BW4k1ycg.js → owner-notice-ByjrIRmX.js} +1 -1
  211. package/dist/client/assets/{package-BSwwAFVm.js → package-6Rbxg35g.js} +1 -1
  212. package/dist/client/assets/{page-container-CjPUNtNw.js → page-container-DoZzad36.js} +1 -1
  213. package/dist/client/assets/{paperclip-DQaRz34E.js → paperclip-B-jDXtxw.js} +1 -1
  214. package/dist/client/assets/{path-input-CgXSYNZn.js → path-input-DpqUD8hN.js} +1 -1
  215. package/dist/client/assets/pegDiagram-ECIUJNBX-eVnSw2Ma.js +1 -0
  216. package/dist/client/assets/pieDiagram-GNMPY74T-BYG7LY5Q.js +39 -0
  217. package/dist/client/assets/{plug-BaUXMfIl.js → plug-DnaAhcy4.js} +1 -1
  218. package/dist/client/assets/{primer-trigger-DHB0vilf.js → primer-trigger-Da5ECjY8.js} +2 -2
  219. package/dist/client/assets/{profile-errors-JW2XTgia.js → profile-errors-GbTNc2-M.js} +1 -1
  220. package/dist/client/assets/{progress-CErAw8zp.js → progress-DlIRjXIA.js} +1 -1
  221. package/dist/client/assets/quadrantDiagram-D57K4MC3-CRgNKuHR.js +7 -0
  222. package/dist/client/assets/{query-error-state-BFWpEXsl.js → query-error-state-DB-Jby7_.js} +1 -1
  223. package/dist/client/assets/{radio-Bkx216ga.js → radio-CaaE60ws.js} +1 -1
  224. package/dist/client/assets/railroadDiagram-Y72NRBL7-DGL-Hqz9.js +1 -0
  225. package/dist/client/assets/registry-DS1Ghdft.js +1 -0
  226. package/dist/client/assets/{relay-trace-schemas-DiZj_AFV.js → relay-trace-schemas-CcCqyOrA.js} +2 -2
  227. package/dist/client/assets/requirementDiagram-EQYSW5RA-DKsFpU3l.js +84 -0
  228. package/dist/client/assets/{room-files-source-BilZvdpf.js → room-files-source-CbbVpvSW.js} +1 -1
  229. package/dist/client/assets/{rotate-ccw-clock-D_SO1stN.js → rotate-ccw-clock-CeY00nlZ.js} +1 -1
  230. package/dist/client/assets/{rotate-cw-C68kM23F.js → rotate-cw-Djl5J_x9.js} +1 -1
  231. package/dist/client/assets/sankeyDiagram-SY24JHO5-BFRkDxic.js +40 -0
  232. package/dist/client/assets/{scroll-area-CVWFUmJV.js → scroll-area-BOqrziJf.js} +1 -1
  233. package/dist/client/assets/{search-x-BTFVvyA2.js → search-x-B_mHjnlo.js} +1 -1
  234. package/dist/client/assets/sequenceDiagram-BLEHNHQU-fHea3KOI.js +169 -0
  235. package/dist/client/assets/{shield-check-Dpxi6WqO.js → shield-check-Csnr5rFy.js} +1 -1
  236. package/dist/client/assets/{shield-x-CdCCgyXk.js → shield-x-Dhl4YvvW.js} +1 -1
  237. package/dist/client/assets/{signed-in-BxAnDo0S.js → signed-in-BMqAss8c.js} +1 -1
  238. package/dist/client/assets/sizeCapture-INFHLROL-CztsD3qF.js +1 -0
  239. package/dist/client/assets/{soul-file-CRfKVJX3.js → soul-file-DOfamgB5.js} +1 -1
  240. package/dist/client/assets/stateDiagram-v2-A6IESKWZ-CWyOqZ9S.js +291 -0
  241. package/dist/client/assets/swimlanes-B3ENRKFQ-0EfOxSAX.js +1 -0
  242. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-C7fkUKrq.js +8 -0
  243. package/dist/client/assets/{table-BL3xUC41.js → table-L7FvN6Or.js} +1 -1
  244. package/dist/client/assets/{terminal-u_UCRzSM.js → terminal-C9M5a_PS.js} +1 -1
  245. package/dist/client/assets/timeline-definition-JXYKGLGB-sFyYvZ20.js +120 -0
  246. package/dist/client/assets/transform-BqqRT-Iy.js +1 -0
  247. package/dist/client/assets/{trust-posture-B-v4BWo7.js → trust-posture-dl6qwDtI.js} +1 -1
  248. package/dist/client/assets/{unplug-CFbC-L5W.js → unplug-CFUEVRbc.js} +1 -1
  249. package/dist/client/assets/{unverified-catalog-notice-ZUqscVFM.js → unverified-catalog-notice-CdYU3WEJ.js} +1 -1
  250. package/dist/client/assets/{use-adapter-catalog-Z4MDWZAZ.js → use-adapter-catalog-YTofdqDJ.js} +1 -1
  251. package/dist/client/assets/{use-bindings-CsTavmf-.js → use-bindings-CpyT6kNu.js} +1 -1
  252. package/dist/client/assets/{use-composer-prefs-BY2dTvep.js → use-composer-prefs-CK_EK_QJ.js} +1 -1
  253. package/dist/client/assets/{use-connector-management-L9l21yTi.js → use-connector-management-DwoK8kon.js} +1 -1
  254. package/dist/client/assets/{use-deep-link-scroll-Bn2ZUtDY.js → use-deep-link-scroll-CgRjt48R.js} +1 -1
  255. package/dist/client/assets/{use-delete-binding-DLvdHtPD.js → use-delete-binding-CfsnMXrL.js} +1 -1
  256. package/dist/client/assets/{use-dev-links-DFvL8mIg.js → use-dev-links-B3I-ZK34.js} +1 -1
  257. package/dist/client/assets/{use-external-adapter-catalog-Be57G4tz.js → use-external-adapter-catalog-aGlZNRrp.js} +1 -1
  258. package/dist/client/assets/{use-full-activity-feed-Cp3lYXdi.js → use-full-activity-feed-B61Olhdw.js} +1 -1
  259. package/dist/client/assets/use-is-below-desktop-Qwyg-mFb.js +1 -0
  260. package/dist/client/assets/use-is-hub-CSz6NDaP.js +1 -0
  261. package/dist/client/assets/{use-jump-back-in-ChH1FSEK.js → use-jump-back-in-C39GOTHa.js} +3 -3
  262. package/dist/client/assets/{use-local-browser-zA8gMhcC.js → use-local-browser-DCwzB4D8.js} +1 -1
  263. package/dist/client/assets/{use-mesh-topology-CvoD-L1G.js → use-mesh-topology-LRYxFuZp.js} +1 -1
  264. package/dist/client/assets/{use-mounted-ref-Ch0wqQry.js → use-mounted-ref-CZaegwTr.js} +1 -1
  265. package/dist/client/assets/{use-notification-prefs-DeR05zhp.js → use-notification-prefs-FtOiUS5H.js} +1 -1
  266. package/dist/client/assets/{use-panel-tab-placements-DdjrmaoK.js → use-panel-tab-placements-Dv2OPvKh.js} +1 -1
  267. package/dist/client/assets/use-pending-read-DBOl1ee_.js +1 -0
  268. package/dist/client/assets/{use-personality-commit-qQfISO2-.js → use-personality-commit-BB5aeh6p.js} +1 -1
  269. package/dist/client/assets/{use-promo-activation-CwGoE7b-.js → use-promo-activation-BW0u7n7m.js} +2 -2
  270. package/dist/client/assets/{use-promo-dismissals-BBqVN4hx.js → use-promo-dismissals-BOXzW4kD.js} +1 -1
  271. package/dist/client/assets/{use-pulse-freshness-BKW7tjvX.js → use-pulse-freshness-ClW-MLMo.js} +1 -1
  272. package/dist/client/assets/{use-relay-config-D5iieBXl.js → use-relay-config-hItHtkSr.js} +1 -1
  273. package/dist/client/assets/{use-room-follow-claim-BwZh2ZPH.js → use-room-follow-claim-wotzxUWc.js} +1 -1
  274. package/dist/client/assets/{use-roving-tab-list-Ct7yDAUE.js → use-roving-tab-list-DkbO6xSs.js} +1 -1
  275. package/dist/client/assets/use-session-canvas-C_fuAgW_.js +24 -0
  276. package/dist/client/assets/{use-session-diagnostics-Dn-Wnyhh.js → use-session-diagnostics-DmxvD-wy.js} +1 -1
  277. package/dist/client/assets/{use-unclaimed-chats-M-c5tjXH.js → use-unclaimed-chats-DKpexDm3.js} +1 -1
  278. package/dist/client/assets/use-update-config-CSYwg557.js +1 -0
  279. package/dist/client/assets/{useMutationState-Cd-VqRAv.js → useMutationState-Btf2Hp1a.js} +1 -1
  280. package/dist/client/assets/usecaseDiagram-WPOLBNNX-DRngjDUq.js +370 -0
  281. package/dist/client/assets/value-wA6veExk.js +1 -0
  282. package/dist/client/assets/vennDiagram-Q3Y3IDCW-iK-dlS1-.js +34 -0
  283. package/dist/client/assets/wardleyDiagram-IVAIDKWA-sOS67Cks.js +78 -0
  284. package/dist/client/assets/xychartDiagram-4URNHDU4-EgnLiIao.js +7 -0
  285. package/dist/client/index.html +1 -1
  286. package/dist/server/index.js +4223 -3493
  287. package/dist/server/index.js.map +2 -2
  288. package/package.json +6 -6
  289. package/dist/client/assets/BlintzCanvas-ClOKWzws.js +0 -1141
  290. package/dist/client/assets/CanvasFileContent-B_8zsIas.js +0 -2
  291. package/dist/client/assets/HandlePage-BdRWgke2.js +0 -1
  292. package/dist/client/assets/NamePage-DyH8JAqT.js +0 -1
  293. package/dist/client/assets/PhotoPage-BHvRQnex.js +0 -1
  294. package/dist/client/assets/TopologyGraph-D3CxaLGX.js +0 -30
  295. package/dist/client/assets/_shell.marketplace-DGN_IdZY.js +0 -1
  296. package/dist/client/assets/_shell.marketplace_.sources-2YMpLInp.js +0 -1
  297. package/dist/client/assets/_shell.x._extensionId-D3-n5IRW.js +0 -1
  298. package/dist/client/assets/_shell.x._extensionId_._-D3-n5IRW.js +0 -1
  299. package/dist/client/assets/index-DCOOlbEt.js +0 -1
  300. package/dist/client/assets/index-Dain_3cO.js +0 -1
  301. package/dist/client/assets/index-_5Dn0bFm.js +0 -74
  302. package/dist/client/assets/registry-Ce1VRIS3.js +0 -1
  303. package/dist/client/assets/use-is-below-desktop-DmekpHAF.js +0 -1
  304. package/dist/client/assets/use-is-hub-el7LTkg3.js +0 -1
  305. package/dist/client/assets/use-pending-read-DBpte0GI.js +0 -1
  306. package/dist/client/assets/use-session-canvas-CJrfZrYG.js +0 -24
  307. package/dist/client/assets/use-update-config-DhlbZldm.js +0 -1
@@ -0,0 +1 @@
1
+ import{c as fe,S as M,i as he,b as H,r as E,a as N,f as dt}from"./BlintzCanvas-DoAZs5bz.js";function Xe(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var p=Array.isArray,ve=M?M.prototype:void 0,Oe=ve?ve.toString:void 0;function Ye(e){if(typeof e=="string")return e;if(p(e))return Xe(e,Ye)+"";if(fe(e))return Oe?Oe.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function J(e){return e}var ct="[object AsyncFunction]",lt="[object Function]",pt="[object GeneratorFunction]",gt="[object Proxy]";function Y(e){if(!he(e))return!1;var t=H(e);return t==lt||t==pt||t==ct||t==gt}var te=E["__core-js_shared__"],me=(function(){var e=/[^.]+$/.exec(te&&te.keys&&te.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function _t(e){return!!me&&me in e}var yt=Function.prototype,bt=yt.toString;function x(e){if(e!=null){try{return bt.call(e)}catch{}try{return e+""}catch{}}return""}var vt=/[\\^$.*+?()[\]{}|]/g,Ot=/^\[object .+?Constructor\]$/,mt=Function.prototype,wt=Object.prototype,At=mt.toString,Et=wt.hasOwnProperty,Tt=RegExp("^"+At.call(Et).replace(vt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pt(e){if(!he(e)||_t(e))return!1;var t=Y(e)?Tt:Ot;return t.test(x(e))}function Ct(e,t){return e==null?void 0:e[t]}function I(e,t){var r=Ct(e,t);return Pt(r)?r:void 0}var ae=I(E,"WeakMap");function $t(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function St(){}var xt=800,It=16,Lt=Date.now;function Rt(e){var t=0,r=0;return function(){var n=Lt(),i=It-(n-r);if(r=n,i>0){if(++t>=xt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function D(e){return function(){return e}}var we=(function(){try{var e=I(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Mt=we?function(e,t){return we(e,"toString",{configurable:!0,enumerable:!1,value:D(t),writable:!0})}:J,Nt=Rt(Mt);function Dt(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function jt(e,t,r,n){for(var i=e.length,s=r+-1;++s<i;)if(t(e[s],s,e))return s;return-1}function Ft(e){return e!==e}function Gt(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function zt(e,t,r){return t===t?Gt(e,t,r):jt(e,Ft,r)}function Ut(e,t){var r=e==null?0:e.length;return!!r&&zt(e,t,0)>-1}var Ht=9007199254740991,Bt=/^(?:0|[1-9]\d*)$/;function Ze(e,t){var r=typeof e;return t=t??Ht,!!t&&(r=="number"||r!="symbol"&&Bt.test(e))&&e>-1&&e%1==0&&e<t}function Je(e,t){return e===t||e!==e&&t!==t}var Ae=Math.max;function Kt(e,t,r){return t=Ae(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=Ae(n.length-t,0),a=Array(s);++i<s;)a[i]=n[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=n[i];return o[t]=r(a),$t(e,this,o)}}function qt(e,t){return Nt(Kt(e,t,J),e+"")}var Xt=9007199254740991;function de(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Xt}function W(e){return e!=null&&de(e.length)&&!Y(e)}var Yt=Object.prototype;function We(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Yt;return e===r}function Zt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Jt="[object Arguments]";function Ee(e){return N(e)&&H(e)==Jt}var Qe=Object.prototype,Wt=Qe.hasOwnProperty,Qt=Qe.propertyIsEnumerable,Q=Ee((function(){return arguments})())?Ee:function(e){return N(e)&&Wt.call(e,"callee")&&!Qt.call(e,"callee")};function Vt(){return!1}var Ve=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Te=Ve&&typeof module=="object"&&module&&!module.nodeType&&module,kt=Te&&Te.exports===Ve,Pe=kt?E.Buffer:void 0,er=Pe?Pe.isBuffer:void 0,Z=er||Vt,tr="[object Arguments]",rr="[object Array]",nr="[object Boolean]",ir="[object Date]",sr="[object Error]",ar="[object Function]",or="[object Map]",ur="[object Number]",fr="[object Object]",hr="[object RegExp]",dr="[object Set]",cr="[object String]",lr="[object WeakMap]",pr="[object ArrayBuffer]",gr="[object DataView]",_r="[object Float32Array]",yr="[object Float64Array]",br="[object Int8Array]",vr="[object Int16Array]",Or="[object Int32Array]",mr="[object Uint8Array]",wr="[object Uint8ClampedArray]",Ar="[object Uint16Array]",Er="[object Uint32Array]",h={};h[_r]=h[yr]=h[br]=h[vr]=h[Or]=h[mr]=h[wr]=h[Ar]=h[Er]=!0;h[tr]=h[rr]=h[pr]=h[nr]=h[gr]=h[ir]=h[sr]=h[ar]=h[or]=h[ur]=h[fr]=h[hr]=h[dr]=h[cr]=h[lr]=!1;function Tr(e){return N(e)&&de(e.length)&&!!h[H(e)]}function Pr(e){return function(t){return e(t)}}var ke=typeof exports=="object"&&exports&&!exports.nodeType&&exports,F=ke&&typeof module=="object"&&module&&!module.nodeType&&module,Cr=F&&F.exports===ke,re=Cr&&dt.process,Ce=(function(){try{var e=F&&F.require&&F.require("util").types;return e||re&&re.binding&&re.binding("util")}catch{}})(),$e=Ce&&Ce.isTypedArray,ce=$e?Pr($e):Tr,$r=Object.prototype,Sr=$r.hasOwnProperty;function xr(e,t){var r=p(e),n=!r&&Q(e),i=!r&&!n&&Z(e),s=!r&&!n&&!i&&ce(e),a=r||n||i||s,o=a?Zt(e.length,String):[],u=o.length;for(var f in e)(t||Sr.call(e,f))&&!(a&&(f=="length"||i&&(f=="offset"||f=="parent")||s&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Ze(f,u)))&&o.push(f);return o}function Ir(e,t){return function(r){return e(t(r))}}var Lr=Ir(Object.keys,Object),Rr=Object.prototype,Mr=Rr.hasOwnProperty;function et(e){if(!We(e))return Lr(e);var t=[];for(var r in Object(e))Mr.call(e,r)&&r!="constructor"&&t.push(r);return t}function y(e){return W(e)?xr(e):et(e)}var Nr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dr=/^\w*$/;function le(e,t){if(p(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||fe(e)?!0:Dr.test(e)||!Nr.test(e)||t!=null&&e in Object(t)}var G=I(Object,"create");function jr(){this.__data__=G?G(null):{},this.size=0}function Fr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Gr="__lodash_hash_undefined__",zr=Object.prototype,Ur=zr.hasOwnProperty;function Hr(e){var t=this.__data__;if(G){var r=t[e];return r===Gr?void 0:r}return Ur.call(t,e)?t[e]:void 0}var Br=Object.prototype,Kr=Br.hasOwnProperty;function qr(e){var t=this.__data__;return G?t[e]!==void 0:Kr.call(t,e)}var Xr="__lodash_hash_undefined__";function Yr(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=G&&t===void 0?Xr:t,this}function S(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}S.prototype.clear=jr;S.prototype.delete=Fr;S.prototype.get=Hr;S.prototype.has=qr;S.prototype.set=Yr;function Zr(){this.__data__=[],this.size=0}function V(e,t){for(var r=e.length;r--;)if(Je(e[r][0],t))return r;return-1}var Jr=Array.prototype,Wr=Jr.splice;function Qr(e){var t=this.__data__,r=V(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Wr.call(t,r,1),--this.size,!0}function Vr(e){var t=this.__data__,r=V(t,e);return r<0?void 0:t[r][1]}function kr(e){return V(this.__data__,e)>-1}function en(e,t){var r=this.__data__,n=V(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function m(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}m.prototype.clear=Zr;m.prototype.delete=Qr;m.prototype.get=Vr;m.prototype.has=kr;m.prototype.set=en;var z=I(E,"Map");function tn(){this.size=0,this.__data__={hash:new S,map:new(z||m),string:new S}}function rn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function k(e,t){var r=e.__data__;return rn(t)?r[typeof t=="string"?"string":"hash"]:r.map}function nn(e){var t=k(this,e).delete(e);return this.size-=t?1:0,t}function sn(e){return k(this,e).get(e)}function an(e){return k(this,e).has(e)}function on(e,t){var r=k(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function w(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}w.prototype.clear=tn;w.prototype.delete=nn;w.prototype.get=sn;w.prototype.has=an;w.prototype.set=on;var un="Expected a function";function pe(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(un);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(pe.Cache||w),r}pe.Cache=w;var fn=500;function hn(e){var t=pe(e,function(n){return r.size===fn&&r.clear(),n}),r=t.cache;return t}var dn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cn=/\\(\\)?/g,ln=hn(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(dn,function(r,n,i,s){t.push(i?s.replace(cn,"$1"):n||r)}),t});function pn(e){return e==null?"":Ye(e)}function tt(e,t){return p(e)?e:le(e,t)?[e]:ln(pn(e))}function ee(e){if(typeof e=="string"||fe(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function rt(e,t){t=tt(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[ee(t[r++])];return r&&r==n?e:void 0}function gn(e,t,r){var n=e==null?void 0:rt(e,t);return n===void 0?r:n}function nt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Se=M?M.isConcatSpreadable:void 0;function _n(e){return p(e)||Q(e)||!!(Se&&e&&e[Se])}function yn(e,t,r,n,i){var s=-1,a=e.length;for(r||(r=_n),i||(i=[]);++s<a;){var o=e[s];r(o)?nt(i,o):n||(i[i.length]=o)}return i}function bn(e,t,r,n){var i=-1,s=e==null?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}function vn(){this.__data__=new m,this.size=0}function On(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function mn(e){return this.__data__.get(e)}function wn(e){return this.__data__.has(e)}var An=200;function En(e,t){var r=this.__data__;if(r instanceof m){var n=r.__data__;if(!z||n.length<An-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new w(n)}return r.set(e,t),this.size=r.size,this}function O(e){var t=this.__data__=new m(e);this.size=t.size}O.prototype.clear=vn;O.prototype.delete=On;O.prototype.get=mn;O.prototype.has=wn;O.prototype.set=En;function it(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}function Tn(){return[]}var Pn=Object.prototype,Cn=Pn.propertyIsEnumerable,xe=Object.getOwnPropertySymbols,$n=xe?function(e){return e==null?[]:(e=Object(e),it(xe(e),function(t){return Cn.call(e,t)}))}:Tn;function Sn(e,t,r){var n=t(e);return p(e)?n:nt(n,r(e))}function Ie(e){return Sn(e,y,$n)}var oe=I(E,"DataView"),ue=I(E,"Promise"),R=I(E,"Set"),Le="[object Map]",xn="[object Object]",Re="[object Promise]",Me="[object Set]",Ne="[object WeakMap]",De="[object DataView]",In=x(oe),Ln=x(z),Rn=x(ue),Mn=x(R),Nn=x(ae),v=H;(oe&&v(new oe(new ArrayBuffer(1)))!=De||z&&v(new z)!=Le||ue&&v(ue.resolve())!=Re||R&&v(new R)!=Me||ae&&v(new ae)!=Ne)&&(v=function(e){var t=H(e),r=t==xn?e.constructor:void 0,n=r?x(r):"";if(n)switch(n){case In:return De;case Ln:return Le;case Rn:return Re;case Mn:return Me;case Nn:return Ne}return t});var je=E.Uint8Array,Dn="__lodash_hash_undefined__";function jn(e){return this.__data__.set(e,Dn),this}function Fn(e){return this.__data__.has(e)}function U(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new w;++t<r;)this.add(e[t])}U.prototype.add=U.prototype.push=jn;U.prototype.has=Fn;function Gn(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function st(e,t){return e.has(t)}var zn=1,Un=2;function at(e,t,r,n,i,s){var a=r&zn,o=e.length,u=t.length;if(o!=u&&!(a&&u>o))return!1;var f=s.get(e),l=s.get(t);if(f&&l)return f==t&&l==e;var d=-1,c=!0,b=r&Un?new U:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var g=e[d],_=t[d];if(n)var A=a?n(_,g,d,t,e,s):n(g,_,d,e,t,s);if(A!==void 0){if(A)continue;c=!1;break}if(b){if(!Gn(t,function(T,P){if(!st(b,P)&&(g===T||i(g,T,r,n,s)))return b.push(P)})){c=!1;break}}else if(!(g===_||i(g,_,r,n,s))){c=!1;break}}return s.delete(e),s.delete(t),c}function Hn(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function ge(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Bn=1,Kn=2,qn="[object Boolean]",Xn="[object Date]",Yn="[object Error]",Zn="[object Map]",Jn="[object Number]",Wn="[object RegExp]",Qn="[object Set]",Vn="[object String]",kn="[object Symbol]",ei="[object ArrayBuffer]",ti="[object DataView]",Fe=M?M.prototype:void 0,ne=Fe?Fe.valueOf:void 0;function ri(e,t,r,n,i,s,a){switch(r){case ti:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ei:return!(e.byteLength!=t.byteLength||!s(new je(e),new je(t)));case qn:case Xn:case Jn:return Je(+e,+t);case Yn:return e.name==t.name&&e.message==t.message;case Wn:case Vn:return e==t+"";case Zn:var o=Hn;case Qn:var u=n&Bn;if(o||(o=ge),e.size!=t.size&&!u)return!1;var f=a.get(e);if(f)return f==t;n|=Kn,a.set(e,t);var l=at(o(e),o(t),n,i,s,a);return a.delete(e),l;case kn:if(ne)return ne.call(e)==ne.call(t)}return!1}var ni=1,ii=Object.prototype,si=ii.hasOwnProperty;function ai(e,t,r,n,i,s){var a=r&ni,o=Ie(e),u=o.length,f=Ie(t),l=f.length;if(u!=l&&!a)return!1;for(var d=u;d--;){var c=o[d];if(!(a?c in t:si.call(t,c)))return!1}var b=s.get(e),g=s.get(t);if(b&&g)return b==t&&g==e;var _=!0;s.set(e,t),s.set(t,e);for(var A=a;++d<u;){c=o[d];var T=e[c],P=t[c];if(n)var be=a?n(P,T,c,t,e,s):n(T,P,c,e,t,s);if(!(be===void 0?T===P||i(T,P,r,n,s):be)){_=!1;break}A||(A=c=="constructor")}if(_&&!A){var B=e.constructor,K=t.constructor;B!=K&&"constructor"in e&&"constructor"in t&&!(typeof B=="function"&&B instanceof B&&typeof K=="function"&&K instanceof K)&&(_=!1)}return s.delete(e),s.delete(t),_}var oi=1,Ge="[object Arguments]",ze="[object Array]",q="[object Object]",ui=Object.prototype,Ue=ui.hasOwnProperty;function fi(e,t,r,n,i,s){var a=p(e),o=p(t),u=a?ze:v(e),f=o?ze:v(t);u=u==Ge?q:u,f=f==Ge?q:f;var l=u==q,d=f==q,c=u==f;if(c&&Z(e)){if(!Z(t))return!1;a=!0,l=!1}if(c&&!l)return s||(s=new O),a||ce(e)?at(e,t,r,n,i,s):ri(e,t,u,r,n,i,s);if(!(r&oi)){var b=l&&Ue.call(e,"__wrapped__"),g=d&&Ue.call(t,"__wrapped__");if(b||g){var _=b?e.value():e,A=g?t.value():t;return s||(s=new O),i(_,A,r,n,s)}}return c?(s||(s=new O),ai(e,t,r,n,i,s)):!1}function _e(e,t,r,n,i){return e===t?!0:e==null||t==null||!N(e)&&!N(t)?e!==e&&t!==t:fi(e,t,r,n,_e,i)}var hi=1,di=2;function ci(e,t,r,n){var i=r.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){a=r[i];var o=a[0],u=e[o],f=a[1];if(a[2]){if(u===void 0&&!(o in e))return!1}else{var l=new O,d;if(!(d===void 0?_e(f,u,hi|di,n,l):d))return!1}}return!0}function ot(e){return e===e&&!he(e)}function li(e){for(var t=y(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,ot(i)]}return t}function ut(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function pi(e){var t=li(e);return t.length==1&&t[0][2]?ut(t[0][0],t[0][1]):function(r){return r===e||ci(r,e,t)}}function gi(e,t){return e!=null&&t in Object(e)}function _i(e,t,r){t=tt(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var a=ee(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&de(i)&&Ze(a,i)&&(p(e)||Q(e)))}function yi(e,t){return e!=null&&_i(e,t,gi)}var bi=1,vi=2;function Oi(e,t){return le(e)&&ot(t)?ut(ee(e),t):function(r){var n=gn(r,e);return n===void 0&&n===t?yi(r,e):_e(t,n,bi|vi)}}function mi(e){return function(t){return t==null?void 0:t[e]}}function wi(e){return function(t){return rt(t,e)}}function Ai(e){return le(e)?mi(ee(e)):wi(e)}function ft(e){return typeof e=="function"?e:e==null?J:typeof e=="object"?p(e)?Oi(e[0],e[1]):pi(e):Ai(e)}function Ei(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var u=a[++i];if(r(s[u],u,s)===!1)break}return t}}var Ti=Ei();function Pi(e,t){return e&&Ti(e,t,y)}function Ci(e,t){return function(r,n){if(r==null)return r;if(!W(r))return e(r,n);for(var i=r.length,s=-1,a=Object(r);++s<i&&n(a[s],s,a)!==!1;);return r}}var ye=Ci(Pi);function $i(e){return N(e)&&W(e)}function Si(e){return typeof e=="function"?e:J}function C(e,t){var r=p(e)?Dt:ye;return r(e,Si(t))}function xi(e,t){var r=[];return ye(e,function(n,i,s){t(n,i,s)&&r.push(n)}),r}function X(e,t){var r=p(e)?it:xi;return r(e,ft(t))}function Ii(e,t){return Xe(t,function(r){return e[r]})}function ie(e){return e==null?[]:Ii(e,y(e))}var Li="[object Map]",Ri="[object Set]",Mi=Object.prototype,Ni=Mi.hasOwnProperty;function He(e){if(e==null)return!0;if(W(e)&&(p(e)||typeof e=="string"||typeof e.splice=="function"||Z(e)||ce(e)||Q(e)))return!e.length;var t=v(e);if(t==Li||t==Ri)return!e.size;if(We(e))return!et(e).length;for(var r in e)if(Ni.call(e,r))return!1;return!0}function L(e){return e===void 0}function Di(e,t,r,n,i){return i(e,function(s,a,o){r=n?(n=!1,s):t(r,s,a,o)}),r}function ji(e,t,r){var n=p(e)?bn:Di,i=arguments.length<3;return n(e,ft(t),r,i,ye)}var Fi=1/0,Gi=R&&1/ge(new R([,-0]))[1]==Fi?function(e){return new R(e)}:St,zi=200;function Ui(e,t,r){var n=-1,i=Ut,s=e.length,a=!0,o=[],u=o;if(s>=zi){var f=Gi(e);if(f)return ge(f);a=!1,i=st,u=new U}else u=o;e:for(;++n<s;){var l=e[n],d=l;if(l=l!==0?l:0,a&&d===d){for(var c=u.length;c--;)if(u[c]===d)continue e;o.push(l)}else i(u,d,r)||(u!==o&&u.push(d),o.push(l))}return o}var Hi=qt(function(e){return Ui(yn(e,1,$i,!0))}),Bi="\0",$="\0",Be="";class ht{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=D(void 0),this._defaultEdgeLabelFn=D(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[$]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return Y(t)||(t=D(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return y(this._nodes)}sources(){var t=this;return X(this.nodes(),function(r){return He(t._in[r])})}sinks(){var t=this;return X(this.nodes(),function(r){return He(t._out[r])})}setNodes(t,r){var n=arguments,i=this;return C(t,function(s){n.length>1?i.setNode(s,r):i.setNode(s)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=$,this._children[t]={},this._children[$][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],C(this.children(t),n=>{this.setParent(n)}),delete this._children[t]),C(y(this._in[t]),r),delete this._in[t],delete this._preds[t],C(y(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(L(r))r=$;else{r+="";for(var n=r;!L(n);n=this.parent(n))if(n===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==$)return r}}children(t){if(L(t)&&(t=$),this._isCompound){var r=this._children[t];if(r)return y(r)}else{if(t===$)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return y(r)}successors(t){var r=this._sucs[t];if(r)return y(r)}neighbors(t){var r=this.predecessors(t);if(r)return Hi(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;C(this._nodes,function(a,o){t(o)&&r.setNode(o,a)}),C(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,n.edge(a))});var i={};function s(a){var o=n.parent(a);return o===void 0||r.hasNode(o)?(i[a]=o,o):o in i?i[o]:s(o)}return this._isCompound&&C(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(t){return Y(t)||(t=D(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return ie(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return ji(t,function(s,a){return i.length>1?n.setEdge(s,a,r):n.setEdge(s,a),a}),this}setEdge(){var t,r,n,i,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,n=a.name,arguments.length===2&&(i=arguments[1],s=!0)):(t=a,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),t=""+t,r=""+r,L(n)||(n=""+n);var o=j(this._isDirected,t,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return s&&(this._edgeLabels[o]=i),this;if(!L(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[o]=s?i:this._defaultEdgeLabelFn(t,r,n);var u=Ki(this._isDirected,t,r,n);return t=u.v,r=u.w,Object.freeze(u),this._edgeObjs[o]=u,Ke(this._preds[r],t),Ke(this._sucs[t],r),this._in[r][o]=u,this._out[t][o]=u,this._edgeCount++,this}edge(t,r,n){var i=arguments.length===1?se(this._isDirected,arguments[0]):j(this._isDirected,t,r,n);return this._edgeLabels[i]}hasEdge(t,r,n){var i=arguments.length===1?se(this._isDirected,arguments[0]):j(this._isDirected,t,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(t,r,n){var i=arguments.length===1?se(this._isDirected,arguments[0]):j(this._isDirected,t,r,n),s=this._edgeObjs[i];return s&&(t=s.v,r=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],qe(this._preds[r],t),qe(this._sucs[t],r),delete this._in[r][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,r){var n=this._in[t];if(n){var i=ie(n);return r?X(i,function(s){return s.v===r}):i}}outEdges(t,r){var n=this._out[t];if(n){var i=ie(n);return r?X(i,function(s){return s.w===r}):i}}nodeEdges(t,r){var n=this.inEdges(t,r);if(n)return n.concat(this.outEdges(t,r))}}ht.prototype._nodeCount=0;ht.prototype._edgeCount=0;function Ke(e,t){e[t]?e[t]++:e[t]=1}function qe(e,t){--e[t]||delete e[t]}function j(e,t,r,n){var i=""+t,s=""+r;if(!e&&i>s){var a=i;i=s,s=a}return i+Be+s+Be+(L(n)?Bi:n)}function Ki(e,t,r,n){var i=""+t,s=""+r;if(!e&&i>s){var a=i;i=s,s=a}var o={v:i,w:s};return n&&(o.name=n),o}function se(e,t){return j(e,t.v,t.w,t.name)}export{ye as A,Xe as B,Si as C,Pi as D,_i as E,J as F,ht as G,tt as H,ee as I,rt as J,yi as K,pn as L,C as M,D as N,L as O,X as P,ie as Q,ji as R,O as S,je as U,Ze as a,qt as b,We as c,we as d,Je as e,xr as f,yn as g,Ir as h,W as i,v as j,Pr as k,Z as l,Dt as m,Ce as n,Kt as o,p,Ie as q,ce as r,Nt as s,$i as t,Q as u,Y as v,Ti as w,ft as x,y,jt as z};
@@ -1,4 +1,4 @@
1
- import{W as e}from"./index-Dc5cpBoO.js";/**
1
+ import{W as e}from"./index-DcZPWi_I.js";/**
2
2
  * @license lucide-react v1.48.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r,S as d,E as p,j as E,c as f}from"./index-Dc5cpBoO.js";var j=({code:i,language:e,maxHeight:o,raw:a,className:u,startLine:m,lineNumbers:n,...h})=>{let{shikiTheme:l}=r.useContext(d),t=p(),[c,s]=r.useState(a);return r.useEffect(()=>{if(!t){s(a);return}let g=t.highlight({code:i,language:e,themes:l},x=>{s(x)});g&&s(g)},[i,e,l,t,a]),E.jsx(f,{className:u,language:e,lineNumbers:n,maxHeight:o,result:c,startLine:m,...h})};export{j as HighlightedCodeBlockBody};
1
+ import{r,S as d,E as p,j as E,c as f}from"./index-DcZPWi_I.js";var j=({code:i,language:e,maxHeight:o,raw:a,className:u,startLine:m,lineNumbers:n,...h})=>{let{shikiTheme:l}=r.useContext(d),t=p(),[c,s]=r.useState(a);return r.useEffect(()=>{if(!t){s(a);return}let g=t.highlight({code:i,language:e,themes:l},x=>{s(x)});g&&s(g)},[i,e,l,t,a]),E.jsx(f,{className:u,language:e,lineNumbers:n,maxHeight:o,result:c,startLine:m,...h})};export{j as HighlightedCodeBlockBody};
@@ -1 +1 @@
1
- import{r as h,dy as te,j as i,de as ne,df as se,dg as oe,ar as _,dh as re,dK as ie,G as Y,dL as ce,X as ae,x as le,C as ue,dM as de}from"./index-Dc5cpBoO.js";import{T as fe,a as me}from"./index.esm-DXsF3Bua.js";import{a as d}from"./index-Ch-ON5gw.js";import{u as z,a as he,I as pe}from"./image-off-hnjcBIzN.js";const Q={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/avif":"avif","image/svg+xml":"svg"},xe=new Set(["png","jpg","jpeg","gif","webp","avif","svg"]);function G(n,s){var u;const o=/^(.*)\.([a-z0-9]{1,5})$/i.exec(n),e=(o?o[1]:n)||"image",c=(u=o==null?void 0:o[2])==null?void 0:u.toLowerCase(),a=(s?Q[s.split(";")[0].trim()]:void 0)??(c&&xe.has(c)?c:"png");return`${e}.${a}`}function ge(n){var s;if(n.downloadName)return n.downloadName;if(n.src.startsWith("data:")){const o=((s=/^data:([^;,]+)/.exec(n.src))==null?void 0:s[1])??"";return`image.${Q[o]??"png"}`}try{const o=new URL(n.src,"http://local").pathname.split("/").pop()??"",e=decodeURIComponent(o);return/\.[a-z0-9]{2,5}$/i.test(e)?e:"image"}catch{return"image"}}function $(n,s,o){const e=document.createElement("a");e.href=n,e.download=s,o&&(e.target="_blank",e.rel="noopener noreferrer"),document.body.append(e),e.click(),e.remove()}async function be(n){const s=ge(n);try{const o=await fetch(n.src);if(!o.ok)throw new Error(`HTTP ${o.status}`);const e=await o.blob(),c=URL.createObjectURL(e);$(c,G(s,e.type),!1),setTimeout(()=>URL.revokeObjectURL(c),1e3)}catch{$(n.src,G(s),!0)}}function H(n,s,o){const e=Math.min(s.width/n.width,s.height/n.height),c=o?e:Math.min(e,1),f=n.width*c,a=n.height*c;return{left:s.left+(s.width-f)/2,top:s.top+(s.height-a)/2,width:f,height:a}}function q(n,s,o){const e={width:n.naturalWidth,height:n.naturalHeight};if(e.width===0||e.height===0)return null;const c=n.getBoundingClientRect();if(c.width===0||c.height===0||!(c.bottom>0&&c.right>0&&c.top<o.height&&c.left<o.width))return null;const a=H(e,c,!0),u=H(e,s,!1);return{x:a.left+a.width/2-(s.left+s.width/2),y:a.top+a.height/2-(s.top+s.height/2),scale:a.width/u.width}}const ye=8,we=110,ve=70,V=.5,je=6,O={type:"spring",stiffness:520,damping:42};function Se(n){const s=h.useRef(n);h.useLayoutEffect(()=>{s.current=n});const o=h.useRef(new Set),e=h.useRef(null),c=h.useRef(null),f=h.useRef(!1),a=()=>{const{x:r,y:l,scale:x,backdrop:y}=s.current;d(r,0,O),d(l,0,O),d(x,1,O),d(y,1,O)},u=r=>{var l;if(c.current={x:r.clientX,y:r.clientY},f.current=!1,r.pointerType!=="mouse"){if(o.current.add(r.pointerId),o.current.size>1){(l=e.current)!=null&&l.axis&&a(),e.current=null;return}e.current=s.current.canGesture()?{id:r.pointerId,startX:r.clientX,startY:r.clientY,startTime:r.timeStamp,axis:null}:null}},j=r=>{c.current&&Math.hypot(r.clientX-c.current.x,r.clientY-c.current.y)>je&&(f.current=!0);const l=e.current;if(!l||l.id!==r.pointerId)return;const x=r.clientX-l.startX,y=r.clientY-l.startY;if(l.axis===null){if(Math.max(Math.abs(x),Math.abs(y))<ye)return;l.axis=Math.abs(y)>Math.abs(x)?"y":"x"}const{x:v,y:k,scale:C,backdrop:S,canStep:T}=s.current;if(l.axis==="y"){const N=Math.min(Math.abs(y)/320,1);k.set(y),C.set(1-N*.12),S.set(1-N*.7)}else v.set(T(x<0?1:-1)?x:x*.25)},p=r=>{o.current.delete(r.pointerId);const l=e.current;if(!l||l.id!==r.pointerId||(e.current=null,l.axis===null))return;const x=Math.max(r.timeStamp-l.startTime,1),{canStep:y,onDismiss:v,onStep:k}=s.current;if(r.type==="pointercancel"){a();return}if(l.axis==="y"){const N=r.clientY-l.startY;Math.abs(N)>we||Math.abs(N)/x>V?v():a();return}const C=r.clientX-l.startX,S=C<0?1:-1;(Math.abs(C)>ve||Math.abs(C)/x>V)&&y(S)?k(S):a()};return{handlers:{onPointerDown:u,onPointerMove:j,onPointerUp:p,onPointerCancel:p},endedDrag:()=>f.current}}const A={type:"spring",stiffness:360,damping:34,mass:.9},U={type:"spring",stiffness:420,damping:40},P={duration:.16,ease:"easeOut"},Z=72,w=n=>n.stopPropagation(),Ne={onClick:w,onDoubleClick:w,onContextMenu:w,onKeyDown:w,onKeyUp:w,onPointerDown:w,onPointerMove:w,onPointerUp:w,onPointerCancel:w,onTouchStart:w,onTouchMove:w,onTouchEnd:w,onWheel:w};function Ee({open:n,onOpenChange:s,images:o,index:e,onIndexChange:c,getTrigger:f}){const a=te()===!0,u=z(0),j=z(0),p=z(1),r=z(1),l=z(0),x=he(l,[.55,1],[0,1]),y=h.useRef(null),v=h.useRef("idle"),k=h.useRef(!1),C=h.useRef(async()=>{}),S=h.useRef(null),[T,N]=h.useState(null),[ee,F]=h.useState({}),g=o[e],E=o.length,K=g?ee[g.src]??"loading":"loading",M=g!==void 0&&T===g.src;h.useLayoutEffect(()=>{var I,R;if(!n)return;v.current="idle",k.current=!1,S.current=null,u.set(0),j.set(0),p.set(1),d(l,1,a?P:{duration:.24,ease:"easeOut"});const t=(I=f==null?void 0:f(e))==null?void 0:I.querySelector("img"),m=(R=y.current)==null?void 0:R.getBoundingClientRect(),b=!a&&t&&m?q(t,m,{width:window.innerWidth,height:window.innerHeight}):null;b?(u.set(b.x),j.set(b.y),p.set(b.scale),r.set(1),d(u,0,A),d(j,0,A),d(p,1,A)):(r.set(0),a||p.set(.96),d(r,1,P),d(p,1,P))},[n]),h.useLayoutEffect(()=>{const t=S.current;t!==null&&(S.current=null,j.set(0),p.set(1),u.set(a?0:t*Z),d(u,0,O),d(r,1,P).then(()=>{v.current="idle",k.current&&(k.current=!1,C.current())}))},[e,r,a,u,j,p]),h.useEffect(()=>{if(n)for(const t of[o[e-1],o[e+1]])t&&(new Image().src=t.src)},[n,o,e]);const L=h.useCallback(async()=>{var R,X;if(v.current==="closing")return;if(v.current==="stepping"){k.current=!0;return}v.current="closing",N(null);const t=(R=f==null?void 0:f(e))==null?void 0:R.querySelector("img"),m=(X=y.current)==null?void 0:X.getBoundingClientRect(),b=!a&&!M&&t&&m?q(t,m,{width:window.innerWidth,height:window.innerHeight}):null,I=d(l,0,a?P:{duration:.22,ease:"easeIn"});b?await Promise.all([d(u,b.x,U),d(j,b.y,U),d(p,b.scale,U),I]):await Promise.all([d(r,0,P),a?null:d(p,p.get()*.96,P),I]),s==null||s(!1)},[l,f,e,s,r,a,p,u,j,M]);h.useLayoutEffect(()=>{C.current=L},[L]);const D=h.useCallback(async t=>{const m=e+t;v.current!=="idle"||m<0||m>=E||(v.current="stepping",await Promise.all([a?null:d(u,-t*Z+u.get()*.5,P),d(r,0,{duration:.1})]),S.current=t,c(m))},[E,e,c,r,a,u]),B=Se({x:u,y:j,scale:p,backdrop:l,canGesture:()=>v.current==="idle"&&!M,canStep:t=>e+t>=0&&e+t<E,onDismiss:()=>void L(),onStep:t=>void D(t)});return g?i.jsx(ne,{open:n,onOpenChange:t=>{t||L()},children:i.jsx(se,{container:document.body,children:i.jsxs("div",{className:"contents",...Ne,children:[i.jsx(oe,{asChild:!0,children:i.jsx(_.div,{"data-slot":"image-lightbox-backdrop",style:{opacity:l},className:"bg-background/90 fixed inset-0 z-50 backdrop-blur-xl"})}),i.jsxs(re,{"data-slot":"image-lightbox","aria-describedby":void 0,onOpenAutoFocus:t=>{var m;t.preventDefault(),(m=t.currentTarget)==null||m.focus()},onFocusOutside:t=>t.preventDefault(),onCloseAutoFocus:t=>{const m=f==null?void 0:f(e);m&&(t.preventDefault(),m.focus({preventScroll:!0}))},onKeyDown:t=>{t.key==="ArrowRight"?D(1):t.key==="ArrowLeft"&&D(-1)},onClick:t=>{var R,X;const m=t.target;if(B.endedDrag()||m.closest("button"))return;const b=(X=(R=y.current)==null?void 0:R.querySelector("img"))==null?void 0:X.getBoundingClientRect();b!==void 0&&t.clientX>=b.left&&t.clientX<=b.right&&t.clientY>=b.top&&t.clientY<=b.bottom||L()},...B.handlers,className:"fixed inset-0 z-50 flex touch-none flex-col outline-none select-none",children:[i.jsx(ie,{className:"sr-only",children:g.alt||"Image"}),i.jsxs(_.div,{style:{opacity:x},className:"flex shrink-0 items-center justify-between gap-2 pt-[max(0.75rem,env(safe-area-inset-top))] pr-[max(0.75rem,env(safe-area-inset-right))] pb-2 pl-[max(0.75rem,env(safe-area-inset-left))]",children:[i.jsxs("p",{"aria-live":"polite",className:Y("text-muted-foreground px-2 text-sm tabular-nums",E<2&&"invisible"),children:[e+1," of ",E]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(W,{label:"Download image",onClick:()=>void be(g),children:i.jsx(ce,{className:"size-[18px]"})}),i.jsx(W,{label:"Close",onClick:()=>void L(),children:i.jsx(ae,{className:"size-5"})})]})]}),i.jsxs("div",{className:"relative min-h-0 flex-1 px-3 sm:px-20",children:[i.jsxs("div",{ref:y,className:"relative h-full w-full",children:[i.jsx(_.div,{style:{x:u,y:j,scale:p,opacity:r},className:"h-full w-full",children:i.jsx(fe,{centerOnInit:!0,minScale:1,maxScale:8,doubleClick:{mode:"toggle",step:1.2},wheel:{step:.15},panning:{disabled:!M,velocityDisabled:!0},onTransform:(t,m)=>N(m.scale>1.01?g.src:null),children:i.jsx(me,{wrapperClass:"!h-full !w-full",contentClass:"!h-full !w-full flex items-center justify-center",children:K==="error"?i.jsxs("p",{className:"text-muted-foreground flex items-center gap-2 text-sm",children:[i.jsx(pe,{"aria-hidden":!0,className:"size-4"}),"This image couldn’t be loaded."]}):i.jsx("img",{src:g.src,alt:g.alt,draggable:!1,onLoad:()=>F(t=>({...t,[g.src]:"loaded"})),onError:()=>F(t=>({...t,[g.src]:"error"})),className:Y("max-h-full max-w-full rounded-lg object-contain shadow-2xl shadow-black/25",M?"cursor-grab active:cursor-grabbing":"cursor-zoom-in")})})},g.src)}),K==="loading"&&i.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:i.jsx(le,{size:"md",label:"Loading image",className:"text-muted-foreground"})})]}),e>0&&i.jsx(J,{direction:-1,fade:x,onClick:()=>void D(-1)}),e<E-1&&i.jsx(J,{direction:1,fade:x,onClick:()=>void D(1)})]}),i.jsx(_.div,{style:{opacity:x},className:"flex min-h-12 shrink-0 items-center justify-center px-6 pt-2 pb-[max(0.75rem,env(safe-area-inset-bottom))]",children:g.alt&&i.jsx("p",{className:"text-muted-foreground line-clamp-2 max-w-prose text-center text-sm",children:g.alt})})]})]})})}):null}function W({label:n,onClick:s,fade:o,className:e,children:c}){return i.jsx(_.button,{type:"button","aria-label":n,title:n,onClick:s,style:o?{opacity:o}:void 0,className:Y("focus-ring bg-background/70 text-foreground border-border/60 hover:bg-background","flex size-10 items-center justify-center rounded-full border shadow-sm backdrop-blur-md","transition-colors duration-150 motion-reduce:transition-none",e),children:c})}function J({direction:n,fade:s,onClick:o}){return i.jsx(W,{label:n===1?"Next image":"Previous image",onClick:o,fade:s,className:Y("absolute top-1/2 hidden -translate-y-1/2 sm:flex",n===1?"right-4":"left-4"),children:n===1?i.jsx(ue,{className:"size-5"}):i.jsx(de,{className:"size-5"})})}export{Ee as ImageLightbox};
1
+ import{r as h,dy as te,j as i,de as ne,df as se,dg as oe,ar as _,dh as re,dK as ie,G as Y,dL as ce,X as ae,x as le,C as ue,dM as de}from"./index-DcZPWi_I.js";import{T as fe,a as me}from"./index.esm-CZZtbPRj.js";import{a as d}from"./index-1ShgR_xt.js";import{u as z,a as he,I as pe}from"./image-off-BCtWIY4q.js";const Q={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/avif":"avif","image/svg+xml":"svg"},xe=new Set(["png","jpg","jpeg","gif","webp","avif","svg"]);function G(n,s){var u;const o=/^(.*)\.([a-z0-9]{1,5})$/i.exec(n),e=(o?o[1]:n)||"image",c=(u=o==null?void 0:o[2])==null?void 0:u.toLowerCase(),a=(s?Q[s.split(";")[0].trim()]:void 0)??(c&&xe.has(c)?c:"png");return`${e}.${a}`}function ge(n){var s;if(n.downloadName)return n.downloadName;if(n.src.startsWith("data:")){const o=((s=/^data:([^;,]+)/.exec(n.src))==null?void 0:s[1])??"";return`image.${Q[o]??"png"}`}try{const o=new URL(n.src,"http://local").pathname.split("/").pop()??"",e=decodeURIComponent(o);return/\.[a-z0-9]{2,5}$/i.test(e)?e:"image"}catch{return"image"}}function $(n,s,o){const e=document.createElement("a");e.href=n,e.download=s,o&&(e.target="_blank",e.rel="noopener noreferrer"),document.body.append(e),e.click(),e.remove()}async function be(n){const s=ge(n);try{const o=await fetch(n.src);if(!o.ok)throw new Error(`HTTP ${o.status}`);const e=await o.blob(),c=URL.createObjectURL(e);$(c,G(s,e.type),!1),setTimeout(()=>URL.revokeObjectURL(c),1e3)}catch{$(n.src,G(s),!0)}}function H(n,s,o){const e=Math.min(s.width/n.width,s.height/n.height),c=o?e:Math.min(e,1),f=n.width*c,a=n.height*c;return{left:s.left+(s.width-f)/2,top:s.top+(s.height-a)/2,width:f,height:a}}function q(n,s,o){const e={width:n.naturalWidth,height:n.naturalHeight};if(e.width===0||e.height===0)return null;const c=n.getBoundingClientRect();if(c.width===0||c.height===0||!(c.bottom>0&&c.right>0&&c.top<o.height&&c.left<o.width))return null;const a=H(e,c,!0),u=H(e,s,!1);return{x:a.left+a.width/2-(s.left+s.width/2),y:a.top+a.height/2-(s.top+s.height/2),scale:a.width/u.width}}const ye=8,we=110,ve=70,V=.5,je=6,O={type:"spring",stiffness:520,damping:42};function Se(n){const s=h.useRef(n);h.useLayoutEffect(()=>{s.current=n});const o=h.useRef(new Set),e=h.useRef(null),c=h.useRef(null),f=h.useRef(!1),a=()=>{const{x:r,y:l,scale:x,backdrop:y}=s.current;d(r,0,O),d(l,0,O),d(x,1,O),d(y,1,O)},u=r=>{var l;if(c.current={x:r.clientX,y:r.clientY},f.current=!1,r.pointerType!=="mouse"){if(o.current.add(r.pointerId),o.current.size>1){(l=e.current)!=null&&l.axis&&a(),e.current=null;return}e.current=s.current.canGesture()?{id:r.pointerId,startX:r.clientX,startY:r.clientY,startTime:r.timeStamp,axis:null}:null}},j=r=>{c.current&&Math.hypot(r.clientX-c.current.x,r.clientY-c.current.y)>je&&(f.current=!0);const l=e.current;if(!l||l.id!==r.pointerId)return;const x=r.clientX-l.startX,y=r.clientY-l.startY;if(l.axis===null){if(Math.max(Math.abs(x),Math.abs(y))<ye)return;l.axis=Math.abs(y)>Math.abs(x)?"y":"x"}const{x:v,y:k,scale:C,backdrop:S,canStep:T}=s.current;if(l.axis==="y"){const N=Math.min(Math.abs(y)/320,1);k.set(y),C.set(1-N*.12),S.set(1-N*.7)}else v.set(T(x<0?1:-1)?x:x*.25)},p=r=>{o.current.delete(r.pointerId);const l=e.current;if(!l||l.id!==r.pointerId||(e.current=null,l.axis===null))return;const x=Math.max(r.timeStamp-l.startTime,1),{canStep:y,onDismiss:v,onStep:k}=s.current;if(r.type==="pointercancel"){a();return}if(l.axis==="y"){const N=r.clientY-l.startY;Math.abs(N)>we||Math.abs(N)/x>V?v():a();return}const C=r.clientX-l.startX,S=C<0?1:-1;(Math.abs(C)>ve||Math.abs(C)/x>V)&&y(S)?k(S):a()};return{handlers:{onPointerDown:u,onPointerMove:j,onPointerUp:p,onPointerCancel:p},endedDrag:()=>f.current}}const A={type:"spring",stiffness:360,damping:34,mass:.9},U={type:"spring",stiffness:420,damping:40},P={duration:.16,ease:"easeOut"},Z=72,w=n=>n.stopPropagation(),Ne={onClick:w,onDoubleClick:w,onContextMenu:w,onKeyDown:w,onKeyUp:w,onPointerDown:w,onPointerMove:w,onPointerUp:w,onPointerCancel:w,onTouchStart:w,onTouchMove:w,onTouchEnd:w,onWheel:w};function Ee({open:n,onOpenChange:s,images:o,index:e,onIndexChange:c,getTrigger:f}){const a=te()===!0,u=z(0),j=z(0),p=z(1),r=z(1),l=z(0),x=he(l,[.55,1],[0,1]),y=h.useRef(null),v=h.useRef("idle"),k=h.useRef(!1),C=h.useRef(async()=>{}),S=h.useRef(null),[T,N]=h.useState(null),[ee,F]=h.useState({}),g=o[e],E=o.length,K=g?ee[g.src]??"loading":"loading",M=g!==void 0&&T===g.src;h.useLayoutEffect(()=>{var I,R;if(!n)return;v.current="idle",k.current=!1,S.current=null,u.set(0),j.set(0),p.set(1),d(l,1,a?P:{duration:.24,ease:"easeOut"});const t=(I=f==null?void 0:f(e))==null?void 0:I.querySelector("img"),m=(R=y.current)==null?void 0:R.getBoundingClientRect(),b=!a&&t&&m?q(t,m,{width:window.innerWidth,height:window.innerHeight}):null;b?(u.set(b.x),j.set(b.y),p.set(b.scale),r.set(1),d(u,0,A),d(j,0,A),d(p,1,A)):(r.set(0),a||p.set(.96),d(r,1,P),d(p,1,P))},[n]),h.useLayoutEffect(()=>{const t=S.current;t!==null&&(S.current=null,j.set(0),p.set(1),u.set(a?0:t*Z),d(u,0,O),d(r,1,P).then(()=>{v.current="idle",k.current&&(k.current=!1,C.current())}))},[e,r,a,u,j,p]),h.useEffect(()=>{if(n)for(const t of[o[e-1],o[e+1]])t&&(new Image().src=t.src)},[n,o,e]);const L=h.useCallback(async()=>{var R,X;if(v.current==="closing")return;if(v.current==="stepping"){k.current=!0;return}v.current="closing",N(null);const t=(R=f==null?void 0:f(e))==null?void 0:R.querySelector("img"),m=(X=y.current)==null?void 0:X.getBoundingClientRect(),b=!a&&!M&&t&&m?q(t,m,{width:window.innerWidth,height:window.innerHeight}):null,I=d(l,0,a?P:{duration:.22,ease:"easeIn"});b?await Promise.all([d(u,b.x,U),d(j,b.y,U),d(p,b.scale,U),I]):await Promise.all([d(r,0,P),a?null:d(p,p.get()*.96,P),I]),s==null||s(!1)},[l,f,e,s,r,a,p,u,j,M]);h.useLayoutEffect(()=>{C.current=L},[L]);const D=h.useCallback(async t=>{const m=e+t;v.current!=="idle"||m<0||m>=E||(v.current="stepping",await Promise.all([a?null:d(u,-t*Z+u.get()*.5,P),d(r,0,{duration:.1})]),S.current=t,c(m))},[E,e,c,r,a,u]),B=Se({x:u,y:j,scale:p,backdrop:l,canGesture:()=>v.current==="idle"&&!M,canStep:t=>e+t>=0&&e+t<E,onDismiss:()=>void L(),onStep:t=>void D(t)});return g?i.jsx(ne,{open:n,onOpenChange:t=>{t||L()},children:i.jsx(se,{container:document.body,children:i.jsxs("div",{className:"contents",...Ne,children:[i.jsx(oe,{asChild:!0,children:i.jsx(_.div,{"data-slot":"image-lightbox-backdrop",style:{opacity:l},className:"bg-background/90 fixed inset-0 z-50 backdrop-blur-xl"})}),i.jsxs(re,{"data-slot":"image-lightbox","aria-describedby":void 0,onOpenAutoFocus:t=>{var m;t.preventDefault(),(m=t.currentTarget)==null||m.focus()},onFocusOutside:t=>t.preventDefault(),onCloseAutoFocus:t=>{const m=f==null?void 0:f(e);m&&(t.preventDefault(),m.focus({preventScroll:!0}))},onKeyDown:t=>{t.key==="ArrowRight"?D(1):t.key==="ArrowLeft"&&D(-1)},onClick:t=>{var R,X;const m=t.target;if(B.endedDrag()||m.closest("button"))return;const b=(X=(R=y.current)==null?void 0:R.querySelector("img"))==null?void 0:X.getBoundingClientRect();b!==void 0&&t.clientX>=b.left&&t.clientX<=b.right&&t.clientY>=b.top&&t.clientY<=b.bottom||L()},...B.handlers,className:"fixed inset-0 z-50 flex touch-none flex-col outline-none select-none",children:[i.jsx(ie,{className:"sr-only",children:g.alt||"Image"}),i.jsxs(_.div,{style:{opacity:x},className:"flex shrink-0 items-center justify-between gap-2 pt-[max(0.75rem,env(safe-area-inset-top))] pr-[max(0.75rem,env(safe-area-inset-right))] pb-2 pl-[max(0.75rem,env(safe-area-inset-left))]",children:[i.jsxs("p",{"aria-live":"polite",className:Y("text-muted-foreground px-2 text-sm tabular-nums",E<2&&"invisible"),children:[e+1," of ",E]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(W,{label:"Download image",onClick:()=>void be(g),children:i.jsx(ce,{className:"size-[18px]"})}),i.jsx(W,{label:"Close",onClick:()=>void L(),children:i.jsx(ae,{className:"size-5"})})]})]}),i.jsxs("div",{className:"relative min-h-0 flex-1 px-3 sm:px-20",children:[i.jsxs("div",{ref:y,className:"relative h-full w-full",children:[i.jsx(_.div,{style:{x:u,y:j,scale:p,opacity:r},className:"h-full w-full",children:i.jsx(fe,{centerOnInit:!0,minScale:1,maxScale:8,doubleClick:{mode:"toggle",step:1.2},wheel:{step:.15},panning:{disabled:!M,velocityDisabled:!0},onTransform:(t,m)=>N(m.scale>1.01?g.src:null),children:i.jsx(me,{wrapperClass:"!h-full !w-full",contentClass:"!h-full !w-full flex items-center justify-center",children:K==="error"?i.jsxs("p",{className:"text-muted-foreground flex items-center gap-2 text-sm",children:[i.jsx(pe,{"aria-hidden":!0,className:"size-4"}),"This image couldn’t be loaded."]}):i.jsx("img",{src:g.src,alt:g.alt,draggable:!1,onLoad:()=>F(t=>({...t,[g.src]:"loaded"})),onError:()=>F(t=>({...t,[g.src]:"error"})),className:Y("max-h-full max-w-full rounded-lg object-contain shadow-2xl shadow-black/25",M?"cursor-grab active:cursor-grabbing":"cursor-zoom-in")})})},g.src)}),K==="loading"&&i.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:i.jsx(le,{size:"md",label:"Loading image",className:"text-muted-foreground"})})]}),e>0&&i.jsx(J,{direction:-1,fade:x,onClick:()=>void D(-1)}),e<E-1&&i.jsx(J,{direction:1,fade:x,onClick:()=>void D(1)})]}),i.jsx(_.div,{style:{opacity:x},className:"flex min-h-12 shrink-0 items-center justify-center px-6 pt-2 pb-[max(0.75rem,env(safe-area-inset-bottom))]",children:g.alt&&i.jsx("p",{className:"text-muted-foreground line-clamp-2 max-w-prose text-center text-sm",children:g.alt})})]})]})})}):null}function W({label:n,onClick:s,fade:o,className:e,children:c}){return i.jsx(_.button,{type:"button","aria-label":n,title:n,onClick:s,style:o?{opacity:o}:void 0,className:Y("focus-ring bg-background/70 text-foreground border-border/60 hover:bg-background","flex size-10 items-center justify-center rounded-full border shadow-sm backdrop-blur-md","transition-colors duration-150 motion-reduce:transition-none",e),children:c})}function J({direction:n,fade:s,onClick:o}){return i.jsx(W,{label:n===1?"Next image":"Previous image",onClick:o,fade:s,className:Y("absolute top-1/2 hidden -translate-y-1/2 sm:flex",n===1?"right-4":"left-4"),children:n===1?i.jsx(ue,{className:"size-5"}):i.jsx(de,{className:"size-5"})})}export{Ee as ImageLightbox};
@@ -1,4 +1,4 @@
1
- import{fs as h,ft as f,fu as x,r as i,fv as k,fw as V,fx as C,fy as I,fz as y,W as z}from"./index-Dc5cpBoO.js";function E(...e){const n=!Array.isArray(e[0]),t=n?0:-1,s=e[0+t],o=e[1+t],a=e[2+t],c=e[3+t],r=h(o,a,c);return n?r(s):r}function L(e){const n=f(()=>x(e)),{isStatic:t}=i.useContext(k);if(t){const[,s]=i.useState(e);i.useEffect(()=>n.on("change",s),[])}return n}function d(e,n){const t=L(n()),s=()=>t.set(n());return s(),V(()=>{const o=()=>I.preRender(s,!1,!0),a=e.map(c=>c.on("change",o));return()=>{a.forEach(c=>c()),C(s)}}),t}function M(e){y.current=[],e();const n=d(y.current,e);return y.current=void 0,n}function b(e,n,t,s){if(typeof e=="function")return M(e);if(t!==void 0&&!Array.isArray(t)&&typeof n!="function")return j(e,n,t,s);const c=typeof n=="function"?n:E(n,t,s),r=Array.isArray(e)?l(e,c):l([e],([A])=>c(A)),u=Array.isArray(e)?void 0:e.accelerate;return u&&!u.isTransformed&&typeof n!="function"&&Array.isArray(t)&&(s==null?void 0:s.clamp)!==!1&&(r.accelerate={...u,times:n,keyframes:t,isTransformed:!0}),r}function l(e,n){const t=f(()=>[]);return d(e,()=>{t.length=0;const s=e.length;for(let o=0;o<s;o++)t[o]=e[o].get();return n(t)})}function j(e,n,t,s){const o=f(()=>Object.keys(t)),a=f(()=>({}));for(const c of o)a[c]=b(e,n,t[c],s);return a}/**
1
+ import{ft as h,fu as f,fv as x,r as i,fw as k,fx as V,fy as C,fz as I,fA as y,W as z}from"./index-DcZPWi_I.js";function E(...e){const n=!Array.isArray(e[0]),t=n?0:-1,s=e[0+t],o=e[1+t],a=e[2+t],c=e[3+t],r=h(o,a,c);return n?r(s):r}function L(e){const n=f(()=>x(e)),{isStatic:t}=i.useContext(k);if(t){const[,s]=i.useState(e);i.useEffect(()=>n.on("change",s),[])}return n}function d(e,n){const t=L(n()),s=()=>t.set(n());return s(),V(()=>{const o=()=>I.preRender(s,!1,!0),a=e.map(c=>c.on("change",o));return()=>{a.forEach(c=>c()),C(s)}}),t}function M(e){y.current=[],e();const n=d(y.current,e);return y.current=void 0,n}function b(e,n,t,s){if(typeof e=="function")return M(e);if(t!==void 0&&!Array.isArray(t)&&typeof n!="function")return j(e,n,t,s);const c=typeof n=="function"?n:E(n,t,s),r=Array.isArray(e)?l(e,c):l([e],([A])=>c(A)),u=Array.isArray(e)?void 0:e.accelerate;return u&&!u.isTransformed&&typeof n!="function"&&Array.isArray(t)&&(s==null?void 0:s.clamp)!==!1&&(r.accelerate={...u,times:n,keyframes:t,isTransformed:!0}),r}function l(e,n){const t=f(()=>[]);return d(e,()=>{t.length=0;const s=e.length;for(let o=0;o<s;o++)t[o]=e[o].get();return n(t)})}function j(e,n,t,s){const o=f(()=>Object.keys(t)),a=f(()=>({}));for(const c of o)a[c]=b(e,n,t[c],s);return a}/**
2
2
  * @license lucide-react v1.48.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{hN as ft,hO as ht,hP as mt,hQ as pt,hR as dt,hS as st,hT as rt,hU as gt,hV as yt,hW as At,hX as St,hY as Et,hZ as vt,h_ as Vt,h$ as Mt,i0 as Tt,i1 as Dt,i2 as Ot,i3 as L,i4 as bt,i5 as xt,fu as wt,i6 as Ft}from"./index-Dc5cpBoO.js";const Gt=(e,t,n)=>{const i=t-e;return((n-e)%i+i)%i+e};function at(e,t){return ft(e)?e[Gt(0,e.length,t)]:e}class It{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let i=0;i<this.animations.length;i++)this.animations[i][t]=n}attachTimeline(t){const n=this.animations.map(i=>i.attachTimeline(t));return()=>{n.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return tt(this.animations,"duration")}get iterationDuration(){return tt(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function tt(e,t){let n=0;for(let i=0;i<e.length;i++){const s=e[i][t];s!==null&&s>n&&(n=s)}return n}class Kt extends It{then(t,n){return this.finished.finally(t).then(()=>{})}}function Nt(e,t){return e in t}class Ct extends ht{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(Nt(n,t)){const i=t[n];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return mt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function W(e){return typeof e=="object"&&!Array.isArray(e)}function ot(e,t,n,i){return e==null?[]:typeof e=="string"&&W(t)?pt(e,n,i):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(s=>s!=null):[e]}function Bt(e,t,n){return e*(t+1)+n*t}function et(e,t,n,i){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):i.get(t)??e}function Lt(e,t,n){for(let i=0;i<e.length;i++){const s=e[i];s.at>t&&s.at<n&&(st(e,s),i--)}}function Pt(e,t,n,i,s,c){Lt(e,s,c);for(let r=0;r<t.length;r++)e.push({value:t[r],at:dt(s,c,i[r]),easing:at(n,r)})}function Rt(e,t,n=0){const i=t+1+t*n;for(let s=0;s<e.length;s++)e[s]=e[s]/i}function Wt(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const jt="easeInOut",_t=20;function Ut(e,{defaultTransition:t={},...n}={},i,s){const c=t.duration||.3,r=new Map,u=new Map,l={},h=new Map;let d=0,o=0,g=0;for(let y=0;y<e.length;y++){const A=e[y];if(typeof A=="string"){h.set(A,o);continue}else if(!Array.isArray(A)){h.set(A.name,et(o,A.at,d,h));continue}let[D,S,f={}]=A;f.at!==void 0&&(o=et(o,f.at,d,h));let m=0;const b=(v,x,M,O=0,G=0)=>{const a=kt(v),{delay:I=0,times:E=gt(a),type:P=t.type||"keyframes",repeat:K,repeatType:R,repeatDelay:j=0,...ut}=x;let{ease:V=t.ease||"easeOut",duration:p}=x;const _=typeof I=="function"?I(O,G):I,U=a.length,k=Et(P)?P:s==null?void 0:s[P||"keyframes"];if(U<=2&&k){let w=100;if(U===2&&qt(a)){const N=a[1]-a[0];w=Math.abs(N)}const F={...t,...ut};p!==void 0&&(F.duration=vt(p));const B=yt(F,w,k);V=B.ease,p=B.duration}p??(p=c);const z=o+_;E.length===1&&E[0]===0&&(E[1]=1);const X=E.length-a.length;if(X>0&&At(E,X),a.length===1&&a.unshift(null),K&&K<_t){const w=p>0?j/p:0;p=Bt(p,K,j);const F=[...a],B=[...E];V=Array.isArray(V)?[...V]:[V];const N=[...V],H=R==="reverse"||R==="mirror";let Q=F,Y=N;H&&(Q=[...F].reverse(),R==="reverse"&&(Y=[...N].reverse().map(T=>typeof T=="function"?St(T):T)));for(let T=0;T<K;T++){const Z=H&&T%2===0,$=Z?Q:F,ct=Z?Y:N,J=(T+1)*(1+w);w>0&&(a.push(a[a.length-1]),E.push(J),V.push("linear")),a.push(...$);for(let C=0;C<$.length;C++)E.push(B[C]+J),V.push(C===0?"linear":at(ct,C-1))}Rt(E,K,w)}const q=z+p;Pt(M,a,V,E,z,q),m=Math.max(_+p,m),g=Math.max(q,g)};if(rt(D)){const v=nt(D,u);b(S,f,it("default",v))}else{const v=ot(D,S,i,l),x=v.length;for(let M=0;M<x;M++){S=S,f=f;const O=v[M],G=nt(O,u);for(const a in S)b(S[a],zt(f,a),it(a,G),M,x)}}d=o,o+=m}return u.forEach((y,A)=>{for(const D in y){const S=y[D];S.sort(Wt);const f=[],m=[],b=[];for(let O=0;O<S.length;O++){const{at:G,value:a,easing:I}=S[O];f.push(a),m.push(Vt(0,g,G)),b.push(I||"easeOut")}m[0]!==0&&(m.unshift(0),f.unshift(f[0]),b.unshift(jt)),m[m.length-1]!==1&&(m.push(1),f.push(null)),r.has(A)||r.set(A,{keyframes:{},transition:{}});const v=r.get(A);v.keyframes[D]=f;const{type:x,...M}=t;v.transition[D]={...M,duration:g,ease:b,times:m,...n}}}),r}function nt(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function it(e,t){return t[e]||(t[e]=[]),t[e]}function kt(e){return Array.isArray(e)?e:[e]}function zt(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const Xt=e=>typeof e=="number",qt=e=>e.every(Xt);function Ht(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Mt(e)&&!Tt(e)?new Dt(t):new Ot(t);n.mount(e),L.set(e,n)}function Qt(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Ct(t);n.mount(e),L.set(e,n)}function Yt(e,t){return rt(e)||typeof e=="number"||typeof e=="string"&&!W(t)}function lt(e,t,n,i){const s=[];if(Yt(e,t))s.push(bt(e,W(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return s;const c=ot(e,t,i),r=c.length;for(let u=0;u<r;u++){const l=c[u],h=l instanceof Element?Ht:Qt;L.has(l)||h(l);const d=L.get(l),o={...n};"delay"in o&&typeof o.delay=="function"&&(o.delay=o.delay(u,r)),s.push(...xt(d,{...t,transition:o},{}))}}return s}function Zt(e,t,n){const i=[],s=e.map(r=>{if(Array.isArray(r)&&typeof r[0]=="function"){const u=r[0],l=wt(0);return l.on("change",u),r.length===1?[l,[0,1]]:r.length===2?[l,[0,1],r[1]]:[l,r[1],r[2]]}return r});return Ut(s,t,n,{spring:Ft}).forEach(({keyframes:r,transition:u},l)=>{i.push(...lt(l,r,u))}),i}function $t(e){return Array.isArray(e)&&e.some(Array.isArray)}function Jt(e={}){const{scope:t,reduceMotion:n,skipAnimations:i}=e;function s(c,r,u){let l=[],h;const d={};if(n!==void 0&&(d.reduceMotion=n),i!==void 0&&(d.skipAnimations=i),$t(c)){const{onComplete:g,...y}=r||{};typeof g=="function"&&(h=g),l=Zt(c,{...d,...y},t)}else{const{onComplete:g,...y}=u||{};typeof g=="function"&&(h=g),l=lt(c,r,{...d,...y},t)}const o=new Kt(l);return h&&o.finished.then(h),t&&(t.animations.push(o),o.finished.then(()=>{st(t.animations,o)})),o}return s}const ee=Jt();export{ee as a};
1
+ import{hP as ft,hQ as ht,hR as mt,hS as pt,hT as dt,hU as st,hV as rt,hW as gt,hX as yt,hY as At,hZ as St,h_ as Et,h$ as vt,i0 as Vt,i1 as Mt,i2 as Tt,i3 as Dt,i4 as bt,i5 as L,i6 as Ot,i7 as xt,fv as wt,i8 as Ft}from"./index-DcZPWi_I.js";const Gt=(e,t,n)=>{const i=t-e;return((n-e)%i+i)%i+e};function at(e,t){return ft(e)?e[Gt(0,e.length,t)]:e}class It{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let i=0;i<this.animations.length;i++)this.animations[i][t]=n}attachTimeline(t){const n=this.animations.map(i=>i.attachTimeline(t));return()=>{n.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return tt(this.animations,"duration")}get iterationDuration(){return tt(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function tt(e,t){let n=0;for(let i=0;i<e.length;i++){const s=e[i][t];s!==null&&s>n&&(n=s)}return n}class Kt extends It{then(t,n){return this.finished.finally(t).then(()=>{})}}function Ct(e,t){return e in t}class Nt extends ht{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(Ct(n,t)){const i=t[n];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return mt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function W(e){return typeof e=="object"&&!Array.isArray(e)}function ot(e,t,n,i){return e==null?[]:typeof e=="string"&&W(t)?pt(e,n,i):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(s=>s!=null):[e]}function Bt(e,t,n){return e*(t+1)+n*t}function et(e,t,n,i){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):i.get(t)??e}function Lt(e,t,n){for(let i=0;i<e.length;i++){const s=e[i];s.at>t&&s.at<n&&(st(e,s),i--)}}function Pt(e,t,n,i,s,c){Lt(e,s,c);for(let r=0;r<t.length;r++)e.push({value:t[r],at:dt(s,c,i[r]),easing:at(n,r)})}function Rt(e,t,n=0){const i=t+1+t*n;for(let s=0;s<e.length;s++)e[s]=e[s]/i}function Wt(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const jt="easeInOut",_t=20;function Ut(e,{defaultTransition:t={},...n}={},i,s){const c=t.duration||.3,r=new Map,u=new Map,l={},h=new Map;let d=0,o=0,g=0;for(let y=0;y<e.length;y++){const A=e[y];if(typeof A=="string"){h.set(A,o);continue}else if(!Array.isArray(A)){h.set(A.name,et(o,A.at,d,h));continue}let[D,S,f={}]=A;f.at!==void 0&&(o=et(o,f.at,d,h));let m=0;const O=(v,x,M,b=0,G=0)=>{const a=kt(v),{delay:I=0,times:E=gt(a),type:P=t.type||"keyframes",repeat:K,repeatType:R,repeatDelay:j=0,...ut}=x;let{ease:V=t.ease||"easeOut",duration:p}=x;const _=typeof I=="function"?I(b,G):I,U=a.length,k=Et(P)?P:s==null?void 0:s[P||"keyframes"];if(U<=2&&k){let w=100;if(U===2&&qt(a)){const C=a[1]-a[0];w=Math.abs(C)}const F={...t,...ut};p!==void 0&&(F.duration=vt(p));const B=yt(F,w,k);V=B.ease,p=B.duration}p??(p=c);const z=o+_;E.length===1&&E[0]===0&&(E[1]=1);const X=E.length-a.length;if(X>0&&At(E,X),a.length===1&&a.unshift(null),K&&K<_t){const w=p>0?j/p:0;p=Bt(p,K,j);const F=[...a],B=[...E];V=Array.isArray(V)?[...V]:[V];const C=[...V],H=R==="reverse"||R==="mirror";let Q=F,Y=C;H&&(Q=[...F].reverse(),R==="reverse"&&(Y=[...C].reverse().map(T=>typeof T=="function"?St(T):T)));for(let T=0;T<K;T++){const Z=H&&T%2===0,$=Z?Q:F,ct=Z?Y:C,J=(T+1)*(1+w);w>0&&(a.push(a[a.length-1]),E.push(J),V.push("linear")),a.push(...$);for(let N=0;N<$.length;N++)E.push(B[N]+J),V.push(N===0?"linear":at(ct,N-1))}Rt(E,K,w)}const q=z+p;Pt(M,a,V,E,z,q),m=Math.max(_+p,m),g=Math.max(q,g)};if(rt(D)){const v=nt(D,u);O(S,f,it("default",v))}else{const v=ot(D,S,i,l),x=v.length;for(let M=0;M<x;M++){S=S,f=f;const b=v[M],G=nt(b,u);for(const a in S)O(S[a],zt(f,a),it(a,G),M,x)}}d=o,o+=m}return u.forEach((y,A)=>{for(const D in y){const S=y[D];S.sort(Wt);const f=[],m=[],O=[];for(let b=0;b<S.length;b++){const{at:G,value:a,easing:I}=S[b];f.push(a),m.push(Vt(0,g,G)),O.push(I||"easeOut")}m[0]!==0&&(m.unshift(0),f.unshift(f[0]),O.unshift(jt)),m[m.length-1]!==1&&(m.push(1),f.push(null)),r.has(A)||r.set(A,{keyframes:{},transition:{}});const v=r.get(A);v.keyframes[D]=f;const{type:x,...M}=t;v.transition[D]={...M,duration:g,ease:O,times:m,...n}}}),r}function nt(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function it(e,t){return t[e]||(t[e]=[]),t[e]}function kt(e){return Array.isArray(e)?e:[e]}function zt(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const Xt=e=>typeof e=="number",qt=e=>e.every(Xt);function Ht(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Mt(e)&&!Tt(e)?new Dt(t):new bt(t);n.mount(e),L.set(e,n)}function Qt(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Nt(t);n.mount(e),L.set(e,n)}function Yt(e,t){return rt(e)||typeof e=="number"||typeof e=="string"&&!W(t)}function lt(e,t,n,i){const s=[];if(Yt(e,t))s.push(Ot(e,W(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return s;const c=ot(e,t,i),r=c.length;for(let u=0;u<r;u++){const l=c[u],h=l instanceof Element?Ht:Qt;L.has(l)||h(l);const d=L.get(l),o={...n};"delay"in o&&typeof o.delay=="function"&&(o.delay=o.delay(u,r)),s.push(...xt(d,{...t,transition:o},{}))}}return s}function Zt(e,t,n){const i=[],s=e.map(r=>{if(Array.isArray(r)&&typeof r[0]=="function"){const u=r[0],l=wt(0);return l.on("change",u),r.length===1?[l,[0,1]]:r.length===2?[l,[0,1],r[1]]:[l,r[1],r[2]]}return r});return Ut(s,t,n,{spring:Ft}).forEach(({keyframes:r,transition:u},l)=>{i.push(...lt(l,r,u))}),i}function $t(e){return Array.isArray(e)&&e.some(Array.isArray)}function Jt(e={}){const{scope:t,reduceMotion:n,skipAnimations:i}=e;function s(c,r,u){let l=[],h;const d={};if(n!==void 0&&(d.reduceMotion=n),i!==void 0&&(d.skipAnimations=i),$t(c)){const{onComplete:g,...y}=r||{};typeof g=="function"&&(h=g),l=Zt(c,{...d,...y},t)}else{const{onComplete:g,...y}=u||{};typeof g=="function"&&(h=g),l=lt(c,r,{...d,...y},t)}const o=new Kt(l);return h&&o.finished.then(h),t&&(t.animations.push(o),o.finished.then(()=>{st(t.animations,o)})),o}return s}const ee=Jt();export{ee as a};
@@ -1 +1 @@
1
- import{j as e,bK as M,bL as w,e as i,bM as C,bN as O,aW as u,bO as I,bP as L,z,bQ as F,bR as v,r as l,bS as T,bT as U,bU as _,bV as q,bW as K,bX as V,bY as W,bZ as $}from"./index-Dc5cpBoO.js";import{b_ as te,b$ as ne,c0 as ae,c1 as re,c2 as oe,d as le}from"./index-Dc5cpBoO.js";import{O as ce,u as de,a as ue,b as fe}from"./OperatorIdentityForm-CtWgz2yi.js";import{h as xe,i as he,e as pe}from"./profile-errors-JW2XTgia.js";import{P as je,a as Pe}from"./ProfilePanelContainer-CkxX9Dps.js";import"./use-mounted-ref-Ch0wqQry.js";import"./ProfileFields-DFRnRR38.js";import"./ProfileRolePicker-BSYi_luB.js";function Q(){return e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-6 text-center",children:[e.jsx("div",{className:"bg-muted flex size-12 items-center justify-center rounded-full",children:e.jsx(M,{className:"text-muted-foreground size-5"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"No agent selected"}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Pick an agent to see its profile."})]})]})}function X({agentPath:s}){return e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-6 text-center",children:[e.jsx("div",{className:"bg-destructive/10 flex size-12 items-center justify-center rounded-full",children:e.jsx(w,{className:"text-destructive size-5"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"Agent not found"}),e.jsx("p",{className:"text-muted-foreground font-mono text-xs break-all",children:s}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Nothing here could be opened as an agent."})]})]})}function Y(){return e.jsxs("div",{"data-slot":"profile-dock-skeleton",className:"flex h-full flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex flex-col items-center gap-2 px-4 pt-6 pb-4",children:[e.jsx(i,{className:"size-16 rounded-full"}),e.jsx(i,{className:"mt-1 h-4 w-28 rounded"}),e.jsx(i,{className:"h-3 w-16 rounded"}),e.jsx(i,{className:"h-3 w-36 rounded"})]}),e.jsx("div",{className:"space-y-2 px-4",children:["w-full","w-full","w-full"].map((s,f)=>e.jsx(i,{className:`h-8 ${s} rounded`},f))})]})}function J(){var N;const s=C(),f=O(),p=u(t=>t.rightPanelOpen),S=I(),c=L(s??void 0),g=z({enabled:c!==void 0}),r=(N=g.data)==null?void 0:N.members,D=c===void 0||r==null?void 0:r.find(t=>t.id===c),m=S.isFetched&&(c===void 0||g.isFetched),n=D??null,j=F(s),d=v(t=>t.setDockedEntries),x=v(t=>t.clearDockedStacks),E=u(t=>t.setRightPanelOpen),P=u(t=>t.releaseRightPanelRequest),[y,h]=l.useState(!1),a=l.useMemo(()=>n?T(n.id,[...j]):null,[n,j]),b=a===null?null:U(a),o=(b===(n==null?void 0:n.id)?n:r==null?void 0:r.find(t=>t.id===b))??n,R=l.useCallback(t=>{!s||!a||d(s,_(a,t).entries)},[s,a,d]),A=l.useCallback(()=>{!s||!a||d(s,q(a).entries)},[s,a,d]);l.useEffect(()=>{s===null||!m||o!==null||P(s)},[s,m,o,P]);const k=K(o===null?null:{home:"docked",memberId:o.id});return l.useEffect(()=>{if(p)return()=>{if(!u.getState().rightPanelOpen){if(V(k.read()))return h(!0);x()}}},[p,x,k]),s?!n||!a||!o?m?e.jsx(X,{agentPath:s}):e.jsx(Y,{}):e.jsxs("div",{"data-slot":"profile-dock",className:"flex h-full min-h-0 flex-col overflow-hidden",children:[e.jsx(W,{member:o,roster:r??[],home:"docked",inOwnSession:s===f.agentPath&&o.id===n.id,stack:a,onPush:R,onPop:A}),e.jsx($,{open:y,onKeep:()=>{h(!1),E(!0)},onDiscard:()=>{h(!1),x()}})]}):e.jsx(Q,{})}export{te as AccountMenu,ne as AccountMenuContainer,ce as OperatorIdentityForm,ae as PROFILE_PANEL_ID,J as ProfileDock,je as ProfilePanel,Pe as ProfilePanelContainer,re as ProfileSheet,oe as ProfileSheetContainer,W as ProfileView,le as deriveRelationship,xe as handleErrorMessage,he as identityLinkErrorMessage,T as profileStack,de as useLegacyProfileLinkRedirect,ue as useProfileDockDeepLink,fe as useProfileShortcut,v as useProfileStore,pe as useSetIdentityLinkedToMe};
1
+ import{j as e,bK as M,bL as w,e as i,bM as C,bN as O,aW as u,bO as I,bP as L,z,bQ as F,bR as v,r as l,bS as T,bT as U,bU as _,bV as q,bW as K,bX as V,bY as W,bZ as $}from"./index-DcZPWi_I.js";import{b_ as te,b$ as ne,c0 as ae,c1 as re,c2 as oe,d as le}from"./index-DcZPWi_I.js";import{O as ce,u as de,a as ue,b as fe}from"./OperatorIdentityForm-BKUSGrs6.js";import{h as xe,i as he,e as pe}from"./profile-errors-GbTNc2-M.js";import{P as je,a as Pe}from"./ProfilePanelContainer-CParzTPA.js";import"./use-mounted-ref-CZaegwTr.js";import"./ProfileFields-T3vVbHRC.js";import"./ProfileRolePicker-BU4eiMKn.js";function Q(){return e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-6 text-center",children:[e.jsx("div",{className:"bg-muted flex size-12 items-center justify-center rounded-full",children:e.jsx(M,{className:"text-muted-foreground size-5"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"No agent selected"}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Pick an agent to see its profile."})]})]})}function X({agentPath:s}){return e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-6 text-center",children:[e.jsx("div",{className:"bg-destructive/10 flex size-12 items-center justify-center rounded-full",children:e.jsx(w,{className:"text-destructive size-5"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"Agent not found"}),e.jsx("p",{className:"text-muted-foreground font-mono text-xs break-all",children:s}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Nothing here could be opened as an agent."})]})]})}function Y(){return e.jsxs("div",{"data-slot":"profile-dock-skeleton",className:"flex h-full flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex flex-col items-center gap-2 px-4 pt-6 pb-4",children:[e.jsx(i,{className:"size-16 rounded-full"}),e.jsx(i,{className:"mt-1 h-4 w-28 rounded"}),e.jsx(i,{className:"h-3 w-16 rounded"}),e.jsx(i,{className:"h-3 w-36 rounded"})]}),e.jsx("div",{className:"space-y-2 px-4",children:["w-full","w-full","w-full"].map((s,f)=>e.jsx(i,{className:`h-8 ${s} rounded`},f))})]})}function J(){var N;const s=C(),f=O(),p=u(t=>t.rightPanelOpen),S=I(),c=L(s??void 0),g=z({enabled:c!==void 0}),r=(N=g.data)==null?void 0:N.members,D=c===void 0||r==null?void 0:r.find(t=>t.id===c),m=S.isFetched&&(c===void 0||g.isFetched),n=D??null,j=F(s),d=v(t=>t.setDockedEntries),x=v(t=>t.clearDockedStacks),E=u(t=>t.setRightPanelOpen),P=u(t=>t.releaseRightPanelRequest),[y,h]=l.useState(!1),a=l.useMemo(()=>n?T(n.id,[...j]):null,[n,j]),b=a===null?null:U(a),o=(b===(n==null?void 0:n.id)?n:r==null?void 0:r.find(t=>t.id===b))??n,R=l.useCallback(t=>{!s||!a||d(s,_(a,t).entries)},[s,a,d]),A=l.useCallback(()=>{!s||!a||d(s,q(a).entries)},[s,a,d]);l.useEffect(()=>{s===null||!m||o!==null||P(s)},[s,m,o,P]);const k=K(o===null?null:{home:"docked",memberId:o.id});return l.useEffect(()=>{if(p)return()=>{if(!u.getState().rightPanelOpen){if(V(k.read()))return h(!0);x()}}},[p,x,k]),s?!n||!a||!o?m?e.jsx(X,{agentPath:s}):e.jsx(Y,{}):e.jsxs("div",{"data-slot":"profile-dock",className:"flex h-full min-h-0 flex-col overflow-hidden",children:[e.jsx(W,{member:o,roster:r??[],home:"docked",inOwnSession:s===f.agentPath&&o.id===n.id,stack:a,onPush:R,onPop:A}),e.jsx($,{open:y,onKeep:()=>{h(!1),E(!0)},onDiscard:()=>{h(!1),x()}})]}):e.jsx(Q,{})}export{te as AccountMenu,ne as AccountMenuContainer,ce as OperatorIdentityForm,ae as PROFILE_PANEL_ID,J as ProfileDock,je as ProfilePanel,Pe as ProfilePanelContainer,re as ProfileSheet,oe as ProfileSheetContainer,W as ProfileView,le as deriveRelationship,xe as handleErrorMessage,he as identityLinkErrorMessage,T as profileStack,de as useLegacyProfileLinkRedirect,ue as useProfileDockDeepLink,fe as useProfileShortcut,v as useProfileStore,pe as useSetIdentityLinkedToMe};
@@ -1 +1 @@
1
- import{j as n,r as u,a1 as oe,a3 as re,aW as F,B as E,I as ae,en as ce,c6 as le,gs as ie,gt as de,gu as ue}from"./index-Dc5cpBoO.js";import{u as he,L as z}from"./use-local-browser-zA8gMhcC.js";const G={embedded:"DorkOS browser","new-window":"New browser window"},me={embedded:"Browse here. Saved logins stay separate from your usual browser.","new-window":"Opens on the computer running DorkOS. Saved logins stay separate."};function we({value:t,onChange:s,capabilities:r,disabled:i}){var d;const a={embedded:!!(r!=null&&r.embedded)&&!!((d=window.electronAPI)!=null&&d.localBrowser),"new-window":!!(r!=null&&r.newWindow)};return n.jsxs("fieldset",{disabled:i,className:"space-y-2",children:[n.jsx("legend",{className:"sr-only",children:"Browser"}),Object.keys(G).map(l=>{var e;return n.jsxs("label",{className:"bg-muted/40 flex items-start gap-2 rounded-lg p-3",children:[n.jsx("input",{type:"radio",name:"local-browser-mode",value:l,checked:t===l,disabled:!a[l],onChange:()=>s(l),className:"mt-1"}),n.jsxs("span",{className:"min-w-0 space-y-1",children:[n.jsx("span",{className:"block text-sm font-medium",children:G[l]}),n.jsx("span",{className:"text-muted-foreground block text-xs",children:me[l]}),!a[l]&&n.jsx("span",{className:"text-muted-foreground block text-xs",children:((e=r==null?void 0:r.unavailableReasons)==null?void 0:e[l])??(l==="embedded"?"Requires the DorkOS desktop app.":"Available on your DorkOS computer.")})]})]},l)})]})}function pe(t,s,r,i){u.useEffect(()=>{var m,L;const a=(m=window.electronAPI)==null?void 0:m.localBrowser;if(!a||!s||!r)return;let d=!1,l=!1,e="",h=0,v=!1;const q=[];for(let c=(L=t.current)==null?void 0:L.parentElement;c;c=c.parentElement){const w=getComputedStyle(c);/(hidden|clip|auto|scroll)/.test(`${w.overflowX} ${w.overflowY}`)&&q.push(c)}const j=()=>{v=[...document.querySelectorAll('[role="dialog"][aria-modal="true"], [role="alertdialog"], [role="menu"], [data-radix-popper-content-wrapper]')].some(c=>!c.contains(t.current)&&c.getClientRects().length>0&&!c.hidden),R()},R=()=>{var T;if(d||l)return;const c=(T=t.current)==null?void 0:T.getBoundingClientRect();let w=(c==null?void 0:c.x)??0,p=(c==null?void 0:c.y)??0,A=w+((c==null?void 0:c.width)??0),x=p+((c==null?void 0:c.height)??0);for(const _ of q){const b=_.getBoundingClientRect();w=Math.max(w,b.x),p=Math.max(p,b.y),A=Math.min(A,b.x+b.width),x=Math.min(x,b.y+b.height)}const I=Math.max(0,A-w),g=Math.max(0,x-p),k=!!c&&!v&&document.visibilityState!=="hidden"&&I>0&&g>0,D={connectionId:s,x:w,y:p,width:I,height:g,visible:k},B=JSON.stringify(D);B!==e&&(e=B,a.setBounds(D).catch(()=>{d||(l=!0,i())}))},O=()=>{R(),!d&&!l&&(h=requestAnimationFrame(O))},C=new MutationObserver(j);return C.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-state","hidden","aria-modal","style","class"]}),j(),O(),()=>{d=!0,C.disconnect(),cancelAnimationFrame(h),a.setBounds({connectionId:s,x:0,y:0,width:0,height:0,visible:!1}).catch(()=>{})}},[t,s,r,i])}const ee={stale_page:"Page changed. Read it again before continuing.",navigation_uncertain:"Check what happened before continuing.",uncertain:"Check what happened before continuing.",paused:"Agent paused. Resume when ready.",busy:"Browser is busy. Wait a moment.",browser_download:"Couldn’t download the browser. Check your connection and try again.",cancelled:"Browser setup stopped. Open it again to continue.",focus_unavailable:"This tab stopped responding. Choose it again."},fe=["Free some space, then open the browser again.","Check folder permissions, then open the browser again."];function ge(t){const s=t;return(s==null?void 0:s.code)==="busy"&&s.message==="The browser is still closing. Wait before opening it again."?"The browser is still closing. Wait, then try again.":(s==null?void 0:s.code)==="busy"&&s.message==="Restart DorkOS to finish closing this browser."?"Restart DorkOS to finish closing this browser.":(s==null?void 0:s.code)==="browser_storage"?fe.find(i=>i===s.message)??"Couldn’t save the browser. Check free space and folder permissions.":(s!=null&&s.code&&Object.hasOwn(ee,s.code)?ee[s.code]:void 0)??"Couldn’t reach the browser. Reconnect and try again."}function xe(t){const s=u.useRef(null),r=u.useRef(null),i=a=>{r.current=document.activeElement===a?{action:a,interrupted:!1}:null};return u.useEffect(()=>{const a=l=>{const e=r.current;e&&l.target!==e.action&&!(l.type==="focusin"&&l.target===document.body)&&(e.interrupted=!0)},d=()=>{r.current&&(r.current.interrupted=!0)};return document.addEventListener("pointerdown",a,!0),document.addEventListener("keydown",a,!0),document.addEventListener("focusin",a,!0),window.addEventListener("blur",d),()=>{r.current=null,document.removeEventListener("pointerdown",a,!0),document.removeEventListener("keydown",a,!0),document.removeEventListener("focusin",a,!0),window.removeEventListener("blur",d)}},[]),u.useEffect(()=>{if(t||!r.current)return;const a=r.current;if(r.current=null,!a.interrupted&&document.activeElement===document.body&&document.hasFocus()){const d=s.current;d&&!d.disabled&&d.focus()}},[t]),{openButton:s,rememberFocus:i}}function be({preparation:t}){const s=t.stage==="checking"?"Checking browser files…":t.stage==="launching"?"Opening the browser…":t.component==="chromium"?"Downloading the browser…":t.component==="headless-shell"?"Downloading browser support…":t.component==="ffmpeg"?"Downloading video support…":"Downloading browser files…",r=t.component==="chromium"?"Browser download":t.component==="headless-shell"?"Browser support download":"Video support download",i=t.stage==="downloading"&&t.component&&t.percent!==null&&Number.isFinite(t.percent)&&t.percent>=0&&t.percent<=100?t.percent:null;return n.jsxs("div",{className:"space-y-1 text-xs","aria-live":"polite",children:[n.jsx("p",{children:s}),i!==null&&n.jsxs(n.Fragment,{children:[n.jsx("progress",{"aria-label":r,max:100,value:i,className:"w-full"}),n.jsxs("p",{children:[i,"%"]})]})]})}function ye({visible:t=!0,sessionId:s=null,agentName:r=null}){var J,X,Z;const i=oe(),a=re(),{state:d,capabilities:l}=he(),e=d.data,h=l.data,v=(J=d.error??l.error)==null?void 0:J.code,q=v==="local_only"?"Open DorkOS on your computer to use its browser.":v==="owner_only"?"Only this DorkOS owner can choose its browser.":"Couldn’t reach the browser. Reconnect and try again.",j=F(o=>o.localBrowserChoice),R=F(o=>o.localBrowserChoiceIssue),O=F(o=>o.setLocalBrowserChoice),C=!j&&R!==null,[m,L]=u.useState(!1),[c,w]=u.useState(!1),[p,A]=u.useState(null),[x,I]=u.useState(!1),g=u.useRef(0),k=u.useRef(null),[D,B]=u.useState(null),[T,_]=u.useState(null),[b,K]=u.useState(!1),U=u.useRef(null),S=(e==null?void 0:e.status)==="connected",W=!!(e!=null&&e.sessionId)&&e.sessionId!==s,f=S&&e.mode?e.mode:(j==null?void 0:j.mode)??(h!=null&&h.embedded&&((X=window.electronAPI)!=null&&X.localBrowser)?"embedded":"new-window"),Q=e==null?void 0:e.tabs.find(o=>o.id===e.selectedTabId),ne=u.useCallback(()=>K(!0),[]);u.useEffect(()=>()=>{g.current+=1},[]),pe(U,(e==null?void 0:e.connectionId)??null,t&&S&&!d.isError&&!W&&f==="embedded"&&!b,ne);const N=async(o,P=!1)=>{const y=++g.current;L(!0),w(P),B(null);try{if(P&&(await a.cancelQueries({queryKey:z}),y!==g.current))return!1;const M=await o();return y!==g.current||(await a.cancelQueries({queryKey:z}),y!==g.current)?!1:(a.setQueryData(z,M),!0)}catch(M){return y!==g.current||B(ge(M)),!1}finally{y===g.current&&(L(!1),w(!1))}},Y=()=>{O({mode:f}),A({sessionId:s,mode:f,previousConnectionId:(e==null?void 0:e.connectionId)??null,startedAt:Date.now()}),K(!1);const o=N(()=>i.openLocalBrowser({mode:f,...s?{sessionId:s}:{}}),!0);k.current=o,o.finally(()=>{k.current===o&&(k.current=null)})},se=async()=>{const o=k.current;I(!0);try{await N(()=>i.disconnectLocalBrowser())&&await a.invalidateQueries({queryKey:z}),await o}finally{I(!1)}},$=h&&(f==="embedded"?h.embedded&&!!((Z=window.electronAPI)!=null&&Z.localBrowser):h.newWindow),{openButton:te,rememberFocus:V}=xe(m||x||S||C||!$),H=c&&!x&&p&&(e!=null&&e.preparation)&&e.status==="disconnected"&&e.sessionId===p.sessionId&&e.mode===p.mode&&e.connectionId&&e.connectionId!==p.previousConnectionId&&d.dataUpdatedAt>=p.startedAt?e.preparation:null;return n.jsxs("section",{"aria-label":"Local browser","data-slot":"local-browser-panel",className:"flex h-full min-h-0 flex-col gap-3 p-3",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("h3",{className:"text-sm font-medium",children:S?G[f]:"Browser"}),n.jsx("span",{role:"status",className:"text-muted-foreground text-xs",children:x?"Cancelling…":c?"Preparing browser":m?"Updating…":(e==null?void 0:e.status)==="closed"?"Browser closed":S?e.paused?"Agent paused":"Connected":"Disconnected"})]}),c&&n.jsx(E,{size:"sm",variant:"outline",onClick:o=>{V(o.currentTarget),se()},children:"Cancel"}),H&&n.jsx(be,{preparation:H}),(D||d.isError||l.isError)&&n.jsx("p",{role:"alert",className:"text-sm",children:D??q}),(d.isError||l.isError)&&v!=="local_only"&&v!=="owner_only"&&n.jsx(E,{size:"sm",variant:"outline",onClick:()=>{d.refetch(),l.refetch()},children:"Reconnect"}),!S&&n.jsxs("div",{className:"min-h-0 space-y-3 overflow-y-auto",children:[R&&n.jsx("p",{className:"text-muted-foreground text-xs",children:C?"Choose a browser. The saved choice couldn’t be read.":"Browser choice couldn’t be saved. It lasts until this window closes."}),n.jsx(we,{value:C?null:f,onChange:o=>{O({mode:o})},capabilities:h,disabled:m||x}),(e==null?void 0:e.status)==="closed"&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Open it again to reconnect. Saved logins are kept."}),n.jsx(E,{ref:te,disabled:m||x||C||!$,onClick:Y,children:e!=null&&e.mode?"Reconnect":"Open browser"})]}),S&&n.jsxs(n.Fragment,{children:[W&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Shared with another chat. Disconnect to use it here."}),!e.sessionId&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Only you can use this page. Open from an agent chat to share it."}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx(E,{size:"sm",variant:"outline",disabled:m,onClick:()=>void N(()=>e.paused?i.resumeLocalBrowser():i.pauseLocalBrowser()),children:e.paused?"Resume agent":"Pause agent"}),n.jsx(E,{size:"sm",variant:"ghost",disabled:m,onClick:o=>{V(o.currentTarget),N(()=>i.disconnectLocalBrowser())},children:"Disconnect"})]}),n.jsxs("label",{className:"text-sm",children:[e.sessionId?W?"Shared with another chat":`Shared with ${r||"this chat’s agent"}`:"Browser tab",n.jsxs("select",{className:"bg-muted/40 mt-1 block w-full rounded-md p-2",value:e.selectedTabId??"",disabled:m,onChange:o=>{_(null),N(()=>i.selectLocalBrowserTab(o.target.value))},children:[!e.selectedTabId&&n.jsx("option",{value:"",children:"Choose a tab"}),e.tabs.map(o=>n.jsx("option",{value:o.id,children:o.title||(o.url==="about:blank"?"New tab":o.url)},o.id))]})]}),Q&&n.jsxs("form",{className:"flex gap-2",onSubmit:o=>{o.preventDefault();const P=T??Q.url;try{const y=new URL(P);if(!["http:","https:"].includes(y.protocol))throw new Error("unsupported");N(()=>i.navigateLocalBrowser(y.href)).then(M=>{M&&_(null)})}catch{B("Enter a full web address, starting with https:// or http://.")}},children:[n.jsx(ae,{"aria-label":"Web address",value:T??Q.url,onChange:o=>_(o.target.value),className:"min-w-0"}),n.jsx(E,{size:"sm",variant:"outline",type:"submit",disabled:m,children:"Go"})]}),e.paused&&n.jsxs("div",{className:"text-muted-foreground space-y-1 text-xs",children:[n.jsx("p",{children:"Pause stops new actions. An action already started may finish."}),n.jsx("p",{children:"Your mouse and keyboard still work."})]}),f!=="embedded"&&n.jsx("p",{className:"text-muted-foreground text-sm",children:"This page is in the separate browser window."}),f==="embedded"&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"This page stays in the right panel."}),f==="embedded"&&!W&&n.jsx("p",{className:"text-muted-foreground text-xs",children:e.sessionId?"Extra windows are for you. Your agent stays on this page.":"Extra windows are for you."}),f==="embedded"&&n.jsx("div",{ref:U,"data-slot":"native-browser-surface",className:"bg-muted/20 relative min-h-48 flex-1 rounded-lg",children:b&&n.jsxs("div",{className:"space-y-2 p-3",children:[n.jsx("p",{role:"alert",className:"text-sm",children:"Couldn’t show the page. Reconnect to try again."}),n.jsx(E,{size:"sm",variant:"outline",onClick:Y,disabled:m,children:"Reconnect"})]})})]})]})}function Ce(){const t=ce({select:h=>h.location.pathname}),[s]=le(),r=t==="/session"?s:null,{data:i}=ie(r,{enabled:!!r,nameOnly:!0}),{data:a}=de((i==null?void 0:i.cwd)??null),d=u.useContext(ue),l=F(h=>h.rightPanelOpen),e=F(h=>h.activeRightPanelTab);return n.jsx(ye,{visible:d&&l&&e==="local-browser",sessionId:t==="/session"?s:null,agentName:t==="/session"?a==null?void 0:a.name:null},t==="/session"?`chat:${s??""}`:"human-only")}export{Ce as LocalBrowserContent,ye as LocalBrowserPanel};
1
+ import{j as n,r as u,a1 as oe,a3 as re,aW as F,B as E,I as ae,eo as ce,c6 as le,gt as ie,gu as de,gv as ue}from"./index-DcZPWi_I.js";import{u as he,L as z}from"./use-local-browser-DCwzB4D8.js";const G={embedded:"DorkOS browser","new-window":"New browser window"},me={embedded:"Browse here. Saved logins stay separate from your usual browser.","new-window":"Opens on the computer running DorkOS. Saved logins stay separate."};function we({value:t,onChange:s,capabilities:r,disabled:i}){var d;const a={embedded:!!(r!=null&&r.embedded)&&!!((d=window.electronAPI)!=null&&d.localBrowser),"new-window":!!(r!=null&&r.newWindow)};return n.jsxs("fieldset",{disabled:i,className:"space-y-2",children:[n.jsx("legend",{className:"sr-only",children:"Browser"}),Object.keys(G).map(l=>{var e;return n.jsxs("label",{className:"bg-muted/40 flex items-start gap-2 rounded-lg p-3",children:[n.jsx("input",{type:"radio",name:"local-browser-mode",value:l,checked:t===l,disabled:!a[l],onChange:()=>s(l),className:"mt-1"}),n.jsxs("span",{className:"min-w-0 space-y-1",children:[n.jsx("span",{className:"block text-sm font-medium",children:G[l]}),n.jsx("span",{className:"text-muted-foreground block text-xs",children:me[l]}),!a[l]&&n.jsx("span",{className:"text-muted-foreground block text-xs",children:((e=r==null?void 0:r.unavailableReasons)==null?void 0:e[l])??(l==="embedded"?"Requires the DorkOS desktop app.":"Available on your DorkOS computer.")})]})]},l)})]})}function pe(t,s,r,i){u.useEffect(()=>{var m,L;const a=(m=window.electronAPI)==null?void 0:m.localBrowser;if(!a||!s||!r)return;let d=!1,l=!1,e="",h=0,v=!1;const q=[];for(let c=(L=t.current)==null?void 0:L.parentElement;c;c=c.parentElement){const w=getComputedStyle(c);/(hidden|clip|auto|scroll)/.test(`${w.overflowX} ${w.overflowY}`)&&q.push(c)}const j=()=>{v=[...document.querySelectorAll('[role="dialog"][aria-modal="true"], [role="alertdialog"], [role="menu"], [data-radix-popper-content-wrapper]')].some(c=>!c.contains(t.current)&&c.getClientRects().length>0&&!c.hidden),R()},R=()=>{var T;if(d||l)return;const c=(T=t.current)==null?void 0:T.getBoundingClientRect();let w=(c==null?void 0:c.x)??0,p=(c==null?void 0:c.y)??0,A=w+((c==null?void 0:c.width)??0),x=p+((c==null?void 0:c.height)??0);for(const _ of q){const b=_.getBoundingClientRect();w=Math.max(w,b.x),p=Math.max(p,b.y),A=Math.min(A,b.x+b.width),x=Math.min(x,b.y+b.height)}const I=Math.max(0,A-w),g=Math.max(0,x-p),k=!!c&&!v&&document.visibilityState!=="hidden"&&I>0&&g>0,D={connectionId:s,x:w,y:p,width:I,height:g,visible:k},B=JSON.stringify(D);B!==e&&(e=B,a.setBounds(D).catch(()=>{d||(l=!0,i())}))},O=()=>{R(),!d&&!l&&(h=requestAnimationFrame(O))},C=new MutationObserver(j);return C.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-state","hidden","aria-modal","style","class"]}),j(),O(),()=>{d=!0,C.disconnect(),cancelAnimationFrame(h),a.setBounds({connectionId:s,x:0,y:0,width:0,height:0,visible:!1}).catch(()=>{})}},[t,s,r,i])}const ee={stale_page:"Page changed. Read it again before continuing.",navigation_uncertain:"Check what happened before continuing.",uncertain:"Check what happened before continuing.",paused:"Agent paused. Resume when ready.",busy:"Browser is busy. Wait a moment.",browser_download:"Couldn’t download the browser. Check your connection and try again.",cancelled:"Browser setup stopped. Open it again to continue.",focus_unavailable:"This tab stopped responding. Choose it again."},fe=["Free some space, then open the browser again.","Check folder permissions, then open the browser again."];function ge(t){const s=t;return(s==null?void 0:s.code)==="busy"&&s.message==="The browser is still closing. Wait before opening it again."?"The browser is still closing. Wait, then try again.":(s==null?void 0:s.code)==="busy"&&s.message==="Restart DorkOS to finish closing this browser."?"Restart DorkOS to finish closing this browser.":(s==null?void 0:s.code)==="browser_storage"?fe.find(i=>i===s.message)??"Couldn’t save the browser. Check free space and folder permissions.":(s!=null&&s.code&&Object.hasOwn(ee,s.code)?ee[s.code]:void 0)??"Couldn’t reach the browser. Reconnect and try again."}function xe(t){const s=u.useRef(null),r=u.useRef(null),i=a=>{r.current=document.activeElement===a?{action:a,interrupted:!1}:null};return u.useEffect(()=>{const a=l=>{const e=r.current;e&&l.target!==e.action&&!(l.type==="focusin"&&l.target===document.body)&&(e.interrupted=!0)},d=()=>{r.current&&(r.current.interrupted=!0)};return document.addEventListener("pointerdown",a,!0),document.addEventListener("keydown",a,!0),document.addEventListener("focusin",a,!0),window.addEventListener("blur",d),()=>{r.current=null,document.removeEventListener("pointerdown",a,!0),document.removeEventListener("keydown",a,!0),document.removeEventListener("focusin",a,!0),window.removeEventListener("blur",d)}},[]),u.useEffect(()=>{if(t||!r.current)return;const a=r.current;if(r.current=null,!a.interrupted&&document.activeElement===document.body&&document.hasFocus()){const d=s.current;d&&!d.disabled&&d.focus()}},[t]),{openButton:s,rememberFocus:i}}function be({preparation:t}){const s=t.stage==="checking"?"Checking browser files…":t.stage==="launching"?"Opening the browser…":t.component==="chromium"?"Downloading the browser…":t.component==="headless-shell"?"Downloading browser support…":t.component==="ffmpeg"?"Downloading video support…":"Downloading browser files…",r=t.component==="chromium"?"Browser download":t.component==="headless-shell"?"Browser support download":"Video support download",i=t.stage==="downloading"&&t.component&&t.percent!==null&&Number.isFinite(t.percent)&&t.percent>=0&&t.percent<=100?t.percent:null;return n.jsxs("div",{className:"space-y-1 text-xs","aria-live":"polite",children:[n.jsx("p",{children:s}),i!==null&&n.jsxs(n.Fragment,{children:[n.jsx("progress",{"aria-label":r,max:100,value:i,className:"w-full"}),n.jsxs("p",{children:[i,"%"]})]})]})}function ye({visible:t=!0,sessionId:s=null,agentName:r=null}){var J,X,Z;const i=oe(),a=re(),{state:d,capabilities:l}=he(),e=d.data,h=l.data,v=(J=d.error??l.error)==null?void 0:J.code,q=v==="local_only"?"Open DorkOS on your computer to use its browser.":v==="owner_only"?"Only this DorkOS owner can choose its browser.":"Couldn’t reach the browser. Reconnect and try again.",j=F(o=>o.localBrowserChoice),R=F(o=>o.localBrowserChoiceIssue),O=F(o=>o.setLocalBrowserChoice),C=!j&&R!==null,[m,L]=u.useState(!1),[c,w]=u.useState(!1),[p,A]=u.useState(null),[x,I]=u.useState(!1),g=u.useRef(0),k=u.useRef(null),[D,B]=u.useState(null),[T,_]=u.useState(null),[b,K]=u.useState(!1),U=u.useRef(null),S=(e==null?void 0:e.status)==="connected",W=!!(e!=null&&e.sessionId)&&e.sessionId!==s,f=S&&e.mode?e.mode:(j==null?void 0:j.mode)??(h!=null&&h.embedded&&((X=window.electronAPI)!=null&&X.localBrowser)?"embedded":"new-window"),Q=e==null?void 0:e.tabs.find(o=>o.id===e.selectedTabId),ne=u.useCallback(()=>K(!0),[]);u.useEffect(()=>()=>{g.current+=1},[]),pe(U,(e==null?void 0:e.connectionId)??null,t&&S&&!d.isError&&!W&&f==="embedded"&&!b,ne);const N=async(o,P=!1)=>{const y=++g.current;L(!0),w(P),B(null);try{if(P&&(await a.cancelQueries({queryKey:z}),y!==g.current))return!1;const M=await o();return y!==g.current||(await a.cancelQueries({queryKey:z}),y!==g.current)?!1:(a.setQueryData(z,M),!0)}catch(M){return y!==g.current||B(ge(M)),!1}finally{y===g.current&&(L(!1),w(!1))}},Y=()=>{O({mode:f}),A({sessionId:s,mode:f,previousConnectionId:(e==null?void 0:e.connectionId)??null,startedAt:Date.now()}),K(!1);const o=N(()=>i.openLocalBrowser({mode:f,...s?{sessionId:s}:{}}),!0);k.current=o,o.finally(()=>{k.current===o&&(k.current=null)})},se=async()=>{const o=k.current;I(!0);try{await N(()=>i.disconnectLocalBrowser())&&await a.invalidateQueries({queryKey:z}),await o}finally{I(!1)}},$=h&&(f==="embedded"?h.embedded&&!!((Z=window.electronAPI)!=null&&Z.localBrowser):h.newWindow),{openButton:te,rememberFocus:V}=xe(m||x||S||C||!$),H=c&&!x&&p&&(e!=null&&e.preparation)&&e.status==="disconnected"&&e.sessionId===p.sessionId&&e.mode===p.mode&&e.connectionId&&e.connectionId!==p.previousConnectionId&&d.dataUpdatedAt>=p.startedAt?e.preparation:null;return n.jsxs("section",{"aria-label":"Local browser","data-slot":"local-browser-panel",className:"flex h-full min-h-0 flex-col gap-3 p-3",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("h3",{className:"text-sm font-medium",children:S?G[f]:"Browser"}),n.jsx("span",{role:"status",className:"text-muted-foreground text-xs",children:x?"Cancelling…":c?"Preparing browser":m?"Updating…":(e==null?void 0:e.status)==="closed"?"Browser closed":S?e.paused?"Agent paused":"Connected":"Disconnected"})]}),c&&n.jsx(E,{size:"sm",variant:"outline",onClick:o=>{V(o.currentTarget),se()},children:"Cancel"}),H&&n.jsx(be,{preparation:H}),(D||d.isError||l.isError)&&n.jsx("p",{role:"alert",className:"text-sm",children:D??q}),(d.isError||l.isError)&&v!=="local_only"&&v!=="owner_only"&&n.jsx(E,{size:"sm",variant:"outline",onClick:()=>{d.refetch(),l.refetch()},children:"Reconnect"}),!S&&n.jsxs("div",{className:"min-h-0 space-y-3 overflow-y-auto",children:[R&&n.jsx("p",{className:"text-muted-foreground text-xs",children:C?"Choose a browser. The saved choice couldn’t be read.":"Browser choice couldn’t be saved. It lasts until this window closes."}),n.jsx(we,{value:C?null:f,onChange:o=>{O({mode:o})},capabilities:h,disabled:m||x}),(e==null?void 0:e.status)==="closed"&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Open it again to reconnect. Saved logins are kept."}),n.jsx(E,{ref:te,disabled:m||x||C||!$,onClick:Y,children:e!=null&&e.mode?"Reconnect":"Open browser"})]}),S&&n.jsxs(n.Fragment,{children:[W&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Shared with another chat. Disconnect to use it here."}),!e.sessionId&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Only you can use this page. Open from an agent chat to share it."}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx(E,{size:"sm",variant:"outline",disabled:m,onClick:()=>void N(()=>e.paused?i.resumeLocalBrowser():i.pauseLocalBrowser()),children:e.paused?"Resume agent":"Pause agent"}),n.jsx(E,{size:"sm",variant:"ghost",disabled:m,onClick:o=>{V(o.currentTarget),N(()=>i.disconnectLocalBrowser())},children:"Disconnect"})]}),n.jsxs("label",{className:"text-sm",children:[e.sessionId?W?"Shared with another chat":`Shared with ${r||"this chat’s agent"}`:"Browser tab",n.jsxs("select",{className:"bg-muted/40 mt-1 block w-full rounded-md p-2",value:e.selectedTabId??"",disabled:m,onChange:o=>{_(null),N(()=>i.selectLocalBrowserTab(o.target.value))},children:[!e.selectedTabId&&n.jsx("option",{value:"",children:"Choose a tab"}),e.tabs.map(o=>n.jsx("option",{value:o.id,children:o.title||(o.url==="about:blank"?"New tab":o.url)},o.id))]})]}),Q&&n.jsxs("form",{className:"flex gap-2",onSubmit:o=>{o.preventDefault();const P=T??Q.url;try{const y=new URL(P);if(!["http:","https:"].includes(y.protocol))throw new Error("unsupported");N(()=>i.navigateLocalBrowser(y.href)).then(M=>{M&&_(null)})}catch{B("Enter a full web address, starting with https:// or http://.")}},children:[n.jsx(ae,{"aria-label":"Web address",value:T??Q.url,onChange:o=>_(o.target.value),className:"min-w-0"}),n.jsx(E,{size:"sm",variant:"outline",type:"submit",disabled:m,children:"Go"})]}),e.paused&&n.jsxs("div",{className:"text-muted-foreground space-y-1 text-xs",children:[n.jsx("p",{children:"Pause stops new actions. An action already started may finish."}),n.jsx("p",{children:"Your mouse and keyboard still work."})]}),f!=="embedded"&&n.jsx("p",{className:"text-muted-foreground text-sm",children:"This page is in the separate browser window."}),f==="embedded"&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"This page stays in the right panel."}),f==="embedded"&&!W&&n.jsx("p",{className:"text-muted-foreground text-xs",children:e.sessionId?"Extra windows are for you. Your agent stays on this page.":"Extra windows are for you."}),f==="embedded"&&n.jsx("div",{ref:U,"data-slot":"native-browser-surface",className:"bg-muted/20 relative min-h-48 flex-1 rounded-lg",children:b&&n.jsxs("div",{className:"space-y-2 p-3",children:[n.jsx("p",{role:"alert",className:"text-sm",children:"Couldn’t show the page. Reconnect to try again."}),n.jsx(E,{size:"sm",variant:"outline",onClick:Y,disabled:m,children:"Reconnect"})]})})]})]})}function Ce(){const t=ce({select:h=>h.location.pathname}),[s]=le(),r=t==="/session"?s:null,{data:i}=ie(r,{enabled:!!r,nameOnly:!0}),{data:a}=de((i==null?void 0:i.cwd)??null),d=u.useContext(ue),l=F(h=>h.rightPanelOpen),e=F(h=>h.activeRightPanelTab);return n.jsx(ye,{visible:d&&l&&e==="local-browser",sessionId:t==="/session"?s:null,agentName:t==="/session"?a==null?void 0:a.name:null},t==="/session"?`chat:${s??""}`:"human-only")}export{Ce as LocalBrowserContent,ye as LocalBrowserPanel};
@@ -1 +1 @@
1
- import{L as W,E as i,C as B}from"./index-WxtASL5_.js";import{s as U,t as n,a as b,p as E,L as C,i as u,k as v,f as M,l as N}from"./index-BUOcbPfv.js";import"./index-Dc5cpBoO.js";const c=63,D=64,j=1,A=2,y=3,H=4,Z=5,F=6,I=7,z=65,K=66,J=8,OO=9,eO=10,aO=11,rO=12,V=13,tO=19,nO=20,oO=29,PO=33,QO=34,sO=47,lO=0,p=1,g=2,d=3,m=4;class s{constructor(e,a,r){this.parent=e,this.depth=a,this.type=r,this.hash=(e?e.hash+e.hash<<8:0)+a+(a<<4)+r}}s.top=new s(null,-1,lO);function X(O,e){for(let a=0,r=e-O.pos-1;;r--,a++){let o=O.peek(r);if(P(o)||o==-1)return a}}function x(O){return O==32||O==9}function P(O){return O==10||O==13}function _(O){return x(O)||P(O)}function l(O){return O<0||_(O)}const cO=new B({start:s.top,reduce(O,e){return O.type==d&&(e==nO||e==QO)?O.parent:O},shift(O,e,a,r){if(e==y)return new s(O,X(r,r.pos),p);if(e==z||e==Z)return new s(O,X(r,r.pos),g);if(e==c)return O.parent;if(e==tO||e==PO)return new s(O,0,d);if(e==V&&O.type==m)return O.parent;if(e==sO){let o=/[1-9]/.exec(r.read(r.pos,a.pos));if(o)return new s(O,O.depth+ +o[0],m)}return O},hash(O){return O.hash}});function f(O,e,a=0){return O.peek(a)==e&&O.peek(a+1)==e&&O.peek(a+2)==e&&l(O.peek(a+3))}const fO=new i((O,e)=>{if(O.next==-1&&e.canShift(D))return O.acceptToken(D);let a=O.peek(-1);if((P(a)||a<0)&&e.context.type!=d){if(f(O,45))if(e.canShift(c))O.acceptToken(c);else return O.acceptToken(j,3);if(f(O,46))if(e.canShift(c))O.acceptToken(c);else return O.acceptToken(A,3);let r=0;for(;O.next==32;)r++,O.advance();(r<e.context.depth||r==e.context.depth&&e.context.type==p&&(O.next!=45||!l(O.peek(1))))&&O.next!=-1&&!P(O.next)&&O.next!=35&&O.acceptToken(c,-r)}},{contextual:!0}),XO=new i((O,e)=>{if(e.context.type==d){O.next==63&&(O.advance(),l(O.next)&&O.acceptToken(I));return}if(O.next==45)O.advance(),l(O.next)&&O.acceptToken(e.context.type==p&&e.context.depth==X(O,O.pos-1)?H:y);else if(O.next==63)O.advance(),l(O.next)&&O.acceptToken(e.context.type==g&&e.context.depth==X(O,O.pos-1)?F:Z);else{let a=O.pos;for(;;)if(x(O.next)){if(O.pos==a)return;O.advance()}else if(O.next==33)G(O);else if(O.next==38)$(O);else if(O.next==42){$(O);break}else if(O.next==39||O.next==34){if(T(O,!0))break;return}else if(O.next==91||O.next==123){if(!RO(O))return;break}else{w(O,!0,!1,0);break}for(;x(O.next);)O.advance();if(O.next==58){if(O.pos==a&&e.canShift(oO))return;let r=O.peek(1);l(r)&&O.acceptTokenTo(e.context.type==g&&e.context.depth==X(O,a)?K:z,a)}}},{contextual:!0});function dO(O){return O>32&&O<127&&O!=34&&O!=37&&O!=44&&O!=60&&O!=62&&O!=92&&O!=94&&O!=96&&O!=123&&O!=124&&O!=125}function q(O){return O>=48&&O<=57||O>=97&&O<=102||O>=65&&O<=70}function Y(O,e){return O.next==37?(O.advance(),q(O.next)&&O.advance(),q(O.next)&&O.advance(),!0):dO(O.next)||e&&O.next==44?(O.advance(),!0):!1}function G(O){if(O.advance(),O.next==60){for(O.advance();;)if(!Y(O,!0)){O.next==62&&O.advance();break}}else for(;Y(O,!1););}function $(O){for(O.advance();!l(O.next)&&S(O.next)!="f";)O.advance()}function T(O,e){let a=O.next,r=!1,o=O.pos;for(O.advance();;){let t=O.next;if(t<0)break;if(O.advance(),t==a)if(t==39)if(O.next==39)O.advance();else break;else break;else if(t==92&&a==34)O.next>=0&&O.advance();else if(P(t)){if(e)return!1;r=!0}else if(e&&O.pos>=o+1024)return!1}return!r}function RO(O){for(let e=[],a=O.pos+1024;;)if(O.next==91||O.next==123)e.push(O.next),O.advance();else if(O.next==39||O.next==34){if(!T(O,!0))return!1}else if(O.next==93||O.next==125){if(e[e.length-1]!=O.next-2)return!1;if(e.pop(),O.advance(),!e.length)return!0}else{if(O.next<0||O.pos>a||P(O.next))return!1;O.advance()}}const SO="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function S(O){return O<33?"u":O>125?"s":SO[O-33]}function k(O,e){let a=S(O);return a!="u"&&!(e&&a=="f")}function w(O,e,a,r){if(S(O.next)=="s"||(O.next==63||O.next==58||O.next==45)&&k(O.peek(1),a))O.advance();else return!1;let o=O.pos;for(;;){let t=O.next,Q=0,R=r+1;for(;_(t);){if(P(t)){if(e)return!1;R=0}else R++;t=O.peek(++Q)}if(!(t>=0&&(t==58?k(O.peek(Q+1),a):t==35?O.peek(Q-1)!=32:k(t,a)))||!a&&R<=r||R==0&&!a&&(f(O,45,Q)||f(O,46,Q)))break;if(e&&S(t)=="f")return!1;for(let h=Q;h>=0;h--)O.advance();if(e&&O.pos>o+1024)return!1}return!0}const iO=new i((O,e)=>{if(O.next==33)G(O),O.acceptToken(rO);else if(O.next==38||O.next==42){let a=O.next==38?eO:aO;$(O),O.acceptToken(a)}else O.next==39||O.next==34?(T(O,!1),O.acceptToken(OO)):w(O,!1,e.context.type==d,e.context.depth)&&O.acceptToken(J)}),kO=new i((O,e)=>{let a=e.context.type==m?e.context.depth:-1,r=O.pos;O:for(;;){let o=0,t=O.next;for(;t==32;)t=O.peek(++o);if(!o&&(f(O,45,o)||f(O,46,o))||!P(t)&&(a<0&&(a=Math.max(e.context.depth+1,o)),o<a))break;for(;;){if(O.next<0)break O;let Q=P(O.next);if(O.advance(),Q)continue O;r=O.pos}}O.acceptTokenTo(V,r)}),bO=U({DirectiveName:n.keyword,DirectiveContent:n.attributeValue,"DirectiveEnd DocEnd":n.meta,QuotedLiteral:n.string,BlockLiteralHeader:n.special(n.string),BlockLiteralContent:n.content,Literal:n.content,"Key/Literal Key/QuotedLiteral":n.definition(n.propertyName),"Anchor Alias":n.labelName,Tag:n.typeName,Comment:n.lineComment,": , -":n.separator,"?":n.punctuation,"[ ]":n.squareBracket,"{ }":n.brace}),gO=W.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:cO,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[bO],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[fO,XO,iO,kO,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),mO=W.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:"!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~",goto:"vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS",nodeNames:"⚠ Document Frontmatter DashLine FrontmatterContent Body",maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),L=C.define({name:"yaml",parser:gO.configure({props:[u.add({Stream:O=>{for(let e=O.node.resolve(O.pos,-1);e&&e.to>=O.pos;e=e.parent){if(e.name=="BlockLiteralContent"&&e.from<e.to)return O.baseIndentFor(e);if(e.name=="BlockLiteral")return O.baseIndentFor(e)+O.unit;if(e.name=="BlockSequence"||e.name=="BlockMapping")return O.column(e.firstChild.from,1);if(e.name=="QuotedLiteral")return null;if(e.name=="Literal"){let a=O.column(e.from,1);if(a==O.lineIndent(e.from,1))return a;if(e.to>O.pos)return null}}return null},FlowMapping:v({closing:"}"}),FlowSequence:v({closing:"]"})}),M.add({"FlowMapping FlowSequence":N,"Item Pair BlockLiteral":(O,e)=>({from:e.doc.lineAt(O.from).to,to:O.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function vO(){return new b(L)}const xO=C.define({name:"yaml-frontmatter",parser:mO.configure({props:[U({DashLine:n.meta})]})});function DO(O){let{language:e,support:a}=O.content instanceof b?O.content:{language:O.content,support:[]};return new b(xO.configure({wrap:E(r=>r.name=="FrontmatterContent"?{parser:L.parser}:r.name=="Body"?{parser:e.parser}:null)}),a)}export{vO as yaml,DO as yamlFrontmatter,L as yamlLanguage};
1
+ import{L as W,E as i,C as B}from"./index-BCk4wW-T.js";import{s as U,t as n,a as b,p as E,L as C,i as u,k as v,f as M,l as N}from"./index-mFOJXyAE.js";import"./index-DcZPWi_I.js";const c=63,D=64,j=1,A=2,y=3,H=4,Z=5,F=6,I=7,z=65,K=66,J=8,OO=9,eO=10,aO=11,rO=12,V=13,tO=19,nO=20,oO=29,PO=33,QO=34,sO=47,lO=0,p=1,g=2,d=3,m=4;class s{constructor(e,a,r){this.parent=e,this.depth=a,this.type=r,this.hash=(e?e.hash+e.hash<<8:0)+a+(a<<4)+r}}s.top=new s(null,-1,lO);function X(O,e){for(let a=0,r=e-O.pos-1;;r--,a++){let o=O.peek(r);if(P(o)||o==-1)return a}}function x(O){return O==32||O==9}function P(O){return O==10||O==13}function _(O){return x(O)||P(O)}function l(O){return O<0||_(O)}const cO=new B({start:s.top,reduce(O,e){return O.type==d&&(e==nO||e==QO)?O.parent:O},shift(O,e,a,r){if(e==y)return new s(O,X(r,r.pos),p);if(e==z||e==Z)return new s(O,X(r,r.pos),g);if(e==c)return O.parent;if(e==tO||e==PO)return new s(O,0,d);if(e==V&&O.type==m)return O.parent;if(e==sO){let o=/[1-9]/.exec(r.read(r.pos,a.pos));if(o)return new s(O,O.depth+ +o[0],m)}return O},hash(O){return O.hash}});function f(O,e,a=0){return O.peek(a)==e&&O.peek(a+1)==e&&O.peek(a+2)==e&&l(O.peek(a+3))}const fO=new i((O,e)=>{if(O.next==-1&&e.canShift(D))return O.acceptToken(D);let a=O.peek(-1);if((P(a)||a<0)&&e.context.type!=d){if(f(O,45))if(e.canShift(c))O.acceptToken(c);else return O.acceptToken(j,3);if(f(O,46))if(e.canShift(c))O.acceptToken(c);else return O.acceptToken(A,3);let r=0;for(;O.next==32;)r++,O.advance();(r<e.context.depth||r==e.context.depth&&e.context.type==p&&(O.next!=45||!l(O.peek(1))))&&O.next!=-1&&!P(O.next)&&O.next!=35&&O.acceptToken(c,-r)}},{contextual:!0}),XO=new i((O,e)=>{if(e.context.type==d){O.next==63&&(O.advance(),l(O.next)&&O.acceptToken(I));return}if(O.next==45)O.advance(),l(O.next)&&O.acceptToken(e.context.type==p&&e.context.depth==X(O,O.pos-1)?H:y);else if(O.next==63)O.advance(),l(O.next)&&O.acceptToken(e.context.type==g&&e.context.depth==X(O,O.pos-1)?F:Z);else{let a=O.pos;for(;;)if(x(O.next)){if(O.pos==a)return;O.advance()}else if(O.next==33)G(O);else if(O.next==38)$(O);else if(O.next==42){$(O);break}else if(O.next==39||O.next==34){if(T(O,!0))break;return}else if(O.next==91||O.next==123){if(!RO(O))return;break}else{w(O,!0,!1,0);break}for(;x(O.next);)O.advance();if(O.next==58){if(O.pos==a&&e.canShift(oO))return;let r=O.peek(1);l(r)&&O.acceptTokenTo(e.context.type==g&&e.context.depth==X(O,a)?K:z,a)}}},{contextual:!0});function dO(O){return O>32&&O<127&&O!=34&&O!=37&&O!=44&&O!=60&&O!=62&&O!=92&&O!=94&&O!=96&&O!=123&&O!=124&&O!=125}function q(O){return O>=48&&O<=57||O>=97&&O<=102||O>=65&&O<=70}function Y(O,e){return O.next==37?(O.advance(),q(O.next)&&O.advance(),q(O.next)&&O.advance(),!0):dO(O.next)||e&&O.next==44?(O.advance(),!0):!1}function G(O){if(O.advance(),O.next==60){for(O.advance();;)if(!Y(O,!0)){O.next==62&&O.advance();break}}else for(;Y(O,!1););}function $(O){for(O.advance();!l(O.next)&&S(O.next)!="f";)O.advance()}function T(O,e){let a=O.next,r=!1,o=O.pos;for(O.advance();;){let t=O.next;if(t<0)break;if(O.advance(),t==a)if(t==39)if(O.next==39)O.advance();else break;else break;else if(t==92&&a==34)O.next>=0&&O.advance();else if(P(t)){if(e)return!1;r=!0}else if(e&&O.pos>=o+1024)return!1}return!r}function RO(O){for(let e=[],a=O.pos+1024;;)if(O.next==91||O.next==123)e.push(O.next),O.advance();else if(O.next==39||O.next==34){if(!T(O,!0))return!1}else if(O.next==93||O.next==125){if(e[e.length-1]!=O.next-2)return!1;if(e.pop(),O.advance(),!e.length)return!0}else{if(O.next<0||O.pos>a||P(O.next))return!1;O.advance()}}const SO="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function S(O){return O<33?"u":O>125?"s":SO[O-33]}function k(O,e){let a=S(O);return a!="u"&&!(e&&a=="f")}function w(O,e,a,r){if(S(O.next)=="s"||(O.next==63||O.next==58||O.next==45)&&k(O.peek(1),a))O.advance();else return!1;let o=O.pos;for(;;){let t=O.next,Q=0,R=r+1;for(;_(t);){if(P(t)){if(e)return!1;R=0}else R++;t=O.peek(++Q)}if(!(t>=0&&(t==58?k(O.peek(Q+1),a):t==35?O.peek(Q-1)!=32:k(t,a)))||!a&&R<=r||R==0&&!a&&(f(O,45,Q)||f(O,46,Q)))break;if(e&&S(t)=="f")return!1;for(let h=Q;h>=0;h--)O.advance();if(e&&O.pos>o+1024)return!1}return!0}const iO=new i((O,e)=>{if(O.next==33)G(O),O.acceptToken(rO);else if(O.next==38||O.next==42){let a=O.next==38?eO:aO;$(O),O.acceptToken(a)}else O.next==39||O.next==34?(T(O,!1),O.acceptToken(OO)):w(O,!1,e.context.type==d,e.context.depth)&&O.acceptToken(J)}),kO=new i((O,e)=>{let a=e.context.type==m?e.context.depth:-1,r=O.pos;O:for(;;){let o=0,t=O.next;for(;t==32;)t=O.peek(++o);if(!o&&(f(O,45,o)||f(O,46,o))||!P(t)&&(a<0&&(a=Math.max(e.context.depth+1,o)),o<a))break;for(;;){if(O.next<0)break O;let Q=P(O.next);if(O.advance(),Q)continue O;r=O.pos}}O.acceptTokenTo(V,r)}),bO=U({DirectiveName:n.keyword,DirectiveContent:n.attributeValue,"DirectiveEnd DocEnd":n.meta,QuotedLiteral:n.string,BlockLiteralHeader:n.special(n.string),BlockLiteralContent:n.content,Literal:n.content,"Key/Literal Key/QuotedLiteral":n.definition(n.propertyName),"Anchor Alias":n.labelName,Tag:n.typeName,Comment:n.lineComment,": , -":n.separator,"?":n.punctuation,"[ ]":n.squareBracket,"{ }":n.brace}),gO=W.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:cO,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[bO],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[fO,XO,iO,kO,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),mO=W.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:"!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~",goto:"vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS",nodeNames:"⚠ Document Frontmatter DashLine FrontmatterContent Body",maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),L=C.define({name:"yaml",parser:gO.configure({props:[u.add({Stream:O=>{for(let e=O.node.resolve(O.pos,-1);e&&e.to>=O.pos;e=e.parent){if(e.name=="BlockLiteralContent"&&e.from<e.to)return O.baseIndentFor(e);if(e.name=="BlockLiteral")return O.baseIndentFor(e)+O.unit;if(e.name=="BlockSequence"||e.name=="BlockMapping")return O.column(e.firstChild.from,1);if(e.name=="QuotedLiteral")return null;if(e.name=="Literal"){let a=O.column(e.from,1);if(a==O.lineIndent(e.from,1))return a;if(e.to>O.pos)return null}}return null},FlowMapping:v({closing:"}"}),FlowSequence:v({closing:"]"})}),M.add({"FlowMapping FlowSequence":N,"Item Pair BlockLiteral":(O,e)=>({from:e.doc.lineAt(O.from).to,to:O.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function vO(){return new b(L)}const xO=C.define({name:"yaml-frontmatter",parser:mO.configure({props:[U({DashLine:n.meta})]})});function DO(O){let{language:e,support:a}=O.content instanceof b?O.content:{language:O.content,support:[]};return new b(xO.configure({wrap:E(r=>r.name=="FrontmatterContent"?{parser:L.parser}:r.name=="Body"?{parser:e.parser}:null)}),a)}export{vO as yaml,DO as yamlFrontmatter,L as yamlLanguage};
@@ -0,0 +1 @@
1
+ import{gF as U}from"./index-DcZPWi_I.js";const G=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],q={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function H(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=48&&r<=57}function L(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}function P(e){const r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}function v(e){return P(e)||H(e)}const Y=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function F(e,r){const i=r||{},R=typeof i.additional=="string"?i.additional.charCodeAt(0):i.additional,E=[];let u=0,I=-1,g="",m,O;i.position&&("start"in i.position||"indent"in i.position?(O=i.position.indent,m=i.position.start):m=i.position);let S=(m?m.line:0)||1,h=(m?m.column:0)||1,w=A(),p;for(u--;++u<=e.length;)if(p===10&&(h=(O?O[I]:0)||1),p=e.charCodeAt(u),p===38){const c=e.charCodeAt(u+1);if(c===9||c===10||c===12||c===32||c===38||c===60||Number.isNaN(c)||R&&c===R){g+=String.fromCharCode(p),h++;continue}const s=u+1;let l=s,n=s,f;if(c===35){n=++l;const t=e.charCodeAt(n);t===88||t===120?(f="hexadecimal",n=++l):f="decimal"}else f="named";let N="",C="",a="";const k=f==="named"?v:f==="decimal"?H:L;for(n--;++n<=e.length;){const t=e.charCodeAt(n);if(!k(t))break;a+=String.fromCharCode(t),f==="named"&&G.includes(a)&&(N=a,C=U(a))}let b=e.charCodeAt(n)===59;if(b){n++;const t=f==="named"?U(a):!1;t&&(N=a,C=t)}let d=1+n-s,x="";if(!(!b&&i.nonTerminated===!1))if(!a)f!=="named"&&o(4,d);else if(f==="named"){if(b&&!C)o(5,1);else if(N!==a&&(n=l+N.length,d=1+n-l,b=!1),!b){const t=N?1:3;if(i.attribute){const y=e.charCodeAt(n);y===61?(o(t,d),C=""):v(y)?C="":o(t,d)}else o(t,d)}x=C}else{b||o(2,d);let t=Number.parseInt(a,f==="hexadecimal"?16:10);if(j(t))o(7,d),x="�";else if(t in q)o(6,d),x=q[t];else{let y="";z(t)&&o(6,d),t>65535&&(t-=65536,y+=String.fromCharCode(t>>>10|55296),t=56320|t&1023),x=y+String.fromCharCode(t)}}if(x){T(),w=A(),u=n-1,h+=n-s+1,E.push(x);const t=A();t.offset++,i.reference&&i.reference.call(i.referenceContext||void 0,x,{start:w,end:t},e.slice(s-1,n)),w=t}else a=e.slice(s-1,n),g+=a,h+=a.length,u=n-1}else p===10&&(S++,I++,h=0),Number.isNaN(p)?T():(g+=String.fromCharCode(p),h++);return E.join("");function A(){return{line:S,column:h,offset:u+((m?m.offset:0)||0)}}function o(c,s){let l;i.warning&&(l=A(),l.column+=s,l.offset+=s,i.warning.call(i.warningContext||void 0,Y[c],l,c))}function T(){g&&(E.push(g),i.text&&i.text.call(i.textContext||void 0,g,{start:w,end:A()}),g="")}}function j(e){return e>=55296&&e<=57343||e>1114111}function z(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}export{F as p};
@@ -1 +1 @@
1
- import{P as L,N as $,g as E,D as j,h as y,T as S,I as G}from"./index-BUOcbPfv.js";var N={};class v{constructor(t,e,s,i,h,r,n,o,a,u=0,f){this.p=t,this.stack=e,this.state=s,this.reducePos=i,this.pos=h,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=a,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,s=0){let i=t.parser.context;return new v(t,[],e,s,s,0,[],0,i?new R(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let s=t>>19,i=t&65535,{parser:h}=this.p,r=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),n=h.dynamicPrecedence(i);if(n&&(this.score+=n),s==0){i<h.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(h.getGoto(this.state,i,!0),this.reducePos),i<h.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,r?8:4,!0),this.reduceContext(i,this.reducePos);return}let o=this.stack.length-(s-1)*3-(t&262144?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from;i<h.minRepeatTerm&&a==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let u=this.reducePos-a;u>=2e3&&!(!((e=this.p.parser.nodeSet.types[i])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=u));let f=o?this.stack[o-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<h.minRepeatTerm||t&131072){let c=h.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,c,d+4,!0)}if(t&262144)this.state=this.stack[o];else{let c=this.stack[o-3];this.state=h.getGoto(c,i,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(i,a)}storeNode(t,e,s,i=4,h=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this.buffer.length;if(r>0&&this.buffer[r-4]==0&&this.buffer[r-1]>-1){if(e==s)return;if(this.buffer[r-2]>=e){this.buffer[r-2]=s;return}}}if(!h||this.pos==s)this.buffer.push(t,e,s,i);else{let r=this.buffer.length;if(r>0&&(this.buffer[r-4]!=0||this.buffer[r-1]<0)){let n=!1;for(let o=r;o>0&&this.buffer[o-2]>s;o-=4)if(this.buffer[o-1]>=0){n=!0;break}if(n)for(;r>0&&this.buffer[r-2]>s;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=s,this.buffer[r+3]=i}}shift(t,e,s,i){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let h=t,{parser:r}=this.p;this.pos=i;let n=r.stateFlag(h,1);!n&&(i>s||e<=r.maxNode)&&(this.reducePos=i),this.pushState(h,n?s:Math.min(s,this.reducePos)),this.shiftContext(e,s),e<=r.maxNode&&this.buffer.push(e,s,i,4)}else this.pos=i,this.shiftContext(e,s),e<=this.p.parser.maxNode&&this.buffer.push(e,s,i,4)}apply(t,e,s,i){t&65536?this.reduce(t):this.shift(t,e,s,i)}useNode(t,e){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(e&&t.buffer[e-4]==0&&(e-=4);e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let s=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new v(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,s?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new U(this);;){let s=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(s==0)return!1;if((s&65536)==0)return!0;e.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let h=0,r;h<e.length;h+=2)(r=e[h+1])!=this.state&&this.p.parser.hasAction(r,t)&&i.push(e[h],r);if(this.stack.length<120)for(let h=0;i.length<8&&h<e.length;h+=2){let r=e[h+1];i.some((n,o)=>o&1&&n==r)||i.push(e[h],r)}e=i}let s=[];for(let i=0;i<e.length&&s.length<4;i+=2){let h=e[i+1];if(h==this.state)continue;let r=this.split();r.pushState(h,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[i],this.pos),r.reducePos=this.pos,r.score-=200,s.push(r)}return s}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if((e&65536)==0)return!1;if(!t.validAction(this.state,e)){let s=e>>19,i=e&65535,h=this.stack.length-s*3;if(h<0||t.getGoto(this.stack[h],i,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;e=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],s=(i,h)=>{if(!e.includes(i))return e.push(i),t.allActions(i,r=>{if(!(r&393216))if(r&65536){let n=(r>>19)-h;if(n>1){let o=r&65535,a=this.stack.length-n*3;if(a>=0&&t.getGoto(this.stack[a],o,!1)>=0)return n<<19|65536|o}}else{let n=s(r,h+1);if(n!=null)return n}})};return s(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new R(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){return t<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class R{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class U{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=t&65535,s=t>>19;s==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(s-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class A{constructor(t,e,s){this.stack=t,this.pos=e,this.index=s,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new A(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new A(this.stack,this.pos,this.index)}}function x(l,t=Uint16Array){if(typeof l!="string")return l;let e=null;for(let s=0,i=0;s<l.length;){let h=0;for(;;){let r=l.charCodeAt(s++),n=!1;if(r==126){h=65535;break}r>=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,n=!0),h+=o,n)break;h*=46}e?e[i++]=h:e=new t(h)}return e}class P{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const z=new P;class H{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=z,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let s=this.range,i=this.rangeIndex,h=this.pos+t;for(;h<s.from;){if(!i)return null;let r=this.ranges[--i];h-=s.from-r.to,s=r}for(;e<0?h>s.to:h>=s.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];h+=r.from-s.to,s=r}return h}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e=this.chunkOff+t,s,i;if(e>=0&&e<this.chunk.length)s=this.pos+t,i=this.chunk.charCodeAt(e);else{let h=this.resolveOffset(t,1);if(h==null)return-1;if(s=h,s>=this.chunk2Pos&&s<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(s-this.chunk2Pos);else{let r=this.rangeIndex,n=this.range;for(;n.to<=s;)n=this.ranges[++r];this.chunk2=this.input.chunk(this.chunk2Pos=s),s+this.chunk2.length>n.to&&(this.chunk2=this.chunk2.slice(0,n.to-s)),i=this.chunk2.charCodeAt(0)}}return s>=this.token.lookAhead&&(this.token.lookAhead=s+1),i}acceptToken(t,e=0){let s=e?this.resolveOffset(e,-1):this.pos;if(s==null||s<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=s}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=z,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let s="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(s+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return s}}class m{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:s}=e.p;O(this.data,t,e,this.id,s.data,s.tokenPrecTable)}}m.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;class W{constructor(t,e,s){this.precTable=e,this.elseToken=s,this.data=typeof t=="string"?x(t):t}token(t,e){let s=t.pos,i=0;for(;;){let h=t.next<0,r=t.resolveOffset(1,1);if(O(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(this.elseToken==null)return;if(h||i++,r==null)break;t.reset(r,t.token)}i&&(t.reset(s,t.token),t.acceptToken(this.elseToken,i))}}W.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;class Z{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function O(l,t,e,s,i,h){let r=0,n=1<<s,{dialect:o}=e.p.parser;t:for(;(n&l[r])!=0;){let a=l[r+1];for(let c=r+3;c<a;c+=2)if((l[c+1]&n)>0){let p=l[c];if(o.allows(p)&&(t.token.value==-1||t.token.value==p||q(p,t.token.value,i,h))){t.acceptToken(p);break}}let u=t.next,f=0,d=l[r+2];if(t.next<0&&d>f&&l[a+d*3-3]==65535){r=l[a+d*3-1];continue t}for(;f<d;){let c=f+d>>1,p=a+c+(c<<1),b=l[p],M=l[p+1]||65536;if(u<b)d=c;else if(u>=M)f=c+1;else{r=l[p+2],t.advance();continue t}}break}}function I(l,t,e){for(let s=t,i;(i=l[s])!=65535;s++)if(i==e)return s-t;return-1}function q(l,t,e,s){let i=I(e,s,t);return i<0||I(e,s,l)<i}const g=typeof process<"u"&&N&&/\bparse\b/.test(N.LOG);let T=null;function D(l,t,e){let s=l.cursor(G.IncludeAnonymous);for(s.moveTo(t);;)if(!(e<0?s.childBefore(t):s.childAfter(t)))for(;;){if((e<0?s.to<t:s.from>t)&&!s.type.isError)return e<0?Math.max(0,Math.min(s.to-1,t-25)):Math.min(l.length,Math.max(s.from+1,t+25));if(e<0?s.prevSibling():s.nextSibling())break;if(!s.parent())return e<0?0:l.length}}class J{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?D(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?D(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let s=this.trees[e],i=this.index[e];if(i==s.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let h=s.children[i],r=this.start[e]+s.positions[i];if(r>t)return this.nextStart=r,null;if(h instanceof S){if(r==t){if(r<this.safeFrom)return null;let n=r+h.length;if(n<=this.safeTo){let o=h.prop(y.lookAhead);if(!o||n+o<this.fragment.to)return h}}this.index[e]++,r+h.length>=Math.max(this.safeFrom,t)&&(this.trees.push(h),this.start.push(r),this.index.push(0))}else this.index[e]++,this.nextStart=r+h.length}}}class K{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(s=>new P)}getActions(t){let e=0,s=null,{parser:i}=t.p,{tokenizers:h}=i,r=i.stateSlot(t.state,3),n=t.curContext?t.curContext.hash:0,o=0;for(let a=0;a<h.length;a++){if((1<<a&r)==0)continue;let u=h[a],f=this.tokens[a];if(!(s&&!u.fallback)&&((u.contextual||f.start!=t.pos||f.mask!=r||f.context!=n)&&(this.updateCachedToken(f,u,t),f.mask=r,f.context=n),f.lookAhead>f.end+25&&(o=Math.max(f.lookAhead,o)),f.value!=0)){let d=e;if(f.extended>-1&&(e=this.addActions(t,f.extended,f.end,e)),e=this.addActions(t,f.value,f.end,e),!u.extend&&(s=f,e>d))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),!s&&t.pos==this.stream.end&&(s=new P,s.value=t.p.parser.eofTerm,s.start=s.end=t.pos,e=this.addActions(t,s.value,s.end,e)),this.mainToken=s,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new P,{pos:s,p:i}=t;return e.start=s,e.end=Math.min(s+1,i.stream.end),e.value=s==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,s){let i=this.stream.clipPos(s.pos);if(e.token(this.stream.reset(i,t),s),t.value>-1){let{parser:h}=s.p;for(let r=0;r<h.specialized.length;r++)if(h.specialized[r]==t.value){let n=h.specializers[r](this.stream.read(t.start,t.end),s);if(n>=0&&s.p.parser.dialect.allows(n>>1)){(n&1)==0?t.value=n>>1:t.extended=n>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,s,i){for(let h=0;h<i;h+=3)if(this.actions[h]==t)return i;return this.actions[i++]=t,this.actions[i++]=e,this.actions[i++]=s,i}addActions(t,e,s,i){let{state:h}=t,{parser:r}=t.p,{data:n}=r;for(let o=0;o<2;o++)for(let a=r.stateSlot(h,o?2:1);;a+=3){if(n[a]==65535)if(n[a+1]==1)a=k(n,a+2);else{i==0&&n[a+1]==2&&(i=this.putAction(k(n,a+2),e,s,i));break}n[a]==e&&(i=this.putAction(k(n,a+1),e,s,i))}return i}}class Q{constructor(t,e,s,i){this.parser=t,this.input=e,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new H(e,i),this.tokens=new K(t,this.stream),this.topTerm=t.top[1];let{from:h}=i[0];this.stacks=[v.start(this,t.top[0],h)],this.fragments=s.length&&this.stream.end-h>t.bufferLength*4?new J(s,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,e=this.minStackPos,s=this.stacks=[],i,h;if(this.bigReductionCount>300&&t.length==1){let[r]=t;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;r<t.length;r++){let n=t[r];for(;;){if(this.tokens.mainToken=null,n.pos>e)s.push(n);else{if(this.advanceStack(n,s,t))continue;{i||(i=[],h=[]),i.push(n);let o=this.tokens.getMainToken(n);h.push(o.value,o.end)}}break}}if(!s.length){let r=i&&X(i);if(r)return g&&console.log("Finish with "+this.stackID(r)),this.stackToTree(r);if(this.parser.strict)throw g&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,h,s);if(r)return g&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(s.length>r)for(s.sort((n,o)=>o.score-n.score);s.length>r;)s.pop();s.some(n=>n.reducePos>e)&&this.recovering--}else if(s.length>1){t:for(let r=0;r<s.length-1;r++){let n=s[r];for(let o=r+1;o<s.length;o++){let a=s[o];if(n.sameState(a)||n.buffer.length>500&&a.buffer.length>500)if((n.score-a.score||n.buffer.length-a.buffer.length)>0)s.splice(o--,1);else{s.splice(r--,1);continue t}}}s.length>12&&(s.sort((r,n)=>n.score-r.score),s.splice(12,s.length-12))}this.minStackPos=s[0].pos;for(let r=1;r<s.length;r++)s[r].pos<this.minStackPos&&(this.minStackPos=s[r].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,s){let i=t.pos,{parser:h}=this,r=g?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let a=t.curContext&&t.curContext.tracker.strict,u=a?t.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?h.getGoto(t.state,f.type.id):-1;if(d>-1&&f.length&&(!a||(f.prop(y.contextHash)||0)==u))return t.useNode(f,d),g&&console.log(r+this.stackID(t)+` (via reuse of ${h.getName(f.type.id)})`),!0;if(!(f instanceof S)||f.children.length==0||f.positions[0]>0)break;let c=f.children[0];if(c instanceof S&&f.positions[0]==0)f=c;else break}}let n=h.stateSlot(t.state,4);if(n>0)return t.reduce(n),g&&console.log(r+this.stackID(t)+` (via always-reduce ${h.getName(n&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let o=this.tokens.getActions(t);for(let a=0;a<o.length;){let u=o[a++],f=o[a++],d=o[a++],c=a==o.length||!s,p=c?t:t.split(),b=this.tokens.mainToken;if(p.apply(u,f,b?b.start:p.pos,d),g&&console.log(r+this.stackID(p)+` (via ${(u&65536)==0?"shift":`reduce of ${h.getName(u&65535)}`} for ${h.getName(f)} @ ${i}${p==t?"":", split"})`),c)return!0;p.pos>i?e.push(p):s.push(p)}return!1}advanceFully(t,e){let s=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>s)return B(t,e),!0}}runRecovery(t,e,s){let i=null,h=!1;for(let r=0;r<t.length;r++){let n=t[r],o=e[r<<1],a=e[(r<<1)+1],u=g?this.stackID(n)+" -> ":"";if(n.deadEnd&&(h||(h=!0,n.restart(),g&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,s))))continue;let f=n.split(),d=u;for(let c=0;c<10&&f.forceReduce()&&(g&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,s));c++)g&&(d=this.stackID(f)+" -> ");for(let c of n.recoverByInsert(o))g&&console.log(u+this.stackID(c)+" (via recover-insert)"),this.advanceFully(c,s);this.stream.end>n.pos?(a==n.pos&&(a++,o=0),n.recoverByDelete(o,a),g&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),B(n,s)):(!i||i.score<f.score)&&(i=f)}return i}stackToTree(t){return t.close(),S.build({buffer:A.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(T||(T=new WeakMap)).get(t);return e||T.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function B(l,t){for(let e=0;e<t.length;e++){let s=t[e];if(s.pos==l.pos&&s.sameState(l)){t[e].score<l.score&&(t[e]=l);return}}t.push(l)}class V{constructor(t,e,s){this.source=t,this.flags=e,this.disabled=s}allows(t){return!this.disabled||this.disabled[t]==0}}const C=l=>l;class _{constructor(t){this.start=t.start,this.shift=t.shift||C,this.reduce=t.reduce||C,this.reuse=t.reuse||C,this.hash=t.hash||(()=>0),this.strict=t.strict!==!1}}class w extends L{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let n=0;n<t.repeatNodeCount;n++)e.push("");let s=Object.keys(t.topRules).map(n=>t.topRules[n][1]),i=[];for(let n=0;n<e.length;n++)i.push([]);function h(n,o,a){i[n].push([o,o.deserialize(String(a))])}if(t.nodeProps)for(let n of t.nodeProps){let o=n[0];typeof o=="string"&&(o=y[o]);for(let a=1;a<n.length;){let u=n[a++];if(u>=0)h(u,o,n[a++]);else{let f=n[a+-u];for(let d=-u;d>0;d--)h(n[a++],o,f);a++}}}this.nodeSet=new $(e.map((n,o)=>E.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:s.indexOf(o)>-1,error:o==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(o)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=j;let r=x(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;n<this.specializerSpecs.length;n++)this.specialized[n]=this.specializerSpecs[n].term;this.specializers=this.specializerSpecs.map(F),this.states=x(t.states,Uint32Array),this.data=x(t.stateData),this.goto=x(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(n=>typeof n=="number"?new m(r,n):n),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,s){let i=new Q(this,t,e,s);for(let h of this.wrappers)i=h(i,t,e,s);return i}getGoto(t,e,s=!1){let i=this.goto;if(e>=i[0])return-1;for(let h=i[e+1];;){let r=i[h++],n=r&1,o=i[h++];if(n&&s)return o;for(let a=h+(r>>1);h<a;h++)if(i[h]==t)return o;if(n)return-1}}hasAction(t,e){let s=this.data;for(let i=0;i<2;i++)for(let h=this.stateSlot(t,i?2:1),r;;h+=3){if((r=s[h])==65535)if(s[h+1]==1)r=s[h=k(s,h+2)];else{if(s[h+1]==2)return k(s,h+2);break}if(r==e||r==0)return k(s,h+1)}return 0}stateSlot(t,e){return this.states[t*6+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,s=>s==e?!0:null)}allActions(t,e){let s=this.stateSlot(t,4),i=s?e(s):void 0;for(let h=this.stateSlot(t,1);i==null;h+=3){if(this.data[h]==65535)if(this.data[h+1]==1)h=k(this.data,h+2);else break;i=e(k(this.data,h+1))}return i}nextStates(t){let e=[];for(let s=this.stateSlot(t,1);;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=k(this.data,s+2);else break;if((this.data[s+2]&1)==0){let i=this.data[s+1];e.some((h,r)=>r&1&&h==i)||e.push(this.data[s],i)}}return e}configure(t){let e=Object.assign(Object.create(w.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let s=this.topRules[t.top];if(!s)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=s}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(s=>{let i=t.tokenizers.find(h=>h.from==s);return i?i.to:s})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((s,i)=>{let h=t.specializers.find(n=>n.from==s.external);if(!h)return s;let r=Object.assign(Object.assign({},s),{external:h.to});return e.specializers[i]=F(r),r})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),t.bufferLength!=null&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return e==null?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),s=e.map(()=>!1);if(t)for(let h of t.split(" ")){let r=e.indexOf(h);r>=0&&(s[r]=!0)}let i=null;for(let h=0;h<e.length;h++)if(!s[h])for(let r=this.dialects[e[h]],n;(n=this.data[r++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[n]=1;return new V(t,s,i)}static deserialize(t){return new w(t)}}function k(l,t){return l[t]|l[t+1]<<16}function X(l){let t=null;for(let e of l){let s=e.p.stoppedAt;(e.pos==e.p.stream.end||s!=null&&e.pos>s)&&e.p.parser.stateFlag(e.state,2)&&(!t||t.score<e.score)&&(t=e)}return t}function F(l){if(l.external){let t=l.extend?1:0;return(e,s)=>l.external(e,s)<<1|t}return l.get}export{_ as C,Z as E,w as L,W as a};
1
+ import{P as L,N as $,g as E,D as j,h as y,T as S,I as G}from"./index-mFOJXyAE.js";var N={};class v{constructor(t,e,s,i,h,r,n,o,a,u=0,f){this.p=t,this.stack=e,this.state=s,this.reducePos=i,this.pos=h,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=a,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,s=0){let i=t.parser.context;return new v(t,[],e,s,s,0,[],0,i?new R(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let s=t>>19,i=t&65535,{parser:h}=this.p,r=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),n=h.dynamicPrecedence(i);if(n&&(this.score+=n),s==0){i<h.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(h.getGoto(this.state,i,!0),this.reducePos),i<h.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,r?8:4,!0),this.reduceContext(i,this.reducePos);return}let o=this.stack.length-(s-1)*3-(t&262144?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from;i<h.minRepeatTerm&&a==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let u=this.reducePos-a;u>=2e3&&!(!((e=this.p.parser.nodeSet.types[i])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=u));let f=o?this.stack[o-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<h.minRepeatTerm||t&131072){let c=h.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,c,d+4,!0)}if(t&262144)this.state=this.stack[o];else{let c=this.stack[o-3];this.state=h.getGoto(c,i,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(i,a)}storeNode(t,e,s,i=4,h=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this.buffer.length;if(r>0&&this.buffer[r-4]==0&&this.buffer[r-1]>-1){if(e==s)return;if(this.buffer[r-2]>=e){this.buffer[r-2]=s;return}}}if(!h||this.pos==s)this.buffer.push(t,e,s,i);else{let r=this.buffer.length;if(r>0&&(this.buffer[r-4]!=0||this.buffer[r-1]<0)){let n=!1;for(let o=r;o>0&&this.buffer[o-2]>s;o-=4)if(this.buffer[o-1]>=0){n=!0;break}if(n)for(;r>0&&this.buffer[r-2]>s;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=s,this.buffer[r+3]=i}}shift(t,e,s,i){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let h=t,{parser:r}=this.p;this.pos=i;let n=r.stateFlag(h,1);!n&&(i>s||e<=r.maxNode)&&(this.reducePos=i),this.pushState(h,n?s:Math.min(s,this.reducePos)),this.shiftContext(e,s),e<=r.maxNode&&this.buffer.push(e,s,i,4)}else this.pos=i,this.shiftContext(e,s),e<=this.p.parser.maxNode&&this.buffer.push(e,s,i,4)}apply(t,e,s,i){t&65536?this.reduce(t):this.shift(t,e,s,i)}useNode(t,e){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(e&&t.buffer[e-4]==0&&(e-=4);e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let s=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new v(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,s?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new U(this);;){let s=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(s==0)return!1;if((s&65536)==0)return!0;e.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let h=0,r;h<e.length;h+=2)(r=e[h+1])!=this.state&&this.p.parser.hasAction(r,t)&&i.push(e[h],r);if(this.stack.length<120)for(let h=0;i.length<8&&h<e.length;h+=2){let r=e[h+1];i.some((n,o)=>o&1&&n==r)||i.push(e[h],r)}e=i}let s=[];for(let i=0;i<e.length&&s.length<4;i+=2){let h=e[i+1];if(h==this.state)continue;let r=this.split();r.pushState(h,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[i],this.pos),r.reducePos=this.pos,r.score-=200,s.push(r)}return s}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if((e&65536)==0)return!1;if(!t.validAction(this.state,e)){let s=e>>19,i=e&65535,h=this.stack.length-s*3;if(h<0||t.getGoto(this.stack[h],i,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;e=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],s=(i,h)=>{if(!e.includes(i))return e.push(i),t.allActions(i,r=>{if(!(r&393216))if(r&65536){let n=(r>>19)-h;if(n>1){let o=r&65535,a=this.stack.length-n*3;if(a>=0&&t.getGoto(this.stack[a],o,!1)>=0)return n<<19|65536|o}}else{let n=s(r,h+1);if(n!=null)return n}})};return s(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new R(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){return t<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class R{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class U{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=t&65535,s=t>>19;s==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(s-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class A{constructor(t,e,s){this.stack=t,this.pos=e,this.index=s,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new A(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new A(this.stack,this.pos,this.index)}}function x(l,t=Uint16Array){if(typeof l!="string")return l;let e=null;for(let s=0,i=0;s<l.length;){let h=0;for(;;){let r=l.charCodeAt(s++),n=!1;if(r==126){h=65535;break}r>=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,n=!0),h+=o,n)break;h*=46}e?e[i++]=h:e=new t(h)}return e}class P{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const z=new P;class H{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=z,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let s=this.range,i=this.rangeIndex,h=this.pos+t;for(;h<s.from;){if(!i)return null;let r=this.ranges[--i];h-=s.from-r.to,s=r}for(;e<0?h>s.to:h>=s.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];h+=r.from-s.to,s=r}return h}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e=this.chunkOff+t,s,i;if(e>=0&&e<this.chunk.length)s=this.pos+t,i=this.chunk.charCodeAt(e);else{let h=this.resolveOffset(t,1);if(h==null)return-1;if(s=h,s>=this.chunk2Pos&&s<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(s-this.chunk2Pos);else{let r=this.rangeIndex,n=this.range;for(;n.to<=s;)n=this.ranges[++r];this.chunk2=this.input.chunk(this.chunk2Pos=s),s+this.chunk2.length>n.to&&(this.chunk2=this.chunk2.slice(0,n.to-s)),i=this.chunk2.charCodeAt(0)}}return s>=this.token.lookAhead&&(this.token.lookAhead=s+1),i}acceptToken(t,e=0){let s=e?this.resolveOffset(e,-1):this.pos;if(s==null||s<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=s}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=z,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let s="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(s+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return s}}class m{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:s}=e.p;O(this.data,t,e,this.id,s.data,s.tokenPrecTable)}}m.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;class W{constructor(t,e,s){this.precTable=e,this.elseToken=s,this.data=typeof t=="string"?x(t):t}token(t,e){let s=t.pos,i=0;for(;;){let h=t.next<0,r=t.resolveOffset(1,1);if(O(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(this.elseToken==null)return;if(h||i++,r==null)break;t.reset(r,t.token)}i&&(t.reset(s,t.token),t.acceptToken(this.elseToken,i))}}W.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;class Z{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function O(l,t,e,s,i,h){let r=0,n=1<<s,{dialect:o}=e.p.parser;t:for(;(n&l[r])!=0;){let a=l[r+1];for(let c=r+3;c<a;c+=2)if((l[c+1]&n)>0){let p=l[c];if(o.allows(p)&&(t.token.value==-1||t.token.value==p||q(p,t.token.value,i,h))){t.acceptToken(p);break}}let u=t.next,f=0,d=l[r+2];if(t.next<0&&d>f&&l[a+d*3-3]==65535){r=l[a+d*3-1];continue t}for(;f<d;){let c=f+d>>1,p=a+c+(c<<1),b=l[p],M=l[p+1]||65536;if(u<b)d=c;else if(u>=M)f=c+1;else{r=l[p+2],t.advance();continue t}}break}}function I(l,t,e){for(let s=t,i;(i=l[s])!=65535;s++)if(i==e)return s-t;return-1}function q(l,t,e,s){let i=I(e,s,t);return i<0||I(e,s,l)<i}const g=typeof process<"u"&&N&&/\bparse\b/.test(N.LOG);let T=null;function D(l,t,e){let s=l.cursor(G.IncludeAnonymous);for(s.moveTo(t);;)if(!(e<0?s.childBefore(t):s.childAfter(t)))for(;;){if((e<0?s.to<t:s.from>t)&&!s.type.isError)return e<0?Math.max(0,Math.min(s.to-1,t-25)):Math.min(l.length,Math.max(s.from+1,t+25));if(e<0?s.prevSibling():s.nextSibling())break;if(!s.parent())return e<0?0:l.length}}class J{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?D(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?D(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let s=this.trees[e],i=this.index[e];if(i==s.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let h=s.children[i],r=this.start[e]+s.positions[i];if(r>t)return this.nextStart=r,null;if(h instanceof S){if(r==t){if(r<this.safeFrom)return null;let n=r+h.length;if(n<=this.safeTo){let o=h.prop(y.lookAhead);if(!o||n+o<this.fragment.to)return h}}this.index[e]++,r+h.length>=Math.max(this.safeFrom,t)&&(this.trees.push(h),this.start.push(r),this.index.push(0))}else this.index[e]++,this.nextStart=r+h.length}}}class K{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(s=>new P)}getActions(t){let e=0,s=null,{parser:i}=t.p,{tokenizers:h}=i,r=i.stateSlot(t.state,3),n=t.curContext?t.curContext.hash:0,o=0;for(let a=0;a<h.length;a++){if((1<<a&r)==0)continue;let u=h[a],f=this.tokens[a];if(!(s&&!u.fallback)&&((u.contextual||f.start!=t.pos||f.mask!=r||f.context!=n)&&(this.updateCachedToken(f,u,t),f.mask=r,f.context=n),f.lookAhead>f.end+25&&(o=Math.max(f.lookAhead,o)),f.value!=0)){let d=e;if(f.extended>-1&&(e=this.addActions(t,f.extended,f.end,e)),e=this.addActions(t,f.value,f.end,e),!u.extend&&(s=f,e>d))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),!s&&t.pos==this.stream.end&&(s=new P,s.value=t.p.parser.eofTerm,s.start=s.end=t.pos,e=this.addActions(t,s.value,s.end,e)),this.mainToken=s,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new P,{pos:s,p:i}=t;return e.start=s,e.end=Math.min(s+1,i.stream.end),e.value=s==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,s){let i=this.stream.clipPos(s.pos);if(e.token(this.stream.reset(i,t),s),t.value>-1){let{parser:h}=s.p;for(let r=0;r<h.specialized.length;r++)if(h.specialized[r]==t.value){let n=h.specializers[r](this.stream.read(t.start,t.end),s);if(n>=0&&s.p.parser.dialect.allows(n>>1)){(n&1)==0?t.value=n>>1:t.extended=n>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,s,i){for(let h=0;h<i;h+=3)if(this.actions[h]==t)return i;return this.actions[i++]=t,this.actions[i++]=e,this.actions[i++]=s,i}addActions(t,e,s,i){let{state:h}=t,{parser:r}=t.p,{data:n}=r;for(let o=0;o<2;o++)for(let a=r.stateSlot(h,o?2:1);;a+=3){if(n[a]==65535)if(n[a+1]==1)a=k(n,a+2);else{i==0&&n[a+1]==2&&(i=this.putAction(k(n,a+2),e,s,i));break}n[a]==e&&(i=this.putAction(k(n,a+1),e,s,i))}return i}}class Q{constructor(t,e,s,i){this.parser=t,this.input=e,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new H(e,i),this.tokens=new K(t,this.stream),this.topTerm=t.top[1];let{from:h}=i[0];this.stacks=[v.start(this,t.top[0],h)],this.fragments=s.length&&this.stream.end-h>t.bufferLength*4?new J(s,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,e=this.minStackPos,s=this.stacks=[],i,h;if(this.bigReductionCount>300&&t.length==1){let[r]=t;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;r<t.length;r++){let n=t[r];for(;;){if(this.tokens.mainToken=null,n.pos>e)s.push(n);else{if(this.advanceStack(n,s,t))continue;{i||(i=[],h=[]),i.push(n);let o=this.tokens.getMainToken(n);h.push(o.value,o.end)}}break}}if(!s.length){let r=i&&X(i);if(r)return g&&console.log("Finish with "+this.stackID(r)),this.stackToTree(r);if(this.parser.strict)throw g&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,h,s);if(r)return g&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(s.length>r)for(s.sort((n,o)=>o.score-n.score);s.length>r;)s.pop();s.some(n=>n.reducePos>e)&&this.recovering--}else if(s.length>1){t:for(let r=0;r<s.length-1;r++){let n=s[r];for(let o=r+1;o<s.length;o++){let a=s[o];if(n.sameState(a)||n.buffer.length>500&&a.buffer.length>500)if((n.score-a.score||n.buffer.length-a.buffer.length)>0)s.splice(o--,1);else{s.splice(r--,1);continue t}}}s.length>12&&(s.sort((r,n)=>n.score-r.score),s.splice(12,s.length-12))}this.minStackPos=s[0].pos;for(let r=1;r<s.length;r++)s[r].pos<this.minStackPos&&(this.minStackPos=s[r].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,s){let i=t.pos,{parser:h}=this,r=g?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let a=t.curContext&&t.curContext.tracker.strict,u=a?t.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?h.getGoto(t.state,f.type.id):-1;if(d>-1&&f.length&&(!a||(f.prop(y.contextHash)||0)==u))return t.useNode(f,d),g&&console.log(r+this.stackID(t)+` (via reuse of ${h.getName(f.type.id)})`),!0;if(!(f instanceof S)||f.children.length==0||f.positions[0]>0)break;let c=f.children[0];if(c instanceof S&&f.positions[0]==0)f=c;else break}}let n=h.stateSlot(t.state,4);if(n>0)return t.reduce(n),g&&console.log(r+this.stackID(t)+` (via always-reduce ${h.getName(n&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let o=this.tokens.getActions(t);for(let a=0;a<o.length;){let u=o[a++],f=o[a++],d=o[a++],c=a==o.length||!s,p=c?t:t.split(),b=this.tokens.mainToken;if(p.apply(u,f,b?b.start:p.pos,d),g&&console.log(r+this.stackID(p)+` (via ${(u&65536)==0?"shift":`reduce of ${h.getName(u&65535)}`} for ${h.getName(f)} @ ${i}${p==t?"":", split"})`),c)return!0;p.pos>i?e.push(p):s.push(p)}return!1}advanceFully(t,e){let s=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>s)return B(t,e),!0}}runRecovery(t,e,s){let i=null,h=!1;for(let r=0;r<t.length;r++){let n=t[r],o=e[r<<1],a=e[(r<<1)+1],u=g?this.stackID(n)+" -> ":"";if(n.deadEnd&&(h||(h=!0,n.restart(),g&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,s))))continue;let f=n.split(),d=u;for(let c=0;c<10&&f.forceReduce()&&(g&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,s));c++)g&&(d=this.stackID(f)+" -> ");for(let c of n.recoverByInsert(o))g&&console.log(u+this.stackID(c)+" (via recover-insert)"),this.advanceFully(c,s);this.stream.end>n.pos?(a==n.pos&&(a++,o=0),n.recoverByDelete(o,a),g&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),B(n,s)):(!i||i.score<f.score)&&(i=f)}return i}stackToTree(t){return t.close(),S.build({buffer:A.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(T||(T=new WeakMap)).get(t);return e||T.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function B(l,t){for(let e=0;e<t.length;e++){let s=t[e];if(s.pos==l.pos&&s.sameState(l)){t[e].score<l.score&&(t[e]=l);return}}t.push(l)}class V{constructor(t,e,s){this.source=t,this.flags=e,this.disabled=s}allows(t){return!this.disabled||this.disabled[t]==0}}const C=l=>l;class _{constructor(t){this.start=t.start,this.shift=t.shift||C,this.reduce=t.reduce||C,this.reuse=t.reuse||C,this.hash=t.hash||(()=>0),this.strict=t.strict!==!1}}class w extends L{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let n=0;n<t.repeatNodeCount;n++)e.push("");let s=Object.keys(t.topRules).map(n=>t.topRules[n][1]),i=[];for(let n=0;n<e.length;n++)i.push([]);function h(n,o,a){i[n].push([o,o.deserialize(String(a))])}if(t.nodeProps)for(let n of t.nodeProps){let o=n[0];typeof o=="string"&&(o=y[o]);for(let a=1;a<n.length;){let u=n[a++];if(u>=0)h(u,o,n[a++]);else{let f=n[a+-u];for(let d=-u;d>0;d--)h(n[a++],o,f);a++}}}this.nodeSet=new $(e.map((n,o)=>E.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:s.indexOf(o)>-1,error:o==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(o)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=j;let r=x(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;n<this.specializerSpecs.length;n++)this.specialized[n]=this.specializerSpecs[n].term;this.specializers=this.specializerSpecs.map(F),this.states=x(t.states,Uint32Array),this.data=x(t.stateData),this.goto=x(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(n=>typeof n=="number"?new m(r,n):n),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,s){let i=new Q(this,t,e,s);for(let h of this.wrappers)i=h(i,t,e,s);return i}getGoto(t,e,s=!1){let i=this.goto;if(e>=i[0])return-1;for(let h=i[e+1];;){let r=i[h++],n=r&1,o=i[h++];if(n&&s)return o;for(let a=h+(r>>1);h<a;h++)if(i[h]==t)return o;if(n)return-1}}hasAction(t,e){let s=this.data;for(let i=0;i<2;i++)for(let h=this.stateSlot(t,i?2:1),r;;h+=3){if((r=s[h])==65535)if(s[h+1]==1)r=s[h=k(s,h+2)];else{if(s[h+1]==2)return k(s,h+2);break}if(r==e||r==0)return k(s,h+1)}return 0}stateSlot(t,e){return this.states[t*6+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,s=>s==e?!0:null)}allActions(t,e){let s=this.stateSlot(t,4),i=s?e(s):void 0;for(let h=this.stateSlot(t,1);i==null;h+=3){if(this.data[h]==65535)if(this.data[h+1]==1)h=k(this.data,h+2);else break;i=e(k(this.data,h+1))}return i}nextStates(t){let e=[];for(let s=this.stateSlot(t,1);;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=k(this.data,s+2);else break;if((this.data[s+2]&1)==0){let i=this.data[s+1];e.some((h,r)=>r&1&&h==i)||e.push(this.data[s],i)}}return e}configure(t){let e=Object.assign(Object.create(w.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let s=this.topRules[t.top];if(!s)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=s}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(s=>{let i=t.tokenizers.find(h=>h.from==s);return i?i.to:s})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((s,i)=>{let h=t.specializers.find(n=>n.from==s.external);if(!h)return s;let r=Object.assign(Object.assign({},s),{external:h.to});return e.specializers[i]=F(r),r})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),t.bufferLength!=null&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return e==null?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),s=e.map(()=>!1);if(t)for(let h of t.split(" ")){let r=e.indexOf(h);r>=0&&(s[r]=!0)}let i=null;for(let h=0;h<e.length;h++)if(!s[h])for(let r=this.dialects[e[h]],n;(n=this.data[r++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[n]=1;return new V(t,s,i)}static deserialize(t){return new w(t)}}function k(l,t){return l[t]|l[t+1]<<16}function X(l){let t=null;for(let e of l){let s=e.p.stoppedAt;(e.pos==e.p.stream.end||s!=null&&e.pos>s)&&e.p.parser.stateFlag(e.state,2)&&(!t||t.score<e.score)&&(t=e)}return t}function F(l){if(l.external){let t=l.extend?1:0;return(e,s)=>l.external(e,s)<<1|t}return l.get}export{_ as C,Z as E,w as L,W as a};