ghost 5.75.3 → 5.76.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 (177) hide show
  1. package/PRIVACY.md +1 -5
  2. package/components/tryghost-adapter-cache-memory-ttl-5.76.0.tgz +0 -0
  3. package/components/tryghost-adapter-cache-redis-5.76.0.tgz +0 -0
  4. package/components/{tryghost-adapter-manager-5.75.3.tgz → tryghost-adapter-manager-5.76.0.tgz} +0 -0
  5. package/components/tryghost-announcement-bar-settings-5.76.0.tgz +0 -0
  6. package/components/{tryghost-api-framework-5.75.3.tgz → tryghost-api-framework-5.76.0.tgz} +0 -0
  7. package/components/tryghost-api-version-compatibility-service-5.76.0.tgz +0 -0
  8. package/components/tryghost-audience-feedback-5.76.0.tgz +0 -0
  9. package/components/tryghost-bookshelf-repository-5.76.0.tgz +0 -0
  10. package/components/{tryghost-bootstrap-socket-5.75.3.tgz → tryghost-bootstrap-socket-5.76.0.tgz} +0 -0
  11. package/components/tryghost-collections-5.76.0.tgz +0 -0
  12. package/components/tryghost-constants-5.76.0.tgz +0 -0
  13. package/components/tryghost-custom-theme-settings-service-5.76.0.tgz +0 -0
  14. package/components/tryghost-data-generator-5.76.0.tgz +0 -0
  15. package/components/tryghost-domain-events-5.76.0.tgz +0 -0
  16. package/components/tryghost-donations-5.76.0.tgz +0 -0
  17. package/components/tryghost-dynamic-routing-events-5.76.0.tgz +0 -0
  18. package/components/tryghost-email-addresses-5.76.0.tgz +0 -0
  19. package/components/tryghost-email-analytics-provider-mailgun-5.76.0.tgz +0 -0
  20. package/components/tryghost-email-analytics-service-5.76.0.tgz +0 -0
  21. package/components/tryghost-email-content-generator-5.76.0.tgz +0 -0
  22. package/components/{tryghost-email-events-5.75.3.tgz → tryghost-email-events-5.76.0.tgz} +0 -0
  23. package/components/tryghost-email-service-5.76.0.tgz +0 -0
  24. package/components/tryghost-email-suppression-list-5.76.0.tgz +0 -0
  25. package/components/tryghost-event-aware-cache-wrapper-5.76.0.tgz +0 -0
  26. package/components/tryghost-express-dynamic-redirects-5.76.0.tgz +0 -0
  27. package/components/tryghost-external-media-inliner-5.76.0.tgz +0 -0
  28. package/components/tryghost-extract-api-key-5.76.0.tgz +0 -0
  29. package/components/tryghost-html-to-plaintext-5.76.0.tgz +0 -0
  30. package/components/tryghost-i18n-5.76.0.tgz +0 -0
  31. package/components/tryghost-importer-handler-content-files-5.76.0.tgz +0 -0
  32. package/components/tryghost-importer-revue-5.76.0.tgz +0 -0
  33. package/components/tryghost-in-memory-repository-5.76.0.tgz +0 -0
  34. package/components/{tryghost-job-manager-5.75.3.tgz → tryghost-job-manager-5.76.0.tgz} +0 -0
  35. package/components/tryghost-link-redirects-5.76.0.tgz +0 -0
  36. package/components/tryghost-link-replacer-5.76.0.tgz +0 -0
  37. package/components/tryghost-link-tracking-5.76.0.tgz +0 -0
  38. package/components/{tryghost-magic-link-5.75.3.tgz → tryghost-magic-link-5.76.0.tgz} +0 -0
  39. package/components/{tryghost-mail-events-5.75.3.tgz → tryghost-mail-events-5.76.0.tgz} +0 -0
  40. package/components/tryghost-mailgun-client-5.76.0.tgz +0 -0
  41. package/components/{tryghost-member-attribution-5.75.3.tgz → tryghost-member-attribution-5.76.0.tgz} +0 -0
  42. package/components/{tryghost-member-events-5.75.3.tgz → tryghost-member-events-5.76.0.tgz} +0 -0
  43. package/components/{tryghost-members-api-5.75.3.tgz → tryghost-members-api-5.76.0.tgz} +0 -0
  44. package/components/tryghost-members-csv-5.76.0.tgz +0 -0
  45. package/components/{tryghost-members-events-service-5.75.3.tgz → tryghost-members-events-service-5.76.0.tgz} +0 -0
  46. package/components/tryghost-members-importer-5.76.0.tgz +0 -0
  47. package/components/{tryghost-members-offers-5.75.3.tgz → tryghost-members-offers-5.76.0.tgz} +0 -0
  48. package/components/tryghost-members-payments-5.76.0.tgz +0 -0
  49. package/components/tryghost-members-ssr-5.76.0.tgz +0 -0
  50. package/components/{tryghost-members-stripe-service-5.75.3.tgz → tryghost-members-stripe-service-5.76.0.tgz} +0 -0
  51. package/components/tryghost-mentions-email-report-5.76.0.tgz +0 -0
  52. package/components/tryghost-milestones-5.76.0.tgz +0 -0
  53. package/components/tryghost-minifier-5.76.0.tgz +0 -0
  54. package/components/tryghost-model-to-domain-event-interceptor-5.76.0.tgz +0 -0
  55. package/components/tryghost-mw-api-version-mismatch-5.76.0.tgz +0 -0
  56. package/components/tryghost-mw-cache-control-5.76.0.tgz +0 -0
  57. package/components/{tryghost-mw-error-handler-5.75.3.tgz → tryghost-mw-error-handler-5.76.0.tgz} +0 -0
  58. package/components/tryghost-mw-session-from-token-5.76.0.tgz +0 -0
  59. package/components/tryghost-mw-update-user-last-seen-5.76.0.tgz +0 -0
  60. package/components/tryghost-mw-version-match-5.76.0.tgz +0 -0
  61. package/components/tryghost-mw-vhost-5.76.0.tgz +0 -0
  62. package/components/tryghost-nql-filter-expansions-5.76.0.tgz +0 -0
  63. package/components/tryghost-oembed-service-5.76.0.tgz +0 -0
  64. package/components/tryghost-package-json-5.76.0.tgz +0 -0
  65. package/components/tryghost-post-events-5.76.0.tgz +0 -0
  66. package/components/tryghost-post-revisions-5.76.0.tgz +0 -0
  67. package/components/tryghost-posts-service-5.76.0.tgz +0 -0
  68. package/components/tryghost-recommendations-5.76.0.tgz +0 -0
  69. package/components/tryghost-referrers-5.76.0.tgz +0 -0
  70. package/components/{tryghost-security-5.75.3.tgz → tryghost-security-5.76.0.tgz} +0 -0
  71. package/components/{tryghost-session-service-5.75.3.tgz → tryghost-session-service-5.76.0.tgz} +0 -0
  72. package/components/tryghost-settings-path-manager-5.76.0.tgz +0 -0
  73. package/components/tryghost-slack-notifications-5.76.0.tgz +0 -0
  74. package/components/{tryghost-staff-service-5.75.3.tgz → tryghost-staff-service-5.76.0.tgz} +0 -0
  75. package/components/tryghost-stats-service-5.76.0.tgz +0 -0
  76. package/components/tryghost-tiers-5.76.0.tgz +0 -0
  77. package/components/{tryghost-update-check-service-5.75.3.tgz → tryghost-update-check-service-5.76.0.tgz} +0 -0
  78. package/components/tryghost-verification-trigger-5.76.0.tgz +0 -0
  79. package/components/tryghost-version-notifications-data-service-5.76.0.tgz +0 -0
  80. package/components/tryghost-webmentions-5.76.0.tgz +0 -0
  81. package/core/built/admin/assets/admin-x-demo/admin-x-demo.js +2 -2
  82. package/core/built/admin/assets/admin-x-demo/{index-46cd6bae.mjs → index-3d0e9e6b.mjs} +1337 -1319
  83. package/core/built/admin/assets/admin-x-demo/{modals-e3fd0bee.mjs → modals-f20fa267.mjs} +2 -2
  84. package/core/built/admin/assets/admin-x-settings/{CodeEditorView-3275fab6.mjs → CodeEditorView-d4ee416e.mjs} +264 -261
  85. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +2 -2
  86. package/core/built/admin/assets/admin-x-settings/{index-147f4a79.mjs → index-02f4e117.mjs} +2 -2
  87. package/core/built/admin/assets/admin-x-settings/{index-02a155fd.mjs → index-3fd88924.mjs} +5821 -5670
  88. package/core/built/admin/assets/admin-x-settings/{modals-b9d9ac8e.mjs → modals-5adb4a9f.mjs} +6284 -6230
  89. package/core/built/admin/assets/{chunk.143.96062ac831a61508aedd.js → chunk.143.f5d2319ca15f1acb9a3e.js} +5 -5
  90. package/core/built/admin/assets/{chunk.178.9cb1465775ad155bbd9a.js → chunk.178.3fb4456b91e5d6c7c24d.js} +4 -4
  91. package/core/built/admin/assets/{chunk.214.611b4f2521fabe34eea8.js → chunk.664.0bd9e83a6b03130112ae.js} +2126 -2046
  92. package/core/built/admin/assets/ghost-0704a125141af505d40c5f71e84f33ab.css +1 -0
  93. package/core/built/admin/assets/{ghost-2fe51d0831dd1694a4e88abd5f38e2fb.js → ghost-971615b195b524bf97f678a350865195.js} +141 -126
  94. package/core/built/admin/assets/ghost-dark-6ad8cac49f53901201e9210bc1999eeb.css +1 -0
  95. package/core/built/admin/assets/koenig-lexical/index.css +1 -1
  96. package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +26588 -27408
  97. package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +187 -188
  98. package/core/built/admin/assets/{vendor-f6856af9fcd8ab6533f2a4339ececbc8.js → vendor-6b83da0c6e6fede335947219c59e1543.js} +2 -2
  99. package/core/built/admin/index.html +6 -6
  100. package/core/cli/generate-data.js +31 -2
  101. package/core/frontend/apps/private-blogging/lib/middleware.js +1 -2
  102. package/core/frontend/helpers/excerpt.js +2 -0
  103. package/core/frontend/public/robots.txt +1 -0
  104. package/core/server/api/endpoints/utils/serializers/input/settings.js +1 -0
  105. package/core/server/data/db/connection.js +10 -0
  106. package/core/server/data/migrations/versions/5.76/2023-12-05-11-00-add-portal-default-plan-setting.js +8 -0
  107. package/core/server/data/schema/default-settings/default-settings.json +8 -0
  108. package/core/shared/config/defaults.json +1 -1
  109. package/core/shared/labs.js +2 -4
  110. package/core/shared/sentry.js +1 -0
  111. package/core/shared/settings-cache/public.js +1 -0
  112. package/package.json +169 -169
  113. package/yarn.lock +1937 -1737
  114. package/components/tryghost-adapter-cache-memory-ttl-5.75.3.tgz +0 -0
  115. package/components/tryghost-adapter-cache-redis-5.75.3.tgz +0 -0
  116. package/components/tryghost-announcement-bar-settings-5.75.3.tgz +0 -0
  117. package/components/tryghost-api-version-compatibility-service-5.75.3.tgz +0 -0
  118. package/components/tryghost-audience-feedback-5.75.3.tgz +0 -0
  119. package/components/tryghost-bookshelf-repository-5.75.3.tgz +0 -0
  120. package/components/tryghost-collections-5.75.3.tgz +0 -0
  121. package/components/tryghost-constants-5.75.3.tgz +0 -0
  122. package/components/tryghost-custom-theme-settings-service-5.75.3.tgz +0 -0
  123. package/components/tryghost-data-generator-5.75.3.tgz +0 -0
  124. package/components/tryghost-domain-events-5.75.3.tgz +0 -0
  125. package/components/tryghost-donations-5.75.3.tgz +0 -0
  126. package/components/tryghost-dynamic-routing-events-5.75.3.tgz +0 -0
  127. package/components/tryghost-email-addresses-5.75.3.tgz +0 -0
  128. package/components/tryghost-email-analytics-provider-mailgun-5.75.3.tgz +0 -0
  129. package/components/tryghost-email-analytics-service-5.75.3.tgz +0 -0
  130. package/components/tryghost-email-content-generator-5.75.3.tgz +0 -0
  131. package/components/tryghost-email-service-5.75.3.tgz +0 -0
  132. package/components/tryghost-email-suppression-list-5.75.3.tgz +0 -0
  133. package/components/tryghost-event-aware-cache-wrapper-5.75.3.tgz +0 -0
  134. package/components/tryghost-express-dynamic-redirects-5.75.3.tgz +0 -0
  135. package/components/tryghost-external-media-inliner-5.75.3.tgz +0 -0
  136. package/components/tryghost-extract-api-key-5.75.3.tgz +0 -0
  137. package/components/tryghost-html-to-plaintext-5.75.3.tgz +0 -0
  138. package/components/tryghost-i18n-5.75.3.tgz +0 -0
  139. package/components/tryghost-importer-handler-content-files-5.75.3.tgz +0 -0
  140. package/components/tryghost-importer-revue-5.75.3.tgz +0 -0
  141. package/components/tryghost-in-memory-repository-5.75.3.tgz +0 -0
  142. package/components/tryghost-link-redirects-5.75.3.tgz +0 -0
  143. package/components/tryghost-link-replacer-5.75.3.tgz +0 -0
  144. package/components/tryghost-link-tracking-5.75.3.tgz +0 -0
  145. package/components/tryghost-mailgun-client-5.75.3.tgz +0 -0
  146. package/components/tryghost-members-csv-5.75.3.tgz +0 -0
  147. package/components/tryghost-members-importer-5.75.3.tgz +0 -0
  148. package/components/tryghost-members-payments-5.75.3.tgz +0 -0
  149. package/components/tryghost-members-ssr-5.75.3.tgz +0 -0
  150. package/components/tryghost-mentions-email-report-5.75.3.tgz +0 -0
  151. package/components/tryghost-milestones-5.75.3.tgz +0 -0
  152. package/components/tryghost-minifier-5.75.3.tgz +0 -0
  153. package/components/tryghost-model-to-domain-event-interceptor-5.75.3.tgz +0 -0
  154. package/components/tryghost-mw-api-version-mismatch-5.75.3.tgz +0 -0
  155. package/components/tryghost-mw-cache-control-5.75.3.tgz +0 -0
  156. package/components/tryghost-mw-session-from-token-5.75.3.tgz +0 -0
  157. package/components/tryghost-mw-update-user-last-seen-5.75.3.tgz +0 -0
  158. package/components/tryghost-mw-version-match-5.75.3.tgz +0 -0
  159. package/components/tryghost-mw-vhost-5.75.3.tgz +0 -0
  160. package/components/tryghost-nql-filter-expansions-5.75.3.tgz +0 -0
  161. package/components/tryghost-oembed-service-5.75.3.tgz +0 -0
  162. package/components/tryghost-package-json-5.75.3.tgz +0 -0
  163. package/components/tryghost-post-events-5.75.3.tgz +0 -0
  164. package/components/tryghost-post-revisions-5.75.3.tgz +0 -0
  165. package/components/tryghost-posts-service-5.75.3.tgz +0 -0
  166. package/components/tryghost-recommendations-5.75.3.tgz +0 -0
  167. package/components/tryghost-referrers-5.75.3.tgz +0 -0
  168. package/components/tryghost-settings-path-manager-5.75.3.tgz +0 -0
  169. package/components/tryghost-slack-notifications-5.75.3.tgz +0 -0
  170. package/components/tryghost-stats-service-5.75.3.tgz +0 -0
  171. package/components/tryghost-tiers-5.75.3.tgz +0 -0
  172. package/components/tryghost-verification-trigger-5.75.3.tgz +0 -0
  173. package/components/tryghost-version-notifications-data-service-5.75.3.tgz +0 -0
  174. package/components/tryghost-webmentions-5.75.3.tgz +0 -0
  175. package/core/built/admin/assets/ghost-0456ea5c74bd1b27239c11706d1acae9.css +0 -1
  176. package/core/built/admin/assets/ghost-dark-29863e517e1917a3b0df74979a6cf03f.css +0 -1
  177. /package/core/built/admin/assets/{chunk.214.611b4f2521fabe34eea8.js.LICENSE.txt → chunk.664.0bd9e83a6b03130112ae.js.LICENSE.txt} +0 -0
