ghost 5.67.0 → 5.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/components/tryghost-adapter-cache-memory-ttl-5.69.0.tgz +0 -0
  2. package/components/tryghost-adapter-cache-redis-5.69.0.tgz +0 -0
  3. package/components/tryghost-adapter-manager-5.69.0.tgz +0 -0
  4. package/components/tryghost-announcement-bar-settings-5.69.0.tgz +0 -0
  5. package/components/tryghost-api-framework-5.69.0.tgz +0 -0
  6. package/components/tryghost-api-version-compatibility-service-5.69.0.tgz +0 -0
  7. package/components/tryghost-audience-feedback-5.69.0.tgz +0 -0
  8. package/components/tryghost-bookshelf-repository-5.69.0.tgz +0 -0
  9. package/components/tryghost-bootstrap-socket-5.69.0.tgz +0 -0
  10. package/components/tryghost-collections-5.69.0.tgz +0 -0
  11. package/components/tryghost-constants-5.69.0.tgz +0 -0
  12. package/components/tryghost-custom-theme-settings-service-5.69.0.tgz +0 -0
  13. package/components/{tryghost-data-generator-5.67.0.tgz → tryghost-data-generator-5.69.0.tgz} +0 -0
  14. package/components/tryghost-domain-events-5.69.0.tgz +0 -0
  15. package/components/tryghost-donations-5.69.0.tgz +0 -0
  16. package/components/tryghost-dynamic-routing-events-5.69.0.tgz +0 -0
  17. package/components/tryghost-email-analytics-provider-mailgun-5.69.0.tgz +0 -0
  18. package/components/tryghost-email-analytics-service-5.69.0.tgz +0 -0
  19. package/components/tryghost-email-content-generator-5.69.0.tgz +0 -0
  20. package/components/tryghost-email-events-5.69.0.tgz +0 -0
  21. package/components/{tryghost-email-service-5.67.0.tgz → tryghost-email-service-5.69.0.tgz} +0 -0
  22. package/components/tryghost-email-suppression-list-5.69.0.tgz +0 -0
  23. package/components/tryghost-event-aware-cache-wrapper-5.69.0.tgz +0 -0
  24. package/components/tryghost-express-dynamic-redirects-5.69.0.tgz +0 -0
  25. package/components/tryghost-external-media-inliner-5.69.0.tgz +0 -0
  26. package/components/tryghost-extract-api-key-5.69.0.tgz +0 -0
  27. package/components/tryghost-html-to-plaintext-5.69.0.tgz +0 -0
  28. package/components/tryghost-i18n-5.69.0.tgz +0 -0
  29. package/components/tryghost-importer-handler-content-files-5.69.0.tgz +0 -0
  30. package/components/tryghost-importer-revue-5.69.0.tgz +0 -0
  31. package/components/tryghost-in-memory-repository-5.69.0.tgz +0 -0
  32. package/components/tryghost-job-manager-5.69.0.tgz +0 -0
  33. package/components/tryghost-link-redirects-5.69.0.tgz +0 -0
  34. package/components/tryghost-link-replacer-5.69.0.tgz +0 -0
  35. package/components/tryghost-link-tracking-5.69.0.tgz +0 -0
  36. package/components/tryghost-magic-link-5.69.0.tgz +0 -0
  37. package/components/tryghost-mail-events-5.69.0.tgz +0 -0
  38. package/components/tryghost-mailgun-client-5.69.0.tgz +0 -0
  39. package/components/tryghost-member-attribution-5.69.0.tgz +0 -0
  40. package/components/tryghost-member-events-5.69.0.tgz +0 -0
  41. package/components/{tryghost-members-api-5.67.0.tgz → tryghost-members-api-5.69.0.tgz} +0 -0
  42. package/components/tryghost-members-csv-5.69.0.tgz +0 -0
  43. package/components/tryghost-members-events-service-5.69.0.tgz +0 -0
  44. package/components/tryghost-members-importer-5.69.0.tgz +0 -0
  45. package/components/tryghost-members-offers-5.69.0.tgz +0 -0
  46. package/components/tryghost-members-payments-5.69.0.tgz +0 -0
  47. package/components/tryghost-members-ssr-5.69.0.tgz +0 -0
  48. package/components/{tryghost-members-stripe-service-5.67.0.tgz → tryghost-members-stripe-service-5.69.0.tgz} +0 -0
  49. package/components/tryghost-mentions-email-report-5.69.0.tgz +0 -0
  50. package/components/tryghost-milestones-5.69.0.tgz +0 -0
  51. package/components/tryghost-minifier-5.69.0.tgz +0 -0
  52. package/components/tryghost-model-to-domain-event-interceptor-5.69.0.tgz +0 -0
  53. package/components/tryghost-mw-api-version-mismatch-5.69.0.tgz +0 -0
  54. package/components/tryghost-mw-cache-control-5.69.0.tgz +0 -0
  55. package/components/tryghost-mw-error-handler-5.69.0.tgz +0 -0
  56. package/components/tryghost-mw-session-from-token-5.69.0.tgz +0 -0
  57. package/components/tryghost-mw-update-user-last-seen-5.69.0.tgz +0 -0
  58. package/components/tryghost-mw-version-match-5.69.0.tgz +0 -0
  59. package/components/tryghost-mw-vhost-5.69.0.tgz +0 -0
  60. package/components/tryghost-nql-filter-expansions-5.69.0.tgz +0 -0
  61. package/components/tryghost-oembed-service-5.69.0.tgz +0 -0
  62. package/components/tryghost-package-json-5.69.0.tgz +0 -0
  63. package/components/tryghost-post-events-5.69.0.tgz +0 -0
  64. package/components/tryghost-post-revisions-5.69.0.tgz +0 -0
  65. package/components/tryghost-posts-service-5.69.0.tgz +0 -0
  66. package/components/tryghost-recommendations-5.69.0.tgz +0 -0
  67. package/components/tryghost-referrers-5.69.0.tgz +0 -0
  68. package/components/tryghost-security-5.69.0.tgz +0 -0
  69. package/components/tryghost-session-service-5.69.0.tgz +0 -0
  70. package/components/tryghost-settings-path-manager-5.69.0.tgz +0 -0
  71. package/components/tryghost-slack-notifications-5.69.0.tgz +0 -0
  72. package/components/tryghost-staff-service-5.69.0.tgz +0 -0
  73. package/components/tryghost-stats-service-5.69.0.tgz +0 -0
  74. package/components/tryghost-tiers-5.69.0.tgz +0 -0
  75. package/components/tryghost-update-check-service-5.69.0.tgz +0 -0
  76. package/components/tryghost-verification-trigger-5.69.0.tgz +0 -0
  77. package/components/tryghost-version-notifications-data-service-5.69.0.tgz +0 -0
  78. package/components/tryghost-webmentions-5.69.0.tgz +0 -0
  79. package/content/themes/source/assets/built/source.js +1 -1
  80. package/content/themes/source/assets/built/source.js.map +1 -1
  81. package/content/themes/source/assets/js/casper.js +1 -1
  82. package/content/themes/source/package.json +1 -1
  83. package/core/built/admin/assets/admin-x-settings/{CodeEditorView-1643e910.mjs → CodeEditorView-b2459562.mjs} +275 -273
  84. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +2 -2
  85. package/core/built/admin/assets/admin-x-settings/{index-b4c2ef5b.mjs → index-0152ca19.mjs} +4813 -4625
  86. package/core/built/admin/assets/admin-x-settings/{limit-service-c343d244.mjs → limit-service-b0370dbc.mjs} +2 -2
  87. package/core/built/admin/assets/admin-x-settings/{modals-8b0aeacd.mjs → modals-4201e074.mjs} +10184 -9731
  88. package/core/built/admin/assets/{chunk.143.da2301d9edb6ad0b5496.js → chunk.143.6e2a218178c3c44fac33.js} +5 -5
  89. package/core/built/admin/assets/{chunk.178.efec05ab07e1e216d657.js → chunk.178.a7169a78c2b1e9582f2e.js} +4 -4
  90. package/core/built/admin/assets/{chunk.940.b09a2c2049ed9c373dd0.js → chunk.940.159ed6caf77114942465.js} +34 -34
  91. package/core/built/admin/assets/{ghost-193c98abe66483968da753e54917e87a.js → ghost-a012143b70f1e3bffed74252f7a736df.js} +189 -188
  92. package/core/built/admin/assets/ghost-a1d3bcea0bd360af258a27e29323ba35.css +1 -0
  93. package/core/built/admin/assets/ghost-dark-638883e1af34829a72578aad50905f7c.css +1 -0
  94. package/core/built/admin/assets/koenig-lexical/Koenig-editor-1.png +0 -0
  95. package/core/built/admin/assets/koenig-lexical/Koenig-editor-2.png +0 -0
  96. package/core/built/admin/assets/koenig-lexical/assets/fonts/Inter.ttf +0 -0
  97. package/core/built/admin/assets/koenig-lexical/index.css +6 -0
  98. package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +129021 -0
  99. package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +1442 -0
  100. package/core/built/admin/index.html +5 -5
  101. package/core/frontend/helpers/img_url.js +6 -6
  102. package/core/frontend/helpers/readable_url.js +32 -0
  103. package/core/frontend/helpers/recommendations.js +1 -1
  104. package/core/frontend/helpers/tpl/recommendations.hbs +4 -5
  105. package/core/server/GhostServer.js +9 -0
  106. package/core/server/api/endpoints/incoming-recommendations.js +20 -0
  107. package/core/server/api/endpoints/index.js +4 -0
  108. package/core/server/api/endpoints/posts-public.js +3 -2
  109. package/core/server/api/endpoints/utils/serializers/output/config.js +0 -1
  110. package/core/server/data/migrations/utils/schema.js +31 -2
  111. package/core/server/data/migrations/versions/5.69/2023-10-06-15-06-00-rename-recommendations-reason-to-description.js +3 -0
  112. package/core/server/data/schema/commands.js +20 -0
  113. package/core/server/data/schema/schema.js +1 -1
  114. package/core/server/models/product.js +1 -1
  115. package/core/server/services/newsletters/NewslettersService.js +2 -2
  116. package/core/server/services/oembed/TwitterOEmbedProvider.js +5 -1
  117. package/core/server/services/recommendations/RecommendationServiceWrapper.js +10 -0
  118. package/core/server/services/settings/SettingsBREADService.js +1 -5
  119. package/core/server/web/api/endpoints/admin/routes.js +3 -0
  120. package/core/shared/config/defaults.json +0 -4
  121. package/core/shared/labs.js +3 -4
  122. package/package.json +157 -157
  123. package/yarn.lock +147 -141
  124. package/components/tryghost-adapter-cache-memory-ttl-5.67.0.tgz +0 -0
  125. package/components/tryghost-adapter-cache-redis-5.67.0.tgz +0 -0
  126. package/components/tryghost-adapter-manager-5.67.0.tgz +0 -0
  127. package/components/tryghost-announcement-bar-settings-5.67.0.tgz +0 -0
  128. package/components/tryghost-api-framework-5.67.0.tgz +0 -0
  129. package/components/tryghost-api-version-compatibility-service-5.67.0.tgz +0 -0
  130. package/components/tryghost-audience-feedback-5.67.0.tgz +0 -0
  131. package/components/tryghost-bookshelf-repository-5.67.0.tgz +0 -0
  132. package/components/tryghost-bootstrap-socket-5.67.0.tgz +0 -0
  133. package/components/tryghost-collections-5.67.0.tgz +0 -0
  134. package/components/tryghost-constants-5.67.0.tgz +0 -0
  135. package/components/tryghost-custom-theme-settings-service-5.67.0.tgz +0 -0
  136. package/components/tryghost-domain-events-5.67.0.tgz +0 -0
  137. package/components/tryghost-donations-5.67.0.tgz +0 -0
  138. package/components/tryghost-dynamic-routing-events-5.67.0.tgz +0 -0
  139. package/components/tryghost-email-analytics-provider-mailgun-5.67.0.tgz +0 -0
  140. package/components/tryghost-email-analytics-service-5.67.0.tgz +0 -0
  141. package/components/tryghost-email-content-generator-5.67.0.tgz +0 -0
  142. package/components/tryghost-email-events-5.67.0.tgz +0 -0
  143. package/components/tryghost-email-suppression-list-5.67.0.tgz +0 -0
  144. package/components/tryghost-event-aware-cache-wrapper-5.67.0.tgz +0 -0
  145. package/components/tryghost-express-dynamic-redirects-5.67.0.tgz +0 -0
  146. package/components/tryghost-external-media-inliner-5.67.0.tgz +0 -0
  147. package/components/tryghost-extract-api-key-5.67.0.tgz +0 -0
  148. package/components/tryghost-html-to-plaintext-5.67.0.tgz +0 -0
  149. package/components/tryghost-i18n-5.67.0.tgz +0 -0
  150. package/components/tryghost-importer-handler-content-files-5.67.0.tgz +0 -0
  151. package/components/tryghost-importer-revue-5.67.0.tgz +0 -0
  152. package/components/tryghost-in-memory-repository-5.67.0.tgz +0 -0
  153. package/components/tryghost-job-manager-5.67.0.tgz +0 -0
  154. package/components/tryghost-link-redirects-5.67.0.tgz +0 -0
  155. package/components/tryghost-link-replacer-5.67.0.tgz +0 -0
  156. package/components/tryghost-link-tracking-5.67.0.tgz +0 -0
  157. package/components/tryghost-magic-link-5.67.0.tgz +0 -0
  158. package/components/tryghost-mail-events-5.67.0.tgz +0 -0
  159. package/components/tryghost-mailgun-client-5.67.0.tgz +0 -0
  160. package/components/tryghost-member-attribution-5.67.0.tgz +0 -0
  161. package/components/tryghost-member-events-5.67.0.tgz +0 -0
  162. package/components/tryghost-members-csv-5.67.0.tgz +0 -0
  163. package/components/tryghost-members-events-service-5.67.0.tgz +0 -0
  164. package/components/tryghost-members-importer-5.67.0.tgz +0 -0
  165. package/components/tryghost-members-offers-5.67.0.tgz +0 -0
  166. package/components/tryghost-members-payments-5.67.0.tgz +0 -0
  167. package/components/tryghost-members-ssr-5.67.0.tgz +0 -0
  168. package/components/tryghost-mentions-email-report-5.67.0.tgz +0 -0
  169. package/components/tryghost-milestones-5.67.0.tgz +0 -0
  170. package/components/tryghost-minifier-5.67.0.tgz +0 -0
  171. package/components/tryghost-model-to-domain-event-interceptor-5.67.0.tgz +0 -0
  172. package/components/tryghost-mw-api-version-mismatch-5.67.0.tgz +0 -0
  173. package/components/tryghost-mw-cache-control-5.67.0.tgz +0 -0
  174. package/components/tryghost-mw-error-handler-5.67.0.tgz +0 -0
  175. package/components/tryghost-mw-session-from-token-5.67.0.tgz +0 -0
  176. package/components/tryghost-mw-update-user-last-seen-5.67.0.tgz +0 -0
  177. package/components/tryghost-mw-version-match-5.67.0.tgz +0 -0
  178. package/components/tryghost-mw-vhost-5.67.0.tgz +0 -0
  179. package/components/tryghost-nql-filter-expansions-5.67.0.tgz +0 -0
  180. package/components/tryghost-oembed-service-5.67.0.tgz +0 -0
  181. package/components/tryghost-package-json-5.67.0.tgz +0 -0
  182. package/components/tryghost-post-events-5.67.0.tgz +0 -0
  183. package/components/tryghost-post-revisions-5.67.0.tgz +0 -0
  184. package/components/tryghost-posts-service-5.67.0.tgz +0 -0
  185. package/components/tryghost-recommendations-5.67.0.tgz +0 -0
  186. package/components/tryghost-referrers-5.67.0.tgz +0 -0
  187. package/components/tryghost-security-5.67.0.tgz +0 -0
  188. package/components/tryghost-session-service-5.67.0.tgz +0 -0
  189. package/components/tryghost-settings-path-manager-5.67.0.tgz +0 -0
  190. package/components/tryghost-slack-notifications-5.67.0.tgz +0 -0
  191. package/components/tryghost-staff-service-5.67.0.tgz +0 -0
  192. package/components/tryghost-stats-service-5.67.0.tgz +0 -0
  193. package/components/tryghost-tiers-5.67.0.tgz +0 -0
  194. package/components/tryghost-update-check-service-5.67.0.tgz +0 -0
  195. package/components/tryghost-verification-trigger-5.67.0.tgz +0 -0
  196. package/components/tryghost-version-notifications-data-service-5.67.0.tgz +0 -0
  197. package/components/tryghost-webmentions-5.67.0.tgz +0 -0
  198. package/core/built/admin/assets/ghost-9e454659c8c0896ed10336b640d1b1eb.css +0 -1
  199. package/core/built/admin/assets/ghost-dark-1d24186396fe74946c926faa9faa247b.css +0 -1
  200. /package/core/built/admin/assets/{chunk.940.b09a2c2049ed9c373dd0.js.LICENSE.txt → chunk.940.159ed6caf77114942465.js.LICENSE.txt} +0 -0
