@lovelybunch/api 1.0.76-alpha.1 → 1.0.76-alpha.2

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 (389) hide show
  1. package/dist/lib/mcp-client.d.ts +39 -0
  2. package/dist/lib/mcp-client.js +131 -0
  3. package/dist/routes/api/v1/ai/tools.js +49 -232
  4. package/dist/routes/api/v1/proposals/[id]/route.d.ts +10 -24
  5. package/dist/routes/api/v1/proposals/[id]/route.js +10 -1
  6. package/dist/routes/api/v1/proposals/route.d.ts +2 -16
  7. package/dist/routes/api/v1/proposals/route.js +11 -8
  8. package/dist/routes/api/v1/terminal/[proposalId]/create/route.js +2 -2
  9. package/dist/routes/api/v1/terminal/code/index.d.ts +3 -0
  10. package/dist/routes/api/v1/terminal/code/index.js +5 -0
  11. package/dist/routes/api/v1/terminal/code/route.d.ts +13 -0
  12. package/dist/routes/api/v1/terminal/code/route.js +155 -0
  13. package/dist/server-with-static.js +2 -0
  14. package/dist/server.js +2 -0
  15. package/package.json +4 -4
  16. package/static/assets/{ActivityPage-DC2t-Kyv.js → ActivityPage-BIYCh5I6.js} +1 -1
  17. package/static/assets/{ApiKeysSettingsPage-DbXgxh7i.js → ApiKeysSettingsPage-uPmxt5fp.js} +1 -1
  18. package/static/assets/{ArchitectureEditPage-B5dNFxvL.js → ArchitectureEditPage-DlNQfJe3.js} +2 -2
  19. package/static/assets/{ArchitecturePage-D796d-Je.js → ArchitecturePage-z4FsbdfN.js} +1 -1
  20. package/static/assets/{AuthSettingsPage-nIgM05Yw.js → AuthSettingsPage-Ct9brG0C.js} +2 -2
  21. package/static/assets/{CallbackPage-NNbLun2S.js → CallbackPage-DrMJVPyS.js} +1 -1
  22. package/static/assets/CodePage-CFl4HO-3.js +2 -0
  23. package/static/assets/{CollapsibleSection-DbKW4cyU.js → CollapsibleSection-D_16mIbS.js} +1 -1
  24. package/static/assets/{DashboardPage-Aw1xWH4M.js → DashboardPage---KVQx1B.js} +2 -2
  25. package/static/assets/{GitPage-Hi0mdDOi.js → GitPage-CNYHAHAE.js} +3 -3
  26. package/static/assets/{GitSettingsPage-2vuCM-U-.js → GitSettingsPage-CQbe217E.js} +2 -2
  27. package/static/assets/{IdentityPage-2BzLc2EI.js → IdentityPage-BNrnoMAb.js} +2 -2
  28. package/static/assets/{ImplementationStepsEditor-BlmI5YuN.js → ImplementationStepsEditor-CpIE-yvb.js} +1 -1
  29. package/static/assets/IntegrationsSettingsPage-Bvrthw6u.js +1 -0
  30. package/static/assets/{JobDetailPage-CLEY1Z5e.js → JobDetailPage-C1uyETkW.js} +1 -1
  31. package/static/assets/{KnowledgeDetailPage-D94ukozt.js → KnowledgeDetailPage-D4ZUM3Zz.js} +1 -1
  32. package/static/assets/KnowledgeEditPage-CkO6HZ1m.js +1 -0
  33. package/static/assets/{KnowledgePage-D-ahboFK.js → KnowledgePage-DTgCuE5t.js} +1 -1
  34. package/static/assets/{LoginPage-DQ2rJliF.js → LoginPage-kNNO_ouW.js} +1 -1
  35. package/static/assets/{MailInboxPage-Bfh0_pBU.js → MailInboxPage-DFA4mCj0.js} +1 -1
  36. package/static/assets/{MailProcessingModal-NF9kjdgr.js → MailProcessingModal-Caii7A8L.js} +2 -2
  37. package/static/assets/{MailReadPage-C0QhDa1x.js → MailReadPage-DnxomkpM.js} +1 -1
  38. package/static/assets/{MailSentPage-Ctgcp1RB.js → MailSentPage-BHkc5X_Y.js} +1 -1
  39. package/static/assets/{McpSettingsPage-CFgpw5_r.js → McpSettingsPage-DFwFqNpn.js} +1 -1
  40. package/static/assets/NewKnowledgePage-Dst7m_BB.js +9 -0
  41. package/static/assets/{NewSkillPage-CvBSXZFE.js → NewSkillPage-E2godqql.js} +1 -1
  42. package/static/assets/{NewTaskPage-DRL-pyjV.js → NewTaskPage--x_FMYzw.js} +2 -2
  43. package/static/assets/{NotFoundPage-DW0gfvNA.js → NotFoundPage-CWYaoUzq.js} +1 -1
  44. package/static/assets/NotificationsSettingsPage-BgGoQm7i.js +1 -0
  45. package/static/assets/ProjectEditPage-BlQkGGW3.js +11 -0
  46. package/static/assets/{ProjectPage-78a-iVFG.js → ProjectPage-cnzG8ymb.js} +1 -1
  47. package/static/assets/PromptsSettingsPage-DEMozxxj.js +1 -0
  48. package/static/assets/{ResourceDetailPage-CLcuo4yw.js → ResourceDetailPage-D-amMTWE.js} +1 -1
  49. package/static/assets/{ResourcesPage-C0TGRawd.js → ResourcesPage-BaxxCRUq.js} +2 -2
  50. package/static/assets/RoleEditPage-Bn5nL0Hm.js +13 -0
  51. package/static/assets/{RolePage-haUf186q.js → RolePage-BOBxbE4o.js} +1 -1
  52. package/static/assets/{RulesSettingsPage-Cc8rvAvm.js → RulesSettingsPage-BX4-A4bn.js} +1 -1
  53. package/static/assets/SchedulePage-BNmUnXVu.js +4 -0
  54. package/static/assets/{SkillDetailPage-BqhoNNkM.js → SkillDetailPage-Dyvc1AIM.js} +1 -1
  55. package/static/assets/{SkillEditPage-cpSdv9D4.js → SkillEditPage-BBr2jC5s.js} +1 -1
  56. package/static/assets/{SkillsPage-Cxkm5ymf.js → SkillsPage-C8moT36F.js} +1 -1
  57. package/static/assets/{SkillsSettingsPage-DrmRher8.js → SkillsSettingsPage-D1begXXp.js} +1 -1
  58. package/static/assets/{SourceInput-C0WkiXS6.js → SourceInput-D_5iVkI5.js} +1 -1
  59. package/static/assets/{TagInput-raThOrbG.js → TagInput-C1r8NbaU.js} +1 -1
  60. package/static/assets/{TaskDetailPage-BMzce3uJ.js → TaskDetailPage-DY-hfPO_.js} +2 -2
  61. package/static/assets/TaskEditPage-BQNQc-sZ.js +1 -0
  62. package/static/assets/{TasksPage-CxKJQJ1_.js → TasksPage-ssM1z2ta.js} +3 -3
  63. package/static/assets/{TerminalPage-BWdNoEM5.js → TerminalPage-Cny60rpN.js} +1 -1
  64. package/static/assets/{TerminalSessionPage-B6_ssmNM.js → TerminalSessionPage-Cy2h1IvH.js} +2 -2
  65. package/static/assets/UserPreferencesPage-DLLHv7Sv.js +1 -0
  66. package/static/assets/{UserSettingsPage-CqooRxDi.js → UserSettingsPage-wrlm0m4w.js} +1 -1
  67. package/static/assets/{UtilitiesPage-e4IaR2YV.js → UtilitiesPage-DDdi2gjr.js} +1 -1
  68. package/static/assets/{alert-BGFBZOrZ.js → alert-ClYcOZrl.js} +1 -1
  69. package/static/assets/apl-B4CMkyY2.js +1 -0
  70. package/static/assets/{arrow-down-DXhs3vvo.js → arrow-down-C21GpXY8.js} +1 -1
  71. package/static/assets/{arrow-left-PEX5RePT.js → arrow-left-Bo3ORcvL.js} +1 -1
  72. package/static/assets/{arrow-up-D7z0QZsQ.js → arrow-up-BvV2LsrY.js} +1 -1
  73. package/static/assets/{arrow-up-down-OTrzDHIL.js → arrow-up-down-vbTTNMQ9.js} +1 -1
  74. package/static/assets/asciiarmor-Df11BRmG.js +1 -0
  75. package/static/assets/asn1-EdZsLKOL.js +1 -0
  76. package/static/assets/asterisk-B-8jnY81.js +1 -0
  77. package/static/assets/{badge-rki-Xf0E.js → badge-BIzmYH_4.js} +1 -1
  78. package/static/assets/brainfuck-C4LP7Hcl.js +1 -0
  79. package/static/assets/{browser-modal-BKnqJnf5.js → browser-modal-CkjrwJ8N.js} +1 -1
  80. package/static/assets/{card-_Grh-Otl.js → card-Bg-wA9s_.js} +1 -1
  81. package/static/assets/{chevron-left-LQtIDk73.js → chevron-left-DO-Zz6cq.js} +1 -1
  82. package/static/assets/{chevron-up-BM1GKhAV.js → chevron-up-C115Uf6r.js} +1 -1
  83. package/static/assets/{chevrons-up-Ccej0FyZ.js → chevrons-up-bgADpoQ9.js} +1 -1
  84. package/static/assets/{circle-alert-C5k9mZfC.js → circle-alert-D8dEhUnq.js} +1 -1
  85. package/static/assets/{circle-check-fwIZxHsK.js → circle-check-CS2LuTcV.js} +1 -1
  86. package/static/assets/{circle-check-big-BaFefwt0.js → circle-check-big-Bm4c-_XI.js} +1 -1
  87. package/static/assets/{circle-play-C1R46Kry.js → circle-play-N-BXePlE.js} +1 -1
  88. package/static/assets/{circle-x-CKuM1691.js → circle-x-DWHqcJFb.js} +1 -1
  89. package/static/assets/clike-B9uivgTg.js +1 -0
  90. package/static/assets/{clipboard-DWJnnRi8.js → clipboard-BBdw7Fw8.js} +1 -1
  91. package/static/assets/{clock-Diqm3Csm.js → clock-Cg9nPTux.js} +1 -1
  92. package/static/assets/clojure-BMjYHr_A.js +1 -0
  93. package/static/assets/cmake-BQqOBYOt.js +1 -0
  94. package/static/assets/cobol-CWcv1MsR.js +1 -0
  95. package/static/assets/{code-Ao0cA5nW.js → code-D21v96Wj.js} +1 -1
  96. package/static/assets/coffeescript-S37ZYGWr.js +1 -0
  97. package/static/assets/commonlisp-DBKNyK5s.js +1 -0
  98. package/static/assets/crystal-SjHAIU92.js +1 -0
  99. package/static/assets/css-BnMrqG3P.js +1 -0
  100. package/static/assets/cypher-C_CwsFkJ.js +1 -0
  101. package/static/assets/d-pRatUO7H.js +1 -0
  102. package/static/assets/diff-DbItnlRl.js +1 -0
  103. package/static/assets/dockerfile-BKs6k2Af.js +1 -0
  104. package/static/assets/{download-5iQDQeY0.js → download-ULpe9uEL.js} +1 -1
  105. package/static/assets/dtd-DF_7sFjM.js +1 -0
  106. package/static/assets/dylan-DwRh75JA.js +1 -0
  107. package/static/assets/ebnf-CDyGwa7X.js +1 -0
  108. package/static/assets/ecl-Cabwm37j.js +1 -0
  109. package/static/assets/eiffel-CnydiIhH.js +1 -0
  110. package/static/assets/elm-vLlmbW-K.js +1 -0
  111. package/static/assets/erlang-BNw1qcRV.js +1 -0
  112. package/static/assets/{external-link-B6dkiWgP.js → external-link--nEePPjR.js} +1 -1
  113. package/static/assets/{eye-DQUzAWBY.js → eye-nqxk2SXP.js} +1 -1
  114. package/static/assets/factor-kuTfRLto.js +1 -0
  115. package/static/assets/fcl-Kvtd6kyn.js +1 -0
  116. package/static/assets/{folder-git-2-CQUj8P5W.js → folder-git-2-D1jARXTb.js} +1 -1
  117. package/static/assets/forth-Ffai-XNe.js +1 -0
  118. package/static/assets/fortran-DYz_wnZ1.js +1 -0
  119. package/static/assets/gas-Bneqetm1.js +1 -0
  120. package/static/assets/gherkin-heZmZLOM.js +1 -0
  121. package/static/assets/groovy-D9Dt4D0W.js +1 -0
  122. package/static/assets/haskell-Cw1EW3IL.js +1 -0
  123. package/static/assets/haxe-H-WmDvRZ.js +1 -0
  124. package/static/assets/http-DBlCnlav.js +1 -0
  125. package/static/assets/idl-BEugSyMb.js +1 -0
  126. package/static/assets/index-80RT6UXi.js +3 -0
  127. package/static/assets/index-AIsVwTBP.js +1 -0
  128. package/static/assets/index-AeonINTL.js +1 -0
  129. package/static/assets/index-BBY4n5t-.js +1 -0
  130. package/static/assets/index-BEkvG6MQ.js +1 -0
  131. package/static/assets/index-BEvAFxs_.js +1 -0
  132. package/static/assets/index-BS_uzzCh.js +1 -0
  133. package/static/assets/index-Beun4ywN.js +2 -0
  134. package/static/assets/index-CR0uN9wO.js +1 -0
  135. package/static/assets/index-CRSfgM43.js +1 -0
  136. package/static/assets/index-CawWXqM_.js +1 -0
  137. package/static/assets/index-ChD5bDHD.js +1 -0
  138. package/static/assets/index-ClFRvTkG.js +1 -0
  139. package/static/assets/index-D8UBHQdy.js +1 -0
  140. package/static/assets/index-DCrCdQ-J.js +1 -0
  141. package/static/assets/{index-CIFIEidO.js → index-DF2yEDGL.js} +103 -103
  142. package/static/assets/index-DH_vXhd4.css +1 -0
  143. package/static/assets/index-DHmd0I4e.js +1 -0
  144. package/static/assets/index-DvIiLgyh.js +1 -0
  145. package/static/assets/index-p-EXqOgO.js +7 -0
  146. package/static/assets/{info-BvzdeJ30.js → info-jWH_Nbw8.js} +1 -1
  147. package/static/assets/javascript-iXu5QeM3.js +1 -0
  148. package/static/assets/julia-DuME0IfC.js +1 -0
  149. package/static/assets/{label-B1lgxULu.js → label-Bo7tep86.js} +1 -1
  150. package/static/assets/livescript-BwQOo05w.js +1 -0
  151. package/static/assets/lua-BgMRiT3U.js +1 -0
  152. package/static/assets/markdown-editor-B6HEtSkH.css +1 -0
  153. package/static/assets/markdown-editor-DGcgv9Jo.js +111 -0
  154. package/static/assets/mathematica-DTrFuWx2.js +1 -0
  155. package/static/assets/mbox-CNhZ1qSd.js +1 -0
  156. package/static/assets/{message-square-LKqx0LRr.js → message-square-CJkxqplf.js} +1 -1
  157. package/static/assets/mirc-CjQqDB4T.js +1 -0
  158. package/static/assets/mllike-CXdrOF99.js +1 -0
  159. package/static/assets/modelica-Dc1JOy9r.js +1 -0
  160. package/static/assets/mscgen-BA5vi2Kp.js +1 -0
  161. package/static/assets/mumps-BT43cFF4.js +1 -0
  162. package/static/assets/nginx-DdIZxoE0.js +1 -0
  163. package/static/assets/nsis-LdVXkNf5.js +1 -0
  164. package/static/assets/ntriples-BfvgReVJ.js +1 -0
  165. package/static/assets/octave-Ck1zUtKM.js +1 -0
  166. package/static/assets/oz-BzwKVEFT.js +1 -0
  167. package/static/assets/{paperclip-Cvcr3t6l.js → paperclip-Dw99lBW-.js} +1 -1
  168. package/static/assets/pascal--L3eBynH.js +1 -0
  169. package/static/assets/{pause-TaMz44vG.js → pause-CSm_MUb9.js} +1 -1
  170. package/static/assets/perl-CdXCOZ3F.js +1 -0
  171. package/static/assets/pig-CevX1Tat.js +1 -0
  172. package/static/assets/pipeline-builders-UvjOF56t.js +17 -0
  173. package/static/assets/{play-C4YxfQOO.js → play-Sq1Ji6eG.js} +1 -1
  174. package/static/assets/powershell-CFHJl5sT.js +1 -0
  175. package/static/assets/properties-C78fOPTZ.js +1 -0
  176. package/static/assets/protobuf-ChK-085T.js +1 -0
  177. package/static/assets/pug-DeIclll2.js +1 -0
  178. package/static/assets/puppet-DMA9R1ak.js +1 -0
  179. package/static/assets/python-BuPzkPfP.js +1 -0
  180. package/static/assets/q-pXgVlZs6.js +1 -0
  181. package/static/assets/r-B6wPVr8A.js +1 -0
  182. package/static/assets/{radio-group-D7Rt-k1F.js → radio-group-BfqZdNY5.js} +1 -1
  183. package/static/assets/{refresh-cw-C9ZWZi2c.js → refresh-cw-DwXF5JvK.js} +1 -1
  184. package/static/assets/rpm-CTu-6PCP.js +1 -0
  185. package/static/assets/ruby-B2Rjki9n.js +1 -0
  186. package/static/assets/sas-B4kiWyti.js +1 -0
  187. package/static/assets/scheme-C41bIUwD.js +1 -0
  188. package/static/assets/{search-C1RuN2pO.js → search-NagOQziO.js} +1 -1
  189. package/static/assets/select-XHfMw_BF.js +1 -0
  190. package/static/assets/shell-CjFT_Tl9.js +1 -0
  191. package/static/assets/sieve-C3Gn_uJK.js +1 -0
  192. package/static/assets/simple-mode-GW_nhZxv.js +1 -0
  193. package/static/assets/smalltalk-CnHTOXQT.js +1 -0
  194. package/static/assets/solr-DehyRSwq.js +1 -0
  195. package/static/assets/sparql-DkYu6x3z.js +1 -0
  196. package/static/assets/spreadsheet-BCZA_wO0.js +1 -0
  197. package/static/assets/sql-D0XecflT.js +1 -0
  198. package/static/assets/stex-C3f8Ysf7.js +1 -0
  199. package/static/assets/stylus-B533Al4x.js +1 -0
  200. package/static/assets/swift-BzpIVaGY.js +1 -0
  201. package/static/assets/{switch-LSkE6hx8.js → switch-uoWXvqqm.js} +1 -1
  202. package/static/assets/{tabs-etlvrbtm.js → tabs-Be_b96k_.js} +1 -1
  203. package/static/assets/{tag-B2iP7vv_.js → tag-wGnl5hoT.js} +1 -1
  204. package/static/assets/tcl-DVfN8rqt.js +1 -0
  205. package/static/assets/{terminal-preview-PyMHLXJ3.js → terminal-preview-BBm_7lm8.js} +1 -1
  206. package/static/assets/textile-CnDTJFAw.js +1 -0
  207. package/static/assets/tiddlywiki-DO-Gjzrf.js +1 -0
  208. package/static/assets/tiki-DGYXhP31.js +1 -0
  209. package/static/assets/toml-Bm5Em-hy.js +1 -0
  210. package/static/assets/troff-wAsdV37c.js +1 -0
  211. package/static/assets/ttcn-CfJYG6tj.js +1 -0
  212. package/static/assets/ttcn-cfg-B9xdYoR4.js +1 -0
  213. package/static/assets/turtle-B1tBg_DP.js +1 -0
  214. package/static/assets/{use-terminal-Blvh8GLp.js → use-terminal-QLr-9n4J.js} +1 -1
  215. package/static/assets/vb-CmGdzxic.js +1 -0
  216. package/static/assets/vbscript-BuJXcnF6.js +1 -0
  217. package/static/assets/velocity-D8B20fx6.js +1 -0
  218. package/static/assets/verilog-C6RDOZhf.js +1 -0
  219. package/static/assets/vhdl-lSbBsy5d.js +1 -0
  220. package/static/assets/{video-A2wzYKal.js → video-Dn8vsERP.js} +1 -1
  221. package/static/assets/webidl-ZXfAyPTL.js +1 -0
  222. package/static/assets/xquery-DzFWVndE.js +1 -0
  223. package/static/assets/yacas-BJ4BC0dw.js +1 -0
  224. package/static/assets/z80-Hz9HOZM7.js +1 -0
  225. package/static/index.html +2 -2
  226. package/dist/lib/auth/auth-manager.d.ts.map +0 -1
  227. package/dist/lib/auth/auth-manager.js.map +0 -1
  228. package/dist/lib/gait-path.d.ts.map +0 -1
  229. package/dist/lib/gait-path.js.map +0 -1
  230. package/dist/lib/git-settings.d.ts.map +0 -1
  231. package/dist/lib/git-settings.js.map +0 -1
  232. package/dist/lib/git.d.ts.map +0 -1
  233. package/dist/lib/git.js.map +0 -1
  234. package/dist/lib/jobs/global-job-scheduler.d.ts.map +0 -1
  235. package/dist/lib/jobs/global-job-scheduler.js.map +0 -1
  236. package/dist/lib/jobs/job-runner.d.ts.map +0 -1
  237. package/dist/lib/jobs/job-runner.js.map +0 -1
  238. package/dist/lib/jobs/job-scheduler.d.ts.map +0 -1
  239. package/dist/lib/jobs/job-scheduler.js.map +0 -1
  240. package/dist/lib/jobs/job-store.d.ts.map +0 -1
  241. package/dist/lib/jobs/job-store.js.map +0 -1
  242. package/dist/lib/project-paths.d.ts.map +0 -1
  243. package/dist/lib/project-paths.js.map +0 -1
  244. package/dist/lib/storage/file-storage.d.ts.map +0 -1
  245. package/dist/lib/storage/file-storage.js.map +0 -1
  246. package/dist/lib/symlinks/symlink-manager.d.ts.map +0 -1
  247. package/dist/lib/symlinks/symlink-manager.js.map +0 -1
  248. package/dist/lib/symlinks/types.d.ts.map +0 -1
  249. package/dist/lib/symlinks/types.js.map +0 -1
  250. package/dist/lib/terminal/context-helper.d.ts.map +0 -1
  251. package/dist/lib/terminal/context-helper.js.map +0 -1
  252. package/dist/lib/terminal/global-manager.d.ts.map +0 -1
  253. package/dist/lib/terminal/global-manager.js.map +0 -1
  254. package/dist/lib/terminal/shell-utils.d.ts.map +0 -1
  255. package/dist/lib/terminal/shell-utils.js.map +0 -1
  256. package/dist/lib/terminal/terminal-manager.d.ts.map +0 -1
  257. package/dist/lib/terminal/terminal-manager.js.map +0 -1
  258. package/dist/lib/user-preferences.d.ts.map +0 -1
  259. package/dist/lib/user-preferences.js.map +0 -1
  260. package/dist/middleware/auth.d.ts.map +0 -1
  261. package/dist/middleware/auth.js.map +0 -1
  262. package/dist/routes/api/v1/agents/[id]/index.d.ts.map +0 -1
  263. package/dist/routes/api/v1/agents/[id]/index.js.map +0 -1
  264. package/dist/routes/api/v1/agents/[id]/route.d.ts.map +0 -1
  265. package/dist/routes/api/v1/agents/[id]/route.js.map +0 -1
  266. package/dist/routes/api/v1/agents/index.d.ts.map +0 -1
  267. package/dist/routes/api/v1/agents/index.js.map +0 -1
  268. package/dist/routes/api/v1/agents/route.d.ts.map +0 -1
  269. package/dist/routes/api/v1/agents/route.js.map +0 -1
  270. package/dist/routes/api/v1/ai/index.d.ts.map +0 -1
  271. package/dist/routes/api/v1/ai/index.js.map +0 -1
  272. package/dist/routes/api/v1/ai/route.d.ts.map +0 -1
  273. package/dist/routes/api/v1/ai/route.js.map +0 -1
  274. package/dist/routes/api/v1/api-keys/index.d.ts.map +0 -1
  275. package/dist/routes/api/v1/api-keys/index.js.map +0 -1
  276. package/dist/routes/api/v1/api-keys/route.d.ts.map +0 -1
  277. package/dist/routes/api/v1/api-keys/route.js.map +0 -1
  278. package/dist/routes/api/v1/auth/index.d.ts.map +0 -1
  279. package/dist/routes/api/v1/auth/index.js.map +0 -1
  280. package/dist/routes/api/v1/auth/route.d.ts.map +0 -1
  281. package/dist/routes/api/v1/auth/route.js.map +0 -1
  282. package/dist/routes/api/v1/auth-settings/index.d.ts.map +0 -1
  283. package/dist/routes/api/v1/auth-settings/index.js.map +0 -1
  284. package/dist/routes/api/v1/auth-settings/route.d.ts.map +0 -1
  285. package/dist/routes/api/v1/auth-settings/route.js.map +0 -1
  286. package/dist/routes/api/v1/chats/[id]/index.d.ts.map +0 -1
  287. package/dist/routes/api/v1/chats/[id]/index.js.map +0 -1
  288. package/dist/routes/api/v1/chats/[id]/route.d.ts.map +0 -1
  289. package/dist/routes/api/v1/chats/[id]/route.js.map +0 -1
  290. package/dist/routes/api/v1/chats/index.d.ts.map +0 -1
  291. package/dist/routes/api/v1/chats/index.js.map +0 -1
  292. package/dist/routes/api/v1/chats/route.d.ts.map +0 -1
  293. package/dist/routes/api/v1/chats/route.js.map +0 -1
  294. package/dist/routes/api/v1/config/index.d.ts.map +0 -1
  295. package/dist/routes/api/v1/config/index.js.map +0 -1
  296. package/dist/routes/api/v1/config/route.d.ts.map +0 -1
  297. package/dist/routes/api/v1/config/route.js.map +0 -1
  298. package/dist/routes/api/v1/context/architecture/route.d.ts.map +0 -1
  299. package/dist/routes/api/v1/context/architecture/route.js.map +0 -1
  300. package/dist/routes/api/v1/context/index.d.ts.map +0 -1
  301. package/dist/routes/api/v1/context/index.js.map +0 -1
  302. package/dist/routes/api/v1/context/knowledge/[filename]/index.d.ts.map +0 -1
  303. package/dist/routes/api/v1/context/knowledge/[filename]/index.js.map +0 -1
  304. package/dist/routes/api/v1/context/knowledge/[filename]/route.d.ts.map +0 -1
  305. package/dist/routes/api/v1/context/knowledge/[filename]/route.js.map +0 -1
  306. package/dist/routes/api/v1/context/knowledge/index.d.ts.map +0 -1
  307. package/dist/routes/api/v1/context/knowledge/index.js.map +0 -1
  308. package/dist/routes/api/v1/context/knowledge/route.d.ts.map +0 -1
  309. package/dist/routes/api/v1/context/knowledge/route.js.map +0 -1
  310. package/dist/routes/api/v1/context/project/route.d.ts.map +0 -1
  311. package/dist/routes/api/v1/context/project/route.js.map +0 -1
  312. package/dist/routes/api/v1/git/index.d.ts.map +0 -1
  313. package/dist/routes/api/v1/git/index.js.map +0 -1
  314. package/dist/routes/api/v1/jobs/[id]/route.d.ts.map +0 -1
  315. package/dist/routes/api/v1/jobs/[id]/route.js.map +0 -1
  316. package/dist/routes/api/v1/jobs/[id]/run/route.d.ts.map +0 -1
  317. package/dist/routes/api/v1/jobs/[id]/run/route.js.map +0 -1
  318. package/dist/routes/api/v1/jobs/index.d.ts.map +0 -1
  319. package/dist/routes/api/v1/jobs/index.js.map +0 -1
  320. package/dist/routes/api/v1/jobs/route.d.ts.map +0 -1
  321. package/dist/routes/api/v1/jobs/route.js.map +0 -1
  322. package/dist/routes/api/v1/jobs/status/route.d.ts.map +0 -1
  323. package/dist/routes/api/v1/jobs/status/route.js.map +0 -1
  324. package/dist/routes/api/v1/mcp/index.d.ts.map +0 -1
  325. package/dist/routes/api/v1/mcp/index.js.map +0 -1
  326. package/dist/routes/api/v1/mcp/route.d.ts.map +0 -1
  327. package/dist/routes/api/v1/mcp/route.js.map +0 -1
  328. package/dist/routes/api/v1/proposals/[id]/route.d.ts.map +0 -1
  329. package/dist/routes/api/v1/proposals/[id]/route.js.map +0 -1
  330. package/dist/routes/api/v1/proposals/index.d.ts.map +0 -1
  331. package/dist/routes/api/v1/proposals/index.js.map +0 -1
  332. package/dist/routes/api/v1/proposals/route.d.ts.map +0 -1
  333. package/dist/routes/api/v1/proposals/route.js.map +0 -1
  334. package/dist/routes/api/v1/resources/[id]/index.d.ts.map +0 -1
  335. package/dist/routes/api/v1/resources/[id]/index.js.map +0 -1
  336. package/dist/routes/api/v1/resources/[id]/route.js.map +0 -1
  337. package/dist/routes/api/v1/resources/[id]/thumbnail/index.d.ts.map +0 -1
  338. package/dist/routes/api/v1/resources/[id]/thumbnail/index.js.map +0 -1
  339. package/dist/routes/api/v1/resources/[id]/thumbnail/route.js.map +0 -1
  340. package/dist/routes/api/v1/resources/index.d.ts.map +0 -1
  341. package/dist/routes/api/v1/resources/index.js.map +0 -1
  342. package/dist/routes/api/v1/resources/route.d.ts.map +0 -1
  343. package/dist/routes/api/v1/resources/route.js.map +0 -1
  344. package/dist/routes/api/v1/symlinks/index.d.ts.map +0 -1
  345. package/dist/routes/api/v1/symlinks/index.js.map +0 -1
  346. package/dist/routes/api/v1/symlinks/route.d.ts.map +0 -1
  347. package/dist/routes/api/v1/symlinks/route.js.map +0 -1
  348. package/dist/routes/api/v1/terminal/[proposalId]/create/index.d.ts.map +0 -1
  349. package/dist/routes/api/v1/terminal/[proposalId]/create/index.js.map +0 -1
  350. package/dist/routes/api/v1/terminal/[proposalId]/create/route.d.ts.map +0 -1
  351. package/dist/routes/api/v1/terminal/[proposalId]/create/route.js.map +0 -1
  352. package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.d.ts.map +0 -1
  353. package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.js.map +0 -1
  354. package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.d.ts.map +0 -1
  355. package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.js.map +0 -1
  356. package/dist/routes/api/v1/terminal/[proposalId]/resize/index.d.ts.map +0 -1
  357. package/dist/routes/api/v1/terminal/[proposalId]/resize/index.js.map +0 -1
  358. package/dist/routes/api/v1/terminal/[proposalId]/resize/route.d.ts.map +0 -1
  359. package/dist/routes/api/v1/terminal/[proposalId]/resize/route.js.map +0 -1
  360. package/dist/routes/api/v1/terminal/sessions/index.d.ts.map +0 -1
  361. package/dist/routes/api/v1/terminal/sessions/index.js.map +0 -1
  362. package/dist/routes/api/v1/terminal/sessions/route.d.ts.map +0 -1
  363. package/dist/routes/api/v1/terminal/sessions/route.js.map +0 -1
  364. package/dist/routes/api/v1/user/index.d.ts.map +0 -1
  365. package/dist/routes/api/v1/user/index.js.map +0 -1
  366. package/dist/routes/api/v1/user/settings/index.d.ts.map +0 -1
  367. package/dist/routes/api/v1/user/settings/index.js.map +0 -1
  368. package/dist/routes/api/v1/user/settings/route.d.ts.map +0 -1
  369. package/dist/routes/api/v1/user/settings/route.js.map +0 -1
  370. package/dist/server-with-static.d.ts.map +0 -1
  371. package/dist/server-with-static.js.map +0 -1
  372. package/dist/server.d.ts.map +0 -1
  373. package/dist/server.js.map +0 -1
  374. package/static/assets/CodePage-xbYipiBR.js +0 -2
  375. package/static/assets/IntegrationsSettingsPage-Ds16sLG2.js +0 -1
  376. package/static/assets/KnowledgeEditPage-DpjdauND.js +0 -1
  377. package/static/assets/NewKnowledgePage-EqWKQ4lU.js +0 -9
  378. package/static/assets/NotificationsSettingsPage-BzVS1D5M.js +0 -1
  379. package/static/assets/ProjectEditPage-BlQk50Xs.js +0 -11
  380. package/static/assets/PromptsSettingsPage-DWEKgvMD.js +0 -1
  381. package/static/assets/RoleEditPage-m6lOchyA.js +0 -13
  382. package/static/assets/SchedulePage-DUSxe93C.js +0 -4
  383. package/static/assets/TaskEditPage-Dpsi2Rcp.js +0 -1
  384. package/static/assets/UserPreferencesPage-CY_0CoMe.js +0 -1
  385. package/static/assets/index-CHdBxVyk.css +0 -2
  386. package/static/assets/kiro-CGoI3Dqh.js +0 -17
  387. package/static/assets/markdown-editor-C-DC0mFI.js +0 -62
  388. package/static/assets/markdown-editor-DUEthZ0y.css +0 -1
  389. package/static/assets/select-Dp3J_OE9.js +0 -1
@@ -0,0 +1,111 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Beun4ywN.js","assets/index-DF2yEDGL.js","assets/index-DH_vXhd4.css","assets/index-BEvAFxs_.js","assets/index-BBY4n5t-.js","assets/index-p-EXqOgO.js","assets/index-ChD5bDHD.js","assets/index-DHmd0I4e.js","assets/index-AeonINTL.js","assets/index-AIsVwTBP.js","assets/index-BS_uzzCh.js","assets/index-BEkvG6MQ.js","assets/index-80RT6UXi.js","assets/index-D8UBHQdy.js","assets/index-DvIiLgyh.js","assets/index-CawWXqM_.js","assets/index-ClFRvTkG.js","assets/index-DCrCdQ-J.js","assets/dockerfile-BKs6k2Af.js","assets/simple-mode-GW_nhZxv.js","assets/factor-kuTfRLto.js","assets/nsis-LdVXkNf5.js","assets/pug-DeIclll2.js","assets/javascript-iXu5QeM3.js","assets/index-CR0uN9wO.js","assets/index-CRSfgM43.js"])))=>i.map(i=>d[i]);
2
+ import{av as ix,aw as H$,ax as U$,ay as zp,az as G$,aA as K$,r as V,aB as v,aC as sx,aD as ox,aE as tn,aF as ti,aG as Tc,aH as cd,aI as J$,aJ as lx,aK as Dr,aL as zu,aM as tO,aN as cs,aO as Li,aP as rr,aQ as xl,aR as e3,aS as t3,aT as n3,aU as r3,j as oe,aV as ax,aW as hk,aX as i3,aY as s3,aZ as o3,a_ as fk,ag as sf,a$ as l3,ah as nO,b0 as a3,b1 as dk,b2 as pk,b3 as c3,b4 as u3,al as gk,b5 as h3,b6 as f3,b7 as d3,aj as Ss,b8 as p3,b9 as g3,ba as m3,bb as O3,ak as Yi,bc as of,bd as rO,am as mk,be as Ok,bf as x3,bg as b3,bh as y3,bi as v3,bj as cx,bk as N,bl as xk,bm as bk,bn as yk,bo as vk,bp as Sk,bq as S3,br as ux,bs as w3,e as k3}from"./index-DF2yEDGL.js";import{R as C3,S as _3,T as T3,V as P3,I as E3,P as Q3,C as $3,a as A3,b as M3,c as L3}from"./index-BEvAFxs_.js";const hx={}.hasOwnProperty;function R3(n,e){const t=e||{};function r(i,...s){let o=r.invalid;const l=r.handlers;if(i&&hx.call(i,n)){const a=String(i[n]);o=hx.call(l,a)?l[a]:r.unknown}if(o)return o.call(this,i,...s)}return r.handlers=t.handlers||{},r.invalid=t.invalid,r.unknown=t.unknown,r}const I3={}.hasOwnProperty;function wk(n,e){let t=-1,r;if(e.extensions)for(;++t<e.extensions.length;)wk(n,e.extensions[t]);for(r in e)if(I3.call(e,r))switch(r){case"extensions":break;case"unsafe":{fx(n[r],e[r]);break}case"join":{fx(n[r],e[r]);break}case"handlers":{D3(n[r],e[r]);break}default:n.options[r]=e[r]}return n}function fx(n,e){e&&n.push(...e)}function D3(n,e){e&&Object.assign(n,e)}const N3=[V3];function V3(n,e,t,r){if(e.type==="code"&&ix(e,r)&&(n.type==="list"||n.type===e.type&&ix(n,r)))return!1;if("spread"in t&&typeof t.spread=="boolean")return n.type==="paragraph"&&(n.type===e.type||e.type==="definition"||e.type==="heading"&&H$(e,r))?void 0:t.spread?1:0}const us=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Z3=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
3
+ `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:us},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
4
+ ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:us},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
5
+ *])`},{character:"*",inConstruct:"phrasing",notInConstruct:us},{atBreak:!0,character:"+",after:`(?:[ \r
6
+ ])`},{atBreak:!0,character:"-",after:`(?:[ \r
7
+ -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
8
+ ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:us},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:us},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:us},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:us},{atBreak:!0,character:"~"}];function B3(n){return n.label||!n.identifier?n.label||"":U$(n.identifier)}function F3(n){if(!n._compiled){const e=(n.atBreak?"[\\r\\n][\\t ]*":"")+(n.before?"(?:"+n.before+")":"");n._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(n.character)?"\\":"")+n.character+(n.after?"(?:"+n.after+")":""),"g")}return n._compiled}function X3(n,e,t){const r=e.indexStack,i=n.children||[],s=[];let o=-1,l=t.before,a;r.push(-1);let c=e.createTracker(t);for(;++o<i.length;){const u=i[o];let h;if(r[r.length-1]=o,o+1<i.length){let p=e.handle.handlers[i[o+1].type];p&&p.peek&&(p=p.peek),h=p?p(i[o+1],n,e,{before:"",after:"",...c.current()}).charAt(0):""}else h=t.after;s.length>0&&(l==="\r"||l===`
9
+ `)&&u.type==="html"&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),l=" ",c=e.createTracker(t),c.move(s.join("")));let f=e.handle(u,n,e,{...c.current(),after:h,before:l});a&&a===f.slice(0,1)&&(f=zp(a.charCodeAt(0))+f.slice(1));const d=e.attentionEncodeSurroundingInfo;e.attentionEncodeSurroundingInfo=void 0,a=void 0,d&&(s.length>0&&d.before&&l===s[s.length-1].slice(-1)&&(s[s.length-1]=s[s.length-1].slice(0,-1)+zp(l.charCodeAt(0))),d.after&&(a=h)),c.move(f),s.push(f),l=f.slice(-1)}return r.pop(),s.join("")}function z3(n,e,t){const r=e.indexStack,i=n.children||[],s=e.createTracker(t),o=[];let l=-1;for(r.push(-1);++l<i.length;){const a=i[l];r[r.length-1]=l,o.push(s.move(e.handle(a,n,e,{before:`
10
+ `,after:`
11
+ `,...s.current()}))),a.type!=="list"&&(e.bulletLastUsed=void 0),l<i.length-1&&o.push(s.move(W3(a,i[l+1],n,e)))}return r.pop(),o.join("")}function W3(n,e,t,r){let i=r.join.length;for(;i--;){const s=r.join[i](n,e,t,r);if(s===!0||s===1)break;if(typeof s=="number")return`
12
+ `.repeat(1+s);if(s===!1)return`
13
+
14
+ <!---->
15
+
16
+ `}return`
17
+
18
+ `}const j3=/\r?\n|\r/g;function q3(n,e){const t=[];let r=0,i=0,s;for(;s=j3.exec(n);)o(n.slice(r,s.index)),t.push(s[0]),r=s.index+s[0].length,i++;return o(n.slice(r)),t.join("");function o(l){t.push(e(l,i,!l))}}function Y3(n,e,t){const r=(t.before||"")+(e||"")+(t.after||""),i=[],s=[],o={};let l=-1;for(;++l<n.unsafe.length;){const u=n.unsafe[l];if(!G$(n.stack,u))continue;const h=n.compilePattern(u);let f;for(;f=h.exec(r);){const d="before"in u||!!u.atBreak,p="after"in u,g=f.index+(d?f[1].length:0);i.includes(g)?(o[g].before&&!d&&(o[g].before=!1),o[g].after&&!p&&(o[g].after=!1)):(i.push(g),o[g]={before:d,after:p})}}i.sort(H3);let a=t.before?t.before.length:0;const c=r.length-(t.after?t.after.length:0);for(l=-1;++l<i.length;){const u=i[l];u<a||u>=c||u+1<c&&i[l+1]===u+1&&o[u].after&&!o[u+1].before&&!o[u+1].after||i[l-1]===u-1&&o[u].before&&!o[u-1].before&&!o[u-1].after||(a!==u&&s.push(dx(r.slice(a,u),"\\")),a=u,/[!-/:-@[-`{-~]/.test(r.charAt(u))&&(!t.encode||!t.encode.includes(r.charAt(u)))?s.push("\\"):(s.push(zp(r.charCodeAt(u))),a++))}return s.push(dx(r.slice(a,c),t.after)),s.join("")}function H3(n,e){return n-e}function dx(n,e){const t=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],s=n+e;let o=-1,l=0,a;for(;a=t.exec(s);)r.push(a.index);for(;++o<r.length;)l!==r[o]&&i.push(n.slice(l,r[o])),i.push("\\"),l=r[o];return i.push(n.slice(l)),i.join("")}function U3(n){const e=n||{},t=e.now||{};let r=e.lineShift||0,i=t.line||1,s=t.column||1;return{move:a,current:o,shift:l};function o(){return{now:{line:i,column:s},lineShift:r}}function l(c){r+=c}function a(c){const u=c||"",h=u.split(/\r?\n|\r/g),f=h[h.length-1];return i+=h.length-1,s=h.length===1?s+f.length:1+f.length+r,u}}function kk(n,e){const t=e||{},r={associationId:B3,containerPhrasing:e9,containerFlow:t9,createTracker:U3,compilePattern:F3,enter:s,handlers:{...K$},handle:void 0,indentLines:q3,indexStack:[],join:[...N3],options:{},safe:n9,stack:[],unsafe:[...Z3]};wk(r,t),r.options.tightDefinitions&&r.join.push(J3),r.handle=R3("type",{invalid:G3,unknown:K3,handlers:r.handlers});let i=r.handle(n,void 0,r,{before:`
19
+ `,after:`
20
+ `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
21
+ `),i;function s(o){return r.stack.push(o),l;function l(){r.stack.pop()}}}function G3(n){throw new Error("Cannot handle value `"+n+"`, expected node")}function K3(n){const e=n;throw new Error("Cannot handle unknown node `"+e.type+"`")}function J3(n,e){if(n.type==="definition"&&n.type===e.type)return 0}function e9(n,e){return X3(n,this,e)}function t9(n,e){return z3(n,this,e)}function n9(n,e){return Y3(this,n,e)}var r9=Object.defineProperty,i9=(n,e,t)=>e in n?r9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,li=(n,e,t)=>i9(n,typeof e!="symbol"?e+"":e,t);let s9=class Ck{constructor(e=new Map){this.map=e}clone(){return new Ck(new Map(this.map))}increment(e){const t=this.map.get(e)??0;this.map.set(e,t+1)}decrement(e,t){let r=this.map.get(e);r!==void 0&&(r-=1,this.map.set(e,r),r===0&&t())}},Pc=class{constructor(){li(this,"map",new Map)}getOrCreate(e){let t=this.map.get(e);return t===void 0&&(t=new Set,this.map.set(e,t)),t}get(e){return this.map.get(e)}use(e,t){const r=this.get(e);r!==void 0&&t(r)}delete(e){return this.map.delete(e)}};function po(n,e){return e(n),n}function iO(){}const _k="cell";function px(n,e){return n===e}const lf=new Map;let o9=class{constructor(e={}){li(this,"subscriptions",new Pc),li(this,"singletonSubscriptions",new Map),li(this,"graph",new Pc),li(this,"state",new Map),li(this,"distinctNodes",new Map),li(this,"executionMaps",new Map),li(this,"definitionRegistry",new Set),li(this,"combinedCells",[]);for(const t of Object.getOwnPropertySymbols(e))this.state.set(t,e[t])}cellInstance(e,t=!0,r=Symbol()){return this.state.has(r)||this.state.set(r,e),t!==!1&&!this.distinctNodes.has(r)&&this.distinctNodes.set(r,t===!0?px:t),r}signalInstance(e=!0,t=Symbol()){return e!==!1&&this.distinctNodes.set(t,e===!0?px:e),t}sub(e,t){this.register(e);const r=this.subscriptions.getOrCreate(e);return r.add(t),()=>r.delete(t)}singletonSub(e,t){return this.register(e),t===void 0?this.singletonSubscriptions.delete(e):this.singletonSubscriptions.set(e,t),()=>this.singletonSubscriptions.delete(e)}resetSingletonSubs(){this.singletonSubscriptions.clear()}subMultiple(e,t){const r=this.signalInstance();return this.connect({map:i=>(...s)=>{i(s)},sink:r,sources:e}),this.sub(r,t)}pubIn(e){var t;const r=Reflect.ownKeys(e),i=this.getExecutionMap(r),s=i.refCount.clone(),o=i.participatingNodes.slice(),l=new Map(this.state),a=c=>{this.graph.use(c,u=>{for(const{sources:h,sink:f}of u)h.has(c)&&s.decrement(f,()=>{o.splice(o.indexOf(f),1),a(f)})})};for(;;){const c=o.shift();if(c===void 0)break;const u=c;let h=!1;const f=d=>{const p=this.distinctNodes.get(u);if(p!=null&&p(l.get(u),d)){h=!1;return}h=!0,l.set(u,d),this.state.has(u)&&this.state.set(u,d)};if(Object.prototype.hasOwnProperty.call(e,u)?f(e[u]):i.projections.use(u,d=>{for(const p of d){const g=[...Array.from(p.sources),...Array.from(p.pulls)].map(m=>l.get(m));p.map(f)(...g)}}),h){const d=l.get(u);this.inContext(()=>{this.subscriptions.use(u,p=>{for(const g of p)g(d)})}),(t=this.singletonSubscriptions.get(u))==null||t(d)}else a(u)}}connect({sources:e,pulls:t=[],map:r,sink:i}){const s={map:r,pulls:new Set(t),sink:this.register(i),sources:new Set(e)};for(const o of[...e,...t])this.register(o),this.graph.getOrCreate(o).add(s);this.executionMaps.clear()}pub(e,t){this.pubIn({[e]:t})}pipe(e,...t){return this.combineOperators(...t)(e)}transformer(...e){return t=>po(this.signalInstance(),r=>(this.link(this.pipe(r,...e),t),r))}link(e,t){this.connect({map:r=>i=>{r(i)},sink:t,sources:[e]})}combine(...e){return po(this.signalInstance(),t=>{this.connect({map:r=>(...i)=>{r(i)},sink:t,sources:e})})}combineCells(...e){const t=this.combinedCells.find(i=>e.length===i.sources.length&&e.every((s,o)=>s===i.sources[o]));if(t)return t.cell;const r=this.cellInstance(e.map(i=>this.getValue(i)),!0);return this.connect({map:i=>(...s)=>{i(s)},sink:r,sources:e}),this.combinedCells.push({sources:e,cell:r}),r}getValue(e){return this.register(e),this.state.get(e)}getValues(e){return e.map(t=>this.getValue(t))}register(e){const t=lf.get(e);return t===void 0||this.definitionRegistry.has(e)?e:(this.definitionRegistry.add(e),po(t.type===_k?this.cellInstance(t.initial,t.distinct,e):this.signalInstance(t.distinct,e),r=>{this.inContext(()=>{t.init(this,r)})}))}inContext(e){return e()}changeWith(e,t,r){this.connect({sources:[t],pulls:[e],sink:e,map:i=>(s,o)=>{i(r(o,s))}})}calculateExecutionMap(e){const t=[],r=new Set,i=new Pc,s=new s9,o=new Pc,l=(a,c=0)=>{s.increment(a),!r.has(a)&&(this.register(a),i.use(a,u=>{c=Math.max(...Array.from(u).map(h=>t.indexOf(h)))+1}),this.graph.use(a,u=>{for(const h of u)h.sources.has(a)?(o.getOrCreate(h.sink).add(h),l(h.sink,c)):i.getOrCreate(h.sink).add(a)}),r.add(a),t.splice(c,0,a))};return e.forEach(l),{participatingNodes:t,pendingPulls:i,projections:o,refCount:s}}getExecutionMap(e){let t=e;if(e.length===1){t=e[0];const i=this.executionMaps.get(t);if(i!==void 0)return i}else for(const[i,s]of this.executionMaps.entries())if(Array.isArray(i)&&i.length===e.length&&i.every(o=>e.includes(o)))return s;const r=this.calculateExecutionMap(e);return this.executionMaps.set(t,r),r}combineOperators(...e){return t=>{for(const r of e)t=r(t,this);return t}}};function ue(n,e=iO,t=!0){return po(Symbol(),r=>{lf.set(r,{type:_k,distinct:t,initial:n,init:e})})}function zt(n=iO,e=!1){return po(Symbol(),t=>{lf.set(t,{type:"signal",distinct:e,init:n})})}function Uo(n=iO){return po(Symbol(),e=>{lf.set(e,{type:"signal",distinct:!1,init:n})})}const Tk=V.createContext(null);function Ka(){const n=V.useContext(Tk);if(n===null)throw new Error("useRealm must be used within a RealmContextProvider");return n}function Lt(n){const e=Ka();e.register(n);const t=V.useCallback(r=>e.sub(n,r),[e,n]);return V.useSyncExternalStore(t,()=>e.getValue(n),()=>e.getValue(n))}function Ht(...n){const e=Ka(),t=V.useMemo(()=>e.combineCells.apply(e,n),[e,...n]);return Lt(t)}function ut(n){const e=Ka();return e.register(n),V.useCallback(t=>{e.pub(n,t)},[e,n])}function Es(n){return(e,t)=>{const r=t.signalInstance();return t.connect({map:i=>s=>{i(n(s))},sink:r,sources:[e]}),r}}function xt(...n){return(e,t)=>{const r=t.signalInstance();return t.connect({map:i=>(...s)=>{i(s)},pulls:n,sink:r,sources:[e]}),r}}function Ja(n){return(e,t)=>{const r=t.signalInstance();return t.connect({map:i=>s=>{n(s)&&i(s)},sink:r,sources:[e]}),r}}function Pk(n,e){return(t,r)=>{const i=r.signalInstance();return r.connect({map:s=>o=>{s(e=n(e,o))},sink:i,sources:[t]}),i}}function l9(n,e){return e(n),n}function ji(){}function Rn(n){return function(e){return{init:t=>{var r;return(r=n.init)==null?void 0:r.call(n,t,e)},postInit:t=>{var r;return(r=n.postInit)==null?void 0:r.call(n,t,e)},update:t=>{var r;return(r=n.update)==null?void 0:r.call(n,t,e)}}}}function a9({children:n,plugins:e}){const t=v.useMemo(()=>l9(new o9,r=>{var i,s;for(const o of e)(i=o.init)==null||i.call(o,r);for(const o of e)(s=o.postInit)==null||s.call(o,r)}),[]);return v.useEffect(()=>{var r;for(const i of e)(r=i.update)==null||r.call(i,t)}),v.createElement(Tk.Provider,{value:t},n)}const Wu=V.createContext(null);function Ek(n,e){let t=null;return n!=null&&(t=n[1]),{getTheme:function(){return e??(t!=null?t.getTheme():null)}}}function Sn(){const n=V.useContext(Wu);return n==null&&(function(e,...t){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",e);for(const s of t)i.append("v",s);throw r.search=i.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),n}function z(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const br=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,c9=br&&"documentMode"in document?document.documentMode:null,$r=br&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Qs=br&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ju=!(!br||!("InputEvent"in window)||c9)&&"getTargetRanges"in new window.InputEvent("input"),da=br&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Po=br&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,u9=br&&/Android/.test(navigator.userAgent),Qk=br&&/^(?=.*Chrome).*/i.test(navigator.userAgent),gx=br&&u9&&Qk,qu=br&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Qk;function $k(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}const h9=1,f9=3,d9=9,p9=11,$s=0,Ak=1,Eo=2,g9=0,m9=1,O9=2,Yu=4,Hu=8,sO=128,x9=1792|(112|(3|Yu|Hu)|sO),oO=1,lO=2,aO=3,cO=4,uO=5,hO=6,af=da||Po||qu?" ":"​",bi=`
22
+
23
+ `,b9=Qs?" ":af,As={bold:1,capitalize:1024,code:16,highlight:sO,italic:2,lowercase:256,strikethrough:Yu,subscript:32,superscript:64,underline:Hu,uppercase:512},y9={directionless:1,unmergeable:2},mx={center:lO,end:hO,justify:cO,left:oO,right:aO,start:uO},v9={[lO]:"center",[hO]:"end",[cO]:"justify",[oO]:"left",[aO]:"right",[uO]:"start"},S9={normal:0,segmented:2,token:1},w9={[g9]:"normal",[O9]:"segmented",[m9]:"token"},Ox="$config";function Mk(n,e,t,r,i,s){let o=n.getFirstChild();for(;o!==null;){const l=o.__key;o.__parent===e&&(I(o)&&Mk(o,l,t,r,i,s),t.has(l)||s.delete(l),i.push(l)),o=o.getNextSibling()}}const k9=100;let Wp=!1,fO=0;function C9(n){fO=n.timeStamp}function ud(n,e,t){const r=n.nodeName==="BR",i=e.__lexicalLineBreak;return i&&(n===i||r&&n.previousSibling===i)||r&&Cf(n,t)!==void 0}function _9(n,e,t){const r=gr(Hn(t));let i=null,s=null;r!==null&&r.anchorNode===n&&(i=r.anchorOffset,s=r.focusOffset);const o=n.nodeValue;o!==null&&RO(e,o,i,s,!1)}function T9(n,e,t){if(B(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return Ti(e)&&t.isAttached()}function P9(n,e,t,r){for(let i=n;i&&!bA(i);i=oc(i)){const s=Cf(i,e);if(s!==void 0){const o=rt(s,t);if(o)return Ie(o)||!st(i)?void 0:[i,o]}else if(i===r)return[r,w2(t)]}}function Lk(n,e,t){Wp=!0;const r=performance.now()-fO>k9;try{En(n,(()=>{const i=H()||(function(f){return f.getEditorState().read((()=>{const d=H();return d!==null?d.clone():null}))})(n),s=new Map,o=n.getRootElement(),l=n._editorState,a=n._blockCursorElement;let c=!1,u="";for(let f=0;f<e.length;f++){const d=e[f],p=d.type,g=d.target,m=P9(g,n,l,o);if(!m)continue;const[x,O]=m;if(p==="characterData")r&&G(O)&&Ti(g)&&T9(i,g,O)&&_9(g,O,n);else if(p==="childList"){c=!0;const b=d.addedNodes;for(let k=0;k<b.length;k++){const w=b[k],C=v2(w),T=w.parentNode;if(T!=null&&w!==a&&C===null&&!ud(w,T,n)){if(Qs){const $=(st(w)?w.innerText:null)||w.nodeValue;$&&(u+=$)}T.removeChild(w)}}const y=d.removedNodes,S=y.length;if(S>0){let k=0;for(let w=0;w<S;w++){const C=y[w];(ud(C,g,n)||a===C)&&(g.appendChild(C),k++)}S!==k&&s.set(x,O)}}}if(s.size>0)for(const[f,d]of s)d.reconcileObservedMutation(f,n);const h=t.takeRecords();if(h.length>0){for(let f=0;f<h.length;f++){const d=h[f],p=d.addedNodes,g=d.target;for(let m=0;m<p.length;m++){const x=p[m],O=x.parentNode;O==null||x.nodeName!=="BR"||ud(x,g,n)||O.removeChild(x)}}t.takeRecords()}i!==null&&(c&&ht(i),Qs&&T2(n)&&i.insertRawText(u))}))}finally{Wp=!1}}function Rk(n){const e=n._observer;e!==null&&Lk(n,e.takeRecords(),e)}function Ik(n){(function(e){fO===0&&Hn(e).addEventListener("textInput",C9,!0)})(n),n._observer=new MutationObserver(((e,t)=>{Lk(n,e,t)}))}function jp(n){const e=new Map,t=new Set;for(let r=typeof n=="function"?n:n.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=Pf(r);if(i&&i.stateConfigs)for(const s of i.stateConfigs){let o;"stateConfig"in s?(o=s.stateConfig,s.flat&&t.add(o.key)):o=s,e.set(o.key,o)}}return{flatKeys:t,sharedConfigMap:e}}let E9=class Dk{constructor(e,t,r=void 0,i=new Map,s=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=r,this.knownState=i;const{sharedConfigMap:o}=this.sharedNodeState,l=s!==void 0?s:(function(a,c,u){let h=u.size;if(c)for(const f in c){const d=a.get(f);d&&u.has(d)||h++}return h})(o,r,i);this.size=l}getValue(e){const t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const i=this.unknownState[e.key];i!==void 0&&(r=e.parse(i)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},t={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in e&&(t[r]=e[r],delete e[r]);return xx(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:r}=this,i=new Map(this.knownState);return new Dk(e,t,(function(s,o,l){let a;if(l)for(const[c,u]of Object.entries(l)){const h=s.get(c);h?o.has(h)||o.set(h,h.parse(u)):(a=a||{},a[c]=u)}return a})(t.sharedConfigMap,i,r),i,this.size)}updateFromKnown(e,t){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:i,unknownState:s}=this;i.has(e)||s&&r in s||(s&&(delete s[r],this.unknownState=xx(s)),this.size++),i.set(e,t)}updateFromUnknown(e,t){const r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){const{knownState:t}=this;for(const r of t.keys())t.set(r,r.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(const[r,i]of Object.entries(e))this.updateFromUnknown(r,i)}};function Q9(n){const e=n.getWritable(),t=e.__state?e.__state.getWritable(e):new E9(e,Nk(e));return e.__state=t,t}function Nk(n){return n.__state?n.__state.sharedNodeState:x2(Tf(),n.getType()).sharedNodeState}function xx(n){if(n)for(const e in n)return n}function bx(n,e,t){for(const[r,i]of e.knownState){if(n.has(r.key))continue;n.add(r.key);const s=t?t.getValue(r):r.defaultValue;if(s!==i&&!r.isEqual(s,i))return!0}return!1}function yx(n,e,t){const{unknownState:r}=e,i=t?t.unknownState:void 0;if(r){for(const[s,o]of Object.entries(r))if(!n.has(s)&&(n.add(s),o!==(i?i[s]:void 0)))return!0}return!1}function vx(n,e){const t=n.__state;return t&&t.node===n?t.getWritable(e):t}function Sx(n,e){const t=n.__mode,r=n.__format,i=n.__style,s=e.__mode,o=e.__format,l=e.__style,a=n.__state,c=e.__state;return(t===null||t===s)&&(r===null||r===o)&&(i===null||i===l)&&(n.__state===null||a===c||(function(u,h){if(u===h)return!0;if(u&&h&&u.size!==h.size)return!1;const f=new Set;return!(u&&bx(f,u,h)||h&&bx(f,h,u)||u&&yx(f,u,h)||h&&yx(f,h,u))})(a,c))}function wx(n,e){const t=n.mergeWithSibling(e),r=lt()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function kx(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&G(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(Sx(e,r)){r=wx(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&G(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(Sx(r,t)){r=wx(r,t);break}break}t.remove()}}else r.remove()}function Ms(n){return Cx(n.anchor),Cx(n.focus),n}function Cx(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,i;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),i=!0):(r=e.getChildAtIndex(t),i=!1),G(r)){n.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!I(r))break;n.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let Ls,qt,pa,cf,qp,Yp,Rs,hr,Hp,ga,Tt="",Er=null,Qr="",hi="",ro=!1,Uu=!1;function Gu(n,e){const t=Rs.get(n);if(e!==null){const r=Jp(n);r.parentNode===e&&e.removeChild(r)}if(hr.has(n)||qt._keyToDOMMap.delete(n),I(t)){const r=Ju(t,Rs);Up(r,0,r.length-1,null)}t!==void 0&&IO(ga,pa,cf,t,"destroyed")}function Up(n,e,t,r){let i=e;for(;i<=t;++i){const s=n[i];s!==void 0&&Gu(s,r)}}function hs(n,e){n.setProperty("text-align",e)}const $9="40px";function Vk(n,e){const t=Ls.theme.indent;if(typeof t=="string"){const i=n.classList.contains(t);e>0&&!i?n.classList.add(t):e<1&&i&&n.classList.remove(t)}const r=getComputedStyle(n).getPropertyValue("--lexical-indent-base-value")||$9;n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function Zk(n,e){const t=n.style;e===0?hs(t,""):e===oO?hs(t,"left"):e===lO?hs(t,"center"):e===aO?hs(t,"right"):e===cO?hs(t,"justify"):e===uO?hs(t,"start"):e===hO&&hs(t,"end")}function Gp(n,e){const t=(function(r){const i=r.__dir;if(i!==null)return i;if(bt(r))return null;const s=r.getParentOrThrow();return bt(s)&&s.__dir===null?"auto":null})(e);t!==null?n.dir=t:n.removeAttribute("dir")}function Ku(n,e){const t=hr.get(n);t===void 0&&z(60);const r=t.createDOM(Ls,qt);if((function(i,s,o){const l=o._keyToDOMMap;(function(a,c,u){const h=`__lexicalKey_${c._key}`;a[h]=u})(s,o,i),l.set(i,s)})(n,r,qt),G(t)?r.setAttribute("data-lexical-text","true"):Ie(t)&&r.setAttribute("data-lexical-decorator","true"),I(t)){const i=t.__indent,s=t.__size;if(Gp(r,t),i!==0&&Vk(r,i),s!==0){const l=s-1;Kp(Ju(t,hr),t,0,l,t.getDOMSlot(r))}const o=t.__format;o!==0&&Zk(r,o),t.isInline()||Bk(null,t,r),_f(t)&&(Tt+=bi,hi+=bi)}else{const i=t.getTextContent();if(Ie(t)){const s=t.decorate(qt,Ls);s!==null&&Fk(n,s),r.contentEditable="false"}Tt+=i,hi+=i}return e!==null&&e.insertChild(r),IO(ga,pa,cf,t,"created"),r}function Kp(n,e,t,r,i){const s=Tt;Tt="";let o=t;for(;o<=r;++o){Ku(n[o],i);const l=hr.get(n[o]);l!==null&&G(l)&&(Er===null&&(Er=l.getFormat()),Qr===""&&(Qr=l.getStyle()))}_f(e)&&(Tt+=bi),i.element.__lexicalTextContent=Tt,Tt=s+Tt}function _x(n,e){if(n){const t=n.__last;if(t){const r=e.get(t);if(r)return fr(r)?"line-break":Ie(r)&&r.isInline()?"decorator":null}return"empty"}return null}function Bk(n,e,t){const r=_x(n,Rs),i=_x(e,hr);r!==i&&e.getDOMSlot(t).setManagedLineBreak(i)}function A9(n,e,t){var r;Er=null,Qr="",(function(i,s,o){const l=Tt,a=i.__size,c=s.__size;Tt="";const u=o.element;if(a===1&&c===1){const h=i.__first,f=s.__first;if(h===f)Ml(h,u);else{const p=Jp(h),g=Ku(f,null);try{u.replaceChild(g,p)}catch(m){if(typeof m=="object"&&m!=null){const x=`${m.toString()} Parent: ${u.tagName}, new child: {tag: ${g.tagName} key: ${f}}, old child: {tag: ${p.tagName}, key: ${h}}.`;throw new Error(x)}throw m}Gu(h,null)}const d=hr.get(f);G(d)&&(Er===null&&(Er=d.getFormat()),Qr===""&&(Qr=d.getStyle()))}else{const h=Ju(i,Rs),f=Ju(s,hr);if(h.length!==a&&z(227),f.length!==c&&z(228),a===0)c!==0&&Kp(f,s,0,c-1,o);else if(c===0){if(a!==0){const d=o.after==null&&o.before==null&&o.element.__lexicalLineBreak==null;Up(h,0,a-1,d?null:u),d&&(u.textContent="")}}else(function(d,p,g,m,x,O){const b=m-1,y=x-1;let S,k,w=O.getFirstChild(),C=0,T=0;for(;C<=b&&T<=y;){const M=p[C],Q=g[T];if(M===Q)w=hd(Ml(Q,O.element)),C++,T++;else{S===void 0&&(S=new Set(p)),k===void 0&&(k=new Set(g));const j=k.has(M),fe=S.has(Q);if(j)if(fe){const ee=Is(qt,Q);ee===w?w=hd(Ml(Q,O.element)):(O.withBefore(w).insertChild(ee),Ml(Q,O.element)),C++,T++}else Ku(Q,O.withBefore(w)),T++;else w=hd(Jp(M)),Gu(M,O.element),C++}const F=hr.get(Q);F!==null&&G(F)&&(Er===null&&(Er=F.getFormat()),Qr===""&&(Qr=F.getStyle()))}const $=C>b,D=T>y;if($&&!D){const M=g[y+1],Q=M===void 0?null:qt.getElementByKey(M);Kp(g,d,T,y,O.withBefore(Q))}else D&&!$&&Up(p,C,b,O.element)})(s,h,f,a,c,o)}_f(s)&&(Tt+=bi),u.__lexicalTextContent=Tt,Tt=l+Tt})(n,e,e.getDOMSlot(t)),r=e,Er==null||Er===r.__textFormat||Uu||r.setTextFormat(Er),(function(i){Qr===""||Qr===i.__textStyle||Uu||i.setTextStyle(Qr)})(e)}function Ju(n,e){const t=[];let r=n.__first;for(;r!==null;){const i=e.get(r);i===void 0&&z(101),t.push(r),r=i.__next}return t}function Ml(n,e){const t=Rs.get(n);let r=hr.get(n);t!==void 0&&r!==void 0||z(61);const i=ro||Yp.has(n)||qp.has(n),s=Is(qt,n);if(t===r&&!i){if(I(t)){const o=s.__lexicalTextContent;o!==void 0&&(Tt+=o,hi+=o)}else{const o=t.getTextContent();hi+=o,Tt+=o}return s}if(t!==r&&i&&IO(ga,pa,cf,r,"updated"),r.updateDOM(t,s,Ls)){const o=Ku(n,null);return e===null&&z(62),e.replaceChild(o,s),Gu(n,null),o}if(I(t)&&I(r)){const o=r.__indent;(ro||o!==t.__indent)&&Vk(s,o);const l=r.__format;if((ro||l!==t.__format)&&Zk(s,l),i&&(A9(t,r,s),bt(r)||r.isInline()||Bk(t,r,s)),_f(r)&&(Tt+=bi,hi+=bi),(ro||r.__dir!==t.__dir)&&(Gp(s,r),bt(r)&&!ro))for(const a of r.getChildren())I(a)&&Gp(Is(qt,a.getKey()),a)}else{const o=r.getTextContent();if(Ie(r)){const l=r.decorate(qt,Ls);l!==null&&Fk(n,l)}Tt+=o,hi+=o}if(!Uu&&bt(r)&&r.__cachedText!==hi){const o=r.getWritable();o.__cachedText=hi,r=o}return s}function Fk(n,e){let t=qt._pendingDecorators;const r=qt._decorators;if(t===null){if(r[n]===e)return;t=S2(qt)}t[n]=e}function hd(n){let e=n.nextSibling;return e!==null&&e===qt._blockCursorElement&&(e=e.nextSibling),e}function M9(n,e,t,r,i,s){Tt="",hi="",ro=r===Eo,qt=t,Ls=t._config,pa=t._nodes,cf=qt._listeners.mutation,qp=i,Yp=s,Rs=n._nodeMap,hr=e._nodeMap,Uu=e._readOnly,Hp=new Map(t._keyToDOMMap);const o=new Map;return ga=o,Ml("root",null),qt=void 0,pa=void 0,qp=void 0,Yp=void 0,Rs=void 0,hr=void 0,Ls=void 0,Hp=void 0,ga=void 0,o}function Jp(n){const e=Hp.get(n);return e===void 0&&z(75,n),e}function Oe(n){return{type:n}}const dO=Oe("SELECTION_CHANGE_COMMAND"),L9=Oe("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),pO=Oe("CLICK_COMMAND"),ws=Oe("DELETE_CHARACTER_COMMAND"),go=Oe("INSERT_LINE_BREAK_COMMAND"),ma=Oe("INSERT_PARAGRAPH_COMMAND"),mo=Oe("CONTROLLED_TEXT_INSERTION_COMMAND"),uf=Oe("PASTE_COMMAND"),eg=Oe("REMOVE_TEXT_COMMAND"),Oa=Oe("DELETE_WORD_COMMAND"),xa=Oe("DELETE_LINE_COMMAND"),gi=Oe("FORMAT_TEXT_COMMAND"),hf=Oe("UNDO_COMMAND"),ff=Oe("REDO_COMMAND"),gO=Oe("KEYDOWN_COMMAND"),Xk=Oe("KEY_ARROW_RIGHT_COMMAND"),R9=Oe("MOVE_TO_END"),mO=Oe("KEY_ARROW_LEFT_COMMAND"),I9=Oe("MOVE_TO_START"),OO=Oe("KEY_ARROW_UP_COMMAND"),xO=Oe("KEY_ARROW_DOWN_COMMAND"),ba=Oe("KEY_ENTER_COMMAND"),bO=Oe("KEY_SPACE_COMMAND"),zk=Oe("KEY_BACKSPACE_COMMAND"),df=Oe("KEY_ESCAPE_COMMAND"),Wk=Oe("KEY_DELETE_COMMAND"),pf=Oe("KEY_TAB_COMMAND"),jk=Oe("INSERT_TAB_COMMAND"),eh=Oe("INDENT_CONTENT_COMMAND"),tg=Oe("OUTDENT_CONTENT_COMMAND"),qk=Oe("DROP_COMMAND"),D9=Oe("FORMAT_ELEMENT_COMMAND"),Yk=Oe("DRAGSTART_COMMAND"),Hk=Oe("DRAGOVER_COMMAND"),N9=Oe("DRAGEND_COMMAND"),gf=Oe("COPY_COMMAND"),yO=Oe("CUT_COMMAND"),ng=Oe("SELECT_ALL_COMMAND"),V9=Oe("CLEAR_EDITOR_COMMAND"),Z9=Oe("CLEAR_HISTORY_COMMAND"),Ll=Oe("CAN_REDO_COMMAND"),Rl=Oe("CAN_UNDO_COMMAND"),vO=Oe("FOCUS_COMMAND"),SO=Oe("BLUR_COMMAND"),B9=Oe("KEY_MODIFIER_COMMAND"),ni=Object.freeze({}),rg=30,ig=[["keydown",function(n,e){if(jl=n.timeStamp,Uk=n.key,!e.isComposing()&&!ae(e,gO,n)&&n.key!=null){if(fd&&eb(n))return En(e,(()=>{Ec(e,dd)})),fd=!1,void(dd="");if((function(t){return Xe(t,"ArrowRight",{shiftKey:"any"})})(n))ae(e,Xk,n);else if((function(t){return Xe(t,"ArrowRight",ai)})(n))ae(e,R9,n);else if((function(t){return Xe(t,"ArrowLeft",{shiftKey:"any"})})(n))ae(e,mO,n);else if((function(t){return Xe(t,"ArrowLeft",ai)})(n))ae(e,I9,n);else if((function(t){return Xe(t,"ArrowUp",{altKey:"any",shiftKey:"any"})})(n))ae(e,OO,n);else if((function(t){return Xe(t,"ArrowDown",{altKey:"any",shiftKey:"any"})})(n))ae(e,xO,n);else if((function(t){return Xe(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(n))ql=!0,ae(e,ba,n);else if((function(t){return t.key===" "})(n))ae(e,bO,n);else if((function(t){return $r&&Xe(t,"o",{ctrlKey:!0})})(n))n.preventDefault(),ql=!0,ae(e,go,!0);else if((function(t){return Xe(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(n))ql=!1,ae(e,ba,n);else if((function(t){return Xe(t,"Backspace",{shiftKey:"any"})||$r&&Xe(t,"h",{ctrlKey:!0})})(n))eb(n)?ae(e,zk,n):(n.preventDefault(),ae(e,ws,!0));else if((function(t){return t.key==="Escape"})(n))ae(e,df,n);else if((function(t){return Xe(t,"Delete",{})||$r&&Xe(t,"d",{ctrlKey:!0})})(n))(function(t){return t.key==="Delete"})(n)?ae(e,Wk,n):(n.preventDefault(),ae(e,ws,!1));else if((function(t){return Xe(t,"Backspace",Jx)})(n))n.preventDefault(),ae(e,Oa,!0);else if((function(t){return Xe(t,"Delete",Jx)})(n))n.preventDefault(),ae(e,Oa,!1);else if((function(t){return $r&&Xe(t,"Backspace",{metaKey:!0})})(n))n.preventDefault(),ae(e,xa,!0);else if((function(t){return $r&&(Xe(t,"Delete",{metaKey:!0})||Xe(t,"k",{ctrlKey:!0}))})(n))n.preventDefault(),ae(e,xa,!1);else if((function(t){return Xe(t,"b",ai)})(n))n.preventDefault(),ae(e,gi,"bold");else if((function(t){return Xe(t,"u",ai)})(n))n.preventDefault(),ae(e,gi,"underline");else if((function(t){return Xe(t,"i",ai)})(n))n.preventDefault(),ae(e,gi,"italic");else if((function(t){return Xe(t,"Tab",{shiftKey:"any"})})(n))ae(e,pf,n);else if((function(t){return Xe(t,"z",ai)})(n))n.preventDefault(),ae(e,hf,void 0);else if((function(t){return $r?Xe(t,"z",{metaKey:!0,shiftKey:!0}):Xe(t,"y",{ctrlKey:!0})||Xe(t,"z",{ctrlKey:!0,shiftKey:!0})})(n))n.preventDefault(),ae(e,ff,void 0);else{const t=e._editorState._selection;t===null||B(t)?tb(n)&&(n.preventDefault(),ae(e,ng,n)):(function(r){return Xe(r,"c",ai)})(n)?(n.preventDefault(),ae(e,gf,n)):(function(r){return Xe(r,"x",ai)})(n)?(n.preventDefault(),ae(e,yO,n)):tb(n)&&(n.preventDefault(),ae(e,ng,n))}(function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey})(n)&&ae(e,B9,n)}}],["pointerdown",function(n,e){const t=n.target,r=n.pointerType;tl(t)&&r!=="touch"&&r!=="pen"&&n.button===0&&En(e,(()=>{Ux(t)||(og=!0)}))}],["compositionstart",function(n,e){En(e,(()=>{const t=H();if(B(t)&&!e.isComposing()){const r=t.anchor,i=t.anchor.getNode();Zt(r.key),(n.timeStamp<jl+rg||r.type==="element"||!t.isCollapsed()||i.getFormat()!==t.format||G(i)&&i.getStyle()!==t.style)&&ae(e,mo,b9)}}))}],["compositionend",function(n,e){Qs?bl=!0:Po||!da&&!qu?En(e,(()=>{Ec(e,n.data)})):(fd=!0,dd=n.data)}],["input",function(n,e){n.stopPropagation(),En(e,(()=>{if(st(n.target)&&Ux(n.target))return;const t=H(),r=n.data,i=t2(n);if(r!=null&&B(t)&&Jk(t,i,r,n.timeStamp,!1)){bl&&(Ec(e,r),bl=!1);const s=t.anchor.getNode(),o=gr(Hn(e));if(o===null)return;const l=t.isBackward(),a=l?t.anchor.offset:t.focus.offset,c=l?t.focus.offset:t.anchor.offset;ju&&!t.isCollapsed()&&G(s)&&o.anchorNode!==null&&s.getTextContent().slice(0,a)+r+s.getTextContent().slice(a+c)===_2(o.anchorNode)||ae(e,mo,r);const u=r.length;Qs&&u>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(t.anchor.offset-=u),da||Po||qu||!e.isComposing()||(jl=0,Zt(null))}else LO(!1,e,r!==null?r:void 0),bl&&(Ec(e,r||void 0),bl=!1);(function(){Vt();const s=lt();Rk(s)})()}),{event:n}),io=null}],["click",function(n,e){En(e,(()=>{const t=H(),r=gr(Hn(e)),i=Gs();if(r){if(B(t)){const s=t.anchor,o=s.getNode();if(s.type==="element"&&s.offset===0&&t.isCollapsed()&&!bt(o)&&Ve().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&i!==null&&t.is(i))r.removeAllRanges(),t.dirty=!0;else if(n.detail===3&&!t.isCollapsed()&&o!==t.focus.getNode()){const l=(function(a,c){let u=a;for(;u!==Ve()&&u!=null;){if(c(u))return u;u=u.getParent()}return null})(o,(a=>I(a)&&!a.isInline()));I(l)&&l.select(0)}}else if(n.pointerType==="touch"||n.pointerType==="pen"){const s=r.anchorNode;(st(s)||Ti(s))&&ht(CO(i,r,e,n))}}ae(e,pO,n)}))}],["cut",ni],["copy",ni],["dragstart",ni],["dragover",ni],["dragend",ni],["paste",ni],["focus",ni],["blur",ni],["drop",ni]];ju&&ig.push(["beforeinput",(n,e)=>(function(t,r){const i=t.inputType,s=t2(t);i==="deleteCompositionText"||Qs&&T2(r)||i!=="insertCompositionText"&&En(r,(()=>{const o=H();if(i==="deleteContentBackward"){if(o===null){const d=Gs();if(!B(d))return;ht(d.clone())}if(B(o)){const d=o.anchor.key===o.focus.key;if(l=t.timeStamp,Uk==="MediaLast"&&l<jl+rg&&r.isComposing()&&d){if(Zt(null),jl=0,setTimeout((()=>{En(r,(()=>{Zt(null)}))}),rg),B(o)){const p=o.anchor.getNode();p.markDirty(),G(p)||z(142),e2(o,p)}}else{Zt(null),t.preventDefault();const p=o.anchor.getNode(),g=p.getTextContent(),m=p.canInsertTextAfter(),x=o.anchor.offset===0&&o.focus.offset===g.length;let O=gx&&d&&!x&&m;if(O&&o.isCollapsed()&&(O=!Ie(ug(o.anchor,!0))),!O){ae(r,ws,!0);const b=H();gx&&B(b)&&b.isCollapsed()&&(ps=b,setTimeout((()=>ps=null)))}}return}}var l;if(!B(o))return;const a=t.data;io!==null&&LO(!1,r,io),o.dirty&&io===null||!o.isCollapsed()||bt(o.anchor.getNode())||s===null||o.applyDOMRange(s),io=null;const c=o.anchor,u=o.focus,h=c.getNode(),f=u.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(t.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":ae(r,mo,t);break;case"insertFromComposition":Zt(null),ae(r,mo,t);break;case"insertLineBreak":Zt(null),ae(r,go,!1);break;case"insertParagraph":Zt(null),ql&&!Po?(ql=!1,ae(r,go,!1)):ae(r,ma,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":ae(r,uf,t);break;case"deleteByComposition":(function(d,p){return d!==p||I(d)||I(p)||!ks(d)||!ks(p)})(h,f)&&ae(r,eg,t);break;case"deleteByDrag":case"deleteByCut":ae(r,eg,t);break;case"deleteContent":ae(r,ws,!1);break;case"deleteWordBackward":ae(r,Oa,!0);break;case"deleteWordForward":ae(r,Oa,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":ae(r,xa,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":ae(r,xa,!1);break;case"formatStrikeThrough":ae(r,gi,"strikethrough");break;case"formatBold":ae(r,gi,"bold");break;case"formatItalic":ae(r,gi,"italic");break;case"formatUnderline":ae(r,gi,"underline");break;case"historyUndo":ae(r,hf,void 0);break;case"historyRedo":ae(r,ff,void 0)}else{if(a===`
24
+ `)t.preventDefault(),ae(r,go,!1);else if(a===bi)t.preventDefault(),ae(r,ma,void 0);else if(a==null&&t.dataTransfer){const d=t.dataTransfer.getData("text/plain");t.preventDefault(),o.insertRawText(d)}else a!=null&&Jk(o,s,a,t.timeStamp,!0)?(t.preventDefault(),ae(r,mo,a)):io=a;Gk=t.timeStamp}}))})(n,e)]);let jl=0,Uk=null,Gk=0,io=null;const th=new WeakMap;let sg=!1,og=!1,ql=!1,bl=!1,fd=!1,dd="",ps=null,Kk=[0,"",0,"root",0];function Jk(n,e,t,r,i){const s=n.anchor,o=n.focus,l=s.getNode(),a=lt(),c=gr(Hn(a)),u=c!==null?c.anchorNode:null,h=s.key,f=a.getElementByKey(h),d=t.length;return h!==o.key||!G(l)||(!i&&(!ju||Gk<r+50)||l.isDirty()&&d<2||k2(t))&&s.offset!==o.offset&&!l.isComposing()||ci(l)||l.isDirty()&&d>1||(i||!ju)&&f!==null&&!l.isComposing()&&u!==Qo(f)||c!==null&&e!==null&&(!e.collapsed||e.startContainer!==c.anchorNode||e.startOffset!==c.anchorOffset)||l.getFormat()!==n.format||l.getStyle()!==n.style||(function(p,g){if(g.isSegmented())return!0;if(!p.isCollapsed())return!1;const m=p.anchor.offset,x=g.getParentOrThrow(),O=ks(g);return m===0?!g.canInsertTextBefore()||!x.canInsertTextBefore()&&!g.isComposing()||O||(function(b){const y=b.getPreviousSibling();return(G(y)||I(y)&&y.isInline())&&!y.canInsertTextAfter()})(g):m===g.getTextContentSize()&&(!g.canInsertTextAfter()||!x.canInsertTextAfter()&&!g.isComposing()||O)})(n,l)}function Tx(n,e){return Ti(n)&&n.nodeValue!==null&&e!==0&&e!==n.nodeValue.length}function Px(n,e,t){const{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:o}=n;sg&&(sg=!1,Tx(r,i)&&Tx(s,o)&&!ps)||En(e,(()=>{if(!t)return void ht(null);if(!sc(e,r,s))return;let l=H();if(ps&&B(l)&&l.isCollapsed()){const a=l.anchor,c=ps.anchor;(a.key===c.key&&a.offset===c.offset+1||a.offset===1&&c.getNode().is(a.getNode().getPreviousSibling()))&&(l=ps.clone(),ht(l))}if(ps=null,B(l)){const a=l.anchor,c=a.getNode();if(l.isCollapsed()){n.type==="Range"&&n.anchorNode===n.focusNode&&(l.dirty=!0);const u=Hn(e).event,h=u?u.timeStamp:performance.now(),[f,d,p,g,m]=Kk,x=Ve(),O=e.isComposing()===!1&&x.getTextContent()==="";if(h<m+200&&a.offset===p&&a.key===g)yu(l,f,d);else if(a.type==="text")G(c)||z(141),e2(l,c);else if(a.type==="element"&&!O){I(c)||z(259);const b=a.getNode();b.isEmpty()?(function(y,S){const k=S.getTextFormat(),w=S.getTextStyle();yu(y,k,w)})(l,b):yu(l,0,"")}}else{const u=a.key,h=l.focus.key,f=l.getNodes(),d=f.length,p=l.isBackward(),g=p?o:i,m=p?i:o,x=p?h:u,O=p?u:h;let b=x9,y=!1;for(let S=0;S<d;S++){const k=f[S],w=k.getTextContentSize();if(G(k)&&w!==0&&!(S===0&&k.__key===x&&g===w||S===d-1&&k.__key===O&&m===0)&&(y=!0,b&=k.getFormat(),b===0))break}l.format=y?b:0}}ae(e,dO,void 0)}))}function yu(n,e,t){n.format===e&&n.style===t||(n.format=e,n.style=t,n.dirty=!0)}function e2(n,e){yu(n,e.getFormat(),e.getStyle())}function t2(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function Ec(n,e){const t=n._compositionKey;if(Zt(null),t!==null&&e!=null){if(e===""){const r=rt(t),i=Qo(n.getElementByKey(t));return void(i!==null&&i.nodeValue!==null&&G(r)&&RO(r,i.nodeValue,null,null,!0))}if(e[e.length-1]===`
25
+ `){const r=H();if(B(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void ae(n,ba,null)}}}LO(!0,n,e)}function n2(n){let e=n.__lexicalEventHandles;return e===void 0&&(e=[],n.__lexicalEventHandles=e),e}const Oo=new Map;function r2(n){const e=OA(n.target);if(e===null)return;const t=AO(e.anchorNode);if(t===null)return;og&&(og=!1,En(t,(()=>{const a=Gs(),c=e.anchorNode;(st(c)||Ti(c))&&ht(CO(a,e,t,n))})));const r=MO(t),i=r[r.length-1],s=i._key,o=Oo.get(s),l=o||i;l!==t&&Px(e,l,!1),Px(e,t,!0),t!==i?Oo.set(s,t):o&&Oo.delete(s)}function Ex(n){n._lexicalHandled=!0}function Qx(n){return n._lexicalHandled===!0}function F9(n){const e=n.ownerDocument,t=th.get(e);if(t===void 0)return;const r=t-1;r>=0||z(164),th.set(e,r),r===0&&e.removeEventListener("selectionchange",r2);const i=kf(n);$O(i)?((function(o){if(o._parentEditor!==null){const l=MO(o),a=l[l.length-1]._key;Oo.get(a)===o&&Oo.delete(a)}else Oo.delete(o._key)})(i),n.__lexicalEditor=null):i&&z(198);const s=n2(n);for(let o=0;o<s.length;o++)s[o]();n.__lexicalEventHandles=[]}function lg(n,e,t){Vt();const r=n.__key,i=n.getParent();if(i===null)return;const s=(function(l){const a=H();if(!B(a)||!I(l))return a;const{anchor:c,focus:u}=a,h=c.getNode(),f=u.getNode();return hg(h,l)&&c.set(l.__key,0,"element"),hg(f,l)&&u.set(l.__key,0,"element"),a})(n);let o=!1;if(B(s)&&e){const l=s.anchor,a=s.focus;l.key===r&&(ih(l,n,i,n.getPreviousSibling(),n.getNextSibling()),o=!0),a.key===r&&(ih(a,n,i,n.getPreviousSibling(),n.getNextSibling()),o=!0)}else _t(s)&&e&&n.isSelected()&&n.selectPrevious();if(B(s)&&e&&!o){const l=n.getIndexWithinParent();Cs(n),rh(s,i,l,-1)}else Cs(n);t||Rt(i)||i.canBeEmpty()||!i.isEmpty()||lg(i,e),e&&s&&bt(i)&&i.isEmpty()&&i.selectEnd()}class Go{static getType(){const{ownNodeType:e}=Pf(this);return e===void 0&&z(64,this.name),e}static clone(e){z(65,this.name)}$config(){return{}}config(e,t){const r=t.extends||Object.getPrototypeOf(this.constructor);return Object.assign(t,{extends:r,type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),y2(this,e)}getType(){return this.__type}isInline(){z(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const t=rt(e);if(t===null)break;e=t.__parent}return!1}isSelected(e){const t=e||H();if(t==null)return!1;const r=t.getNodes().some((i=>i.__key===this.__key));if(G(this))return r;if(B(t)&&t.anchor.type==="element"&&t.focus.type==="element"){if(t.isCollapsed())return!1;const i=this.getParent();if(Ie(this)&&this.isInline()&&i){const s=t.isBackward()?t.focus:t.anchor;if(i.is(s.getNode())&&s.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),r=0;for(;t!==null;){if(this.is(t))return r;r++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:rt(e)}getParentOrThrow(){const e=this.getParent();return e===null&&z(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const t=e.getParent();if(Rt(t))return I(e)||e===this&&Ie(e)||z(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&z(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:rt(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(t===null)return e;let r=t.getFirstChild();for(;r!==null&&!r.is(this);)e.push(r),r=r.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:rt(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=I(this)?this:this.getParent(),r=I(e)?e:e.getParent(),i=t&&r?wu(t,r):null;return i?i.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const t=wu(this,e);return t!==null&&(t.type==="descendant"||(t.type==="branch"?M2(t)===-1:(t.type!=="same"&&t.type!=="ancestor"&&z(279),!1)))}isParentOf(e){const t=wu(this,e);return t!==null&&t.type==="ancestor"}getNodesBetween(e){const t=this.isBefore(e),r=[],i=new Set;let s=this;for(;s!==null;){const o=s.__key;if(i.has(o)||(i.add(o),r.push(s)),s===e)break;const l=I(s)?t?s.getFirstChild():s.getLastChild():null;if(l!==null){s=l;continue}const a=t?s.getNextSibling():s.getPreviousSibling();if(a!==null){s=a;continue}const c=s.getParentOrThrow();if(i.has(c.__key)||r.push(c),c===e)break;let u=null,h=c;do{if(h===null&&z(68),u=t?h.getNextSibling():h.getPreviousSibling(),h=h.getParent(),h===null)break;u!==null||i.has(h.__key)||r.push(h)}while(u===null);s=u}return t||r.reverse(),r}isDirty(){const e=lt()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){const e=rt(this.__key);return e===null&&z(113),e}getWritable(){Vt();const e=ns(),t=lt(),r=e._nodeMap,i=this.__key,s=this.getLatest(),o=t._cloneNotNeeded,l=H();if(l!==null&&l.setCachedNodes(null),o.has(i))return lh(s),s;const a=NO(s);return o.add(i),lh(a),r.set(i,a),a}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){z(70)}updateDOM(e,t,r){z(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){z(18,this.name)}updateFromJSON(e){return(function(t,r){const i=t.getWritable(),s=r.$;let o=s;for(const l of Nk(i).flatKeys)l in r&&(o!==void 0&&o!==s||(o={...s}),o[l]=r[l]);return(i.__state||o)&&Q9(t).updateFromJSON(o),i})(this,e)}static transform(){return null}remove(e){lg(this,!0,e)}replace(e,t){Vt();let r=H();r!==null&&(r=r.clone()),bd(this,e);const i=this.getLatest(),s=this.__key,o=e.__key,l=e.getWritable(),a=this.getParentOrThrow().getWritable(),c=a.__size;Cs(l);const u=i.getPreviousSibling(),h=i.getNextSibling(),f=i.__prev,d=i.__next,p=i.__parent;if(lg(i,!1,!0),u===null?a.__first=o:u.getWritable().__next=o,l.__prev=f,h===null?a.__last=o:h.getWritable().__prev=o,l.__next=d,l.__parent=p,a.__size=c,t&&(I(this)&&I(l)||z(139),this.getChildren().forEach((g=>{l.append(g)}))),B(r)){ht(r);const g=r.anchor,m=r.focus;g.key===s&&Lx(g,l),m.key===s&&Lx(m,l)}return Bi()===s&&Zt(o),l}insertAfter(e,t=!0){Vt(),bd(this,e);const r=this.getWritable(),i=e.getWritable(),s=i.getParent(),o=H();let l=!1,a=!1;if(s!==null){const d=e.getIndexWithinParent();if(Cs(i),B(o)){const p=s.__key,g=o.anchor,m=o.focus;l=g.type==="element"&&g.key===p&&g.offset===d+1,a=m.type==="element"&&m.key===p&&m.offset===d+1}}const c=this.getNextSibling(),u=this.getParentOrThrow().getWritable(),h=i.__key,f=r.__next;if(c===null?u.__last=h:c.getWritable().__prev=h,u.__size++,r.__next=h,i.__next=f,i.__prev=r.__key,i.__parent=r.__parent,t&&B(o)){const d=this.getIndexWithinParent();rh(o,u,d+1);const p=u.__key;l&&o.anchor.set(p,d+2,"element"),a&&o.focus.set(p,d+2,"element")}return e}insertBefore(e,t=!0){Vt(),bd(this,e);const r=this.getWritable(),i=e.getWritable(),s=i.__key;Cs(i);const o=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=r.__prev,c=this.getIndexWithinParent();o===null?l.__first=s:o.getWritable().__next=s,l.__size++,r.__prev=s,i.__prev=a,i.__next=r.__key,i.__parent=r.__parent;const u=H();return t&&B(u)&&rh(u,this.getParentOrThrow(),c),e}isParentRequired(){return!1}createParentElementNode(){return ze()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){Vt();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(I(r))return r.select();if(!G(r)){const s=r.getIndexWithinParent()+1;return i.select(s,s)}return r.select(e,t)}selectNext(e,t){Vt();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(I(r))return r.select(0,0);if(!G(r)){const s=r.getIndexWithinParent();return i.select(s,s)}return r.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}class ec extends Go{static getType(){return"linebreak"}static clone(e){return new ec(e.__key)}constructor(e){super(e)}getTextContent(){return`
26
+ `}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(t){const r=t.parentElement;if(r!==null&&ah(r)){const i=r.firstChild;if(i===t||i.nextSibling===t&&Qc(i)){const s=r.lastChild;if(s===t||s.previousSibling===t&&Qc(s))return!0}}return!1})(e)||(function(t){const r=t.parentElement;if(r!==null&&ah(r)){const i=r.firstChild;if(i===t||i.nextSibling===t&&Qc(i))return!1;const s=r.lastChild;if(s===t||s.previousSibling===t&&Qc(s))return!0}return!1})(e)?null:{conversion:X9,priority:0}}}static importJSON(e){return pr().updateFromJSON(e)}}function X9(n){return{node:pr()}}function pr(){return In(new ec)}function fr(n){return n instanceof ec}function Qc(n){return Ti(n)&&/^( |\t|\r?\n)+$/.test(n.textContent||"")}function pd(n,e){return 16&e?"code":e&sO?"mark":32&e?"sub":64&e?"sup":null}function gd(n,e){return 1&e?"strong":2&e?"em":"span"}function i2(n,e,t,r,i){const s=r.classList;let o=xo(i,"base");o!==void 0&&s.add(...o),o=xo(i,"underlineStrikethrough");let l=!1;const a=e&Hu&&e&Yu;o!==void 0&&(t&Hu&&t&Yu?(l=!0,a||s.add(...o)):a&&s.remove(...o));for(const c in As){const u=As[c];if(o=xo(i,c),o!==void 0)if(t&u){if(l&&(c==="underline"||c==="strikethrough")){e&u&&s.remove(...o);continue}e&u&&(!a||c!=="underline")&&c!=="strikethrough"||s.add(...o)}else e&u&&s.remove(...o)}}function s2(n,e,t){const r=e.firstChild,i=t.isComposing(),s=n+(i?af:"");if(r==null)e.textContent=s;else{const o=r.nodeValue;if(o!==s)if(i||Qs){const[l,a,c]=(function(u,h){const f=u.length,d=h.length;let p=0,g=0;for(;p<f&&p<d&&u[p]===h[p];)p++;for(;g+p<f&&g+p<d&&u[f-g-1]===h[d-g-1];)g++;return[p,f-p-g,h.slice(p,d-g)]})(o,s);a!==0&&r.deleteData(l,a),r.insertData(l,c)}else r.nodeValue=s}}function $x(n,e,t,r,i,s){s2(i,n,e);const o=s.theme.text;o!==void 0&&i2(0,0,r,n,o)}function $c(n,e){const t=document.createElement(e);return t.appendChild(n),t}class Jr extends Go{static getType(){return"text"}static clone(e){return new Jr(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return w9[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Bi()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=As[e];return!!(this.getFormat()&t)}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return oh(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){const r=this.__format,i=pd(0,r),s=gd(0,r),o=i===null?s:i,l=document.createElement(o);let a=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),i!==null&&(a=document.createElement(s),l.appendChild(a)),$x(a,this,0,r,this.__text,e);const c=this.__style;return c!==""&&(l.style.cssText=c),l}updateDOM(e,t,r){const i=this.__text,s=e.__format,o=this.__format,l=pd(0,s),a=pd(0,o),c=gd(0,s),u=gd(0,o);if((l===null?c:l)!==(a===null?u:a))return!0;if(l===a&&c!==u){const g=t.firstChild;g==null&&z(48);const m=document.createElement(u);return $x(m,this,0,o,i,r),t.replaceChild(m,g),!1}let h=t;a!==null&&l!==null&&(h=t.firstChild,h==null&&z(49)),s2(i,h,this);const f=r.theme.text;f!==void 0&&s!==o&&i2(0,s,o,h,f);const d=e.__style,p=this.__style;return d!==p&&(t.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:q9,priority:0}),b:()=>({conversion:W9,priority:0}),code:()=>({conversion:ri,priority:0}),em:()=>({conversion:ri,priority:0}),i:()=>({conversion:ri,priority:0}),mark:()=>({conversion:ri,priority:0}),s:()=>({conversion:ri,priority:0}),span:()=>({conversion:z9,priority:0}),strong:()=>({conversion:ri,priority:0}),sub:()=>({conversion:ri,priority:0}),sup:()=>({conversion:ri,priority:0}),u:()=>({conversion:ri,priority:0})}}static importJSON(e){return Ye().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return st(t)||z(132),t.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?t.style.textTransform="lowercase":this.hasFormat("uppercase")?t.style.textTransform="uppercase":this.hasFormat("capitalize")&&(t.style.textTransform="capitalize"),this.hasFormat("bold")&&(t=$c(t,"b")),this.hasFormat("italic")&&(t=$c(t,"i")),this.hasFormat("strikethrough")&&(t=$c(t,"s")),this.hasFormat("underline")&&(t=$c(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format=typeof e=="string"?As[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail=typeof e=="string"?y9[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=oh(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=S9[e];if(this.__mode===t)return this;const r=this.getWritable();return r.__mode=t,r}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){Vt();let r=e,i=t;const s=H(),o=this.getTextContent(),l=this.__key;if(typeof o=="string"){const a=o.length;r===void 0&&(r=a),i===void 0&&(i=a)}else r=0,i=0;if(!B(s))return a2(l,r,l,i,"text","text");{const a=Bi();a!==s.anchor.key&&a!==s.focus.key||Zt(l),s.setTextNodeRange(this,r,this,i)}return s}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,r,i){const s=this.getWritable(),o=s.__text,l=r.length;let a=e;a<0&&(a=l+a,a<0&&(a=0));const c=H();if(i&&B(c)){const h=e+l;c.setTextNodeRange(s,h,s,h)}const u=o.slice(0,a)+r+o.slice(a+t);return s.__text=u,s}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){Vt();const t=this.getLatest(),r=t.getTextContent();if(r==="")return[];const i=t.__key,s=Bi(),o=r.length;e.sort(((C,T)=>C-T)),e.push(o);const l=[],a=e.length;for(let C=0,T=0;C<o&&T<=a;T++){const $=e[T];$>C&&(l.push(r.slice(C,$)),C=$)}const c=l.length;if(c===1)return[t];const u=l[0],h=t.getParent();let f;const d=t.getFormat(),p=t.getStyle(),g=t.__detail;let m=!1,x=null,O=null;const b=H();if(B(b)){const[C,T]=b.isBackward()?[b.focus,b.anchor]:[b.anchor,b.focus];C.type==="text"&&C.key===i&&(x=C),T.type==="text"&&T.key===i&&(O=T)}t.isSegmented()?(f=Ye(u),f.__format=d,f.__style=p,f.__detail=g,f.__state=vx(t,f),m=!0):f=t.setTextContent(u);const y=[f];for(let C=1;C<c;C++){const T=Ye(l[C]);T.__format=d,T.__style=p,T.__detail=g,T.__state=vx(t,T);const $=T.__key;s===i&&Zt($),y.push(T)}const S=x?x.offset:null,k=O?O.offset:null;let w=0;for(const C of y){if(!x&&!O)break;const T=w+C.getTextContentSize();if(x!==null&&S!==null&&S<=T&&S>=w&&(x.set(C.getKey(),S-w,"text"),S<T&&(x=null)),O!==null&&k!==null&&k<=T&&k>=w){O.set(C.getKey(),k-w,"text");break}w=T}if(h!==null){(function($){const D=$.getPreviousSibling(),M=$.getNextSibling();D!==null&&lh(D),M!==null&&lh(M)})(this);const C=h.getWritable(),T=this.getIndexWithinParent();m?(C.splice(T,0,y),this.remove()):C.splice(T,1,y),B(b)&&rh(b,h,T,c-1)}return y}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||z(50);const r=this.__key,i=e.__key,s=this.__text,o=s.length;Bi()===i&&Zt(r);const l=H();if(B(l)){const h=l.anchor,f=l.focus;h!==null&&h.key===i&&Bx(h,t,r,e,o),f!==null&&f.key===i&&Bx(f,t,r,e,o)}const a=e.__text,c=t?a+s:s+a;this.setTextContent(c);const u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}}function z9(n){return{forChild:wO(n.style),node:null}}function W9(n){const e=n,t=e.style.fontWeight==="normal";return{forChild:wO(e.style,t?void 0:"bold"),node:null}}const Ax=new WeakMap;function j9(n){if(!st(n))return!1;if(n.nodeName==="PRE")return!0;const e=n.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function q9(n){const e=n;n.parentElement===null&&z(129);let t=e.textContent||"";if((function(r){let i,s=r.parentNode;const o=[r];for(;s!==null&&(i=Ax.get(s))===void 0&&!j9(s);)o.push(s),s=s.parentNode;const l=i===void 0?s:i;for(let a=0;a<o.length;a++)Ax.set(o[a],l);return l})(e)!==null){const r=t.split(/(\r?\n|\t)/),i=[],s=r.length;for(let o=0;o<s;o++){const l=r[o];l===`
27
+ `||l===`\r
28
+ `?i.push(pr()):l===" "?i.push(Ko()):l!==""&&i.push(Ye(l))}return{node:i}}if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){let r=e,i=!0;for(;r!==null&&(r=Mx(r,!1))!==null;){const s=r.textContent||"";if(s.length>0){/[ \t\n]$/.test(s)&&(t=t.slice(1)),i=!1;break}}i&&(t=t.slice(1))}if(t[t.length-1]===" "){let r=e,i=!0;for(;r!==null&&(r=Mx(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:Ye(t)}}function Mx(n,e){let t=n;for(;;){let r;for(;(r=e?t.nextSibling:t.previousSibling)===null;){const s=t.parentElement;if(s===null)return null;t=s}if(t=r,st(t)){const s=t.style.display;if(s===""&&!pg(t)||s!==""&&!s.startsWith("inline"))return null}let i=t;for(;(i=e?t.firstChild:t.lastChild)!==null;)t=i;if(Ti(t))return t;if(t.nodeName==="BR")return null}}const Y9={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function ri(n){const e=Y9[n.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:wO(n.style,e),node:null}}function Ye(n=""){return In(new Jr(n))}function G(n){return n instanceof Jr}function wO(n,e){const t=n.fontWeight,r=n.textDecoration.split(" "),i=t==="700"||t==="bold",s=r.includes("line-through"),o=n.fontStyle==="italic",l=r.includes("underline"),a=n.verticalAlign;return c=>(G(c)&&(i&&!c.hasFormat("bold")&&c.toggleFormat("bold"),s&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),o&&!c.hasFormat("italic")&&c.toggleFormat("italic"),l&&!c.hasFormat("underline")&&c.toggleFormat("underline"),a!=="sub"||c.hasFormat("subscript")||c.toggleFormat("subscript"),a!=="super"||c.hasFormat("superscript")||c.toggleFormat("superscript"),e&&!c.hasFormat(e)&&c.toggleFormat(e)),c)}class tc extends Jr{static getType(){return"tab"}static clone(e){return new tc(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){const t=super.createDOM(e),r=xo(e.theme,"tab");return r!==void 0&&t.classList.add(...r),t}static importJSON(e){return Ko().updateFromJSON(e)}setTextContent(e){return e!==" "&&e!==""&&z(126),super.setTextContent(" ")}spliceText(e,t,r,i){return r===""&&t===0||r===" "&&t===1||z(286),this}setDetail(e){return e!==2&&z(127),this}setMode(e){return e!=="normal"&&z(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Ko(){return In(new tc)}function mf(n){return n instanceof tc}class H9{constructor(e,t,r){this._selection=null,this.key=e,this.offset=t,this.type=r}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:A2(An(Ur(this,"next")),An(Ur(e,"next")))<0}getNode(){const e=rt(this.key);return e===null&&z(20),e}set(e,t,r,i){const s=this._selection,o=this.key;i&&this.key===e&&this.offset===t&&this.type===r||(this.key=e,this.offset=t,this.type=r,rc()||(Bi()===o&&Zt(e),s!==null&&(s.setCachedNodes(null),s.dirty=!0)))}}function qr(n,e,t){return new H9(n,e,t)}function md(n,e){let t=e.__key,r=n.offset,i="element";if(G(e)){i="text";const s=e.getTextContentSize();r>s&&(r=s)}else if(!I(e)){const s=e.getNextSibling();if(G(s))t=s.__key,r=0,i="text";else{const o=e.getParent();o&&(t=o.__key,r=e.getIndexWithinParent()+1)}}n.set(t,r,i)}function Lx(n,e){if(I(e)){const t=e.getLastDescendant();I(t)||G(t)?md(n,t):md(n,e)}else md(n,e)}class Of{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!_t(e))return!1;const t=this._nodes,r=e._nodes;return t.size===r.size&&Array.from(t).every((i=>r.has(i)))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new Of(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),r=t.length,i=t[r-1];let s;if(G(i))s=i.select();else{const o=i.getIndexWithinParent()+1;s=i.getParentOrThrow().select(o,o)}s.insertNodes(e);for(let o=0;o<r;o++)t[o].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const t=this._nodes,r=[];for(const i of t){const s=rt(i);s!==null&&r.push(s)}return rc()||(this._cachedNodes=r),r}getTextContent(){const e=this.getNodes();let t="";for(let r=0;r<e.length;r++)t+=e[r].getTextContent();return t}deleteNodes(){const e=this.getNodes();if((H()||Gs())===this&&e[0]){const t=vt(e[0],"next");L2(Hi(t,t))}for(const t of e)t.remove()}}function B(n){return n instanceof Us}class Us{constructor(e,t,r,i){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!B(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const t=(function(r){const i=[],[s,o]=r.getTextSlices();s&&i.push(s.caret.origin);const l=new Set,a=new Set;for(const c of r)if(jn(c)){const{origin:u}=c;i.length===0?l.add(u):(a.add(u),i.push(u))}else{const{origin:u}=c;I(u)&&a.has(u)||i.push(u)}if(o&&i.push(o.caret.origin),$o(r.focus)&&I(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let c=Un(r.focus.origin,"previous");jn(c)&&l.has(c.origin)&&!c.origin.isEmpty()&&c.origin.is(i[i.length-1]);c=Ef(c))l.delete(c.origin),i.pop();for(;i.length>1;){const c=i[i.length-1];if(!I(c)||a.has(c)||c.isEmpty()||l.has(c))break;i.pop()}if(i.length===0&&r.isCollapsed()){const c=An(r.anchor),u=An(r.anchor.getFlipped()),h=d=>zr(d)?d.origin:d.getNodeAtCaret(),f=h(c)||h(u)||(r.anchor.getNodeAtCaret()?c.origin:u.origin);i.push(f)}return i})(I2(lb(this),"next"));return rc()||(this._cachedNodes=t),t}setTextNodeRange(e,t,r,i){this.anchor.set(e.__key,t,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const t=e[0],r=e[e.length-1],i=this.anchor,s=this.focus,o=i.isBefore(s),[l,a]=ag(this);let c="",u=!0;for(let h=0;h<e.length;h++){const f=e[h];if(I(f)&&!f.isInline())u||(c+=`
29
+ `),u=!f.isEmpty();else if(u=!1,G(f)){let d=f.getTextContent();f===t?f===r?i.type==="element"&&s.type==="element"&&s.offset!==i.offset||(d=l<a?d.slice(l,a):d.slice(a,l)):d=o?d.slice(l):d.slice(a):f===r&&(d=o?d.slice(0,a):d.slice(0,l)),c+=d}else!Ie(f)&&!fr(f)||f===r&&this.isCollapsed()||(c+=f.getTextContent())}return c}applyDOMRange(e){const t=lt(),r=t.getEditorState()._selection,i=l2(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,r);if(i===null)return;const[s,o]=i;this.anchor.set(s.key,s.offset,s.type,!0),this.focus.set(o.key,o.offset,o.type,!0),Ms(this)}clone(){const e=this.anchor,t=this.focus;return new Us(qr(e.key,e.offset,e.type),qr(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=oh(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=As[e];return!!(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),r=[],i=t.length;for(let s=0;s<i;s++){const o=t[s];o===`
30
+ `||o===`\r
31
+ `?r.push(pr()):o===" "?r.push(Ko()):r.push(Ye(o))}this.insertNodes(r)}insertText(e){const t=this.anchor,r=this.focus,i=this.format,s=this.style;let o=t,l=r;!this.isCollapsed()&&r.isBefore(t)&&(o=r,l=t),o.type==="element"&&(function(m,x,O,b){const y=m.getNode(),S=y.getChildAtIndex(m.offset),k=Ye();if(k.setFormat(O),k.setStyle(b),vf(S))S.splice(0,0,[k]);else{const w=bt(y)?ze().append(k):k;S===null?y.append(w):S.insertBefore(w)}m.is(x)&&x.set(k.__key,0,"text"),m.set(k.__key,0,"text")})(o,l,i,s),l.type==="element"&&Zs(l,An(Ur(l,"next")));const a=o.offset;let c=l.offset;const u=this.getNodes(),h=u.length;let f=u[0];G(f)||z(26);const d=f.getTextContent().length,p=f.getParentOrThrow();let g=u[h-1];if(h===1&&l.type==="element"&&(c=d,l.set(o.key,c,"text")),this.isCollapsed()&&a===d&&(ci(f)||!f.canInsertTextAfter()||!p.canInsertTextAfter()&&f.getNextSibling()===null)){let m=f.getNextSibling();if(G(m)&&m.canInsertTextBefore()&&!ci(m)||(m=Ye(),m.setFormat(i),m.setStyle(s),p.canInsertTextAfter()?f.insertAfter(m):p.insertAfter(m)),m.select(0,0),f=m,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&a===0&&(ci(f)||!f.canInsertTextBefore()||!p.canInsertTextBefore()&&f.getPreviousSibling()===null)){let m=f.getPreviousSibling();if(G(m)&&!ci(m)||(m=Ye(),m.setFormat(i),p.canInsertTextBefore()?f.insertBefore(m):p.insertBefore(m)),m.select(),f=m,e!=="")return void this.insertText(e)}else if(f.isSegmented()&&a!==d){const m=Ye(f.getTextContent());m.setFormat(i),f.replace(m),f=m}else if(!this.isCollapsed()&&e!==""){const m=g.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||I(m)&&(!m.canInsertTextBefore()||!m.canInsertTextAfter()))return this.insertText(""),o2(this.anchor,this.focus,null),void this.insertText(e)}if(h===1){if(ks(f)){const b=Ye(e);return b.select(),void f.replace(b)}const m=f.getFormat(),x=f.getStyle();if(a!==c||m===i&&x===s){if(mf(f)){const b=Ye(e);return b.setFormat(i),b.setStyle(s),b.select(),void f.replace(b)}}else{if(f.getTextContent()!==""){const b=Ye(e);if(b.setFormat(i),b.setStyle(s),b.select(),a===0)f.insertBefore(b,!1);else{const[y]=f.splitText(a);y.insertAfter(b,!1)}return void(b.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length))}f.setFormat(i),f.setStyle(s)}const O=c-a;f=f.spliceText(a,O,e,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(f.isComposing()?this.anchor.offset-=e.length:(this.format=m,this.style=x))}else{const m=new Set([...f.getParentKeys(),...g.getParentKeys()]),x=I(f)?f:f.getParentOrThrow();let O=I(g)?g:g.getParentOrThrow(),b=g;if(!x.is(O)&&O.isInline())do b=O,O=O.getParentOrThrow();while(O.isInline());if(l.type==="text"&&(c!==0||g.getTextContent()==="")||l.type==="element"&&g.getIndexWithinParent()<c)if(G(g)&&!ks(g)&&c!==g.getTextContentSize()){if(g.isSegmented()){const C=Ye(g.getTextContent());g.replace(C),g=C}bt(l.getNode())||l.type!=="text"||(g=g.spliceText(0,c,"")),m.add(g.__key)}else{const C=g.getParentOrThrow();C.canBeEmpty()||C.getChildrenSize()!==1?g.remove():C.remove()}else m.add(g.__key);const y=O.getChildren(),S=new Set(u),k=x.is(O),w=x.isInline()&&f.getNextSibling()===null?x:f;for(let C=y.length-1;C>=0;C--){const T=y[C];if(T.is(f)||I(T)&&T.isParentOf(f))break;T.isAttached()&&(!S.has(T)||T.is(b)?k||w.insertAfter(T,!1):T.remove())}if(!k){let C=O,T=null;for(;C!==null;){const $=C.getChildren(),D=$.length;(D===0||$[D-1].is(T))&&(m.delete(C.__key),T=C),C=C.getParent()}}if(ks(f))if(a===d)f.select();else{const C=Ye(e);C.select(),f.replace(C)}else f=f.spliceText(a,d-a,e,!0),f.getTextContent()===""?f.remove():f.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);for(let C=1;C<h;C++){const T=u[C],$=T.__key;m.has($)||T.remove()}}}removeText(){const e=H()===this;ku(this,PA(lb(this))),e&&H()!==this&&ht(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void Zt(null);const r=this.getNodes(),i=[];for(const y of r)G(y)&&i.push(y);const s=y=>{r.forEach((S=>{if(I(S)){const k=S.getFormatFlags(e,y);S.setTextFormat(k)}}))},o=i.length;if(o===0)return this.toggleFormat(e),Zt(null),void s(t);const l=this.anchor,a=this.focus,c=this.isBackward(),u=c?a:l,h=c?l:a;let f=0,d=i[0],p=u.type==="element"?0:u.offset;if(u.type==="text"&&p===d.getTextContentSize()&&(f=1,d=i[1],p=0),d==null)return;const g=d.getFormatFlags(e,t);s(g);const m=o-1;let x=i[m];const O=h.type==="text"?h.offset:x.getTextContentSize();if(d.is(x)){if(p===O)return;if(ci(d)||p===0&&O===d.getTextContentSize())d.setFormat(g);else{const y=d.splitText(p,O),S=p===0?y[0]:y[1];S.setFormat(g),u.type==="text"&&u.set(S.__key,0,"text"),h.type==="text"&&h.set(S.__key,O-p,"text")}return void(this.format=g)}p===0||ci(d)||([,d]=d.splitText(p),p=0),d.setFormat(g);const b=x.getFormatFlags(e,g);O>0&&(O===x.getTextContentSize()||ci(x)||([x]=x.splitText(O)),x.setFormat(b));for(let y=f+1;y<m;y++){const S=i[y],k=S.getFormatFlags(e,b);S.setFormat(k)}u.type==="text"&&u.set(d.__key,p,"text"),h.type==="text"&&h.set(x.__key,O,"text"),this.format=g|b}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const p=H();return B(p)||z(134),p.insertNodes(e)}const t=(this.isBackward()?this.focus:this.anchor).getNode(),r=vd(t,Bn),i=e[e.length-1];if(I(r)&&"__language"in r){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const p=Od(this);r.splice(p,0,e),i.selectEnd()}return}if(!e.some((p=>(I(p)||Ie(p))&&!p.isInline()))){I(r)||z(211,t.constructor.name,t.getType());const p=Od(this);return r.splice(p,0,e),void i.selectEnd()}const s=(function(p){const g=ze();let m=null;for(let x=0;x<p.length;x++){const O=p[x],b=fr(O);if(b||Ie(O)&&O.isInline()||I(O)&&O.isInline()||G(O)||O.isParentRequired()){if(m===null&&(m=O.createParentElementNode(),g.append(m),b))continue;m!==null&&m.append(O)}else g.append(O),m=null}return g})(e),o=s.getLastDescendant(),l=s.getChildren(),a=!I(r)||!r.isEmpty()?this.insertParagraph():null,c=l[l.length-1];let u=l[0];var h;I(h=u)&&Bn(h)&&!h.isEmpty()&&I(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(I(r)||z(211,t.constructor.name,t.getType()),r.append(...u.getChildren()),u=l[1]),u&&(r===null&&z(212,t.constructor.name,t.getType()),(function(p,g,m){const x=g.getParentOrThrow().getLastChild();let O=g;const b=[g];for(;O!==x;)O.getNextSibling()||z(140),O=O.getNextSibling(),b.push(O);let y=p;for(const S of b)y=y.insertAfter(S)})(r,u));const f=vd(o,Bn);a&&I(f)&&(a.canMergeWhenEmpty()||Bn(c))&&(f.append(...a.getChildren()),a.remove()),I(r)&&r.isEmpty()&&r.remove(),o.selectEnd();const d=I(r)?r.getLastChild():null;fr(d)&&f!==r&&d.remove()}insertParagraph(){if(this.anchor.key==="root"){const o=ze();return Ve().splice(this.anchor.offset,0,[o]),o.select(),o}const e=Od(this),t=vd(this.anchor.getNode(),Bn);I(t)||z(213);const r=t.getChildAtIndex(e),i=r?[r,...r.getNextSiblings()]:[],s=t.insertNewAfter(this,!1);return s?(s.append(...i),s.selectStart(),s):null}insertLineBreak(e){const t=pr();if(this.insertNodes([t]),e){const r=t.getParentOrThrow(),i=t.getIndexWithinParent();r.select(i,i)}}extract(){const e=this.getNodes(),t=e.length,r=t-1,i=this.anchor,s=this.focus;let o=e[0],l=e[r];const[a,c]=ag(this);if(t===0)return[];if(t===1){if(G(o)&&!this.isCollapsed()){const h=a>c?c:a,f=a>c?a:c,d=o.splitText(h,f),p=h===0?d[0]:d[1];return p!=null?[p]:[]}return[o]}const u=i.isBefore(s);if(G(o)){const h=u?a:c;h===o.getTextContentSize()?e.shift():h!==0&&([,o]=o.splitText(h),e[0]=o)}if(G(l)){const h=l.getTextContent().length,f=u?c:a;f===0?e.pop():f!==h&&([l]=l.splitText(f),e[r]=l)}return e}modify(e,t,r){if(Fx(this,e,t,r))return;const i=e==="move",s=lt(),o=gr(Hn(s));if(!o)return;const l=s._blockCursorElement,a=s._rootElement,c=this.focus.getNode();if(a===null||l===null||!I(c)||c.isInline()||c.canBeEmpty()||fg(l,s,a),this.dirty){let u=Is(s,this.anchor.key),h=Is(s,this.focus.key);this.anchor.type==="text"&&(u=Qo(u)),this.focus.type==="text"&&(h=Qo(h)),u&&h&&c2(o,u,this.anchor.offset,h,this.focus.offset)}if((function(u,h,f,d){u.modify(h,f,d)})(o,e,t?"backward":"forward",r),o.rangeCount>0){const u=o.getRangeAt(0),h=this.anchor.getNode(),f=bt(h)?h:pA(h);if(this.applyDOMRange(u),this.dirty=!0,!i){const d=this.getNodes(),p=[];let g=!1;for(let m=0;m<d.length;m++){const x=d[m];hg(x,f)?p.push(x):g=!0}if(g&&p.length>0)if(t){const m=p[0];I(m)?m.selectStart():m.getParentOrThrow().selectStart()}else{const m=p[p.length-1];I(m)?m.selectEnd():m.getParentOrThrow().selectEnd()}o.anchorNode===u.startContainer&&o.anchorOffset===u.startOffset||(function(m){const x=m.focus,O=m.anchor,b=O.key,y=O.offset,S=O.type;O.set(x.key,x.offset,x.type,!0),x.set(b,y,S,!0)})(this)}}r==="lineboundary"&&Fx(this,e,t,r,"decorators")}forwardDeletion(e,t,r){if(!r&&(e.type==="element"&&I(t)&&e.offset===t.getChildrenSize()||e.type==="text"&&e.offset===t.getTextContentSize())){const i=t.getParent(),s=t.getNextSibling()||(i===null?null:i.getNextSibling());if(I(s)&&s.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,e))return;const s=XO(Ur(r,e?"previous":"next"));if(s.getTextSlices().every((l=>l===null||l.distance===0))){let l={type:"initial"};for(const a of s.iterNodeCarets("shadowRoot"))if(jn(a)){if(!a.origin.isInline()){if(a.origin.isShadowRoot()){if(l.type==="merge-block")break;if(I(s.anchor.origin)&&s.anchor.origin.isEmpty()){const c=An(a);ku(this,Hi(c,c)),s.anchor.origin.remove()}return}l.type!=="merge-next-block"&&l.type!=="merge-block"||(l={block:l.block,caret:a,type:"merge-block"})}}else{if(l.type==="merge-block")break;if($o(a)){if(I(a.origin)){if(a.origin.isInline()){if(!a.origin.isParentOf(s.anchor.origin))break}else l={block:a.origin,type:"merge-next-block"};continue}if(Ie(a.origin)){if(!a.origin.isIsolated())if(l.type==="merge-next-block"&&(a.origin.isKeyboardSelectable()||!a.origin.isInline())&&I(s.anchor.origin)&&s.anchor.origin.isEmpty()){s.anchor.origin.remove();const c=kO();c.add(a.origin.getKey()),ht(c)}else a.origin.remove();return}break}}if(l.type==="merge-block"){const{caret:a,block:c}=l;return ku(this,Hi(!a.origin.isEmpty()&&c.isEmpty()?lc(vt(c,a.direction)):s.anchor,a)),this.removeText()}}const o=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&r.offset===0&&Ix(this,r.getNode()))return}else{const l=o.type==="text"?o.getNode():null;if(i=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){const a=o.offset,c=l.getTextContentSize();if(l.is(i)||e&&a!==c||!e&&a!==0)return void Dx(l,e,a)}else if(i!==null&&i.isSegmented()){const a=r.offset,c=i.getTextContentSize();if(i.is(l)||e&&a!==0||!e&&a!==c)return void Dx(i,e,a)}(function(a,c){const u=a.anchor,h=a.focus,f=u.getNode(),d=h.getNode();if(f===d&&u.type==="text"&&h.type==="text"){const p=u.offset,g=h.offset,m=p<g,x=m?p:g,O=m?g:p,b=O-1;x!==b&&(function(y){return!(k2(y)||U9(y))})(f.getTextContent().slice(x,O))&&(c?h.set(h.key,b,h.type):u.set(u.key,b,u.type))}})(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&bt(r.getParent())&&r.getPreviousSibling()===null&&Ix(this,r)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,r=t.getNode();if(this.forwardDeletion(t,r,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function _t(n){return n instanceof Of}function Rx(n){const e=n.offset;if(n.type==="text")return e;const t=n.getNode();return e===t.getChildrenSize()?t.getTextContent().length:0}function ag(n){const e=n.getStartEndPoints();if(e===null)return[0,0];const[t,r]=e;return t.type==="element"&&r.type==="element"&&t.key===r.key&&t.offset===r.offset?[0,0]:[Rx(t),Rx(r)]}function Ix(n,e){for(let t=e;t;t=t.getParent()){if(I(t)){if(t.collapseAtStart(n))return!0;if(Rt(t))break}if(t.getPreviousSibling())break}return!1}const U9=(()=>{try{const n=new RegExp("\\p{Emoji}","u"),e=n.test.bind(n);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function Dx(n,e,t){const r=n,i=r.getTextContent().split(/(?=\s)/g),s=i.length;let o=0,l=0;for(let c=0;c<s;c++){const u=c===s-1;if(l=o,o+=i[c].length,e&&o===t||o>t||u){i.splice(c,1),u&&(l=void 0);break}}const a=i.join("").trim();a===""?r.remove():(r.setTextContent(a),r.select(l,l))}function Nx(n,e,t,r){let i,s=e;if(st(n)){let o=!1;const l=n.childNodes,a=l.length,c=r._blockCursorElement;s===a&&(o=!0,s=a-1);let u=l[s],h=!1;if(u===c)u=l[s+1],h=!0;else if(c!==null){const f=c.parentNode;n===f&&e>Array.prototype.indexOf.call(f.children,c)&&s--}if(i=ao(u),G(i))s=Wr(i,o?"next":"previous");else{let f=ao(n);if(f===null)return null;if(I(f)){const d=r.getElementByKey(f.getKey());d===null&&z(214),[f,s]=f.getDOMSlot(d).resolveChildIndex(f,d,n,e),I(f)||z(215),o&&s>=f.getChildrenSize()&&(s=Math.max(0,f.getChildrenSize()-1));let g=f.getChildAtIndex(s);if(I(g)&&(function(m,x,O){const b=m.getParent();return O===null||b===null||!b.canBeEmpty()||b!==O.getNode()})(g,0,t)){const m=o?g.getLastDescendant():g.getFirstDescendant();m===null?f=g:(g=m,f=I(g)?g:g.getParentOrThrow()),s=0}G(g)?(i=g,f=null,s=Wr(g,o?"next":"previous")):g!==f&&o&&!h&&(I(f)||z(216),s=Math.min(f.getChildrenSize(),s+1))}else{const d=f.getIndexWithinParent();s=e===0&&Ie(f)&&ao(n)===f?d:d+1,f=f.getParentOrThrow()}if(I(f))return qr(f.__key,s,"element")}}else i=ao(n);return G(i)?qr(i.__key,Wr(i,s,"clamp"),"text"):null}function Vx(n,e,t){const r=n.offset,i=n.getNode();if(r===0){const s=i.getPreviousSibling(),o=i.getParent();if(e){if((t||!e)&&s===null&&I(o)&&o.isInline()){const l=o.getPreviousSibling();G(l)&&n.set(l.__key,l.getTextContent().length,"text")}}else I(s)&&!t&&s.isInline()?n.set(s.__key,s.getChildrenSize(),"element"):G(s)&&n.set(s.__key,s.getTextContent().length,"text")}else if(r===i.getTextContent().length){const s=i.getNextSibling(),o=i.getParent();if(e&&I(s)&&s.isInline())n.set(s.__key,0,"element");else if((t||e)&&s===null&&I(o)&&o.isInline()&&!o.canInsertTextAfter()){const l=o.getNextSibling();G(l)&&n.set(l.__key,0,"text")}}}function o2(n,e,t){if(n.type==="text"&&e.type==="text"){const r=n.isBefore(e),i=n.is(e);Vx(n,r,i),Vx(e,!r,i),i&&e.set(n.key,n.offset,n.type);const s=lt();if(s.isComposing()&&s._compositionKey!==n.key&&B(t)){const o=t.anchor,l=t.focus;n.set(o.key,o.offset,o.type,!0),e.set(l.key,l.offset,l.type,!0)}}}function l2(n,e,t,r,i,s){if(n===null||t===null||!sc(i,n,t))return null;const o=Nx(n,e,B(s)?s.anchor:null,i);if(o===null)return null;const l=Nx(t,r,B(s)?s.focus:null,i);if(l===null)return null;if(o.type==="element"&&l.type==="element"){const a=ao(n),c=ao(t);if(Ie(a)&&Ie(c))return null}return o2(o,l,s),[o,l]}function nh(n){return I(n)&&!n.isInline()}function a2(n,e,t,r,i,s){const o=ns(),l=new Us(qr(n,e,i),qr(t,r,s),0,"");return l.dirty=!0,o._selection=l,l}function nc(){const n=qr("root",0,"element"),e=qr("root",0,"element");return new Us(n,e,0,"")}function kO(){return new Of(new Set)}function CO(n,e,t,r){const i=t._window;if(i===null)return null;const s=r||i.event,o=s?s.type:void 0,l=o==="selectionchange",a=!Wp&&(l||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&s&&s.detail===3||o==="drop"||o===void 0);let c,u,h,f;if(B(n)&&!a)return n.clone();if(e===null)return null;if(c=e.anchorNode,u=e.focusNode,h=e.anchorOffset,f=e.focusOffset,l&&B(n)&&!sc(t,c,u))return n.clone();const d=l2(c,h,u,f,t,n);if(d===null)return null;const[p,g]=d;return new Us(p,g,B(n)?n.format:0,B(n)?n.style:"")}function H(){return ns()._selection}function Gs(){return lt()._editorState._selection}function rh(n,e,t,r=1){const i=n.anchor,s=n.focus,o=i.getNode(),l=s.getNode();if(!e.is(o)&&!e.is(l))return;const a=e.__key;if(n.isCollapsed()){const c=i.offset;if(t<=c&&r>0||t<c&&r<0){const u=Math.max(0,c+r);i.set(a,u,"element"),s.set(a,u,"element"),Zx(n)}}else{const c=n.isBackward(),u=c?s:i,h=u.getNode(),f=c?i:s,d=f.getNode();if(e.is(h)){const p=u.offset;(t<=p&&r>0||t<p&&r<0)&&u.set(a,Math.max(0,p+r),"element")}if(e.is(d)){const p=f.offset;(t<=p&&r>0||t<p&&r<0)&&f.set(a,Math.max(0,p+r),"element")}}Zx(n)}function Zx(n){const e=n.anchor,t=e.offset,r=n.focus,i=r.offset,s=e.getNode(),o=r.getNode();if(n.isCollapsed()){if(!I(s))return;const l=s.getChildrenSize(),a=t>=l,c=a?s.getChildAtIndex(l-1):s.getChildAtIndex(t);if(G(c)){let u=0;a&&(u=c.getTextContentSize()),e.set(c.__key,u,"text"),r.set(c.__key,u,"text")}}else{if(I(s)){const l=s.getChildrenSize(),a=t>=l,c=a?s.getChildAtIndex(l-1):s.getChildAtIndex(t);if(G(c)){let u=0;a&&(u=c.getTextContentSize()),e.set(c.__key,u,"text")}}if(I(o)){const l=o.getChildrenSize(),a=i>=l,c=a?o.getChildAtIndex(l-1):o.getChildAtIndex(i);if(G(c)){let u=0;a&&(u=c.getTextContentSize()),r.set(c.__key,u,"text")}}}}function ih(n,e,t,r,i){let s=null,o=0,l=null;r!==null?(s=r.__key,G(r)?(o=r.getTextContentSize(),l="text"):I(r)&&(o=r.getChildrenSize(),l="element")):i!==null&&(s=i.__key,G(i)?l="text":I(i)&&(l="element")),s!==null&&l!==null?n.set(s,o,l):(o=e.getIndexWithinParent(),o===-1&&(o=t.getChildrenSize()),n.set(t.__key,o,"element"))}function Bx(n,e,t,r,i){n.type==="text"?n.set(t,n.offset+(e?0:i),"text"):n.offset>r.getIndexWithinParent()&&n.set(n.key,n.offset-1,"element")}function c2(n,e,t,r,i){try{n.setBaseAndExtent(e,t,r,i)}catch{}}function G9(n,e,t,r,i,s,o){const l=r.anchorNode,a=r.focusNode,c=r.anchorOffset,u=r.focusOffset,h=document.activeElement;if(i.has(g2)&&h!==s||h!==null&&QO(h))return;if(!B(e))return void(n!==null&&sc(t,l,a)&&r.removeAllRanges());const f=e.anchor,d=e.focus,p=f.key,g=d.key,m=Is(t,p),x=Is(t,g),O=f.offset,b=d.offset,y=e.format,S=e.style,k=e.isCollapsed();let w=m,C=x,T=!1;if(f.type==="text"){w=Qo(m);const j=f.getNode();T=j.getFormat()!==y||j.getStyle()!==S}else B(n)&&n.anchor.type==="text"&&(T=!0);var $,D,M,Q,F;if(d.type==="text"&&(C=Qo(x)),w!==null&&C!==null&&(k&&(n===null||T||B(n)&&(n.format!==y||n.style!==S))&&($=y,D=S,M=O,Q=p,F=performance.now(),Kk=[$,D,M,Q,F]),c!==O||u!==b||l!==w||a!==C||r.type==="Range"&&k||(h!==null&&s.contains(h)||s.focus({preventScroll:!0}),f.type==="element"))){if(c2(r,w,O,C,b),!i.has(rA)&&e.isCollapsed()&&s!==null&&s===document.activeElement){const j=B(e)&&e.anchor.type==="element"?w.childNodes[O]||null:r.rangeCount>0?r.getRangeAt(0):null;if(j!==null){let fe;if(j instanceof Text){const ee=document.createRange();ee.selectNode(j),fe=ee.getBoundingClientRect()}else fe=j.getBoundingClientRect();(function(ee,be,xe){const _e=P2(xe),Ze=DO(_e);if(_e===null||Ze===null)return;let{top:Te,bottom:Be}=be,Re=0,Le=0,$e=xe;for(;$e!==null;){const pe=$e===_e.body;if(pe)Re=0,Le=Hn(ee).innerHeight;else{const ge=$e.getBoundingClientRect();Re=ge.top,Le=ge.bottom}let he=0;if(Te<Re?he=-(Re-Te):Be>Le&&(he=Be-Le),he!==0)if(pe)Ze.scrollBy(0,he);else{const ge=$e.scrollTop;$e.scrollTop+=he;const Se=$e.scrollTop-ge;Te-=Se,Be-=Se}if(pe)break;$e=oc($e)}})(t,fe,s)}}sg=!0}}function xf(n){let e=H()||Gs();e===null&&(e=Ve().selectEnd()),e.insertNodes(n)}function Od(n){let e=n;n.isCollapsed()||e.removeText();const t=H();B(t)&&(e=t),B(e)||z(161);const r=e.anchor;let i=r.getNode(),s=r.offset;for(;!Bn(i);){const o=i;if([i,s]=K9(i,s),o.is(i))break}return s}function K9(n,e){const t=n.getParent();if(!t){const i=ze();return Ve().append(i),i.select(),[Ve(),0]}if(G(n)){const i=n.splitText(e);if(i.length===0)return[t,n.getIndexWithinParent()];const s=e===0?0:1;return[t,i[0].getIndexWithinParent()+s]}if(!I(n)||e===0)return[t,n.getIndexWithinParent()];const r=n.getChildAtIndex(e);if(r){const i=new Us(qr(n.__key,e,"element"),qr(n.__key,e,"element"),0,""),s=n.insertNewAfter(i);s&&s.append(r,...r.getNextSiblings())}return[t,n.getIndexWithinParent()+1]}function Fx(n,e,t,r,i="decorators-and-blocks"){if(e==="move"&&r==="character"&&!n.isCollapsed()){const[u,h]=t===n.isBackward()?[n.focus,n.anchor]:[n.anchor,n.focus];return h.set(u.key,u.offset,u.type),!0}const s=Ur(n.focus,t?"previous":"next"),o=r==="lineboundary",l=e==="move";let a=s,c=i==="decorators-and-blocks";if(!R2(a)){for(const u of a){c=!1;const{origin:h}=u;if(!Ie(h)||h.isIsolated()||(a=u,!o||!h.isInline()))break}if(c)for(const u of XO(s).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(jn(u))u.origin.isInline()||(a=u);else{if(I(u.origin))continue;Ie(u.origin)&&!u.origin.isInline()&&(a=u)}break}}if(a===s)return!1;if(l&&!o&&Ie(a.origin)&&a.origin.isKeyboardSelectable()){const u=kO();return u.add(a.origin.getKey()),ht(u),!0}return a=An(a),l&&Zs(n.anchor,a),Zs(n.focus,a),c||!o}let Qt=null,$t=null,bn=!1,xd=!1,vu=0;const Xx={characterData:!0,childList:!0,subtree:!0};function rc(){return bn||Qt!==null&&Qt._readOnly}function Vt(){bn&&z(13)}function u2(){vu>99&&z(14)}function ns(){return Qt===null&&z(195,h2()),Qt}function lt(){return $t===null&&z(196,h2()),$t}function h2(){let n=0;const e=new Set,t=Sf.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const s=kf(i);if($O(s))n++;else if(s){let o=String(s.constructor.version||"<0.17.1");o===t&&(o+=" (separately built, likely a bundler configuration issue)"),e.add(o)}}let r=` Detected on the page: ${n} compatible editor(s) with version ${t}`;return e.size&&(r+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),r}function J9(){return $t}function zx(n,e,t){const r=e.__type,i=x2(n,r);let s=t.get(r);s===void 0&&(s=Array.from(i.transforms),t.set(r,s));const o=s.length;for(let l=0;l<o&&(s[l](e),e.isAttached());l++);}function Wx(n,e){return n!==void 0&&n.__key!==e&&n.isAttached()}function f2(n,e){if(!e)return;const t=n._updateTags;let r=e;Array.isArray(e)||(r=[e]);for(const i of r)t.add(i)}function eA(n){return _O(n,lt()._nodes)}function _O(n,e){const t=n.type,r=e.get(t);r===void 0&&z(17,t);const i=r.klass;n.type!==i.getType()&&z(18,i.name);const s=i.importJSON(n),o=n.children;if(I(s)&&Array.isArray(o))for(let l=0;l<o.length;l++){const a=_O(o[l],e);s.append(a)}return s}function jx(n,e,t){const r=Qt,i=bn,s=$t;Qt=e,bn=!0,$t=n;try{return t()}finally{Qt=r,bn=i,$t=s}}function di(n,e){const t=n._pendingEditorState,r=n._rootElement,i=n._headless||r===null;if(t===null)return;const s=n._editorState,o=s._selection,l=t._selection,a=n._dirtyType!==$s,c=Qt,u=bn,h=$t,f=n._updating,d=n._observer;let p=null;if(n._pendingEditorState=null,n._editorState=t,!i&&a&&d!==null){$t=n,Qt=t,bn=!1,n._updating=!0;try{const k=n._dirtyType,w=n._dirtyElements,C=n._dirtyLeaves;d.disconnect(),p=M9(s,t,n,k,w,C)}catch(k){if(k instanceof Error&&n._onError(k),xd)throw k;return m2(n,null,r,t),Ik(n),n._dirtyType=Eo,xd=!0,di(n,s),void(xd=!1)}finally{d.observe(r,Xx),n._updating=f,Qt=c,bn=u,$t=h}}t._readOnly||(t._readOnly=!0);const g=n._dirtyLeaves,m=n._dirtyElements,x=n._normalizedNodes,O=n._updateTags,b=n._deferred;a&&(n._dirtyType=$s,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements=new Map,n._normalizedNodes=new Set,n._updateTags=new Set),(function(k,w){const C=k._decorators;let T=k._pendingDecorators||C;const $=w._nodeMap;let D;for(D in T)$.has(D)||(T===C&&(T=S2(k)),delete T[D])})(n,t);const y=i?null:gr(Hn(n));if(n._editable&&y!==null&&(a||l===null||l.dirty)&&r!==null&&!O.has(iA)){$t=n,Qt=t;try{if(d!==null&&d.disconnect(),a||l===null||l.dirty){const k=n._blockCursorElement;k!==null&&fg(k,n,r),G9(o,l,n,y,O,r)}(function(k,w,C){let T=k._blockCursorElement;if(B(C)&&C.isCollapsed()&&C.anchor.type==="element"&&w.contains(document.activeElement)){const $=C.anchor,D=$.getNode(),M=$.offset;let Q=!1,F=null;if(M===D.getChildrenSize())yd(D.getChildAtIndex(M-1))&&(Q=!0);else{const j=D.getChildAtIndex(M);if(j!==null&&yd(j)){const fe=j.getPreviousSibling();(fe===null||yd(fe))&&(Q=!0,F=k.getElementByKey(j.__key))}}if(Q){const j=k.getElementByKey(D.__key);return T===null&&(k._blockCursorElement=T=(function(fe){const ee=fe.theme,be=document.createElement("div");be.contentEditable="false",be.setAttribute("data-lexical-cursor","true");let xe=ee.blockCursor;if(xe!==void 0){if(typeof xe=="string"){const _e=$k(xe);xe=ee.blockCursor=_e}xe!==void 0&&be.classList.add(...xe)}return be})(k._config)),w.style.caretColor="transparent",void(F===null?j.appendChild(T):j.insertBefore(T,F))}}T!==null&&fg(T,k,w)})(n,r,l)}finally{d!==null&&d.observe(r,Xx),$t=h,Qt=c}}p!==null&&(function(k,w,C,T,$){const D=Array.from(k._listeners.mutation),M=D.length;for(let Q=0;Q<M;Q++){const[F,j]=D[Q];for(const fe of j){const ee=w.get(fe);ee!==void 0&&F(ee,{dirtyLeaves:T,prevEditorState:$,updateTags:C})}}})(n,p,O,g,s),B(l)||l===null||o!==null&&o.is(l)||n.dispatchCommand(dO,void 0);const S=n._pendingDecorators;S!==null&&(n._decorators=S,n._pendingDecorators=null,Yl("decorator",n,!0,S)),(function(k,w,C){const T=Gx(w),$=Gx(C);T!==$&&Yl("textcontent",k,!0,$)})(n,e||s,t),Yl("update",n,!0,{dirtyElements:m,dirtyLeaves:g,editorState:t,mutatedNodes:p,normalizedNodes:x,prevEditorState:e||s,tags:O}),(function(k,w){if(k._deferred=[],w.length!==0){const C=k._updating;k._updating=!0;try{for(let T=0;T<w.length;T++)w[T]()}finally{k._updating=C}}})(n,b),(function(k){const w=k._updates;if(w.length!==0){const C=w.shift();if(C){const[T,$]=C;bf(k,T,$)}}})(n)}function Yl(n,e,t,...r){const i=e._updating;e._updating=t;try{const s=Array.from(e._listeners[n]);for(let o=0;o<s.length;o++)s[o].apply(null,r)}finally{e._updating=i}}function qx(n,e){const t=n._updates;let r=e||!1;for(;t.length!==0;){const i=t.shift();if(i){const[s,o]=i,l=n._pendingEditorState;let a;o!==void 0&&(a=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete&&(l===null&&z(191),l._flushSync=!0),a&&n._deferred.push(a),f2(n,o.tag)),l==null?bf(n,s,o):s()}}return r}function bf(n,e,t){const r=n._updateTags;let i,s=!1,o=!1;t!==void 0&&(i=t.onUpdate,f2(n,t.tag),s=t.skipTransforms||!1,o=t.discrete||!1),i&&n._deferred.push(i);const l=n._editorState;let a=n._pendingEditorState,c=!1;(a===null||a._readOnly)&&(a=n._pendingEditorState=d2(a||l),c=!0),a._flushSync=o;const u=Qt,h=bn,f=$t,d=n._updating;Qt=a,bn=!1,n._updating=!0,$t=n;const p=n._headless||n.getRootElement()===null;EO(null);try{c&&(p?l._selection!==null&&(a._selection=l._selection.clone()):a._selection=(function(O,b){const y=O.getEditorState()._selection,S=gr(Hn(O));return B(y)||y==null?CO(y,S,O,b):y.clone()})(n,t&&t.event||null));const m=n._compositionKey;e(),s=qx(n,s),(function(O,b){const y=b.getEditorState()._selection,S=O._selection;if(B(S)){const k=S.anchor,w=S.focus;let C;if(k.type==="text"&&(C=k.getNode(),C.selectionTransform(y,S)),w.type==="text"){const T=w.getNode();C!==T&&T.selectionTransform(y,S)}}})(a,n),n._dirtyType!==$s&&(s?(function(O,b){const y=b._dirtyLeaves,S=O._nodeMap;for(const k of y){const w=S.get(k);G(w)&&w.isAttached()&&w.isSimpleText()&&!w.isUnmergeable()&&kx(w)}})(a,n):(function(O,b){const y=b._dirtyLeaves,S=b._dirtyElements,k=O._nodeMap,w=Bi(),C=new Map;let T=y,$=T.size,D=S,M=D.size;for(;$>0||M>0;){if($>0){b._dirtyLeaves=new Set;for(const Q of T){const F=k.get(Q);G(F)&&F.isAttached()&&F.isSimpleText()&&!F.isUnmergeable()&&kx(F),F!==void 0&&Wx(F,w)&&zx(b,F,C),y.add(Q)}if(T=b._dirtyLeaves,$=T.size,$>0){vu++;continue}}b._dirtyLeaves=new Set,b._dirtyElements=new Map,D.delete("root")&&D.set("root",!0);for(const Q of D){const F=Q[0],j=Q[1];if(S.set(F,j),!j)continue;const fe=k.get(F);fe!==void 0&&Wx(fe,w)&&zx(b,fe,C)}T=b._dirtyLeaves,$=T.size,D=b._dirtyElements,M=D.size,vu++}b._dirtyLeaves=y,b._dirtyElements=S})(a,n),qx(n),(function(O,b,y,S){const k=O._nodeMap,w=b._nodeMap,C=[];for(const[T]of S){const $=w.get(T);$!==void 0&&($.isAttached()||(I($)&&Mk($,T,k,w,C,S),k.has(T)||S.delete(T),C.push(T)))}for(const T of C)w.delete(T);for(const T of y){const $=w.get(T);$===void 0||$.isAttached()||(k.has(T)||y.delete(T),w.delete(T))}})(l,a,n._dirtyLeaves,n._dirtyElements)),m!==n._compositionKey&&(a._flushSync=!0);const x=a._selection;if(B(x)){const O=a._nodeMap,b=x.anchor.key,y=x.focus.key;O.get(b)!==void 0&&O.get(y)!==void 0||z(19)}else _t(x)&&x._nodes.size===0&&(a._selection=null)}catch(m){return m instanceof Error&&n._onError(m),n._pendingEditorState=l,n._dirtyType=Eo,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),void di(n)}finally{Qt=u,bn=h,$t=f,n._updating=d,vu=0}n._dirtyType!==$s||n._deferred.length>0||(function(m,x){const O=x.getEditorState()._selection,b=m._selection;if(b!==null){if(b.dirty||!b.is(O))return!0}else if(O!==null)return!0;return!1})(a,n)?a._flushSync?(a._flushSync=!1,di(n)):c&&aA((()=>{di(n)})):(a._flushSync=!1,c&&(r.clear(),n._deferred=[],n._pendingEditorState=null))}function En(n,e,t){$t===n&&t===void 0?e():bf(n,e,t)}class Hl{constructor(e,t,r){this.element=e,this.before=t||null,this.after=r||null}withBefore(e){return new Hl(this.element,e,this.after)}withAfter(e){return new Hl(this.element,this.before,e)}withElement(e){return this.element===e?this:new Hl(e,this.before,this.after)}insertChild(e){const t=this.before||this.getManagedLineBreak();return t!==null&&t.parentElement!==this.element&&z(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&z(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&z(224),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(e===null)this.removeManagedLineBreak();else{const t=e==="decorator"&&(Po||da);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const t=this.element,r=e.nodeName==="IMG"?e.nextSibling:null;r&&t.removeChild(r),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const t=this.getManagedLineBreak();if(t){if(e===(t.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,s=document.createElement("br");if(r.insertBefore(s,i),e){const o=document.createElement("img");o.setAttribute("data-lexical-linebreak","true"),o.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",o.alt="",r.insertBefore(o,s),r.__lexicalLineBreak=o}else r.__lexicalLineBreak=s}getFirstChildOffset(){let e=0;for(let t=this.after;t!==null;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,r,i){if(r===this.element){const a=this.getFirstChildOffset();return[e,Math.min(a+e.getChildrenSize(),Math.max(a,i))]}const s=Yx(t,r);s.push(i);const o=Yx(t,this.element);let l=e.getIndexWithinParent();for(let a=0;a<o.length;a++){const c=s[a],u=o[a];if(c===void 0||c<u)break;if(c>u){l+=1;break}}return[e.getParentOrThrow(),l]}}function Yx(n,e){const t=[];let r=e;for(;r!==n&&r!==null;r=r.parentNode){let i=0;for(let s=r.previousSibling;s!==null;s=s.previousSibling)i++;t.push(i)}return r!==n&&z(225),t.reverse()}class yn extends Go{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return v9[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const e=lt()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;t!==null;){if(G(t)&&e.push(t),I(t)){const r=t.getAllTextNodes();e.push(...r)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;I(e);){const t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;I(e);){const t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),r=t.length;if(e>=r){const s=t[r-1];return I(s)&&s.getLastDescendant()||s||null}const i=t[e];return I(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const e=this.getLatest().__first;return e===null?null:rt(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return e===null&&z(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return e===null?null:rt(e)}getLastChildOrThrow(){const e=this.getLastChild();return e===null&&z(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let r,i;if(e<t/2){for(r=this.getFirstChild(),i=0;r!==null&&i<=e;){if(i===e)return r;r=r.getNextSibling(),i++}return null}for(r=this.getLastChild(),i=t-1;r!==null&&i>=e;){if(i===e)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let e="";const t=this.getChildren(),r=t.length;for(let i=0;i<r;i++){const s=t[i];e+=s.getTextContent(),I(s)&&i!==r-1&&!s.isInline()&&(e+=bi)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),r=t.length;for(let i=0;i<r;i++){const s=t[i];e+=s.getTextContentSize(),I(s)&&i!==r-1&&!s.isInline()&&(e+=bi.length)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==""){const t=mx[e];return!!(this.getFormat()&t)}return!1}hasTextFormat(e){const t=As[e];return!!(this.getTextFormat()&t)}getFormatFlags(e,t){return oh(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){Vt();const r=H();let i=e,s=t;const o=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){const a=this.getFirstChild();if(G(a)||I(a))return a.select(0,0)}else if(!(e!==void 0&&e!==o||t!==void 0&&t!==o)){const a=this.getLastChild();if(G(a)||I(a))return a.select()}}i===void 0&&(i=o),s===void 0&&(s=o);const l=this.__key;return B(r)?(r.anchor.set(l,i,"element"),r.focus.set(l,s,"element"),r.dirty=!0,r):a2(l,i,l,s,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach((t=>t.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=e!==""?mx[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,r){const i=r.length,s=this.getChildrenSize(),o=this.getWritable();e+t<=s||z(226,String(e),String(t),String(s));const l=o.__key,a=[],c=[],u=this.getChildAtIndex(e+t);let h=null,f=s-t+i;if(e!==0)if(e===s)h=this.getLastChild();else{const p=this.getChildAtIndex(e);p!==null&&(h=p.getPreviousSibling())}if(t>0){let p=h===null?this.getFirstChild():h.getNextSibling();for(let g=0;g<t;g++){p===null&&z(100);const m=p.getNextSibling(),x=p.__key;Cs(p.getWritable()),c.push(x),p=m}}let d=h;for(let p=0;p<i;p++){const g=r[p];d!==null&&g.is(d)&&(h=d=d.getPreviousSibling());const m=g.getWritable();m.__parent===l&&f--,Cs(m);const x=g.__key;if(d===null)o.__first=x,m.__prev=null;else{const O=d.getWritable();O.__next=x,m.__prev=O.__key}g.__key===l&&z(76),m.__parent=l,a.push(x),d=g}if(e+t===s)d!==null&&(d.getWritable().__next=null,o.__last=d.__key);else if(u!==null){const p=u.getWritable();if(d!==null){const g=d.getWritable();p.__prev=d.__key,g.__next=u.__key}else p.__prev=null}if(o.__size=f,c.length){const p=H();if(B(p)){const g=new Set(c),m=new Set(a),{anchor:x,focus:O}=p;Hx(x,g,m)&&ih(x,x.getNode(),this,h,u),Hx(O,g,m)&&ih(O,O.getNode(),this,h,u),f!==0||this.canBeEmpty()||Rt(this)||this.remove()}}return o}getDOMSlot(e){return new Hl(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(st(t)){const r=this.getIndent();r>0&&(t.style.paddingInlineStart=40*r+"px");const i=this.getDirection();i&&(t.dir=i)}return{element:t}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),r=this.getTextStyle();return t!==0&&(e.textFormat=t),r!==""&&(e.textStyle=r),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){const r=this.getDOMSlot(e);let i=r.getFirstChild();for(let s=this.getFirstChild();s;s=s.getNextSibling()){const o=t.getElementByKey(s.getKey());o!==null&&(i==null?(r.insertChild(o),i=o):i!==o&&r.replaceChild(o,i),i=i.nextSibling)}}}function I(n){return n instanceof yn}function Hx(n,e,t){let r=n.getNode();for(;r;){const i=r.__key;if(e.has(i)&&!t.has(i))return!0;r=r.getParent()}return!1}class Jo extends Go{decorate(e,t){z(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ie(n){return n instanceof Jo}class ic extends yn{static getType(){return"root"}static clone(){return new ic}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){z(51)}getTextContent(){const e=this.__cachedText;return!rc()&&lt()._dirtyType!==$s||e===null?super.getTextContent():e}remove(){z(52)}replace(e){z(53)}insertBefore(e){z(54)}insertAfter(e){z(55)}updateDOM(e,t){return!1}splice(e,t,r){for(const i of r)I(i)||Ie(i)||z(282);return super.splice(e,t,r)}static importJSON(e){return Ve().updateFromJSON(e)}collapseAtStart(){return!0}}function bt(n){return n instanceof ic}function d2(n){return new yf(new Map(n._nodeMap))}function TO(){return new yf(new Map([["root",new ic]]))}function p2(n){const e=n.exportJSON(),t=n.constructor;if(e.type!==t.getType()&&z(130,t.name),I(n)){const r=e.children;Array.isArray(r)||z(59,t.name);const i=n.getChildren();for(let s=0;s<i.length;s++){const o=p2(i[s]);r.push(o)}}return e}class yf{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,t){return jx(t&&t.editor||null,this,e)}clone(e){const t=new yf(this._nodeMap,e===void 0?this._selection:e);return t._readOnly=!0,t}toJSON(){return jx(null,this,(()=>({root:p2(Ve())})))}}const sh="historic",tA="history-push",Su="history-merge",nA="paste",g2="collaboration",rA="skip-scroll-into-view",iA="skip-dom-selection";class PO extends yn{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class el extends yn{static getType(){return"paragraph"}static clone(e){return new el(e.__key)}createDOM(e){const t=document.createElement("p"),r=xo(e.theme,"paragraph");return r!==void 0&&t.classList.add(...r),t}updateDOM(e,t,r){return!1}static importDOM(){return{p:e=>({conversion:sA,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(st(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r)}return{element:t}}static importJSON(e){return ze().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,t){const r=ze();r.setTextFormat(e.format),r.setTextStyle(e.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,t),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||G(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function sA(n){const e=ze();return n.style&&(e.setFormat(n.style.textAlign),VO(n,e)),{node:e}}function ze(){return In(new el)}function vf(n){return n instanceof el}const Pe=0,Et=1,oA=3,Yr=4;function m2(n,e,t,r){const i=n._keyToDOMMap;i.clear(),n._editorState=TO(),n._pendingEditorState=r,n._compositionKey=null,n._dirtyType=$s,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),n._normalizedNodes=new Set,n._updateTags=new Set,n._updates=[],n._blockCursorElement=null;const s=n._observer;s!==null&&(s.disconnect(),n._observer=null),e!==null&&(e.textContent=""),t!==null&&(t.textContent="",i.set("root",t))}function O2(n){const e=n||{},t=J9(),r=e.theme||{},i=n===void 0?t:e.parentEditor||null,s=e.disableEvents||!1,o=TO(),l=e.namespace||(i!==null?i._config.namespace:C2()),a=e.editorState,c=[ic,Jr,ec,tc,el,PO,...e.nodes||[]],{onError:u,html:h}=e,f=e.editable===void 0||e.editable;let d;if(n===void 0&&t!==null)d=t._nodes;else{d=new Map;for(let g=0;g<c.length;g++){let m=c[g],x=null,O=null;if(typeof m!="function"){const w=m;m=w.replace,x=w.with,O=w.withKlass||null}const{ownNodeConfig:b}=Pf(m),y=m.getType(),S=m.transform(),k=new Set;b&&b.$transform&&k.add(b.$transform),S!==null&&k.add(S),d.set(y,{exportDOM:h&&h.export?h.export.get(m):void 0,klass:m,replace:x,replaceWithKlass:O,sharedNodeState:jp(c[g]),transforms:k})}}const p=new Sf(o,i,d,{disableEvents:s,namespace:l,theme:r},u||console.error,(function(g,m){const x=new Map,O=new Set,b=y=>{Object.keys(y).forEach((S=>{let k=x.get(S);k===void 0&&(k=[],x.set(S,k)),k.push(y[S])}))};return g.forEach((y=>{const S=y.klass.importDOM;if(S==null||O.has(S))return;O.add(S);const k=S.call(y.klass);k!==null&&b(k)})),m&&b(m),x})(d,h?h.import:void 0),f,n);return a!==void 0&&(p._pendingEditorState=a,p._dirtyType=Eo),p}class Sf{constructor(e,t,r,i,s,o,l,a){this._createEditorArgs=a,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=$s,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=C2(),this._onError=s,this._htmlConversions=o,this._editable=l,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,r){r===void 0&&z(35);const i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);const s=i.get(e);s===void 0&&z(36,String(e));const o=s[r];return o.add(t),()=>{o.delete(t),s.every((l=>l.size===0))&&i.delete(e)}}registerMutationListener(e,t,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,s=this._listeners.mutation;let o=s.get(t);o===void 0&&(o=new Set,s.set(t,o)),o.add(i);const l=r&&r.skipInitialization;return l!==void 0&&l||this.initializeMutationListener(t,i),()=>{o.delete(i),o.size===0&&s.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return t===void 0&&z(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const r=this._editorState,i=ib(r).get(t.getType());if(!i)return;const s=new Map;for(const o of i.keys())s.set(o,"created");s.size>0&&e(s,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const r=this.getRegisteredNode(e);return r.transforms.add(t),r}registerNodeTransform(e,t){const r=this.registerNodeTransformToKlass(e,t),i=[r],s=r.replaceWithKlass;if(s!=null){const o=this.registerNodeTransformToKlass(s,t);i.push(o)}return(function(o,l){const a=ib(o.getEditorState()),c=[];for(const u of l){const h=a.get(u);h&&c.push(h)}c.length!==0&&o.update((()=>{for(const u of c)for(const h of u.keys()){const f=rt(h);f&&f.markDirty()}}),o._pendingEditorState===null?{tag:Su}:void 0)})(this,i.map((o=>o.klass.getType()))),()=>{i.forEach((o=>o.transforms.delete(t)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return ae(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const r=xo(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,m2(this,t,e,i),t!==null&&(this._config.disableEvents||F9(t),r!=null&&t.classList.remove(...r)),e!==null){const s=DO(e),o=e.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=s,this._dirtyType=Eo,Ik(this),this._updateTags.add(Su),di(this),this._config.disableEvents||(function(l,a){const c=l.ownerDocument,u=th.get(c);(u===void 0||u<1)&&c.addEventListener("selectionchange",r2),th.set(c,(u||0)+1),l.__lexicalEditor=a;const h=n2(l);for(let f=0;f<ig.length;f++){const[d,p]=ig[f],g=typeof p=="function"?m=>{Qx(m)||(Ex(m),(a.isEditable()||d==="click")&&p(m,a))}:m=>{if(Qx(m))return;Ex(m);const x=a.isEditable();switch(d){case"cut":return x&&ae(a,yO,m);case"copy":return ae(a,gf,m);case"paste":return x&&ae(a,uf,m);case"dragstart":return x&&ae(a,Yk,m);case"dragover":return x&&ae(a,Hk,m);case"dragend":return x&&ae(a,N9,m);case"focus":return x&&ae(a,vO,m);case"blur":return x&&ae(a,SO,m);case"drop":return x&&ae(a,qk,m)}};l.addEventListener(d,g),h.push((()=>{l.removeEventListener(d,g)}))}})(e,this),r!=null&&e.classList.add(...r)}else this._window=null,this._updateTags.add(Su),di(this);Yl("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&z(38);let r=e;r._readOnly&&(r=d2(e),r._selection=e._selection?e._selection.clone():null),Rk(this);const i=this._pendingEditorState,s=this._updateTags,o=t!==void 0?t.tag:null;i===null||i.isEmpty()||(o!=null&&s.add(o),di(this)),this._pendingEditorState=r,this._dirtyType=Eo,this._dirtyElements.set("root",!1),this._compositionKey=null,o!=null&&s.add(o),this._updating||di(this)}parseEditorState(e,t){return(function(r,i,s){const o=TO(),l=Qt,a=bn,c=$t,u=i._dirtyElements,h=i._dirtyLeaves,f=i._cloneNotNeeded,d=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,Qt=o,bn=!1,$t=i,EO(null);try{const p=i._nodes;_O(r.root,p),s&&s(),o._readOnly=!0}catch(p){p instanceof Error&&i._onError(p)}finally{i._dirtyElements=u,i._dirtyLeaves=h,i._cloneNotNeeded=f,i._dirtyType=d,Qt=l,bn=a,$t=c}return o})(typeof e=="string"?JSON.parse(e):e,this,t)}read(e){return di(this),this.getEditorState().read(e,{editor:this})}update(e,t){(function(r,i,s){r._updating?r._updates.push([i,s]):bf(r,i,s)})(this,e,t)}focus(e,t={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),En(this,(()=>{const i=H(),s=Ve();i!==null?i.dirty||ht(i.clone()):s.getChildrenSize()!==0&&(t.defaultSelection==="rootStart"?s.selectStart():s.selectEnd()),fA("focus"),dA((()=>{r.removeAttribute("autocapitalize"),e&&e()}))})),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const t=gr(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Yl("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}Sf.version="0.35.0+prod.esm";let cg=null;function EO(n){cg=n}let lA=1;function x2(n,e){const t=wf(n,e);return t===void 0&&z(30,e),t}function wf(n,e){return n._nodes.get(e)}const aA=typeof queueMicrotask=="function"?queueMicrotask:n=>{Promise.resolve().then(n)};function Ux(n){return Ie(Hr(n))}function QO(n){const e=document.activeElement;if(!st(e))return!1;const t=e.nodeName;return Ie(Hr(n))&&(t==="INPUT"||t==="TEXTAREA"||e.contentEditable==="true"&&kf(e)==null)}function sc(n,e,t){const r=n.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(t)&&e!==null&&!QO(e)&&AO(e)===n}catch{return!1}}function $O(n){return n instanceof Sf}function AO(n){let e=n;for(;e!=null;){const t=kf(e);if($O(t))return t;e=oc(e)}return null}function kf(n){return n?n.__lexicalEditor:null}function ks(n){return mf(n)||n.isToken()}function ci(n){return ks(n)||n.isSegmented()}function Ti(n){return tl(n)&&n.nodeType===f9}function cA(n){return tl(n)&&n.nodeType===d9}function Qo(n){let e=n;for(;e!=null;){if(Ti(e))return e;e=e.firstChild}return null}function oh(n,e,t){const r=As[e];if(t!==null&&(n&r)==(t&r))return n;let i=n^r;return e==="subscript"?i&=-65:e==="superscript"?i&=-33:e==="lowercase"?(i&=-513,i&=-1025):e==="uppercase"?(i&=-257,i&=-1025):e==="capitalize"&&(i&=-257,i&=-513),i}function b2(n){return G(n)||fr(n)||Ie(n)}function y2(n,e){const t=(function(){const o=cg;return cg=null,o})();if((e=e||t&&t.__key)!=null)return void(n.__key=e);Vt(),u2();const r=lt(),i=ns(),s=""+lA++;i._nodeMap.set(s,n),I(n)?r._dirtyElements.set(s,!0):r._dirtyLeaves.add(s),r._cloneNotNeeded.add(s),r._dirtyType=Ak,n.__key=s}function Cs(n){const e=n.getParent();if(e!==null){const t=n.getWritable(),r=e.getWritable(),i=n.getPreviousSibling(),s=n.getNextSibling(),o=s!==null?s.__key:null,l=i!==null?i.__key:null,a=i!==null?i.getWritable():null,c=s!==null?s.getWritable():null;i===null&&(r.__first=o),s===null&&(r.__last=l),a!==null&&(a.__next=o),c!==null&&(c.__prev=l),t.__prev=null,t.__next=null,t.__parent=null,r.__size--}}function lh(n){u2();const e=n.getLatest(),t=e.__parent,r=ns(),i=lt(),s=r._nodeMap,o=i._dirtyElements;t!==null&&(function(a,c,u){let h=a;for(;h!==null;){if(u.has(h))return;const f=c.get(h);if(f===void 0)break;u.set(h,!1),h=f.__parent}})(t,s,o);const l=e.__key;i._dirtyType=Ak,I(n)?o.set(l,!0):i._dirtyLeaves.add(l)}function Zt(n){Vt();const e=lt(),t=e._compositionKey;if(n!==t){if(e._compositionKey=n,t!==null){const r=rt(t);r!==null&&r.getWritable()}if(n!==null){const r=rt(n);r!==null&&r.getWritable()}}}function Bi(){return rc()?null:lt()._compositionKey}function rt(n,e){const t=(e||ns())._nodeMap.get(n);return t===void 0?null:t}function v2(n,e){const t=Cf(n,lt());return t!==void 0?rt(t,e):null}function Cf(n,e){return n[`__lexicalKey_${e._key}`]}function Hr(n,e){let t=n;for(;t!=null;){const r=v2(t,e);if(r!==null)return r;t=oc(t)}return null}function S2(n){const e=n._decorators,t=Object.assign({},e);return n._pendingDecorators=t,t}function Gx(n){return n.read((()=>Ve().getTextContent()))}function Ve(){return w2(ns())}function w2(n){return n._nodeMap.get("root")}function ht(n){Vt();const e=ns();n!==null&&(n.dirty=!0,n.setCachedNodes(null)),e._selection=n}function ao(n){const e=lt(),t=(function(r,i){let s=r;for(;s!=null;){const o=Cf(s,i);if(o!==void 0)return o;s=oc(s)}return null})(n,e);return t===null?n===e.getRootElement()?rt("root"):null:rt(t)}function k2(n){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n)}function MO(n){const e=[];let t=n;for(;t!==null;)e.push(t),t=t._parentEditor;return e}function C2(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function _2(n){return Ti(n)?n.nodeValue:null}function LO(n,e,t){const r=gr(Hn(e));if(r===null)return;const i=r.anchorNode;let{anchorOffset:s,focusOffset:o}=r;if(i!==null){let l=_2(i);const a=Hr(i);if(l!==null&&G(a)){if(l===af&&t){const c=t.length;l=t,s=c,o=c}l!==null&&RO(a,l,s,o,n)}}}function RO(n,e,t,r,i){let s=n;if(s.isAttached()&&(i||!s.isDirty())){const o=s.isComposing();let l=e;(o||i)&&e[e.length-1]===af&&(l=e.slice(0,-1));const a=s.getTextContent();if(i||l!==a){if(l===""){if(Zt(null),da||Po||qu)s.remove();else{const g=lt();setTimeout((()=>{g.update((()=>{s.isAttached()&&s.remove()}))}),20)}return}const c=s.getParent(),u=Gs(),h=s.getTextContentSize(),f=Bi(),d=s.getKey();if(s.isToken()||f!==null&&d===f&&!o||B(u)&&(c!==null&&!c.canInsertTextBefore()&&u.anchor.offset===0||u.anchor.key===n.__key&&u.anchor.offset===0&&!s.canInsertTextBefore()&&!o||u.focus.key===n.__key&&u.focus.offset===h&&!s.canInsertTextAfter()&&!o))return void s.markDirty();const p=H();if(!B(p)||t===null||r===null)return void Kx(s,l,p);if(p.setTextNodeRange(s,t,s,r),s.isSegmented()){const g=Ye(s.getTextContent());s.replace(g),s=g}Kx(s,l,p)}}}function Kx(n,e,t){if(n.setTextContent(e),B(t)){const r=n.getKey();for(const i of["anchor","focus"]){const s=t[i];s.type==="text"&&s.key===r&&(s.offset=Wr(n,s.offset,"clamp"))}}}function Ac(n,e,t){const r=e[t]||!1;return r==="any"||r===n[t]}function uA(n,e){return Ac(n,e,"altKey")&&Ac(n,e,"ctrlKey")&&Ac(n,e,"shiftKey")&&Ac(n,e,"metaKey")}function Xe(n,e,t){return uA(n,t)&&n.key.toLowerCase()===e.toLowerCase()}const ai={ctrlKey:!$r,metaKey:$r},Jx={altKey:$r,ctrlKey:!$r};function eb(n){return n.key==="Backspace"}function tb(n){return Xe(n,"a",ai)}function hA(n){const e=Ve();if(B(n)){const t=n.anchor,r=n.focus,i=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),Ms(n),n}{const t=e.select(0,e.getChildrenSize());return ht(Ms(t)),t}}function xo(n,e){n.__lexicalClassNameCache===void 0&&(n.__lexicalClassNameCache={});const t=n.__lexicalClassNameCache,r=t[e];if(r!==void 0)return r;const i=n[e];if(typeof i=="string"){const s=$k(i);return t[e]=s,s}return i}function IO(n,e,t,r,i){if(t.size===0)return;const s=r.__type,o=r.__key,l=e.get(s);l===void 0&&z(33,s);const a=l.klass;let c=n.get(a);c===void 0&&(c=new Map,n.set(a,c));const u=c.get(o),h=u==="destroyed"&&i==="created";(u===void 0||h)&&c.set(o,h?"updated":i)}function nb(n,e,t){const r=n.getParent();let i=t,s=n;return r!==null&&(e&&t===0?(i=s.getIndexWithinParent(),s=r):e||t!==s.getChildrenSize()||(i=s.getIndexWithinParent()+1,s=r)),s.getChildAtIndex(e?i-1:i)}function ug(n,e){const t=n.offset;if(n.type==="element")return nb(n.getNode(),e,t);{const r=n.getNode();if(e&&t===0||!e&&t===r.getTextContentSize()){const i=e?r.getPreviousSibling():r.getNextSibling();return i===null?nb(r.getParentOrThrow(),e,r.getIndexWithinParent()+(e?0:1)):i}}return null}function T2(n){const e=Hn(n).event,t=e&&e.inputType;return t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function ae(n,e,t){return(function(r,i,s){const o=MO(r);for(let l=4;l>=0;l--)for(let a=0;a<o.length;a++){const c=o[a],u=c._commands.get(i);if(u!==void 0){const h=u[l];if(h!==void 0){const f=Array.from(h),d=f.length;let p=!1;if(En(c,(()=>{for(let g=0;g<d;g++)if(f[g](s,r))return void(p=!0)})),p)return p}}}return!1})(n,e,t)}function _f(n){return!bt(n)&&!n.isLastChild()&&!n.isInline()}function Is(n,e){const t=n._keyToDOMMap.get(e);return t===void 0&&z(75,e),t}function oc(n){const e=n.assignedSlot||n.parentElement;return dg(e)?e.host:e}function P2(n){return cA(n)?n:st(n)?n.ownerDocument:null}function fA(n){Vt(),lt()._updateTags.add(n)}function dA(n){Vt(),lt()._deferred.push(n)}function hg(n,e){let t=n.getParent();for(;t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function DO(n){const e=P2(n);return e?e.defaultView:null}function Hn(n){const e=n._window;return e===null&&z(78),e}function pA(n){let e=n.getParentOrThrow();for(;e!==null;){if(Rt(e))return e;e=e.getParentOrThrow()}return e}function Rt(n){return bt(n)||I(n)&&n.isShadowRoot()}function gA(n){const e=n.constructor.clone(n);return y2(e,null),e.afterCloneFrom(n),e}function In(n){const e=lt(),t=n.getType(),r=wf(e,t);r===void 0&&z(200,n.constructor.name,t);const{replace:i,replaceWithKlass:s}=r;if(i!==null){const o=i(n),l=o.constructor;return s!==null?o instanceof s||z(201,s.name,s.getType(),l.name,l.getType(),n.constructor.name,t):o instanceof n.constructor&&l!==n.constructor||z(202,l.name,l.getType(),n.constructor.name,t),o.__key===n.__key&&z(203,n.constructor.name,t,l.name,l.getType()),o}return n}function bd(n,e){!bt(n.getParent())||I(e)||Ie(e)||z(99)}function mA(n){const e=rt(n);return e===null&&z(63,n),e}function yd(n){return(Ie(n)||I(n)&&!n.canBeEmpty())&&!n.isInline()}function fg(n,e,t){t.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=n.parentElement;r!==null&&r.removeChild(n)}function gr(n){return br?(n||window).getSelection():null}function OA(n){const e=DO(n);return e?e.getSelection():null}function E2(n){return st(n)&&n.tagName==="A"}function st(n){return tl(n)&&n.nodeType===h9}function tl(n){return typeof n=="object"&&n!==null&&"nodeType"in n&&typeof n.nodeType=="number"}function dg(n){return tl(n)&&n.nodeType===p9}function pg(n){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return n.nodeName.match(e)!==null}function ah(n){const e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return n.nodeName.match(e)!==null}function Bn(n){if(Ie(n)&&!n.isInline())return!0;if(!I(n)||Rt(n))return!1;const e=n.getFirstChild(),t=e===null||fr(e)||G(e)||e.isInline();return!n.isInline()&&n.canBeEmpty()!==!1&&t}function vd(n,e){let t=n;for(;t!==null&&t.getParent()!==null&&!e(t);)t=t.getParentOrThrow();return e(t)?t:null}function Tf(){return lt()}const rb=new WeakMap,xA=new Map;function ib(n){if(!n._readOnly&&n.isEmpty())return xA;n._readOnly||z(192);let e=rb.get(n);return e||(e=(function(t){const r=new Map;for(const[i,s]of t._nodeMap){const o=s.__type;let l=r.get(o);l||(l=new Map,r.set(o,l)),l.set(i,s)}return r})(n),rb.set(n,e)),e}function NO(n){const e=n.constructor.clone(n);return e.afterCloneFrom(n),e}function VO(n,e){const t=parseInt(n.style.paddingInlineStart,10)||0,r=Math.round(t/40);e.setIndent(r)}function bA(n){return n.__lexicalUnmanaged===!0}function yl(n,e){return(function(t,r){return Object.prototype.hasOwnProperty.call(t,r)})(n,e)&&n[e]!==Go[e]}function Pf(n){const e=Ox in n.prototype?n.prototype[Ox]():void 0,t=(function(o){return o===Jo||o===yn||o===Go})(n),r=!t&&yl(n,"getType")?n.getType():void 0;let i,s=r;if(e)if(r)i=e[r];else for(const[o,l]of Object.entries(e))s=o,i=l;if(!t&&s&&(yl(n,"getType")||(n.getType=()=>s),yl(n,"clone")||(n.clone=o=>(EO(o),new n)),yl(n,"importJSON")||(n.importJSON=i&&i.$importJSON||(o=>new n().updateFromJSON(o))),!yl(n,"importDOM")&&i)){const{importDOM:o}=i;o&&(n.importDOM=()=>o)}return{ownNodeConfig:i,ownNodeType:s}}function yA(n){const e=Tf();return Vt(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(n))).klass}const vA={next:"previous",previous:"next"};class ZO{constructor(e){this.origin=e}[Symbol.iterator](){return $2({hasNext:$o,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return vt(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return vt(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){const r=this.getNodeAtCaret();return e.is(this.origin)||e.is(r)||(r===null?this.insert(e):r.replace(e,t)),this}splice(e,t,r="next"){const i=r===this.direction?t:Array.from(t).reverse();let s=this;const o=this.getParentAtCaret(),l=new Map;for(let a=s.getAdjacentCaret();a!==null&&l.size<e;a=a.getAdjacentCaret()){const c=a.origin.getWritable();l.set(c.getKey(),c)}for(const a of i){if(l.size>0){const c=s.getNodeAtCaret();if(c){if(l.delete(c.getKey()),l.delete(a.getKey()),!(c.is(a)||s.origin.is(a))){const u=a.getParent();u&&u.is(o)&&a.remove(),c.replace(a)}}else c===null&&z(263,Array.from(l).join(" "))}else s.insert(a);s=vt(a,this.direction)}for(const a of l.values())a.remove();return this}}class ya extends ZO{type="child";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:Un(e,this.direction)}getParentCaret(e="root"){return vt(BO(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=Ks(this.direction);return vt(this.getNodeAtCaret(),e)||Un(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof ya&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}const SA={root:bt,shadowRoot:Rt};function Ks(n){return vA[n]}function BO(n,e="root"){return SA[e](n)?null:n}class Ds extends ZO{type="sibling";getLatest(){const e=this.origin.getLatest();return e===this.origin?this:vt(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return I(this.origin)?Un(this.origin,this.direction):null}getParentCaret(e="root"){return vt(BO(this.getParentAtCaret(),e),this.direction)}getFlipped(){const e=Ks(this.direction);return vt(this.getNodeAtCaret(),e)||Un(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof Ds&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof Ds||e instanceof Ns)&&this.direction===e.direction&&this.origin.is(e.origin)}}class Ns extends ZO{type="text";constructor(e,t){super(e),this.offset=t}getLatest(){const e=this.origin.getLatest();return e===this.origin?this:Vs(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return vt(BO(this.getParentAtCaret(),e),this.direction)}getFlipped(){return Vs(this.origin,Ks(this.direction),this.offset)}isSamePointCaret(e){return e instanceof Ns&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof Ds||e instanceof Ns)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return vt(this.origin,this.direction)}}function zr(n){return n instanceof Ns}function $o(n){return n instanceof Ds}function jn(n){return n instanceof ya}const wA={next:class extends Ns{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(n){return this.origin.insertAfter(n),this}},previous:class extends Ns{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(n){return this.origin.insertBefore(n),this}}},kA={next:class extends Ds{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(n){return this.origin.insertAfter(n),this}},previous:class extends Ds{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(n){return this.origin.insertBefore(n),this}}},CA={next:class extends ya{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(n){return this.origin.splice(0,0,[n]),this}},previous:class extends ya{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(n){return this.origin.splice(this.origin.getChildrenSize(),0,[n]),this}}};function vt(n,e){return n?new kA[e](n):null}function Vs(n,e,t){return n?new wA[e](n,Wr(n,t)):null}function Wr(n,e,t="error"){const r=n.getTextContentSize();let i=e==="next"?r:e==="previous"?0:e;return(i<0||i>r)&&(t!=="clamp"&&(function(s,...o){const l=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",s);for(const c of o)a.append("v",c);l.search=a.toString(),console.warn(`Minified Lexical warning #${s}; visit ${l.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(284,String(e),String(r),n.getKey()),i=i<0?0:r),i}function sb(n,e){return new TA(n,e)}function Un(n,e){return I(n)?new CA[e](n):null}function _A(n){return n&&n.getChildCaret()||n}function Ef(n){return n&&_A(n.getAdjacentCaret())}class FO{type="node-caret-range";constructor(e,t,r){this.anchor=e,this.focus=t,this.direction=r}getLatest(){const e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new FO(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=i=>{const s=this[i].getLatest();return zr(s)?(function(o,l){const{direction:a,origin:c}=o,u=Wr(c,l==="focus"?Ks(a):a);return sb(o,u-o.offset)})(s,i):null},t=e("anchor"),r=e("focus");if(t&&r){const{caret:i}=t,{caret:s}=r;if(i.isSameNodeCaret(s))return[sb(i,s.offset-i.offset),null]}return[t,r]}iterNodeCarets(e="root"){const t=zr(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=zr(r),s=o=>o.isSameNodeCaret(r)?null:Ef(o)||o.getParentCaret(e);return $2({hasNext:o=>o!==null&&!(i&&r.isSameNodeCaret(o)),initial:t.isSameNodeCaret(r)?null:s(t),map:o=>o,step:s})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class TA{type="slice";constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){const{distance:e,caret:{offset:t}}=this,r=t+e;return r<t?[r,t]:[t,r]}getTextContent(){const[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:t}}=this,[r,i]=this.getSliceIndices(),s=e.getTextContent();return Vs(e.setTextContent(s.slice(0,r)+s.slice(i)),t,r)}}function XO(n){return Hi(n,vt(Ve(),n.direction))}function Q2(n){return Hi(n,n)}function Hi(n,e){return n.direction!==e.direction&&z(265),new FO(n,e,n.direction)}function $2(n){const{initial:e,hasNext:t,step:r,map:i}=n;let s=e;return{[Symbol.iterator](){return this},next(){if(!t(s))return{done:!0,value:void 0};const o={done:!1,value:i(s)};return s=r(s),o}}}function A2(n,e){const t=wu(n.origin,e.origin);switch(t===null&&z(275,n.origin.getKey(),e.origin.getKey()),t.type){case"same":{const r=n.type==="text",i=e.type==="text";return r&&i?(function(s,o){return Math.sign(s-o)})(n.offset,e.offset):n.type===e.type?0:r?-1:i?1:n.type==="child"?-1:1}case"ancestor":return n.type==="child"?-1:1;case"descendant":return e.type==="child"?1:-1;case"branch":return M2(t)}}function M2(n){const{a:e,b:t}=n,r=e.__key,i=t.__key;let s=e,o=t;for(;s&&o;s=s.getNextSibling(),o=o.getNextSibling()){if(s.__key===i)return-1;if(o.__key===r)return 1}return s===null?1:-1}function Mc(n,e){return e.is(n)}function ob(n){return I(n)?[n.getLatest(),null]:[n.getParent(),n.getLatest()]}function wu(n,e){if(n.is(e))return{commonAncestor:n,type:"same"};const t=new Map;for(let[r,i]=ob(n);r;i=r,r=r.getParent())t.set(r,i);for(let[r,i]=ob(e);r;i=r,r=r.getParent()){const s=t.get(r);if(s!==void 0)return s===null?(Mc(n,r)||z(276),{commonAncestor:r,type:"ancestor"}):i===null?(Mc(e,r)||z(277),{commonAncestor:r,type:"descendant"}):((I(s)||Mc(n,s))&&(I(i)||Mc(e,i))&&r.is(s.getParent())&&r.is(i.getParent())||z(278),{a:s,b:i,commonAncestor:r,type:"branch"})}return null}function Ur(n,e){const{type:t,key:r,offset:i}=n,s=mA(n.key);return t==="text"?(G(s)||z(266,s.getType(),r),Vs(s,e,i)):(I(s)||z(267,s.getType(),r),EA(s,n.offset,e))}function Zs(n,e){const{origin:t,direction:r}=e,i=r==="next";zr(e)?n.set(t.getKey(),e.offset,"text"):$o(e)?G(t)?n.set(t.getKey(),Wr(t,r),"text"):n.set(t.getParentOrThrow().getKey(),t.getIndexWithinParent()+(i?1:0),"element"):(jn(e)&&I(t)||z(268),n.set(t.getKey(),i?0:t.getChildrenSize(),"element"))}function L2(n){const e=H(),t=B(e)?e:nc();return ku(t,n),ht(t),t}function ku(n,e){Zs(n.anchor,e.anchor),Zs(n.focus,e.focus)}function lb(n){const{anchor:e,focus:t}=n,r=Ur(e,"next"),i=Ur(t,"next"),s=A2(r,i)<=0?"next":"previous";return Hi(yi(r,s),yi(i,s))}function lc(n){const{direction:e,origin:t}=n,r=vt(t,Ks(e)).getNodeAtCaret();return r?vt(r,e):Un(t.getParentOrThrow(),e)}function ab(n,e="root"){const t=[n];for(let r=jn(n)?n.getParentCaret(e):n.getSiblingCaret();r!==null;r=r.getParentCaret(e))t.push(lc(r));return t}function Sd(n){return!!n&&n.origin.isAttached()}function PA(n,e="removeEmptySlices"){if(n.isCollapsed())return n;const t="root",r="next";let i=e;const s=I2(n,r),o=ab(s.anchor,t),l=ab(s.focus.getFlipped(),t),a=new Set,c=[];for(const p of s.iterNodeCarets(t))if(jn(p))a.add(p.origin.getKey());else if($o(p)){const{origin:g}=p;I(g)&&!a.has(g.getKey())||c.push(g)}for(const p of c)p.remove();for(const p of s.getTextSlices()){if(!p)continue;const{origin:g}=p.caret,m=g.getTextContentSize(),x=lc(vt(g,r)),O=g.getMode();if(Math.abs(p.distance)===m&&i==="removeEmptySlices"||O==="token"&&p.distance!==0)x.remove();else if(p.distance!==0){i="removeEmptySlices";let b=p.removeTextSlice();const y=p.caret.origin;if(O==="segmented"){const S=b.origin,k=Ye(S.getTextContent()).setStyle(S.getStyle()).setFormat(S.getFormat());x.replaceOrInsert(k),b=Vs(k,r,b.offset)}y.is(o[0].origin)&&(o[0]=b),y.is(l[0].origin)&&(l[0]=b.getFlipped())}}let u,h;for(const p of o)if(Sd(p)){u=An(p);break}for(const p of l)if(Sd(p)){h=An(p);break}const f=(function(p,g,m){if(!p||!g)return null;const x=p.getParentAtCaret(),O=g.getParentAtCaret();if(!x||!O)return null;const b=x.getParents().reverse();b.push(x);const y=O.getParents().reverse();y.push(O);const S=Math.min(b.length,y.length);let k;for(k=0;k<S&&b[k]===y[k];k++);const w=($,D)=>{let M;for(let Q=k;Q<$.length;Q++){const F=$[Q];if(Rt(F))return;!M&&D(F)&&(M=F)}return M},C=w(b,Bn),T=C&&w(y,($=>m.has($.getKey())&&Bn($)));return C&&T?[C,T]:null})(u,h,a);if(f){const[p,g]=f;Un(p,"previous").splice(0,g.getChildren()),g.remove()}const d=[u,h,...o,...l].find(Sd);if(d)return Q2(yi(An(d),n.direction));z(269,JSON.stringify(o.map((p=>p.origin.__key))))}function An(n){const e=(function(i){let s=i;for(;jn(s);){const o=Ef(s);if(!jn(o))break;s=o}return s})(n.getLatest()),{direction:t}=e;if(G(e.origin))return zr(e)?e:Vs(e.origin,t,t);const r=e.getAdjacentCaret();return $o(r)&&G(r.origin)?Vs(r.origin,t,Ks(t)):e}function R2(n){return zr(n)&&n.offset!==Wr(n.origin,n.direction)}function yi(n,e){return n.direction===e?n:n.getFlipped()}function I2(n,e){return n.direction===e?n:Hi(yi(n.focus,e),yi(n.anchor,e))}function EA(n,e,t){let r=Un(n,"next");for(let i=0;i<e;i++){const s=r.getAdjacentCaret();if(s===null)break;r=s}return yi(r,t)}function QA(n){const{origin:e,offset:t,direction:r}=n;if(t===Wr(e,r))return n.getSiblingCaret();if(t===Wr(e,Ks(r)))return lc(n.getSiblingCaret());const[i]=e.splitText(t);return G(i)||z(281),yi(vt(i,"next"),r)}function $A(n,e){return!0}function AA(n,{$copyElementNode:e=gA,$splitTextPointCaretNext:t=QA,rootMode:r="shadowRoot",$shouldSplit:i=$A}={}){if(zr(n))return t(n);const s=n.getParentCaret(r);if(s){const{origin:o}=s;if(jn(n)&&(!o.canBeEmpty()||!i(o,"first")))return lc(s);const l=(function(a){const c=[];for(let u=a.getAdjacentCaret();u;u=u.getAdjacentCaret())c.push(u.origin);return c})(n);(l.length>0||o.canBeEmpty()&&i(o,"last"))&&s.insert(e(o).splice(0,0,l))}return s}function MA(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const gg=new Map;function D2(n){const e={};if(!n)return e;const t=n.split(";");for(const r of t)if(r!==""){const[i,s]=r.split(/:([^]+)/);i&&s&&(e[i.trim()]=s.trim())}return e}function cb(n){let e=gg.get(n);return e===void 0&&(e=D2(n),gg.set(n,e)),e}function N2(n){const e=Tf().getElementByKey(n.getKey());if(e===null)return null;const t=e.ownerDocument.defaultView;return t===null?null:t.getComputedStyle(e)}function V2(n){return N2(bt(n)?n:n.getParentOrThrow())}function ub(n){const e=V2(n);return e!==null&&e.direction==="rtl"}function Z2(n,e){const t=n.getStartEndPoints();if(e.isSelected(n)&&!ci(e)&&t!==null){const[r,i]=t,s=n.isBackward(),o=r.getNode(),l=i.getNode(),a=e.is(o),c=e.is(l);if(a||c){const[u,h]=ag(n),f=o.is(l),d=e.is(s?l:o),p=e.is(s?o:l);let g,m=0;f?(m=u>h?h:u,g=u>h?u:h):d?(m=s?h:u,g=void 0):p&&(m=0,g=s?u:h),e.__text=e.__text.slice(m,g)}}return e}function hb(n){if(n.type==="text")return n.offset===n.getNode().getTextContentSize();const e=n.getNode();return I(e)||MA(177),n.offset===e.getChildrenSize()}function LA(n){const e=n.getStyle(),t=D2(e);gg.set(e,t)}function RA(n,e){const t=n.getFormatType(),r=n.getIndent();t!==e.getFormatType()&&e.setFormat(t),r!==e.getIndent()&&e.setIndent(r)}function IA(n,e,t=RA){if(n===null)return;const r=n.getStartEndPoints(),i=new Map;let s=null;if(r){const[o,l]=r;s=nc(),s.anchor.set(o.key,o.offset,o.type),s.focus.set(l.key,l.offset,l.type);const a=wd(o.getNode(),Bn),c=wd(l.getNode(),Bn);I(a)&&i.set(a.getKey(),a),I(c)&&i.set(c.getKey(),c)}for(const o of n.getNodes())if(I(o)&&Bn(o))i.set(o.getKey(),o);else if(r===null){const l=wd(o,Bn);I(l)&&i.set(l.getKey(),l)}for(const[o,l]of i){const a=e();t(l,a),l.replace(a,!0),s&&(o===s.anchor.key&&s.anchor.set(a.getKey(),s.anchor.offset,s.anchor.type),o===s.focus.key&&s.focus.set(a.getKey(),s.focus.offset,s.focus.type))}s&&n.is(H())&&ht(s)}function B2(n){const e=F2(n);return e!==null&&e.writingMode==="vertical-rl"}function F2(n){const e=n.anchor.getNode();return I(e)?N2(e):V2(e)}function fb(n,e){let t=B2(n)?!e:e;X2(n)&&(t=!t);const r=Ur(n.focus,t?"previous":"next");if(R2(r))return!1;for(const i of XO(r)){if(jn(i))return!i.origin.isInline();if(!I(i.origin)){if(Ie(i.origin))return!0;break}}return!1}function DA(n,e,t,r){n.modify(e?"extend":"move",t,r)}function X2(n){const e=F2(n);return e!==null&&e.direction==="rtl"}function db(n,e,t){const r=X2(n);let i;i=B2(n)||r?!t:t,DA(n,e,i,"character")}function wd(n,e){let t=n;for(;t!==null&&t.getParent()!==null&&!e(t);)t=t.getParentOrThrow();return e(t)?t:null}function z2(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Qf=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,NA=Qf&&"documentMode"in document?document.documentMode:null,VA=Qf&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);!(!Qf||!("InputEvent"in window)||NA)&&"getTargetRanges"in new window.InputEvent("input");function W2(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}function Dn(...n){return()=>{for(let e=n.length-1;e>=0;e--)n[e]();n.length=0}}const ZA=Qf,BA=VA;function mr(n,...e){const t=W2(...e);t.length>0&&n.classList.add(...t)}function $f(n,...e){const t=W2(...e);t.length>0&&n.classList.remove(...t)}function FA(n){return n?n.getAdjacentCaret():null}function j2(n,e){let t=n;for(;t!=null;){if(t instanceof e)return t;t=t.getParent()}return null}function mg(n){const e=dr(n,(t=>I(t)&&!t.isInline()));return I(e)||z2(4,n.__key),e}const dr=(n,e)=>{let t=n;for(;t!==Ve()&&t!=null;){if(e(t))return t;t=t.getParent()}return null};function q2(n){const e=H()||Gs();let t;if(B(e))t=Ur(e.focus,"next");else{if(e!=null){const o=e.getNodes(),l=o[o.length-1];l&&(t=vt(l,"next"))}t=t||Un(Ve(),"previous").getFlipped().insert(ze())}const r=XA(n,t),i=Ef(r),s=jn(i)?An(i):r;return L2(Q2(s)),n.getLatest()}function XA(n,e,t){let r=yi(e,"next");for(let i=r;i;i=AA(i,t))r=i;return zr(r)&&z2(283),r.insert(n.isInline()?ze().append(n):n),yi(vt(n.getLatest(),"next"),e.direction)}function zA(n,e){const t=e();return n.replace(t),t.append(n),t}function Fi(n,e){return n!==null&&Object.getPrototypeOf(n).constructor.name===e.name}function WA(n,e){const t=[];for(let r=0;r<n.length;r++){const i=e(n[r]);i!==null&&t.push(i)}return t}let kd=!(BA||!ZA)&&void 0;function jA(n){let e=1;if((function(){if(kd===void 0){const t=document.createElement("div");t.style.cssText="position: absolute; opacity: 0; width: 100px; left: -1000px;",document.body.appendChild(t);const r=t.getBoundingClientRect();t.style.setProperty("zoom","2"),kd=t.getBoundingClientRect().width===r.width,document.body.removeChild(t)}return kd})())for(;n;)e*=Number(window.getComputedStyle(n).getPropertyValue("zoom")),n=n.parentElement;return e}const Lc=0,Og=1,xg=2,sr=0,qA=1,pb=2,YA=3,HA=4;function UA(n,e,t,r,i){if(n===null||t.size===0&&r.size===0&&!i)return sr;const s=e._selection,o=n._selection;if(i)return qA;if(!(B(s)&&B(o)&&o.isCollapsed()&&s.isCollapsed()))return sr;const l=(function(x,O,b){const y=x._nodeMap,S=[];for(const k of O){const w=y.get(k);w!==void 0&&S.push(w)}for(const[k,w]of b){if(!w)continue;const C=y.get(k);C===void 0||bt(C)||S.push(C)}return S})(e,t,r);if(l.length===0)return sr;if(l.length>1){const x=e._nodeMap,O=x.get(s.anchor.key),b=x.get(o.anchor.key);return O&&b&&!n._nodeMap.has(O.__key)&&G(O)&&O.__text.length===1&&s.anchor.offset===1?pb:sr}const a=l[0],c=n._nodeMap.get(a.__key);if(!G(c)||!G(a)||c.__mode!==a.__mode)return sr;const u=c.__text,h=a.__text;if(u===h)return sr;const f=s.anchor,d=o.anchor;if(f.key!==d.key||f.type!=="text")return sr;const p=f.offset,g=d.offset,m=h.length-u.length;return m===1&&g===p-1?pb:m===-1&&g===p+1?YA:m===-1&&g===p?HA:sr}function GA(n,e){let t=Date.now(),r=sr;return(i,s,o,l,a,c)=>{const u=Date.now();if(c.has(sh))return r=sr,t=u,xg;const h=UA(i,s,l,a,n.isComposing()),f=(()=>{const d=o===null||o.editor===n,p=c.has(tA);if(!p&&d&&c.has(Su))return Lc;if(i===null)return Og;const g=s._selection;return l.size>0||a.size>0?p===!1&&h!==sr&&h===r&&u<t+e&&d||l.size===1&&(function(m,x,O){const b=x._nodeMap.get(m),y=O._nodeMap.get(m),S=x._selection,k=O._selection;return!(B(S)&&B(k)&&S.anchor.type==="element"&&S.focus.type==="element"&&k.anchor.type==="text"&&k.focus.type==="text"||!G(b)||!G(y)||b.__parent!==y.__parent)&&JSON.stringify(x.read((()=>b.exportJSON())))===JSON.stringify(O.read((()=>y.exportJSON())))})(Array.from(l)[0],i,s)?Lc:Og:g!==null?Lc:xg})();return t=u,r=h,f}}function gb(n){n.undoStack=[],n.redoStack=[],n.current=null}function KA(n,e,t){const r=GA(n,t);return Dn(n.registerCommand(hf,(()=>((function(s,o){const l=o.redoStack,a=o.undoStack;if(a.length!==0){const c=o.current,u=a.pop();c!==null&&(l.push(c),s.dispatchCommand(Ll,!0)),a.length===0&&s.dispatchCommand(Rl,!1),o.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:sh})}})(n,e),!0)),Pe),n.registerCommand(ff,(()=>((function(s,o){const l=o.redoStack,a=o.undoStack;if(l.length!==0){const c=o.current;c!==null&&(a.push(c),s.dispatchCommand(Rl,!0));const u=l.pop();l.length===0&&s.dispatchCommand(Ll,!1),o.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:sh})}})(n,e),!0)),Pe),n.registerCommand(V9,(()=>(gb(e),!1)),Pe),n.registerCommand(Z9,(()=>(gb(e),n.dispatchCommand(Ll,!1),n.dispatchCommand(Rl,!1),!0)),Pe),n.registerUpdateListener((({editorState:s,prevEditorState:o,dirtyLeaves:l,dirtyElements:a,tags:c})=>{const u=e.current,h=e.redoStack,f=e.undoStack,d=u===null?null:u.editorState;if(u!==null&&s===d)return;const p=r(o,s,u,l,a,c);if(p===Og)h.length!==0&&(e.redoStack=[],n.dispatchCommand(Ll,!1)),u!==null&&(f.push({...u}),n.dispatchCommand(Rl,!0));else if(p===xg)return;e.current={editor:n,editorState:s}})))}function Y2(){return{current:null,redoStack:[],undoStack:[]}}function H2({delay:n,externalHistoryState:e}){const[t]=Sn();return(function(r,i,s=1e3){const o=V.useMemo((()=>i||Y2()),[i]);V.useEffect((()=>KA(r,o,s)),[s,r,o])})(t,e,n),null}function JA(n,e){const t=e.body?e.body.childNodes:[];let r=[];const i=[];for(let s=0;s<t.length;s++){const o=t[s];if(!G2.has(o.nodeName)){const l=K2(o,n,i,!1);l!==null&&(r=r.concat(l))}}return(function(s){for(const o of s)o.getNextSibling()instanceof PO&&o.insertAfter(pr());for(const o of s){const l=o.getChildren();for(const a of l)o.insertBefore(a);o.remove()}})(i),r}function e7(n,e){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const t=document.createElement("div"),r=Ve().getChildren();for(let i=0;i<r.length;i++)U2(n,r[i],t,e);return t.innerHTML}function U2(n,e,t,r=null){let i=r===null||e.isSelected(r);const s=I(e)&&e.excludeFromCopy("html");let o=e;if(r!==null){let d=NO(e);d=G(d)&&r!==null?Z2(r,d):d,o=d}const l=I(o)?o.getChildren():[],a=wf(n,o.getType());let c;c=a&&a.exportDOM!==void 0?a.exportDOM(n,o):o.exportDOM(n);const{element:u,after:h}=c;if(!u)return!1;const f=document.createDocumentFragment();for(let d=0;d<l.length;d++){const p=l[d],g=U2(n,p,f,r);!i&&I(e)&&g&&e.extractWithChild(p,r,"html")&&(i=!0)}if(i&&!s){if((st(u)||dg(u))&&u.append(f),t.append(u),h){const d=h.call(o,u);d&&(dg(u)?u.replaceChildren(d):u.replaceWith(d))}}else t.append(f);return i}const G2=new Set(["STYLE","SCRIPT"]);function K2(n,e,t,r,i=new Map,s){let o=[];if(G2.has(n.nodeName))return o;let l=null;const a=(function(p,g){const{nodeName:m}=p,x=g._htmlConversions.get(m.toLowerCase());let O=null;if(x!==void 0)for(const b of x){const y=b(p);y!==null&&(O===null||(O.priority||0)<=(y.priority||0))&&(O=y)}return O!==null?O.conversion:null})(n,e),c=a?a(n):null;let u=null;if(c!==null){u=c.after;const p=c.node;if(l=Array.isArray(p)?p[p.length-1]:p,l!==null){for(const[,g]of i)if(l=g(l,s),!l)break;l&&o.push(...Array.isArray(p)?p:[l])}c.forChild!=null&&i.set(n.nodeName,c.forChild)}const h=n.childNodes;let f=[];const d=(l==null||!Rt(l))&&(l!=null&&nh(l)||r);for(let p=0;p<h.length;p++)f.push(...K2(h[p],e,t,d,new Map(i),l));return u!=null&&(f=u(f)),ah(n)&&(f=t7(n,f,d?()=>{const p=new PO;return t.push(p),p}:ze)),l==null?f.length>0?o=o.concat(f):ah(n)&&(function(p){return p.nextSibling==null||p.previousSibling==null?!1:pg(p.nextSibling)&&pg(p.previousSibling)})(n)&&(o=o.concat(pr())):I(l)&&l.append(...f),o}function t7(n,e,t){const r=n.style.textAlign,i=[];let s=[];for(let o=0;o<e.length;o++){const l=e[o];if(nh(l))r&&!l.getFormat()&&l.setFormat(r),i.push(l);else if(s.push(l),o===e.length-1||o<e.length-1&&nh(e[o+1])){const a=t();a.setFormat(r),a.append(...s),i.push(a),s=[]}}return i}function ch(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function n7(n,e=H()){return e==null&&ch(166),B(e)&&e.isCollapsed()||e.getNodes().length===0?"":e7(n,e)}function r7(n,e=H()){return e==null&&ch(166),B(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(i7(n,e))}function mb(n,e,t){const r=n.getData("application/x-lexical-editor");if(r)try{const l=JSON.parse(r);if(l.namespace===t._config.namespace&&Array.isArray(l.nodes))return Ob(t,s7(l.nodes),e)}catch{}const i=n.getData("text/html"),s=n.getData("text/plain");if(i&&s!==i)try{const l=new DOMParser().parseFromString((function(a){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:c=>c}).createHTML(a):a})(i),"text/html");return Ob(t,JA(t,l),e)}catch{}const o=s||n.getData("text/uri-list");if(o!=null)if(B(e)){const l=o.split(/(\r?\n|\t)/);l[l.length-1]===""&&l.pop();for(let a=0;a<l.length;a++){const c=H();if(B(c)){const u=l[a];u===`
32
+ `||u===`\r
33
+ `?c.insertParagraph():u===" "?c.insertNodes([Ko()]):c.insertText(u)}}}else e.insertRawText(o)}function Ob(n,e,t){n.dispatchCommand(L9,{nodes:e,selection:t})||(t.insertNodes(e),(function(r){if(B(r)&&r.isCollapsed()){const i=r.anchor;let s=null;const o=Ur(i,"previous");if(o)if(zr(o))s=o.origin;else{const l=Hi(o,Un(Ve(),"next").getFlipped());for(const a of l){if(G(a.origin)){s=a.origin;break}if(I(a.origin)&&!a.origin.isInline())break}}if(s&&G(s)){const l=s.getFormat(),a=s.getStyle();r.format===l&&r.style===a||(r.format=l,r.style=a,r.dirty=!0)}}})(t))}function J2(n,e,t,r=[]){let i=e===null||t.isSelected(e);const s=I(t)&&t.excludeFromCopy("html");let o=t;if(e!==null){let c=NO(t);c=G(c)&&e!==null?Z2(e,c):c,o=c}const l=I(o)?o.getChildren():[],a=(function(c){const u=c.exportJSON(),h=c.constructor;if(u.type!==h.getType()&&ch(58,h.name),I(c)){const f=u.children;Array.isArray(f)||ch(59,h.name)}return u})(o);if(G(o)){const c=o.__text;c.length>0?a.text=c:i=!1}for(let c=0;c<l.length;c++){const u=l[c],h=J2(n,e,u,a.children);!i&&I(t)&&h&&t.extractWithChild(u,e,"clone")&&(i=!0)}if(i&&!s)r.push(a);else if(Array.isArray(a.children))for(let c=0;c<a.children.length;c++){const u=a.children[c];r.push(u)}return i}function i7(n,e){const t=[],r=Ve().getChildren();for(let i=0;i<r.length;i++)J2(n,e,r[i],t);return{namespace:n._config.namespace,nodes:t}}function s7(n){const e=[];for(let t=0;t<n.length;t++){const r=n[t],i=eA(r);G(i)&&LA(i),e.push(i)}return e}let Js=null;async function xb(n,e,t){if(Js!==null)return!1;if(e!==null)return new Promise(((c,u)=>{n.update((()=>{c(bb(n,e,t))}))}));const r=n.getRootElement(),i=n._window||window,s=window.document,o=gr(i);if(r===null||o===null)return!1;const l=s.createElement("span");l.style.cssText="position: fixed; top: -1000px;",l.append(s.createTextNode("#")),r.append(l);const a=new Range;return a.setStart(l,0),a.setEnd(l,1),o.removeAllRanges(),o.addRange(a),new Promise(((c,u)=>{const h=n.registerCommand(gf,(f=>(Fi(f,ClipboardEvent)&&(h(),Js!==null&&(window.clearTimeout(Js),Js=null),c(bb(n,f,t))),!0)),Yr);Js=window.setTimeout((()=>{h(),Js=null,c(!1)}),50),s.execCommand("copy"),l.remove()}))}function bb(n,e,t){if(t===void 0){const i=gr(n._window);if(!i)return!1;const s=i.anchorNode,o=i.focusNode;if(s!==null&&o!==null&&!sc(n,s,o))return!1;const l=H();if(l===null)return!1;t=l7(l)}e.preventDefault();const r=e.clipboardData;return r!==null&&(a7(r,t),!0)}const o7=[["text/html",n7],["application/x-lexical-editor",r7]];function l7(n=H()){const e={"text/plain":n?n.getTextContent():""};if(n){const t=Tf();for(const[r,i]of o7){const s=i(t,n);s!==null&&(e[r]=s)}}return e}function a7(n,e){for(const t in e){const r=e[t];r!==void 0&&n.setData(t,r)}}function yb(n,e){if(document.caretRangeFromPoint!==void 0){const t=document.caretRangeFromPoint(n,e);return t===null?null:{node:t.startContainer,offset:t.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const t=document.caretPositionFromPoint(n,e);return t===null?null:{node:t.offsetNode,offset:t.offset}}return null}const nl=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,c7=nl&&"documentMode"in document?document.documentMode:null,u7=!(!nl||!("InputEvent"in window)||c7)&&"getTargetRanges"in new window.InputEvent("input"),h7=nl&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),vb=nl&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,f7=nl&&/^(?=.*Chrome).*/i.test(navigator.userAgent),d7=nl&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!f7,Sb=Oe("DRAG_DROP_PASTE_FILE");let Af=class e5 extends yn{static getType(){return"quote"}static clone(e){return new e5(e.__key)}createDOM(e){const t=document.createElement("blockquote");return mr(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:p7,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(st(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r);const i=this.getDirection();i&&(t.dir=i)}return{element:t}}static importJSON(e){return ac().updateFromJSON(e)}insertNewAfter(e,t){const r=ze(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,t),r}collapseAtStart(){const e=ze();return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function ac(){return In(new Af)}function bg(n){return n instanceof Af}let cc=class t5 extends yn{static getType(){return"heading"}static clone(e){return new t5(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}setTag(e){const t=this.getWritable();return this.__tag=e,t}createDOM(e){const t=this.__tag,r=document.createElement(t),i=e.theme.heading;if(i!==void 0){const s=i[t];mr(r,s)}return r}updateDOM(e,t,r){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:eo,priority:0}),h2:e=>({conversion:eo,priority:0}),h3:e=>({conversion:eo,priority:0}),h4:e=>({conversion:eo,priority:0}),h5:e=>({conversion:eo,priority:0}),h6:e=>({conversion:eo,priority:0}),p:e=>{const t=e.firstChild;return t!==null&&wb(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>wb(e)?{conversion:t=>({node:Nr("h1")}),priority:3}:null}}exportDOM(e){const{element:t}=super.exportDOM(e);if(st(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r);const i=this.getDirection();i&&(t.dir=i)}return{element:t}}static importJSON(e){return Nr(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){const r=e?e.anchor.offset:0,i=this.getLastDescendant(),s=!i||e&&e.anchor.key===i.getKey()&&r===i.getTextContentSize()||!e?ze():Nr(this.getTag()),o=this.getDirection();if(s.setDirection(o),this.insertAfter(s,t),r===0&&!this.isEmpty()&&e){const l=ze();l.select(),this.replace(l,!0)}return s}collapseAtStart(){const e=this.isEmpty()?ze():Nr(this.getTag());return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}extractWithChild(){return!0}};function wb(n){return n.nodeName.toLowerCase()==="span"&&n.style.fontSize==="26pt"}function eo(n){const e=n.nodeName.toLowerCase();let t=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(t=Nr(e),n.style!==null&&(VO(n,t),t.setFormat(n.style.textAlign))),{node:t}}function p7(n){const e=ac();return n.style!==null&&(e.setFormat(n.style.textAlign),VO(n,e)),{node:e}}function Nr(n="h1"){return In(new cc(n))}function Ao(n){return n instanceof cc}function Rc(n){let e=null;if(Fi(n,DragEvent)?e=n.dataTransfer:Fi(n,ClipboardEvent)&&(e=n.clipboardData),e===null)return[!1,[],!1];const t=e.types,r=t.includes("Files"),i=t.includes("text/html")||t.includes("text/plain");return[r,Array.from(e.files),i]}function kb(n){const e=H();if(!B(e))return!1;const t=new Set,r=e.getNodes();for(let i=0;i<r.length;i++){const s=r[i],o=s.getKey();if(t.has(o))continue;const l=dr(s,(c=>I(c)&&!c.isInline()));if(l===null)continue;const a=l.getKey();l.canIndent()&&!t.has(a)&&(t.add(a),n(l))}return t.size>0}function Cb(n){const e=Hr(n);return Ie(e)}function Cd(n){for(const e of["lowercase","uppercase","capitalize"])n.hasFormat(e)&&n.toggleFormat(e)}function g7(n){return Dn(n.registerCommand(pO,(e=>{const t=H();return!!_t(t)&&(t.clear(),!0)}),Pe),n.registerCommand(ws,(e=>{const t=H();return B(t)?(t.deleteCharacter(e),!0):!!_t(t)&&(t.deleteNodes(),!0)}),Pe),n.registerCommand(Oa,(e=>{const t=H();return!!B(t)&&(t.deleteWord(e),!0)}),Pe),n.registerCommand(xa,(e=>{const t=H();return!!B(t)&&(t.deleteLine(e),!0)}),Pe),n.registerCommand(mo,(e=>{const t=H();if(typeof e=="string")t!==null&&t.insertText(e);else{if(t===null)return!1;const r=e.dataTransfer;if(r!=null)mb(r,t,n);else if(B(t)){const i=e.data;return i&&t.insertText(i),!0}}return!0}),Pe),n.registerCommand(eg,(()=>{const e=H();return!!B(e)&&(e.removeText(),!0)}),Pe),n.registerCommand(gi,(e=>{const t=H();return!!B(t)&&(t.formatText(e),!0)}),Pe),n.registerCommand(D9,(e=>{const t=H();if(!B(t)&&!_t(t))return!1;const r=t.getNodes();for(const i of r){const s=dr(i,(o=>I(o)&&!o.isInline()));s!==null&&s.setFormat(e)}return!0}),Pe),n.registerCommand(go,(e=>{const t=H();return!!B(t)&&(t.insertLineBreak(e),!0)}),Pe),n.registerCommand(ma,(()=>{const e=H();return!!B(e)&&(e.insertParagraph(),!0)}),Pe),n.registerCommand(jk,(()=>(xf([Ko()]),!0)),Pe),n.registerCommand(eh,(()=>kb((e=>{const t=e.getIndent();e.setIndent(t+1)}))),Pe),n.registerCommand(tg,(()=>kb((e=>{const t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}))),Pe),n.registerCommand(OO,(e=>{const t=H();if(_t(t)){const r=t.getNodes();if(r.length>0)return r[0].selectPrevious(),!0}else if(B(t)){const r=ug(t.focus,!0);if(!e.shiftKey&&Ie(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),e.preventDefault(),!0}return!1}),Pe),n.registerCommand(xO,(e=>{const t=H();if(_t(t)){const r=t.getNodes();if(r.length>0)return r[0].selectNext(0,0),!0}else if(B(t)){if((function(i){const s=i.focus;return s.key==="root"&&s.offset===Ve().getChildrenSize()})(t))return e.preventDefault(),!0;const r=ug(t.focus,!1);if(!e.shiftKey&&Ie(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),e.preventDefault(),!0}return!1}),Pe),n.registerCommand(mO,(e=>{const t=H();if(_t(t)){const r=t.getNodes();if(r.length>0)return e.preventDefault(),ub(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!B(t))return!1;if(fb(t,!0)){const r=e.shiftKey;return e.preventDefault(),db(t,r,!0),!0}return!1}),Pe),n.registerCommand(Xk,(e=>{const t=H();if(_t(t)){const i=t.getNodes();if(i.length>0)return e.preventDefault(),ub(i[0])?i[0].selectPrevious():i[0].selectNext(0,0),!0}if(!B(t))return!1;const r=e.shiftKey;return!!fb(t,!1)&&(e.preventDefault(),db(t,r,!1),!0)}),Pe),n.registerCommand(zk,(e=>{if(Cb(e.target))return!1;const t=H();if(B(t)){if((function(r){if(!r.isCollapsed())return!1;const{anchor:i}=r;if(i.offset!==0)return!1;const s=i.getNode();if(bt(s))return!1;const o=mg(s);return o.getIndent()>0&&(o.is(s)||s.is(o.getFirstDescendant()))})(t))return e.preventDefault(),n.dispatchCommand(tg,void 0);if(vb&&navigator.language==="ko-KR")return!1}else if(!_t(t))return!1;return e.preventDefault(),n.dispatchCommand(ws,!0)}),Pe),n.registerCommand(Wk,(e=>{if(Cb(e.target))return!1;const t=H();return!(!B(t)&&!_t(t))&&(e.preventDefault(),n.dispatchCommand(ws,!1))}),Pe),n.registerCommand(ba,(e=>{const t=H();if(!B(t))return!1;if(Cd(t),e!==null){if((vb||h7||d7)&&u7)return!1;if(e.preventDefault(),e.shiftKey)return n.dispatchCommand(go,!1)}return n.dispatchCommand(ma,void 0)}),Pe),n.registerCommand(df,(()=>{const e=H();return!!B(e)&&(n.blur(),!0)}),Pe),n.registerCommand(qk,(e=>{const[,t]=Rc(e);if(t.length>0){const i=yb(e.clientX,e.clientY);if(i!==null){const{offset:s,node:o}=i,l=Hr(o);if(l!==null){const a=nc();if(G(l))a.anchor.set(l.getKey(),s,"text"),a.focus.set(l.getKey(),s,"text");else{const u=l.getParentOrThrow().getKey(),h=l.getIndexWithinParent()+1;a.anchor.set(u,h,"element"),a.focus.set(u,h,"element")}const c=Ms(a);ht(c)}n.dispatchCommand(Sb,t)}return e.preventDefault(),!0}const r=H();return!!B(r)}),Pe),n.registerCommand(Yk,(e=>{const[t]=Rc(e),r=H();return!(t&&!B(r))}),Pe),n.registerCommand(Hk,(e=>{const[t]=Rc(e),r=H();if(t&&!B(r))return!1;const i=yb(e.clientX,e.clientY);if(i!==null){const s=Hr(i.node);Ie(s)&&e.preventDefault()}return!0}),Pe),n.registerCommand(ng,(()=>(hA(),!0)),Pe),n.registerCommand(gf,(e=>(xb(n,Fi(e,ClipboardEvent)?e:null),!0)),Pe),n.registerCommand(yO,(e=>((async function(t,r){await xb(r,Fi(t,ClipboardEvent)?t:null),r.update((()=>{const i=H();B(i)?i.removeText():_t(i)&&i.getNodes().forEach((s=>s.remove()))}))})(e,n),!0)),Pe),n.registerCommand(uf,(e=>{const[,t,r]=Rc(e);return t.length>0&&!r?(n.dispatchCommand(Sb,t),!0):tl(e.target)&&QO(e.target)?!1:H()!==null&&((function(i,s){i.preventDefault(),s.update((()=>{const o=H(),l=Fi(i,InputEvent)||Fi(i,KeyboardEvent)?null:i.clipboardData;l!=null&&o!==null&&mb(l,o,s)}),{tag:nA})})(e,n),!0)}),Pe),n.registerCommand(bO,(e=>{const t=H();return B(t)&&Cd(t),!1}),Pe),n.registerCommand(pf,(e=>{const t=H();return B(t)&&Cd(t),!1}),Pe))}n5.peek=v7;var m7=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],O7={canContainEols:["highlight"],enter:{highlight:x7},exit:{highlight:b7}};function x7(n){this.enter({type:"highlight",children:[]},n)}function b7(n){this.exit(n)}var y7={unsafe:[{character:"=",inConstruct:"phrasing",notInConstruct:m7}],handlers:{highlight:n5}};function n5(n,e,t,r){const s=t.createTracker(r),o=t.enter("highlight");let l=s.move("==");return l+=s.move(t.containerPhrasing(n,{before:l,after:"=",...s.current()})),l+=s.move("=="),o(),l}function v7(){return"="}const S7=["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"],_b={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 r5(n){const e=typeof n=="string"?n.charCodeAt(0):n;return e>=48&&e<=57}function w7(n){const e=typeof n=="string"?n.charCodeAt(0):n;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}function k7(n){const e=typeof n=="string"?n.charCodeAt(0):n;return e>=97&&e<=122||e>=65&&e<=90}function Tb(n){return k7(n)||r5(n)}const C7=["","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 _7(n,e){const t=e||{},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,i=[];let s=0,o=-1,l="",a,c;t.position&&("start"in t.position||"indent"in t.position?(c=t.position.indent,a=t.position.start):a=t.position);let u=(a?a.line:0)||1,h=(a?a.column:0)||1,f=p(),d;for(s--;++s<=n.length;)if(d===10&&(h=(c?c[o]:0)||1),d=n.charCodeAt(s),d===38){const x=n.charCodeAt(s+1);if(x===9||x===10||x===12||x===32||x===38||x===60||Number.isNaN(x)||r&&x===r){l+=String.fromCharCode(d),h++;continue}const O=s+1;let b=O,y=O,S;if(x===35){y=++b;const Q=n.charCodeAt(y);Q===88||Q===120?(S="hexadecimal",y=++b):S="decimal"}else S="named";let k="",w="",C="";const T=S==="named"?Tb:S==="decimal"?r5:w7;for(y--;++y<=n.length;){const Q=n.charCodeAt(y);if(!T(Q))break;C+=String.fromCharCode(Q),S==="named"&&S7.includes(C)&&(k=C,w=sx(C))}let $=n.charCodeAt(y)===59;if($){y++;const Q=S==="named"?sx(C):!1;Q&&(k=C,w=Q)}let D=1+y-O,M="";if(!(!$&&t.nonTerminated===!1))if(!C)S!=="named"&&g(4,D);else if(S==="named"){if($&&!w)g(5,1);else if(k!==C&&(y=b+k.length,D=1+y-b,$=!1),!$){const Q=k?1:3;if(t.attribute){const F=n.charCodeAt(y);F===61?(g(Q,D),w=""):Tb(F)?w="":g(Q,D)}else g(Q,D)}M=w}else{$||g(2,D);let Q=Number.parseInt(C,S==="hexadecimal"?16:10);if(T7(Q))g(7,D),M="�";else if(Q in _b)g(6,D),M=_b[Q];else{let F="";P7(Q)&&g(6,D),Q>65535&&(Q-=65536,F+=String.fromCharCode(Q>>>10|55296),Q=56320|Q&1023),M=F+String.fromCharCode(Q)}}if(M){m(),f=p(),s=y-1,h+=y-O+1,i.push(M);const Q=p();Q.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,M,{start:f,end:Q},n.slice(O-1,y)),f=Q}else C=n.slice(O-1,y),l+=C,h+=C.length,s=y-1}else d===10&&(u++,o++,h=0),Number.isNaN(d)?m():(l+=String.fromCharCode(d),h++);return i.join("");function p(){return{line:u,column:h,offset:s+((a?a.offset:0)||0)}}function g(x,O){let b;t.warning&&(b=p(),b.column+=O,b.offset+=O,t.warning.call(t.warningContext||void 0,C7[x],b,x))}function m(){l&&(i.push(l),t.text&&t.text.call(t.textContext||void 0,l,{start:f,end:p()}),l="")}}function T7(n){return n>=55296&&n<=57343||n>1114111}function P7(n){return n>=1&&n<=8||n===11||n>=13&&n<=31||n>=127&&n<=159||n>=64976&&n<=65007||(n&65535)===65535||(n&65535)===65534}const E7=/["&'<>`]/g,Q7=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,$7=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,A7=/[|\\{}()[\]^$+*?.]/g,Pb=new WeakMap;function M7(n,e){if(n=n.replace(e.subset?L7(e.subset):E7,r),e.subset||e.escapeOnly)return n;return n.replace(Q7,t).replace($7,r);function t(i,s,o){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),e)}function r(i,s,o){return e.format(i.charCodeAt(0),o.charCodeAt(s+1),e)}}function L7(n){let e=Pb.get(n);return e||(e=R7(n),Pb.set(n,e)),e}function R7(n){const e=[];let t=-1;for(;++t<n.length;)e.push(n[t].replace(A7,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}function I7(n){return"&#x"+n.toString(16).toUpperCase()+";"}function D7(n,e){return M7(n,Object.assign({format:I7},e))}const i5=" ";function N7(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:h,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:n,mdxJsxFlowTagAttributeValueExpression:n,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:h,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:n,mdxJsxTextTagAttributeValueExpression:n,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:l,mdxJsxFlowTagNamePrimary:a,mdxJsxFlowTagNameMember:c,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:d,mdxJsxFlowTagExpressionAttributeValue:t,mdxJsxFlowTagAttributeNamePrimary:p,mdxJsxFlowTagAttributeNameLocal:g,mdxJsxFlowTagAttributeValueLiteral:m,mdxJsxFlowTagAttributeValueLiteralValue:t,mdxJsxFlowTagAttributeValueExpression:x,mdxJsxFlowTagAttributeValueExpressionValue:t,mdxJsxFlowTagSelfClosingMarker:O,mdxJsxFlowTag:b,mdxJsxTextTagClosingMarker:l,mdxJsxTextTagNamePrimary:a,mdxJsxTextTagNameMember:c,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:d,mdxJsxTextTagExpressionAttributeValue:t,mdxJsxTextTagAttributeNamePrimary:p,mdxJsxTextTagAttributeNameLocal:g,mdxJsxTextTagAttributeValueLiteral:m,mdxJsxTextTagAttributeValueLiteralValue:t,mdxJsxTextTagAttributeValueExpression:x,mdxJsxTextTagAttributeValueExpressionValue:t,mdxJsxTextTagSelfClosingMarker:O,mdxJsxTextTag:b}};function n(){this.buffer()}function e(w){return{line:w.line,column:w.column,offset:w.offset}}function t(w){this.config.enter.data.call(this,w),this.config.exit.data.call(this,w)}function r(w){const C={name:void 0,attributes:[],close:!1,selfClosing:!1,start:w.start,end:w.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=C,this.buffer()}function i(w){if(this.data.mdxJsxTagStack.length===0)throw new tn("Unexpected closing slash `/` in tag, expected an open tag first",{start:w.start,end:w.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function s(w){if(this.data.mdxJsxTag.close)throw new tn("Unexpected attribute in closing tag, expected the end of the tag",{start:w.start,end:w.end},"mdast-util-mdx-jsx:unexpected-attribute")}function o(w){if(this.data.mdxJsxTag.close)throw new tn("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:w.start,end:w.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function l(){const w=this.data.mdxJsxTag;w.close=!0}function a(w){const C=this.data.mdxJsxTag;C.name=this.sliceSerialize(w)}function c(w){const C=this.data.mdxJsxTag;C.name+="."+this.sliceSerialize(w)}function u(w){const C=this.data.mdxJsxTag;C.name+=":"+this.sliceSerialize(w)}function h(w){const C=this.data.mdxJsxTag;s.call(this,w),C.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:e(w.start),end:void 0}})}function f(w){const C=this.data.mdxJsxTag;s.call(this,w),C.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:e(w.start),end:void 0}}),this.buffer()}function d(w){const C=this.data.mdxJsxTag,T=C.attributes[C.attributes.length-1];ti(T.type==="mdxJsxExpressionAttribute");const $=w.estree;T.value=this.resume(),ti(T.position!==void 0),T.position.end=e(w.end),$&&(T.data={estree:$})}function p(w){const C=this.data.mdxJsxTag,T=C.attributes[C.attributes.length-1];ti(T.type==="mdxJsxAttribute"),T.name=this.sliceSerialize(w),ti(T.position!==void 0),T.position.end=e(w.end)}function g(w){const C=this.data.mdxJsxTag,T=C.attributes[C.attributes.length-1];ti(T.type==="mdxJsxAttribute"),T.name+=":"+this.sliceSerialize(w),ti(T.position!==void 0),T.position.end=e(w.end)}function m(w){const C=this.data.mdxJsxTag,T=C.attributes[C.attributes.length-1];T.value=_7(this.resume(),{nonTerminated:!1}),ti(T.position!==void 0),T.position.end=e(w.end)}function x(w){const C=this.data.mdxJsxTag,T=C.attributes[C.attributes.length-1];ti(T.type==="mdxJsxAttribute");const $={type:"mdxJsxAttributeValueExpression",value:this.resume()},D=w.estree;D&&($.data={estree:D}),T.value=$,ti(T.position!==void 0),T.position.end=e(w.end)}function O(){const w=this.data.mdxJsxTag;w.selfClosing=!0}function b(w){const C=this.data.mdxJsxTag,T=this.data.mdxJsxTagStack,$=T[T.length-1];if(C.close&&$.name!==C.name)throw new tn("Unexpected closing tag `"+k(C)+"`, expected corresponding closing tag for `"+k($)+"` ("+Tc($)+")",{start:w.start,end:w.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),C.close?T.pop():this.enter({type:w.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:C.name||null,attributes:C.attributes,children:[]},w,y),C.selfClosing||C.close?this.exit(w,S):T.push(C)}function y(w,C){const T=this.data.mdxJsxTagStack,$=T[T.length-1],D=w?" before the end of `"+w.type+"`":"",M=w?{start:w.start,end:w.end}:void 0;throw new tn("Expected a closing tag for `"+k($)+"` ("+Tc({start:C.start,end:C.end})+")"+D,M,"mdast-util-mdx-jsx:end-tag-mismatch")}function S(w,C){const T=this.data.mdxJsxTag;throw new tn("Expected the closing tag `"+k(T)+"` either after the end of `"+C.type+"` ("+Tc(C.end)+") or another opening tag after the start of `"+C.type+"` ("+Tc(C.start)+")",{start:w.start,end:w.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function k(w){return"<"+(w.close?"/":"")+(w.name||"")+">"}}function V7(n){const e={},t=e.quote||'"',r=e.quoteSmart||!1,i=e.tightSelfClosing||!1,s=e.printWidth||Number.POSITIVE_INFINITY,o=t==='"'?"'":'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize attribute values with `"+t+"` for `options.quote`, expected `\"`, or `'`");return l.peek=B7,{handlers:{mdxJsxFlowElement:l,mdxJsxTextElement:l},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function l(a,c,u,h){const f=a.type==="mdxJsxFlowElement",d=a.name?!a.children||a.children.length===0:!1,p=s5(u),g=o5(p),m=u.createTracker(h),x=u.createTracker(h),O=[],b=(f?g:"")+"<"+(a.name||""),y=u.enter(a.type);if(m.move(b),x.move(b),a.attributes&&a.attributes.length>0){if(!a.name)throw new Error("Cannot serialize fragment w/ attributes");let T=-1;for(;++T<a.attributes.length;){const $=a.attributes[T];let D;if($.type==="mdxJsxExpressionAttribute")D="{"+($.value||"")+"}";else{if(!$.name)throw new Error("Cannot serialize attribute w/o name");const M=$.value,Q=$.name;let F="";if(M!=null)if(typeof M=="object")F="{"+(M.value||"")+"}";else{const j=r&&ox(M,t)>ox(M,o)?o:t;F=j+D7(M,{subset:[j]})+j}D=Q+(F?"=":"")+F}O.push(D)}}let S=!1;const k=O.join(" ");f&&(/\r?\n|\r/.test(k)||m.current().now.column+k.length+(d?i?2:3:1)>s)&&(S=!0);let w=m,C=b;if(S){w=x;let T=-1;for(;++T<O.length;)O[T]=g+i5+O[T];C+=w.move(`
34
+ `+O.join(`
35
+ `)+`
36
+ `+g)}else k&&(C+=w.move(" "+k));return d&&(C+=w.move((i||S?"":" ")+"/")),C+=w.move(">"),a.children&&a.children.length>0&&(a.type==="mdxJsxTextElement"?C+=w.move(u.containerPhrasing(a,{...w.current(),before:">",after:"<"})):(w.shift(2),C+=w.move(`
37
+ `),C+=w.move(Z7(a,u,w.current())),C+=w.move(`
38
+ `))),d||(C+=w.move((f?g:"")+"</"+(a.name||"")+">")),y(),C}}function Z7(n,e,t){const r=e.indexStack,i=n.children,s=e.createTracker(t),o=o5(s5(e)),l=[];let a=-1;for(r.push(-1);++a<i.length;){const c=i[a];r[r.length-1]=a;const u={before:`
39
+ `,after:`
40
+ `,...s.current()},h=e.handle(c,n,e,u),f=c.type==="mdxJsxFlowElement"?h:e.indentLines(h,function(d,p,g){return(g?"":o)+d});l.push(s.move(f)),c.type!=="list"&&(e.bulletLastUsed=void 0),a<i.length-1&&l.push(s.move(`
41
+
42
+ `))}return r.pop(),l.join("")}function s5(n){let e=0,t=n.stack.length;for(;--t>-1;){const r=n.stack[t];if(r==="blockquote"||r==="listItem")break;r==="mdxJsxFlowElement"&&e++}return e}function o5(n){return i5.repeat(n)}function B7(){return"<"}var Eb=Object.prototype.hasOwnProperty;function Qb(n,e,t){for(t of n.keys())if(Ul(t,e))return t}function Ul(n,e){var t,r,i;if(n===e)return!0;if(n&&e&&(t=n.constructor)===e.constructor){if(t===Date)return n.getTime()===e.getTime();if(t===RegExp)return n.toString()===e.toString();if(t===Array){if((r=n.length)===e.length)for(;r--&&Ul(n[r],e[r]););return r===-1}if(t===Set){if(n.size!==e.size)return!1;for(r of n)if(i=r,i&&typeof i=="object"&&(i=Qb(e,i),!i)||!e.has(i))return!1;return!0}if(t===Map){if(n.size!==e.size)return!1;for(r of n)if(i=r[0],i&&typeof i=="object"&&(i=Qb(e,i),!i)||!Ul(r[1],e.get(i)))return!1;return!0}if(t===ArrayBuffer)n=new Uint8Array(n),e=new Uint8Array(e);else if(t===DataView){if((r=n.byteLength)===e.byteLength)for(;r--&&n.getInt8(r)===e.getInt8(r););return r===-1}if(ArrayBuffer.isView(n)){if((r=n.byteLength)===e.byteLength)for(;r--&&n[r]===e[r];);return r===-1}if(!t||typeof n=="object"){r=0;for(t in n)if(Eb.call(n,t)&&++r&&!Eb.call(e,t)||!(t in e)||!Ul(n[t],e[t]))return!1;return Object.keys(e).length===r}}return n!==n&&e!==e}var F7={};let yg,l5,a5,c5,u5=!0;typeof process<"u"&&({FORCE_COLOR:yg,NODE_DISABLE_COLORS:l5,NO_COLOR:a5,TERM:c5}=F7||{},u5=process.stdout&&process.stdout.isTTY);const Ae={enabled:!l5&&a5==null&&c5!=="dumb"&&(yg!=null&&yg!=="0"||u5),reset:Ke(0,0),bold:Ke(1,22),dim:Ke(2,22),italic:Ke(3,23),underline:Ke(4,24),inverse:Ke(7,27),hidden:Ke(8,28),strikethrough:Ke(9,29),black:Ke(30,39),red:Ke(31,39),green:Ke(32,39),yellow:Ke(33,39),blue:Ke(34,39),magenta:Ke(35,39),cyan:Ke(36,39),white:Ke(37,39),gray:Ke(90,39),grey:Ke(90,39),bgBlack:Ke(40,49),bgRed:Ke(41,49),bgGreen:Ke(42,49),bgYellow:Ke(43,49),bgBlue:Ke(44,49),bgMagenta:Ke(45,49),bgCyan:Ke(46,49),bgWhite:Ke(47,49)};function $b(n,e){let t=0,r,i="",s="";for(;t<n.length;t++)r=n[t],i+=r.open,s+=r.close,~e.indexOf(r.close)&&(e=e.replace(r.rgx,r.close+r.open));return i+e+s}function X7(n,e){let t={has:n,keys:e};return t.reset=Ae.reset.bind(t),t.bold=Ae.bold.bind(t),t.dim=Ae.dim.bind(t),t.italic=Ae.italic.bind(t),t.underline=Ae.underline.bind(t),t.inverse=Ae.inverse.bind(t),t.hidden=Ae.hidden.bind(t),t.strikethrough=Ae.strikethrough.bind(t),t.black=Ae.black.bind(t),t.red=Ae.red.bind(t),t.green=Ae.green.bind(t),t.yellow=Ae.yellow.bind(t),t.blue=Ae.blue.bind(t),t.magenta=Ae.magenta.bind(t),t.cyan=Ae.cyan.bind(t),t.white=Ae.white.bind(t),t.gray=Ae.gray.bind(t),t.grey=Ae.grey.bind(t),t.bgBlack=Ae.bgBlack.bind(t),t.bgRed=Ae.bgRed.bind(t),t.bgGreen=Ae.bgGreen.bind(t),t.bgYellow=Ae.bgYellow.bind(t),t.bgBlue=Ae.bgBlue.bind(t),t.bgMagenta=Ae.bgMagenta.bind(t),t.bgCyan=Ae.bgCyan.bind(t),t.bgWhite=Ae.bgWhite.bind(t),t}function Ke(n,e){let t={open:`\x1B[${n}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(n)||(this.has.push(n),this.keys.push(t)),r===void 0?this:Ae.enabled?$b(this.keys,r+""):r+""):r===void 0?X7([n],[t]):Ae.enabled?$b([t],r+""):r+""}}function rs(){}rs.prototype={diff:function(e,t){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.callback;typeof i=="function"&&(s=i,i={}),this.options=i;var o=this;function l(y){return s?(setTimeout(function(){s(void 0,y)},0),!0):y}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var a=t.length,c=e.length,u=1,h=a+c;i.maxEditLength&&(h=Math.min(h,i.maxEditLength));var f=(r=i.timeout)!==null&&r!==void 0?r:1/0,d=Date.now()+f,p=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(p[0],t,e,0);if(p[0].oldPos+1>=c&&g+1>=a)return l([{value:this.join(t),count:t.length}]);var m=-1/0,x=1/0;function O(){for(var y=Math.max(m,-u);y<=Math.min(x,u);y+=2){var S=void 0,k=p[y-1],w=p[y+1];k&&(p[y-1]=void 0);var C=!1;if(w){var T=w.oldPos-y;C=w&&0<=T&&T<a}var $=k&&k.oldPos+1<c;if(!C&&!$){p[y]=void 0;continue}if(!$||C&&k.oldPos+1<w.oldPos?S=o.addToPath(w,!0,void 0,0):S=o.addToPath(k,void 0,!0,1),g=o.extractCommon(S,t,e,y),S.oldPos+1>=c&&g+1>=a)return l(z7(o,S.lastComponent,t,e,o.useLongestToken));p[y]=S,S.oldPos+1>=c&&(x=Math.min(x,y-1)),g+1>=a&&(m=Math.max(m,y+1))}u++}if(s)(function y(){setTimeout(function(){if(u>h||Date.now()>d)return s();O()||y()},0)})();else for(;u<=h&&Date.now()<=d;){var b=O();if(b)return b}},addToPath:function(e,t,r,i){var s=e.lastComponent;return s&&s.added===t&&s.removed===r?{oldPos:e.oldPos+i,lastComponent:{count:s.count+1,added:t,removed:r,previousComponent:s.previousComponent}}:{oldPos:e.oldPos+i,lastComponent:{count:1,added:t,removed:r,previousComponent:s}}},extractCommon:function(e,t,r,i){for(var s=t.length,o=r.length,l=e.oldPos,a=l-i,c=0;a+1<s&&l+1<o&&this.equals(t[a+1],r[l+1]);)a++,l++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=l,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function z7(n,e,t,r,i){for(var s=[],o;e;)s.push(e),o=e.previousComponent,delete e.previousComponent,e=o;s.reverse();for(var l=0,a=s.length,c=0,u=0;l<a;l++){var h=s[l];if(h.removed){if(h.value=n.join(r.slice(u,u+h.count)),u+=h.count,l&&s[l-1].added){var d=s[l-1];s[l-1]=s[l],s[l]=d}}else{if(!h.added&&i){var f=t.slice(c,c+h.count);f=f.map(function(g,m){var x=r[u+m];return x.length>g.length?x:g}),h.value=n.join(f)}else h.value=n.join(t.slice(c,c+h.count));c+=h.count,h.added||(u+=h.count)}}var p=s[a-1];return a>1&&typeof p.value=="string"&&(p.added||p.removed)&&n.equals("",p.value)&&(s[a-2].value+=p.value,s.pop()),s}var Ab=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Mb=/\S/,h5=new rs;h5.equals=function(n,e){return this.options.ignoreCase&&(n=n.toLowerCase(),e=e.toLowerCase()),n===e||this.options.ignoreWhitespace&&!Mb.test(n)&&!Mb.test(e)};h5.tokenize=function(n){for(var e=n.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),t=0;t<e.length-1;t++)!e[t+1]&&e[t+2]&&Ab.test(e[t])&&Ab.test(e[t+2])&&(e[t]+=e[t+2],e.splice(t+1,2),t--);return e};var f5=new rs;f5.tokenize=function(n){this.options.stripTrailingCr&&(n=n.replace(/\r\n/g,`
43
+ `));var e=[],t=n.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(var r=0;r<t.length;r++){var i=t[r];r%2&&!this.options.newlineIsToken?e[e.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),e.push(i))}return e};var W7=new rs;W7.tokenize=function(n){return n.split(/(\S.+?[.!?])(?=\s+|$)/)};var j7=new rs;j7.tokenize=function(n){return n.split(/([{}:;,]|\s+)/)};function Cu(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cu=function(e){return typeof e}:Cu=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cu(n)}var q7=Object.prototype.toString,va=new rs;va.useLongestToken=!0;va.tokenize=f5.tokenize;va.castInput=function(n){var e=this.options,t=e.undefinedReplacement,r=e.stringifyReplacer,i=r===void 0?function(s,o){return typeof o>"u"?t:o}:r;return typeof n=="string"?n:JSON.stringify(vg(n,null,null,i),i," ")};va.equals=function(n,e){return rs.prototype.equals.call(va,n.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};function vg(n,e,t,r,i){e=e||[],t=t||[],r&&(n=r(i,n));var s;for(s=0;s<e.length;s+=1)if(e[s]===n)return t[s];var o;if(q7.call(n)==="[object Array]"){for(e.push(n),o=new Array(n.length),t.push(o),s=0;s<n.length;s+=1)o[s]=vg(n[s],e,t,r,i);return e.pop(),t.pop(),o}if(n&&n.toJSON&&(n=n.toJSON()),Cu(n)==="object"&&n!==null){e.push(n),o={},t.push(o);var l=[],a;for(a in n)n.hasOwnProperty(a)&&l.push(a);for(l.sort(),s=0;s<l.length;s+=1)a=l[s],o[a]=vg(n[a],e,t,r,a);e.pop(),t.pop()}else o=n;return o}var Sg=new rs;Sg.tokenize=function(n){return n.slice()};Sg.join=Sg.removeEmpty=function(n){return n};Ae.red,Ae.grey,Ae.green;Ae.dim().italic;Ae.dim("→");Ae.dim("·");Ae.dim("↵");function uh(n){n=n.replace(/\r?\n/g,`
44
+ `);let e=n.match(/^[ \t]*(?=\S)/gm),t=0,r=1/0,i=(e||[]).length;for(;t<i;t++)r=Math.min(r,e[t].length);return i&&r?n.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):n}class Y7 extends Error{constructor(e={}){super(e.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=e.details||!1,this.generated=!!e.generated,this.operator=e.operator,this.expects=e.expects,this.actual=e.actual}}function qn(n,e,t,r,i,s,o){if(n)return;let l=o||s;if(o instanceof Error)throw o;let a=i;throw new Y7({actual:e,expects:t,operator:r,message:l,details:a,generated:!o})}function H7(n,e){qn(!!n,!1,!0,"ok",!1,"Expected value to be truthy",e)}function vi(n,e){qn(!n,!0,!1,"not",!1,"Expected value to be falsey",e)}vi.ok=vi;vi.equal=function(n,e,t){qn(!Ul(n,e),n,e,"not.equal",!1,"Expected values not to be deeply equal",t)};vi.type=function(n,e,t){let r=typeof n;qn(r!==e,r,e,"not.type",!1,`Expected "${r}" not to be "${e}"`,t)};vi.instance=function(n,e,t){let r="`"+(e.name||e.constructor.name)+"`";qn(!(n instanceof e),n,e,"not.instance",!1,`Expected value not to be an instance of ${r}`,t)};vi.snapshot=function(n,e,t){n=uh(n),e=uh(e),qn(n!==e,n,e,"not.snapshot",!1,"Expected value not to match snapshot",t)};vi.fixture=function(n,e,t){n=uh(n),e=uh(e),qn(n!==e,n,e,"not.fixture",!1,"Expected value not to match fixture",t)};vi.match=function(n,e,t){typeof e=="string"?qn(!n.includes(e),n,e,"not.match",!1,`Expected value not to include "${e}" substring`,t):qn(!e.test(n),n,e,"not.match",!1,`Expected value not to match \`${String(e)}\` pattern`,t)};vi.throws=function(n,e,t){!t&&typeof e=="string"&&(t=e,e=null);try{n()}catch(r){typeof e=="function"?qn(!e(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",t):e instanceof RegExp?qn(!e.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(e)}\` pattern`,t):e||qn(!1,!0,!1,"not.throws",!1,"Expected function not to throw",t)}};const Wt={eof:null,exclamationMark:33,dash:45,equalsTo:61,greaterThan:62},Lb={attentionSideAfter:2},ui={data:"data",lineEnding:"lineEnding",linePrefix:"linePrefix",characterEscape:"characterEscape"};var vl="highlightSequenceTemporary",Rb="highlightSequence",U7="highlight",G7="highlightText";function K7(){const n={name:"highlight",tokenize:t,resolveAll:e};return{text:{[Wt.equalsTo]:n},insideSpan:{null:[n]},attentionMarkers:{null:[Wt.equalsTo]}};function e(r,i){let s=-1;for(;++s<r.length;)if(r[s][0]==="enter"&&r[s][1].type===vl&&r[s][1]._close){let o=s;for(;o--;)if(r[o][0]==="exit"&&r[o][1].type===vl&&r[o][1]._open&&r[s][1].end.offset-r[s][1].start.offset===r[o][1].end.offset-r[o][1].start.offset){r[s][1].type=Rb,r[o][1].type=Rb;const l={type:U7,start:Object.assign({},r[o][1].start),end:Object.assign({},r[s][1].end)},a={type:G7,start:Object.assign({},r[o][1].end),end:Object.assign({},r[s][1].start)},c=[["enter",l,i],["enter",r[o][1],i],["exit",r[o][1],i],["enter",a,i]],u=i.parser.constructs.insideSpan.null;u&&cd(c,c.length,0,J$(u,r.slice(o+1,s),i)),cd(c,c.length,0,[["exit",a,i],["enter",r[s][1],i],["exit",r[s][1],i],["exit",l,i]]),cd(r,o-1,s-o+3,c),s=o+c.length-2;break}}for(s=-1;++s<r.length;)r[s][1].type===vl&&(r[s][1].type=ui.data);return r}function t(r,i,s){const o=this.previous,l=this.events;let a=0;return c;function c(h){return H7(h===Wt.equalsTo,"expected `=`"),o===Wt.equalsTo&&l[l.length-1][1].type!==ui.characterEscape?s(h):(r.enter(vl),u(h))}function u(h){const f=lx(o);if(h===Wt.equalsTo)return a>1?s(h):(r.consume(h),a++,u);if(a<2)return s(h);const d=r.exit(vl),p=lx(h);return d._open=!p||p===Lb.attentionSideAfter&&!!f,d._close=!f||f===Lb.attentionSideAfter&&!!p,i(h)}}}const J7={}.hasOwnProperty,e8=Symbol("continue"),_d=Symbol("exit"),t8=Symbol("skip");function n8(n,e){let t,r;typeof e=="function"?t=e:e&&typeof e=="object"&&(e.enter&&(t=e.enter),e.leave&&(r=e.leave)),i(n,void 0,void 0,[])();function i(s,o,l,a){return Td(s)&&(c.displayName="node ("+s.type+")"),c;function c(){const u=t?Ib(t(s,o,l,a)):[];if(u[0]===_d)return u;if(u[0]!==t8){let h;for(h in s)if(J7.call(s,h)&&s[h]&&typeof s[h]=="object"&&h!=="data"&&h!=="position"){const f=a.concat(s),d=s[h];if(Array.isArray(d)){const p=d;let g=0;for(;g>-1&&g<p.length;){const m=p[g];if(Td(m)){const x=i(m,h,g,f)();if(x[0]===_d)return x;g=typeof x[1]=="number"?x[1]:g+1}else g++}}else if(Td(d)){const p=i(d,h,void 0,f)();if(p[0]===_d)return p}}}return r?Ib(r(s,o,l,a)):u}}}function Ib(n){return Array.isArray(n)?n:typeof n=="number"?[e8,n]:[n]}function Td(n){return!!(n&&typeof n=="object"&&"type"in n&&typeof n.type=="string"&&n.type.length>0)}function r8(n,e){const t=e.prefix||"",r=e.suffix||"",i=Object.assign({},e.acornOptions),s=[],o=[],l=i.onComment,a=i.onToken;let c=!1,u,h;const f=Object.assign({},i,{onComment:s,preserveParens:!0});a&&(f.onToken=o);const d=i8(n,e.tokenTypes),p=d.value,g=t+p+r,m=Db(p);if(m&&!e.allowEmpty)throw new tn("Unexpected empty expression",{place:O(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{u=e.expression&&!m?e.acorn.parseExpressionAt(g,0,f):e.acorn.parse(g,f)}catch(b){const y=b,S=O(y.pos);y.message=String(y.message).replace(/ \(\d+:\d+\)$/,""),y.pos=S.offset,y.loc={line:S.line,column:S.column-1},h=y,c=y.raisedAt>=t.length+p.length||y.message==="Unterminated comment"}if(u&&e.expression&&!m)if(Db(g.slice(u.end,g.length-r.length)))u={type:"Program",start:0,end:t.length+p.length,body:[{type:"ExpressionStatement",expression:u,start:0,end:t.length+p.length}],sourceType:"module",comments:[]};else{const b=O(u.end),y=new Error("Unexpected content after expression");y.pos=b.offset,y.loc={line:b.line,column:b.column-1},h=y,u=void 0}if(u){if(u.comments=s,n8(u,function(b,y,S,k){let w=k[k.length-1],C=y;b.type==="ParenthesizedExpression"&&w&&C&&(typeof S=="number"&&(w=w[C],C=S),w[C]=b.expression),x(b)}),Array.isArray(l))l.push(...s);else if(typeof l=="function")for(const b of s)l(b.type==="Block",b.value,b.start,b.end,b.loc.start,b.loc.end);for(const b of o)b.end<=t.length||b.start-t.length>=p.length||(x(b),Array.isArray(a)?a.push(b):a(b))}return{estree:u,error:h,swallow:c};function x(b){const y=O(b.start),S=O(b.end);b.start=y.offset,b.end=S.offset,b.loc={start:{line:y.line,column:y.column-1,offset:y.offset},end:{line:S.line,column:S.column-1,offset:S.offset}},b.range=[b.start,b.end]}function O(b){let y=b-t.length;y<0?y=0:y>p.length&&(y=p.length);let S=s8(d.stops,y);return S||(S={line:e.start.line,column:e.start.column,offset:e.start.offset}),S}}function Db(n){return/^\s*$/.test(n.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function i8(n,e){const t={value:"",stops:[]};let r=-1;for(;++r<n.length;){const i=n[r];if(i[0]==="enter"){const s=i[1].type;if(s==="lineEnding"||e.includes(s)){const o=i[2].sliceStream(i[1]);for(;o.length>0&&o[0]===-1;)o.shift();const l=o8(o);t.stops.push([t.value.length,i[1].start]),t.value+=l,t.stops.push([t.value.length,i[1].end])}}}return t}function s8(n,e){let t=0;for(;t<n.length&&n[t][0]<=e;)t+=1;if(t===0)return;const[r,i]=n[t-1],s=e-r;return{line:i.line,column:i.column+s,offset:i.offset+s}}function o8(n){let e=-1;const t=[];let r;for(;++e<n.length;){const i=n[e];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
45
+ `;break}case-3:{s=`\r
46
+ `;break}case-2:{s=" ";break}case-1:{if(r)continue;s=" ";break}default:s=String.fromCharCode(i)}r=i===-2,t.push(s)}return t.join("")}function Pd(n){const e=n||{},t=e.loc||{},r=e.range||[void 0,void 0],i=Nb(t.start,r[0]||e.start),s=Nb(t.end,r[1]||e.end);if(i&&s)return{start:i,end:s}}function Nb(n,e){if(n&&typeof n=="object"){const t="line"in n?Ed(n.line):void 0,r="column"in n?Ed(n.column):void 0;if(t&&r!==void 0)return{line:t,column:r+1,offset:Ed(e)}}}function Ed(n){return typeof n=="number"&&n>-1?n:void 0}const l8=2,co="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",a8="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",c8="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",Vb="#unexpected-type-in-code-expected-an-object-spread-spread",u8="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",h8="#could-not-parse-expression-with-acorn";function Zb(n,e,t,r,i,s,o,l,a,c,u){const h=this,f=this.events.length+3;let d=0,p,g;return m;function m(y){return n.enter(t),n.enter(r),n.consume(y),n.exit(r),p=h.now(),x}function x(y){if(y===null){if(g)throw g;const S=new tn("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:h.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw S.url=co+a8,S}if(Dr(y))return n.enter("lineEnding"),n.consume(y),n.exit("lineEnding"),b;if(y===125&&d===0){const S=s?f8.call(h,s,o,i,f,p,c||!1,a||!1):{type:"ok",estree:void 0};if(S.type==="ok"){n.enter(r),n.consume(y),n.exit(r);const k=n.exit(t);return l&&S.estree&&Object.assign(k,{estree:S.estree}),e}return g=S.message,n.enter(i),n.consume(y),O}return n.enter(i),O(y)}function O(y){return y===125&&d===0||y===null||Dr(y)?(n.exit(i),x(y)):(y===123&&!s?d+=1:y===125&&(d-=1),n.consume(y),O)}function b(y){const S=h.now();if(S.line!==p.line&&!u&&h.parser.lazy[S.line]){const k=new tn("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:h.now(),ruleId:"unexpected-lazy",source:"micromark-extension-mdx-expression"});throw k.url=co+c8,k}return zu(y)?tO(n,x,"linePrefix",l8+1)(y):x(y)}}function f8(n,e,t,r,i,s,o){const l=r8(this.events.slice(r),{acorn:n,tokenTypes:[t],acornOptions:e,start:i,expression:!0,allowEmpty:s,prefix:o?"({":"",suffix:o?"})":""}),a=l.estree;if(o&&a){const c=a.body[0];if(c.type!=="ExpressionStatement"||c.expression.type!=="ObjectExpression"){const u=Pd(c),h=new tn("Unexpected `"+c.type+"` in code: expected an object spread (`{...spread}`)",{place:u.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw h.url=co+Vb,h}if(c.expression.properties[1]){const u=Pd(c.expression.properties[1]),h=new tn("Unexpected extra content in spread: only a single spread is supported",{place:u.start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw h.url=co+u8,h}if(c.expression.properties[0]&&c.expression.properties[0].type!=="SpreadElement"){const u=Pd(c.expression.properties[0]),h=new tn("Unexpected `"+c.expression.properties[0].type+"` in code: only spread elements are supported",{place:u.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw h.url=co+Vb,h}}if(l.error){const c=new tn("Could not parse expression with acorn",{cause:l.error,place:{line:l.error.loc.line,column:l.error.loc.column+1,offset:l.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return c.url=co+h8,{type:"nok",message:c}}return{type:"ok",estree:a}}const Bb="https://github.com/micromark/micromark-extension-mdx-jsx";function d5(n,e,t,r,i,s,o,l,a,c,u,h,f,d,p,g,m,x,O,b,y,S,k,w,C,T,$,D,M,Q,F,j){const fe=this;let ee,be;return xe;function xe(P){return n.enter(l),n.enter(a),n.consume(P),n.exit(a),_e}function _e(P){return cs(P)?t(P):(ee=Ze,W(P))}function Ze(P){if(P===47)return n.enter(c),n.consume(P),n.exit(c),ee=Te,W;if(P===62)return R(P);if(P!==null&&P>=0&&rr(P))return n.enter(h),n.enter(f),n.consume(P),Be;te(P,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(P===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function Te(P){if(P===62)return R(P);if(P!==null&&P>=0&&rr(P))return n.enter(h),n.enter(f),n.consume(P),Be;te(P,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(P===42||P===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function Be(P){if(P!==null&&P>=0&&xl(P,{jsx:!0}))return n.consume(P),Be;if(P===46||P===47||P===58||P===62||P===123||cs(P)||Li(P))return n.exit(f),ee=Re,W(P);te(P,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(P===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function Re(P){if(P===46)return n.enter(d),n.consume(P),n.exit(d),ee=Le,W;if(P===58)return n.enter(g),n.consume(P),n.exit(g),ee=he,W;if(P===47||P===62||P===123||P!==null&&P>=0&&rr(P))return n.exit(h),Fe(P);te(P,"after name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Le(P){if(P!==null&&P>=0&&rr(P))return n.enter(p),n.consume(P),$e;te(P,"before member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function $e(P){if(P!==null&&P>=0&&xl(P,{jsx:!0}))return n.consume(P),$e;if(P===46||P===47||P===62||P===123||cs(P)||Li(P))return n.exit(p),ee=pe,W(P);te(P,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(P===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function pe(P){if(P===46)return n.enter(d),n.consume(P),n.exit(d),ee=Le,W;if(P===47||P===62||P===123||P!==null&&P>=0&&rr(P))return n.exit(h),Fe(P);te(P,"after member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function he(P){if(P!==null&&P>=0&&rr(P))return n.enter(m),n.consume(P),ge;te(P,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(P===43||P!==null&&P>46&&P<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function ge(P){if(P!==null&&P>=0&&xl(P,{jsx:!0}))return n.consume(P),ge;if(P===47||P===62||P===123||cs(P)||Li(P))return n.exit(m),ee=Se,W(P);te(P,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Se(P){if(P===47||P===62||P===123||P!==null&&P>=0&&rr(P))return n.exit(h),Fe(P);te(P,"after local name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Fe(P){if(P===47)return n.enter(u),n.consume(P),n.exit(u),ee=A,W;if(P===62)return R(P);if(P===123)return Zb.call(fe,n,It,x,O,b,r,i,s,!0,!1,o)(P);if(P!==null&&P>=0&&rr(P))return n.enter(y),n.enter(S),n.enter(k),n.consume(P),Pt;te(P,"before attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function It(P){return ee=Fe,W(P)}function Pt(P){if(P!==null&&P>=0&&xl(P,{jsx:!0}))return n.consume(P),Pt;if(P===47||P===58||P===61||P===62||P===123||cs(P)||Li(P))return n.exit(k),ee=Vn,W(P);te(P,"in attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Vn(P){if(P===58)return n.enter(w),n.consume(P),n.exit(w),ee=an,W;if(P===61)return n.exit(S),n.enter(T),n.consume(P),n.exit(T),ee=Mi,W;if(P===47||P===62||P===123||cs(P)||Li(P)||P!==null&&P>=0&&rr(P))return n.exit(S),n.exit(y),ee=Fe,W(P);te(P,"after attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function an(P){if(P!==null&&P>=0&&rr(P))return n.enter(C),n.consume(P),cn;te(P,"before local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function cn(P){if(P!==null&&P>=0&&xl(P,{jsx:!0}))return n.consume(P),cn;if(P===47||P===61||P===62||P===123||cs(P)||Li(P))return n.exit(C),n.exit(S),ee=Zn,W(P);te(P,"in local attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Zn(P){if(P===61)return n.enter(T),n.consume(P),n.exit(T),ee=Mi,W;if(P===47||P===62||P===123||P!==null&&P>=0&&rr(P))return n.exit(y),Fe(P);te(P,"after local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Mi(P){if(P===34||P===39)return n.enter($),n.enter(D),n.consume(P),n.exit(D),be=P,wr;if(P===123)return Zb.call(fe,n,nr,Q,F,j,r,i,s,!1,!1,o)(P);te(P,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(P===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":""))}function nr(P){return n.exit(y),ee=Fe,W(P)}function wr(P){return P===null&&te(P,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(be)+"`"),P===be?(n.enter(D),n.consume(P),n.exit(D),n.exit($),n.exit(y),be=void 0,ee=Fe,W):Dr(P)?(ee=wr,W(P)):(n.enter(M),E(P))}function E(P){return P===null||P===be||Dr(P)?(n.exit(M),wr(P)):(n.consume(P),E)}function A(P){if(P===62)return R(P);te(P,"after self-closing slash","`>` to end the tag"+(P===42||P===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function R(P){return n.enter(a),n.consume(P),n.exit(a),n.exit(l),e}function W(P){return Dr(P)?(n.enter("lineEnding"),n.consume(P),n.exit("lineEnding"),Y):zu(P)||Li(P)?(n.enter("esWhitespace"),q(P)):ee(P)}function q(P){return Dr(P)?(n.exit("esWhitespace"),W(P)):zu(P)||Li(P)?(n.consume(P),q):(n.exit("esWhitespace"),ee(P))}function Y(P){if(!o&&fe.parser.lazy[fe.now().line]){const ke=new tn("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",fe.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw ke.url=Bb+"#unexpected-lazy-line-in-container-expected-line-to-be",ke}return W(P)}function te(P,ke,Ge){const at=new tn("Unexpected "+(P===null?"end of file":"character `"+(P===96?"` ` `":String.fromCodePoint(P))+"` ("+d8(P)+")")+" "+ke+", expected "+Ge,fe.now(),"micromark-extension-mdx-jsx:unexpected-"+(P===null?"eof":"character"));throw at.url=Bb+(P===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),at}}function d8(n){return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function p8(n,e){return{name:"mdxJsxTextTag",tokenize:t};function t(r,i,s){return d5.call(this,r,i,s,n,e.acornOptions,e.addResult,!0,"mdxJsxTextTag","mdxJsxTextTagMarker","mdxJsxTextTagClosingMarker","mdxJsxTextTagSelfClosingMarker","mdxJsxTextTagName","mdxJsxTextTagNamePrimary","mdxJsxTextTagNameMemberMarker","mdxJsxTextTagNameMember","mdxJsxTextTagNamePrefixMarker","mdxJsxTextTagNameLocal","mdxJsxTextTagExpressionAttribute","mdxJsxTextTagExpressionAttributeMarker","mdxJsxTextTagExpressionAttributeValue","mdxJsxTextTagAttribute","mdxJsxTextTagAttributeName","mdxJsxTextTagAttributeNamePrimary","mdxJsxTextTagAttributeNamePrefixMarker","mdxJsxTextTagAttributeNameLocal","mdxJsxTextTagAttributeInitializerMarker","mdxJsxTextTagAttributeValueLiteral","mdxJsxTextTagAttributeValueLiteralMarker","mdxJsxTextTagAttributeValueLiteralValue","mdxJsxTextTagAttributeValueExpression","mdxJsxTextTagAttributeValueExpressionMarker","mdxJsxTextTagAttributeValueExpressionValue")}}function g8(n,e){return{concrete:!0,name:"mdxJsxFlowTag",tokenize:t};function t(r,i,s){const o=this;return l;function l(h){return a(h)}function a(h){return d5.call(o,r,c,s,n,e.acornOptions,e.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(h)}function c(h){return zu(h)?tO(r,u,"whitespace")(h):u(h)}function u(h){const f=o.parser.constructs.flow[123],d=Array.isArray(f)?f:f?[f]:[];let p;for(const g of d)if(g.name==="mdxFlowExpression"){p=g;break}return h===60?l(h):h===123&&p?r.attempt(p,u,s)(h):h===null||Dr(h)?i(h):s(h)}}}function m8(n){const e={},t=e.acorn;let r;if(t){if(!t.parse||!t.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:"module"},e.acornOptions,{locations:!0})}else if(e.acornOptions||e.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:g8(t||void 0,{acornOptions:r,addResult:e.addResult||void 0})},text:{60:p8(t||void 0,{acornOptions:r,addResult:e.addResult||void 0})}}}function O8(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}const x8=["mdxJsxTextElement","mdxJsxFlowElement"];function p5(n){return x8.includes(n.type)&&b8.includes(n.name.toLowerCase())}const b8=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","input","ins","kbd","label","legend","li","link","main","map","mark","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function y8(n,e){const t=Fb(n),r=Fb(e),i={...t,...r};return v8(i)}function Fb(n){const e={};return n.split(";").filter(r=>r.trim()!=="").forEach(r=>{const[i,s]=r.split(":").map(o=>o.trim());e[i]=s}),e}function v8(n){return Object.entries(n).map(([e,t])=>`${e}: ${t}`).join("; ")}function S8(n){return n.children instanceof Array}function g5({root:n,visitors:e,jsxComponentDescriptors:t,jsxIsAvailable:r,addImportStatements:i=!0}){let s=null;const o=new Set,l=new Map;e=e.sort((x,O)=>(O.priority??0)-(x.priority??0)),h(n,null);function a(x,O){o.add(x),O&&l.set(x,{...O})}function c(x,O){if(s===null)return s=O,s;if(!S8(x))throw new Error("Attempting to append children to a non-parent");const b=x.children,y=b.at(-1);if(y){const S=e.find(k=>{var w;return(w=k.shouldJoin)==null?void 0:w.call(k,y,O)});if(S){const k=S.join(y,O);return b.splice(b.length-1,1,k),k}}return b.push(O),O}function u(x,O){x.getChildren().forEach(b=>{h(b,O)})}function h(x,O,b=null){var y;const S=e.find((k,w)=>{var C;return b?.has(w)?!1:(C=k.testLexicalNode)==null?void 0:C.call(k,x)});if(!S)throw new Error(`no lexical visitor found for ${x.getType()}`,{cause:x});(y=S.visitLexicalNode)==null||y.call(S,{lexicalNode:x,mdastParent:O,actions:{addAndStepInto(k,w={},C=!0){const T={type:k,...w,...C?{children:[]}:{}};c(O,T),I(x)&&C&&u(x,T)},appendToParent:c,visitChildren:u,visit:h,registerReferredComponent:a,nextVisitor(){h(x,O,(b??new Set).add(e.indexOf(S)))}}})}if(s===null)throw new Error("traversal ended with no root element");const f=new Map,d=new Map;for(const x of o){const O=t.find(b=>b.name===x)??l.get(x)??t.find(b=>b.name==="*");if(!O)throw new Error(`Component ${x} is used but not imported`);if(O.source)if(O.defaultExport)d.set(x,O.source);else{const{source:b}=O,y=f.get(b);y?y.push(x):f.set(b,[x])}}if(!i){for(const[x,O]of f.entries()){const b=O.filter(y=>l.has(y));b.length>0?f.set(x,b):f.delete(x)}for(const x of d.keys())l.has(x)||d.delete(x)}const p=Array.from(f).map(([x,O])=>({type:"mdxjsEsm",value:`import { ${O.join(", ")} } from '${x}'`}));p.push(...Array.from(d).map(([x,O])=>({type:"mdxjsEsm",value:`import ${x} from '${O}'`})));const g=s,m=g.children.find(x=>x.type==="yaml");return m?g.children.splice(g.children.indexOf(m)+1,0,...p):g.children.unshift(...p),_u(g,[]),m5(g),r||O5(g),g}function m5(n){if("children"in n&&n.children.length>0){if(p5(n)&&n.children.length===1){const e=n.children[0];e.type==="mdxJsxTextElement"&&e.name==="span"&&(e.attributes.forEach(t=>{if(t.type==="mdxJsxAttribute"){const r=n.attributes.find(i=>i.type==="mdxJsxAttribute"&&i.name===t.name);if(r)if(t.name==="className"){const i=new Set([...r.value.split(" "),...t.value.split(" ")]);r.value=Array.from(i).join(" ")}else t.name==="style"&&(r.value=y8(r.value,t.value));else n.attributes.push(t)}}),n.children=e.children)}n.children.forEach(e=>{m5(e)})}}function O5(n){if(Object.hasOwn(n,"children")){const e=n,t=[];e.children.forEach(r=>{r.type==="mdxJsxTextElement"&&r.name==="u"?t.push({type:"html",value:"<u>"},...r.children,{type:"html",value:"</u>"}):(t.push(r),O5(r))}),e.children=t}}const Xb=/\s+$/,zb=/^\s+/;function _u(n,e){if(n.type==="strong"||n.type==="emphasis"){const t=n.children.at(-1);if(t?.type==="text"){const i=Xb.exec(t.value);if(i){t.value=t.value.replace(Xb,"");const s=e.at(-1);s&&(s.children.splice(s.children.indexOf(n)+1,0,{type:"text",value:i[0]}),_u(s,e.slice(0,-1)))}}const r=n.children.at(0);if(r?.type==="text"){const i=zb.exec(r.value);if(i){r.value=r.value.replace(zb,"");const s=e.at(-1);s&&(s.children.splice(s.children.indexOf(n),0,{type:"text",value:i[0]}),_u(s,e.slice(0,-1)))}}}if("children"in n&&n.children.length>0){const t=n;t.children.forEach(r=>{_u(r,[...e,t])})}}function w8({root:n,toMarkdownOptions:e,toMarkdownExtensions:t,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:s}){return kk(g5({root:n,visitors:r,jsxComponentDescriptors:i,jsxIsAvailable:s}),{extensions:t,...e})+`
47
+ `}function Sl(n){return n.children instanceof Array}class wg extends Error{constructor(e,t){super(e),this.name="MarkdownParseError",this.cause=t}}class kg extends Error{constructor(e){super(e),this.name="UnrecognizedMarkdownConstructError"}}function k8(n){const e=new Map;return n.type!=="root"?{importDeclarations:{}}:(n.children.filter(r=>r.type==="mdxjsEsm").filter(r=>r.value.startsWith("import ")).forEach(r=>{var i,s;(((s=(i=r.data)==null?void 0:i.estree)==null?void 0:s.body)??[]).forEach(o=>{o.type==="ImportDeclaration"&&o.specifiers.forEach(l=>{e.set(l.local.name,{source:`${o.source.value}`,defaultExport:l.type==="ImportDefaultSpecifier"})})})}),{importDeclarations:Object.fromEntries(e.entries())})}function C8({root:n,markdown:e,visitors:t,syntaxExtensions:r,mdastExtensions:i,...s}){var o;let l;try{l=e3(e,{extensions:r,mdastExtensions:i})}catch(a){throw a instanceof Error?new wg(`Error parsing markdown: ${a.message}`,a):new wg(`Error parsing markdown: ${a}`,a)}l.children.length===0&&l.children.push({type:"paragraph",children:[]}),((o=l.children.at(-1))==null?void 0:o.type)!=="paragraph"&&l.children.push({type:"paragraph",children:[]}),x5({root:n,mdastRoot:l,visitors:t,...s})}function x5({root:n,mdastRoot:e,visitors:t,...r}){const i=new WeakMap,s=new WeakMap,o=k8(e);t=t.sort((c,u)=>(u.priority??0)-(c.priority??0));function l(c,u){if(!Sl(c))throw new Error("Attempting to visit children of a non-parent");c.children.forEach(h=>{a(h,u,c)})}function a(c,u,h,f=null){const d=t.find((p,g)=>f?.has(g)?!1:typeof p.testNode=="string"?p.testNode===c.type:p.testNode(c,r));if(!d)try{throw new kg(`Unsupported markdown syntax: ${kk(c)}`)}catch{throw new kg(`Parsing of the following markdown structure failed: ${JSON.stringify({type:c.type,name:"name"in c?c.name:"N/A"})}`)}d.visitNode({mdastNode:c,lexicalParent:u,mdastParent:h,descriptors:r,metaData:o,actions:{visitChildren:l,nextVisitor(){a(c,u,h,(f??new Set).add(t.indexOf(d)))},addAndStepInto(p){u.append(p),Sl(c)&&l(c,p)},addFormatting(p,g){g||Sl(c)&&(g=c),g&&i.set(g,p|(i.get(h)??0))},removeFormatting(p,g){g||Sl(c)&&(g=c),g&&i.set(g,p^(i.get(h)??0))},getParentFormatting(){return i.get(h)??0},addStyle(p,g){g||Sl(c)&&(g=c),g&&s.set(g,p)},getParentStyle(){return s.get(h)??""}}})}a(e,n,null)}var _8=Object.defineProperty,T8=(n,e,t)=>e in n?_8(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Qd=(n,e,t)=>(T8(n,typeof e!="symbol"?e+"":e,t),t);const Wb="generic-html";class uc extends yn{constructor(e,t,r,i){super(i),Qd(this,"__tag"),Qd(this,"__nodeType"),Qd(this,"__attributes"),this.__tag=e,this.__nodeType=t,this.__attributes=r}static getType(){return Wb}static clone(e){return new uc(e.__tag,e.__nodeType,e.__attributes,e.__key)}getTag(){return this.__tag}getNodeType(){return this.__nodeType}getAttributes(){return this.__attributes}updateAttributes(e){const t=this.getWritable();t.__attributes=e}getStyle(){var e;return(e=this.__attributes.find(t=>t.name==="style"))==null?void 0:e.value}createDOM(){const e=this.__tag,t=document.createElement(e);return this.__attributes.forEach(r=>{t.setAttribute(r.name,r.value)}),t}updateDOM(){return!1}static importDOM(){return{}}exportDOM(e){const{element:t}=super.exportDOM(e);return{element:t}}static importJSON(e){const t=b5(e.tag,e.mdxType,e.attributes);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),attributes:this.__attributes,mdxType:this.__nodeType,type:Wb,version:1}}extractWithChild(){return!0}isInline(){return this.__nodeType==="mdxJsxTextElement"}}function b5(n,e,t){return In(new uc(n,e,t))}function P8(n){return n instanceof uc}const E8={testLexicalNode:P8,visitLexicalNode({actions:n,lexicalNode:e}){n.addAndStepInto("mdxJsxTextElement",{name:e.getTag(),type:e.getNodeType(),attributes:e.getAttributes()})},priority:-100},Q8={testLexicalNode:fr,visitLexicalNode:({mdastParent:n,actions:e})=>{e.appendToParent(n,{type:"text",value:`
48
+ `})}},$8={testLexicalNode:vf,visitLexicalNode:({actions:n})=>{n.addAndStepInto("paragraph")}},A8={testLexicalNode:bt,visitLexicalNode:({actions:n})=>{n.addAndStepInto("root")}},Gl=1,Kl=2,Tu=4,Jl=8,zO=16,Pu=32,Eu=64,Qu=128;function jb(n){return n.type==="text"}const M8=["u","span","sub","sup"],L8={shouldJoin:(n,e)=>{if(["text","emphasis","strong","highlight"].includes(n.type))return n.type===e.type;if(n.type==="mdxJsxTextElement"&&e.type==="mdxJsxTextElement"&&M8.includes(e.name)){const t=e;return n.name===t.name&&JSON.stringify(n.attributes)===JSON.stringify(t.attributes)}return!1},join(n,e){return jb(n)&&jb(e)?{type:"text",value:n.value+e.value}:{...n,children:[...n.children,...e.children]}},testLexicalNode:G,visitLexicalNode:({lexicalNode:n,mdastParent:e,actions:t})=>{const r=n.getPreviousSibling(),i=G(r)?r.getFormat():0,s=n.getTextContent(),o=n.getFormat(),l=n.getStyle();let a=e;if(l&&(a=t.appendToParent(a,{type:"mdxJsxTextElement",name:"span",children:[],attributes:[{type:"mdxJsxAttribute",name:"style",value:l}]})),i&o&Jl&&(a=t.appendToParent(a,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),i&o&Eu&&(a=t.appendToParent(a,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),i&o&Pu&&(a=t.appendToParent(a,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),i&o&Kl&&(a=t.appendToParent(a,{type:"emphasis",children:[]})),i&o&Gl&&(a=t.appendToParent(a,{type:"strong",children:[]})),i&o&Tu&&(a=t.appendToParent(a,{type:"delete",children:[]})),i&o&Qu&&(a=t.appendToParent(a,{type:"highlight",children:[]})),o&Jl&&!(i&Jl)&&(a=t.appendToParent(a,{type:"mdxJsxTextElement",name:"u",children:[],attributes:[]})),o&Eu&&!(i&Eu)&&(a=t.appendToParent(a,{type:"mdxJsxTextElement",name:"sup",children:[],attributes:[]})),o&Pu&&!(i&Pu)&&(a=t.appendToParent(a,{type:"mdxJsxTextElement",name:"sub",children:[],attributes:[]})),o&Kl&&!(i&Kl)&&(a=t.appendToParent(a,{type:"emphasis",children:[]})),o&Gl&&!(i&Gl)&&(a=t.appendToParent(a,{type:"strong",children:[]})),o&Tu&&!(i&Tu)&&(a=t.appendToParent(a,{type:"delete",children:[]})),o&Qu&&!(i&Qu)&&(a=t.appendToParent(a,{type:"highlight",children:[]})),o&zO){t.appendToParent(a,{type:"inlineCode",value:s});return}t.appendToParent(a,{type:"text",value:s})}},R8={testNode:"break",visitNode:function({lexicalParent:n}){n.append(pr())}};function Ic(n,e){return[{testNode:t=>t.type==="mdxJsxTextElement"&&t.name===n,visitNode({actions:t,mdastNode:r,lexicalParent:i}){t.addFormatting(e),t.visitChildren(r,i)}},{testNode:t=>t.type==="html"&&t.value===`<${n}>`,visitNode({actions:t,mdastParent:r}){t.addFormatting(e,r)}},{testNode:t=>t.type==="html"&&t.value===`</${n}>`,visitNode({actions:t,mdastParent:r}){t.removeFormatting(e,r)}}]}const I8={testNode:"delete",visitNode({mdastNode:n,actions:e,lexicalParent:t}){e.addFormatting(Tu),e.visitChildren(n,t)}},D8={testNode:"highlight",visitNode({mdastNode:n,actions:e,lexicalParent:t}){e.addFormatting(Qu),e.visitChildren(n,t)}},N8={testNode:"inlineCode",visitNode({mdastNode:n,actions:e}){e.addAndStepInto(Ye(n.value).setFormat(e.getParentFormatting()|zO))}},V8={testNode:"emphasis",visitNode({mdastNode:n,actions:e,lexicalParent:t}){e.addFormatting(Kl),e.visitChildren(n,t)}},Z8={testNode:"strong",visitNode({mdastNode:n,actions:e,lexicalParent:t}){e.addFormatting(Gl),e.visitChildren(n,t)}},B8=[V8,Z8,...Ic("u",Jl),...Ic("code",zO),N8,I8,D8,...Ic("sup",Eu),...Ic("sub",Pu)],F8={testNode:p5,visitNode:function({mdastNode:n,actions:e,lexicalParent:t}){n.name==="span"&&n.attributes.length===1&&n.attributes[0].type==="mdxJsxAttribute"&&n.attributes[0].name==="style"?(e.addStyle(n.attributes[0].value,n),e.visitChildren(n,t)):e.addAndStepInto(b5(n.name,n.type,n.attributes))},priority:-100},X8=["listitem","quote","admonition"],z8={testNode:"paragraph",visitNode:function({mdastNode:n,lexicalParent:e,actions:t}){X8.includes(e.getType())?t.visitChildren(n,e):t.addAndStepInto(ze())}},W8={testNode:"root",visitNode({actions:n,mdastNode:e,lexicalParent:t}){n.visitChildren(e,t)}},j8={testNode:"text",visitNode({mdastNode:n,actions:e}){const t=Ye(n.value);t.setFormat(e.getParentFormatting());const r=e.getParentStyle();r!==""&&t.setStyle(r),e.addAndStepInto(t)}},q8=()=>v.createElement(H2,{externalHistoryState:Lt(b4)});function Y8(n){return{canContainEols:["comment"],enter:{comment(e){this.buffer()}},exit:{comment(e){this.resume()}}}}const qb=(n,e,t)=>{return r;function r(p){return n.enter("comment"),n.consume(p),i}function i(p){return p===Wt.exclamationMark?(n.consume(p),s):t(p)}function s(p){return p===Wt.dash?(n.consume(p),o):t(p)}function o(p){return p===Wt.dash?(n.consume(p),l):t(p)}function l(p){return p===Wt.greaterThan?t(p):Dr(p)?u(p):(n.enter(ui.data),p===Wt.dash?(n.consume(p),a):c(p))}function a(p){return p===Wt.greaterThan?t(p):c(p)}function c(p){return p===Wt.eof?t(p):p===Wt.dash?(n.consume(p),f):Dr(p)?(n.exit(ui.data),u(p)):(n.consume(p),c)}function u(p){return n.enter(ui.lineEnding),n.consume(p),n.exit(ui.lineEnding),tO(n,h,ui.linePrefix)}function h(p){return Dr(p)?u(p):(n.enter(ui.data),c(p))}function f(p){return p===Wt.dash?(n.consume(p),d):c(p)}function d(p){return p===Wt.greaterThan?(n.exit(ui.data),n.enter("commentEnd"),n.consume(p),n.exit("commentEnd"),n.exit("comment"),e(p)):p===Wt.dash?(n.consume(p),d):c(p)}},H8={flow:{60:{tokenize:qb,concrete:!0}},text:{60:{tokenize:qb}}},U8="_bold_1tncs_10",G8="_italic_1tncs_14",K8="_underline_1tncs_18",J8="_strikethrough_1tncs_34",e4="_underlineStrikethrough_1tncs_38",t4="_subscript_1tncs_42",n4="_superscript_1tncs_47",r4="_code_1tncs_52",i4="_nestedListItem_1tncs_59",s4="_listitem_1tncs_69",o4="_listItemChecked_1tncs_73",l4="_listItemUnchecked_1tncs_74",a4="_admonitionDanger_1tncs_151",c4="_admonitionInfo_1tncs_152",u4="_admonitionNote_1tncs_153",h4="_admonitionTip_1tncs_154",f4="_admonitionCaution_1tncs_155",Dt={bold:U8,italic:G8,underline:K8,strikethrough:J8,underlineStrikethrough:e4,subscript:t4,superscript:n4,code:r4,nestedListItem:i4,listitem:s4,listItemChecked:o4,listItemUnchecked:l4,admonitionDanger:a4,admonitionInfo:c4,admonitionNote:u4,admonitionTip:h4,admonitionCaution:f4},Mf={text:{bold:Dt.bold,italic:Dt.italic,underline:Dt.underline,code:Dt.code,strikethrough:Dt.strikethrough,subscript:Dt.subscript,superscript:Dt.superscript,underlineStrikethrough:Dt.underlineStrikethrough},list:{listitem:Dt.listitem,listitemChecked:Dt.listItemChecked,listitemUnchecked:Dt.listItemUnchecked,nested:{listitem:Dt.nestedListItem}},admonition:{danger:Dt.admonitionDanger,info:Dt.admonitionInfo,note:Dt.admonitionNote,tip:Dt.admonitionTip,caution:Dt.admonitionCaution}},Sa=Oe("NESTED_EDITOR_UPDATED_COMMAND"),Pi=ue(null),ot=ue(null),Cg=ue(""),_g=ue(!0),Gn=ue(!1,n=>{n.sub(n.pipe(Gn,xt(Pi)),([e,t])=>{t?.setEditable(!e)})}),Tg=ue(""),Yb=ue(!1),wa=ue(!1),y5=ue(0),ka=ue(null),Pg=zt(n=>{n.link(n.pipe(ka,Ja(e=>e!==null)),Pg)}),v5=zt(n=>{n.sub(n.pipe(v5,xt(ot)),([e,t])=>{t?.dispatchCommand(gi,e)})}),Mo=ue(null,n=>{n.sub(n.pipe(Mo,xt(ot)),([e,t])=>{if(!e||!t)return;const r=e.anchor.getNode();let i=r.getKey()==="root"?r:dr(r,l=>{const a=l.getParent();return a!==null&&Rt(a)});i??(i=r.getTopLevelElementOrThrow());const s=i.getKey();if(t.getElementByKey(s)!==null){const l=Ao(i)?i.getTag():i.getType();n.pub(Z5,l)}})}),S5=ue(""),Gr=ue(""),hh=ue(!1),Lf=zt(n=>{n.link(Gr,Lf),n.sub(S5,e=>{n.pubIn({[hh]:!0,[Gr]:e})})}),Eg=zt(n=>{n.link(n.pipe(Lf,xt(Qg),Ja(([,e])=>!e),Es(([e])=>e)),Eg)},!0),WO=ue([]),jO=ue([]),w5=ue([]),k5=ue([]),Rf=ue([]),qO=ue([]),fh=ue({}),YO=ue(!1),If=ue([]),C5=ue([]),hc=ue([]),rl=ue(null),d4=ue(null),_5=ue(null),is=Ut(jO),Si=Ut(WO),dh=Ut(w5),ph=Ut(k5),ss=Ut(Rf),HO=Ut(qO),Qg=ue(!1),UO=zt(n=>{n.sub(n.pipe(UO,xt(Gr,Pi,wa),Ja(([e,t])=>e.trim()!==t.trim())),([e,,t,r])=>{n.pub(Qg,!0),t?.update(()=>{Ve().clear(),GO(n,Ve(),e),r?t.focus():ht(null)},{onUpdate:()=>{n.pub(Qg,!1)}})})}),T5=zt(n=>{n.sub(n.pipe(T5,xt(ot,wa)),([e,t,r])=>{t?.update(()=>{const i=H();if(i!==null){const s={children:[],append(o){this.children.push(o)},getType(){return i.getNodes()[0].getType()}};GO(n,s,e),xf(s.children)}r?t.focus():ht(null)})})});function P5(){return Pk((n,[e,t])=>(n.forEach(r=>{if(!r)throw new Error("You have a subscription that does not return a teardown");r()}),t?e.map(r=>r(t)):[]),[])}const p4=ue(null),E5=ue([],n=>{n.pipe(n.combine(E5,ot),P5())}),Q5=ue([],n=>{n.pipe(n.combine(Q5,Pi),P5())}),$5=ue(null,ji,(n,e)=>!!(n&&e&&n.editorRef===e.editorRef)),Ca=zt(),ln=ue(n=>{throw new Error(`No icon component for ${n}`)});function Ut(n,e){return zt((t,r)=>{t.changeWith(n,r,(i,s)=>{Array.isArray(s)||(s=[s]);let o=i;for(const l of s)i.includes(l)||(o=[...o,l]);return o}),e?.(t,r)})}function A5(n){const e=H();B(e)&&n.pubIn({[Mo]:e,[y5]:e.format})}const M5=Ut(Q5,(n,e)=>{n.pub(e,[t=>t.registerCommand(dO,(r,i)=>(n.pubIn({[ot]:i,[wa]:!0}),i._parentEditor===null&&i.getEditorState().read(()=>{n.pub($5,{rootNode:Ve(),editorType:"lexical",editorRef:i})}),A5(n),!1),Yr),t=>t.registerUpdateListener(({dirtyElements:r,dirtyLeaves:i,editorState:s})=>{if(n.getValue(ka)!==null||r.size===0&&i.size===0)return;let l;s.read(()=>{Ve().getLastChild()instanceof Jo&&t.update(()=>{Ve().append(ze())},{discrete:!0}),l=w8({root:Ve(),visitors:n.getValue(Rf),jsxComponentDescriptors:n.getValue(If),toMarkdownExtensions:n.getValue(qO),toMarkdownOptions:n.getValue(fh),jsxIsAvailable:n.getValue(YO)})}),n.pub(Gr,l.trim()),n.pub(hh,!1)}),t=>t.registerCommand(vO,()=>(n.pub(wa,!0),!1),Yr)])}),gh=Ut(E5,(n,e)=>{n.pub(e,[t=>t.registerUpdateListener(({editorState:r})=>{r.read(()=>{A5(n)})}),t=>t.registerCommand(SO,r=>{var i;const s=n.getValue(Pi);return s&&!((i=s.getRootElement())!=null&&i.contains(r.relatedTarget))&&n.pubIn({[wa]:!1,[Ca]:r}),!1},Yr)])});function GO(n,e,t){try{C8({root:e,visitors:n.getValue(WO),mdastExtensions:n.getValue(k5),markdown:t,syntaxExtensions:n.getValue(w5),jsxComponentDescriptors:n.getValue(If),directiveDescriptors:n.getValue(C5),codeBlockEditorDescriptors:n.getValue(hc)}),n.pub(ka,null)}catch(r){if(r instanceof wg||r instanceof kg)n.pubIn({[Gr]:t,[ka]:{error:r.message,source:t}});else throw r}}const L5=ue([]),il=Ut(L5),R5=ue([]),g4=Ut(R5),I5=ue([]),m4=Ut(I5),D5=ue([]),O4=Ut(D5),x4=ue([]),KO=Ut(x4),N5=ue([]),V5=Ut(N5),JO=ue(!1,n=>{n.link(n.pipe(ot,Es(e=>{var t,r;return["td","th"].includes(((r=(t=e?.getRootElement())==null?void 0:t.parentNode)==null?void 0:r.nodeName.toLowerCase())??"")})),JO)}),b4=ue(Y2()),Z5=ue("");zt();const mh=zt(n=>{n.sub(n.pipe(mh,xt(ot)),([e,t])=>{t?.update(()=>{const r=H();B(r)&&(IA(r,e),setTimeout(()=>{t.focus()}))})})}),e1=zt(n=>{n.sub(n.pipe(e1,xt(ot)),([e,t])=>{t?.focus(()=>{t.getEditorState().read(()=>{const r=H();B(r)&&(t.update(()=>{const i=e();i.isInline()?(xf([i]),Rt(i.getParentOrThrow())&&zA(i,ze).selectEnd()):q2(i),setTimeout(()=>{"select"in i&&typeof i.select=="function"&&i.select()})}),setTimeout(()=>{t.dispatchCommand(Sa,void 0)}))})},{defaultSelection:"rootEnd"})})}),wi=ue("rich-text",n=>{function e(){return Pk((t,r)=>({current:t.next,next:r}),{current:"rich-text",next:"rich-text"})}n.sub(n.pipe(wi,e(),xt(Bs)),([{current:t},r])=>{(t==="source"||t==="diff")&&n.pub(UO,r)}),n.sub(n.pipe(wi,e(),Ja(t=>t.current==="rich-text"),xt(ot)),([,t])=>{t?.dispatchCommand(Sa,void 0)})}),Bs=ue("",n=>{n.link(Gr,Bs),n.link(Bs,Lf)},!0),t1=ue([]),sl=Ut(t1),B5=ue(()=>{throw new Error("No translation function provided")}),Hb=ue(Mf),y4=Rn({init(n,e){const t=e?.initialMarkdown??"";n.register(M5),n.register(gh),n.register(Lf),n.register(Bs),n.pubIn({[S5]:e?.trim?t.trim():t,[ln]:e?.iconComponentFor,[Si]:[W8,z8,j8,R8,...B8],[is]:[el,Jr,uc],[ss]:[A8,$8,L8,Q8,E8],[Cg]:e?.contentEditableClassName,[_g]:e?.spellCheck,[fh]:e?.toMarkdownOptions,[Yb]:e?.autoFocus,[Tg]:e?.placeholder,[Gn]:e?.readOnly,[B5]:e?.translation,[ph]:[r3(),O7],[dh]:[n3(),K7()],[HO]:[V7(),t3(),y7],[Hb]:e?.lexicalTheme??Mf}),n.singletonSub(Pg,e?.onError),n.singletonSub(Eg,r=>{e?.onChange(r,n.getValue(hh))}),n.singletonSub(Ca,e?.onBlur),e?.suppressHtmlProcessing||n.pubIn({[ph]:[N7(),Y8()],[dh]:[m8(),O8(),H8],[Si]:F8}),e?.suppressSharedHistory||n.pub(il,q8)},postInit(n,e){const t=O2({editable:e?.readOnly!==!0,namespace:e?.lexicalEditorNamespace??"MDXEditor",nodes:[...n.getValue(jO),...e?.additionalLexicalNodes??[]],onError:r=>{throw r},theme:n.getValue(Hb)});e?.editorState!==null&&t.update(()=>{const r=e?.initialMarkdown.trim()??"";GO(n,Ve(),r);const i=e?.autoFocus;if(i){if(i===!0){setTimeout(()=>{t.focus(ji,{defaultSelection:"rootStart"})});return}setTimeout(()=>{t.focus(ji,{defaultSelection:i.defaultSelection??"rootStart"})})}}),n.pub(Pi,t),n.pub(ot,t)},update(n,e){n.pubIn({[Cg]:e?.contentEditableClassName,[_g]:e?.spellCheck,[fh]:e?.toMarkdownOptions,[Yb]:e?.autoFocus,[Tg]:e?.placeholder,[Gn]:e?.readOnly}),n.singletonSub(Eg,t=>{e?.onChange(t,n.getValue(hh))}),n.singletonSub(Ca,e?.onBlur),n.singletonSub(Pg,e?.onError)}});function Gt(){return Lt(B5)}function v4(){return Ve().getTextContent()}function S4(n,e=!0){if(n)return!1;let t=v4();return e&&(t=t.trim()),t===""}function w4(n){if(!S4(n,!1))return!1;const e=Ve().getChildren(),t=e.length;if(t>1)return!1;for(let r=0;r<t;r++){const i=e[r];if(Ie(i))return!1;if(I(i)){if(!vf(i)||i.__indent!==0)return!1;const s=i.getChildren(),o=s.length;for(let l=0;l<o;l++){const a=s[r];if(!G(a))return!1}}}return!0}function F5(n){return()=>w4(n)}const X5=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?V.useLayoutEffect:V.useEffect;function k4({editor:n,ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:s,ariaExpanded:o,ariaInvalid:l,ariaLabel:a,ariaLabelledBy:c,ariaMultiline:u,ariaOwns:h,ariaRequired:f,autoCapitalize:d,className:p,id:g,role:m="textbox",spellCheck:x=!0,style:O,tabIndex:b,"data-testid":y,...S},k){const[w,C]=V.useState(n.isEditable()),T=V.useCallback((D=>{D&&D.ownerDocument&&D.ownerDocument.defaultView?n.setRootElement(D):n.setRootElement(null)}),[n]),$=V.useMemo((()=>(function(...D){return M=>{D.forEach((Q=>{typeof Q=="function"?Q(M):Q!=null&&(Q.current=M)}))}})(k,T)),[T,k]);return X5((()=>(C(n.isEditable()),n.registerEditableListener((D=>{C(D)})))),[n]),oe.jsx("div",{"aria-activedescendant":w?e:void 0,"aria-autocomplete":w?t:"none","aria-controls":w?r:void 0,"aria-describedby":i,...s!=null?{"aria-errormessage":s}:{},"aria-expanded":w&&m==="combobox"?!!o:void 0,...l!=null?{"aria-invalid":l}:{},"aria-label":a,"aria-labelledby":c,"aria-multiline":u,"aria-owns":w?h:void 0,"aria-readonly":!w||void 0,"aria-required":f,autoCapitalize:d,className:p,contentEditable:w,"data-testid":y,id:g,ref:$,role:m,spellCheck:x,style:O,tabIndex:b,...S})}const C4=V.forwardRef(k4);function Ub(n){return n.getEditorState().read(F5(n.isComposing()))}const z5=V.forwardRef(_4);function _4(n,e){const{placeholder:t,...r}=n,[i]=Sn();return oe.jsxs(oe.Fragment,{children:[oe.jsx(C4,{editor:i,...r,ref:e}),t!=null&&oe.jsx(T4,{editor:i,content:t})]})}function T4({content:n,editor:e}){const t=(function(o){const[l,a]=V.useState((()=>Ub(o)));return X5((()=>{function c(){const u=Ub(o);a(u)}return c(),Dn(o.registerUpdateListener((()=>{c()})),o.registerEditableListener((()=>{c()})))}),[o]),l})(e),[r,i]=V.useState(e.isEditable());if(V.useLayoutEffect((()=>(i(e.isEditable()),e.registerEditableListener((o=>{i(o)})))),[e]),!t)return null;let s=null;return typeof n=="function"?s=n(r):n!==null&&(s=n),s===null?null:oe.jsx("div",{"aria-hidden":!0,children:s})}function $g(n,e){return $g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},$g(n,e)}var Gb={error:null},P4=(function(n){var e,t;function r(){for(var s,o=arguments.length,l=new Array(o),a=0;a<o;a++)l[a]=arguments[a];return(s=n.call.apply(n,[this].concat(l))||this).state=Gb,s.resetErrorBoundary=function(){for(var c,u=arguments.length,h=new Array(u),f=0;f<u;f++)h[f]=arguments[f];s.props.onReset==null||(c=s.props).onReset.apply(c,h),s.reset()},s}t=n,(e=r).prototype=Object.create(t.prototype),e.prototype.constructor=e,$g(e,t),r.getDerivedStateFromError=function(s){return{error:s}};var i=r.prototype;return i.reset=function(){this.setState(Gb)},i.componentDidCatch=function(s,o){var l,a;(l=(a=this.props).onError)==null||l.call(a,s,o)},i.componentDidUpdate=function(s,o){var l,a,c,u,h=this.state.error,f=this.props.resetKeys;h!==null&&o.error!==null&&((c=s.resetKeys)===void 0&&(c=[]),(u=f)===void 0&&(u=[]),c.length!==u.length||c.some((function(d,p){return!Object.is(d,u[p])})))&&((l=(a=this.props).onResetKeysChange)==null||l.call(a,s.resetKeys,f),this.reset())},i.render=function(){var s=this.state.error,o=this.props,l=o.fallbackRender,a=o.FallbackComponent,c=o.fallback;if(s!==null){var u={error:s,resetErrorBoundary:this.resetErrorBoundary};if(V.isValidElement(c))return c;if(typeof l=="function")return l(u);if(a)return V.createElement(a,u);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r})(V.Component);function W5({children:n,onError:e}){return oe.jsx(P4,{fallback:oe.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:e,children:n})}const E4=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?V.useLayoutEffect:V.useEffect;function Q4(n){return{initialValueFn:()=>n.isEditable(),subscribe:e=>n.registerEditableListener(e)}}function $4(){return(function(n){const[e]=Sn(),t=V.useMemo((()=>n(e)),[e,n]),[r,i]=V.useState((()=>t.initialValueFn())),s=V.useRef(r);return E4((()=>{const{initialValueFn:o,subscribe:l}=t,a=o();return s.current!==a&&(s.current=a,i(a)),l((c=>{s.current=c,i(c)}))}),[t,n]),r})(Q4)}function A4(n){const e=window.location.origin,t=r=>{if(r.origin!==e)return;const i=n.getRootElement();if(document.activeElement!==i)return;const s=r.data;if(typeof s=="string"){let o;try{o=JSON.parse(s)}catch{return}if(o&&o.protocol==="nuanria_messaging"&&o.type==="request"){const l=o.payload;if(l&&l.functionId==="makeChanges"){const a=l.args;if(a){const[c,u,h,f,d,p]=a;n.update((()=>{const g=H();if(B(g)){const m=g.anchor;let x=m.getNode(),O=0,b=0;if(G(x)&&c>=0&&u>=0&&(O=c,b=c+u,g.setTextNodeRange(x,O,x,b)),O===b&&h===""||(g.insertRawText(h),x=m.getNode()),G(x)){O=f,b=f+d;const y=x.getTextContentSize();O=O>y?y:O,b=b>y?y:b,g.setTextNodeRange(x,O,x,b)}r.stopImmediatePropagation()}}))}}}}};return window.addEventListener("message",t,!0),()=>{window.removeEventListener("message",t,!0)}}const Ag=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?V.useLayoutEffect:V.useEffect;function Kb(n){return n.getEditorState().read(F5(n.isComposing()))}function j5({contentEditable:n,placeholder:e=null,ErrorBoundary:t}){const[r]=Sn(),i=(function(s,o){const[l,a]=V.useState((()=>s.getDecorators()));return Ag((()=>s.registerDecoratorListener((c=>{ax.flushSync((()=>{a(c)}))}))),[s]),V.useEffect((()=>{a(s.getDecorators())}),[s]),V.useMemo((()=>{const c=[],u=Object.keys(l);for(let h=0;h<u.length;h++){const f=u[h],d=oe.jsx(o,{onError:g=>s._onError(g),children:oe.jsx(V.Suspense,{fallback:null,children:l[f]})}),p=s.getElementByKey(f);p!==null&&c.push(ax.createPortal(d,p,f))}return c}),[o,l,s])})(r,t);return(function(s){Ag((()=>Dn(g7(s),A4(s))),[s])})(r),oe.jsxs(oe.Fragment,{children:[n,oe.jsx(M4,{content:e}),i]})}function M4({content:n}){const[e]=Sn(),t=(function(i){const[s,o]=V.useState((()=>Kb(i)));return Ag((()=>{function l(){const a=Kb(i);o(a)}return l(),Dn(i.registerUpdateListener((()=>{l()})),i.registerEditableListener((()=>{l()})))}),[i]),s})(e),r=$4();return t?typeof n=="function"?n(r):n:null}var $d={exports:{}};/*!
49
+ Copyright (c) 2018 Jed Watson.
50
+ Licensed under the MIT License (MIT), see
51
+ http://jedwatson.github.io/classnames
52
+ */var Jb;function L4(){return Jb||(Jb=1,(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var s="",o=0;o<arguments.length;o++){var l=arguments[o];l&&(s=i(s,r(l)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return t.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var l in s)e.call(s,l)&&s[l]&&(o=i(o,l));return o}function i(s,o){return o?s?s+" "+o:s+o:s}n.exports?(t.default=t,n.exports=t):window.classNames=t})()})($d)),$d.exports}var R4=L4();const St=hk(R4),I4={undo:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M7.202 18.5V17H14.3788C15.4224 17 16.3205 16.6554 17.073 15.9663C17.8257 15.2773 18.202 14.4263 18.202 13.4135C18.202 12.4007 17.8257 11.5512 17.073 10.8652C16.3205 10.1794 15.4224 9.8365 14.3788 9.8365H7.35775L10.1402 12.6193L9.0865 13.673L4.5 9.0865L9.0865 4.5L10.1402 5.55375L7.35775 8.3365H14.3788C15.8416 8.3365 17.0945 8.82467 18.1375 9.801C19.1805 10.7773 19.702 11.9815 19.702 13.4135C19.702 14.8455 19.1805 16.0513 18.1375 17.0308C17.0945 18.0103 15.8416 18.5 14.3788 18.5H7.202Z",fill:"currentColor"})),redo:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M9.6211 18.5C8.15827 18.5 6.90535 18.0103 5.86235 17.0308C4.81935 16.0513 4.29785 14.8455 4.29785 13.4135C4.29785 11.9815 4.81935 10.7773 5.86235 9.801C6.90535 8.82467 8.15827 8.3365 9.6211 8.3365H16.6421L13.8596 5.55375L14.9134 4.5L19.4999 9.0865L14.9134 13.673L13.8596 12.6193L16.6421 9.8365H9.6211C8.57744 9.8365 7.67935 10.1794 6.92685 10.8652C6.17418 11.5512 5.79785 12.4007 5.79785 13.4135C5.79785 14.4263 6.17418 15.2773 6.92685 15.9663C7.67935 16.6554 8.57744 17 9.6211 17H16.7979V18.5H9.6211Z",fill:"currentColor"})),format_bold:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M7.33838 18.625V5.375H12.1999C13.219 5.375 14.1405 5.69233 14.9644 6.327C15.788 6.9615 16.1999 7.816 16.1999 8.8905C16.1999 9.63783 16.0194 10.2471 15.6584 10.7182C15.2975 11.1894 14.9088 11.5314 14.4921 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3158 16.6614 14.0193 16.6614 14.9038C16.6614 16.1819 16.1902 17.1217 15.2479 17.723C14.3055 18.3243 13.3562 18.625 12.3999 18.625H7.33838ZM9.48838 16.6328H12.3191C13.1063 16.6328 13.6627 16.4142 13.9884 15.977C14.314 15.5398 14.4769 15.1206 14.4769 14.7192C14.4769 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8058 12.2729 12.8058H9.48838V16.6328ZM9.48838 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5279 10.3538C13.8835 10.0064 14.0614 9.59042 14.0614 9.10575C14.0614 8.59042 13.8733 8.16925 13.4971 7.84225C13.1208 7.51542 12.6595 7.352 12.1134 7.352H9.48838V10.875Z",fill:"currentColor"})),format_italic:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M5.39404 18.625V16.8173H9.21129L12.4518 7.18275H8.63454V5.375H17.7883V7.18275H14.2785L11.0383 16.8173H14.5478V18.625H5.39404Z",fill:"currentColor"})),format_underlined:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M5.34619 22.125V20.625H18.6537V22.125H5.34619ZM11.9999 18.5287C10.4448 18.5287 9.23102 18.0566 8.35869 17.1125C7.48619 16.1683 7.04994 14.9032 7.04994 13.3172V5.41345H8.90369V13.4095C8.90369 14.4198 9.17228 15.2295 9.70944 15.8385C10.2466 16.4475 11.0101 16.752 11.9999 16.752C12.9898 16.752 13.7533 16.4475 14.2904 15.8385C14.8276 15.2295 15.0962 14.4198 15.0962 13.4095V5.41345H16.9499V13.3172C16.9499 14.9032 16.5137 16.1683 15.6412 17.1125C14.7689 18.0566 13.5551 18.5287 11.9999 18.5287Z",fill:"currentColor"})),format_highlight:v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"},v.createElement("path",{d:"m9 11-6 6v3h9l3-3"}),v.createElement("path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4"})),code:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M7.99994 17.6537L2.34619 11.9999L7.99994 6.34619L9.06919 7.41544L4.46919 12.0154L9.05369 16.5999L7.99994 17.6537ZM15.9999 17.6537L14.9307 16.5844L19.5307 11.9844L14.9462 7.39994L15.9999 6.34619L21.6537 11.9999L15.9999 17.6537Z",fill:"currentColor"})),strikeThrough:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M12.15 19.6923C10.9732 19.6923 9.9315 19.359 9.025 18.6923C8.11867 18.0256 7.45525 17.1128 7.03475 15.9538L8.6385 15.2635C8.91667 16.0444 9.3545 16.6867 9.952 17.1905C10.5493 17.6944 11.2923 17.9463 12.1808 17.9463C12.9578 17.9463 13.6744 17.7508 14.3307 17.3598C14.9872 16.9686 15.3155 16.3487 15.3155 15.5C15.3155 15.123 15.2555 14.7968 15.1355 14.5213C15.0157 14.2456 14.8462 13.9885 14.627 13.75H16.677C16.7987 13.9705 16.8932 14.2256 16.9605 14.5153C17.0278 14.8051 17.0615 15.1334 17.0615 15.5C17.0615 16.8372 16.5747 17.8702 15.601 18.599C14.6272 19.3279 13.4768 19.6923 12.15 19.6923ZM2.25 11.75V10.25H21.75V11.75H2.25ZM12.05 4.19629C13.0475 4.19629 13.9123 4.42704 14.6443 4.88854C15.3763 5.35004 15.9673 6.05896 16.4173 7.01529L14.823 7.73079C14.6218 7.26029 14.2978 6.84462 13.851 6.48379C13.4042 6.12279 12.8141 5.94229 12.0808 5.94229C11.2244 5.94229 10.5392 6.16221 10.025 6.60204C9.51083 7.04171 9.264 7.59104 9.2845 8.25004H7.5385C7.50133 7.16421 7.89783 6.21712 8.728 5.40879C9.558 4.60046 10.6653 4.19629 12.05 4.19629Z",fill:"currentColor"})),superscript:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M16.6924 8V6.2115C16.6924 5.95383 16.7786 5.73875 16.9511 5.56625C17.1235 5.39392 17.3385 5.30775 17.5961 5.30775H19.5001V4.38475H16.6924V3.5H19.4809C19.7385 3.5 19.9536 3.58625 20.1261 3.75875C20.2985 3.93108 20.3846 4.14617 20.3846 4.404V5.2885C20.3846 5.54617 20.2985 5.76125 20.1261 5.93375C19.9536 6.10608 19.7385 6.19225 19.4809 6.19225H17.5771V7.1155H20.3846V8H16.6924ZM4.44238 18.5L8.84638 11.6287L4.77713 5.30775H6.74438L9.95963 10.404H10.0214L13.2501 5.30775H15.2329L11.1194 11.6287L15.5579 18.5H13.5751L10.0214 12.9308H9.95963L6.42513 18.5H4.44238Z",fill:"currentColor"})),subscript:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M16.6924 20.5V18.7115C16.6924 18.4538 16.7786 18.2387 16.9511 18.0662C17.1235 17.8939 17.3385 17.8077 17.5961 17.8077H19.5001V16.8845H16.6924V16H19.4809C19.7385 16 19.9536 16.0863 20.1261 16.2587C20.2985 16.4311 20.3846 16.6461 20.3846 16.9038V17.7885C20.3846 18.0462 20.2985 18.2612 20.1261 18.4337C19.9536 18.6061 19.7385 18.6923 19.4809 18.6923H17.5771V19.6152H20.3846V20.5H16.6924ZM4.44238 18.6923L8.84638 11.8212L4.77713 5.5H6.74438L9.95963 10.5962H10.0214L13.2501 5.5H15.2329L11.1194 11.8212L15.5579 18.6923H13.5751L10.0214 13.123H9.95963L6.42513 18.6923H4.44238Z",fill:"currentColor"})),format_list_bulleted:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75005V5.25005H20.5V6.75005H9.30775ZM5.1635 19.6635C4.706 19.6635 4.31442 19.5006 3.98875 19.1748C3.66292 18.8491 3.5 18.4575 3.5 18C3.5 17.5425 3.66292 17.151 3.98875 16.8253C4.31442 16.4995 4.706 16.3365 5.1635 16.3365C5.621 16.3365 6.01258 16.4995 6.33825 16.8253C6.66408 17.151 6.827 17.5425 6.827 18C6.827 18.4575 6.66408 18.8491 6.33825 19.1748C6.01258 19.5006 5.621 19.6635 5.1635 19.6635ZM5.1635 13.6635C4.706 13.6635 4.31442 13.5006 3.98875 13.1748C3.66292 12.8491 3.5 12.4575 3.5 12C3.5 11.5425 3.66292 11.151 3.98875 10.8253C4.31442 10.4995 4.706 10.3365 5.1635 10.3365C5.621 10.3365 6.01258 10.4995 6.33825 10.8253C6.66408 11.151 6.827 11.5425 6.827 12C6.827 12.4575 6.66408 12.8491 6.33825 13.1748C6.01258 13.5006 5.621 13.6635 5.1635 13.6635ZM5.1635 7.66355C4.706 7.66355 4.31442 7.50063 3.98875 7.1748C3.66292 6.84913 3.5 6.45755 3.5 6.00005C3.5 5.54255 3.66292 5.15096 3.98875 4.8253C4.31442 4.49946 4.706 4.33655 5.1635 4.33655C5.621 4.33655 6.01258 4.49946 6.33825 4.8253C6.66408 5.15096 6.827 5.54255 6.827 6.00005C6.827 6.45755 6.66408 6.84913 6.33825 7.1748C6.01258 7.50063 5.621 7.66355 5.1635 7.66355Z",fill:"currentColor"})),format_list_numbered:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M3.5 21.5V20.3078H6V19.25H4.5V18.0577H6V17H3.5V15.8077H6.34625C6.58592 15.8077 6.78683 15.8888 6.949 16.051C7.11117 16.2132 7.19225 16.4141 7.19225 16.6538V17.8462C7.19225 18.0859 7.11117 18.2868 6.949 18.449C6.78683 18.6112 6.58592 18.6923 6.34625 18.6923C6.58592 18.6923 6.78683 18.7733 6.949 18.9355C7.11117 19.0977 7.19225 19.2987 7.19225 19.5385V20.6538C7.19225 20.8936 7.11117 21.0946 6.949 21.2568C6.78683 21.4189 6.58592 21.5 6.34625 21.5H3.5ZM3.5 14.8463V12.25C3.5 12.0103 3.58108 11.8093 3.74325 11.647C3.90542 11.4848 4.10642 11.4038 4.34625 11.4038H6V10.3462H3.5V9.15375H6.34625C6.58592 9.15375 6.78683 9.23483 6.949 9.397C7.11117 9.55933 7.19225 9.76033 7.19225 10V11.75C7.19225 11.9897 7.11117 12.1907 6.949 12.353C6.78683 12.5152 6.58592 12.5963 6.34625 12.5963H4.69225V13.6538H7.19225V14.8463H3.5ZM5 8.19225V3.69225H3.5V2.5H6.19225V8.19225H5ZM9.30775 18.75V17.25H20.5V18.75H9.30775ZM9.30775 12.75V11.25H20.5V12.75H9.30775ZM9.30775 6.75V5.25H20.5V6.75H9.30775Z",fill:"currentColor"})),format_list_checked:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M5.69425 18.452L2.5 15.2578L3.54425 14.2135L5.66925 16.3385L9.91925 12.0885L10.9635 13.1578L5.69425 18.452ZM5.69425 10.8365L2.5 7.64227L3.54425 6.59802L5.66925 8.72302L9.91925 4.47302L10.9635 5.54227L5.69425 10.8365ZM13.0095 16.5578V15.0578H21.5095V16.5578H13.0095ZM13.0095 8.94227V7.44227H21.5095V8.94227H13.0095Z",fill:"currentColor"})),link:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M10.8077 16.5385H7.0385C5.78283 16.5385 4.7125 16.096 3.8275 15.211C2.9425 14.3262 2.5 13.256 2.5 12.0005C2.5 10.745 2.9425 9.67471 3.8275 8.78955C4.7125 7.90421 5.78283 7.46155 7.0385 7.46155H10.8077V8.96155H7.0385C6.19867 8.96155 5.48233 9.25805 4.8895 9.85105C4.2965 10.444 4 11.1604 4 12C4 12.8397 4.2965 13.556 4.8895 14.149C5.48233 14.742 6.19867 15.0385 7.0385 15.0385H10.8077V16.5385ZM8.25 12.75V11.25H15.75V12.75H8.25ZM13.1923 16.5385V15.0385H16.9615C17.8013 15.0385 18.5177 14.742 19.1105 14.149C19.7035 13.556 20 12.8397 20 12C20 11.1604 19.7035 10.444 19.1105 9.85105C18.5177 9.25805 17.8013 8.96155 16.9615 8.96155H13.1923V7.46155H16.9615C18.2172 7.46155 19.2875 7.90405 20.1725 8.78905C21.0575 9.67388 21.5 10.744 21.5 11.9995C21.5 13.255 21.0575 14.3254 20.1725 15.2105C19.2875 16.0959 18.2172 16.5385 16.9615 16.5385H13.1923Z",fill:"currentColor"})),add_photo:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M5.11537 20.5C4.6182 20.5 4.19262 20.323 3.83862 19.969C3.48462 19.615 3.30762 19.1894 3.30762 18.6922V5.30773C3.30762 4.81056 3.48462 4.38498 3.83862 4.03098C4.19262 3.67698 4.6182 3.49998 5.11537 3.49998H13.8076V4.99998H5.11537C5.02553 4.99998 4.95178 5.02881 4.89412 5.08648C4.83645 5.14415 4.80762 5.2179 4.80762 5.30773V18.6922C4.80762 18.7821 4.83645 18.8558 4.89412 18.9135C4.95178 18.9711 5.02553 19 5.11537 19H18.4999C18.5895 19 18.6633 18.9711 18.7211 18.9135C18.7788 18.8558 18.8076 18.7821 18.8076 18.6922V9.99998H20.3076V18.6922C20.3076 19.1894 20.1306 19.615 19.7766 19.969C19.4226 20.323 18.997 20.5 18.4999 20.5H5.11537ZM17.1921 8.61523V6.61523H15.1921V5.11548H17.1921V3.11548H18.6921V5.11548H20.6921V6.61523H18.6921V8.61523H17.1921ZM6.55762 16.75H17.1344L13.8459 12.3655L11.0384 16.0192L9.03837 13.4615L6.55762 16.75Z",fill:"currentColor"})),table:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M3.5 18.6923V5.30775C3.5 4.81058 3.677 4.385 4.031 4.031C4.385 3.677 4.81058 3.5 5.30775 3.5H18.6923C19.1894 3.5 19.615 3.677 19.969 4.031C20.323 4.385 20.5 4.81058 20.5 5.30775V18.6923C20.5 19.1894 20.323 19.615 19.969 19.969C19.615 20.323 19.1894 20.5 18.6923 20.5H5.30775C4.81058 20.5 4.385 20.323 4.031 19.969C3.677 19.615 3.5 19.1894 3.5 18.6923ZM5 9.077H19V5.30775C19 5.21792 18.9712 5.14417 18.9135 5.0865C18.8558 5.02883 18.7821 5 18.6923 5H5.30775C5.21792 5 5.14417 5.02883 5.0865 5.0865C5.02883 5.14417 5 5.21792 5 5.30775V9.077ZM10.1615 14.0385H13.8385V10.577H10.1615V14.0385ZM10.1615 19H13.8385V15.5385H10.1615V19ZM5 14.0385H8.6615V10.577H5V14.0385ZM15.3385 14.0385H19V10.577H15.3385V14.0385ZM5.30775 19H8.6615V15.5385H5V18.6923C5 18.7821 5.02883 18.8558 5.0865 18.9135C5.14417 18.9712 5.21792 19 5.30775 19ZM15.3385 19H18.6923C18.7821 19 18.8558 18.9712 18.9135 18.9135C18.9712 18.8558 19 18.7821 19 18.6923V15.5385H15.3385V19Z",fill:"currentColor"})),horizontal_rule:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M4.5 12.75V11.25H19.5V12.75H4.5Z",fill:"currentColor"})),frontmatter:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M4.5 8.75V7.25H8.5V8.75H4.5Z",fill:"currentColor"}),v.createElement("path",{d:"M4.5 14.75V13.25H8.5V14.75H4.5Z",fill:"currentColor"}),v.createElement("path",{d:"M9.5 8.75V7.25H13.5V8.75H9.5Z",fill:"currentColor"}),v.createElement("path",{d:"M9.5 14.75V13.25H13.5V14.75H9.5Z",fill:"currentColor"}),v.createElement("path",{d:"M14.5 8.75V7.25H18.5V8.75H14.5Z",fill:"currentColor"}),v.createElement("path",{d:"M14.5 14.75V13.25H18.5V14.75H14.5Z",fill:"currentColor"})),frame_source:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M8.6 15.2443L5.35575 12L8.6 8.75575L9.64425 9.825L7.46925 12L9.64425 14.175L8.6 15.2443ZM15.4 15.2443L14.3558 14.175L16.5307 12L14.3558 9.825L15.4 8.75575L18.6443 12L15.4 15.2443ZM5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V15H5V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H9V20.5H5.30775ZM15 20.5V19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V15H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H15ZM3.5 9V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H9V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V9H3.5ZM19 9V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H15V3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V9H19Z",fill:"currentColor"})),arrow_drop_down:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M11.9999 14.6537L7.59619 10.25H16.4037L11.9999 14.6537Z",fill:"currentColor"})),admonition:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M12.0001 21.4C11.7654 21.4 11.5385 21.3548 11.3193 21.2645C11.1002 21.174 10.9002 21.0435 10.7193 20.873L3.1271 13.2807C2.9566 13.0999 2.8261 12.8999 2.7356 12.6807C2.64526 12.4616 2.6001 12.2346 2.6001 12C2.6001 11.7653 2.64526 11.5358 2.7356 11.3115C2.8261 11.0871 2.9566 10.8897 3.1271 10.7192L10.7193 3.12698C10.9002 2.94614 11.1002 2.81314 11.3193 2.72798C11.5385 2.64264 11.7654 2.59998 12.0001 2.59998C12.2348 2.59998 12.4643 2.64264 12.6886 2.72798C12.9129 2.81314 13.1103 2.94614 13.2808 3.12698L20.8731 10.7192C21.0539 10.8897 21.1869 11.0871 21.2721 11.3115C21.3574 11.5358 21.4001 11.7653 21.4001 12C21.4001 12.2346 21.3574 12.4616 21.2721 12.6807C21.1869 12.8999 21.0539 13.0999 20.8731 13.2807L13.2808 20.873C13.1103 21.0435 12.9129 21.174 12.6886 21.2645C12.4643 21.3548 12.2348 21.4 12.0001 21.4ZM12.2213 19.8037L19.8039 12.2212C19.8552 12.1699 19.8808 12.0961 19.8808 12C19.8808 11.9038 19.8552 11.8301 19.8039 11.7787L12.2213 4.19623C12.17 4.14489 12.0963 4.11923 12.0001 4.11923C11.9039 4.11923 11.8302 4.14489 11.7788 4.19623L4.19635 11.7787C4.14501 11.8301 4.11935 11.9038 4.11935 12C4.11935 12.0961 4.14501 12.1699 4.19635 12.2212L11.7788 19.8037C11.8302 19.8551 11.9039 19.8807 12.0001 19.8807C12.0963 19.8807 12.17 19.8551 12.2213 19.8037ZM11.2501 13.0865H12.7501V7.47123H11.2501V13.0865ZM12.0001 15.702C12.2258 15.702 12.4168 15.6237 12.5731 15.4672C12.7296 15.3109 12.8078 15.1199 12.8078 14.8942C12.8078 14.6686 12.7296 14.4776 12.5731 14.3212C12.4168 14.1647 12.2258 14.0865 12.0001 14.0865C11.7744 14.0865 11.5834 14.1647 11.4271 14.3212C11.2706 14.4776 11.1923 14.6686 11.1923 14.8942C11.1923 15.1199 11.2706 15.3109 11.4271 15.4672C11.5834 15.6237 11.7744 15.702 12.0001 15.702Z",fill:"currentColor"})),sandpack:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M12.9999 22.5C12.4947 22.5 12.0671 22.325 11.7171 21.975C11.3671 21.625 11.1921 21.1974 11.1921 20.6922V7.30775C11.1921 6.80258 11.3671 6.375 11.7171 6.025C12.0671 5.675 12.4947 5.5 12.9999 5.5H16.3844C16.8895 5.5 17.3171 5.675 17.6671 6.025C18.0171 6.375 18.1921 6.80258 18.1921 7.30775V20.6922C18.1921 21.1974 18.0171 21.625 17.6671 21.975C17.3171 22.325 16.8895 22.5 16.3844 22.5H12.9999ZM12.6921 7.30775V20.6922C12.6921 20.7692 12.7242 20.8398 12.7884 20.9038C12.8524 20.9679 12.9229 21 12.9999 21H16.3844C16.4614 21 16.5319 20.9679 16.5959 20.9038C16.66 20.8398 16.6921 20.7692 16.6921 20.6922V7.30775C16.6921 7.23075 16.66 7.16025 16.5959 7.09625C16.5319 7.03208 16.4614 7 16.3844 7H12.9999C12.9229 7 12.8524 7.03208 12.7884 7.09625C12.7242 7.16025 12.6921 7.23075 12.6921 7.30775ZM6.61537 18.5C6.1102 18.5 5.68262 18.325 5.33262 17.975C4.98262 17.625 4.80762 17.1974 4.80762 16.6923V3.30775C4.80762 2.80258 4.98262 2.375 5.33262 2.025C5.68262 1.675 6.1102 1.5 6.61537 1.5H9.99987C10.505 1.5 10.9326 1.675 11.2826 2.025C11.6326 2.375 11.8076 2.80258 11.8076 3.30775V16.6923C11.8076 17.1974 11.6326 17.625 11.2826 17.975C10.9326 18.325 10.505 18.5 9.99987 18.5H6.61537ZM6.30762 3.30775V16.6923C6.30762 16.7692 6.3397 16.8398 6.40387 16.9038C6.46787 16.9679 6.53837 17 6.61537 17H9.99987C10.0769 17 10.1474 16.9679 10.2114 16.9038C10.2755 16.8398 10.3076 16.7692 10.3076 16.6923V3.30775C10.3076 3.23075 10.2755 3.16025 10.2114 3.09625C10.1474 3.03208 10.0769 3 9.99987 3H6.61537C6.53837 3 6.46787 3.03208 6.40387 3.09625C6.3397 3.16025 6.30762 3.23075 6.30762 3.30775Z",fill:"currentColor"})),rich_text:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V5.30775C19 5.23075 18.9679 5.16025 18.9038 5.09625C18.8398 5.03208 18.7692 5 18.6923 5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19ZM6.75 17H17.3268L14 12.3655L11.2308 16.0192L9 13.4615L6.75 17Z",fill:"currentColor"}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 12V6.5H9.1925C9.5925 6.5 9.9425 6.65 10.2425 6.95C10.5425 7.25 10.6925 7.6 10.6925 8V8.6925C10.6925 9.03733 10.605 9.32675 10.43 9.56075C10.255 9.79458 10.0168 9.97817 9.7155 10.1115L10.6155 12H9.404L8.504 10.1925H7.1925V12H6ZM9.1925 9H7.1925V7.6925H9.1925C9.26933 7.6925 9.33983 7.7245 9.404 7.7885C9.468 7.85267 9.5 7.92317 9.5 8V8.6925C9.5 8.76933 9.468 8.83983 9.404 8.904C9.33983 8.968 9.26933 9 9.1925 9Z",fill:"currentColor"}),v.createElement("path",{d:"M12.5 7H17.5V8.25H12.5V7Z",fill:"currentColor"}),v.createElement("path",{d:"M12.5 9.25H17.5V10.5H12.5V9.25Z",fill:"currentColor"})),difference:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),v.createElement("rect",{x:"9",y:"10",width:"5.5",height:"1.5",fill:"currentColor"}),v.createElement("rect",{x:"9",y:"15",width:"5.5",height:"1.5",fill:"currentColor"}),v.createElement("rect",{x:"11",y:"8",width:"1.5",height:"5.5",fill:"currentColor"})),markdown:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H18.6923C19.1974 3.5 19.625 3.675 19.975 4.025C20.325 4.375 20.5 4.80258 20.5 5.30775V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM18.6923 19H5.30775C5.23075 19 5.16025 18.9679 5.09625 18.9038C5.03208 18.8398 5 18.7692 5 18.6923V5.30775C5 5.23075 5.03208 5.16025 5.09625 5.09625C5.16025 5.03208 5.23075 5 5.30775 5H18.6923C18.7692 5 18.8398 5.03208 18.9038 5.09625C18.9679 5.16025 19 5.23075 19 5.30775V18.6923C19 18.7692 18.9679 18.8398 18.9038 18.9038C18.8398 18.9679 18.7692 19 18.6923 19Z",fill:"currentColor"}),v.createElement("path",{d:"M13 15H11.5V11L9.5 14L7.5 11V15H6V8H7.5L9.5 11L11.5 8H13V15Z",fill:"currentColor"}),v.createElement("path",{d:"M15.9921 15.5833L13.2886 12.8797L14.0546 12.1137L15.4504 13.5016V7.99597L16.5336 7.99993V13.5016L17.9296 12.1137L18.6954 12.8797L15.9921 15.5833Z",fill:"currentColor"})),open_in_new:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M5.30775 20.5C4.80258 20.5 4.375 20.325 4.025 19.975C3.675 19.625 3.5 19.1974 3.5 18.6923V5.30775C3.5 4.80258 3.675 4.375 4.025 4.025C4.375 3.675 4.80258 3.5 5.30775 3.5H11.6152V5H5.30775C5.23075 5 5.16025 5.03208 5.09625 5.09625C5.03208 5.16025 5 5.23075 5 5.30775V18.6923C5 18.7692 5.03208 18.8398 5.09625 18.9038C5.16025 18.9679 5.23075 19 5.30775 19H18.6923C18.7692 19 18.8398 18.9679 18.9038 18.9038C18.9679 18.8398 19 18.7692 19 18.6923V12.3848H20.5V18.6923C20.5 19.1974 20.325 19.625 19.975 19.975C19.625 20.325 19.1974 20.5 18.6923 20.5H5.30775ZM9.71925 15.3345L8.6655 14.2808L17.9462 5H14V3.5H20.5V10H19V6.05375L9.71925 15.3345Z",fill:"currentColor"})),link_off:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M18.8843 16.1038L17.7498 14.9385C18.4228 14.7552 18.9661 14.3946 19.3796 13.8568C19.7931 13.319 19.9998 12.7 19.9998 12C19.9998 11.1604 19.705 10.444 19.1153 9.85105C18.5255 9.25805 17.8139 8.96155 16.9806 8.96155H13.1728V7.46155H16.9806C18.2293 7.46155 19.2947 7.90422 20.1768 8.78955C21.0588 9.67472 21.4998 10.7449 21.4998 12C21.4998 12.8859 21.262 13.6951 20.7863 14.4278C20.3107 15.1606 19.6767 15.7193 18.8843 16.1038ZM15.5806 12.75L14.0806 11.25H15.7306V12.75H15.5806ZM20.1461 22.2538L1.74609 3.8538L2.79984 2.80005L21.1998 21.2L20.1461 22.2538ZM10.8268 16.5386H7.03834C5.78318 16.5386 4.71301 16.0959 3.82784 15.2105C2.94251 14.3254 2.49984 13.2552 2.49984 12C2.49984 10.8885 2.85784 9.91322 3.57384 9.07405C4.28984 8.23505 5.18826 7.72838 6.26909 7.55405H6.49984L7.90759 8.96155H7.03834C6.19851 8.96155 5.48218 9.25805 4.88934 9.85105C4.29634 10.444 3.99984 11.1604 3.99984 12C3.99984 12.8397 4.29634 13.556 4.88934 14.149C5.48218 14.742 6.19851 15.0385 7.03834 15.0385H10.8268V16.5386ZM8.26909 12.75V11.25H10.2113L11.6863 12.75H8.26909Z",fill:"currentColor"})),edit:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M5 19H6.2615L16.498 8.7635L15.2365 7.502L5 17.7385V19ZM3.5 20.5V17.1155L16.6905 3.93075C16.8417 3.79342 17.0086 3.68733 17.1913 3.6125C17.3741 3.5375 17.5658 3.5 17.7663 3.5C17.9668 3.5 18.1609 3.53558 18.3488 3.60675C18.5367 3.67792 18.7032 3.79108 18.848 3.94625L20.0693 5.18275C20.2244 5.32758 20.335 5.49425 20.401 5.68275C20.467 5.87125 20.5 6.05975 20.5 6.24825C20.5 6.44942 20.4657 6.64133 20.397 6.824C20.3283 7.00683 20.2191 7.17383 20.0693 7.325L6.8845 20.5H3.5ZM15.8562 8.14375L15.2365 7.502L16.498 8.7635L15.8562 8.14375Z",fill:"currentColor"})),content_copy:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M9.05775 17.5C8.55258 17.5 8.125 17.325 7.775 16.975C7.425 16.625 7.25 16.1974 7.25 15.6923V4.30775C7.25 3.80258 7.425 3.375 7.775 3.025C8.125 2.675 8.55258 2.5 9.05775 2.5H17.4423C17.9474 2.5 18.375 2.675 18.725 3.025C19.075 3.375 19.25 3.80258 19.25 4.30775V15.6923C19.25 16.1974 19.075 16.625 18.725 16.975C18.375 17.325 17.9474 17.5 17.4423 17.5H9.05775ZM9.05775 16H17.4423C17.5192 16 17.5898 15.9679 17.6538 15.9038C17.7179 15.8398 17.75 15.7692 17.75 15.6923V4.30775C17.75 4.23075 17.7179 4.16025 17.6538 4.09625C17.5898 4.03208 17.5192 4 17.4423 4H9.05775C8.98075 4 8.91025 4.03208 8.84625 4.09625C8.78208 4.16025 8.75 4.23075 8.75 4.30775V15.6923C8.75 15.7692 8.78208 15.8398 8.84625 15.9038C8.91025 15.9679 8.98075 16 9.05775 16ZM5.55775 21C5.05258 21 4.625 20.825 4.275 20.475C3.925 20.125 3.75 19.6974 3.75 19.1923V6.30775H5.25V19.1923C5.25 19.2693 5.28208 19.3398 5.34625 19.4038C5.41025 19.4679 5.48075 19.5 5.55775 19.5H15.4423V21H5.55775Z",fill:"currentColor"})),more_horiz:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M6.23096 13.5C5.81846 13.5 5.46537 13.3531 5.17171 13.0592C4.87787 12.7656 4.73096 12.4125 4.73096 12C4.73096 11.5875 4.87787 11.2344 5.17171 10.9408C5.46537 10.6469 5.81846 10.5 6.23096 10.5C6.64346 10.5 6.99662 10.6469 7.29046 10.9408C7.58412 11.2344 7.73096 11.5875 7.73096 12C7.73096 12.4125 7.58412 12.7656 7.29046 13.0592C6.99662 13.3531 6.64346 13.5 6.23096 13.5ZM12.0002 13.5C11.5877 13.5 11.2346 13.3531 10.941 13.0592C10.6471 12.7656 10.5002 12.4125 10.5002 12C10.5002 11.5875 10.6471 11.2344 10.941 10.9408C11.2346 10.6469 11.5877 10.5 12.0002 10.5C12.4127 10.5 12.7658 10.6469 13.0595 10.9408C13.3533 11.2344 13.5002 11.5875 13.5002 12C13.5002 12.4125 13.3533 12.7656 13.0595 13.0592C12.7658 13.3531 12.4127 13.5 12.0002 13.5ZM17.7695 13.5C17.357 13.5 17.0038 13.3531 16.71 13.0592C16.4163 12.7656 16.2695 12.4125 16.2695 12C16.2695 11.5875 16.4163 11.2344 16.71 10.9408C17.0038 10.6469 17.357 10.5 17.7695 10.5C18.182 10.5 18.535 10.6469 18.8287 10.9408C19.1225 11.2344 19.2695 11.5875 19.2695 12C19.2695 12.4125 19.1225 12.7656 18.8287 13.0592C18.535 13.3531 18.182 13.5 17.7695 13.5Z",fill:"currentColor"})),more_vert:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M12 19.2692C11.5875 19.2692 11.2344 19.1223 10.9408 18.8285C10.6469 18.5348 10.5 18.1817 10.5 17.7692C10.5 17.3567 10.6469 17.0035 10.9408 16.7097C11.2344 16.416 11.5875 16.2692 12 16.2692C12.4125 16.2692 12.7656 16.416 13.0592 16.7097C13.3531 17.0035 13.5 17.3567 13.5 17.7692C13.5 18.1817 13.3531 18.5348 13.0592 18.8285C12.7656 19.1223 12.4125 19.2692 12 19.2692ZM12 13.5C11.5875 13.5 11.2344 13.353 10.9408 13.0592C10.6469 12.7655 10.5 12.4125 10.5 12C10.5 11.5875 10.6469 11.2344 10.9408 10.9407C11.2344 10.6469 11.5875 10.5 12 10.5C12.4125 10.5 12.7656 10.6469 13.0592 10.9407C13.3531 11.2344 13.5 11.5875 13.5 12C13.5 12.4125 13.3531 12.7655 13.0592 13.0592C12.7656 13.353 12.4125 13.5 12 13.5ZM12 7.73071C11.5875 7.73071 11.2344 7.58388 10.9408 7.29021C10.6469 6.99638 10.5 6.64321 10.5 6.23071C10.5 5.81821 10.6469 5.46513 10.9408 5.17146C11.2344 4.87763 11.5875 4.73071 12 4.73071C12.4125 4.73071 12.7656 4.87763 13.0592 5.17146C13.3531 5.46513 13.5 5.81821 13.5 6.23071C13.5 6.64321 13.3531 6.99638 13.0592 7.29021C12.7656 7.58388 12.4125 7.73071 12 7.73071Z",fill:"currentColor"})),close:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M6.39994 18.6538L5.34619 17.6L10.9462 12L5.34619 6.4L6.39994 5.34625L11.9999 10.9463L17.5999 5.34625L18.6537 6.4L13.0537 12L18.6537 17.6L17.5999 18.6538L11.9999 13.0538L6.39994 18.6538Z",fill:"currentColor"})),settings:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M9.69225 21.5L9.3115 18.4538C9.04367 18.3641 8.769 18.2385 8.4875 18.077C8.20617 17.9153 7.95459 17.7422 7.73275 17.5577L4.9115 18.75L2.604 14.75L5.04425 12.9058C5.02125 12.7571 5.00492 12.6077 4.99525 12.4578C4.98559 12.3078 4.98075 12.1583 4.98075 12.0095C4.98075 11.8673 4.98559 11.7228 4.99525 11.576C5.00492 11.4292 5.02125 11.2686 5.04425 11.0943L2.604 9.25L4.9115 5.26925L7.723 6.452C7.96417 6.261 8.22159 6.08633 8.49525 5.928C8.76892 5.76967 9.03784 5.64242 9.302 5.54625L9.69225 2.5H14.3078L14.6885 5.55575C14.9885 5.66475 15.2599 5.792 15.5028 5.9375C15.7458 6.083 15.991 6.2545 16.2385 6.452L19.0885 5.26925L21.396 9.25L18.9173 11.123C18.9531 11.2845 18.9727 11.4355 18.976 11.576C18.9792 11.7163 18.9808 11.8577 18.9808 12C18.9808 12.1358 18.9775 12.274 18.971 12.4145C18.9647 12.5548 18.9417 12.7154 18.902 12.8963L21.3615 14.75L19.0538 18.75L16.2385 17.548C15.991 17.7455 15.7384 17.9202 15.4808 18.072C15.2231 18.224 14.959 18.3481 14.6885 18.4443L14.3078 21.5H9.69225ZM11 20H12.9655L13.325 17.3212C13.8353 17.1879 14.3017 16.9985 14.724 16.753C15.1465 16.5073 15.5539 16.1916 15.9463 15.8057L18.4308 16.85L19.4155 15.15L17.2463 13.5155C17.3296 13.2565 17.3863 13.0026 17.4163 12.7537C17.4464 12.5051 17.4615 12.2538 17.4615 12C17.4615 11.7397 17.4464 11.4884 17.4163 11.2463C17.3863 11.0039 17.3296 10.7564 17.2463 10.5038L19.4345 8.85L18.45 7.15L15.9365 8.2095C15.6018 7.85183 15.2009 7.53583 14.7338 7.2615C14.2664 6.98717 13.7937 6.79292 13.3155 6.67875L13 4H11.0155L10.6845 6.66925C10.1743 6.78975 9.70325 6.97433 9.27125 7.223C8.83909 7.47183 8.42684 7.79233 8.0345 8.1845L5.55 7.15L4.5655 8.85L6.725 10.4595C6.64167 10.6968 6.58334 10.9437 6.55 11.2C6.51667 11.4563 6.5 11.7262 6.5 12.0095C6.5 12.2698 6.51667 12.525 6.55 12.775C6.58334 13.025 6.6385 13.2718 6.7155 13.5155L4.5655 15.15L5.55 16.85L8.025 15.8C8.4045 16.1897 8.81025 16.5089 9.24225 16.7578C9.67442 17.0064 10.152 17.1974 10.675 17.3307L11 20ZM12.0115 15C12.8435 15 13.5515 14.708 14.1355 14.124C14.7195 13.54 15.0115 12.832 15.0115 12C15.0115 11.168 14.7195 10.46 14.1355 9.876C13.5515 9.292 12.8435 9 12.0115 9C11.1692 9 10.4586 9.292 9.87975 9.876C9.30092 10.46 9.0115 11.168 9.0115 12C9.0115 12.832 9.30092 13.54 9.87975 14.124C10.4586 14.708 11.1692 15 12.0115 15Z",fill:"currentColor"})),delete_big:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),delete_small:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M7.30775 20.5C6.80908 20.5 6.38308 20.3234 6.02975 19.9702C5.67658 19.6169 5.5 19.1909 5.5 18.6922V5.99998H4.5V4.49998H9V3.61548H15V4.49998H19.5V5.99998H18.5V18.6922C18.5 19.1974 18.325 19.625 17.975 19.975C17.625 20.325 17.1974 20.5 16.6923 20.5H7.30775ZM17 5.99998H7V18.6922C7 18.7821 7.02883 18.8558 7.0865 18.9135C7.14417 18.9711 7.21792 19 7.30775 19H16.6923C16.7692 19 16.8398 18.9679 16.9038 18.9037C16.9679 18.8397 17 18.7692 17 18.6922V5.99998ZM9.404 17H10.9037V7.99998H9.404V17ZM13.0962 17H14.596V7.99998H13.0962V17Z",fill:"currentColor"})),format_align_center:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM7.5 16.625V15.125H16.5V16.625H7.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM7.5 8.875V7.375H16.5V8.875H7.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_left:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M3.5 20.5V19H20.5V20.5H3.5ZM3.5 16.625V15.125H14.5V16.625H3.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM3.5 8.875V7.375H14.5V8.875H3.5ZM3.5 5V3.5H20.5V5H3.5Z",fill:"currentColor"})),format_align_right:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M3.5 5V3.5H20.5V5H3.5ZM9.5 8.875V7.375H20.5V8.875H9.5ZM3.5 12.75V11.25H20.5V12.75H3.5ZM9.5 16.625V15.125H20.5V16.625H9.5ZM3.5 20.5V19H20.5V20.5H3.5Z",fill:"currentColor"})),add_row:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.025 10.2077C4.375 9.85775 4.80258 9.68275 5.30775 9.68275H6.5V11.1827H5.30775C5.21792 11.1827 5.14417 11.2116 5.0865 11.2693C5.02883 11.3269 5 11.4007 5 11.4905V16.1923C5 16.2821 5.02883 16.3558 5.0865 16.4135C5.14417 16.4712 5.21792 16.5 5.30775 16.5H18.6923C18.7821 16.5 18.8558 16.4712 18.9135 16.4135C18.9712 16.3558 19 16.2821 19 16.1923V11.4905C19 11.4007 18.9712 11.3269 18.9135 11.2693C18.8558 11.2116 18.7821 11.1827 18.6923 11.1827H17.6923V9.68275H18.6923C19.1974 9.68275 19.625 9.85775 19.975 10.2077C20.325 10.5577 20.5 10.9853 20.5 11.4905V16.1923C20.5 16.6974 20.325 17.125 19.975 17.475C19.625 17.825 19.1974 18 18.6923 18H5.30775C4.80258 18 4.375 17.825 4.025 17.475C3.675 17.125 3.5 16.6974 3.5 16.1923V11.4905C3.5 10.9853 3.675 10.5577 4.025 10.2077Z",fill:"currentColor"}),v.createElement("path",{d:"M11.3848 9.68275V7.5H12.8848V9.68275H15V11.1827H12.8848V13.2307H11.3848V11.1827H9.26925V9.68275H11.3848Z",fill:"currentColor"})),add_column:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70775 4.025C9.35775 4.375 9.18275 4.80258 9.18275 5.30775V6.5H10.6827V5.30775C10.6827 5.21792 10.7116 5.14417 10.7693 5.0865C10.8269 5.02883 10.9007 5 10.9905 5H15.6923C15.7821 5 15.8558 5.02883 15.9135 5.0865C15.9712 5.14417 16 5.21792 16 5.30775V18.6923C16 18.7821 15.9712 18.8558 15.9135 18.9135C15.8558 18.9712 15.7821 19 15.6923 19H10.9905C10.9007 19 10.8269 18.9712 10.7693 18.9135C10.7116 18.8558 10.6827 18.7821 10.6827 18.6923V17.6923H9.18275V18.6923C9.18275 19.1974 9.35775 19.625 9.70775 19.975C10.0577 20.325 10.4853 20.5 10.9905 20.5H15.6923C16.1974 20.5 16.625 20.325 16.975 19.975C17.325 19.625 17.5 19.1974 17.5 18.6923V5.30775C17.5 4.80258 17.325 4.375 16.975 4.025C16.625 3.675 16.1974 3.5 15.6923 3.5H10.9905C10.4853 3.5 10.0577 3.675 9.70775 4.025Z",fill:"currentColor"}),v.createElement("path",{d:"M9.18275 11.3848H7V12.8848H9.18275V15H10.6827V12.8848H12.7307V11.3848H10.6827V9.26925H9.18275V11.3848Z",fill:"currentColor"})),insert_col_left:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M13.0001 20.1152H8.67713H8.75388H8.69238H13.0001ZM7.19238 19.8075C7.19238 20.3127 7.36738 20.7402 7.71738 21.0902C8.06738 21.4402 8.49497 21.6152 9.00013 21.6152H12.6924C13.1975 21.6152 13.6251 21.4402 13.9751 21.0902C14.3251 20.7402 14.5001 20.3127 14.5001 19.8075V10.423H13.0001V19.8075C13.0001 19.8973 12.9713 19.9711 12.9136 20.0287C12.856 20.0864 12.7822 20.1152 12.6924 20.1152H9.00013C8.9103 20.1152 8.83655 20.0864 8.77888 20.0287C8.72122 19.9711 8.69238 19.8973 8.69238 19.8075V4.69223C8.26422 4.74357 7.90722 4.93299 7.62138 5.26048C7.33538 5.58798 7.19238 5.97548 7.19238 6.42298V19.8075ZM13.0001 2.49998V4.61523H10.8846V6.11523H13.0001V8.23073H14.5001V6.11523H16.6154V4.61523H14.5001V2.49998H13.0001Z",fill:"currentColor"})),insert_row_above:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M20.1152 9.99987V14.3229V14.2461V14.3076V9.99987ZM19.8075 15.8076C20.3127 15.8076 20.7402 15.6326 21.0902 15.2826C21.4402 14.9326 21.6152 14.505 21.6152 13.9999V10.3076C21.6152 9.80245 21.4402 9.37487 21.0902 9.02487C20.7402 8.67487 20.3127 8.49987 19.8075 8.49987H10.423V9.99987H19.8075C19.8973 9.99987 19.9711 10.0287 20.0287 10.0864C20.0864 10.144 20.1152 10.2178 20.1152 10.3076V13.9999C20.1152 14.0897 20.0864 14.1635 20.0287 14.2211C19.9711 14.2788 19.8973 14.3076 19.8075 14.3076H4.69223C4.74357 14.7358 4.93299 15.0928 5.26048 15.3786C5.58798 15.6646 5.97548 15.8076 6.42298 15.8076H19.8075ZM2.49998 9.99987H4.61523V12.1154H6.11523V9.99987H8.23073V8.49987H6.11523V6.38462H4.61523V8.49987H2.49998V9.99987Z",fill:"currentColor"})),insert_row_below:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M20.1152 14.1924V9.86939V9.94614V9.88464V14.1924ZM19.8075 8.38464C20.3127 8.38464 20.7402 8.55964 21.0902 8.90964C21.4402 9.25964 21.6152 9.68723 21.6152 10.1924V13.8846C21.6152 14.3898 21.4402 14.8174 21.0902 15.1674C20.7402 15.5174 20.3127 15.6924 19.8075 15.6924H10.423V14.1924H19.8075C19.8973 14.1924 19.9711 14.1636 20.0287 14.1059C20.0864 14.0482 20.1152 13.9745 20.1152 13.8846V10.1924C20.1152 10.1026 20.0864 10.0288 20.0287 9.97114C19.9711 9.91348 19.8973 9.88464 19.8075 9.88464H4.69223C4.74357 9.45648 4.93299 9.09948 5.26048 8.81364C5.58798 8.52764 5.97548 8.38464 6.42298 8.38464H19.8075ZM2.49998 14.1924H4.61523V12.0769H6.11523V14.1924H8.23073V15.6924H6.11523V17.8076H4.61523V15.6924H2.49998V14.1924Z",fill:"currentColor"})),insert_col_right:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M10.8075 20.1152H15.1305H15.0537H15.1152H10.8075ZM16.6152 19.8075C16.6152 20.3127 16.4402 20.7402 16.0902 21.0902C15.7402 21.4402 15.3127 21.6152 14.8075 21.6152H11.1152C10.6101 21.6152 10.1825 21.4402 9.83248 21.0902C9.48248 20.7402 9.30748 20.3127 9.30748 19.8075V10.423H10.8075V19.8075C10.8075 19.8973 10.8363 19.9711 10.894 20.0287C10.9517 20.0864 11.0254 20.1152 11.1152 20.1152H14.8075C14.8973 20.1152 14.9711 20.0864 15.0287 20.0287C15.0864 19.9711 15.1152 19.8973 15.1152 19.8075V4.69223C15.5434 4.74357 15.9004 4.93299 16.1862 5.26048C16.4722 5.58798 16.6152 5.97548 16.6152 6.42298V19.8075ZM10.8075 2.49998V4.61523H12.923V6.11523H10.8075V8.23073H9.30748V6.11523H7.19223V4.61523H9.30748V2.49998H10.8075Z",fill:"currentColor"})),check:v.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v.createElement("path",{d:"M9.54983 17.6537L4.21533 12.3192L5.28433 11.25L9.54983 15.5155L18.7153 6.34998L19.7843 7.41923L9.54983 17.6537Z",fill:"currentColor"}))},D4="_editorRoot_1e2ox_53",N4="_editorWrapper_1e2ox_155",V4="_toolbarRoot_1e2ox_162",Z4="_readOnlyToolbarRoot_1e2ox_189",B4="_toolbarToggleItem_1e2ox_208",F4="_toolbarGroupOfGroups_1e2ox_219",X4="_toolbarToggleSingleGroup_1e2ox_224",z4="_toolbarButton_1e2ox_239",W4="_selectContainer_1e2ox_288",j4="_selectItem_1e2ox_301",q4="_selectTrigger_1e2ox_308",Y4="_selectDropdownArrow_1e2ox_374",H4="_contentEditable_1e2ox_380",U4="_codeMirrorWrapper_1e2ox_392",G4="_codeMirrorToolbar_1e2ox_409",K4="_iconButton_1e2ox_457",J4="_primaryButton_1e2ox_507",e6="_secondaryButton_1e2ox_508",t6="_linkDialogEditForm_1e2ox_541",n6="_linkDialogAnchor_1e2ox_587",r6="_linkDialogPopoverContent_1e2ox_601",i6="_tableColumnEditorPopoverContent_1e2ox_602",s6="_popoverArrow_1e2ox_650",o6="_linkDialogPreviewAnchor_1e2ox_654",l6="_tooltipTrigger_1e2ox_677",a6="_tooltipContent_1e2ox_681",c6="_actionButton_1e2ox_695",u6="_tableEditor_1e2ox_714",h6="_toolCell_1e2ox_725",f6="_tableColumnEditorTrigger_1e2ox_744",d6="_addRowButton_1e2ox_746",p6="_addColumnButton_1e2ox_747",g6="_tableColumnEditorToolbar_1e2ox_789",m6="_toggleGroupRoot_1e2ox_802",O6="_tableToolsColumn_1e2ox_820",x6="_leftAlignedCell_1e2ox_829",b6="_rightAlignedCell_1e2ox_833",y6="_centeredCell_1e2ox_837",v6="_diffSourceToggleWrapper_1e2ox_986",S6="_ggDiffSourceToggle_1e2ox_994",w6="_diffSourceToggle_1e2ox_986",k6="_toolbarTitleMode_1e2ox_1027",C6="_placeholder_1e2ox_1106",_6="_rootContentEditableWrapper_1e2ox_1119",T6="_downshiftInputWrapper_1e2ox_1129",P6="_downshiftInput_1e2ox_1129",E6="_downshiftAutocompleteContainer_1e2ox_1160",Q6="_textInput_1e2ox_1206",$6="_multiFieldForm_1e2ox_1214",A6="_formField_1e2ox_1220",M6="_markdownParseError_1e2ox_1231",L6="_popupContainer_1e2ox_1240",se={editorRoot:D4,editorWrapper:N4,toolbarRoot:V4,readOnlyToolbarRoot:Z4,toolbarToggleItem:B4,toolbarGroupOfGroups:F4,toolbarToggleSingleGroup:X4,toolbarButton:z4,selectContainer:W4,selectItem:j4,selectTrigger:q4,selectDropdownArrow:Y4,contentEditable:H4,codeMirrorWrapper:U4,codeMirrorToolbar:G4,iconButton:K4,primaryButton:J4,secondaryButton:e6,linkDialogEditForm:t6,linkDialogAnchor:n6,linkDialogPopoverContent:r6,tableColumnEditorPopoverContent:i6,popoverArrow:s6,linkDialogPreviewAnchor:o6,tooltipTrigger:l6,tooltipContent:a6,actionButton:c6,tableEditor:u6,toolCell:h6,tableColumnEditorTrigger:f6,addRowButton:d6,addColumnButton:p6,tableColumnEditorToolbar:g6,toggleGroupRoot:m6,tableToolsColumn:O6,leftAlignedCell:x6,rightAlignedCell:b6,centeredCell:y6,diffSourceToggleWrapper:v6,ggDiffSourceToggle:S6,diffSourceToggle:w6,toolbarTitleMode:k6,placeholder:C6,rootContentEditableWrapper:_6,downshiftInputWrapper:T6,downshiftInput:P6,downshiftAutocompleteContainer:E6,textInput:Q6,multiFieldForm:$6,formField:A6,markdownParseError:M6,popupContainer:L6},R6=new Set(["http:","https:","mailto:","sms:","tel:"]);class Ei extends yn{static getType(){return"link"}static clone(e){return new Ei(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",t={},r){super(r);const{target:i=null,rel:s=null,title:o=null}=t;this.__url=e,this.__target=i,this.__rel=s,this.__title=o}createDOM(e){const t=document.createElement("a");return this.updateLinkDOM(null,t,e),mr(t,e.theme.link),t}updateLinkDOM(e,t,r){if(E2(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const s=`__${i}`,o=this[s];e&&e[s]===o||(o?t[i]=o:t.removeAttribute(i))}}}updateDOM(e,t,r){return this.updateLinkDOM(e,t,r),!1}static importDOM(){return{a:e=>({conversion:I6,priority:1})}}static importJSON(e){return ki().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){e=ny(e);try{const t=new URL(ny(e));if(!R6.has(t.protocol))return"about:blank"}catch{return e}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){const t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){const t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){const t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){const t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){const r=ki(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,t),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,r){if(!B(t))return!1;const i=t.anchor.getNode(),s=t.focus.getNode();return this.isParentOf(i)&&this.isParentOf(s)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function I6(n){let e=null;if(E2(n)){const t=n.textContent;(t!==null&&t!==""||n.children.length>0)&&(e=ki(n.getAttribute("href")||"",{rel:n.getAttribute("rel"),target:n.getAttribute("target"),title:n.getAttribute("title")}))}return{node:e}}function ki(n="",e){return In(new Ei(n,e))}function dn(n){return n instanceof Ei}let Df=class q5 extends Ei{constructor(e="",t={},r){super(e,t,r),this.__isUnlinked=t.isUnlinked!==void 0&&t.isUnlinked!==null&&t.isUnlinked}static getType(){return"autolink"}static clone(e){return new q5(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){const t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,t,r){return super.updateDOM(e,t,r)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return Mg().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,t=!0){const r=this.getParentOrThrow().insertNewAfter(e,t);if(I(r)){const i=Mg(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(i),i}return null}};function Mg(n="",e){return In(new Df(n,e))}function or(n){return n instanceof Df}const Lo=Oe("TOGGLE_LINK_COMMAND");function ey(n,e){if(n.type==="element"){const t=n.getNode();return I(t)||(function(r,...i){const s=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",r);for(const l of i)o.append("v",l);throw s.search=o.toString(),Error(`Minified Lexical error #${r}; visit ${s.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),t.getChildren()[n.offset+e]||null}return null}function Ad(n,e={}){const{target:t,title:r}=e,i=e.rel===void 0?"noreferrer":e.rel,s=H();if(s===null||!B(s)&&!_t(s))return;if(_t(s)){const c=s.getNodes();return c.length===0?void 0:void c.forEach((u=>{if(n===null){const h=dr(u,(f=>!or(f)&&dn(f)));h&&(h.insertBefore(u),h.getChildren().length===0&&h.remove())}else{const h=dr(u,(f=>!or(f)&&dn(f)));if(h)h.setURL(n),t!==void 0&&h.setTarget(t),i!==void 0&&h.setRel(i);else{const f=ki(n,{rel:i,target:t});u.insertBefore(f),f.append(u)}}}))}const o=s.extract();if(n===null)return void o.forEach((c=>{const u=dr(c,(h=>!or(h)&&dn(h)));if(u){const h=u.getChildren();for(let f=0;f<h.length;f++)u.insertBefore(h[f]);u.remove()}}));const l=new Set,a=c=>{l.has(c.getKey())||(l.add(c.getKey()),c.setURL(n),t!==void 0&&c.setTarget(t),i!==void 0&&c.setRel(i),r!==void 0&&c.setTitle(r))};if(o.length===1){const c=ty(o[0],dn);if(c!==null)return a(c)}(function(c){const u=H();if(!B(u))return c();const h=Ms(u),f=h.isBackward(),d=ey(h.anchor,f?-1:0),p=ey(h.focus,f?0:-1);if(c(),d||p){const g=H();if(B(g)){const m=g.clone();if(d){const x=d.getParent();x&&m.anchor.set(x.getKey(),d.getIndexWithinParent()+(f?1:0),"element")}if(p){const x=p.getParent();x&&m.focus.set(x.getKey(),p.getIndexWithinParent()+(f?0:1),"element")}ht(Ms(m))}}})((()=>{let c=null;for(const u of o){if(!u.isAttached())continue;const h=ty(u,dn);if(h){a(h);continue}if(I(u)){if(!u.isInline())continue;if(dn(u)){if(!(or(u)||c!==null&&c.getParentOrThrow().isParentOf(u))){a(u),c=u;continue}for(const d of u.getChildren())u.insertBefore(d);u.remove();continue}}const f=u.getPreviousSibling();dn(f)&&f.is(c)?f.append(u):(c=ki(n,{rel:i,target:t,title:r}),u.insertAfter(c),c.append(u))}}))}function ty(n,e){let t=n;for(;t!==null&&t.getParent()!==null&&!e(t);)t=t.getParentOrThrow();return e(t)?t:null}const D6=/^\+?[0-9\s()-]{5,}$/;function ny(n){return n.match(/^[a-z][a-z0-9+.-]*:/i)||n.match(/^[/#.]/)?n:n.includes("@")?`mailto:${n}`:D6.test(n)?`tel:${n}`:`https://${n}`}function Xi(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function _a(n){let e=1,t=n.getParent();for(;t!=null;){if(we(t)){const r=t.getParent();if(me(r)){e++,t=r.getParent();continue}Xi(40)}return e}return e}function Lg(n){let e=n.getParent();me(e)||Xi(40);let t=e;for(;t!==null;)t=t.getParent(),me(t)&&(e=t);return e}function Y5(n){let e=[];const t=n.getChildren().filter(we);for(let r=0;r<t.length;r++){const i=t[r],s=i.getFirstChild();me(s)?e=e.concat(Y5(s)):e.push(i)}return e}function Ar(n){return we(n)&&me(n.getFirstChild())}function ry(n){return on().append(n)}function H5(n,e){return we(n)&&(e.length===0||e.length===1&&n.is(e[0])&&n.getChildrenSize()===0)}function Rg(n){const e=H();if(e!==null){let t=e.getNodes();if(B(e)){const i=e.getStartEndPoints();i===null&&Xi(143);const[s]=i,o=s.getNode(),l=o.getParent();if(Rt(o)){const a=o.getFirstChild();if(a)t=a.selectStart().getNodes();else{const c=ze();o.append(c),t=c.select().getNodes()}}else if(H5(o,t)){const a=rn(n);if(Rt(l)){o.replace(a);const c=on();I(o)&&(c.setFormat(o.getFormatType()),c.setIndent(o.getIndent())),a.append(c)}else if(we(o)){const c=o.getParentOrThrow();Fs(a,c.getChildren()),c.replace(a)}return}}const r=new Set;for(let i=0;i<t.length;i++){const s=t[i];if(I(s)&&s.isEmpty()&&!we(s)&&!r.has(s.getKey())){iy(s,n);continue}let o=b2(s)?s.getParent():we(s)&&s.isEmpty()?s:null;for(;o!=null;){const l=o.getKey();if(me(o)){if(!r.has(l)){const a=rn(n);Fs(a,o.getChildren()),o.replace(a),r.add(l)}break}{const a=o.getParent();if(Rt(a)&&!r.has(l)){r.add(l),iy(o,n);break}o=a}}}}}function Fs(n,e){n.splice(n.getChildrenSize(),0,e)}function iy(n,e){if(me(n))return n;const t=n.getPreviousSibling(),r=n.getNextSibling(),i=on();let s;if(Fs(i,n.getChildren()),me(t)&&e===t.getListType())t.append(i),me(r)&&e===r.getListType()&&(Fs(t,r.getChildren()),r.remove()),s=t;else if(me(r)&&e===r.getListType())r.getFirstChildOrThrow().insertBefore(i),s=r;else{const o=rn(e);o.append(i),n.replace(o),s=o}return i.setFormat(n.getFormatType()),i.setIndent(n.getIndent()),n.remove(),s}function n1(n,e){const t=n.getLastChild(),r=e.getFirstChild();t&&r&&Ar(t)&&Ar(r)&&(n1(t.getFirstChild(),r.getFirstChild()),r.remove());const i=e.getChildren();i.length>0&&n.append(...i),e.remove()}function N6(){const n=H();if(B(n)){const e=new Set,t=n.getNodes(),r=n.anchor.getNode();if(H5(r,t))e.add(Lg(r));else for(let i=0;i<t.length;i++){const s=t[i];if(b2(s)){const o=j2(s,Qi);o!=null&&e.add(Lg(o))}}for(const i of e){let s=i;const o=Y5(i);for(const l of o){const a=ze().setTextStyle(n.style).setTextFormat(n.format);Fs(a,l.getChildren()),s.insertAfter(a),s=a,l.__key===n.anchor.key&&Zs(n.anchor,An(Un(a,"next"))),l.__key===n.focus.key&&Zs(n.focus,An(Un(a,"next"))),l.remove()}i.remove()}}}function U5(n){const e=n.getListType()!=="check";let t=n.getStart();for(const r of n.getChildren())we(r)&&(r.getValue()!==t&&r.setValue(t),e&&r.getLatest().__checked!=null&&r.setChecked(void 0),me(r.getFirstChild())||t++)}function V6(n){const e=new Set;if(Ar(n)||e.has(n.getKey()))return;const t=n.getParent(),r=n.getNextSibling(),i=n.getPreviousSibling();if(Ar(r)&&Ar(i)){const s=i.getFirstChild();if(me(s)){s.append(n);const o=r.getFirstChild();me(o)&&(Fs(s,o.getChildren()),r.remove(),e.add(r.getKey()))}}else if(Ar(r)){const s=r.getFirstChild();if(me(s)){const o=s.getFirstChild();o!==null&&o.insertBefore(n)}}else if(Ar(i)){const s=i.getFirstChild();me(s)&&s.append(n)}else if(me(t)){const s=on().setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle()),o=rn(t.getListType()).setTextFormat(t.getTextFormat()).setTextStyle(t.getTextStyle());s.append(o),o.append(n),i?i.insertAfter(s):r?r.insertBefore(s):t.append(s)}}function Z6(n){if(Ar(n))return;const e=n.getParent(),t=e?e.getParent():void 0;if(me(t?t.getParent():void 0)&&we(t)&&me(e)){const r=e?e.getFirstChild():void 0,i=e?e.getLastChild():void 0;if(n.is(r))t.insertBefore(n),e.isEmpty()&&t.remove();else if(n.is(i))t.insertAfter(n),e.isEmpty()&&t.remove();else{const s=e.getListType(),o=on(),l=rn(s);o.append(l),n.getPreviousSiblings().forEach((u=>l.append(u)));const a=on(),c=rn(s);a.append(c),Fs(c,n.getNextSiblings()),t.insertBefore(o),t.insertAfter(a),t.replace(n)}}}function B6(){const n=H();if(!B(n)||!n.isCollapsed())return!1;const e=n.anchor.getNode();if(!we(e)||e.getChildrenSize()!==0)return!1;const t=Lg(e),r=e.getParent();me(r)||Xi(40);const i=r.getParent();let s;if(Rt(i))s=ze(),t.insertAfter(s);else{if(!we(i))return!1;s=on(),i.insertAfter(s)}s.setTextStyle(n.style).setTextFormat(n.format).select();const o=e.getNextSiblings();if(o.length>0){const l=rn(r.getListType());if(we(s)){const a=on();a.append(l),s.insertAfter(a)}else s.insertAfter(l);l.append(...o)}return(function(l){let a=l;for(;a.getNextSibling()==null&&a.getPreviousSibling()==null;){const c=a.getParent();if(c==null||!we(c)&&!me(c))break;a=c}a.remove()})(e),!0}function Oh(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}let Qi=class extends yn{$config(){return this.config("listitem",{$transform:e=>{if(e.__checked==null)return;const t=e.getParent();me(t)&&t.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0)},extends:yn,importDOM:{li:()=>({conversion:F6,priority:0})}})}constructor(e=1,t=void 0,r){super(r),this.__value=e===void 0?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){const t=document.createElement("li");return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,r){const i=this.getParent();me(i)&&i.getListType()==="check"&&(function(l,a,c,u){me(a.getFirstChild())?(l.removeAttribute("role"),l.removeAttribute("tabIndex"),l.removeAttribute("aria-checked")):(l.setAttribute("role","checkbox"),l.setAttribute("tabIndex","-1"),c&&a.__checked===c.__checked||l.setAttribute("aria-checked",a.getChecked()?"true":"false"))})(t,this,e),t.value=this.__value,(function(l,a,c){const u=[],h=[],f=a.list,d=f?f.listitem:void 0;let p;if(f&&f.nested&&(p=f.nested.listitem),d!==void 0&&u.push(...Oh(d)),f){const g=c.getParent(),m=me(g)&&g.getListType()==="check",x=c.getChecked();m&&!x||h.push(f.listitemUnchecked),m&&x||h.push(f.listitemChecked),m&&u.push(x?f.listitemChecked:f.listitemUnchecked)}if(p!==void 0){const g=Oh(p);c.getChildren().some((m=>me(m)))?u.push(...g):h.push(...g)}h.length>0&&$f(l,...h),u.length>0&&mr(l,...u)})(t,r.theme,this);const s=e?e.__style:"",o=this.__style;s!==o&&(o===""?t.removeAttribute("style"):t.style.cssText=o),(function(l,a,c){const u=cb(a.__textStyle);for(const h in u)l.style.setProperty(`--listitem-marker-${h}`,u[h]);if(c)for(const h in cb(c.__textStyle))h in u||l.style.removeProperty(`--listitem-marker-${h}`)})(t,this,e)}updateDOM(e,t,r){const i=t;return this.updateListItemDOM(e,i,r),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){const t=this.createDOM(e._config),r=this.getFormatType();r&&(t.style.textAlign=r);const i=this.getDirection();return i&&(t.dir=i),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){const r=e[t];if(I(r)&&this.canMergeWith(r)){const i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(e,t){if(we(e))return super.replace(e);this.setIndent(0);const r=this.getParentOrThrow();if(!me(r))return e;if(r.__first===this.getKey())r.insertBefore(e);else if(r.__last===this.getKey())r.insertAfter(e);else{const i=rn(r.getListType());let s=this.getNextSibling();for(;s;){const o=s;s=s.getNextSibling(),i.append(o)}r.insertAfter(e),e.insertAfter(i)}return t&&(I(e)||Xi(139),this.getChildren().forEach((i=>{e.append(i)}))),this.remove(),r.getChildrenSize()===0&&r.remove(),e}insertAfter(e,t=!0){const r=this.getParentOrThrow();if(me(r)||Xi(39),we(e))return super.insertAfter(e,t);const i=this.getNextSiblings();if(r.insertAfter(e,t),i.length!==0){const s=rn(r.getListType());i.forEach((o=>s.append(o))),e.insertAfter(s,t)}return e}remove(e){const t=this.getPreviousSibling(),r=this.getNextSibling();super.remove(e),t&&r&&Ar(t)&&Ar(r)&&(n1(t.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(e,t=!0){const r=on().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(r,t),r}collapseAtStart(e){const t=ze();this.getChildren().forEach((o=>t.append(o)));const r=this.getParentOrThrow(),i=r.getParentOrThrow(),s=we(i);if(r.getChildrenSize()===1)if(s)r.remove(),i.select();else{r.insertBefore(t),r.remove();const o=e.anchor,l=e.focus,a=t.getKey();o.type==="element"&&o.getNode().is(this)&&o.set(a,o.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(a,l.offset,"element")}else r.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){const t=this.getWritable();return t.__value=e,t}getChecked(){const e=this.getLatest();let t;const r=this.getParent();return me(r)&&(t=r.getListType()),t==="check"?!!e.__checked:void 0}setChecked(e){const t=this.getWritable();return t.__checked=e,t}toggleChecked(){const e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){const e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),r=0;for(;we(t);)t=t.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(e){typeof e!="number"&&Xi(117),(e=Math.floor(e))>=0||Xi(199);let t=this.getIndent();for(;t!==e;)t<e?(V6(this),t++):(Z6(this),t--);return this}canInsertAfter(e){return we(e)}canReplaceWith(e){return we(e)}canMergeWith(e){return we(e)||vf(e)}extractWithChild(e,t){if(!B(t))return!1;const r=t.anchor.getNode(),i=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(i)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return rn("bullet")}canMergeWhenEmpty(){return!0}};function F6(n){if(n.classList.contains("task-list-item")){for(const t of n.children)if(t.tagName==="INPUT")return X6(t)}const e=n.getAttribute("aria-checked");return{node:on(e==="true"||e!=="false"&&void 0)}}function X6(n){return n.getAttribute("type")!=="checkbox"?{node:null}:{node:on(n.hasAttribute("checked"))}}function on(n){return In(new Qi(void 0,n))}function we(n){return n instanceof Qi}let $i=class extends yn{$config(){return this.config("list",{$transform:e=>{(function(t){const r=t.getNextSibling();me(r)&&t.getListType()===r.getListType()&&n1(t,r)})(e),U5(e)},extends:yn,importDOM:{ol:()=>({conversion:oy,priority:0}),ul:()=>({conversion:oy,priority:0})}})}constructor(e="number",t=1,r){super(r);const i=W6[e]||e;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){const t=this.getWritable();return t.__listType=e,t.__tag=e==="number"?"ol":"ul",t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){const t=this.getWritable();return t.__start=e,t}createDOM(e,t){const r=this.__tag,i=document.createElement(r);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,sy(i,e.theme,this),i}updateDOM(e,t,r){return e.__tag!==this.__tag||(sy(t,r.theme,this),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){const t=this.createDOM(e._config,e);return st(t)&&(this.__start!==1&&t.setAttribute("start",String(this.__start)),this.__listType==="check"&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,r){let i=r;for(let s=0;s<r.length;s++){const o=r[s];we(o)||(i===r&&(i=[...r]),i[s]=on().append(!I(o)||me(o)||o.isInline()?o:Ye(o.getTextContent())))}return super.splice(e,t,i)}extractWithChild(e){return we(e)}};function sy(n,e,t){const r=[],i=[],s=e.list;if(s!==void 0){const o=s[`${t.__tag}Depth`]||[],l=_a(t)-1,a=l%o.length,c=o[a],u=s[t.__tag];let h;const f=s.nested,d=s.checklist;if(f!==void 0&&f.list&&(h=f.list),u!==void 0&&r.push(u),d!==void 0&&t.__listType==="check"&&r.push(d),c!==void 0){r.push(...Oh(c));for(let p=0;p<o.length;p++)p!==a&&i.push(t.__tag+p)}if(h!==void 0){const p=Oh(h);l>1?r.push(...p):i.push(...p)}}i.length>0&&$f(n,...i),r.length>0&&mr(n,...r)}function z6(n){const e=[];for(let t=0;t<n.length;t++){const r=n[t];if(we(r)){e.push(r);const i=r.getChildren();i.length>1&&i.forEach((s=>{me(s)&&e.push(ry(s))}))}else e.push(ry(r))}return e}function oy(n){const e=n.nodeName.toLowerCase();let t=null;return e==="ol"?t=rn("number",n.start):e==="ul"&&(t=(function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list"))return!0;for(const i of r.childNodes)if(st(i)&&i.hasAttribute("aria-checked"))return!0;return!1})(n)?rn("check"):rn("bullet")),{after:z6,node:t}}const W6={ol:"number",ul:"bullet"};function rn(n="number",e=1){return In(new $i(n,e))}function me(n){return n instanceof $i}const G5=Oe("INSERT_CHECK_LIST_COMMAND");function j6(n){return Dn(n.registerCommand(G5,(()=>(Rg("check"),!0)),Et),n.registerCommand(xO,(e=>cy(e,n,!1)),Et),n.registerCommand(OO,(e=>cy(e,n,!0)),Et),n.registerCommand(df,(()=>{if(Ig()!=null){const e=n.getRootElement();return e?.focus(),!0}return!1}),Et),n.registerCommand(bO,(e=>{const t=Ig();return!(t==null||!n.isEditable())&&(n.update((()=>{const r=Hr(t);we(r)&&(e.preventDefault(),r.toggleChecked())})),!0)}),Et),n.registerCommand(mO,(e=>n.getEditorState().read((()=>{const t=H();if(B(t)&&t.isCollapsed()){const{anchor:r}=t,i=r.type==="element";if(i||r.offset===0){const s=r.getNode(),o=dr(s,(l=>I(l)&&!l.isInline()));if(we(o)){const l=o.getParent();if(me(l)&&l.getListType()==="check"&&(i||o.getFirstDescendant()===s)){const a=n.getElementByKey(o.__key);if(a!=null&&document.activeElement!==a)return a.focus(),e.preventDefault(),!0}}}}return!1}))),Et),n.registerRootListener(((e,t)=>{e!==null&&(e.addEventListener("click",ly),e.addEventListener("pointerdown",ay)),t!==null&&(t.removeEventListener("click",ly),t.removeEventListener("pointerdown",ay))})))}function K5(n,e){const t=n.target;if(!st(t))return;const r=t.firstChild;if(st(r)&&(r.tagName==="UL"||r.tagName==="OL"))return;const i=t.parentNode;if(!i||i.__lexicalListType!=="check")return;const s=t.getBoundingClientRect(),o=jA(t),l=n.clientX/o,a=window.getComputedStyle?window.getComputedStyle(t,"::before"):{width:"0px"},c=parseFloat(a.width),u=n.pointerType==="touch"?32:0;(t.dir==="rtl"?l<s.right+u&&l>s.right-c-u:l>s.left-u&&l<s.left+c+u)&&e()}function ly(n){K5(n,(()=>{if(st(n.target)){const e=n.target,t=AO(e);t!=null&&t.isEditable()&&t.update((()=>{const r=Hr(e);we(r)&&(e.focus(),r.toggleChecked())}))}}))}function ay(n){K5(n,(()=>{n.preventDefault()}))}function Ig(){const n=document.activeElement;return st(n)&&n.tagName==="LI"&&n.parentNode!=null&&n.parentNode.__lexicalListType==="check"?n:null}function cy(n,e,t){const r=Ig();return r!=null&&e.update((()=>{const i=Hr(r);if(!we(i))return;const s=(function(o,l){let a=l?o.getPreviousSibling():o.getNextSibling(),c=o;for(;a==null&&we(c);)c=c.getParentOrThrow().getParent(),c!=null&&(a=l?c.getPreviousSibling():c.getNextSibling());for(;we(a);){const u=l?a.getLastChild():a.getFirstChild();if(!me(u))return a;a=l?u.getLastChild():u.getFirstChild()}return null})(i,t);if(s!=null){s.selectStart();const o=e.getElementByKey(s.__key);o!=null&&(n.preventDefault(),setTimeout((()=>{o.focus()}),0))}})),!1}const q6=Oe("UPDATE_LIST_START_COMMAND"),J5=Oe("INSERT_UNORDERED_LIST_COMMAND"),eC=Oe("INSERT_ORDERED_LIST_COMMAND"),tC=Oe("REMOVE_LIST_COMMAND");function Y6(n){return Dn(n.registerCommand(eC,(()=>(Rg("number"),!0)),Et),n.registerCommand(q6,(e=>{const{listNodeKey:t,newStart:r}=e,i=rt(t);return!!me(i)&&(i.getListType()==="number"&&(i.setStart(r),U5(i)),!0)}),Et),n.registerCommand(J5,(()=>(Rg("bullet"),!0)),Et),n.registerCommand(tC,(()=>(N6(),!0)),Et),n.registerCommand(ma,(()=>B6()),Et),n.registerNodeTransform(Qi,(e=>{const t=e.getFirstChild();if(t){if(G(t)){const r=t.getStyle(),i=t.getFormat();e.getTextStyle()!==r&&e.setTextStyle(r),e.getTextFormat()!==i&&e.setTextFormat(i)}}else{const r=H();B(r)&&(r.style!==e.getTextStyle()||r.format!==e.getTextFormat())&&r.isCollapsed()&&e.is(r.anchor.getNode())&&e.setTextStyle(r.style).setTextFormat(r.format)}})),n.registerNodeTransform(Jr,(e=>{const t=e.getParent();if(we(t)&&e.is(t.getFirstChild())){const r=e.getStyle(),i=e.getFormat();r===t.getTextStyle()&&i===t.getTextFormat()||t.setTextStyle(r).setTextFormat(i)}})))}function H6(n){const e=t=>{const r=t.getParent();if(me(t.getFirstChild())||!me(r))return;const i=dr(t,(s=>we(s)&&me(s.getParent())&&we(s.getPreviousSibling())));if(i===null&&t.getIndent()>0)t.setIndent(0);else if(we(i)){const s=i.getPreviousSibling();if(we(s)){const o=(function(a){let c=a,u=c.getFirstChild();for(;me(u);){const h=u.getLastChild();if(!we(h))break;c=h,u=c.getFirstChild()}return c})(s),l=o.getParent();if(me(l)){const a=_a(l);a+1<_a(r)&&t.setIndent(a)}}}};return n.registerNodeTransform($i,(t=>{const r=[t];for(;r.length>0;){const i=r.shift();if(me(i)){for(const s of i.getChildren())if(we(s)){e(s);const o=s.getFirstChild();me(o)&&r.push(o)}}}}))}function U6(n){try{const e=n.anchor,t=n.focus,r=n.anchor.getNode(),i=n.focus.getNode();return r===i?r:n.isBackward()?hb(t)?r:i:hb(e)?r:i}catch{return null}}const G6=["transform","perspective","filter","backdrop-filter","contain","container-type"],K6=["layout","paint","strict","content"];function J6(n){let e=n?.parentElement;for(;e;){const t=window.getComputedStyle(e),i=t.willChange.split(",").map(o=>o.trim()).some(o=>G6.includes(o));if(t.transform!=="none"||t.perspective!=="none"||t.filter!=="none"||t.backdropFilter!=="none"||K6.includes(t.contain)||t.containerType!=="normal"||t.contentVisibility==="auto"||i)return e;e=e.parentElement}return null}function nC(n){const e=H(),t=window.getSelection(),r=document.activeElement,i=n.getRootElement();if(e!==null&&t!==null&&i!==null&&i.contains(t.anchorNode)&&n.isEditable()){const s=t.getRangeAt(0);let o;if(t.isCollapsed){let a=t.anchorNode;a?.nodeType==3&&(a=a.parentNode),o=a.getBoundingClientRect(),o.width=0}else if(t.anchorNode===i){let a=i;for(;a.firstElementChild!=null;)a=a.firstElementChild;o=a.getBoundingClientRect()}else o=s.getBoundingClientRect();const l=J6(i);if(l){const a=l.getBoundingClientRect();return{top:Math.round(o.top-a.top),left:Math.round(o.left-a.left),width:Math.round(o.width),height:Math.round(o.height)}}return{top:Math.round(o.top),left:Math.round(o.left),width:Math.round(o.width),height:Math.round(o.height)}}else if(r?.className!=="link-input")return null;return null}function eM(n,e){let t="";return n.getEditorState().read(()=>{const r=H();if(!r||!B(r)||r.isCollapsed())return;const i=r.getNodes();if(i.length===0)return;const s=new Set;i.forEach(a=>{let c=a;for(;c;){if(Ao(c)||we(c)||c.getType()==="paragraph"||c.getType()==="quote"){I(c)&&s.add(c);break}c=c.getParent()}});const o=s.size>0?Array.from(s):i;function l(a){if(Ao(a)){const c=parseInt(a.getTag().replace("h","")),h=a.getChildren().map(f=>l(f)).join("");return"#".repeat(c)+" "+h+`
53
+
54
+ `}else if(we(a)){const c=a.getParent(),u=c&&me(c)&&c.getListType()==="number"?"1. ":"- ",f=a.getChildren().map(d=>l(d)).join("");return u+f+`
55
+ `}else{if(me(a))return a.getChildren().map(u=>l(u)).join("")+`
56
+ `;if(G(a)){let c=a.getTextContent();const u=a.getFormat();return u&16?`\`${c}\``:(u&1&&(c=`**${c}**`),u&2&&(c=`*${c}*`),u&4&&(c=`~~${c}~~`),c)}else if(dn(a)){const c=a.getURL(),u=a.getTitle(),f=a.getChildren().map(d=>l(d)).join("");return u?`[${f}](${c} "${u}")`:`[${f}](${c})`}else if(I(a))return a.getChildren().map(u=>l(u)).join("")}return a.getTextContent()}t=o.map(a=>l(a)).join("")}),t.trim()}const tM=({children:n})=>{const e=Lt(Pi),t=v.useMemo(()=>[e,Ek(null,Mf)],[e]);return v.createElement(Wu.Provider,{value:t},n)},nM=()=>{const n=Gt(),e=ut(_5),t=ut(p4),r=h=>{t(h),e(h?{current:h}:null)},[i,s,o,l,a,c,u]=Ht(Cg,_g,L5,R5,D5,Tg,I5);return v.createElement(v.Fragment,null,l.map((h,f)=>v.createElement(h,{key:f})),v.createElement(rC,{wrappers:a},v.createElement("div",{className:St(se.rootContentEditableWrapper,"mdxeditor-root-contenteditable")},v.createElement(j5,{contentEditable:v.createElement("div",{ref:r},v.createElement(z5,{className:St(se.contentEditable,i),ariaLabel:n("contentArea.editableMarkdown","editable markdown"),spellCheck:s})),placeholder:v.createElement("div",{className:St(se.contentEditable,se.placeholder,i)},v.createElement("p",null,c)),ErrorBoundary:W5}))),o.map((h,f)=>v.createElement(h,{key:f})),u.map((h,f)=>v.createElement(h,{key:f})))},rM={listItemIndent:"one"},iM=n=>I4[n];function sM(n,e,t={}){let r=e;for(const[i,s]of Object.entries(t))r=r.replaceAll(`{{${i}}}`,String(s));return r}const rC=({wrappers:n,children:e})=>{if(n.length===0)return v.createElement(v.Fragment,null,e);const t=n[0];return v.createElement(t,null,v.createElement(rC,{wrappers:n.slice(1)},e))},oM=({children:n,className:e,overlayContainer:t})=>{const r=v.useRef(null),i=v.useRef(null),s=ut(rl),o=ut(d4);return v.useEffect(()=>{const l=document.createElement("div");return l.classList.add("mdxeditor-popup-container",se.editorRoot,se.popupContainer,...(e??"").trim().split(" ").filter(Boolean)),(t??document.body).appendChild(l),r.current=l,s(r),o(i),()=>{l.remove()}},[e,r,t,s,o]),v.createElement("div",{className:St("mdxeditor",se.editorRoot,se.editorWrapper,e),ref:i},n)},lM=({mdxRef:n})=>{const e=Ka();return v.useImperativeHandle(n,()=>({getMarkdown:()=>{const t=e.getValue(wi);return t==="source"||t==="diff"?e.getValue(Bs):e.getValue(Gr)},setMarkdown:t=>{e.pub(UO,t)},insertMarkdown:t=>{e.pub(T5,t)},focus:(t,r)=>{var i;(i=e.getValue(Pi))==null||i.focus(t,r)},getContentEditableHTML:()=>{var t;return((t=e.getValue(_5))==null?void 0:t.current.innerHTML)??""},getSelectionMarkdown:()=>{const t=e.getValue(wi);if(t==="source"||t==="diff")return"";const r=e.getValue(ot);return r?(e.getValue(Rf),e.getValue(qO),e.getValue(fh),e.getValue(If),e.getValue(YO),eM(r)):""}}),[e]),null},aM=v.forwardRef((n,e)=>v.createElement(a9,{plugins:[y4({contentEditableClassName:n.contentEditableClassName??"",spellCheck:n.spellCheck??!0,initialMarkdown:n.markdown,onChange:n.onChange??ji,onBlur:n.onBlur??ji,toMarkdownOptions:n.toMarkdownOptions??rM,autoFocus:n.autoFocus??!1,placeholder:n.placeholder??"",readOnly:!!n.readOnly,iconComponentFor:n.iconComponentFor??iM,suppressHtmlProcessing:n.suppressHtmlProcessing??!1,onError:n.onError??ji,translation:n.translation??sM,trim:n.trim??!0,lexicalTheme:n.lexicalTheme,..."editorState"in n?{editorState:n.editorState}:{},suppressSharedHistory:n.suppressSharedHistory??!1,additionalLexicalNodes:n.additionalLexicalNodes??[],lexicalEditorNamespace:n.lexicalEditorNamespace??"MDXEditor"}),...n.plugins??[]]},v.createElement(oM,{className:n.className,overlayContainer:n.overlayContainer},v.createElement(tM,null,v.createElement(nM,null))),v.createElement(lM,{mdxRef:e}))),cM=typeof window<"u"&&typeof window.document.createElement<"u",xh=cM&&(()=>{var n;const e=(n=navigator.userAgentData)==null?void 0:n.platform;return e?/mac/i.test(e):/Mac|iPod|iPhone|iPad/.test(navigator.userAgent)})();function uM(n,e){return xh?n:e}const hM={testLexicalNode:Ao,visitLexicalNode:({lexicalNode:n,actions:e})=>{const t=parseInt(n.getTag()[1],10);e.addAndStepInto("heading",{depth:t})}},fM={testNode:"heading",visitNode:function({mdastNode:n,actions:e}){e.addAndStepInto(Nr(`h${n.depth}`))}},dM=["Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6"],iC=[1,2,3,4,5,6],pM={Digit1:1,Digit2:2,Digit3:3,Digit4:4,Digit5:5,Digit6:6},Nf=ue(iC,n=>{n.pub(M5,e=>e.registerCommand(gO,t=>{const{code:r,ctrlKey:i,metaKey:s,altKey:o}=t;return dM.includes(r)&&uM(s,i)&&o?(t.preventDefault(),e.update(()=>{if(r==="Digit0")n.pub(mh,()=>ze());else{const l=n.getValue(Nf),a=pM[r];l.includes(a)&&n.pub(mh,()=>Nr(`h${a}`))}}),!0):!1},Et))}),gM=Rn({init(n){n.pubIn({[sl]:"headings",[Si]:fM,[is]:cc,[ss]:hM})},update(n,e){n.pub(Nf,e?.allowedHeadingLevels??iC)}});function uy(n,e){return n.getEditorState().read((()=>{const t=rt(e);return t!==null&&t.isSelected()}))}function mM(n){const[e]=Sn(),[t,r]=V.useState((()=>uy(e,n)));return V.useEffect((()=>{let i=!0;const s=e.registerUpdateListener((()=>{i&&r(uy(e,n))}));return()=>{i=!1,s()}}),[e,n]),[t,V.useCallback((i=>{e.update((()=>{let s=H();_t(s)||(s=kO(),ht(s)),_t(s)&&(i?s.add(n):s.delete(n))}))}),[e,n]),V.useCallback((()=>{e.update((()=>{const i=H();_t(i)&&i.clear()}))}),[e])]}const sC=Oe("INSERT_HORIZONTAL_RULE_COMMAND");function OM({nodeKey:n}){const[e]=Sn(),[t,r,i]=mM(n);return V.useEffect((()=>Dn(e.registerCommand(pO,(s=>{const o=e.getElementByKey(n);return s.target===o&&(s.shiftKey||i(),r(!t),!0)}),Et))),[i,e,t,n,r]),V.useEffect((()=>{const s=e.getElementByKey(n),o=e._config.theme.hrSelected??"selected";s!==null&&(t?mr(s,o):$f(s,o))}),[e,t,n]),null}let fc=class oC extends Jo{static getType(){return"horizontalrule"}static clone(e){return new oC(e.__key)}static importJSON(e){return ol().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:xM,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){const t=document.createElement("hr");return mr(t,e.theme.hr),t}getTextContent(){return`
57
+ `}isInline(){return!1}updateDOM(){return!1}decorate(){return oe.jsx(OM,{nodeKey:this.__key})}};function xM(){return{node:ol()}}function ol(){return In(new fc)}function r1(n){return n instanceof fc}function bM(){const[n]=Sn();return V.useEffect((()=>n.registerCommand(sC,(e=>{const t=H();if(!B(t))return!1;if(t.focus.getNode()!==null){const r=ol();q2(r)}return!0}),Pe)),[n]),null}const yM={testLexicalNode:r1,visitLexicalNode({actions:n}){n.addAndStepInto("thematicBreak")}},vM={testNode:"thematicBreak",visitNode({actions:n}){n.addAndStepInto(ol())}},lC=Uo(n=>{n.sub(n.pipe(lC,xt(ot)),([,e])=>{e?.dispatchCommand(sC,void 0)})}),SM=Rn({init(n){n.pubIn({[sl]:"thematicBreak",[Si]:vM,[is]:fc,[ss]:yM,[il]:bM})}}),wM={testNode:"list",visitNode:function({mdastNode:n,lexicalParent:e,actions:t}){const r=n.children.some(s=>typeof s.checked=="boolean")?"check":n.ordered?"number":"bullet",i=rn(r);if(we(e)){const s=on();s.append(i),e.insertAfter(s)}else e.append(i);t.visitChildren(n,i)}},kM={testNode:"listItem",visitNode({mdastNode:n,actions:e,lexicalParent:t}){const r=t.getListType()==="check"?n.checked??!1:void 0;e.addAndStepInto(on(r))}},CM={testLexicalNode:me,visitLexicalNode:({lexicalNode:n,actions:e})=>{e.addAndStepInto("list",{ordered:n.getListType()==="number",spread:!1})}},_M={testLexicalNode:we,visitLexicalNode:({lexicalNode:n,mdastParent:e,actions:t})=>{const r=n.getChildren(),i=r[0];if(r.length===1&&me(i)){const s=e.children.at(-1);s?t.visitChildren(n,s):t.visitChildren(i,e)}else{const s=n.getParent(),o=t.appendToParent(e,{type:"listItem",checked:s.getListType()==="check"?!!n.getChecked():void 0,spread:!1,children:[]});let l=null;for(const a of n.getChildren())G(a)||fr(a)||a.isInline()&&(I(a)||Ie(a))?(l??(l=t.appendToParent(o,{type:"paragraph",children:[]})),t.visit(a,l)):(l=null,t.visit(a,o))}}};function TM(n,e){return Dn(n.registerCommand(pf,(t=>{const r=H();if(!B(r))return!1;t.preventDefault();const i=(function(s){const o=s.getNodes();if(WA(o,(f=>nh(f)&&f.canIndent()?f:null)).length>0)return!0;const l=s.anchor,a=s.focus,c=a.isBefore(l)?a:l,u=c.getNode(),h=mg(u);if(h.canIndent()){const f=h.getKey();let d=nc();if(d.anchor.set(f,0,"element"),d.focus.set(f,0,"element"),d=Ms(d),d.anchor.is(c))return!0}return!1})(r)?t.shiftKey?tg:eh:jk;return n.dispatchCommand(i,void 0)}),Pe),n.registerCommand(eh,(()=>{if(e==null)return!1;const t=H();if(!B(t))return!1;const r=t.getNodes().map((i=>mg(i).getIndent()));return Math.max(...r)+1>=e}),Yr))}function hy({maxIndent:n}){const[e]=Sn();return V.useEffect((()=>TM(e,n)),[e,n]),null}function fy(){const[n]=Sn();return V.useEffect((()=>j6(n)),[n]),null}function dy({hasStrictIndent:n=!1}){const[e]=Sn();return V.useEffect((()=>{if(!e.hasNodes([$i,Qi]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")}),[e]),V.useEffect((()=>{if(n)return H6(e)}),[e,n]),(function(t){V.useEffect((()=>Y6(t)),[t])})(e),null}const PM=new Map([["number",eC],["bullet",J5],["check",G5],["",tC]]),Dg=ue("",n=>{n.sub(n.pipe(Mo,xt(ot)),([e,t])=>{if(!e||!t)return;const r=e.anchor.getNode();let i=r.getKey()==="root"?r:dr(r,l=>{const a=l.getParent();return a!==null&&Rt(a)});i??(i=r.getTopLevelElementOrThrow());const s=i.getKey();if(t.getElementByKey(s)!==null)if(me(i)){const l=j2(r,$i),a=l?l.getListType():i.getListType();n.pub(Dg,a)}else n.pub(Dg,"")})}),aC=zt(n=>{n.sub(n.pipe(aC,xt(ot)),([e,t])=>{t?.dispatchCommand(PM.get(e),void 0)})}),EM=Rn({init(n){var e;(e=n.getValue(Pi))==null||e.registerCommand(eh,()=>!$M(7),Yr),n.pubIn({[sl]:"lists",[ph]:o3(),[dh]:s3(),[Si]:[wM,kM],[is]:[Qi,$i],[ss]:[CM,_M],[HO]:i3(),[il]:[hy,dy,fy],[KO]:[hy,dy,fy]})}});function QM(n){const e=n.getNodes();return e.length===0?new Set([n.anchor.getNode().getParentOrThrow(),n.focus.getNode().getParentOrThrow()]):new Set(e.map(t=>I(t)?t:t.getParentOrThrow()))}function $M(n){const e=H();if(!B(e))return!1;const t=QM(e);let r=0;for(const i of t)if(me(i))r=Math.max(_a(i)+1,r);else if(we(i)){const s=i.getParent();if(s?.getChildren().length===1){const o=s.getParent();if(we(o)&&o.getChildren().length===1)return!1}if(!me(s))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");r=Math.max(_a(s)+1,r)}return r<=n}const py=[["Cat","rgb(125, 50, 0)"],["Dog","rgb(100, 0, 0)"],["Rabbit","rgb(150, 0, 0)"],["Frog","rgb(200, 0, 0)"],["Fox","rgb(200, 75, 0)"],["Hedgehog","rgb(0, 75, 0)"],["Pigeon","rgb(0, 125, 0)"],["Squirrel","rgb(75, 100, 0)"],["Bear","rgb(125, 100, 0)"],["Tiger","rgb(0, 0, 150)"],["Leopard","rgb(0, 0, 200)"],["Zebra","rgb(0, 0, 250)"],["Wolf","rgb(0, 100, 150)"],["Owl","rgb(0, 100, 100)"],["Gull","rgb(100, 0, 100)"],["Squid","rgb(150, 0, 150)"]],gy=py[Math.floor(Math.random()*py.length)],AM=V.createContext({clientID:0,color:gy[1],isCollabActive:!1,name:gy[0],yjsDocMap:new Map});function MM(n,e){return V.useContext(AM)}function my(n){const e=new Set,{ownNodeConfig:t}=Pf(n),r=n.transform();if(t){const i=t.$transform;i&&e.add(i)}return r&&e.add(r),e}function LM({initialEditor:n,children:e,initialNodes:t,initialTheme:r,skipCollabChecks:i,skipEditableListener:s}){const o=V.useRef(!1),l=V.useContext(Wu);l==null&&(function(p,...g){const m=new URL("https://lexical.dev/docs/error"),x=new URLSearchParams;x.append("code",p);for(const O of g)x.append("v",O);throw m.search=x.toString(),Error(`Minified Lexical error #${p}; visit ${m.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(9);const[a,{getTheme:c}]=l,u=V.useMemo((()=>{const p=r||c()||void 0,g=Ek(l,p);p!==void 0&&(n._config.theme=p),n._parentEditor=n._parentEditor||a;const m=n._createEditorArgs,x=m&&m.namespace;if(t){x||(n._config.namespace=a._config.namespace);for(let O of t){let b=null,y=null;if(typeof O!="function"){const k=O;O=k.replace,b=k.with,y=k.withKlass||null}const S=wf(n,O.getType());n._nodes.set(O.getType(),{exportDOM:S?S.exportDOM:void 0,klass:O,replace:b,replaceWithKlass:y,sharedNodeState:jp(O),transforms:my(O)})}}else if(m&&m.nodes)x||(n._config.namespace=a._config.namespace);else{const O=n._nodes=new Map(a._nodes);x||(n._config.namespace=a._config.namespace);for(const[b,y]of O)n._nodes.set(b,{exportDOM:y.exportDOM,klass:y.klass,replace:y.replace,replaceWithKlass:y.replaceWithKlass,sharedNodeState:jp(y.klass),transforms:my(y.klass)})}return[n,g]}),[]),{isCollabActive:h,yjsDocMap:f}=MM(),d=i||o.current||f.has(n.getKey());return V.useEffect((()=>{d&&(o.current=!0)}),[d]),V.useEffect((()=>{if(!s){const p=g=>n.setEditable(g);return p(a.isEditable()),a.registerEditableListener(p)}}),[n,a,s]),oe.jsx(Wu.Provider,{value:u,children:!h||d?e:null})}var Vf="Popover",[cC,bY]=nO(Vf,[fk]),dc=fk(),[RM,os]=cC(Vf),uC=n=>{const{__scopePopover:e,children:t,open:r,defaultOpen:i,onOpenChange:s,modal:o=!1}=n,l=dc(e),a=V.useRef(null),[c,u]=V.useState(!1),[h,f]=sf({prop:r,defaultProp:i??!1,onChange:s,caller:Vf});return oe.jsx(l3,{...l,children:oe.jsx(RM,{scope:e,contentId:a3(),triggerRef:a,open:h,onOpenChange:f,onOpenToggle:V.useCallback(()=>f(d=>!d),[f]),hasCustomAnchor:c,onCustomAnchorAdd:V.useCallback(()=>u(!0),[]),onCustomAnchorRemove:V.useCallback(()=>u(!1),[]),modal:o,children:t})})};uC.displayName=Vf;var hC="PopoverAnchor",fC=V.forwardRef((n,e)=>{const{__scopePopover:t,...r}=n,i=os(hC,t),s=dc(t),{onCustomAnchorAdd:o,onCustomAnchorRemove:l}=i;return V.useEffect(()=>(o(),()=>l()),[o,l]),oe.jsx(dk,{...s,...r,ref:e})});fC.displayName=hC;var dC="PopoverTrigger",i1=V.forwardRef((n,e)=>{const{__scopePopover:t,...r}=n,i=os(dC,t),s=dc(t),o=gk(e,i.triggerRef),l=oe.jsx(Yi.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":xC(i.open),...r,ref:o,onClick:Ss(n.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:oe.jsx(dk,{asChild:!0,...s,children:l})});i1.displayName=dC;var s1="PopoverPortal",[IM,DM]=cC(s1,{forceMount:void 0}),pC=n=>{const{__scopePopover:e,forceMount:t,children:r,container:i}=n,s=os(s1,e);return oe.jsx(IM,{scope:e,forceMount:t,children:oe.jsx(pk,{present:t||s.open,children:oe.jsx(c3,{asChild:!0,container:i,children:r})})})};pC.displayName=s1;var Ro="PopoverContent",Zf=V.forwardRef((n,e)=>{const t=DM(Ro,n.__scopePopover),{forceMount:r=t.forceMount,...i}=n,s=os(Ro,n.__scopePopover);return oe.jsx(pk,{present:r||s.open,children:s.modal?oe.jsx(VM,{...i,ref:e}):oe.jsx(ZM,{...i,ref:e})})});Zf.displayName=Ro;var NM=d3("PopoverContent.RemoveScroll"),VM=V.forwardRef((n,e)=>{const t=os(Ro,n.__scopePopover),r=V.useRef(null),i=gk(e,r),s=V.useRef(!1);return V.useEffect(()=>{const o=r.current;if(o)return h3(o)},[]),oe.jsx(f3,{as:NM,allowPinchZoom:!0,children:oe.jsx(gC,{...n,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ss(n.onCloseAutoFocus,o=>{o.preventDefault(),s.current||t.triggerRef.current?.focus()}),onPointerDownOutside:Ss(n.onPointerDownOutside,o=>{const l=o.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0,c=l.button===2||a;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:Ss(n.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),ZM=V.forwardRef((n,e)=>{const t=os(Ro,n.__scopePopover),r=V.useRef(!1),i=V.useRef(!1);return oe.jsx(gC,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{n.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||t.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{n.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;t.triggerRef.current?.contains(o)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),gC=V.forwardRef((n,e)=>{const{__scopePopover:t,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:u,...h}=n,f=os(Ro,t),d=dc(t);return p3(),oe.jsx(g3,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:oe.jsx(m3,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:oe.jsx(O3,{"data-state":xC(f.open),role:"dialog",id:f.contentId,...d,...h,ref:e,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),mC="PopoverClose",BM=V.forwardRef((n,e)=>{const{__scopePopover:t,...r}=n,i=os(mC,t);return oe.jsx(Yi.button,{type:"button",...r,ref:e,onClick:Ss(n.onClick,()=>i.onOpenChange(!1))})});BM.displayName=mC;var FM="PopoverArrow",OC=V.forwardRef((n,e)=>{const{__scopePopover:t,...r}=n,i=dc(t);return oe.jsx(u3,{...i,...r,ref:e})});OC.displayName=FM;function xC(n){return n?"open":"closed"}var o1=uC,XM=fC,l1=pC,zM=Zf,a1=OC,bC="Toggle",yC=V.forwardRef((n,e)=>{const{pressed:t,defaultPressed:r,onPressedChange:i,...s}=n,[o,l]=sf({prop:t,onChange:i,defaultProp:r??!1,caller:bC});return oe.jsx(Yi.button,{type:"button","aria-pressed":o,"data-state":o?"on":"off","data-disabled":n.disabled?"":void 0,...s,ref:e,onClick:Ss(n.onClick,()=>{n.disabled||l(!o)})})});yC.displayName=bC;var ls="ToggleGroup",[vC,SC]=nO(ls,[of]),wC=of(),c1=v.forwardRef((n,e)=>{const{type:t,...r}=n;if(t==="single"){const i=r;return oe.jsx(WM,{...i,ref:e})}if(t==="multiple"){const i=r;return oe.jsx(jM,{...i,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${ls}\``)});c1.displayName=ls;var[kC,CC]=vC(ls),WM=v.forwardRef((n,e)=>{const{value:t,defaultValue:r,onValueChange:i=()=>{},...s}=n,[o,l]=sf({prop:t,defaultProp:r??"",onChange:i,caller:ls});return oe.jsx(kC,{scope:n.__scopeToggleGroup,type:"single",value:v.useMemo(()=>o?[o]:[],[o]),onItemActivate:l,onItemDeactivate:v.useCallback(()=>l(""),[l]),children:oe.jsx(_C,{...s,ref:e})})}),jM=v.forwardRef((n,e)=>{const{value:t,defaultValue:r,onValueChange:i=()=>{},...s}=n,[o,l]=sf({prop:t,defaultProp:r??[],onChange:i,caller:ls}),a=v.useCallback(u=>l((h=[])=>[...h,u]),[l]),c=v.useCallback(u=>l((h=[])=>h.filter(f=>f!==u)),[l]);return oe.jsx(kC,{scope:n.__scopeToggleGroup,type:"multiple",value:o,onItemActivate:a,onItemDeactivate:c,children:oe.jsx(_C,{...s,ref:e})})});c1.displayName=ls;var[qM,YM]=vC(ls),_C=v.forwardRef((n,e)=>{const{__scopeToggleGroup:t,disabled:r=!1,rovingFocus:i=!0,orientation:s,dir:o,loop:l=!0,...a}=n,c=wC(t),u=mk(o),h={role:"group",dir:u,...a};return oe.jsx(qM,{scope:t,rovingFocus:i,disabled:r,children:i?oe.jsx(Ok,{asChild:!0,...c,orientation:s,dir:u,loop:l,children:oe.jsx(Yi.div,{...h,ref:e})}):oe.jsx(Yi.div,{...h,ref:e})})}),bh="ToggleGroupItem",TC=v.forwardRef((n,e)=>{const t=CC(bh,n.__scopeToggleGroup),r=YM(bh,n.__scopeToggleGroup),i=wC(n.__scopeToggleGroup),s=t.value.includes(n.value),o=r.disabled||n.disabled,l={...n,pressed:s,disabled:o},a=v.useRef(null);return r.rovingFocus?oe.jsx(rO,{asChild:!0,...i,focusable:!o,active:s,ref:a,children:oe.jsx(Oy,{...l,ref:e})}):oe.jsx(Oy,{...l,ref:e})});TC.displayName=bh;var Oy=v.forwardRef((n,e)=>{const{__scopeToggleGroup:t,value:r,...i}=n,s=CC(bh,t),o={role:"radio","aria-checked":n.pressed,"aria-pressed":void 0},l=s.type==="single"?o:void 0;return oe.jsx(yC,{...l,...i,ref:e,onPressedChange:a=>{a?s.onItemActivate(r):s.onItemDeactivate(r)}})}),HM=c1,UM=TC,u1="Toolbar",[GM,yY]=nO(u1,[of,SC]),h1=of(),PC=SC(),[KM,EC]=GM(u1),QC=V.forwardRef((n,e)=>{const{__scopeToolbar:t,orientation:r="horizontal",dir:i,loop:s=!0,...o}=n,l=h1(t),a=mk(i);return oe.jsx(KM,{scope:t,orientation:r,dir:a,children:oe.jsx(Ok,{asChild:!0,...l,orientation:r,dir:a,loop:s,children:oe.jsx(Yi.div,{role:"toolbar","aria-orientation":r,dir:a,...o,ref:e})})})});QC.displayName=u1;var $C="ToolbarSeparator",AC=V.forwardRef((n,e)=>{const{__scopeToolbar:t,...r}=n,i=EC($C,t);return oe.jsx(x3,{orientation:i.orientation==="horizontal"?"vertical":"horizontal",...r,ref:e})});AC.displayName=$C;var JM="ToolbarButton",f1=V.forwardRef((n,e)=>{const{__scopeToolbar:t,...r}=n,i=h1(t);return oe.jsx(rO,{asChild:!0,...i,focusable:!n.disabled,children:oe.jsx(Yi.button,{type:"button",...r,ref:e})})});f1.displayName=JM;var eL="ToolbarLink",tL=V.forwardRef((n,e)=>{const{__scopeToolbar:t,...r}=n,i=h1(t);return oe.jsx(rO,{asChild:!0,...i,focusable:!0,children:oe.jsx(Yi.a,{...r,ref:e,onKeyDown:Ss(n.onKeyDown,s=>{s.key===" "&&s.currentTarget.click()})})})});tL.displayName=eL;var MC="ToolbarToggleGroup",LC=V.forwardRef((n,e)=>{const{__scopeToolbar:t,...r}=n,i=EC(MC,t),s=PC(t);return oe.jsx(HM,{"data-orientation":i.orientation,dir:i.dir,...s,...r,ref:e,rovingFocus:!1})});LC.displayName=MC;var nL="ToolbarToggleItem",RC=V.forwardRef((n,e)=>{const{__scopeToolbar:t,...r}=n,i=PC(t),s={__scopeToolbar:n.__scopeToolbar};return oe.jsx(f1,{asChild:!0,...s,children:oe.jsx(UM,{...i,...r,ref:e})})});RC.displayName=nL;var d1=QC,rL=AC,_s=f1,Bf=LC,$u=RC;function IC(n,e){return n===null||n===e?!1:n.dataset.editorDialog!==void 0||n.dataset.toolbarItem!==void 0||n.dataset.editorDropdown?!0:IC(n.parentElement,e)}function iL(){const n=[...Array(256).keys()].map(t=>t.toString(16).padStart(2,"0")),e=crypto.getRandomValues(new Uint8Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,[...e.entries()].map(([t,r])=>[4,6,8,10].includes(t)?`-${n[r]}`:n[r]).join("")}const DC=n=>n===0?"th":"td",NC={center:se.centeredCell,left:se.leftAlignedCell,right:se.rightAlignedCell},sL=({mdastNode:n,parentEditor:e,lexicalTable:t})=>{const[r,i]=v.useState(null),[s,o]=Ht(ln,Gn),l=v.useMemo(()=>g=>(g.__cacheKey??(g.__cacheKey=iL()),g.__cacheKey),[]),a=v.useCallback(g=>{const m=t.getColCount();if(g===null){i(null);return}let[x,O]=g;if(x>m-1&&(x=0,O++),x<0&&(x=m-1,O-=1),O>t.getRowCount()-1){i(null),e.update(()=>{if(t.getLatest().getNextSibling())t.getLatest().selectNext();else{const y=ze();t.insertAfter(y),y.select()}});return}if(O<0){i(null),e.update(()=>{t.getLatest().selectPrevious()});return}i([x,O])},[t,e]);v.useEffect(()=>{t.focusEmitter.subscribe(a)},[t,a]);const c=v.useCallback(g=>{g.preventDefault(),e.update(()=>{t.addRowToBottom(),i([0,t.getRowCount()])})},[e,t]),u=v.useCallback(g=>{g.preventDefault(),e.update(()=>{t.addColumnToRight(),i([t.getColCount(),0])})},[e,t]),[h,f]=v.useState([-1,-1]),d=v.useCallback(g=>{let m=g.target;for(;m&&!["TH","TD"].includes(m.tagName);){if(m===g.currentTarget)return;m=m.parentElement}if(m===null)return;const x=m.parentElement,b=x.parentElement.tagName==="TFOOT"?-1:Array.from(x.children).indexOf(m),y=m.tagName==="TH"?-1:Array.from(x.parentElement.children).indexOf(x);f([b,y])},[]),p=Gt();return v.createElement("table",{className:se.tableEditor,onMouseOver:d,onMouseLeave:()=>{f([-1,-1])}},v.createElement("colgroup",null,o?null:v.createElement("col",null),Array.from({length:n.children[0].children.length},(g,m)=>{const O=(n.align??[])[m]??"left",b=NC[O];return v.createElement("col",{key:m,className:b})}),o?null:v.createElement("col",null)),o||v.createElement("thead",null,v.createElement("tr",null,v.createElement("th",{className:se.tableToolsColumn}),Array.from({length:n.children[0].children.length},(g,m)=>v.createElement("th",{key:m,"data-tool-cell":!0},v.createElement(aL,{setActiveCellWithBoundaries:a,parentEditor:e,colIndex:m,highlightedCoordinates:h,lexicalTable:t,align:(n.align??[])[m]}))),v.createElement("th",{className:se.tableToolsColumn,"data-tool-cell":!0},v.createElement("button",{className:se.iconButton,type:"button",title:p("table.deleteTable","Delete table"),onClick:g=>{g.preventDefault(),e.update(()=>{t.selectNext(),t.remove()})}},s("delete_small"))))),v.createElement("tbody",null,n.children.map((g,m)=>{const x=DC(m);return v.createElement("tr",{key:m},o||v.createElement(x,{className:se.toolCell,"data-tool-cell":!0},v.createElement(cL,{setActiveCellWithBoundaries:a,parentEditor:e,rowIndex:m,highlightedCoordinates:h,lexicalTable:t})),g.children.map((O,b)=>{var y;return v.createElement(oL,{align:(y=n.align)==null?void 0:y[b],key:l(O),contents:O.children,setActiveCell:a,rowIndex:m,colIndex:b,lexicalTable:t,parentEditor:e,activeCell:o?[-1,-1]:r})}),o||m===0&&v.createElement("th",{rowSpan:t.getRowCount(),"data-tool-cell":!0},v.createElement("button",{type:"button",className:se.addColumnButton,onClick:u},s("add_column"))))})),o||v.createElement("tfoot",null,v.createElement("tr",null,v.createElement("th",null),v.createElement("th",{colSpan:t.getColCount()},v.createElement("button",{type:"button",className:se.addRowButton,onClick:c},s("add_row"))),v.createElement("th",null))))},oL=({align:n,...e})=>{const{activeCell:t,setActiveCell:r}=e,i=!!(t&&t[0]===e.colIndex&&t[1]===e.rowIndex),s=NC[n??"left"],o=DC(e.rowIndex);return v.createElement(o,{className:s,"data-active":i,onClick:()=>{r([e.colIndex,e.rowIndex])}},v.createElement(lL,{...e,focus:i}))},lL=({focus:n,setActiveCell:e,parentEditor:t,lexicalTable:r,contents:i,colIndex:s,rowIndex:o})=>{const[l,a,c,u,h,f,d,p,g]=Ht(WO,Rf,jO,If,C5,hc,YO,Pi,N5),[m]=v.useState(()=>{const O=O2({nodes:c,theme:Mf,namespace:"TableCellEditor"});return O.update(()=>{x5({root:Ve(),mdastRoot:{type:"root",children:[{type:"paragraph",children:i}]},visitors:l,jsxComponentDescriptors:u,directiveDescriptors:h,codeBlockEditorDescriptors:f})}),O}),x=v.useCallback(O=>{m.getEditorState().read(()=>{const b=g5({root:Ve(),jsxComponentDescriptors:u,visitors:a,jsxIsAvailable:d});t.update(()=>{r.updateCellContents(s,o,b.children[0].children)},{discrete:!0}),t.dispatchCommand(Sa,void 0)}),e(O)},[s,m,a,u,d,r,t,o,e]);return v.useEffect(()=>Dn(m.registerCommand(pf,O=>{O.preventDefault();const b=O.shiftKey?[s-1,o]:[s+1,o];return x(b),!0},Yr),m.registerCommand(vO,()=>(e([s,o]),!1),Et),m.registerCommand(ba,O=>{O?.preventDefault();const b=O?.shiftKey?[s,o-1]:[s,o+1];return x(b),!0},Yr),m.registerCommand(SO,O=>{const b=O.relatedTarget;return IC(b,p.getRootElement())?!1:(x(null),!0)},Pe),m.registerCommand(Sa,()=>(x(null),!0),Pe)),[s,m,p,o,x,e]),v.useEffect(()=>{n&&m.focus()},[n,m]),v.createElement(LM,{initialEditor:m},v.createElement(j5,{contentEditable:v.createElement(z5,null),placeholder:v.createElement("div",null),ErrorBoundary:W5}),g.map((O,b)=>v.createElement(O,{key:b})),v.createElement(H2,null))},aL=({parentEditor:n,highlightedCoordinates:e,align:t,lexicalTable:r,colIndex:i,setActiveCellWithBoundaries:s})=>{const[o,l]=Ht(rl,ln),a=v.useCallback(f=>{n.update(()=>{r.insertColumnAt(f)}),s([f,0])},[n,r,s]),c=v.useCallback(f=>{n.update(()=>{r.deleteColumnAt(f)})},[n,r]),u=v.useCallback((f,d)=>{n.update(()=>{r.setColumnAlign(f,d)})},[n,r]),h=Gt();return v.createElement(o1,null,v.createElement(i1,{className:se.tableColumnEditorTrigger,"data-active":e[0]===i+1,title:h("table.columnMenu","Column menu")},l("more_horiz")),v.createElement(l1,{container:o?.current},v.createElement(Zf,{className:St(se.tableColumnEditorPopoverContent),onOpenAutoFocus:f=>{f.preventDefault()},sideOffset:5,side:"top"},v.createElement(d1,{className:se.tableColumnEditorToolbar},v.createElement(Bf,{className:se.toggleGroupRoot,onValueChange:f=>{u(i,f)},value:t??"left",type:"single","aria-label":h("table.textAlignment","Text alignment")},v.createElement($u,{value:"left",title:h("table.alignLeft","Align left")},l("format_align_left")),v.createElement($u,{value:"center",title:h("table.alignCenter","Align center")},l("format_align_center")),v.createElement($u,{value:"right",title:h("table.alignRight","Align right")},l("format_align_right"))),v.createElement(rL,null),v.createElement(_s,{onClick:a.bind(null,i),title:h("table.insertColumnLeft","Insert a column to the left of this one")},l("insert_col_left")),v.createElement(_s,{onClick:a.bind(null,i+1),title:h("table.insertColumnRight","Insert a column to the right of this one")},l("insert_col_right")),v.createElement(_s,{onClick:c.bind(null,i),title:h("table.deleteColumn","Delete this column")},l("delete_small"))),v.createElement(a1,{className:se.popoverArrow}))))},cL=({parentEditor:n,highlightedCoordinates:e,lexicalTable:t,rowIndex:r,setActiveCellWithBoundaries:i})=>{const[s,o]=Ht(rl,ln),l=v.useCallback(u=>{n.update(()=>{t.insertRowAt(u)}),i([0,u])},[n,t,i]),a=v.useCallback(u=>{n.update(()=>{t.deleteRowAt(u)})},[n,t]),c=Gt();return v.createElement(o1,null,v.createElement(i1,{className:se.tableColumnEditorTrigger,"data-active":e[1]===r,title:c("table.rowMenu","Row menu")},o("more_horiz")),v.createElement(l1,{container:s?.current},v.createElement(Zf,{className:St(se.tableColumnEditorPopoverContent),onOpenAutoFocus:u=>{u.preventDefault()},sideOffset:5,side:"bottom"},v.createElement(d1,{className:se.tableColumnEditorToolbar},v.createElement(_s,{onClick:l.bind(null,r),title:c("table.insertRowAbove","Insert a row above this one")},o("insert_row_above")),v.createElement(_s,{onClick:l.bind(null,r+1),title:c("table.insertRowBelow","Insert a row below this one")},o("insert_row_below")),v.createElement(_s,{onClick:a.bind(null,r),title:c("table.deleteRow","Delete this row")},o("delete_small"))),v.createElement(a1,{className:se.popoverArrow}))))};var uL=Object.defineProperty,hL=(n,e,t)=>e in n?uL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xy=(n,e,t)=>(hL(n,typeof e!="symbol"?e+"":e,t),t);const by={type:"tableCell",children:[]};function fL(){let n=ji;return{publish:e=>{n(e)},subscribe:e=>{n=e}}}class ll extends Jo{constructor(e,t){super(t),xy(this,"__mdastNode"),xy(this,"focusEmitter",fL()),this.__mdastNode=e??{type:"table",children:[]}}static getType(){return"table"}static clone(e){return new ll(structuredClone(e.__mdastNode),e.__key)}static importJSON(e){return p1(e.mdastNode)}static importDOM(){return{table:()=>({conversion:pL,priority:3})}}exportJSON(){return{mdastNode:structuredClone(this.__mdastNode),type:"table",version:1}}getMdastNode(){return this.__mdastNode}getRowCount(){return this.__mdastNode.children.length}getColCount(){var e;return((e=this.__mdastNode.children[0])==null?void 0:e.children.length)||0}createDOM(){return document.createElement("div")}updateDOM(){return!1}updateCellContents(e,t,r){const s=this.getWritable().__mdastNode,o=s.children[t],l=o.children,a=l[e],c=Array.from(l),u={...a,children:r},h={...o,children:c};c[e]=u,s.children[t]=h}insertColumnAt(e){const r=this.getWritable().__mdastNode;for(let i=0;i<r.children.length;i++){const s=r.children[i],o=s.children,l=Array.from(o),a={...s,children:l};l.splice(e,0,structuredClone(by)),r.children[i]=a}r.align&&r.align.length>0&&r.align.splice(e,0,"left")}deleteColumnAt(e){const r=this.getWritable().__mdastNode;for(let i=0;i<r.children.length;i++){const s=r.children[i],o=s.children,l=Array.from(o),a={...s,children:l};l.splice(e,1),r.children[i]=a}}insertRowAt(e){const r=this.getWritable().__mdastNode,i={type:"tableRow",children:Array.from({length:this.getColCount()},()=>structuredClone(by))};r.children.splice(e,0,i)}deleteRowAt(e){this.getRowCount()===1?(this.selectNext(),this.remove()):this.getWritable().__mdastNode.children.splice(e,1)}addRowToBottom(){this.insertRowAt(this.getRowCount())}addColumnToRight(){this.insertColumnAt(this.getColCount())}setColumnAlign(e,t){const i=this.getWritable().__mdastNode;i.align??(i.align=[]),i.align[e]=t}decorate(e){return v.createElement(sL,{lexicalTable:this,mdastNode:this.__mdastNode,parentEditor:e})}select(e){this.focusEmitter.publish(e??[0,0])}isInline(){return!1}}function dL(n){return n instanceof ll}function p1(n){return new ll(n)}function pL(n){const e=n.querySelectorAll("tr"),t=Array.from(e).map(r=>({type:"tableRow",children:Array.from(r.querySelectorAll("td, th")).map(i=>({type:"tableCell",children:[{type:"text",value:i.textContent}]}))}));return{node:new ll({type:"table",children:t})}}const gL={testLexicalNode:dL,visitLexicalNode({actions:n,mdastParent:e,lexicalNode:t}){n.appendToParent(e,t.getMdastNode())}},mL={testNode:"table",visitNode({mdastNode:n,lexicalParent:e}){e.append(p1(n))}};function OL(n=1,e=1){const t={type:"table",children:[]};for(let r=0;r<n;r++){const i={type:"tableRow",children:[]};for(let s=0;s<e;s++){const o={type:"tableCell",children:[]};i.children.push(o)}t.children.push(i)}return t}const VC=zt(n=>{n.link(n.pipe(VC,Es(({rows:e,columns:t})=>()=>p1(OL(e,t)))),e1)}),xL=Rn({init(n,e){n.pubIn({[ph]:v3(),[dh]:y3(),[Si]:mL,[is]:ll,[ss]:gL,[HO]:b3({tableCellPadding:e?.tableCellPadding??!0,tablePipeAlign:e?.tablePipeAlign??!0})})}}),bL={testNode:"link",visitNode({mdastNode:n,actions:e}){e.addAndStepInto(ki(n.url,{title:n.title}))}},yL={testLexicalNode:dn,visitLexicalNode:({lexicalNode:n,actions:e})=>{e.addAndStepInto("link",{url:n.getURL(),title:n.getTitle()})}};function vL({validateUrl:n,attributes:e}){const[t]=Sn();return V.useEffect((()=>{if(!t.hasNodes([Ei]))throw new Error("LinkPlugin: LinkNode not registered on editor");return Dn(t.registerCommand(Lo,(r=>{if(r===null)return Ad(r),!0;if(typeof r=="string")return!(n!==void 0&&!n(r))&&(Ad(r,e),!0);{const{url:i,target:s,rel:o,title:l}=r;return Ad(i,{...e,rel:o,target:s,title:l}),!0}}),Et),n!==void 0?t.registerCommand(uf,(r=>{const i=H();if(!B(i)||i.isCollapsed()||!Fi(r,ClipboardEvent)||r.clipboardData===null)return!1;const s=r.clipboardData.getData("text");return!!n(s)&&!i.getNodes().some((o=>I(o)))&&(t.dispatchCommand(Lo,{...e,url:s}),r.preventDefault(),!0)}),Et):()=>{})}),[t,n,e]),null}function yy(n,e=(t=>t)){return t=>{const r=n.exec(t);return r===null?null:{index:r.index,length:r[0].length,text:r[0],url:e(r[0])}}}function ZC(n,e){for(let t=0;t<e.length;t++){const r=e[t](n);if(r)return r}return null}const SL=/[.,;\s]/;function yh(n){return SL.test(n)}function BC(n){return yh(n[n.length-1])}function Ng(n){return yh(n[0])}function FC(n){let e=n.getPreviousSibling();return I(e)&&(e=e.getLastDescendant()),e===null||fr(e)||G(e)&&BC(e.getTextContent())}function XC(n){let e=n.getNextSibling();return I(e)&&(e=e.getFirstDescendant()),e===null||fr(e)||G(e)&&Ng(e.getTextContent())}function wL(n,e,t,r){return(n>0?yh(t[n-1]):FC(r[0]))?e<t.length?yh(t[e]):XC(r[r.length-1]):!1}function kL(n,e,t){const r=[],i=[],s=[];let o=0,l=0;const a=[...n];for(;a.length>0;){const c=a[0],u=c.getTextContent().length,h=l;l+u<=e?(r.push(c),o+=u):h>=t?s.push(c):i.push(c),l+=u,a.shift()}return[o,r,i,s]}function CL(n,e,t,r){const i=Mg(r.url,r.attributes);if(n.length===1){let s,o=n[0];e===0?[s,o]=o.splitText(t):[,s,o]=o.splitText(e,t);const l=Ye(r.text);return l.setFormat(s.getFormat()),l.setDetail(s.getDetail()),l.setStyle(s.getStyle()),i.append(l),s.replace(i),o}if(n.length>1){const s=n[0];let o,l=s.getTextContent().length;e===0?o=s:[,o]=s.splitText(e);const a=[];let c;for(let d=1;d<n.length;d++){const p=n[d],g=p.getTextContent().length,m=l;if(m<t)if(l+g<=t)a.push(p);else{const[x,O]=p.splitText(t-m);a.push(x),c=O}l+=g}const u=H(),h=u?u.getNodes().find(G):void 0,f=Ye(o.getTextContent());return f.setFormat(o.getFormat()),f.setDetail(o.getDetail()),f.setStyle(o.getStyle()),i.append(f,...a),h&&h===o&&(B(u)?f.select(u.anchor.offset,u.focus.offset):_t(u)&&f.select(0,f.getTextContent().length)),o.replace(i),c}}function Md(n,e,t){const r=n.getChildren(),i=r.length;for(let a=0;a<i;a++){const c=r[a];if(!G(c)||!c.isSimpleText())return Au(n),void t(null,n.getURL())}const s=n.getTextContent(),o=ZC(s,e);if(o===null||o.text!==s||!FC(n)||!XC(n))return Au(n),void t(null,n.getURL());const l=n.getURL();if(l!==o.url&&(n.setURL(o.url),t(o.url,l)),o.attributes){const a=n.getRel();a!==o.attributes.rel&&(n.setRel(o.attributes.rel||null),t(o.attributes.rel||null,a));const c=n.getTarget();c!==o.attributes.target&&(n.setTarget(o.attributes.target||null),t(o.attributes.target||null,c))}}function Au(n){const e=n.getChildren();for(let t=e.length-1;t>=0;t--)n.insertAfter(e[t]);return n.remove(),e.map((t=>t.getLatest()))}function _L(n,e,t){V.useEffect((()=>{n.hasNodes([Df])||(function(i,...s){const o=new URL("https://lexical.dev/docs/error"),l=new URLSearchParams;l.append("code",i);for(const a of s)l.append("v",a);throw o.search=l.toString(),Error(`Minified Lexical error #${i}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(77);const r=(i,s)=>{t&&t(i,s)};return Dn(n.registerNodeTransform(Jr,(i=>{const s=i.getParentOrThrow(),o=i.getPreviousSibling();if(or(s)&&!s.getIsUnlinked())Md(s,e,r);else if(!dn(s)){if(i.isSimpleText()&&(Ng(i.getTextContent())||!or(o))){const l=(function(a){const c=[a];let u=a.getNextSibling();for(;u!==null&&G(u)&&u.isSimpleText()&&(c.push(u),!/[\s]/.test(u.getTextContent()));)u=u.getNextSibling();return c})(i);(function(a,c,u){let h=[...a];const f=h.map((m=>m.getTextContent())).join("");let d,p=f,g=0;for(;(d=ZC(p,c))&&d!==null;){const m=d.index,x=m+d.length;if(wL(g+m,g+x,f,h)){const[O,,b,y]=kL(h,g+m,g+x),S=CL(b,g+m-O,g+x-O,d);h=S?[S,...y]:y,u(d.url,null),g=0}else g+=x;p=p.substring(x)}})(l,e,r)}(function(l,a,c){const u=l.getPreviousSibling(),h=l.getNextSibling(),f=l.getTextContent();var d;!or(u)||u.getIsUnlinked()||Ng(f)&&(d=f,!(u.isEmailURI()?/^\.[a-zA-Z]{2,}/.test(d):/^\.[a-zA-Z0-9]{1,}/.test(d)))||(u.append(l),Md(u,a,c),c(null,u.getURL())),!or(h)||h.getIsUnlinked()||BC(f)||(Au(h),Md(h,a,c),c(null,h.getURL()))})(i,e,r)}})),n.registerCommand(Lo,(i=>{const s=H();return i!==null||!B(s)||s.extract().forEach((o=>{const l=o.getParent();or(l)&&(l.setIsUnlinked(!l.getIsUnlinked()),l.markDirty())})),!1}),Et))}),[n,e,t])}function TL({matchers:n,onChange:e}){const[t]=Sn();return _L(t,n,e),null}const PL=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,EL=/(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/,QL=[yy(PL,n=>n.startsWith("http")?n:`https://${n}`),yy(EL,n=>`mailto:${n}`)],$L=()=>v.createElement(TL,{matchers:QL}),AL=ue(!1),ML=Rn({init(n,e){const t=!!e?.disableAutoLink,r=e?.validateUrl?{validateUrl:e.validateUrl}:{},i=()=>v.createElement(v.Fragment,null,v.createElement(vL,{...r}),t?null:v.createElement($L,null));n.pubIn({[sl]:"link",[Si]:bL,[is]:[Ei,Df],[ss]:yL,[AL]:t,[KO]:i,[V5]:i,[il]:i})}});var pc=n=>n.type==="checkbox",xs=n=>n instanceof Date,fn=n=>n==null;const zC=n=>typeof n=="object";var wt=n=>!fn(n)&&!Array.isArray(n)&&zC(n)&&!xs(n),WC=n=>wt(n)&&n.target?pc(n.target)?n.target.checked:n.target.value:n,LL=n=>n.substring(0,n.search(/\.\d+(\.|$)/))||n,jC=(n,e)=>n.has(LL(e)),RL=n=>{const e=n.constructor&&n.constructor.prototype;return wt(e)&&e.hasOwnProperty("isPrototypeOf")},g1=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function pt(n){if(n instanceof Date)return new Date(n);const e=typeof FileList<"u"&&n instanceof FileList;if(g1&&(n instanceof Blob||e))return n;const t=Array.isArray(n);if(!t&&!(wt(n)&&RL(n)))return n;const r=t?[]:Object.create(Object.getPrototypeOf(n));for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=pt(n[i]));return r}var Ff=n=>/^\w*$/.test(n),tt=n=>n===void 0,m1=n=>Array.isArray(n)?n.filter(Boolean):[],O1=n=>m1(n.replace(/["|']|\]/g,"").split(/\.|\[/)),re=(n,e,t)=>{if(!e||!wt(n))return t;const r=(Ff(e)?[e]:O1(e)).reduce((i,s)=>fn(i)?i:i[s],n);return tt(r)||r===n?tt(n[e])?t:n[e]:r},Pn=n=>typeof n=="boolean",nn=n=>typeof n=="function",Je=(n,e,t)=>{let r=-1;const i=Ff(e)?[e]:O1(e),s=i.length,o=s-1;for(;++r<s;){const l=i[r];let a=t;if(r!==o){const c=n[l];a=wt(c)||Array.isArray(c)?c:isNaN(+i[r+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;n[l]=a,n=n[l]}};const vh={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},lr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ii={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},qC=v.createContext(null);qC.displayName="HookFormControlContext";const x1=()=>v.useContext(qC);var YC=(n,e,t,r=!0)=>{const i={defaultValues:e._defaultValues};for(const s in n)Object.defineProperty(i,s,{get:()=>{const o=s;return e._proxyFormState[o]!==lr.all&&(e._proxyFormState[o]=!r||lr.all),t&&(t[o]=!0),n[o]}});return i};const b1=typeof window<"u"?v.useLayoutEffect:v.useEffect;function IL(n){const e=x1(),{control:t=e,disabled:r,name:i,exact:s}=n||{},[o,l]=v.useState(t._formState),a=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return b1(()=>t._subscribe({name:i,formState:a.current,exact:s,callback:c=>{!r&&l({...t._formState,...c})}}),[i,r,s]),v.useEffect(()=>{a.current.isValid&&t._setValid(!0)},[t]),v.useMemo(()=>YC(o,t,a.current,!1),[o,t])}var $n=n=>typeof n=="string",Vg=(n,e,t,r,i)=>$n(n)?(r&&e.watch.add(n),re(t,n,i)):Array.isArray(n)?n.map(s=>(r&&e.watch.add(s),re(t,s))):(r&&(e.watchAll=!0),t),Zg=n=>fn(n)||!zC(n);function ar(n,e,t=new WeakSet){if(Zg(n)||Zg(e))return Object.is(n,e);if(xs(n)&&xs(e))return Object.is(n.getTime(),e.getTime());const r=Object.keys(n),i=Object.keys(e);if(r.length!==i.length)return!1;if(t.has(n)||t.has(e))return!0;t.add(n),t.add(e);for(const s of r){const o=n[s];if(!i.includes(s))return!1;if(s!=="ref"){const l=e[s];if(xs(o)&&xs(l)||wt(o)&&wt(l)||Array.isArray(o)&&Array.isArray(l)?!ar(o,l,t):!Object.is(o,l))return!1}}return!0}function DL(n){const e=x1(),{control:t=e,name:r,defaultValue:i,disabled:s,exact:o,compute:l}=n||{},a=v.useRef(i),c=v.useRef(l),u=v.useRef(void 0),h=v.useRef(t),f=v.useRef(r);c.current=l;const[d,p]=v.useState(()=>{const y=t._getWatch(r,a.current);return c.current?c.current(y):y}),g=v.useCallback(y=>{const S=Vg(r,t._names,y||t._formValues,!1,a.current);return c.current?c.current(S):S},[t._formValues,t._names,r]),m=v.useCallback(y=>{if(!s){const S=Vg(r,t._names,y||t._formValues,!1,a.current);if(c.current){const k=c.current(S);ar(k,u.current)||(p(k),u.current=k)}else p(S)}},[t._formValues,t._names,s,r]);b1(()=>((h.current!==t||!ar(f.current,r))&&(h.current=t,f.current=r,m()),t._subscribe({name:r,formState:{values:!0},exact:o,callback:y=>{m(y.values)}})),[t,o,r,m]),v.useEffect(()=>t._removeUnmounted());const x=h.current!==t,O=f.current,b=v.useMemo(()=>{if(s)return null;const y=!x&&!ar(O,r);return x||y?g():null},[s,x,r,O,g]);return b!==null?b:d}function NL(n){const e=x1(),{name:t,disabled:r,control:i=e,shouldUnregister:s,defaultValue:o,exact:l=!0}=n,a=jC(i._names.array,t),c=v.useMemo(()=>re(i._formValues,t,re(i._defaultValues,t,o)),[i,t,o]),u=DL({control:i,name:t,defaultValue:c,exact:l}),h=IL({control:i,name:t,exact:l}),f=v.useRef(n),d=v.useRef(void 0),p=v.useRef(i.register(t,{...n.rules,value:u,...Pn(n.disabled)?{disabled:n.disabled}:{}}));f.current=n;const g=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!re(h.errors,t)},isDirty:{enumerable:!0,get:()=>!!re(h.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!re(h.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!re(h.validatingFields,t)},error:{enumerable:!0,get:()=>re(h.errors,t)}}),[h,t]),m=v.useCallback(y=>p.current.onChange({target:{value:WC(y),name:t},type:vh.CHANGE}),[t]),x=v.useCallback(()=>p.current.onBlur({target:{value:re(i._formValues,t),name:t},type:vh.BLUR}),[t,i._formValues]),O=v.useCallback(y=>{const S=re(i._fields,t);S&&S._f&&y&&(S._f.ref={focus:()=>nn(y.focus)&&y.focus(),select:()=>nn(y.select)&&y.select(),setCustomValidity:k=>nn(y.setCustomValidity)&&y.setCustomValidity(k),reportValidity:()=>nn(y.reportValidity)&&y.reportValidity()})},[i._fields,t]),b=v.useMemo(()=>({name:t,value:u,...Pn(r)||h.disabled?{disabled:h.disabled||r}:{},onChange:m,onBlur:x,ref:O}),[t,r,h.disabled,m,x,O,u]);return v.useEffect(()=>{const y=i._options.shouldUnregister||s,S=d.current;S&&S!==t&&!a&&i.unregister(S),i.register(t,{...f.current.rules,...Pn(f.current.disabled)?{disabled:f.current.disabled}:{}});const k=(w,C)=>{const T=re(i._fields,w);T&&T._f&&(T._f.mount=C)};if(k(t,!0),y){const w=pt(re(i._options.defaultValues,t,f.current.defaultValue));Je(i._defaultValues,t,w),tt(re(i._formValues,t))&&Je(i._formValues,t,w)}return!a&&i.register(t),d.current=t,()=>{(a?y&&!i._state.action:y)?i.unregister(t):k(t,!1)}},[t,i,a,s]),v.useEffect(()=>{i._setDisabledField({disabled:r,name:t})},[r,t,i]),v.useMemo(()=>({field:b,formState:h,fieldState:g}),[b,h,g])}const VL=n=>n.render(NL(n)),ZL=v.createContext(null);ZL.displayName="HookFormContext";var BL=(n,e,t,r,i)=>e?{...t[n],types:{...t[n]&&t[n].types?t[n].types:{},[r]:i||!0}}:{},ea=n=>Array.isArray(n)?n:[n],vy=()=>{let n=[];return{get observers(){return n},next:i=>{for(const s of n)s.next&&s.next(i)},subscribe:i=>(n.push(i),{unsubscribe:()=>{n=n.filter(s=>s!==i)}}),unsubscribe:()=>{n=[]}}};function HC(n,e){const t={};for(const r in n)if(n.hasOwnProperty(r)){const i=n[r],s=e[r];if(i&&wt(i)&&s){const o=HC(i,s);wt(o)&&(t[r]=o)}else n[r]&&(t[r]=s)}return t}var Jt=n=>wt(n)&&!Object.keys(n).length,y1=n=>n.type==="file",Sh=n=>{if(!g1)return!1;const e=n?n.ownerDocument:0;return n instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},UC=n=>n.type==="select-multiple",v1=n=>n.type==="radio",FL=n=>v1(n)||pc(n),Ld=n=>Sh(n)&&n.isConnected;function XL(n,e){const t=e.slice(0,-1).length;let r=0;for(;r<t;)n=tt(n)?r++:n[e[r++]];return n}function zL(n){for(const e in n)if(n.hasOwnProperty(e)&&!tt(n[e]))return!1;return!0}function gt(n,e){const t=Array.isArray(e)?e:Ff(e)?[e]:O1(e),r=t.length===1?n:XL(n,t),i=t.length-1,s=t[i];return r&&delete r[s],i!==0&&(wt(r)&&Jt(r)||Array.isArray(r)&&zL(r))&&gt(n,t.slice(0,-1)),n}var WL=n=>{for(const e in n)if(nn(n[e]))return!0;return!1};function GC(n){return Array.isArray(n)||wt(n)&&!WL(n)}function Bg(n,e={}){for(const t in n){const r=n[t];GC(r)?(e[t]=Array.isArray(r)?[]:{},Bg(r,e[t])):tt(r)||(e[t]=!0)}return e}function so(n,e,t){t||(t=Bg(e));for(const r in n){const i=n[r];if(GC(i))tt(e)||Zg(t[r])?t[r]=Bg(i,Array.isArray(i)?[]:{}):so(i,fn(e)?{}:e[r],t[r]);else{const s=e[r];t[r]=!ar(i,s)}}return t}const Sy={value:!1,isValid:!1},wy={value:!0,isValid:!0};var KC=n=>{if(Array.isArray(n)){if(n.length>1){const e=n.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:e,isValid:!!e.length}}return n[0].checked&&!n[0].disabled?n[0].attributes&&!tt(n[0].attributes.value)?tt(n[0].value)||n[0].value===""?wy:{value:n[0].value,isValid:!0}:wy:Sy}return Sy},JC=(n,{valueAsNumber:e,valueAsDate:t,setValueAs:r})=>tt(n)?n:e?n===""?NaN:n&&+n:t&&$n(n)?new Date(n):r?r(n):n;const ky={isValid:!1,value:null};var e_=n=>Array.isArray(n)?n.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,ky):ky;function Cy(n){const e=n.ref;return y1(e)?e.files:v1(e)?e_(n.refs).value:UC(e)?[...e.selectedOptions].map(({value:t})=>t):pc(e)?KC(n.refs).value:JC(tt(e.value)?n.ref.value:e.value,n)}var jL=(n,e,t,r)=>{const i={};for(const s of n){const o=re(e,s);o&&Je(i,s,o._f)}return{criteriaMode:t,names:[...n],fields:i,shouldUseNativeValidation:r}},wh=n=>n instanceof RegExp,wl=n=>tt(n)?n:wh(n)?n.source:wt(n)?wh(n.value)?n.value.source:n.value:n,_y=n=>({isOnSubmit:!n||n===lr.onSubmit,isOnBlur:n===lr.onBlur,isOnChange:n===lr.onChange,isOnAll:n===lr.all,isOnTouch:n===lr.onTouched});const Ty="AsyncFunction";var qL=n=>!!n&&!!n.validate&&!!(nn(n.validate)&&n.validate.constructor.name===Ty||wt(n.validate)&&Object.values(n.validate).find(e=>e.constructor.name===Ty)),YL=n=>n.mount&&(n.required||n.min||n.max||n.maxLength||n.minLength||n.pattern||n.validate),Py=(n,e,t)=>!t&&(e.watchAll||e.watch.has(n)||[...e.watch].some(r=>n.startsWith(r)&&/^\.\w+/.test(n.slice(r.length))));const ta=(n,e,t,r)=>{for(const i of t||Object.keys(n)){const s=re(n,i);if(s){const{_f:o,...l}=s;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],i)&&!r)return!0;if(o.ref&&e(o.ref,o.name)&&!r)return!0;if(ta(l,e))break}else if(wt(l)&&ta(l,e))break}}};function Ey(n,e,t){const r=re(n,t);if(r||Ff(t))return{error:r,name:t};const i=t.split(".");for(;i.length;){const s=i.join("."),o=re(e,s),l=re(n,s);if(o&&!Array.isArray(o)&&t!==s)return{name:t};if(l&&l.type)return{name:s,error:l};if(l&&l.root&&l.root.type)return{name:`${s}.root`,error:l.root};i.pop()}return{name:t}}var HL=(n,e,t,r)=>{t(n);const{name:i,...s}=n;return Jt(s)||Object.keys(s).length>=Object.keys(e).length||Object.keys(s).find(o=>e[o]===(!r||lr.all))},UL=(n,e,t)=>!n||!e||n===e||ea(n).some(r=>r&&(t?r===e:r.startsWith(e)||e.startsWith(r))),GL=(n,e,t,r,i)=>i.isOnAll?!1:!t&&i.isOnTouch?!(e||n):(t?r.isOnBlur:i.isOnBlur)?!n:(t?r.isOnChange:i.isOnChange)?n:!0,KL=(n,e)=>!m1(re(n,e)).length&&gt(n,e),JL=(n,e,t)=>{const r=ea(re(n,t));return Je(r,"root",e[t]),Je(n,t,r),n};function Qy(n,e,t="validate"){if($n(n)||Array.isArray(n)&&n.every($n)||Pn(n)&&!n)return{type:t,message:$n(n)?n:"",ref:e}}var to=n=>wt(n)&&!wh(n)?n:{value:n,message:""},$y=async(n,e,t,r,i,s)=>{const{ref:o,refs:l,required:a,maxLength:c,minLength:u,min:h,max:f,pattern:d,validate:p,name:g,valueAsNumber:m,mount:x}=n._f,O=re(t,g);if(!x||e.has(g))return{};const b=l?l[0]:o,y=M=>{i&&b.reportValidity&&(b.setCustomValidity(Pn(M)?"":M||""),b.reportValidity())},S={},k=v1(o),w=pc(o),C=k||w,T=(m||y1(o))&&tt(o.value)&&tt(O)||Sh(o)&&o.value===""||O===""||Array.isArray(O)&&!O.length,$=BL.bind(null,g,r,S),D=(M,Q,F,j=ii.maxLength,fe=ii.minLength)=>{const ee=M?Q:F;S[g]={type:M?j:fe,message:ee,ref:o,...$(M?j:fe,ee)}};if(s?!Array.isArray(O)||!O.length:a&&(!C&&(T||fn(O))||Pn(O)&&!O||w&&!KC(l).isValid||k&&!e_(l).isValid)){const{value:M,message:Q}=$n(a)?{value:!!a,message:a}:to(a);if(M&&(S[g]={type:ii.required,message:Q,ref:b,...$(ii.required,Q)},!r))return y(Q),S}if(!T&&(!fn(h)||!fn(f))){let M,Q;const F=to(f),j=to(h);if(!fn(O)&&!isNaN(O)){const fe=o.valueAsNumber||O&&+O;fn(F.value)||(M=fe>F.value),fn(j.value)||(Q=fe<j.value)}else{const fe=o.valueAsDate||new Date(O),ee=_e=>new Date(new Date().toDateString()+" "+_e),be=o.type=="time",xe=o.type=="week";$n(F.value)&&O&&(M=be?ee(O)>ee(F.value):xe?O>F.value:fe>new Date(F.value)),$n(j.value)&&O&&(Q=be?ee(O)<ee(j.value):xe?O<j.value:fe<new Date(j.value))}if((M||Q)&&(D(!!M,F.message,j.message,ii.max,ii.min),!r))return y(S[g].message),S}if((c||u)&&!T&&($n(O)||s&&Array.isArray(O))){const M=to(c),Q=to(u),F=!fn(M.value)&&O.length>+M.value,j=!fn(Q.value)&&O.length<+Q.value;if((F||j)&&(D(F,M.message,Q.message),!r))return y(S[g].message),S}if(d&&!T&&$n(O)){const{value:M,message:Q}=to(d);if(wh(M)&&!O.match(M)&&(S[g]={type:ii.pattern,message:Q,ref:o,...$(ii.pattern,Q)},!r))return y(Q),S}if(p){if(nn(p)){const M=await p(O,t),Q=Qy(M,b);if(Q&&(S[g]={...Q,...$(ii.validate,Q.message)},!r))return y(Q.message),S}else if(wt(p)){let M={};for(const Q in p){if(!Jt(M)&&!r)break;const F=Qy(await p[Q](O,t),b,Q);F&&(M={...F,...$(Q,F.message)},y(F.message),r&&(S[g]=M))}if(!Jt(M)&&(S[g]={ref:b,...M},!r))return S}}return y(!0),S};const eR={mode:lr.onSubmit,reValidateMode:lr.onChange,shouldFocusError:!0};function tR(n={}){let e={...eR,...n},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:nn(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},r={},i=wt(e.defaultValues)||wt(e.values)?pt(e.defaultValues||e.values)||{}:{},s=e.shouldUnregister?{}:pt(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},a,c=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...u};let f={...h};const d={array:vy(),state:vy()},p=e.criteriaMode===lr.all,g=E=>A=>{clearTimeout(c),c=setTimeout(E,A)},m=async E=>{if(!o.keepIsValid&&!e.disabled&&(h.isValid||f.isValid||E)){let A;e.resolver?(A=Jt((await C()).errors),x()):A=await $(r,!0),A!==t.isValid&&d.state.next({isValid:A})}},x=(E,A)=>{!e.disabled&&(h.isValidating||h.validatingFields||f.isValidating||f.validatingFields)&&((E||Array.from(l.mount)).forEach(R=>{R&&(A?Je(t.validatingFields,R,A):gt(t.validatingFields,R))}),d.state.next({validatingFields:t.validatingFields,isValidating:!Jt(t.validatingFields)}))},O=(E,A=[],R,W,q=!0,Y=!0)=>{if(W&&R&&!e.disabled){if(o.action=!0,Y&&Array.isArray(re(r,E))){const te=R(re(r,E),W.argA,W.argB);q&&Je(r,E,te)}if(Y&&Array.isArray(re(t.errors,E))){const te=R(re(t.errors,E),W.argA,W.argB);q&&Je(t.errors,E,te),KL(t.errors,E)}if((h.touchedFields||f.touchedFields)&&Y&&Array.isArray(re(t.touchedFields,E))){const te=R(re(t.touchedFields,E),W.argA,W.argB);q&&Je(t.touchedFields,E,te)}(h.dirtyFields||f.dirtyFields)&&(t.dirtyFields=so(i,s)),d.state.next({name:E,isDirty:M(E,A),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else Je(s,E,A)},b=(E,A)=>{Je(t.errors,E,A),d.state.next({errors:t.errors})},y=E=>{t.errors=E,d.state.next({errors:t.errors,isValid:!1})},S=(E,A,R,W)=>{const q=re(r,E);if(q){const Y=re(s,E,tt(R)?re(i,E):R);tt(Y)||W&&W.defaultChecked||A?Je(s,E,A?Y:Cy(q._f)):j(E,Y),o.mount&&!o.action&&m()}},k=(E,A,R,W,q)=>{let Y=!1,te=!1;const P={name:E};if(!e.disabled){if(!R||W){(h.isDirty||f.isDirty)&&(te=t.isDirty,t.isDirty=P.isDirty=M(),Y=te!==P.isDirty);const ke=ar(re(i,E),A);te=!!re(t.dirtyFields,E),ke?gt(t.dirtyFields,E):Je(t.dirtyFields,E,!0),P.dirtyFields=t.dirtyFields,Y=Y||(h.dirtyFields||f.dirtyFields)&&te!==!ke}if(R){const ke=re(t.touchedFields,E);ke||(Je(t.touchedFields,E,R),P.touchedFields=t.touchedFields,Y=Y||(h.touchedFields||f.touchedFields)&&ke!==R)}Y&&q&&d.state.next(P)}return Y?P:{}},w=(E,A,R,W)=>{const q=re(t.errors,E),Y=(h.isValid||f.isValid)&&Pn(A)&&t.isValid!==A;if(e.delayError&&R?(a=g(()=>b(E,R)),a(e.delayError)):(clearTimeout(c),a=null,R?Je(t.errors,E,R):gt(t.errors,E)),(R?!ar(q,R):q)||!Jt(W)||Y){const te={...W,...Y&&Pn(A)?{isValid:A}:{},errors:t.errors,name:E};t={...t,...te},d.state.next(te)}},C=async E=>(x(E,!0),await e.resolver(s,e.context,jL(E||l.mount,r,e.criteriaMode,e.shouldUseNativeValidation))),T=async E=>{const{errors:A}=await C(E);if(x(E),E)for(const R of E){const W=re(A,R);W?Je(t.errors,R,W):gt(t.errors,R)}else t.errors=A;return A},$=async(E,A,R={valid:!0})=>{for(const W in E){const q=E[W];if(q){const{_f:Y,...te}=q;if(Y){const P=l.array.has(Y.name),ke=q._f&&qL(q._f);ke&&h.validatingFields&&x([Y.name],!0);const Ge=await $y(q,l.disabled,s,p,e.shouldUseNativeValidation&&!A,P);if(ke&&h.validatingFields&&x([Y.name]),Ge[Y.name]&&(R.valid=!1,A||n.shouldUseNativeValidation))break;!A&&(re(Ge,Y.name)?P?JL(t.errors,Ge,Y.name):Je(t.errors,Y.name,Ge[Y.name]):gt(t.errors,Y.name))}!Jt(te)&&await $(te,A,R)}}return R.valid},D=()=>{for(const E of l.unMount){const A=re(r,E);A&&(A._f.refs?A._f.refs.every(R=>!Ld(R)):!Ld(A._f.ref))&&he(E)}l.unMount=new Set},M=(E,A)=>!e.disabled&&(E&&A&&Je(s,E,A),!ar(Ze(),i)),Q=(E,A,R)=>Vg(E,l,{...o.mount?s:tt(A)?i:$n(E)?{[E]:A}:A},R,A),F=E=>m1(re(o.mount?s:i,E,e.shouldUnregister?re(i,E,[]):[])),j=(E,A,R={})=>{const W=re(r,E);let q=A;if(W){const Y=W._f;Y&&(!Y.disabled&&Je(s,E,JC(A,Y)),q=Sh(Y.ref)&&fn(A)?"":A,UC(Y.ref)?[...Y.ref.options].forEach(te=>te.selected=q.includes(te.value)):Y.refs?pc(Y.ref)?Y.refs.forEach(te=>{(!te.defaultChecked||!te.disabled)&&(Array.isArray(q)?te.checked=!!q.find(P=>P===te.value):te.checked=q===te.value||!!q)}):Y.refs.forEach(te=>te.checked=te.value===q):y1(Y.ref)?Y.ref.value="":(Y.ref.value=q,Y.ref.type||d.state.next({name:E,values:pt(s)})))}(R.shouldDirty||R.shouldTouch)&&k(E,q,R.shouldTouch,R.shouldDirty,!0),R.shouldValidate&&_e(E)},fe=(E,A,R)=>{for(const W in A){if(!A.hasOwnProperty(W))return;const q=A[W],Y=E+"."+W,te=re(r,Y);(l.array.has(E)||wt(q)||te&&!te._f)&&!xs(q)?fe(Y,q,R):j(Y,q,R)}},ee=(E,A,R={})=>{const W=re(r,E),q=l.array.has(E),Y=pt(A);Je(s,E,Y),q?(d.array.next({name:E,values:pt(s)}),(h.isDirty||h.dirtyFields||f.isDirty||f.dirtyFields)&&R.shouldDirty&&d.state.next({name:E,dirtyFields:so(i,s),isDirty:M(E,Y)})):W&&!W._f&&!fn(Y)?fe(E,Y,R):j(E,Y,R),Py(E,l)?d.state.next({...t,name:E,values:pt(s)}):d.state.next({name:o.mount?E:void 0,values:pt(s)})},be=async E=>{o.mount=!0;const A=E.target;let R=A.name,W=!0;const q=re(r,R),Y=ke=>{W=Number.isNaN(ke)||xs(ke)&&isNaN(ke.getTime())||ar(ke,re(s,R,ke))},te=_y(e.mode),P=_y(e.reValidateMode);if(q){let ke,Ge;const at=A.type?Cy(q._f):WC(E),kr=E.type===vh.BLUR||E.type===vh.FOCUS_OUT,j$=!YL(q._f)&&!e.resolver&&!re(t.errors,R)&&!q._f.deps||GL(kr,re(t.touchedFields,R),t.isSubmitted,P,te),ld=Py(R,l,kr);Je(s,R,at),kr?(!A||!A.readOnly)&&(q._f.onBlur&&q._f.onBlur(E),a&&a(0)):q._f.onChange&&q._f.onChange(E);const ad=k(R,at,kr),q$=!Jt(ad)||ld;if(!kr&&d.state.next({name:R,type:E.type,values:pt(s)}),j$)return(h.isValid||f.isValid)&&(e.mode==="onBlur"?kr&&m():kr||m()),q$&&d.state.next({name:R,...ld?{}:ad});if(!kr&&ld&&d.state.next({...t}),e.resolver){const{errors:nx}=await C([R]);if(x([R]),Y(at),W){const Y$=Ey(t.errors,r,R),rx=Ey(nx,r,Y$.name||R);ke=rx.error,R=rx.name,Ge=Jt(nx)}}else x([R],!0),ke=(await $y(q,l.disabled,s,p,e.shouldUseNativeValidation))[R],x([R]),Y(at),W&&(ke?Ge=!1:(h.isValid||f.isValid)&&(Ge=await $(r,!0)));W&&(q._f.deps&&(!Array.isArray(q._f.deps)||q._f.deps.length>0)&&_e(q._f.deps),w(R,Ge,ke,ad))}},xe=(E,A)=>{if(re(t.errors,A)&&E.focus)return E.focus(),1},_e=async(E,A={})=>{let R,W;const q=ea(E);if(e.resolver){const Y=await T(tt(E)?E:q);R=Jt(Y),W=E?!q.some(te=>re(Y,te)):R}else E?(W=(await Promise.all(q.map(async Y=>{const te=re(r,Y);return await $(te&&te._f?{[Y]:te}:te)}))).every(Boolean),!(!W&&!t.isValid)&&m()):W=R=await $(r);return d.state.next({...!$n(E)||(h.isValid||f.isValid)&&R!==t.isValid?{}:{name:E},...e.resolver||!E?{isValid:R}:{},errors:t.errors}),A.shouldFocus&&!W&&ta(r,xe,E?q:l.mount),W},Ze=(E,A)=>{let R={...o.mount?s:i};return A&&(R=HC(A.dirtyFields?t.dirtyFields:t.touchedFields,R)),tt(E)?R:$n(E)?re(R,E):E.map(W=>re(R,W))},Te=(E,A)=>({invalid:!!re((A||t).errors,E),isDirty:!!re((A||t).dirtyFields,E),error:re((A||t).errors,E),isValidating:!!re(t.validatingFields,E),isTouched:!!re((A||t).touchedFields,E)}),Be=E=>{const A=E?ea(E):void 0;A?.forEach(R=>gt(t.errors,R)),A?A.forEach(R=>{d.state.next({name:R,errors:t.errors})}):d.state.next({errors:{}})},Re=(E,A,R)=>{const W=(re(r,E,{_f:{}})._f||{}).ref,q=re(t.errors,E)||{},{ref:Y,message:te,type:P,...ke}=q;Je(t.errors,E,{...ke,...A,ref:W}),d.state.next({name:E,errors:t.errors,isValid:!1}),R&&R.shouldFocus&&W&&W.focus&&W.focus()},Le=(E,A)=>nn(E)?d.state.subscribe({next:R=>"values"in R&&E(Q(void 0,A),R)}):Q(E,A,!0),$e=E=>d.state.subscribe({next:A=>{UL(E.name,A.name,E.exact)&&HL(A,E.formState||h,Mi,E.reRenderRoot)&&E.callback({values:{...s},...t,...A,defaultValues:i})}}).unsubscribe,pe=E=>(o.mount=!0,f={...f,...E.formState},$e({...E,formState:{...u,...E.formState}})),he=(E,A={})=>{for(const R of E?ea(E):l.mount)l.mount.delete(R),l.array.delete(R),A.keepValue||(gt(r,R),gt(s,R)),!A.keepError&&gt(t.errors,R),!A.keepDirty&&gt(t.dirtyFields,R),!A.keepTouched&&gt(t.touchedFields,R),!A.keepIsValidating&&gt(t.validatingFields,R),!e.shouldUnregister&&!A.keepDefaultValue&&gt(i,R);d.state.next({values:pt(s)}),d.state.next({...t,...A.keepDirty?{isDirty:M()}:{}}),!A.keepIsValid&&m()},ge=({disabled:E,name:A})=>{if(Pn(E)&&o.mount||E||l.disabled.has(A)){const q=l.disabled.has(A)!==!!E;E?l.disabled.add(A):l.disabled.delete(A),q&&o.mount&&!o.action&&m()}},Se=(E,A={})=>{let R=re(r,E);const W=Pn(A.disabled)||Pn(e.disabled);return Je(r,E,{...R||{},_f:{...R&&R._f?R._f:{ref:{name:E}},name:E,mount:!0,...A}}),l.mount.add(E),R?ge({disabled:Pn(A.disabled)?A.disabled:e.disabled,name:E}):S(E,!0,A.value),{...W?{disabled:A.disabled||e.disabled}:{},...e.progressive?{required:!!A.required,min:wl(A.min),max:wl(A.max),minLength:wl(A.minLength),maxLength:wl(A.maxLength),pattern:wl(A.pattern)}:{},name:E,onChange:be,onBlur:be,ref:q=>{if(q){Se(E,A),R=re(r,E);const Y=tt(q.value)&&q.querySelectorAll&&q.querySelectorAll("input,select,textarea")[0]||q,te=FL(Y),P=R._f.refs||[];if(te?P.find(ke=>ke===Y):Y===R._f.ref)return;Je(r,E,{_f:{...R._f,...te?{refs:[...P.filter(Ld),Y,...Array.isArray(re(i,E))?[{}]:[]],ref:{type:Y.type,name:E}}:{ref:Y}}}),S(E,!1,void 0,Y)}else R=re(r,E,{}),R._f&&(R._f.mount=!1),(e.shouldUnregister||A.shouldUnregister)&&!(jC(l.array,E)&&o.action)&&l.unMount.add(E)}}},Fe=()=>e.shouldFocusError&&ta(r,xe,l.mount),It=E=>{Pn(E)&&(d.state.next({disabled:E}),ta(r,(A,R)=>{const W=re(r,R);W&&(A.disabled=W._f.disabled||E,Array.isArray(W._f.refs)&&W._f.refs.forEach(q=>{q.disabled=W._f.disabled||E}))},0,!1))},Pt=(E,A)=>async R=>{let W;R&&(R.preventDefault&&R.preventDefault(),R.persist&&R.persist());let q=pt(s);if(d.state.next({isSubmitting:!0}),e.resolver){const{errors:Y,values:te}=await C();x(),t.errors=Y,q=pt(te)}else await $(r);if(l.disabled.size)for(const Y of l.disabled)gt(q,Y);if(gt(t.errors,"root"),Jt(t.errors)){d.state.next({errors:{}});try{await E(q,R)}catch(Y){W=Y}}else A&&await A({...t.errors},R),Fe(),setTimeout(Fe);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Jt(t.errors)&&!W,submitCount:t.submitCount+1,errors:t.errors}),W)throw W},Vn=(E,A={})=>{re(r,E)&&(tt(A.defaultValue)?ee(E,pt(re(i,E))):(ee(E,A.defaultValue),Je(i,E,pt(A.defaultValue))),A.keepTouched||gt(t.touchedFields,E),A.keepDirty||(gt(t.dirtyFields,E),t.isDirty=A.defaultValue?M(E,pt(re(i,E))):M()),A.keepError||(gt(t.errors,E),h.isValid&&m()),d.state.next({...t}))},an=(E,A={})=>{const R=E?pt(E):i,W=pt(R),q=Jt(E),Y=q?i:W;if(A.keepDefaultValues||(i=R),!A.keepValues){if(A.keepDirtyValues){const te=new Set([...l.mount,...Object.keys(so(i,s))]);for(const P of Array.from(te)){const ke=re(t.dirtyFields,P),Ge=re(s,P),at=re(Y,P);ke&&!tt(Ge)?Je(Y,P,Ge):!ke&&!tt(at)&&ee(P,at)}}else{if(g1&&tt(E))for(const te of l.mount){const P=re(r,te);if(P&&P._f){const ke=Array.isArray(P._f.refs)?P._f.refs[0]:P._f.ref;if(Sh(ke)){const Ge=ke.closest("form");if(Ge){Ge.reset();break}}}}if(A.keepFieldsRef)for(const te of l.mount)ee(te,re(Y,te));else r={}}s=e.shouldUnregister?A.keepDefaultValues?pt(i):{}:pt(Y),d.array.next({values:{...Y}}),d.state.next({values:{...Y}})}l={mount:A.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!h.isValid||!!A.keepIsValid||!!A.keepDirtyValues||!e.shouldUnregister&&!Jt(Y),o.watch=!!e.shouldUnregister,o.keepIsValid=!!A.keepIsValid,o.action=!1,A.keepErrors||(t.errors={}),d.state.next({submitCount:A.keepSubmitCount?t.submitCount:0,isDirty:q?!1:A.keepDirty?t.isDirty:!!(A.keepDefaultValues&&!ar(E,i)),isSubmitted:A.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:q?{}:A.keepDirtyValues?A.keepDefaultValues&&s?so(i,s):t.dirtyFields:A.keepDefaultValues&&E?so(i,E):A.keepDirty?t.dirtyFields:{},touchedFields:A.keepTouched?t.touchedFields:{},errors:A.keepErrors?t.errors:{},isSubmitSuccessful:A.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},cn=(E,A)=>an(nn(E)?E(s):E,{...e.resetOptions,...A}),Zn=(E,A={})=>{const R=re(r,E),W=R&&R._f;if(W){const q=W.refs?W.refs[0]:W.ref;q.focus&&setTimeout(()=>{q.focus(),A.shouldSelect&&nn(q.select)&&q.select()})}},Mi=E=>{t={...t,...E}},wr={control:{register:Se,unregister:he,getFieldState:Te,handleSubmit:Pt,setError:Re,_subscribe:$e,_runSchema:C,_updateIsValidating:x,_focusError:Fe,_getWatch:Q,_getDirty:M,_setValid:m,_setFieldArray:O,_setDisabledField:ge,_setErrors:y,_getFieldArray:F,_reset:an,_resetDefaultValues:()=>nn(e.defaultValues)&&e.defaultValues().then(E=>{cn(E,e.resetOptions),d.state.next({isLoading:!1})}),_removeUnmounted:D,_disableForm:It,_subjects:d,_proxyFormState:h,get _fields(){return r},get _formValues(){return s},get _state(){return o},set _state(E){o=E},get _defaultValues(){return i},get _names(){return l},set _names(E){l=E},get _formState(){return t},get _options(){return e},set _options(E){e={...e,...E}}},subscribe:pe,trigger:_e,register:Se,handleSubmit:Pt,watch:Le,setValue:ee,getValues:Ze,reset:cn,resetField:Vn,clearErrors:Be,unregister:he,setError:Re,setFocus:Zn,getFieldState:Te};return{...wr,formControl:wr}}function nR(n={}){const e=v.useRef(void 0),t=v.useRef(void 0),[r,i]=v.useState({isDirty:!1,isValidating:!1,isLoading:nn(n.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1,isReady:!1,defaultValues:nn(n.defaultValues)?void 0:n.defaultValues});if(!e.current)if(n.formControl)e.current={...n.formControl,formState:r},n.defaultValues&&!nn(n.defaultValues)&&n.formControl.reset(n.defaultValues,n.resetOptions);else{const{formControl:o,...l}=tR(n);e.current={...l,formState:r}}const s=e.current.control;return s._options=n,b1(()=>{const o=s._subscribe({formState:s._proxyFormState,callback:()=>i({...s._formState}),reRenderRoot:!0});return i(l=>({...l,isReady:!0})),s._formState.isReady=!0,o},[s]),v.useEffect(()=>s._disableForm(n.disabled),[s,n.disabled]),v.useEffect(()=>{n.mode&&(s._options.mode=n.mode),n.reValidateMode&&(s._options.reValidateMode=n.reValidateMode)},[s,n.mode,n.reValidateMode]),v.useEffect(()=>{n.errors&&(s._setErrors(n.errors),s._focusError())},[s,n.errors]),v.useEffect(()=>{n.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,n.shouldUnregister]),v.useEffect(()=>{if(s._proxyFormState.isDirty){const o=s._getDirty();o!==r.isDirty&&s._subjects.state.next({isDirty:o})}},[s,r.isDirty]),v.useEffect(()=>{var o;n.values&&!ar(n.values,t.current)?(s._reset(n.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((o=s._options.resetOptions)===null||o===void 0)&&o.keepIsValid||s._setValid(),t.current=n.values,i(l=>({...l}))):s._resetDefaultValues()},[s,n.values]),v.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),e.current.formState=v.useMemo(()=>YC(r,s),[s,r]),e.current}function Il(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}function nt(){return nt=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},nt.apply(null,arguments)}var Rd={exports:{}},Id,Ay;function rR(){if(Ay)return Id;Ay=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Id=n,Id}var Dd,My;function iR(){if(My)return Dd;My=1;var n=rR();function e(){}function t(){}return t.resetWarningCache=e,Dd=function(){function r(o,l,a,c,u,h){if(h!==n){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:t,resetWarningCache:e};return s.PropTypes=s,s},Dd}var Ly;function sR(){return Ly||(Ly=1,Rd.exports=iR()()),Rd.exports}var oR=sR();const J=hk(oR);var Nd={exports:{}},We={};/** @license React v17.0.2
58
+ * react-is.production.min.js
59
+ *
60
+ * Copyright (c) Facebook, Inc. and its affiliates.
61
+ *
62
+ * This source code is licensed under the MIT license found in the
63
+ * LICENSE file in the root directory of this source tree.
64
+ */var Ry;function lR(){if(Ry)return We;Ry=1;var n=60103,e=60106,t=60107,r=60108,i=60114,s=60109,o=60110,l=60112,a=60113,c=60120,u=60115,h=60116,f=60121,d=60122,p=60117,g=60129,m=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;n=x("react.element"),e=x("react.portal"),t=x("react.fragment"),r=x("react.strict_mode"),i=x("react.profiler"),s=x("react.provider"),o=x("react.context"),l=x("react.forward_ref"),a=x("react.suspense"),c=x("react.suspense_list"),u=x("react.memo"),h=x("react.lazy"),f=x("react.block"),d=x("react.server.block"),p=x("react.fundamental"),g=x("react.debug_trace_mode"),m=x("react.legacy_hidden")}function O(Q){if(typeof Q=="object"&&Q!==null){var F=Q.$$typeof;switch(F){case n:switch(Q=Q.type,Q){case t:case i:case r:case a:case c:return Q;default:switch(Q=Q&&Q.$$typeof,Q){case o:case l:case h:case u:case s:return Q;default:return F}}case e:return F}}}var b=s,y=n,S=l,k=t,w=h,C=u,T=e,$=i,D=r,M=a;return We.ContextConsumer=o,We.ContextProvider=b,We.Element=y,We.ForwardRef=S,We.Fragment=k,We.Lazy=w,We.Memo=C,We.Portal=T,We.Profiler=$,We.StrictMode=D,We.Suspense=M,We.isAsyncMode=function(){return!1},We.isConcurrentMode=function(){return!1},We.isContextConsumer=function(Q){return O(Q)===o},We.isContextProvider=function(Q){return O(Q)===s},We.isElement=function(Q){return typeof Q=="object"&&Q!==null&&Q.$$typeof===n},We.isForwardRef=function(Q){return O(Q)===l},We.isFragment=function(Q){return O(Q)===t},We.isLazy=function(Q){return O(Q)===h},We.isMemo=function(Q){return O(Q)===u},We.isPortal=function(Q){return O(Q)===e},We.isProfiler=function(Q){return O(Q)===i},We.isStrictMode=function(Q){return O(Q)===r},We.isSuspense=function(Q){return O(Q)===a},We.isValidElementType=function(Q){return typeof Q=="string"||typeof Q=="function"||Q===t||Q===i||Q===g||Q===r||Q===a||Q===c||Q===m||typeof Q=="object"&&Q!==null&&(Q.$$typeof===h||Q.$$typeof===u||Q.$$typeof===s||Q.$$typeof===o||Q.$$typeof===l||Q.$$typeof===p||Q.$$typeof===f||Q[0]===d)},We.typeOf=O,We}var Iy;function aR(){return Iy||(Iy=1,Nd.exports=lR()),Nd.exports}aR();let Dy=n=>typeof n=="object"&&n!=null&&n.nodeType===1,Ny=(n,e)=>(!e||n!=="hidden")&&n!=="visible"&&n!=="clip",Vd=(n,e)=>{if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){let t=getComputedStyle(n,null);return Ny(t.overflowY,e)||Ny(t.overflowX,e)||(r=>{let i=(s=>{if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(n)}return!1},Dc=(n,e,t,r,i,s,o,l)=>s<n&&o>e||s>n&&o<e?0:s<=n&&l<=t||o>=e&&l>=t?s-n-r:o>e&&l<t||s<n&&l>t?o-e+i:0,cR=n=>{let e=n.parentElement;return e??(n.getRootNode().host||null)};var uR=(n,e)=>{var t,r,i,s,o,l;if(typeof document>"u")return[];let{inline:a,boundary:c,skipOverflowHiddenElements:u}=e,h=typeof c=="function"?c:M=>M!==c;if(!Dy(n))throw new TypeError("Invalid target");let f=document.scrollingElement||document.documentElement,d=[],p=n;for(;Dy(p)&&h(p);){if(p=cR(p),p===f){d.push(p);break}p!=null&&p===document.body&&Vd(p)&&!Vd(document.documentElement)||p!=null&&Vd(p,u)&&d.push(p)}let g=(r=(t=window.visualViewport)==null?void 0:t.width)!=null?r:innerWidth,m=(s=(i=window.visualViewport)==null?void 0:i.height)!=null?s:innerHeight,x=(o=window.scrollX)!=null?o:pageXOffset,O=(l=window.scrollY)!=null?l:pageYOffset,{height:b,width:y,top:S,right:k,bottom:w,left:C}=n.getBoundingClientRect(),T=S,$=a==="center"?C+y/2:a==="end"?k:C,D=[];for(let M=0;M<d.length;M++){let Q=d[M],{height:F,width:j,top:fe,right:ee,bottom:be,left:xe}=Q.getBoundingClientRect();if(S>=0&&C>=0&&w<=m&&k<=g&&S>=fe&&w<=be&&C>=xe&&k<=ee)return D;let _e=getComputedStyle(Q),Ze=parseInt(_e.borderLeftWidth,10),Te=parseInt(_e.borderTopWidth,10),Be=parseInt(_e.borderRightWidth,10),Re=parseInt(_e.borderBottomWidth,10),Le=0,$e=0,pe="offsetWidth"in Q?Q.offsetWidth-Q.clientWidth-Ze-Be:0,he="offsetHeight"in Q?Q.offsetHeight-Q.clientHeight-Te-Re:0,ge="offsetWidth"in Q?Q.offsetWidth===0?0:j/Q.offsetWidth:0,Se="offsetHeight"in Q?Q.offsetHeight===0?0:F/Q.offsetHeight:0;if(f===Q)Le=Dc(O,O+m,m,Te,Re,O+T,O+T+b,b),$e=a==="start"?$:a==="center"?$-g/2:a==="end"?$-g:Dc(x,x+g,g,Ze,Be,x+$,x+$+y,y),Le=Math.max(0,Le+O),$e=Math.max(0,$e+x);else{Le=Dc(fe,be,F,Te,Re+he,T,T+b,b),$e=a==="start"?$-xe-Ze:a==="center"?$-(xe+j/2)+pe/2:a==="end"?$-ee+Be+pe:Dc(xe,ee,j,Ze,Be+pe,$,$+y,y);let{scrollLeft:Fe,scrollTop:It}=Q;Le=Math.max(0,Math.min(It+Le/Se,Q.scrollHeight-F/Se+he)),$e=Math.max(0,Math.min(Fe+$e/ge,Q.scrollWidth-j/ge+pe)),T+=It-Le,$+=Fe-$e}D.push({el:Q,top:Le,left:$e})}return D},hR=0;function t_(){}function fR(n,e){if(n){var t=uR(n,{boundary:e});t.forEach(function(r){var i=r.el,s=r.top,o=r.left;i.scrollTop=s,i.scrollLeft=o})}}function Vy(n,e,t){var r=n===e||e instanceof t.Node&&n.contains&&n.contains(e);return r}function n_(n,e){var t;function r(){t&&clearTimeout(t)}function i(){for(var s=arguments.length,o=new Array(s),l=0;l<s;l++)o[l]=arguments[l];r(),t=setTimeout(function(){t=null,n.apply(void 0,o)},e)}return i.cancel=r,i}function si(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return function(r){for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return e.some(function(l){return l&&l.apply(void 0,[r].concat(s)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function Nc(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return function(r){e.forEach(function(i){typeof i=="function"?i(r):i&&(i.current=r)})}}function dR(){return String(hR++)}function pR(n){var e=n.isOpen,t=n.resultCount,r=n.previousResultCount;return e?t?t!==r?t+" result"+(t===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function Fg(n,e){return Object.keys(n).reduce(function(t,r){return t[r]=r_(e,r)?e[r]:n[r],t},{})}function r_(n,e){return n[e]!==void 0}function gR(n){var e=n.key,t=n.keyCode;return t>=37&&t<=40&&e.indexOf("Arrow")!==0?"Arrow"+e:e}function Vc(n,e,t,r,i){if(i===void 0&&(i=!0),t===0)return-1;var s=t-1;(typeof e!="number"||e<0||e>=t)&&(e=n>0?-1:s+1);var o=e+n;o<0?o=i?s:0:o>s&&(o=i?0:s);var l=Ta(n,o,t,r,i);return l===-1?e>=t?-1:e:l}function Ta(n,e,t,r,i){var s=r(e);if(!s||!s.hasAttribute("disabled"))return e;if(n>0){for(var o=e+1;o<t;o++)if(!r(o).hasAttribute("disabled"))return o}else for(var l=e-1;l>=0;l--)if(!r(l).hasAttribute("disabled"))return l;return i?n>0?Ta(1,0,t,r,!1):Ta(-1,t-1,t,r,!1):-1}function Zy(n,e,t,r){return r===void 0&&(r=!0),e.some(function(i){return i&&(Vy(i,n,t)||r&&Vy(i,t.document.activeElement,t))})}var mR=n_(function(n){i_(n).textContent=""},500);function OR(n,e){var t=i_(e);n&&(t.textContent=n,mR(e))}function i_(n){n===void 0&&(n=document);var e=n.getElementById("a11y-status-message");return e||(e=n.createElement("div"),e.setAttribute("id","a11y-status-message"),e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-relevant","additions text"),Object.assign(e.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),n.body.appendChild(e),e)}var xR=["isInitialMount","highlightedIndex","items","environment"],s_={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function bR(n,e,t){var r=n.props,i=n.type,s={};Object.keys(e).forEach(function(o){yR(o,n,e,t),t[o]!==e[o]&&(s[o]=t[o])}),r.onStateChange&&Object.keys(s).length&&r.onStateChange(nt({type:i},s))}function yR(n,e,t,r){var i=e.props,s=e.type,o="on"+S1(n)+"Change";i[o]&&r[n]!==void 0&&r[n]!==t[n]&&i[o](nt({type:s},r))}function vR(n,e){return e.changes}function SR(n){var e=n.selectedItem,t=n.itemToString;return e?t(e)+" has been selected.":""}var wR=n_(function(n,e){OR(n(),e)},200),kR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?V.useLayoutEffect:V.useEffect;function CR(n){var e=n.id,t=e===void 0?"downshift-"+dR():e,r=n.labelId,i=n.menuId,s=n.getItemId,o=n.toggleButtonId,l=n.inputId,a=V.useRef({labelId:r||t+"-label",menuId:i||t+"-menu",getItemId:s||function(c){return t+"-item-"+c},toggleButtonId:o||t+"-toggle-button",inputId:l||t+"-input"});return a.current}function _R(n,e,t,r){var i,s;if(n===void 0){if(e===void 0)throw new Error(r);i=t[e],s=e}else s=e===void 0?t.indexOf(n):e,i=n;return[i,s]}function TR(n){return n?String(n):""}function S1(n){return""+n.slice(0,1).toUpperCase()+n.slice(1)}function o_(n){var e=V.useRef(n);return e.current=n,e}function PR(n,e,t){var r=V.useRef(),i=V.useRef(),s=V.useCallback(function(f,d){i.current=d,f=Fg(f,d.props);var p=n(f,d),g=d.props.stateReducer(f,nt({},d,{changes:p}));return g},[n]),o=V.useReducer(s,e),l=o[0],a=o[1],c=o_(t),u=V.useCallback(function(f){return a(nt({props:c.current},f))},[c]),h=i.current;return V.useEffect(function(){h&&r.current&&r.current!==l&&bR(h,Fg(r.current,h.props),l),r.current=l},[l,t,h]),[l,u]}var na={itemToString:TR,stateReducer:vR,getA11ySelectionMessage:SR,scrollIntoView:fR,environment:typeof window>"u"?{}:window};function Vr(n,e,t){t===void 0&&(t=s_);var r=n["default"+S1(e)];return r!==void 0?r:t[e]}function Zc(n,e,t){t===void 0&&(t=s_);var r=n[e];if(r!==void 0)return r;var i=n["initial"+S1(e)];return i!==void 0?i:Vr(n,e,t)}function ER(n){var e=Zc(n,"selectedItem"),t=Zc(n,"isOpen"),r=Zc(n,"highlightedIndex"),i=Zc(n,"inputValue");return{highlightedIndex:r<0&&e&&t?n.items.indexOf(e):r,isOpen:t,selectedItem:e,inputValue:i}}function ra(n,e,t){var r=n.items,i=n.initialHighlightedIndex,s=n.defaultHighlightedIndex,o=e.selectedItem,l=e.highlightedIndex;return r.length===0?-1:i!==void 0&&l===i?i:s!==void 0?s:o?r.indexOf(o):t===0?-1:t<0?r.length-1:0}function QR(n,e,t,r){var i=V.useRef({isMouseDown:!1,isTouchMove:!1});return V.useEffect(function(){if(t?.addEventListener!=null){var s=function(){i.current.isMouseDown=!0},o=function(h){i.current.isMouseDown=!1,n&&!Zy(h.target,e.map(function(f){return f.current}),t)&&r()},l=function(){i.current.isTouchMove=!1},a=function(){i.current.isTouchMove=!0},c=function(h){n&&!i.current.isTouchMove&&!Zy(h.target,e.map(function(f){return f.current}),t,!1)&&r()};return t.addEventListener("mousedown",s),t.addEventListener("mouseup",o),t.addEventListener("touchstart",l),t.addEventListener("touchmove",a),t.addEventListener("touchend",c),function(){t.removeEventListener("mousedown",s),t.removeEventListener("mouseup",o),t.removeEventListener("touchstart",l),t.removeEventListener("touchmove",a),t.removeEventListener("touchend",c)}}},[n,t]),i}var $R=function(){return t_};function By(n,e,t){var r=t.isInitialMount,i=t.highlightedIndex,s=t.items,o=t.environment,l=Il(t,xR);V.useEffect(function(){r||wR(function(){return n(nt({highlightedIndex:i,highlightedItem:s[i],resultCount:s.length},l))},o.document)},e)}function AR(n){var e=n.highlightedIndex,t=n.isOpen,r=n.itemRefs,i=n.getItemNodeFromIndex,s=n.menuElement,o=n.scrollIntoView,l=V.useRef(!0);return kR(function(){e<0||!t||!Object.keys(r.current).length||(l.current===!1?l.current=!0:o(i(e),s))},[e]),l}var MR=t_;function Fy(n,e,t){var r;t===void 0&&(t=!0);var i=((r=n.items)==null?void 0:r.length)&&e>=0;return nt({isOpen:!1,highlightedIndex:-1},i&&nt({selectedItem:n.items[e],isOpen:Vr(n,"isOpen"),highlightedIndex:Vr(n,"highlightedIndex")},t&&{inputValue:n.itemToString(n.items[e])}))}function LR(n,e,t){var r=e.type,i=e.props,s;switch(r){case t.ItemMouseMove:s={highlightedIndex:e.disabled?-1:e.index};break;case t.MenuMouseLeave:s={highlightedIndex:-1};break;case t.ToggleButtonClick:case t.FunctionToggleMenu:s={isOpen:!n.isOpen,highlightedIndex:n.isOpen?-1:ra(i,n,0)};break;case t.FunctionOpenMenu:s={isOpen:!0,highlightedIndex:ra(i,n,0)};break;case t.FunctionCloseMenu:s={isOpen:!1};break;case t.FunctionSetHighlightedIndex:s={highlightedIndex:e.highlightedIndex};break;case t.FunctionSetInputValue:s={inputValue:e.inputValue};break;case t.FunctionReset:s={highlightedIndex:Vr(i,"highlightedIndex"),isOpen:Vr(i,"isOpen"),selectedItem:Vr(i,"selectedItem"),inputValue:Vr(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return nt({},n,s)}J.array.isRequired,J.func,J.func,J.func,J.number,J.number,J.number,J.bool,J.bool,J.bool,J.any,J.any,J.any,J.string,J.string,J.string,J.func,J.string,J.func,J.func,J.func,J.func,J.func,J.shape({addEventListener:J.func,removeEventListener:J.func,document:J.shape({getElementById:J.func,activeElement:J.any,body:J.any})});function RR(n){var e=n.isOpen,t=n.resultCount,r=n.previousResultCount;return e?t?t!==r?"".concat(t," result").concat(t===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}cx(cx({},na),{getA11yStatusMessage:RR});var w1=0,k1=1,C1=2,_1=3,T1=4,P1=5,E1=6,Q1=7,$1=8,kh=9,A1=10,l_=11,a_=12,M1=13,c_=14,u_=15,h_=16,f_=17,d_=18,L1=19,p_=20,g_=21,R1=22,m_=Object.freeze({__proto__:null,InputKeyDownArrowDown:w1,InputKeyDownArrowUp:k1,InputKeyDownEscape:C1,InputKeyDownHome:_1,InputKeyDownEnd:T1,InputKeyDownPageUp:P1,InputKeyDownPageDown:E1,InputKeyDownEnter:Q1,InputChange:$1,InputBlur:kh,InputFocus:A1,MenuMouseLeave:l_,ItemMouseMove:a_,ItemClick:M1,ToggleButtonClick:c_,FunctionToggleMenu:u_,FunctionOpenMenu:h_,FunctionCloseMenu:f_,FunctionSetHighlightedIndex:d_,FunctionSelectItem:L1,FunctionSetInputValue:p_,FunctionReset:g_,ControlledPropUpdatedSelectedItem:R1});function IR(n){var e=ER(n),t=e.selectedItem,r=e.inputValue;return r===""&&t&&n.defaultInputValue===void 0&&n.initialInputValue===void 0&&n.inputValue===void 0&&(r=n.itemToString(t)),nt({},e,{inputValue:r})}J.array.isRequired,J.func,J.func,J.func,J.func,J.number,J.number,J.number,J.bool,J.bool,J.bool,J.any,J.any,J.any,J.string,J.string,J.string,J.string,J.string,J.string,J.func,J.string,J.string,J.func,J.func,J.func,J.func,J.func,J.func,J.shape({addEventListener:J.func,removeEventListener:J.func,document:J.shape({getElementById:J.func,activeElement:J.any,body:J.any})});function DR(n,e,t){var r=V.useRef(),i=PR(n,e,t),s=i[0],o=i[1];return V.useEffect(function(){r_(t,"selectedItem")&&(t.selectedItemChanged(r.current,t.selectedItem)&&o({type:R1,inputValue:t.itemToString(t.selectedItem)}),r.current=s.selectedItem===r.current?t.selectedItem:s.selectedItem)},[s.selectedItem,t.selectedItem]),[Fg(s,t),o]}var NR=nt({},na,{selectedItemChanged:function(e,t){return e!==t},getA11yStatusMessage:pR});function VR(n,e){var t,r=e.type,i=e.props,s=e.altKey,o;switch(r){case M1:o={isOpen:Vr(i,"isOpen"),highlightedIndex:Vr(i,"highlightedIndex"),selectedItem:i.items[e.index],inputValue:i.itemToString(i.items[e.index])};break;case w1:n.isOpen?o={highlightedIndex:Vc(1,n.highlightedIndex,i.items.length,e.getItemNodeFromIndex,!0)}:o={highlightedIndex:s&&n.selectedItem==null?-1:ra(i,n,1,e.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case k1:n.isOpen?s?o=Fy(i,n.highlightedIndex):o={highlightedIndex:Vc(-1,n.highlightedIndex,i.items.length,e.getItemNodeFromIndex,!0)}:o={highlightedIndex:ra(i,n,-1,e.getItemNodeFromIndex),isOpen:i.items.length>=0};break;case Q1:o=Fy(i,n.highlightedIndex);break;case C1:o=nt({isOpen:!1,highlightedIndex:-1},!n.isOpen&&{selectedItem:null,inputValue:""});break;case P1:o={highlightedIndex:Vc(-10,n.highlightedIndex,i.items.length,e.getItemNodeFromIndex,!1)};break;case E1:o={highlightedIndex:Vc(10,n.highlightedIndex,i.items.length,e.getItemNodeFromIndex,!1)};break;case _1:o={highlightedIndex:Ta(1,0,i.items.length,e.getItemNodeFromIndex,!1)};break;case T1:o={highlightedIndex:Ta(-1,i.items.length-1,i.items.length,e.getItemNodeFromIndex,!1)};break;case kh:o=nt({isOpen:!1,highlightedIndex:-1},n.highlightedIndex>=0&&((t=i.items)==null?void 0:t.length)&&e.selectItem&&{selectedItem:i.items[n.highlightedIndex],inputValue:i.itemToString(i.items[n.highlightedIndex])});break;case $1:o={isOpen:!0,highlightedIndex:Vr(i,"highlightedIndex"),inputValue:e.inputValue};break;case A1:o={isOpen:!0,highlightedIndex:ra(i,n,0)};break;case L1:o={selectedItem:e.selectedItem,inputValue:i.itemToString(e.selectedItem)};break;case R1:o={inputValue:e.inputValue};break;default:return LR(n,e,m_)}return nt({},n,o)}var ZR=["onMouseLeave","refKey","ref"],BR=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],FR=["onClick","onPress","refKey","ref"],XR=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];O_.stateChangeTypes=m_;function O_(n){n===void 0&&(n={});var e=nt({},NR,n),t=e.initialIsOpen,r=e.defaultIsOpen,i=e.items,s=e.scrollIntoView,o=e.environment,l=e.getA11yStatusMessage,a=e.getA11ySelectionMessage,c=e.itemToString,u=IR(e),h=DR(VR,u,e),f=h[0],d=h[1],p=f.isOpen,g=f.highlightedIndex,m=f.selectedItem,x=f.inputValue,O=V.useRef(null),b=V.useRef({}),y=V.useRef(null),S=V.useRef(null),k=V.useRef(!0),w=CR(e),C=V.useRef(),T=o_({state:f,props:e}),$=V.useCallback(function(pe){return b.current[w.getItemId(pe)]},[w]);By(l,[p,g,x,i],nt({isInitialMount:k.current,previousResultCount:C.current,items:i,environment:o,itemToString:c},f)),By(a,[m],nt({isInitialMount:k.current,previousResultCount:C.current,items:i,environment:o,itemToString:c},f));var D=AR({menuElement:O.current,highlightedIndex:g,isOpen:p,itemRefs:b,scrollIntoView:s,getItemNodeFromIndex:$});MR({isInitialMount:k.current}),V.useEffect(function(){var pe=t||r||p;pe&&y.current&&y.current.focus()},[]),V.useEffect(function(){k.current||(C.current=i.length)});var M=QR(p,[y,O,S],o,function(){d({type:kh,selectItem:!1})}),Q=$R();V.useEffect(function(){return k.current=!1,function(){k.current=!0}},[]),V.useEffect(function(){var pe;if(!p)b.current={};else if(((pe=o.document)==null?void 0:pe.activeElement)!==y.current){var he;y==null||(he=y.current)==null||he.focus()}},[p,o]);var F=V.useMemo(function(){return{ArrowDown:function(he){he.preventDefault(),d({type:w1,altKey:he.altKey,getItemNodeFromIndex:$})},ArrowUp:function(he){he.preventDefault(),d({type:k1,altKey:he.altKey,getItemNodeFromIndex:$})},Home:function(he){T.current.state.isOpen&&(he.preventDefault(),d({type:_1,getItemNodeFromIndex:$}))},End:function(he){T.current.state.isOpen&&(he.preventDefault(),d({type:T1,getItemNodeFromIndex:$}))},Escape:function(he){var ge=T.current.state;(ge.isOpen||ge.inputValue||ge.selectedItem||ge.highlightedIndex>-1)&&(he.preventDefault(),d({type:C1}))},Enter:function(he){var ge=T.current.state;!ge.isOpen||he.which===229||(he.preventDefault(),d({type:Q1,getItemNodeFromIndex:$}))},PageUp:function(he){T.current.state.isOpen&&(he.preventDefault(),d({type:P1,getItemNodeFromIndex:$}))},PageDown:function(he){T.current.state.isOpen&&(he.preventDefault(),d({type:E1,getItemNodeFromIndex:$}))}}},[d,T,$]),j=V.useCallback(function(pe){return nt({id:w.labelId,htmlFor:w.inputId},pe)},[w]),fe=V.useCallback(function(pe,he){var ge,Se=pe===void 0?{}:pe,Fe=Se.onMouseLeave,It=Se.refKey,Pt=It===void 0?"ref":It,Vn=Se.ref,an=Il(Se,ZR),cn=he===void 0?{}:he;return cn.suppressRefError,nt((ge={},ge[Pt]=Nc(Vn,function(Zn){O.current=Zn}),ge.id=w.menuId,ge.role="listbox",ge["aria-labelledby"]=an&&an["aria-label"]?void 0:""+w.labelId,ge.onMouseLeave=si(Fe,function(){d({type:l_})}),ge),an)},[d,Q,w]),ee=V.useCallback(function(pe){var he,ge,Se=pe===void 0?{}:pe,Fe=Se.item,It=Se.index,Pt=Se.refKey,Vn=Pt===void 0?"ref":Pt,an=Se.ref,cn=Se.onMouseMove,Zn=Se.onMouseDown,Mi=Se.onClick;Se.onPress;var nr=Se.disabled,wr=Il(Se,BR),E=T.current,A=E.props,R=E.state,W=_R(Fe,It,A.items,"Pass either item or index to getItemProps!"),q=W[1],Y="onClick",te=Mi,P=function(){q!==R.highlightedIndex&&(D.current=!1,d({type:a_,index:q,disabled:nr}))},ke=function(){d({type:M1,index:q})},Ge=function(kr){return kr.preventDefault()};return nt((he={},he[Vn]=Nc(an,function(at){at&&(b.current[w.getItemId(q)]=at)}),he.disabled=nr,he.role="option",he["aria-selected"]=""+(q===R.highlightedIndex),he.id=w.getItemId(q),he),!nr&&(ge={},ge[Y]=si(te,ke),ge),{onMouseMove:si(cn,P),onMouseDown:si(Zn,Ge)},wr)},[d,T,D,w]),be=V.useCallback(function(pe){var he,ge=pe===void 0?{}:pe,Se=ge.onClick;ge.onPress;var Fe=ge.refKey,It=Fe===void 0?"ref":Fe,Pt=ge.ref,Vn=Il(ge,FR),an=T.current.state,cn=function(){d({type:c_})};return nt((he={},he[It]=Nc(Pt,function(Zn){S.current=Zn}),he["aria-controls"]=w.menuId,he["aria-expanded"]=an.isOpen,he.id=w.toggleButtonId,he.tabIndex=-1,he),!Vn.disabled&&nt({},{onClick:si(Se,cn)}),Vn)},[d,T,w]),xe=V.useCallback(function(pe,he){var ge,Se=pe===void 0?{}:pe,Fe=Se.onKeyDown,It=Se.onChange,Pt=Se.onInput,Vn=Se.onFocus,an=Se.onBlur;Se.onChangeText;var cn=Se.refKey,Zn=cn===void 0?"ref":cn,Mi=Se.ref,nr=Il(Se,XR),wr=he===void 0?{}:he;wr.suppressRefError;var E=T.current.state,A=function(Ge){var at=gR(Ge);at&&F[at]&&F[at](Ge)},R=function(Ge){d({type:$1,inputValue:Ge.target.value})},W=function(Ge){if(E.isOpen&&!M.current.isMouseDown){var at=Ge.relatedTarget===null&&o.document.activeElement!==o.document.body;d({type:kh,selectItem:!at})}},q=function(){E.isOpen||d({type:A1})},Y="onChange",te={};if(!nr.disabled){var P;te=(P={},P[Y]=si(It,Pt,R),P.onKeyDown=si(Fe,A),P.onBlur=si(an,W),P.onFocus=si(Vn,q),P)}return nt((ge={},ge[Zn]=Nc(Mi,function(ke){y.current=ke}),ge["aria-activedescendant"]=E.isOpen&&E.highlightedIndex>-1?w.getItemId(E.highlightedIndex):"",ge["aria-autocomplete"]="list",ge["aria-controls"]=w.menuId,ge["aria-expanded"]=E.isOpen,ge["aria-labelledby"]=nr&&nr["aria-label"]?void 0:""+w.labelId,ge.autoComplete="off",ge.id=w.inputId,ge.role="combobox",ge.value=E.inputValue,ge),te,nr)},[Q,T,w,F,d,M,o]),_e=V.useCallback(function(){d({type:u_})},[d]),Ze=V.useCallback(function(){d({type:f_})},[d]),Te=V.useCallback(function(){d({type:h_})},[d]),Be=V.useCallback(function(pe){d({type:d_,highlightedIndex:pe})},[d]),Re=V.useCallback(function(pe){d({type:L1,selectedItem:pe})},[d]),Le=V.useCallback(function(pe){d({type:p_,inputValue:pe})},[d]),$e=V.useCallback(function(){d({type:g_})},[d]);return{getItemProps:ee,getLabelProps:j,getMenuProps:fe,getInputProps:xe,getToggleButtonProps:be,toggleMenu:_e,openMenu:Te,closeMenu:Ze,setHighlightedIndex:Be,setInputValue:Le,selectItem:Re,reset:$e,highlightedIndex:g,isOpen:p,selectedItem:m,inputValue:x}}J.array,J.array,J.array,J.func,J.func,J.func,J.number,J.number,J.number,J.func,J.func,J.string,J.string,J.shape({addEventListener:J.func,removeEventListener:J.func,document:J.shape({getElementById:J.func,activeElement:J.any,body:J.any})});na.itemToString,na.stateReducer,na.environment;const Xy=20,zR=n=>n.suggestions.length>0?v.createElement(WR,{...n}):v.createElement("input",{className:se.textInput,size:40,autoFocus:!0,...n.register(n.inputName)}),WR=({autofocus:n,suggestions:e,control:t,inputName:r,placeholder:i,initialInputValue:s,setValue:o})=>{const[l,a]=v.useState(e.slice(0,Xy)),c=Lt(ln),u=e.length>0,{isOpen:h,getToggleButtonProps:f,getMenuProps:d,getInputProps:p,highlightedIndex:g,getItemProps:m,selectedItem:x}=O_({initialInputValue:s,onInputValueChange({inputValue:b=""}){o(r,b),b=b.toLowerCase()||"";const y=[];for(const S of e)if(S.toLowerCase().includes(b)&&(y.push(S),y.length>=Xy))break;a(y)},items:l,itemToString(b){return b??""}}),O=h&&l.length>0;return v.createElement("div",{className:se.downshiftAutocompleteContainer},v.createElement("div",{"data-visible-dropdown":O,className:se.downshiftInputWrapper},v.createElement(VL,{name:r,control:t,render:({field:b})=>{const y=p();return v.createElement("input",{...y,name:b.name,placeholder:i,className:se.downshiftInput,size:30,"data-editor-dialog":!0,autoFocus:n})}}),u&&v.createElement("button",{"aria-label":"toggle menu",type:"button",...f()},c("arrow_drop_down"))),v.createElement("div",{className:se.downshiftAutocompleteContainer},v.createElement("ul",{...d(),"data-visible":O},l.map((b,y)=>v.createElement("li",{"data-selected":x===b,"data-highlighted":g===y,key:`${b}${y}`,...m({item:b,index:y})},b)))))},jR={testNode:"blockquote",visitNode({actions:n}){n.addAndStepInto(ac())}},qR={testLexicalNode:bg,visitLexicalNode:({lexicalNode:n,mdastParent:e,actions:t})=>{const r={type:"paragraph",children:[]};t.appendToParent(e,{type:"blockquote",children:[r]}),t.visitChildren(n,r)}},YR=Rn({init(n){n.pubIn({[sl]:"quote",[Si]:jR,[is]:Af,[ss]:qR})}});function zy(){let n=ji;return{publish:()=>{n()},subscribe:e=>{n=e}}}var HR=Object.defineProperty,UR=(n,e,t)=>e in n?HR(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ri=(n,e,t)=>(UR(n,typeof e!="symbol"?e+"":e,t),t);class al extends Jo{constructor(e,t,r,i){super(i),Ri(this,"__code"),Ri(this,"__meta"),Ri(this,"__language"),Ri(this,"__focusEmitter",zy()),Ri(this,"setCode",s=>{s!==this.__code&&(this.getWritable().__code=s)}),Ri(this,"setMeta",s=>{s!==this.__meta&&(this.getWritable().__meta=s)}),Ri(this,"setLanguage",s=>{s!==this.__language&&(this.getWritable().__language=s)}),Ri(this,"select",()=>{this.__focusEmitter.publish()}),this.__code=e,this.__meta=r,this.__language=t}static getType(){return"codeblock"}static clone(e){return new al(e.__code,e.__language,e.__meta,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__code=e.__code,this.__meta=e.__meta,this.__language=e.__language,this.__focusEmitter=zy()}static importJSON(e){const{code:t,meta:r,language:i}=e;return gc({code:t,language:i,meta:r})}static importDOM(){return{pre:()=>({conversion:eI,priority:3})}}exportJSON(){return{code:this.getCode(),language:this.getLanguage(),meta:this.getMeta(),type:"codeblock",version:1}}createDOM(e,t){return document.createElement("div")}updateDOM(){return!1}getCode(){return this.__code}getMeta(){return this.__meta}getLanguage(){return this.__language}decorate(e){return v.createElement(KR,{parentEditor:e,code:this.getCode(),meta:this.getMeta(),language:this.getLanguage(),codeBlockNode:this,nodeKey:this.getKey(),focusEmitter:this.__focusEmitter})}isInline(){return!1}}const x_=v.createContext(null),GR=({parentEditor:n,lexicalNode:e,children:t})=>{const r=v.useMemo(()=>({lexicalNode:e,parentEditor:n,setCode:i=>{n.update(()=>{e.setCode(i),setTimeout(()=>{n.dispatchCommand(Sa,void 0)},0)})},setLanguage:i=>{n.update(()=>{e.setLanguage(i)})},setMeta:i=>{n.update(()=>{e.setMeta(i)})}}),[e,n]);return v.createElement(x_.Provider,{value:r},t)};function Xg(){const n=v.useContext(x_);if(!n)throw new Error("useCodeBlockEditor must be used within a CodeBlockEditor");return n}const KR=n=>{const e=Lt(hc),t=Lt(I1);let r=e.sort((a,c)=>c.priority-a.priority).find(a=>a.match(n.language||"",n.meta||""));if(r??(r=e.find(a=>a.match(t||"",n.meta||""))),!r)throw new Error(`No CodeBlockEditor registered for language=${n.language} meta=${n.meta}`);const i=r.Editor,{codeBlockNode:s,parentEditor:o,...l}=n;return v.createElement(GR,{parentEditor:n.parentEditor,lexicalNode:n.codeBlockNode},v.createElement(i,{...l}))};function gc(n){const{code:e="",language:t="",meta:r=""}=n;return new al(e,t,r)}function JR(n){return n instanceof al}function eI(n){const e=n,t=e.textContent,r=n.getAttribute("class")??"",i=n.getAttribute("data-language")??"",s=/language-(\w+)/.exec(r),o=s?s[1]:i,l=e.getAttribute("data-meta")??"";return{node:gc({code:t,language:o,meta:l})}}const tI={testLexicalNode:JR,visitLexicalNode:({lexicalNode:n,actions:e})=>{e.addAndStepInto("code",{value:n.getCode(),lang:n.getLanguage(),meta:n.getMeta()})}},nI={testNode:(n,{codeBlockEditorDescriptors:e})=>n.type==="code"?e.find(r=>r.match(n.lang,n.meta))!==void 0:!1,visitNode({mdastNode:n,actions:e}){e.addAndStepInto(gc({code:n.value,language:n.lang,meta:n.meta}))}},I1=ue(""),b_=zt(n=>{n.link(n.pipe(b_,xt(I1),Es(([e,t])=>()=>gc({language:t,...e}))),e1)}),rI=Ut(hc),iI=Rn({update(n,e){n.pub(I1,e?.defaultCodeBlockLanguage??"")},init(n,e){n.pubIn({[sl]:"codeblock",[hc]:e?.codeBlockEditorDescriptors??[],[Si]:nI,[is]:al,[ss]:tI})}});let zg=[],y_=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,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3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?y_:zg).push(t=t+n[e])})();function sI(n){if(n<768)return!1;for(let e=0,t=zg.length;;){let r=e+t>>1;if(n<zg[r])t=r;else if(n>=y_[r])e=r+1;else return!0;if(e==t)return!1}}function Wy(n){return n>=127462&&n<=127487}const jy=8205;function oI(n,e,t=!0,r=!0){return(t?v_:lI)(n,e,r)}function v_(n,e,t){if(e==n.length)return e;e&&S_(n.charCodeAt(e))&&w_(n.charCodeAt(e-1))&&e--;let r=Zd(n,e);for(e+=qy(r);e<n.length;){let i=Zd(n,e);if(r==jy||i==jy||t&&sI(i))e+=qy(i),r=i;else if(Wy(i)){let s=0,o=e-2;for(;o>=0&&Wy(Zd(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function lI(n,e,t){for(;e>0;){let r=v_(n,e-2,t);if(r<e)return r;e--}return 0}function Zd(n,e){let t=n.charCodeAt(e);if(!w_(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return S_(r)?(t-55296<<10)+(r-56320)+65536:t}function S_(n){return n>=56320&&n<57344}function w_(n){return n>=55296&&n<56320}function qy(n){return n<65536?1:2}let De=class k_{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Io(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),Mr.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Io(this,e,t);let r=[];return this.decompose(e,t,r,0),Mr.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new ia(this),s=new ia(e);for(let o=t,l=t;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(l+=i.value.length,i.done||l>=r)return!0}}iter(e=1){return new ia(this,e)}iterRange(e,t=this.length){return new C_(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new __(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?k_.empty:e.length<=32?new ct(e):Mr.from(ct.split(e,[]))}};class ct extends De{constructor(e,t=aI(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let s=0;;s++){let o=this.text[s],l=i+o.length;if((t?r:l)>=e)return new cI(i,l,r,o);i=l+1,r++}}decompose(e,t,r,i){let s=e<=0&&t>=this.length?this:new ct(Yy(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),l=Mu(s.text,o.text.slice(),0,s.length);if(l.length<=32)r.push(new ct(l,o.length+s.length));else{let a=l.length>>1;r.push(new ct(l.slice(0,a)),new ct(l.slice(a)))}}else r.push(s)}replace(e,t,r){if(!(r instanceof ct))return super.replace(e,t,r);[e,t]=Io(this,e,t);let i=Mu(this.text,Mu(r.text,Yy(this.text,0,e)),t),s=this.length+r.length-(t-e);return i.length<=32?new ct(i,s):Mr.from(ct.split(i,[]),s)}sliceString(e,t=this.length,r=`
65
+ `){[e,t]=Io(this,e,t);let i="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let l=this.text[o],a=s+l.length;s>e&&o&&(i+=r),e<a&&t>s&&(i+=l.slice(Math.max(0,e-s),t-s)),s=a+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(t.push(new ct(r,i)),r=[],i=-1);return i>-1&&t.push(new ct(r,i)),t}}class Mr extends De{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let s=0;;s++){let o=this.children[s],l=i+o.length,a=r+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,r,i);i=l+1,r=a+1}}decompose(e,t,r,i){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let l=this.children[s],a=o+l.length;if(e<=a&&t>=o){let c=i&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!c?r.push(l):l.decompose(e-o,t-o,r,c)}o=a+1}}replace(e,t,r){if([e,t]=Io(this,e,t),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],l=s+o.length;if(e>=s&&t<=l){let a=o.replace(e-s,t-s,r),c=this.lines-o.lines+a.lines;if(a.lines<c>>4&&a.lines>c>>6){let u=this.children.slice();return u[i]=a,new Mr(u,this.length-(t-e)+r.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=`
66
+ `){[e,t]=Io(this,e,t);let i="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let l=this.children[s],a=o+l.length;o>e&&s&&(i+=r),e<a&&t>o&&(i+=l.sliceString(e-o,t-o,r)),o=a+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Mr))return 0;let r=0,[i,s,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,s+=t){if(i==o||s==l)return r;let a=this.children[i],c=e.children[s];if(a!=c)return r+a.scanIdentical(c,t);r+=a.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let d of e)r+=d.lines;if(r<32){let d=[];for(let p of e)p.flatten(d);return new ct(d,t)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,l=[],a=0,c=-1,u=[];function h(d){let p;if(d.lines>s&&d instanceof Mr)for(let g of d.children)h(g);else d.lines>o&&(a>o||!a)?(f(),l.push(d)):d instanceof ct&&a&&(p=u[u.length-1])instanceof ct&&d.lines+p.lines<=32?(a+=d.lines,c+=d.length+1,u[u.length-1]=new ct(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>i&&f(),a+=d.lines,c+=d.length+1,u.push(d))}function f(){a!=0&&(l.push(u.length==1?u[0]:Mr.from(u,c)),c=-1,a=u.length=0)}for(let d of e)h(d);return f(),l.length==1?l[0]:new Mr(l,t)}}De.empty=new ct([""],0);function aI(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Mu(n,e,t=0,r=1e9){for(let i=0,s=0,o=!0;s<n.length&&i<=r;s++){let l=n[s],a=i+l.length;a>=t&&(a>r&&(l=l.slice(0,r-i)),i<t&&(l=l.slice(t-i)),o?(e[e.length-1]+=l,o=!1):e.push(l)),i=a+1}return e}function Yy(n,e,t){return Mu(n,[""],e,t)}class ia{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof ct?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,l=i instanceof ct?i.text.length:i.children.length;if(o==(t>0?l:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=`
67
+ `,this;e--}else if(i instanceof ct){let a=i.text[o+(t<0?-1:0)];if(this.offsets[r]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=i.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof ct?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class C_{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new ia(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class __{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(De.prototype[Symbol.iterator]=function(){return this.iter()},ia.prototype[Symbol.iterator]=C_.prototype[Symbol.iterator]=__.prototype[Symbol.iterator]=function(){return this});let cI=class{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}};function Io(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function Mt(n,e,t=!0,r=!0){return oI(n,e,t,r)}function uI(n){return n>=56320&&n<57344}function hI(n){return n>=55296&&n<56320}function pn(n,e){let t=n.charCodeAt(e);if(!hI(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return uI(r)?(t-55296<<10)+(r-56320)+65536:t}function D1(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Lr(n){return n<65536?1:2}const Wg=/\r\n?|\n/;var Ft=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(Ft||(Ft={}));class jr{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t+1];e+=r<0?this.sections[t]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,r=0,i=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,t=!1){jg(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];i<0?e.push(r,i):e.push(i,r)}return new jr(e)}composeDesc(e){return this.empty?e:e.empty?this:T_(this,e)}mapDesc(e,t=!1){return e.empty?this:qg(this,e,t)}mapPos(e,t=-1,r=Ft.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],c=i+l;if(a<0){if(c>e)return s+(e-i);s+=l}else{if(r!=Ft.Simple&&c>=e&&(r==Ft.TrackDel&&i<e&&c>e||r==Ft.TrackBefore&&i<e||r==Ft.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!l)return e==i||t<0?s:s+a;s+=a}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,t=e){for(let r=0,i=0;r<this.sections.length&&i<=t;){let s=this.sections[r++],o=this.sections[r++],l=i+s;if(o>=0&&i<=t&&l>=e)return i<e&&l>t?"cover":!0;i=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new jr(e)}static create(e){return new jr(e)}}class mt extends jr{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return jg(this,(t,r,i,s,o)=>e=e.replace(i,i+(r-t),o),!1),e}mapDesc(e,t=!1){return qg(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,s=0;i<t.length;i+=2){let o=t[i],l=t[i+1];if(l>=0){t[i]=l,t[i+1]=o;let a=i>>1;for(;r.length<a;)r.push(De.empty);r.push(o?e.slice(s,s+o):De.empty)}s+=o}return new mt(t,r)}compose(e){return this.empty?e:e.empty?this:T_(this,e,!0)}map(e,t=!1){return e.empty?this:qg(this,e,t,!0)}iterChanges(e,t=!1){jg(this,e,t)}get desc(){return jr.create(this.sections)}filter(e){let t=[],r=[],i=[],s=new Pa(this);e:for(let o=0,l=0;;){let a=o==e.length?1e9:e[o++];for(;l<a||l==a&&s.len==0;){if(s.done)break e;let u=Math.min(s.len,a-l);jt(i,u,-1);let h=s.ins==-1?-1:s.off==0?s.ins:0;jt(t,u,h),h>0&&zi(r,t,s.text),s.forward(u),l+=u}let c=e[o++];for(;l<c;){if(s.done)break e;let u=Math.min(s.len,c-l);jt(t,u,-1),jt(i,u,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(u),l+=u}}return{changes:new mt(t,r),filtered:jr.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t],i=this.sections[t+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,r){let i=[],s=[],o=0,l=null;function a(u=!1){if(!u&&!i.length)return;o<t&&jt(i,t-o,-1);let h=new mt(i,s);l=l?l.compose(h.map(l)):h,i=[],s=[],o=0}function c(u){if(Array.isArray(u))for(let h of u)c(h);else if(u instanceof mt){if(u.length!=t)throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${t})`);a(),l=l?l.compose(u.map(l)):u}else{let{from:h,to:f=h,insert:d}=u;if(h>f||h<0||f>t)throw new RangeError(`Invalid change range ${h} to ${f} (in doc of length ${t})`);let p=d?typeof d=="string"?De.of(d.split(r||Wg)):d:De.empty,g=p.length;if(h==f&&g==0)return;h<o&&a(),h>o&&jt(i,h-o,-1),jt(i,f-h,g),zi(s,i,p),o=f}}return c(e),a(!l),l}static empty(e){return new mt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;r.length<i;)r.push(De.empty);r[i]=De.of(s.slice(1)),t.push(s[0],r[i].length)}}}return new mt(t,r)}static createSet(e,t){return new mt(e,t)}}function jt(n,e,t,r=!1){if(e==0&&t<=0)return;let i=n.length-2;i>=0&&t<=0&&t==n[i+1]?n[i]+=e:i>=0&&e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function zi(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<r;)n.push(De.empty);n.push(t)}}function jg(n,e,t){let r=n.inserted;for(let i=0,s=0,o=0;o<n.sections.length;){let l=n.sections[o++],a=n.sections[o++];if(a<0)i+=l,s+=l;else{let c=i,u=s,h=De.empty;for(;c+=l,u+=a,a&&r&&(h=h.append(r[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(i,c,s,u,h),i=c,s=u}}}function qg(n,e,t,r=!1){let i=[],s=r?[]:null,o=new Pa(n),l=new Pa(e);for(let a=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let c=Math.min(o.len,l.len);jt(i,c,-1),o.forward(c),l.forward(c)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!t))){let c=l.len;for(jt(i,l.ins,-1);c;){let u=Math.min(o.len,c);o.ins>=0&&a<o.i&&o.len<=u&&(jt(i,0,o.ins),s&&zi(s,i,o.text),a=o.i),o.forward(u),c-=u}l.next()}else if(o.ins>=0){let c=0,u=o.len;for(;u;)if(l.ins==-1){let h=Math.min(u,l.len);c+=h,u-=h,l.forward(h)}else if(l.ins==0&&l.len<u)u-=l.len,l.next();else break;jt(i,c,a<o.i?o.ins:0),s&&a<o.i&&zi(s,i,o.text),a=o.i,o.forward(o.len-u)}else{if(o.done&&l.done)return s?mt.createSet(i,s):jr.create(i);throw new Error("Mismatched change set lengths")}}}function T_(n,e,t=!1){let r=[],i=t?[]:null,s=new Pa(n),o=new Pa(e);for(let l=!1;;){if(s.done&&o.done)return i?mt.createSet(r,i):jr.create(r);if(s.ins==0)jt(r,s.len,0,l),s.next();else if(o.len==0&&!o.done)jt(r,0,o.ins,l),i&&zi(i,r,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(s.len2,o.len),c=r.length;if(s.ins==-1){let u=o.ins==-1?-1:o.off?0:o.ins;jt(r,a,u,l),i&&u&&zi(i,r,o.text)}else o.ins==-1?(jt(r,s.off?0:s.len,a,l),i&&zi(i,r,s.textBit(a))):(jt(r,s.off?0:s.len,o.off?0:o.ins,l),i&&!o.off&&zi(i,r,o.text));l=(s.ins>a||o.ins>=0&&o.len>a)&&(l||r.length>c),s.forward2(a),o.forward(a)}}}}class Pa{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?De.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?De.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class bs{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new bs(r,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return Z.range(e,t);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Z.range(this.anchor,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Z.range(e.anchor,e.head)}static create(e,t,r){return new bs(e,t,r)}}class Z{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:Z.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Z([this.main],0)}addRange(e,t=!0){return Z.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let r=this.ranges.slice();return r[t]=e,Z.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Z(e.ranges.map(t=>bs.fromJSON(t)),e.main)}static single(e,t=e){return new Z([Z.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=r:s.from<r)return Z.normalized(e.slice(),t);r=s.to}return new Z(e,t)}static cursor(e,t=0,r,i){return bs.create(e,e,(t==0?0:t<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,t,r,i){let s=(r??16777215)<<6|(i==null?7:Math.min(6,i));return t<e?bs.create(t,e,48|s):bs.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let r=e[t];e.sort((i,s)=>i.from-s.from),t=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,a=Math.max(s.to,o.to);i<=t&&t--,e.splice(--i,2,s.anchor>s.head?Z.range(a,l):Z.range(l,a))}}return new Z(e,t)}}function P_(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let N1=0;class ie{constructor(e,t,r,i,s){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=N1++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new ie(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:V1),!!e.static,e.enables)}of(e){return new Lu([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Lu(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Lu(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function V1(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class Lu{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=N1++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,a=!1,c=!1,u=[];for(let h of this.dependencies)h=="doc"?a=!0:h=="selection"?c=!0:(((t=e[h.id])!==null&&t!==void 0?t:1)&1)==0&&u.push(e[h.id]);return{create(h){return h.values[o]=r(h),1},update(h,f){if(a&&f.docChanged||c&&(f.docChanged||f.selection)||Yg(h,u)){let d=r(h);if(l?!Hy(d,h.values[o],i):!i(d,h.values[o]))return h.values[o]=d,1}return 0},reconfigure:(h,f)=>{let d,p=f.config.address[s];if(p!=null){let g=_h(f,p);if(this.dependencies.every(m=>m instanceof ie?f.facet(m)===h.facet(m):m instanceof dt?f.field(m,!1)==h.field(m,!1):!0)||(l?Hy(d=r(h),g,i):i(d=r(h),g)))return h.values[o]=g,0}else d=r(h);return h.values[o]=d,1}}}}function Hy(n,e,t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!t(n[r],e[r]))return!1;return!0}function Yg(n,e){let t=!1;for(let r of e)sa(n,r)&1&&(t=!0);return t}function fI(n,e,t){let r=t.map(a=>n[a.id]),i=t.map(a=>a.type),s=r.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let c=[];for(let u=0;u<r.length;u++){let h=_h(a,r[u]);if(i[u]==2)for(let f of h)c.push(f);else c.push(h)}return e.combine(c)}return{create(a){for(let c of r)sa(a,c);return a.values[o]=l(a),1},update(a,c){if(!Yg(a,s))return 0;let u=l(a);return e.compare(u,a.values[o])?0:(a.values[o]=u,1)},reconfigure(a,c){let u=Yg(a,r),h=c.config.facets[e.id],f=c.facet(e);if(h&&!u&&V1(t,h))return a.values[o]=f,0;let d=l(a);return e.compare(d,f)?(a.values[o]=f,0):(a.values[o]=d,1)}}}const Bc=ie.define({static:!0});class dt{constructor(e,t,r,i,s){this.id=e,this.createF=t,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let t=new dt(N1++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Bc).find(r=>r.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let s=r.values[t],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[t]=o,1)},reconfigure:(r,i)=>{let s=r.facet(Bc),o=i.facet(Bc),l;return(l=s.find(a=>a.field==this))&&l!=o.find(a=>a.field==this)?(r.values[t]=l.create(r),1):i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}}init(e){return[this,Bc.of({field:this,create:e})]}get extension(){return this}}const gs={lowest:4,low:3,default:2,high:1,highest:0};function kl(n){return e=>new E_(e,n)}const yr={highest:kl(gs.highest),high:kl(gs.high),default:kl(gs.default),low:kl(gs.low),lowest:kl(gs.lowest)};class E_{constructor(e,t){this.inner=e,this.prec=t}}class cl{of(e){return new Hg(this,e)}reconfigure(e){return cl.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Hg{constructor(e,t){this.compartment=e,this.inner=t}}class Ch{constructor(e,t,r,i,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,r){let i=[],s=Object.create(null),o=new Map;for(let f of dI(e,t,o))f instanceof dt?i.push(f):(s[f.facet.id]||(s[f.facet.id]=[])).push(f);let l=Object.create(null),a=[],c=[];for(let f of i)l[f.id]=c.length<<1,c.push(d=>f.slot(d));let u=r?.config.facets;for(let f in s){let d=s[f],p=d[0].facet,g=u&&u[f]||[];if(d.every(m=>m.type==0))if(l[p.id]=a.length<<1|1,V1(g,d))a.push(r.facet(p));else{let m=p.combine(d.map(x=>x.value));a.push(r&&p.compare(m,r.facet(p))?r.facet(p):m)}else{for(let m of d)m.type==0?(l[m.id]=a.length<<1|1,a.push(m.value)):(l[m.id]=c.length<<1,c.push(x=>m.dynamicSlot(x)));l[p.id]=c.length<<1,c.push(m=>fI(m,p,d))}}let h=c.map(f=>f(l));return new Ch(e,o,h,l,a,s)}}function dI(n,e,t){let r=[[],[],[],[],[]],i=new Map;function s(o,l){let a=i.get(o);if(a!=null){if(a<=l)return;let c=r[a].indexOf(o);c>-1&&r[a].splice(c,1),o instanceof Hg&&t.delete(o.compartment)}if(i.set(o,l),Array.isArray(o))for(let c of o)s(c,l);else if(o instanceof Hg){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;t.set(o.compartment,c),s(c,l)}else if(o instanceof E_)s(o.inner,o.prec);else if(o instanceof dt)r[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof Lu)r[l].push(o),o.facet.extensions&&s(o.facet.extensions,gs.default);else{let c=o.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(c,l)}}return s(n,gs.default),r.reduce((o,l)=>o.concat(l))}function sa(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function _h(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const Q_=ie.define(),Ug=ie.define({combine:n=>n.some(e=>e),static:!0}),$_=ie.define({combine:n=>n.length?n[0]:void 0,static:!0}),A_=ie.define(),M_=ie.define(),L_=ie.define(),R_=ie.define({combine:n=>n.length?n[0]:!1});class Ai{constructor(e,t){this.type=e,this.value=t}static define(){return new pI}}class pI{of(e){return new Ai(this,e)}}class gI{constructor(e){this.map=e}of(e){return new ye(this,e)}}class ye{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new ye(this.type,t)}is(e){return this.type==e}static define(e={}){return new gI(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(t);s&&r.push(s)}return r}}ye.reconfigure=ye.define();ye.appendConfig=ye.define();class yt{constructor(e,t,r,i,s,o){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&P_(r,t.newLength),s.some(l=>l.type==yt.time)||(this.annotations=s.concat(yt.time.of(Date.now())))}static create(e,t,r,i,s,o){return new yt(e,t,r,i,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(yt.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}yt.time=Ai.define();yt.userEvent=Ai.define();yt.addToHistory=Ai.define();yt.remote=Ai.define();function mI(n,e){let t=[];for(let r=0,i=0;;){let s,o;if(r<n.length&&(i==e.length||e[i]>=n[r]))s=n[r++],o=n[r++];else if(i<e.length)s=e[i++],o=e[i++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function I_(n,e,t){var r;let i,s,o;return t?(i=e.changes,s=mt.empty(e.changes.length),o=n.changes.compose(e.changes)):(i=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=n.selection)===null||r===void 0?void 0:r.map(i),effects:ye.mapEffects(n.effects,i).concat(ye.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function Gg(n,e,t){let r=e.selection,i=bo(e.annotations);return e.userEvent&&(i=i.concat(yt.userEvent.of(e.userEvent))),{changes:e.changes instanceof mt?e.changes:mt.of(e.changes||[],t,n.facet($_)),selection:r&&(r instanceof Z?r:Z.single(r.anchor,r.head)),effects:bo(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function D_(n,e,t){let r=Gg(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;r=I_(r,Gg(n,e[s],o?r.changes.newLength:n.doc.length),o)}let i=yt.create(n,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return xI(t?OI(i):i)}function OI(n){let e=n.startState,t=!0;for(let i of e.facet(A_)){let s=i(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:mI(t,s))}if(t!==!0){let i,s;if(t===!1)s=n.changes.invertedDesc,i=mt.empty(e.doc.length);else{let o=n.changes.filter(t);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}n=yt.create(e,i,n.selection&&n.selection.map(s),ye.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let r=e.facet(M_);for(let i=r.length-1;i>=0;i--){let s=r[i](n);s instanceof yt?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof yt?n=s[0]:n=D_(e,bo(s),!1)}return n}function xI(n){let e=n.startState,t=e.facet(L_),r=n;for(let i=t.length-1;i>=0;i--){let s=t[i](n);s&&Object.keys(s).length&&(r=I_(r,Gg(e,s,n.changes.newLength),!0))}return r==n?n:yt.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const bI=[];function bo(n){return n==null?bI:Array.isArray(n)?n:[n]}var it=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(it||(it={}));const yI=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Kg;try{Kg=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function vI(n){if(Kg)return Kg.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||yI.test(t)))return!0}return!1}function SI(n){return e=>{if(!/\S/.test(e))return it.Space;if(vI(e))return it.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return it.Word;return it.Other}}class Ce{constructor(e,t,r,i,s,o){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)sa(this,l<<1);this.computeSlot=null}field(e,t=!0){let r=this.config.address[e.id];if(r==null){if(t)throw new RangeError("Field is not present in this state");return}return sa(this,r),_h(this,r)}update(...e){return D_(this,e,!0)}applyTransaction(e){let t=this.config,{base:r,compartments:i}=t;for(let l of e.effects)l.is(cl.reconfigure)?(t&&(i=new Map,t.compartments.forEach((a,c)=>i.set(c,a)),t=null),i.set(l.value.compartment,l.value.extension)):l.is(ye.reconfigure)?(t=null,r=l.value):l.is(ye.appendConfig)&&(t=null,r=bo(r).concat(l.value));let s;t?s=e.startState.values.slice():(t=Ch.resolve(r,i,this),s=new Ce(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,c)=>c.reconfigure(a,this),null).values);let o=e.startState.facet(Ug)?e.newSelection:e.newSelection.asSingle();new Ce(t,e.newDoc,o,s,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:Z.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),s=[r.range],o=bo(r.effects);for(let l=1;l<t.ranges.length;l++){let a=e(t.ranges[l]),c=this.changes(a.changes),u=c.map(i);for(let f=0;f<l;f++)s[f]=s[f].map(u);let h=i.mapDesc(c,!0);s.push(a.range.map(h)),i=i.compose(u),o=ye.mapEffects(o,u).concat(ye.mapEffects(bo(a.effects),h))}return{changes:i,selection:Z.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof mt?e:mt.of(e,this.doc.length,this.facet(Ce.lineSeparator))}toText(e){return De.of(e.split(this.facet(Ce.lineSeparator)||Wg))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(sa(this,t),_h(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof dt&&this.config.address[i.id]!=null&&(t[r]=i.spec.toJSON(this.field(e[r]),this))}return t}static fromJSON(e,t={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let o=r[s],l=e[s];i.push(o.init(a=>o.spec.fromJSON(l,a)))}}return Ce.create({doc:e.doc,selection:Z.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=Ch.resolve(e.extensions||[],new Map),r=e.doc instanceof De?e.doc:De.of((e.doc||"").split(t.staticFacet(Ce.lineSeparator)||Wg)),i=e.selection?e.selection instanceof Z?e.selection:Z.single(e.selection.anchor,e.selection.head):Z.single(0);return P_(i,r.length),t.staticFacet(Ug)||(i=i.asSingle()),new Ce(t,r,i,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(Ce.tabSize)}get lineBreak(){return this.facet(Ce.lineSeparator)||`
68
+ `}get readOnly(){return this.facet(R_)}phrase(e,...t){for(let r of this.facet(Ce.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>t.length?r:t[s-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let s of this.facet(Q_))for(let o of s(this,t,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return SI(t.length?t[0]:"")}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,l=e-r;for(;o>0;){let a=Mt(t,o,!1);if(s(t.slice(a,o))!=it.Word)break;o=a}for(;l<i;){let a=Mt(t,l);if(s(t.slice(l,a))!=it.Word)break;l=a}return o==l?null:Z.range(o+r,l+r)}}Ce.allowMultipleSelections=Ug;Ce.tabSize=ie.define({combine:n=>n.length?n[0]:4});Ce.lineSeparator=$_;Ce.readOnly=R_;Ce.phrases=ie.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});Ce.languageData=Q_;Ce.changeFilter=A_;Ce.transactionFilter=M_;Ce.transactionExtender=L_;cl.reconfigure=ye.define();function ei(n,e,t={}){let r={};for(let i of n)for(let s of Object.keys(i)){let o=i[s],l=r[s];if(l===void 0)r[s]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,s))r[s]=t[s](l,o);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Ui{eq(e){return this==e}range(e,t=e){return Jg.create(e,t,this)}}Ui.prototype.startSide=Ui.prototype.endSide=0;Ui.prototype.point=!1;Ui.prototype.mapMode=Ft.TrackDel;function Z1(n,e){return n==e||n.constructor==e.constructor&&n.eq(e)}let Jg=class N_{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new N_(e,t,r)}};function em(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}let wI=class V_{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let s=r?this.to:this.from;for(let o=i,l=s.length;;){if(o==l)return o;let a=o+l>>1,c=s[a]-e||(r?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return c>=0?o:l;c>=0?l=a:o=a+1}}between(e,t,r,i){for(let s=this.findIndex(t,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let r=[],i=[],s=[],o=-1,l=-1;for(let a=0;a<this.value.length;a++){let c=this.value[a],u=this.from[a]+e,h=this.to[a]+e,f,d;if(u==h){let p=t.mapPos(u,c.startSide,c.mapMode);if(p==null||(f=d=p,c.startSide!=c.endSide&&(d=t.mapPos(u,c.endSide),d<f)))continue}else if(f=t.mapPos(u,c.startSide),d=t.mapPos(h,c.endSide),f>d||f==d&&c.startSide>0&&c.endSide<=0)continue;(d-f||c.endSide-c.startSide)<0||(o<0&&(o=f),c.point&&(l=Math.max(l,d-f)),r.push(c),i.push(f-o),s.push(d-o))}return{mapped:r.length?new V_(i,s,r,l):null,pos:o}}};class Ee{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new Ee(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(r&&(t=t.slice().sort(em)),this.isEmpty)return t.length?Ee.of(t):this;let l=new Z_(this,null,-1).goto(0),a=0,c=[],u=new vn;for(;l.value||a<t.length;)if(a<t.length&&(l.from-t[a].from||l.startSide-t[a].value.startSide)>=0){let h=t[a++];u.addInner(h.from,h.to,h.value)||c.push(h)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(l.chunkIndex)<t[a].from)&&(!o||i>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&u.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||i>l.to||s<l.from||o(l.from,l.to,l.value))&&(u.addInner(l.from,l.to,l.value)||c.push(Jg.create(l.from,l.to,l.value))),l.next());return u.finishInner(this.nextLayer.isEmpty&&!c.length?Ee.empty:this.nextLayer.update({add:c,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],a=this.chunk[o],c=e.touchesRange(l,l+a.length);if(c===!1)i=Math.max(i,a.maxPoint),t.push(a),r.push(e.mapPos(l));else if(c===!0){let{mapped:u,pos:h}=a.map(l,e);u&&(i=Math.max(i,u.maxPoint),t.push(u),r.push(h))}}let s=this.nextLayer.map(e);return t.length==0?s:new Ee(r,t,s||Ee.empty,i)}between(e,t,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(t>=s&&e<=s+o.length&&o.between(s,e-s,t-s,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Ea.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Ea.from(e).goto(t)}static compare(e,t,r,i,s=-1){let o=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=s),l=t.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=s),a=Uy(o,l,r),c=new Cl(o,a,s),u=new Cl(l,a,s);r.iterGaps((h,f,d)=>Gy(c,h,u,f,d,i)),r.empty&&r.length==0&&Gy(c,0,u,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=999999999);let s=e.filter(u=>!u.isEmpty&&t.indexOf(u)<0),o=t.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let l=Uy(s,o),a=new Cl(s,l,0).goto(r),c=new Cl(o,l,0).goto(r);for(;;){if(a.to!=c.to||!tm(a.active,c.active)||a.point&&(!c.point||!Z1(a.point,c.point)))return!1;if(a.to>i)return!0;a.next(),c.next()}}static spans(e,t,r,i,s=-1){let o=new Cl(e,null,s).goto(t),l=t,a=o.openStart;for(;;){let c=Math.min(o.to,r);if(o.point){let u=o.activeForPoint(o.to),h=o.pointFrom<t?u.length+1:o.point.startSide<0?u.length:Math.min(u.length,a);i.point(l,c,o.point,u,h,o.pointRank),a=Math.min(o.openEnd(c),u.length)}else c>l&&(i.span(l,c,o.active,a),a=o.openEnd(c));if(o.to>r)return a+(o.point&&o.to>r?1:0);l=o.to,o.next()}}static of(e,t=!1){let r=new vn;for(let i of e instanceof Jg?[e]:t?kI(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Ee.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Ee.empty;i=i.nextLayer)t=new Ee(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}Ee.empty=new Ee([],[],null,-1);function kI(n){if(n.length>1)for(let e=n[0],t=1;t<n.length;t++){let r=n[t];if(em(e,r)>0)return n.slice().sort(em);e=r}return n}Ee.empty.nextLayer=Ee.empty;class vn{finishChunk(e){this.chunks.push(new wI(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new vn)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(Ee.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Ee.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Uy(n,e,t){let r=new Map;for(let s of n)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&r.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let l=r.get(s.chunk[o]);l!=null&&(t?t.mapPos(l):l)==s.chunkPos[o]&&!t?.touchesRange(l,l+s.chunk[o].length)&&i.add(s.chunk[o])}return i}class Z_{constructor(e,t,r,i=0){this.layer=e,this.skip=t,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],r=e+t.from[this.rangeIndex];if(this.from=r,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Ea{constructor(e){this.heap=e}static from(e,t=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new Z_(o,t,r,s));return i.length==1?i[0]:new Ea(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)Bd(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)Bd(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Bd(this.heap,0)}}}function Bd(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1<n.length&&i.compare(n[r+1])>=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class Cl{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ea.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Fc(this.active,e),Fc(this.activeTo,e),Fc(this.activeRank,e),this.minActive=Ky(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||i-this.activeTo[t])>0;)t++;Xc(this.active,t,r),Xc(this.activeTo,t,i),Xc(this.activeRank,t,s),e&&Xc(e,t,this.cursor.from),this.minActive=Ky(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&Fc(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function Gy(n,e,t,r,i,s){n.goto(e),t.goto(r);let o=r+i,l=r,a=r-e,c=!!s.boundChange;for(let u=!1;;){let h=n.to+a-t.to,f=h||n.endSide-t.endSide,d=f<0?n.to+a:t.to,p=Math.min(d,o);if(n.point||t.point?(n.point&&t.point&&Z1(n.point,t.point)&&tm(n.activeForPoint(n.to),t.activeForPoint(t.to))||s.comparePoint(l,p,n.point,t.point),u=!1):(u&&s.boundChange(l),p>l&&!tm(n.active,t.active)&&s.compareRange(l,p,n.active,t.active),c&&p<o&&(h||n.openEnd(d)!=t.openEnd(d))&&(u=!0)),d>o)break;l=d,f<=0&&n.next(),f>=0&&t.next()}}function tm(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t]&&!Z1(n[t],e[t]))return!1;return!0}function Fc(n,e){for(let t=e,r=n.length-1;t<r;t++)n[t]=n[t+1];n.pop()}function Xc(n,e,t){for(let r=n.length-1;r>=e;r--)n[r+1]=n[r];n[e]=t}function Ky(n,e){let t=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||n[i].endSide-n[t].endSide)<0&&(t=i,r=e[i]);return t}function Or(n,e,t=n.length){let r=0;for(let i=0;i<t&&i<n.length;)n.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Mt(n,i));return r}function nm(n,e,t,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==n.length)break;s+=n.charCodeAt(i)==9?t-s%t:1,i=Mt(n,i)}return r===!0?-1:n.length}const rm="ͼ",Jy=typeof Symbol>"u"?"__"+rm:Symbol.for(rm),im=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),ev=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Ci{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,l,a,c){let u=[],h=/^@(\w+)\b/.exec(o[0]),f=h&&h[1]=="keyframes";if(h&&l==null)return a.push(o[0]+";");for(let d in l){let p=l[d];if(/&/.test(d))s(d.split(/,\s*/).map(g=>o.map(m=>g.replace(/&/,m))).reduce((g,m)=>g.concat(m)),p,a);else if(p&&typeof p=="object"){if(!h)throw new RangeError("The value of a property ("+d+") should be a primitive value.");s(i(d),p,u,f)}else p!=null&&u.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(u.length||f)&&a.push((r&&!h&&!c?o.map(r):o).join(", ")+" {"+u.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
69
+ `)}static newName(){let e=ev[Jy]||1;return ev[Jy]=e+1,rm+e.toString(36)}static mount(e,t,r){let i=e[im],s=r&&r.nonce;i?s&&i.setNonce(s):i=new CI(e,s),i.mount(Array.isArray(t)?t:[t],e)}}let tv=new Map;class CI{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=tv.get(r);if(s)return e[im]=s;this.sheet=new i.CSSStyleSheet,tv.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[im]=this}mount(e,t){let r=this.sheet,i=0,s=0;for(let o=0;o<e.length;o++){let l=e[o],a=this.modules.indexOf(l);if(a<s&&a>-1&&(this.modules.splice(a,1),s--,a=-1),a==-1){if(this.modules.splice(s++,0,l),r)for(let c=0;c<l.rules.length;c++)r.insertRule(l.rules[c],i++)}else{for(;s<a;)i+=this.modules[s++].rules.length;i+=l.rules.length,s++}}if(r)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let a=0;a<this.modules.length;a++)o+=this.modules[a].getRules()+`
70
+ `;this.styleTag.textContent=o;let l=t.head||t;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Gi={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Qa={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},_I=typeof navigator<"u"&&/Mac/.test(navigator.platform),TI=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Bt=0;Bt<10;Bt++)Gi[48+Bt]=Gi[96+Bt]=String(Bt);for(var Bt=1;Bt<=24;Bt++)Gi[Bt+111]="F"+Bt;for(var Bt=65;Bt<=90;Bt++)Gi[Bt]=String.fromCharCode(Bt+32),Qa[Bt]=String.fromCharCode(Bt);for(var Fd in Gi)Qa.hasOwnProperty(Fd)||(Qa[Fd]=Gi[Fd]);function PI(n){var e=_I&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||TI&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Qa:Gi)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function je(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;e<arguments.length;e++)B_(n,arguments[e]);return n}function B_(n,e){if(typeof e=="string")n.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)n.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)B_(n,e[t]);else throw new RangeError("Unsupported child node: "+e)}let en=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},sm=typeof document<"u"?document:{documentElement:{style:{}}};const om=/Edge\/(\d+)/.exec(en.userAgent),F_=/MSIE \d/.test(en.userAgent),lm=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(en.userAgent),Xf=!!(F_||lm||om),nv=!Xf&&/gecko\/(\d+)/i.test(en.userAgent),Xd=!Xf&&/Chrome\/(\d+)/.exec(en.userAgent),EI="webkitFontSmoothing"in sm.documentElement.style,am=!Xf&&/Apple Computer/.test(en.vendor),rv=am&&(/Mobile\/\w+/.test(en.userAgent)||en.maxTouchPoints>2);var le={mac:rv||/Mac/.test(en.platform),windows:/Win/.test(en.platform),linux:/Linux|X11/.test(en.platform),ie:Xf,ie_version:F_?sm.documentMode||6:lm?+lm[1]:om?+om[1]:0,gecko:nv,gecko_version:nv?+(/Firefox\/(\d+)/.exec(en.userAgent)||[0,0])[1]:0,chrome:!!Xd,chrome_version:Xd?+Xd[1]:0,ios:rv,android:/Android\b/.test(en.userAgent),webkit_version:EI?+(/\bAppleWebKit\/(\d+)/.exec(en.userAgent)||[0,0])[1]:0,safari:am,safari_version:am?+(/\bVersion\/(\d+(\.\d+)?)/.exec(en.userAgent)||[0,0])[1]:0,tabSize:sm.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function B1(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const Th=Object.create(null);function F1(n,e,t){if(n==e)return!0;n||(n=Th),e||(e=Th);let r=Object.keys(n),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=t&&(i.indexOf(s)==-1||n[s]!==e[s]))return!1;return!0}function QI(n,e){for(let t=n.attributes.length-1;t>=0;t--){let r=n.attributes[t].name;e[r]==null&&n.removeAttribute(r)}for(let t in e){let r=e[t];t=="style"?n.style.cssText=r:n.getAttribute(t)!=r&&n.setAttribute(t,r)}}function iv(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function $I(n){let e=Object.create(null);for(let t=0;t<n.attributes.length;t++){let r=n.attributes[t];e[r.name]=r.value}return e}class Jn{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Xt=(function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n})(Xt||(Xt={}));class ce extends Ui{constructor(e,t,r,i){super(),this.startSide=e,this.endSide=t,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new mc(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return t+=r&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Xs(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=X_(e,t);r=(s?t?-3e8:-1:5e8)-1,i=(o?t?2e8:1:-6e8)+1}return new Xs(e,r,i,t,e.widget||null,!0)}static line(e){return new Oc(e)}static set(e,t=!1){return Ee.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}ce.none=Ee.empty;class mc extends ce{constructor(e){let{start:t,end:r}=X_(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?B1(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Th}eq(e){return this==e||e instanceof mc&&this.tagName==e.tagName&&F1(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}mc.prototype.point=!1;class Oc extends ce{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Oc&&this.spec.class==e.spec.class&&F1(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Oc.prototype.mapMode=Ft.TrackBefore;Oc.prototype.point=!0;class Xs extends ce{constructor(e,t,r,i,s,o){super(t,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?t<=0?Ft.TrackBefore:Ft.TrackAfter:Ft.TrackDel}get type(){return this.startSide!=this.endSide?Xt.WidgetRange:this.startSide<=0?Xt.WidgetBefore:Xt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Xs&&AI(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Xs.prototype.point=!0;function X_(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function AI(n,e){return n==e||!!(n&&e&&n.compare(e))}function yo(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class $a extends Ui{constructor(e,t){super(),this.tagName=e,this.attributes=t}eq(e){return e==this||e instanceof $a&&this.tagName==e.tagName&&F1(this.attributes,e.attributes)}static create(e){return new $a(e.tagName,e.attributes||Th)}static set(e,t=!1){return Ee.of(e,t)}}$a.prototype.startSide=$a.prototype.endSide=-1;function Aa(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function cm(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function oa(n,e){if(!e.anchorNode)return!1;try{return cm(n,e.anchorNode)}catch{return!1}}function Ru(n){return n.nodeType==3?Ma(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function la(n,e,t,r){return t?sv(n,e,t,r,-1)||sv(n,e,t,r,1):!1}function Ki(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Ph(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function sv(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:_i(n))){if(n.nodeName=="DIV")return!1;let s=n.parentNode;if(!s||s.nodeType!=1)return!1;e=Ki(n)+(i<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?_i(n):0}else return!1}}function _i(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Eh(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function MI(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function z_(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function LI(n,e,t,r,i,s,o,l){let a=n.ownerDocument,c=a.defaultView||window;for(let u=n,h=!1;u&&!h;)if(u.nodeType==1){let f,d=u==a.body,p=1,g=1;if(d)f=MI(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(h=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let O=u.getBoundingClientRect();({scaleX:p,scaleY:g}=z_(u,O)),f={left:O.left,right:O.left+u.clientWidth*p,top:O.top,bottom:O.top+u.clientHeight*g}}let m=0,x=0;if(i=="nearest")e.top<f.top?(x=e.top-(f.top+o),t>0&&e.bottom>f.bottom+x&&(x=e.bottom-f.bottom+o)):e.bottom>f.bottom&&(x=e.bottom-f.bottom+o,t<0&&e.top-x<f.top&&(x=e.top-(f.top+o)));else{let O=e.bottom-e.top,b=f.bottom-f.top;x=(i=="center"&&O<=b?e.top+O/2-b/2:i=="start"||i=="center"&&t<0?e.top-o:e.bottom-b+o)-f.top}if(r=="nearest"?e.left<f.left?(m=e.left-(f.left+s),t>0&&e.right>f.right+m&&(m=e.right-f.right+s)):e.right>f.right&&(m=e.right-f.right+s,t<0&&e.left<f.left+m&&(m=e.left-(f.left+s))):m=(r=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:r=="start"==l?e.left-s:e.right-(f.right-f.left)+s)-f.left,m||x)if(d)c.scrollBy(m,x);else{let O=0,b=0;if(x){let y=u.scrollTop;u.scrollTop+=x/g,b=(u.scrollTop-y)*g}if(m){let y=u.scrollLeft;u.scrollLeft+=m/p,O=(u.scrollLeft-y)*p}e={left:e.left-O,top:e.top-b,right:e.right-O,bottom:e.bottom-b},O&&Math.abs(O-m)<1&&(r="nearest"),b&&Math.abs(b-x)<1&&(i="nearest")}if(d)break;(e.top<f.top||e.bottom>f.bottom||e.left<f.left||e.right>f.right)&&(e={left:Math.max(e.left,f.left),right:Math.min(e.right,f.right),top:Math.max(e.top,f.top),bottom:Math.min(e.bottom,f.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function RI(n){let e=n.ownerDocument,t,r;for(let i=n.parentNode;i&&!(i==e.body||t&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!t&&i.scrollWidth>i.clientWidth&&(t=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:t,y:r}}class II{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?_i(t):0),r,Math.min(e.focusOffset,r?_i(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let ds=null;le.safari&&le.safari_version>=26&&(ds=!1);function W_(n){if(n.setActive)return n.setActive();if(ds)return n.focus(ds);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(ds==null?{get preventScroll(){return ds={preventScroll:!0},!0}}:void 0),!ds){ds=!1;for(let t=0;t<e.length;){let r=e[t++],i=e[t++],s=e[t++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let ov;function Ma(n,e,t=e){let r=ov||(ov=document.createRange());return r.setEnd(n,t),r.setStart(n,e),r}function vo(n,e,t,r){let i={key:e,code:e,keyCode:t,which:t,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,n.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,n.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function DI(n){for(;n;){if(n&&(n.nodeType==9||n.nodeType==11&&n.host))return n;n=n.assignedSlot||n.parentNode}return null}function NI(n,e){let t=e.focusNode,r=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=r)return!1;for(r=Math.min(r,_i(t));;)if(r){if(t.nodeType!=1)return!1;let i=t.childNodes[r-1];i.contentEditable=="false"?r--:(t=i,r=_i(t))}else{if(t==n)return!0;r=Ki(t),t=t.parentNode}}function j_(n){return n.scrollTop>Math.max(1,n.scrollHeight-n.clientHeight-4)}function q_(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=_i(t)}else if(t.parentNode&&!Ph(t))r=Ki(t),t=t.parentNode;else return null}}function Y_(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r<t.nodeValue.length)return{node:t,offset:r};if(t.nodeType==1&&r<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[r],r=0}else if(t.parentNode&&!Ph(t))r=Ki(t)+1,t=t.parentNode;else return null}}class ur{constructor(e,t,r=!0){this.node=e,this.offset=t,this.precise=r}static before(e,t){return new ur(e.parentNode,Ki(e),t)}static after(e,t){return new ur(e.parentNode,Ki(e)+1,t)}}var Ue=(function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n})(Ue||(Ue={}));const zs=Ue.LTR,X1=Ue.RTL;function H_(n){let e=[];for(let t=0;t<n.length;t++)e.push(1<<+n[t]);return e}const VI=H_("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),ZI=H_("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),um=Object.create(null),Cr=[];for(let n of["()","[]","{}"]){let e=n.charCodeAt(0),t=n.charCodeAt(1);um[e]=t,um[t]=-e}function U_(n){return n<=247?VI[n]:1424<=n&&n<=1524?2:1536<=n&&n<=1785?ZI[n-1536]:1774<=n&&n<=2220?4:8192<=n&&n<=8204?256:64336<=n&&n<=65023?4:1}const BI=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Zr{get dir(){return this.level%2?X1:zs}constructor(e,t,r){this.from=e,this.to=t,this.level=r}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,r,i){let s=-1;for(let o=0;o<e.length;o++){let l=e[o];if(l.from<=t&&l.to>=t){if(l.level==r)return o;(s<0||(i!=0?i<0?l.from<t:l.to>t:e[s].level>l.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function G_(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++){let r=n[t],i=e[t];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!G_(r.inner,i.inner))return!1}return!0}const He=[];function FI(n,e,t,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:e,l=s<r.length?r[s].from:t,a=s?256:i;for(let c=o,u=a,h=a;c<l;c++){let f=U_(n.charCodeAt(c));f==512?f=u:f==8&&h==4&&(f=16),He[c]=f==4?2:f,f&7&&(h=f),u=f}for(let c=o,u=a,h=a;c<l;c++){let f=He[c];if(f==128)c<l-1&&u==He[c+1]&&u&24?f=He[c]=u:He[c]=256;else if(f==64){let d=c+1;for(;d<l&&He[d]==64;)d++;let p=c&&u==8||d<t&&He[d]==8?h==1?1:8:256;for(let g=c;g<d;g++)He[g]=p;c=d-1}else f==8&&h==1&&(He[c]=1);u=f,f&7&&(h=f)}}}function XI(n,e,t,r,i){let s=i==1?2:1;for(let o=0,l=0,a=0;o<=r.length;o++){let c=o?r[o-1].to:e,u=o<r.length?r[o].from:t;for(let h=c,f,d,p;h<u;h++)if(d=um[f=n.charCodeAt(h)])if(d<0){for(let g=l-3;g>=0;g-=3)if(Cr[g+1]==-d){let m=Cr[g+2],x=m&2?i:m&4?m&1?s:i:0;x&&(He[h]=He[Cr[g]]=x),l=g;break}}else{if(Cr.length==189)break;Cr[l++]=h,Cr[l++]=f,Cr[l++]=a}else if((p=He[h])==2||p==1){let g=p==i;a=g?0:1;for(let m=l-3;m>=0;m-=3){let x=Cr[m+2];if(x&2)break;if(g)Cr[m+2]|=2;else{if(x&4)break;Cr[m+2]|=4}}}}}function zI(n,e,t,r){for(let i=0,s=r;i<=t.length;i++){let o=i?t[i-1].to:n,l=i<t.length?t[i].from:e;for(let a=o;a<l;){let c=He[a];if(c==256){let u=a+1;for(;;)if(u==l){if(i==t.length)break;u=t[i++].to,l=i<t.length?t[i].from:e}else if(He[u]==256)u++;else break;let h=s==1,f=(u<e?He[u]:r)==1,d=h==f?h?1:2:r;for(let p=u,g=i,m=g?t[g-1].to:n;p>a;)p==m&&(p=t[--g].from,m=g?t[g-1].to:n),He[--p]=d;a=u}else s=c,a++}}}function hm(n,e,t,r,i,s,o){let l=r%2?2:1;if(r%2==i%2)for(let a=e,c=0;a<t;){let u=!0,h=!1;if(c==s.length||a<s[c].from){let g=He[a];g!=l&&(u=!1,h=g==16)}let f=!u&&l==1?[]:null,d=u?r:r+1,p=a;e:for(;;)if(c<s.length&&p==s[c].from){if(h)break e;let g=s[c];if(!u)for(let m=g.to,x=c+1;;){if(m==t)break e;if(x<s.length&&s[x].from==m)m=s[x++].to;else{if(He[m]==l)break e;break}}if(c++,f)f.push(g);else{g.from>a&&o.push(new Zr(a,g.from,d));let m=g.direction==zs!=!(d%2);fm(n,m?r+1:r,i,g.inner,g.from,g.to,o),a=g.to}p=g.to}else{if(p==t||(u?He[p]!=l:He[p]==l))break;p++}f?hm(n,a,p,r+1,i,f,o):a<p&&o.push(new Zr(a,p,d)),a=p}else for(let a=t,c=s.length;a>e;){let u=!0,h=!1;if(!c||a>s[c-1].to){let g=He[a-1];g!=l&&(u=!1,h=g==16)}let f=!u&&l==1?[]:null,d=u?r:r+1,p=a;e:for(;;)if(c&&p==s[c-1].to){if(h)break e;let g=s[--c];if(!u)for(let m=g.from,x=c;;){if(m==e)break e;if(x&&s[x-1].to==m)m=s[--x].from;else{if(He[m-1]==l)break e;break}}if(f)f.push(g);else{g.to<a&&o.push(new Zr(g.to,a,d));let m=g.direction==zs!=!(d%2);fm(n,m?r+1:r,i,g.inner,g.from,g.to,o),a=g.from}p=g.from}else{if(p==e||(u?He[p-1]!=l:He[p-1]==l))break;p--}f?hm(n,p,a,r+1,i,f,o):p<a&&o.push(new Zr(p,a,d)),a=p}}function fm(n,e,t,r,i,s,o){let l=e%2?2:1;FI(n,i,s,r,l),XI(n,i,s,r,l),zI(i,s,r,l),hm(n,i,s,e,t,r,o)}function WI(n,e,t){if(!n)return[new Zr(0,0,e==X1?1:0)];if(e==zs&&!t.length&&!BI.test(n))return K_(n.length);if(t.length)for(;n.length>He.length;)He[He.length]=256;let r=[],i=e==zs?0:1;return fm(n,i,i,t,0,n.length,r),r}function K_(n){return[new Zr(0,n,0)]}let J_="";function jI(n,e,t,r,i){var s;let o=r.head-n.from,l=Zr.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),a=e[l],c=a.side(i,t);if(o==c){let f=l+=i?1:-1;if(f<0||f>=e.length)return null;a=e[l=f],o=a.side(!i,t),c=a.side(i,t)}let u=Mt(n.text,o,a.forward(i,t));(u<a.from||u>a.to)&&(u=c),J_=n.text.slice(Math.min(o,u),Math.max(o,u));let h=l==(i?e.length-1:0)?null:e[l+(i?1:-1)];return h&&u==c&&h.level+(i?0:1)<a.level?Z.cursor(h.side(!i,t)+n.from,h.forward(i,t)?1:-1,h.level):Z.cursor(u+n.from,a.forward(i,t)?-1:1,a.level)}function qI(n,e,t){for(let r=e;r<t;r++){let i=U_(n.charCodeAt(r));if(i==1)return zs;if(i==2||i==4)return X1}return zs}const eT=ie.define(),tT=ie.define(),nT=ie.define(),rT=ie.define(),dm=ie.define(),iT=ie.define(),sT=ie.define(),z1=ie.define(),W1=ie.define(),oT=ie.define({combine:n=>n.some(e=>e)}),lT=ie.define({combine:n=>n.some(e=>e)}),aT=ie.define();class So{constructor(e,t="nearest",r="nearest",i=5,s=5,o=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new So(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new So(Z.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const zc=ye.define({map:(n,e)=>n.map(e)}),cT=ye.define();function On(n,e,t){let r=n.facet(rT);r.length?r[0](e):window.onerror&&window.onerror(String(e),t,void 0,void 0,e)||(t?console.error(t+":",e):console.error(e))}const pi=ie.define({combine:n=>n.length?n[0]:!0});let YI=0;const uo=ie.define({combine(n){return n.filter((e,t)=>{for(let r=0;r<t;r++)if(n[r].plugin==e.plugin)return!1;return!0})}});class ft{constructor(e,t,r,i,s){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(uo.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(uo.of({plugin:this,arg:e}))}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:s,decorations:o}=t||{};return new ft(YI++,e,r,i,l=>{let a=[];return o&&a.push(zf.of(c=>{let u=c.plugin(l);return u?o(u):ce.none})),s&&a.push(s(l)),a})}static fromClass(e,t){return ft.define((r,i)=>new e(r,i),t)}}class zd{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(On(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){On(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){On(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const uT=ie.define(),j1=ie.define(),zf=ie.define(),hT=ie.define(),q1=ie.define(),xc=ie.define(),fT=ie.define();function lv(n,e){let t=n.state.facet(fT);if(!t.length)return t;let r=t.map(s=>s instanceof Function?s(n):s),i=[];return Ee.spans(r,e.from,e.to,{point(){},span(s,o,l,a){let c=s-e.from,u=o-e.from,h=i;for(let f=l.length-1;f>=0;f--,a--){let d=l[f].spec.bidiIsolate,p;if(d==null&&(d=qI(e.text,c,u)),a>0&&h.length&&(p=h[h.length-1]).to==c&&p.direction==d)p.to=u,h=p.inner;else{let g={from:c,to:u,direction:d,inner:[]};h.push(g),h=g.inner}}}}),i}const dT=ie.define();function Y1(n){let e=0,t=0,r=0,i=0;for(let s of n.state.facet(dT)){let o=s(n);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:t,top:r,bottom:i}}const Dl=ie.define();class Fn{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new Fn(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(t-1,1)}}return e.splice(t,0,r),e}static extendWithRanges(e,t){if(t.length==0)return e;let r=[];for(let i=0,s=0,o=0;;){let l=i<e.length?e[i].fromB:1e9,a=s<t.length?t[s]:1e9,c=Math.min(l,a);if(c==1e9)break;let u=c+o,h=c,f=u;for(;;)if(s<t.length&&t[s]<=h){let d=t[s+1];s+=2,h=Math.max(h,d);for(let p=i;p<e.length&&e[p].fromB<=h;p++)o=e[p].toA-e[p].toB;f=Math.max(f,d+o)}else if(i<e.length&&e[i].fromB<=h){let d=e[i++];h=Math.max(h,d.toB),f=Math.max(f,d.toA),o=d.toA-d.toB}else break;r.push(new Fn(u,f,c,h))}return r}}class Qh{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=mt.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,l,a)=>i.push(new Fn(s,o,l,a))),this.changedRanges=i}static create(e,t,r){return new Qh(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const HI=[];class kt{constructor(e,t,r=0){this.dom=e,this.length=t,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return HI}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let t=this.domAttrs;t&&QI(this.dom,t)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let r=t;for(let i of this.children){if(i==e)return r;r+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let r=Ki(this.dom),i=this.length?e>0:t>0;return new ur(this.parent.dom,r+(i?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof jf)return e;return null}static get(e){return e.cmTile}}class Wf extends kt{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,r=null,i,s=e?.node==t?e:null,o=0;for(let l of this.children){if(l.sync(e),o+=l.length+l.breakAfter,i=r?r.nextSibling:t.firstChild,s&&i!=l.dom&&(s.written=!0),l.dom.parentNode==t)for(;i&&i!=l.dom;)i=av(i);else t.insertBefore(l.dom,i);r=l.dom}for(i=r?r.nextSibling:t.firstChild,s&&i&&(s.written=!0);i;)i=av(i);this.length=o}}function av(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class jf extends Wf{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=kt.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],r=this,i=0,s=0;;)if(i==r.children.length){if(!t.length)return;r=r.parent,r.breakAfter&&s++,i=t.pop()}else{let o=r.children[i++];if(o instanceof Oi)t.push(i),r=o,i=0;else{let l=s+o.length,a=e(o,s);if(a!==void 0)return a;s=l+o.breakAfter}}}resolveBlock(e,t){let r,i=-1,s,o=-1;if(this.blockTiles((l,a)=>{let c=a+l.length;if(e>=a&&e<=c){if(l.isWidget()&&t>=-1&&t<=1){if(l.flags&32)return!0;l.flags&16&&(r=void 0)}(a<e||e==c&&(t<-1?l.length:l.covers(1)))&&(!r||!l.isWidget()&&r.isWidget())&&(r=l,i=e-a),(c>e||e==a&&(t>1?l.length:l.covers(-1)))&&(!s||!l.isWidget()&&s.isWidget())&&(s=l,o=e-a)}}),!r&&!s)throw new Error("No tile at position "+e);return r&&t<0||!s?{tile:r,offset:i}:{tile:s,offset:o}}}class Oi extends Wf{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,t){let r=new Oi(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class Do extends Wf{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,r){let i=new Do(t||document.createElement("div"),e);return(!t||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,r){let i=null,s=-1,o=null,l=-1;function a(u,h){for(let f=0,d=0;f<u.children.length&&d<=h;f++){let p=u.children[f],g=d+p.length;g>=h&&(p.isComposite()?a(p,h-d):(!o||o.isHidden&&(t>0||r&&GI(o,p)))&&(g>h||p.flags&32)?(o=p,l=h-d):(d<h||p.flags&16&&!p.isHidden)&&(i=p,s=h-d)),d=g}}a(this,e);let c=(t<0?i:o)||i||o;return c?{tile:c,offset:c==i?s:l}:null}coordsIn(e,t){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t):UI(this)}domIn(e,t){let r=this.resolveInline(e,t);if(r){let{tile:i,offset:s}=r;if(this.dom.contains(i.dom))return i.isText()?new ur(i.dom,Math.min(i.dom.nodeValue.length,s)):i.domPosFor(s,i.flags&16?1:i.flags&32?-1:t);let o=r.tile.parent,l=!1;for(let a of o.children){if(l)return new ur(a.dom,0);a==r.tile&&(l=!0)}}return new ur(this.dom,0)}}function UI(n){let e=n.dom.lastChild;if(!e)return n.dom.getBoundingClientRect();let t=Ru(e);return t[t.length-1]||null}function GI(n,e){let t=n.coordsIn(0,1),r=e.coordsIn(0,1);return t&&r&&r.top<t.bottom}class mn extends Wf{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let r=new mn(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class ys extends kt{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&t<0||e==r&&t>=0?le.chrome||le.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):t<0?i--:s<r&&s++;let l=Ma(this.dom,i,s).getClientRects();if(!l.length)return null;let a=l[(o?o<0:t>=0)?0:l.length-1];return le.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,c=>c.width)||a),o?Eh(a,o<0):a||null}static of(e,t){let r=new ys(t||document.createTextNode(e),e);return t||(r.flags|=2),r}}class Ws extends kt{constructor(e,t,r,i){super(e,t,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,r){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;if(r)return Eh(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let s=this.dom.getClientRects(),o=null;if(!s.length)return null;let l=this.flags&16?!0:this.flags&32?!1:e>0;for(let a=l?s.length-1:0;o=s[a],!(e>0?a==0:a==s.length-1||o.top<o.bottom);a+=l?-1:1);return Eh(o,!l)}}get overrideDOMText(){if(!this.length)return De.empty;let{root:e}=this;if(!e)return De.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,r,i,s){return s||(s=e.toDOM(t),e.editable||(s.contentEditable="false")),new Ws(s,r,e,i)}}class $h extends kt{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return De.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class KI{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,r){let{tile:i,index:s,beforeBreak:o,parents:l}=this;for(;e||t>0;)if(i.isComposite())if(o){if(!e)break;r&&r.break(),e--,o=!1}else if(s==i.children.length){if(!e&&!l.length)break;r&&r.leave(i),o=!!i.breakAfter,{tile:i,index:s}=l.pop(),s++}else{let a=i.children[s],c=a.breakAfter;(t>0?a.length<=e:a.length<e)&&(!r||r.skip(a,0,a.length)!==!1||!a.isComposite)?(o=!!c,s++,e-=a.length):(l.push({tile:i,index:s}),i=a,s=0,r&&a.isComposite()&&r.enter(a))}else if(s==i.length)o=!!i.breakAfter,{tile:i,index:s}=l.pop(),s++;else if(e){let a=Math.min(e,i.length-s);r&&r.skip(i,s,s+a),e-=a,s+=a}else break;return this.tile=i,this.index=s,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class JI{constructor(e,t,r,i){this.from=e,this.to=t,this.wrapper=r,this.rank=i}}class eD{constructor(e,t,r){this.cache=e,this.root=t,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,r,i){var s;this.flushBuffer();let o=this.ensureMarks(t,r),l=o.lastChild;if(l&&l.isText()&&!(l.flags&8)&&l.length+e.length<512){this.cache.reused.set(l,2);let a=o.children[o.children.length-1]=new ys(l.dom,l.text+e);a.parent=o}else o.append(i||ys.of(e,(s=this.cache.find(ys))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let r=this.curLine;r.dom!=t.line.dom&&(r.setDOM(this.cache.reused.has(t.line)?Wd(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let i=r;for(let l=t.marks.length-1;l>=0;l--){let a=t.marks[l],c=i.lastChild;if(c instanceof mn&&c.mark.eq(a.mark))c.dom!=a.dom&&c.setDOM(Wd(a.dom)),i=c;else{if(this.cache.reused.get(a)){let h=kt.get(a.dom);h&&h.setDOM(Wd(a.dom))}let u=mn.of(a.mark,a.dom);i.append(u),i=u}this.cache.reused.set(a,2)}let s=kt.get(e.text);s&&this.cache.reused.set(s,2);let o=new ys(e.text,e.text.nodeValue);o.flags|=8,i.append(o)}addInlineWidget(e,t,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let s=this.ensureMarks(t,r);!i&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,r){this.flushBuffer(),this.ensureMarks(t,r).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var r;e||(e=pT);let i=Do.start(e,t||((r=this.cache.find(Do))===null||r===void 0?void 0:r.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=i)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var r;let i=this.curLine;for(let s=e.length-1;s>=0;s--){let o=e[s],l;if(t>0&&(l=i.lastChild)&&l instanceof mn&&l.mark.eq(o))i=l,t--;else{let a=mn.of(o,(r=this.cache.find(mn,c=>c.mark.eq(o)))===null||r===void 0?void 0:r.dom);i.append(a),i=a,t=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!cv(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(le.ios&&cv(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(jd,0,32)||new Ws(jd.toDOM(),0,jd,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new JI(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-t.rank||this.wrappers[r-1].to-t.to)<0;)r--;this.wrappers.splice(r,0,t)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let r of this.wrappers){let i=t.lastChild;if(r.from<this.pos&&i instanceof Oi&&i.wrapper.eq(r.wrapper))t=i;else{let s=Oi.of(r.wrapper,(e=this.cache.find(Oi,o=>o.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);t.append(s),t=s}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),r=this.cache.find($h,void 0,1);return r&&(r.flags=t),r||new $h(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class tD{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:i,lineBreak:s,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=i;let l=this.textOff=Math.min(e,i.length);return s?null:i.slice(0,l)}let t=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,t);return this.textOff=t,r}}const Ah=[Ws,Do,ys,mn,$h,Oi,jf];for(let n=0;n<Ah.length;n++)Ah[n].bucket=n;class nD{constructor(e){this.view=e,this.buckets=Ah.map(()=>[]),this.index=Ah.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,r=this.buckets[t];r.length<6?r.push(e):r[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,r=2){let i=e.bucket,s=this.buckets[i],o=this.index[i];for(let l=s.length-1;l>=0;l--){let a=(l+o)%s.length,c=s[a];if((!t||t(c))&&!this.reused.has(c))return s.splice(a,1),a<o&&this.index[i]--,this.reused.set(c,r),c}return null}findWidget(e,t,r){let i=this.buckets[0];if(i.length)for(let s=0,o=0;;s++){if(s==i.length){if(o)return null;o=1,s=0}let l=i[s];if(!this.reused.has(l)&&(o==0?l.widget.compare(e):l.widget.constructor==e.constructor&&e.updateDOM(l.dom,this.view)))return i.splice(s,1),s<this.index[0]&&this.index[0]--,l.widget==e&&l.length==t&&(l.flags&497)==r?(this.reused.set(l,1),l):(this.reused.set(l,2),new Ws(l.dom,t,e,l.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class rD{constructor(e,t,r,i,s){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new nD(e),this.text=new tD(e.state.doc),this.builder=new eD(this.cache,new jf(e,e.contentDOM),Ee.iter(r)),this.cache.reused.set(t,2),this.old=new KI(t),this.reuseWalker={skip:(o,l,a)=>{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,t){let r=t&&this.getCompositionContext(t.text);for(let i=0,s=0,o=0;;){let l=o<e.length?e[o++]:null,a=l?l.fromA:this.old.root.length;if(a>i){let c=a-i;this.preserve(c,!o,!l),i=a,s+=c}if(!l)break;t&&l.fromA<=t.range.fromA&&l.toA>=t.range.toA?(this.forward(l.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(s,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,r),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,l.toA),this.emit(t.range.toB,l.toB)):(this.forward(l.fromA,l.toA),this.emit(s,l.toB)),s=l.toB,i=l.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,r){let i=oD(this.old),s=this.openMarks;this.old.advance(e,r?1:-1,{skip:(o,l,a)=>{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(a-l);else{let c=a>0||l<o.length?Ws.of(o.widget,this.view,a-l,o.flags&496,this.cache.maybeReuse(o)):this.cache.reuse(o);c.flags&256?(c.flags&=-2,this.builder.addBlockWidget(c)):(this.builder.ensureLine(null),this.builder.addInlineWidget(c,i,s),s=i.length)}else if(o.isText())this.builder.ensureLine(null),!l&&a==o.length?this.builder.addText(o.text,i,s,this.cache.reuse(o)):(this.cache.add(o),this.builder.addText(o.text.slice(l,a),i,s)),s=i.length;else if(o.isLine())o.flags&=-2,this.cache.reused.set(o,1),this.builder.addLine(o);else if(o instanceof $h)this.cache.add(o);else if(o instanceof mn)this.builder.ensureLine(null),this.builder.addMark(o,i,s),this.cache.reused.set(o,1),s=i.length;else return!1;this.openWidget=!1},enter:o=>{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof mn&&i.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?i.length&&(i.length=s=0):o instanceof mn&&(i.shift(),s=Math.min(s,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let r=null,i=this.builder,s=0,o=Ee.spans(this.decorations,e,t,{point:(l,a,c,u,h,f)=>{if(c instanceof Xs){if(this.disallowBlockEffectsFor[f]){if(c.block)throw new RangeError("Block decorations may not be specified via plugins");if(a>this.view.state.doc.lineAt(l).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=u.length,h>u.length)i.continueWidget(a-l);else{let d=c.widget||(c.block?No.block:No.inline),p=iD(c),g=this.cache.findWidget(d,a-l,p)||Ws.of(d,this.view,a-l,p);c.block?(c.startSide>0&&i.addLineStartIfNotCovered(r),i.addBlockWidget(g)):(i.ensureLine(r),i.addInlineWidget(g,u,h))}r=null}else r=sD(r,c);a>l&&this.text.skip(a-l)},span:(l,a,c,u)=>{for(let h=l;h<a;){let f=this.text.next(Math.min(512,a-h));f==null?(i.addLineStartIfNotCovered(r),i.addBreak(),h++):(i.ensureLine(r),i.addText(f,c,h==l?u:c.length),h+=f.length),r=null}}});i.addLineStartIfNotCovered(r),this.openWidget=o>s,this.openMarks=o}forward(e,t,r=1){t-e<=10?this.old.advance(t-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let t=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let s=kt.get(i);if(i==this.view.contentDOM)break;s instanceof mn?t.push(s):s?.isLine()?r=s:s instanceof Oi||(i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new Do(i,pT):r||t.push(mn.of(new mc({tagName:i.nodeName.toLowerCase(),attributes:$I(i)}),i)))}return{line:r,marks:t}}}function cv(n,e){let t=r=>{for(let i of r.children)if((e?i.isText():i.length)||t(i))return!0;return!1};return t(n)}function iD(n){let e=n.isReplace?(n.startSide<0?64:0)|(n.endSide>0?128:0):n.startSide>0?32:16;return n.block&&(e|=256),e}const pT={class:"cm-line"};function sD(n,e){let t=e.spec.attributes,r=e.spec.class;return!t&&!r||(n||(n={class:"cm-line"}),t&&B1(t,n),r&&(n.class+=" "+r)),n}function oD(n){let e=[];for(let t=n.parents.length;t>1;t--){let r=t==n.parents.length?n.tile:n.parents[t].tile;r instanceof mn&&e.push(r.mark)}return e}function Wd(n){let e=kt.get(n);return e&&e.setDOM(n.cloneNode()),n}class No extends Jn{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}No.inline=new No("span");No.block=new No("div");const jd=new class extends Jn{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class uv{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=ce.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new jf(e,e.contentDOM),this.updateInner([new Fn(0,0,0,e.state.doc.length)],null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:h})=>h<this.minWidthFrom||u>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!gD(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?aD(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:u,to:h}=this.hasComposition;r=new Fn(u,h,e.changes.mapPos(u,-1),e.changes.mapPos(h,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(le.ie||le.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.blockWrappers;this.updateDeco();let a=hD(o,this.decorations,e.changes);a.length&&(r=Fn.extendWithRanges(r,a));let c=dD(l,this.blockWrappers,e.changes);return c.length&&(r=Fn.extendWithRanges(r,c)),s&&!r.some(u=>u.fromA<=s.range.fromA&&u.toA>=s.range.toA)&&(r=s.range.addToSet(r.slice())),this.tile.flags&2&&r.length==0?!1:(this.updateInner(r,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(t||e.length){let o=this.tile,l=new rD(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);this.tile=l.run(e,t),pm(o,l.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=le.chrome||le.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||r.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof qd&&i.push(s.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(cT)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,s=i==r,o=!s&&!(this.view.state.facet(pi)||r.tabIndex>-1)&&oa(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||t||o))return;let l=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,c,u;if(a.empty?u=c=this.inlineDOMNearPos(a.anchor,a.assoc||1):(u=this.inlineDOMNearPos(a.head,a.head==a.from?1:-1),c=this.inlineDOMNearPos(a.anchor,a.anchor==a.from?1:-1)),le.gecko&&a.empty&&!this.hasComposition&&lD(c)){let f=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(f,c.node.childNodes[c.offset]||null)),c=u=new ur(f,0),l=!0}let h=this.view.observer.selectionRange;(l||!h.focusNode||(!la(c.node,c.offset,h.anchorNode,h.anchorOffset)||!la(u.node,u.offset,h.focusNode,h.focusOffset))&&!this.suppressWidgetCursorChange(h,a))&&(this.view.observer.ignore(()=>{le.android&&le.chrome&&r.contains(h.focusNode)&&pD(h.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let f=Aa(this.view.root);if(f)if(a.empty){if(le.gecko){let d=cD(c.node,c.offset);if(d&&d!=3){let p=(d==1?q_:Y_)(c.node,c.offset);p&&(c=new ur(p.node,p.offset))}}f.collapse(c.node,c.offset),a.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=a.bidiLevel)}else if(f.extend){f.collapse(c.node,c.offset);try{f.extend(u.node,u.offset)}catch{}}else{let d=document.createRange();a.anchor>a.head&&([c,u]=[u,c]),d.setEnd(u.node,u.offset),d.setStart(c.node,c.offset),f.removeAllRanges(),f.addRange(d)}o&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(c,u)),this.impreciseAnchor=c.precise?null:new ur(h.anchorNode,h.anchorOffset),this.impreciseHead=u.precise?null:new ur(h.focusNode,h.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&la(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=Aa(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let o=this.lineAt(t.head,t.assoc);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let a=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!a||!c||a.bottom>c.top)return;let u=this.domAtPos(t.head+t.assoc,t.assoc);r.collapse(u.node,u.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=t.from&&r.collapse(i,s)}posFromDOM(e,t){let r=this.tile.nearest(e);if(!r)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let i=r.posAtStart;if(r.isComposite()){let s;if(e==r.dom)s=r.dom.childNodes[t];else{let o=_i(e)==0?0:t==0?-1:1;for(;;){let l=e.parentNode;if(l==r.dom)break;o==0&&l.firstChild!=l.lastChild&&(e==l.firstChild?o=-1:o=1),e=l}o<0?s=e:s=e.nextSibling}if(s==r.dom.firstChild)return i;for(;s&&!kt.get(s);)s=s.nextSibling;if(!s)return i+r.length;for(let o=0,l=i;;o++){let a=r.children[o];if(a.dom==s)return l;l+=a.length+a.breakAfter}}else return r.isText()?e==r.dom?i+t:i+(t?r.length:0):i}domAtPos(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.domPosFor(e,t):r.domIn(i,t)}inlineDOMNearPos(e,t){let r,i=-1,s=!1,o,l=-1,a=!1;return this.tile.blockTiles((c,u)=>{if(c.isWidget()){if(c.flags&32&&u>=e)return!0;c.flags&16&&(s=!0)}else{let h=u+c.length;if(u<=e&&(r=c,i=e-u,s=h<e),h>=e&&!o&&(o=c,l=e-u,a=u>e),u>e&&o)return!0}}),!r&&!o?this.domAtPos(e,t):(s&&o?r=null:a&&r&&(o=null),r&&t<0||!o?r.domIn(i,t):o.domIn(l,t))}coordsAt(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof qd?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t)}lineAt(e,t){let{tile:r}=this.tile.resolveBlock(e,t);return r.isLine()?r:null}coordsForChar(e){let{tile:t,offset:r}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function i(s,o){if(s.isComposite())for(let l of s.children){if(l.length>=o){let a=i(l,o);if(a)return a}if(o-=l.length,o<0)break}else if(s.isText()&&o<s.length){let l=Mt(s.text,o);if(l==o)return null;let a=Ma(s.dom,o,l).getClientRects();for(let c=0;c<a.length;c++){let u=a[c];if(c==a.length-1||u.top<u.bottom&&u.left<u.right)return u}}return null}return i(t,r)}measureVisibleLineHeights(e){let t=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==Ue.LTR,c=0,u=(h,f,d)=>{for(let p=0;p<h.children.length&&!(f>i);p++){let g=h.children[p],m=f+g.length,x=g.dom.getBoundingClientRect(),{height:O}=x;if(d&&!p&&(c+=x.top-d.top),g instanceof Oi)m>r&&u(g,f,x);else if(f>=r&&(c>0&&t.push(-c),t.push(O+c),c=0,o)){let b=g.dom.lastChild,y=b?Ru(b):[];if(y.length){let S=y[y.length-1],k=a?S.right-x.left:x.right-S.left;k>l&&(l=k,this.minWidth=s,this.minWidthFrom=f,this.minWidthTo=m)}}d&&p==h.children.length-1&&(c+=d.bottom-x.bottom),f=m+g.breakAfter}};return u(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?Ue.RTL:Ue.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let l=0,a;for(let c of o.children){if(!c.isText()||/[^ -~]/.test(c.text))return;let u=Ru(c.dom);if(u.length!=1)return;l+=u[0].width,a=u[0].height}if(l)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:l/o.length,textHeight:a}}});if(e)return e;let t=document.createElement("div"),r,i,s;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let o=Ru(t.firstChild)[0];r=t.getBoundingClientRect().height,i=o&&o.width?o.width/27:7,s=o&&o.height?o.height:r,t.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let s=i==t.viewports.length?null:t.viewports[i],o=s?s.from-1:this.view.state.doc.length;if(o>r){let l=(t.lineBlockAt(o).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(ce.replace({widget:new qd(l),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return ce.set(e)}updateDeco(){let e=1,t=this.view.state.facet(zf).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(q1).map((s,o)=>{let l=typeof s=="function";return l&&(r=!0),l?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(Ee.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(hT).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(aT))try{if(c(this.view,e.range,e))return!0}catch(u){On(this.view.state,u,"scroll handler")}let{range:t}=e,r=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),i;if(!r)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let s=Y1(this.view),o={left:r.left-s.left,top:r.top-s.top,right:r.right+s.right,bottom:r.bottom+s.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;if(LI(this.view.scrollDOM,o,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,l),-l),Math.max(Math.min(e.yMargin,a),-a),this.view.textDirection==Ue.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(r.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||r.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let c=this.view.docView.lineAt(t.head,1);c&&c.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let t=r=>r.isWidget()||r.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){pm(this.tile)}}function pm(n,e){let t=e?.get(n);if(t!=1){t==null&&n.destroy();for(let r of n.children)pm(r,e)}}function lD(n){return n.node.nodeType==1&&n.node.firstChild&&(n.offset==0||n.node.childNodes[n.offset-1].contentEditable=="false")&&(n.offset==n.node.childNodes.length||n.node.childNodes[n.offset].contentEditable=="false")}function gT(n,e){let t=n.observer.selectionRange;if(!t.focusNode)return null;let r=q_(t.focusNode,t.focusOffset),i=Y_(t.focusNode,t.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let l=kt.get(i.node);if(!l||l.isText()&&l.text!=i.node.nodeValue)s=i;else if(n.docView.lastCompositionAfterCursor){let a=kt.get(r.node);!a||a.isText()&&a.text!=r.node.nodeValue||(s=i)}}if(n.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function aD(n,e,t){let r=gT(n,t);if(!r)return null;let{node:i,from:s,to:o}=r,l=i.nodeValue;if(/[\n\r]/.test(l)||n.state.doc.sliceString(r.from,r.to)!=l)return null;let a=e.invertedDesc;return{range:new Fn(a.mapPos(s),a.mapPos(o),s,o),text:i}}function cD(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e<n.childNodes.length&&n.childNodes[e].contentEditable=="false"?2:0)}let uD=class{constructor(){this.changes=[]}compareRange(e,t){yo(e,t,this.changes)}comparePoint(e,t){yo(e,t,this.changes)}boundChange(e){yo(e,e,this.changes)}};function hD(n,e,t){let r=new uD;return Ee.compare(n,e,t,r),r.changes}class fD{constructor(){this.changes=[]}compareRange(e,t){yo(e,t,this.changes)}comparePoint(){}boundChange(e){yo(e,e,this.changes)}}function dD(n,e,t){let r=new fD;return Ee.compare(n,e,t,r),r.changes}function pD(n,e){for(let t=n;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function gD(n,e){let t=!1;return e&&n.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(t=!0)}),t}class qd extends Jn{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function mD(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),s=e-i.from;if(i.length==0)return Z.cursor(e);s==0?t=1:s==i.length&&(t=-1);let o=s,l=s;t<0?o=Mt(i.text,s,!1):l=Mt(i.text,s);let a=r(i.text.slice(o,l));for(;o>0;){let c=Mt(i.text,o,!1);if(r(i.text.slice(c,o))!=a)break;o=c}for(;l<i.length;){let c=Mt(i.text,l);if(r(i.text.slice(l,c))!=a)break;l=c}return Z.range(o+i.from,l+i.from)}function OD(n,e,t,r,i){let s=Math.round((r-e.left)*n.defaultCharacterWidth);if(n.lineWrapping&&t.height>n.defaultLineHeight*1.5){let l=n.viewState.heightOracle.textHeight,a=Math.floor((i-t.top-(n.defaultLineHeight-l)*.5)/l);s+=a*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+nm(o,s,n.state.tabSize)}function gm(n,e,t){let r=n.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==Xt.Text&&(i.type!=s.type||(t<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function xD(n,e,t,r){let i=gm(n,e.head,e.assoc||-1),s=!r||i.type!=Xt.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let o=n.dom.getBoundingClientRect(),l=n.textDirectionAt(i.from),a=n.posAtCoords({x:t==(l==Ue.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(a!=null)return Z.cursor(a,t?-1:1)}return Z.cursor(t?i.to:i.from,t?-1:1)}function hv(n,e,t,r){let i=n.state.doc.lineAt(e.head),s=n.bidiSpans(i),o=n.textDirectionAt(i.from);for(let l=e,a=null;;){let c=jI(i,s,o,l,t),u=J_;if(!c){if(i.number==(t?n.state.doc.lines:1))return l;u=`
71
+ `,i=n.state.doc.line(i.number+(t?1:-1)),s=n.bidiSpans(i),c=n.visualLineSide(i,!t)}if(a){if(!a(u))return l}else{if(!r)return c;a=r(u)}l=c}}function bD(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return s=>{let o=r(s);return i==it.Space&&(i=o),i==o}}function yD(n,e,t,r){let i=e.head,s=t?1:-1;if(i==(t?n.state.doc.length:0))return Z.cursor(i,e.assoc);let o=e.goalColumn,l,a=n.contentDOM.getBoundingClientRect(),c=n.coordsAtPos(i,(e.empty?e.assoc:0)||(t?1:-1)),u=n.documentTop;if(c)o==null&&(o=c.left-a.left),l=s<0?c.top:c.bottom;else{let p=n.viewState.lineBlockAt(i);o==null&&(o=Math.min(a.right-a.left,n.defaultCharacterWidth*(i-p.from))),l=(s<0?p.top:p.bottom)+u}let h=a.left+o,f=r??n.viewState.heightOracle.textHeight>>1,d=mm(n,{x:h,y:l+f*s},!1,s);return Z.cursor(d.pos,d.assoc,void 0,o)}function aa(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(s,o,l)=>{if(e>s&&e<o){let a=r||t||(e-s<o-e?-1:1);e=a<0?s:o,r=a}});if(!r)return e}}function mT(n,e){let t=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=aa(n,i.from,0);o!=i.from&&(s=Z.cursor(o,-1))}else{let o=aa(n,i.from,-1),l=aa(n,i.to,1);(o!=i.from||l!=i.to)&&(s=Z.range(i.from==i.anchor?o:l,i.from==i.head?o:l))}s&&(t||(t=e.ranges.slice()),t[r]=s)}return t?Z.create(t,e.mainIndex):e}function Yd(n,e,t){let r=aa(n.state.facet(xc).map(i=>i(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:Z.cursor(r,r<t.from?1:-1)}class Rr{constructor(e,t){this.pos=e,this.assoc=t}}function mm(n,e,t,r){let i=n.contentDOM.getBoundingClientRect(),s=i.top+n.viewState.paddingTop,{x:o,y:l}=e,a=l-s,c;for(;;){if(a<0)return new Rr(0,1);if(a>n.viewState.docHeight)return new Rr(n.state.doc.length,-1);if(c=n.elementAtHeight(a),r==null)break;if(c.type==Xt.Text){if(r<0?c.to<n.viewport.from:c.from>n.viewport.to)break;let f=n.docView.coordsAt(r<0?c.from:c.to,r>0?-1:1);if(f&&(r<0?f.top<=a+s:f.bottom>=a+s))break}let h=n.viewState.heightOracle.textHeight/2;a=r>0?c.bottom+h:c.top-h}if(n.viewport.from>=c.to||n.viewport.to<=c.from){if(t)return null;if(c.type==Xt.Text){let h=OD(n,i,c,o,l);return new Rr(h,h==c.from?1:-1)}}if(c.type!=Xt.Text)return a<(c.top+c.bottom)/2?new Rr(c.from,1):new Rr(c.to,-1);let u=n.docView.lineAt(c.from,2);return(!u||u.length!=c.length)&&(u=n.docView.lineAt(c.from,-2)),new vD(n,o,l,n.textDirectionAt(c.from)).scanTile(u,c.from)}class vD{constructor(e,t,r,i){this.view=e,this.x=t,this.y=r,this.baseDir=i,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[Zr.find(i,e-r.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[Zr.find(i,e-r.from,-1,t)].dir}bidiIn(e,t){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<t)}scan(e,t){let r=0,i=e.length-1,s=new Set,o=this.bidiIn(e[0],e[i]),l,a,c=-1,u=1e9,h;e:for(;r<i;){let d=i-r,p=r+i>>1;t:if(s.has(p)){let m=r+Math.floor(Math.random()*d);for(let x=0;x<d;x++){if(!s.has(m)){p=m;break t}m++,m==i&&(m=r)}break e}s.add(p);let g=t(p);if(g)for(let m=0;m<g.length;m++){let x=g[m],O=0;if(x.bottom<this.y)(!l||l.bottom<x.bottom)&&(l=x),O=1;else if(x.top>this.y)(!a||a.top>x.top)&&(a=x),O=-1;else{let b=x.left>this.x?this.x-x.left:x.right<this.x?this.x-x.right:0,y=Math.abs(b);y<u&&(c=p,u=y,h=x),b&&(O=b<0==(this.baseDir==Ue.LTR)?-1:1)}O==-1&&(!o||this.baseDirAt(e[p],1))?i=p:O==1&&(!o||this.baseDirAt(e[p+1],-1))&&(r=p+1)}}if(!h){let d=l&&(!a||this.y-l.bottom<a.top-this.y)?l:a;return this.y=(d.top+d.bottom)/2,this.scan(e,t)}let f=(o?this.dirAt(e[c],1):this.baseDir)==Ue.LTR;return{i:c,after:this.x>(h.left+h.right)/2==f}}scanText(e,t){let r=[];for(let s=0;s<e.length;s=Mt(e.text,s))r.push(t+s);r.push(t+e.length);let i=this.scan(r,s=>{let o=r[s]-t,l=r[s+1]-t;return Ma(e.dom,o,l).getClientRects()});return i.after?new Rr(r[i.i+1],-1):new Rr(r[i.i],1)}scanTile(e,t){if(!e.length)return new Rr(t,1);if(e.children.length==1){let l=e.children[0];if(l.isText())return this.scanText(l,t);if(l.isComposite())return this.scanTile(l,t)}let r=[t];for(let l=0,a=t;l<e.children.length;l++)r.push(a+=e.children[l].length);let i=this.scan(r,l=>{let a=e.children[l];return a.flags&48?null:(a.dom.nodeType==1?a.dom:Ma(a.dom,0,a.length)).getClientRects()}),s=e.children[i.i],o=r[i.i];return s.isText()?this.scanText(s,o):s.isComposite()?this.scanTile(s,o):i.after?new Rr(r[i.i+1],-1):new Rr(o,1)}}const Nl="￿";class SD{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(Ce.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Nl}readRange(e,t){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let o=kt.get(i),l=i.nextSibling;if(l==t){o?.breakAfter&&!l&&r!=this.view.contentDOM&&this.lineBreak();break}let a=kt.get(l);(o&&a?o.breakAfter:(o?o.breakAfter:Ph(i))||Ph(l)&&(i.nodeName!="BR"||o?.isWidget())&&this.text.length>s)&&!kD(l,t)&&this.lineBreak(),i=l}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,l;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(l=i.exec(t))&&(s=l.index,o=l[0].length),this.append(t.slice(r,s<0?t.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);r=s+o}}readNode(e){let t=kt.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(wD(e,r.node,r.offset)?t:0))}}function wD(n,e,t){for(;;){if(!e||t<_i(e))return!1;if(e==n)return!0;t=Ki(e)+1,e=e.parentNode}}function kD(n,e){let t;for(;!(n==e||!n);n=n.nextSibling){let r=kt.get(n);if(!r?.isWidget())return!1;r&&(t||(t=[])).push(r)}if(t)for(let r of t){let i=r.overrideDOMText;if(i?.length)return!1}return!0}class fv{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class CD{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=OT(e.docView.tile,t,r,0))){let l=s||o?[]:TD(e),a=new SD(l,e);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=PD(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=s&&s.node==l.focusNode&&s.offset==l.focusOffset||!cm(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),c=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!cm(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),u=e.viewport;if((le.ios||le.chrome)&&e.state.selection.main.empty&&a!=c&&(u.from>0||u.to<e.state.doc.length)){let h=Math.min(a,c),f=Math.max(a,c),d=u.from-h,p=u.to-f;(d==0||d==1||h==0)&&(p==0||p==-1||f==e.state.doc.length)&&(a=0,c=e.state.doc.length)}e.inputState.composing>-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(Z.range(c,a)):this.newSel=Z.single(c,a)}}}function OT(n,e,t,r){if(n.isComposite()){let i=-1,s=-1,o=-1,l=-1;for(let a=0,c=r,u=r;a<n.children.length;a++){let h=n.children[a],f=c+h.length;if(c<e&&f>t)return OT(h,e,t,c);if(f>=e&&i==-1&&(i=a,s=c),c>t&&h.dom.parentNode==n.dom){o=a,l=u;break}u=f,c=f+h.breakAfter}return{from:s,to:l<0?r+n.length:l,startDOM:(i?n.children[i-1].dom.nextSibling:null)||n.dom.firstChild,endDOM:o<n.children.length&&o>=0?n.children[o].dom:null}}else return n.isText()?{from:r,to:r+n.length,startDOM:n.dom,endDOM:n.dom.nextSibling}:null}function xT(n,e){let t,{newSel:r}=e,i=n.state.selection.main,s=n.inputState.lastKeyTime>Date.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:l}=e.bounds,a=i.from,c=null;(s===8||le.android&&e.text.length<l-o)&&(a=i.to,c="end");let u=bT(n.state.doc.sliceString(o,l,Nl),e.text,a-o,c);u&&(le.chrome&&s==13&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==Nl+Nl&&u.toB--,t={from:o+u.from,to:o+u.toA,insert:De.of(e.text.slice(u.from,u.toB).split(Nl))})}else r&&(!n.hasFocus&&n.state.facet(pi)||Mh(r,i))&&(r=null);if(!t&&!r)return!1;if(!t&&e.typeOver&&!i.empty&&r&&r.main.empty?t={from:i.from,to:i.to,insert:n.state.doc.slice(i.from,i.to)}:(le.mac||le.android)&&t&&t.from==t.to&&t.from==i.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=Z.single(r.main.anchor-1,r.main.head-1)),t={from:t.from,to:t.to,insert:De.of([t.insert.toString().replace("."," ")])}):t&&t.from>=i.from&&t.to<=i.to&&(t.from!=i.from||t.to!=i.to)&&i.to-i.from-(t.to-t.from)<=4?t={from:i.from,to:i.to,insert:n.state.doc.slice(i.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,i.to))}:n.state.doc.lineAt(i.from).to<i.to&&n.docView.lineHasWidget(i.to)&&n.inputState.insertingTextAt>Date.now()-50?t={from:i.from,to:i.to,insert:n.state.toText(n.inputState.insertingText)}:le.chrome&&t&&t.from==t.to&&t.from==i.head&&t.insert.toString()==`
72
+ `&&n.lineWrapping&&(r&&(r=Z.single(r.main.anchor-1,r.main.head-1)),t={from:i.from,to:i.to,insert:De.of([" "])}),t)return H1(n,t,r,s);if(r&&!Mh(r,i)){let o=!1,l="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),l=n.inputState.lastSelectionOrigin,l=="select.pointer"&&(r=mT(n.state.facet(xc).map(a=>a(n)),r))),n.dispatch({selection:r,scrollIntoView:o,userEvent:l}),!0}else return!1}function H1(n,e,t,r=-1){if(le.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(le.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&vo(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&vo(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&vo(n.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,l=()=>o||(o=_D(n,e,t));return n.state.facet(iT).some(a=>a(n,e.from,e.to,s,l))||n.dispatch(l()),!0}function _D(n,e,t){let r,i=n.state,s=i.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let a=e.from<s.from?-1:1,c=a<0?s.from:s.to,u=aa(i.facet(xc).map(h=>h(n)),c,a);e.from==u&&(o=u)}if(o>-1)r={changes:e,selection:Z.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let a=s.from<e.from?i.sliceDoc(s.from,e.from):"",c=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(n.state.toText(a+e.insert.sliceString(0,void 0,n.state.lineBreak)+c))}else{let a=i.changes(e),c=t&&t.main.to<=a.newLength?t.main:void 0;if(i.selection.ranges.length>1&&(n.inputState.composing>=0||n.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let u=n.state.sliceDoc(e.from,e.to),h,f=t&&gT(n,t.main.head);if(f){let p=e.insert.length-(e.to-e.from);h={from:f.from,to:f.to-p}}else h=n.state.doc.lineAt(s.head);let d=s.to-e.to;r=i.changeByRange(p=>{if(p.from==s.from&&p.to==s.to)return{changes:a,range:c||p.map(a)};let g=p.to-d,m=g-u.length;if(n.state.sliceDoc(m,g)!=u||g>=h.from&&m<=h.to)return{range:p};let x=i.changes({from:m,to:g,insert:e.insert}),O=p.to-s.to;return{changes:x,range:c?Z.range(Math.max(0,c.anchor+O),Math.max(0,c.head+O)):p.map(x)}})}else r={changes:a,selection:c&&i.selection.replaceRange(c)}}let l="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,l+=".compose",n.inputState.compositionFirstChange&&(l+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:l,scrollIntoView:!0})}function bT(n,e,t,r){let i=Math.min(n.length,e.length),s=0;for(;s<i&&n.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&n.length==e.length)return null;let o=n.length,l=e.length;for(;o>0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(r=="end"){let a=Math.max(0,s-Math.min(o,l));t-=o+a-s}if(o<s&&n.length<e.length){let a=t<=s&&t>=o?s-t:0;s-=a,l=s+(l-o),o=s}else if(l<s){let a=t<=s&&t>=l?s-t:0;s-=a,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}function TD(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}=n.observer.selectionRange;return t&&(e.push(new fv(t,r)),(i!=t||s!=r)&&e.push(new fv(i,s))),e}function PD(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?Z.single(t+e,r+e):null}function Mh(n,e){return e.head==n.main.head&&e.anchor==n.main.anchor}class ED{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,le.safari&&e.contentDOM.addEventListener("input",()=>null),le.gecko&&zD(e.contentDOM.ownerDocument)}handleEvent(e){!DD(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=QD(e),r=this.handlers,i=this.view.contentDOM;for(let s in t)if(s!="scroll"){let o=!t[s].handlers.length,l=r[s];l&&o!=!l.handlers.length&&(i.removeEventListener(s,this.handleEvent),l=null),l||i.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!t[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&vT.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),le.android&&le.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return le.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=yT.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||$D.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,vo(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:le.safari&&!le.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function dv(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){On(t.state,i)}}}function QD(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec,s=i&&i.plugin.domEventHandlers,o=i&&i.plugin.domEventObservers;if(s)for(let l in s){let a=s[l];a&&t(l).handlers.push(dv(r.value,a))}if(o)for(let l in o){let a=o[l];a&&t(l).observers.push(dv(r.value,a))}}for(let r in xr)t(r).handlers.push(xr[r]);for(let r in Kn)t(r).observers.push(Kn[r]);return e}const yT=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],$D="dthko",vT=[16,17,18,20,91,92,224,225],Wc=6;function jc(n){return Math.max(0,n)*.7+8}function AD(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class MD{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=RI(e.contentDOM),this.atoms=e.state.facet(xc).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Ce.allowMultipleSelections)&&LD(e,t),this.dragging=ID(e,t)&&kT(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&AD(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,s=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let a=Y1(this.view);e.clientX-a.left<=i+Wc?t=-jc(i-e.clientX):e.clientX+a.right>=o-Wc&&(t=jc(e.clientX-o)),e.clientY-a.top<=s+Wc?r=-jc(s-e.clientY):e.clientY+a.bottom>=l-Wc&&(r=jc(e.clientY-l)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,r=mT(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function LD(n,e){let t=n.state.facet(eT);return t.length?t[0](e):le.mac?e.metaKey:e.ctrlKey}function RD(n,e){let t=n.state.facet(tT);return t.length?t[0](e):le.mac?!e.altKey:!e.ctrlKey}function ID(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=Aa(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let o=i[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function DD(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=kt.get(t))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const xr=Object.create(null),Kn=Object.create(null),ST=le.ie&&le.ie_version<15||le.ios&&le.webkit_version<604;function ND(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),wT(n,t.value)},50)}function qf(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function wT(n,e){e=qf(n.state,z1,e);let{state:t}=n,r,i=1,s=t.toText(e),o=s.lines==t.selection.ranges.length;if(Om!=null&&t.selection.ranges.every(a=>a.empty)&&Om==s.toString()){let a=-1;r=t.changeByRange(c=>{let u=t.doc.lineAt(c.from);if(u.from==a)return{range:c};a=u.from;let h=t.toText((o?s.line(i++).text:e)+t.lineBreak);return{changes:{from:u.from,insert:h},range:Z.cursor(c.from+h.length)}})}else o?r=t.changeByRange(a=>{let c=s.line(i++);return{changes:{from:a.from,to:a.to,insert:c.text},range:Z.cursor(a.from+c.length)}}):r=t.replaceSelection(s);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Kn.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};xr.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);Kn.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};Kn.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};xr.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(nT))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=ZD(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new MD(n,e,t,r)),r&&n.observer.ignore(()=>{W_(n.contentDOM);let s=n.root.activeElement;s&&!s.contains(n.contentDOM)&&s.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else n.inputState.setSelectionOrigin("select.pointer");return!1};function pv(n,e,t,r){if(r==1)return Z.cursor(e,t);if(r==2)return mD(n.state,e,t);{let i=n.docView.lineAt(e,t),s=n.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,l=i?i.posAtEnd:s.to;return l<n.state.doc.length&&l==s.to&&l++,Z.range(o,l)}}const VD=le.ie&&le.ie_version<=11;let gv=null,mv=0,Ov=0;function kT(n){if(!VD)return n.detail;let e=gv,t=Ov;return gv=n,Ov=Date.now(),mv=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(mv+1)%3:1}function ZD(n,e){let t=n.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=kT(e),i=n.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),i=i.map(s.changes))},get(s,o,l){let a=n.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),c,u=pv(n,a.pos,a.assoc,r);if(t.pos!=a.pos&&!o){let h=pv(n,t.pos,t.assoc,r),f=Math.min(h.from,u.from),d=Math.max(h.to,u.to);u=f<u.from?Z.range(f,d):Z.range(d,f)}return o?i.replaceRange(i.main.extend(u.from,u.to)):l&&r==1&&i.ranges.length>1&&(c=BD(i,a.pos))?c:l?i.addRange(u):Z.create([u])}}}function BD(n,e){for(let t=0;t<n.ranges.length;t++){let{from:r,to:i}=n.ranges[t];if(r<=e&&i>=e)return Z.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}xr.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.tile.nearest(e.target);if(i&&i.isWidget()){let s=i.posAtStart,o=s+i.length;(s>=t.to||o<=t.from)&&(t=Z.range(s,o))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",qf(n.state,W1,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};xr.dragend=n=>(n.inputState.draggedContent=null,!1);function xv(n,e,t,r){if(t=qf(n.state,z1,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=n.inputState,o=r&&s&&RD(n,e)?{from:s.from,to:s.to}:null,l={from:i,insert:t},a=n.state.changes(o?[o,l]:l);n.focus(),n.dispatch({changes:a,selection:{anchor:a.mapPos(i,-1),head:a.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),n.inputState.draggedContent=null}xr.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,s=()=>{++i==t.length&&xv(n,e,r.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o<t.length;o++){let l=new FileReader;l.onerror=s,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(r[o]=l.result),s()},l.readAsText(t[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return xv(n,e,r,!0),!0}return!1};xr.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=ST?null:e.clipboardData;return t?(wT(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(ND(n),!1)};function FD(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function XD(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:s}of n.selection.ranges){let o=n.doc.lineAt(s);o.number>i&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),i=o.number}r=!0}return{text:qf(n,W1,e.join(n.lineBreak)),ranges:t,linewise:r}}let Om=null;xr.copy=xr.cut=(n,e)=>{if(!oa(n.contentDOM,n.observer.selectionRange))return!1;let{text:t,ranges:r,linewise:i}=XD(n.state);if(!t&&!i)return!1;Om=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=ST?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(FD(n,t),!1)};const CT=Ai.define();function _T(n,e){let t=[];for(let r of n.facet(sT)){let i=r(n,e);i&&t.push(i)}return t.length?n.update({effects:t,annotations:CT.of(!0)}):null}function TT(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=_T(n.state,e);t?n.dispatch(t):n.update([])}},10)}Kn.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),TT(n)};Kn.blur=n=>{n.observer.clearSelectionRange(),TT(n)};Kn.compositionstart=Kn.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};Kn.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,le.chrome&&le.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};Kn.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};xr.beforeinput=(n,e)=>{var t,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(n.inputState.insertingText=e.data,n.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&n.observer.editContext){let s=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let l=o[0],a=n.posAtDOM(l.startContainer,l.startOffset),c=n.posAtDOM(l.endContainer,l.endOffset);return H1(n,{from:a,to:c,insert:n.state.toText(s)},null),!0}}let i;if(le.chrome&&le.android&&(i=yT.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return le.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),le.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>Kn.compositionend(n,e),20),!1};const bv=new Set;function zD(n){bv.has(n)||(bv.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const yv=["pre-wrap","normal","pre-line","break-spaces"];let Vo=!1;function vv(){Vo=!1}class WD{constructor(e){this.lineWrapping=e,this.doc=De.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return yv.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(t=!0,this.heightSamples[Math.floor(i*10)]=!0)}return t}refresh(e,t,r,i,s,o){let l=yv.indexOf(e)>-1,a=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=l||Math.abs(r-this.charWidth)>.1;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=s,a){this.heightSamples={};for(let c=0;c<o.length;c++){let u=o[c];u<0?c++:this.heightSamples[Math.floor(u*10)]=!0}}return a}}class jD{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class cr{constructor(e,t,r,i,s){this.from=e,this.length=t,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?Xt.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Xs?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new cr(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var et=(function(n){return n[n.ByPos=0]="ByPos",n[n.ByHeight=1]="ByHeight",n[n.ByPosNoHeight=2]="ByPosNoHeight",n})(et||(et={}));const Iu=.001;class sn{constructor(e,t,r=2){this.length=e,this.height=t,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Iu&&(Vo=!0),this.height=e)}replace(e,t,r){return sn.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let s=this,o=r.doc;for(let l=i.length-1;l>=0;l--){let{fromA:a,toA:c,fromB:u,toB:h}=i[l],f=s.lineAt(a,et.ByPosNoHeight,r.setDoc(t),0,0),d=f.to>=c?f:s.lineAt(c,et.ByPosNoHeight,r,0,0);for(h+=d.to-c,c=d.to;l>0&&f.from<=i[l-1].toA;)a=i[l-1].fromA,u=i[l-1].fromB,l--,a<f.from&&(f=s.lineAt(a,et.ByPosNoHeight,r,0,0));u+=f.from-a,a=f.from;let p=U1.build(r.setDoc(o),e,u,h);s=Lh(s,s.replace(a,c,p))}return s.updateHeight(r,0)}static empty(){return new _n(0,0,0)}static of(e){if(e.length==1)return e[0];let t=0,r=e.length,i=0,s=0;for(;;)if(t==r)if(i>s*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),r+=1+l.break,i-=l.size}else if(s>i*2){let l=e[r];l.break?e.splice(r,1,l.left,null,l.right):e.splice(r,1,l.left,l.right),r+=2+l.break,s-=l.size}else break;else if(i<s){let l=e[t++];l&&(i+=l.size)}else{let l=e[--r];l&&(s+=l.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,r++),new YD(sn.of(e.slice(0,t)),o,sn.of(e.slice(r)))}}function Lh(n,e){return n==e?n:(n.constructor!=e.constructor&&(Vo=!0),e)}sn.prototype.size=1;const qD=ce.replace({});class PT extends sn{constructor(e,t,r){super(e,t),this.deco=r,this.spaceAbove=0}mainBlock(e,t){return new cr(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new cr(i,0,r,this.spaceAbove,qD):this.mainBlock(r,i)}lineAt(e,t,r,i,s){let o=this.mainBlock(i,s);return this.spaceAbove?this.blockAt(0,r,i,s).join(o):o}forEachLine(e,t,r,i,s,o){e<=s+this.length&&t>=s&&o(this.lineAt(0,et.ByPos,r,i,s))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class _n extends PT{constructor(e,t,r){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,t){return new cr(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof _n||i instanceof Nt&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Nt?i=new _n(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):sn.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Nt extends sn{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,s=i-r+1,o,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*s);o=a/s,this.length>s+1&&(l=(this.height-a)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:i,perLine:o,perChar:l}}blockAt(e,t,r,i){let{firstLine:s,lastLine:o,perLine:l,perChar:a}=this.heightMetrics(t,i);if(t.lineWrapping){let c=i+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),u=t.doc.lineAt(c),h=l+u.length*a,f=Math.max(r,e-h/2);return new cr(u.from,u.length,f,h,0)}else{let c=Math.max(0,Math.min(o-s,Math.floor((e-r)/l))),{from:u,length:h}=t.doc.line(s+c);return new cr(u,h,r+l*c,l,0)}}lineAt(e,t,r,i,s){if(t==et.ByHeight)return this.blockAt(e,r,i,s);if(t==et.ByPosNoHeight){let{from:d,to:p}=r.doc.lineAt(e);return new cr(d,p-d,0,0,0)}let{firstLine:o,perLine:l,perChar:a}=this.heightMetrics(r,s),c=r.doc.lineAt(e),u=l+c.length*a,h=c.number-o,f=i+l*h+a*(c.from-s-h);return new cr(c.from,c.length,Math.max(i,Math.min(f,i+this.height-u)),u,0)}forEachLine(e,t,r,i,s,o){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:l,perLine:a,perChar:c}=this.heightMetrics(r,s);for(let u=e,h=i;u<=t;){let f=r.doc.lineAt(u);if(u==e){let p=f.number-l;h+=a*p+c*(e-s-p)}let d=a+c*f.length;o(new cr(f.from,f.length,h,d,0)),h+=d,u=f.to+1}}replace(e,t,r){let i=this.length-t;if(i>0){let s=r[r.length-1];s instanceof Nt?r[r.length-1]=new Nt(s.length+i):r.push(null,new Nt(i-1))}if(e>0){let s=r[0];s instanceof Nt?r[0]=new Nt(e+s.length):r.unshift(new Nt(e-1),null)}return sn.of(r)}decomposeLeft(e,t){t.push(new Nt(e-1),null)}decomposeRight(e,t){t.push(null,new Nt(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let s=t+this.length;if(i&&i.from<=t+this.length&&i.more){let o=[],l=Math.max(t,i.from),a=-1;for(i.from>t&&o.push(new Nt(i.from-t-1).updateHeight(e,t));l<=s&&i.more;){let u=e.doc.lineAt(l).length;o.length&&o.push(null);let h=i.heights[i.index++],f=0;h<0&&(f=-h,h=i.heights[i.index++]),a==-1?a=h:Math.abs(h-a)>=Iu&&(a=-2);let d=new _n(u,h,f);d.outdated=!1,o.push(d),l+=u+1}l<=s&&o.push(null,new Nt(s-l).updateHeight(e,l));let c=sn.of(o);return(a<0||Math.abs(c.height-this.height)>=Iu||Math.abs(a-this.heightMetrics(e,t).perLine)>=Iu)&&(Vo=!0),Lh(this,c)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class YD extends sn{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,t,r,i):this.right.blockAt(e,t,s,i+this.left.length+this.break)}lineAt(e,t,r,i,s){let o=i+this.left.height,l=s+this.left.length+this.break,a=t==et.ByHeight?e<o:e<l,c=a?this.left.lineAt(e,t,r,i,s):this.right.lineAt(e,t,r,o,l);if(this.break||(a?c.to<l:c.from>l))return c;let u=t==et.ByPosNoHeight?et.ByPosNoHeight:et.ByPos;return a?c.join(this.right.lineAt(l,u,r,o,l)):this.left.lineAt(l,u,r,i,s).join(c)}forEachLine(e,t,r,i,s,o){let l=i+this.left.height,a=s+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,r,i,s,o),t>=a&&this.right.forEachLine(e,t,r,l,a,o);else{let c=this.lineAt(a,et.ByPos,r,i,s);e<c.from&&this.left.forEachLine(e,c.from-1,r,i,s,o),c.to>=e&&c.from<=t&&o(c),t>c.to&&this.right.forEachLine(c.to+1,t,r,l,a,o)}}replace(e,t,r){let i=this.left.length+this.break;if(t<i)return this.balanced(this.left.replace(e,t,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let l of r)s.push(l);if(e>0&&Sv(s,o-1),t<this.length){let l=s.length;this.decomposeRight(t,s),Sv(s,l)}return sn.of(s)}decomposeLeft(e,t){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(r++,e>=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e<r&&this.left.decomposeRight(e,t),this.break&&e<i&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?sn.of(this.break?[e,null,t]:[e,t]):(this.left=Lh(this.left,e),this.right=Lh(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:s,right:o}=this,l=t+s.length+this.break,a=null;return i&&i.from<=t+s.length&&i.more?a=s=s.updateHeight(e,t,r,i):s.updateHeight(e,t,r),i&&i.from<=l+o.length&&i.more?a=o=o.updateHeight(e,l,r,i):o.updateHeight(e,l,r),a?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Sv(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof Nt&&(r=n[e+1])instanceof Nt&&n.splice(e-1,3,new Nt(t.length+1+r.length))}const HD=5;class U1{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof _n?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new _n(r-this.pos,-1,0)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e<t||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=t-e;r.block?this.addBlock(new PT(o,i,r)):(o||s||i>=HD)&&this.addLineDeco(i,s,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new _n(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let r=new Nt(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof _n)return e;let t=new _n(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof _n)&&!this.isCovered?this.nodes.push(new _n(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof _n&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,t,r,i){let s=new U1(r,e);return Ee.spans(t,r,i,s,0),s.finish(r)}}function UD(n,e,t){let r=new GD;return Ee.compare(n,e,t,r,0),r.changes}class GD{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,r,i){(e<t||r&&r.heightRelevant||i&&i.heightRelevant)&&yo(e,t,this.changes,5)}}function KD(n,e){let t=n.getBoundingClientRect(),r=n.ownerDocument,i=r.defaultView||window,s=Math.max(0,t.left),o=Math.min(i.innerWidth,t.right),l=Math.max(0,t.top),a=Math.min(i.innerHeight,t.bottom);for(let c=n.parentNode;c&&c!=r.body;)if(c.nodeType==1){let u=c,h=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&h.overflow!="visible"){let f=u.getBoundingClientRect();s=Math.max(s,f.left),o=Math.min(o,f.right),l=Math.max(l,f.top),a=Math.min(c==n.parentNode?i.innerHeight:a,f.bottom)}c=h.position=="absolute"||h.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:s-t.left,right:Math.max(s,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,a)-(t.top+e)}}function JD(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function eN(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Hd{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,t){return ce.replace({widget:new tN(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class tN extends Jn{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class wv{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=kv,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Ue.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(j1).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new WD(t),this.stateDeco=Cv(e),this.heightMap=sn.empty().applyChanges(this.stateDeco,De.empty,this.heightOracle.setDoc(e.doc),[new Fn(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ce.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new qc(s,o))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?kv:new G1(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Vl(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=Cv(this.state);let i=e.changedRanges,s=Fn.extendWithRanges(i,UD(r,this.stateDeco,e?e.changes:mt.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);vv(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||Vo)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let a=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<a.from||t.range.head>a.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let c=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(lT)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Ue.RTL:Ue.LTR;let o=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",l=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let c=0,u=0;if(l.width&&l.height){let{scaleX:y,scaleY:S}=z_(t,l);(y>.005&&Math.abs(this.scaleX-y)>.005||S>.005&&Math.abs(this.scaleY-S)>.005)&&(this.scaleX=y,this.scaleY=S,c|=16,o=a=!0)}let h=(parseInt(r.paddingTop)||0)*this.scaleY,f=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=h||this.paddingBottom!=f)&&(this.paddingTop=h,this.paddingBottom=f,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=j_(e.scrollDOM);let p=(this.printing?eN:KD)(t,this.paddingTop),g=p.top-this.pixelViewport.top,m=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let x=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(x!=this.inView&&(this.inView=x,x&&(a=!0)),!this.inView&&!this.scrollTarget&&!JD(e.dom))return 0;let O=l.width;if((this.contentDOMWidth!=O||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),a){let y=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(y)&&(o=!0),o||i.lineWrapping&&Math.abs(O-this.contentDOMWidth)>i.charWidth){let{lineHeight:S,charWidth:k,textHeight:w}=e.docView.measureTextSize();o=S>0&&i.refresh(s,S,k,w,Math.max(5,O/k),y),o&&(e.docView.minWidth=0,c|=16)}g>0&&m>0?u=Math.max(g,m):g<0&&m<0&&(u=Math.min(g,m)),vv();for(let S of this.viewports){let k=S.from==this.viewport.from?y:e.docView.measureVisibleLineHeights(S);this.heightMap=(o?sn.empty().applyChanges(this.stateDeco,De.empty,this.heightOracle,[new Fn(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new jD(S.from,k))}Vo&&(c|=2)}let b=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return b&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,a=new qc(i.lineAt(o-r*1e3,et.ByHeight,s,0,0).from,i.lineAt(l+(1-r)*1e3,et.ByHeight,s,0,0).to);if(t){let{head:c}=t.range;if(c<a.from||c>a.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=i.lineAt(c,et.ByPos,s,0,0),f;t.y=="center"?f=(h.top+h.bottom)/2-u/2:t.y=="start"||t.y=="nearest"&&c<a.from?f=h.top:f=h.bottom-u,a=new qc(i.lineAt(f-1e3/2,et.ByHeight,s,0,0).from,i.lineAt(f+u+1e3/2,et.ByHeight,s,0,0).to)}}return a}mapViewport(e,t){let r=t.mapPos(e.from,-1),i=t.mapPos(e.to,1);return new qc(this.heightMap.lineAt(r,et.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,et.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,et.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,et.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:l}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(t==this.state.doc.length||s>=l+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<l+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let r=[];for(let i of e)t.touchesRange(i.from,i.to)||r.push(new Hd(t.mapPos(i.from),t.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,t){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=Ue.LTR&&!r)return[];let l=[],a=(u,h,f,d)=>{if(h-u<s)return;let p=this.state.selection.main,g=[p.from];p.empty||g.push(p.to);for(let x of g)if(x>u&&x<h){a(u,x-10,f,d),a(x+10,h,f,d);return}let m=rN(e,x=>x.from>=f.from&&x.to<=f.to&&Math.abs(x.from-u)<s&&Math.abs(x.to-h)<s&&!g.some(O=>x.from<O&&x.to>O));if(!m){if(h<f.to&&t&&r&&t.visibleRanges.some(b=>b.from<=h&&b.to>=h)){let b=t.moveToLineBoundary(Z.cursor(h),!1,!0).head;b>u&&(h=b)}let x=this.gapSize(f,u,h,d),O=r||x<2e6?x:2e6;m=new Hd(u,h,x,O)}l.push(m)},c=u=>{if(u.length<o||u.type!=Xt.Text)return;let h=nN(u.from,u.to,this.stateDeco);if(h.total<o)return;let f=this.scrollTarget?this.scrollTarget.range.head:null,d,p;if(r){let g=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,m,x;if(f!=null){let O=Hc(h,f),b=((this.visibleBottom-this.visibleTop)/2+g)/u.height;m=O-b,x=O+b}else m=(this.visibleTop-u.top-g)/u.height,x=(this.visibleBottom-u.top+g)/u.height;d=Yc(h,m),p=Yc(h,x)}else{let g=h.total*this.heightOracle.charWidth,m=i*this.heightOracle.charWidth,x=0;if(g>2e6)for(let k of e)k.from>=u.from&&k.from<u.to&&k.size!=k.displaySize&&k.from*this.heightOracle.charWidth+x<this.pixelViewport.left&&(x=k.size-k.displaySize);let O=this.pixelViewport.left+x,b=this.pixelViewport.right+x,y,S;if(f!=null){let k=Hc(h,f),w=((b-O)/2+m)/g;y=k-w,S=k+w}else y=(O-m)/g,S=(b+m)/g;d=Yc(h,y),p=Yc(h,S)}d>u.from&&a(u.from,d,u,h),p<u.to&&a(p,u.to,u,h)};for(let u of this.viewportLines)Array.isArray(u.type)?u.type.forEach(c):c(u);return l}gapSize(e,t,r,i){let s=Hc(i,r)-Hc(i,t);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){Hd.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=ce.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let r=[];Ee.spans(t,this.viewport.from,this.viewport.to,{span(s,o){r.push({from:s,to:o})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let o=this.visibleRanges[s],l=r[s];(o.from!=l.from||o.to!=l.to)&&(i|=4,e&&e.mapPos(o.from,-1)==l.from&&e.mapPos(o.to,1)==l.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Vl(this.heightMap.lineAt(e,et.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Vl(this.heightMap.lineAt(this.scaler.fromDOM(e),et.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Vl(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class qc{constructor(e,t){this.from=e,this.to=t}}function nN(n,e,t){let r=[],i=n,s=0;return Ee.spans(t,n,e,{span(){},point(o,l){o>i&&(r.push({from:i,to:o}),s+=o-i),i=l}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function Yc({total:n,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:s,to:o}=e[i],l=o-s;if(r<=l)return s+r;r-=l}}function Hc(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function rN(n,e){for(let t of n)if(e(t))return t}const kv={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};function Cv(n){let e=n.facet(zf).filter(r=>typeof r!="function"),t=n.facet(q1).filter(r=>typeof r!="function");return t.length&&e.push(Ee.join(t)),e}class G1{constructor(e,t,r){let i=0,s=0,o=0;this.viewports=r.map(({from:l,to:a})=>{let c=t.lineAt(l,et.ByPos,e,0,0).top,u=t.lineAt(a,et.ByPos,e,0,0).bottom;return i+=u-c,{from:l,to:a,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let l of this.viewports)l.domTop=o+(l.top-s)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof G1?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,r)=>t.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function Vl(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new cr(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>Vl(i,e)):n._content)}const Uc=ie.define({combine:n=>n.join(" ")}),xm=ie.define({combine:n=>n.indexOf(!0)>-1}),bm=Ci.newName(),ET=Ci.newName(),QT=Ci.newName(),$T={"&light":"."+ET,"&dark":"."+QT};function ym(n,e,t){return new Ci(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const iN=ym("."+bm,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},$T),sN={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ud=le.ie&&le.ie_version<=11;class oN{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new II,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(le.ie&&le.ie_version<=11||le.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&le.android&&e.constructor.EDIT_CONTEXT!==!1&&!(le.chrome&&le.chrome_version<126)&&(this.editContext=new aN(e),e.state.facet(pi)&&(e.contentDOM.editContext=this.editContext.editContext)),Ud&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(pi)?r.root.activeElement!=this.dom:!oa(this.dom,i))return;let s=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(le.ie&&le.ie_version<=11||le.android&&le.chrome)&&!r.state.selection.main.empty&&i.focusNode&&la(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Aa(e.root);if(!t)return!1;let r=le.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&lN(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=oa(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&NI(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let r=this.dom;r;)if(r.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=t)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,sN),Ud&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Ud&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&vo(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),t==-1?{from:t,to:r}=o:(t=Math.min(o.from,t),r=Math.max(o.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&oa(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new CD(this.view,e,t,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=xT(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!Mh(this.view.state.selection,t.newSel.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let r=_v(t,e.previousSibling||e.target.previousSibling,-1),i=_v(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(pi)!=e.state.facet(pi)&&(e.view.contentDOM.editContext=e.state.facet(pi)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function _v(n,e,t){for(;e;){let r=kt.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function Tv(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=n.docView.domAtPos(n.state.selection.main.anchor,1);return la(o.node,o.offset,i,s)&&([t,r,i,s]=[i,s,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}}function lN(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return Tv(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?Tv(n,t):null}class aN{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:s,head:o}=i,l=this.toEditorPos(r.updateRangeStart),a=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:l,drifted:!1});let c=a-l>r.text.length;l==this.from&&s<this.from?l=s:a==this.to&&s>this.to&&(a=s);let u=bT(e.state.sliceDoc(l,a),r.text,(c?i.from:i.to)-l,c?"end":null);if(!u){let f=Z.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));Mh(f,i)||e.dispatch({selection:f,userEvent:"select"});return}let h={from:u.from+l,to:u.toA+l,insert:De.of(r.text.slice(u.from,u.toB).split(`
73
+ `))};if((le.mac||le.android)&&h.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(h={from:l,to:a,insert:De.of([r.text.replace("."," ")])}),this.pendingContextChange=h,!e.state.readOnly){let f=this.to-this.from+(h.to-h.from+h.insert.length);H1(e,h,Z.single(this.toEditorPos(r.selectionStart,f),this.toEditorPos(r.selectionEnd,f)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),h.from<h.to&&!h.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(t.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let o=this.toEditorPos(r.rangeStart),l=this.toEditorPos(r.rangeEnd);o<l;o++){let a=e.coordsForChar(o);s=a&&new DOMRect(a.left,a.top,a.right-a.left,a.bottom-a.top)||s||new DOMRect,i.push(s)}t.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,l=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(l)){let a=this.toEditorPos(s.rangeStart),c=this.toEditorPos(s.rangeEnd);if(a<c){let u=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(l)?1:2}px`;i.push(ce.mark({attributes:{style:u}}).range(a,c))}}}e.dispatch({effects:cT.of(ce.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Aa(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,o,l,a,c)=>{if(r)return;let u=c.length-(o-s);if(i&&o>=i.to)if(i.from==s&&i.to==o&&i.insert.eq(c)){i=this.pendingContextChange=null,t+=u,this.to+=u;return}else i=null,this.revertPending(e.state);if(s+=t,o+=t,o<=this.from)this.from+=u,this.to+=u;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+c.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),c.toString()),this.to+=u}t+=u}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class U{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||DI(e.parent)||document,this.viewState=new wv(e.state||Ce.create(e)),e.scrollTo&&e.scrollTo.is(zc)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(uo).map(i=>new zd(i));for(let i of this.plugins)i.update(this);this.observer=new oN(this),this.inputState=new ED(this),this.inputState.ensureHandlers(this.plugins),this.docView=new uv(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof yt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,s=this.state;for(let f of e){if(f.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=f.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,l=0,a=null;e.some(f=>f.annotation(CT))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=_T(s,o),a||(l=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(u=null)):this.observer.clear(),s.facet(Ce.phrases)!=this.state.facet(Ce.phrases))return this.setState(s);i=Qh.create(this,s,e),i.flags|=l;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(h&&(h=h.map(f.changes)),f.scrollIntoView){let{main:d}=f.state.selection;h=new So(d.empty?d:Z.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of f.effects)d.is(zc)&&(h=d.value.clip(this.state))}this.viewState.update(i,h),this.bidiCache=Rh.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(Dl)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Uc)!=i.state.facet(Uc)&&(this.viewState.mustMeasureContent=!0),(t||r||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let f of this.state.facet(dm))try{f(i)}catch(d){On(this.state,d,"update listener")}(a||u)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),u&&!xT(this,u)&&c.force&&vo(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new wv(e),this.plugins=e.facet(uo).map(r=>new zd(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new uv(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(uo),r=e.state.facet(uo);if(t!=r){let i=[];for(let s of r){let o=t.indexOf(s);if(o<0)i.push(new zd(s));else{let l=this.plugins[o];l.mustUpdate=e,i.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);t!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(r){On(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(j_(r))s=-1,o=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(i);s=d.from,o=d.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];a&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(d=>{try{return d.read(this)}catch(p){return On(this.state,p),Pv}}),h=Qh.create(this,this.state,[]),f=!1;h.flags|=a,t?t.flags|=a:t=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),f=this.docView.update(h),f&&this.docViewUpdate());for(let d=0;d<c.length;d++)if(u[d]!=Pv)try{let p=c[d];p.write&&p.write(u[d],this)}catch(p){On(this.state,p)}if(f&&this.docView.updateSelection(!0),!h.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let p=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o;if(p>1||p<-1){i=i+p,r.scrollTop=i/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(dm))l(t)}get themeClasses(){return bm+" "+(this.state.facet(xm)?QT:ET)+" "+this.state.facet(Uc)}updateAttrs(){let e=Ev(this,uT,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(pi)?"true":"false",class:"cm-content",style:`${le.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),Ev(this,j1,t);let r=this.observer.ignore(()=>{let i=iv(this.contentDOM,this.contentAttrs,t),s=iv(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(U.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Dl);let e=this.state.facet(U.cspNonce);Ci.mount(this.root,this.styleModules.concat(iN).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(r=>r.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return Yd(this,e,hv(this,e,t,r))}moveByGroup(e,t){return Yd(this,e,hv(this,e,t,r=>bD(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[t?r.length-1:0];return Z.cursor(s.side(t,i)+e.from,s.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return xD(this,e,t,r)}moveVertically(e,t,r){return Yd(this,e,yD(this,e,t,r))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let r=mm(this,e,t);return r&&r.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),mm(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[Zr.find(s,e-i.from,-1,t)];return Eh(r,o.dir==Ue.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(oT)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>cN)return K_(e.length);let t=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||G_(s.isolates,r=lv(this,e))))return s.order;r||(r=lv(this,e));let i=WI(e.text,t,r);return this.bidiCache.push(new Rh(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||le.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{W_(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return zc.of(new So(typeof e=="number"?Z.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return zc.of(new So(Z.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return ft.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return ft.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=Ci.newName(),i=[Uc.of(r),Dl.of(ym(`.${r}`,e))];return t&&t.dark&&i.push(xm.of(!0)),i}static baseTheme(e){return yr.lowest(Dl.of(ym("."+bm,e,$T)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&kt.get(r)||kt.get(e);return((t=i?.root)===null||t===void 0?void 0:t.view)||null}}U.styleModule=Dl;U.inputHandler=iT;U.clipboardInputFilter=z1;U.clipboardOutputFilter=W1;U.scrollHandler=aT;U.focusChangeEffect=sT;U.perLineTextDirection=oT;U.exceptionSink=rT;U.updateListener=dm;U.editable=pi;U.mouseSelectionStyle=nT;U.dragMovesSelection=tT;U.clickAddsSelectionRange=eT;U.decorations=zf;U.blockWrappers=hT;U.outerDecorations=q1;U.atomicRanges=xc;U.bidiIsolatedRanges=fT;U.scrollMargins=dT;U.darkTheme=xm;U.cspNonce=ie.define({combine:n=>n.length?n[0]:""});U.contentAttributes=j1;U.editorAttributes=uT;U.lineWrapping=U.contentAttributes.of({class:"cm-lineWrapping"});U.announce=ye.define();const cN=4096,Pv={};class Rh{constructor(e,t,r,i,s,o){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=s,this.order=o}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Ue.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==i&&!t.touchesRange(o.from,o.to)&&r.push(new Rh(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function Ev(n,e,t){for(let r=n.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(n):s;o&&B1(o,t)}return t}const uN=le.mac?"mac":le.windows?"win":le.linux?"linux":"key";function hN(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,s,o,l;for(let a=0;a<t.length-1;++a){const c=t[a];if(/^(cmd|meta|m)$/i.test(c))l=!0;else if(/^a(lt)?$/i.test(c))i=!0;else if(/^(c|ctrl|control)$/i.test(c))s=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))e=="mac"?l=!0:s=!0;else throw new Error("Unrecognized modifier name: "+c)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),l&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function Gc(n,e,t){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t!==!1&&e.shiftKey&&(n="Shift-"+n),n}const fN=yr.default(U.domEventHandlers({keydown(n,e){return MT(AT(e.state),n,e,"editor")}})),ul=ie.define({enables:fN}),Qv=new WeakMap;function AT(n){let e=n.facet(ul),t=Qv.get(e);return t||Qv.set(e,t=gN(e.reduce((r,i)=>r.concat(i),[]))),t}function dN(n,e,t){return MT(AT(n.state),e,n,t)}let Zi=null;const pN=4e3;function gN(n,e=uN){let t=Object.create(null),r=Object.create(null),i=(o,l)=>{let a=r[o];if(a==null)r[o]=l;else if(a!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,l,a,c,u)=>{var h,f;let d=t[o]||(t[o]=Object.create(null)),p=l.split(/ (?!$)/).map(x=>hN(x,e));for(let x=1;x<p.length;x++){let O=p.slice(0,x).join(" ");i(O,!0),d[O]||(d[O]={preventDefault:!0,stopPropagation:!1,run:[b=>{let y=Zi={view:b,prefix:O,scope:o};return setTimeout(()=>{Zi==y&&(Zi=null)},pN),!0}]})}let g=p.join(" ");i(g,!1);let m=d[g]||(d[g]={preventDefault:!1,stopPropagation:!1,run:((f=(h=d._any)===null||h===void 0?void 0:h.run)===null||f===void 0?void 0:f.slice())||[]});a&&m.run.push(a),c&&(m.preventDefault=!0),u&&(m.stopPropagation=!0)};for(let o of n){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of l){let u=t[c]||(t[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:h}=o;for(let f in u)u[f].run.push(d=>h(d,vm))}let a=o[e]||o.key;if(a)for(let c of l)s(c,a,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(c,"Shift-"+a,o.shift,o.preventDefault,o.stopPropagation)}return t}let vm=null;function MT(n,e,t,r){vm=e;let i=PI(e),s=pn(i,0),o=Lr(s)==i.length&&i!=" ",l="",a=!1,c=!1,u=!1;Zi&&Zi.view==t&&Zi.scope==r&&(l=Zi.prefix+" ",vT.indexOf(e.keyCode)<0&&(c=!0,Zi=null));let h=new Set,f=m=>{if(m){for(let x of m.run)if(!h.has(x)&&(h.add(x),x(t)))return m.stopPropagation&&(u=!0),!0;m.preventDefault&&(m.stopPropagation&&(u=!0),c=!0)}return!1},d=n[r],p,g;return d&&(f(d[l+Gc(i,e,!o)])?a=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(le.windows&&e.ctrlKey&&e.altKey)&&!(le.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(p=Gi[e.keyCode])&&p!=i?(f(d[l+Gc(p,e,!0)])||e.shiftKey&&(g=Qa[e.keyCode])!=i&&g!=p&&f(d[l+Gc(g,e,!1)]))&&(a=!0):o&&e.shiftKey&&f(d[l+Gc(i,e,!0)])&&(a=!0),!a&&f(d._any)&&(a=!0)),c&&(a=!0),a&&u&&e.stopPropagation(),vm=null,a}class bc{constructor(e,t,r,i,s){this.className=e,this.left=t,this.top=r,this.width=i,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let s=LT(e);return[new bc(t,i.left-s.left,i.top-s.top,null,i.bottom-i.top)]}else return mN(e,t,r)}}function LT(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==Ue.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function $v(n,e,t,r){let i=n.coordsAtPos(e,t*2);if(!i)return r;let s=n.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,l=n.posAtCoords({x:s.left+1,y:o}),a=n.posAtCoords({x:s.right-1,y:o});return l==null||a==null?r:{from:Math.max(r.from,Math.min(l,a)),to:Math.min(r.to,Math.max(l,a))}}function mN(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let r=Math.max(t.from,n.viewport.from),i=Math.min(t.to,n.viewport.to),s=n.textDirection==Ue.LTR,o=n.contentDOM,l=o.getBoundingClientRect(),a=LT(n),c=o.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),h=l.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=l.right-(u?parseInt(u.paddingRight):0),d=gm(n,r,1),p=gm(n,i,-1),g=d.type==Xt.Text?d:null,m=p.type==Xt.Text?p:null;if(g&&(n.lineWrapping||d.widgetLineBreaks)&&(g=$v(n,r,1,g)),m&&(n.lineWrapping||p.widgetLineBreaks)&&(m=$v(n,i,-1,m)),g&&m&&g.from==m.from&&g.to==m.to)return O(b(t.from,t.to,g));{let S=g?b(t.from,null,g):y(d,!1),k=m?b(null,t.to,m):y(p,!0),w=[];return(g||d).to<(m||p).from-(g&&m?1:0)||d.widgetLineBreaks>1&&S.bottom+n.defaultLineHeight/2<k.top?w.push(x(h,S.bottom,f,k.top)):S.bottom<k.top&&n.elementAtHeight((S.bottom+k.top)/2).type==Xt.Text&&(S.bottom=k.top=(S.bottom+k.top)/2),O(S).concat(w).concat(O(k))}function x(S,k,w,C){return new bc(e,S-a.left,k-a.top,Math.max(0,w-S),C-k)}function O({top:S,bottom:k,horizontal:w}){let C=[];for(let T=0;T<w.length;T+=2)C.push(x(w[T],S,w[T+1],k));return C}function b(S,k,w){let C=1e9,T=-1e9,$=[];function D(F,j,fe,ee,be){let xe=n.coordsAtPos(F,F==w.to?-2:2),_e=n.coordsAtPos(fe,fe==w.from?2:-2);!xe||!_e||(C=Math.min(xe.top,_e.top,C),T=Math.max(xe.bottom,_e.bottom,T),be==Ue.LTR?$.push(s&&j?h:xe.left,s&&ee?f:_e.right):$.push(!s&&ee?h:_e.left,!s&&j?f:xe.right))}let M=S??w.from,Q=k??w.to;for(let F of n.visibleRanges)if(F.to>M&&F.from<Q)for(let j=Math.max(F.from,M),fe=Math.min(F.to,Q);;){let ee=n.state.doc.lineAt(j);for(let be of n.bidiSpans(ee)){let xe=be.from+ee.from,_e=be.to+ee.from;if(xe>=fe)break;_e>j&&D(Math.max(xe,j),S==null&&xe<=M,Math.min(_e,fe),k==null&&_e>=Q,be.dir)}if(j=ee.to+1,j>=fe)break}return $.length==0&&D(M,S==null,Q,k==null,n.textDirection),{top:C,bottom:T,horizontal:$}}function y(S,k){let w=l.top+(k?S.top:S.bottom);return{top:w,bottom:w,horizontal:[]}}}function ON(n,e){return n.constructor==e.constructor&&n.eq(e)}class xN{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Du)!=e.state.facet(Du)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,r=e.facet(Du);for(;t<r.length&&r[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((t,r)=>!ON(t,this.drawn[r]))){let t=this.dom.firstChild,r=0;for(let i of e)i.update&&t&&i.constructor&&this.drawn[r].constructor&&i.update(t,this.drawn[r])?(t=t.nextSibling,r++):this.dom.insertBefore(i.draw(),t);for(;t;){let i=t.nextSibling;t.remove(),t=i}this.drawn=e,le.safari&&le.safari_version>=26&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Du=ie.define();function RT(n){return[ft.define(e=>new xN(e,n)),Du.of(n)]}const La=ie.define({combine(n){return ei(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function bN(n={}){return[La.of(n),yN,vN,SN,lT.of(!0)]}function IT(n){return n.startState.facet(La)!=n.state.facet(La)}const yN=RT({above:!0,markers(n){let{state:e}=n,t=e.facet(La),r=[];for(let i of e.selection.ranges){let s=i==e.selection.main;if(i.empty||t.drawRangeCursor){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=i.empty?i:Z.cursor(i.head,i.head>i.anchor?-1:1);for(let a of bc.forRange(n,o,l))r.push(a)}}return r},update(n,e){n.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=IT(n);return t&&Av(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){Av(e.state,n)},class:"cm-cursorLayer"});function Av(n,e){e.style.animationDuration=n.facet(La).cursorBlinkRate+"ms"}const vN=RT({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:bc.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||IT(n)},class:"cm-selectionLayer"}),SN=yr.highest(U.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),DT=ye.define({map(n,e){return n==null?null:e.mapPos(n)}}),Zl=dt.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,r)=>r.is(DT)?r.value:t,n)}}),wN=ft.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(Zl);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(Zl)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(Zl),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let r=n.scrollDOM.getBoundingClientRect();return{left:t.left-r.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-r.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(Zl)!=n&&this.view.dispatch({effects:DT.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function kN(){return[Zl,wN]}function Mv(n,e,t,r,i){e.lastIndex=0;for(let s=n.iterRange(t,r),o=t,l;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;l=e.exec(s.value);)i(o+l.index,l)}function CN(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let r=[];for(let{from:i,to:s}of t)i=Math.max(n.state.doc.lineAt(i).from,i-e),s=Math.min(n.state.doc.lineAt(s).to,s+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=s:r.push({from:i,to:s});return r}class _N{constructor(e){const{regexp:t,decoration:r,decorate:i,boundary:s,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,i)this.addMatch=(l,a,c,u)=>i(u,c,c+l[0].length,l,a);else if(typeof r=="function")this.addMatch=(l,a,c,u)=>{let h=r(l,a,c);h&&u(c,c+l[0].length,h)};else if(r)this.addMatch=(l,a,c,u)=>u(c,c+l[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let t=new vn,r=t.add.bind(t);for(let{from:i,to:s}of CN(e,this.maxLength))Mv(e.state.doc,this.regexp,i,s,(o,l)=>this.addMatch(l,e,o,r));return t.finish()}updateDeco(e,t){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((s,o,l,a)=>{a>=e.view.viewport.from&&l<=e.view.viewport.to&&(r=Math.min(l,r),i=Math.max(a,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,t.map(e.changes),r,i):t}updateRange(e,t,r,i){for(let s of e.visibleRanges){let o=Math.max(s.from,r),l=Math.min(s.to,i);if(l>=o){let a=e.state.doc.lineAt(o),c=a.to<l?e.state.doc.lineAt(l):a,u=Math.max(s.from,a.from),h=Math.min(s.to,c.to);if(this.boundary){for(;o>a.from;o--)if(this.boundary.test(a.text[o-1-a.from])){u=o;break}for(;l<c.to;l++)if(this.boundary.test(c.text[l-c.from])){h=l;break}}let f=[],d,p=(g,m,x)=>f.push(x.range(g,m));if(a==c)for(this.regexp.lastIndex=u-a.from;(d=this.regexp.exec(a.text))&&d.index<h-a.from;)this.addMatch(d,e,d.index+a.from,p);else Mv(e.state.doc,this.regexp,u,h,(g,m)=>this.addMatch(m,e,g,p));t=t.update({filterFrom:u,filterTo:h,filter:(g,m)=>g<u||m>h,add:f})}}return t}}const Sm=/x/.unicode!=null?"gu":"g",TN=new RegExp(`[\0-\b
74
+ --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Sm),PN={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Gd=null;function EN(){var n;if(Gd==null&&typeof document<"u"&&document.body){let e=document.body.style;Gd=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Gd||!1}const Nu=ie.define({combine(n){let e=ei(n,{render:null,specialChars:TN,addSpecialChars:null});return(e.replaceTabs=!EN())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Sm)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Sm)),e}});function QN(n={}){return[Nu.of(n),$N()]}let Lv=null;function $N(){return Lv||(Lv=ft.fromClass(class{constructor(n){this.view=n,this.decorations=ce.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Nu)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new _N({regexp:n.specialChars,decoration:(e,t,r)=>{let{doc:i}=t.state,s=pn(e[0],0);if(s==9){let o=i.lineAt(r),l=t.state.tabSize,a=Or(o.text,l,r-o.from);return ce.replace({widget:new RN((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=ce.replace({widget:new LN(n,s)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Nu);n.startState.facet(Nu)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const AN="•";function MN(n){return n>=32?AN:n==10?"␤":String.fromCharCode(9216+n)}class LN extends Jn{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=MN(this.code),r=e.state.phrase("Control character")+" "+(PN[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,t);if(i)return i;let s=document.createElement("span");return s.textContent=t,s.title=r,s.setAttribute("aria-label",r),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class RN extends Jn{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function IN(){return NN}const DN=ce.line({class:"cm-activeLine"}),NN=ft.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(DN.range(i.from)),e=i.from)}return ce.set(t)}},{decorations:n=>n.decorations}),wm=2e3;function VN(n,e,t){let r=Math.min(e.line,t.line),i=Math.max(e.line,t.line),s=[];if(e.off>wm||t.off>wm||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let a=r;a<=i;a++){let c=n.doc.line(a);c.length<=l&&s.push(Z.range(c.from+o,c.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let a=r;a<=i;a++){let c=n.doc.line(a),u=nm(c.text,o,n.tabSize,!0);if(u<0)s.push(Z.cursor(c.to));else{let h=nm(c.text,l,n.tabSize);s.push(Z.range(c.from+u,c.from+h))}}}return s}function ZN(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function Rv(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),r=n.state.doc.lineAt(t),i=t-r.from,s=i>wm?-1:i==r.length?ZN(n,e.clientX):Or(r.text,n.state.tabSize,t-r.from);return{line:r.number,col:s,off:i}}function BN(n,e){let t=Rv(n,e),r=n.state.selection;return t?{update(i){if(i.docChanged){let s=i.changes.mapPos(i.startState.doc.line(t.line).from),o=i.state.doc.lineAt(s);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},r=r.map(i.changes)}},get(i,s,o){let l=Rv(n,i);if(!l)return r;let a=VN(n.state,t,l);return a.length?o?Z.create(a.concat(r.ranges)):Z.create(a):r}}:null}function FN(n){let e=(t=>t.altKey&&t.button==0);return U.mouseSelectionStyle.of((t,r)=>e(r)?BN(t,r):null)}const XN={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},zN={style:"cursor: crosshair"};function WN(n={}){let[e,t]=XN[n.key||"Alt"],r=ft.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||t(i))},keyup(i){(i.keyCode==e||!t(i))&&this.set(!1)},mousemove(i){this.set(t(i))}}});return[r,U.contentAttributes.of(i=>{var s;return!((s=i.plugin(r))===null||s===void 0)&&s.isDown?zN:null})]}const Kc="-10000px";class NT{constructor(e,t,r,i){this.facet=t,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=r(o,s))}update(e,t){var r;let i=e.state.facet(this.facet),s=i.filter(a=>a);if(i===this.input){for(let a of this.tooltipViews)a.update&&a.update(e);return!1}let o=[],l=t?[]:null;for(let a=0;a<s.length;a++){let c=s[a],u=-1;if(c){for(let h=0;h<this.tooltips.length;h++){let f=this.tooltips[h];f&&f.create==c.create&&(u=h)}if(u<0)o[a]=this.createTooltipView(c,a?o[a-1]:null),l&&(l[a]=!!c.above);else{let h=o[a]=this.tooltipViews[u];l&&(l[a]=t[u]),h.update&&h.update(e)}}}for(let a of this.tooltipViews)o.indexOf(a)<0&&(this.removeTooltipView(a),(r=a.destroy)===null||r===void 0||r.call(a));return t&&(l.forEach((a,c)=>t[c]=a),t.length=l.length),this.input=i,this.tooltips=s,this.tooltipViews=o,!0}}function jN(n){let e=n.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const Kd=ie.define({combine:n=>{var e,t,r;return{position:le.ios?"absolute":((e=n.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((r=n.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||jN}}}),Iv=new WeakMap,K1=ft.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(Kd);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new NT(n,J1,(t,r)=>this.createTooltip(t,r),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,r=n.state.facet(Kd);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),r=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",t.dom.appendChild(i)}return t.dom.style.position=this.position,t.dom.style.top=Kc,t.dom.style.left="0px",this.container.insertBefore(t.dom,r),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(n=r.destroy)===null||n===void 0||n.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(le.safari){let o=s.getBoundingClientRect();t=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}else t=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(t||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(n=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:n,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=Y1(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let l=this.manager.tooltipViews[o];return l.getCoords?l.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(Kd).tooltipSpace(this.view),scaleX:n,scaleY:e,makeAbsolute:t}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{visible:t,space:r,scaleX:i,scaleY:s}=n,o=[];for(let l=0;l<this.manager.tooltips.length;l++){let a=this.manager.tooltips[l],c=this.manager.tooltipViews[l],{dom:u}=c,h=n.pos[l],f=n.size[l];if(!h||a.clip!==!1&&(h.bottom<=Math.max(t.top,r.top)||h.top>=Math.min(t.bottom,r.bottom)||h.right<Math.max(t.left,r.left)-.1||h.left>Math.min(t.right,r.right)+.1)){u.style.top=Kc;continue}let d=a.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,p=d?7:0,g=f.right-f.left,m=(e=Iv.get(c))!==null&&e!==void 0?e:f.bottom-f.top,x=c.offset||YN,O=this.view.textDirection==Ue.LTR,b=f.width>r.right-r.left?O?r.left:r.right-f.width:O?Math.max(r.left,Math.min(h.left-(d?14:0)+x.x,r.right-g)):Math.min(Math.max(r.left,h.left-g+(d?14:0)-x.x),r.right-g),y=this.above[l];!a.strictSide&&(y?h.top-m-p-x.y<r.top:h.bottom+m+p+x.y>r.bottom)&&y==r.bottom-h.bottom>h.top-r.top&&(y=this.above[l]=!y);let S=(y?h.top-r.top:r.bottom-h.bottom)-p;if(S<m&&c.resize!==!1){if(S<this.view.defaultLineHeight){u.style.top=Kc;continue}Iv.set(c,m),u.style.height=(m=S)/s+"px"}else u.style.height&&(u.style.height="");let k=y?h.top-m-p-x.y:h.bottom+p+x.y,w=b+g;if(c.overlap!==!0)for(let C of o)C.left<w&&C.right>b&&C.top<k+m&&C.bottom>k&&(k=y?C.top-m-2-p:C.bottom+p+2);if(this.position=="absolute"?(u.style.top=(k-n.parent.top)/s+"px",Dv(u,(b-n.parent.left)/i)):(u.style.top=k/s+"px",Dv(u,b/i)),d){let C=h.left+(O?x.x:-x.x)-(b+14-7);d.style.left=C/i+"px"}c.overlap!==!0&&o.push({left:b,top:k,right:w,bottom:k+m}),u.classList.toggle("cm-tooltip-above",y),u.classList.toggle("cm-tooltip-below",!y),c.positioned&&c.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Kc}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Dv(n,e){let t=parseInt(n.style.left,10);(isNaN(t)||Math.abs(e-t)>1)&&(n.style.left=e+"px")}const qN=U.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),YN={x:0,y:0},J1=ie.define({enables:[K1,qN]}),Ih=ie.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class Yf{static create(e){return new Yf(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new NT(e,Ih,(t,r)=>this.createHostedView(t,r),t=>t.dom.remove())}createHostedView(e,t){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(t===void 0)t=i;else if(t!==i)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const HN=J1.compute([Ih],n=>{let e=n.facet(Ih);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var r;return(r=t.end)!==null&&r!==void 0?r:t.pos})),create:Yf.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class UN{constructor(e,t,r,i,s){this.view=e,this.source=t,this.field=r,this.setHover=i,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,r=e.docView.tile.nearest(t.target);if(!r)return;let i,s=1;if(r.isWidget())i=r.posAtStart;else{if(i=e.posAtCoords(t),i==null)return;let l=e.coordsAtPos(i);if(!l||t.y<l.top||t.y>l.bottom||t.x<l.left-e.defaultCharacterWidth||t.x>l.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(i)).find(u=>u.from<=i&&u.to>=i),c=a&&a.dir==Ue.RTL?-1:1;s=t.x<l.left?-c:c}let o=this.source(e,i,s);if(o?.then){let l=this.pending={pos:i};o.then(a=>{this.pending==l&&(this.pending=null,a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])}))},a=>On(e.state,a,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(K1),t=e?e.manager.tooltips.findIndex(r=>r.create==Yf.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:s}=this;if(i.length&&s&&!GN(s.dom,e)||this.pending){let{pos:o}=i[0]||this.pending,l=(r=(t=i[0])===null||t===void 0?void 0:t.end)!==null&&r!==void 0?r:o;(o==l?this.view.posAtCoords(this.lastMove)!=o:!KN(this.view,o,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=r=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Jc=4;function GN(n,e){let{left:t,right:r,top:i,bottom:s}=n.getBoundingClientRect(),o;if(o=n.querySelector(".cm-tooltip-arrow")){let l=o.getBoundingClientRect();i=Math.min(l.top,i),s=Math.max(l.bottom,s)}return e.clientX>=t-Jc&&e.clientX<=r+Jc&&e.clientY>=i-Jc&&e.clientY<=s+Jc}function KN(n,e,t,r,i,s){let o=n.scrollDOM.getBoundingClientRect(),l=n.documentTop+n.documentPadding.top+n.contentHeight;if(o.left>r||o.right<r||o.top>i||Math.min(o.bottom,l)<i)return!1;let a=n.posAtCoords({x:r,y:i},!1);return a>=e&&a<=t}function JN(n,e={}){let t=ye.define(),r=dt.define({create(){return[]},update(i,s){if(i.length&&(e.hideOnChange&&(s.docChanged||s.selection)?i=[]:e.hideOn&&(i=i.filter(o=>!e.hideOn(s,o))),s.docChanged)){let o=[];for(let l of i){let a=s.changes.mapPos(l.pos,-1,Ft.TrackDel);if(a!=null){let c=Object.assign(Object.create(null),l);c.pos=a,c.end!=null&&(c.end=s.changes.mapPos(c.end)),o.push(c)}}i=o}for(let o of s.effects)o.is(t)&&(i=o.value),o.is(eV)&&(i=[]);return i},provide:i=>Ih.from(i)});return{active:r,extension:[r,ft.define(i=>new UN(i,n,r,t,e.hoverTime||300)),HN]}}function VT(n,e){let t=n.plugin(K1);if(!t)return null;let r=t.manager.tooltips.indexOf(e);return r<0?null:t.manager.tooltipViews[r]}const eV=ye.define(),Nv=ie.define({combine(n){let e,t;for(let r of n)e=e||r.topContainer,t=t||r.bottomContainer;return{topContainer:e,bottomContainer:t}}});function e0(n,e){let t=n.plugin(ZT),r=t?t.specs.indexOf(e):-1;return r>-1?t.panels[r]:null}const ZT=ft.fromClass(class{constructor(n){this.input=n.state.facet(Ra),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(Nv);this.top=new eu(n,!0,e.topContainer),this.bottom=new eu(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(Nv);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new eu(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new eu(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(Ra);if(t!=this.input){let r=t.filter(a=>a),i=[],s=[],o=[],l=[];for(let a of r){let c=this.specs.indexOf(a),u;c<0?(u=a(n.view),l.push(u)):(u=this.panels[c],u.update&&u.update(n)),i.push(u),(u.top?s:o).push(u)}this.specs=r,this.panels=i,this.top.sync(s),this.bottom.sync(o);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let r of this.panels)r.update&&r.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>U.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class eu{constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=Vv(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=Vv(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Vv(n){let e=n.nextSibling;return n.remove(),e}const Ra=ie.define({enables:ZT});function tV(n,e){let t,r=new Promise(o=>t=o),i=o=>nV(o,e,t);n.state.field(Jd,!1)?n.dispatch({effects:BT.of(i)}):n.dispatch({effects:ye.appendConfig.of(Jd.init(()=>[i]))});let s=FT.of(i);return{close:s,result:r.then(o=>((n.win.queueMicrotask||(a=>n.win.setTimeout(a,10)))(()=>{n.state.field(Jd).indexOf(i)>-1&&n.dispatch({effects:s})}),o))}}const Jd=dt.define({create(){return[]},update(n,e){for(let t of e.effects)t.is(BT)?n=[t.value].concat(n):t.is(FT)&&(n=n.filter(r=>r!=t.value));return n},provide:n=>Ra.computeN([n],e=>e.field(n))}),BT=ye.define(),FT=ye.define();function nV(n,e,t){let r=e.content?e.content(n,()=>o(null)):null;if(!r){if(r=je("form"),e.input){let l=je("input",e.input);/^(text|password|number|email|tel|url)$/.test(l.type)&&l.classList.add("cm-textfield"),l.name||(l.name="input"),r.appendChild(je("label",(e.label||"")+": ",l))}else r.appendChild(document.createTextNode(e.label||""));r.appendChild(document.createTextNode(" ")),r.appendChild(je("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let i=r.nodeName=="FORM"?[r]:r.querySelectorAll("form");for(let l=0;l<i.length;l++){let a=i[l];a.addEventListener("keydown",c=>{c.keyCode==27?(c.preventDefault(),o(null)):c.keyCode==13&&(c.preventDefault(),o(a))}),a.addEventListener("submit",c=>{c.preventDefault(),o(a)})}let s=je("div",r,je("button",{onclick:()=>o(null),"aria-label":n.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(s.className=e.class),s.classList.add("cm-dialog");function o(l){s.contains(s.ownerDocument.activeElement)&&n.focus(),t(l)}return{dom:s,top:e.top,mount:()=>{if(e.focus){let l;typeof e.focus=="string"?l=r.querySelector(e.focus):l=r.querySelector("input")||r.querySelector("button"),l&&"select"in l?l.select():l&&"focus"in l&&l.focus()}}}}class Kr extends Ui{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Kr.prototype.elementClass="";Kr.prototype.toDOM=void 0;Kr.prototype.mapMode=Ft.TrackBefore;Kr.prototype.startSide=Kr.prototype.endSide=-1;Kr.prototype.point=!0;const Vu=ie.define(),rV=ie.define(),iV={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ee.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},ca=ie.define();function XT(n){return[zT(),ca.of({...iV,...n})]}const Zv=ie.define({combine:n=>n.some(e=>e)});function zT(n){return[sV]}const sV=ft.fromClass(class{constructor(n){this.view=n,this.domAfter=null,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(ca).map(e=>new Fv(n,e)),this.fixed=!n.state.facet(Zv);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}if(n.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(Zv)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let t=Ee.iter(this.view.state.facet(Vu),this.view.viewport.from),r=[],i=this.gutters.map(s=>new oV(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let o=!0;for(let l of s.type)if(l.type==Xt.Text&&o){km(t,r,l.from);for(let a of i)a.line(this.view,l,r);o=!1}else if(l.widget)for(let a of i)a.widget(this.view,l)}else if(s.type==Xt.Text){km(t,r,s.from);for(let o of i)o.line(this.view,s,r)}else if(s.widget)for(let o of i)o.widget(this.view,s);for(let s of i)s.finish();n&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(n){let e=n.startState.facet(ca),t=n.state.facet(ca),r=n.docChanged||n.heightChanged||n.viewportChanged||!Ee.eq(n.startState.facet(Vu),n.state.facet(Vu),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let s of t){let o=e.indexOf(s);o<0?i.push(new Fv(this.view,s)):(this.gutters[o].update(n),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:n=>U.scrollMargins.of(e=>{let t=e.plugin(n);if(!t||t.gutters.length==0||!t.fixed)return null;let r=t.dom.offsetWidth*e.scaleX,i=t.domAfter?t.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Ue.LTR?{left:r,right:i}:{right:r,left:i}})});function Bv(n){return Array.isArray(n)?n:[n]}function km(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class oV{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Ee.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,s=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==i.elements.length){let l=new WT(e,o,s,r);i.elements.push(l),i.dom.appendChild(l.dom)}else i.elements[this.i].update(e,o,s,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];km(this.cursor,i,t.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,t,i);s&&i.unshift(s);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let s of e.state.facet(rV)){let o=s(e,t.widget,t);o&&(i||(i=[])).push(o)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Fv{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let a=s.getBoundingClientRect();o=(a.top+a.bottom)/2}else o=i.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[r](e,l,i)&&i.preventDefault()});this.markers=Bv(t.markers(e)),t.initialSpacer&&(this.spacer=new WT(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Bv(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Ee.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class WT{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),lV(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let l=o,a=s<t.length?t[s++]:null,c=!1;if(a){let u=a.elementClass;u&&(r+=" "+u);for(let h=o;h<this.markers.length;h++)if(this.markers[h].compare(a)){l=h,c=!0;break}}else l=this.markers.length;for(;o<l;){let u=this.markers[o++];if(u.toDOM){u.destroy(i);let h=i.nextSibling;i.remove(),i=h}}if(!a)break;a.toDOM&&(c?i=i.nextSibling:this.dom.insertBefore(a.toDOM(e),i)),c&&o++}this.dom.className=r,this.markers=t}destroy(){this.setMarkers(null,[])}}function lV(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].compare(e[t]))return!1;return!0}const aV=ie.define(),cV=ie.define(),ho=ie.define({combine(n){return ei(n,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let r=Object.assign({},e);for(let i in t){let s=r[i],o=t[i];r[i]=s?(l,a,c)=>s(l,a,c)||o(l,a,c):o}return r}})}});class ep extends Kr{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function tp(n,e){return n.state.facet(ho).formatNumber(e,n.state)}const uV=ca.compute([ho],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(aV)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new ep(tp(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(cV)){let s=i(e,t,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(ho)!=e.state.facet(ho),initialSpacer(e){return new ep(tp(e,Xv(e.state.doc.lines)))},updateSpacer(e,t){let r=tp(t.view,Xv(t.view.state.doc.lines));return r==e.number?e:new ep(r)},domEventHandlers:n.facet(ho).domEventHandlers,side:"before"}));function t0(n={}){return[ho.of(n),zT(),uV]}function Xv(n){let e=9;for(;e<n;)e=e*10+9;return e}const hV=new class extends Kr{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},fV=Vu.compute(["selection"],n=>{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(hV.range(i)))}return Ee.of(e)});function dV(){return fV}const jT=1024;let pV=0,Xn=class{constructor(e,t){this.from=e,this.to=t}};class ve{constructor(e={}){this.id=pV++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Ct.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}ve.closedBy=new ve({deserialize:n=>n.split(" ")});ve.openedBy=new ve({deserialize:n=>n.split(" ")});ve.group=new ve({deserialize:n=>n.split(" ")});ve.isolate=new ve({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});ve.contextHash=new ve({perNode:!0});ve.lookAhead=new ve({perNode:!0});ve.mounted=new ve({perNode:!0});class wo{constructor(e,t,r,i=!1){this.tree=e,this.overlay=t,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[ve.mounted.id]}}const gV=Object.create(null);class Ct{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):gV,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Ct(e.name||"",t,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(ve.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(ve.group),s=-1;s<(i?i.length:0);s++){let o=t[s<0?r.name:i[s]];if(o)return o}}}}Ct.none=new Ct("",Object.create(null),0,8);class hl{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let i=null;for(let s of e){let o=s(r);if(o){i||(i=Object.assign({},r.props));let l=o[1],a=o[0];a.combine&&a.id in i&&(l=a.combine(i[a.id],l)),i[a.id]=l}}t.push(i?new Ct(r.name,i,r.id,r.flags):r)}return new hl(t)}}const tu=new WeakMap,zv=new WeakMap;var Ne;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays",n[n.EnterBracketed=16]="EnterBracketed"})(Ne||(Ne={}));class Qe{constructor(e,t,r,i,s){if(this.type=e,this.children=t,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=wo.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let i=r.toString();i&&(t&&(t+=","),t+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new Dh(this.topNode,e)}cursorAt(e,t=0,r=0){let i=tu.get(this)||this.topNode,s=new Dh(i);return s.moveTo(e,t),tu.set(this,s._tree),s}get topNode(){return new Yt(this,0,0,null)}resolve(e,t=0){let r=Ia(tu.get(this)||this.topNode,e,t,!1);return tu.set(this,r),r}resolveInner(e,t=0){let r=Ia(zv.get(this)||this.topNode,e,t,!0);return zv.set(this,r),r}resolveStack(e,t=0){return xV(this,e,t)}iterate(e){let{enter:t,leave:r,from:i=0,to:s=this.length}=e,o=e.mode||0,l=(o&Ne.IncludeAnonymous)>0;for(let a=this.cursor(o|Ne.IncludeAnonymous);;){let c=!1;if(a.from<=s&&a.to>=i&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;c=!0}for(;c&&r&&(l||!a.type.isAnonymous)&&r(a),!a.nextSibling();){if(!a.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:i0(Ct.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new Qe(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new Qe(Ct.none,t,r,i)))}static build(e){return bV(e)}}Qe.empty=new Qe(Ct.none,[],[],0);class n0{constructor(e,t){this.buffer=e,this.index=t}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]}get pos(){return this.index}next(){this.index-=4}fork(){return new n0(this.buffer,this.index)}}class Ji{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Ct.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],i=this.set.types[t],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,r,i,s){let{buffer:o}=this,l=-1;for(let a=e;a!=t&&!(qT(s,i,o[a+1],o[a+2])&&(l=a,r>0));a=o[a+3]);return l}slice(e,t,r){let i=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,a=0;l<t;){s[a++]=i[l++],s[a++]=i[l++]-r;let c=s[a++]=i[l++]-r;s[a++]=i[l++]-e,o=Math.max(o,c)}return new Ji(s,o,this.set)}}function qT(n,e,t,r){switch(n){case-2:return t<e;case-1:return r>=e&&t<e;case 0:return t<e&&r>e;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function Ia(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!r&&n instanceof Yt&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=r?0:Ne.IgnoreOverlays;if(r)for(let o=n,l=o.parent;l;o=l,l=o.parent)o instanceof Yt&&o.index<0&&((i=l.enter(e,t,s))===null||i===void 0?void 0:i.from)!=o.from&&(n=l);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class YT{cursor(e=0){return new Dh(this,e)}getChild(e,t=null,r=null){let i=Wv(this,e,t,r);return i.length?i[0]:null}getChildren(e,t=null,r=null){return Wv(this,e,t,r)}resolve(e,t=0){return Ia(this,e,t,!1)}resolveInner(e,t=0){return Ia(this,e,t,!0)}matchContext(e){return Cm(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),r=this;for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(r=t,t=i.prevSibling):t=i}return r}get node(){return this}get next(){return this.parent}}class Yt extends YT{constructor(e,t,r,i){super(),this._tree=e,this.from=t,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,r,i,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,c=t>0?l.length:-1;e!=c;e+=t){let u=l[e],h=a[e]+o.from,f;if(!(!(s&Ne.EnterBracketed&&u instanceof Qe&&(f=wo.get(u))&&!f.overlay&&f.bracketed&&r>=h&&r<=h+u.length)&&!qT(i,r,h,h+u.length))){if(u instanceof Ji){if(s&Ne.ExcludeBuffers)continue;let d=u.findChild(0,u.buffer.length,t,r-h,i);if(d>-1)return new Br(new mV(o,u,e,h),null,d)}else if(s&Ne.IncludeAnonymous||!u.type.isAnonymous||r0(u)){let d;if(!(s&Ne.IgnoreMounts)&&(d=wo.get(u))&&!d.overlay)return new Yt(d.tree,h,e,o);let p=new Yt(u,h,e,o);return s&Ne.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(t<0?u.children.length-1:0,t,r,i,s)}}}if(s&Ne.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,r=0){let i;if(!(r&Ne.IgnoreOverlays)&&(i=wo.get(this._tree))&&i.overlay){let s=e-this.from,o=r&Ne.EnterBracketed&&i.bracketed;for(let{from:l,to:a}of i.overlay)if((t>0||o?l<=s:l<s)&&(t<0||o?a>=s:a>s))return new Yt(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Wv(n,e,t,r){let i=n.cursor(),s=[];if(!i.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=i.type.is(t),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function Cm(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class mV{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class Br extends YT{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return s<0?null:new Br(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,r=0){if(r&Ne.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new Br(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Br(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Br(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let o=r.buffer[this.index+1];e.push(r.slice(i,s,o)),t.push(0)}return new Qe(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function HT(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let o=n[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let r=t instanceof Yt&&t.index<0?null:t.parent,i=n.slice();return r?i[e]=r:i.splice(e,1),new OV(i,t)}class OV{constructor(e,t){this.heads=e,this.node=t}get next(){return HT(this.heads)}}function xV(n,e,t){let r=n.resolveInner(e,t),i=null;for(let s=r instanceof Yt?r:r.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(i||(i=[r])).push(o.resolve(e,t)),s=o}else{let o=wo.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new Yt(o.tree,o.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(Ia(l,e,t,!1))}}return i?HT(i):r}class Dh{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~Ne.EnterBracketed,e instanceof Yt)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Yt?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&Ne.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Ne.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Ne.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:r}=i)}else({index:t,_parent:r}=this._tree);for(;r;{index:t,_parent:r}=r)if(t>-1)for(let s=t+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let l=r._tree.children[s];if(this.mode&Ne.IncludeAnonymous||l instanceof Ji||!l.type.isAnonymous||r0(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;t=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)t=new Br(this.buffer,t,this.stack[i]);return this.bufferNode=new Br(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return Cm(this.node.parent,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return Cm(this._tree,e,i);let o=r[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function r0(n){return n.children.some(e=>e instanceof Ji||!e.type.isAnonymous||r0(e))}function bV(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=jT,reused:s=[],minRepeatType:o=r.types.length}=n,l=Array.isArray(t)?new n0(t,t.length):t,a=r.types,c=0,u=0;function h(S,k,w,C,T,$){let{id:D,start:M,end:Q,size:F}=l,j=u,fe=c;if(F<0)if(l.next(),F==-1){let Ze=s[D];w.push(Ze),C.push(M-S);return}else if(F==-3){c=D;return}else if(F==-4){u=D;return}else throw new RangeError(`Unrecognized record size: ${F}`);let ee=a[D],be,xe,_e=M-S;if(Q-M<=i&&(xe=m(l.pos-k,T))){let Ze=new Uint16Array(xe.size-xe.skip),Te=l.pos-xe.size,Be=Ze.length;for(;l.pos>Te;)Be=x(xe.start,Ze,Be);be=new Ji(Ze,Q-xe.start,r),_e=xe.start-S}else{let Ze=l.pos-F;l.next();let Te=[],Be=[],Re=D>=o?D:-1,Le=0,$e=Q;for(;l.pos>Ze;)Re>=0&&l.id==Re&&l.size>=0?(l.end<=$e-i&&(p(Te,Be,M,Le,l.end,$e,Re,j,fe),Le=Te.length,$e=l.end),l.next()):$>2500?f(M,Ze,Te,Be):h(M,Ze,Te,Be,Re,$+1);if(Re>=0&&Le>0&&Le<Te.length&&p(Te,Be,M,Le,M,$e,Re,j,fe),Te.reverse(),Be.reverse(),Re>-1&&Le>0){let pe=d(ee,fe);be=i0(ee,Te,Be,0,Te.length,0,Q-M,pe,pe)}else be=g(ee,Te,Be,Q-M,j-Q,fe)}w.push(be),C.push(_e)}function f(S,k,w,C){let T=[],$=0,D=-1;for(;l.pos>k;){let{id:M,start:Q,end:F,size:j}=l;if(j>4)l.next();else{if(D>-1&&Q<D)break;D<0&&(D=F-i),T.push(M,Q,F),$++,l.next()}}if($){let M=new Uint16Array($*4),Q=T[T.length-2];for(let F=T.length-3,j=0;F>=0;F-=3)M[j++]=T[F],M[j++]=T[F+1]-Q,M[j++]=T[F+2]-Q,M[j++]=j;w.push(new Ji(M,T[2]-Q,r)),C.push(Q-S)}}function d(S,k){return(w,C,T)=>{let $=0,D=w.length-1,M,Q;if(D>=0&&(M=w[D])instanceof Qe){if(!D&&M.type==S&&M.length==T)return M;(Q=M.prop(ve.lookAhead))&&($=C[D]+M.length+Q)}return g(S,w,C,T,$,k)}}function p(S,k,w,C,T,$,D,M,Q){let F=[],j=[];for(;S.length>C;)F.push(S.pop()),j.push(k.pop()+w-T);S.push(g(r.types[D],F,j,$-T,M-$,Q)),k.push(T-w)}function g(S,k,w,C,T,$,D){if($){let M=[ve.contextHash,$];D=D?[M].concat(D):[M]}if(T>25){let M=[ve.lookAhead,T];D=D?[M].concat(D):[M]}return new Qe(S,k,w,C,D)}function m(S,k){let w=l.fork(),C=0,T=0,$=0,D=w.end-i,M={size:0,start:0,skip:0};e:for(let Q=w.pos-S;w.pos>Q;){let F=w.size;if(w.id==k&&F>=0){M.size=C,M.start=T,M.skip=$,$+=4,C+=4,w.next();continue}let j=w.pos-F;if(F<0||j<Q||w.start<D)break;let fe=w.id>=o?4:0,ee=w.start;for(w.next();w.pos>j;){if(w.size<0)if(w.size==-3||w.size==-4)fe+=4;else break e;else w.id>=o&&(fe+=4);w.next()}T=ee,C+=F,$+=fe}return(k<0||C==S)&&(M.size=C,M.start=T,M.skip=$),M.size>4?M:void 0}function x(S,k,w){let{id:C,start:T,end:$,size:D}=l;if(l.next(),D>=0&&C<o){let M=w;if(D>4){let Q=l.pos-(D-4);for(;l.pos>Q;)w=x(S,k,w)}k[--w]=M,k[--w]=$-S,k[--w]=T-S,k[--w]=C}else D==-3?c=C:D==-4&&(u=C);return w}let O=[],b=[];for(;l.pos>0;)h(n.start||0,n.bufferStart||0,O,b,-1,0);let y=(e=n.length)!==null&&e!==void 0?e:O.length?b[0]+O[0].length:0;return new Qe(a[n.topID],O.reverse(),b.reverse(),y)}const jv=new WeakMap;function Zu(n,e){if(!n.isAnonymous||e instanceof Ji||e.type!=n)return 1;let t=jv.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof Qe)){t=1;break}t+=Zu(n,r)}jv.set(e,t)}return t}function i0(n,e,t,r,i,s,o,l,a){let c=0;for(let p=r;p<i;p++)c+=Zu(n,e[p]);let u=Math.ceil(c*1.5/8),h=[],f=[];function d(p,g,m,x,O){for(let b=m;b<x;){let y=b,S=g[b],k=Zu(n,p[b]);for(b++;b<x;b++){let w=Zu(n,p[b]);if(k+w>=u)break;k+=w}if(b==y+1){if(k>u){let w=p[y];d(w.children,w.positions,0,w.children.length,g[y]+O);continue}h.push(p[y])}else{let w=g[b-1]+p[b-1].length-S;h.push(i0(n,p,g,y,b,S,w,null,a))}f.push(S+O-s)}}return d(e,t,r,i,0),(l||a)(h,f,o)}class UT{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof Br?this.setBuffer(e.context.buffer,e.index,t):e instanceof Yt&&this.map.set(e.tree,t)}get(e){return e instanceof Br?this.getBuffer(e.context.buffer,e.index):e instanceof Yt?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class xi{constructor(e,t,r,i,s=!1,o=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new xi(0,e.length,e,0,!1,r)];for(let s of t)s.to>e.length&&i.push(s);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,c=0;;l++){let u=l<t.length?t[l]:null,h=u?u.fromA:1e9;if(h-a>=r)for(;o&&o.from<h;){let f=o;if(a>=f.from||h<=f.to||c){let d=Math.max(f.from,a)-c,p=Math.min(f.to,h)-c;f=d>=p?null:new xi(d,p,f.tree,f.offset+c,l>0,!!u)}if(f&&i.push(f),o.to>h)break;o=s<e.length?e[s++]:null}if(!u)break;a=u.toA,c=u.toA-u.toB}return i}}class Hf{startParse(e,t,r){return typeof e=="string"&&(e=new yV(e)),r=r?r.length?r.map(i=>new Xn(i.from,i.to)):[new Xn(0,0)]:[new Xn(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let s=i.advance();if(s)return s}}}class yV{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function GT(n){return(e,t,r,i)=>new SV(e,n,t,r,i)}class qv{constructor(e,t,r,i,s,o){this.parser=e,this.parse=t,this.overlay=r,this.bracketed=i,this.target=s,this.from=o}}function Yv(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class vV{constructor(e,t,r,i,s,o,l,a){this.parser=e,this.predicate=t,this.mounts=r,this.index=i,this.start=s,this.bracketed=o,this.target=l,this.prev=a,this.depth=0,this.ranges=[]}}const _m=new ve({perNode:!0});class SV{constructor(e,t,r,i,s){this.nest=t,this.input=r,this.fragments=i,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new Qe(r.type,r.children,r.positions,r.length,r.propValues.concat([[_m,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[ve.mounted.id]=new wo(t,e.overlay,e.parser,e.bracketed),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new CV(this.fragments),t=null,r=null,i=new Dh(new Yt(this.baseTree,this.ranges[0].from,0,null),Ne.IncludeAnonymous|Ne.IgnoreMounts);e:for(let s,o;;){let l=!0,a;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)l=!1;else if(e.hasNode(i)){if(t){let c=t.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let h=u.from+c.pos,f=u.to+c.pos;h>=i.from&&f<=i.to&&!t.ranges.some(d=>d.from<f&&d.to>h)&&t.ranges.push({from:h,to:f})}}l=!1}else if(r&&(o=wV(r.ranges,i.from,i.to)))l=o!=2;else if(!i.type.isAnonymous&&(s=this.nest(i,this.input))&&(i.from<i.to||!s.overlay)){i.tree||(kV(i),t&&t.depth++,r&&r.depth++);let c=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")t=new vV(s.parser,s.overlay,c,this.inner.length,i.from,!!s.bracketed,i.tree,t);else{let u=Gv(this.ranges,s.overlay||(i.from<i.to?[new Xn(i.from,i.to)]:[]));u.length&&Yv(u),(u.length||!s.overlay)&&this.inner.push(new qv(s.parser,u.length?s.parser.startParse(this.input,Kv(c,u),u):s.parser.startParse(""),s.overlay?s.overlay.map(h=>new Xn(h.from-i.from,h.to-i.from)):null,!!s.bracketed,i.tree,u.length?u[0].from:i.from)),s.overlay?u.length&&(r={ranges:u,depth:0,prev:r}):l=!1}}else if(t&&(a=t.predicate(i))&&(a===!0&&(a=new Xn(i.from,i.to)),a.from<a.to)){let c=t.ranges.length-1;c>=0&&t.ranges[c].to==a.from?t.ranges[c]={from:t.ranges[c].from,to:a.to}:t.ranges.push(a)}if(l&&i.firstChild())t&&t.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(t&&!--t.depth){let c=Gv(this.ranges,t.ranges);c.length&&(Yv(c),this.inner.splice(t.index,0,new qv(t.parser,t.parser.startParse(this.input,Kv(t.mounts,c),c),t.ranges.map(u=>new Xn(u.from-t.start,u.to-t.start)),t.bracketed,t.target,c[0].from))),t=t.prev}r&&!--r.depth&&(r=r.prev)}}}}function wV(n,e,t){for(let r of n){if(r.from>=t)break;if(r.to>e)return r.from<=e&&r.to>=t?2:1}return 0}function Hv(n,e,t,r,i,s){if(e<t){let o=n.buffer[e+1];r.push(n.slice(e,t,o)),i.push(o-s)}}function kV(n){let{node:e}=n,t=[],r=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let i=n.tree,s=i.children.indexOf(r),o=i.children[s],l=o.buffer,a=[s];function c(u,h,f,d,p,g){let m=t[g],x=[],O=[];Hv(o,u,m,x,O,d);let b=l[m+1],y=l[m+2];a.push(x.length);let S=g?c(m+4,l[m+3],o.set.types[l[m]],b,y-b,g-1):e.toTree();return x.push(S),O.push(b-d),Hv(o,l[m+3],h,x,O,d),new Qe(f,x,O,p)}i.children[s]=c(0,l.length,Ct.none,0,o.length,t.length-1);for(let u of a){let h=n.tree.children[u],f=n.tree.positions[u];n.yield(new Yt(h,f+n.from,u,n._tree))}}class Uv{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(Ne.IncludeAnonymous|Ne.IgnoreMounts)}moveTo(e){let{cursor:t}=this,r=e-this.offset;for(;!this.done&&t.from<r;)t.to>=e&&t.enter(r,1,Ne.IgnoreOverlays|Ne.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof Qe)t=t.children[0];else break}return!1}}let CV=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(t=r.tree.prop(_m))!==null&&t!==void 0?t:r.to,this.inner=new Uv(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(_m))!==null&&e!==void 0?e:t.to,this.inner=new Uv(t.tree,-t.offset)}}findMounts(e,t){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(r=s.tree)===null||r===void 0?void 0:r.prop(ve.mounted);if(o&&o.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let a=this.fragments[l];if(a.from>=s.to)break;a.tree==this.curFrag.tree&&i.push({frag:a,pos:s.from-a.offset,mount:o})}}}return i}};function Gv(n,e){let t=null,r=e;for(let i=1,s=0;i<n.length;i++){let o=n[i-1].to,l=n[i].from;for(;s<r.length;s++){let a=r[s];if(a.from>=l)break;a.to<=o||(t||(r=t=e.slice()),a.from<o?(t[s]=new Xn(a.from,o),a.to>l&&t.splice(s+1,0,new Xn(l,a.to))):a.to>l?t[s--]=new Xn(l,a.to):t.splice(s--,1))}}return r}function _V(n,e,t,r){let i=0,s=0,o=!1,l=!1,a=-1e9,c=[];for(;;){let u=i==n.length?1e9:o?n[i].to:n[i].from,h=s==e.length?1e9:l?e[s].to:e[s].from;if(o!=l){let f=Math.max(a,t),d=Math.min(u,h,r);f<d&&c.push(new Xn(f,d))}if(a=Math.min(u,h),a==1e9)break;u==a&&(o?(o=!1,i++):o=!0),h==a&&(l?(l=!1,s++):l=!0)}return c}function Kv(n,e){let t=[];for(let{pos:r,mount:i,frag:s}of n){let o=r+(i.overlay?i.overlay[0].from:0),l=o+i.tree.length,a=Math.max(s.from,o),c=Math.min(s.to,l);if(i.overlay){let u=i.overlay.map(f=>new Xn(f.from+r,f.to+r)),h=_V(e,u,a,c);for(let f=0,d=a;;f++){let p=f==h.length,g=p?c:h[f].from;if(g>d&&t.push(new xi(d,g,i.tree,-o,s.from>=d||s.openStart,s.to<=g||s.openEnd)),p)break;d=h[f].to}}else t.push(new xi(a,c,i.tree,-o,s.from>=o||s.openStart,s.to<=l||s.openEnd))}return t}let TV=0;class Qn{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=TV++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof Qn&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let i=new Qn(r,[],null,[]);if(i.set.push(i),t)for(let s of t.set)i.set.push(s);return i}static defineModifier(e){let t=new Nh(e);return r=>r.modified.indexOf(t)>-1?r:Nh.get(r.base||r,r.modified.concat(t).sort((i,s)=>i.id-s.id))}}let PV=0;class Nh{constructor(e){this.name=e,this.instances=[],this.id=PV++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(l=>l.base==e&&EV(t,l.modified));if(r)return r;let i=[],s=new Qn(e.name,i,e,t);for(let l of t)l.instances.push(s);let o=QV(t);for(let l of e.set)if(!l.modified.length)for(let a of o)i.push(Nh.get(l,a));return s}}function EV(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function QV(n){let e=[[]];for(let t=0;t<n.length;t++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(n[t]));return e.sort((t,r)=>r.length-t.length)}function fl(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let s=[],o=2,l=i;for(let h=0;;){if(l=="..."&&h>0&&h+3==i.length){o=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!f)throw new RangeError("Invalid path: "+i);if(s.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),h+=f[0].length,h==i.length)break;let d=i[h++];if(h==i.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+i);l=i.slice(h)}let a=s.length-1,c=s[a];if(!c)throw new RangeError("Invalid path: "+i);let u=new Da(r,o,a>0?s.slice(0,a):null);e[c]=u.sort(e[c])}}return KT.add(e)}const KT=new ve({combine(n,e){let t,r,i;for(;n||e;){if(!n||e&&n.depth>=e.depth?(i=e,e=e.next):(i=n,n=n.next),t&&t.mode==i.mode&&!i.context&&!t.context)continue;let s=new Da(i.tags,i.mode,i.context);t?t.next=s:r=s,t=s}return r}});class Da{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Da.empty=new Da([],2,null);function JT(n,e){let t=Object.create(null);for(let s of n)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let o of s.tag)t[o.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let o=i;for(let l of s)for(let a of l.set){let c=t[a.id];if(c){o=o?o+" "+c:c;break}}return o},scope:r}}function $V(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function AV(n,e,t,r=0,i=n.length){let s=new MV(r,Array.isArray(e)?e:[e],t);s.highlightRange(n.cursor(),r,i,"",s.highlighters),s.flush(i)}class MV{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,s){let{type:o,from:l,to:a}=e;if(l>=r||a<=t)return;o.isTop&&(s=this.highlighters.filter(d=>!d.scope||d.scope(o)));let c=i,u=LV(e)||Da.empty,h=$V(s,u.tags);if(h&&(c&&(c+=" "),c+=h,u.mode==1&&(i+=(i?" ":"")+h)),this.startSpan(Math.max(t,l),c),u.opaque)return;let f=e.tree&&e.tree.prop(ve.mounted);if(f&&f.overlay){let d=e.node.enter(f.overlay[0].from+l,1),p=this.highlighters.filter(m=>!m.scope||m.scope(f.tree.type)),g=e.firstChild();for(let m=0,x=l;;m++){let O=m<f.overlay.length?f.overlay[m]:null,b=O?O.from+l:a,y=Math.max(t,x),S=Math.min(r,b);if(y<S&&g)for(;e.from<S&&(this.highlightRange(e,y,S,i,s),this.startSpan(Math.min(S,e.to),c),!(e.to>=b||!e.nextSibling())););if(!O||b>r)break;x=O.to+l,x>t&&(this.highlightRange(d.cursor(),Math.max(t,O.from+l),Math.min(r,x),"",p),this.startSpan(Math.min(r,x),c))}g&&e.parent()}else if(e.firstChild()){f&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,s),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function LV(n){let e=n.type.prop(KT);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const ne=Qn.define,nu=ne(),Ni=ne(),Jv=ne(Ni),eS=ne(Ni),Vi=ne(),ru=ne(Vi),np=ne(Vi),Pr=ne(),fs=ne(Pr),_r=ne(),Tr=ne(),Tm=ne(),_l=ne(Tm),iu=ne(),_={comment:nu,lineComment:ne(nu),blockComment:ne(nu),docComment:ne(nu),name:Ni,variableName:ne(Ni),typeName:Jv,tagName:ne(Jv),propertyName:eS,attributeName:ne(eS),className:ne(Ni),labelName:ne(Ni),namespace:ne(Ni),macroName:ne(Ni),literal:Vi,string:ru,docString:ne(ru),character:ne(ru),attributeValue:ne(ru),number:np,integer:ne(np),float:ne(np),bool:ne(Vi),regexp:ne(Vi),escape:ne(Vi),color:ne(Vi),url:ne(Vi),keyword:_r,self:ne(_r),null:ne(_r),atom:ne(_r),unit:ne(_r),modifier:ne(_r),operatorKeyword:ne(_r),controlKeyword:ne(_r),definitionKeyword:ne(_r),moduleKeyword:ne(_r),operator:Tr,derefOperator:ne(Tr),arithmeticOperator:ne(Tr),logicOperator:ne(Tr),bitwiseOperator:ne(Tr),compareOperator:ne(Tr),updateOperator:ne(Tr),definitionOperator:ne(Tr),typeOperator:ne(Tr),controlOperator:ne(Tr),punctuation:Tm,separator:ne(Tm),bracket:_l,angleBracket:ne(_l),squareBracket:ne(_l),paren:ne(_l),brace:ne(_l),content:Pr,heading:fs,heading1:ne(fs),heading2:ne(fs),heading3:ne(fs),heading4:ne(fs),heading5:ne(fs),heading6:ne(fs),contentSeparator:ne(Pr),list:ne(Pr),quote:ne(Pr),emphasis:ne(Pr),strong:ne(Pr),link:ne(Pr),monospace:ne(Pr),strikethrough:ne(Pr),inserted:ne(),deleted:ne(),changed:ne(),invalid:ne(),meta:iu,documentMeta:ne(iu),annotation:ne(iu),processingInstruction:ne(iu),definition:Qn.defineModifier("definition"),constant:Qn.defineModifier("constant"),function:Qn.defineModifier("function"),standard:Qn.defineModifier("standard"),local:Qn.defineModifier("local"),special:Qn.defineModifier("special")};for(let n in _){let e=_[n];e instanceof Qn&&(e.name=n)}JT([{tag:_.link,class:"tok-link"},{tag:_.heading,class:"tok-heading"},{tag:_.emphasis,class:"tok-emphasis"},{tag:_.strong,class:"tok-strong"},{tag:_.keyword,class:"tok-keyword"},{tag:_.atom,class:"tok-atom"},{tag:_.bool,class:"tok-bool"},{tag:_.url,class:"tok-url"},{tag:_.labelName,class:"tok-labelName"},{tag:_.inserted,class:"tok-inserted"},{tag:_.deleted,class:"tok-deleted"},{tag:_.literal,class:"tok-literal"},{tag:_.string,class:"tok-string"},{tag:_.number,class:"tok-number"},{tag:[_.regexp,_.escape,_.special(_.string)],class:"tok-string2"},{tag:_.variableName,class:"tok-variableName"},{tag:_.local(_.variableName),class:"tok-variableName tok-local"},{tag:_.definition(_.variableName),class:"tok-variableName tok-definition"},{tag:_.special(_.variableName),class:"tok-variableName2"},{tag:_.definition(_.propertyName),class:"tok-propertyName tok-definition"},{tag:_.typeName,class:"tok-typeName"},{tag:_.namespace,class:"tok-namespace"},{tag:_.className,class:"tok-className"},{tag:_.macroName,class:"tok-macroName"},{tag:_.propertyName,class:"tok-propertyName"},{tag:_.operator,class:"tok-operator"},{tag:_.comment,class:"tok-comment"},{tag:_.meta,class:"tok-meta"},{tag:_.invalid,class:"tok-invalid"},{tag:_.punctuation,class:"tok-punctuation"}]);var rp;const Wi=new ve;function Uf(n){return ie.define({combine:n?e=>e.concat(n):void 0})}const s0=new ve;class Mn{constructor(e,t,r=[],i=""){this.data=e,this.name=i,Ce.prototype.hasOwnProperty("tree")||Object.defineProperty(Ce.prototype,"tree",{get(){return qe(this)}}),this.parser=t,this.extension=[es.of(this),Ce.languageData.of((s,o,l)=>{let a=tS(s,o,l),c=a.type.prop(Wi);if(!c)return[];let u=s.facet(c),h=a.type.prop(s0);if(h){let f=a.resolve(o-a.from,l);for(let d of h)if(d.test(f,s)){let p=s.facet(d.facet);return d.type=="replace"?p:p.concat(u)}}return u})].concat(r)}isActiveAt(e,t,r=-1){return tS(e,t,r).type.prop(Wi)==this.data}findRegions(e){let t=e.facet(es);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(Wi)==this.data){r.push({from:o,to:o+s.length});return}let l=s.prop(ve.mounted);if(l){if(l.tree.prop(Wi)==this.data){if(l.overlay)for(let a of l.overlay)r.push({from:a.from+o,to:a.to+o});else r.push({from:o,to:o+s.length});return}else if(l.overlay){let a=r.length;if(i(l.tree,l.overlay[0].from+o),r.length>a)return}}for(let a=0;a<s.children.length;a++){let c=s.children[a];c instanceof Qe&&i(c,s.positions[a]+o)}};return i(qe(e),0),r}get allowsNesting(){return!0}}Mn.setState=ye.define();function tS(n,e,t){let r=n.facet(es),i=qe(n).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,t,Ne.ExcludeBuffers|Ne.EnterBracketed))s.type.isTop&&(i=s);return i}class Zo extends Mn{constructor(e,t,r){super(e,t,[],r),this.parser=t}static define(e){let t=Uf(e.languageData);return new Zo(t,e.parser.configure({props:[Wi.add(r=>r.isTop?t:void 0)]}),e.name)}configure(e,t){return new Zo(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function qe(n){let e=n.field(Mn.state,!1);return e?e.tree:Qe.empty}class RV{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e<r||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let Tl=null;class js{constructor(e,t,r=[],i,s,o,l,a){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new js(e,t,[],Qe.empty,0,r,[],null)}startParse(){return this.parser.startParse(new RV(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Qe.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(xi.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(xi.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Tl;Tl=this;try{return e()}finally{Tl=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=nS(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((c,u,h,f)=>a.push({fromA:c,toA:u,fromB:h,toB:f})),r=xi.applyChanges(r,a),i=Qe.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),h=e.mapPos(c.to,-1);u<h&&l.push({from:u,to:h})}}}return new js(this.parser,t,r,i,s,o,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=nS(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Hf{createParse(t,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let a=Tl;if(a){for(let c of i)a.tempSkipped.push(c);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new Qe(Ct.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Tl}}function nS(n,e,t){return xi.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Bo{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new Bo(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=js.create(e.facet(es).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new Bo(r)}}Mn.state=dt.define({create:Bo.init,update(n,e){for(let t of e.effects)if(t.is(Mn.setState))return t.value;return e.startState.facet(es)!=e.state.facet(es)?Bo.init(e.state):n.apply(e)}});let eP=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(eP=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const ip=typeof navigator<"u"&&(!((rp=navigator.scheduling)===null||rp===void 0)&&rp.isInputPending)?()=>navigator.scheduling.isInputPending():null,IV=ft.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Mn.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Mn.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=eP(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(Mn.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!ip?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<i&&r.doc.length>i+1e3,a=s.context.work(()=>ip&&ip()||Date.now()>o,i+(l?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Mn.setState.of(new Bo(s.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>On(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),es=ie.define({combine(n){return n.length?n[0]:null},enables:n=>[Mn.state,IV,U.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Fo{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class L{constructor(e,t,r,i,s,o=void 0){this.name=e,this.alias=t,this.extensions=r,this.filename=i,this.loadFunc=s,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:t,support:r}=e;if(!t){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(r)}return new L(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,t,r)}static matchFilename(e,t){for(let i of e)if(i.filename&&i.filename.test(t))return i;let r=/\.([^.]+)$/.exec(t);if(r){for(let i of e)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(e,t,r=!0){t=t.toLowerCase();for(let i of e)if(i.alias.some(s=>s==t))return i;if(r)for(let i of e)for(let s of i.alias){let o=t.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(t[o-1])&&!/\w/.test(t[o+s.length])))return i}return null}}const DV=ie.define(),yc=ie.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function qs(n){let e=n.facet(yc);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function Na(n,e){let t="",r=n.tabSize,i=n.facet(yc)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let s=0;s<e;s++)t+=i;return t}function o0(n,e){n instanceof Ce&&(n=new Gf(n));for(let r of n.state.facet(DV)){let i=r(n,e);if(i!==void 0)return i}let t=qe(n.state);return t.length>=e?NV(n,t,e):null}class Gf{constructor(e,t={}){this.state=e,this.options=t,this.unit=qs(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==e?{text:"",from:e}:(t<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,t);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.countColumn(r,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(s+=o-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,t=e.length){return Or(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const dl=new ve;function NV(n,e,t){let r=e.resolveStack(t),i=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(i!=r.node){let s=[];for(let o=i;o&&!(o.from<r.node.from||o.to>r.node.to||o.from==r.node.from&&o.type==r.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)r={node:s[o],next:r}}return tP(r,n,t)}function tP(n,e,t){for(let r=n;r;r=r.next){let i=ZV(r.node);if(i)return i(l0.create(e,t,r))}return 0}function VV(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function ZV(n){let e=n.type.prop(dl);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(ve.closedBy))){let i=n.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>nP(o,!0,1,void 0,s&&!VV(o)?i.from:void 0)}return n.parent==null?BV:null}function BV(){return 0}class l0 extends Gf{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new l0(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(FV(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return tP(this.context.next,this.base,this.pos)}}function FV(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function XV(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,s=n.state.doc.lineAt(t.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let l=t.to;;){let a=e.childAfter(l);if(!a||a==r)return null;if(!a.type.isSkipped){if(a.from>=o)return null;let c=/^ */.exec(s.text.slice(t.to-s.from))[0].length;return{from:t.from,to:t.to+c}}l=a.to}}function zV({closing:n,align:e=!0,units:t=1}){return r=>nP(r,e,t,n)}function nP(n,e,t,r,i){let s=n.textAfter,o=s.match(/^\s*/)[0].length,l=r&&s.slice(o,o+r.length)==r||i==n.pos+o,a=e?XV(n):null;return a?l?n.column(a.from):n.column(a.to):n.baseIndent+(l?0:n.unit*t)}const WV=n=>n.baseIndent;function Bu({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const jV=200;function qV(){return Ce.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:r}=n.newSelection.main,i=t.lineAt(r);if(r>i.from+jV)return n;let s=t.sliceString(i.from,r);if(!e.some(c=>c.test(s)))return n;let{state:o}=n,l=-1,a=[];for(let{head:c}of o.selection.ranges){let u=o.doc.lineAt(c);if(u.from==l)continue;l=u.from;let h=o0(o,u.from);if(h==null)continue;let f=/^\s*/.exec(u.text)[0],d=Na(o,h);f!=d&&a.push({from:u.from,to:u.from+f.length,insert:d})}return a.length?[n,{changes:a,sequential:!0}]:n})}const rP=ie.define(),pl=new ve;function iP(n){let e=n.firstChild,t=n.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?n.to:t.from}:null}function YV(n,e,t){let r=qe(n);if(r.length<t)return null;let i=r.resolveStack(t,1),s=null;for(let o=i;o;o=o.next){let l=o.node;if(l.to<=t||l.from>t)continue;if(s&&l.from<e)break;let a=l.type.prop(pl);if(a&&(l.to<r.length-50||r.length==n.doc.length||!HV(l))){let c=a(l,n);c&&c.from<=t&&c.from>=e&&c.to>t&&(s=c)}}return s}function HV(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function Vh(n,e,t){for(let r of n.facet(rP)){let i=r(n,e,t);if(i)return i}return YV(n,e,t)}function sP(n,e){let t=e.mapPos(n.from,1),r=e.mapPos(n.to,-1);return t>=r?void 0:{from:t,to:r}}const Kf=ye.define({map:sP}),vc=ye.define({map:sP});function oP(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(r=>r.from<=t&&r.to>=t)||e.push(n.lineBlockAt(t));return e}const Ys=dt.define({create(){return ce.none},update(n,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((t,r)=>n=rS(n,t,r)),n=n.map(e.changes);for(let t of e.effects)if(t.is(Kf)&&!UV(n,t.value.from,t.value.to)){let{preparePlaceholder:r}=e.state.facet(cP),i=r?ce.replace({widget:new rZ(r(e.state,t.value))}):iS;n=n.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(vc)&&(n=n.update({filter:(r,i)=>t.value.from!=r||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));return e.selection&&(n=rS(n,e.selection.main.head)),n},provide:n=>U.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(r,i)=>{t.push(r,i)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<n.length;){let r=n[t++],i=n[t++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(iS.range(r,i))}return ce.set(e,!0)}});function rS(n,e,t=e){let r=!1;return n.between(e,t,(i,s)=>{i<t&&s>e&&(r=!0)}),r?n.update({filterFrom:e,filterTo:t,filter:(i,s)=>i>=t||s<=e}):n}function Zh(n,e,t){var r;let i=null;return(r=n.field(Ys,!1))===null||r===void 0||r.between(e,t,(s,o)=>{(!i||i.from>s)&&(i={from:s,to:o})}),i}function UV(n,e,t){let r=!1;return n.between(e,e,(i,s)=>{i==e&&s==t&&(r=!0)}),r}function lP(n,e){return n.field(Ys,!1)?e:e.concat(ye.appendConfig.of(uP()))}const GV=n=>{for(let e of oP(n)){let t=Vh(n.state,e.from,e.to);if(t)return n.dispatch({effects:lP(n.state,[Kf.of(t),aP(n,t)])}),!0}return!1},KV=n=>{if(!n.state.field(Ys,!1))return!1;let e=[];for(let t of oP(n)){let r=Zh(n.state,t.from,t.to);r&&e.push(vc.of(r),aP(n,r,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function aP(n,e,t=!0){let r=n.state.doc.lineAt(e.from).number,i=n.state.doc.lineAt(e.to).number;return U.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${r} ${n.state.phrase("to")} ${i}.`)}const JV=n=>{let{state:e}=n,t=[];for(let r=0;r<e.doc.length;){let i=n.lineBlockAt(r),s=Vh(e,i.from,i.to);s&&t.push(Kf.of(s)),r=(s?n.lineBlockAt(s.to):i).to+1}return t.length&&n.dispatch({effects:lP(n.state,t)}),!!t.length},eZ=n=>{let e=n.state.field(Ys,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(r,i)=>{t.push(vc.of({from:r,to:i}))}),n.dispatch({effects:t}),!0},tZ=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:GV},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:KV},{key:"Ctrl-Alt-[",run:JV},{key:"Ctrl-Alt-]",run:eZ}],nZ={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},cP=ie.define({combine(n){return ei(n,nZ)}});function uP(n){return[Ys,oZ]}function hP(n,e){let{state:t}=n,r=t.facet(cP),i=o=>{let l=n.lineBlockAt(n.posAtDOM(o.target)),a=Zh(n.state,l.from,l.to);a&&n.dispatch({effects:vc.of(a)}),o.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,e);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",t.phrase("folded code")),s.title=t.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const iS=ce.replace({widget:new class extends Jn{toDOM(n){return hP(n,null)}}});class rZ extends Jn{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return hP(e,this.value)}}const iZ={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class sp extends Kr{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function sZ(n={}){let e={...iZ,...n},t=new sp(e,!0),r=new sp(e,!1),i=ft.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(es)!=o.state.facet(es)||o.startState.field(Ys,!1)!=o.state.field(Ys,!1)||qe(o.startState)!=qe(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new vn;for(let a of o.viewportLineBlocks){let c=Zh(o.state,a.from,a.to)?r:Vh(o.state,a.from,a.to)?t:null;c&&l.add(a.from,a.from,c)}return l.finish()}}),{domEventHandlers:s}=e;return[i,XT({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(i))===null||l===void 0?void 0:l.markers)||Ee.empty},initialSpacer(){return new sp(e,!1)},domEventHandlers:{...s,click:(o,l,a)=>{if(s.click&&s.click(o,l,a))return!0;let c=Zh(o.state,l.from,l.to);if(c)return o.dispatch({effects:vc.of(c)}),!0;let u=Vh(o.state,l.from,l.to);return u?(o.dispatch({effects:Kf.of(u)}),!0):!1}}}),uP()]}const oZ=U.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Sc{constructor(e,t){this.specs=e;let r;function i(l){let a=Ci.newName();return(r||(r=Object.create(null)))["."+a]=l,a}const s=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,o=t.scope;this.scope=o instanceof Mn?l=>l.prop(Wi)==o.data:o?l=>l==o:void 0,this.style=JT(e.map(l=>({tag:l.tag,class:l.class||i(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=r?new Ci(r):null,this.themeType=t.themeType}static define(e,t){return new Sc(e,t||{})}}const Pm=ie.define(),fP=ie.define({combine(n){return n.length?[n[0]]:null}});function op(n){let e=n.facet(Pm);return e.length?e:n.facet(fP)}function dP(n,e){let t=[aZ],r;return n instanceof Sc&&(n.module&&t.push(U.styleModule.of(n.module)),r=n.themeType),e?.fallback?t.push(fP.of(n)):r?t.push(Pm.computeN([U.darkTheme],i=>i.facet(U.darkTheme)==(r=="dark")?[n]:[])):t.push(Pm.of(n)),t}class lZ{constructor(e){this.markCache=Object.create(null),this.tree=qe(e.state),this.decorations=this.buildDeco(e,op(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=qe(e.state),r=op(e.state),i=r!=op(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!i&&t.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return ce.none;let r=new vn;for(let{from:i,to:s}of e.visibleRanges)AV(this.tree,t,(o,l,a)=>{r.add(o,l,this.markCache[a]||(this.markCache[a]=ce.mark({class:a})))},i,s);return r.finish()}}const aZ=yr.high(ft.fromClass(lZ,{decorations:n=>n.decorations})),cZ=Sc.define([{tag:_.meta,color:"#404740"},{tag:_.link,textDecoration:"underline"},{tag:_.heading,textDecoration:"underline",fontWeight:"bold"},{tag:_.emphasis,fontStyle:"italic"},{tag:_.strong,fontWeight:"bold"},{tag:_.strikethrough,textDecoration:"line-through"},{tag:_.keyword,color:"#708"},{tag:[_.atom,_.bool,_.url,_.contentSeparator,_.labelName],color:"#219"},{tag:[_.literal,_.inserted],color:"#164"},{tag:[_.string,_.deleted],color:"#a11"},{tag:[_.regexp,_.escape,_.special(_.string)],color:"#e40"},{tag:_.definition(_.variableName),color:"#00f"},{tag:_.local(_.variableName),color:"#30a"},{tag:[_.typeName,_.namespace],color:"#085"},{tag:_.className,color:"#167"},{tag:[_.special(_.variableName),_.macroName],color:"#256"},{tag:_.definition(_.propertyName),color:"#00c"},{tag:_.comment,color:"#940"},{tag:_.invalid,color:"#f00"}]),uZ=U.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),pP=1e4,gP="()[]{}",mP=ie.define({combine(n){return ei(n,{afterCursor:!0,brackets:gP,maxScanDistance:pP,renderMatch:dZ})}}),hZ=ce.mark({class:"cm-matchingBracket"}),fZ=ce.mark({class:"cm-nonmatchingBracket"});function dZ(n){let e=[],t=n.matched?hZ:fZ;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const pZ=dt.define({create(){return ce.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],r=e.state.facet(mP);for(let i of e.state.selection.ranges){if(!i.empty)continue;let s=Fr(e.state,i.head,-1,r)||i.head>0&&Fr(e.state,i.head-1,1,r)||r.afterCursor&&(Fr(e.state,i.head,1,r)||i.head<e.state.doc.length&&Fr(e.state,i.head+1,-1,r));s&&(t=t.concat(r.renderMatch(s,e.state)))}return ce.set(t,!0)},provide:n=>U.decorations.from(n)}),gZ=[pZ,uZ];function mZ(n={}){return[mP.of(n),gZ]}const OP=new ve;function Em(n,e,t){let r=n.prop(e<0?ve.openedBy:ve.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function Qm(n){let e=n.type.prop(OP);return e?e(n.node):n}function Fr(n,e,t,r={}){let i=r.maxScanDistance||pP,s=r.brackets||gP,o=qe(n),l=o.resolveInner(e,t);for(let a=l;a;a=a.parent){let c=Em(a.type,t,s);if(c&&a.from<a.to){let u=Qm(a);if(u&&(t>0?e>=u.from&&e<u.to:e>u.from&&e<=u.to))return OZ(n,e,t,a,u,c,s)}}return xZ(n,e,t,o,l.type,i,s)}function OZ(n,e,t,r,i,s,o){let l=r.parent,a={from:i.from,to:i.to},c=0,u=l?.cursor();if(u&&(t<0?u.childBefore(r.from):u.childAfter(r.to)))do if(t<0?u.to<=r.from:u.from>=r.to){if(c==0&&s.indexOf(u.type.name)>-1&&u.from<u.to){let h=Qm(u);return{start:a,end:h?{from:h.from,to:h.to}:void 0,matched:!0}}else if(Em(u.type,t,o))c++;else if(Em(u.type,-t,o)){if(c==0){let h=Qm(u);return{start:a,end:h&&h.from<h.to?{from:h.from,to:h.to}:void 0,matched:!1}}c--}}while(t<0?u.prevSibling():u.nextSibling());return{start:a,matched:!1}}function xZ(n,e,t,r,i,s,o){let l=t<0?n.sliceDoc(e-1,e):n.sliceDoc(e,e+1),a=o.indexOf(l);if(a<0||a%2==0!=t>0)return null;let c={from:t<0?e-1:e,to:t>0?e+1:e},u=n.doc.iterRange(e,t>0?n.doc.length:0),h=0;for(let f=0;!u.next().done&&f<=s;){let d=u.value;t<0&&(f+=d.length);let p=e+f*t;for(let g=t>0?0:d.length-1,m=t>0?d.length:-1;g!=m;g+=t){let x=o.indexOf(d[g]);if(!(x<0||r.resolveInner(p+g,1).type!=i))if(x%2==0==t>0)h++;else{if(h==1)return{start:c,end:{from:p+g,to:p+g+1},matched:x>>1==a>>1};h--}}t>0&&(f+=d.length)}return u.done?{start:c,matched:!1}:null}function sS(n,e,t,r=0,i=0){e==null&&(e=n.search(/[^\s\u00a0]/),e==-1&&(e=n.length));let s=i;for(let o=r;o<e;o++)n.charCodeAt(o)==9?s+=t-s%t:s++;return s}class xP{constructor(e,t,r,i){this.string=e,this.tabSize=t,this.indentUnit=r,this.overrideIndent=i,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e instanceof RegExp?e.test(t):e(t)),r)return++this.pos,t}eatWhile(e){let t=this.pos;for(;this.eat(e););return this.pos>t}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=sS(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var e;return(e=this.overrideIndent)!==null&&e!==void 0?e:sS(this.string,null,this.tabSize)}match(e,t,r){if(typeof e=="string"){let i=o=>r?o.toLowerCase():o,s=this.string.substr(this.pos,e.length);return i(s)==i(e)?(t!==!1&&(this.pos+=e.length),!0):null}else{let i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&t!==!1&&(this.pos+=i[0].length),i)}}current(){return this.string.slice(this.start,this.pos)}}function bZ(n){return{name:n.name||"",token:n.token,blankLine:n.blankLine||(()=>{}),startState:n.startState||(()=>!0),copyState:n.copyState||yZ,indent:n.indent||(()=>null),languageData:n.languageData||{},tokenTable:n.tokenTable||u0,mergeTokens:n.mergeTokens!==!1}}function yZ(n){if(typeof n!="object")return n;let e={};for(let t in n){let r=n[t];e[t]=r instanceof Array?r.slice():r}return e}const oS=new WeakMap;class a0 extends Mn{constructor(e){let t=Uf(e.languageData),r=bZ(e),i,s=new class extends Hf{createParse(o,l,a){return new SZ(i,o,l,a)}};super(t,s,[],e.name),this.topNode=CZ(t,this),i=this,this.streamParser=r,this.stateAfter=new ve({perNode:!0}),this.tokenTable=e.tokenTable?new SP(r.tokenTable):kZ}static define(e){return new a0(e)}getIndent(e){let t,{overrideIndentation:r}=e.options;r&&(t=oS.get(e.state),t!=null&&t<e.pos-1e4&&(t=void 0));let i=c0(this,e.node.tree,e.node.from,e.node.from,t??e.pos),s,o;if(i?(o=i.state,s=i.pos+1):(o=this.streamParser.startState(e.unit),s=e.node.from),e.pos-s>1e4)return null;for(;s<e.pos;){let a=e.state.doc.lineAt(s),c=Math.min(e.pos,a.to);if(a.length){let u=r?r(a.from):-1,h=new xP(a.text,e.state.tabSize,e.unit,u<0?void 0:u);for(;h.pos<c-a.from;)yP(this.streamParser.token,h,o)}else this.streamParser.blankLine(o,e.unit);if(c==e.pos)break;s=a.to+1}let l=e.lineAt(e.pos);return r&&t==null&&oS.set(e.state,l.from),this.streamParser.indent(o,/^\s*(.*)/.exec(l.text)[1],e)}get allowsNesting(){return!1}}function c0(n,e,t,r,i){let s=t>=r&&t+e.length<=i&&e.prop(n.stateAfter);if(s)return{state:n.streamParser.copyState(s),pos:t+e.length};for(let o=e.children.length-1;o>=0;o--){let l=e.children[o],a=t+e.positions[o],c=l instanceof Qe&&a<i&&c0(n,l,a,r,i);if(c)return c}return null}function bP(n,e,t,r,i){if(i&&t<=0&&r>=e.length)return e;!i&&t==0&&e.type==n.topNode&&(i=!0);for(let s=e.children.length-1;s>=0;s--){let o=e.positions[s],l=e.children[s],a;if(o<r&&l instanceof Qe){if(!(a=bP(n,l,t-o,r-o,i)))break;return i?new Qe(e.type,e.children.slice(0,s).concat(a),e.positions.slice(0,s+1),o+a.length):a}}return null}function vZ(n,e,t,r,i){for(let s of e){let o=s.from+(s.openStart?25:0),l=s.to-(s.openEnd?25:0),a=o<=t&&l>t&&c0(n,s.tree,0-s.offset,t,l),c;if(a&&a.pos<=r&&(c=bP(n,s.tree,t+s.offset,a.pos+s.offset,!1)))return{state:a.state,tree:c}}return{state:n.streamParser.startState(i?qs(i):4),tree:Qe.empty}}let SZ=class{constructor(e,t,r,i){this.lang=e,this.input=t,this.fragments=r,this.ranges=i,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=i[i.length-1].to;let s=js.get(),o=i[0].from,{state:l,tree:a}=vZ(e,r,o,this.to,s?.state);this.state=l,this.parsedPos=this.chunkStart=o+a.length;for(let c=0;c<a.children.length;c++)this.chunks.push(a.children[c]),this.chunkPos.push(a.positions[c]);s&&this.parsedPos<s.viewport.from-1e5&&i.some(c=>c.from<=s.viewport.from&&c.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState(qs(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=js.get(),t=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),r=Math.min(t,this.chunkStart+512);for(e&&(r=Math.min(r,e.viewport.to));this.parsedPos<r;)this.parseLine(e);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=t?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,t),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let t=this.input.chunk(e);if(this.input.lineChunks)t==`
75
+ `&&(t="");else{let r=t.indexOf(`
76
+ `);r>-1&&(t=t.slice(0,r))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),r=e+t.length;for(let i=this.rangeIndex;;){let s=this.ranges[i].to;if(s>=r||(t=t.slice(0,s-(r-t.length)),i++,i==this.ranges.length))break;let o=this.ranges[i].from,l=this.lineAfter(o);t+=l,r=o+l.length}return{line:t,end:r}}skipGapsTo(e,t,r){for(;;){let i=this.ranges[this.rangeIndex].to,s=e+t;if(r>0?i>s:i>=s)break;let o=this.ranges[++this.rangeIndex].from;t+=o-i}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,t,r,i){let s=4;if(this.ranges.length>1){i=this.skipGapsTo(t,i,1),t+=i;let l=this.chunk.length;i=this.skipGapsTo(r,i,-1),r+=i,s+=this.chunk.length-l}let o=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&o>=0&&this.chunk[o]==e&&this.chunk[o+2]==t?this.chunk[o+2]=r:this.chunk.push(e,t,r,s),i}parseLine(e){let{line:t,end:r}=this.nextLine(),i=0,{streamParser:s}=this.lang,o=new xP(t,e?e.state.tabSize:4,e?qs(e.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=yP(s.token,o,this.state);if(l&&(i=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,i)),o.start>1e4)break}this.parsedPos=r,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=Qe.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:wZ,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new Qe(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new Qe(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function yP(n,e,t){e.start=e.pos;for(let r=0;r<10;r++){let i=n(e,t);if(e.pos>e.start)return i}throw new Error("Stream parser failed to advance stream.")}const u0=Object.create(null),Va=[Ct.none],wZ=new hl(Va),lS=[],aS=Object.create(null),vP=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])vP[n]=wP(u0,e);class SP{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),vP)}resolve(e){return e?this.table[e]||(this.table[e]=wP(this.extra,e)):0}}const kZ=new SP(u0);function lp(n,e){lS.indexOf(n)>-1||(lS.push(n),console.warn(e))}function wP(n,e){let t=[];for(let l of e.split(" ")){let a=[];for(let c of l.split(".")){let u=n[c]||_[c];u?typeof u=="function"?a.length?a=a.map(u):lp(c,`Modifier ${c} used at start of tag`):a.length?lp(c,`Tag ${c} used as modifier`):a=Array.isArray(u)?u:[u]:lp(c,`Unknown highlighting tag ${c}`)}for(let c of a)t.push(c)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(l=>l.id),s=aS[i];if(s)return s.id;let o=aS[i]=Ct.define({id:Va.length,name:r,props:[fl({[r]:t})]});return Va.push(o),o.id}function CZ(n,e){let t=Ct.define({id:Va.length,name:"Document",props:[Wi.add(()=>n),dl.add(()=>r=>e.getIndent(r))],top:!0});return Va.push(t),t}Ue.RTL,Ue.LTR;class h0{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=qe(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),s=i.search(CP(e,!1));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function cS(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function _Z(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let s=1;s<i.length;s++)t[i[s]]=!0}let r=cS(e)+cS(t)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function kP(n){let e=n.map(i=>typeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:_Z(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:t}:null}}function TZ(n,e){return t=>{for(let r=qe(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}class uS{constructor(e,t,r,i){this.completion=e,this.source=t,this.match=r,this.score=i}}function Ts(n){return n.selection.main.from}function CP(n,e){var t;let{source:r}=n,i=e&&r[0]!="^",s=r[r.length-1]!="$";return!i&&!s?n:new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const f0=Ai.define();function PZ(n,e,t,r){let{main:i}=n.selection,s=t-i.from,o=r-i.from;return{...n.changeByRange(l=>{if(l!=i&&t!=r&&n.sliceDoc(l.from+s,l.from+o)!=n.sliceDoc(t,r))return{range:l};let a=n.toText(e);return{changes:{from:l.from+s,to:r==i.from?l.to:l.from+o,insert:a},range:Z.cursor(l.from+s+a.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const hS=new WeakMap;function EZ(n){if(!Array.isArray(n))return n;let e=hS.get(n);return e||hS.set(n,e=kP(n)),e}const Bh=ye.define(),Za=ye.define();class QZ{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let r=pn(e,t),i=Lr(r);this.chars.push(r);let s=e.slice(t,t+i),o=s.toUpperCase();this.folded.push(pn(o==s?s.toLowerCase():o,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:r,any:i,precise:s,byWord:o}=this;if(t.length==1){let O=pn(e,0),b=Lr(O),y=b==e.length?0:-100;if(O!=t[0])if(O==r[0])y+=-200;else return null;return this.ret(y,[0,b])}let l=e.indexOf(this.pattern);if(l==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,c=0;if(l<0){for(let O=0,b=Math.min(e.length,200);O<b&&c<a;){let y=pn(e,O);(y==t[c]||y==r[c])&&(i[c++]=O),O+=Lr(y)}if(c<a)return null}let u=0,h=0,f=!1,d=0,p=-1,g=-1,m=/[a-z]/.test(e),x=!0;for(let O=0,b=Math.min(e.length,200),y=0;O<b&&h<a;){let S=pn(e,O);l<0&&(u<a&&S==t[u]&&(s[u++]=O),d<a&&(S==t[d]||S==r[d]?(d==0&&(p=O),g=O+1,d++):d=0));let k,w=S<255?S>=48&&S<=57||S>=97&&S<=122?2:S>=65&&S<=90?1:0:(k=D1(S))!=k.toLowerCase()?1:k!=k.toUpperCase()?2:0;(!O||w==1&&m||y==0&&w!=0)&&(t[h]==S||r[h]==S&&(f=!0)?o[h++]=O:o.length&&(x=!1)),y=w,O+=Lr(S)}return h==a&&o[0]==0&&x?this.result(-100+(f?-200:0),o,e):d==a&&p==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):d==a?this.ret(-900-e.length,[p,g]):h==a?this.result(-100+(f?-200:0)+-700+(x?0:-1100),o,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],s=0;for(let o of t){let l=o+(this.astral?Lr(pn(r,o)):1);s&&i[s-1]==o?i[s-1]=l:(i[s++]=o,i[s++]=l)}return this.ret(e-r.length,i)}}class $Z{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),r=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,t.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const At=ie.define({combine(n){return ei(n,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:AZ,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>r=>fS(e(r),t(r)),optionClass:(e,t)=>r=>fS(e(r),t(r)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function fS(n,e){return n?e?n+" "+e:n:e}function AZ(n,e,t,r,i,s){let o=n.textDirection==Ue.RTL,l=o,a=!1,c="top",u,h,f=e.left-i.left,d=i.right-e.right,p=r.right-r.left,g=r.bottom-r.top;if(l&&f<Math.min(p,d)?l=!1:!l&&d<Math.min(p,f)&&(l=!0),p<=(l?f:d))u=Math.max(i.top,Math.min(t.top,i.bottom-g))-e.top,h=Math.min(400,l?f:d);else{a=!0,h=Math.min(400,(o?e.right:i.right-e.left)-30);let O=i.bottom-e.bottom;O>=g||O>e.top?u=t.bottom-e.top:(c="bottom",u=e.bottom-t.top)}let m=(e.bottom-e.top)/s.offsetHeight,x=(e.right-e.left)/s.offsetWidth;return{style:`${c}: ${u/m}px; max-width: ${h/x}px`,class:"cm-completionInfo-"+(a?o?"left-narrow":"right-narrow":l?"left":"right")}}function MZ(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),t.type&&r.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(t,r,i,s){let o=document.createElement("span");o.className="cm-completionLabel";let l=t.displayLabel||t.label,a=0;for(let c=0;c<s.length;){let u=s[c++],h=s[c++];u>a&&o.appendChild(document.createTextNode(l.slice(a,u)));let f=o.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(l.slice(u,h))),f.className="cm-completionMatchedText",a=h}return a<l.length&&o.appendChild(document.createTextNode(l.slice(a))),o},position:50},{render(t){if(!t.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=t.detail,r},position:80}),e.sort((t,r)=>t.position-r.position).map(t=>t.render)}function ap(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let r=Math.floor((n-e)/t);return{from:n-(r+1)*t,to:n-r*t}}class LZ{constructor(e,t,r){this.view=e,this.stateField=t,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:s,selected:o}=i.open,l=e.state.facet(At);this.optionContent=MZ(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=ap(s.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{let{options:c}=e.state.field(t).open;for(let u=a.target,h;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(h=/-(\d+)$/.exec(u.id))&&+h[1]<c.length){this.applyCompletion(e,c[+h[1]]),a.preventDefault();return}}),this.dom.addEventListener("focusout",a=>{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(At).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:Za.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:s,selected:o,disabled:l}=r.open;(!i.open||i.open.options!=s)&&(this.range=ap(s.length,o,e.state.facet(At).maxRenderedOptions),this.showOptions(s,r.id)),this.updateSel(),l!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of t.split(" "))r&&this.dom.classList.add(r);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=ap(t.options.length,t.selected,this.view.state.facet(At).maxRenderedOptions),this.showOptions(t.options,e.id));let r=this.updateSelectedOption(t.selected);if(r){this.destroyInfo();let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let o=typeof s=="string"?document.createTextNode(s):s(i);if(!o)return;"then"in o?o.then(l=>{l&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(l,i)}).catch(l=>On(this.view.state,l,"completion info")):(this.addInfoPane(o,i),r.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",r.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:s}=e;r.appendChild(i),this.infoDestroy=s||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),t=r):r.hasAttribute("aria-selected")&&(r.removeAttribute("aria-selected"),r.removeAttribute("aria-describedby"));return t&&IZ(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return i.top>Math.min(s.bottom,t.bottom)-10||i.bottom<Math.max(s.top,t.top)+10?null:this.view.state.facet(At).positionInfo(this.view,t,i,r,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,r){const i=document.createElement("ul");i.id=t,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",o=>{o.target==i&&o.preventDefault()});let s=null;for(let o=r.from;o<r.to;o++){let{completion:l,match:a}=e[o],{section:c}=l;if(c){let f=typeof c=="string"?c:c.name;if(f!=s&&(o>r.from||r.from==0))if(s=f,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let d=i.appendChild(document.createElement("completion-section"));d.textContent=f}}const u=i.appendChild(document.createElement("li"));u.id=t+"-"+o,u.setAttribute("role","option");let h=this.optionClass(l);h&&(u.className=h);for(let f of this.optionContent){let d=f(l,this.view.state,this.view,a);d&&u.appendChild(d)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function RZ(n,e){return t=>new LZ(t,n,e)}function IZ(n,e){let t=n.getBoundingClientRect(),r=e.getBoundingClientRect(),i=t.height/n.offsetHeight;r.top<t.top?n.scrollTop-=(t.top-r.top)/i:r.bottom>t.bottom&&(n.scrollTop+=(r.bottom-t.bottom)/i)}function dS(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function DZ(n,e){let t=[],r=null,i=null,s=u=>{t.push(u);let{section:h}=u.completion;if(h){r||(r=[]);let f=typeof h=="string"?h:h.name;r.some(d=>d.name==f)||r.push(typeof h=="string"?{name:f}:h)}},o=e.facet(At);for(let u of n)if(u.hasResult()){let h=u.result.getMatch;if(u.result.filter===!1)for(let f of u.result.options)s(new uS(f,u.source,h?h(f):[],1e9-t.length));else{let f=e.sliceDoc(u.from,u.to),d,p=o.filterStrict?new $Z(f):new QZ(f);for(let g of u.result.options)if(d=p.match(g.label)){let m=g.displayLabel?h?h(g,d.matched):[]:d.matched,x=d.score+(g.boost||0);if(s(new uS(g,u.source,m,x)),typeof g.section=="object"&&g.section.rank==="dynamic"){let{name:O}=g.section;i||(i=Object.create(null)),i[O]=Math.max(x,i[O]||-1e9)}}}}if(r){let u=Object.create(null),h=0,f=(d,p)=>(d.rank==="dynamic"&&p.rank==="dynamic"?i[p.name]-i[d.name]:0)||(typeof d.rank=="number"?d.rank:1e9)-(typeof p.rank=="number"?p.rank:1e9)||(d.name<p.name?-1:1);for(let d of r.sort(f))h-=1e5,u[d.name]=h;for(let d of t){let{section:p}=d.completion;p&&(d.score+=u[typeof p=="string"?p:p.name])}}let l=[],a=null,c=o.compareCompletions;for(let u of t.sort((h,f)=>f.score-h.score||c(h.completion,f.completion))){let h=u.completion;!a||a.label!=h.label||a.detail!=h.detail||a.type!=null&&h.type!=null&&a.type!=h.type||a.apply!=h.apply||a.boost!=h.boost?l.push(u):dS(u.completion)>dS(a)&&(l[l.length-1]=u),a=u.completion}return l}class fo{constructor(e,t,r,i,s,o){this.options=e,this.attrs=t,this.tooltip=r,this.timestamp=i,this.selected=s,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new fo(this.options,pS(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,r,i,s,o){if(i&&!o&&e.some(c=>c.isPending))return i.setDisabled();let l=DZ(e,t);if(!l.length)return i&&e.some(c=>c.isPending)?i.setDisabled():null;let a=t.facet(At).selectOnOpen?0:-1;if(i&&i.selected!=a&&i.selected!=-1){let c=i.options[i.selected].completion;for(let u=0;u<l.length;u++)if(l[u].completion==c){a=u;break}}return new fo(l,pS(r,a),{pos:e.reduce((c,u)=>u.hasResult()?Math.min(c,u.from):c,1e8),create:XZ,above:s.aboveCursor},i?i.timestamp:Date.now(),a,!1)}map(e){return new fo(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new fo(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Fh{constructor(e,t,r){this.active=e,this.id=t,this.open=r}static start(){return new Fh(BZ,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,r=t.facet(At),s=(r.override||t.languageDataAt("autocomplete",Ts(t)).map(EZ)).map(a=>(this.active.find(u=>u.source==a)||new zn(a,this.active.some(u=>u.state!=0)?1:0)).update(e,r));s.length==this.active.length&&s.every((a,c)=>a==this.active[c])&&(s=this.active);let o=this.open,l=e.effects.some(a=>a.is(d0));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(a=>a.hasResult()&&e.changes.touchesRange(a.from,a.to))||!NZ(s,this.active)||l?o=fo.build(s,t,this.id,o,r,l):o&&o.disabled&&!s.some(a=>a.isPending)&&(o=null),!o&&s.every(a=>!a.isPending)&&s.some(a=>a.hasResult())&&(s=s.map(a=>a.hasResult()?new zn(a.source,0):a));for(let a of e.effects)a.is(TP)&&(o=o&&o.setSelected(a.value,this.id));return s==this.active&&o==this.open?this:new Fh(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?VZ:ZZ}}function NZ(n,e){if(n==e)return!0;for(let t=0,r=0;;){for(;t<n.length&&!n[t].hasResult();)t++;for(;r<e.length&&!e[r].hasResult();)r++;let i=t==n.length,s=r==e.length;if(i||s)return i==s;if(n[t++].result!=e[r++].result)return!1}}const VZ={"aria-autocomplete":"list"},ZZ={};function pS(n,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":n};return e>-1&&(t["aria-activedescendant"]=n+"-"+e),t}const BZ=[];function _P(n,e){if(n.isUserEvent("input.complete")){let r=n.annotation(f0);if(r&&e.activateOnCompletion(r))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class zn{constructor(e,t,r=!1){this.source=e,this.state=t,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let r=_P(e,t),i=this;(r&8||r&16&&this.touches(e))&&(i=new zn(i.source,0)),r&4&&i.state==0&&(i=new zn(this.source,1)),i=i.updateFor(e,r);for(let s of e.effects)if(s.is(Bh))i=new zn(i.source,1,s.value);else if(s.is(Za))i=new zn(i.source,0);else if(s.is(d0))for(let o of s.value)o.source==i.source&&(i=o);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Ts(e.state))}}class ko extends zn{constructor(e,t,r,i,s,o){super(e,3,t),this.limit=r,this.result=i,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,t){var r;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=Ts(e.state);if(l>o||!i||t&2&&(Ts(e.startState)==this.from||l<this.limit))return new zn(this.source,t&4?1:0);let a=e.changes.mapPos(this.limit);return FZ(i.validFor,e.state,s,o)?new ko(this.source,this.explicit,a,i,s,o):i.update&&(i=i.update(i,s,o,new h0(e.state,l,!1)))?new ko(this.source,this.explicit,a,i,i.from,(r=i.to)!==null&&r!==void 0?r:Ts(e.state)):new zn(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new ko(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new zn(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function FZ(n,e,t,r){if(!n)return!1;let i=e.sliceDoc(t,r);return typeof n=="function"?n(i,t,r,e):CP(n,!0).test(i)}const d0=ye.define({map(n,e){return n.map(t=>t.map(e))}}),TP=ye.define(),gn=dt.define({create(){return Fh.start()},update(n,e){return n.update(e)},provide:n=>[J1.from(n,e=>e.tooltip),U.contentAttributes.from(n,e=>e.attrs)]});function p0(n,e){const t=e.completion.apply||e.completion.label;let r=n.state.field(gn).active.find(i=>i.source==e.source);return r instanceof ko?(typeof t=="string"?n.dispatch({...PZ(n.state,t,r.from,r.to),annotations:f0.of(e.completion)}):t(n,e.completion,r.from,r.to),!0):!1}const XZ=RZ(gn,p0);function su(n,e="option"){return t=>{let r=t.state.field(gn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<t.state.facet(At).interactionDelay)return!1;let i=1,s;e=="page"&&(s=VT(t,r.open.tooltip))&&(i=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:o}=r.open.options,l=r.open.selected>-1?r.open.selected+i*(n?1:-1):n?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),t.dispatch({effects:TP.of(l)}),!0}}const zZ=n=>{let e=n.state.field(gn,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<n.state.facet(At).interactionDelay?!1:p0(n,e.open.options[e.open.selected])},cp=n=>n.state.field(gn,!1)?(n.dispatch({effects:Bh.of(!0)}),!0):!1,WZ=n=>{let e=n.state.field(gn,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:Za.of(null)}),!0)};class jZ{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const qZ=50,YZ=1e3,HZ=ft.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(gn).active)e.isPending&&this.startQuery(e)}update(n){let e=n.state.field(gn),t=n.state.facet(At);if(!n.selectionSet&&!n.docChanged&&n.startState.field(gn)==e)return;let r=n.transactions.some(s=>{let o=_P(s,t);return o&8||(s.selection||s.docChanged)&&!(o&3)});for(let s=0;s<this.running.length;s++){let o=this.running[s];if(r||o.context.abortOnDocChange&&n.docChanged||o.updates.length+n.transactions.length>qZ&&Date.now()-o.time>YZ){for(let l of o.context.abortListeners)try{l()}catch(a){On(this.view.state,a)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(s=>s.effects.some(o=>o.is(Bh)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let s of n.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(gn);for(let t of e.active)t.isPending&&!this.running.some(r=>r.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(At).updateSyncTime))}startQuery(n){let{state:e}=this.view,t=Ts(e),r=new h0(e,t,n.explicit,this.view),i=new jZ(n,r);this.running.push(i),Promise.resolve(n.source(r)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:Za.of(null)}),On(this.view.state,s)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(At).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(At),r=this.view.state.field(gn);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(s.done===void 0)continue;if(this.running.splice(i--,1),s.done){let l=Ts(s.updates.length?s.updates[0].startState:this.view.state),a=Math.min(l,s.done.from+(s.active.explicit?0:1)),c=new ko(s.active.source,s.active.explicit,a,s.done,s.done.from,(n=s.done.to)!==null&&n!==void 0?n:l);for(let u of s.updates)c=c.update(u,t);if(c.hasResult()){e.push(c);continue}}let o=r.active.find(l=>l.source==s.active.source);if(o&&o.isPending)if(s.done==null){let l=new zn(s.active.source,0);for(let a of s.updates)l=l.update(a,t);l.isPending||e.push(l)}else this.startQuery(o)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:d0.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(gn,!1);if(e&&e.tooltip&&this.view.state.facet(At).closeOnBlur){let t=e.open&&VT(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Za.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Bh.of(!1)}),20),this.composing=0}}}),UZ=typeof navigator=="object"&&/Win/.test(navigator.platform),GZ=yr.highest(U.domEventHandlers({keydown(n,e){let t=e.state.field(gn,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(UZ&&n.altKey)||n.metaKey)return!1;let r=t.open.options[t.open.selected],i=t.active.find(o=>o.source==r.source),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(n.key)>-1&&p0(e,r),!1}})),PP=U.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class KZ{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class g0{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,Ft.TrackDel),r=e.mapPos(this.to,1,Ft.TrackDel);return t==null||r==null?null:new g0(this.field,t,r)}}class m0{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],s=e.doc.lineAt(t),o=/^\s*/.exec(s.text)[0];for(let a of this.lines){if(r.length){let c=o,u=/^\t*/.exec(a)[0].length;for(let h=0;h<u;h++)c+=e.facet(yc);i.push(t+c.length-u),a=c+a.slice(u)}r.push(a),t+=a.length+1}let l=this.fieldPositions.map(a=>new g0(a.field,i[a.line]+a.from,i[a.line]+a.to));return{text:r,ranges:l}}static parse(e){let t=[],r=[],i=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let l=s[1]?+s[1]:null,a=s[2]||s[3]||"",c=-1,u=a.replace(/\\[{}]/g,h=>h[1]);for(let h=0;h<t.length;h++)(l!=null?t[h].seq==l:u&&t[h].name==u)&&(c=h);if(c<0){let h=0;for(;h<t.length&&(l==null||t[h].seq!=null&&t[h].seq<l);)h++;t.splice(h,0,{seq:l,name:u}),c=h;for(let f of i)f.field>=c&&f.field++}for(let h of i)if(h.line==r.length&&h.from>s.index){let f=s[2]?3+(s[1]||"").length:2;h.from-=f,h.to-=f}i.push(new KZ(c,r.length,s.index,s.index+u.length)),o=o.slice(0,s.index)+a+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(l,a,c)=>{for(let u of i)u.line==r.length&&u.from>c&&(u.from--,u.to--);return a}),r.push(o)}return new m0(r,i)}}let JZ=ce.widget({widget:new class extends Jn{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),eB=ce.mark({class:"cm-snippetField"});class gl{constructor(e,t){this.ranges=e,this.active=t,this.deco=ce.set(e.map(r=>(r.from==r.to?JZ:eB).range(r.from,r.to)),!0)}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new gl(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const wc=ye.define({map(n,e){return n&&n.map(e)}}),tB=ye.define(),Ba=dt.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(wc))return t.value;if(t.is(tB)&&n)return new gl(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>U.decorations.from(n,e=>e?e.deco:ce.none)});function O0(n,e){return Z.create(n.filter(t=>t.field==e).map(t=>Z.range(t.from,t.to)))}function nB(n){let e=m0.parse(n);return(t,r,i,s)=>{let{text:o,ranges:l}=e.instantiate(t.state,i),{main:a}=t.state.selection,c={changes:{from:i,to:s==a.from?a.to:s,insert:De.of(o)},scrollIntoView:!0,annotations:r?[f0.of(r),yt.userEvent.of("input.complete")]:void 0};if(l.length&&(c.selection=O0(l,0)),l.some(u=>u.field>0)){let u=new gl(l,0),h=c.effects=[wc.of(u)];t.state.field(Ba,!1)===void 0&&h.push(ye.appendConfig.of([Ba,lB,aB,PP]))}t.dispatch(t.state.update(c))}}function EP(n){return({state:e,dispatch:t})=>{let r=e.field(Ba,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,s=n>0&&!r.ranges.some(o=>o.field==i+n);return t(e.update({selection:O0(r.ranges,i),effects:wc.of(s?null:new gl(r.ranges,i)),scrollIntoView:!0})),!0}}const rB=({state:n,dispatch:e})=>n.field(Ba,!1)?(e(n.update({effects:wc.of(null)})),!0):!1,iB=EP(1),sB=EP(-1),oB=[{key:"Tab",run:iB,shift:sB},{key:"Escape",run:rB}],gS=ie.define({combine(n){return n.length?n[0]:oB}}),lB=yr.highest(ul.compute([gS],n=>n.facet(gS)));function hn(n,e){return{...e,apply:nB(n)}}const aB=U.domEventHandlers({mousedown(n,e){let t=e.state.field(Ba,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:O0(t.ranges,i.field),effects:wc.of(t.ranges.some(s=>s.field>i.field)?new gl(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),Fa={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},vs=ye.define({map(n,e){let t=e.mapPos(n,-1,Ft.TrackAfter);return t??void 0}}),x0=new class extends Ui{};x0.startSide=1;x0.endSide=-1;const QP=dt.define({create(){return Ee.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:r=>r>=t.from&&r<=t.to})}for(let t of e.effects)t.is(vs)&&(n=n.update({add:[x0.range(t.value,t.value+1)]}));return n}});function cB(){return[hB,QP]}const up="()[]{}<>«»»«[]{}";function $P(n){for(let e=0;e<up.length;e+=2)if(up.charCodeAt(e)==n)return up.charAt(e+1);return D1(n<128?n:n+1)}function AP(n,e){return n.languageDataAt("closeBrackets",e)[0]||Fa}const uB=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),hB=U.inputHandler.of((n,e,t,r)=>{if((uB?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let i=n.state.selection.main;if(r.length>2||r.length==2&&Lr(pn(r,0))==1||e!=i.from||t!=i.to)return!1;let s=pB(n.state,r);return s?(n.dispatch(s),!0):!1}),fB=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let r=AP(n,n.selection.main.head).brackets||Fa.brackets,i=null,s=n.changeByRange(o=>{if(o.empty){let l=gB(n.doc,o.head);for(let a of r)if(a==l&&Jf(n.doc,o.head)==$P(pn(a,0)))return{changes:{from:o.head-a.length,to:o.head+a.length},range:Z.cursor(o.head-a.length)}}return{range:i=o}});return i||e(n.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},dB=[{key:"Backspace",run:fB}];function pB(n,e){let t=AP(n,n.selection.main.head),r=t.brackets||Fa.brackets;for(let i of r){let s=$P(pn(i,0));if(e==i)return s==i?xB(n,i,r.indexOf(i+i+i)>-1,t):mB(n,i,s,t.before||Fa.before);if(e==s&&MP(n,n.selection.main.from))return OB(n,i,s)}return null}function MP(n,e){let t=!1;return n.field(QP).between(0,n.doc.length,r=>{r==e&&(t=!0)}),t}function Jf(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Lr(pn(t,0)))}function gB(n,e){let t=n.sliceString(e-2,e);return Lr(pn(t,0))==t.length?t:t.slice(1)}function mB(n,e,t,r){let i=null,s=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:vs.of(o.to+e.length),range:Z.range(o.anchor+e.length,o.head+e.length)};let l=Jf(n.doc,o.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:e+t,from:o.head},effects:vs.of(o.head+e.length),range:Z.cursor(o.head+e.length)}:{range:i=o}});return i?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function OB(n,e,t){let r=null,i=n.changeByRange(s=>s.empty&&Jf(n.doc,s.head)==t?{changes:{from:s.head,to:s.head+t.length,insert:t},range:Z.cursor(s.head+t.length)}:r={range:s});return r?null:n.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function xB(n,e,t,r){let i=r.stringPrefixes||Fa.stringPrefixes,s=null,o=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:vs.of(l.to+e.length),range:Z.range(l.anchor+e.length,l.head+e.length)};let a=l.head,c=Jf(n.doc,a),u;if(c==e){if(mS(n,a))return{changes:{insert:e+e,from:a},effects:vs.of(a+e.length),range:Z.cursor(a+e.length)};if(MP(n,a)){let f=t&&n.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+f.length,insert:f},range:Z.cursor(a+f.length)}}}else{if(t&&n.sliceDoc(a-2*e.length,a)==e+e&&(u=OS(n,a-2*e.length,i))>-1&&mS(n,u))return{changes:{insert:e+e+e+e,from:a},effects:vs.of(a+e.length),range:Z.cursor(a+e.length)};if(n.charCategorizer(a)(c)!=it.Word&&OS(n,a,i)>-1&&!bB(n,a,e,i))return{changes:{insert:e+e,from:a},effects:vs.of(a+e.length),range:Z.cursor(a+e.length)}}return{range:s=l}});return s?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function mS(n,e){let t=qe(n).resolveInner(e+1);return t.parent&&t.from==e}function bB(n,e,t,r){let i=qe(n).resolveInner(e,-1),s=r.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=n.sliceDoc(i.from,Math.min(i.to,i.from+t.length+s)),a=l.indexOf(t);if(!a||a>-1&&r.indexOf(l.slice(0,a))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>t.length+a;){if(n.sliceDoc(u.to-t.length,u.to)==t)return!1;u=u.firstChild}return!0}let c=i.to==e&&i.parent;if(!c)break;i=c}return!1}function OS(n,e,t){let r=n.charCategorizer(e);if(r(n.sliceDoc(e-1,e))!=it.Word)return e;for(let i of t){let s=e-i.length;if(n.sliceDoc(s,e)==i&&r(n.sliceDoc(s-1,s))!=it.Word)return s}return-1}function yB(n={}){return[GZ,gn,At.of(n),HZ,vB,PP]}const LP=[{key:"Ctrl-Space",run:cp},{mac:"Alt-`",run:cp},{mac:"Alt-i",run:cp},{key:"Escape",run:WZ},{key:"ArrowDown",run:su(!0)},{key:"ArrowUp",run:su(!1)},{key:"PageDown",run:su(!0,"page")},{key:"PageUp",run:su(!1,"page")},{key:"Enter",run:zZ}],vB=yr.highest(ul.computeN([At],n=>n.facet(At).defaultKeymap?[LP]:[])),SB=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=y0(n.state,t.from);return r.line?wB(n):r.block?CB(n):!1};function b0(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const wB=b0(PB,0),kB=b0(RP,0),CB=b0((n,e)=>RP(n,e,TB(e)),0);function y0(n,e){let t=n.languageDataAt("commentTokens",e,1);return t.length?t[0]:{}}const Pl=50;function _B(n,{open:e,close:t},r,i){let s=n.sliceDoc(r-Pl,r),o=n.sliceDoc(i,i+Pl),l=/\s*$/.exec(s)[0].length,a=/^\s*/.exec(o)[0].length,c=s.length-l;if(s.slice(c-e.length,c)==e&&o.slice(a,a+t.length)==t)return{open:{pos:r-l,margin:l&&1},close:{pos:i+a,margin:a&&1}};let u,h;i-r<=2*Pl?u=h=n.sliceDoc(r,i):(u=n.sliceDoc(r,r+Pl),h=n.sliceDoc(i-Pl,i));let f=/^\s*/.exec(u)[0].length,d=/\s*$/.exec(h)[0].length,p=h.length-d-t.length;return u.slice(f,f+e.length)==e&&h.slice(p,p+t.length)==t?{open:{pos:r+f+e.length,margin:/\s/.test(u.charAt(f+e.length))?1:0},close:{pos:i-d-t.length,margin:/\s/.test(h.charAt(p-1))?1:0}}:null}function TB(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to);i.from>r.from&&i.from==t.to&&(i=t.to==r.to+1?r:n.doc.lineAt(t.to-1));let s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function RP(n,e,t=e.selection.ranges){let r=t.map(s=>y0(e,s.from).block);if(!r.every(s=>s))return null;let i=t.map((s,o)=>_B(e,r[o],s.from,s.to));if(n!=2&&!i.every(s=>s))return{changes:e.changes(t.map((s,o)=>i[o]?[]:[{from:s.from,insert:r[o].open+" "},{from:s.to,insert:" "+r[o].close}]))};if(n!=1&&i.some(s=>s)){let s=[];for(let o=0,l;o<i.length;o++)if(l=i[o]){let a=r[o],{open:c,close:u}=l;s.push({from:c.pos-a.open.length,to:c.pos+c.margin},{from:u.pos-u.margin,to:u.pos+a.close.length})}return{changes:s}}return null}function PB(n,e,t=e.selection.ranges){let r=[],i=-1;e:for(let{from:s,to:o}of t){let l=r.length,a=1e9,c;for(let u=s;u<=o;){let h=e.doc.lineAt(u);if(c==null&&(c=y0(e,h.from).line,!c))continue e;if(h.from>i&&(s==o||o>h.from)){i=h.from;let f=/^\s*/.exec(h.text)[0].length,d=f==h.length,p=h.text.slice(f,f+c.length)==c?f:-1;f<h.text.length&&f<a&&(a=f),r.push({line:h,comment:p,token:c,indent:f,empty:d,single:!1})}u=h.to+1}if(a<1e9)for(let u=l;u<r.length;u++)r[u].indent<r[u].line.text.length&&(r[u].indent=a);r.length==l+1&&(r[l].single=!0)}if(n!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:l,token:a,indent:c,empty:u,single:h}of r)(h||!u)&&s.push({from:l.from+c,insert:a+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:l,token:a}of r)if(l>=0){let c=o.from+l,u=c+a.length;o.text[u-o.from]==" "&&u++,s.push({from:c,to:u})}return{changes:s}}return null}const $m=Ai.define(),EB=Ai.define(),QB=ie.define(),IP=ie.define({combine(n){return ei(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}}),DP=dt.define({create(){return Xr.empty},update(n,e){let t=e.state.facet(IP),r=e.annotation($m);if(r){let a=xn.fromTransaction(e,r.selection),c=r.side,u=c==0?n.undone:n.done;return a?u=Xh(u,u.length,t.minDepth,a):u=ZP(u,e.startState.selection),new Xr(c==0?r.rest:u,c==0?u:r.rest)}let i=e.annotation(EB);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(yt.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let s=xn.fromTransaction(e),o=e.annotation(yt.time),l=e.annotation(yt.userEvent);return s?n=n.addChanges(s,o,l,t,e):e.selection&&(n=n.addSelection(e.startState.selection,o,l,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new Xr(n.done.map(xn.fromJSON),n.undone.map(xn.fromJSON))}});function $B(n={}){return[DP,IP.of(n),U.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?NP:e.inputType=="historyRedo"?Am:null;return r?(e.preventDefault(),r(t)):!1}})]}function ed(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(DP,!1);if(!i)return!1;let s=i.pop(n,t,e);return s?(r(s),!0):!1}}const NP=ed(0,!1),Am=ed(1,!1),AB=ed(0,!0),MB=ed(1,!0);class xn{constructor(e,t,r,i,s){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new xn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new xn(e.changes&&mt.fromJSON(e.changes),[],e.mapped&&jr.fromJSON(e.mapped),e.startSelection&&Z.fromJSON(e.startSelection),e.selectionsAfter.map(Z.fromJSON))}static fromTransaction(e,t){let r=Wn;for(let i of e.startState.facet(QB)){let s=i(e);s.length&&(r=r.concat(s))}return!r.length&&e.changes.empty?null:new xn(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,Wn)}static selection(e){return new xn(void 0,Wn,void 0,void 0,e)}}function Xh(n,e,t,r){let i=e+1>t+20?e-t-1:0,s=n.slice(i,e);return s.push(r),s}function LB(n,e){let t=[],r=!1;return n.iterChangedRanges((i,s)=>t.push(i,s)),e.iterChangedRanges((i,s,o,l)=>{for(let a=0;a<t.length;){let c=t[a++],u=t[a++];l>=c&&o<=u&&(r=!0)}}),r}function RB(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function VP(n,e){return n.length?e.length?n.concat(e):n:e}const Wn=[],IB=200;function ZP(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-IB));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),Xh(n,n.length-1,1e9,t.setSelAfter(r)))}else return[xn.selection([e])]}function DB(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function hp(n,e){if(!n.length)return n;let t=n.length,r=Wn;for(;t;){let i=NB(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let s=n.slice(0,t);return s[t-1]=i,s}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[xn.selection(r)]:Wn}function NB(n,e,t){let r=VP(n.selectionsAfter.length?n.selectionsAfter.map(l=>l.map(e)):Wn,t);if(!n.changes)return xn.selection(r);let i=n.changes.map(e),s=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(s):s;return new xn(i,ye.mapEffects(n.effects,e),o,n.startSelection.map(s),r)}const VB=/^(input\.type|delete)($|\.)/;class Xr{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Xr(this.done,this.undone):this}addChanges(e,t,r,i,s){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!r||VB.test(r))&&(!l.selectionsAfter.length&&t-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,LB(l.changes,e.changes))||r=="input.type.compose")?o=Xh(o,o.length-1,i.minDepth,new xn(e.changes.compose(l.changes),VP(ye.mapEffects(e.effects,l.changes),l.effects),l.mapped,l.startSelection,Wn)):o=Xh(o,o.length,i.minDepth,e),new Xr(o,Wn,t,r)}addSelection(e,t,r,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:Wn;return s.length>0&&t-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&RB(s[s.length-1],e)?this:new Xr(ZP(this.done,e),this.undone,t,r)}addMapping(e){return new Xr(hp(this.done,e),hp(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let s=i[i.length-1],o=s.selectionsAfter[0]||(s.startSelection?s.startSelection.map(s.changes.invertedDesc,1):t.selection);if(r&&s.selectionsAfter.length)return t.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:$m.of({side:e,rest:DB(i),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let l=i.length==1?Wn:i.slice(0,i.length-1);return s.mapped&&(l=hp(l,s.mapped)),t.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:$m.of({side:e,rest:l,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Xr.empty=new Xr(Wn,Wn);const ZB=[{key:"Mod-z",run:NP,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Am,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Am,preventDefault:!0},{key:"Mod-u",run:AB,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:MB,preventDefault:!0}];function ml(n,e){return Z.create(n.ranges.map(e),n.mainIndex)}function vr(n,e){return n.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Sr({state:n,dispatch:e},t){let r=ml(n.selection,t);return r.eq(n.selection,!0)?!1:(e(vr(n,r)),!0)}function td(n,e){return Z.cursor(e?n.to:n.from)}function BP(n,e){return Sr(n,t=>t.empty?n.moveByChar(t,e):td(t,e))}function Kt(n){return n.textDirectionAt(n.state.selection.main.head)==Ue.LTR}const FP=n=>BP(n,!Kt(n)),XP=n=>BP(n,Kt(n));function zP(n,e){return Sr(n,t=>t.empty?n.moveByGroup(t,e):td(t,e))}const BB=n=>zP(n,!Kt(n)),FB=n=>zP(n,Kt(n));function XB(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function nd(n,e,t){let r=qe(n).resolveInner(e.head),i=t?ve.closedBy:ve.openedBy;for(let a=e.head;;){let c=t?r.childAfter(a):r.childBefore(a);if(!c)break;XB(n,c,i)?r=c:a=t?c.to:c.from}let s=r.type.prop(i),o,l;return s&&(o=t?Fr(n,r.from,1):Fr(n,r.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?r.to:r.from,Z.cursor(l,t?-1:1)}const zB=n=>Sr(n,e=>nd(n.state,e,!Kt(n))),WB=n=>Sr(n,e=>nd(n.state,e,Kt(n)));function WP(n,e){return Sr(n,t=>{if(!t.empty)return td(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const jP=n=>WP(n,!1),qP=n=>WP(n,!0);function YP(n){let e=n.scrollDOM.clientHeight<n.scrollDOM.scrollHeight-2,t=0,r=0,i;if(e){for(let s of n.state.facet(U.scrollMargins)){let o=s(n);o?.top&&(t=Math.max(o?.top,t)),o?.bottom&&(r=Math.max(o?.bottom,r))}i=n.scrollDOM.clientHeight-t-r}else i=(n.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:r,selfScroll:e,height:Math.max(n.defaultLineHeight,i-5)}}function HP(n,e){let t=YP(n),{state:r}=n,i=ml(r.selection,o=>o.empty?n.moveVertically(o,e,t.height):td(o,e));if(i.eq(r.selection))return!1;let s;if(t.selfScroll){let o=n.coordsAtPos(r.selection.main.head),l=n.scrollDOM.getBoundingClientRect(),a=l.top+t.marginTop,c=l.bottom-t.marginBottom;o&&o.top>a&&o.bottom<c&&(s=U.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-a}))}return n.dispatch(vr(r,i),{effects:s}),!0}const xS=n=>HP(n,!1),Mm=n=>HP(n,!0);function as(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let s=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=Z.cursor(r.from+s))}return i}const jB=n=>Sr(n,e=>as(n,e,!0)),qB=n=>Sr(n,e=>as(n,e,!1)),YB=n=>Sr(n,e=>as(n,e,!Kt(n))),HB=n=>Sr(n,e=>as(n,e,Kt(n))),UB=n=>Sr(n,e=>Z.cursor(n.lineBlockAt(e.head).from,1)),GB=n=>Sr(n,e=>Z.cursor(n.lineBlockAt(e.head).to,-1));function KB(n,e,t){let r=!1,i=ml(n.selection,s=>{let o=Fr(n,s.head,-1)||Fr(n,s.head,1)||s.head>0&&Fr(n,s.head-1,1)||s.head<n.doc.length&&Fr(n,s.head+1,-1);if(!o||!o.end)return s;r=!0;let l=o.start.from==s.head?o.end.to:o.end.from;return Z.cursor(l)});return r?(e(vr(n,i)),!0):!1}const JB=({state:n,dispatch:e})=>KB(n,e);function er(n,e){let t=ml(n.state.selection,r=>{let i=e(r);return Z.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(vr(n.state,t)),!0)}function UP(n,e){return er(n,t=>n.moveByChar(t,e))}const GP=n=>UP(n,!Kt(n)),KP=n=>UP(n,Kt(n));function JP(n,e){return er(n,t=>n.moveByGroup(t,e))}const eF=n=>JP(n,!Kt(n)),tF=n=>JP(n,Kt(n)),nF=n=>er(n,e=>nd(n.state,e,!Kt(n))),rF=n=>er(n,e=>nd(n.state,e,Kt(n)));function eE(n,e){return er(n,t=>n.moveVertically(t,e))}const tE=n=>eE(n,!1),nE=n=>eE(n,!0);function rE(n,e){return er(n,t=>n.moveVertically(t,e,YP(n).height))}const bS=n=>rE(n,!1),yS=n=>rE(n,!0),iF=n=>er(n,e=>as(n,e,!0)),sF=n=>er(n,e=>as(n,e,!1)),oF=n=>er(n,e=>as(n,e,!Kt(n))),lF=n=>er(n,e=>as(n,e,Kt(n))),aF=n=>er(n,e=>Z.cursor(n.lineBlockAt(e.head).from)),cF=n=>er(n,e=>Z.cursor(n.lineBlockAt(e.head).to)),vS=({state:n,dispatch:e})=>(e(vr(n,{anchor:0})),!0),SS=({state:n,dispatch:e})=>(e(vr(n,{anchor:n.doc.length})),!0),wS=({state:n,dispatch:e})=>(e(vr(n,{anchor:n.selection.main.anchor,head:0})),!0),kS=({state:n,dispatch:e})=>(e(vr(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),uF=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),hF=({state:n,dispatch:e})=>{let t=rd(n).map(({from:r,to:i})=>Z.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:Z.create(t),userEvent:"select"})),!0},fF=({state:n,dispatch:e})=>{let t=ml(n.selection,r=>{let i=qe(n),s=i.resolveStack(r.from,1);if(r.empty){let o=i.resolveStack(r.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;o;o=o.next){let{node:l}=o;if((l.from<r.from&&l.to>=r.to||l.to>r.to&&l.from<=r.from)&&o.next)return Z.range(l.to,l.from)}return r});return t.eq(n.selection)?!1:(e(vr(n,t)),!0)};function iE(n,e){let{state:t}=n,r=t.selection,i=t.selection.ranges.slice();for(let s of t.selection.ranges){let o=t.doc.lineAt(s.head);if(e?o.to<n.state.doc.length:o.from>0)for(let l=s;;){let a=n.moveVertically(l,e);if(a.head<o.from||a.head>o.to){i.some(c=>c.head==a.head)||i.push(a);break}else{if(a.head==l.head)break;l=a}}}return i.length==r.ranges.length?!1:(n.dispatch(vr(t,Z.create(i,i.length-1))),!0)}const dF=n=>iE(n,!1),pF=n=>iE(n,!0),gF=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=Z.create([t.main]):t.main.empty||(r=Z.create([Z.cursor(t.main.head)])),r?(e(vr(n,r)),!0):!1};function kc(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(s=>{let{from:o,to:l}=s;if(o==l){let a=e(s);a<o?(t="delete.backward",a=ou(n,a,!1)):a>o&&(t="delete.forward",a=ou(n,a,!0)),o=Math.min(o,a),l=Math.max(l,a)}else o=ou(n,o,!1),l=ou(n,l,!0);return o==l?{range:s}:{changes:{from:o,to:l},range:Z.cursor(o,o<s.head?-1:1)}});return i.changes.empty?!1:(n.dispatch(r.update(i,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?U.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function ou(n,e,t){if(n instanceof U)for(let r of n.state.facet(U.atomicRanges).map(i=>i(n)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=t?s:i)});return e}const sE=(n,e,t)=>kc(n,r=>{let i=r.from,{state:s}=n,o=s.doc.lineAt(i),l,a;if(t&&!e&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(l=o.text.slice(0,i-o.from))){if(l[l.length-1]==" ")return i-1;let c=Or(l,s.tabSize),u=c%qs(s)||qs(s);for(let h=0;h<u&&l[l.length-1-h]==" ";h++)i--;a=i}else a=Mt(o.text,i-o.from,e,e)+o.from,a==i&&o.number!=(e?s.doc.lines:1)?a+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(a-o.from,i-o.from))&&(a=Mt(o.text,a-o.from,!1,!1)+o.from);return a}),Lm=n=>sE(n,!1,!0),oE=n=>sE(n,!0,!1),lE=(n,e)=>kc(n,t=>{let r=t.head,{state:i}=n,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let l=null;;){if(r==(e?s.to:s.from)){r==t.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let a=Mt(s.text,r-s.from,e)+s.from,c=s.text.slice(Math.min(r,a)-s.from,Math.max(r,a)-s.from),u=o(c);if(l!=null&&u!=l)break;(c!=" "||r!=t.head)&&(l=u),r=a}return r}),aE=n=>lE(n,!1),mF=n=>lE(n,!0),OF=n=>kc(n,e=>{let t=n.lineBlockAt(e.head).to;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),xF=n=>kc(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),bF=n=>kc(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),yF=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:De.of(["",""])},range:Z.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},vF=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,s=n.doc.lineAt(i),o=i==s.from?i-1:Mt(s.text,i-s.from,!1)+s.from,l=i==s.to?i+1:Mt(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:l,insert:n.doc.slice(i,l).append(n.doc.slice(o,i))},range:Z.cursor(l)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function rd(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),s=n.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=n.doc.lineAt(r.to-1)),t>=i.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});t=s.number+1}return e}function cE(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let s of rd(n)){if(t?s.to==n.doc.length:s.from==0)continue;let o=n.doc.lineAt(t?s.to+1:s.from-1),l=o.length+1;if(t){r.push({from:s.to,to:o.to},{from:s.from,insert:o.text+n.lineBreak});for(let a of s.ranges)i.push(Z.range(Math.min(n.doc.length,a.anchor+l),Math.min(n.doc.length,a.head+l)))}else{r.push({from:o.from,to:s.from},{from:s.to,insert:n.lineBreak+o.text});for(let a of s.ranges)i.push(Z.range(a.anchor-l,a.head-l))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:Z.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const SF=({state:n,dispatch:e})=>cE(n,e,!1),wF=({state:n,dispatch:e})=>cE(n,e,!0);function uE(n,e,t){if(n.readOnly)return!1;let r=[];for(let s of rd(n))t?r.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):r.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});let i=n.changes(r);return e(n.update({changes:i,selection:n.selection.map(i,t?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const kF=({state:n,dispatch:e})=>uE(n,e,!1),CF=({state:n,dispatch:e})=>uE(n,e,!0),_F=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(rd(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=ml(e.selection,i=>{let s;if(n.lineWrapping){let o=n.lineBlockAt(i.head),l=n.coordsAtPos(i.head,i.assoc||1);l&&(s=o.bottom+n.documentTop-l.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,s)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function TF(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=qe(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(ve.closedBy))&&s.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const CS=hE(!1),PF=hE(!0);function hE(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:o}=i,l=e.doc.lineAt(s),a=!n&&s==o&&TF(e,s);n&&(s=o=(o<=l.to?l:e.doc.lineAt(o)).to);let c=new Gf(e,{simulateBreak:s,simulateDoubleBreak:!!a}),u=o0(c,s);for(u==null&&(u=Or(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<l.to&&/\s/.test(l.text[o-l.from]);)o++;a?{from:s,to:o}=a:s>l.from&&s<l.from+100&&!/\S/.test(l.text.slice(0,s))&&(s=l.from);let h=["",Na(e,u)];return a&&h.push(Na(e,c.lineIndent(l.from,-1))),{changes:{from:s,to:o,insert:De.of(h)},range:Z.cursor(s+1+h[1].length)}});return t(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function v0(n,e){let t=-1;return n.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let l=n.doc.lineAt(o);l.number>t&&(r.empty||r.to>l.from)&&(e(l,i,r),t=l.number),o=l.to+1}let s=n.changes(i);return{changes:i,range:Z.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const EF=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new Gf(n,{overrideIndentation:s=>{let o=t[s];return o??-1}}),i=v0(n,(s,o,l)=>{let a=o0(r,s.from);if(a==null)return;/\S/.test(s.text)||(a=0);let c=/^\s*/.exec(s.text)[0],u=Na(n,a);(c!=u||l.from<s.from+c.length)&&(t[s.from]=a,o.push({from:s.from,to:s.from+c.length,insert:u}))});return i.changes.empty||e(n.update(i,{userEvent:"indent"})),!0},fE=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(v0(n,(t,r)=>{r.push({from:t.from,insert:n.facet(yc)})}),{userEvent:"input.indent"})),!0),dE=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(v0(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let s=Or(i,n.tabSize),o=0,l=Na(n,Math.max(0,s-qs(n)));for(;o<i.length&&o<l.length&&i.charCodeAt(o)==l.charCodeAt(o);)o++;r.push({from:t.from+o,to:t.from+i.length,insert:l.slice(o)})}),{userEvent:"delete.dedent"})),!0),QF=n=>(n.setTabFocusMode(),!0),$F=[{key:"Ctrl-b",run:FP,shift:GP,preventDefault:!0},{key:"Ctrl-f",run:XP,shift:KP},{key:"Ctrl-p",run:jP,shift:tE},{key:"Ctrl-n",run:qP,shift:nE},{key:"Ctrl-a",run:UB,shift:aF},{key:"Ctrl-e",run:GB,shift:cF},{key:"Ctrl-d",run:oE},{key:"Ctrl-h",run:Lm},{key:"Ctrl-k",run:OF},{key:"Ctrl-Alt-h",run:aE},{key:"Ctrl-o",run:yF},{key:"Ctrl-t",run:vF},{key:"Ctrl-v",run:Mm}],AF=[{key:"ArrowLeft",run:FP,shift:GP,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:BB,shift:eF,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:YB,shift:oF,preventDefault:!0},{key:"ArrowRight",run:XP,shift:KP,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:FB,shift:tF,preventDefault:!0},{mac:"Cmd-ArrowRight",run:HB,shift:lF,preventDefault:!0},{key:"ArrowUp",run:jP,shift:tE,preventDefault:!0},{mac:"Cmd-ArrowUp",run:vS,shift:wS},{mac:"Ctrl-ArrowUp",run:xS,shift:bS},{key:"ArrowDown",run:qP,shift:nE,preventDefault:!0},{mac:"Cmd-ArrowDown",run:SS,shift:kS},{mac:"Ctrl-ArrowDown",run:Mm,shift:yS},{key:"PageUp",run:xS,shift:bS},{key:"PageDown",run:Mm,shift:yS},{key:"Home",run:qB,shift:sF,preventDefault:!0},{key:"Mod-Home",run:vS,shift:wS},{key:"End",run:jB,shift:iF,preventDefault:!0},{key:"Mod-End",run:SS,shift:kS},{key:"Enter",run:CS,shift:CS},{key:"Mod-a",run:uF},{key:"Backspace",run:Lm,shift:Lm,preventDefault:!0},{key:"Delete",run:oE,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:aE,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:mF,preventDefault:!0},{mac:"Mod-Backspace",run:xF,preventDefault:!0},{mac:"Mod-Delete",run:bF,preventDefault:!0}].concat($F.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),MF=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:zB,shift:nF},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:WB,shift:rF},{key:"Alt-ArrowUp",run:SF},{key:"Shift-Alt-ArrowUp",run:kF},{key:"Alt-ArrowDown",run:wF},{key:"Shift-Alt-ArrowDown",run:CF},{key:"Mod-Alt-ArrowUp",run:dF},{key:"Mod-Alt-ArrowDown",run:pF},{key:"Escape",run:gF},{key:"Mod-Enter",run:PF},{key:"Alt-l",mac:"Ctrl-l",run:hF},{key:"Mod-i",run:fF,preventDefault:!0},{key:"Mod-[",run:dE},{key:"Mod-]",run:fE},{key:"Mod-Alt-\\",run:EF},{key:"Shift-Mod-k",run:_F},{key:"Shift-Mod-\\",run:JB},{key:"Mod-/",run:SB},{key:"Alt-A",run:kB},{key:"Ctrl-m",mac:"Shift-Alt-m",run:QF}].concat(AF),LF={key:"Tab",run:fE,shift:dE};var _S={};class zh{constructor(e,t,r,i,s,o,l,a,c,u=0,h){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=s,this.score=o,this.buffer=l,this.bufferBase=a,this.curContext=c,this.lookAhead=u,this.parent=h}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new zh(e,[],t,r,r,0,[],0,i?new TS(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),l=s.dynamicPrecedence(i);if(l&&(this.score+=l),r==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let a=this.stack.length-(r-1)*3-(e&262144?6:0),c=a?this.stack[a-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let h=a?this.stack[a-1]:0,f=this.bufferBase+this.buffer.length-h;if(i<s.minRepeatTerm||e&131072){let d=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,c,d,f+4,!0)}if(e&262144)this.state=this.stack[a];else{let d=this.stack[a-3];this.state=s.getGoto(d,i,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,t,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,l=this.buffer.length;if(l==0&&o.parent&&(l=o.bufferBase-o.parent.bufferBase,o=o.parent),l>0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(t==r)return;if(o.buffer[l-2]>=t){o.buffer[l-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,t,r,i);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let l=!1;for(let a=o;a>0&&this.buffer[a-2]>r;a-=4)if(this.buffer[a-1]>=0){l=!0;break}if(l)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;this.pos=i;let l=o.stateFlag(s,1);!l&&(i>r||t<=o.maxNode)&&(this.reducePos=i),this.pushState(s,l?r:Math.min(r,this.reducePos)),this.shiftContext(t,r),t<=o.maxNode&&this.buffer.push(t,r,i,4)}else this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4)}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new zh(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new RF(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if((r&65536)==0)return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let s=0,o;s<t.length;s+=2)(o=t[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(t[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<t.length;s+=2){let o=t[s+1];i.some((l,a)=>a&1&&l==o)||i.push(t[s],o)}t=i}let r=[];for(let i=0;i<t.length&&r.length<4;i+=2){let s=t[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let r=t>>19,i=t&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,s)=>{if(!t.includes(i))return t.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-s;if(l>1){let a=o&65535,c=this.stack.length-l*3;if(c>=0&&e.getGoto(this.stack[c],a,!1)>=0)return l<<19|65536|a}}else{let l=r(o,s+1);if(l!=null)return l}})};return r(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:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new TS(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class TS{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class RF{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class Wh{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Wh(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.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 Wh(this.stack,this.pos,this.index)}}function Bl(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r<n.length;){let s=0;for(;;){let o=n.charCodeAt(r++),l=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),s+=a,l)break;s*=46}t?t[i++]=s:t=new e(s)}return t}class Fu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const PS=new Fu;class IF{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=PS,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let o=this.ranges[--i];s-=r.from-o.to,r=o}for(;t<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-r.to,r=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(t);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,l=this.range;for(;l.to<=r;)l=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>l.to&&(this.chunk2=this.chunk2.slice(0,l.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,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(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,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(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=PS,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class Co{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;pE(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}Co.prototype.contextual=Co.prototype.fallback=Co.prototype.extend=!1;class jh{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?Bl(e):e}token(e,t){let r=e.pos,i=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(pE(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,o==null)break;e.reset(o,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}jh.prototype.contextual=Co.prototype.fallback=Co.prototype.extend=!1;class Nn{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function pE(n,e,t,r,i,s){let o=0,l=1<<r,{dialect:a}=t.p.parser;e:for(;(l&n[o])!=0;){let c=n[o+1];for(let d=o+3;d<c;d+=2)if((n[d+1]&l)>0){let p=n[d];if(a.allows(p)&&(e.token.value==-1||e.token.value==p||DF(p,e.token.value,i,s))){e.acceptToken(p);break}}let u=e.next,h=0,f=n[o+2];if(e.next<0&&f>h&&n[c+f*3-3]==65535){o=n[c+f*3-1];continue e}for(;h<f;){let d=h+f>>1,p=c+d+(d<<1),g=n[p],m=n[p+1]||65536;if(u<g)f=d;else if(u>=m)h=d+1;else{o=n[p+2],e.advance();continue e}}break}}function ES(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function DF(n,e,t,r){let i=ES(t,r,e);return i<0||ES(t,r,n)<i}const wn=typeof process<"u"&&_S&&/\bparse\b/.test(_S.LOG);let fp=null;function QS(n,e,t){let r=n.cursor(Ne.IncludeAnonymous);for(r.moveTo(e);;)if(!(t<0?r.childBefore(e):r.childAfter(e)))for(;;){if((t<0?r.to<e:r.from>e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}let NF=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?QS(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?QS(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let r=this.trees[t],i=this.index[t];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[t]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof Qe){if(o==e){if(o<this.safeFrom)return null;let l=o+s.length;if(l<=this.safeTo){let a=s.prop(ve.lookAhead);if(!a||l+a<this.fragment.to)return s}}this.index[t]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+s.length}}};class VF{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Fu)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let c=0;c<s.length;c++){if((1<<c&o)==0)continue;let u=s[c],h=this.tokens[c];if(!(r&&!u.fallback)&&((u.contextual||h.start!=e.pos||h.mask!=o||h.context!=l)&&(this.updateCachedToken(h,u,e),h.mask=o,h.context=l),h.lookAhead>h.end+25&&(a=Math.max(h.lookAhead,a)),h.value!=0)){let f=t;if(h.extended>-1&&(t=this.addActions(e,h.extended,h.end,t)),t=this.addActions(e,h.value,h.end,t),!u.extend&&(r=h,t>f))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),!r&&e.pos==this.stream.end&&(r=new Fu,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Fu,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let l=s.specializers[o](this.stream.read(e.start,e.end),r);if(l>=0&&r.p.parser.dialect.allows(l>>1)){(l&1)==0?e.value=l>>1:e.extended=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=t,this.actions[i++]=r,i}addActions(e,t,r,i){let{state:s}=e,{parser:o}=e.p,{data:l}=o;for(let a=0;a<2;a++)for(let c=o.stateSlot(s,a?2:1);;c+=3){if(l[c]==65535)if(l[c+1]==1)c=fi(l,c+2);else{i==0&&l[c+1]==2&&(i=this.putAction(fi(l,c+2),t,r,i));break}l[c]==t&&(i=this.putAction(fi(l,c+1),t,r,i))}return i}}class ZF{constructor(e,t,r,i){this.parser=e,this.input=t,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 IF(t,i),this.tokens=new VF(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[zh.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new NF(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let l=e[o];for(;;){if(this.tokens.mainToken=null,l.pos>t)r.push(l);else{if(this.advanceStack(l,r,e))continue;{i||(i=[],s=[]),i.push(l);let a=this.tokens.getMainToken(l);s.push(a.value,a.end)}}break}}if(!r.length){let o=i&&FF(i);if(o)return wn&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw wn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(o)return wn&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((l,a)=>a.score-l.score);r.length>o;)r.pop();r.some(l=>l.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let l=r[o];for(let a=o+1;a<r.length;a++){let c=r[a];if(l.sameState(c)||l.buffer.length>500&&c.buffer.length>500)if((l.score-c.score||l.buffer.length-c.buffer.length)>0)r.splice(a--,1);else{r.splice(o--,1);continue e}}}r.length>12&&(r.sort((o,l)=>l.score-o.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,r){let i=e.pos,{parser:s}=this,o=wn?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let h=this.fragments.nodeAt(i);h;){let f=this.parser.nodeSet.types[h.type.id]==h.type?s.getGoto(e.state,h.type.id):-1;if(f>-1&&h.length&&(!c||(h.prop(ve.contextHash)||0)==u))return e.useNode(h,f),wn&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(h.type.id)})`),!0;if(!(h instanceof Qe)||h.children.length==0||h.positions[0]>0)break;let d=h.children[0];if(d instanceof Qe&&h.positions[0]==0)h=d;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),wn&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let c=0;c<a.length;){let u=a[c++],h=a[c++],f=a[c++],d=c==a.length||!r,p=d?e:e.split(),g=this.tokens.mainToken;if(p.apply(u,h,g?g.start:p.pos,f),wn&&console.log(o+this.stackID(p)+` (via ${(u&65536)==0?"shift":`reduce of ${s.getName(u&65535)}`} for ${s.getName(h)} @ ${i}${p==e?"":", split"})`),d)return!0;p.pos>i?t.push(p):r.push(p)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return $S(e,t),!0}}runRecovery(e,t,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let l=e[o],a=t[o<<1],c=t[(o<<1)+1],u=wn?this.stackID(l)+" -> ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),wn&&console.log(u+this.stackID(l)+" (restarted)"),this.advanceFully(l,r))))continue;let h=l.split(),f=u;for(let d=0;d<10&&h.forceReduce()&&(wn&&console.log(f+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,r));d++)wn&&(f=this.stackID(h)+" -> ");for(let d of l.recoverByInsert(a))wn&&console.log(u+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,r);this.stream.end>l.pos?(c==l.pos&&(c++,a=0),l.recoverByDelete(a,c),wn&&console.log(u+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),$S(l,r)):(!i||i.score<h.score)&&(i=h)}return i}stackToTree(e){return e.close(),Qe.build({buffer:Wh.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(fp||(fp=new WeakMap)).get(e);return t||fp.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function $S(n,e){for(let t=0;t<e.length;t++){let r=e[t];if(r.pos==n.pos&&r.sameState(n)){e[t].score<n.score&&(e[t]=n);return}}e.push(n)}class BF{constructor(e,t,r){this.source=e,this.flags=t,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const dp=n=>n;class gE{constructor(e){this.start=e.start,this.shift=e.shift||dp,this.reduce=e.reduce||dp,this.reuse=e.reuse||dp,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Xo extends Hf{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;l<e.repeatNodeCount;l++)t.push("");let r=Object.keys(e.topRules).map(l=>e.topRules[l][1]),i=[];for(let l=0;l<t.length;l++)i.push([]);function s(l,a,c){i[l].push([a,a.deserialize(String(c))])}if(e.nodeProps)for(let l of e.nodeProps){let a=l[0];typeof a=="string"&&(a=ve[a]);for(let c=1;c<l.length;){let u=l[c++];if(u>=0)s(u,a,l[c++]);else{let h=l[c+-u];for(let f=-u;f>0;f--)s(l[c++],a,h);c++}}}this.nodeSet=new hl(t.map((l,a)=>Ct.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:i[a],top:r.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=jT;let o=Bl(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(AS),this.states=Bl(e.states,Uint32Array),this.data=Bl(e.stateData),this.goto=Bl(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new Co(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new ZF(this,e,t,r);for(let s of this.wrappers)i=s(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let o=i[s++],l=o&1,a=i[s++];if(l&&r)return a;for(let c=s+(o>>1);s<c;s++)if(i[s]==e)return a;if(l)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),o;;s+=3){if((o=r[s])==65535)if(r[s+1]==1)o=r[s=fi(r,s+2)];else{if(r[s+1]==2)return fi(r,s+2);break}if(o==t||o==0)return fi(r,s+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=fi(this.data,s+2);else break;i=t(fi(this.data,s+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=fi(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];t.some((s,o)=>o&1&&s==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(Xo.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(l=>l.from==r.external);if(!s)return r;let o=Object.assign(Object.assign({},r),{external:s.to});return t.specializers[i]=AS(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let s of e.split(" ")){let o=t.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<t.length;s++)if(!r[s])for(let o=this.dialects[t[s]],l;(l=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[l]=1;return new BF(e,r,i)}static deserialize(e){return new Xo(e)}}function fi(n,e){return n[e]|n[e+1]<<16}function FF(n){let e=null;for(let t of n){let r=t.p.stoppedAt;(t.pos==t.p.stream.end||r!=null&&t.pos>r)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function AS(n){if(n.external){let e=n.extend?1:0;return(t,r)=>n.external(t,r)<<1|e}return n.get}const XF=122,MS=1,zF=123,WF=124,mE=2,jF=125,qF=3,YF=4,OE=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],HF=58,UF=40,xE=95,GF=91,Xu=45,KF=46,JF=35,eX=37,tX=38,nX=92,rX=10,iX=42;function Xa(n){return n>=65&&n<=90||n>=97&&n<=122||n>=161}function S0(n){return n>=48&&n<=57}function LS(n){return S0(n)||n>=97&&n<=102||n>=65&&n<=70}const bE=(n,e,t)=>(r,i)=>{for(let s=!1,o=0,l=0;;l++){let{next:a}=r;if(Xa(a)||a==Xu||a==xE||s&&S0(a))!s&&(a!=Xu||l>0)&&(s=!0),o===l&&a==Xu&&o++,r.advance();else if(a==nX&&r.peek(1)!=rX){if(r.advance(),LS(r.next)){do r.advance();while(LS(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();s=!0}else{s&&r.acceptToken(o==2&&i.canShift(mE)?e:a==UF?t:n);break}}},sX=new Nn(bE(zF,mE,WF)),oX=new Nn(bE(jF,qF,YF)),lX=new Nn(n=>{if(OE.includes(n.peek(-1))){let{next:e}=n;(Xa(e)||e==xE||e==JF||e==KF||e==iX||e==GF||e==HF&&Xa(n.peek(1))||e==Xu||e==tX)&&n.acceptToken(XF)}}),aX=new Nn(n=>{if(!OE.includes(n.peek(-1))){let{next:e}=n;if(e==eX&&(n.advance(),n.acceptToken(MS)),Xa(e)){do n.advance();while(Xa(n.next)||S0(n.next));n.acceptToken(MS)}}}),cX=fl({"AtKeyword import charset namespace keyframes media supports":_.definitionKeyword,"from to selector":_.keyword,NamespaceName:_.namespace,KeyframeName:_.labelName,KeyframeRangeName:_.operatorKeyword,TagName:_.tagName,ClassName:_.className,PseudoClassName:_.constant(_.className),IdName:_.labelName,"FeatureName PropertyName":_.propertyName,AttributeName:_.attributeName,NumberLiteral:_.number,KeywordQuery:_.keyword,UnaryQueryOp:_.operatorKeyword,"CallTag ValueName":_.atom,VariableName:_.variableName,Callee:_.operatorKeyword,Unit:_.unit,"UniversalSelector NestingSelector":_.definitionOperator,"MatchOp CompareOp":_.compareOperator,"ChildOp SiblingOp, LogicOp":_.logicOperator,BinOp:_.arithmeticOperator,Important:_.modifier,Comment:_.blockComment,ColorLiteral:_.color,"ParenthesizedContent StringLiteral":_.string,":":_.punctuation,"PseudoOp #":_.derefOperator,"; ,":_.separator,"( )":_.paren,"[ ]":_.squareBracket,"{ }":_.brace}),uX={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},hX={__proto__:null,or:98,and:98,not:106,only:106,layer:170},fX={__proto__:null,selector:112,layer:166},dX={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},pX={__proto__:null,to:207},gX=Xo.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_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ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[cX],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#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%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[lX,aX,sX,oX,1,2,3,4,new jh("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},dynamicPrecedences:{76:1},specialized:[{term:124,get:n=>uX[n]||-1},{term:125,get:n=>hX[n]||-1},{term:4,get:n=>fX[n]||-1},{term:25,get:n=>dX[n]||-1},{term:123,get:n=>pX[n]||-1}],tokenPrec:1963});let pp=null;function gp(){if(!pp&&typeof document=="object"&&document.body){let{style:n}=document.body,e=[],t=new Set;for(let r in n)r!="cssText"&&r!="cssFloat"&&typeof n[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),t.has(r)||(e.push(r),t.add(r)));pp=e.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return pp||[]}const RS=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(n=>({type:"class",label:n})),IS=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(n=>({type:"keyword",label:n})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(n=>({type:"constant",label:n}))),mX=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(n=>({type:"type",label:n})),OX=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(n=>({type:"keyword",label:n})),oi=/^(\w[\w-]*|-\w[\w-]*|)$/,xX=/^-(-[\w-]*)?$/;function bX(n,e){var t;if((n.name=="("||n.type.isError)&&(n=n.parent||n),n.name!="ArgList")return!1;let r=(t=n.parent)===null||t===void 0?void 0:t.firstChild;return r?.name!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const DS=new UT,yX=["Declaration"];function vX(n){for(let e=n;;){if(e.type.isTop)return e;if(!(e=e.parent))return n}}function yE(n,e,t){if(e.to-e.from>4096){let r=DS.get(e);if(r)return r;let i=[],s=new Set,o=e.cursor(Ne.IncludeAnonymous);if(o.firstChild())do for(let l of yE(n,o.node,t))s.has(l.label)||(s.add(l.label),i.push(l));while(o.nextSibling());return DS.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var o;if(t(s)&&s.matchContext(yX)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let l=n.sliceString(s.from,s.to);i.has(l)||(i.add(l),r.push({label:l,type:"variable"}))}}),r}}const vE=n=>e=>{let{state:t,pos:r}=e,i=qe(t).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&t.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:gp(),validFor:oi};if(i.name=="ValueName")return{from:i.from,options:IS,validFor:oi};if(i.name=="PseudoClassName")return{from:i.from,options:RS,validFor:oi};if(n(i)||(e.explicit||s)&&bX(i,t.doc))return{from:n(i)||s?i.from:r,options:yE(t.doc,vX(i),n),validFor:xX};if(i.name=="TagName"){for(let{parent:a}=i;a;a=a.parent)if(a.name=="Block")return{from:i.from,options:gp(),validFor:oi};return{from:i.from,options:mX,validFor:oi}}if(i.name=="AtKeyword")return{from:i.from,options:OX,validFor:oi};if(!e.explicit)return null;let o=i.resolve(r),l=o.childBefore(r);return l&&l.name==":"&&o.name=="PseudoClassSelector"?{from:r,options:RS,validFor:oi}:l&&l.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:r,options:IS,validFor:oi}:o.name=="Block"||o.name=="Styles"?{from:r,options:gp(),validFor:oi}:null},SE=vE(n=>n.name=="VariableName"),za=Zo.define({name:"css",parser:gX.configure({props:[dl.add({Declaration:Bu()}),pl.add({"Block KeyframeList":iP})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function wE(){return new Fo(za,za.data.of({autocomplete:SE}))}const SX=Object.freeze(Object.defineProperty({__proto__:null,css:wE,cssCompletionSource:SE,cssLanguage:za,defineCSSCompletionSource:vE},Symbol.toStringTag,{value:"Module"})),wX=55,kX=1,CX=56,_X=2,TX=57,PX=3,NS=4,EX=5,w0=6,kE=7,CE=8,_E=9,TE=10,QX=11,$X=12,AX=13,mp=58,MX=14,LX=15,VS=59,PE=21,RX=23,EE=24,IX=25,Rm=27,QE=28,DX=29,NX=32,VX=35,ZX=37,BX=38,FX=0,XX=1,zX={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},WX={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},ZS={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function jX(n){return n==45||n==46||n==58||n>=65&&n<=90||n==95||n>=97&&n<=122||n>=161}let BS=null,FS=null,XS=0;function Im(n,e){let t=n.pos+e;if(XS==t&&FS==n)return BS;let r=n.peek(e),i="";for(;jX(r);)i+=String.fromCharCode(r),r=n.peek(++e);return FS=n,XS=t,BS=i?i.toLowerCase():r==qX||r==YX?void 0:null}const $E=60,qh=62,k0=47,qX=63,YX=33,HX=45;function zS(n,e){this.name=n,this.parent=e}const UX=[w0,TE,kE,CE,_E],GX=new gE({start:null,shift(n,e,t,r){return UX.indexOf(e)>-1?new zS(Im(r,1)||"",n):n},reduce(n,e){return e==PE&&n?n.parent:n},reuse(n,e,t,r){let i=e.type.id;return i==w0||i==ZX?new zS(Im(r,1)||"",n):n},strict:!1}),KX=new Nn((n,e)=>{if(n.next!=$E){n.next<0&&e.context&&n.acceptToken(mp);return}n.advance();let t=n.next==k0;t&&n.advance();let r=Im(n,0);if(r===void 0)return;if(!r)return n.acceptToken(t?LX:MX);let i=e.context?e.context.name:null;if(t){if(r==i)return n.acceptToken(QX);if(i&&WX[i])return n.acceptToken(mp,-2);if(e.dialectEnabled(FX))return n.acceptToken($X);for(let s=e.context;s;s=s.parent)if(s.name==r)return;n.acceptToken(AX)}else{if(r=="script")return n.acceptToken(kE);if(r=="style")return n.acceptToken(CE);if(r=="textarea")return n.acceptToken(_E);if(zX.hasOwnProperty(r))return n.acceptToken(TE);i&&ZS[i]&&ZS[i][r]?n.acceptToken(mp,-1):n.acceptToken(w0)}},{contextual:!0}),JX=new Nn(n=>{for(let e=0,t=0;;t++){if(n.next<0){t&&n.acceptToken(VS);break}if(n.next==HX)e++;else if(n.next==qh&&e>=2){t>=3&&n.acceptToken(VS,-2);break}else e=0;n.advance()}});function ez(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1}const tz=new Nn((n,e)=>{if(n.next==k0&&n.peek(1)==qh){let t=e.dialectEnabled(XX)||ez(e.context);n.acceptToken(t?EX:NS,2)}else n.next==qh&&n.acceptToken(NS,1)});function C0(n,e,t){let r=2+n.length;return new Nn(i=>{for(let s=0,o=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(e);break}if(s==0&&i.next==$E||s==1&&i.next==k0||s>=2&&s<r&&i.next==n.charCodeAt(s-2))s++,o++;else if(s==r&&i.next==qh){l>o?i.acceptToken(e,-o):i.acceptToken(t,-(o-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(e,1);break}else s=o=0;i.advance()}})}const nz=C0("script",wX,kX),rz=C0("style",CX,_X),iz=C0("textarea",TX,PX),sz=fl({"Text RawText IncompleteTag IncompleteCloseTag":_.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":_.angleBracket,TagName:_.tagName,"MismatchedCloseTag/TagName":[_.tagName,_.invalid],AttributeName:_.attributeName,"AttributeValue UnquotedAttributeValue":_.attributeValue,Is:_.definitionOperator,"EntityReference CharacterReference":_.character,Comment:_.blockComment,ProcessingInst:_.processingInstruction,DoctypeDecl:_.documentMeta}),oz=Xo.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x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~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:GX,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[sz],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,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w!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[nz,rz,iz,tz,KX,JX,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function AE(n,e){let t=Object.create(null);for(let r of n.getChildren(EE)){let i=r.getChild(IX),s=r.getChild(Rm)||r.getChild(QE);i&&(t[e.read(i.from,i.to)]=s?s.type.id==Rm?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return t}function WS(n,e){let t=n.getChild(RX);return t?e.read(t.from,t.to):" "}function Op(n,e,t){let r;for(let i of t)if(!i.attrs||i.attrs(r||(r=AE(n.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function ME(n=[],e=[]){let t=[],r=[],i=[],s=[];for(let l of n)(l.tag=="script"?t:l.tag=="style"?r:l.tag=="textarea"?i:s).push(l);let o=e.length?Object.create(null):null;for(let l of e)(o[l.name]||(o[l.name]=[])).push(l);return GT((l,a)=>{let c=l.type.id;if(c==DX)return Op(l,a,t);if(c==NX)return Op(l,a,r);if(c==VX)return Op(l,a,i);if(c==PE&&s.length){let u=l.node,h=u.firstChild,f=h&&WS(h,a),d;if(f){for(let p of s)if(p.tag==f&&(!p.attrs||p.attrs(d||(d=AE(h,a))))){let g=u.lastChild,m=g.type.id==BX?g.from:u.to;if(m>h.to)return{parser:p.parser,overlay:[{from:h.to,to:m}]}}}}if(o&&c==EE){let u=l.node,h;if(h=u.firstChild){let f=o[a.read(h.from,h.to)];if(f)for(let d of f){if(d.tagName&&d.tagName!=WS(u.parent,a))continue;let p=u.lastChild;if(p.type.id==Rm){let g=p.from+1,m=p.lastChild,x=p.to-(m&&m.isError?0:1);if(x>g)return{parser:d.parser,overlay:[{from:g,to:x}],bracketed:!0}}else if(p.type.id==QE)return{parser:d.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const lz=316,az=317,jS=1,cz=2,uz=3,hz=4,fz=318,dz=320,pz=321,gz=5,mz=6,Oz=0,Dm=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],LE=125,xz=59,Nm=47,bz=42,yz=43,vz=45,Sz=60,wz=44,kz=63,Cz=46,_z=91,Tz=new gE({start:!1,shift(n,e){return e==gz||e==mz||e==dz?n:e==pz},strict:!1}),Pz=new Nn((n,e)=>{let{next:t}=n;(t==LE||t==-1||e.context)&&n.acceptToken(fz)},{contextual:!0,fallback:!0}),Ez=new Nn((n,e)=>{let{next:t}=n,r;Dm.indexOf(t)>-1||t==Nm&&((r=n.peek(1))==Nm||r==bz)||t!=LE&&t!=xz&&t!=-1&&!e.context&&n.acceptToken(lz)},{contextual:!0}),Qz=new Nn((n,e)=>{n.next==_z&&!e.context&&n.acceptToken(az)},{contextual:!0}),$z=new Nn((n,e)=>{let{next:t}=n;if(t==yz||t==vz){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(jS);n.acceptToken(r?jS:cz)}}else t==kz&&n.peek(1)==Cz&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(uz))},{contextual:!0});function xp(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const Az=new Nn((n,e)=>{if(n.next!=Sz||!e.dialectEnabled(Oz)||(n.advance(),n.next==Nm))return;let t=0;for(;Dm.indexOf(n.next)>-1;)n.advance(),t++;if(xp(n.next,!0)){for(n.advance(),t++;xp(n.next,!1);)n.advance(),t++;for(;Dm.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==wz)return;for(let r=0;;r++){if(r==7){if(!xp(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(hz,-t)}),Mz=fl({"get set async static":_.modifier,"for while do if else switch try catch finally return throw break continue default case defer":_.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":_.operatorKeyword,"let var const using function class extends":_.definitionKeyword,"import export from":_.moduleKeyword,"with debugger new":_.keyword,TemplateString:_.special(_.string),super:_.atom,BooleanLiteral:_.bool,this:_.self,null:_.null,Star:_.modifier,VariableName:_.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":_.function(_.variableName),VariableDefinition:_.definition(_.variableName),Label:_.labelName,PropertyName:_.propertyName,PrivatePropertyName:_.special(_.propertyName),"CallExpression/MemberExpression/PropertyName":_.function(_.propertyName),"FunctionDeclaration/VariableDefinition":_.function(_.definition(_.variableName)),"ClassDeclaration/VariableDefinition":_.definition(_.className),"NewExpression/VariableName":_.className,PropertyDefinition:_.definition(_.propertyName),PrivatePropertyDefinition:_.definition(_.special(_.propertyName)),UpdateOp:_.updateOperator,"LineComment Hashbang":_.lineComment,BlockComment:_.blockComment,Number:_.number,String:_.string,Escape:_.escape,ArithOp:_.arithmeticOperator,LogicOp:_.logicOperator,BitOp:_.bitwiseOperator,CompareOp:_.compareOperator,RegExp:_.regexp,Equals:_.definitionOperator,Arrow:_.function(_.punctuation),": Spread":_.punctuation,"( )":_.paren,"[ ]":_.squareBracket,"{ }":_.brace,"InterpolationStart InterpolationEnd":_.special(_.brace),".":_.derefOperator,", ;":_.separator,"@":_.meta,TypeName:_.typeName,TypeDefinition:_.definition(_.typeName),"type enum interface implements namespace module declare":_.definitionKeyword,"abstract global Privacy readonly override":_.modifier,"is keyof unique infer asserts":_.operatorKeyword,JSXAttributeValue:_.attributeValue,JSXText:_.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":_.angleBracket,"JSXIdentifier JSXNameSpacedName":_.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":_.attributeName,"JSXBuiltin/JSXIdentifier":_.standard(_.tagName)}),Lz={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},Rz={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},Iz={__proto__:null,"<":193},Dz=Xo.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQ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3t<bQ3u<cQ3v<dQ3w<eQ3x<fQ3y<gQ3z<hQ3{.{Q3|<kQ4P<nQ4Q<{Q4X<iQ5X0rQ5c1SQ6u=OQ6{3QQ7Q3WQ7a3lQ7b=PQ7k=RQ7l=ZQ8k5wQ9X6sQ9]6|Q9g=[Q9m=eQ9n=fQ:o9_Q;W:ZQ;`:mQ<W#SR=v>SR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i<VR)f$dY!uQ'`-e1o5{Q'k!rS'u!v!yS'w!z5}S-t'l'mQ-v'nR3T-uT#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:Tz,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[Mz],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs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D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Ez,Qz,$z,Az,2,3,4,5,6,7,8,9,10,11,12,13,14,Pz,new jh("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new jh("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:n=>Lz[n]||-1},{term:343,get:n=>Rz[n]||-1},{term:95,get:n=>Iz[n]||-1}],tokenPrec:15201}),_0=[hn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),hn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),hn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),hn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),hn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),hn(`try {
77
+ \${}
78
+ } catch (\${error}) {
79
+ \${}
80
+ }`,{label:"try",detail:"/ catch block",type:"keyword"}),hn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),hn(`if (\${}) {
81
+ \${}
82
+ } else {
83
+ \${}
84
+ }`,{label:"if",detail:"/ else block",type:"keyword"}),hn(`class \${name} {
85
+ constructor(\${params}) {
86
+ \${}
87
+ }
88
+ }`,{label:"class",detail:"definition",type:"keyword"}),hn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),hn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],RE=_0.concat([hn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),hn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),hn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),qS=new UT,IE=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function El(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const Nz=["FunctionDeclaration"],Vz={FunctionDeclaration:El("function"),ClassDeclaration:El("class"),ClassExpression:()=>!0,EnumDeclaration:El("constant"),TypeAliasDeclaration:El("type"),NamespaceDeclaration:El("namespace"),VariableDefinition(n,e){n.matchContext(Nz)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function DE(n,e){let t=qS.get(e);if(t)return t;let r=[],i=!0;function s(o,l){let a=n.sliceString(o.from,o.to);r.push({label:a,type:l})}return e.cursor(Ne.IncludeAnonymous).iterate(o=>{if(i)i=!1;else if(o.name){let l=Vz[o.name];if(l&&l(o,s)||IE.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of DE(n,o.node))r.push(l);return!1}}),qS.set(e,r),r}const Yh=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,T0=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function NE(n){let e=qe(n.state).resolveInner(n.pos,-1);if(T0.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&Yh.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)IE.has(i.name)&&(r=r.concat(DE(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:Yh}}function bp(n,e,t){var r;let i=[];for(;;){let s=e.firstChild,o;if(s?.name=="VariableName")return i.push(n(s)),{path:i.reverse(),name:t};if(s?.name=="MemberExpression"&&((r=o=s.lastChild)===null||r===void 0?void 0:r.name)=="PropertyName")i.push(n(o)),e=s;else return null}}function VE(n){let e=r=>n.state.doc.sliceString(r.from,r.to),t=qe(n.state).resolveInner(n.pos,-1);return t.name=="PropertyName"?bp(e,t.parent,e(t)):(t.name=="."||t.name=="?.")&&t.parent.name=="MemberExpression"?bp(e,t.parent,""):T0.indexOf(t.name)>-1?null:t.name=="VariableName"||t.to-t.from<20&&Yh.test(e(t))?{path:[],name:e(t)}:t.name=="MemberExpression"?bp(e,t,""):n.explicit?{path:[],name:""}:null}function Zz(n,e){let t=[],r=new Set;for(let i=0;;i++){for(let o of(Object.getOwnPropertyNames||Object.keys)(n)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(o)||r.has(o))continue;r.add(o);let l;try{l=n[o]}catch{continue}t.push({label:o,type:typeof l=="function"?/^[A-Z]/.test(o)?"class":e?"function":"method":e?"variable":"property",boost:-i})}let s=Object.getPrototypeOf(n);if(!s)return t;n=s}}function Bz(n){let e=new Map;return t=>{let r=VE(t);if(!r)return null;let i=n;for(let o of r.path)if(i=i[o],!i)return null;let s=e.get(i);return s||e.set(i,s=Zz(i,!r.path.length)),{from:t.pos-r.name.length,options:s,validFor:Yh}}}const Yn=Zo.define({name:"javascript",parser:Dz.configure({props:[dl.add({IfStatement:Bu({except:/^\s*({|else\b)/}),TryStatement:Bu({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:WV,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:zV({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":Bu({except:/^\s*{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),pl.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":iP,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),ZE={test:n=>/^JSX/.test(n.name),facet:Uf({commentTokens:{block:{open:"{/*",close:"*/}"}}})},P0=Yn.configure({dialect:"ts"},"typescript"),E0=Yn.configure({dialect:"jsx",props:[s0.add(n=>n.isTop?[ZE]:void 0)]}),Q0=Yn.configure({dialect:"jsx ts",props:[s0.add(n=>n.isTop?[ZE]:void 0)]},"typescript");let BE=n=>({label:n,type:"keyword"});const FE="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(BE),Fz=FE.concat(["declare","implements","private","protected","public"].map(BE));function XE(n={}){let e=n.jsx?n.typescript?Q0:E0:n.typescript?P0:Yn,t=n.typescript?RE.concat(Fz):_0.concat(FE);return new Fo(e,[Yn.data.of({autocomplete:TZ(T0,kP(t))}),Yn.data.of({autocomplete:NE}),n.jsx?zE:[]])}function Xz(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function YS(n,e,t=n.length){for(let r=e?.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const zz=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),zE=U.inputHandler.of((n,e,t,r,i)=>{if((zz?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!Yn.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:o}=s,l=o.changeByRange(a=>{var c;let{head:u}=a,h=qe(o).resolveInner(u-1,-1),f;if(h.name=="JSXStartTag"&&(h=h.parent),!(o.doc.sliceString(u-1,u)!=r||h.name=="JSXAttributeValue"&&h.to>u)){if(r==">"&&h.name=="JSXFragmentTag")return{range:a,changes:{from:u,insert:"</>"}};if(r=="/"&&h.name=="JSXStartCloseTag"){let d=h.parent,p=d.parent;if(p&&d.from==u-2&&((f=YS(o.doc,p.firstChild,u))||((c=p.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let g=`${f}>`;return{range:Z.cursor(u+g.length,-1),changes:{from:u,insert:g}}}}else if(r==">"){let d=Xz(h);if(d&&d.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(f=YS(o.doc,d,u)))return{range:a,changes:{from:u,insert:`</${f}>`}}}}return{range:a}});return l.changes.empty?!1:(n.dispatch([s,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function Wz(n,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},n.getRules().forEach((t,r)=>{var i;!((i=t.meta.docs)===null||i===void 0)&&i.recommended&&(e.rules[r]=2)})),t=>{let{state:r}=t,i=[];for(let{from:s,to:o}of Yn.findRegions(r)){let l=r.doc.lineAt(s),a={line:l.number-1,col:s-l.from,pos:s};for(let c of n.verify(r.sliceDoc(s,o),e))i.push(jz(c,r.doc,a))}return i}}function HS(n,e,t,r){return t.line(n+r.line).from+e+(n==1?r.col-1:-1)}function jz(n,e,t){let r=HS(n.line,n.column,e,t),i={from:r,to:n.endLine!=null&&n.endColumn!=1?HS(n.endLine,n.endColumn,e,t):r,message:n.message,source:n.ruleId?"eslint:"+n.ruleId:"eslint",severity:n.severity==1?"warning":"error"};if(n.fix){let{range:s,text:o}=n.fix,l=s[0]+t.pos-r,a=s[1]+t.pos-r;i.actions=[{name:"fix",apply(c,u){c.dispatch({changes:{from:u+l,to:u+a,insert:o},scrollIntoView:!0})}}]}return i}const lu=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:zE,completionPath:VE,esLint:Wz,javascript:XE,javascriptLanguage:Yn,jsxLanguage:E0,localCompletionSource:NE,scopeCompletionSource:Bz,snippets:_0,tsxLanguage:Q0,typescriptLanguage:P0,typescriptSnippets:RE},Symbol.toStringTag,{value:"Module"})),Ql=["_blank","_self","_top","_parent"],yp=["ascii","utf-8","utf-16","latin1","latin1"],vp=["get","post","put","delete"],Sp=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],kn=["true","false"],de={},qz={a:{attrs:{href:null,ping:null,type:null,media:null,target:Ql,hreflang:null}},abbr:de,address:de,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:de,aside:de,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:de,base:{attrs:{href:null,target:Ql}},bdi:de,bdo:de,blockquote:{attrs:{cite:null}},body:de,br:de,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Sp,formmethod:vp,formnovalidate:["novalidate"],formtarget:Ql,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:de,center:de,cite:de,code:de,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:de,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:de,div:de,dl:de,dt:de,em:de,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:de,figure:de,footer:de,form:{attrs:{action:null,name:null,"accept-charset":yp,autocomplete:["on","off"],enctype:Sp,method:vp,novalidate:["novalidate"],target:Ql}},h1:de,h2:de,h3:de,h4:de,h5:de,h6:de,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:de,hgroup:de,hr:de,html:{attrs:{manifest:null}},i:de,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Sp,formmethod:vp,formnovalidate:["novalidate"],formtarget:Ql,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:de,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:de,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:de,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:yp,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:de,noscript:de,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:de,param:{attrs:{name:null,value:null}},pre:de,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:de,rt:de,ruby:de,samp:de,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:yp}},section:de,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:de,source:{attrs:{src:null,type:null,media:null}},span:de,strong:de,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:de,summary:de,sup:de,table:de,tbody:de,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:de,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:de,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:de,time:{attrs:{datetime:null}},title:de,tr:de,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:de,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:de},WE={accesskey:null,class:null,contenteditable:kn,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:kn,autocorrect:kn,autocapitalize:kn,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":kn,"aria-autocomplete":["inline","list","both","none"],"aria-busy":kn,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":kn,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":kn,"aria-hidden":kn,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":kn,"aria-multiselectable":kn,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":kn,"aria-relevant":null,"aria-required":kn,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},jE="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(n=>"on"+n);for(let n of jE)WE[n]=null;class Wa{constructor(e,t){this.tags={...qz,...e},this.globalAttrs={...WE,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Wa.default=new Wa;function zo(n,e,t=n.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?n.sliceString(i.from,Math.min(i.to,t)):""}function Wo(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function qE(n,e,t){let r=t.tags[zo(n,Wo(e))];return r?.children||t.allTags}function $0(n,e){let t=[];for(let r=Wo(e);r&&!r.type.isTop;r=Wo(r.parent)){let i=zo(n,r);if(i&&r.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&t.push(i)}return t}const YE=/^[:\-\.\w\u00b7-\uffff]*$/;function US(n,e,t,r,i){let s=/\s*>/.test(n.sliceDoc(i,i+5))?"":">",o=Wo(t,t.name=="StartTag"||t.name=="TagName");return{from:r,to:i,options:qE(n.doc,o,e).map(l=>({label:l,type:"type"})).concat($0(n.doc,t).map((l,a)=>({label:"/"+l,apply:"/"+l+s,type:"type",boost:99-a}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function GS(n,e,t,r){let i=/\s*>/.test(n.sliceDoc(r,r+5))?"":">";return{from:t,to:r,options:$0(n.doc,e).map((s,o)=>({label:s,apply:s+i,type:"type",boost:99-o})),validFor:YE}}function Yz(n,e,t,r){let i=[],s=0;for(let o of qE(n.doc,t,e))i.push({label:"<"+o,type:"type"});for(let o of $0(n.doc,t))i.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Hz(n,e,t,r,i){let s=Wo(t),o=s?e.tags[zo(n.doc,s)]:null,l=o&&o.attrs?Object.keys(o.attrs):[],a=o&&o.globalAttrs===!1?l:l.length?l.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:a.map(c=>({label:c,type:"property"})),validFor:YE}}function Uz(n,e,t,r,i){var s;let o=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),l=[],a;if(o){let c=n.sliceDoc(o.from,o.to),u=e.globalAttrs[c];if(!u){let h=Wo(t),f=h?e.tags[zo(n.doc,h)]:null;u=f?.attrs&&f.attrs[c]}if(u){let h=n.sliceDoc(r,i).toLowerCase(),f='"',d='"';/^['"]/.test(h)?(a=h[0]=='"'?/^[^"]*$/:/^[^']*$/,f="",d=n.sliceDoc(i,i+1)==h[0]?"":h[0],h=h.slice(1),r++):a=/^[^\s<>='"]*$/;for(let p of u)l.push({label:p,apply:f+p+d,type:"constant"})}}return{from:r,to:i,options:l,validFor:a}}function HE(n,e){let{state:t,pos:r}=e,i=qe(t).resolveInner(r,-1),s=i.resolve(r);for(let o=r,l;s==i&&(l=i.childBefore(o));){let a=l.lastChild;if(!a||!a.type.isError||a.from<a.to)break;s=i=l,o=a.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?GS(t,i,i.from,r):US(t,n,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?US(t,n,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?GS(t,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?Hz(t,n,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?Uz(t,n,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?Yz(t,n,i,r):null}function UE(n){return HE(Wa.default,n)}function GE(n){let{extraTags:e,extraGlobalAttributes:t}=n,r=t||e?new Wa(e,t):Wa.default;return i=>HE(r,i)}const Gz=Yn.parser.configure({top:"SingleExpression"}),KE=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:P0.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:E0.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:Q0.parser},{tag:"script",attrs(n){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(n.type)},parser:Gz},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:Yn.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:za.parser}],JE=[{name:"style",parser:za.parser.configure({top:"Styles"})}].concat(jE.map(n=>({name:n,parser:Yn.parser}))),eQ=Zo.define({name:"html",parser:oz.configure({props:[dl.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].length<n.node.to)return n.continue();let e=null,t;for(let r=n.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((t=e.lastChild)&&(t.name=="CloseTag"||t.name=="SelfClosingTag"))?n.lineIndent(e.from)+n.unit:null}}),pl.add({Element(n){let e=n.firstChild,t=n.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:t.name=="CloseTag"?t.from:n.to}}}),OP.add({"OpenTag CloseTag":n=>n.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),ua=eQ.configure({wrap:ME(KE,JE)});function tQ(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=ME((n.nestedLanguages||[]).concat(KE),(n.nestedAttributes||[]).concat(JE)));let r=t?eQ.configure({wrap:t,dialect:e}):e?ua.configure({dialect:e}):ua;return new Fo(r,[ua.data.of({autocomplete:GE(n)}),n.autoCloseTags!==!1?nQ:[],XE().support,wE().support])}const KS=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),nQ=U.inputHandler.of((n,e,t,r,i)=>{if(n.composing||n.state.readOnly||e!=t||r!=">"&&r!="/"||!ua.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:o}=s,l=o.changeByRange(a=>{var c,u,h;let f=o.doc.sliceString(a.from-1,a.to)==r,{head:d}=a,p=qe(o).resolveInner(d,-1),g;if(f&&r==">"&&p.name=="EndTag"){let m=p.parent;if(((u=(c=m.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(g=zo(o.doc,m.parent,d))&&!KS.has(g)){let x=d+(o.doc.sliceString(d,d+1)===">"?1:0),O=`</${g}>`;return{range:a,changes:{from:d,to:x,insert:O}}}}else if(f&&r=="/"&&p.name=="IncompleteCloseTag"){let m=p.parent;if(p.from==d-2&&((h=m.lastChild)===null||h===void 0?void 0:h.name)!="CloseTag"&&(g=zo(o.doc,m,d))&&!KS.has(g)){let x=d+(o.doc.sliceString(d,d+1)===">"?1:0),O=`${g}>`;return{range:Z.cursor(d+O.length,-1),changes:{from:d,to:x,insert:O}}}}return{range:a}});return l.changes.empty?!1:(n.dispatch([s,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Kz=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:nQ,html:tQ,htmlCompletionSource:UE,htmlCompletionSourceWith:GE,htmlLanguage:ua},Symbol.toStringTag,{value:"Module"}));function Jz(n,e,t,r){const i=Lt(ot),s=ut($5),o=v.useRef(null),{lexicalNode:l}=Xg(),a=v.useRef(!1),c=v.useRef(!1),u=v.useCallback(()=>{s({editorType:e,rootNode:l,editorRef:o.current})},[e,l,s]),h=v.useCallback(f=>{var d,p,g,m,x,O;if(f.key==="ArrowDown"){const b=(p=(d=o.current)==null?void 0:d.getCodemirror())==null?void 0:p.state;if(b){const y=b.doc.length,S=b.selection.ranges[0].to;y===S&&(a.current?(i?.update(()=>{var k,w;const C=rt(n);C.getNextSibling()?((w=(k=o.current)==null?void 0:k.getCodemirror())==null||w.contentDOM.blur(),C.selectNext()):C.insertAfter(ze())}),a.current=!1):a.current=!0)}}else if(f.key==="ArrowUp"){const b=(m=(g=o.current)==null?void 0:g.getCodemirror())==null?void 0:m.state;b&&b.selection.ranges[0].from===0&&(c.current?(i?.update(()=>{var S,k;const w=rt(n);w.getPreviousSibling()&&((k=(S=o.current)==null?void 0:S.getCodemirror())==null||k.contentDOM.blur(),w.selectPrevious())}),c.current=!1):c.current=!0)}else if(f.key==="Enter")f.stopPropagation();else if(f.key==="Backspace"||f.key==="Delete"){const b=(O=(x=o.current)==null?void 0:x.getCodemirror())==null?void 0:O.state;b?.doc.length===0&&i?.update(()=>{rt(n).remove()})}},[i,n]);return v.useEffect(()=>{const f=o.current;return setTimeout(()=>{var d,p;(d=f?.getCodemirror())==null||d.contentDOM.addEventListener("focus",u),(p=f?.getCodemirror())==null||p.contentDOM.addEventListener("keydown",h)},300),()=>{var d,p;(d=f?.getCodemirror())==null||d.contentDOM.removeEventListener("focus",u),(p=f?.getCodemirror())==null||p.contentDOM.removeEventListener("keydown",h)}},[o,u,h,t]),v.useEffect(()=>{r.subscribe(()=>{var f,d;(d=(f=o.current)==null?void 0:f.getCodemirror())==null||d.focus(),u()})},[r,o,n,u]),o}function X(n){return new Fo(a0.define(n))}function Ii(n){return N(()=>import("./index-Beun4ywN.js"),__vite__mapDeps([0,1,2,3])).then(e=>e.sql({dialect:e[n]}))}const eW=[L.of({name:"C",extensions:["c","h","ino"],load(){return N(()=>import("./index-BBY4n5t-.js"),__vite__mapDeps([4,1,2,3])).then(n=>n.cpp())}}),L.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return N(()=>import("./index-BBY4n5t-.js"),__vite__mapDeps([4,1,2,3])).then(n=>n.cpp())}}),L.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Ii("Cassandra")}}),L.of({name:"CSS",extensions:["css"],load(){return N(()=>Promise.resolve().then(()=>SX),void 0).then(n=>n.css())}}),L.of({name:"Go",extensions:["go"],load(){return N(()=>import("./index-p-EXqOgO.js"),__vite__mapDeps([5,1,2,3])).then(n=>n.go())}}),L.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return N(()=>Promise.resolve().then(()=>Kz),void 0).then(n=>n.html())}}),L.of({name:"Java",extensions:["java"],load(){return N(()=>import("./index-ChD5bDHD.js"),__vite__mapDeps([6,1,2,3])).then(n=>n.java())}}),L.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return N(()=>Promise.resolve().then(()=>lu),void 0).then(n=>n.javascript())}}),L.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return N(()=>import("./index-DHmd0I4e.js"),__vite__mapDeps([7,1,2,3])).then(n=>n.jinja())}}),L.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return N(()=>import("./index-AeonINTL.js"),__vite__mapDeps([8,1,2,3])).then(n=>n.json())}}),L.of({name:"JSX",extensions:["jsx"],load(){return N(()=>Promise.resolve().then(()=>lu),void 0).then(n=>n.javascript({jsx:!0}))}}),L.of({name:"LESS",extensions:["less"],load(){return N(()=>import("./index-AIsVwTBP.js"),__vite__mapDeps([9,1,2,3])).then(n=>n.less())}}),L.of({name:"Liquid",extensions:["liquid"],load(){return N(()=>import("./index-BS_uzzCh.js"),__vite__mapDeps([10,1,2,3])).then(n=>n.liquid())}}),L.of({name:"MariaDB SQL",load(){return Ii("MariaSQL")}}),L.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return N(()=>Promise.resolve().then(()=>gq),void 0).then(n=>n.markdown())}}),L.of({name:"MS SQL",load(){return Ii("MSSQL")}}),L.of({name:"MySQL",load(){return Ii("MySQL")}}),L.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return N(()=>import("./index-BEkvG6MQ.js"),__vite__mapDeps([11,1,2,3])).then(n=>n.php())}}),L.of({name:"PLSQL",extensions:["pls"],load(){return Ii("PLSQL")}}),L.of({name:"PostgreSQL",load(){return Ii("PostgreSQL")}}),L.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return N(()=>import("./index-80RT6UXi.js"),__vite__mapDeps([12,1,2,3])).then(n=>n.python())}}),L.of({name:"Rust",extensions:["rs"],load(){return N(()=>import("./index-D8UBHQdy.js"),__vite__mapDeps([13,1,2,3])).then(n=>n.rust())}}),L.of({name:"Sass",extensions:["sass"],load(){return N(()=>import("./index-DvIiLgyh.js"),__vite__mapDeps([14,1,2,3])).then(n=>n.sass({indented:!0}))}}),L.of({name:"SCSS",extensions:["scss"],load(){return N(()=>import("./index-DvIiLgyh.js"),__vite__mapDeps([14,1,2,3])).then(n=>n.sass())}}),L.of({name:"SQL",extensions:["sql"],load(){return Ii("StandardSQL")}}),L.of({name:"SQLite",load(){return Ii("SQLite")}}),L.of({name:"TSX",extensions:["tsx"],load(){return N(()=>Promise.resolve().then(()=>lu),void 0).then(n=>n.javascript({jsx:!0,typescript:!0}))}}),L.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return N(()=>Promise.resolve().then(()=>lu),void 0).then(n=>n.javascript({typescript:!0}))}}),L.of({name:"WebAssembly",extensions:["wat","wast"],load(){return N(()=>import("./index-CawWXqM_.js"),__vite__mapDeps([15,1,2,3])).then(n=>n.wast())}}),L.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return N(()=>import("./index-ClFRvTkG.js"),__vite__mapDeps([16,1,2,3])).then(n=>n.xml())}}),L.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return N(()=>import("./index-DCrCdQ-J.js"),__vite__mapDeps([17,1,2,3])).then(n=>n.yaml())}}),L.of({name:"APL",extensions:["dyalog","apl"],load(){return N(()=>import("./apl-B4CMkyY2.js"),[]).then(n=>X(n.apl))}}),L.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return N(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(n=>X(n.asciiArmor))}}),L.of({name:"ASN.1",extensions:["asn","asn1"],load(){return N(()=>import("./asn1-EdZsLKOL.js"),[]).then(n=>X(n.asn1({})))}}),L.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return N(()=>import("./asterisk-B-8jnY81.js"),[]).then(n=>X(n.asterisk))}}),L.of({name:"Brainfuck",extensions:["b","bf"],load(){return N(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(n=>X(n.brainfuck))}}),L.of({name:"Cobol",extensions:["cob","cpy"],load(){return N(()=>import("./cobol-CWcv1MsR.js"),[]).then(n=>X(n.cobol))}}),L.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return N(()=>import("./clike-B9uivgTg.js"),[]).then(n=>X(n.csharp))}}),L.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return N(()=>import("./clojure-BMjYHr_A.js"),[]).then(n=>X(n.clojure))}}),L.of({name:"ClojureScript",extensions:["cljs"],load(){return N(()=>import("./clojure-BMjYHr_A.js"),[]).then(n=>X(n.clojure))}}),L.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return N(()=>import("./css-BnMrqG3P.js"),[]).then(n=>X(n.gss))}}),L.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return N(()=>import("./cmake-BQqOBYOt.js"),[]).then(n=>X(n.cmake))}}),L.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return N(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(n=>X(n.coffeeScript))}}),L.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return N(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(n=>X(n.commonLisp))}}),L.of({name:"Cypher",extensions:["cyp","cypher"],load(){return N(()=>import("./cypher-C_CwsFkJ.js"),[]).then(n=>X(n.cypher))}}),L.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return N(()=>import("./python-BuPzkPfP.js"),[]).then(n=>X(n.cython))}}),L.of({name:"Crystal",extensions:["cr"],load(){return N(()=>import("./crystal-SjHAIU92.js"),[]).then(n=>X(n.crystal))}}),L.of({name:"D",extensions:["d"],load(){return N(()=>import("./d-pRatUO7H.js"),[]).then(n=>X(n.d))}}),L.of({name:"Dart",extensions:["dart"],load(){return N(()=>import("./clike-B9uivgTg.js"),[]).then(n=>X(n.dart))}}),L.of({name:"diff",extensions:["diff","patch"],load(){return N(()=>import("./diff-DbItnlRl.js"),[]).then(n=>X(n.diff))}}),L.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return N(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([18,19])).then(n=>X(n.dockerFile))}}),L.of({name:"DTD",extensions:["dtd"],load(){return N(()=>import("./dtd-DF_7sFjM.js"),[]).then(n=>X(n.dtd))}}),L.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return N(()=>import("./dylan-DwRh75JA.js"),[]).then(n=>X(n.dylan))}}),L.of({name:"EBNF",load(){return N(()=>import("./ebnf-CDyGwa7X.js"),[]).then(n=>X(n.ebnf))}}),L.of({name:"ECL",extensions:["ecl"],load(){return N(()=>import("./ecl-Cabwm37j.js"),[]).then(n=>X(n.ecl))}}),L.of({name:"edn",extensions:["edn"],load(){return N(()=>import("./clojure-BMjYHr_A.js"),[]).then(n=>X(n.clojure))}}),L.of({name:"Eiffel",extensions:["e"],load(){return N(()=>import("./eiffel-CnydiIhH.js"),[]).then(n=>X(n.eiffel))}}),L.of({name:"Elm",extensions:["elm"],load(){return N(()=>import("./elm-vLlmbW-K.js"),[]).then(n=>X(n.elm))}}),L.of({name:"Erlang",extensions:["erl"],load(){return N(()=>import("./erlang-BNw1qcRV.js"),[]).then(n=>X(n.erlang))}}),L.of({name:"Esper",load(){return N(()=>import("./sql-D0XecflT.js"),[]).then(n=>X(n.esper))}}),L.of({name:"Factor",extensions:["factor"],load(){return N(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([20,19])).then(n=>X(n.factor))}}),L.of({name:"FCL",load(){return N(()=>import("./fcl-Kvtd6kyn.js"),[]).then(n=>X(n.fcl))}}),L.of({name:"Forth",extensions:["forth","fth","4th"],load(){return N(()=>import("./forth-Ffai-XNe.js"),[]).then(n=>X(n.forth))}}),L.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return N(()=>import("./fortran-DYz_wnZ1.js"),[]).then(n=>X(n.fortran))}}),L.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return N(()=>import("./mllike-CXdrOF99.js"),[]).then(n=>X(n.fSharp))}}),L.of({name:"Gas",extensions:["s"],load(){return N(()=>import("./gas-Bneqetm1.js"),[]).then(n=>X(n.gas))}}),L.of({name:"Gherkin",extensions:["feature"],load(){return N(()=>import("./gherkin-heZmZLOM.js"),[]).then(n=>X(n.gherkin))}}),L.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return N(()=>import("./groovy-D9Dt4D0W.js"),[]).then(n=>X(n.groovy))}}),L.of({name:"Haskell",extensions:["hs"],load(){return N(()=>import("./haskell-Cw1EW3IL.js"),[]).then(n=>X(n.haskell))}}),L.of({name:"Haxe",extensions:["hx"],load(){return N(()=>import("./haxe-H-WmDvRZ.js"),[]).then(n=>X(n.haxe))}}),L.of({name:"HXML",extensions:["hxml"],load(){return N(()=>import("./haxe-H-WmDvRZ.js"),[]).then(n=>X(n.hxml))}}),L.of({name:"HTTP",load(){return N(()=>import("./http-DBlCnlav.js"),[]).then(n=>X(n.http))}}),L.of({name:"IDL",extensions:["pro"],load(){return N(()=>import("./idl-BEugSyMb.js"),[]).then(n=>X(n.idl))}}),L.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return N(()=>import("./javascript-iXu5QeM3.js"),[]).then(n=>X(n.jsonld))}}),L.of({name:"Julia",extensions:["jl"],load(){return N(()=>import("./julia-DuME0IfC.js"),[]).then(n=>X(n.julia))}}),L.of({name:"Kotlin",extensions:["kt","kts"],load(){return N(()=>import("./clike-B9uivgTg.js"),[]).then(n=>X(n.kotlin))}}),L.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return N(()=>import("./livescript-BwQOo05w.js"),[]).then(n=>X(n.liveScript))}}),L.of({name:"Lua",extensions:["lua"],load(){return N(()=>import("./lua-BgMRiT3U.js"),[]).then(n=>X(n.lua))}}),L.of({name:"mIRC",extensions:["mrc"],load(){return N(()=>import("./mirc-CjQqDB4T.js"),[]).then(n=>X(n.mirc))}}),L.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return N(()=>import("./mathematica-DTrFuWx2.js"),[]).then(n=>X(n.mathematica))}}),L.of({name:"Modelica",extensions:["mo"],load(){return N(()=>import("./modelica-Dc1JOy9r.js"),[]).then(n=>X(n.modelica))}}),L.of({name:"MUMPS",extensions:["mps"],load(){return N(()=>import("./mumps-BT43cFF4.js"),[]).then(n=>X(n.mumps))}}),L.of({name:"Mbox",extensions:["mbox"],load(){return N(()=>import("./mbox-CNhZ1qSd.js"),[]).then(n=>X(n.mbox))}}),L.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return N(()=>import("./nginx-DdIZxoE0.js"),[]).then(n=>X(n.nginx))}}),L.of({name:"NSIS",extensions:["nsh","nsi"],load(){return N(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([21,19])).then(n=>X(n.nsis))}}),L.of({name:"NTriples",extensions:["nt","nq"],load(){return N(()=>import("./ntriples-BfvgReVJ.js"),[]).then(n=>X(n.ntriples))}}),L.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return N(()=>import("./clike-B9uivgTg.js"),[]).then(n=>X(n.objectiveC))}}),L.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return N(()=>import("./clike-B9uivgTg.js"),[]).then(n=>X(n.objectiveCpp))}}),L.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return N(()=>import("./mllike-CXdrOF99.js"),[]).then(n=>X(n.oCaml))}}),L.of({name:"Octave",extensions:["m"],load(){return N(()=>import("./octave-Ck1zUtKM.js"),[]).then(n=>X(n.octave))}}),L.of({name:"Oz",extensions:["oz"],load(){return N(()=>import("./oz-BzwKVEFT.js"),[]).then(n=>X(n.oz))}}),L.of({name:"Pascal",extensions:["p","pas"],load(){return N(()=>import("./pascal--L3eBynH.js"),[]).then(n=>X(n.pascal))}}),L.of({name:"Perl",extensions:["pl","pm"],load(){return N(()=>import("./perl-CdXCOZ3F.js"),[]).then(n=>X(n.perl))}}),L.of({name:"Pig",extensions:["pig"],load(){return N(()=>import("./pig-CevX1Tat.js"),[]).then(n=>X(n.pig))}}),L.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return N(()=>import("./powershell-CFHJl5sT.js"),[]).then(n=>X(n.powerShell))}}),L.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return N(()=>import("./properties-C78fOPTZ.js"),[]).then(n=>X(n.properties))}}),L.of({name:"ProtoBuf",extensions:["proto"],load(){return N(()=>import("./protobuf-ChK-085T.js"),[]).then(n=>X(n.protobuf))}}),L.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return N(()=>import("./pug-DeIclll2.js"),__vite__mapDeps([22,23])).then(n=>X(n.pug))}}),L.of({name:"Puppet",extensions:["pp"],load(){return N(()=>import("./puppet-DMA9R1ak.js"),[]).then(n=>X(n.puppet))}}),L.of({name:"Q",extensions:["q"],load(){return N(()=>import("./q-pXgVlZs6.js"),[]).then(n=>X(n.q))}}),L.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return N(()=>import("./r-B6wPVr8A.js"),[]).then(n=>X(n.r))}}),L.of({name:"RPM Changes",load(){return N(()=>import("./rpm-CTu-6PCP.js"),[]).then(n=>X(n.rpmChanges))}}),L.of({name:"RPM Spec",extensions:["spec"],load(){return N(()=>import("./rpm-CTu-6PCP.js"),[]).then(n=>X(n.rpmSpec))}}),L.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return N(()=>import("./ruby-B2Rjki9n.js"),[]).then(n=>X(n.ruby))}}),L.of({name:"SAS",extensions:["sas"],load(){return N(()=>import("./sas-B4kiWyti.js"),[]).then(n=>X(n.sas))}}),L.of({name:"Scala",extensions:["scala"],load(){return N(()=>import("./clike-B9uivgTg.js"),[]).then(n=>X(n.scala))}}),L.of({name:"Scheme",extensions:["scm","ss"],load(){return N(()=>import("./scheme-C41bIUwD.js"),[]).then(n=>X(n.scheme))}}),L.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return N(()=>import("./shell-CjFT_Tl9.js"),[]).then(n=>X(n.shell))}}),L.of({name:"Sieve",extensions:["siv","sieve"],load(){return N(()=>import("./sieve-C3Gn_uJK.js"),[]).then(n=>X(n.sieve))}}),L.of({name:"Smalltalk",extensions:["st"],load(){return N(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(n=>X(n.smalltalk))}}),L.of({name:"Solr",load(){return N(()=>import("./solr-DehyRSwq.js"),[]).then(n=>X(n.solr))}}),L.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return N(()=>import("./mllike-CXdrOF99.js"),[]).then(n=>X(n.sml))}}),L.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return N(()=>import("./sparql-DkYu6x3z.js"),[]).then(n=>X(n.sparql))}}),L.of({name:"Spreadsheet",alias:["excel","formula"],load(){return N(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(n=>X(n.spreadsheet))}}),L.of({name:"Squirrel",extensions:["nut"],load(){return N(()=>import("./clike-B9uivgTg.js"),[]).then(n=>X(n.squirrel))}}),L.of({name:"Stylus",extensions:["styl"],load(){return N(()=>import("./stylus-B533Al4x.js"),[]).then(n=>X(n.stylus))}}),L.of({name:"Swift",extensions:["swift"],load(){return N(()=>import("./swift-BzpIVaGY.js"),[]).then(n=>X(n.swift))}}),L.of({name:"sTeX",load(){return N(()=>import("./stex-C3f8Ysf7.js"),[]).then(n=>X(n.stex))}}),L.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return N(()=>import("./stex-C3f8Ysf7.js"),[]).then(n=>X(n.stex))}}),L.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return N(()=>import("./verilog-C6RDOZhf.js"),[]).then(n=>X(n.verilog))}}),L.of({name:"Tcl",extensions:["tcl"],load(){return N(()=>import("./tcl-DVfN8rqt.js"),[]).then(n=>X(n.tcl))}}),L.of({name:"Textile",extensions:["textile"],load(){return N(()=>import("./textile-CnDTJFAw.js"),[]).then(n=>X(n.textile))}}),L.of({name:"TiddlyWiki",load(){return N(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(n=>X(n.tiddlyWiki))}}),L.of({name:"Tiki wiki",load(){return N(()=>import("./tiki-DGYXhP31.js"),[]).then(n=>X(n.tiki))}}),L.of({name:"TOML",extensions:["toml"],load(){return N(()=>import("./toml-Bm5Em-hy.js"),[]).then(n=>X(n.toml))}}),L.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return N(()=>import("./troff-wAsdV37c.js"),[]).then(n=>X(n.troff))}}),L.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return N(()=>import("./ttcn-CfJYG6tj.js"),[]).then(n=>X(n.ttcn))}}),L.of({name:"TTCN_CFG",extensions:["cfg"],load(){return N(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(n=>X(n.ttcnCfg))}}),L.of({name:"Turtle",extensions:["ttl"],load(){return N(()=>import("./turtle-B1tBg_DP.js"),[]).then(n=>X(n.turtle))}}),L.of({name:"Web IDL",extensions:["webidl"],load(){return N(()=>import("./webidl-ZXfAyPTL.js"),[]).then(n=>X(n.webIDL))}}),L.of({name:"VB.NET",extensions:["vb"],load(){return N(()=>import("./vb-CmGdzxic.js"),[]).then(n=>X(n.vb))}}),L.of({name:"VBScript",extensions:["vbs"],load(){return N(()=>import("./vbscript-BuJXcnF6.js"),[]).then(n=>X(n.vbScript))}}),L.of({name:"Velocity",extensions:["vtl"],load(){return N(()=>import("./velocity-D8B20fx6.js"),[]).then(n=>X(n.velocity))}}),L.of({name:"Verilog",extensions:["v"],load(){return N(()=>import("./verilog-C6RDOZhf.js"),[]).then(n=>X(n.verilog))}}),L.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return N(()=>import("./vhdl-lSbBsy5d.js"),[]).then(n=>X(n.vhdl))}}),L.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return N(()=>import("./xquery-DzFWVndE.js"),[]).then(n=>X(n.xQuery))}}),L.of({name:"Yacas",extensions:["ys"],load(){return N(()=>import("./yacas-BJ4BC0dw.js"),[]).then(n=>X(n.yacas))}}),L.of({name:"Z80",extensions:["z80"],load(){return N(()=>import("./z80-Hz9HOZM7.js"),[]).then(n=>X(n.z80))}}),L.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return N(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(n=>X(n.mscgen))}}),L.of({name:"Xù",extensions:["xu"],load(){return N(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(n=>X(n.xu))}}),L.of({name:"MsGenny",extensions:["msgenny"],load(){return N(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(n=>X(n.msgenny))}}),L.of({name:"Vue",extensions:["vue"],load(){return N(()=>import("./index-CR0uN9wO.js"),__vite__mapDeps([24,1,2,3])).then(n=>n.vue())}}),L.of({name:"Angular Template",load(){return N(()=>import("./index-CRSfgM43.js"),__vite__mapDeps([25,1,2,3])).then(n=>n.angular())}})],JS="#2e3440",A0="#3b4252",ew="#434c5e",au="#4c566a",tw="#e5e9f0",Vm="#eceff4",wp="#8fbcbb",nw="#88c0d0",tW="#81a1c1",ir="#5e81ac",nW="#bf616a",no="#d08770",kp="#ebcb8b",rw="#a3be8c",rW="#b48ead",iw="#d30102",M0=Vm,Cp=M0,iW="#ffffff",_p=A0,sW=M0,sw=A0,oW=U.theme({"&":{color:JS,backgroundColor:iW},".cm-content":{caretColor:sw},".cm-cursor, .cm-dropCursor":{borderLeftColor:sw},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:sW},".cm-panels":{backgroundColor:M0,color:au},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:`1px solid ${au}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:tw},".cm-activeLine":{backgroundColor:Cp},".cm-selectionMatch":{backgroundColor:tw},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{outline:`1px solid ${au}`},"&.cm-focused .cm-matchingBracket":{backgroundColor:Vm},".cm-gutters":{backgroundColor:Vm,color:JS,border:"none"},".cm-activeLineGutter":{backgroundColor:Cp},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:_p},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:_p,borderBottomColor:_p},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Cp,color:au}}},{dark:!1}),lW=Sc.define([{tag:_.keyword,color:ir},{tag:[_.name,_.deleted,_.character,_.propertyName,_.macroName],color:no},{tag:[_.variableName],color:no},{tag:[_.function(_.variableName)],color:ir},{tag:[_.labelName],color:tW},{tag:[_.color,_.constant(_.name),_.standard(_.name)],color:ir},{tag:[_.definition(_.name),_.separator],color:rw},{tag:[_.brace],color:wp},{tag:[_.annotation],color:iw},{tag:[_.number,_.changed,_.annotation,_.modifier,_.self,_.namespace],color:nw},{tag:[_.typeName,_.className],color:kp},{tag:[_.operator,_.operatorKeyword],color:rw},{tag:[_.tagName],color:rW},{tag:[_.squareBracket],color:nW},{tag:[_.angleBracket],color:no},{tag:[_.attributeName],color:kp},{tag:[_.regexp],color:ir},{tag:[_.quote],color:A0},{tag:[_.string],color:no},{tag:_.link,color:wp,textDecoration:"underline",textUnderlinePosition:"under"},{tag:[_.url,_.escape,_.special(_.string)],color:no},{tag:[_.meta],color:nw},{tag:[_.comment],color:ew,fontStyle:"italic"},{tag:_.strong,fontWeight:"bold",color:ir},{tag:_.emphasis,fontStyle:"italic",color:ir},{tag:_.strikethrough,textDecoration:"line-through"},{tag:_.heading,fontWeight:"bold",color:ir},{tag:_.special(_.heading1),fontWeight:"bold",color:ir},{tag:_.heading1,fontWeight:"bold",color:ir},{tag:[_.heading2,_.heading3,_.heading4],fontWeight:"bold",color:ir},{tag:[_.heading5,_.heading6],color:ir},{tag:[_.atom,_.bool,_.special(_.variableName)],color:no},{tag:[_.processingInstruction,_.inserted],color:wp},{tag:[_.contentSeparator],color:kp},{tag:_.invalid,color:ew,borderBottom:`1px dotted ${iw}`}]),rQ=[oW,dP(lW)],ow=typeof String.prototype.normalize=="function"?n=>n.normalize("NFKD"):n=>n;class jo{constructor(e,t,r=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?l=>s(ow(l)):ow,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return pn(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=D1(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Lr(e);let i=this.normalize(t);if(i.length)for(let s=0,o=r;;s++){let l=i.charCodeAt(s),a=this.match(l,o,this.bufferPos+this.bufferStart);if(s==i.length-1){if(a)return this.value=a,this;break}o==r&&s<t.length&&t.charCodeAt(s)==l&&o++}}}match(e,t,r){let i=null;for(let s=0;s<this.matches.length;s+=2){let o=this.matches[s],l=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?i={from:this.matches[s+1],to:r}:(this.matches[s]++,l=!0)),l||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:t,to:r}:this.matches.push(1,t)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(jo.prototype[Symbol.iterator]=function(){return this});const iQ={from:-1,to:-1,match:/.*/.exec("")},L0="gm"+(/x/.unicode==null?"":"u");class sQ{constructor(e,t,r,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=iQ,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new oQ(e,t,r,i,s);this.re=new RegExp(t,L0+(r?.ignoreCase?"i":"")),this.test=r?.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=Hh(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=Hh(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const Tp=new WeakMap;class _o{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,r){let i=Tp.get(e);if(!i||i.from>=r||i.to<=t){let l=new _o(t,e.sliceString(t,r));return Tp.set(e,l),l}if(i.from==t&&i.to==r)return i;let{text:s,from:o}=i;return o>t&&(s=e.sliceString(t,o)+s,o=t),i.to<r&&(s+=e.sliceString(i.to,r)),Tp.set(e,new _o(o,s)),new _o(t,s.slice(t-o,r-o))}}class oQ{constructor(e,t,r,i,s){this.text=e,this.to=s,this.done=!1,this.value=iQ,this.matchPos=Hh(e,i),this.re=new RegExp(t,L0+(r?.ignoreCase?"i":"")),this.test=r?.test,this.flat=_o.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this.matchPos=Hh(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=_o.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(sQ.prototype[Symbol.iterator]=oQ.prototype[Symbol.iterator]=function(){return this});function aW(n){try{return new RegExp(n,L0),!0}catch{return!1}}function Hh(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e<t.to&&(r=t.text.charCodeAt(e-t.from))>=56320&&r<57344;)e++;return e}const cW=n=>{let{state:e}=n,t=String(e.doc.lineAt(n.state.selection.main.head).number),{close:r,result:i}=tV(n,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:t},focus:!0,submitLabel:e.phrase("go")});return i.then(s=>{let o=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!o){n.dispatch({effects:r});return}let l=e.doc.lineAt(e.selection.main.head),[,a,c,u,h]=o,f=u?+u.slice(1):0,d=c?+c:l.number;if(c&&h){let m=d/100;a&&(m=m*(a=="-"?-1:1)+l.number/e.doc.lines),d=Math.round(e.doc.lines*m)}else c&&a&&(d=d*(a=="-"?-1:1)+l.number);let p=e.doc.line(Math.max(1,Math.min(e.doc.lines,d))),g=Z.cursor(p.from+Math.max(0,Math.min(f,p.length)));n.dispatch({effects:[r,U.scrollIntoView(g.from,{y:"center"})],selection:g})}),!0},uW={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},hW=ie.define({combine(n){return ei(n,uW,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function fW(n){return[OW,mW]}const dW=ce.mark({class:"cm-selectionMatch"}),pW=ce.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function lw(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=it.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=it.Word)}function gW(n,e,t,r){return n(e.sliceDoc(t,t+1))==it.Word&&n(e.sliceDoc(r-1,r))==it.Word}const mW=ft.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(hW),{state:t}=n,r=t.selection;if(r.ranges.length>1)return ce.none;let i=r.main,s,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return ce.none;let a=t.wordAt(i.head);if(!a)return ce.none;o=t.charCategorizer(i.head),s=t.sliceDoc(a.from,a.to)}else{let a=i.to-i.from;if(a<e.minSelectionLength||a>200)return ce.none;if(e.wholeWords){if(s=t.sliceDoc(i.from,i.to),o=t.charCategorizer(i.head),!(lw(o,t,i.from,i.to)&&gW(o,t,i.from,i.to)))return ce.none}else if(s=t.sliceDoc(i.from,i.to),!s)return ce.none}let l=[];for(let a of n.visibleRanges){let c=new jo(t.doc,s,a.from,a.to);for(;!c.next().done;){let{from:u,to:h}=c.value;if((!o||lw(o,t,u,h))&&(i.empty&&u<=i.from&&h>=i.to?l.push(pW.range(u,h)):(u>=i.to||h<=i.from)&&l.push(dW.range(u,h)),l.length>e.maxMatches))return ce.none}}return ce.set(l)}},{decorations:n=>n.decorations}),OW=U.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),xW=({state:n,dispatch:e})=>{let{selection:t}=n,r=Z.create(t.ranges.map(i=>n.wordAt(i.head)||Z.cursor(i.head)),t.mainIndex);return r.eq(t)?!1:(e(n.update({selection:r})),!0)};function bW(n,e){let{main:t,ranges:r}=n.selection,i=n.wordAt(t.head),s=i&&i.from==t.from&&i.to==t.to;for(let o=!1,l=new jo(n.doc,e,r[r.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new jo(n.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}else{if(o&&r.some(a=>a.from==l.value.from))continue;if(s){let a=n.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const yW=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(s=>s.from===s.to))return xW({state:n,dispatch:e});let r=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(s=>n.sliceDoc(s.from,s.to)!=r))return!1;let i=bW(n,r);return i?(e(n.update({selection:n.selection.addRange(Z.range(i.from,i.to),!1),effects:U.scrollIntoView(i.to)})),!0):!1},Ol=ie.define({combine(n){return ei(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new LW(e),scrollToMatch:e=>U.scrollIntoView(e)})}});class lQ{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||aW(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,r)=>r=="n"?`
89
+ `:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new _W(this):new wW(this)}getCursor(e,t=0,r){let i=e.doc?e:Ce.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?lo(this,i,t,r):oo(this,i,t,r)}}class aQ{constructor(e){this.spec=e}}function vW(n,e,t){return(r,i,s,o)=>{if(t&&!t(r,i,s,o))return!1;let l=r>=o&&i<=o+s.length?s.slice(r-o,i-o):e.doc.sliceString(r,i);return n(l,e,r,i)}}function oo(n,e,t,r){let i;return n.wholeWord&&(i=SW(e.doc,e.charCategorizer(e.selection.main.head))),n.test&&(i=vW(n.test,e,i)),new jo(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:s=>s.toLowerCase(),i)}function SW(n,e){return(t,r,i,s)=>((s>t||s+i.length<r)&&(s=Math.max(0,t-2),i=n.sliceString(s,Math.min(n.length,r+2))),(e(Uh(i,t-s))!=it.Word||e(Gh(i,t-s))!=it.Word)&&(e(Gh(i,r-s))!=it.Word||e(Uh(i,r-s))!=it.Word))}class wW extends aQ{constructor(e){super(e)}nextMatch(e,t,r){let i=oo(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let s=Math.min(e.doc.length,t+this.spec.unquoted.length);i=oo(this.spec,e,0,s).nextOverlapping()}return i.done||i.value.from==t&&i.value.to==r?null:i.value}prevMatchInRange(e,t,r){for(let i=r;;){let s=Math.max(t,i-1e4-this.spec.unquoted.length),o=oo(this.spec,e,s,i),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(s==t)return null;i-=1e4}}prevMatch(e,t,r){let i=this.prevMatchInRange(e,0,t);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=t||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let r=oo(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let s=oo(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}function kW(n,e,t){return(r,i,s)=>(!t||t(r,i,s))&&n(s[0],e,r,i)}function lo(n,e,t,r){let i;return n.wholeWord&&(i=CW(e.charCategorizer(e.selection.main.head))),n.test&&(i=kW(n.test,e,i)),new sQ(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:i},t,r)}function Uh(n,e){return n.slice(Mt(n,e,!1),e)}function Gh(n,e){return n.slice(e,Mt(n,e))}function CW(n){return(e,t,r)=>!r[0].length||(n(Uh(r.input,r.index))!=it.Word||n(Gh(r.input,r.index))!=it.Word)&&(n(Gh(r.input,r.index+r[0].length))!=it.Word||n(Uh(r.input,r.index+r[0].length))!=it.Word)}class _W extends aQ{nextMatch(e,t,r){let i=lo(this.spec,e,r,e.doc.length).next();return i.done&&(i=lo(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let s=Math.max(t,r-i*1e4),o=lo(this.spec,e,s,r),l=null;for(;!o.next().done;)l=o.value;if(l&&(s==t||l.from>s+10))return l;if(s==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let s=+r.slice(0,i);if(s>0&&s<e.match.length)return e.match[s]+r.slice(i)}return t})}matchAll(e,t){let r=lo(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let s=lo(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const ja=ye.define(),R0=ye.define(),qi=dt.define({create(n){return new Pp(Zm(n).create(),null)},update(n,e){for(let t of e.effects)t.is(ja)?n=new Pp(t.value.create(),n.panel):t.is(R0)&&(n=new Pp(n.query,t.value?I0:null));return n},provide:n=>Ra.from(n,e=>e.panel)});class Pp{constructor(e,t){this.query=e,this.panel=t}}const TW=ce.mark({class:"cm-searchMatch"}),PW=ce.mark({class:"cm-searchMatch cm-searchMatch-selected"}),EW=ft.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(qi))}update(n){let e=n.state.field(qi);(e!=n.startState.field(qi)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return ce.none;let{view:t}=this,r=new vn;for(let i=0,s=t.visibleRanges,o=s.length;i<o;i++){let{from:l,to:a}=s[i];for(;i<o-1&&a>s[i+1].from-500;)a=s[++i].to;n.highlight(t.state,l,a,(c,u)=>{let h=t.state.selection.ranges.some(f=>f.from==c&&f.to==u);r.add(c,u,h?PW:TW)})}return r.finish()}},{decorations:n=>n.decorations});function Cc(n){return e=>{let t=e.state.field(qi,!1);return t&&t.query.spec.valid?n(e,t):hQ(e)}}const Kh=Cc((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=Z.single(r.from,r.to),s=n.state.facet(Ol);return n.dispatch({selection:i,effects:[D0(n,r),s.scrollToMatch(i.main,n)],userEvent:"select.search"}),uQ(n),!0}),Jh=Cc((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)return!1;let s=Z.single(i.from,i.to),o=n.state.facet(Ol);return n.dispatch({selection:s,effects:[D0(n,i),o.scrollToMatch(s.main,n)],userEvent:"select.search"}),uQ(n),!0}),QW=Cc((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:Z.create(t.map(r=>Z.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),$W=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:r,to:i}=t.main,s=[],o=0;for(let l=new jo(n.doc,n.sliceDoc(r,i));!l.next().done;){if(s.length>1e3)return!1;l.value.from==r&&(o=s.length),s.push(Z.range(l.value.from,l.value.to))}return e(n.update({selection:Z.create(s,o),userEvent:"select.search.matches"})),!0},aw=Cc((n,{query:e})=>{let{state:t}=n,{from:r,to:i}=t.selection.main;if(t.readOnly)return!1;let s=e.nextMatch(t,r,r);if(!s)return!1;let o=s,l=[],a,c,u=[];o.from==r&&o.to==i&&(c=t.toText(e.getReplacement(o)),l.push({from:o.from,to:o.to,insert:c}),o=e.nextMatch(t,o.from,o.to),u.push(U.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(r).number)+".")));let h=n.state.changes(l);return o&&(a=Z.single(o.from,o.to).map(h),u.push(D0(n,o)),u.push(t.facet(Ol).scrollToMatch(a.main,n))),n.dispatch({changes:h,selection:a,effects:u,userEvent:"input.replace"}),!0}),AW=Cc((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(i=>{let{from:s,to:o}=i;return{from:s,to:o,insert:e.getReplacement(i)}});if(!t.length)return!1;let r=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:U.announce.of(r),userEvent:"input.replace.all"}),!0});function I0(n){return n.state.facet(Ol).createPanel(n)}function Zm(n,e){var t,r,i,s,o;let l=n.selection.main,a=l.empty||l.to>l.from+100?"":n.sliceDoc(l.from,l.to);if(e&&!a)return e;let c=n.facet(Ol);return new lQ({search:((t=e?.literal)!==null&&t!==void 0?t:c.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(r=e?.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=e?.literal)!==null&&i!==void 0?i:c.literal,regexp:(s=e?.regexp)!==null&&s!==void 0?s:c.regexp,wholeWord:(o=e?.wholeWord)!==null&&o!==void 0?o:c.wholeWord})}function cQ(n){let e=e0(n,I0);return e&&e.dom.querySelector("[main-field]")}function uQ(n){let e=cQ(n);e&&e==n.root.activeElement&&e.select()}const hQ=n=>{let e=n.state.field(qi,!1);if(e&&e.panel){let t=cQ(n);if(t&&t!=n.root.activeElement){let r=Zm(n.state,e.query.spec);r.valid&&n.dispatch({effects:ja.of(r)}),t.focus(),t.select()}}else n.dispatch({effects:[R0.of(!0),e?ja.of(Zm(n.state,e.query.spec)):ye.appendConfig.of(IW)]});return!0},fQ=n=>{let e=n.state.field(qi,!1);if(!e||!e.panel)return!1;let t=e0(n,I0);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:R0.of(!1)}),!0},MW=[{key:"Mod-f",run:hQ,scope:"editor search-panel"},{key:"F3",run:Kh,shift:Jh,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Kh,shift:Jh,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:fQ,scope:"editor search-panel"},{key:"Mod-Shift-l",run:$W},{key:"Mod-Alt-g",run:cW},{key:"Mod-d",run:yW,preventDefault:!0}];class LW{constructor(e){this.view=e;let t=this.query=e.state.field(qi).query.spec;this.commit=this.commit.bind(this),this.searchField=je("input",{value:t.search,placeholder:Cn(e,"Find"),"aria-label":Cn(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=je("input",{value:t.replace,placeholder:Cn(e,"Replace"),"aria-label":Cn(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=je("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=je("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=je("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function r(i,s,o){return je("button",{class:"cm-button",name:i,onclick:s,type:"button"},o)}this.dom=je("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>Kh(e),[Cn(e,"next")]),r("prev",()=>Jh(e),[Cn(e,"previous")]),r("select",()=>QW(e),[Cn(e,"all")]),je("label",null,[this.caseField,Cn(e,"match case")]),je("label",null,[this.reField,Cn(e,"regexp")]),je("label",null,[this.wordField,Cn(e,"by word")]),...e.state.readOnly?[]:[je("br"),this.replaceField,r("replace",()=>aw(e),[Cn(e,"replace")]),r("replaceAll",()=>AW(e),[Cn(e,"replace all")])],je("button",{name:"close",onclick:()=>fQ(e),"aria-label":Cn(e,"close"),type:"button"},["×"])])}commit(){let e=new lQ({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:ja.of(e)}))}keydown(e){dN(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Jh:Kh)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),aw(this.view))}update(e){for(let t of e.transactions)for(let r of t.effects)r.is(ja)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Ol).top}}function Cn(n,e){return n.state.phrase(e)}const cu=30,uu=/[\s\.,:;?!]/;function D0(n,{from:e,to:t}){let r=n.state.doc.lineAt(e),i=n.state.doc.lineAt(t).to,s=Math.max(r.from,e-cu),o=Math.min(i,t+cu),l=n.state.sliceDoc(s,o);if(s!=r.from){for(let a=0;a<cu;a++)if(!uu.test(l[a+1])&&uu.test(l[a])){l=l.slice(a);break}}if(o!=i){for(let a=l.length-1;a>l.length-cu;a--)if(!uu.test(l[a-1])&&uu.test(l[a])){l=l.slice(0,a);break}}return U.announce.of(`${n.state.phrase("current match")}. ${l} ${n.state.phrase("on line")} ${r.number}.`)}const RW=U.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),IW=[qi,yr.low(EW),RW];class cw{constructor(e,t,r){this.from=e,this.to=t,this.diagnostic=r}}class ms{constructor(e,t,r){this.diagnostics=e,this.panel=t,this.selected=r}static init(e,t,r){let i=r.facet(qa).markerFilter;i&&(e=i(e,r));let s=e.slice().sort((d,p)=>d.from-p.from||d.to-p.to),o=new vn,l=[],a=0,c=r.doc.iter(),u=0,h=r.doc.length;for(let d=0;;){let p=d==s.length?null:s[d];if(!p&&!l.length)break;let g,m;if(l.length)g=a,m=l.reduce((b,y)=>Math.min(b,y.to),p&&p.from>g?p.from:1e8);else{if(g=p.from,g>h)break;m=p.to,l.push(p),d++}for(;d<s.length;){let b=s[d];if(b.from==g&&(b.to>b.from||b.to==g))l.push(b),d++,m=Math.min(b.to,m);else{m=Math.min(b.from,m);break}}m=Math.min(m,h);let x=!1;if(l.some(b=>b.from==g&&(b.to==m||m==h))&&(x=g==m,!x&&m-g<10)){let b=g-(u+c.value.length);b>0&&(c.next(b),u=g);for(let y=g;;){if(y>=m){x=!0;break}if(!c.lineBreak&&u+c.value.length>y)break;y=u+c.value.length,u+=c.value.length,c.next()}}let O=HW(l);if(x)o.add(g,g,ce.widget({widget:new WW(O),diagnostics:l.slice()}));else{let b=l.reduce((y,S)=>S.markClass?y+" "+S.markClass:y,"");o.add(g,m,ce.mark({class:"cm-lintRange cm-lintRange-"+O+b,diagnostics:l.slice(),inclusiveEnd:l.some(y=>y.to>m)}))}if(a=m,a==h)break;for(let b=0;b<l.length;b++)l[b].to<=a&&l.splice(b--,1)}let f=o.finish();return new ms(f,t,ts(f))}}function ts(n,e=null,t=0){let r=null;return n.between(t,1e9,(i,s,{spec:o})=>{if(!(e&&o.diagnostics.indexOf(e)<0))if(!r)r=new cw(i,s,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new cw(r.from,s,r.diagnostic)}}),r}function DW(n,e){let t=e.pos,r=e.end||t,i=n.state.facet(qa).hideOn(n,t,r);if(i!=null)return i;let s=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(o=>o.is(dQ))||n.changes.touchesRange(s.from,Math.max(s.to,r)))}function NW(n,e){return n.field(Ln,!1)?e:e.concat(ye.appendConfig.of(UW))}const dQ=ye.define(),N0=ye.define(),pQ=ye.define(),Ln=dt.define({create(){return new ms(ce.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),r=null,i=n.panel;if(n.selected){let s=e.changes.mapPos(n.selected.from,1);r=ts(t,n.selected.diagnostic,s)||ts(t,null,s)}!t.size&&i&&e.state.facet(qa).autoPanel&&(i=null),n=new ms(t,i,r)}for(let t of e.effects)if(t.is(dQ)){let r=e.state.facet(qa).autoPanel?t.value.length?Ya.open:null:n.panel;n=ms.init(t.value,r,e.state)}else t.is(N0)?n=new ms(n.diagnostics,t.value?Ya.open:null,n.selected):t.is(pQ)&&(n=new ms(n.diagnostics,n.panel,t.value));return n},provide:n=>[Ra.from(n,e=>e.panel),U.decorations.from(n,e=>e.diagnostics)]}),VW=ce.mark({class:"cm-lintRange cm-lintRange-active"});function ZW(n,e,t){let{diagnostics:r}=n.state.field(Ln),i,s=-1,o=-1;r.between(e-(t<0?1:0),e+(t>0?1:0),(a,c,{spec:u})=>{if(e>=a&&e<=c&&(a==c||(e>a||t>0)&&(e<c||t<0)))return i=u.diagnostics,s=a,o=c,!1});let l=n.state.facet(qa).tooltipFilter;return i&&l&&(i=l(i,n.state)),i?{pos:s,end:o,above:n.state.doc.lineAt(s).to<o,create(){return{dom:BW(n,i)}}}:null}function BW(n,e){return je("ul",{class:"cm-tooltip-lint"},e.map(t=>mQ(n,t,!1)))}const FW=n=>{let e=n.state.field(Ln,!1);(!e||!e.panel)&&n.dispatch({effects:NW(n.state,[N0.of(!0)])});let t=e0(n,Ya.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},uw=n=>{let e=n.state.field(Ln,!1);return!e||!e.panel?!1:(n.dispatch({effects:N0.of(!1)}),!0)},XW=n=>{let e=n.state.field(Ln,!1);if(!e)return!1;let t=n.state.selection.main,r=ts(e.diagnostics,null,t.to+1);return!r&&(r=ts(e.diagnostics,null,0),!r||r.from==t.from&&r.to==t.to)?!1:(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},zW=[{key:"Mod-Shift-m",run:FW,preventDefault:!0},{key:"F8",run:XW}],qa=ie.define({combine(n){return{sources:n.map(e=>e.source).filter(e=>e!=null),...ei(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:hw,tooltipFilter:hw,needsRefresh:(e,t)=>e?t?r=>e(r)||t(r):e:t,hideOn:(e,t)=>e?t?(r,i,s)=>e(r,i,s)||t(r,i,s):e:t,autoPanel:(e,t)=>e||t})}}});function hw(n,e){return n?e?(t,r)=>e(n(t,r),r):n:e}function gQ(n){let e=[];if(n)e:for(let{name:t}of n){for(let r=0;r<t.length;r++){let i=t[r];if(/[a-zA-Z]/.test(i)&&!e.some(s=>s.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function mQ(n,e,t){var r;let i=t?gQ(e.actions):[];return je("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},je("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((s,o)=>{let l=!1,a=d=>{if(d.preventDefault(),l)return;l=!0;let p=ts(n.state.field(Ln).diagnostics,e);p&&s.apply(n,p.from,p.to)},{name:c}=s,u=i[o]?c.indexOf(i[o]):-1,h=u<0?c:[c.slice(0,u),je("u",c.slice(u,u+1)),c.slice(u+1)],f=s.markClass?" "+s.markClass:"";return je("button",{type:"button",class:"cm-diagnosticAction"+f,onclick:a,onmousedown:a,"aria-label":` Action: ${c}${u<0?"":` (access key "${i[o]})"`}.`},h)}),e.source&&je("div",{class:"cm-diagnosticSource"},e.source))}class WW extends Jn{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return je("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class fw{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=mQ(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Ya{constructor(e){this.view=e,this.items=[];let t=i=>{if(!(i.ctrlKey||i.altKey||i.metaKey)){if(i.keyCode==27)uw(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=gQ(s.actions);for(let l=0;l<o.length;l++)if(o[l].toUpperCase().charCodeAt(0)==i.keyCode){let a=ts(this.view.state.field(Ln).diagnostics,s);a&&s.actions[l].apply(e,a.from,a.to)}}else return;i.preventDefault()}},r=i=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(i.target)&&this.moveSelection(s)};this.list=je("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:r}),this.dom=je("div",{class:"cm-panel-lint"},this.list,je("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>uw(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Ln).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(Ln),r=0,i=!1,s=null,o=new Set;for(e.between(0,this.view.state.doc.length,(l,a,{spec:c})=>{for(let u of c.diagnostics){if(o.has(u))continue;o.add(u);let h=-1,f;for(let d=r;d<this.items.length;d++)if(this.items[d].diagnostic==u){h=d;break}h<0?(f=new fw(this.view,u),this.items.splice(r,0,f),i=!0):(f=this.items[h],h>r&&(this.items.splice(r,h-r),i=!0)),t&&f.diagnostic==t.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),s=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new fw(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:l,panel:a})=>{let c=a.height/this.list.offsetHeight;l.top<a.top?this.list.scrollTop-=(a.top-l.top)/c:l.bottom>a.bottom&&(this.list.scrollTop+=(l.bottom-a.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)t();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Ln),r=ts(t.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:pQ.of(r)})}static open(e){return new Ya(e)}}function jW(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(n)}</svg>')`}function hu(n){return jW(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${n}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const qW=U.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:hu("#d11")},".cm-lintRange-warning":{backgroundImage:hu("orange")},".cm-lintRange-info":{backgroundImage:hu("#999")},".cm-lintRange-hint":{backgroundImage:hu("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function YW(n){return n=="error"?4:n=="warning"?3:n=="info"?2:1}function HW(n){let e="hint",t=1;for(let r of n){let i=YW(r.severity);i>t&&(t=i,e=r.severity)}return e}const UW=[Ln,U.decorations.compute([Ln],n=>{let{selected:e,panel:t}=n.field(Ln);return!e||!t||e.from==e.to?ce.none:ce.set([VW.range(e.from,e.to)])}),JN(ZW,{hideOn:DW}),qW],OQ=[t0(),dV(),QN(),$B(),sZ(),bN(),kN(),Ce.allowMultipleSelections.of(!0),qV(),dP(cZ,{fallback:!0}),mZ(),cB(),yB(),FN(),WN(),IN(),fW(),ul.of([...dB,...MF,...MW,...ZB,...tZ,...LP,...zW])],id=v.forwardRef(({title:n,children:e},t)=>{const r=Lt(rl);return v.createElement(xk,{delayDuration:100},v.createElement(bk,null,v.createElement(yk,{ref:t,asChild:!0},v.createElement("span",{className:se.tooltipTrigger},e)),v.createElement(vk,{container:r?.current},v.createElement(Sk,{className:St(se.tooltipContent),sideOffset:10},n))))}),GW=v.forwardRef(({children:n,className:e,...t},r)=>v.createElement(M3,{...t,ref:r,className:St(e,se.selectItem)},v.createElement(L3,null,n))),KW=({title:n,placeholder:e,className:t})=>{const[r,i]=Ht(Gn,ln);return v.createElement(id,{title:n},v.createElement(T3,{"aria-label":e,className:St(se.selectTrigger,t),"data-toolbar-item":!0,disabled:r},v.createElement(P3,{placeholder:e}),v.createElement(E3,{className:se.selectDropdownArrow},i("arrow_drop_down"))))},JW=({children:n,className:e=se.selectContainer})=>{const t=Lt(rl);return v.createElement(Q3,{container:t?.current},v.createElement($3,{className:St(e,"mdxeditor-select-content"),onCloseAutoFocus:r=>{r.preventDefault()},position:"popper"},v.createElement(A3,{"data-editor-dropdown":!0},n)))},xQ=n=>v.createElement(C3,{value:n.value||"",onValueChange:n.onChange,disabled:n.disabled},v.createElement(KW,{title:n.triggerTitle,placeholder:n.placeholder}),v.createElement(JW,null,n.items.map((e,t)=>e==="separator"?v.createElement(_3,{key:t}):v.createElement(GW,{key:t,value:e.value},e.label)))),dw="__EMPTY_VALUE__",ej=({language:n,nodeKey:e,code:t,focusEmitter:r})=>{const i=Gt(),{parentEditor:s,lexicalNode:o}=Xg(),[l,a,c,u,h]=Ht(Gn,Fm,Xm,ln,Bm),f=Jz(e,"codeblock",n,r),{setCode:d}=Xg(),p=v.useRef(null),g=v.useRef(null),m=v.useRef(d);return m.current=d,f.current={getCodemirror:()=>p.current},v.useEffect(()=>{const x=g.current;return(async()=>{const O=[...a,OQ,rQ,t0(),ul.of([LF]),U.lineWrapping,U.updateListener.of(({state:b})=>{m.current(b.doc.toString())}),U.domEventHandlers({focus:()=>{s.update(()=>{ht(null)})}})];if(l&&O.push(Ce.readOnly.of(!0)),n!==""&&c){const b=eW.find(y=>y.name===n||y.alias.includes(n)||y.extensions.includes(n));if(b)try{const y=await b.load();O.push(y.extension)}catch{console.warn("failed to load language support for",n)}}x.innerHTML="",p.current=new U({parent:x,state:Ce.create({doc:t,extensions:O})}),x.addEventListener("keydown",pw)})(),()=>{var O;(O=p.current)==null||O.destroy(),p.current=null,x.removeEventListener("keydown",pw)}},[l,n,...a]),v.createElement("div",{className:se.codeMirrorWrapper},v.createElement("div",{className:se.codeMirrorToolbar},v.createElement(xQ,{disabled:l,value:n,onChange:x=>{s.update(()=>{o.setLanguage(x===dw?"":x),setTimeout(()=>{s.update(()=>{o.getLatest().select()})})})},triggerTitle:i("codeBlock.selectLanguage","Select code block language"),placeholder:i("codeBlock.inlineLanguage","Language"),items:Object.entries(h).map(([x,O])=>({value:x||dw,label:O}))}),v.createElement("button",{className:se.iconButton,type:"button",disabled:l,title:i("codeblock.delete","Delete code block"),onClick:x=>{x.preventDefault(),s.update(()=>{o.remove()})}},u("delete_small"))),v.createElement("div",{ref:g}))};function pw(n){n.stopPropagation()}const Bm=ue({js:"JavaScript",ts:"TypeScript",tsx:"TypeScript (React)",jsx:"JavaScript (React)",css:"CSS"}),tj=zt(n=>{n.link(n.pipe(tj,Es(({language:e,code:t})=>({code:t,language:e,meta:""}))),b_)}),Fm=ue([]),Xm=ue(!0),nj=Rn({update(n,e){n.pubIn({[Bm]:e?.codeBlockLanguages,[Fm]:e?.codeMirrorExtensions??[],[Xm]:e?.autoLoadLanguageSupport??!0})},init(n,e){n.pubIn({[Bm]:e?.codeBlockLanguages,[Fm]:e?.codeMirrorExtensions??[],[rI]:rj(e?.codeBlockLanguages??{}),[Xm]:e?.autoLoadLanguageSupport??!0})}});function rj(n){return{match(e,t){return Object.hasOwn(n,e??"")&&!t},priority:1,Editor:ej}}function ij({url:n,title:e,text:t,onSubmit:r,onCancel:i,linkAutocompleteSuggestions:s,showLinkTitleField:o,showAnchorTextField:l}){const{register:a,handleSubmit:c,control:u,setValue:h,reset:f}=nR({values:{url:n,title:e,text:t}}),d=Gt();return v.createElement("form",{onSubmit:p=>{c(r)(p),p.stopPropagation(),p.preventDefault()},onReset:p=>{p.stopPropagation(),i()},onKeyDown:p=>{p.key==="Escape"&&(p.stopPropagation(),i())},className:St(se.multiFieldForm,se.linkDialogEditForm)},v.createElement("div",{className:se.formField},v.createElement("label",{htmlFor:"link-url"},d("createLink.url","URL")),v.createElement(zR,{register:a,initialInputValue:n,inputName:"url",suggestions:s,setValue:h,control:u,placeholder:d("createLink.urlPlaceholder","Select or paste an URL"),autofocus:!0})),l?v.createElement("div",{className:se.formField},v.createElement("label",{htmlFor:"link-text",title:d("createLink.textTooltip","The text to be displayed for the link")},d("createLink.text","Anchor text")),v.createElement("input",{id:"link-text",className:se.textInput,size:40,...a("text")})):null,o?v.createElement("div",{className:se.formField},v.createElement("label",{htmlFor:"link-title",title:d("createLink.titleTooltip","The link's title attribute, shown on hover")},d("createLink.title","Link title")),v.createElement("input",{id:"link-title",className:se.textInput,size:40,...a("title")})):null,v.createElement("div",{style:{display:"flex",justifyContent:"flex-end",gap:"var(--spacing-2)"}},v.createElement("button",{type:"submit",title:d("createLink.saveTooltip","Set URL"),"aria-label":d("createLink.saveTooltip","Set URL"),className:St(se.primaryButton)},d("dialogControls.save","Save")),v.createElement("button",{type:"reset",title:d("createLink.cancelTooltip","Cancel change"),"aria-label":d("createLink.cancelTooltip","Cancel change"),className:St(se.secondaryButton)},d("dialogControls.cancel","Cancel"))))}const sj=()=>{const[n,e,t,r,i,s,o]=Ht(rl,ot,ln,un,kQ,CQ,TQ),l=ut(bQ),a=ut(yQ),c=ut(vQ),u=ut(SQ),h=ut(wQ);v.useEffect(()=>{const x=()=>{e?.getEditorState().read(()=>{l(!0)})};return window.addEventListener("resize",x),window.addEventListener("scroll",x),()=>{window.removeEventListener("resize",x),window.removeEventListener("scroll",x)}},[e,l]);const[f,d]=v.useState(!1),p=Gt();if(r.type==="inactive")return null;const g=r.rectangle,m=r.type==="preview"&&r.url.startsWith("http");return v.createElement(o1,{open:!0},v.createElement(XM,{"data-visible":r.type==="edit",className:se.linkDialogAnchor,style:{top:`${g.top}px`,left:`${g.left}px`,width:`${g.width}px`,height:`${g.height}px`}}),v.createElement(l1,{container:n?.current},v.createElement(zM,{className:St(se.linkDialogPopoverContent),sideOffset:5,onOpenAutoFocus:x=>{x.preventDefault()},key:r.linkNodeKey},r.type==="edit"&&v.createElement(ij,{url:r.url,title:r.title,text:r.text,onSubmit:a,onCancel:c.bind(null),linkAutocompleteSuggestions:i,showLinkTitleField:o,showAnchorTextField:r.withAnchorText}),r.type==="preview"&&v.createElement(v.Fragment,null,v.createElement("a",{className:se.linkDialogPreviewAnchor,href:r.url,...m?{target:"_blank",rel:"noreferrer"}:{},onClick:x=>{s!==null&&(x.preventDefault(),s(r.url))},title:m?p("linkPreview.open","Open {{url}} in new window",{url:r.url}):r.url},v.createElement("span",null,r.url),m&&t("open_in_new")),v.createElement(Ep,{onClick:()=>{u()},title:p("linkPreview.edit","Edit link URL"),"aria-label":p("linkPreview.edit","Edit link URL")},t("edit")),v.createElement(xk,null,v.createElement(bk,{open:f},v.createElement(yk,{asChild:!0},v.createElement(Ep,{title:p("linkPreview.copyToClipboard","Copy to clipboard"),"aria-label":p("linkPreview.copyToClipboard","Copy to clipboard"),onClick:()=>{window.navigator.clipboard.writeText(r.url).then(()=>{d(!0),setTimeout(()=>{d(!1)},1e3)})}},t(f?"check":"content_copy"))),v.createElement(vk,{container:n?.current},v.createElement(Sk,{className:St(se.tooltipContent),sideOffset:5},p("linkPreview.copied","Copied!"),v.createElement(S3,null))))),v.createElement(Ep,{title:p("linkPreview.remove","Remove link"),"aria-label":p("linkPreview.remove","Remove link"),onClick:()=>{h()}},t("link_off"))),v.createElement(a1,{className:se.popoverArrow}))))},Ep=v.forwardRef(({className:n,...e},t)=>v.createElement("button",{className:St(se.actionButton,n),ref:t,...e}));function zm(n){if(!n)return null;const e=U6(n);if(e===null)return null;const t=e.getParent();return dn(t)?t:dn(e)?e:null}const bQ=zt(),un=ue({type:"inactive"},n=>{n.pub(gh,e=>e.registerCommand(df,()=>n.getValue(un).type==="preview"?(n.pub(un,{type:"inactive"}),!0):!1,Et)),n.sub(n.pipe(wi),e=>{e!=="rich-text"&&n.pub(un,{type:"inactive"})}),n.pub(gh,e=>e.registerCommand(gO,t=>{if(t.key==="k"&&(xh?t.metaKey:t.ctrlKey)&&!n.getValue(Gn)){const r=H();return B(r)?(n.pub(V0),t.stopPropagation(),t.preventDefault(),!0):!1}return!1},oA)),n.sub(n.pipe(SQ,xt(un,ot)),([,e,t])=>{if(e.type==="preview")setTimeout(()=>{t?.getEditorState().read(()=>{const r=rt(e.linkNodeKey),i=dn(r)?r.getTextContent().length>0&&r.getChildrenSize()<=1:!1,s=i&&r?r.getTextContent():"";n.pub(un,{type:"edit",initialUrl:e.url,url:e.url,title:e.title,text:s,withAnchorText:i,linkNodeKey:e.linkNodeKey,rectangle:e.rectangle})})});else throw new Error("Cannot switch to edit mode when not in preview mode")}),n.sub(n.pipe(yQ,xt(ot,un,Mo)),([e,t,r,i])=>{var s,o,l;const a=((s=e.text)==null?void 0:s.trim())??"",c=((o=e.url)==null?void 0:o.trim())??"",u=((l=e.title)==null?void 0:l.trim())??"";if(c!==""){if(i?.isCollapsed()){const h=a||u||c;t?.update(()=>{const f=zm(i);if(f)if(or(f)){const d=ki(c,{title:u});d.append(Ye(a)),f.replace(d),d.select()}else f.setURL(c),f.setTitle(u),gw(f.getFirstChild(),a);else{const d=ki(c,{title:u});d.append(Ye(h)),xf([d]),d.select()}},{discrete:!0})}else t?.update(()=>{gw(i?.anchor.getNode(),a)}),t?.dispatchCommand(Lo,{url:c,title:u});n.pub(un,{type:"preview",linkNodeKey:r.linkNodeKey,rectangle:r.rectangle,title:u,url:c})}else r.type==="edit"&&r.initialUrl!==""&&t?.dispatchCommand(Lo,null),n.pub(un,{type:"inactive"})}),n.link(n.pipe(vQ,xt(un,ot),Es(([,e,t])=>{if(e.type==="edit")return t?.focus(),e.initialUrl===""?{type:"inactive"}:{type:"preview",url:e.initialUrl,linkNodeKey:e.linkNodeKey,rectangle:e.rectangle};throw new Error("Cannot cancel edit when not in edit mode")})),un),n.link(n.pipe(n.combine(Mo,bQ),xt(ot,un,Gn),Es(([[e],t,r,i])=>{if(B(e)&&t&&!i){const s=zm(e);if(!e.isCollapsed())return{type:"inactive"};if(s){const o=nC(t);return o?{type:"preview",url:s.getURL(),linkNodeKey:s.getKey(),title:s.getTitle(),rectangle:o}:{type:"inactive"}}else return{type:"inactive"}}else return{type:"inactive"}})),un)}),yQ=zt(),vQ=Uo();Uo();const SQ=Uo(),wQ=Uo(n=>{n.sub(n.pipe(wQ,xt(ot)),([,e])=>{e?.dispatchCommand(Lo,null)})}),V0=Uo(n=>{n.sub(n.pipe(V0,xt(Mo,ot),Ja(([,e])=>B(e))),([,e,t])=>{t?.focus(()=>{setTimeout(()=>{t.getEditorState().read(()=>{const r=zm(e),i=nC(t),s=r?.getURL()??"",o=r?.getURL()??"",l=r?.getTitle()??"",a=r?.getKey()??"",c=r?r.getTextContent().length>0&&r.getChildrenSize()<=1:!!e?.isCollapsed(),u=c&&r?r.getTextContent():"";n.pub(un,{type:"edit",initialUrl:s,url:o,title:l,text:u,withAnchorText:c,linkNodeKey:a,rectangle:i})})})})})}),kQ=ue([]),CQ=ue(null),_Q=ue(null,n=>{n.pub(gh,e=>{function t(r){const[i,s]=n.getValues([Gn,_Q]);!i||s===null||e.update(()=>{const o=Hr(r.target);if(o!==null){const l=dr(o,a=>a instanceof Ei);l!==null&&s(r,l,l.getURL())}})}return e.registerRootListener((r,i)=>{r&&r.addEventListener("click",t),i&&i.removeEventListener("click",t)})})});function gw(n,e){G(n)&&e&&(n.setTextContent(e),n.selectStart())}const TQ=ue(!0),oj=Rn({init(n,e){n.pub(il,e?.LinkDialog??sj),n.pub(CQ,e?.onClickLinkCallback??null),n.pub(_Q,e?.onReadOnlyClickLinkCallback??null),n.pub(TQ,e?.showLinkTitleField??!0)},update(n,e={}){n.pub(kQ,e.linkAutocompleteSuggestions??[])}});function Z0(n,e){return v.forwardRef((t,r)=>{const i=St(e.className,t.className);return v.createElement(n,{...e,...t,className:i,ref:r})})}function lj(n){return({title:e,children:t,...r})=>v.createElement(n,{...r},v.createElement(id,{title:e},t))}const aj=({readOnly:n,children:e,className:t})=>v.createElement(d1,{className:St("mdxeditor-toolbar",se.toolbarRoot,{[se.readOnlyToolbarRoot]:n},t),...n?{tabIndex:-1}:{}},e),cj=Z0(_s,{className:se.toolbarButton,"data-toolbar-item":!0}),B0=lj(cj),PQ=Z0($u,{className:se.toolbarToggleItem,"data-toolbar-item":!0});Z0(Bf,{type:"single",className:se.toolbarToggleSingleGroup});const EQ=v.forwardRef(({on:n,title:e,children:t,disabled:r,...i},s)=>v.createElement(Bf,{type:"single",className:se.toolbarToggleSingleGroup,...i,value:n?"on":"off",ref:s},v.createElement(PQ,{"aria-label":e,value:"on",disabled:r},v.createElement(id,{title:e},t)))),uj=({items:n})=>v.createElement("div",{className:se.toolbarGroupOfGroups},n.map((e,t)=>v.createElement(EQ,{key:t,title:e.title,on:e.active,onValueChange:r=>{e.onChange(r==="on")},disabled:e.disabled},e.contents))),QQ=({value:n,onChange:e,className:t,ggClassName:r,items:i,disabled:s})=>{const o=Gt();return v.createElement("div",{className:St(se.toolbarGroupOfGroups,r)},v.createElement(Bf,{"aria-label":o("toolbar.toggleGroup","toggle group"),type:"single",className:St(se.toolbarToggleSingleGroup,t),onValueChange:e,value:n||"",disabled:s,onFocus:l=>{l.preventDefault()}},i.map((l,a)=>v.createElement(PQ,{key:a,"aria-label":l.title,value:l.value},v.createElement(id,{title:l.title},l.contents)))))},Qp=ue(()=>null),$p=ue(""),mw=()=>"This is an empty toolbar. Pass `{toolbarContents: () => { return <>toolbar components</> }}` to the toolbarPlugin to customize it.",hj=Rn({init(n,e){const t=e?.toolbarPosition==="bottom"?m4:g4;n.pubIn({[Qp]:e?.toolbarContents??mw,[$p]:e?.toolbarClassName??"",[t]:()=>{const[r,i,s]=Ht(Qp,Gn,$p);return v.createElement(aj,{className:s,readOnly:i},r())}})},update(n,e){n.pub(Qp,e?.toolbarContents??mw),n.pub($p,e?.toolbarClassName??"")}});class Ot{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}offset(e,t=e){return new Ot(this.fromA+e,this.toA+e,this.fromB+t,this.toB+t)}}function Hs(n,e,t,r,i,s){if(n==r)return[];let o=X0(n,e,t,r,i,s),l=z0(n,e+o,t,r,i+o,s);e+=o,t-=l,i+=o,s-=l;let a=t-e,c=s-i;if(!a||!c)return[new Ot(e,t,i,s)];if(a>c){let h=n.slice(e,t).indexOf(r.slice(i,s));if(h>-1)return[new Ot(e,e+h,i,i),new Ot(e+h+c,t,s,s)]}else if(c>a){let h=r.slice(i,s).indexOf(n.slice(e,t));if(h>-1)return[new Ot(e,e,i,i+h),new Ot(t,t,i+h+a,s)]}if(a==1||c==1)return[new Ot(e,t,i,s)];let u=MQ(n,e,t,r,i,s);if(u){let[h,f,d]=u;return Hs(n,e,h,r,i,f).concat(Hs(n,h+d,t,r,f+d,s))}return fj(n,e,t,r,i,s)}let Fl=1e9,Xl=0,F0=!1;function fj(n,e,t,r,i,s){let o=t-e,l=s-i;if(Fl<1e9&&Math.min(o,l)>Fl*16||Xl>0&&Date.now()>Xl)return Math.min(o,l)>Fl*64?[new Ot(e,t,i,s)]:Ow(n,e,t,r,i,s);let a=Math.ceil((o+l)/2);Ap.reset(a),Mp.reset(a);let c=(d,p)=>n.charCodeAt(e+d)==r.charCodeAt(i+p),u=(d,p)=>n.charCodeAt(t-d-1)==r.charCodeAt(s-p-1),h=(o-l)%2!=0?Mp:null,f=h?null:Ap;for(let d=0;d<a;d++){if(d>Fl||Xl>0&&!(d&63)&&Date.now()>Xl)return Ow(n,e,t,r,i,s);let p=Ap.advance(d,o,l,a,h,!1,c)||Mp.advance(d,o,l,a,f,!0,u);if(p)return dj(n,e,t,e+p[0],r,i,s,i+p[1])}return[new Ot(e,t,i,s)]}class $Q{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let t=0;t<this.len;t++)this.vec[t]=-1;this.vec[e+1]=0,this.start=this.end=0}advance(e,t,r,i,s,o,l){for(let a=-e+this.start;a<=e-this.end;a+=2){let c=i+a,u=a==-e||a!=e&&this.vec[c-1]<this.vec[c+1]?this.vec[c+1]:this.vec[c-1]+1,h=u-a;for(;u<t&&h<r&&l(u,h);)u++,h++;if(this.vec[c]=u,u>t)this.end+=2;else if(h>r)this.start+=2;else if(s){let f=i+(t-r)-a;if(f>=0&&f<this.len&&s.vec[f]!=-1)if(o){let d=s.vec[f];if(d>=t-u)return[d,i+d-f]}else{let d=t-s.vec[f];if(u>=d)return[u,h]}}}return null}}const Ap=new $Q,Mp=new $Q;function dj(n,e,t,r,i,s,o,l){let a=!1;return!qo(n,r)&&++r==t&&(a=!0),!qo(i,l)&&++l==o&&(a=!0),a?[new Ot(e,t,s,o)]:Hs(n,e,r,i,s,l).concat(Hs(n,r,t,i,l,o))}function AQ(n,e){let t=1,r=Math.min(n,e);for(;t<r;)t=t<<1;return t}function X0(n,e,t,r,i,s){if(e==t||e==s||n.charCodeAt(e)!=r.charCodeAt(i))return 0;let o=AQ(t-e,s-i);for(let l=e,a=i;;){let c=l+o,u=a+o;if(c>t||u>s||n.slice(l,c)!=r.slice(a,u)){if(o==1)return l-e-(qo(n,l)?0:1);o=o>>1}else{if(c==t||u==s)return c-e;l=c,a=u}}}function z0(n,e,t,r,i,s){if(e==t||i==s||n.charCodeAt(t-1)!=r.charCodeAt(s-1))return 0;let o=AQ(t-e,s-i);for(let l=t,a=s;;){let c=l-o,u=a-o;if(c<e||u<i||n.slice(c,l)!=r.slice(u,a)){if(o==1)return t-l-(qo(n,l)?0:1);o=o>>1}else{if(c==e||u==i)return t-c;l=c,a=u}}}function Wm(n,e,t,r,i,s,o,l){let a=r.slice(i,s),c=null;for(;;){if(c||o<l)return c;for(let u=e+o;;){qo(n,u)||u++;let h=u+o;if(qo(n,h)||(h+=h==u+1?1:-1),h>=t)break;let f=n.slice(u,h),d=-1;for(;(d=a.indexOf(f,d+1))!=-1;){let p=X0(n,h,t,r,i+d+f.length,s),g=z0(n,e,u,r,i,i+d),m=f.length+p+g;(!c||c[2]<m)&&(c=[u-g,i+d-g,m])}u=h}if(l<0)return c;o=o>>1}}function MQ(n,e,t,r,i,s){let o=t-e,l=s-i;if(o<l){let a=MQ(r,i,s,n,e,t);return a&&[a[1],a[0],a[2]]}return o<4||l*2<o?null:Wm(n,e,t,r,i,s,Math.floor(o/4),-1)}function Ow(n,e,t,r,i,s){F0=!0;let o=t-e,l=s-i,a;if(o<l){let f=Wm(r,i,s,n,e,t,Math.floor(o/6),50);a=f&&[f[1],f[0],f[2]]}else a=Wm(n,e,t,r,i,s,Math.floor(l/6),50);if(!a)return[new Ot(e,t,i,s)];let[c,u,h]=a;return Hs(n,e,c,r,i,u).concat(Hs(n,c+h,t,r,u+h,s))}function LQ(n,e){for(let t=1;t<n.length;t++){let r=n[t-1],i=n[t];r.toA>i.fromA-e&&r.toB>i.fromB-e&&(n[t-1]=new Ot(r.fromA,i.toA,r.fromB,i.toB),n.splice(t--,1))}}function pj(n,e,t){for(;;){LQ(t,1);let r=!1;for(let i=0;i<t.length;i++){let s=t[i],o,l;(o=X0(n,s.fromA,s.toA,e,s.fromB,s.toB))&&(s=t[i]=new Ot(s.fromA+o,s.toA,s.fromB+o,s.toB)),(l=z0(n,s.fromA,s.toA,e,s.fromB,s.toB))&&(s=t[i]=new Ot(s.fromA,s.toA-l,s.fromB,s.toB-l));let a=s.toA-s.fromA,c=s.toB-s.fromB;if(a&&c)continue;let u=s.fromA-(i?t[i-1].toA:0),h=(i<t.length-1?t[i+1].fromA:n.length)-s.toA;if(!u||!h)continue;let f=a?n.slice(s.fromA,s.toA):e.slice(s.fromB,s.toB);u<=f.length&&n.slice(s.fromA-u,s.fromA)==f.slice(f.length-u)?(t[i]=new Ot(s.fromA-u,s.toA-u,s.fromB-u,s.toB-u),r=!0):h<=f.length&&n.slice(s.toA,s.toA+h)==f.slice(0,h)&&(t[i]=new Ot(s.fromA+h,s.toA+h,s.fromB+h,s.toB+h),r=!0)}if(!r)break}return t}function gj(n,e,t){for(let r=0,i=0;i<n.length;i++){let s=n[i],o=s.toA-s.fromA,l=s.toB-s.fromB;if(o&&l||o>3||l>3){let a=i==n.length-1?e.length:n[i+1].fromA,c=s.fromA-r,u=a-s.toA,h=bw(e,s.fromA,c),f=xw(e,s.toA,u),d=s.fromA-h,p=f-s.toA;if((!o||!l)&&d&&p){let g=Math.max(o,l),[m,x,O]=o?[e,s.fromA,s.toA]:[t,s.fromB,s.toB];g>d&&e.slice(h,s.fromA)==m.slice(O-d,O)?(s=n[i]=new Ot(h,h+o,s.fromB-d,s.toB-d),h=s.fromA,f=xw(e,s.toA,a-s.toA)):g>p&&e.slice(s.toA,f)==m.slice(x,x+p)&&(s=n[i]=new Ot(f-o,f,s.fromB+p,s.toB+p),f=s.toA,h=bw(e,s.fromA,s.fromA-r)),d=s.fromA-h,p=f-s.toA}if(d||p)s=n[i]=new Ot(s.fromA-d,s.toA+p,s.fromB-d,s.toB+p);else if(o){if(!l){let g=vw(e,s.fromA,s.toA),m,x=g<0?-1:yw(e,s.toA,s.fromA);g>-1&&(m=g-s.fromA)<=u&&e.slice(s.fromA,g)==e.slice(s.toA,s.toA+m)?s=n[i]=s.offset(m):x>-1&&(m=s.toA-x)<=c&&e.slice(s.fromA-m,s.fromA)==e.slice(x,s.toA)&&(s=n[i]=s.offset(-m))}}else{let g=vw(t,s.fromB,s.toB),m,x=g<0?-1:yw(t,s.toB,s.fromB);g>-1&&(m=g-s.fromB)<=u&&t.slice(s.fromB,g)==t.slice(s.toB,s.toB+m)?s=n[i]=s.offset(m):x>-1&&(m=s.toB-x)<=c&&t.slice(s.fromB-m,s.fromB)==t.slice(x,s.toB)&&(s=n[i]=s.offset(-m))}}r=s.toA}return LQ(n,3),n}let Ps;try{Ps=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch{}function RQ(n){return n>48&&n<58||n>64&&n<91||n>96&&n<123}function IQ(n,e){if(e==n.length)return 0;let t=n.charCodeAt(e);return t<192?RQ(t)?1:0:Ps?!VQ(t)||e==n.length-1?Ps.test(String.fromCharCode(t))?1:0:Ps.test(n.slice(e,e+2))?2:0:0}function DQ(n,e){if(!e)return 0;let t=n.charCodeAt(e-1);return t<192?RQ(t)?1:0:Ps?!ZQ(t)||e==1?Ps.test(String.fromCharCode(t))?1:0:Ps.test(n.slice(e-2,e))?2:0:0}const NQ=8;function xw(n,e,t){if(e==n.length||!DQ(n,e))return e;for(let r=e,i=e+t,s=0;s<NQ;s++){let o=IQ(n,r);if(!o||r+o>i)return r;r+=o}return e}function bw(n,e,t){if(!e||!IQ(n,e))return e;for(let r=e,i=e-t,s=0;s<NQ;s++){let o=DQ(n,r);if(!o||r-o<i)return r;r-=o}return e}function yw(n,e,t){for(;e!=t;e--)if(n.charCodeAt(e-1)==10)return e;return-1}function vw(n,e,t){for(;e!=t;e++)if(n.charCodeAt(e)==10)return e;return-1}const VQ=n=>n>=55296&&n<=56319,ZQ=n=>n>=56320&&n<=57343;function qo(n,e){return!e||e==n.length||!VQ(n.charCodeAt(e-1))||!ZQ(n.charCodeAt(e))}function mj(n,e,t){var r;let i=t?.override;return i?i(n,e):(Fl=((r=t?.scanLimit)!==null&&r!==void 0?r:1e9)>>1,Xl=t?.timeout?Date.now()+t.timeout:0,F0=!1,pj(n,e,Hs(n,0,n.length,e,0,e.length)))}function BQ(){return!F0}function FQ(n,e,t){return gj(mj(n,e,t),n,e)}const Ir=ie.define({combine:n=>n[0]}),jm=ye.define(),Oj=ie.define(),Yo=dt.define({create(n){return null},update(n,e){for(let t of e.effects)t.is(jm)&&(n=t.value);for(let t of e.state.facet(Oj))n=t(n,e);return n}});class To{constructor(e,t,r,i,s,o=!0){this.changes=e,this.fromA=t,this.toA=r,this.fromB=i,this.toB=s,this.precise=o}offset(e,t){return e||t?new To(this.changes,this.fromA+e,this.toA+e,this.fromB+t,this.toB+t,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,t,r){let i=FQ(e.toString(),t.toString(),r);return XQ(i,e,t,0,0,BQ())}static updateA(e,t,r,i,s){return _w(Cw(e,i,!0,r.length),e,t,r,s)}static updateB(e,t,r,i,s){return _w(Cw(e,i,!1,t.length),e,t,r,s)}}function Sw(n,e,t,r){let i=t.lineAt(n),s=r.lineAt(e);return i.to==n&&s.to==e&&n<t.length&&e<r.length?[n+1,e+1]:[i.from,s.from]}function ww(n,e,t,r){let i=t.lineAt(n),s=r.lineAt(e);return i.from==n&&s.from==e?[n,e]:[i.to+1,s.to+1]}function XQ(n,e,t,r,i,s){let o=[];for(let l=0;l<n.length;l++){let a=n[l],[c,u]=Sw(a.fromA+r,a.fromB+i,e,t),[h,f]=ww(a.toA+r,a.toB+i,e,t),d=[a.offset(-c+r,-u+i)];for(;l<n.length-1;){let p=n[l+1],[g,m]=Sw(p.fromA+r,p.fromB+i,e,t);if(g>h+1&&m>f+1)break;d.push(p.offset(-c+r,-u+i)),[h,f]=ww(p.toA+r,p.toB+i,e,t),l++}o.push(new To(d,c,Math.max(c,h),u,Math.max(u,f),s))}return o}const fu=1e3;function kw(n,e,t,r){let i=0,s=n.length;for(;;){if(i==s){let u=0,h=0;i&&({toA:u,toB:h}=n[i-1]);let f=e-(t?u:h);return[u+f,h+f]}let o=i+s>>1,l=n[o],[a,c]=t?[l.fromA,l.toA]:[l.fromB,l.toB];if(a>e)s=o;else if(c<=e)i=o+1;else return r?[l.fromA,l.fromB]:[l.toA,l.toB]}}function Cw(n,e,t,r){let i=[];return e.iterChangedRanges((s,o,l,a)=>{let c=0,u=t?e.length:r,h=0,f=t?r:e.length;s>fu&&([c,h]=kw(n,s-fu,t,!0)),o<e.length-fu&&([u,f]=kw(n,o+fu,t,!1));let d=a-l-(o-s),p,[g,m]=t?[d,0]:[0,d];i.length&&(p=i[i.length-1]).toA>=c?i[i.length-1]={fromA:p.fromA,fromB:p.fromB,toA:u,toB:f,diffA:p.diffA+g,diffB:p.diffB+m}:i.push({fromA:c,toA:u,fromB:h,toB:f,diffA:g,diffB:m})}),i}function _w(n,e,t,r,i){if(!n.length)return e;let s=[];for(let o=0,l=0,a=0,c=0;;o++){let u=o==n.length?null:n[o],h=u?u.fromA+l:t.length,f=u?u.fromB+a:r.length;for(;c<e.length;){let m=e[c];if(m.endA+l>h||m.endB+a>f)break;s.push(m.offset(l,a)),c++}if(!u)break;let d=u.toA+l+u.diffA,p=u.toB+a+u.diffB,g=FQ(t.sliceString(h,d),r.sliceString(f,p),i);for(let m of XQ(g,t,r,h,f,BQ()))s.push(m);for(l+=u.diffA,a+=u.diffB;c<e.length;){let m=e[c];if(m.fromA+l>d&&m.fromB+a>p)break;c++}}return s}const xj={scanLimit:500},zQ=ft.fromClass(class{constructor(n){({deco:this.deco,gutter:this.gutter}=Ew(n))}update(n){(n.docChanged||n.viewportChanged||bj(n.startState,n.state)||yj(n.startState,n.state))&&({deco:this.deco,gutter:this.gutter}=Ew(n.view))}},{decorations:n=>n.deco}),du=yr.low(XT({class:"cm-changeGutter",markers:n=>{var e;return((e=n.plugin(zQ))===null||e===void 0?void 0:e.gutter)||Ee.empty}}));function bj(n,e){return n.field(Yo,!1)!=e.field(Yo,!1)}function yj(n,e){return n.facet(Ir)!=e.facet(Ir)}const Tw=ce.line({class:"cm-changedLine"}),vj=ce.mark({class:"cm-changedText"}),Sj=ce.mark({tagName:"ins",class:"cm-insertedLine"}),wj=ce.mark({tagName:"del",class:"cm-deletedLine"}),Pw=new class extends Kr{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function kj(n,e,t,r,i,s){let o=t?n.fromA:n.fromB,l=t?n.toA:n.toB,a=0;if(o!=l){i.add(o,o,Tw),i.add(o,l,t?wj:Sj),s&&s.add(o,o,Pw);for(let c=e.iterRange(o,l-1),u=o;!c.next().done;){if(c.lineBreak){u++,i.add(u,u,Tw),s&&s.add(u,u,Pw);continue}let h=u+c.value.length;if(r)for(;a<n.changes.length;){let f=n.changes[a],d=o+(t?f.fromA:f.fromB),p=o+(t?f.toA:f.toB),g=Math.max(u,d),m=Math.min(h,p);if(g<m&&i.add(g,m,vj),p<h)a++;else break}u=h}}}function Ew(n){let e=n.state.field(Yo),{side:t,highlightChanges:r,markGutter:i,overrideChunk:s}=n.state.facet(Ir),o=t=="a",l=new vn,a=i?new vn:null,{from:c,to:u}=n.viewport;for(let h of e){if((o?h.fromA:h.fromB)>=u)break;(o?h.toA:h.toB)>c&&(!s||!s(n.state,h,l,a))&&kj(h,n.state.doc,o,r,l,a)}return{deco:l.finish(),gutter:a&&a.finish()}}class pu extends Jn{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement("div");return e.className="cm-mergeSpacer",e.style.height=this.height+"px",e}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}const ef=ye.define({map:(n,e)=>n.map(e)}),zl=dt.define({create:()=>ce.none,update:(n,e)=>{for(let t of e.effects)if(t.is(ef))return t.value;return n.map(e.changes)},provide:n=>U.decorations.from(n)}),gu=.01;function Qw(n,e){if(n.size!=e.size)return!1;let t=n.iter(),r=e.iter();for(;t.value;){if(t.from!=r.from||Math.abs(t.value.spec.widget.height-r.value.spec.widget.height)>1)return!1;t.next(),r.next()}return!0}function Cj(n,e,t){let r=new vn,i=new vn,s=n.state.field(zl).iter(),o=e.state.field(zl).iter(),l=0,a=0,c=0,u=0,h=n.viewport,f=e.viewport;for(let m=0;;m++){let x=m<t.length?t[m]:null,O=x?x.fromA:n.state.doc.length,b=x?x.fromB:e.state.doc.length;if(l<O){let y=n.lineBlockAt(l).top+c,S=e.lineBlockAt(a).top+u,k=y-S;k<-gu?(c-=k,r.add(l,l,ce.widget({widget:new pu(-k),block:!0,side:-1}))):k>gu&&(u+=k,i.add(a,a,ce.widget({widget:new pu(k),block:!0,side:-1})))}if(O>l+1e3&&l<h.from&&O>h.from&&a<f.from&&b>f.from){let y=Math.min(h.from-l,f.from-a);l+=y,a+=y,m--}else if(x)l=x.toA,a=x.toB;else break;for(;s.value&&s.from<l;)c-=s.value.spec.widget.height,s.next();for(;o.value&&o.from<a;)u-=o.value.spec.widget.height,o.next()}for(;s.value;)c-=s.value.spec.widget.height,s.next();for(;o.value;)u-=o.value.spec.widget.height,o.next();let d=n.contentHeight+c-(e.contentHeight+u);d<gu?r.add(n.state.doc.length,n.state.doc.length,ce.widget({widget:new pu(-d),block:!0,side:1})):d>gu&&i.add(e.state.doc.length,e.state.doc.length,ce.widget({widget:new pu(d),block:!0,side:1}));let p=r.finish(),g=i.finish();Qw(p,n.state.field(zl))||n.dispatch({effects:ef.of(p)}),Qw(g,e.state.field(zl))||e.dispatch({effects:ef.of(g)})}const qm=ye.define({map:(n,e)=>e.mapPos(n)});class _j extends Jn{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let t=document.createElement("div");return t.className="cm-collapsedLines",t.textContent=e.state.phrase("$ unchanged lines",this.lines),t.addEventListener("click",r=>{let i=e.posAtDOM(r.target);e.dispatch({effects:qm.of(i)});let{side:s,sibling:o}=e.state.facet(Ir);o&&o().dispatch({effects:qm.of(Tj(i,e.state.field(Yo),s=="a"))})}),t}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return"collapsed-unchanged-code"}}function Tj(n,e,t){let r=0,i=0;for(let s=0;;s++){let o=s<e.length?e[s]:null;if(!o||(t?o.fromA:o.fromB)>=n)return i+(n-r);[r,i]=t?[o.toA,o.toB]:[o.toB,o.toA]}}const Pj=dt.define({create(n){return ce.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)t.is(qm)&&(n=n.update({filter:r=>r!=t.value}));return n},provide:n=>U.decorations.from(n)});function $w({margin:n=3,minSize:e=4}){return Pj.init(t=>Ej(t,n,e))}function Ej(n,e,t){let r=new vn,i=n.facet(Ir).side=="a",s=n.field(Yo),o=1;for(let l=0;;l++){let a=l<s.length?s[l]:null,c=l?o+e:1,u=a?n.doc.lineAt(i?a.fromA:a.fromB).number-1-e:n.doc.lines,h=u-c+1;if(h>=t&&r.add(n.doc.line(c).from,n.doc.line(u).to,ce.replace({widget:new _j(h),block:!0})),!a)break;o=n.doc.lineAt(Math.min(n.doc.length,i?a.toA:a.toB)).number}return r.finish()}const Qj=U.styleModule.of(new Ci({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),$j=U.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat"},"&.cm-merge-b .cm-deletedText":{background:"#ff000033"},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"⦚"',marginInlineEnd:"7px"},"&:after":{content:'"⦚"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"},".cm-inlineChangedLineGutter":{background:"#75d"}}),Aw=new cl,mu=new cl;class Aj{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||xj;let t=[yr.low(zQ),$j,Qj,zl,U.updateListener.of(h=>{this.measuring<0&&(h.heightChanged||h.viewportChanged)&&!h.transactions.some(f=>f.effects.some(d=>d.is(ef)))&&this.measure()})],r=[Ir.of({side:"a",sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&r.push(du);let i=Ce.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],U.editorAttributes.of({class:"cm-merge-a"}),mu.of(r),t]}),s=[Ir.of({side:"b",sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&s.push(du);let o=Ce.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],U.editorAttributes.of({class:"cm-merge-b"}),mu.of(s),t]});this.chunks=To.build(i.doc,o.doc,this.diffConf);let l=[Yo.init(()=>this.chunks),Aw.of(e.collapseUnchanged?$w(e.collapseUnchanged):[])];i=i.update({effects:ye.appendConfig.of(l)}).state,o=o.update({effects:ye.appendConfig.of(l)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let a=e.orientation||"a-b",c=document.createElement("div");c.className="cm-mergeViewEditor";let u=document.createElement("div");u.className="cm-mergeViewEditor",this.editorDOM.appendChild(a=="a-b"?c:u),this.editorDOM.appendChild(a=="a-b"?u:c),this.a=new U({state:i,parent:c,root:e.root,dispatchTransactions:h=>this.dispatch(h,this.a)}),this.b=new U({state:o,parent:u,root:e.root,dispatchTransactions:h=>this.dispatch(h,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls=="b-to-a",e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,t){if(e.some(r=>r.docChanged)){let r=e[e.length-1],i=e.reduce((o,l)=>o.compose(l.changes),mt.empty(e[0].startState.doc.length));this.chunks=t==this.a?To.updateA(this.chunks,r.newDoc,this.b.state.doc,i,this.diffConf):To.updateB(this.chunks,this.a.state.doc,r.newDoc,i,this.diffConf),t.update([...e,r.state.update({effects:jm.of(this.chunks)})]);let s=t==this.a?this.b:this.a;s.update([s.state.update({effects:jm.of(this.chunks)})]),this.scheduleMeasure()}else t.update(e)}reconfigure(e){if("diffConfig"in e&&(this.diffConf=e.diffConfig),"orientation"in e){let s=e.orientation!="b-a";if(s!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let o=this.a.dom.parentNode,l=this.b.dom.parentNode;o.remove(),l.remove(),this.editorDOM.insertBefore(s?o:l,this.editorDOM.firstChild),this.editorDOM.appendChild(s?l:o),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in e||"renderRevertControl"in e){let s=!!this.revertDOM,o=this.revertToA,l=this.renderRevert;"revertControls"in e&&(s=!!e.revertControls,o=e.revertControls=="b-to-a"),"renderRevertControl"in e&&(l=e.renderRevertControl),this.setupRevertControls(s,o,l)}let t="highlightChanges"in e,r="gutter"in e,i="collapseUnchanged"in e;if(t||r||i){let s=[],o=[];if(t||r){let l=this.a.state.facet(Ir),a=r?e.gutter!==!1:l.markGutter,c=t?e.highlightChanges!==!1:l.highlightChanges;s.push(mu.reconfigure([Ir.of({side:"a",sibling:()=>this.b,highlightChanges:c,markGutter:a}),a?du:[]])),o.push(mu.reconfigure([Ir.of({side:"b",sibling:()=>this.a,highlightChanges:c,markGutter:a}),a?du:[]]))}if(i){let l=Aw.reconfigure(e.collapseUnchanged?$w(e.collapseUnchanged):[]);s.push(l),o.push(l)}this.a.dispatch({effects:s}),this.b.dispatch({effects:o})}this.scheduleMeasure()}setupRevertControls(e,t,r){this.revertToA=t,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=r,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",i=>this.revertClicked(i)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let e=this.dom.ownerDocument.defaultView||window;this.measuring=e.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){Cj(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,t=e.firstChild,r=this.a.viewport,i=this.b.viewport;for(let s=0;s<this.chunks.length;s++){let o=this.chunks[s];if(o.fromA>r.to||o.fromB>i.to)break;if(o.fromA<r.from||o.fromB<i.from)continue;let l=this.a.lineBlockAt(o.fromA).top+"px";for(;t&&+t.dataset.chunk<s;)t=Mw(t);t&&t.dataset.chunk==String(s)?(t.style.top!=l&&(t.style.top=l),t=t.nextSibling):e.insertBefore(this.renderRevertButton(l,s),t)}for(;t;)t=Mw(t)}renderRevertButton(e,t){let r;if(this.renderRevert)r=this.renderRevert();else{r=document.createElement("button");let i=this.a.state.phrase("Revert this chunk");r.setAttribute("aria-label",i),r.setAttribute("title",i),r.textContent=this.revertToLeft?"⇜":"⇝"}return r.style.top=e,r.setAttribute("data-chunk",String(t)),r}revertClicked(e){let t=e.target,r;for(;t&&t.parentNode!=this.revertDOM;)t=t.parentNode;if(t&&(r=this.chunks[t.dataset.chunk])){let[i,s,o,l,a,c]=this.revertToA?[this.b,this.a,r.fromB,r.toB,r.fromA,r.toA]:[this.a,this.b,r.fromA,r.toA,r.fromB,r.toB],u=i.state.sliceDoc(o,Math.max(o,l-1));o!=l&&c<=s.state.doc.length&&(u+=i.state.lineBreak),s.dispatch({changes:{from:a,to:Math.min(s.state.doc.length,c),insert:u},userEvent:"revert"}),e.preventDefault()}}destroy(){this.a.destroy(),this.b.destroy(),this.measuring>-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}}function Mw(n){let e=n.nextSibling;return n.remove(),e}class tf{static create(e,t,r,i,s){let o=i+(i<<8)+e+(t<<4)|0;return new tf(e,t,r,o,s,[],[])}constructor(e,t,r,i,s,o,l){this.type=e,this.value=t,this.from=r,this.hash=i,this.end=s,this.children=o,this.positions=l,this.hashProp=[[ve.contextHash,i]]}addChild(e,t){e.prop(ve.contextHash)!=this.hash&&(e=new Qe(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let r=this.children.length-1;return r>=0&&(t=Math.max(t,this.positions[r]+this.children[r].length+this.from)),new Qe(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(i,s,o)=>new Qe(Ct.none,i,s,o,this.hashProp)})}}var K;(function(n){n[n.Document=1]="Document",n[n.CodeBlock=2]="CodeBlock",n[n.FencedCode=3]="FencedCode",n[n.Blockquote=4]="Blockquote",n[n.HorizontalRule=5]="HorizontalRule",n[n.BulletList=6]="BulletList",n[n.OrderedList=7]="OrderedList",n[n.ListItem=8]="ListItem",n[n.ATXHeading1=9]="ATXHeading1",n[n.ATXHeading2=10]="ATXHeading2",n[n.ATXHeading3=11]="ATXHeading3",n[n.ATXHeading4=12]="ATXHeading4",n[n.ATXHeading5=13]="ATXHeading5",n[n.ATXHeading6=14]="ATXHeading6",n[n.SetextHeading1=15]="SetextHeading1",n[n.SetextHeading2=16]="SetextHeading2",n[n.HTMLBlock=17]="HTMLBlock",n[n.LinkReference=18]="LinkReference",n[n.Paragraph=19]="Paragraph",n[n.CommentBlock=20]="CommentBlock",n[n.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",n[n.Escape=22]="Escape",n[n.Entity=23]="Entity",n[n.HardBreak=24]="HardBreak",n[n.Emphasis=25]="Emphasis",n[n.StrongEmphasis=26]="StrongEmphasis",n[n.Link=27]="Link",n[n.Image=28]="Image",n[n.InlineCode=29]="InlineCode",n[n.HTMLTag=30]="HTMLTag",n[n.Comment=31]="Comment",n[n.ProcessingInstruction=32]="ProcessingInstruction",n[n.Autolink=33]="Autolink",n[n.HeaderMark=34]="HeaderMark",n[n.QuoteMark=35]="QuoteMark",n[n.ListMark=36]="ListMark",n[n.LinkMark=37]="LinkMark",n[n.EmphasisMark=38]="EmphasisMark",n[n.CodeMark=39]="CodeMark",n[n.CodeText=40]="CodeText",n[n.CodeInfo=41]="CodeInfo",n[n.LinkTitle=42]="LinkTitle",n[n.LinkLabel=43]="LinkLabel",n[n.URL=44]="URL"})(K||(K={}));class Mj{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class Lj{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return ha(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,r=0){for(let i=t;i<e;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(e){let t=0;for(let r=0;t<this.text.length&&r<e;t++)r+=this.text.charCodeAt(t)==9?4-r%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}}function Lw(n,e,t){if(t.pos==t.text.length||n!=e.block&&t.indent>=e.stack[t.depth+1].value+t.baseIndent)return!0;if(t.indent>=t.baseIndent+4)return!1;let r=(n.type==K.OrderedList?q0:j0)(t,e,!1);return r>0&&(n.type!=K.BulletList||W0(t,e,!1)<0)&&t.text.charCodeAt(t.pos+r-1)==n.value}const WQ={[K.Blockquote](n,e,t){return t.next!=62?!1:(t.markers.push(Me(K.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1)),t.moveBase(t.pos+(tr(t.text.charCodeAt(t.pos+1))?2:1)),n.end=e.lineStart+t.text.length,!0)},[K.ListItem](n,e,t){return t.indent<t.baseIndent+n.value&&t.next>-1?!1:(t.moveBaseColumn(t.baseIndent+n.value),!0)},[K.OrderedList]:Lw,[K.BulletList]:Lw,[K.Document](){return!0}};function tr(n){return n==32||n==9||n==10||n==13}function ha(n,e=0){for(;e<n.length&&tr(n.charCodeAt(e));)e++;return e}function Rw(n,e,t){for(;e>t&&tr(n.charCodeAt(e-1));)e--;return e}function jQ(n){if(n.next!=96&&n.next!=126)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==n.next;)e++;if(e<n.pos+3)return-1;if(n.next==96){for(let t=e;t<n.text.length;t++)if(n.text.charCodeAt(t)==96)return-1}return e}function qQ(n){return n.next!=62?-1:n.text.charCodeAt(n.pos+1)==32?2:1}function W0(n,e,t){if(n.next!=42&&n.next!=45&&n.next!=95)return-1;let r=1;for(let i=n.pos+1;i<n.text.length;i++){let s=n.text.charCodeAt(i);if(s==n.next)r++;else if(!tr(s))return-1}return t&&n.next==45&&UQ(n)>-1&&n.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(e$.SetextHeading)>-1||r<3?-1:1}function YQ(n,e){for(let t=n.stack.length-1;t>=0;t--)if(n.stack[t].type==e)return!0;return!1}function j0(n,e,t){return(n.next==45||n.next==43||n.next==42)&&(n.pos==n.text.length-1||tr(n.text.charCodeAt(n.pos+1)))&&(!t||YQ(e,K.BulletList)||n.skipSpace(n.pos+2)<n.text.length)?1:-1}function q0(n,e,t){let r=n.pos,i=n.next;for(;i>=48&&i<=57;){r++;if(r==n.text.length)return-1;i=n.text.charCodeAt(r)}return r==n.pos||r>n.pos+9||i!=46&&i!=41||r<n.text.length-1&&!tr(n.text.charCodeAt(r+1))||t&&!YQ(e,K.OrderedList)&&(n.skipSpace(r+1)==n.text.length||r>n.pos+1||n.next!=49)?-1:r+1-n.pos}function HQ(n){if(n.next!=35)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==35;)e++;if(e<n.text.length&&n.text.charCodeAt(e)!=32)return-1;let t=e-n.pos;return t>6?-1:t}function UQ(n){if(n.next!=45&&n.next!=61||n.indent>=n.baseIndent+4)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==n.next;)e++;let t=e;for(;e<n.text.length&&tr(n.text.charCodeAt(e));)e++;return e==n.text.length?t:-1}const Ym=/^[ \t]*$/,GQ=/-->/,KQ=/\?>/,Hm=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,GQ],[/^\s*<\?/,KQ],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,Ym],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,Ym]];function JQ(n,e,t){if(n.next!=60)return-1;let r=n.text.slice(n.pos);for(let i=0,s=Hm.length-(t?1:0);i<s;i++)if(Hm[i][0].test(r))return i;return-1}function Iw(n,e){let t=n.countIndent(e,n.pos,n.indent),r=n.countIndent(n.skipSpace(e),e,t);return r>=t+5?t+1:r}function Di(n,e,t){let r=n.length-1;r>=0&&n[r].to==e&&n[r].type==K.CodeText?n[r].to=t:n.push(Me(K.CodeText,e,t))}const Ou={LinkReference:void 0,IndentedCode(n,e){let t=e.baseIndent+4;if(e.indent<t)return!1;let r=e.findColumn(t),i=n.lineStart+r,s=n.lineStart+e.text.length,o=[],l=[];for(Di(o,i,s);n.nextLine()&&e.depth>=n.stack.length;)if(e.pos==e.text.length){Di(l,n.lineStart-1,n.lineStart);for(let a of e.markers)l.push(a)}else{if(e.indent<t)break;{if(l.length){for(let c of l)c.type==K.CodeText?Di(o,c.from,c.to):o.push(c);l=[]}Di(o,n.lineStart-1,n.lineStart);for(let c of e.markers)o.push(c);s=n.lineStart+e.text.length;let a=n.lineStart+e.findColumn(e.baseIndent+4);a<s&&Di(o,a,s)}}return l.length&&(l=l.filter(a=>a.type!=K.CodeText),l.length&&(e.markers=l.concat(e.markers))),n.addNode(n.buffer.writeElements(o,-i).finish(K.CodeBlock,s-i),i),!0},FencedCode(n,e){let t=jQ(e);if(t<0)return!1;let r=n.lineStart+e.pos,i=e.next,s=t-e.pos,o=e.skipSpace(t),l=Rw(e.text,e.text.length,o),a=[Me(K.CodeMark,r,r+s)];o<l&&a.push(Me(K.CodeInfo,n.lineStart+o,n.lineStart+l));for(let c=!0,u=!0,h=!1;n.nextLine()&&e.depth>=n.stack.length;c=!1){let f=e.pos;if(e.indent-e.baseIndent<4)for(;f<e.text.length&&e.text.charCodeAt(f)==i;)f++;if(f-e.pos>=s&&e.skipSpace(f)==e.text.length){for(let d of e.markers)a.push(d);u&&h&&Di(a,n.lineStart-1,n.lineStart),a.push(Me(K.CodeMark,n.lineStart+e.pos,n.lineStart+f)),n.nextLine();break}else{h=!0,c||(Di(a,n.lineStart-1,n.lineStart),u=!1);for(let g of e.markers)a.push(g);let d=n.lineStart+e.basePos,p=n.lineStart+e.text.length;d<p&&(Di(a,d,p),u=!1)}}return n.addNode(n.buffer.writeElements(a,-r).finish(K.FencedCode,n.prevLineEnd()-r),r),!0},Blockquote(n,e){let t=qQ(e);return t<0?!1:(n.startContext(K.Blockquote,e.pos),n.addNode(K.QuoteMark,n.lineStart+e.pos,n.lineStart+e.pos+1),e.moveBase(e.pos+t),null)},HorizontalRule(n,e){if(W0(e,n,!1)<0)return!1;let t=n.lineStart+e.pos;return n.nextLine(),n.addNode(K.HorizontalRule,t),!0},BulletList(n,e){let t=j0(e,n,!1);if(t<0)return!1;n.block.type!=K.BulletList&&n.startContext(K.BulletList,e.basePos,e.next);let r=Iw(e,e.pos+1);return n.startContext(K.ListItem,e.basePos,r-e.baseIndent),n.addNode(K.ListMark,n.lineStart+e.pos,n.lineStart+e.pos+t),e.moveBaseColumn(r),null},OrderedList(n,e){let t=q0(e,n,!1);if(t<0)return!1;n.block.type!=K.OrderedList&&n.startContext(K.OrderedList,e.basePos,e.text.charCodeAt(e.pos+t-1));let r=Iw(e,e.pos+t);return n.startContext(K.ListItem,e.basePos,r-e.baseIndent),n.addNode(K.ListMark,n.lineStart+e.pos,n.lineStart+e.pos+t),e.moveBaseColumn(r),null},ATXHeading(n,e){let t=HQ(e);if(t<0)return!1;let r=e.pos,i=n.lineStart+r,s=Rw(e.text,e.text.length,r),o=s;for(;o>r&&e.text.charCodeAt(o-1)==e.next;)o--;(o==s||o==r||!tr(e.text.charCodeAt(o-1)))&&(o=e.text.length);let l=n.buffer.write(K.HeaderMark,0,t).writeElements(n.parser.parseInline(e.text.slice(r+t+1,o),i+t+1),-i);o<e.text.length&&l.write(K.HeaderMark,o-r,s-r);let a=l.finish(K.ATXHeading1-1+t,e.text.length-r);return n.nextLine(),n.addNode(a,i),!0},HTMLBlock(n,e){let t=JQ(e,n,!1);if(t<0)return!1;let r=n.lineStart+e.pos,i=Hm[t][1],s=[],o=i!=Ym;for(;!i.test(e.text)&&n.nextLine();){if(e.depth<n.stack.length){o=!1;break}for(let c of e.markers)s.push(c)}o&&n.nextLine();let l=i==GQ?K.CommentBlock:i==KQ?K.ProcessingInstructionBlock:K.HTMLBlock,a=n.prevLineEnd();return n.addNode(n.buffer.writeElements(s,-r).finish(l,a-r),r),!0},SetextHeading:void 0};class Rj{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,r){if(this.stage==-1)return!1;let i=r.content+`
90
+ `+t.scrub(),s=this.advance(i);return s>-1&&s<i.length?this.complete(e,r,s):!1}finish(e,t){return(this.stage==2||this.stage==3)&&ha(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,r){return e.addLeafElement(t,Me(K.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(c$(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Me(K.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(l$(e,ha(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=ha(e,this.pos),r=0;if(t>this.pos){let i=a$(e,t,this.start);if(i){let s=Lp(e,i.to-this.start);s>0&&(this.nextStage(i),r=s)}}return r||(r=Lp(e,this.pos)),r>0&&r<e.length?r:-1}else return Lp(e,this.pos)}}}function Lp(n,e){for(;e<n.length;e++){let t=n.charCodeAt(e);if(t==10)break;if(!tr(t))return-1}return e}class Ij{nextLine(e,t,r){let i=t.depth<e.stack.length?-1:UQ(t),s=t.next;if(i<0)return!1;let o=Me(K.HeaderMark,e.lineStart+t.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(r,Me(s==61?K.SetextHeading1:K.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),o])),!0}finish(){return!1}}const e$={LinkReference(n,e){return e.content.charCodeAt(0)==91?new Rj(e):null},SetextHeading(){return new Ij}},Dj=[(n,e)=>HQ(e)>=0,(n,e)=>jQ(e)>=0,(n,e)=>qQ(e)>=0,(n,e)=>j0(e,n,!0)>=0,(n,e)=>q0(e,n,!0)>=0,(n,e)=>W0(e,n,!0)>=0,(n,e)=>JQ(e,n,!0)>=0],Nj={text:"",end:0};class Vj{constructor(e,t,r,i){this.parser=e,this.input=t,this.ranges=i,this.line=new Lj,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=tf.create(K.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new Fj(r,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let r=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;r<e.markers.length&&(!i||e.markers[r].from<i.end);){let s=e.markers[r++];this.addNode(s.type,s.from,s.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let r of this.parser.blockParsers)if(r){let i=r(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}let t=new Mj(this.lineStart+e.pos,e.text.slice(e.pos));for(let r of this.parser.leafBlockParsers)if(r){let i=r(this,t);i&&t.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,e,t))break e}for(let r of t.parsers)if(r.nextLine(this,e,t))return null;t.content+=`
91
+ `+e.scrub();for(let r of e.markers)t.marks.push(r)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=u$(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=Nj;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let r=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<t.end;){i++;let s=this.ranges[i].from,o=this.lineChunkAt(s);t.end=s+o.length,t.text=t.text.slice(0,this.ranges[i-1].to-r)+o,r=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(t);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],s=this.parser.skipContextMarkup[i.type];if(!s)throw new Error("Unhandled block context "+K[i.type]);let o=this.line.markers.length;if(!s(i,this,e)){this.line.markers.length>o&&(i.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),r;if(this.input.lineChunks)r=t==`
92
+ `?"":t;else{let i=t.indexOf(`
93
+ `);r=i<0?t:t.slice(0,i)}return e+r.length>this.to?r.slice(0,this.to-e):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,r=0){this.block=tf.create(e,r,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,r=0){this.startContext(this.parser.getNodeType(e),t,r)}addNode(e,t,r){typeof e=="number"&&(e=new Qe(this.parser.nodeSet.types[e],Ho,Ho,(r??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(Gm(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?t$(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let r of e.parsers)if(r.finish(this,e))return;let t=Gm(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(K.Paragraph,e.content.length),e.start)}elt(e,t,r,i){return typeof e=="string"?Me(this.parser.getNodeType(e),t,r,i):new i$(e,t)}get buffer(){return new r$(this.parser.nodeSet)}}function t$(n,e,t,r,i){let s=n[e].to,o=[],l=[],a=t.from+r;function c(u,h){for(;h?u>=s:u>s;){let f=n[e+1].from-s;r+=f,u+=f,e++,s=n[e].to}}for(let u=t.firstChild;u;u=u.nextSibling){c(u.from+r,!0);let h=u.from+r,f,d=i.get(u.tree);d?f=d:u.to+r>s?(f=t$(n,e,u,r,i),c(u.to+r,!1)):f=u.toTree(),o.push(f),l.push(h-a)}return c(t.to+r,!1),new Qe(t.type,o,l,t.to+r-a,t.tree?t.tree.propValues:void 0)}class sd extends Hf{constructor(e,t,r,i,s,o,l,a,c){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=s,this.skipContextMarkup=o,this.inlineParsers=l,this.inlineNames=a,this.wrappers=c,this.nodeTypes=Object.create(null);for(let u of e.types)this.nodeTypes[u.name]=u.id}createParse(e,t,r){let i=new Vj(this,e,t,r);for(let s of this.wrappers)i=s(i,e,t,r);return i}configure(e){let t=Um(e);if(!t)return this;let{nodeSet:r,skipContextMarkup:i}=this,s=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),l=this.blockNames.slice(),a=this.inlineParsers.slice(),c=this.inlineNames.slice(),u=this.endLeafBlock.slice(),h=this.wrappers;if($l(t.defineNodes)){i=Object.assign({},i);let f=r.types.slice(),d;for(let p of t.defineNodes){let{name:g,block:m,composite:x,style:O}=typeof p=="string"?{name:p}:p;if(f.some(S=>S.name==g))continue;x&&(i[f.length]=(S,k,w)=>x(k,w,S.value));let b=f.length,y=x?["Block","BlockContext"]:m?b>=K.ATXHeading1&&b<=K.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;f.push(Ct.define({id:b,name:g,props:y&&[[ve.group,y]]})),O&&(d||(d={}),Array.isArray(O)||O instanceof Qn?d[g]=O:Object.assign(d,O))}r=new hl(f),d&&(r=r.extend(fl(d)))}if($l(t.props)&&(r=r.extend(...t.props)),$l(t.remove))for(let f of t.remove){let d=this.blockNames.indexOf(f),p=this.inlineNames.indexOf(f);d>-1&&(s[d]=o[d]=void 0),p>-1&&(a[p]=void 0)}if($l(t.parseBlock))for(let f of t.parseBlock){let d=l.indexOf(f.name);if(d>-1)s[d]=f.parse,o[d]=f.leaf;else{let p=f.before?xu(l,f.before):f.after?xu(l,f.after)+1:l.length-1;s.splice(p,0,f.parse),o.splice(p,0,f.leaf),l.splice(p,0,f.name)}f.endLeaf&&u.push(f.endLeaf)}if($l(t.parseInline))for(let f of t.parseInline){let d=c.indexOf(f.name);if(d>-1)a[d]=f.parse;else{let p=f.before?xu(c,f.before):f.after?xu(c,f.after)+1:c.length-1;a.splice(p,0,f.parse),c.splice(p,0,f.name)}}return t.wrap&&(h=h.concat(t.wrap)),new sd(r,s,o,l,u,i,a,c,h)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let r=new Y0(this,e,t);e:for(let i=t;i<r.end;){let s=r.char(i);for(let o of this.inlineParsers)if(o){let l=o(r,s,i);if(l>=0){i=l;continue e}}i++}return r.resolveMarkers(0)}}function $l(n){return n!=null&&n.length>0}function Um(n){if(!Array.isArray(n))return n;if(n.length==0)return null;let e=Um(n[0]);if(n.length==1)return e;let t=Um(n.slice(1));if(!t||!e)return e||t;let r=(o,l)=>(o||Ho).concat(l||Ho),i=e.wrap,s=t.wrap;return{props:r(e.props,t.props),defineNodes:r(e.defineNodes,t.defineNodes),parseBlock:r(e.parseBlock,t.parseBlock),parseInline:r(e.parseInline,t.parseInline),remove:r(e.remove,t.remove),wrap:i?s?(o,l,a,c)=>i(s(o,l,a,c),l,a,c):i:s}}function xu(n,e){let t=n.indexOf(e);if(t<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return t}let n$=[Ct.none];for(let n=1,e;e=K[n];n++)n$[n]=Ct.define({id:n,name:e,props:n>=K.Escape?[]:[[ve.group,n in WQ?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const Ho=[];class r${constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,r,i=0){return this.content.push(e,t,r,4+i*4),this}writeElements(e,t=0){for(let r of e)r.writeTo(this,t);return this}finish(e,t){return Qe.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}let Ha=class{constructor(e,t,r,i=Ho){this.type=e,this.from=t,this.to=r,this.children=i}writeTo(e,t){let r=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-r)}toTree(e){return new r$(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class i${constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Ho}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}}function Me(n,e,t,r){return new Ha(n,e,t,r)}const s$={resolve:"Emphasis",mark:"EmphasisMark"},o$={resolve:"Emphasis",mark:"EmphasisMark"},Os={},nf={};class Tn{constructor(e,t,r,i){this.type=e,this.from=t,this.to=r,this.side=i}}const Dw="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let Ua=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{Ua=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const Rp={Escape(n,e,t){if(e!=92||t==n.end-1)return-1;let r=n.char(t+1);for(let i=0;i<Dw.length;i++)if(Dw.charCodeAt(i)==r)return n.append(Me(K.Escape,t,t+2));return-1},Entity(n,e,t){if(e!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(n.slice(t+1,t+31));return r?n.append(Me(K.Entity,t,t+1+r[0].length)):-1},InlineCode(n,e,t){if(e!=96||t&&n.char(t-1)==96)return-1;let r=t+1;for(;r<n.end&&n.char(r)==96;)r++;let i=r-t,s=0;for(;r<n.end;r++)if(n.char(r)==96){if(s++,s==i&&n.char(r+1)!=96)return n.append(Me(K.InlineCode,t,r+1,[Me(K.CodeMark,t,t+i),Me(K.CodeMark,r+1-i,r+1)]))}else s=0;return-1},HTMLTag(n,e,t){if(e!=60||t==n.end-1)return-1;let r=n.slice(t+1,n.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return n.append(Me(K.Autolink,t,t+1+i[0].length,[Me(K.LinkMark,t,t+1),Me(K.URL,t+1,t+i[0].length),Me(K.LinkMark,t+i[0].length,t+1+i[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(s)return n.append(Me(K.Comment,t,t+1+s[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return n.append(Me(K.ProcessingInstruction,t,t+1+o[0].length));let l=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return l?n.append(Me(K.HTMLTag,t,t+1+l[0].length)):-1},Emphasis(n,e,t){if(e!=95&&e!=42)return-1;let r=t+1;for(;n.char(r)==e;)r++;let i=n.slice(t-1,t),s=n.slice(r,r+1),o=Ua.test(i),l=Ua.test(s),a=/\s|^$/.test(i),c=/\s|^$/.test(s),u=!c&&(!l||a||o),h=!a&&(!o||c||l),f=u&&(e==42||!h||o),d=h&&(e==42||!u||l);return n.append(new Tn(e==95?s$:o$,t,r,(f?1:0)|(d?2:0)))},HardBreak(n,e,t){if(e==92&&n.char(t+1)==10)return n.append(Me(K.HardBreak,t,t+2));if(e==32){let r=t+1;for(;n.char(r)==32;)r++;if(n.char(r)==10&&r>=t+2)return n.append(Me(K.HardBreak,t,r+1))}return-1},Link(n,e,t){return e==91?n.append(new Tn(Os,t,t+1,1)):-1},Image(n,e,t){return e==33&&n.char(t+1)==91?n.append(new Tn(nf,t,t+2,1)):-1},LinkEnd(n,e,t){if(e!=93)return-1;for(let r=n.parts.length-1;r>=0;r--){let i=n.parts[r];if(i instanceof Tn&&(i.type==Os||i.type==nf)){if(!i.side||n.skipSpace(i.to)==t&&!/[(\[]/.test(n.slice(t+1,t+2)))return n.parts[r]=null,-1;let s=n.takeContent(r),o=n.parts[r]=Zj(n,s,i.type==Os?K.Link:K.Image,i.from,t+1);if(i.type==Os)for(let l=0;l<r;l++){let a=n.parts[l];a instanceof Tn&&a.type==Os&&(a.side=0)}return o.to}}return-1}};function Zj(n,e,t,r,i){let{text:s}=n,o=n.char(i),l=i;if(e.unshift(Me(K.LinkMark,r,r+(t==K.Image?2:1))),e.push(Me(K.LinkMark,i-1,i)),o==40){let a=n.skipSpace(i+1),c=l$(s,a-n.offset,n.offset),u;c&&(a=n.skipSpace(c.to),a!=c.to&&(u=a$(s,a-n.offset,n.offset),u&&(a=n.skipSpace(u.to)))),n.char(a)==41&&(e.push(Me(K.LinkMark,i,i+1)),l=a+1,c&&e.push(c),u&&e.push(u),e.push(Me(K.LinkMark,a,l)))}else if(o==91){let a=c$(s,i-n.offset,n.offset,!1);a&&(e.push(a),l=a.to)}return Me(t,r,l,e)}function l$(n,e,t){if(n.charCodeAt(e)==60){for(let i=e+1;i<n.length;i++){let s=n.charCodeAt(i);if(s==62)return Me(K.URL,e+t,i+1+t);if(s==60||s==10)return!1}return null}else{let i=0,s=e;for(let o=!1;s<n.length;s++){let l=n.charCodeAt(s);if(tr(l))break;if(o)o=!1;else if(l==40)i++;else if(l==41){if(!i)break;i--}else l==92&&(o=!0)}return s>e?Me(K.URL,e+t,s+t):s==n.length?null:!1}}function a$(n,e,t){let r=n.charCodeAt(e);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let s=e+1,o=!1;s<n.length;s++){let l=n.charCodeAt(s);if(o)o=!1;else{if(l==i)return Me(K.LinkTitle,e+t,s+1+t);l==92&&(o=!0)}}return null}function c$(n,e,t,r){for(let i=!1,s=e+1,o=Math.min(n.length,s+999);s<o;s++){let l=n.charCodeAt(s);if(i)i=!1;else{if(l==93)return r?!1:Me(K.LinkLabel,e+t,s+1+t);if(r&&!tr(l)&&(r=!1),l==91)return!1;l==92&&(i=!0)}}return null}class Y0{constructor(e,t,r){this.parser=e,this.text=t,this.offset=r,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,r,i,s){return this.append(new Tn(e,t,r,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof Tn&&(t.type==Os||t.type==nf))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let r=e;r<this.parts.length;r++){let i=this.parts[r];if(!(i instanceof Tn&&i.type.resolve&&i.side&2))continue;let s=i.type==s$||i.type==o$,o=i.to-i.from,l,a=r-1;for(;a>=e;a--){let g=this.parts[a];if(g instanceof Tn&&g.side&1&&g.type==i.type&&!(s&&(i.side&1||g.side&2)&&(g.to-g.from+o)%3==0&&((g.to-g.from)%3||o%3))){l=g;break}}if(!l)continue;let c=i.type.resolve,u=[],h=l.from,f=i.to;if(s){let g=Math.min(2,l.to-l.from,o);h=l.to-g,f=i.from+g,c=g==1?"Emphasis":"StrongEmphasis"}l.type.mark&&u.push(this.elt(l.type.mark,h,l.to));for(let g=a+1;g<r;g++)this.parts[g]instanceof Ha&&u.push(this.parts[g]),this.parts[g]=null;i.type.mark&&u.push(this.elt(i.type.mark,i.from,f));let d=this.elt(c,h,f,u);this.parts[a]=s&&l.from!=h?new Tn(l.type,l.from,h,l.side):null,(this.parts[r]=s&&i.to!=f?new Tn(i.type,f,i.to,i.side):null)?this.parts.splice(r,0,d):this.parts[r]=d}let t=[];for(let r=e;r<this.parts.length;r++){let i=this.parts[r];i instanceof Ha&&t.push(i)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let r=this.parts[t];if(r instanceof Tn&&r.type==e&&r.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof Tn?t:null}skipSpace(e){return ha(this.text,e-this.offset)+this.offset}elt(e,t,r,i){return typeof e=="string"?Me(this.parser.getNodeType(e),t,r,i):new i$(e,t)}}Y0.linkStart=Os;Y0.imageStart=nf;function Gm(n,e){if(!e.length)return n;if(!n.length)return e;let t=n.slice(),r=0;for(let i of e){for(;r<t.length&&t[r].to<i.to;)r++;if(r<t.length&&t[r].from<i.from){let s=t[r];s instanceof Ha&&(t[r]=new Ha(s.type,s.from,s.to,Gm(s.children,[i])))}else t.splice(r++,0,i)}return t}const Bj=[K.CodeBlock,K.ListItem,K.OrderedList,K.BulletList];class Fj{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
94
+ `;)s--;this.fragmentEnd=s?s-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let i=e+this.fragment.offset;for(;r.to<=i;)if(!r.parent())return!1;for(;;){if(r.from>=i)return this.fragment.from<=t;if(!r.childAfter(i))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(ve.contextHash)==e}takeNodes(e){let t=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,l=e.block.children.length,a=o,c=l;for(;;){if(t.to-r>i){if(t.type.isAnonymous&&t.firstChild())continue;break}let u=u$(t.from-r,e.ranges);if(t.to-r<=e.ranges[e.rangeI].to)e.addNode(t.tree,u);else{let h=new Qe(e.parser.nodeSet.types[K.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(h,t.tree),e.addNode(h,u)}if(t.type.is("Block")&&(Bj.indexOf(t.type.id)<0?(o=t.to-r,l=e.block.children.length):(o=a,l=c),a=t.to-r,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>l;)e.block.children.pop(),e.block.positions.pop();return o-s}}function u$(n,e){let t=n;for(let r=1;r<e.length;r++){let i=e[r-1].to,s=e[r].from;i<n&&(t-=s-i)}return t}const Xj=fl({"Blockquote/...":_.quote,HorizontalRule:_.contentSeparator,"ATXHeading1/... SetextHeading1/...":_.heading1,"ATXHeading2/... SetextHeading2/...":_.heading2,"ATXHeading3/...":_.heading3,"ATXHeading4/...":_.heading4,"ATXHeading5/...":_.heading5,"ATXHeading6/...":_.heading6,"Comment CommentBlock":_.comment,Escape:_.escape,Entity:_.character,"Emphasis/...":_.emphasis,"StrongEmphasis/...":_.strong,"Link/... Image/...":_.link,"OrderedList/... BulletList/...":_.list,"BlockQuote/...":_.quote,"InlineCode CodeText":_.monospace,"URL Autolink":_.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":_.processingInstruction,"CodeInfo LinkLabel":_.labelName,LinkTitle:_.string,Paragraph:_.content}),zj=new sd(new hl(n$).extend(Xj),Object.keys(Ou).map(n=>Ou[n]),Object.keys(Ou).map(n=>e$[n]),Object.keys(Ou),Dj,WQ,Object.keys(Rp).map(n=>Rp[n]),Object.keys(Rp),[]);function Wj(n,e,t){let r=[];for(let i=n.firstChild,s=e;;i=i.nextSibling){let o=i?i.from:t;if(o>s&&r.push({from:s,to:o}),!i)break;s=i.to}return r}function jj(n){let{codeParser:e,htmlParser:t}=n;return{wrap:GT((i,s)=>{let o=i.type.id;if(e&&(o==K.CodeBlock||o==K.FencedCode)){let l="";if(o==K.FencedCode){let c=i.node.getChild(K.CodeInfo);c&&(l=s.read(c.from,c.to))}let a=e(l);if(a)return{parser:a,overlay:c=>c.type.id==K.CodeText,bracketed:o==K.FencedCode}}else if(t&&(o==K.HTMLBlock||o==K.HTMLTag||o==K.CommentBlock))return{parser:t,overlay:Wj(i.node,i.from,i.to)};return null})}}const qj={resolve:"Strikethrough",mark:"StrikethroughMark"},Yj={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":_.strikethrough}},{name:"StrikethroughMark",style:_.processingInstruction}],parseInline:[{name:"Strikethrough",parse(n,e,t){if(e!=126||n.char(t+1)!=126||n.char(t+2)==126)return-1;let r=n.slice(t-1,t),i=n.slice(t+2,t+3),s=/\s|^$/.test(r),o=/\s|^$/.test(i),l=Ua.test(r),a=Ua.test(i);return n.addDelimiter(qj,t,t+2,!o&&(!a||s||l),!s&&(!l||o||a))},after:"Emphasis"}]};function fa(n,e,t=0,r,i=0){let s=0,o=!0,l=-1,a=-1,c=!1,u=()=>{r.push(n.elt("TableCell",i+l,i+a,n.parser.parseInline(e.slice(l,a),i+l)))};for(let h=t;h<e.length;h++){let f=e.charCodeAt(h);f==124&&!c?((!o||l>-1)&&s++,o=!1,r&&(l>-1&&u(),r.push(n.elt("TableDelimiter",h+i,h+i+1))),l=a=-1):(c||f!=32&&f!=9)&&(l<0&&(l=h),a=h+1),c=!c&&f==92}return l>-1&&(s++,r&&u()),s}function Nw(n,e){for(let t=e;t<n.length;t++){let r=n.charCodeAt(t);if(r==124)return!0;r==92&&t++}return!1}const h$=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class Vw{constructor(){this.rows=null}nextLine(e,t,r){if(this.rows==null){this.rows=!1;let i;if((t.next==45||t.next==58||t.next==124)&&h$.test(i=t.text.slice(t.pos))){let s=[];fa(e,r.content,0,s,r.start)==fa(e,i,t.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,s),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let i=[];fa(e,t.text,t.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,i))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}}const Hj={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":_.heading}},"TableRow",{name:"TableCell",style:_.content},{name:"TableDelimiter",style:_.processingInstruction}],parseBlock:[{name:"Table",leaf(n,e){return Nw(e.content,0)?new Vw:null},endLeaf(n,e,t){if(t.parsers.some(i=>i instanceof Vw)||!Nw(e.text,e.basePos))return!1;let r=n.peekLine();return h$.test(r)&&fa(n,e.text,e.basePos)==fa(n,r,e.basePos)},before:"SetextHeading"}]};class Uj{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}const Gj={defineNodes:[{name:"Task",block:!0,style:_.list},{name:"TaskMarker",style:_.atom}],parseBlock:[{name:"TaskList",leaf(n,e){return/^\[[ xX]\][ \t]/.test(e.content)&&n.parentType().name=="ListItem"?new Uj:null},after:"SetextHeading"}]},Zw=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Bw=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Kj=/[\w-]+\.[\w-]+($|\/)/,Fw=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Xw=/\/[a-zA-Z\d@.]+/gy;function zw(n,e,t,r){let i=0;for(let s=e;s<t;s++)n[s]==r&&i++;return i}function Jj(n,e){Bw.lastIndex=e;let t=Bw.exec(n);if(!t||Kj.exec(t[0])[0].indexOf("_")>-1)return-1;let r=e+t[0].length;for(;;){let i=n[r-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&zw(n,e,r,")")>zw(n,e,r,"("))r--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(n.slice(e,r))))r=e+s.index;else break}return r}function Ww(n,e){Fw.lastIndex=e;let t=Fw.exec(n);if(!t)return-1;let r=t[0][t[0].length-1];return r=="_"||r=="-"?-1:e+t[0].length-(r=="."?1:0)}const eq={parseInline:[{name:"Autolink",parse(n,e,t){let r=t-n.offset;if(r&&/\w/.test(n.text[r-1]))return-1;Zw.lastIndex=r;let i=Zw.exec(n.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=Jj(n.text,r+i[0].length),s>-1&&n.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(n.text.slice(r,s));s=r+o[0].length}}else i[3]?s=Ww(n.text,r):(s=Ww(n.text,r+i[0].length),s>-1&&i[0]=="xmpp:"&&(Xw.lastIndex=s,i=Xw.exec(n.text),i&&(s=i.index+i[0].length)));return s<0?-1:(n.addElement(n.elt("URL",t,s+n.offset)),s+n.offset)}}]},tq=[Hj,Gj,Yj,eq];function f$(n,e,t){return(r,i,s)=>{if(i!=n||r.char(s+1)==n)return-1;let o=[r.elt(t,s,s+1)];for(let l=s+1;l<r.end;l++){let a=r.char(l);if(a==n)return r.addElement(r.elt(e,s,l+1,o.concat(r.elt(t,l,l+1))));if(a==92&&o.push(r.elt("Escape",l,l+++2)),tr(a))break}return-1}}const nq={defineNodes:[{name:"Superscript",style:_.special(_.content)},{name:"SuperscriptMark",style:_.processingInstruction}],parseInline:[{name:"Superscript",parse:f$(94,"Superscript","SuperscriptMark")}]},rq={defineNodes:[{name:"Subscript",style:_.special(_.content)},{name:"SubscriptMark",style:_.processingInstruction}],parseInline:[{name:"Subscript",parse:f$(126,"Subscript","SubscriptMark")}]},iq={defineNodes:[{name:"Emoji",style:_.character}],parseInline:[{name:"Emoji",parse(n,e,t){let r;return e!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(n.slice(t+1,n.end)))?-1:n.addElement(n.elt("Emoji",t,t+1+r[0].length))}}]},d$=Uf({commentTokens:{block:{open:"<!--",close:"-->"}}}),p$=new ve,g$=zj.configure({props:[pl.add(n=>!n.is("Block")||n.is("Document")||Km(n)!=null||sq(n)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),p$.add(Km),dl.add({Document:()=>null}),Wi.add({Document:d$})]});function Km(n){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(n.name);return e?+e[1]:void 0}function sq(n){return n.name=="OrderedList"||n.name=="BulletList"}function oq(n,e){let t=n;for(;;){let r=t.nextSibling,i;if(!r||(i=Km(r.type))!=null&&i<=e)break;t=r}return t.to}const lq=rP.of((n,e,t)=>{for(let r=qe(n).resolveInner(t,-1);r&&!(r.from<e);r=r.parent){let i=r.type.prop(p$);if(i==null)continue;let s=oq(r,i);if(s>t)return{from:t,to:s}}return null});function H0(n){return new Mn(d$,n,[],"markdown")}const m$=H0(g$),aq=g$.configure([tq,rq,nq,iq,{props:[pl.add({Table:(n,e)=>({from:e.doc.lineAt(n.from).to,to:n.to})})]}]),Ga=H0(aq);function cq(n,e){return t=>{if(t&&n){let r=null;if(t=/\S*/.exec(t)[0],typeof n=="function"?r=n(t):r=L.matchLanguageName(n,t,!0),r instanceof L)return r.support?r.support.language.parser:js.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}class Ip{constructor(e,t,r,i,s,o,l){this.node=e,this.from=t,this.to=r,this.spaceBefore=i,this.spaceAfter=s,this.type=o,this.item=l}blank(e,t=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;r.length<e;)r+=" ";return r}else{for(let i=this.to-this.from-r.length-this.spaceAfter.length;i>0;i--)r+=" ";return r+(t?this.spaceAfter:"")}}marker(e,t){let r=this.node.name=="OrderedList"?String(+x$(this.item,e)[2]+t):"";return this.spaceBefore+r+this.type+this.spaceAfter}}function O$(n,e){let t=[],r=[];for(let i=n;i;i=i.parent){if(i.name=="FencedCode")return r;(i.name=="ListItem"||i.name=="Blockquote")&&t.push(i)}for(let i=t.length-1;i>=0;i--){let s=t[i],o,l=e.lineAt(s.from),a=s.from-l.from;if(s.name=="Blockquote"&&(o=/^ *>( ?)/.exec(l.text.slice(a))))r.push(new Ip(s,a,a+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(l.text.slice(a)))){let c=o[3],u=o[0].length;c.length>=4&&(c=c.slice(0,c.length-4),u-=4),r.push(new Ip(s.parent,a,a+u,o[1],c,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(l.text.slice(a)))){let c=o[4],u=o[0].length;c.length>4&&(c=c.slice(0,c.length-4),u-=4);let h=o[2];o[3]&&(h+=o[3].replace(/[xX]/," ")),r.push(new Ip(s.parent,a,a+u,o[1],c,h,s))}}return r}function x$(n,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(n.from,n.from+10))}function Dp(n,e,t,r=0){for(let i=-1,s=n;;){if(s.name=="ListItem"){let l=x$(s,e),a=+l[2];if(i>=0){if(a!=i+1)return;t.push({from:s.from+l[1].length,to:s.from+l[0].length,insert:String(i+2+r)})}i=a}let o=s.nextSibling;if(!o)break;s=o}}function U0(n,e){let t=/^[ \t]*/.exec(n)[0].length;if(!t||e.facet(yc)!=" ")return n;let r=Or(n,4,t),i="";for(let s=r;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+n.slice(t)}const b$=(n={})=>({state:e,dispatch:t})=>{let r=qe(e),{doc:i}=e,s=null,o=e.changeByRange(l=>{if(!l.empty||!Ga.isActiveAt(e,l.from,-1)&&!Ga.isActiveAt(e,l.from,1))return s={range:l};let a=l.from,c=i.lineAt(a),u=O$(r.resolveInner(a,-1),i);for(;u.length&&u[u.length-1].from>a-c.from;)u.pop();if(!u.length)return s={range:l};let h=u[u.length-1];if(h.to-h.spaceAfter.length>a-c.from)return s={range:l};let f=a>=h.to-h.spaceAfter.length&&!/\S/.test(c.text.slice(h.to));if(h.item&&f){let x=h.node.firstChild,O=h.node.getChild("ListItem","ListItem");if(x.to>=a||O&&O.to<a||c.from>0&&!/[^\s>]/.test(i.lineAt(c.from-1).text)||n.nonTightLists===!1){let b=u.length>1?u[u.length-2]:null,y,S="";b&&b.item?(y=c.from+b.from,S=b.marker(i,1)):y=c.from+(b?b.to:0);let k=[{from:y,to:a,insert:S}];return h.node.name=="OrderedList"&&Dp(h.item,i,k,-2),b&&b.node.name=="OrderedList"&&Dp(b.item,i,k),{range:Z.cursor(y+S.length),changes:k}}else{let b=qw(u,e,c);return{range:Z.cursor(a+b.length+1),changes:{from:c.from,insert:b+e.lineBreak}}}}if(h.node.name=="Blockquote"&&f&&c.from){let x=i.lineAt(c.from-1),O=/>\s*$/.exec(x.text);if(O&&O.index==h.from){let b=e.changes([{from:x.from+O.index,to:x.to},{from:c.from+h.from,to:c.to}]);return{range:l.map(b),changes:b}}}let d=[];h.node.name=="OrderedList"&&Dp(h.item,i,d);let p=h.item&&h.item.from<c.from,g="";if(!p||/^[\s\d.)\-+*>]*/.exec(c.text)[0].length>=h.to)for(let x=0,O=u.length-1;x<=O;x++)g+=x==O&&!p?u[x].marker(i,1):u[x].blank(x<O?Or(c.text,4,u[x+1].from)-g.length:null);let m=a;for(;m>c.from&&/\s/.test(c.text.charAt(m-c.from-1));)m--;return g=U0(g,e),uq(h.node,e.doc)&&(g=qw(u,e,c)+e.lineBreak+g),d.push({from:m,to:a,insert:e.lineBreak+g}),{range:Z.cursor(m+g.length+1),changes:d}});return s?!1:(t(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},y$=b$();function jw(n){return n.name=="QuoteMark"||n.name=="ListMark"}function uq(n,e){if(n.name!="OrderedList"&&n.name!="BulletList")return!1;let t=n.firstChild,r=n.getChild("ListItem","ListItem");if(!r)return!1;let i=e.lineAt(t.to),s=e.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+(o?0:1)<s.number}function qw(n,e,t){let r="";for(let i=0,s=n.length-2;i<=s;i++)r+=n[i].blank(i<s?Or(t.text,4,n[i+1].from)-r.length:null,i<s);return U0(r,e)}function hq(n,e){let t=n.resolveInner(e,-1),r=e;jw(t)&&(r=t.from,t=t.parent);for(let i;i=t.childBefore(r);)if(jw(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")t=i.lastChild,r=t.to;else break;return t}const v$=({state:n,dispatch:e})=>{let t=qe(n),r=null,i=n.changeByRange(s=>{let o=s.from,{doc:l}=n;if(s.empty&&Ga.isActiveAt(n,s.from)){let a=l.lineAt(o),c=O$(hq(t,o),l);if(c.length){let u=c[c.length-1],h=u.to-u.spaceAfter.length+(u.spaceAfter?1:0);if(o-a.from>h&&!/\S/.test(a.text.slice(h,o-a.from)))return{range:Z.cursor(a.from+h),changes:{from:a.from+h,to:o}};if(o-a.from==h&&(!u.item||a.from<=u.item.from||!/\S/.test(a.text.slice(0,u.to)))){let f=a.from+u.from;if(u.item&&u.node.from<u.item.from&&/\S/.test(a.text.slice(u.from,u.to))){let d=u.blank(Or(a.text,4,u.to)-Or(a.text,4,u.from));return f==a.from&&(d=U0(d,n)),{range:Z.cursor(f+d.length),changes:{from:f,to:a.from+u.to,insert:d}}}if(f<o)return{range:Z.cursor(f),changes:{from:f,to:o}}}}}return r={range:s}});return r?!1:(e(n.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},S$=[{key:"Enter",run:y$},{key:"Backspace",run:v$}],w$=tQ({matchClosingTags:!1});function k$(n={}){let{codeLanguages:e,defaultCodeLanguage:t,addKeymap:r=!0,base:{parser:i}=m$,completeHTMLTags:s=!0,pasteURLAsLink:o=!0,htmlTagLanguage:l=w$}=n;if(!(i instanceof sd))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let a=n.extensions?[n.extensions]:[],c=[l.support,lq],u;o&&c.push(C$),t instanceof Fo?(c.push(t.support),u=t.language):t&&(u=t);let h=e||u?cq(e,u):void 0;a.push(jj({codeParser:h,htmlParser:l.language.parser})),r&&c.push(yr.high(ul.of(S$)));let f=H0(i.configure(a));return s&&c.push(f.data.of({autocomplete:fq})),new Fo(f,c)}function fq(n){let{state:e,pos:t}=n,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(t-25,t));if(!r)return null;let i=qe(e).resolveInner(t,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:t-r[0].length,to:t,options:dq(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Np=null;function dq(){if(Np)return Np;let n=UE(new h0(Ce.create({extensions:w$}),0,!0));return Np=n?n.options:[]}const pq=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,C$=U.domEventHandlers({paste:(n,e)=>{var t;let{main:r}=e.state.selection;if(r.empty)return!1;let i=(t=n.clipboardData)===null||t===void 0?void 0:t.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!Ga.isActiveAt(e.state,r.from,1)))return!1;let s=qe(e.state),o=!1;return s.iterate({from:r.from,to:r.to,enter:l=>{(l.from>r.from||pq.test(l.name))&&(o=!0)},leave:l=>{l.to<r.to&&(o=!0)}}),o?!1:(e.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),gq=Object.freeze(Object.defineProperty({__proto__:null,commonmarkLanguage:m$,deleteMarkupBackward:v$,insertNewlineContinueMarkup:y$,insertNewlineContinueMarkupCommand:b$,markdown:k$,markdownKeymap:S$,markdownLanguage:Ga,pasteURLAsLink:C$},Symbol.toStringTag,{value:"Module"})),Jm=[OQ,rQ,k$(),t0(),U.lineWrapping],mq=()=>{const[n,e,t]=Ht(Gr,Gn,G0),r=ut(Bs),i=ut(Ca),s=v.useRef(null),o=v.useCallback(l=>{var a;if(l!==null){const c=[...t,...Jm,U.updateListener.of(({state:u})=>{r(u.doc.toString())}),U.focusChangeEffect.of((u,h)=>(h||i(new FocusEvent("blur")),null))];e&&c.push(Ce.readOnly.of(!0)),l.innerHTML="",s.current=new U({parent:l,state:Ce.create({doc:n,extensions:c})})}else(a=s.current)==null||a.destroy(),s.current=null},[n,e,r,t,i]);return v.createElement("div",{ref:o,className:"cm-sourceView mdxeditor-source-editor"})};function Yw(n,e){n!==void 0&&n.dispatch({changes:{from:0,to:n.state.doc.length,insert:e}})}const Oq=()=>{const n=Ka(),[e,t,r,i]=Ht(Gr,rf,Gn,_$),s=ut(Bs),o=v.useRef(null),l=v.useRef(null),a=Lt(G0),c=ut(Ca);return v.useEffect(()=>n.sub(rf,u=>{var h;Yw((h=l.current)==null?void 0:h.a,u)}),[n]),v.useEffect(()=>n.sub(Gr,u=>{var h;Yw((h=l.current)==null?void 0:h.b,u)}),[n]),v.useEffect(()=>{const u=r||i,h=u?{renderRevertControl:void 0,revertControls:void 0}:{renderRevertControl:()=>{const f=document.createElement("button");return f.classList.add("cm-merge-revert"),f.appendChild(document.createTextNode("⮕")),f},revertControls:"a-to-b"};return l.current=new Aj({...h,parent:o.current,orientation:"a-b",gutter:!0,a:{doc:t,extensions:[...a,...Jm,Ce.readOnly.of(!0)]},b:{doc:e,extensions:[...a,...Jm,Ce.readOnly.of(u),U.updateListener.of(({state:f})=>{const d=f.doc.toString();s(d)}),U.focusChangeEffect.of((f,d)=>(d||c(new FocusEvent("blur")),null))]}}),()=>{var f;(f=l.current)==null||f.destroy(),l.current=null}},[s,a]),v.createElement("div",{ref:o,className:"mdxeditor-diff-editor"})},xq=({children:n})=>{const[e,t]=Ht(ka,wi);return v.createElement("div",{className:"mdxeditor-diff-source-wrapper"},e?v.createElement("div",{className:se.markdownParseError},v.createElement("p",null,e.error,"."),v.createElement("p",null,"You can fix the errors in source mode and switch to rich text mode when you are ready.")):null,v.createElement("div",{className:"mdxeditor-rich-text-editor",style:{display:t==="rich-text"&&e==null?"block":"none"}},n),t==="diff"?v.createElement(Oq,null):null,t==="source"?v.createElement(mq,null):null)},rf=ue(""),G0=ue([]),_$=ue(!1),bq=Rn({update:(n,e)=>{n.pub(rf,e?.diffMarkdown??"")},init(n,e){n.pubIn({[rf]:e?.diffMarkdown??"",[G0]:e?.codeMirrorExtensions??[],[O4]:xq,[_$]:e?.readOnlyDiff??!1,[wi]:e?.viewMode??"rich-text"})}});var Vp={exports:{}},Hw;function yq(){return Hw||(Hw=1,(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
95
+ * Prism: Lightweight, robust, elegant syntax highlighting
96
+ *
97
+ * @license MIT <https://opensource.org/licenses/MIT>
98
+ * @author Lea Verou <https://lea.verou.me>
99
+ * @namespace
100
+ * @public
101
+ */var t=(function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,o={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function O(b){return b instanceof a?new a(b.type,O(b.content),b.alias):Array.isArray(b)?b.map(O):b.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(O){return Object.prototype.toString.call(O).slice(8,-1)},objId:function(O){return O.__id||Object.defineProperty(O,"__id",{value:++s}),O.__id},clone:function O(b,y){y=y||{};var S,k;switch(l.util.type(b)){case"Object":if(k=l.util.objId(b),y[k])return y[k];S={},y[k]=S;for(var w in b)b.hasOwnProperty(w)&&(S[w]=O(b[w],y));return S;case"Array":return k=l.util.objId(b),y[k]?y[k]:(S=[],y[k]=S,b.forEach(function(C,T){S[T]=O(C,y)}),S);default:return b}},getLanguage:function(O){for(;O;){var b=i.exec(O.className);if(b)return b[1].toLowerCase();O=O.parentElement}return"none"},setLanguage:function(O,b){O.className=O.className.replace(RegExp(i,"gi"),""),O.classList.add("language-"+b)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(S){var O=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(S.stack)||[])[1];if(O){var b=document.getElementsByTagName("script");for(var y in b)if(b[y].src==O)return b[y]}return null}},isActive:function(O,b,y){for(var S="no-"+b;O;){var k=O.classList;if(k.contains(b))return!0;if(k.contains(S))return!1;O=O.parentElement}return!!y}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(O,b){var y=l.util.clone(l.languages[O]);for(var S in b)y[S]=b[S];return y},insertBefore:function(O,b,y,S){S=S||l.languages;var k=S[O],w={};for(var C in k)if(k.hasOwnProperty(C)){if(C==b)for(var T in y)y.hasOwnProperty(T)&&(w[T]=y[T]);y.hasOwnProperty(C)||(w[C]=k[C])}var $=S[O];return S[O]=w,l.languages.DFS(l.languages,function(D,M){M===$&&D!=O&&(this[D]=w)}),w},DFS:function O(b,y,S,k){k=k||{};var w=l.util.objId;for(var C in b)if(b.hasOwnProperty(C)){y.call(b,C,b[C],S||C);var T=b[C],$=l.util.type(T);$==="Object"&&!k[w(T)]?(k[w(T)]=!0,O(T,y,null,k)):$==="Array"&&!k[w(T)]&&(k[w(T)]=!0,O(T,y,C,k))}}},plugins:{},highlightAll:function(O,b){l.highlightAllUnder(document,O,b)},highlightAllUnder:function(O,b,y){var S={callback:y,container:O,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",S),S.elements=Array.prototype.slice.apply(S.container.querySelectorAll(S.selector)),l.hooks.run("before-all-elements-highlight",S);for(var k=0,w;w=S.elements[k++];)l.highlightElement(w,b===!0,S.callback)},highlightElement:function(O,b,y){var S=l.util.getLanguage(O),k=l.languages[S];l.util.setLanguage(O,S);var w=O.parentElement;w&&w.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(w,S);var C=O.textContent,T={element:O,language:S,grammar:k,code:C};function $(M){T.highlightedCode=M,l.hooks.run("before-insert",T),T.element.innerHTML=T.highlightedCode,l.hooks.run("after-highlight",T),l.hooks.run("complete",T),y&&y.call(T.element)}if(l.hooks.run("before-sanity-check",T),w=T.element.parentElement,w&&w.nodeName.toLowerCase()==="pre"&&!w.hasAttribute("tabindex")&&w.setAttribute("tabindex","0"),!T.code){l.hooks.run("complete",T),y&&y.call(T.element);return}if(l.hooks.run("before-highlight",T),!T.grammar){$(l.util.encode(T.code));return}if(b&&r.Worker){var D=new Worker(l.filename);D.onmessage=function(M){$(M.data)},D.postMessage(JSON.stringify({language:T.language,code:T.code,immediateClose:!0}))}else $(l.highlight(T.code,T.grammar,T.language))},highlight:function(O,b,y){var S={code:O,grammar:b,language:y};if(l.hooks.run("before-tokenize",S),!S.grammar)throw new Error('The language "'+S.language+'" has no grammar.');return S.tokens=l.tokenize(S.code,S.grammar),l.hooks.run("after-tokenize",S),a.stringify(l.util.encode(S.tokens),S.language)},tokenize:function(O,b){var y=b.rest;if(y){for(var S in y)b[S]=y[S];delete b.rest}var k=new h;return f(k,k.head,O),u(O,k,b,k.head,0),p(k)},hooks:{all:{},add:function(O,b){var y=l.hooks.all;y[O]=y[O]||[],y[O].push(b)},run:function(O,b){var y=l.hooks.all[O];if(!(!y||!y.length))for(var S=0,k;k=y[S++];)k(b)}},Token:a};r.Prism=l;function a(O,b,y,S){this.type=O,this.content=b,this.alias=y,this.length=(S||"").length|0}a.stringify=function O(b,y){if(typeof b=="string")return b;if(Array.isArray(b)){var S="";return b.forEach(function($){S+=O($,y)}),S}var k={type:b.type,content:O(b.content,y),tag:"span",classes:["token",b.type],attributes:{},language:y},w=b.alias;w&&(Array.isArray(w)?Array.prototype.push.apply(k.classes,w):k.classes.push(w)),l.hooks.run("wrap",k);var C="";for(var T in k.attributes)C+=" "+T+'="'+(k.attributes[T]||"").replace(/"/g,"&quot;")+'"';return"<"+k.tag+' class="'+k.classes.join(" ")+'"'+C+">"+k.content+"</"+k.tag+">"};function c(O,b,y,S){O.lastIndex=b;var k=O.exec(y);if(k&&S&&k[1]){var w=k[1].length;k.index+=w,k[0]=k[0].slice(w)}return k}function u(O,b,y,S,k,w){for(var C in y)if(!(!y.hasOwnProperty(C)||!y[C])){var T=y[C];T=Array.isArray(T)?T:[T];for(var $=0;$<T.length;++$){if(w&&w.cause==C+","+$)return;var D=T[$],M=D.inside,Q=!!D.lookbehind,F=!!D.greedy,j=D.alias;if(F&&!D.pattern.global){var fe=D.pattern.toString().match(/[imsuy]*$/)[0];D.pattern=RegExp(D.pattern.source,fe+"g")}for(var ee=D.pattern||D,be=S.next,xe=k;be!==b.tail&&!(w&&xe>=w.reach);xe+=be.value.length,be=be.next){var _e=be.value;if(b.length>O.length)return;if(!(_e instanceof a)){var Ze=1,Te;if(F){if(Te=c(ee,xe,O,Q),!Te||Te.index>=O.length)break;var $e=Te.index,Be=Te.index+Te[0].length,Re=xe;for(Re+=be.value.length;$e>=Re;)be=be.next,Re+=be.value.length;if(Re-=be.value.length,xe=Re,be.value instanceof a)continue;for(var Le=be;Le!==b.tail&&(Re<Be||typeof Le.value=="string");Le=Le.next)Ze++,Re+=Le.value.length;Ze--,_e=O.slice(xe,Re),Te.index-=xe}else if(Te=c(ee,0,_e,Q),!Te)continue;var $e=Te.index,pe=Te[0],he=_e.slice(0,$e),ge=_e.slice($e+pe.length),Se=xe+_e.length;w&&Se>w.reach&&(w.reach=Se);var Fe=be.prev;he&&(Fe=f(b,Fe,he),xe+=he.length),d(b,Fe,Ze);var It=new a(C,M?l.tokenize(pe,M):pe,j,pe);if(be=f(b,Fe,It),ge&&f(b,be,ge),Ze>1){var Pt={cause:C+","+$,reach:Se};u(O,b,y,be.prev,xe,Pt),w&&Pt.reach>w.reach&&(w.reach=Pt.reach)}}}}}}function h(){var O={value:null,prev:null,next:null},b={value:null,prev:O,next:null};O.next=b,this.head=O,this.tail=b,this.length=0}function f(O,b,y){var S=b.next,k={value:y,prev:b,next:S};return b.next=k,S.prev=k,O.length++,k}function d(O,b,y){for(var S=b.next,k=0;k<y&&S!==O.tail;k++)S=S.next;b.next=S,S.prev=b,O.length-=k}function p(O){for(var b=[],y=O.head.next;y!==O.tail;)b.push(y.value),y=y.next;return b}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(O){var b=JSON.parse(O.data),y=b.language,S=b.code,k=b.immediateClose;r.postMessage(l.highlight(S,l.languages[y],y)),k&&r.close()},!1)),l;var g=l.util.currentScript();g&&(l.filename=g.src,g.hasAttribute("data-manual")&&(l.manual=!0));function m(){l.manual||l.highlightAll()}if(!l.manual){var x=document.readyState;x==="loading"||x==="interactive"&&g&&g.defer?document.addEventListener("DOMContentLoaded",m):window.requestAnimationFrame?window.requestAnimationFrame(m):window.setTimeout(m,16)}return l})(e);n.exports&&(n.exports=t),typeof ux<"u"&&(ux.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(i,s){var o={};o["language-"+s]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[s]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var l={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};l["language-"+s]={pattern:/[\s\S]+/,inside:t.languages[s]};var a={};a[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:l},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(r,i){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:t.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,(function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var s=r.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))})(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,(function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(g,m){return"✖ Error "+g+" while fetching file: "+m},s="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",a="loading",c="loaded",u="failed",h="pre[data-src]:not(["+l+'="'+c+'"]):not(['+l+'="'+a+'"])';function f(g,m,x){var O=new XMLHttpRequest;O.open("GET",g,!0),O.onreadystatechange=function(){O.readyState==4&&(O.status<400&&O.responseText?m(O.responseText):O.status>=400?x(i(O.status,O.statusText)):x(s))},O.send(null)}function d(g){var m=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g||"");if(m){var x=Number(m[1]),O=m[2],b=m[3];return O?b?[x,Number(b)]:[x,void 0]:[x,x]}}t.hooks.add("before-highlightall",function(g){g.selector+=", "+h}),t.hooks.add("before-sanity-check",function(g){var m=g.element;if(m.matches(h)){g.code="",m.setAttribute(l,a);var x=m.appendChild(document.createElement("CODE"));x.textContent=r;var O=m.getAttribute("data-src"),b=g.language;if(b==="none"){var y=(/\.(\w+)$/.exec(O)||[,"none"])[1];b=o[y]||y}t.util.setLanguage(x,b),t.util.setLanguage(m,b);var S=t.plugins.autoloader;S&&S.loadLanguages(b),f(O,function(k){m.setAttribute(l,c);var w=d(m.getAttribute("data-range"));if(w){var C=k.split(/\r\n?|\n/g),T=w[0],$=w[1]==null?C.length:w[1];T<0&&(T+=C.length),T=Math.max(0,Math.min(T-1,C.length)),$<0&&($+=C.length),$=Math.max(0,Math.min($,C.length)),k=C.slice(T,$).join(`
102
+ `),m.hasAttribute("data-start")||m.setAttribute("data-start",String(T+1))}x.textContent=k,t.highlightElement(x)},function(k){m.setAttribute(l,u),x.textContent=k})}}),t.plugins.fileHighlight={highlight:function(m){for(var x=(m||document).querySelectorAll(h),O=0,b;b=x[O++];)t.highlightElement(b)}};var p=!1;t.fileHighlight=function(){p||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),p=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(Vp)),Vp.exports}yq();Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&amp;/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var s={};s[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",s)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(n,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(n){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function t(u){return u=u.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+u+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+s+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+s+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:t(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:t(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:t(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:t(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(u){["url","bold","italic","strike","code-snippet"].forEach(function(h){u!==h&&(n.languages.markdown[u].inside.content.inside[h]=n.languages.markdown[h])})}),n.hooks.add("after-tokenize",function(u){if(u.language!=="markdown"&&u.language!=="md")return;function h(f){if(!(!f||typeof f=="string"))for(var d=0,p=f.length;d<p;d++){var g=f[d];if(g.type!=="code"){h(g.content);continue}var m=g.content[1],x=g.content[3];if(m&&x&&m.type==="code-language"&&x.type==="code-block"&&typeof m.content=="string"){var O=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");O=(/[a-z][\w-]*/i.exec(O)||[""])[0].toLowerCase();var b="language-"+O;x.alias?typeof x.alias=="string"?x.alias=[x.alias,b]:x.alias.push(b):x.alias=[b]}}}h(u.tokens)}),n.hooks.add("wrap",function(u){if(u.type==="code-block"){for(var h="",f=0,d=u.classes.length;f<d;f++){var p=u.classes[f],g=/language-(.+)/.exec(p);if(g){h=g[1];break}}var m=n.languages[h];if(m)u.content=n.highlight(c(u.content),m,h);else if(h&&h!=="none"&&n.plugins.autoloader){var x="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);u.attributes.id=x,n.plugins.autoloader.loadLanguages(h,function(){var O=document.getElementById(x);O&&(O.innerHTML=n.highlight(O.textContent,n.languages[h],h))})}}});var o=RegExp(n.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},a=String.fromCodePoint||String.fromCharCode;function c(u){var h=u.replace(o,"");return h=h.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(f,d){if(d=d.toLowerCase(),d[0]==="#"){var p;return d[1]==="x"?p=parseInt(d.slice(2),16):p=Number(d.slice(1)),a(p)}else{var g=l[d];return g||f}}),h}n.languages.md=n.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(n){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var t=n.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(n){var e=n.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};e.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:e},boolean:e.boolean,variable:e.variable}})(Prism);var Uw={},Gw;function vq(){return Gw||(Gw=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),Uw}vq();var Kw={},Jw;function Sq(){return Jw||(Jw=1,(function(n){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,t=0;t<2;t++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),n.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},n.languages.rust["closure-params"].inside.rest=n.languages.rust,n.languages.rust.attribute.inside.string=n.languages.rust.string})(Prism)),Kw}Sq();Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(n){n.inside.interpolation.inside=Prism.languages.swift});var ek={},tk;function wq(){return tk||(tk=1,(function(n){n.languages.typescript=n.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),n.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete n.languages.typescript.parameter,delete n.languages.typescript["literal-property"];var e=n.languages.extend("typescript",{});delete e["class-name"],n.languages.typescript["class-name"].inside=e,n.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),n.languages.ts=n.languages.typescript})(Prism)),ek}wq();var nk={},rk;function kq(){return rk||(rk=1,(function(n){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,t=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};n.languages.java=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+t+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:e,function:[n.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),n.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),n.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+t+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+t+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)),nk}kq();var ik={},sk;function Cq(){return sk||(sk=1,(function(n){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,t=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return e.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return t})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])})(Prism)),ik}Cq();function T$(n,e){for(const t of n.childNodes){if(st(t)&&t.tagName===e)return!0;T$(t,e)}return!1}const Wl="data-language",Al="data-highlight-language",bu="data-theme";class _c extends yn{static getType(){return"code"}static clone(e){return new _c(e.__language,e.__key)}constructor(e,t){super(t),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){const t=document.createElement("code");mr(t,e.theme.code),t.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(t.setAttribute(Wl,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(Al,r));const i=this.getTheme();i&&t.setAttribute(bu,i);const s=this.getStyle();return s&&t.setAttribute("style",s),t}updateDOM(e,t,r){const i=this.__language,s=e.__language;i?i!==s&&t.setAttribute(Wl,i):s&&t.removeAttribute(Wl);const o=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&s?o&&i?i!==s&&t.setAttribute(Al,i):t.removeAttribute(Al):o&&i&&t.setAttribute(Al,i);const l=this.__theme,a=e.__theme;l?l!==a&&t.setAttribute(bu,l):a&&t.removeAttribute(bu);const c=this.__style,u=e.__style;return c?c!==u&&t.setAttribute("style",c):u&&t.removeAttribute("style"),!1}exportDOM(e){const t=document.createElement("pre");mr(t,e._config.theme.code),t.setAttribute("spellcheck","false");const r=this.getLanguage();r&&(t.setAttribute(Wl,r),this.getIsSyntaxHighlightSupported()&&t.setAttribute(Al,r));const i=this.getTheme();i&&t.setAttribute(bu,i);const s=this.getStyle();return s&&t.setAttribute("style",s),{element:t}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||T$(e,"BR"))?{conversion:ok,priority:1}:null,div:()=>({conversion:_q,priority:1}),pre:()=>({conversion:ok,priority:0}),table:e=>Zp(e)?{conversion:Tq,priority:3}:null,td:e=>{const t=e,r=t.closest("table");return t.classList.contains("js-file-line")||r&&Zp(r)?{conversion:lk,priority:3}:null},tr:e=>{const t=e.closest("table");return t&&Zp(t)?{conversion:lk,priority:3}:null}}}static importJSON(e){return mi().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(e,t=!0){const r=this.getChildren(),i=r.length;if(i>=2&&r[i-1].getTextContent()===`
103
+ `&&r[i-2].getTextContent()===`
104
+ `&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===i){r[i-1].remove(),r[i-2].remove();const a=ze();return this.insertAfter(a,t),a}const{anchor:s,focus:o}=e,l=(s.isBefore(o)?s:o).getNode();if(G(l)){let a=Eq(l);const c=[];for(;;)if(mf(a))c.push(Ko()),a=a.getNextSibling();else{if(!$$(a))break;{let m=0;const x=a.getTextContent(),O=a.getTextContentSize();for(;m<O&&x[m]===" ";)m++;if(m!==0&&c.push(Q$(" ".repeat(m))),m!==O)break;a=a.getNextSibling()}}const u=l.splitText(s.offset)[0],h=s.offset===0?0:1,f=u.getIndexWithinParent()+h,d=l.getParentOrThrow(),p=[pr(),...c];d.splice(f,0,p);const g=c[c.length-1];g?g.select():s.offset===0?u.selectPrevious():u.getNextSibling().selectNext(0,0)}if(K0(l)){const{offset:a}=e.anchor;l.splice(a,0,[pr()]),l.select(a+1,a+1)}return null}canIndent(){return!1}collapseAtStart(){const e=ze();return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}setLanguage(e){const t=this.getWritable();return t.__language=e||void 0,t}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){const t=this.getWritable();return t.__isSyntaxHighlightSupported=e,t}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){const t=this.getWritable();return t.__theme=e||void 0,t}getTheme(){return this.getLatest().__theme}}function mi(n,e){return yA(_c).setLanguage(n).setTheme(e)}function K0(n){return n instanceof _c}function ok(n){return{node:mi(n.getAttribute(Wl))}}function _q(n){const e=n,t=ak(e);return t||(function(r){let i=r.parentElement;for(;i!==null;){if(ak(i))return!0;i=i.parentElement}return!1})(e)?{node:t?mi():null}:{node:null}}function Tq(){return{node:mi()}}function lk(){return{node:null}}function ak(n){return n.style.fontFamily.match("monospace")!==null}function Zp(n){return n.classList.contains("js-file-line-container")}let P$=class E$ extends Jr{constructor(e="",t,r){super(e,r),this.__highlightType=t}static getType(){return"code-highlight"}static clone(e){return new E$(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){const t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(e){const t=super.createDOM(e),r=Bp(e.theme,this.__highlightType);return mr(t,r),t}updateDOM(e,t,r){const i=super.updateDOM(e,t,r),s=Bp(r.theme,e.__highlightType),o=Bp(r.theme,this.__highlightType);return s!==o&&(s&&$f(t,s),o&&mr(t,o)),i}static importJSON(e){return Q$().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return mi()}};function Bp(n,e){return e&&n&&n.codeHighlight&&n.codeHighlight[e]}function Q$(n="",e){return In(new P$(n,e))}function $$(n){return n instanceof P$}function Pq(n,e){let t=n;for(let r=vt(n,e);r&&($$(r.origin)||mf(r.origin));r=FA(r))t=r.origin;return t}function Eq(n){return Pq(n,"previous")}(function(n){n.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var e={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(e).forEach((function(t){var r=e[t],i=[];/^\w+$/.test(t)||i.push(/\w+/.exec(t)[0]),t==="diff"&&i.push("bold"),n.languages.diff[t]={pattern:RegExp("^(?:["+r+`].*(?:\r
105
+ ?|
106
+ |(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(t)[0]}}}})),Object.defineProperty(n.languages.diff,"PREFIXES",{value:e})})(Prism);function eO(n,e){const t={};for(const r of n){const i=e(r);i&&(t[i]?t[i].push(r):t[i]=[r])}return t}function Qq(n){const e=eO(n,(t=>t.type));return{element:e.element||[],multilineElement:e["multiline-element"]||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}const ck=/[!-/:-@[-`{-~\s]/;function $q(n){return G(n)&&!n.hasFormat("code")}function Aq(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function uk(n,e,t){const r=t.length;for(let i=e;i>=r;i--){const s=i-r;if(A$(n,s,t,0,r)&&n[s+r]!==" ")return s}return-1}function A$(n,e,t,r,i){for(let s=0;s<i;s++)if(n[e+s]!==t[r+s])return!1;return!0}function Mq(n,e=W$){const t=Qq(e),r=eO(t.textFormat,(({tag:o})=>o[o.length-1])),i=eO(t.textMatch,(({trigger:o})=>o));for(const o of e){const l=o.type;if(l==="element"||l==="text-match"||l==="multiline-element"){const a=o.dependencies;for(const c of a)n.hasNode(c)||Aq(173,c.getType())}}const s=(o,l,a)=>{(function(c,u,h,f){const d=c.getParent();if(!Rt(d)||c.getFirstChild()!==u)return!1;const p=u.getTextContent();if(p[h-1]!==" ")return!1;for(const{regExp:g,replace:m}of f){const x=p.match(g);if(x&&x[0].length===(x[0].endsWith(" ")?h:h-1)){const O=u.getNextSiblings(),[b,y]=u.splitText(h);if(m(c,y?[y,...O]:O,x,!1)!==!1)return b.remove(),!0}}return!1})(o,l,a,t.element)||(function(c,u,h,f){const d=c.getParent();if(!Rt(d)||c.getFirstChild()!==u)return!1;const p=u.getTextContent();if(p[h-1]!==" ")return!1;for(const{regExpStart:g,replace:m,regExpEnd:x}of f){if(x&&!("optional"in x)||x&&"optional"in x&&!x.optional)continue;const O=p.match(g);if(O&&O[0].length===(O[0].endsWith(" ")?h:h-1)){const b=u.getNextSiblings(),[y,S]=u.splitText(h);if(m(c,S?[S,...b]:b,O,null,null,!1)!==!1)return y.remove(),!0}}return!1})(o,l,a,t.multilineElement)||(function(c,u,h){let f=c.getTextContent();const d=h[f[u-1]];if(d==null)return!1;u<f.length&&(f=f.slice(0,u));for(const p of d){if(!p.replace||!p.regExp)continue;const g=f.match(p.regExp);if(g===null)continue;const m=g.index||0,x=m+g[0].length;let O;return m===0?[O]=c.splitText(x):[,O]=c.splitText(m,x),O.selectNext(0,0),p.replace(O,g),!0}return!1})(l,a,i)||(function(c,u,h){const f=c.getTextContent(),d=u-1,p=f[d],g=h[p];if(!g)return!1;for(const m of g){const{tag:x}=m,O=x.length,b=d-O+1;if(O>1&&!A$(f,b,x,0,O)||f[b-1]===" ")continue;const y=f[d+1];if(m.intraword===!1&&y&&!ck.test(y))continue;const S=c;let k=S,w=uk(f,b,x),C=k;for(;w<0&&(C=C.getPreviousSibling())&&!fr(C);)if(G(C)){if(C.hasFormat("code"))continue;const ee=C.getTextContent();k=C,w=uk(ee,ee.length,x)}if(w<0||k===S&&w+O===b)continue;const T=k.getTextContent();if(w>0&&T[w-1]===p)continue;const $=T[w-1];if(m.intraword===!1&&$&&!ck.test($))continue;const D=S.getTextContent(),M=D.slice(0,b)+D.slice(d+1);S.setTextContent(M);const Q=k===S?M:T;k.setTextContent(Q.slice(0,w)+Q.slice(w+O));const F=H(),j=nc();ht(j);const fe=d-O*(k===S?2:1)+1;j.anchor.set(k.__key,w,"text"),j.focus.set(S.__key,fe,"text");for(const ee of m.format)j.hasFormat(ee)||j.formatText(ee);j.anchor.set(j.focus.key,j.focus.offset,j.focus.type);for(const ee of m.format)j.hasFormat(ee)&&j.toggleFormat(ee);return B(F)&&(j.format=F.format),!0}})(l,a,r)};return n.registerUpdateListener((({tags:o,dirtyLeaves:l,editorState:a,prevEditorState:c})=>{if(o.has(g2)||o.has(sh)||n.isComposing())return;const u=a.read(H),h=c.read(H);if(!B(h)||!B(u)||!u.isCollapsed()||u.is(h))return;const f=u.anchor.key,d=u.anchor.offset,p=a._nodeMap.get(f);!G(p)||!l.has(f)||d!==1&&d>h.anchor.offset+1||n.update((()=>{if(!$q(p))return;const g=p.getParent();g===null||K0(g)||s(g,p,u.anchor.offset)}))}))}const Lq=/^(\s*)(\d{1,})\.\s/,Rq=/^(\s*)[-*+]\s/,Iq=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,Dq=/^(#{1,6})\s/,Nq=/^>\s/,Vq=/^[ \t]*```([\w-]+)?/,Zq=/[ \t]*```$/,M$=n=>(e,t,r,i)=>{const s=n(r);s.append(...t),e.replace(s),i||s.select(0,0)},J0=n=>(e,t,r,i)=>{const s=e.getPreviousSibling(),o=e.getNextSibling(),l=on(n==="check"?r[3]==="x":void 0);if(me(o)&&o.getListType()===n){const c=o.getFirstChild();c!==null?c.insertBefore(l):o.append(l),e.remove()}else if(me(s)&&s.getListType()===n)s.append(l),e.remove();else{const c=rn(n,n==="number"?Number(r[2]):void 0);c.append(l),e.replace(c)}l.append(...t),i||l.select(0,0);const a=(function(c){const u=c.match(/\t/g),h=c.match(/ /g);let f=0;return u&&(f+=u.length),h&&(f+=Math.floor(h.length/4)),f})(r[1]);a&&l.setIndent(a)},od=(n,e,t)=>{const r=[],i=n.getChildren();let s=0;for(const o of i)if(we(o)){if(o.getChildrenSize()===1){const u=o.getFirstChild();if(me(u)){r.push(od(u,e,t+1));continue}}const l=" ".repeat(4*t),a=n.getListType(),c=a==="number"?`${n.getStart()+s}. `:a==="check"?`- [${o.getChecked()?"x":" "}] `:"- ";r.push(l+c+e(o)),s++}return r.join(`
107
+ `)},Bq={dependencies:[cc],export:(n,e)=>{if(!Ao(n))return null;const t=Number(n.getTag().slice(1));return"#".repeat(t)+" "+e(n)},regExp:Dq,replace:M$((n=>{const e="h"+n[1].length;return Nr(e)})),type:"element"},L$={dependencies:[Af],export:(n,e)=>{if(!bg(n))return null;const t=e(n).split(`
108
+ `),r=[];for(const i of t)r.push("> "+i);return r.join(`
109
+ `)},regExp:Nq,replace:(n,e,t,r)=>{if(r){const s=n.getPreviousSibling();if(bg(s))return s.splice(s.getChildrenSize(),0,[pr(),...e]),void n.remove()}const i=ac();i.append(...e),n.replace(i),r||i.select(0,0)},type:"element"},R$={dependencies:[_c],export:n=>{if(!K0(n))return null;const e=n.getTextContent();return"```"+(n.getLanguage()||"")+(e?`
110
+ `+e:"")+"\n```"},regExpEnd:{optional:!0,regExp:Zq},regExpStart:Vq,replace:(n,e,t,r,i,s)=>{let o,l;if(!e&&i){if(i.length===1)r?(o=mi(),l=t[1]+i[0]):(o=mi(t[1]),l=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{if(o=mi(t[1]),i[0].trim().length===0)for(;i.length>0&&!i[0].length;)i.shift();else i[0]=i[0].startsWith(" ")?i[0].slice(1):i[0];for(;i.length>0&&!i[i.length-1].length;)i.pop();l=i.join(`
111
+ `)}const a=Ye(l);o.append(a),n.append(o)}else e&&M$((a=>mi(a?a[1]:void 0)))(n,e,t,s)},type:"multiline-element"},ex={dependencies:[$i,Qi],export:(n,e)=>me(n)?od(n,e,0):null,regExp:Rq,replace:J0("bullet"),type:"element"},I$={dependencies:[$i,Qi],export:(n,e)=>me(n)?od(n,e,0):null,regExp:Iq,replace:J0("check"),type:"element"},tx={dependencies:[$i,Qi],export:(n,e)=>me(n)?od(n,e,0):null,regExp:Lq,replace:J0("number"),type:"element"},D$={format:["code"],tag:"`",type:"text-format"},Fq={format:["highlight"],tag:"==",type:"text-format"},N$={format:["bold","italic"],tag:"***",type:"text-format"},V$={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},Z$={format:["bold"],tag:"**",type:"text-format"},B$={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Xq={format:["strikethrough"],tag:"~~",type:"text-format"},F$={format:["italic"],tag:"*",type:"text-format"},X$={format:["italic"],intraword:!1,tag:"_",type:"text-format"},z$={dependencies:[Ei],export:(n,e,t)=>{if(!dn(n)||or(n))return null;const r=n.getTitle(),i=e(n);return r?`[${i}](${n.getURL()} "${r}")`:`[${i}](${n.getURL()})`},importRegExp:/(?:\[(.*?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[(.*?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(n,e)=>{const[,t,r,i]=e,s=ki(r,{title:i}),o=t.split("[").length-1,l=t.split("]").length-1;let a=t,c="";if(o<l)return;if(o>l){const h=t.split("[");c="["+h[0],a=h.slice(1).join("[")}const u=Ye(a);return u.setFormat(n.getFormat()),s.append(u),n.replace(s),c&&s.insertBefore(Ye(c)),u},trigger:")",type:"text-match"},zq=[Bq,L$,ex,tx],Wq=[R$],jq=[D$,N$,V$,Z$,B$,Fq,F$,X$,Xq],qq=[z$],W$=[...zq,...Wq,...jq,...qq],Yq=[{dependencies:[fc],export:n=>r1(n)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(n,e,t,r)=>{const i=ol();r||n.getNextSibling()!=null?n.replace(i):n.insertBefore(i),i.selectNext()},type:"element"},...W$];function Fp({transformers:n=Yq}){const[e]=Sn();return V.useEffect((()=>Mq(e,n)),[e,n]),null}const Hq=Rn({init(n){const e=n.getValue(t1),t=e.includes("headings")?n.getValue(Nf):[],r=Jq(e,t),i=r.filter(s=>!Kq.has(s));n.pubIn({[il]:()=>v.createElement(Fp,{transformers:r}),[KO]:()=>v.createElement(Fp,{transformers:r}),[V5]:()=>v.createElement(Fp,{transformers:i})})}}),Uq=n=>(e,t,r)=>{const i=n(r);i.append(...t),e.replace(i),i.select(0,0)},Gq={dependencies:[fc],export:n=>r1(n)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(n,e,t,r)=>{const i=ol();r||n.getNextSibling()!=null?n.replace(i):n.insertBefore(i),i.selectNext()},type:"element"},Kq=new Set([tx,ex,I$]);function Jq(n,e){const t=[N$,V$,Z$,B$,D$,F$,X$];if(n.includes("headings")){const r=Math.min(...e),i=Math.max(...e),s=new RegExp(`^(#{${r},${i}})\\s`),o={dependencies:[cc],export:(l,a)=>{if(!Ao(l))return null;const c=Number(l.getTag().slice(1));return"#".repeat(c)+" "+a(l)},regExp:s,replace:Uq(l=>{const a=`h${l[1].length}`;return Nr(a)}),type:"element"};t.push(o)}if(n.includes("thematicBreak")&&t.push(Gq),n.includes("quote")&&t.push(L$),n.includes("link")&&t.push(z$),n.includes("lists")&&t.push(tx,ex,I$),n.includes("codeblock")){const r={...R$,dependencies:[al],replace:(i,s,o)=>{const l=gc({code:"",language:o[1]??"",meta:""});i.selectPrevious(),i.replace(l),setTimeout(()=>{l.select()},80)}};t.push(r)}return t}const eY=()=>{const n=ut(mh),e=Lt(Z5),t=Lt(t1),r=t.includes("quote"),i=t.includes("headings"),s=Gt();if(!r&&!i)return null;const o=[{label:s("toolbar.blockTypes.paragraph","Paragraph"),value:"paragraph"}];if(r&&o.push({label:s("toolbar.blockTypes.quote","Quote"),value:"quote"}),i){const l=Lt(Nf);o.push(...l.map(a=>({label:s("toolbar.blockTypes.heading","Heading {{level}}",{level:a}),value:`h${a}`})))}return v.createElement(xQ,{value:e,onChange:l=>{switch(l){case"quote":n(()=>ac());break;case"paragraph":n(()=>ze());break;case"":break;default:if(l.startsWith("h"))n(()=>Nr(l));else throw new Error(`Unknown block type: ${l}`)}},triggerTitle:s("toolbar.blockTypeSelect.selectBlockTypeTooltip","Select block type"),placeholder:s("toolbar.blockTypeSelect.placeholder","Block type"),items:o})},Xp=({format:n,addTitle:e,removeTitle:t,icon:r,formatName:i})=>{const[s,o]=Ht(y5,ln),l=ut(v5),a=(s&n)!==0;return v.createElement(EQ,{title:a?t:e,on:a,onValueChange:()=>{l(i)}},o(r))},tY=({options:n})=>{const e=Gt(),t=typeof n>"u";return v.createElement("div",{className:se.toolbarGroupOfGroups},t||n.includes("Bold")?v.createElement(Xp,{format:Gl,addTitle:e("toolbar.bold","Bold"),removeTitle:e("toolbar.removeBold","Remove bold"),icon:"format_bold",formatName:"bold"}):null,t||n.includes("Italic")?v.createElement(Xp,{format:Kl,addTitle:e("toolbar.italic","Italic"),removeTitle:e("toolbar.removeItalic","Remove italic"),icon:"format_italic",formatName:"italic"}):null,t||n.includes("Underline")?v.createElement(Xp,{format:Jl,addTitle:e("toolbar.underline","Underline"),removeTitle:e("toolbar.removeUnderline","Remove underline"),icon:"format_underlined",formatName:"underline"}):null)},nY=()=>{const n=ut(V0),e=Lt(ln),t=Gt();return v.createElement(B0,{"aria-label":t("toolbar.link","Create link"),title:t("toolbar.link","Create link"),onClick:r=>{n()}},e("link"))},rY=({children:n,SourceToolbar:e,options:t=["rich-text","diff","source"]})=>{const[r,i]=Ht(wi,ln),s=ut(wi),o=Gt(),l=[];return t.includes("rich-text")&&l.push({title:o("toolbar.richText","Rich text"),contents:i("rich_text"),value:"rich-text"}),t.includes("diff")&&l.push({title:o("toolbar.diffMode","Diff mode"),contents:i("difference"),value:"diff"}),t.includes("source")&&l.push({title:o("toolbar.source","Source mode"),contents:i("markdown"),value:"source"}),v.createElement(v.Fragment,null,r==="rich-text"?n:r==="diff"?v.createElement("span",{className:se.toolbarTitleMode},o("toolbar.diffMode","Diff mode")):e??v.createElement("span",{className:se.toolbarTitleMode},o("toolbar.source","Source mode")),v.createElement("div",{className:se.diffSourceToggleWrapper},v.createElement(QQ,{className:se.diffSourceToggle,ggClassName:se.ggDiffSourceToggle,value:r,items:l,onChange:a=>{s(a===""?"rich-text":a)}})))},iY=()=>{const n=Lt(ln),e=ut(VC),t=Gt(),r=Lt(JO);return v.createElement(B0,{title:t("toolbar.table","Insert Table"),onClick:()=>{e({rows:3,columns:3})},...r?{"aria-disabled":!0,"data-disabled":!0,disabled:!0}:{}},n("table"))},sY=()=>{const n=ut(lC),e=Lt(ln),t=Gt();return v.createElement(B0,{title:t("toolbar.thematicBreak","Insert thematic break"),onClick:()=>{n()}},e("horizontal_rule"))},oY={bullet:"format_list_bulleted",number:"format_list_numbered",check:"format_list_checked"},lY=({options:n=["bullet","number","check"]})=>{const[e,t,r]=Ht(Dg,ln,JO),i=ut(aC),s=Gt(),o={bullet:s("toolbar.bulletedList","Bulleted list"),number:s("toolbar.numberedList","Numbered list"),check:s("toolbar.checkList","Check list")},l=n.map(a=>({value:a,title:o[a],contents:t(oY[a])}));return v.createElement(QQ,{value:e||"",items:l,onChange:i,disabled:r})},aY=()=>{const[n,e]=Ht(ln,ot),[t,r]=v.useState(!1),[i,s]=v.useState(!1),o=Gt();return v.useEffect(()=>{if(e)return Dn(e.registerCommand(Rl,l=>(r(l),!1),Yr),e.registerCommand(Ll,l=>(s(l),!1),Yr))},[e]),v.createElement(uj,{items:[{title:o("toolbar.undo","Undo {{shortcut}}",{shortcut:xh?"⌘Z":"Ctrl+Z"}),disabled:!t,contents:n("undo"),active:!1,onChange:()=>e?.dispatchCommand(hf,void 0)},{title:o("toolbar.redo","Redo {{shortcut}}",{shortcut:xh?"⌘Y":"Ctrl+Y"}),disabled:!i,contents:n("redo"),active:!1,onChange:()=>e?.dispatchCommand(ff,void 0)}]})},cY={js:"JavaScript",ts:"TypeScript",tsx:"TypeScript (React)",jsx:"JavaScript (React)",css:"CSS",html:"HTML",json:"JSON",python:"Python",bash:"Bash",shell:"Shell",sql:"SQL",yaml:"YAML",md:"Markdown",txt:"Plain Text"};function uY(){return oe.jsxs(rY,{children:[oe.jsx(aY,{}),oe.jsx(eY,{}),oe.jsx(tY,{}),oe.jsx(lY,{}),oe.jsx(nY,{}),oe.jsx(iY,{}),oe.jsx(sY,{})]})}function hY(n){return n==="dark"?!0:n==="system"?typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches:!1}const fY=V.forwardRef(({value:n,onChange:e,placeholder:t="Enter your markdown here...",className:r,hideToolbar:i=!1,height:s=400},o)=>{const{theme:l}=w3(),a=hY(l),c=V.useRef(null);V.useEffect(()=>{c.current&&n!==void 0&&c.current.getMarkdown()!==n&&c.current.setMarkdown(n)},[n]);const u=V.useMemo(()=>{const h=[gM(),EM(),YR(),SM(),Hq(),ML(),oj(),xL(),iI({defaultCodeBlockLanguage:"txt"}),nj({codeBlockLanguages:cY}),bq({viewMode:"rich-text"})];return i||h.push(hj({toolbarContents:()=>oe.jsx(uY,{})})),h},[i]);return oe.jsx("div",{ref:o,className:k3("w-full mdxeditor-wrapper",a&&"dark-theme",r),style:{minHeight:s},children:oe.jsx(aM,{ref:c,className:a?"dark-theme":"",markdown:n??"",placeholder:t,onChange:h=>e?.(h),plugins:u})})});fY.displayName="MarkdownEditor";export{gE as C,Nn as E,Ne as I,Zo as L,fY as M,UT as N,Xo as a,Fo as b,Bu as c,TZ as d,kP as e,pl as f,qe as g,jh as h,dl as i,zV as j,WV as k,iP as l,hn as m,U as n,Z as o,tQ as p,GT as q,vE as r,fl as s,_ as t,OP as u,Yn as v};