@@ -1,5 +1,5 @@
1
- import { a as ke, b as N, bV as Rt, bW as qn, e as wt, bX as Vn, j as F, bY as _n, u as Hn, R as zn, q as Un, d as $n, H as Gn, c as Kn } from "./index-02a155fd.mjs";
2
- import { E as p, F as fe, v as Ee, S as Re, o as d, w as qe, C as Jn, x as jn, y as Tt, z as Ot, A as Se, B as It, G as Pt, H as Wt, J as Ue, K as Ze, M as w, O as X, g as et, b as $e, Q as Qn, R as ee, V as Ft, U as x, W as Yn, X as Xn, Y as ce, Z as M, _ as Zn, $ as er, a0 as tt, a1 as ue, 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 ur, ac as hr, 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 { a as ce, b as q, bW as Rt, bX as qn, e as wt, bY as _n, j as N, bZ as Hn, u as Vn, R as zn, q as Un, d as $n, H as Gn, c as Kn } from "./index-3fd88924.mjs";
2
+ import { E as p, F as de, v as Ee, S as Re, o as d, w as qe, C as Jn, x as jn, y as Tt, z as Ot, A as Se, B as It, G as Pt, H as Wt, J as Ue, K as Xe, M as w, O as Z, g as et, b as $e, Q as Qn, R as ee, V as Ft, U as x, W as Yn, X as Zn, Y as ue, 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 ur, ac as hr, 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
5
  return n.line ? Mr(t) : n.block ? Br(t) : !1;
@@ -17,11 +17,11 @@ const Mr = /* @__PURE__ */ nt(
17
17
  0
18
18
  /* CommentOption.Toggle */
19
19
  ), Lr = /* @__PURE__ */ nt(
20
- Vt,
20
+ _t,
21
21
  0
22
22
  /* CommentOption.Toggle */
23
23
  ), Br = /* @__PURE__ */ nt(
24
- (t, e) => Vt(t, e, Er(e)),
24
+ (t, e) => _t(t, e, Er(e)),
25
25
  0
26
26
  /* CommentOption.Toggle */
27
27
  );
@@ -39,15 +39,15 @@ function Dr(t, { open: e, close: r }, n, o) {
39
39
  };
40
40
  let u, h;
41
41
  o - n <= 2 * ae ? u = h = t.sliceDoc(n, o) : (u = t.sliceDoc(n, n + ae), h = t.sliceDoc(o - ae, o));
42
- let m = /^\s*/.exec(u)[0].length, k = /\s*$/.exec(h)[0].length, S = h.length - k - r.length;
43
- return u.slice(m, m + e.length) == e && h.slice(S, S + r.length) == r ? {
42
+ let m = /^\s*/.exec(u)[0].length, k = /\s*$/.exec(h)[0].length, C = h.length - k - r.length;
43
+ return u.slice(m, m + e.length) == e && h.slice(C, C + r.length) == r ? {
44
44
  open: {
45
45
  pos: n + m + e.length,
46
46
  margin: /\s/.test(u.charAt(m + e.length)) ? 1 : 0
47
47
  },
48
48
  close: {
49
49
  pos: o - k - r.length,
50
- margin: /\s/.test(h.charAt(S - 1)) ? 1 : 0
50
+ margin: /\s/.test(h.charAt(C - 1)) ? 1 : 0
51
51
  }
52
52
  } : null;
53
53
  }
@@ -59,7 +59,7 @@ function Er(t) {
59
59
  }
60
60
  return e;
61
61
  }
62
- function Vt(t, e, r = e.selection.ranges) {
62
+ function _t(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;
@@ -86,8 +86,8 @@ function Rr(t, e, r = e.selection.ranges) {
86
86
  let h = e.doc.lineAt(u);
87
87
  if (h.from > o && (i == s || s > h.from)) {
88
88
  o = h.from;
89
- let m = /^\s*/.exec(h.text)[0].length, k = m == h.length, S = h.text.slice(m, m + c.length) == c ? m : -1;
90
- m < h.text.length && m < a && (a = m), n.push({ line: h, comment: S, token: c, indent: m, empty: k, single: !1 });
89
+ let m = /^\s*/.exec(h.text)[0].length, k = m == h.length, C = h.text.slice(m, m + c.length) == c ? m : -1;
90
+ m < h.text.length && m < a && (a = m), n.push({ line: h, comment: C, token: c, indent: m, empty: k, single: !1 });
91
91
  }
92
92
  u = h.to + 1;
93
93
  }
@@ -114,7 +114,7 @@ function Rr(t, e, r = e.selection.ranges) {
114
114
  }
115
115
  return null;
116
116
  }
117
- const Ge = /* @__PURE__ */ Ze.define(), wr = /* @__PURE__ */ Ze.define(), Tr = /* @__PURE__ */ fe.define(), _t = /* @__PURE__ */ fe.define({
117
+ const Ge = /* @__PURE__ */ Xe.define(), wr = /* @__PURE__ */ Xe.define(), Tr = /* @__PURE__ */ de.define(), Ht = /* @__PURE__ */ de.define({
118
118
  combine(t) {
119
119
  return Ee(t, {
120
120
  minDepth: 100,
@@ -131,33 +131,33 @@ function Or(t) {
131
131
  let e = 0;
132
132
  return t.iterChangedRanges((r, n) => e = n), e;
133
133
  }
134
- const Ht = /* @__PURE__ */ Re.define({
134
+ const Vt = /* @__PURE__ */ Re.define({
135
135
  create() {
136
136
  return O.empty;
137
137
  },
138
138
  update(t, e) {
139
- let r = e.state.facet(_t), n = e.annotation(Ge);
139
+ let r = e.state.facet(Ht), n = e.annotation(Ge);
140
140
  if (n) {
141
- let a = e.docChanged ? d.single(Or(e.changes)) : void 0, c = C.fromTransaction(e, a), u = n.side, h = u == 0 ? t.undone : t.done;
141
+ let a = e.docChanged ? d.single(Or(e.changes)) : void 0, c = v.fromTransaction(e, a), u = n.side, h = u == 0 ? t.undone : t.done;
142
142
  return c ? h = Ce(h, h.length, r.minDepth, c) : h = $t(h, e.startState.selection), new O(u == 0 ? n.rest : h, u == 0 ? h : n.rest);
143
143
  }
144
144
  let o = e.annotation(wr);
145
145
  if ((o == "full" || o == "before") && (t = t.isolate()), e.annotation(qe.addToHistory) === !1)
146
146
  return e.changes.empty ? t : t.addMapping(e.changes.desc);
147
- let i = C.fromTransaction(e), s = e.annotation(qe.time), l = e.annotation(qe.userEvent);
147
+ let i = v.fromTransaction(e), s = e.annotation(qe.time), l = e.annotation(qe.userEvent);
148
148
  return i ? t = t.addChanges(i, s, l, r, e) : e.selection && (t = t.addSelection(e.startState.selection, s, l, r.newGroupDelay)), (o == "full" || o == "after") && (t = t.isolate()), t;
149
149
  },
150
150
  toJSON(t) {
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 O(t.done.map(C.fromJSON), t.undone.map(C.fromJSON));
154
+ return new O(t.done.map(v.fromJSON), t.undone.map(v.fromJSON));
155
155
  }
156
156
  });
157
157
  function Ir(t = {}) {
158
158
  return [
159
- Ht,
160
- _t.of(t),
159
+ Vt,
160
+ Ht.of(t),
161
161
  p.domEventHandlers({
162
162
  beforeinput(e, r) {
163
163
  let n = e.inputType == "historyUndo" ? zt : e.inputType == "historyRedo" ? Ke : null;
@@ -170,7 +170,7 @@ function we(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(Ht, !1);
173
+ let o = r.field(Vt, !1);
174
174
  if (!o)
175
175
  return !1;
176
176
  let i = o.pop(t, r, e);
@@ -178,12 +178,12 @@ function we(t, e) {
178
178
  };
179
179
  }
180
180
  const zt = /* @__PURE__ */ we(0, !1), Ke = /* @__PURE__ */ we(1, !1), Pr = /* @__PURE__ */ we(0, !0), Wr = /* @__PURE__ */ we(1, !0);
181
- class C {
181
+ class v {
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;
184
184
  }
185
185
  setSelAfter(e) {
186
- return new C(this.changes, this.effects, this.mapped, this.startSelection, e);
186
+ return new v(this.changes, this.effects, this.mapped, this.startSelection, e);
187
187
  }
188
188
  toJSON() {
189
189
  var e, r, n;
@@ -195,21 +195,21 @@ class C {
195
195
  };
196
196
  }
197
197
  static fromJSON(e) {
198
- return new C(e.changes && Jn.fromJSON(e.changes), [], e.mapped && jn.fromJSON(e.mapped), e.startSelection && d.fromJSON(e.startSelection), e.selectionsAfter.map(d.fromJSON));
198
+ return new v(e.changes && Jn.fromJSON(e.changes), [], e.mapped && jn.fromJSON(e.mapped), e.startSelection && d.fromJSON(e.startSelection), e.selectionsAfter.map(d.fromJSON));
199
199
  }
200
200
  // This does not check `addToHistory` and such, it assumes the
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 = B;
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 v(e.changes.invert(e.startState.doc), n, void 0, r || e.startState.selection, B);
210
210
  }
211
211
  static selection(e) {
212
- return new C(void 0, L, void 0, void 0, e);
212
+ return new v(void 0, B, void 0, void 0, e);
213
213
  }
214
214
  }
215
215
  function Ce(t, e, r, n) {
@@ -231,40 +231,40 @@ function Nr(t, e) {
231
231
  function Ut(t, e) {
232
232
  return t.length ? e.length ? t.concat(e) : t : e;
233
233
  }
234
- const L = [], qr = 200;
234
+ const B = [], qr = 200;
235
235
  function $t(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));
238
238
  return n.length && n[n.length - 1].eq(e) ? t : (n.push(e), Ce(t, t.length - 1, 1e9, r.setSelAfter(n)));
239
239
  } else
240
- return [C.selection([e])];
240
+ return [v.selection([e])];
241
241
  }
242
- function Vr(t) {
242
+ function _r(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 Ve(t, e) {
246
+ function _e(t, e) {
247
247
  if (!t.length)
248
248
  return t;
249
- let r = t.length, n = L;
249
+ let r = t.length, n = B;
250
250
  for (; r; ) {
251
- let o = _r(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 ? [v.selection(n)] : B;
259
259
  }
260
- function _r(t, e, r) {
261
- let n = Ut(t.selectionsAfter.length ? t.selectionsAfter.map((l) => l.map(e)) : L, r);
260
+ function Hr(t, e, r) {
261
+ let n = Ut(t.selectionsAfter.length ? t.selectionsAfter.map((l) => l.map(e)) : B, r);
262
262
  if (!t.changes)
263
- return C.selection(n);
263
+ return v.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
- return new C(o, w.mapEffects(t.effects, e), s, t.startSelection.map(i), n);
265
+ return new v(o, w.mapEffects(t.effects, e), s, t.startSelection.map(i), n);
266
266
  }
267
- const Hr = /^(input\.type|delete)($|\.)/;
267
+ const Vr = /^(input\.type|delete)($|\.)/;
268
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;
@@ -274,15 +274,15 @@ class O {
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 || Hr.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), Ut(e.effects, l.effects), l.mapped, l.startSelection, L)) : s = Ce(s, s.length, o.minDepth, e), new O(s, L, r, n);
277
+ return l && l.changes && !l.changes.empty && e.changes && (!n || Vr.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 v(e.changes.compose(l.changes), Ut(e.effects, l.effects), l.mapped, l.startSelection, B)) : s = Ce(s, s.length, o.minDepth, e), new O(s, B, 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;
281
+ let i = this.done.length ? this.done[this.done.length - 1].selectionsAfter : B;
282
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($t(this.done, e), this.undone, r, n);
283
283
  }
284
284
  addMapping(e) {
285
- return new O(Ve(this.done, e), Ve(this.undone, e), this.prevTime, this.prevUserEvent);
285
+ return new O(_e(this.done, e), _e(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 O {
292
292
  if (n && i.selectionsAfter.length)
293
293
  return r.update({
294
294
  selection: i.selectionsAfter[i.selectionsAfter.length - 1],
295
- annotations: Ge.of({ side: e, rest: Vr(o) }),
295
+ annotations: Ge.of({ side: e, rest: _r(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 = Ve(s, i.mapped)), r.update({
300
+ let s = o.length == 1 ? B : o.slice(0, o.length - 1);
301
+ return i.mapped && (s = _e(s, i.mapped)), r.update({
302
302
  changes: i.changes,
303
303
  selection: i.startSelection,
304
304
  effects: i.effects,
@@ -311,7 +311,7 @@ class O {
311
311
  return null;
312
312
  }
313
313
  }
314
- O.empty = /* @__PURE__ */ new O(L, L);
314
+ O.empty = /* @__PURE__ */ new O(B, B);
315
315
  const zr = [
316
316
  { key: "Mod-z", run: zt, preventDefault: !0 },
317
317
  { key: "Mod-y", mac: "Mod-Shift-z", run: Ke, preventDefault: !0 },
@@ -335,14 +335,14 @@ function Te(t, e) {
335
335
  function Gt(t, e) {
336
336
  return T(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 Kt = (t) => Gt(t, !b(t)), Jt = (t) => Gt(t, b(t));
341
+ const Kt = (t) => Gt(t, !S(t)), Jt = (t) => Gt(t, S(t));
342
342
  function jt(t, e) {
343
343
  return T(t, (r) => r.empty ? t.moveByGroup(r, e) : Te(r, e));
344
344
  }
345
- const Ur = (t) => jt(t, !b(t)), $r = (t) => jt(t, b(t));
345
+ const Ur = (t) => jt(t, !S(t)), $r = (t) => jt(t, S(t));
346
346
  function Gr(t, e, r) {
347
347
  if (e.type.prop(r))
348
348
  return !0;
@@ -358,9 +358,9 @@ function Oe(t, e, r) {
358
358
  Gr(t, c, o) ? n = c : a = r ? c.to : c.from;
359
359
  }
360
360
  let i = n.type.prop(o), s, l;
361
- return i && (s = r ? X(t, n.from, 1) : X(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);
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 Kr = (t) => T(t, (e) => Oe(t.state, e, !b(t))), Jr = (t) => T(t, (e) => Oe(t.state, e, b(t)));
363
+ const Kr = (t) => T(t, (e) => Oe(t.state, e, !S(t))), Jr = (t) => T(t, (e) => Oe(t.state, e, S(t)));
364
364
  function Qt(t, e) {
365
365
  return T(t, (r) => {
366
366
  if (!r.empty)
@@ -369,8 +369,8 @@ function Qt(t, e) {
369
369
  return n.head != r.head ? n : t.moveToLineBoundary(r, e);
370
370
  });
371
371
  }
372
- const Yt = (t) => Qt(t, !1), Xt = (t) => Qt(t, !0);
373
- function Zt(t) {
372
+ const Yt = (t) => Qt(t, !1), Zt = (t) => Qt(t, !0);
373
+ function Xt(t) {
374
374
  let e = t.scrollDOM.clientHeight < t.scrollDOM.scrollHeight - 2, r = 0, n = 0, o;
375
375
  if (e) {
376
376
  for (let i of t.state.facet(p.scrollMargins)) {
@@ -388,7 +388,7 @@ function Zt(t) {
388
388
  };
389
389
  }
390
390
  function en(t, e) {
391
- let r = Zt(t), { state: n } = t, o = re(n.selection, (s) => s.empty ? t.moveVertically(s, e, r.height) : Te(s, e));
391
+ let r = Xt(t), { state: n } = t, o = re(n.selection, (s) => s.empty ? t.moveVertically(s, e, r.height) : Te(s, e));
392
392
  if (o.eq(n.selection))
393
393
  return !1;
394
394
  let i;
@@ -399,7 +399,7 @@ function en(t, e) {
399
399
  return t.dispatch(I(n, o), { effects: i }), !0;
400
400
  }
401
401
  const ut = (t) => en(t, !1), Je = (t) => en(t, !0);
402
- function V(t, e, r) {
402
+ function H(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,10 +407,10 @@ function V(t, e, r) {
407
407
  }
408
408
  return o;
409
409
  }
410
- const jr = (t) => T(t, (e) => V(t, e, !0)), Qr = (t) => T(t, (e) => V(t, e, !1)), Yr = (t) => T(t, (e) => V(t, e, !b(t))), Xr = (t) => T(t, (e) => V(t, e, b(t))), Zr = (t) => T(t, (e) => d.cursor(t.lineBlockAt(e.head).from, 1)), eo = (t) => T(t, (e) => d.cursor(t.lineBlockAt(e.head).to, -1));
410
+ const jr = (t) => T(t, (e) => H(t, e, !0)), Qr = (t) => T(t, (e) => H(t, e, !1)), Yr = (t) => T(t, (e) => H(t, e, !S(t))), Zr = (t) => T(t, (e) => H(t, e, S(t))), Xr = (t) => T(t, (e) => d.cursor(t.lineBlockAt(e.head).from, 1)), eo = (t) => T(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
- let s = X(t, i.head, -1) || X(t, i.head, 1) || i.head > 0 && X(t, i.head - 1, 1) || i.head < t.doc.length && X(t, i.head + 1, -1);
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);
414
414
  if (!s || !s.end)
415
415
  return i;
416
416
  n = !0;
@@ -420,7 +420,7 @@ function to(t, e, r) {
420
420
  return n ? (e(I(t, o)), !0) : !1;
421
421
  }
422
422
  const no = ({ state: t, dispatch: e }) => to(t, e, !1);
423
- function B(t, e) {
423
+ function D(t, e) {
424
424
  let r = re(t.state.selection, (n) => {
425
425
  let o = e(n);
426
426
  return d.range(n.anchor, o.head, o.goalColumn, o.bidiLevel || void 0);
@@ -428,21 +428,21 @@ function B(t, e) {
428
428
  return r.eq(t.state.selection) ? !1 : (t.dispatch(I(t.state, r)), !0);
429
429
  }
430
430
  function tn(t, e) {
431
- return B(t, (r) => t.moveByChar(r, e));
431
+ return D(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
- return B(t, (r) => t.moveByGroup(r, e));
435
+ return D(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) => D(t, (e) => Oe(t.state, e, !S(t))), so = (t) => D(t, (e) => Oe(t.state, e, S(t)));
438
438
  function sn(t, e) {
439
- return B(t, (r) => t.moveVertically(r, e));
439
+ return D(t, (r) => t.moveVertically(r, e));
440
440
  }
441
441
  const ln = (t) => sn(t, !1), an = (t) => sn(t, !0);
442
442
  function cn(t, e) {
443
- return B(t, (r) => t.moveVertically(r, e, Zt(t).height));
443
+ return D(t, (r) => t.moveVertically(r, e, Xt(t).height));
444
444
  }
445
- const ht = (t) => cn(t, !1), ft = (t) => cn(t, !0), lo = (t) => B(t, (e) => V(t, e, !0)), ao = (t) => B(t, (e) => V(t, e, !1)), co = (t) => B(t, (e) => V(t, e, !b(t))), uo = (t) => B(t, (e) => V(t, e, b(t))), ho = (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 }) => {
445
+ const ht = (t) => cn(t, !1), ft = (t) => cn(t, !0), lo = (t) => D(t, (e) => H(t, e, !0)), ao = (t) => D(t, (e) => H(t, e, !1)), co = (t) => D(t, (e) => H(t, e, !S(t))), uo = (t) => D(t, (e) => H(t, e, S(t))), ho = (t) => D(t, (e) => d.cursor(t.lineBlockAt(e.head).from)), fo = (t) => D(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 }) => {
@@ -465,9 +465,9 @@ function Ie(t, e) {
465
465
  let { from: s, to: l } = i;
466
466
  if (s == l) {
467
467
  let a = e(s);
468
- a < s ? (r = "delete.backward", a = ge(t, a, !1)) : a > s && (r = "delete.forward", a = ge(t, a, !0)), s = Math.min(s, a), l = Math.max(l, a);
468
+ a < s ? (r = "delete.backward", a = pe(t, a, !1)) : a > s && (r = "delete.forward", a = pe(t, a, !0)), s = Math.min(s, a), l = Math.max(l, a);
469
469
  } else
470
- s = ge(t, s, !1), l = ge(t, l, !0);
470
+ s = pe(t, s, !1), l = pe(t, l, !0);
471
471
  return s == l ? { range: i } : { changes: { from: s, to: l }, range: d.cursor(s) };
472
472
  });
473
473
  return o.changes.empty ? !1 : (t.dispatch(n.update(o, {
@@ -476,7 +476,7 @@ function Ie(t, e) {
476
476
  effects: r == "delete.selection" ? p.announce.of(n.phrase("Selection deleted")) : void 0
477
477
  })), !0);
478
478
  }
479
- function ge(t, e, r) {
479
+ function pe(t, e, r) {
480
480
  if (t instanceof p)
481
481
  for (let n of t.state.facet(p.atomicRanges).map((o) => o(t)))
482
482
  n.between(e, e, (o, i) => {
@@ -661,8 +661,8 @@ const Ro = ({ state: t, dispatch: e }) => {
661
661
  { key: "Ctrl-b", run: Kt, shift: nn, preventDefault: !0 },
662
662
  { key: "Ctrl-f", run: Jt, shift: rn },
663
663
  { key: "Ctrl-p", run: Yt, shift: ln },
664
- { key: "Ctrl-n", run: Xt, shift: an },
665
- { key: "Ctrl-a", run: Zr, shift: ho },
664
+ { key: "Ctrl-n", run: Zt, shift: an },
665
+ { key: "Ctrl-a", run: Xr, shift: ho },
666
666
  { key: "Ctrl-e", run: eo, shift: fo },
667
667
  { key: "Ctrl-d", run: hn },
668
668
  { key: "Ctrl-h", run: je },
@@ -677,11 +677,11 @@ const Ro = ({ state: t, dispatch: e }) => {
677
677
  { mac: "Cmd-ArrowLeft", run: Yr, shift: co, preventDefault: !0 },
678
678
  { key: "ArrowRight", run: Jt, shift: rn, preventDefault: !0 },
679
679
  { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: $r, shift: oo, preventDefault: !0 },
680
- { mac: "Cmd-ArrowRight", run: Xr, shift: uo, preventDefault: !0 },
680
+ { mac: "Cmd-ArrowRight", run: Zr, shift: uo, preventDefault: !0 },
681
681
  { key: "ArrowUp", run: Yt, shift: ln, preventDefault: !0 },
682
682
  { mac: "Cmd-ArrowUp", run: dt, shift: gt },
683
683
  { mac: "Ctrl-ArrowUp", run: ut, shift: ht },
684
- { key: "ArrowDown", run: Xt, shift: an, preventDefault: !0 },
684
+ { key: "ArrowDown", run: Zt, shift: an, preventDefault: !0 },
685
685
  { mac: "Cmd-ArrowDown", run: mt, shift: pt },
686
686
  { mac: "Ctrl-ArrowDown", run: Je, shift: ft },
687
687
  { key: "PageUp", run: ut, shift: ht },
@@ -793,7 +793,7 @@ class te {
793
793
  if (e < 0)
794
794
  return this.done = !0, this;
795
795
  let r = er(e), n = this.bufferStart + this.bufferPos;
796
- this.bufferPos += Xn(e);
796
+ this.bufferPos += Zn(e);
797
797
  let o = this.normalize(r);
798
798
  for (let i = 0, s = n; ; i++) {
799
799
  let l = o.charCodeAt(i), a = this.match(l, s);
@@ -857,8 +857,8 @@ class Cn {
857
857
  }
858
858
  }
859
859
  }
860
- const _e = /* @__PURE__ */ new WeakMap();
861
- class Z {
860
+ const He = /* @__PURE__ */ new WeakMap();
861
+ class X {
862
862
  constructor(e, r) {
863
863
  this.from = e, this.text = r;
864
864
  }
@@ -866,20 +866,20 @@ class Z {
866
866
  return this.from + this.text.length;
867
867
  }
868
868
  static get(e, r, n) {
869
- let o = _e.get(e);
869
+ let o = He.get(e);
870
870
  if (!o || o.from >= n || o.to <= r) {
871
- let l = new Z(r, e.sliceString(r, n));
872
- return _e.set(e, l), l;
871
+ let l = new X(r, e.sliceString(r, n));
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)), _e.set(e, new Z(s, i)), new Z(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 {
881
881
  constructor(e, r, n, o, i) {
882
- this.text = e, this.to = i, this.done = !1, this.value = Sn, this.matchPos = ve(e, o), this.re = new RegExp(r, it + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.flat = Z.get(e, o, this.chunkEnd(
882
+ this.text = e, this.to = i, this.done = !1, this.value = Sn, this.matchPos = ve(e, o), this.re = new RegExp(r, it + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.flat = X.get(e, o, this.chunkEnd(
883
883
  o + 5e3
884
884
  /* Base */
885
885
  ));
@@ -897,7 +897,7 @@ class vn {
897
897
  }
898
898
  if (this.flat.to == this.to)
899
899
  return this.done = !0, this;
900
- this.flat = Z.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
900
+ this.flat = X.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
901
901
  }
902
902
  }
903
903
  }
@@ -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, u] = o, h = c ? +c.slice(1) : 0, m = a ? +a : s.number;
937
937
  if (a && u) {
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 E = m / 100;
939
+ l && (E = E * (l == "-" ? -1 : 1) + s.number / i.doc.lines), m = Math.round(i.doc.lines * E);
940
940
  } else
941
941
  a && l && (m = m * (l == "-" ? -1 : 1) + s.number);
942
- let k = i.doc.line(Math.max(1, Math.min(i.doc.lines, m))), S = d.cursor(k.from + Math.max(0, Math.min(h, k.length)));
942
+ let k = i.doc.line(Math.max(1, Math.min(i.doc.lines, m))), C = d.cursor(k.from + Math.max(0, Math.min(h, k.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(C.from, { y: "center" })],
945
+ selection: C
946
946
  }), t.focus();
947
947
  }
948
948
  return { dom: r };
@@ -958,10 +958,10 @@ const Ae = /* @__PURE__ */ w.define(), xt = /* @__PURE__ */ Re.define({
958
958
  },
959
959
  provide: (t) => tt.from(t, (e) => e ? Qe : null)
960
960
  }), Wo = (t) => {
961
- let e = ce(t, Qe);
961
+ let e = ue(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 = ce(t, Qe);
964
+ t.state.field(xt, !1) == null && r.push(w.appendConfig.of([xt, Fo])), t.dispatch({ effects: r }), e = ue(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__ */ Re.define({
974
974
  minSelectionLength: 1,
975
975
  maxMatches: 100,
976
976
  wholeWords: !1
977
- }, An = /* @__PURE__ */ fe.define({
977
+ }, An = /* @__PURE__ */ de.define({
978
978
  combine(t) {
979
979
  return Ee(t, No, {
980
980
  highlightWordAroundCursor: (e, r) => e || r,
@@ -987,12 +987,12 @@ function qo(t) {
987
987
  let e = [Uo, zo];
988
988
  return t && e.push(An.of(t)), e;
989
989
  }
990
- const Vo = /* @__PURE__ */ x.mark({ class: "cm-selectionMatch" }), _o = /* @__PURE__ */ x.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
990
+ const _o = /* @__PURE__ */ x.mark({ class: "cm-selectionMatch" }), Ho = /* @__PURE__ */ x.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 Ho(t, e, r, n) {
995
- return t(e.sliceDoc(r, r + 1)) == M.Word && t(e.sliceDoc(n - 1, n)) == M.Word;
994
+ function Vo(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
997
  const zo = /* @__PURE__ */ Ft.fromClass(class {
998
998
  constructor(t) {
@@ -1018,7 +1018,7 @@ const zo = /* @__PURE__ */ Ft.fromClass(class {
1018
1018
  if (a < e.minSelectionLength || a > 200)
1019
1019
  return x.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) && Ho(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) && Vo(s, r, o.from, o.to)))
1022
1022
  return x.none;
1023
1023
  } else if (i = r.sliceDoc(o.from, o.to).trim(), !i)
1024
1024
  return x.none;
@@ -1028,7 +1028,7 @@ const zo = /* @__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: u, to: h } = c.value;
1031
- if ((!s || kt(s, r, u, h)) && (o.empty && u <= o.from && h >= o.to ? l.push(_o.range(u, h)) : (u >= o.to || h <= o.from) && l.push(Vo.range(u, h)), l.length > e.maxMatches))
1031
+ if ((!s || kt(s, r, u, h)) && (o.empty && u <= o.from && h >= o.to ? l.push(Ho.range(u, h)) : (u >= o.to || h <= o.from) && l.push(_o.range(u, h)), l.length > e.maxMatches))
1032
1032
  return x.none;
1033
1033
  }
1034
1034
  }
@@ -1073,7 +1073,7 @@ const Ko = ({ 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__ */ fe.define({
1076
+ }, oe = /* @__PURE__ */ de.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 : ue.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 ? Jo(e.doc, e.charCategorizer(e.selection.main.head)) : void 0);
1131
1131
  }
1132
1132
  function Jo(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(), q = /* @__PURE__ */ Re.define({
1238
+ const fe = /* @__PURE__ */ w.define(), st = /* @__PURE__ */ w.define(), _ = /* @__PURE__ */ Re.define({
1239
1239
  create(t) {
1240
- return new He(Ye(t).create(), null);
1240
+ return new Ve(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 He(r.value.create(), t.panel) : r.is(st) && (t = new He(t.query, r.value ? lt : null));
1244
+ r.is(fe) ? t = new Ve(r.value.create(), t.panel) : r.is(st) && (t = new Ve(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 He {
1249
+ class Ve {
1250
1250
  constructor(e, r) {
1251
1251
  this.query = e, this.panel = r;
1252
1252
  }
1253
1253
  }
1254
- const Xo = /* @__PURE__ */ x.mark({ class: "cm-searchMatch" }), Zo = /* @__PURE__ */ x.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), ei = /* @__PURE__ */ Ft.fromClass(class {
1254
+ const Zo = /* @__PURE__ */ x.mark({ class: "cm-searchMatch" }), Xo = /* @__PURE__ */ x.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(q));
1256
+ this.view = t, this.decorations = this.highlight(t.state.field(_));
1257
1257
  }
1258
1258
  update(t) {
1259
- let e = t.state.field(q);
1260
- (e != t.startState.field(q) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e));
1259
+ let e = t.state.field(_);
1260
+ (e != t.startState.field(_) || 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)
@@ -1269,7 +1269,7 @@ const Xo = /* @__PURE__ */ x.mark({ class: "cm-searchMatch" }), Zo = /* @__PURE_
1269
1269
  a = i[++o].to;
1270
1270
  t.highlight(r.state, l, a, (c, u) => {
1271
1271
  let h = r.state.selection.ranges.some((m) => m.from == c && m.to == u);
1272
- n.add(c, u, h ? Zo : Xo);
1272
+ n.add(c, u, h ? Xo : Zo);
1273
1273
  });
1274
1274
  }
1275
1275
  return n.finish();
@@ -1277,13 +1277,13 @@ const Xo = /* @__PURE__ */ x.mark({ class: "cm-searchMatch" }), Zo = /* @__PURE_
1277
1277
  }, {
1278
1278
  decorations: (t) => t.decorations
1279
1279
  });
1280
- function de(t) {
1280
+ function me(t) {
1281
1281
  return (e) => {
1282
- let r = e.state.field(q, !1);
1282
+ let r = e.state.field(_, !1);
1283
1283
  return r && r.query.spec.valid ? t(e, r) : En(e);
1284
1284
  };
1285
1285
  }
1286
- const Be = /* @__PURE__ */ de((t, { query: e }) => {
1286
+ const Be = /* @__PURE__ */ me((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;
@@ -1293,7 +1293,7 @@ const Be = /* @__PURE__ */ de((t, { query: e }) => {
1293
1293
  effects: [at(t, n), i.scrollToMatch(o.main, t)],
1294
1294
  userEvent: "select.search"
1295
1295
  }), Dn(t), !0;
1296
- }), De = /* @__PURE__ */ de((t, { query: e }) => {
1296
+ }), De = /* @__PURE__ */ me((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;
@@ -1303,7 +1303,7 @@ const Be = /* @__PURE__ */ de((t, { query: e }) => {
1303
1303
  effects: [at(t, o), s.scrollToMatch(i.main, t)],
1304
1304
  userEvent: "select.search"
1305
1305
  }), Dn(t), !0;
1306
- }), ti = /* @__PURE__ */ de((t, { query: e }) => {
1306
+ }), ti = /* @__PURE__ */ me((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__ */ de((t, { query: e }) => {
1323
1323
  selection: d.create(i, s),
1324
1324
  userEvent: "select.search.matches"
1325
1325
  })), !0;
1326
- }, bt = /* @__PURE__ */ de((t, { query: e }) => {
1326
+ }, bt = /* @__PURE__ */ me((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__ */ de((t, { query: e }) => {
1341
1341
  effects: c,
1342
1342
  userEvent: "input.replace"
1343
1343
  }), !0;
1344
- }), ri = /* @__PURE__ */ de((t, { query: e }) => {
1344
+ }), ri = /* @__PURE__ */ me((t, { query: e }) => {
1345
1345
  if (t.state.readOnly)
1346
1346
  return !1;
1347
1347
  let r = e.matchAll(t.state, 1e9).map((o) => {
@@ -1375,7 +1375,7 @@ function Ye(t, e) {
1375
1375
  });
1376
1376
  }
1377
1377
  function Bn(t) {
1378
- let e = ce(t, lt);
1378
+ let e = ue(t, lt);
1379
1379
  return e && e.dom.querySelector("[main-field]");
1380
1380
  }
1381
1381
  function Dn(t) {
@@ -1383,24 +1383,24 @@ function Dn(t) {
1383
1383
  e && e == t.root.activeElement && e.select();
1384
1384
  }
1385
1385
  const En = (t) => {
1386
- let e = t.state.field(q, !1);
1386
+ let e = t.state.field(_, !1);
1387
1387
  if (e && e.panel) {
1388
1388
  let r = Bn(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: fe.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 ? fe.of(Ye(t.state, e.query.spec)) : w.appendConfig.of(li)
1397
1397
  ] });
1398
1398
  return !0;
1399
1399
  }, Rn = (t) => {
1400
- let e = t.state.field(q, !1);
1400
+ let e = t.state.field(_, !1);
1401
1401
  if (!e || !e.panel)
1402
1402
  return !1;
1403
- let r = ce(t, lt);
1403
+ let r = ue(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" },
@@ -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(q).query.spec;
1417
+ let r = this.query = e.state.field(_).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", () => Be(e), [A(e, "next")]),
1462
+ n("prev", () => De(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: () => Rn(e),
1476
- "aria-label": v(e, "close"),
1476
+ "aria-label": A(e, "close"),
1477
1477
  type: "button"
1478
1478
  }, ["×"])
1479
1479
  ]);
@@ -1486,7 +1486,7 @@ 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: fe.of(e) }));
1490
1490
  }
1491
1491
  keydown(e) {
1492
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));
@@ -1494,7 +1494,7 @@ class ii {
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(fe) && !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,22 +1509,22 @@ 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
- const pe = 30, ye = /[\s\.,:;?!]/;
1515
+ const ye = 30, xe = /[\s\.,:;?!]/;
1516
1516
  function at(t, { from: e, to: r }) {
1517
- let n = t.state.doc.lineAt(e), o = t.state.doc.lineAt(r).to, i = Math.max(n.from, e - pe), s = Math.min(o, r + pe), l = t.state.sliceDoc(i, s);
1517
+ let n = t.state.doc.lineAt(e), o = t.state.doc.lineAt(r).to, i = Math.max(n.from, e - ye), s = Math.min(o, r + ye), l = t.state.sliceDoc(i, s);
1518
1518
  if (i != n.from) {
1519
- for (let a = 0; a < pe; a++)
1520
- if (!ye.test(l[a + 1]) && ye.test(l[a])) {
1519
+ for (let a = 0; a < ye; a++)
1520
+ if (!xe.test(l[a + 1]) && xe.test(l[a])) {
1521
1521
  l = l.slice(a);
1522
1522
  break;
1523
1523
  }
1524
1524
  }
1525
1525
  if (s != o) {
1526
- for (let a = l.length - 1; a > l.length - pe; a--)
1527
- if (!ye.test(l[a - 1]) && ye.test(l[a])) {
1526
+ for (let a = l.length - 1; a > l.length - ye; a--)
1527
+ if (!xe.test(l[a - 1]) && xe.test(l[a])) {
1528
1528
  l = l.slice(0, a);
1529
1529
  break;
1530
1530
  }
@@ -1561,8 +1561,8 @@ 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
- q,
1565
- /* @__PURE__ */ Zn.lowest(ei),
1564
+ _,
1565
+ /* @__PURE__ */ Xn.lowest(ei),
1566
1566
  si
1567
1567
  ];
1568
1568
  class ai {
@@ -1570,7 +1570,7 @@ class ai {
1570
1570
  this.from = e, this.to = r, this.diagnostic = n;
1571
1571
  }
1572
1572
  }
1573
- class U {
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 U {
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 U(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(wn)) || t.changes.touchesRange(r.from, r.to));
1600
1600
  }
1601
1601
  function ui(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 wn = /* @__PURE__ */ w.define(), ct = /* @__PURE__ */ w.define(), Tn = /* @__PURE__ */ w.define(), A = /* @__PURE__ */ Re.define({
1604
+ const wn = /* @__PURE__ */ w.define(), ct = /* @__PURE__ */ w.define(), Tn = /* @__PURE__ */ w.define(), M = /* @__PURE__ */ Re.define({
1605
1605
  create() {
1606
- return new U(x.none, null, null);
1606
+ return new z(x.none, null, null);
1607
1607
  },
1608
1608
  update(t, e) {
1609
1609
  if (e.docChanged) {
@@ -1612,10 +1612,10 @@ const wn = /* @__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 U(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(wn) ? t = U.init(r.value, t.panel, e.state) : r.is(ct) ? t = new U(t.diagnostics, r.value ? We.open : null, t.selected) : r.is(Tn) && (t = new U(t.diagnostics, t.panel, r.value));
1618
+ r.is(wn) ? 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 wn = /* @__PURE__ */ w.define(), ct = /* @__PURE__ */ w.define(), Tn = /*
1624
1624
  ]
1625
1625
  }), hi = /* @__PURE__ */ x.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: u }) => {
1629
1629
  e >= a && e <= c && (a == c || (e > a || r > 0) && (e < c || r < 0)) && (o.push(u.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: ui(t.state, [ct.of(!0)]) });
1647
- let r = ce(t, We.open);
1647
+ let r = ue(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__ */ fe.define({
1661
+ ], On = /* @__PURE__ */ de.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 k = ne(t.state.field(A).diagnostics, e);
1697
+ let k = ne(t.state.field(M).diagnostics, e);
1698
1698
  k && i.apply(t, k.from, k.to);
1699
1699
  }, { name: c } = i, u = o[s] ? c.indexOf(o[s]) : -1, h = u < 0 ? c : [
1700
1700
  c.slice(0, u),
@@ -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, u;
1785
1785
  for (let h = n; h < this.items.length; h++)
@@ -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,
@@ -1836,7 +1836,7 @@ class We {
1836
1836
  function xi(t, e = 'viewBox="0 0 40 40"') {
1837
1837
  return `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`;
1838
1838
  }
1839
- function xe(t) {
1839
+ function ke(t) {
1840
1840
  return xi(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`, 'width="6" height="3"');
1841
1841
  }
1842
1842
  const ki = /* @__PURE__ */ p.baseTheme({
@@ -1869,10 +1869,10 @@ const ki = /* @__PURE__ */ p.baseTheme({
1869
1869
  backgroundRepeat: "repeat-x",
1870
1870
  paddingBottom: "0.7px"
1871
1871
  },
1872
- ".cm-lintRange-error": { backgroundImage: /* @__PURE__ */ xe("#d11") },
1873
- ".cm-lintRange-warning": { backgroundImage: /* @__PURE__ */ xe("orange") },
1874
- ".cm-lintRange-info": { backgroundImage: /* @__PURE__ */ xe("#999") },
1875
- ".cm-lintRange-hint": { backgroundImage: /* @__PURE__ */ xe("#66d") },
1872
+ ".cm-lintRange-error": { backgroundImage: /* @__PURE__ */ ke("#d11") },
1873
+ ".cm-lintRange-warning": { backgroundImage: /* @__PURE__ */ ke("orange") },
1874
+ ".cm-lintRange-info": { backgroundImage: /* @__PURE__ */ ke("#999") },
1875
+ ".cm-lintRange-hint": { backgroundImage: /* @__PURE__ */ ke("#66d") },
1876
1876
  ".cm-lintRange-active": { backgroundColor: "#ffdd9980" },
1877
1877
  ".cm-tooltip-lint": {
1878
1878
  padding: 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 ? x.none : x.set([
1937
1937
  hi.range(e.from, e.to)
1938
1938
  ]);
@@ -1947,11 +1947,11 @@ var vt = function(e) {
1947
1947
  } = e, n = [];
1948
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(ur()), e.history !== !1 && o.push(Ir()), e.foldGutter !== !1 && o.push(hr()), e.drawSelection !== !1 && o.push(fr()), e.dropCursor !== !1 && o.push(dr()), e.allowMultipleSelections !== !1 && o.push(ue.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(ur()), e.history !== !1 && o.push(Ir()), e.foldGutter !== !1 && o.push(hr()), 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", Xe = "#7d8799", Ai = "#61afef", Mi = "#98c379", Mt = "#d19a66", Li = "#c678dd", Bi = "#21252b", Lt = "#2c313a", Bt = "#282c34", ze = "#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", Bi = "#21252b", Lt = "#2c313a", Bt = "#282c34", ze = "#353a42", Di = "#3E4451", Dt = "#528bff", Ei = /* @__PURE__ */ p.theme({
1955
1955
  "&": {
1956
1956
  color: be,
1957
1957
  backgroundColor: Bt
@@ -1978,7 +1978,7 @@ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb
1978
1978
  },
1979
1979
  ".cm-gutters": {
1980
1980
  backgroundColor: Bt,
1981
- color: Xe,
1981
+ color: Ze,
1982
1982
  border: "none"
1983
1983
  },
1984
1984
  ".cm-activeLineGutter": {
@@ -2038,7 +2038,7 @@ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb
2038
2038
  },
2039
2039
  {
2040
2040
  tag: [f.meta, f.comment],
2041
- color: Xe
2041
+ color: Ze
2042
2042
  },
2043
2043
  {
2044
2044
  tag: f.strong,
@@ -2054,7 +2054,7 @@ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb
2054
2054
  },
2055
2055
  {
2056
2056
  tag: f.link,
2057
- color: Xe,
2057
+ color: Ze,
2058
2058
  textDecoration: "underline"
2059
2059
  },
2060
2060
  {
@@ -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(ue.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,
@@ -2118,7 +2118,7 @@ var Ti = p.theme({
2118
2118
  selectionCode: t.state.sliceDoc(t.state.selection.main.from, t.state.selection.main.to),
2119
2119
  selections: t.state.selection.ranges.map((e) => t.state.sliceDoc(e.from, e.to)),
2120
2120
  selectedText: t.state.selection.ranges.some((e) => !e.empty)
2121
- }), Et = Ze.define(), Pi = [];
2121
+ }), Et = Xe.define(), Pi = [];
2122
2122
  function Wi(t) {
2123
2123
  var {
2124
2124
  value: e,
@@ -2134,23 +2134,23 @@ function Wi(t) {
2134
2134
  minHeight: h = null,
2135
2135
  maxHeight: m = null,
2136
2136
  width: k = null,
2137
- minWidth: S = null,
2138
- maxWidth: D = null,
2139
- placeholder: $ = "",
2140
- editable: G = !0,
2141
- readOnly: _ = !1,
2142
- indentWithTab: K = !0,
2143
- basicSetup: H = !0,
2137
+ minWidth: C = null,
2138
+ maxWidth: E = null,
2139
+ placeholder: U = "",
2140
+ editable: $ = !0,
2141
+ readOnly: V = !1,
2142
+ indentWithTab: G = !0,
2143
+ basicSetup: K = !0,
2144
2144
  root: ie,
2145
- initialState: z
2146
- } = t, [W, E] = ke(), [y, P] = ke(), [J, j] = ke(), Fe = p.theme({
2145
+ initialState: P
2146
+ } = t, [W, J] = ce(), [y, b] = ce(), [F, j] = ce(), Fe = p.theme({
2147
2147
  "&": {
2148
2148
  height: u,
2149
2149
  minHeight: h,
2150
2150
  maxHeight: m,
2151
2151
  width: k,
2152
- minWidth: S,
2153
- maxWidth: D
2152
+ minWidth: C,
2153
+ maxWidth: E
2154
2154
  },
2155
2155
  "& .cm-scroller": {
2156
2156
  height: "100% !important"
@@ -2159,46 +2159,46 @@ function Wi(t) {
2159
2159
  if (R.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
  !R.transactions.some((Nn) => Nn.annotation(Et))) {
2162
- var le = R.state.doc, me = le.toString();
2163
- n(me, R);
2162
+ var le = R.state.doc, ge = le.toString();
2163
+ n(ge, R);
2164
2164
  }
2165
2165
  o && o(Ii(R));
2166
2166
  }), Fn = Oi({
2167
2167
  theme: c,
2168
- editable: G,
2169
- readOnly: _,
2170
- placeholder: $,
2171
- indentWithTab: K,
2172
- basicSetup: H
2168
+ editable: $,
2169
+ readOnly: V,
2170
+ placeholder: U,
2171
+ indentWithTab: G,
2172
+ basicSetup: K
2173
2173
  }), se = [Ne, Fe, ...Fn];
2174
- return s && typeof s == "function" && se.push(p.updateListener.of(s)), se = se.concat(l), N(() => {
2175
- if (W && !J) {
2174
+ return s && typeof s == "function" && se.push(p.updateListener.of(s)), se = se.concat(l), q(() => {
2175
+ if (W && !F) {
2176
2176
  var R = {
2177
2177
  doc: e,
2178
2178
  selection: r,
2179
2179
  extensions: se
2180
- }, le = z ? ue.fromJSON(z.json, R, z.fields) : ue.create(R);
2180
+ }, le = P ? he.fromJSON(P.json, R, P.fields) : he.create(R);
2181
2181
  if (j(le), !y) {
2182
- var me = new p({
2182
+ var ge = new p({
2183
2183
  state: le,
2184
2184
  parent: W,
2185
2185
  root: ie
2186
2186
  });
2187
- P(me), i && i(me, le);
2187
+ b(ge), i && i(ge, le);
2188
2188
  }
2189
2189
  }
2190
2190
  return () => {
2191
- y && (j(void 0), P(void 0));
2191
+ y && (j(void 0), b(void 0));
2192
2192
  };
2193
- }, [W, J]), N(() => E(t.container), [t.container]), N(() => () => {
2194
- y && (y.destroy(), P(void 0));
2195
- }, [y]), N(() => {
2193
+ }, [W, F]), q(() => J(t.container), [t.container]), q(() => () => {
2194
+ y && (y.destroy(), b(void 0));
2195
+ }, [y]), q(() => {
2196
2196
  a && y && y.focus();
2197
- }, [a, y]), N(() => {
2197
+ }, [a, y]), q(() => {
2198
2198
  y && y.dispatch({
2199
2199
  effects: w.reconfigure.of(se)
2200
2200
  });
2201
- }, [c, l, u, h, m, k, S, D, $, G, _, K, H, n, s]), N(() => {
2201
+ }, [c, l, u, h, m, k, C, E, U, $, V, G, K, n, s]), q(() => {
2202
2202
  if (e !== void 0) {
2203
2203
  var R = y ? y.state.doc.toString() : "";
2204
2204
  y && e !== R && y.dispatch({
@@ -2211,12 +2211,12 @@ function Wi(t) {
2211
2211
  });
2212
2212
  }
2213
2213
  }, [e, y]), {
2214
- state: J,
2214
+ state: F,
2215
2215
  setState: j,
2216
2216
  view: y,
2217
- setView: P,
2217
+ setView: b,
2218
2218
  container: W,
2219
- setContainer: E
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__ */ Rt((t, e) => {
@@ -2233,55 +2233,55 @@ var Fi = ["className", "value", "selection", "extensions", "onChange", "onStatis
2233
2233
  theme: h = "light",
2234
2234
  height: m,
2235
2235
  minHeight: k,
2236
- maxHeight: S,
2237
- width: D,
2238
- minWidth: $,
2239
- maxWidth: G,
2240
- basicSetup: _,
2241
- placeholder: K,
2242
- indentWithTab: H,
2236
+ maxHeight: C,
2237
+ width: E,
2238
+ minWidth: U,
2239
+ maxWidth: $,
2240
+ basicSetup: V,
2241
+ placeholder: G,
2242
+ indentWithTab: K,
2243
2243
  editable: ie,
2244
- readOnly: z,
2244
+ readOnly: P,
2245
2245
  root: W,
2246
- initialState: E
2247
- } = t, y = qn(t, Fi), P = wt(null), {
2248
- state: J,
2246
+ initialState: J
2247
+ } = t, y = qn(t, Fi), b = wt(null), {
2248
+ state: F,
2249
2249
  view: j,
2250
2250
  container: Fe
2251
2251
  } = Wi({
2252
- container: P.current,
2252
+ container: b.current,
2253
2253
  root: W,
2254
2254
  value: n,
2255
2255
  autoFocus: u,
2256
2256
  theme: h,
2257
2257
  height: m,
2258
2258
  minHeight: k,
2259
- maxHeight: S,
2260
- width: D,
2261
- minWidth: $,
2262
- maxWidth: G,
2263
- basicSetup: _,
2264
- placeholder: K,
2265
- indentWithTab: H,
2259
+ maxHeight: C,
2260
+ width: E,
2261
+ minWidth: U,
2262
+ maxWidth: $,
2263
+ basicSetup: V,
2264
+ placeholder: G,
2265
+ indentWithTab: K,
2266
2266
  editable: ie,
2267
- readOnly: z,
2267
+ readOnly: P,
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: E
2274
+ initialState: J
2275
2275
  });
2276
- if (Vn(e, () => ({
2277
- editor: P.current,
2278
- state: J,
2276
+ if (_n(e, () => ({
2277
+ editor: b.current,
2278
+ state: F,
2279
2279
  view: j
2280
- }), [P, Fe, J, j]), typeof n != "string")
2280
+ }), [b, Fe, F, j]), typeof n != "string")
2281
2281
  throw new Error("value must be typeof string but got " + typeof n);
2282
2282
  var Ne = typeof h == "string" ? "cm-theme-" + h : "cm-theme";
2283
- return /* @__PURE__ */ F.jsx("div", _n({
2284
- ref: P,
2283
+ return /* @__PURE__ */ N.jsx("div", Hn({
2284
+ ref: b,
2285
2285
  className: "" + Ne + (r ? " " + r : "")
2286
2286
  }, y));
2287
2287
  });
@@ -2297,7 +2297,7 @@ const Ni = [
2297
2297
  "[&_.cm-gutters]:text-grey-600 dark:[&_.cm-gutters]:text-grey-500",
2298
2298
  "[&_.cm-gutters]:border-grey-500 dark:[&_.cm-gutters]:border-grey-800",
2299
2299
  "[&_.cm-cursor]:border-grey-900 dark:[&_.cm-cursor]:border-grey-75"
2300
- ].join(" "), _i = Rt(function({
2300
+ ].join(" "), Hi = Rt(function({
2301
2301
  title: e,
2302
2302
  value: r,
2303
2303
  height: n = "200px",
@@ -2311,20 +2311,22 @@ const Ni = [
2311
2311
  className: h,
2312
2312
  ...m
2313
2313
  }, k) {
2314
- const S = Hn(), D = wt(null), [$, G] = ke(100), [_, K] = zn.useState(null), { setFocusState: H } = Un(), ie = (E) => {
2315
- c == null || c(E), H(!0);
2316
- }, z = (E) => {
2317
- u == null || u(E), H(!1);
2314
+ const C = Vn(), E = wt(null), [U, $] = ce(100), [V, G] = zn.useState(null), [K, ie] = ce({
2315
+ crosshairCursor: !1
2316
+ }), { setFocusState: P } = Un(), W = (b) => {
2317
+ c == null || c(b), P(!0);
2318
+ }, J = (b) => {
2319
+ u == null || u(b), P(!1);
2318
2320
  };
2319
- N(() => {
2320
- Promise.all(l).then(K);
2321
- }, [l]), N(() => {
2322
- const E = new ResizeObserver(([y]) => {
2323
- G(y.contentRect.width);
2321
+ q(() => {
2322
+ Promise.all(l).then(G), ie((b) => ({ setup: b, searchKeymap: !1 }));
2323
+ }, [l]), q(() => {
2324
+ const b = new ResizeObserver(([F]) => {
2325
+ $(F.contentRect.width);
2324
2326
  });
2325
- return E.observe(D.current), () => E.disconnect();
2327
+ return b.observe(E.current), () => b.disconnect();
2326
2328
  }, []);
2327
- const W = $n(
2329
+ const y = $n(
2328
2330
  "peer order-2 w-full max-w-full overflow-hidden rounded-sm border",
2329
2331
  s ? "bg-transparent" : "bg-grey-75",
2330
2332
  o ? "border-red" : "border-grey-500 dark:border-grey-800",
@@ -2333,29 +2335,30 @@ const Ni = [
2333
2335
  Ni,
2334
2336
  h
2335
2337
  );
2336
- return /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
2337
- /* @__PURE__ */ F.jsx("div", { ref: D }),
2338
- _ && /* @__PURE__ */ F.jsxs("div", { className: n === "full" ? "h-full" : "", style: { width: $ }, children: [
2339
- /* @__PURE__ */ F.jsx(
2338
+ return /* @__PURE__ */ N.jsxs(N.Fragment, { children: [
2339
+ /* @__PURE__ */ N.jsx("div", { ref: E }),
2340
+ V && /* @__PURE__ */ N.jsxs("div", { className: n === "full" ? "h-full" : "", style: { width: U }, children: [
2341
+ /* @__PURE__ */ N.jsx(
2340
2342
  Wn,
2341
2343
  {
2342
2344
  ref: k,
2343
- className: W,
2344
- extensions: _,
2345
+ basicSetup: K,
2346
+ className: y,
2347
+ extensions: V,
2345
2348
  height: n === "full" ? "100%" : n,
2346
2349
  value: r,
2347
- onBlur: z,
2350
+ onBlur: J,
2348
2351
  onChange: a,
2349
- onFocus: ie,
2352
+ onFocus: W,
2350
2353
  ...m
2351
2354
  }
2352
2355
  ),
2353
- e && /* @__PURE__ */ F.jsx(Gn, { className: "order-1 !text-grey-700 peer-focus:!text-black", htmlFor: S, useLabelTag: !0, children: e }),
2354
- i && /* @__PURE__ */ F.jsx(Kn, { className: "order-3", color: o ? "red" : "", children: i })
2356
+ e && /* @__PURE__ */ N.jsx(Gn, { className: "order-1 !text-grey-700 peer-focus:!text-black", htmlFor: C, useLabelTag: !0, children: e }),
2357
+ i && /* @__PURE__ */ N.jsx(Kn, { className: "order-3", color: o ? "red" : "", children: i })
2355
2358
  ] })
2356
2359
  ] });
2357
2360
  });
2358
2361
  export {
2359
- _i as default
2362
+ Hi as default
2360
2363
  };
2361
- //# sourceMappingURL=CodeEditorView-3275fab6.mjs.map
2364
+ //# sourceMappingURL=CodeEditorView-d4ee416e.mjs.map