@@ -1,8 +1,8 @@
1
- import { b as ke, d as W, a_ as wt, bA as qn, C as Rt, bB as Hn, j as P, bC as Vn, E as zn, y as Un, P as $n, J as Gn, H as Kn, G as Jn } from "./index-b4c2ef5b.mjs";
2
- import { E as p, F as ue, v as Ee, S as we, o as d, w as qe, C as _n, x as jn, y as Tt, z as Ot, A as Se, B as It, G as Pt, H as Wt, J as $e, K as Xe, M as w, O as Z, g as et, b as Ge, Q as Qn, R as ee, V as Ft, U as y, W as Yn, X as Zn, Y as ae, Z as M, _ as Xn, $ as er, a0 as tt, a1 as ce, a2 as tr, a3 as nr, a4 as rr, a5 as or, a6 as ir, a7 as sr, a8 as lr, a9 as ar, aa as cr, ab as hr, ac as ur, ad as fr, ae as dr, af as mr, ag as Nt, ah as gr, ai as pr, aj as yr, ak as xr, al as kr, am as br, an as qt, ao as Sr, ap as Cr, t as f, aq as vr } from "./index-9cc1df42.mjs";
1
+ import { e as ke, f as F, b2 as wt, bK as qn, J as Rt, bL as Vn, j as W, bM as Hn, O as Un, C as zn, _ as $n, U as Gn, P as Kn, Q as Jn } from "./index-0152ca19.mjs";
2
+ import { E as p, F as fe, v as Ee, S as we, o as d, w as qe, C as _n, x as jn, y as Tt, z as Ot, A as Se, B as It, G as Pt, H as Wt, J as $e, K as Xe, M as w, O as Z, g as et, b as Ge, Q as Qn, R as ee, V as Ft, U as y, W as Yn, X as Zn, Y as ce, Z as L, _ as Xn, $ as er, a0 as tt, a1 as he, a2 as tr, a3 as nr, a4 as rr, a5 as or, a6 as ir, a7 as sr, a8 as lr, a9 as ar, aa as cr, ab as hr, ac as ur, ad as fr, ae as dr, af as mr, ag as Nt, ah as gr, ai as pr, aj as yr, ak as xr, al as kr, am as br, an as qt, ao as Sr, ap as Cr, t as f, aq as vr } from "./index-9cc1df42.mjs";
3
3
  const Ar = (t) => {
4
4
  let { state: e } = t, r = e.doc.lineAt(e.selection.main.from), n = rt(t.state, r.from);
5
- return n.line ? Mr(t) : n.block ? Br(t) : !1;
5
+ return n.line ? Mr(t) : n.block ? Dr(t) : !1;
6
6
  };
