@inkeep/open-knowledge 0.13.0 → 0.13.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/dist/assets/skills/discovery/SKILL.md +1 -1
  2. package/dist/assets/skills/project/SKILL.md +1 -1
  3. package/dist/cli.mjs +5 -5
  4. package/dist/config-schema.json +2 -2
  5. package/dist/config.project-local.schema.json +2 -2
  6. package/dist/constants-zj-D6a5L.mjs +2 -0
  7. package/dist/{dist-DkWZq_yT.mjs → dist-FERRdneg.mjs} +1 -1
  8. package/dist/{dist-CQ_iP-zI.mjs → dist-Pv-QcNKe.mjs} +4 -4
  9. package/dist/{gh-detect-BjSRN7jT.mjs → gh-detect-D2MiEraX.mjs} +2 -2
  10. package/dist/index.mjs +1 -1
  11. package/dist/{init-C4nsabn6.mjs → init-B0Hidsfj.mjs} +4 -4
  12. package/dist/init-R28SPyC3.mjs +1 -0
  13. package/dist/loader-D4lmTlOS.mjs +1 -0
  14. package/dist/{loader-BJjoa_jb.mjs → loader-OEvCsUOD.mjs} +2 -2
  15. package/dist/{preview-DmwhI1ui.mjs → preview-BHk2P9Dm.mjs} +2 -2
  16. package/dist/preview-DO5bfuVs.mjs +1 -0
  17. package/dist/public/assets/{ActivityModeContent-CgLff-sv.js → ActivityModeContent-dYSS8reE.js} +2 -2
  18. package/dist/public/assets/DocumentContext-B-oxrLtY.js +34 -0
  19. package/dist/public/assets/{GraphPanel-B22Ap1TK.js → GraphPanel-B0TgIau7.js} +3 -3
  20. package/dist/public/assets/{OpenInAgentMenuRequestContext-DC9w3W4X.js → OpenInAgentMenuRequestContext-r39HcOH8.js} +3 -3
  21. package/dist/public/assets/{SettingsDialogBody-JKiRbInO.js → SettingsDialogBody-DW_oZjfz.js} +2 -2
  22. package/dist/public/assets/{SourceEditor-B8ZhwmBS.js → SourceEditor-vRkBKGpM.js} +2 -2
  23. package/dist/public/assets/{_baseFor-CVV1DSgL.js → _baseFor-CLmEx-uV.js} +1 -1
  24. package/dist/public/assets/{arc-DoxD41WW.js → arc-ZBkDoSVo.js} +1 -1
  25. package/dist/public/assets/architecture-YZFGNWBL-Ba32eT14.js +1 -0
  26. package/dist/public/assets/{architectureDiagram-Q4EWVU46-Du5oNRD5.js → architectureDiagram-Q4EWVU46-C80VHLMS.js} +1 -1
  27. package/dist/public/assets/{blockDiagram-DXYQGD6D-CuxUJ8VP.js → blockDiagram-DXYQGD6D-BiQwRSZY.js} +1 -1
  28. package/dist/public/assets/{c4Diagram-AHTNJAMY-D58kKzW4.js → c4Diagram-AHTNJAMY-D1ejbaQi.js} +1 -1
  29. package/dist/public/assets/channel-DaNZHADJ.js +1 -0
  30. package/dist/public/assets/{chunk-2KRD3SAO-uai9wz3V.js → chunk-2KRD3SAO-Bb7ctRtg.js} +1 -1
  31. package/dist/public/assets/{chunk-336JU56O-CtkQ28bg.js → chunk-336JU56O-6EsJl3FV.js} +2 -2
  32. package/dist/public/assets/chunk-426QAEUC-CmWBFCvO.js +1 -0
  33. package/dist/public/assets/{chunk-4BX2VUAB-BTctgoF3.js → chunk-4BX2VUAB-CStN8-gJ.js} +1 -1
  34. package/dist/public/assets/{chunk-4TB4RGXK-Cnl-K_AI.js → chunk-4TB4RGXK-Dh150fip.js} +1 -1
  35. package/dist/public/assets/chunk-55IACEB6-B1OV_TzF.js +1 -0
  36. package/dist/public/assets/{chunk-5FUZZQ4R-DF0EG1O8.js → chunk-5FUZZQ4R-BSWV7mUH.js} +1 -1
  37. package/dist/public/assets/{chunk-5PVQY5BW-BpceE2BZ.js → chunk-5PVQY5BW-Crz-tXGQ.js} +1 -1
  38. package/dist/public/assets/{chunk-67CJDMHE-DiSIolj4.js → chunk-67CJDMHE-BaiP0VOj.js} +1 -1
  39. package/dist/public/assets/{chunk-7N4EOEYR-Yp7Nf16N.js → chunk-7N4EOEYR-Bo1GJF7F.js} +1 -1
  40. package/dist/public/assets/{chunk-AA7GKIK3--s2NNuet.js → chunk-AA7GKIK3-B1Bex8t7.js} +1 -1
  41. package/dist/public/assets/{chunk-BSJP7CBP-BrRqu__W.js → chunk-BSJP7CBP-C7R7mvYl.js} +1 -1
  42. package/dist/public/assets/{chunk-CIAEETIT-BUzaopy6.js → chunk-CIAEETIT-BQGGR7VC.js} +1 -1
  43. package/dist/public/assets/{chunk-EDXVE4YY-Bo83e0iq.js → chunk-EDXVE4YY-CwrwO38A.js} +1 -1
  44. package/dist/public/assets/{chunk-ENJZ2VHE-CY9yto8o.js → chunk-ENJZ2VHE-CNxYI-XS.js} +1 -1
  45. package/dist/public/assets/{chunk-FMBD7UC4-DEzvlUl3.js → chunk-FMBD7UC4-BV1VutPo.js} +1 -1
  46. package/dist/public/assets/{chunk-FOC6F5B3-BtjWNx10.js → chunk-FOC6F5B3-IFnEFiGw.js} +1 -1
  47. package/dist/public/assets/{chunk-ICPOFSXX-BC5Xd13f.js → chunk-ICPOFSXX-BJtjzSvt.js} +1 -1
  48. package/dist/public/assets/{chunk-K5T4RW27-CfU2wPmV.js → chunk-K5T4RW27-Cv4Nwq8D.js} +1 -1
  49. package/dist/public/assets/{chunk-KGLVRYIC-BV1pDifD.js → chunk-KGLVRYIC-DjUgK9E2.js} +1 -1
  50. package/dist/public/assets/{chunk-LIHQZDEY-C40dIbib.js → chunk-LIHQZDEY-xROB5ytH.js} +1 -1
  51. package/dist/public/assets/{chunk-ORNJ4GCN-8cFqvOFf.js → chunk-ORNJ4GCN-Bpm48h_E.js} +1 -1
  52. package/dist/public/assets/{chunk-OYMX7WX6-D0C6jdl8.js → chunk-OYMX7WX6-CXA_wIEM.js} +1 -1
  53. package/dist/public/assets/chunk-QZHKN3VN-DRgTPq5W.js +1 -0
  54. package/dist/public/assets/{chunk-U2HBQHQK-DenE4TdD.js → chunk-U2HBQHQK-CvC8xiH_.js} +1 -1
  55. package/dist/public/assets/{chunk-X2U36JSP-DSyuGkzP.js → chunk-X2U36JSP-DiiZSBya.js} +1 -1
  56. package/dist/public/assets/{chunk-XPW4576I-CLO5Bb_q.js → chunk-XPW4576I-BPi3RSM8.js} +1 -1
  57. package/dist/public/assets/{chunk-YZCP3GAM-D8kUvWu6.js → chunk-YZCP3GAM-DIqct9Dy.js} +1 -1
  58. package/dist/public/assets/{chunk-ZZ45TVLE-DHB0SHUz.js → chunk-ZZ45TVLE-Cmy3noqp.js} +1 -1
  59. package/dist/public/assets/classDiagram-6PBFFD2Q-DvWWcM0E.js +1 -0
  60. package/dist/public/assets/classDiagram-v2-HSJHXN6E-DhFyY6hw.js +1 -0
  61. package/dist/public/assets/clike-BBiCLLCt.js +1 -0
  62. package/dist/public/assets/clone-CAIAcB_5.js +1 -0
  63. package/dist/public/assets/config-validation-events-D2hu2bJf.js +12 -0
  64. package/dist/public/assets/{cose-bilkent-S5V4N54A-6FB6GAoi.js → cose-bilkent-S5V4N54A-ByHX97VH.js} +1 -1
  65. package/dist/public/assets/{dagre-D2_448Gx.js → dagre-BqDAoWa_.js} +1 -1
  66. package/dist/public/assets/{dagre-KV5264BT-Bn9RtFC-.js → dagre-KV5264BT-DQ4G50Ez.js} +1 -1
  67. package/dist/public/assets/{diagram-5BDNPKRD-XCR9sVhK.js → diagram-5BDNPKRD-Df3hYsCc.js} +1 -1
  68. package/dist/public/assets/{diagram-G4DWMVQ6-Bz0ngc_7.js → diagram-G4DWMVQ6-DA5wggeJ.js} +1 -1
  69. package/dist/public/assets/{diagram-MMDJMWI5-o_IQFxK_.js → diagram-MMDJMWI5-BKsx82sM.js} +1 -1
  70. package/dist/public/assets/{diagram-TYMM5635-D2QJXyfV.js → diagram-TYMM5635-Cx-QAYun.js} +1 -1
  71. package/dist/public/assets/diff-oF98tbqj.js +1 -0
  72. package/dist/public/assets/dist-Bhpgs2mN.js +23 -0
  73. package/dist/public/assets/dist-CFC6ETFp.js +1 -0
  74. package/dist/public/assets/dist-CHa9gToQ.js +1 -0
  75. package/dist/public/assets/dist-EUPuOvQG.js +6 -0
  76. package/dist/public/assets/{dist-CXGJFbY5.js → dist-HsBWb9z1.js} +1 -1
  77. package/dist/public/assets/{erDiagram-SMLLAGMA-C1Mr5jbs.js → erDiagram-SMLLAGMA-DS2EkJSS.js} +1 -1
  78. package/dist/public/assets/{flatten-DFiFicpD.js → flatten-Bq7JNnk1.js} +1 -1
  79. package/dist/public/assets/{flowDiagram-DWJPFMVM--ukgnTYS.js → flowDiagram-DWJPFMVM-C7dRgCul.js} +1 -1
  80. package/dist/public/assets/{ganttDiagram-T4ZO3ILL-CVeIdgCM.js → ganttDiagram-T4ZO3ILL-CVzeVUPz.js} +1 -1
  81. package/dist/public/assets/gitGraph-7Q5UKJZL-Cfg6Zz2Y.js +1 -0
  82. package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-BSivDyLh.js → gitGraphDiagram-UUTBAWPF-DKA3i8XK.js} +1 -1
  83. package/dist/public/assets/{graphlib-DvRtwu4N.js → graphlib-BAo-zDnM.js} +1 -1
  84. package/dist/public/assets/index-14_Rgzs9.js +1970 -0
  85. package/dist/public/assets/{index-DIqCyLoL.css → index-Ck2iVMbM.css} +1 -1
  86. package/dist/public/assets/info-OMHHGYJF-dZByL5Um.js +1 -0
  87. package/dist/public/assets/{infoDiagram-42DDH7IO-DtO1Tc8U.js → infoDiagram-42DDH7IO-OwTvY-nq.js} +1 -1
  88. package/dist/public/assets/{isEmpty-gGVpRSDa.js → isEmpty-BaYJxylK.js} +1 -1
  89. package/dist/public/assets/isSymbol-DbyU_KSy.js +1 -0
  90. package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-BY3noyNF.js → ishikawaDiagram-UXIWVN3A-CxxWE-bW.js} +1 -1
  91. package/dist/public/assets/{journeyDiagram-VCZTEJTY-DdFdkR8_.js → journeyDiagram-VCZTEJTY-Bd9-TaNR.js} +1 -1
  92. package/dist/public/assets/{kanban-definition-6JOO6SKY-WoLnXp48.js → kanban-definition-6JOO6SKY-DQW_YGQC.js} +1 -1
  93. package/dist/public/assets/{keyboard-shortcuts-CgHmwMZh.js → keyboard-shortcuts-CE3ut3wk.js} +1 -1
  94. package/dist/public/assets/{line-C59Ezo8Z.js → line-CI98TdYs.js} +1 -1
  95. package/dist/public/assets/{linear-faBQNtcz.js → linear-zYT4DO0m.js} +1 -1
  96. package/dist/public/assets/lua-DogGNZM7.js +1 -0
  97. package/dist/public/assets/{mermaid-parser.core-CFsvu03i.js → mermaid-parser.core-97ERSHeh.js} +2 -2
  98. package/dist/public/assets/{mermaid.core-CWYso-V4.js → mermaid.core-DX0xr3wP.js} +3 -3
  99. package/dist/public/assets/{mindmap-definition-QFDTVHPH-BG3Kwhhs.js → mindmap-definition-QFDTVHPH-Coc8cZNw.js} +1 -1
  100. package/dist/public/assets/{now-D_m-3Vjm.js → now-apsi0gq5.js} +1 -1
  101. package/dist/public/assets/{ordinal-BLFwWMHf.js → ordinal-BKx5xpdd.js} +1 -1
  102. package/dist/public/assets/packet-4T2RLAQJ-CynhJEHt.js +1 -0
  103. package/dist/public/assets/perl-B8hjBeDi.js +1 -0
  104. package/dist/public/assets/pie-ZZUOXDRM-Deqc6YHl.js +1 -0
  105. package/dist/public/assets/{pieDiagram-DEJITSTG-B1wtn7py.js → pieDiagram-DEJITSTG-D6fFuTvD.js} +1 -1
  106. package/dist/public/assets/{prop-types-BZGYw9Lv.js → prop-types-rWEy3Nmv.js} +163 -163
  107. package/dist/public/assets/properties-f-wrvpvr.js +1 -0
  108. package/dist/public/assets/{quadrantDiagram-34T5L4WZ-yboV7Kxh.js → quadrantDiagram-34T5L4WZ-BPPSd4JR.js} +1 -1
  109. package/dist/public/assets/r-CDoPAem8.js +1 -0
  110. package/dist/public/assets/radar-PYXPWWZC-Cn-E40XU.js +1 -0
  111. package/dist/public/assets/{reduce-DmI60TfL.js → reduce-P-IyzQ6C.js} +1 -1
  112. package/dist/public/assets/{requirementDiagram-MS252O5E-BpVLqxNT.js → requirementDiagram-MS252O5E-CPXHn0tv.js} +1 -1
  113. package/dist/public/assets/ruby-C5cjEZ9S.js +1 -0
  114. package/dist/public/assets/{sankeyDiagram-XADWPNL6-CH1ZYL1H.js → sankeyDiagram-XADWPNL6-DjK4gSte.js} +1 -1
  115. package/dist/public/assets/{sequenceDiagram-FGHM5R23-CwQvwa3m.js → sequenceDiagram-FGHM5R23-BbrCswbf.js} +1 -1
  116. package/dist/public/assets/sql-BZdVSZbB.js +1 -0
  117. package/dist/public/assets/{src-DOAilbaA.js → src-D5XC2WMN.js} +1 -1
  118. package/dist/public/assets/{stateDiagram-FHFEXIEX-DL3pXt3n.js → stateDiagram-FHFEXIEX-CBNa-8CC.js} +1 -1
  119. package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-DaVEofDm.js +1 -0
  120. package/dist/public/assets/swift-C1pmGfoN.js +1 -0
  121. package/dist/public/assets/{target-navigation-intent-BMa-PucP.js → target-navigation-intent-BeYNBlOx.js} +1 -1
  122. package/dist/public/assets/{telemetry-impl-BrY67z04.js → telemetry-impl-jTAeHDfT.js} +2 -2
  123. package/dist/public/assets/{timeline-definition-GMOUNBTQ-CDbb3c--.js → timeline-definition-GMOUNBTQ-Ct6IzDwu.js} +1 -1
  124. package/dist/public/assets/toml-BxL_Smp6.js +1 -0
  125. package/dist/public/assets/treeView-SZITEDCU-CxFlya9Z.js +1 -0
  126. package/dist/public/assets/treemap-W4RFUUIX-BEtAiYkU.js +1 -0
  127. package/dist/public/assets/{vennDiagram-DHZGUBPP-BaHOUqGA.js → vennDiagram-DHZGUBPP-CJZqgTC6.js} +1 -1
  128. package/dist/public/assets/wardley-RL74JXVD-Dg4aNiZz.js +1 -0
  129. package/dist/public/assets/{wardleyDiagram-NUSXRM2D-5ysokC2z.js → wardleyDiagram-NUSXRM2D-DiWgtrUd.js} +1 -1
  130. package/dist/public/assets/{xychartDiagram-5P7HB3ND-CFQqcNjf.js → xychartDiagram-5P7HB3ND-DpfbVNEf.js} +1 -1
  131. package/dist/public/index.html +16 -12
  132. package/dist/{repair-launch-json-B0owEqIi.mjs → repair-launch-json-DixAuGM9.mjs} +2 -2
  133. package/dist/{repair-mcp-configs-D030GUII.mjs → repair-mcp-configs-5HQGdE2G.mjs} +2 -2
  134. package/dist/repair-skills-C_h_l--W.mjs +1 -0
  135. package/dist/{repair-skills-Ghdhebnv.mjs → repair-skills-OdHTdsUa.mjs} +2 -2
  136. package/dist/schemas/v0/config.project-local.schema.json +2 -2
  137. package/dist/{server-lock-BpjJj3OD-DR9UrMHX.mjs → server-lock-BpjJj3OD-CHC__Hj9.mjs} +31 -31
  138. package/dist/server-lock-CyhBidkz-BDr_KNnC.mjs +1 -0
  139. package/dist/{src-1HrAU42S.mjs → src-DKNW3Oob.mjs} +2 -2
  140. package/dist/{start-ug6kEcOW.mjs → start-DiA6G6BK.mjs} +2 -2
  141. package/dist/start-QBtkSahy.mjs +1 -0
  142. package/dist/{write-project-skill-1--7yQee.mjs → write-project-skill-CIXAI50Z.mjs} +2 -2
  143. package/package.json +1 -1
  144. package/dist/constants-D6Ws46zX.mjs +0 -2
  145. package/dist/init-D72F101N.mjs +0 -1
  146. package/dist/loader-BrTxQ1Vj.mjs +0 -1
  147. package/dist/preview-DKGoJKg-.mjs +0 -1
  148. package/dist/public/assets/DocumentContext-wGiQh1iD.js +0 -61
  149. package/dist/public/assets/architecture-YZFGNWBL-C7rs88Cj.js +0 -1
  150. package/dist/public/assets/channel-kvPH_LHg.js +0 -1
  151. package/dist/public/assets/chunk-426QAEUC-jRhC4EYv.js +0 -1
  152. package/dist/public/assets/chunk-55IACEB6-dtXOOCuI.js +0 -1
  153. package/dist/public/assets/chunk-QZHKN3VN-Bz4XrtbS.js +0 -1
  154. package/dist/public/assets/classDiagram-6PBFFD2Q-MrFnlVPS.js +0 -1
  155. package/dist/public/assets/classDiagram-v2-HSJHXN6E-DFkKo4Ct.js +0 -1
  156. package/dist/public/assets/clone-jj9sSaF-.js +0 -1
  157. package/dist/public/assets/config-validation-events-DNZOWnBA.js +0 -12
  158. package/dist/public/assets/gitGraph-7Q5UKJZL-Bmgp5n-M.js +0 -1
  159. package/dist/public/assets/index-Cuj6ISpM.js +0 -1970
  160. package/dist/public/assets/info-OMHHGYJF-DCMX4pS_.js +0 -1
  161. package/dist/public/assets/isSymbol-D0ur5y-p.js +0 -1
  162. package/dist/public/assets/packet-4T2RLAQJ-DveBhlQF.js +0 -1
  163. package/dist/public/assets/pie-ZZUOXDRM-yiLyabeZ.js +0 -1
  164. package/dist/public/assets/radar-PYXPWWZC-D8GV_2fZ.js +0 -1
  165. package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-6f8E13YF.js +0 -1
  166. package/dist/public/assets/treeView-SZITEDCU-A2Cj-I1J.js +0 -1
  167. package/dist/public/assets/treemap-W4RFUUIX-uOn6xcZK.js +0 -1
  168. package/dist/public/assets/wardley-RL74JXVD-DrTPuxUO.js +0 -1
  169. package/dist/repair-skills-C-llRRHT.mjs +0 -1
  170. package/dist/server-lock-CyhBidkz-BOUYNO6u.mjs +0 -1
  171. package/dist/start-Q_k_vG4k.mjs +0 -1
  172. /package/dist/public/assets/{ActivityPanelDiffView-DgtknSgX.js → ActivityPanelDiffView-_z_oyYKA.js} +0 -0
  173. /package/dist/public/assets/{ConsentDialogBody-Bd3NDbzN.js → ConsentDialogBody-D_2i4xRA.js} +0 -0
  174. /package/dist/public/assets/{McpConsentDialogBody-pUjQ4lzI.js → McpConsentDialogBody-5XkYjJF4.js} +0 -0
  175. /package/dist/public/assets/{__vite-browser-external-sCjVW6Bj.js → __vite-browser-external-BTURpUGG.js} +0 -0
  176. /package/dist/public/assets/{array-COEOjKUv.js → array-CoITLxgj.js} +0 -0
  177. /package/dist/public/assets/{colors-D6LRuSY-.js → colors-CiFjW_Oo.js} +0 -0
  178. /package/dist/public/assets/{cytoscape.esm-4jw_vW_Q.js → cytoscape.esm-CE4zCMdZ.js} +0 -0
  179. /package/dist/public/assets/{defaultLocale-CoF2cqkH.js → defaultLocale-DubBQDt1.js} +0 -0
  180. /package/dist/public/assets/{dist-Cq1LYbUj.js → dist-38u4zX4n.js} +0 -0
  181. /package/dist/public/assets/{dist-BrsSsfiw.js → dist-B1ujHzpJ.js} +0 -0
  182. /package/dist/public/assets/{dist-DsbVHLNy.js → dist-BD3wCMhu.js} +0 -0
  183. /package/dist/public/assets/{dist-Bog19bCH.js → dist-C8fL82UJ.js} +0 -0
  184. /package/dist/public/assets/{dist-CyaBbyDQ.js → dist-D1TaAKEQ.js} +0 -0
  185. /package/dist/public/assets/{go-wMvjCq97.js → go-BYaOo3ws.js} +0 -0
  186. /package/dist/public/assets/{init-8GNx5phc.js → init-BbbW95L5.js} +0 -0
  187. /package/dist/public/assets/{isObjectLike-DFnkciUU.js → isObjectLike-D-tumRTm.js} +0 -0
  188. /package/dist/public/assets/{min-BiwsSkbB.js → min-SPnGxfCC.js} +0 -0
  189. /package/dist/public/assets/{path-C-grg3CZ.js → path-BMC90ub1.js} +0 -0
  190. /package/dist/public/assets/{pdf-CtJiipL_.js → pdf-5LEu96df.js} +0 -0
  191. /package/dist/public/assets/{pdf.worker-BZq-wJdz.js → pdf.worker-H6j9VSL8.js} +0 -0
  192. /package/dist/public/assets/{rough.esm-DDK-gphn.js → rough.esm-B1B52ZQS.js} +0 -0
  193. /package/dist/public/assets/{shell-DdhS5_h8.js → shell-BMSPR9nT.js} +0 -0
  194. /package/dist/public/assets/{src-L3wpjxBL.js → src-CBnpBvbk.js} +0 -0
  195. /package/dist/public/assets/{stex-CzCFWeB9.js → stex-B7pCrEco.js} +0 -0