7
7
  function nt(t, e) {
8
8
  return ({ state: r, dispatch: n }) => {
@@ -17,11 +17,11 @@ const Mr = /* @__PURE__ */ nt(
17
17
  0
18
18
  /* CommentOption.Toggle */
19
19
  ), Lr = /* @__PURE__ */ nt(
20
- Ht,
20
+ Vt,
21
21
  0
22
22
  /* CommentOption.Toggle */
23
- ), Br = /* @__PURE__ */ nt(
24
- (t, e) => Ht(t, e, Er(e)),
23
+ ), Dr = /* @__PURE__ */ nt(
24
+ (t, e) => Vt(t, e, Er(e)),
25
25
  0
26
26
  /* CommentOption.Toggle */
27
27
  );
@@ -29,25 +29,25 @@ function rt(t, e) {
29
29
  let r = t.languageDataAt("commentTokens", e);
30
30
  return r.length ? r[0] : {};
31
31
  }
32
- const le = 50;
33
- function Dr(t, { open: e, close: r }, n, o) {
34
- let i = t.sliceDoc(n - le, n), s = t.sliceDoc(o, o + le), l = /\s*$/.exec(i)[0].length, a = /^\s*/.exec(s)[0].length, c = i.length - l;
32
+ const ae = 50;
33
+ function Br(t, { open: e, close: r }, n, o) {
34
+ let i = t.sliceDoc(n - ae, n), s = t.sliceDoc(o, o + ae), l = /\s*$/.exec(i)[0].length, a = /^\s*/.exec(s)[0].length, c = i.length - l;
35
35
  if (i.slice(c - e.length, c) == e && s.slice(a, a + r.length) == r)
36
36
  return {
37
37
  open: { pos: n - l, margin: l && 1 },
38
38
  close: { pos: o + a, margin: a && 1 }
39
39
  };
40
40
  let h, u;
41
- o - n <= 2 * le ? h = u = t.sliceDoc(n, o) : (h = t.sliceDoc(n, n + le), u = t.sliceDoc(o - le, o));
42
- let m = /^\s*/.exec(h)[0].length, x = /\s*$/.exec(u)[0].length, S = u.length - x - r.length;
43
- return h.slice(m, m + e.length) == e && u.slice(S, S + r.length) == r ? {
41
+ o - n <= 2 * ae ? h = u = t.sliceDoc(n, o) : (h = t.sliceDoc(n, n + ae), u = t.sliceDoc(o - ae, o));
42
+ let m = /^\s*/.exec(h)[0].length, x = /\s*$/.exec(u)[0].length, b = u.length - x - r.length;
43
+ return h.slice(m, m + e.length) == e && u.slice(b, b + r.length) == r ? {
44
44
  open: {
45
45
  pos: n + m + e.length,
46
46
  margin: /\s/.test(h.charAt(m + e.length)) ? 1 : 0
47
47
  },
48
48
  close: {
49
49
  pos: o - x - r.length,
50
- margin: /\s/.test(u.charAt(S - 1)) ? 1 : 0
50
+ margin: /\s/.test(u.charAt(b - 1)) ? 1 : 0
51
51
  }
52
52
  } : null;
53
53
  }
@@ -59,11 +59,11 @@ function Er(t) {
59
59
  }
60
60
  return e;
61
61
  }
62
- function Ht(t, e, r = e.selection.ranges) {
62
+ function Vt(t, e, r = e.selection.ranges) {
63
63
  let n = r.map((i) => rt(e, i.from).block);
64
64
  if (!n.every((i) => i))
65
65
  return null;
66
- let o = r.map((i, s) => Dr(e, n[s], i.from, i.to));
66
+ let o = r.map((i, s) => Br(e, n[s], i.from, i.to));
67
67
  if (t != 2 && !o.every((i) => i))
68
68
  return { changes: e.changes(r.map((i, s) => o[s] ? [] : [{ from: i.from, insert: n[s].open + " " }, { from: i.to, insert: " " + n[s].close }])) };
69
69
  if (t != 1 && o.some((i) => i)) {
@@ -86,8 +86,8 @@ function wr(t, e, r = e.selection.ranges) {
86
86
  let u = e.doc.lineAt(h);
87
87
  if (u.from > o && (i == s || s > u.from)) {
88
88
  o = u.from;
89
- let m = /^\s*/.exec(u.text)[0].length, x = m == u.length, S = u.text.slice(m, m + c.length) == c ? m : -1;
90
- m < u.text.length && m < a && (a = m), n.push({ line: u, comment: S, token: c, indent: m, empty: x, single: !1 });
89
+ let m = /^\s*/.exec(u.text)[0].length, x = m == u.length, b = u.text.slice(m, m + c.length) == c ? m : -1;
90
+ m < u.text.length && m < a && (a = m), n.push({ line: u, comment: b, token: c, indent: m, empty: x, single: !1 });
91
91
  }
92
92
  h = u.to + 1;
93
93
  }
@@ -114,7 +114,7 @@ function wr(t, e, r = e.selection.ranges) {
114
114
  }
115
115
  return null;
116
116
  }
117
- const Ke = /* @__PURE__ */ Xe.define(), Rr = /* @__PURE__ */ Xe.define(), Tr = /* @__PURE__ */ ue.define(), Vt = /* @__PURE__ */ ue.define({
117
+ const Ke = /* @__PURE__ */ Xe.define(), Rr = /* @__PURE__ */ Xe.define(), Tr = /* @__PURE__ */ fe.define(), Ht = /* @__PURE__ */ fe.define({
118
118
  combine(t) {
119
119
  return Ee(t, {
120
120
  minDepth: 100,
@@ -131,15 +131,15 @@ function Or(t) {
131
131
  let e = 0;
132
132
  return t.iterChangedRanges((r, n) => e = n), e;
133
133
  }
134
- const zt = /* @__PURE__ */ we.define({
134
+ const Ut = /* @__PURE__ */ we.define({
135
135
  create() {
136
- return T.empty;
136
+ return O.empty;
137
137
  },
138
138
  update(t, e) {
139
- let r = e.state.facet(Vt), n = e.annotation(Ke);
139
+ let r = e.state.facet(Ht), n = e.annotation(Ke);
140
140
  if (n) {
141
141
  let a = e.docChanged ? d.single(Or(e.changes)) : void 0, c = C.fromTransaction(e, a), h = n.side, u = h == 0 ? t.undone : t.done;
142
- return c ? u = Ce(u, u.length, r.minDepth, c) : u = Gt(u, e.startState.selection), new T(h == 0 ? n.rest : u, h == 0 ? u : n.rest);
142
+ return c ? u = Ce(u, u.length, r.minDepth, c) : u = Gt(u, e.startState.selection), new O(h == 0 ? n.rest : u, h == 0 ? u : n.rest);
143
143
  }
144
144
  let o = e.annotation(Rr);
145
145
  if ((o == "full" || o == "before") && (t = t.isolate()), e.annotation(qe.addToHistory) === !1)
@@ -151,16 +151,16 @@ const zt = /* @__PURE__ */ we.define({
151
151
  return { done: t.done.map((e) => e.toJSON()), undone: t.undone.map((e) => e.toJSON()) };
152
152
  },
153
153
  fromJSON(t) {
154
- return new T(t.done.map(C.fromJSON), t.undone.map(C.fromJSON));
154
+ return new O(t.done.map(C.fromJSON), t.undone.map(C.fromJSON));
155
155
  }
156
156
  });
157
157
  function Ir(t = {}) {
158
158
  return [
159
- zt,
160
- Vt.of(t),
159
+ Ut,
160
+ Ht.of(t),
161
161
  p.domEventHandlers({
162
162
  beforeinput(e, r) {
163
- let n = e.inputType == "historyUndo" ? Ut : e.inputType == "historyRedo" ? Je : null;
163
+ let n = e.inputType == "historyUndo" ? zt : e.inputType == "historyRedo" ? Je : null;
164
164
  return n ? (e.preventDefault(), n(r)) : !1;
165
165
  }
166
166
  })
@@ -170,14 +170,14 @@ function Re(t, e) {
170
170
  return function({ state: r, dispatch: n }) {
171
171
  if (!e && r.readOnly)
172
172
  return !1;
173
- let o = r.field(zt, !1);
173
+ let o = r.field(Ut, !1);
174
174
  if (!o)
175
175
  return !1;
176
176
  let i = o.pop(t, r, e);
177
177
  return i ? (n(i), !0) : !1;
178
178
  };
179
179
  }
180
- const Ut = /* @__PURE__ */ Re(0, !1), Je = /* @__PURE__ */ Re(1, !1), Pr = /* @__PURE__ */ Re(0, !0), Wr = /* @__PURE__ */ Re(1, !0);
180
+ const zt = /* @__PURE__ */ Re(0, !1), Je = /* @__PURE__ */ Re(1, !1), Pr = /* @__PURE__ */ Re(0, !0), Wr = /* @__PURE__ */ Re(1, !0);
181
181
  class C {
182
182
  constructor(e, r, n, o, i) {
183
183
  this.changes = e, this.effects = r, this.mapped = n, this.startSelection = o, this.selectionsAfter = i;
@@ -201,15 +201,15 @@ class C {
201
201
  // transaction needs to be converted to an item. Returns null when
202
202
  // there are no changes or effects in the transaction.
203
203
  static fromTransaction(e, r) {
204
- let n = L;
204
+ let n = D;
205
205
  for (let o of e.startState.facet(Tr)) {
206
206
  let i = o(e);
207
207
  i.length && (n = n.concat(i));
208
208
  }
209
- return !n.length && e.changes.empty ? null : new C(e.changes.invert(e.startState.doc), n, void 0, r || e.startState.selection, L);
209
+ return !n.length && e.changes.empty ? null : new C(e.changes.invert(e.startState.doc), n, void 0, r || e.startState.selection, D);
210
210
  }
211
211
  static selection(e) {
212
- return new C(void 0, L, void 0, void 0, e);
212
+ return new C(void 0, D, void 0, void 0, e);
213
213
  }
214
214
  }
215
215
  function Ce(t, e, r, n) {
@@ -231,7 +231,7 @@ function Nr(t, e) {
231
231
  function $t(t, e) {
232
232
  return t.length ? e.length ? t.concat(e) : t : e;
233
233
  }
234
- const L = [], qr = 200;
234
+ const D = [], qr = 200;
235
235
  function Gt(t, e) {
236
236
  if (t.length) {
237
237
  let r = t[t.length - 1], n = r.selectionsAfter.slice(Math.max(0, r.selectionsAfter.length - qr));
@@ -239,50 +239,50 @@ function Gt(t, e) {
239
239
  } else
240
240
  return [C.selection([e])];
241
241
  }
242
- function Hr(t) {
242
+ function Vr(t) {
243
243
  let e = t[t.length - 1], r = t.slice();
244
244
  return r[t.length - 1] = e.setSelAfter(e.selectionsAfter.slice(0, e.selectionsAfter.length - 1)), r;
245
245
  }
246
- function He(t, e) {
246
+ function Ve(t, e) {
247
247
  if (!t.length)
248
248
  return t;
249
- let r = t.length, n = L;
249
+ let r = t.length, n = D;
250
250
  for (; r; ) {
251
- let o = Vr(t[r - 1], e, n);
251
+ let o = Hr(t[r - 1], e, n);
252
252
  if (o.changes && !o.changes.empty || o.effects.length) {
253
253
  let i = t.slice(0, r);
254
254
  return i[r - 1] = o, i;
255
255
  } else
256
256
  e = o.mapped, r--, n = o.selectionsAfter;
257
257
  }
258
- return n.length ? [C.selection(n)] : L;
258
+ return n.length ? [C.selection(n)] : D;
259
259
  }
260
- function Vr(t, e, r) {
261
- let n = $t(t.selectionsAfter.length ? t.selectionsAfter.map((l) => l.map(e)) : L, r);
260
+ function Hr(t, e, r) {
261
+ let n = $t(t.selectionsAfter.length ? t.selectionsAfter.map((l) => l.map(e)) : D, r);
262
262
  if (!t.changes)
263
263
  return C.selection(n);
264
264
  let o = t.changes.map(e), i = e.mapDesc(t.changes, !0), s = t.mapped ? t.mapped.composeDesc(i) : i;
265
265
  return new C(o, w.mapEffects(t.effects, e), s, t.startSelection.map(i), n);
266
266
  }
267
- const zr = /^(input\.type|delete)($|\.)/;
268
- class T {
267
+ const Ur = /^(input\.type|delete)($|\.)/;
268
+ class O {
269
269
  constructor(e, r, n = 0, o = void 0) {
270
270
  this.done = e, this.undone = r, this.prevTime = n, this.prevUserEvent = o;
271
271
  }
272
272
  isolate() {
273
- return this.prevTime ? new T(this.done, this.undone) : this;
273
+ return this.prevTime ? new O(this.done, this.undone) : this;
274
274
  }
275
275
  addChanges(e, r, n, o, i) {
276
276
  let s = this.done, l = s[s.length - 1];
277
- return l && l.changes && !l.changes.empty && e.changes && (!n || zr.test(n)) && (!l.selectionsAfter.length && r - this.prevTime < o.newGroupDelay && o.joinToEvent(i, Fr(l.changes, e.changes)) || // For compose (but not compose.start) events, always join with previous event
278
- n == "input.type.compose") ? s = Ce(s, s.length - 1, o.minDepth, new C(e.changes.compose(l.changes), $t(e.effects, l.effects), l.mapped, l.startSelection, L)) : s = Ce(s, s.length, o.minDepth, e), new T(s, L, r, n);
277
+ return l && l.changes && !l.changes.empty && e.changes && (!n || Ur.test(n)) && (!l.selectionsAfter.length && r - this.prevTime < o.newGroupDelay && o.joinToEvent(i, Fr(l.changes, e.changes)) || // For compose (but not compose.start) events, always join with previous event
278
+ n == "input.type.compose") ? s = Ce(s, s.length - 1, o.minDepth, new C(e.changes.compose(l.changes), $t(e.effects, l.effects), l.mapped, l.startSelection, D)) : s = Ce(s, s.length, o.minDepth, e), new O(s, D, r, n);
279
279
  }
280
280
  addSelection(e, r, n, o) {
281
- let i = this.done.length ? this.done[this.done.length - 1].selectionsAfter : L;
282
- return i.length > 0 && r - this.prevTime < o && n == this.prevUserEvent && n && /^select($|\.)/.test(n) && Nr(i[i.length - 1], e) ? this : new T(Gt(this.done, e), this.undone, r, n);
281
+ let i = this.done.length ? this.done[this.done.length - 1].selectionsAfter : D;
282
+ return i.length > 0 && r - this.prevTime < o && n == this.prevUserEvent && n && /^select($|\.)/.test(n) && Nr(i[i.length - 1], e) ? this : new O(Gt(this.done, e), this.undone, r, n);
283
283
  }
284
284
  addMapping(e) {
285
- return new T(He(this.done, e), He(this.undone, e), this.prevTime, this.prevUserEvent);
285
+ return new O(Ve(this.done, e), Ve(this.undone, e), this.prevTime, this.prevUserEvent);
286
286
  }
287
287
  pop(e, r, n) {
288
288
  let o = e == 0 ? this.done : this.undone;
@@ -292,13 +292,13 @@ class T {
292
292
  if (n && i.selectionsAfter.length)
293
293
  return r.update({
294
294
  selection: i.selectionsAfter[i.selectionsAfter.length - 1],
295
- annotations: Ke.of({ side: e, rest: Hr(o) }),
295
+ annotations: Ke.of({ side: e, rest: Vr(o) }),
296
296
  userEvent: e == 0 ? "select.undo" : "select.redo",
297
297
  scrollIntoView: !0
298
298
  });
299
299
  if (i.changes) {
300
- let s = o.length == 1 ? L : o.slice(0, o.length - 1);
301
- return i.mapped && (s = He(s, i.mapped)), r.update({
300
+ let s = o.length == 1 ? D : o.slice(0, o.length - 1);
301
+ return i.mapped && (s = Ve(s, i.mapped)), r.update({
302
302
  changes: i.changes,
303
303
  selection: i.startSelection,
304
304
  effects: i.effects,
@@ -311,9 +311,9 @@ class T {
311
311
  return null;
312
312
  }
313
313
  }
314
- T.empty = /* @__PURE__ */ new T(L, L);
315
- const Ur = [
316
- { key: "Mod-z", run: Ut, preventDefault: !0 },
314
+ O.empty = /* @__PURE__ */ new O(D, D);
315
+ const zr = [
316
+ { key: "Mod-z", run: zt, preventDefault: !0 },
317
317
  { key: "Mod-y", mac: "Mod-Shift-z", run: Je, preventDefault: !0 },
318
318
  { linux: "Ctrl-Shift-z", run: Je, preventDefault: !0 },
319
319
  { key: "Mod-u", run: Pr, preventDefault: !0 },
@@ -322,12 +322,12 @@ const Ur = [
322
322
  function re(t, e) {
323
323
  return d.create(t.ranges.map(e), t.mainIndex);
324
324
  }
325
- function O(t, e) {
325
+ function I(t, e) {
326
326
  return t.update({ selection: e, scrollIntoView: !0, userEvent: "select" });
327
327
  }
328
328
  function R({ state: t, dispatch: e }, r) {
329
329
  let n = re(t.selection, r);
330
- return n.eq(t.selection) ? !1 : (e(O(t, n)), !0);
330
+ return n.eq(t.selection) ? !1 : (e(I(t, n)), !0);
331
331
  }
332
332
  function Te(t, e) {
333
333
  return d.cursor(e ? t.to : t.from);
@@ -335,14 +335,14 @@ function Te(t, e) {
335
335
  function Kt(t, e) {
336
336
  return R(t, (r) => r.empty ? t.moveByChar(r, e) : Te(r, e));
337
337
  }
338
- function b(t) {
338
+ function S(t) {
339
339
  return t.textDirectionAt(t.state.selection.main.head) == Qn.LTR;
340
340
  }
341
- const Jt = (t) => Kt(t, !b(t)), _t = (t) => Kt(t, b(t));
341
+ const Jt = (t) => Kt(t, !S(t)), _t = (t) => Kt(t, S(t));
342
342
  function jt(t, e) {
343
343
  return R(t, (r) => r.empty ? t.moveByGroup(r, e) : Te(r, e));
344
344
  }
345
- const $r = (t) => jt(t, !b(t)), Gr = (t) => jt(t, b(t));
345
+ const $r = (t) => jt(t, !S(t)), Gr = (t) => jt(t, S(t));
346
346
  function Kr(t, e, r) {
347
347
  if (e.type.prop(r))
348
348
  return !0;
@@ -360,7 +360,7 @@ function Oe(t, e, r) {
360
360
  let i = n.type.prop(o), s, l;
361
361
  return i && (s = r ? Z(t, n.from, 1) : Z(t, n.to, -1)) && s.matched ? l = r ? s.end.to : s.end.from : l = r ? n.to : n.from, d.cursor(l, r ? -1 : 1);
362
362
  }
363
- const Jr = (t) => R(t, (e) => Oe(t.state, e, !b(t))), _r = (t) => R(t, (e) => Oe(t.state, e, b(t)));
363
+ const Jr = (t) => R(t, (e) => Oe(t.state, e, !S(t))), _r = (t) => R(t, (e) => Oe(t.state, e, S(t)));
364
364
  function Qt(t, e) {
365
365
  return R(t, (r) => {
366
366
  if (!r.empty)
@@ -396,10 +396,10 @@ function en(t, e) {
396
396
  let s = t.coordsAtPos(n.selection.main.head), l = t.scrollDOM.getBoundingClientRect(), a = l.top + r.marginTop, c = l.bottom - r.marginBottom;
397
397
  s && s.top > a && s.bottom < c && (i = p.scrollIntoView(o.main.head, { y: "start", yMargin: s.top - a }));
398
398
  }
399
- return t.dispatch(O(n, o), { effects: i }), !0;
399
+ return t.dispatch(I(n, o), { effects: i }), !0;
400
400
  }
401
401
  const ht = (t) => en(t, !1), _e = (t) => en(t, !0);
402
- function N(t, e, r) {
402
+ function q(t, e, r) {
403
403
  let n = t.lineBlockAt(e.head), o = t.moveToLineBoundary(e, r);
404
404
  if (o.head == e.head && o.head != (r ? n.to : n.from) && (o = t.moveToLineBoundary(e, r, !1)), !r && o.head == n.from && n.length) {
405
405
  let i = /^\s*/.exec(t.state.sliceDoc(n.from, Math.min(n.from + 100, n.to)))[0].length;
@@ -407,7 +407,7 @@ function N(t, e, r) {
407
407
  }
408
408
  return o;
409
409
  }
410
- const jr = (t) => R(t, (e) => N(t, e, !0)), Qr = (t) => R(t, (e) => N(t, e, !1)), Yr = (t) => R(t, (e) => N(t, e, !b(t))), Zr = (t) => R(t, (e) => N(t, e, b(t))), Xr = (t) => R(t, (e) => d.cursor(t.lineBlockAt(e.head).from, 1)), eo = (t) => R(t, (e) => d.cursor(t.lineBlockAt(e.head).to, -1));
410
+ const jr = (t) => R(t, (e) => q(t, e, !0)), Qr = (t) => R(t, (e) => q(t, e, !1)), Yr = (t) => R(t, (e) => q(t, e, !S(t))), Zr = (t) => R(t, (e) => q(t, e, S(t))), Xr = (t) => R(t, (e) => d.cursor(t.lineBlockAt(e.head).from, 1)), eo = (t) => R(t, (e) => d.cursor(t.lineBlockAt(e.head).to, -1));
411
411
  function to(t, e, r) {
412
412
  let n = !1, o = re(t.selection, (i) => {
413
413
  let s = Z(t, i.head, -1) || Z(t, i.head, 1) || i.head > 0 && Z(t, i.head - 1, 1) || i.head < t.doc.length && Z(t, i.head + 1, -1);
@@ -417,7 +417,7 @@ function to(t, e, r) {
417
417
  let l = s.start.from == i.head ? s.end.to : s.end.from;
418
418
  return r ? d.range(i.anchor, l) : d.cursor(l);
419
419
  });
420
- return n ? (e(O(t, o)), !0) : !1;
420
+ return n ? (e(I(t, o)), !0) : !1;
421
421
  }
422
422
  const no = ({ state: t, dispatch: e }) => to(t, e, !1);
423
423
  function B(t, e) {
@@ -425,16 +425,16 @@ function B(t, e) {
425
425
  let o = e(n);
426
426
  return d.range(n.anchor, o.head, o.goalColumn, o.bidiLevel || void 0);
427
427
  });
428
- return r.eq(t.state.selection) ? !1 : (t.dispatch(O(t.state, r)), !0);
428
+ return r.eq(t.state.selection) ? !1 : (t.dispatch(I(t.state, r)), !0);
429
429
  }
430
430
  function tn(t, e) {
431
431
  return B(t, (r) => t.moveByChar(r, e));
432
432
  }
433
- const nn = (t) => tn(t, !b(t)), rn = (t) => tn(t, b(t));
433
+ const nn = (t) => tn(t, !S(t)), rn = (t) => tn(t, S(t));
434
434
  function on(t, e) {
435
435
  return B(t, (r) => t.moveByGroup(r, e));
436
436
  }
437
- const ro = (t) => on(t, !b(t)), oo = (t) => on(t, b(t)), io = (t) => B(t, (e) => Oe(t.state, e, !b(t))), so = (t) => B(t, (e) => Oe(t.state, e, b(t)));
437
+ const ro = (t) => on(t, !S(t)), oo = (t) => on(t, S(t)), io = (t) => B(t, (e) => Oe(t.state, e, !S(t))), so = (t) => B(t, (e) => Oe(t.state, e, S(t)));
438
438
  function sn(t, e) {
439
439
  return B(t, (r) => t.moveVertically(r, e));
440
440
  }
@@ -442,7 +442,7 @@ const ln = (t) => sn(t, !1), an = (t) => sn(t, !0);
442
442
  function cn(t, e) {
443
443
  return B(t, (r) => t.moveVertically(r, e, Xt(t).height));
444
444
  }
445
- const ut = (t) => cn(t, !1), ft = (t) => cn(t, !0), lo = (t) => B(t, (e) => N(t, e, !0)), ao = (t) => B(t, (e) => N(t, e, !1)), co = (t) => B(t, (e) => N(t, e, !b(t))), ho = (t) => B(t, (e) => N(t, e, b(t))), uo = (t) => B(t, (e) => d.cursor(t.lineBlockAt(e.head).from)), fo = (t) => B(t, (e) => d.cursor(t.lineBlockAt(e.head).to)), dt = ({ state: t, dispatch: e }) => (e(O(t, { anchor: 0 })), !0), mt = ({ state: t, dispatch: e }) => (e(O(t, { anchor: t.doc.length })), !0), gt = ({ state: t, dispatch: e }) => (e(O(t, { anchor: t.selection.main.anchor, head: 0 })), !0), pt = ({ state: t, dispatch: e }) => (e(O(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), mo = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), go = ({ state: t, dispatch: e }) => {
445
+ const ut = (t) => cn(t, !1), ft = (t) => cn(t, !0), lo = (t) => B(t, (e) => q(t, e, !0)), ao = (t) => B(t, (e) => q(t, e, !1)), co = (t) => B(t, (e) => q(t, e, !S(t))), ho = (t) => B(t, (e) => q(t, e, S(t))), uo = (t) => B(t, (e) => d.cursor(t.lineBlockAt(e.head).from)), fo = (t) => B(t, (e) => d.cursor(t.lineBlockAt(e.head).to)), dt = ({ state: t, dispatch: e }) => (e(I(t, { anchor: 0 })), !0), mt = ({ state: t, dispatch: e }) => (e(I(t, { anchor: t.doc.length })), !0), gt = ({ state: t, dispatch: e }) => (e(I(t, { anchor: t.selection.main.anchor, head: 0 })), !0), pt = ({ state: t, dispatch: e }) => (e(I(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), mo = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), go = ({ state: t, dispatch: e }) => {
446
446
  let r = Pe(t).map(({ from: n, to: o }) => d.range(n, Math.min(o + 1, t.doc.length)));
447
447
  return e(t.update({ selection: d.create(r), userEvent: "select" })), !0;
448
448
  }, po = ({ state: t, dispatch: e }) => {
@@ -453,10 +453,10 @@ const ut = (t) => cn(t, !1), ft = (t) => cn(t, !0), lo = (t) => B(t, (e) => N(t,
453
453
  i = i.parent;
454
454
  return d.range(i.to, i.from);
455
455
  });
456
- return e(O(t, r)), !0;
456
+ return e(I(t, r)), !0;
457
457
  }, yo = ({ state: t, dispatch: e }) => {
458
458
  let r = t.selection, n = null;
459
- return r.ranges.length > 1 ? n = d.create([r.main]) : r.main.empty || (n = d.create([d.cursor(r.main.head)])), n ? (e(O(t, n)), !0) : !1;
459
+ return r.ranges.length > 1 ? n = d.create([r.main]) : r.main.empty || (n = d.create([d.cursor(r.main.head)])), n ? (e(I(t, n)), !0) : !1;
460
460
  };
461
461
  function Ie(t, e) {
462
462
  if (t.state.readOnly)
@@ -590,19 +590,19 @@ const Ao = ({ state: t, dispatch: e }) => pn(t, e, !1), Mo = ({ state: t, dispat
590
590
  let { state: e } = t, r = e.changes(Pe(e).map(({ from: o, to: i }) => (o > 0 ? o-- : i < e.doc.length && i++, { from: o, to: i }))), n = re(e.selection, (o) => t.moveVertically(o, !0)).map(r);
591
591
  return t.dispatch({ changes: r, selection: n, scrollIntoView: !0, userEvent: "delete.line" }), !0;
592
592
  };
593
- function Bo(t, e) {
593
+ function Do(t, e) {
594
594
  if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1)))
595
595
  return { from: e, to: e };
596
596
  let r = et(t).resolveInner(e), n = r.childBefore(e), o = r.childAfter(e), i;
597
597
  return n && o && n.to <= e && o.from >= e && (i = n.type.prop(Ge.closedBy)) && i.indexOf(o.name) > -1 && t.doc.lineAt(n.to).from == t.doc.lineAt(o.from).from ? { from: n.to, to: o.from } : null;
598
598
  }
599
- const Do = /* @__PURE__ */ yn(!1), Eo = /* @__PURE__ */ yn(!0);
599
+ const Bo = /* @__PURE__ */ yn(!1), Eo = /* @__PURE__ */ yn(!0);
600
600
  function yn(t) {
601
601
  return ({ state: e, dispatch: r }) => {
602
602
  if (e.readOnly)
603
603
  return !1;
604
604
  let n = e.changeByRange((o) => {
605
- let { from: i, to: s } = o, l = e.doc.lineAt(i), a = !t && i == s && Bo(e, i);
605
+ let { from: i, to: s } = o, l = e.doc.lineAt(i), a = !t && i == s && Do(e, i);
606
606
  t && (i = s = (s <= l.to ? l : e.doc.lineAt(s)).to);
607
607
  let c = new Tt(e, { simulateBreak: i, simulateDoubleBreak: !!a }), h = Ot(c, i);
608
608
  for (h == null && (h = /^\s*/.exec(e.doc.lineAt(i).text)[0].length); s < l.to && /\s/.test(l.text[s - l.from]); )
@@ -690,7 +690,7 @@ const wo = ({ state: t, dispatch: e }) => {
690
690
  { key: "Mod-Home", run: dt, shift: gt },
691
691
  { key: "End", run: jr, shift: lo, preventDefault: !0 },
692
692
  { key: "Mod-End", run: mt, shift: pt },
693
- { key: "Enter", run: Do },
693
+ { key: "Enter", run: Bo },
694
694
  { key: "Mod-a", run: mo },
695
695
  { key: "Backspace", run: je, shift: je },
696
696
  { key: "Delete", run: un },
@@ -857,7 +857,7 @@ class Cn {
857
857
  }
858
858
  }
859
859
  }
860
- const Ve = /* @__PURE__ */ new WeakMap();
860
+ const He = /* @__PURE__ */ new WeakMap();
861
861
  class X {
862
862
  constructor(e, r) {
863
863
  this.from = e, this.text = r;
@@ -866,15 +866,15 @@ class X {
866
866
  return this.from + this.text.length;
867
867
  }
868
868
  static get(e, r, n) {
869
- let o = Ve.get(e);
869
+ let o = He.get(e);
870
870
  if (!o || o.from >= n || o.to <= r) {
871
871
  let l = new X(r, e.sliceString(r, n));
872
- return Ve.set(e, l), l;
872
+ return He.set(e, l), l;
873
873
  }
874
874
  if (o.from == r && o.to == n)
875
875
  return o;
876
876
  let { text: i, from: s } = o;
877
- return s > r && (i = e.sliceString(r, s) + i, s = r), o.to < n && (i += e.sliceString(o.to, n)), Ve.set(e, new X(s, i)), new X(r, i.slice(r - s, n - s));
877
+ return s > r && (i = e.sliceString(r, s) + i, s = r), o.to < n && (i += e.sliceString(o.to, n)), He.set(e, new X(s, i)), new X(r, i.slice(r - s, n - s));
878
878
  }
879
879
  }
880
880
  class vn {
@@ -935,14 +935,14 @@ function Qe(t) {
935
935
  return;
936
936
  let { state: i } = t, s = i.doc.lineAt(i.selection.main.head), [, l, a, c, h] = o, u = c ? +c.slice(1) : 0, m = a ? +a : s.number;
937
937
  if (a && h) {
938
- let D = m / 100;
939
- l && (D = D * (l == "-" ? -1 : 1) + s.number / i.doc.lines), m = Math.round(i.doc.lines * D);
938
+ let T = m / 100;
939
+ l && (T = T * (l == "-" ? -1 : 1) + s.number / i.doc.lines), m = Math.round(i.doc.lines * T);
940
940
  } else
941
941
  a && l && (m = m * (l == "-" ? -1 : 1) + s.number);
942
- let x = i.doc.line(Math.max(1, Math.min(i.doc.lines, m))), S = d.cursor(x.from + Math.max(0, Math.min(u, x.length)));
942
+ let x = i.doc.line(Math.max(1, Math.min(i.doc.lines, m))), b = d.cursor(x.from + Math.max(0, Math.min(u, x.length)));
943
943
  t.dispatch({
944
- effects: [Ae.of(!1), p.scrollIntoView(S.from, { y: "center" })],
945
- selection: S
944
+ effects: [Ae.of(!1), p.scrollIntoView(b.from, { y: "center" })],
945
+ selection: b
946
946
  }), t.focus();
947
947
  }
948
948
  return { dom: r };
@@ -958,10 +958,10 @@ const Ae = /* @__PURE__ */ w.define(), xt = /* @__PURE__ */ we.define({
958
958
  },
959
959
  provide: (t) => tt.from(t, (e) => e ? Qe : null)
960
960
  }), Wo = (t) => {
961
- let e = ae(t, Qe);
961
+ let e = ce(t, Qe);
962
962
  if (!e) {
963
963
  let r = [Ae.of(!0)];
964
- t.state.field(xt, !1) == null && r.push(w.appendConfig.of([xt, Fo])), t.dispatch({ effects: r }), e = ae(t, Qe);
964
+ t.state.field(xt, !1) == null && r.push(w.appendConfig.of([xt, Fo])), t.dispatch({ effects: r }), e = ce(t, Qe);
965
965
  }
966
966
  return e && e.dom.querySelector("input").focus(), !0;
967
967
  }, Fo = /* @__PURE__ */ p.baseTheme({
@@ -974,7 +974,7 @@ const Ae = /* @__PURE__ */ w.define(), xt = /* @__PURE__ */ we.define({
974
974
  minSelectionLength: 1,
975
975
  maxMatches: 100,
976
976
  wholeWords: !1
977
- }, An = /* @__PURE__ */ ue.define({
977
+ }, An = /* @__PURE__ */ fe.define({
978
978
  combine(t) {
979
979
  return Ee(t, No, {
980
980
  highlightWordAroundCursor: (e, r) => e || r,
@@ -984,17 +984,17 @@ const Ae = /* @__PURE__ */ w.define(), xt = /* @__PURE__ */ we.define({
984
984
  }
985
985
  });
986
986
  function qo(t) {
987
- let e = [$o, Uo];
987
+ let e = [$o, zo];
988
988
  return t && e.push(An.of(t)), e;
989
989
  }
990
- const Ho = /* @__PURE__ */ y.mark({ class: "cm-selectionMatch" }), Vo = /* @__PURE__ */ y.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
990
+ const Vo = /* @__PURE__ */ y.mark({ class: "cm-selectionMatch" }), Ho = /* @__PURE__ */ y.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
991
991
  function kt(t, e, r, n) {
992
- return (r == 0 || t(e.sliceDoc(r - 1, r)) != M.Word) && (n == e.doc.length || t(e.sliceDoc(n, n + 1)) != M.Word);
992
+ return (r == 0 || t(e.sliceDoc(r - 1, r)) != L.Word) && (n == e.doc.length || t(e.sliceDoc(n, n + 1)) != L.Word);
993
993
  }
994
- function zo(t, e, r, n) {
995
- return t(e.sliceDoc(r, r + 1)) == M.Word && t(e.sliceDoc(n - 1, n)) == M.Word;
994
+ function Uo(t, e, r, n) {
995
+ return t(e.sliceDoc(r, r + 1)) == L.Word && t(e.sliceDoc(n - 1, n)) == L.Word;
996
996
  }
997
- const Uo = /* @__PURE__ */ Ft.fromClass(class {
997
+ const zo = /* @__PURE__ */ Ft.fromClass(class {
998
998
  constructor(t) {
999
999
  this.decorations = this.getDeco(t);
1000
1000
  }
@@ -1018,7 +1018,7 @@ const Uo = /* @__PURE__ */ Ft.fromClass(class {
1018
1018
  if (a < e.minSelectionLength || a > 200)
1019
1019
  return y.none;
1020
1020
  if (e.wholeWords) {
1021
- if (i = r.sliceDoc(o.from, o.to), s = r.charCategorizer(o.head), !(kt(s, r, o.from, o.to) && zo(s, r, o.from, o.to)))
1021
+ if (i = r.sliceDoc(o.from, o.to), s = r.charCategorizer(o.head), !(kt(s, r, o.from, o.to) && Uo(s, r, o.from, o.to)))
1022
1022
  return y.none;
1023
1023
  } else if (i = r.sliceDoc(o.from, o.to).trim(), !i)
1024
1024
  return y.none;
@@ -1028,7 +1028,7 @@ const Uo = /* @__PURE__ */ Ft.fromClass(class {
1028
1028
  let c = new te(r.doc, i, a.from, a.to);
1029
1029
  for (; !c.next().done; ) {
1030
1030
  let { from: h, to: u } = c.value;
1031
- if ((!s || kt(s, r, h, u)) && (o.empty && h <= o.from && u >= o.to ? l.push(Vo.range(h, u)) : (h >= o.to || u <= o.from) && l.push(Ho.range(h, u)), l.length > e.maxMatches))
1031
+ if ((!s || kt(s, r, h, u)) && (o.empty && h <= o.from && u >= o.to ? l.push(Ho.range(h, u)) : (h >= o.to || u <= o.from) && l.push(Vo.range(h, u)), l.length > e.maxMatches))
1032
1032
  return y.none;
1033
1033
  }
1034
1034
  }
@@ -1073,7 +1073,7 @@ const Jo = ({ state: t, dispatch: e }) => {
1073
1073
  selection: t.selection.addRange(d.range(o.from, o.to), !1),
1074
1074
  effects: p.scrollIntoView(o.to)
1075
1075
  })), !0) : !1;
1076
- }, oe = /* @__PURE__ */ ue.define({
1076
+ }, oe = /* @__PURE__ */ fe.define({
1077
1077
  combine(t) {
1078
1078
  return Ee(t, {
1079
1079
  top: !1,
@@ -1117,7 +1117,7 @@ class Mn {
1117
1117
  range in the given state.
1118
1118
  */
1119
1119
  getCursor(e, r = 0, n) {
1120
- let o = e.doc ? e : ce.create({ doc: e });
1120
+ let o = e.doc ? e : he.create({ doc: e });
1121
1121
  return n == null && (n = o.doc.length), this.regexp ? Y(this, o, r, n) : Q(this, o, r, n);
1122
1122
  }
1123
1123
  }
@@ -1130,7 +1130,7 @@ function Q(t, e, r, n) {
1130
1130
  return new te(e.doc, t.unquoted, r, n, t.caseSensitive ? void 0 : (o) => o.toLowerCase(), t.wholeWord ? _o(e.doc, e.charCategorizer(e.selection.main.head)) : void 0);
1131
1131
  }
1132
1132
  function _o(t, e) {
1133
- return (r, n, o, i) => ((i > r || i + o.length < n) && (i = Math.max(0, r - 2), o = t.sliceString(i, Math.min(t.length, n + 2))), (e(Me(o, r - i)) != M.Word || e(Le(o, r - i)) != M.Word) && (e(Le(o, n - i)) != M.Word || e(Me(o, n - i)) != M.Word));
1133
+ return (r, n, o, i) => ((i > r || i + o.length < n) && (i = Math.max(0, r - 2), o = t.sliceString(i, Math.min(t.length, n + 2))), (e(Me(o, r - i)) != L.Word || e(Le(o, r - i)) != L.Word) && (e(Le(o, n - i)) != L.Word || e(Me(o, n - i)) != L.Word));
1134
1134
  }
1135
1135
  class jo extends Ln {
1136
1136
  constructor(e) {
@@ -1188,7 +1188,7 @@ function Le(t, e) {
1188
1188
  return t.slice(e, ee(t, e));
1189
1189
  }
1190
1190
  function Qo(t) {
1191
- return (e, r, n) => !n[0].length || (t(Me(n.input, n.index)) != M.Word || t(Le(n.input, n.index)) != M.Word) && (t(Le(n.input, n.index + n[0].length)) != M.Word || t(Me(n.input, n.index + n[0].length)) != M.Word);
1191
+ return (e, r, n) => !n[0].length || (t(Me(n.input, n.index)) != L.Word || t(Le(n.input, n.index)) != L.Word) && (t(Le(n.input, n.index + n[0].length)) != L.Word || t(Me(n.input, n.index + n[0].length)) != L.Word);
1192
1192
  }
1193
1193
  class Yo extends Ln {
1194
1194
  nextMatch(e, r, n) {
@@ -1235,29 +1235,29 @@ class Yo extends Ln {
1235
1235
  o(i.value.from, i.value.to);
1236
1236
  }
1237
1237
  }
1238
- const he = /* @__PURE__ */ w.define(), st = /* @__PURE__ */ w.define(), F = /* @__PURE__ */ we.define({
1238
+ const ue = /* @__PURE__ */ w.define(), st = /* @__PURE__ */ w.define(), N = /* @__PURE__ */ we.define({
1239
1239
  create(t) {
1240
- return new ze(Ye(t).create(), null);
1240
+ return new Ue(Ye(t).create(), null);
1241
1241
  },
1242
1242
  update(t, e) {
1243
1243
  for (let r of e.effects)
1244
- r.is(he) ? t = new ze(r.value.create(), t.panel) : r.is(st) && (t = new ze(t.query, r.value ? lt : null));
1244
+ r.is(ue) ? t = new Ue(r.value.create(), t.panel) : r.is(st) && (t = new Ue(t.query, r.value ? lt : null));
1245
1245
  return t;
1246
1246
  },
1247
1247
  provide: (t) => tt.from(t, (e) => e.panel)
1248
1248
  });
1249
- class ze {
1249
+ class Ue {
1250
1250
  constructor(e, r) {
1251
1251
  this.query = e, this.panel = r;
1252
1252
  }
1253
1253
  }
1254
1254
  const Zo = /* @__PURE__ */ y.mark({ class: "cm-searchMatch" }), Xo = /* @__PURE__ */ y.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), ei = /* @__PURE__ */ Ft.fromClass(class {
1255
1255
  constructor(t) {
1256
- this.view = t, this.decorations = this.highlight(t.state.field(F));
1256
+ this.view = t, this.decorations = this.highlight(t.state.field(N));
1257
1257
  }
1258
1258
  update(t) {
1259
- let e = t.state.field(F);
1260
- (e != t.startState.field(F) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e));
1259
+ let e = t.state.field(N);
1260
+ (e != t.startState.field(N) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e));
1261
1261
  }
1262
1262
  highlight({ query: t, panel: e }) {
1263
1263
  if (!e || !t.spec.valid)
@@ -1277,13 +1277,13 @@ const Zo = /* @__PURE__ */ y.mark({ class: "cm-searchMatch" }), Xo = /* @__PURE_
1277
1277
  }, {
1278
1278
  decorations: (t) => t.decorations
1279
1279
  });
1280
- function fe(t) {
1280
+ function de(t) {
1281
1281
  return (e) => {
1282
- let r = e.state.field(F, !1);
1282
+ let r = e.state.field(N, !1);
1283
1283
  return r && r.query.spec.valid ? t(e, r) : En(e);
1284
1284
  };
1285
1285
  }
1286
- const Be = /* @__PURE__ */ fe((t, { query: e }) => {
1286
+ const De = /* @__PURE__ */ de((t, { query: e }) => {
1287
1287
  let { to: r } = t.state.selection.main, n = e.nextMatch(t.state, r, r);
1288
1288
  if (!n)
1289
1289
  return !1;
@@ -1292,8 +1292,8 @@ const Be = /* @__PURE__ */ fe((t, { query: e }) => {
1292
1292
  selection: o,
1293
1293
  effects: [at(t, n), i.scrollToMatch(o.main, t)],
1294
1294
  userEvent: "select.search"
1295
- }), Dn(t), !0;
1296
- }), De = /* @__PURE__ */ fe((t, { query: e }) => {
1295
+ }), Bn(t), !0;
1296
+ }), Be = /* @__PURE__ */ de((t, { query: e }) => {
1297
1297
  let { state: r } = t, { from: n } = r.selection.main, o = e.prevMatch(r, n, n);
1298
1298
  if (!o)
1299
1299
  return !1;
@@ -1302,8 +1302,8 @@ const Be = /* @__PURE__ */ fe((t, { query: e }) => {
1302
1302
  selection: i,
1303
1303
  effects: [at(t, o), s.scrollToMatch(i.main, t)],
1304
1304
  userEvent: "select.search"
1305
- }), Dn(t), !0;
1306
- }), ti = /* @__PURE__ */ fe((t, { query: e }) => {
1305
+ }), Bn(t), !0;
1306
+ }), ti = /* @__PURE__ */ de((t, { query: e }) => {
1307
1307
  let r = e.matchAll(t.state, 1e3);
1308
1308
  return !r || !r.length ? !1 : (t.dispatch({
1309
1309
  selection: d.create(r.map((n) => d.range(n.from, n.to))),
@@ -1323,7 +1323,7 @@ const Be = /* @__PURE__ */ fe((t, { query: e }) => {
1323
1323
  selection: d.create(i, s),
1324
1324
  userEvent: "select.search.matches"
1325
1325
  })), !0;
1326
- }, bt = /* @__PURE__ */ fe((t, { query: e }) => {
1326
+ }, bt = /* @__PURE__ */ de((t, { query: e }) => {
1327
1327
  let { state: r } = t, { from: n, to: o } = r.selection.main;
1328
1328
  if (r.readOnly)
1329
1329
  return !1;
@@ -1341,7 +1341,7 @@ const Be = /* @__PURE__ */ fe((t, { query: e }) => {
1341
1341
  effects: c,
1342
1342
  userEvent: "input.replace"
1343
1343
  }), !0;
1344
- }), ri = /* @__PURE__ */ fe((t, { query: e }) => {
1344
+ }), ri = /* @__PURE__ */ de((t, { query: e }) => {
1345
1345
  if (t.state.readOnly)
1346
1346
  return !1;
1347
1347
  let r = e.matchAll(t.state, 1e9).map((o) => {
@@ -1374,38 +1374,38 @@ function Ye(t, e) {
1374
1374
  wholeWord: (s = e == null ? void 0 : e.wholeWord) !== null && s !== void 0 ? s : c.wholeWord
1375
1375
  });
1376
1376
  }
1377
- function Bn(t) {
1378
- let e = ae(t, lt);
1377
+ function Dn(t) {
1378
+ let e = ce(t, lt);
1379
1379
  return e && e.dom.querySelector("[main-field]");
1380
1380
  }
1381
- function Dn(t) {
1382
- let e = Bn(t);
1381
+ function Bn(t) {
1382
+ let e = Dn(t);
1383
1383
  e && e == t.root.activeElement && e.select();
1384
1384
  }
1385
1385
  const En = (t) => {
1386
- let e = t.state.field(F, !1);
1386
+ let e = t.state.field(N, !1);
1387
1387
  if (e && e.panel) {
1388
- let r = Bn(t);
1388
+ let r = Dn(t);
1389
1389
  if (r && r != t.root.activeElement) {
1390
1390
  let n = Ye(t.state, e.query.spec);
1391
- n.valid && t.dispatch({ effects: he.of(n) }), r.focus(), r.select();
1391
+ n.valid && t.dispatch({ effects: ue.of(n) }), r.focus(), r.select();
1392
1392
  }
1393
1393
  } else
1394
1394
  t.dispatch({ effects: [
1395
1395
  st.of(!0),
1396
- e ? he.of(Ye(t.state, e.query.spec)) : w.appendConfig.of(li)
1396
+ e ? ue.of(Ye(t.state, e.query.spec)) : w.appendConfig.of(li)
1397
1397
  ] });
1398
1398
  return !0;
1399
1399
  }, wn = (t) => {
1400
- let e = t.state.field(F, !1);
1400
+ let e = t.state.field(N, !1);
1401
1401
  if (!e || !e.panel)
1402
1402
  return !1;
1403
- let r = ae(t, lt);
1403
+ let r = ce(t, lt);
1404
1404
  return r && r.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: st.of(!1) }), !0;
1405
1405
  }, oi = [
1406
1406
  { key: "Mod-f", run: En, scope: "editor search-panel" },
1407
- { key: "F3", run: Be, shift: De, scope: "editor search-panel", preventDefault: !0 },
1408
- { key: "Mod-g", run: Be, shift: De, scope: "editor search-panel", preventDefault: !0 },
1407
+ { key: "F3", run: De, shift: Be, scope: "editor search-panel", preventDefault: !0 },
1408
+ { key: "Mod-g", run: De, shift: Be, scope: "editor search-panel", preventDefault: !0 },
1409
1409
  { key: "Escape", run: wn, scope: "editor search-panel" },
1410
1410
  { key: "Mod-Shift-l", run: ni },
1411
1411
  { key: "Alt-g", run: Wo },
@@ -1414,11 +1414,11 @@ const En = (t) => {
1414
1414
  class ii {
1415
1415
  constructor(e) {
1416
1416
  this.view = e;
1417
- let r = this.query = e.state.field(F).query.spec;
1417
+ let r = this.query = e.state.field(N).query.spec;
1418
1418
  this.commit = this.commit.bind(this), this.searchField = g("input", {
1419
1419
  value: r.search,
1420
- placeholder: v(e, "Find"),
1421
- "aria-label": v(e, "Find"),
1420
+ placeholder: A(e, "Find"),
1421
+ "aria-label": A(e, "Find"),
1422
1422
  class: "cm-textfield",
1423
1423
  name: "search",
1424
1424
  form: "",
@@ -1427,8 +1427,8 @@ class ii {
1427
1427
  onkeyup: this.commit
1428
1428
  }), this.replaceField = g("input", {
1429
1429
  value: r.replace,
1430
- placeholder: v(e, "Replace"),
1431
- "aria-label": v(e, "Replace"),
1430
+ placeholder: A(e, "Replace"),
1431
+ "aria-label": A(e, "Replace"),
1432
1432
  class: "cm-textfield",
1433
1433
  name: "replace",
1434
1434
  form: "",
@@ -1458,22 +1458,22 @@ class ii {
1458
1458
  }
1459
1459
  this.dom = g("div", { onkeydown: (o) => this.keydown(o), class: "cm-search" }, [
1460
1460
  this.searchField,
1461
- n("next", () => Be(e), [v(e, "next")]),
1462
- n("prev", () => De(e), [v(e, "previous")]),
1463
- n("select", () => ti(e), [v(e, "all")]),
1464
- g("label", null, [this.caseField, v(e, "match case")]),
1465
- g("label", null, [this.reField, v(e, "regexp")]),
1466
- g("label", null, [this.wordField, v(e, "by word")]),
1461
+ n("next", () => De(e), [A(e, "next")]),
1462
+ n("prev", () => Be(e), [A(e, "previous")]),
1463
+ n("select", () => ti(e), [A(e, "all")]),
1464
+ g("label", null, [this.caseField, A(e, "match case")]),
1465
+ g("label", null, [this.reField, A(e, "regexp")]),
1466
+ g("label", null, [this.wordField, A(e, "by word")]),
1467
1467
  ...e.state.readOnly ? [] : [
1468
1468
  g("br"),
1469
1469
  this.replaceField,
1470
- n("replace", () => bt(e), [v(e, "replace")]),
1471
- n("replaceAll", () => ri(e), [v(e, "replace all")])
1470
+ n("replace", () => bt(e), [A(e, "replace")]),
1471
+ n("replaceAll", () => ri(e), [A(e, "replace all")])
1472
1472
  ],
1473
1473
  g("button", {
1474
1474
  name: "close",
1475
1475
  onclick: () => wn(e),
1476
- "aria-label": v(e, "close"),
1476
+ "aria-label": A(e, "close"),
1477
1477
  type: "button"
1478
1478
  }, ["×"])
1479
1479
  ]);
@@ -1486,15 +1486,15 @@ class ii {
1486
1486
  wholeWord: this.wordField.checked,
1487
1487
  replace: this.replaceField.value
1488
1488
  });
1489
- e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: he.of(e) }));
1489
+ e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: ue.of(e) }));
1490
1490
  }
1491
1491
  keydown(e) {
1492
- nr(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? De : Be)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), bt(this.view));
1492
+ nr(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? Be : De)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), bt(this.view));
1493
1493
  }
1494
1494
  update(e) {
1495
1495
  for (let r of e.transactions)
1496
1496
  for (let n of r.effects)
1497
- n.is(he) && !n.value.eq(this.query) && this.setQuery(n.value);
1497
+ n.is(ue) && !n.value.eq(this.query) && this.setQuery(n.value);
1498
1498
  }
1499
1499
  setQuery(e) {
1500
1500
  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;
@@ -1509,7 +1509,7 @@ class ii {
1509
1509
  return this.view.state.facet(oe).top;
1510
1510
  }
1511
1511
  }
1512
- function v(t, e) {
1512
+ function A(t, e) {
1513
1513
  return t.state.phrase(e);
1514
1514
  }
1515
1515
  const pe = 30, ye = /[\s\.,:;?!]/;
@@ -1561,7 +1561,7 @@ const si = /* @__PURE__ */ p.baseTheme({
1561
1561
  "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
1562
1562
  "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
1563
1563
  }), li = [
1564
- F,
1564
+ N,
1565
1565
  /* @__PURE__ */ Xn.lowest(ei),
1566
1566
  si
1567
1567
  ];
@@ -1570,7 +1570,7 @@ class ai {
1570
1570
  this.from = e, this.to = r, this.diagnostic = n;
1571
1571
  }
1572
1572
  }
1573
- class V {
1573
+ class z {
1574
1574
  constructor(e, r, n) {
1575
1575
  this.diagnostics = e, this.panel = r, this.selected = n;
1576
1576
  }
@@ -1584,7 +1584,7 @@ class V {
1584
1584
  attributes: { class: "cm-lintRange cm-lintRange-" + l.severity + (l.markClass ? " " + l.markClass : "") },
1585
1585
  diagnostic: l
1586
1586
  }).range(l.from, l.to)), !0);
1587
- return new V(s, r, ne(s));
1587
+ return new z(s, r, ne(s));
1588
1588
  }
1589
1589
  }
1590
1590
  function ne(t, e = null, r = 0) {
@@ -1599,11 +1599,11 @@ function ci(t, e) {
1599
1599
  return !!(t.effects.some((n) => n.is(Rn)) || t.changes.touchesRange(r.from, r.to));
1600
1600
  }
1601
1601
  function hi(t, e) {
1602
- return t.field(A, !1) ? e : e.concat(w.appendConfig.of(bi));
1602
+ return t.field(M, !1) ? e : e.concat(w.appendConfig.of(bi));
1603
1603
  }
1604
- const Rn = /* @__PURE__ */ w.define(), ct = /* @__PURE__ */ w.define(), Tn = /* @__PURE__ */ w.define(), A = /* @__PURE__ */ we.define({
1604
+ const Rn = /* @__PURE__ */ w.define(), ct = /* @__PURE__ */ w.define(), Tn = /* @__PURE__ */ w.define(), M = /* @__PURE__ */ we.define({
1605
1605
  create() {
1606
- return new V(y.none, null, null);
1606
+ return new z(y.none, null, null);
1607
1607
  },
1608
1608
  update(t, e) {
1609
1609
  if (e.docChanged) {
@@ -1612,10 +1612,10 @@ const Rn = /* @__PURE__ */ w.define(), ct = /* @__PURE__ */ w.define(), Tn = /*
1612
1612
  let o = e.changes.mapPos(t.selected.from, 1);
1613
1613
  n = ne(r, t.selected.diagnostic, o) || ne(r, null, o);
1614
1614
  }
1615
- t = new V(r, t.panel, n);
1615
+ t = new z(r, t.panel, n);
1616
1616
  }
1617
1617
  for (let r of e.effects)
1618
- r.is(Rn) ? t = V.init(r.value, t.panel, e.state) : r.is(ct) ? t = new V(t.diagnostics, r.value ? We.open : null, t.selected) : r.is(Tn) && (t = new V(t.diagnostics, t.panel, r.value));
1618
+ r.is(Rn) ? t = z.init(r.value, t.panel, e.state) : r.is(ct) ? t = new z(t.diagnostics, r.value ? We.open : null, t.selected) : r.is(Tn) && (t = new z(t.diagnostics, t.panel, r.value));
1619
1619
  return t;
1620
1620
  },
1621
1621
  provide: (t) => [
@@ -1624,7 +1624,7 @@ const Rn = /* @__PURE__ */ w.define(), ct = /* @__PURE__ */ w.define(), Tn = /*
1624
1624
  ]
1625
1625
  }), ui = /* @__PURE__ */ y.mark({ class: "cm-lintRange cm-lintRange-active" });
1626
1626
  function fi(t, e, r) {
1627
- let { diagnostics: n } = t.state.field(A), o = [], i = 2e8, s = 0;
1627
+ let { diagnostics: n } = t.state.field(M), o = [], i = 2e8, s = 0;
1628
1628
  n.between(e - (r < 0 ? 1 : 0), e + (r > 0 ? 1 : 0), (a, c, { spec: h }) => {
1629
1629
  e >= a && e <= c && (a == c || (e > a || r > 0) && (e < c || r < 0)) && (o.push(h.diagnostic), i = Math.min(a, i), s = Math.max(c, s));
1630
1630
  });
@@ -1642,15 +1642,15 @@ function di(t, e) {
1642
1642
  return g("ul", { class: "cm-tooltip-lint" }, e.map((r) => Pn(t, r, !1)));
1643
1643
  }
1644
1644
  const mi = (t) => {
1645
- let e = t.state.field(A, !1);
1645
+ let e = t.state.field(M, !1);
1646
1646
  (!e || !e.panel) && t.dispatch({ effects: hi(t.state, [ct.of(!0)]) });
1647
- let r = ae(t, We.open);
1647
+ let r = ce(t, We.open);
1648
1648
  return r && r.dom.querySelector(".cm-panel-lint ul").focus(), !0;
1649
1649
  }, St = (t) => {
1650
- let e = t.state.field(A, !1);
1650
+ let e = t.state.field(M, !1);
1651
1651
  return !e || !e.panel ? !1 : (t.dispatch({ effects: ct.of(!1) }), !0);
1652
1652
  }, gi = (t) => {
1653
- let e = t.state.field(A, !1);
1653
+ let e = t.state.field(M, !1);
1654
1654
  if (!e)
1655
1655
  return !1;
1656
1656
  let r = t.state.selection.main, n = e.diagnostics.iter(r.to + 1);
@@ -1658,7 +1658,7 @@ const mi = (t) => {
1658
1658
  }, pi = [
1659
1659
  { key: "Mod-Shift-m", run: mi, preventDefault: !0 },
1660
1660
  { key: "F8", run: gi }
1661
- ], On = /* @__PURE__ */ ue.define({
1661
+ ], On = /* @__PURE__ */ fe.define({
1662
1662
  combine(t) {
1663
1663
  return Object.assign({ sources: t.map((e) => e.source) }, Ee(t.map((e) => e.config), {
1664
1664
  delay: 750,
@@ -1694,7 +1694,7 @@ function Pn(t, e, r) {
1694
1694
  if (m.preventDefault(), l)
1695
1695
  return;
1696
1696
  l = !0;
1697
- let x = ne(t.state.field(A).diagnostics, e);
1697
+ let x = ne(t.state.field(M).diagnostics, e);
1698
1698
  x && i.apply(t, x.from, x.to);
1699
1699
  }, { name: c } = i, h = o[s] ? c.indexOf(o[s]) : -1, u = h < 0 ? c : [
1700
1700
  c.slice(0, h),
@@ -1746,7 +1746,7 @@ class We {
1746
1746
  let { diagnostic: i } = this.items[this.selectedIndex], s = In(i.actions);
1747
1747
  for (let l = 0; l < s.length; l++)
1748
1748
  if (s[l].toUpperCase().charCodeAt(0) == o.keyCode) {
1749
- let a = ne(this.view.state.field(A).diagnostics, i);
1749
+ let a = ne(this.view.state.field(M).diagnostics, i);
1750
1750
  a && i.actions[l].apply(e, a.from, a.to);
1751
1751
  }
1752
1752
  } else
@@ -1770,7 +1770,7 @@ class We {
1770
1770
  }, "×")), this.update();
1771
1771
  }
1772
1772
  get selectedIndex() {
1773
- let e = this.view.state.field(A).selected;
1773
+ let e = this.view.state.field(M).selected;
1774
1774
  if (!e)
1775
1775
  return -1;
1776
1776
  for (let r = 0; r < this.items.length; r++)
@@ -1779,7 +1779,7 @@ class We {
1779
1779
  return -1;
1780
1780
  }
1781
1781
  update() {
1782
- let { diagnostics: e, selected: r } = this.view.state.field(A), n = 0, o = !1, i = null;
1782
+ let { diagnostics: e, selected: r } = this.view.state.field(M), n = 0, o = !1, i = null;
1783
1783
  for (e.between(0, this.view.state.doc.length, (s, l, { spec: a }) => {
1784
1784
  let c = -1, h;
1785
1785
  for (let u = n; u < this.items.length; u++)
@@ -1822,7 +1822,7 @@ class We {
1822
1822
  moveSelection(e) {
1823
1823
  if (this.selectedIndex < 0)
1824
1824
  return;
1825
- let r = this.view.state.field(A), n = ne(r.diagnostics, this.items[e].diagnostic);
1825
+ let r = this.view.state.field(M), n = ne(r.diagnostics, this.items[e].diagnostic);
1826
1826
  n && this.view.dispatch({
1827
1827
  selection: { anchor: n.from, head: n.to },
1828
1828
  scrollIntoView: !0,
@@ -1930,9 +1930,9 @@ const ki = /* @__PURE__ */ p.baseTheme({
1930
1930
  }
1931
1931
  }
1932
1932
  }), bi = [
1933
- A,
1934
- /* @__PURE__ */ p.decorations.compute([A], (t) => {
1935
- let { selected: e, panel: r } = t.field(A);
1933
+ M,
1934
+ /* @__PURE__ */ p.decorations.compute([M], (t) => {
1935
+ let { selected: e, panel: r } = t.field(M);
1936
1936
  return !e || !r || e.from == e.to ? y.none : y.set([
1937
1937
  ui.range(e.from, e.to)
1938
1938
  ]);
@@ -1945,23 +1945,23 @@ var vt = function(e) {
1945
1945
  var {
1946
1946
  crosshairCursor: r = !1
1947
1947
  } = e, n = [];
1948
- e.closeBracketsKeymap !== !1 && (n = n.concat(ir)), e.defaultKeymap !== !1 && (n = n.concat(Oo)), e.searchKeymap !== !1 && (n = n.concat(oi)), e.historyKeymap !== !1 && (n = n.concat(Ur)), e.foldKeymap !== !1 && (n = n.concat(sr)), e.completionKeymap !== !1 && (n = n.concat(lr)), e.lintKeymap !== !1 && (n = n.concat(pi));
1948
+ e.closeBracketsKeymap !== !1 && (n = n.concat(ir)), e.defaultKeymap !== !1 && (n = n.concat(Oo)), e.searchKeymap !== !1 && (n = n.concat(oi)), e.historyKeymap !== !1 && (n = n.concat(zr)), e.foldKeymap !== !1 && (n = n.concat(sr)), e.completionKeymap !== !1 && (n = n.concat(lr)), e.lintKeymap !== !1 && (n = n.concat(pi));
1949
1949
  var o = [];
1950
- return e.lineNumbers !== !1 && o.push(ar()), e.highlightActiveLineGutter !== !1 && o.push(cr()), e.highlightSpecialChars !== !1 && o.push(hr()), e.history !== !1 && o.push(Ir()), e.foldGutter !== !1 && o.push(ur()), e.drawSelection !== !1 && o.push(fr()), e.dropCursor !== !1 && o.push(dr()), e.allowMultipleSelections !== !1 && o.push(ce.allowMultipleSelections.of(!0)), e.indentOnInput !== !1 && o.push(mr()), e.syntaxHighlighting !== !1 && o.push(Nt(Sr, {
1950
+ return e.lineNumbers !== !1 && o.push(ar()), e.highlightActiveLineGutter !== !1 && o.push(cr()), e.highlightSpecialChars !== !1 && o.push(hr()), e.history !== !1 && o.push(Ir()), e.foldGutter !== !1 && o.push(ur()), e.drawSelection !== !1 && o.push(fr()), e.dropCursor !== !1 && o.push(dr()), e.allowMultipleSelections !== !1 && o.push(he.allowMultipleSelections.of(!0)), e.indentOnInput !== !1 && o.push(mr()), e.syntaxHighlighting !== !1 && o.push(Nt(Sr, {
1951
1951
  fallback: !0
1952
1952
  })), e.bracketMatching !== !1 && o.push(gr()), e.closeBrackets !== !1 && o.push(pr()), e.autocompletion !== !1 && o.push(yr()), e.rectangularSelection !== !1 && o.push(xr()), r !== !1 && o.push(kr()), e.highlightActiveLine !== !1 && o.push(br()), e.highlightSelectionMatches !== !1 && o.push(qo()), e.tabSize && typeof e.tabSize == "number" && o.push(Pt.of(" ".repeat(e.tabSize))), o.concat([qt.of(n.flat())]).filter(Boolean);
1953
1953
  };
1954
- const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb2bf", Ze = "#7d8799", Ai = "#61afef", Mi = "#98c379", Mt = "#d19a66", Li = "#c678dd", Bi = "#21252b", Lt = "#2c313a", Bt = "#282c34", Ue = "#353a42", Di = "#3E4451", Dt = "#528bff", Ei = /* @__PURE__ */ p.theme({
1954
+ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb2bf", Ze = "#7d8799", Ai = "#61afef", Mi = "#98c379", Mt = "#d19a66", Li = "#c678dd", Di = "#21252b", Lt = "#2c313a", Dt = "#282c34", ze = "#353a42", Bi = "#3E4451", Bt = "#528bff", Ei = /* @__PURE__ */ p.theme({
1955
1955
  "&": {
1956
1956
  color: be,
1957
- backgroundColor: Bt
1957
+ backgroundColor: Dt
1958
1958
  },
1959
1959
  ".cm-content": {
1960
- caretColor: Dt
1960
+ caretColor: Bt
1961
1961
  },
1962
- ".cm-cursor, .cm-dropCursor": { borderLeftColor: Dt },
1963
- "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Di },
1964
- ".cm-panels": { backgroundColor: Bi, color: be },
1962
+ ".cm-cursor, .cm-dropCursor": { borderLeftColor: Bt },
1963
+ "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Bi },
1964
+ ".cm-panels": { backgroundColor: Di, color: be },
1965
1965
  ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
1966
1966
  ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
1967
1967
  ".cm-searchMatch": {
@@ -1977,7 +1977,7 @@ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb
1977
1977
  backgroundColor: "#bad0f847"
1978
1978
  },
1979
1979
  ".cm-gutters": {
1980
- backgroundColor: Bt,
1980
+ backgroundColor: Dt,
1981
1981
  color: Ze,
1982
1982
  border: "none"
1983
1983
  },
@@ -1991,15 +1991,15 @@ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb
1991
1991
  },
1992
1992
  ".cm-tooltip": {
1993
1993
  border: "none",
1994
- backgroundColor: Ue
1994
+ backgroundColor: ze
1995
1995
  },
1996
1996
  ".cm-tooltip .cm-tooltip-arrow:before": {
1997
1997
  borderTopColor: "transparent",
1998
1998
  borderBottomColor: "transparent"
1999
1999
  },
2000
2000
  ".cm-tooltip .cm-tooltip-arrow:after": {
2001
- borderTopColor: Ue,
2002
- borderBottomColor: Ue
2001
+ borderTopColor: ze,
2002
+ borderBottomColor: ze
2003
2003
  },
2004
2004
  ".cm-tooltip-autocomplete": {
2005
2005
  "& > ul > li[aria-selected]": {
@@ -2104,7 +2104,7 @@ var Ti = p.theme({
2104
2104
  a.push(i);
2105
2105
  break;
2106
2106
  }
2107
- return n === !1 && a.push(p.editable.of(!1)), o && a.push(ce.readOnly.of(!0)), [...a];
2107
+ return n === !1 && a.push(p.editable.of(!1)), o && a.push(he.readOnly.of(!0)), [...a];
2108
2108
  }, Ii = (t) => ({
2109
2109
  line: t.state.doc.lineAt(t.state.selection.main.from),
2110
2110
  lineCount: t.state.doc.lines,
@@ -2134,23 +2134,23 @@ function Wi(t) {
2134
2134
  minHeight: u = null,
2135
2135
  maxHeight: m = null,
2136
2136
  width: x = null,
2137
- minWidth: S = null,
2138
- maxWidth: D = null,
2139
- placeholder: z = "",
2140
- editable: q = !0,
2141
- readOnly: U = !1,
2142
- indentWithTab: $ = !0,
2143
- basicSetup: G = !0,
2144
- root: K,
2145
- initialState: H
2146
- } = t, [J, de] = ke(), [k, I] = ke(), [_, j] = ke(), Fe = p.theme({
2137
+ minWidth: b = null,
2138
+ maxWidth: T = null,
2139
+ placeholder: $ = "",
2140
+ editable: V = !0,
2141
+ readOnly: G = !1,
2142
+ indentWithTab: H = !0,
2143
+ basicSetup: K = !0,
2144
+ root: ie,
2145
+ initialState: U
2146
+ } = t, [v, J] = ke(), [k, P] = ke(), [_, j] = ke(), Fe = p.theme({
2147
2147
  "&": {
2148
2148
  height: h,
2149
2149
  minHeight: u,
2150
2150
  maxHeight: m,
2151
2151
  width: x,
2152
- minWidth: S,
2153
- maxWidth: D
2152
+ minWidth: b,
2153
+ maxWidth: T
2154
2154
  },
2155
2155
  "& .cm-scroller": {
2156
2156
  height: "100% !important"
@@ -2159,46 +2159,46 @@ function Wi(t) {
2159
2159
  if (E.docChanged && typeof n == "function" && // Fix echoing of the remote changes:
2160
2160
  // If transaction is market as remote we don't have to call `onChange` handler again
2161
2161
  !E.transactions.some((Nn) => Nn.annotation(Et))) {
2162
- var se = E.state.doc, me = se.toString();
2162
+ var le = E.state.doc, me = le.toString();
2163
2163
  n(me, E);
2164
2164
  }
2165
2165
  o && o(Ii(E));
2166
2166
  }), Fn = Oi({
2167
2167
  theme: c,
2168
- editable: q,
2169
- readOnly: U,
2170
- placeholder: z,
2171
- indentWithTab: $,
2172
- basicSetup: G
2173
- }), ie = [Ne, Fe, ...Fn];
2174
- return s && typeof s == "function" && ie.push(p.updateListener.of(s)), ie = ie.concat(l), W(() => {
2175
- if (J && !_) {
2168
+ editable: V,
2169
+ readOnly: G,
2170
+ placeholder: $,
2171
+ indentWithTab: H,
2172
+ basicSetup: K
2173
+ }), se = [Ne, Fe, ...Fn];
2174
+ return s && typeof s == "function" && se.push(p.updateListener.of(s)), se = se.concat(l), F(() => {
2175
+ if (v && !_) {
2176
2176
  var E = {
2177
2177
  doc: e,
2178
2178
  selection: r,
2179
- extensions: ie
2180
- }, se = H ? ce.fromJSON(H.json, E, H.fields) : ce.create(E);
2181
- if (j(se), !k) {
2179
+ extensions: se
2180
+ }, le = U ? he.fromJSON(U.json, E, U.fields) : he.create(E);
2181
+ if (j(le), !k) {
2182
2182
  var me = new p({
2183
- state: se,
2184
- parent: J,
2185
- root: K
2183
+ state: le,
2184
+ parent: v,
2185
+ root: ie
2186
2186
  });
2187
- I(me), i && i(me, se);
2187
+ P(me), i && i(me, le);
2188
2188
  }
2189
2189
  }
2190
2190
  return () => {
2191
- k && (j(void 0), I(void 0));
2191
+ k && (j(void 0), P(void 0));
2192
2192
  };
2193
- }, [J, _]), W(() => de(t.container), [t.container]), W(() => () => {
2194
- k && (k.destroy(), I(void 0));
2195
- }, [k]), W(() => {
2193
+ }, [v, _]), F(() => J(t.container), [t.container]), F(() => () => {
2194
+ k && (k.destroy(), P(void 0));
2195
+ }, [k]), F(() => {
2196
2196
  a && k && k.focus();
2197
- }, [a, k]), W(() => {
2197
+ }, [a, k]), F(() => {
2198
2198
  k && k.dispatch({
2199
- effects: w.reconfigure.of(ie)
2199
+ effects: w.reconfigure.of(se)
2200
2200
  });
2201
- }, [c, l, h, u, m, x, S, D, z, q, U, $, G, n, s]), W(() => {
2201
+ }, [c, l, h, u, m, x, b, T, $, V, G, H, K, n, s]), F(() => {
2202
2202
  if (e !== void 0) {
2203
2203
  var E = k ? k.state.doc.toString() : "";
2204
2204
  k && e !== E && k.dispatch({
@@ -2214,9 +2214,9 @@ function Wi(t) {
2214
2214
  state: _,
2215
2215
  setState: j,
2216
2216
  view: k,
2217
- setView: I,
2218
- container: J,
2219
- setContainer: de
2217
+ setView: P,
2218
+ container: v,
2219
+ setContainer: J
2220
2220
  };
2221
2221
  }
2222
2222
  var Fi = ["className", "value", "selection", "extensions", "onChange", "onStatistics", "onCreateEditor", "onUpdate", "autoFocus", "theme", "height", "minHeight", "maxHeight", "width", "minWidth", "maxWidth", "basicSetup", "placeholder", "indentWithTab", "editable", "readOnly", "root", "initialState"], Wn = /* @__PURE__ */ wt((t, e) => {
@@ -2233,55 +2233,55 @@ var Fi = ["className", "value", "selection", "extensions", "onChange", "onStatis
2233
2233
  theme: u = "light",
2234
2234
  height: m,
2235
2235
  minHeight: x,
2236
- maxHeight: S,
2237
- width: D,
2238
- minWidth: z,
2239
- maxWidth: q,
2240
- basicSetup: U,
2241
- placeholder: $,
2242
- indentWithTab: G,
2243
- editable: K,
2244
- readOnly: H,
2245
- root: J,
2246
- initialState: de
2247
- } = t, k = qn(t, Fi), I = Rt(null), {
2236
+ maxHeight: b,
2237
+ width: T,
2238
+ minWidth: $,
2239
+ maxWidth: V,
2240
+ basicSetup: G,
2241
+ placeholder: H,
2242
+ indentWithTab: K,
2243
+ editable: ie,
2244
+ readOnly: U,
2245
+ root: v,
2246
+ initialState: J
2247
+ } = t, k = qn(t, Fi), P = Rt(null), {
2248
2248
  state: _,
2249
2249
  view: j,
2250
2250
  container: Fe
2251
2251
  } = Wi({
2252
- container: I.current,
2253
- root: J,
2252
+ container: P.current,
2253
+ root: v,
2254
2254
  value: n,
2255
2255
  autoFocus: h,
2256
2256
  theme: u,
2257
2257
  height: m,
2258
2258
  minHeight: x,
2259
- maxHeight: S,
2260
- width: D,
2261
- minWidth: z,
2262
- maxWidth: q,
2263
- basicSetup: U,
2264
- placeholder: $,
2265
- indentWithTab: G,
2266
- editable: K,
2267
- readOnly: H,
2259
+ maxHeight: b,
2260
+ width: T,
2261
+ minWidth: $,
2262
+ maxWidth: V,
2263
+ basicSetup: G,
2264
+ placeholder: H,
2265
+ indentWithTab: K,
2266
+ editable: ie,
2267
+ readOnly: U,
2268
2268
  selection: o,
2269
2269
  onChange: s,
2270
2270
  onStatistics: l,
2271
2271
  onCreateEditor: a,
2272
2272
  onUpdate: c,
2273
2273
  extensions: i,
2274
- initialState: de
2274
+ initialState: J
2275
2275
  });
2276
- if (Hn(e, () => ({
2277
- editor: I.current,
2276
+ if (Vn(e, () => ({
2277
+ editor: P.current,
2278
2278
  state: _,
2279
2279
  view: j
2280
- }), [I, Fe, _, j]), typeof n != "string")
2280
+ }), [P, Fe, _, j]), typeof n != "string")
2281
2281
  throw new Error("value must be typeof string but got " + typeof n);
2282
2282
  var Ne = typeof u == "string" ? "cm-theme-" + u : "cm-theme";
2283
- return /* @__PURE__ */ P.jsx("div", Vn({
2284
- ref: I,
2283
+ return /* @__PURE__ */ W.jsx("div", Hn({
2284
+ ref: P,
2285
2285
  className: "" + Ne + (r ? " " + r : "")
2286
2286
  }, k));
2287
2287
  });
@@ -2293,7 +2293,7 @@ const Ni = p.theme({
2293
2293
  "& .cm-activeLine, & .cm-activeLineGutter": {
2294
2294
  backgroundColor: "transparent"
2295
2295
  }
2296
- }), Vi = wt(function({
2296
+ }), Hi = wt(function({
2297
2297
  title: e,
2298
2298
  value: r,
2299
2299
  height: n = "200px",
@@ -2302,52 +2302,54 @@ const Ni = p.theme({
2302
2302
  clearBg: s = !0,
2303
2303
  extensions: l,
2304
2304
  onChange: a,
2305
- ...c
2306
- }, h) {
2307
- const u = zn(), m = Rt(null), [x, S] = ke(100), [D, z] = Un.useState(null), { setFocusState: q } = $n(), U = () => {
2308
- q(!0);
2309
- }, $ = () => {
2310
- q(!1);
2305
+ onFocus: c,
2306
+ onBlur: h,
2307
+ ...u
2308
+ }, m) {
2309
+ const x = Un(), b = Rt(null), [T, $] = ke(100), [V, G] = zn.useState(null), { setFocusState: H } = $n(), K = (v) => {
2310
+ c == null || c(v), H(!0);
2311
+ }, ie = (v) => {
2312
+ h == null || h(v), H(!1);
2311
2313
  };
2312
- W(() => {
2313
- Promise.all(l).then(z);
2314
- }, [l]), W(() => {
2315
- const K = new ResizeObserver(([H]) => {
2316
- S(H.contentRect.width);
2314
+ F(() => {
2315
+ Promise.all(l).then(G);
2316
+ }, [l]), F(() => {
2317
+ const v = new ResizeObserver(([J]) => {
2318
+ $(J.contentRect.width);
2317
2319
  });
2318
- return K.observe(m.current), () => K.disconnect();
2320
+ return v.observe(b.current), () => v.disconnect();
2319
2321
  }, []);
2320
- let G = Gn(
2322
+ let U = Gn(
2321
2323
  "peer order-2 w-full max-w-full overflow-hidden rounded-sm border",
2322
2324
  s ? "bg-transparent" : "bg-grey-75",
2323
2325
  o ? "border-red" : "border-grey-500 hover:border-grey-700 focus:border-grey-800",
2324
2326
  e && "mt-2",
2325
2327
  n === "full" && "h-full"
2326
2328
  );
2327
- return /* @__PURE__ */ P.jsxs(P.Fragment, { children: [
2328
- /* @__PURE__ */ P.jsx("div", { ref: m }),
2329
- D && /* @__PURE__ */ P.jsxs("div", { className: n === "full" ? "h-full" : "", style: { width: x }, children: [
2330
- /* @__PURE__ */ P.jsx(
2329
+ return /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
2330
+ /* @__PURE__ */ W.jsx("div", { ref: b }),
2331
+ V && /* @__PURE__ */ W.jsxs("div", { className: n === "full" ? "h-full" : "", style: { width: T }, children: [
2332
+ /* @__PURE__ */ W.jsx(
2331
2333
  Wn,
2332
2334
  {
2333
- ref: h,
2334
- className: G,
2335
- extensions: D,
2335
+ ref: m,
2336
+ className: U,
2337
+ extensions: V,
2336
2338
  height: n === "full" ? "100%" : n,
2337
2339
  theme: Ni,
2338
2340
  value: r,
2339
- onBlur: $,
2341
+ onBlur: ie,
2340
2342
  onChange: a,
2341
- onFocus: U,
2342
- ...c
2343
+ onFocus: K,
2344
+ ...u
2343
2345
  }
2344
2346
  ),
2345
- e && /* @__PURE__ */ P.jsx(Kn, { className: "order-1 !text-grey-700 peer-focus:!text-black", htmlFor: u, useLabelTag: !0, children: e }),
2346
- i && /* @__PURE__ */ P.jsx(Jn, { className: "order-3", color: o ? "red" : "", children: i })
2347
+ e && /* @__PURE__ */ W.jsx(Kn, { className: "order-1 !text-grey-700 peer-focus:!text-black", htmlFor: x, useLabelTag: !0, children: e }),
2348
+ i && /* @__PURE__ */ W.jsx(Jn, { className: "order-3", color: o ? "red" : "", children: i })
2347
2349
  ] })
2348
2350
  ] });
2349
2351
  });
2350
2352
  export {
2351
- Vi as default
2353
+ Hi as default
2352
2354
  };
2353
- //# sourceMappingURL=CodeEditorView-1643e910.mjs.map
2355
+ //# sourceMappingURL=CodeEditorView-b2459562.mjs.map