@@ -1,2 +1,2 @@
1
- import{o as e}from"./chunk-CFjPhJqf.js";import{a as t,o as n,t as r}from"./compiler-runtime-Cs91PcD2.js";import{Cn as i,Dt as a,H as o,M as s,N as c,Ot as l,P as u,Q as d,Sn as f,W as ee,X as p,_n as m,bn as h,dn as g,gn as _,hn as v,mn as y,pn as b,vn as x,xn as S,yn as C}from"./DocumentContext-wGiQh1iD.js";import{Ai as te,Lt as w,Qn as T,ua as ne}from"./prop-types-BZGYw9Lv.js";import{l as re}from"./keyboard-shortcuts-CgHmwMZh.js";import{$ as E,Dt as ie,Et as D,Ft as O,J as k,Ot as A,P as j,Q as M,Tt as N,X as P,jt as F,pt as ae,ut as oe,xt as I}from"./dist-Du-s1q8P.js";import{a as se,d as ce,i as le,m as ue,n as de,p as fe,u as pe}from"./OpenInAgentMenuRequestContext-DC9w3W4X.js";var L=e(t(),1),me=r(),R=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:x(this.yanchor),yhead:x(this.yhead)}}static fromJSON(t){return new e(_(t.yanchor),_(t.yhead))}},z=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new b(e)}toYPos(e,t=0){return m(this.ytext,e,t)}fromYPos(e){let t=v(_(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new R(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?D.cursor(n.pos,n.assoc):D.range(t.pos,n.pos)}},B=A.define({combine(e){return e[e.length-1]}}),V=I.define(),H=class{constructor(e){this.view=e,this.conf=e.state.facet(B),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[V.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(V)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
2
- `);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},U=M.fromClass(H),W=P.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),G=I.define(),K=class extends E{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return C(`span`,[S(`class`,`cm-ySelectionCaret`),S(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[h(`⁠`),C(`div`,[S(`class`,`cm-ySelectionCaretDot`)]),h(`⁠`),C(`div`,[S(`class`,`cm-ySelectionInfo`)],[h(this.name)]),h(`⁠`)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},q=class{constructor(e){this.conf=e.state.facet(B),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[G.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=F.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let t=this.conf.ytext,n=t.doc,r=this.conf.awareness,a=[],o=this.conf.awareness.getLocalState();if(o!=null){let n=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=n?e.state.selection.main:null,a=o.cursor==null?null:_(o.cursor.anchor),s=o.cursor==null?null:_(o.cursor.head);if(i!=null){let e=m(t,i.anchor),n=m(t,i.head);(o.cursor==null||!y(a,e)||!y(s,n))&&r.setLocalStateField(`cursor`,{anchor:e,head:n})}else o.cursor!=null&&n&&r.setLocalStateField(`cursor`,null)}r.getStates().forEach((o,s)=>{if(s===r.doc.clientID)return;let c=o.cursor;if(c==null||c.anchor==null||c.head==null)return;let l=v(c.anchor,n),u=v(c.head,n);if(l==null||u==null||l.type!==t||u.type!==t)return;let{color:d=`#30bced`,name:ee=`Anonymous`}=o.user||{},p=o.user&&o.user.colorLight||d+`33`,m=i(l.index,u.index),h=f(l.index,u.index),g=e.view.state.doc.lineAt(m),_=e.view.state.doc.lineAt(h);if(g.number===_.number)a.push({from:m,to:h,value:k.mark({attributes:{style:`background-color: ${p}`},class:`cm-ySelection`})});else{a.push({from:m,to:g.from+g.length,value:k.mark({attributes:{style:`background-color: ${p}`},class:`cm-ySelection`})}),a.push({from:_.from,to:h,value:k.mark({attributes:{style:`background-color: ${p}`},class:`cm-ySelection`})});for(let t=g.number+1;t<_.number;t++){let n=e.view.state.doc.line(t).from;a.push({from:n,to:n,value:k.line({attributes:{style:`background-color: ${p}`,class:`cm-yLineSelection`}})})}}a.push({from:u.index,to:u.index,value:k.widget({side:u.index-l.index>0?-1:1,block:!1,widget:new K(d,ee)})})}),this.decorations=k.set(a,!0)}},J=M.fromClass(q,{decorations:e=>e.decorations}),Y=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},X=A.define({combine(e){return e[e.length-1]}});I.define();var Z=class{constructor(e){this.view=e,this.conf=e.state.facet(X),this._undoManager=this.conf.undoManager,this.syncConf=e.state.facet(B),this._beforeChangeSelection=null,this._mux=g(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:t})=>{let n=t.meta.get(this);if(n){let t=this.syncConf.fromYRange(n);e.dispatch(e.state.update({selection:t,effects:[P.scrollIntoView(t)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(V)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},Q=M.fromClass(Z),he=({state:e,dispatch:t})=>e.facet(X).undo()||!0,ge=({state:e,dispatch:t})=>e.facet(X).redo()||!0,_e=(e,t,{undoManager:n=new b(e)}={})=>{let r=new z(e,t),i=[B.of(r),U];return t&&i.push(W,J),n!==!1&&i.push(X.of(new Y(n)),Q,P.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?he(t):e.inputType===`historyRedo`?ge(t):!1}})),i},ve=k.mark({class:`cm-link-ref-broken`}),ye=/^\s{0,3}\[([^\]]+)\]:\s/,be=/\[([^\]]*)\]\[([^\]]*)\]/g,xe=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function $(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i];if(e<a.from)r=i-1;else if(e>=a.to)n=i+1;else return!0}return!1}function Se(e){let t=[];return j(e).iterate({enter(e){if(xe.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function Ce(e){let t=new Set,n=[],r=e.doc,i=Se(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if($(n.from,i))continue;let a=ye.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!$(t.from,i)&&!ye.test(t.text))for(be.lastIndex=0;;){let e=be.exec(t.text);if(!e)break;let r=t.from+e.index;if($(r,i))continue;let a=e[2]||e[1];n.push({from:r,to:r+e[0].length,label:a.toLowerCase()})}}let a=[];for(let e of n)t.has(e.label)||a.push(ve.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),k.set(a)}var we=O.define({create(e){return Ce(e)},update(e,t){return t.docChanged?Ce(t.state):e},provide:e=>P.decorations.from(e)}),Te=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,Ee=k.mark({class:`cm-del`}),De=k.line({class:`cm-table-header`,attributes:{style:`--list-hang: 2ch`}}),Oe=k.line({class:`cm-table-row`,attributes:{style:`--list-hang: 2ch`}});function ke(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function Ae(e){if(e.doc.lines<2)return null;let t=e.doc.line(1);if(!w.test(t.text))return null;for(let n=2;n<=e.doc.lines;n++){let r=e.doc.line(n);if(w.test(r.text))return{from:t.from,to:r.to}}return null}function je(e,t){let n=[],r=j(e),i=Ae(e),a=e=>i!==null&&e>=i.from&&e<=i.to;for(let{from:i,to:o}of t)r.iterate({from:i,to:o,enter(t){if(!a(t.from)){if(t.name===`Strikethrough`){let e=t.from,r=t.to,i=t.node.cursor();if(i.firstChild())do i.name===`StrikethroughMark`&&(i.from===t.from?e=i.to:r=i.from);while(i.nextSibling());return e<r&&n.push(Ee.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=Te.exec(r.text),a=i?i[1].length:2,o=k.line({class:`cm-list-item`,attributes:{style:`--list-hang: ${a}ch`}});n.push(o.range(r.from));return}if(t.name===`FencedCode`){let r=e.doc.lineAt(t.from),i=e.doc.lineAt(t.to);for(let t=r.number+1;t<i.number;t++){let r=e.doc.line(t),i=ke(r.text),a=k.line({class:`cm-fenced-code-line`,attributes:{style:`--line-indent: ${i}`}});n.push(a.range(r.from))}return!1}if(t.name===`TableHeader`){let r=e.doc.lineAt(t.from);return n.push(De.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(Oe.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(Oe.range(r.from)),!1}}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),k.set(n)}var Me=class{decorations;constructor(e){this.decorations=je(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||j(e.startState)!==j(e.state))&&(this.decorations=je(e.view.state,e.view.visibleRanges))}},Ne=M.fromClass(Me,{decorations:e=>e.decorations});function Pe(){return[Ne,we]}var Fe=n(),Ie=56;function Le(e,t){let n=e.state.doc,r=1;if(n.lines>=1&&w.test(n.line(1).text)){for(let e=2;e<=n.lines;e++)if(w.test(n.line(e).text)){r=e+1;break}}let i=T(),a=0;for(let o=r;o<=n.lines;o++){let r=n.line(o);if(!i(r.text)&&/^#{1,6}\s/.test(r.text)){if(a===t.index){e.dispatch({selection:D.cursor(r.from),effects:P.scrollIntoView(r.from,{y:`start`})}),e.focus();return}a++}}}function Re(e,t){requestAnimationFrame(()=>{let n=e.state.doc,r=Math.min(t.offset,n.length);e.dispatch({selection:D.cursor(r),effects:P.scrollIntoView(r,{y:`center`})}),e.focus()})}function ze(e){let t=e.state.selection.main;return t.empty?``:e.state.sliceDoc(t.from,t.to)}function Be(e){let t=(0,me.c)(39),{docName:n,ytext:r,provider:i,placeholder:o,isSourceModeActive:f}=e,m=(0,L.useRef)(null),h=(0,L.useRef)(null),g;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=new N,t[0]=g):g=t[0];let _=(0,L.useRef)(g),v;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=new N,t[1]=v):v=t[1];let y=(0,L.useRef)(v),b;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(b=new N,t[2]=b):b=t[2];let x=(0,L.useRef)(b),[S,C]=(0,L.useState)(null);if(S)throw S;let{resolvedTheme:w}=ne(),{merged:T}=ee(),{openSelection:E}=de(),D=(0,L.useRef)(E),O=(0,L.useRef)(f),k=T?.editor?.wordWrap??!0,A,j;t[3]===E?(A=t[4],j=t[5]):(A=()=>{D.current=E},j=[E],t[3]=E,t[4]=A,t[5]=j),(0,L.useEffect)(A,j);let M,F;t[6]===f?(M=t[7],F=t[8]):(M=()=>{O.current=f},F=[f],t[6]=f,t[7]=M,t[8]=F),(0,L.useEffect)(M,F);let I=(0,L.useRef)(null),R;t[9]!==o||t[10]!==i||t[11]!==w||t[12]!==k||t[13]!==r?(R=()=>{let e=m.current;if(!e)return;let t=i.configuration.name??``,n,c=He;try{n=a({docName:t,container:e,sizeStats:{viewCount:0,bytes:r.length},factory:e=>{let n=null,a=d({ydoc:i.document,ytext:r}),l=new P({state:ie.create({doc:r.toString(),extensions:[pe,oe.of([p]),_e(r,i.awareness),...s({themeCompartment:_.current,resolvedTheme:w,ydoc:i.document,wordWrapCompartment:x.current,wordWrap:k}),Pe(),a,P.updateListener.of(e=>{!e.selectionSet&&!e.docChanged||(n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,le(t,`source`,se(e.view))},120))}),P.domEventHandlers({keydown:(e,n)=>!O.current||!te()||!re(e,`edit-with-ai`)?!1:(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),D.current({docName:t,instruction:``,selectionMarkdown:ze(n)}),!0)}),y.current.of(ae(o??``)),P.theme({"&":{height:`100%`}}),P.scrollMargins.of(Ve)]}),parent:e});le(t,`source`,se(l));let u=l.contentDOM;return u.addEventListener(`keydown`,c),u.addEventListener(`paste`,c),u.addEventListener(`drop`,c),u.addEventListener(`cut`,c),{view:l,ydoc:i.document,ytext:r,provider:i}}}),I.current=n,h.current=n.view}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),I.current=null,h.current=null,C(t instanceof Error?t:Error(String(t)))}return()=>{let e=I.current;e&&l(e),I.current=null,h.current=null}},t[9]=o,t[10]=i,t[11]=w,t[12]=k,t[13]=r,t[14]=R):R=t[14];let z;t[15]!==i||t[16]!==r?(z=[r,i],t[15]=i,t[16]=r,t[17]=z):z=t[17],(0,L.useEffect)(R,z);let B,V;t[18]===n?(B=t[19],V=t[20]):(B=()=>{},V=[n],t[18]=n,t[19]=B,t[20]=V),(0,L.useEffect)(B,V);let H,U;t[21]===w?(H=t[22],U=t[23]):(H=()=>{h.current&&h.current.dispatch({effects:_.current.reconfigure(w===`dark`?c:u)})},U=[w],t[21]=w,t[22]=H,t[23]=U),(0,L.useEffect)(H,U);let W,G;t[24]===k?(W=t[25],G=t[26]):(W=()=>{h.current&&h.current.dispatch({effects:x.current.reconfigure(k?P.lineWrapping:[])})},G=[k],t[24]=k,t[25]=W,t[26]=G),(0,L.useEffect)(W,G);let K,q;t[27]===o?(K=t[28],q=t[29]):(K=()=>{h.current&&h.current.dispatch({effects:y.current.reconfigure(ae(o??``))})},q=[o],t[27]=o,t[28]=K,t[29]=q),(0,L.useEffect)(K,q);let J,Y;t[30]!==n||t[31]!==f?(J=()=>{let e=function(e){let t=e.detail;if(!t||t.mode!==`source`||!f)return;let r=h.current;r&&(Le(r,t),fe(n))};return window.addEventListener(ce,e),()=>window.removeEventListener(ce,e)},Y=[n,f],t[30]=n,t[31]=f,t[32]=J,t[33]=Y):(J=t[32],Y=t[33]),(0,L.useEffect)(J,Y);let X,Z;t[34]!==n||t[35]!==f?(X=()=>{if(!f)return;let e=h.current;if(!e)return;let t=ue(n);if(t){if(t.kind===`outline`){Le(e,t.detail);return}Re(e,t.detail)}},Z=[n,f],t[34]=n,t[35]=f,t[36]=X,t[37]=Z):(X=t[36],Z=t[37]),(0,L.useEffect)(X,Z);let Q;return t[38]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,Fe.jsx)(`div`,{ref:m,className:`source-editor h-full pb-3`}),t[38]=Q):Q=t[38],Q}function Ve(){return{top:Ie}}function He(){return o()}export{Be as SourceEditor};
1
+ import{o as e}from"./chunk-CFjPhJqf.js";import{a as t,o as n,t as r}from"./compiler-runtime-Cs91PcD2.js";import{Dt as i,Et as a,H as o,M as s,N as c,P as l,Sn as u,W as d,Y as ee,Z as f,_n as p,bn as m,fn as h,gn as g,hn as _,mn as v,pn as y,un as b,vn as x,xn as S,yn as C}from"./DocumentContext-B-oxrLtY.js";import{$n as w,Lt as T,Mi as te,fa as ne}from"./prop-types-rWEy3Nmv.js";import{l as re}from"./keyboard-shortcuts-CE3ut3wk.js";import{$ as E,Dt as ie,Et as D,Ft as O,J as k,Ot as A,P as j,Q as M,Tt as N,X as P,jt as F,pt as ae,ut as oe,xt as I}from"./dist-Du-s1q8P.js";import{a as se,d as ce,i as le,m as ue,n as de,p as fe,u as pe}from"./OpenInAgentMenuRequestContext-r39HcOH8.js";var L=e(t(),1),me=r(),R=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:p(this.yanchor),yhead:p(this.yhead)}}static fromJSON(t){return new e(_(t.yanchor),_(t.yhead))}},z=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new h(e)}toYPos(e,t=0){return g(this.ytext,e,t)}fromYPos(e){let t=v(_(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new R(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?D.cursor(n.pos,n.assoc):D.range(t.pos,n.pos)}},B=A.define({combine(e){return e[e.length-1]}}),V=I.define(),H=class{constructor(e){this.view=e,this.conf=e.state.facet(B),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[V.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(V)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
2
+ `);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},U=M.fromClass(H),W=P.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),G=I.define(),K=class extends E{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return x(`span`,[m(`class`,`cm-ySelectionCaret`),m(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[C(`⁠`),x(`div`,[m(`class`,`cm-ySelectionCaretDot`)]),C(`⁠`),x(`div`,[m(`class`,`cm-ySelectionInfo`)],[C(this.name)]),C(`⁠`)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},q=class{constructor(e){this.conf=e.state.facet(B),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[G.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=F.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let t=this.conf.ytext,n=t.doc,r=this.conf.awareness,i=[],a=this.conf.awareness.getLocalState();if(a!=null){let n=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=n?e.state.selection.main:null,o=a.cursor==null?null:_(a.cursor.anchor),s=a.cursor==null?null:_(a.cursor.head);if(i!=null){let e=g(t,i.anchor),n=g(t,i.head);(a.cursor==null||!y(o,e)||!y(s,n))&&r.setLocalStateField(`cursor`,{anchor:e,head:n})}else a.cursor!=null&&n&&r.setLocalStateField(`cursor`,null)}r.getStates().forEach((a,o)=>{if(o===r.doc.clientID)return;let s=a.cursor;if(s==null||s.anchor==null||s.head==null)return;let c=v(s.anchor,n),l=v(s.head,n);if(c==null||l==null||c.type!==t||l.type!==t)return;let{color:d=`#30bced`,name:ee=`Anonymous`}=a.user||{},f=a.user&&a.user.colorLight||d+`33`,p=u(c.index,l.index),m=S(c.index,l.index),h=e.view.state.doc.lineAt(p),g=e.view.state.doc.lineAt(m);if(h.number===g.number)i.push({from:p,to:m,value:k.mark({attributes:{style:`background-color: ${f}`},class:`cm-ySelection`})});else{i.push({from:p,to:h.from+h.length,value:k.mark({attributes:{style:`background-color: ${f}`},class:`cm-ySelection`})}),i.push({from:g.from,to:m,value:k.mark({attributes:{style:`background-color: ${f}`},class:`cm-ySelection`})});for(let t=h.number+1;t<g.number;t++){let n=e.view.state.doc.line(t).from;i.push({from:n,to:n,value:k.line({attributes:{style:`background-color: ${f}`,class:`cm-yLineSelection`}})})}}i.push({from:l.index,to:l.index,value:k.widget({side:l.index-c.index>0?-1:1,block:!1,widget:new K(d,ee)})})}),this.decorations=k.set(i,!0)}},J=M.fromClass(q,{decorations:e=>e.decorations}),Y=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},X=A.define({combine(e){return e[e.length-1]}});I.define();var Z=class{constructor(e){this.view=e,this.conf=e.state.facet(X),this._undoManager=this.conf.undoManager,this.syncConf=e.state.facet(B),this._beforeChangeSelection=null,this._mux=b(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:t})=>{let n=t.meta.get(this);if(n){let t=this.syncConf.fromYRange(n);e.dispatch(e.state.update({selection:t,effects:[P.scrollIntoView(t)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(V)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},Q=M.fromClass(Z),he=({state:e,dispatch:t})=>e.facet(X).undo()||!0,ge=({state:e,dispatch:t})=>e.facet(X).redo()||!0,_e=(e,t,{undoManager:n=new h(e)}={})=>{let r=new z(e,t),i=[B.of(r),U];return t&&i.push(W,J),n!==!1&&i.push(X.of(new Y(n)),Q,P.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?he(t):e.inputType===`historyRedo`?ge(t):!1}})),i},ve=k.mark({class:`cm-link-ref-broken`}),ye=/^\s{0,3}\[([^\]]+)\]:\s/,be=/\[([^\]]*)\]\[([^\]]*)\]/g,xe=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function $(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i];if(e<a.from)r=i-1;else if(e>=a.to)n=i+1;else return!0}return!1}function Se(e){let t=[];return j(e).iterate({enter(e){if(xe.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function Ce(e){let t=new Set,n=[],r=e.doc,i=Se(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if($(n.from,i))continue;let a=ye.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!$(t.from,i)&&!ye.test(t.text))for(be.lastIndex=0;;){let e=be.exec(t.text);if(!e)break;let r=t.from+e.index;if($(r,i))continue;let a=e[2]||e[1];n.push({from:r,to:r+e[0].length,label:a.toLowerCase()})}}let a=[];for(let e of n)t.has(e.label)||a.push(ve.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),k.set(a)}var we=O.define({create(e){return Ce(e)},update(e,t){return t.docChanged?Ce(t.state):e},provide:e=>P.decorations.from(e)}),Te=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,Ee=k.mark({class:`cm-del`}),De=k.line({class:`cm-table-header`,attributes:{style:`--list-hang: 2ch`}}),Oe=k.line({class:`cm-table-row`,attributes:{style:`--list-hang: 2ch`}});function ke(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function Ae(e){if(e.doc.lines<2)return null;let t=e.doc.line(1);if(!T.test(t.text))return null;for(let n=2;n<=e.doc.lines;n++){let r=e.doc.line(n);if(T.test(r.text))return{from:t.from,to:r.to}}return null}function je(e,t){let n=[],r=j(e),i=Ae(e),a=e=>i!==null&&e>=i.from&&e<=i.to;for(let{from:i,to:o}of t)r.iterate({from:i,to:o,enter(t){if(!a(t.from)){if(t.name===`Strikethrough`){let e=t.from,r=t.to,i=t.node.cursor();if(i.firstChild())do i.name===`StrikethroughMark`&&(i.from===t.from?e=i.to:r=i.from);while(i.nextSibling());return e<r&&n.push(Ee.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=Te.exec(r.text),a=i?i[1].length:2,o=k.line({class:`cm-list-item`,attributes:{style:`--list-hang: ${a}ch`}});n.push(o.range(r.from));return}if(t.name===`FencedCode`){let r=e.doc.lineAt(t.from),i=e.doc.lineAt(t.to);for(let t=r.number+1;t<i.number;t++){let r=e.doc.line(t),i=ke(r.text),a=k.line({class:`cm-fenced-code-line`,attributes:{style:`--line-indent: ${i}`}});n.push(a.range(r.from))}return!1}if(t.name===`TableHeader`){let r=e.doc.lineAt(t.from);return n.push(De.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(Oe.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(Oe.range(r.from)),!1}}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),k.set(n)}var Me=class{decorations;constructor(e){this.decorations=je(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||j(e.startState)!==j(e.state))&&(this.decorations=je(e.view.state,e.view.visibleRanges))}},Ne=M.fromClass(Me,{decorations:e=>e.decorations});function Pe(){return[Ne,we]}var Fe=n(),Ie=56;function Le(e,t){let n=e.state.doc,r=1;if(n.lines>=1&&T.test(n.line(1).text)){for(let e=2;e<=n.lines;e++)if(T.test(n.line(e).text)){r=e+1;break}}let i=w(),a=0;for(let o=r;o<=n.lines;o++){let r=n.line(o);if(!i(r.text)&&/^#{1,6}\s/.test(r.text)){if(a===t.index){e.dispatch({selection:D.cursor(r.from),effects:P.scrollIntoView(r.from,{y:`start`})}),e.focus();return}a++}}}function Re(e,t){requestAnimationFrame(()=>{let n=e.state.doc,r=Math.min(t.offset,n.length);e.dispatch({selection:D.cursor(r),effects:P.scrollIntoView(r,{y:`center`})}),e.focus()})}function ze(e){let t=e.state.selection.main;return t.empty?``:e.state.sliceDoc(t.from,t.to)}function Be(e){let t=(0,me.c)(39),{docName:n,ytext:r,provider:o,placeholder:u,isSourceModeActive:p}=e,m=(0,L.useRef)(null),h=(0,L.useRef)(null),g;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=new N,t[0]=g):g=t[0];let _=(0,L.useRef)(g),v;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=new N,t[1]=v):v=t[1];let y=(0,L.useRef)(v),b;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(b=new N,t[2]=b):b=t[2];let x=(0,L.useRef)(b),[S,C]=(0,L.useState)(null);if(S)throw S;let{resolvedTheme:w}=ne(),{merged:T}=d(),{openSelection:E}=de(),D=(0,L.useRef)(E),O=(0,L.useRef)(p),k=T?.editor?.wordWrap??!0,A,j;t[3]===E?(A=t[4],j=t[5]):(A=()=>{D.current=E},j=[E],t[3]=E,t[4]=A,t[5]=j),(0,L.useEffect)(A,j);let M,F;t[6]===p?(M=t[7],F=t[8]):(M=()=>{O.current=p},F=[p],t[6]=p,t[7]=M,t[8]=F),(0,L.useEffect)(M,F);let I=(0,L.useRef)(null),R;t[9]!==u||t[10]!==o||t[11]!==w||t[12]!==k||t[13]!==r?(R=()=>{let e=m.current;if(!e)return;let t=o.configuration.name??``,n,c=He;try{n=a({docName:t,container:e,sizeStats:{viewCount:0,bytes:r.length},factory:e=>{let n=null,i=f({ydoc:o.document,ytext:r}),a=new P({state:ie.create({doc:r.toString(),extensions:[pe,oe.of([ee]),_e(r,o.awareness),...s({themeCompartment:_.current,resolvedTheme:w,ydoc:o.document,wordWrapCompartment:x.current,wordWrap:k}),Pe(),i,P.updateListener.of(e=>{!e.selectionSet&&!e.docChanged||(n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,le(t,`source`,se(e.view))},120))}),P.domEventHandlers({keydown:(e,n)=>!O.current||!te()||!re(e,`edit-with-ai`)?!1:(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),D.current({docName:t,instruction:``,selectionMarkdown:ze(n)}),!0)}),y.current.of(ae(u??``)),P.theme({"&":{height:`100%`}}),P.scrollMargins.of(Ve)]}),parent:e});le(t,`source`,se(a));let l=a.contentDOM;return l.addEventListener(`keydown`,c),l.addEventListener(`paste`,c),l.addEventListener(`drop`,c),l.addEventListener(`cut`,c),{view:a,ydoc:o.document,ytext:r,provider:o}}}),I.current=n,h.current=n.view}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),I.current=null,h.current=null,C(t instanceof Error?t:Error(String(t)))}return()=>{let e=I.current;e&&i(e),I.current=null,h.current=null}},t[9]=u,t[10]=o,t[11]=w,t[12]=k,t[13]=r,t[14]=R):R=t[14];let z;t[15]!==o||t[16]!==r?(z=[r,o],t[15]=o,t[16]=r,t[17]=z):z=t[17],(0,L.useEffect)(R,z);let B,V;t[18]===n?(B=t[19],V=t[20]):(B=()=>{},V=[n],t[18]=n,t[19]=B,t[20]=V),(0,L.useEffect)(B,V);let H,U;t[21]===w?(H=t[22],U=t[23]):(H=()=>{h.current&&h.current.dispatch({effects:_.current.reconfigure(w===`dark`?c:l)})},U=[w],t[21]=w,t[22]=H,t[23]=U),(0,L.useEffect)(H,U);let W,G;t[24]===k?(W=t[25],G=t[26]):(W=()=>{h.current&&h.current.dispatch({effects:x.current.reconfigure(k?P.lineWrapping:[])})},G=[k],t[24]=k,t[25]=W,t[26]=G),(0,L.useEffect)(W,G);let K,q;t[27]===u?(K=t[28],q=t[29]):(K=()=>{h.current&&h.current.dispatch({effects:y.current.reconfigure(ae(u??``))})},q=[u],t[27]=u,t[28]=K,t[29]=q),(0,L.useEffect)(K,q);let J,Y;t[30]!==n||t[31]!==p?(J=()=>{let e=function(e){let t=e.detail;if(!t||t.mode!==`source`||!p)return;let r=h.current;r&&(Le(r,t),fe(n))};return window.addEventListener(ce,e),()=>window.removeEventListener(ce,e)},Y=[n,p],t[30]=n,t[31]=p,t[32]=J,t[33]=Y):(J=t[32],Y=t[33]),(0,L.useEffect)(J,Y);let X,Z;t[34]!==n||t[35]!==p?(X=()=>{if(!p)return;let e=h.current;if(!e)return;let t=ue(n);if(t){if(t.kind===`outline`){Le(e,t.detail);return}Re(e,t.detail)}},Z=[n,p],t[34]=n,t[35]=p,t[36]=X,t[37]=Z):(X=t[36],Z=t[37]),(0,L.useEffect)(X,Z);let Q;return t[38]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,Fe.jsx)(`div`,{ref:m,className:`source-editor h-full pb-3`}),t[38]=Q):Q=t[38],Q}function Ve(){return{top:Ie}}function He(){return o()}export{Be as SourceEditor};
@@ -1 +1 @@
1
- import{a as e,n as t,o as n,r,t as i}from"./isObjectLike-DFnkciUU.js";function a(){this.__data__=[],this.size=0}function o(e,t){return e===t||e!==e&&t!==t}function s(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}var c=Array.prototype.splice;function l(e){var t=this.__data__,n=s(t,e);return n<0?!1:(n==t.length-1?t.pop():c.call(t,n,1),--this.size,!0)}function ee(e){var t=this.__data__,n=s(t,e);return n<0?void 0:t[n][1]}function te(e){return s(this.__data__,e)>-1}function ne(e,t){var n=this.__data__,r=s(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function u(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=a,u.prototype.delete=l,u.prototype.get=ee,u.prototype.has=te,u.prototype.set=ne;function re(){this.__data__=new u,this.size=0}function ie(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function d(e){return this.__data__.get(e)}function f(e){return this.__data__.has(e)}var ae=`[object AsyncFunction]`,oe=`[object Function]`,p=`[object GeneratorFunction]`,se=`[object Proxy]`;function m(e){if(!t(e))return!1;var n=r(e);return n==oe||n==p||n==ae||n==se}var h=e[`__core-js_shared__`],g=function(){var e=/[^.]+$/.exec(h&&h.keys&&h.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function ce(e){return!!g&&g in e}var le=Function.prototype.toString;function _(e){if(e!=null){try{return le.call(e)}catch{}try{return e+``}catch{}}return``}var ue=/[\\^$.*+?()[\]{}|]/g,de=/^\[object .+?Constructor\]$/,fe=Function.prototype,pe=Object.prototype,me=fe.toString,he=pe.hasOwnProperty,ge=RegExp(`^`+me.call(he).replace(ue,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function _e(e){return!t(e)||ce(e)?!1:(m(e)?ge:de).test(_(e))}function ve(e,t){return e?.[t]}function v(e,t){var n=ve(e,t);return _e(n)?n:void 0}var y=v(e,`Map`),b=v(Object,`create`);function ye(){this.__data__=b?b(null):{},this.size=0}function be(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var xe=`__lodash_hash_undefined__`,x=Object.prototype.hasOwnProperty;function S(e){var t=this.__data__;if(b){var n=t[e];return n===xe?void 0:n}return x.call(t,e)?t[e]:void 0}var C=Object.prototype.hasOwnProperty;function w(e){var t=this.__data__;return b?t[e]!==void 0:C.call(t,e)}var T=`__lodash_hash_undefined__`;function E(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=b&&t===void 0?T:t,this}function D(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}D.prototype.clear=ye,D.prototype.delete=be,D.prototype.get=S,D.prototype.has=w,D.prototype.set=E;function O(){this.size=0,this.__data__={hash:new D,map:new(y||u),string:new D}}function k(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function A(e,t){var n=e.__data__;return k(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function j(e){var t=A(this,e).delete(e);return this.size-=+!!t,t}function M(e){return A(this,e).get(e)}function Se(e){return A(this,e).has(e)}function Ce(e,t){var n=A(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function N(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}N.prototype.clear=O,N.prototype.delete=j,N.prototype.get=M,N.prototype.has=Se,N.prototype.set=Ce;var we=200;function Te(e,t){var n=this.__data__;if(n instanceof u){var r=n.__data__;if(!y||r.length<we-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new N(r)}return n.set(e,t),this.size=n.size,this}function P(e){this.size=(this.__data__=new u(e)).size}P.prototype.clear=re,P.prototype.delete=ie,P.prototype.get=d,P.prototype.has=f,P.prototype.set=Te;var Ee=e.Uint8Array,F=Array.isArray;function De(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Oe=`[object Arguments]`;function I(e){return i(e)&&r(e)==Oe}var L=Object.prototype,ke=L.hasOwnProperty,Ae=L.propertyIsEnumerable,R=I(function(){return arguments}())?I:function(e){return i(e)&&ke.call(e,`callee`)&&!Ae.call(e,`callee`)};function je(){return!1}var z=typeof exports==`object`&&exports&&!exports.nodeType&&exports,B=z&&typeof module==`object`&&module&&!module.nodeType&&module,V=B&&B.exports===z?e.Buffer:void 0,H=(V?V.isBuffer:void 0)||je,Me=9007199254740991,Ne=/^(?:0|[1-9]\d*)$/;function U(e,t){var n=typeof e;return t??=Me,!!t&&(n==`number`||n!=`symbol`&&Ne.test(e))&&e>-1&&e%1==0&&e<t}var Pe=9007199254740991;function W(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Pe}var Fe=`[object Arguments]`,Ie=`[object Array]`,Le=`[object Boolean]`,Re=`[object Date]`,ze=`[object Error]`,Be=`[object Function]`,Ve=`[object Map]`,He=`[object Number]`,Ue=`[object Object]`,We=`[object RegExp]`,Ge=`[object Set]`,Ke=`[object String]`,qe=`[object WeakMap]`,Je=`[object ArrayBuffer]`,Ye=`[object DataView]`,Xe=`[object Float32Array]`,Ze=`[object Float64Array]`,Qe=`[object Int8Array]`,$e=`[object Int16Array]`,et=`[object Int32Array]`,tt=`[object Uint8Array]`,nt=`[object Uint8ClampedArray]`,rt=`[object Uint16Array]`,it=`[object Uint32Array]`,G={};G[Xe]=G[Ze]=G[Qe]=G[$e]=G[et]=G[tt]=G[nt]=G[rt]=G[it]=!0,G[Fe]=G[Ie]=G[Je]=G[Le]=G[Ye]=G[Re]=G[ze]=G[Be]=G[Ve]=G[He]=G[Ue]=G[We]=G[Ge]=G[Ke]=G[qe]=!1;function at(e){return i(e)&&W(e.length)&&!!G[r(e)]}function K(e){return function(t){return e(t)}}var q=typeof exports==`object`&&exports&&!exports.nodeType&&exports,J=q&&typeof module==`object`&&module&&!module.nodeType&&module,Y=J&&J.exports===q&&n.process,X=function(){try{return J&&J.require&&J.require(`util`).types||Y&&Y.binding&&Y.binding(`util`)}catch{}}(),Z=X&&X.isTypedArray,Q=Z?K(Z):at,ot=Object.prototype.hasOwnProperty;function st(e,t){var n=F(e),r=!n&&R(e),i=!n&&!r&&H(e),a=!n&&!r&&!i&&Q(e),o=n||r||i||a,s=o?De(e.length,String):[],c=s.length;for(var l in e)(t||ot.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||U(l,c)))&&s.push(l);return s}var ct=Object.prototype;function lt(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||ct)}function ut(e,t){return function(n){return e(t(n))}}function dt(e){return e!=null&&W(e.length)&&!m(e)}var ft=`Expected a function`;function $(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(ft);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new($.Cache||N),n}$.Cache=N;function pt(e){return e}function mt(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var ht=mt();export{o as C,m as S,P as _,ut as a,v as b,Q as c,W as d,U as f,Ee as g,F as h,dt as i,X as l,R as m,pt as n,lt as o,H as p,$ as r,st as s,ht as t,K as u,N as v,_ as x,y};
1
+ import{a as e,n as t,o as n,r,t as i}from"./isObjectLike-D-tumRTm.js";function a(){this.__data__=[],this.size=0}function o(e,t){return e===t||e!==e&&t!==t}function s(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}var c=Array.prototype.splice;function l(e){var t=this.__data__,n=s(t,e);return n<0?!1:(n==t.length-1?t.pop():c.call(t,n,1),--this.size,!0)}function ee(e){var t=this.__data__,n=s(t,e);return n<0?void 0:t[n][1]}function te(e){return s(this.__data__,e)>-1}function ne(e,t){var n=this.__data__,r=s(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function u(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=a,u.prototype.delete=l,u.prototype.get=ee,u.prototype.has=te,u.prototype.set=ne;function re(){this.__data__=new u,this.size=0}function ie(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function d(e){return this.__data__.get(e)}function f(e){return this.__data__.has(e)}var ae=`[object AsyncFunction]`,oe=`[object Function]`,p=`[object GeneratorFunction]`,se=`[object Proxy]`;function m(e){if(!t(e))return!1;var n=r(e);return n==oe||n==p||n==ae||n==se}var h=e[`__core-js_shared__`],g=function(){var e=/[^.]+$/.exec(h&&h.keys&&h.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function ce(e){return!!g&&g in e}var le=Function.prototype.toString;function _(e){if(e!=null){try{return le.call(e)}catch{}try{return e+``}catch{}}return``}var ue=/[\\^$.*+?()[\]{}|]/g,de=/^\[object .+?Constructor\]$/,fe=Function.prototype,pe=Object.prototype,me=fe.toString,he=pe.hasOwnProperty,ge=RegExp(`^`+me.call(he).replace(ue,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function _e(e){return!t(e)||ce(e)?!1:(m(e)?ge:de).test(_(e))}function ve(e,t){return e?.[t]}function v(e,t){var n=ve(e,t);return _e(n)?n:void 0}var y=v(e,`Map`),b=v(Object,`create`);function ye(){this.__data__=b?b(null):{},this.size=0}function be(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var xe=`__lodash_hash_undefined__`,x=Object.prototype.hasOwnProperty;function S(e){var t=this.__data__;if(b){var n=t[e];return n===xe?void 0:n}return x.call(t,e)?t[e]:void 0}var C=Object.prototype.hasOwnProperty;function w(e){var t=this.__data__;return b?t[e]!==void 0:C.call(t,e)}var T=`__lodash_hash_undefined__`;function E(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=b&&t===void 0?T:t,this}function D(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}D.prototype.clear=ye,D.prototype.delete=be,D.prototype.get=S,D.prototype.has=w,D.prototype.set=E;function O(){this.size=0,this.__data__={hash:new D,map:new(y||u),string:new D}}function k(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function A(e,t){var n=e.__data__;return k(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function j(e){var t=A(this,e).delete(e);return this.size-=+!!t,t}function M(e){return A(this,e).get(e)}function Se(e){return A(this,e).has(e)}function Ce(e,t){var n=A(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function N(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}N.prototype.clear=O,N.prototype.delete=j,N.prototype.get=M,N.prototype.has=Se,N.prototype.set=Ce;var we=200;function Te(e,t){var n=this.__data__;if(n instanceof u){var r=n.__data__;if(!y||r.length<we-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new N(r)}return n.set(e,t),this.size=n.size,this}function P(e){this.size=(this.__data__=new u(e)).size}P.prototype.clear=re,P.prototype.delete=ie,P.prototype.get=d,P.prototype.has=f,P.prototype.set=Te;var Ee=e.Uint8Array,F=Array.isArray;function De(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Oe=`[object Arguments]`;function I(e){return i(e)&&r(e)==Oe}var L=Object.prototype,ke=L.hasOwnProperty,Ae=L.propertyIsEnumerable,R=I(function(){return arguments}())?I:function(e){return i(e)&&ke.call(e,`callee`)&&!Ae.call(e,`callee`)};function je(){return!1}var z=typeof exports==`object`&&exports&&!exports.nodeType&&exports,B=z&&typeof module==`object`&&module&&!module.nodeType&&module,V=B&&B.exports===z?e.Buffer:void 0,H=(V?V.isBuffer:void 0)||je,Me=9007199254740991,Ne=/^(?:0|[1-9]\d*)$/;function U(e,t){var n=typeof e;return t??=Me,!!t&&(n==`number`||n!=`symbol`&&Ne.test(e))&&e>-1&&e%1==0&&e<t}var Pe=9007199254740991;function W(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Pe}var Fe=`[object Arguments]`,Ie=`[object Array]`,Le=`[object Boolean]`,Re=`[object Date]`,ze=`[object Error]`,Be=`[object Function]`,Ve=`[object Map]`,He=`[object Number]`,Ue=`[object Object]`,We=`[object RegExp]`,Ge=`[object Set]`,Ke=`[object String]`,qe=`[object WeakMap]`,Je=`[object ArrayBuffer]`,Ye=`[object DataView]`,Xe=`[object Float32Array]`,Ze=`[object Float64Array]`,Qe=`[object Int8Array]`,$e=`[object Int16Array]`,et=`[object Int32Array]`,tt=`[object Uint8Array]`,nt=`[object Uint8ClampedArray]`,rt=`[object Uint16Array]`,it=`[object Uint32Array]`,G={};G[Xe]=G[Ze]=G[Qe]=G[$e]=G[et]=G[tt]=G[nt]=G[rt]=G[it]=!0,G[Fe]=G[Ie]=G[Je]=G[Le]=G[Ye]=G[Re]=G[ze]=G[Be]=G[Ve]=G[He]=G[Ue]=G[We]=G[Ge]=G[Ke]=G[qe]=!1;function at(e){return i(e)&&W(e.length)&&!!G[r(e)]}function K(e){return function(t){return e(t)}}var q=typeof exports==`object`&&exports&&!exports.nodeType&&exports,J=q&&typeof module==`object`&&module&&!module.nodeType&&module,Y=J&&J.exports===q&&n.process,X=function(){try{return J&&J.require&&J.require(`util`).types||Y&&Y.binding&&Y.binding(`util`)}catch{}}(),Z=X&&X.isTypedArray,Q=Z?K(Z):at,ot=Object.prototype.hasOwnProperty;function st(e,t){var n=F(e),r=!n&&R(e),i=!n&&!r&&H(e),a=!n&&!r&&!i&&Q(e),o=n||r||i||a,s=o?De(e.length,String):[],c=s.length;for(var l in e)(t||ot.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||U(l,c)))&&s.push(l);return s}var ct=Object.prototype;function lt(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||ct)}function ut(e,t){return function(n){return e(t(n))}}function dt(e){return e!=null&&W(e.length)&&!m(e)}var ft=`Expected a function`;function $(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(ft);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new($.Cache||N),n}$.Cache=N;function pt(e){return e}function mt(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var ht=mt();export{o as C,m as S,P as _,ut as a,v as b,Q as c,W as d,U as f,Ee as g,F as h,dt as i,X as l,R as m,pt as n,lt as o,H as p,$ as r,st as s,ht as t,K as u,N as v,_ as x,y};
@@ -1 +1 @@
1
- import{n as e,t}from"./path-C-grg3CZ.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-Bog19bCH.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,r,i,a,o){var c=e-n,l=t-r,u=(o?a:-a)/d(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=r+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=i-a,w=m*_-g*h,T=(x<0?-1:1)*d(s(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+s.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-r,_=T.apply(this,arguments)-r,v=l(_-g),k=_>g;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);else if(v>c-1e-12)D.moveTo(h*u(g),h*a(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*u(_),m*a(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v<i)if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/a(f((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(R,(h-ae)/(ie+1))}else z=B=0}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,h,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,n(H.y11,H.x11),n(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,m,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,n(H.y11,H.x11),n(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+s.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-i/2;return[u(t)*e,a(t)*e]},k.innerRadius=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),k):s},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
1
+ import{n as e,t}from"./path-BMC90ub1.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-C8fL82UJ.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,r,i,a,o){var c=e-n,l=t-r,u=(o?a:-a)/d(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=r+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=i-a,w=m*_-g*h,T=(x<0?-1:1)*d(s(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+s.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-r,_=T.apply(this,arguments)-r,v=l(_-g),k=_>g;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);else if(v>c-1e-12)D.moveTo(h*u(g),h*a(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*u(_),m*a(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v<i)if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/a(f((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(R,(h-ae)/(ie+1))}else z=B=0}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,h,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,n(H.y11,H.x11),n(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,m,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,n(H.y11,H.x11),n(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+s.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-i/2;return[u(t)*e,a(t)*e]},k.innerRadius=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),k):s},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
@@ -0,0 +1 @@
1
+ import"./chunk-K5T4RW27-Cv4Nwq8D.js";import{n as e}from"./chunk-7N4EOEYR-Bo1GJF7F.js";export{e as createArchitectureServices};