@testsmith/api-spector 0.7.6 → 0.7.8

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 (31) hide show
  1. package/bin/cli.js +4 -0
  2. package/out/main/chunks/{broker-client-5IyCTx40.js → broker-client-BYpWeOWT.js} +4 -1
  3. package/out/main/chunks/{flow-engine-BVzjz4lJ.js → flow-engine-BxwjEy37.js} +66 -1
  4. package/out/main/chunks/{handle-DRmKOL-s.js → handle-Crv1i9hb.js} +61 -0
  5. package/out/main/chunks/{import-B5T5wDu7.js → import-DTcZMRNu.js} +2 -2
  6. package/out/main/chunks/perf-report-ChaO3K0w.js +124 -0
  7. package/out/main/chunks/perf-run-uZBqnG3S.js +578 -0
  8. package/out/main/chunks/{request-collection-KGPuvN7o.js → request-collection-gkOYlWml.js} +68 -11
  9. package/out/main/chunks/{request-exec-CwJ8_OKC.js → request-exec-Cv2jkrO1.js} +458 -12
  10. package/out/main/chunks/run-concurrent-468tH0AX.js +26 -0
  11. package/out/main/chunks/{soap-handler-DTfFnzNY.js → soap-handler-Brr7BPWO.js} +2 -2
  12. package/out/main/contract.js +6 -3
  13. package/out/main/flow.js +8 -5
  14. package/out/main/index.js +1338 -179
  15. package/out/main/lib.js +6 -3
  16. package/out/main/perf-worker.js +45 -0
  17. package/out/main/perf.js +253 -0
  18. package/out/main/runner.js +181 -7
  19. package/out/main/socketio.js +172 -0
  20. package/out/main/wsdl.js +3 -3
  21. package/out/preload/index.js +127 -0
  22. package/out/renderer/assets/{GraphQLEditor-CDLI1OHR.js → GraphQLEditor-Dv2K4wdd.js} +59 -14
  23. package/out/renderer/assets/{SoapEditor-CSUFJk7c.js → SoapEditor-Cnz3M4Dz.js} +3 -3
  24. package/out/renderer/assets/ajv-CJPwFjiP.js +6718 -0
  25. package/out/renderer/assets/{codemirror-F6m3Hm1M.js → codemirror-CdIFBPs2.js} +1214 -1207
  26. package/out/renderer/assets/{index-8bbf24uI.js → index-CtCdFiRx.js} +16957 -13834
  27. package/out/renderer/assets/index-DkhdKzQJ.css +627 -0
  28. package/out/renderer/index.html +4 -4
  29. package/package.json +12 -6
  30. package/out/renderer/assets/ajv-2MAg6kGF.js +0 -6153
  31. package/out/renderer/assets/index-CYArpqm5.css +0 -627
@@ -3,493 +3,499 @@ function getDefaultExportFromCjs(x) {
3
3
  }
4
4
  var jsxRuntime = { exports: {} };
5
5
  var reactJsxRuntime_production = {};
6
- /**
7
- * @license React
8
- * react-jsx-runtime.production.js
9
- *
10
- * Copyright (c) Meta Platforms, Inc. and affiliates.
11
- *
12
- * This source code is licensed under the MIT license found in the
13
- * LICENSE file in the root directory of this source tree.
14
- */
15
- var REACT_ELEMENT_TYPE$1 = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE$1 = Symbol.for("react.fragment");
16
- function jsxProd(type, config2, maybeKey) {
17
- var key = null;
18
- void 0 !== maybeKey && (key = "" + maybeKey);
19
- void 0 !== config2.key && (key = "" + config2.key);
20
- if ("key" in config2) {
21
- maybeKey = {};
22
- for (var propName in config2)
23
- "key" !== propName && (maybeKey[propName] = config2[propName]);
24
- } else maybeKey = config2;
25
- config2 = maybeKey.ref;
26
- return {
27
- $$typeof: REACT_ELEMENT_TYPE$1,
28
- type,
29
- key,
30
- ref: void 0 !== config2 ? config2 : null,
31
- props: maybeKey
32
- };
6
+ var hasRequiredReactJsxRuntime_production;
7
+ function requireReactJsxRuntime_production() {
8
+ if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
9
+ hasRequiredReactJsxRuntime_production = 1;
10
+ var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
11
+ function jsxProd(type, config2, maybeKey) {
12
+ var key = null;
13
+ void 0 !== maybeKey && (key = "" + maybeKey);
14
+ void 0 !== config2.key && (key = "" + config2.key);
15
+ if ("key" in config2) {
16
+ maybeKey = {};
17
+ for (var propName in config2)
18
+ "key" !== propName && (maybeKey[propName] = config2[propName]);
19
+ } else maybeKey = config2;
20
+ config2 = maybeKey.ref;
21
+ return {
22
+ $$typeof: REACT_ELEMENT_TYPE,
23
+ type,
24
+ key,
25
+ ref: void 0 !== config2 ? config2 : null,
26
+ props: maybeKey
27
+ };
28
+ }
29
+ reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
30
+ reactJsxRuntime_production.jsx = jsxProd;
31
+ reactJsxRuntime_production.jsxs = jsxProd;
32
+ return reactJsxRuntime_production;
33
33
  }
34
- reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE$1;
35
- reactJsxRuntime_production.jsx = jsxProd;
36
- reactJsxRuntime_production.jsxs = jsxProd;
37
- {
38
- jsxRuntime.exports = reactJsxRuntime_production;
34
+ var hasRequiredJsxRuntime;
35
+ function requireJsxRuntime() {
36
+ if (hasRequiredJsxRuntime) return jsxRuntime.exports;
37
+ hasRequiredJsxRuntime = 1;
38
+ {
39
+ jsxRuntime.exports = requireReactJsxRuntime_production();
40
+ }
41
+ return jsxRuntime.exports;
39
42
  }
40
- var jsxRuntimeExports = jsxRuntime.exports;
43
+ var jsxRuntimeExports = requireJsxRuntime();
41
44
  var react = { exports: {} };
42
45
  var react_production = {};
43
- /**
44
- * @license React
45
- * react.production.js
46
- *
47
- * Copyright (c) Meta Platforms, Inc. and affiliates.
48
- *
49
- * This source code is licensed under the MIT license found in the
50
- * LICENSE file in the root directory of this source tree.
51
- */
52
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
53
- function getIteratorFn(maybeIterable) {
54
- if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
55
- maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
56
- return "function" === typeof maybeIterable ? maybeIterable : null;
57
- }
58
- var ReactNoopUpdateQueue = {
59
- isMounted: function() {
60
- return false;
61
- },
62
- enqueueForceUpdate: function() {
63
- },
64
- enqueueReplaceState: function() {
65
- },
66
- enqueueSetState: function() {
67
- }
68
- }, assign = Object.assign, emptyObject = {};
69
- function Component(props, context, updater) {
70
- this.props = props;
71
- this.context = context;
72
- this.refs = emptyObject;
73
- this.updater = updater || ReactNoopUpdateQueue;
74
- }
75
- Component.prototype.isReactComponent = {};
76
- Component.prototype.setState = function(partialState, callback) {
77
- if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
78
- throw Error(
79
- "takes an object of state variables to update or a function which returns an object of state variables."
80
- );
81
- this.updater.enqueueSetState(this, partialState, callback, "setState");
82
- };
83
- Component.prototype.forceUpdate = function(callback) {
84
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
85
- };
86
- function ComponentDummy() {
87
- }
88
- ComponentDummy.prototype = Component.prototype;
89
- function PureComponent(props, context, updater) {
90
- this.props = props;
91
- this.context = context;
92
- this.refs = emptyObject;
93
- this.updater = updater || ReactNoopUpdateQueue;
94
- }
95
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
96
- pureComponentPrototype.constructor = PureComponent;
97
- assign(pureComponentPrototype, Component.prototype);
98
- pureComponentPrototype.isPureReactComponent = true;
99
- var isArrayImpl = Array.isArray;
100
- function noop() {
101
- }
102
- var ReactSharedInternals = { H: null, A: null, T: null, S: null }, hasOwnProperty = Object.prototype.hasOwnProperty;
103
- function ReactElement(type, key, props) {
104
- var refProp = props.ref;
105
- return {
106
- $$typeof: REACT_ELEMENT_TYPE,
107
- type,
108
- key,
109
- ref: void 0 !== refProp ? refProp : null,
110
- props
46
+ var hasRequiredReact_production;
47
+ function requireReact_production() {
48
+ if (hasRequiredReact_production) return react_production;
49
+ hasRequiredReact_production = 1;
50
+ var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
51
+ function getIteratorFn(maybeIterable) {
52
+ if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
53
+ maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
54
+ return "function" === typeof maybeIterable ? maybeIterable : null;
55
+ }
56
+ var ReactNoopUpdateQueue = {
57
+ isMounted: function() {
58
+ return false;
59
+ },
60
+ enqueueForceUpdate: function() {
61
+ },
62
+ enqueueReplaceState: function() {
63
+ },
64
+ enqueueSetState: function() {
65
+ }
66
+ }, assign = Object.assign, emptyObject = {};
67
+ function Component(props, context, updater) {
68
+ this.props = props;
69
+ this.context = context;
70
+ this.refs = emptyObject;
71
+ this.updater = updater || ReactNoopUpdateQueue;
72
+ }
73
+ Component.prototype.isReactComponent = {};
74
+ Component.prototype.setState = function(partialState, callback) {
75
+ if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
76
+ throw Error(
77
+ "takes an object of state variables to update or a function which returns an object of state variables."
78
+ );
79
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
111
80
  };
112
- }
113
- function cloneAndReplaceKey(oldElement, newKey) {
114
- return ReactElement(oldElement.type, newKey, oldElement.props);
115
- }
116
- function isValidElement(object) {
117
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
118
- }
119
- function escape(key) {
120
- var escaperLookup = { "=": "=0", ":": "=2" };
121
- return "$" + key.replace(/[=:]/g, function(match) {
122
- return escaperLookup[match];
123
- });
124
- }
125
- var userProvidedKeyEscapeRegex = /\/+/g;
126
- function getElementKey(element, index) {
127
- return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36);
128
- }
129
- function resolveThenable(thenable) {
130
- switch (thenable.status) {
131
- case "fulfilled":
132
- return thenable.value;
133
- case "rejected":
134
- throw thenable.reason;
135
- default:
136
- switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
137
- function(fulfilledValue) {
138
- "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
139
- },
140
- function(error) {
141
- "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
142
- }
143
- )), thenable.status) {
144
- case "fulfilled":
145
- return thenable.value;
146
- case "rejected":
147
- throw thenable.reason;
148
- }
81
+ Component.prototype.forceUpdate = function(callback) {
82
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
83
+ };
84
+ function ComponentDummy() {
149
85
  }
150
- throw thenable;
151
- }
152
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
153
- var type = typeof children;
154
- if ("undefined" === type || "boolean" === type) children = null;
155
- var invokeCallback = false;
156
- if (null === children) invokeCallback = true;
157
- else
158
- switch (type) {
159
- case "bigint":
160
- case "string":
161
- case "number":
162
- invokeCallback = true;
163
- break;
164
- case "object":
165
- switch (children.$$typeof) {
166
- case REACT_ELEMENT_TYPE:
167
- case REACT_PORTAL_TYPE:
168
- invokeCallback = true;
169
- break;
170
- case REACT_LAZY_TYPE:
171
- return invokeCallback = children._init, mapIntoArray(
172
- invokeCallback(children._payload),
173
- array,
174
- escapedPrefix,
175
- nameSoFar,
176
- callback
177
- );
86
+ ComponentDummy.prototype = Component.prototype;
87
+ function PureComponent(props, context, updater) {
88
+ this.props = props;
89
+ this.context = context;
90
+ this.refs = emptyObject;
91
+ this.updater = updater || ReactNoopUpdateQueue;
92
+ }
93
+ var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
94
+ pureComponentPrototype.constructor = PureComponent;
95
+ assign(pureComponentPrototype, Component.prototype);
96
+ pureComponentPrototype.isPureReactComponent = true;
97
+ var isArrayImpl = Array.isArray;
98
+ function noop() {
99
+ }
100
+ var ReactSharedInternals = { H: null, A: null, T: null, S: null }, hasOwnProperty = Object.prototype.hasOwnProperty;
101
+ function ReactElement(type, key, props) {
102
+ var refProp = props.ref;
103
+ return {
104
+ $$typeof: REACT_ELEMENT_TYPE,
105
+ type,
106
+ key,
107
+ ref: void 0 !== refProp ? refProp : null,
108
+ props
109
+ };
110
+ }
111
+ function cloneAndReplaceKey(oldElement, newKey) {
112
+ return ReactElement(oldElement.type, newKey, oldElement.props);
113
+ }
114
+ function isValidElement(object) {
115
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
116
+ }
117
+ function escape(key) {
118
+ var escaperLookup = { "=": "=0", ":": "=2" };
119
+ return "$" + key.replace(/[=:]/g, function(match) {
120
+ return escaperLookup[match];
121
+ });
122
+ }
123
+ var userProvidedKeyEscapeRegex = /\/+/g;
124
+ function getElementKey(element, index) {
125
+ return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36);
126
+ }
127
+ function resolveThenable(thenable) {
128
+ switch (thenable.status) {
129
+ case "fulfilled":
130
+ return thenable.value;
131
+ case "rejected":
132
+ throw thenable.reason;
133
+ default:
134
+ switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
135
+ function(fulfilledValue) {
136
+ "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
137
+ },
138
+ function(error) {
139
+ "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
140
+ }
141
+ )), thenable.status) {
142
+ case "fulfilled":
143
+ return thenable.value;
144
+ case "rejected":
145
+ throw thenable.reason;
178
146
  }
179
147
  }
180
- if (invokeCallback)
181
- return callback = callback(children), invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
182
- return c;
183
- })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(
184
- callback,
185
- escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(
186
- userProvidedKeyEscapeRegex,
187
- "$&/"
188
- ) + "/") + invokeCallback
189
- )), array.push(callback)), 1;
190
- invokeCallback = 0;
191
- var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
192
- if (isArrayImpl(children))
193
- for (var i = 0; i < children.length; i++)
194
- nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
195
- nameSoFar,
196
- array,
197
- escapedPrefix,
198
- type,
199
- callback
200
- );
201
- else if (i = getIteratorFn(children), "function" === typeof i)
202
- for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
203
- nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
204
- nameSoFar,
205
- array,
206
- escapedPrefix,
207
- type,
208
- callback
209
- );
210
- else if ("object" === type) {
211
- if ("function" === typeof children.then)
212
- return mapIntoArray(
213
- resolveThenable(children),
214
- array,
215
- escapedPrefix,
216
- nameSoFar,
217
- callback
218
- );
219
- array = String(children);
220
- throw Error(
221
- "Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
222
- );
148
+ throw thenable;
223
149
  }
224
- return invokeCallback;
225
- }
226
- function mapChildren(children, func, context) {
227
- if (null == children) return children;
228
- var result = [], count = 0;
229
- mapIntoArray(children, result, "", "", function(child) {
230
- return func.call(context, child, count++);
231
- });
232
- return result;
233
- }
234
- function lazyInitializer(payload) {
235
- if (-1 === payload._status) {
236
- var ctor = payload._result;
237
- ctor = ctor();
238
- ctor.then(
239
- function(moduleObject) {
240
- if (0 === payload._status || -1 === payload._status)
241
- payload._status = 1, payload._result = moduleObject;
242
- },
243
- function(error) {
244
- if (0 === payload._status || -1 === payload._status)
245
- payload._status = 2, payload._result = error;
150
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
151
+ var type = typeof children;
152
+ if ("undefined" === type || "boolean" === type) children = null;
153
+ var invokeCallback = false;
154
+ if (null === children) invokeCallback = true;
155
+ else
156
+ switch (type) {
157
+ case "bigint":
158
+ case "string":
159
+ case "number":
160
+ invokeCallback = true;
161
+ break;
162
+ case "object":
163
+ switch (children.$$typeof) {
164
+ case REACT_ELEMENT_TYPE:
165
+ case REACT_PORTAL_TYPE:
166
+ invokeCallback = true;
167
+ break;
168
+ case REACT_LAZY_TYPE:
169
+ return invokeCallback = children._init, mapIntoArray(
170
+ invokeCallback(children._payload),
171
+ array,
172
+ escapedPrefix,
173
+ nameSoFar,
174
+ callback
175
+ );
176
+ }
246
177
  }
247
- );
248
- -1 === payload._status && (payload._status = 0, payload._result = ctor);
249
- }
250
- if (1 === payload._status) return payload._result.default;
251
- throw payload._result;
252
- }
253
- var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
254
- if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
255
- var event = new window.ErrorEvent("error", {
256
- bubbles: true,
257
- cancelable: true,
258
- message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
259
- error
260
- });
261
- if (!window.dispatchEvent(event)) return;
262
- } else if ("object" === typeof process && "function" === typeof process.emit) {
263
- process.emit("uncaughtException", error);
264
- return;
265
- }
266
- console.error(error);
267
- }, Children = {
268
- map: mapChildren,
269
- forEach: function(children, forEachFunc, forEachContext) {
270
- mapChildren(
271
- children,
272
- function() {
273
- forEachFunc.apply(this, arguments);
274
- },
275
- forEachContext
276
- );
277
- },
278
- count: function(children) {
279
- var n = 0;
280
- mapChildren(children, function() {
281
- n++;
282
- });
283
- return n;
284
- },
285
- toArray: function(children) {
286
- return mapChildren(children, function(child) {
287
- return child;
288
- }) || [];
289
- },
290
- only: function(children) {
291
- if (!isValidElement(children))
178
+ if (invokeCallback)
179
+ return callback = callback(children), invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
180
+ return c;
181
+ })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(
182
+ callback,
183
+ escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(
184
+ userProvidedKeyEscapeRegex,
185
+ "$&/"
186
+ ) + "/") + invokeCallback
187
+ )), array.push(callback)), 1;
188
+ invokeCallback = 0;
189
+ var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
190
+ if (isArrayImpl(children))
191
+ for (var i2 = 0; i2 < children.length; i2++)
192
+ nameSoFar = children[i2], type = nextNamePrefix + getElementKey(nameSoFar, i2), invokeCallback += mapIntoArray(
193
+ nameSoFar,
194
+ array,
195
+ escapedPrefix,
196
+ type,
197
+ callback
198
+ );
199
+ else if (i2 = getIteratorFn(children), "function" === typeof i2)
200
+ for (children = i2.call(children), i2 = 0; !(nameSoFar = children.next()).done; )
201
+ nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i2++), invokeCallback += mapIntoArray(
202
+ nameSoFar,
203
+ array,
204
+ escapedPrefix,
205
+ type,
206
+ callback
207
+ );
208
+ else if ("object" === type) {
209
+ if ("function" === typeof children.then)
210
+ return mapIntoArray(
211
+ resolveThenable(children),
212
+ array,
213
+ escapedPrefix,
214
+ nameSoFar,
215
+ callback
216
+ );
217
+ array = String(children);
292
218
  throw Error(
293
- "React.Children.only expected to receive a single React element child."
219
+ "Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
294
220
  );
295
- return children;
221
+ }
222
+ return invokeCallback;
296
223
  }
297
- };
298
- react_production.Activity = REACT_ACTIVITY_TYPE;
299
- react_production.Children = Children;
300
- react_production.Component = Component;
301
- react_production.Fragment = REACT_FRAGMENT_TYPE;
302
- react_production.Profiler = REACT_PROFILER_TYPE;
303
- react_production.PureComponent = PureComponent;
304
- react_production.StrictMode = REACT_STRICT_MODE_TYPE;
305
- react_production.Suspense = REACT_SUSPENSE_TYPE;
306
- react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
307
- react_production.__COMPILER_RUNTIME = {
308
- __proto__: null,
309
- c: function(size) {
310
- return ReactSharedInternals.H.useMemoCache(size);
224
+ function mapChildren(children, func, context) {
225
+ if (null == children) return children;
226
+ var result = [], count = 0;
227
+ mapIntoArray(children, result, "", "", function(child) {
228
+ return func.call(context, child, count++);
229
+ });
230
+ return result;
311
231
  }
312
- };
313
- react_production.cache = function(fn) {
314
- return function() {
315
- return fn.apply(null, arguments);
232
+ function lazyInitializer(payload) {
233
+ if (-1 === payload._status) {
234
+ var ctor = payload._result;
235
+ ctor = ctor();
236
+ ctor.then(
237
+ function(moduleObject) {
238
+ if (0 === payload._status || -1 === payload._status)
239
+ payload._status = 1, payload._result = moduleObject;
240
+ },
241
+ function(error) {
242
+ if (0 === payload._status || -1 === payload._status)
243
+ payload._status = 2, payload._result = error;
244
+ }
245
+ );
246
+ -1 === payload._status && (payload._status = 0, payload._result = ctor);
247
+ }
248
+ if (1 === payload._status) return payload._result.default;
249
+ throw payload._result;
250
+ }
251
+ var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
252
+ if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
253
+ var event = new window.ErrorEvent("error", {
254
+ bubbles: true,
255
+ cancelable: true,
256
+ message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
257
+ error
258
+ });
259
+ if (!window.dispatchEvent(event)) return;
260
+ } else if ("object" === typeof process && "function" === typeof process.emit) {
261
+ process.emit("uncaughtException", error);
262
+ return;
263
+ }
264
+ console.error(error);
265
+ }, Children = {
266
+ map: mapChildren,
267
+ forEach: function(children, forEachFunc, forEachContext) {
268
+ mapChildren(
269
+ children,
270
+ function() {
271
+ forEachFunc.apply(this, arguments);
272
+ },
273
+ forEachContext
274
+ );
275
+ },
276
+ count: function(children) {
277
+ var n = 0;
278
+ mapChildren(children, function() {
279
+ n++;
280
+ });
281
+ return n;
282
+ },
283
+ toArray: function(children) {
284
+ return mapChildren(children, function(child) {
285
+ return child;
286
+ }) || [];
287
+ },
288
+ only: function(children) {
289
+ if (!isValidElement(children))
290
+ throw Error(
291
+ "React.Children.only expected to receive a single React element child."
292
+ );
293
+ return children;
294
+ }
316
295
  };
317
- };
318
- react_production.cacheSignal = function() {
319
- return null;
320
- };
321
- react_production.cloneElement = function(element, config2, children) {
322
- if (null === element || void 0 === element)
323
- throw Error(
324
- "The argument must be a React element, but you passed " + element + "."
325
- );
326
- var props = assign({}, element.props), key = element.key;
327
- if (null != config2)
328
- for (propName in void 0 !== config2.key && (key = "" + config2.key), config2)
329
- !hasOwnProperty.call(config2, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config2.ref || (props[propName] = config2[propName]);
330
- var propName = arguments.length - 2;
331
- if (1 === propName) props.children = children;
332
- else if (1 < propName) {
333
- for (var childArray = Array(propName), i = 0; i < propName; i++)
334
- childArray[i] = arguments[i + 2];
335
- props.children = childArray;
336
- }
337
- return ReactElement(element.type, key, props);
338
- };
339
- react_production.createContext = function(defaultValue) {
340
- defaultValue = {
341
- $$typeof: REACT_CONTEXT_TYPE,
342
- _currentValue: defaultValue,
343
- _currentValue2: defaultValue,
344
- _threadCount: 0,
345
- Provider: null,
346
- Consumer: null
296
+ react_production.Activity = REACT_ACTIVITY_TYPE;
297
+ react_production.Children = Children;
298
+ react_production.Component = Component;
299
+ react_production.Fragment = REACT_FRAGMENT_TYPE;
300
+ react_production.Profiler = REACT_PROFILER_TYPE;
301
+ react_production.PureComponent = PureComponent;
302
+ react_production.StrictMode = REACT_STRICT_MODE_TYPE;
303
+ react_production.Suspense = REACT_SUSPENSE_TYPE;
304
+ react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
305
+ react_production.__COMPILER_RUNTIME = {
306
+ __proto__: null,
307
+ c: function(size) {
308
+ return ReactSharedInternals.H.useMemoCache(size);
309
+ }
347
310
  };
348
- defaultValue.Provider = defaultValue;
349
- defaultValue.Consumer = {
350
- $$typeof: REACT_CONSUMER_TYPE,
351
- _context: defaultValue
311
+ react_production.cache = function(fn) {
312
+ return function() {
313
+ return fn.apply(null, arguments);
314
+ };
352
315
  };
353
- return defaultValue;
354
- };
355
- react_production.createElement = function(type, config2, children) {
356
- var propName, props = {}, key = null;
357
- if (null != config2)
358
- for (propName in void 0 !== config2.key && (key = "" + config2.key), config2)
359
- hasOwnProperty.call(config2, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config2[propName]);
360
- var childrenLength = arguments.length - 2;
361
- if (1 === childrenLength) props.children = children;
362
- else if (1 < childrenLength) {
363
- for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
364
- childArray[i] = arguments[i + 2];
365
- props.children = childArray;
366
- }
367
- if (type && type.defaultProps)
368
- for (propName in childrenLength = type.defaultProps, childrenLength)
369
- void 0 === props[propName] && (props[propName] = childrenLength[propName]);
370
- return ReactElement(type, key, props);
371
- };
372
- react_production.createRef = function() {
373
- return { current: null };
374
- };
375
- react_production.forwardRef = function(render) {
376
- return { $$typeof: REACT_FORWARD_REF_TYPE, render };
377
- };
378
- react_production.isValidElement = isValidElement;
379
- react_production.lazy = function(ctor) {
380
- return {
381
- $$typeof: REACT_LAZY_TYPE,
382
- _payload: { _status: -1, _result: ctor },
383
- _init: lazyInitializer
316
+ react_production.cacheSignal = function() {
317
+ return null;
384
318
  };
385
- };
386
- react_production.memo = function(type, compare2) {
387
- return {
388
- $$typeof: REACT_MEMO_TYPE,
389
- type,
390
- compare: void 0 === compare2 ? null : compare2
319
+ react_production.cloneElement = function(element, config2, children) {
320
+ if (null === element || void 0 === element)
321
+ throw Error(
322
+ "The argument must be a React element, but you passed " + element + "."
323
+ );
324
+ var props = assign({}, element.props), key = element.key;
325
+ if (null != config2)
326
+ for (propName in void 0 !== config2.key && (key = "" + config2.key), config2)
327
+ !hasOwnProperty.call(config2, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config2.ref || (props[propName] = config2[propName]);
328
+ var propName = arguments.length - 2;
329
+ if (1 === propName) props.children = children;
330
+ else if (1 < propName) {
331
+ for (var childArray = Array(propName), i2 = 0; i2 < propName; i2++)
332
+ childArray[i2] = arguments[i2 + 2];
333
+ props.children = childArray;
334
+ }
335
+ return ReactElement(element.type, key, props);
391
336
  };
392
- };
393
- react_production.startTransition = function(scope) {
394
- var prevTransition = ReactSharedInternals.T, currentTransition = {};
395
- ReactSharedInternals.T = currentTransition;
396
- try {
397
- var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
398
- null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
399
- "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
400
- } catch (error) {
401
- reportGlobalError(error);
402
- } finally {
403
- null !== prevTransition && null !== currentTransition.types && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
337
+ react_production.createContext = function(defaultValue) {
338
+ defaultValue = {
339
+ $$typeof: REACT_CONTEXT_TYPE,
340
+ _currentValue: defaultValue,
341
+ _currentValue2: defaultValue,
342
+ _threadCount: 0,
343
+ Provider: null,
344
+ Consumer: null
345
+ };
346
+ defaultValue.Provider = defaultValue;
347
+ defaultValue.Consumer = {
348
+ $$typeof: REACT_CONSUMER_TYPE,
349
+ _context: defaultValue
350
+ };
351
+ return defaultValue;
352
+ };
353
+ react_production.createElement = function(type, config2, children) {
354
+ var propName, props = {}, key = null;
355
+ if (null != config2)
356
+ for (propName in void 0 !== config2.key && (key = "" + config2.key), config2)
357
+ hasOwnProperty.call(config2, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config2[propName]);
358
+ var childrenLength = arguments.length - 2;
359
+ if (1 === childrenLength) props.children = children;
360
+ else if (1 < childrenLength) {
361
+ for (var childArray = Array(childrenLength), i2 = 0; i2 < childrenLength; i2++)
362
+ childArray[i2] = arguments[i2 + 2];
363
+ props.children = childArray;
364
+ }
365
+ if (type && type.defaultProps)
366
+ for (propName in childrenLength = type.defaultProps, childrenLength)
367
+ void 0 === props[propName] && (props[propName] = childrenLength[propName]);
368
+ return ReactElement(type, key, props);
369
+ };
370
+ react_production.createRef = function() {
371
+ return { current: null };
372
+ };
373
+ react_production.forwardRef = function(render) {
374
+ return { $$typeof: REACT_FORWARD_REF_TYPE, render };
375
+ };
376
+ react_production.isValidElement = isValidElement;
377
+ react_production.lazy = function(ctor) {
378
+ return {
379
+ $$typeof: REACT_LAZY_TYPE,
380
+ _payload: { _status: -1, _result: ctor },
381
+ _init: lazyInitializer
382
+ };
383
+ };
384
+ react_production.memo = function(type, compare2) {
385
+ return {
386
+ $$typeof: REACT_MEMO_TYPE,
387
+ type,
388
+ compare: void 0 === compare2 ? null : compare2
389
+ };
390
+ };
391
+ react_production.startTransition = function(scope) {
392
+ var prevTransition = ReactSharedInternals.T, currentTransition = {};
393
+ ReactSharedInternals.T = currentTransition;
394
+ try {
395
+ var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
396
+ null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
397
+ "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
398
+ } catch (error) {
399
+ reportGlobalError(error);
400
+ } finally {
401
+ null !== prevTransition && null !== currentTransition.types && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
402
+ }
403
+ };
404
+ react_production.unstable_useCacheRefresh = function() {
405
+ return ReactSharedInternals.H.useCacheRefresh();
406
+ };
407
+ react_production.use = function(usable) {
408
+ return ReactSharedInternals.H.use(usable);
409
+ };
410
+ react_production.useActionState = function(action, initialState, permalink) {
411
+ return ReactSharedInternals.H.useActionState(action, initialState, permalink);
412
+ };
413
+ react_production.useCallback = function(callback, deps) {
414
+ return ReactSharedInternals.H.useCallback(callback, deps);
415
+ };
416
+ react_production.useContext = function(Context) {
417
+ return ReactSharedInternals.H.useContext(Context);
418
+ };
419
+ react_production.useDebugValue = function() {
420
+ };
421
+ react_production.useDeferredValue = function(value, initialValue) {
422
+ return ReactSharedInternals.H.useDeferredValue(value, initialValue);
423
+ };
424
+ react_production.useEffect = function(create, deps) {
425
+ return ReactSharedInternals.H.useEffect(create, deps);
426
+ };
427
+ react_production.useEffectEvent = function(callback) {
428
+ return ReactSharedInternals.H.useEffectEvent(callback);
429
+ };
430
+ react_production.useId = function() {
431
+ return ReactSharedInternals.H.useId();
432
+ };
433
+ react_production.useImperativeHandle = function(ref, create, deps) {
434
+ return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
435
+ };
436
+ react_production.useInsertionEffect = function(create, deps) {
437
+ return ReactSharedInternals.H.useInsertionEffect(create, deps);
438
+ };
439
+ react_production.useLayoutEffect = function(create, deps) {
440
+ return ReactSharedInternals.H.useLayoutEffect(create, deps);
441
+ };
442
+ react_production.useMemo = function(create, deps) {
443
+ return ReactSharedInternals.H.useMemo(create, deps);
444
+ };
445
+ react_production.useOptimistic = function(passthrough, reducer) {
446
+ return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
447
+ };
448
+ react_production.useReducer = function(reducer, initialArg, init) {
449
+ return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
450
+ };
451
+ react_production.useRef = function(initialValue) {
452
+ return ReactSharedInternals.H.useRef(initialValue);
453
+ };
454
+ react_production.useState = function(initialState) {
455
+ return ReactSharedInternals.H.useState(initialState);
456
+ };
457
+ react_production.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
458
+ return ReactSharedInternals.H.useSyncExternalStore(
459
+ subscribe,
460
+ getSnapshot,
461
+ getServerSnapshot
462
+ );
463
+ };
464
+ react_production.useTransition = function() {
465
+ return ReactSharedInternals.H.useTransition();
466
+ };
467
+ react_production.version = "19.2.4";
468
+ return react_production;
469
+ }
470
+ var hasRequiredReact;
471
+ function requireReact() {
472
+ if (hasRequiredReact) return react.exports;
473
+ hasRequiredReact = 1;
474
+ {
475
+ react.exports = requireReact_production();
404
476
  }
405
- };
406
- react_production.unstable_useCacheRefresh = function() {
407
- return ReactSharedInternals.H.useCacheRefresh();
408
- };
409
- react_production.use = function(usable) {
410
- return ReactSharedInternals.H.use(usable);
411
- };
412
- react_production.useActionState = function(action, initialState, permalink) {
413
- return ReactSharedInternals.H.useActionState(action, initialState, permalink);
414
- };
415
- react_production.useCallback = function(callback, deps) {
416
- return ReactSharedInternals.H.useCallback(callback, deps);
417
- };
418
- react_production.useContext = function(Context) {
419
- return ReactSharedInternals.H.useContext(Context);
420
- };
421
- react_production.useDebugValue = function() {
422
- };
423
- react_production.useDeferredValue = function(value, initialValue) {
424
- return ReactSharedInternals.H.useDeferredValue(value, initialValue);
425
- };
426
- react_production.useEffect = function(create, deps) {
427
- return ReactSharedInternals.H.useEffect(create, deps);
428
- };
429
- react_production.useEffectEvent = function(callback) {
430
- return ReactSharedInternals.H.useEffectEvent(callback);
431
- };
432
- react_production.useId = function() {
433
- return ReactSharedInternals.H.useId();
434
- };
435
- react_production.useImperativeHandle = function(ref, create, deps) {
436
- return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
437
- };
438
- react_production.useInsertionEffect = function(create, deps) {
439
- return ReactSharedInternals.H.useInsertionEffect(create, deps);
440
- };
441
- react_production.useLayoutEffect = function(create, deps) {
442
- return ReactSharedInternals.H.useLayoutEffect(create, deps);
443
- };
444
- react_production.useMemo = function(create, deps) {
445
- return ReactSharedInternals.H.useMemo(create, deps);
446
- };
447
- react_production.useOptimistic = function(passthrough, reducer) {
448
- return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
449
- };
450
- react_production.useReducer = function(reducer, initialArg, init) {
451
- return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
452
- };
453
- react_production.useRef = function(initialValue) {
454
- return ReactSharedInternals.H.useRef(initialValue);
455
- };
456
- react_production.useState = function(initialState) {
457
- return ReactSharedInternals.H.useState(initialState);
458
- };
459
- react_production.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
460
- return ReactSharedInternals.H.useSyncExternalStore(
461
- subscribe,
462
- getSnapshot,
463
- getServerSnapshot
464
- );
465
- };
466
- react_production.useTransition = function() {
467
- return ReactSharedInternals.H.useTransition();
468
- };
469
- react_production.version = "19.2.4";
470
- {
471
- react.exports = react_production;
477
+ return react.exports;
472
478
  }
473
- var reactExports = react.exports;
479
+ var reactExports = requireReact();
474
480
  const React = /* @__PURE__ */ getDefaultExportFromCjs(reactExports);
475
481
  let rangeFrom = [], rangeTo = [];
476
482
  (() => {
477
483
  let numbers = "lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((s) => s ? parseInt(s, 36) : 1);
478
- for (let i = 0, n = 0; i < numbers.length; i++)
479
- (i % 2 ? rangeTo : rangeFrom).push(n = n + numbers[i]);
484
+ for (let i2 = 0, n = 0; i2 < numbers.length; i2++)
485
+ (i2 % 2 ? rangeTo : rangeFrom).push(n = n + numbers[i2]);
480
486
  })();
481
- function isExtendingChar(code) {
482
- if (code < 768) return false;
487
+ function isExtendingChar(code2) {
488
+ if (code2 < 768) return false;
483
489
  for (let from = 0, to = rangeFrom.length; ; ) {
484
490
  let mid = from + to >> 1;
485
- if (code < rangeFrom[mid]) to = mid;
486
- else if (code >= rangeTo[mid]) from = mid + 1;
491
+ if (code2 < rangeFrom[mid]) to = mid;
492
+ else if (code2 >= rangeTo[mid]) from = mid + 1;
487
493
  else return true;
488
494
  if (from == to) return false;
489
495
  }
490
496
  }
491
- function isRegionalIndicator(code) {
492
- return code >= 127462 && code <= 127487;
497
+ function isRegionalIndicator(code2) {
498
+ return code2 >= 127462 && code2 <= 127487;
493
499
  }
494
500
  const ZWJ = 8205;
495
501
  function findClusterBreak$1(str, pos, forward = true, includeExtending = true) {
@@ -506,10 +512,10 @@ function nextClusterBreak(str, pos, includeExtending) {
506
512
  pos += codePointSize$1(next);
507
513
  prev = next;
508
514
  } else if (isRegionalIndicator(next)) {
509
- let countBefore = 0, i = pos - 2;
510
- while (i >= 0 && isRegionalIndicator(codePointAt$1(str, i))) {
515
+ let countBefore = 0, i2 = pos - 2;
516
+ while (i2 >= 0 && isRegionalIndicator(codePointAt$1(str, i2))) {
511
517
  countBefore++;
512
- i -= 2;
518
+ i2 -= 2;
513
519
  }
514
520
  if (countBefore % 2 == 0) break;
515
521
  else pos += 2;
@@ -540,8 +546,8 @@ function surrogateLow$1(ch) {
540
546
  function surrogateHigh$1(ch) {
541
547
  return ch >= 55296 && ch < 56320;
542
548
  }
543
- function codePointSize$1(code) {
544
- return code < 65536 ? 1 : 2;
549
+ function codePointSize$1(code2) {
550
+ return code2 < 65536 ? 1 : 2;
545
551
  }
546
552
  class Text {
547
553
  /**
@@ -705,8 +711,8 @@ class TextLeaf extends Text {
705
711
  return null;
706
712
  }
707
713
  lineInner(target, isLine, line, offset) {
708
- for (let i = 0; ; i++) {
709
- let string2 = this.text[i], end = offset + string2.length;
714
+ for (let i2 = 0; ; i2++) {
715
+ let string2 = this.text[i2], end = offset + string2.length;
710
716
  if ((isLine ? line : end) >= target)
711
717
  return new Line(offset, end, line, string2);
712
718
  offset = end + 1;
@@ -741,9 +747,9 @@ class TextLeaf extends Text {
741
747
  sliceString(from, to = this.length, lineSep = "\n") {
742
748
  [from, to] = clip(this, from, to);
743
749
  let result = "";
744
- for (let pos = 0, i = 0; pos <= to && i < this.text.length; i++) {
745
- let line = this.text[i], end = pos + line.length;
746
- if (pos > from && i)
750
+ for (let pos = 0, i2 = 0; pos <= to && i2 < this.text.length; i2++) {
751
+ let line = this.text[i2], end = pos + line.length;
752
+ if (pos > from && i2)
747
753
  result += lineSep;
748
754
  if (from < end && to > pos)
749
755
  result += line.slice(Math.max(0, from - pos), to - pos);
@@ -784,8 +790,8 @@ class TextNode extends Text {
784
790
  this.lines += child.lines;
785
791
  }
786
792
  lineInner(target, isLine, line, offset) {
787
- for (let i = 0; ; i++) {
788
- let child = this.children[i], end = offset + child.length, endLine = line + child.lines - 1;
793
+ for (let i2 = 0; ; i2++) {
794
+ let child = this.children[i2], end = offset + child.length, endLine = line + child.lines - 1;
789
795
  if ((isLine ? endLine : end) >= target)
790
796
  return child.lineInner(target, isLine, line, offset);
791
797
  offset = end + 1;
@@ -793,8 +799,8 @@ class TextNode extends Text {
793
799
  }
794
800
  }
795
801
  decompose(from, to, target, open) {
796
- for (let i = 0, pos = 0; pos <= to && i < this.children.length; i++) {
797
- let child = this.children[i], end = pos + child.length;
802
+ for (let i2 = 0, pos = 0; pos <= to && i2 < this.children.length; i2++) {
803
+ let child = this.children[i2], end = pos + child.length;
798
804
  if (from <= end && to >= pos) {
799
805
  let childOpen = open & ((pos <= from ? 1 : 0) | (end >= to ? 2 : 0));
800
806
  if (pos >= from && end <= to && !childOpen)
@@ -808,14 +814,14 @@ class TextNode extends Text {
808
814
  replace(from, to, text) {
809
815
  [from, to] = clip(this, from, to);
810
816
  if (text.lines < this.lines)
811
- for (let i = 0, pos = 0; i < this.children.length; i++) {
812
- let child = this.children[i], end = pos + child.length;
817
+ for (let i2 = 0, pos = 0; i2 < this.children.length; i2++) {
818
+ let child = this.children[i2], end = pos + child.length;
813
819
  if (from >= pos && to <= end) {
814
820
  let updated = child.replace(from - pos, to - pos, text);
815
821
  let totalLines = this.lines - child.lines + updated.lines;
816
822
  if (updated.lines < totalLines >> 5 - 1 && updated.lines > totalLines >> 5 + 1) {
817
823
  let copy = this.children.slice();
818
- copy[i] = updated;
824
+ copy[i2] = updated;
819
825
  return new TextNode(copy, this.length - (to - from) + text.length);
820
826
  }
821
827
  return super.replace(pos, end, updated);
@@ -827,9 +833,9 @@ class TextNode extends Text {
827
833
  sliceString(from, to = this.length, lineSep = "\n") {
828
834
  [from, to] = clip(this, from, to);
829
835
  let result = "";
830
- for (let i = 0, pos = 0; i < this.children.length && pos <= to; i++) {
831
- let child = this.children[i], end = pos + child.length;
832
- if (pos > from && i)
836
+ for (let i2 = 0, pos = 0; i2 < this.children.length && pos <= to; i2++) {
837
+ let child = this.children[i2], end = pos + child.length;
838
+ if (pos > from && i2)
833
839
  result += lineSep;
834
840
  if (from < end && to > pos)
835
841
  result += child.sliceString(from - pos, to - pos, lineSep);
@@ -912,8 +918,8 @@ function textLength(text) {
912
918
  return length;
913
919
  }
914
920
  function appendText(text, target, from = 0, to = 1e9) {
915
- for (let pos = 0, i = 0, first = true; i < text.length && pos <= to; i++) {
916
- let line = text[i], end = pos + line.length;
921
+ for (let pos = 0, i2 = 0, first = true; i2 < text.length && pos <= to; i2++) {
922
+ let line = text[i2], end = pos + line.length;
917
923
  if (end >= from) {
918
924
  if (end > to)
919
925
  line = line.slice(0, to - pos);
@@ -1111,23 +1117,23 @@ function codePointAt(str, pos) {
1111
1117
  return code0;
1112
1118
  return (code0 - 55296 << 10) + (code1 - 56320) + 65536;
1113
1119
  }
1114
- function fromCodePoint(code) {
1115
- if (code <= 65535)
1116
- return String.fromCharCode(code);
1117
- code -= 65536;
1118
- return String.fromCharCode((code >> 10) + 55296, (code & 1023) + 56320);
1120
+ function fromCodePoint(code2) {
1121
+ if (code2 <= 65535)
1122
+ return String.fromCharCode(code2);
1123
+ code2 -= 65536;
1124
+ return String.fromCharCode((code2 >> 10) + 55296, (code2 & 1023) + 56320);
1119
1125
  }
1120
- function codePointSize(code) {
1121
- return code < 65536 ? 1 : 2;
1126
+ function codePointSize(code2) {
1127
+ return code2 < 65536 ? 1 : 2;
1122
1128
  }
1123
1129
  const DefaultSplit = /\r\n?|\n/;
1124
- var MapMode = /* @__PURE__ */ function(MapMode2) {
1130
+ var MapMode = /* @__PURE__ */ (function(MapMode2) {
1125
1131
  MapMode2[MapMode2["Simple"] = 0] = "Simple";
1126
1132
  MapMode2[MapMode2["TrackDel"] = 1] = "TrackDel";
1127
1133
  MapMode2[MapMode2["TrackBefore"] = 2] = "TrackBefore";
1128
1134
  MapMode2[MapMode2["TrackAfter"] = 3] = "TrackAfter";
1129
1135
  return MapMode2;
1130
- }(MapMode || (MapMode = {}));
1136
+ })(MapMode || (MapMode = {}));
1131
1137
  class ChangeDesc {
1132
1138
  // Sections are encoded as pairs of integers. The first is the
1133
1139
  // length in the current document, and the second is -1 for
@@ -1145,8 +1151,8 @@ class ChangeDesc {
1145
1151
  */
1146
1152
  get length() {
1147
1153
  let result = 0;
1148
- for (let i = 0; i < this.sections.length; i += 2)
1149
- result += this.sections[i];
1154
+ for (let i2 = 0; i2 < this.sections.length; i2 += 2)
1155
+ result += this.sections[i2];
1150
1156
  return result;
1151
1157
  }
1152
1158
  /**
@@ -1154,9 +1160,9 @@ class ChangeDesc {
1154
1160
  */
1155
1161
  get newLength() {
1156
1162
  let result = 0;
1157
- for (let i = 0; i < this.sections.length; i += 2) {
1158
- let ins = this.sections[i + 1];
1159
- result += ins < 0 ? this.sections[i] : ins;
1163
+ for (let i2 = 0; i2 < this.sections.length; i2 += 2) {
1164
+ let ins = this.sections[i2 + 1];
1165
+ result += ins < 0 ? this.sections[i2] : ins;
1160
1166
  }
1161
1167
  return result;
1162
1168
  }
@@ -1172,8 +1178,8 @@ class ChangeDesc {
1172
1178
  the new position in the changed document.
1173
1179
  */
1174
1180
  iterGaps(f) {
1175
- for (let i = 0, posA = 0, posB = 0; i < this.sections.length; ) {
1176
- let len = this.sections[i++], ins = this.sections[i++];
1181
+ for (let i2 = 0, posA = 0, posB = 0; i2 < this.sections.length; ) {
1182
+ let len = this.sections[i2++], ins = this.sections[i2++];
1177
1183
  if (ins < 0) {
1178
1184
  f(posA, posB, len);
1179
1185
  posB += len;
@@ -1203,8 +1209,8 @@ class ChangeDesc {
1203
1209
  */
1204
1210
  get invertedDesc() {
1205
1211
  let sections = [];
1206
- for (let i = 0; i < this.sections.length; ) {
1207
- let len = this.sections[i++], ins = this.sections[i++];
1212
+ for (let i2 = 0; i2 < this.sections.length; ) {
1213
+ let len = this.sections[i2++], ins = this.sections[i2++];
1208
1214
  if (ins < 0)
1209
1215
  sections.push(len, ins);
1210
1216
  else
@@ -1231,8 +1237,8 @@ class ChangeDesc {
1231
1237
  }
1232
1238
  mapPos(pos, assoc = -1, mode = MapMode.Simple) {
1233
1239
  let posA = 0, posB = 0;
1234
- for (let i = 0; i < this.sections.length; ) {
1235
- let len = this.sections[i++], ins = this.sections[i++], endA = posA + len;
1240
+ for (let i2 = 0; i2 < this.sections.length; ) {
1241
+ let len = this.sections[i2++], ins = this.sections[i2++], endA = posA + len;
1236
1242
  if (ins < 0) {
1237
1243
  if (endA > pos)
1238
1244
  return posB + (pos - posA);
@@ -1256,8 +1262,8 @@ class ChangeDesc {
1256
1262
  returned.
1257
1263
  */
1258
1264
  touchesRange(from, to = from) {
1259
- for (let i = 0, pos = 0; i < this.sections.length && pos <= to; ) {
1260
- let len = this.sections[i++], ins = this.sections[i++], end = pos + len;
1265
+ for (let i2 = 0, pos = 0; i2 < this.sections.length && pos <= to; ) {
1266
+ let len = this.sections[i2++], ins = this.sections[i2++], end = pos + len;
1261
1267
  if (ins >= 0 && pos <= to && end >= from)
1262
1268
  return pos < from && end > to ? "cover" : true;
1263
1269
  pos = end;
@@ -1269,8 +1275,8 @@ class ChangeDesc {
1269
1275
  */
1270
1276
  toString() {
1271
1277
  let result = "";
1272
- for (let i = 0; i < this.sections.length; ) {
1273
- let len = this.sections[i++], ins = this.sections[i++];
1278
+ for (let i2 = 0; i2 < this.sections.length; ) {
1279
+ let len = this.sections[i2++], ins = this.sections[i2++];
1274
1280
  result += (result ? " " : "") + len + (ins >= 0 ? ":" + ins : "");
1275
1281
  }
1276
1282
  return result;
@@ -1323,12 +1329,12 @@ class ChangeSet extends ChangeDesc {
1323
1329
  */
1324
1330
  invert(doc2) {
1325
1331
  let sections = this.sections.slice(), inserted = [];
1326
- for (let i = 0, pos = 0; i < sections.length; i += 2) {
1327
- let len = sections[i], ins = sections[i + 1];
1332
+ for (let i2 = 0, pos = 0; i2 < sections.length; i2 += 2) {
1333
+ let len = sections[i2], ins = sections[i2 + 1];
1328
1334
  if (ins >= 0) {
1329
- sections[i] = ins;
1330
- sections[i + 1] = len;
1331
- let index = i >> 1;
1335
+ sections[i2] = ins;
1336
+ sections[i2 + 1] = len;
1337
+ let index = i2 >> 1;
1332
1338
  while (inserted.length < index)
1333
1339
  inserted.push(Text.empty);
1334
1340
  inserted.push(len ? doc2.slice(pos, pos + len) : Text.empty);
@@ -1387,8 +1393,8 @@ class ChangeSet extends ChangeDesc {
1387
1393
  filter(ranges) {
1388
1394
  let resultSections = [], resultInserted = [], filteredSections = [];
1389
1395
  let iter = new SectionIter(this);
1390
- done: for (let i = 0, pos = 0; ; ) {
1391
- let next = i == ranges.length ? 1e9 : ranges[i++];
1396
+ done: for (let i2 = 0, pos = 0; ; ) {
1397
+ let next = i2 == ranges.length ? 1e9 : ranges[i2++];
1392
1398
  while (pos < next || pos == next && iter.len == 0) {
1393
1399
  if (iter.done)
1394
1400
  break done;
@@ -1401,7 +1407,7 @@ class ChangeSet extends ChangeDesc {
1401
1407
  iter.forward(len);
1402
1408
  pos += len;
1403
1409
  }
1404
- let end = ranges[i++];
1410
+ let end = ranges[i2++];
1405
1411
  while (pos < end) {
1406
1412
  if (iter.done)
1407
1413
  break done;
@@ -1422,14 +1428,14 @@ class ChangeSet extends ChangeDesc {
1422
1428
  */
1423
1429
  toJSON() {
1424
1430
  let parts = [];
1425
- for (let i = 0; i < this.sections.length; i += 2) {
1426
- let len = this.sections[i], ins = this.sections[i + 1];
1431
+ for (let i2 = 0; i2 < this.sections.length; i2 += 2) {
1432
+ let len = this.sections[i2], ins = this.sections[i2 + 1];
1427
1433
  if (ins < 0)
1428
1434
  parts.push(len);
1429
1435
  else if (ins == 0)
1430
1436
  parts.push([len]);
1431
1437
  else
1432
- parts.push([len].concat(this.inserted[i >> 1].toJSON()));
1438
+ parts.push([len].concat(this.inserted[i2 >> 1].toJSON()));
1433
1439
  }
1434
1440
  return parts;
1435
1441
  }
@@ -1495,19 +1501,19 @@ class ChangeSet extends ChangeDesc {
1495
1501
  if (!Array.isArray(json2))
1496
1502
  throw new RangeError("Invalid JSON representation of ChangeSet");
1497
1503
  let sections = [], inserted = [];
1498
- for (let i = 0; i < json2.length; i++) {
1499
- let part = json2[i];
1504
+ for (let i2 = 0; i2 < json2.length; i2++) {
1505
+ let part = json2[i2];
1500
1506
  if (typeof part == "number") {
1501
1507
  sections.push(part, -1);
1502
- } else if (!Array.isArray(part) || typeof part[0] != "number" || part.some((e, i2) => i2 && typeof e != "string")) {
1508
+ } else if (!Array.isArray(part) || typeof part[0] != "number" || part.some((e, i3) => i3 && typeof e != "string")) {
1503
1509
  throw new RangeError("Invalid JSON representation of ChangeSet");
1504
1510
  } else if (part.length == 1) {
1505
1511
  sections.push(part[0], 0);
1506
1512
  } else {
1507
- while (inserted.length < i)
1513
+ while (inserted.length < i2)
1508
1514
  inserted.push(Text.empty);
1509
- inserted[i] = Text.of(part.slice(1));
1510
- sections.push(part[0], inserted[i].length);
1515
+ inserted[i2] = Text.of(part.slice(1));
1516
+ sections.push(part[0], inserted[i2].length);
1511
1517
  }
1512
1518
  }
1513
1519
  return new ChangeSet(sections, inserted);
@@ -1547,8 +1553,8 @@ function addInsert(values, sections, value) {
1547
1553
  }
1548
1554
  function iterChanges(desc, f, individual) {
1549
1555
  let inserted = desc.inserted;
1550
- for (let posA = 0, posB = 0, i = 0; i < desc.sections.length; ) {
1551
- let len = desc.sections[i++], ins = desc.sections[i++];
1556
+ for (let posA = 0, posB = 0, i2 = 0; i2 < desc.sections.length; ) {
1557
+ let len = desc.sections[i2++], ins = desc.sections[i2++];
1552
1558
  if (ins < 0) {
1553
1559
  posA += len;
1554
1560
  posB += len;
@@ -1558,11 +1564,11 @@ function iterChanges(desc, f, individual) {
1558
1564
  endA += len;
1559
1565
  endB += ins;
1560
1566
  if (ins && inserted)
1561
- text = text.append(inserted[i - 2 >> 1]);
1562
- if (individual || i == desc.sections.length || desc.sections[i + 1] < 0)
1567
+ text = text.append(inserted[i2 - 2 >> 1]);
1568
+ if (individual || i2 == desc.sections.length || desc.sections[i2 + 1] < 0)
1563
1569
  break;
1564
- len = desc.sections[i++];
1565
- ins = desc.sections[i++];
1570
+ len = desc.sections[i2++];
1571
+ ins = desc.sections[i2++];
1566
1572
  }
1567
1573
  f(posA, endA, posB, endB, text);
1568
1574
  posA = endA;
@@ -1839,8 +1845,8 @@ class EditorSelection {
1839
1845
  eq(other, includeAssoc = false) {
1840
1846
  if (this.ranges.length != other.ranges.length || this.mainIndex != other.mainIndex)
1841
1847
  return false;
1842
- for (let i = 0; i < this.ranges.length; i++)
1843
- if (!this.ranges[i].eq(other.ranges[i], includeAssoc))
1848
+ for (let i2 = 0; i2 < this.ranges.length; i2++)
1849
+ if (!this.ranges[i2].eq(other.ranges[i2], includeAssoc))
1844
1850
  return false;
1845
1851
  return true;
1846
1852
  }
@@ -1902,8 +1908,8 @@ class EditorSelection {
1902
1908
  static create(ranges, mainIndex = 0) {
1903
1909
  if (ranges.length == 0)
1904
1910
  throw new RangeError("A selection needs at least one range");
1905
- for (let pos = 0, i = 0; i < ranges.length; i++) {
1906
- let range = ranges[i];
1911
+ for (let pos = 0, i2 = 0; i2 < ranges.length; i2++) {
1912
+ let range = ranges[i2];
1907
1913
  if (range.empty ? range.from <= pos : range.from < pos)
1908
1914
  return EditorSelection.normalized(ranges.slice(), mainIndex);
1909
1915
  pos = range.to;
@@ -1933,13 +1939,13 @@ class EditorSelection {
1933
1939
  let main = ranges[mainIndex];
1934
1940
  ranges.sort((a, b) => a.from - b.from);
1935
1941
  mainIndex = ranges.indexOf(main);
1936
- for (let i = 1; i < ranges.length; i++) {
1937
- let range = ranges[i], prev = ranges[i - 1];
1942
+ for (let i2 = 1; i2 < ranges.length; i2++) {
1943
+ let range = ranges[i2], prev = ranges[i2 - 1];
1938
1944
  if (range.empty ? range.from <= prev.to : range.from < prev.to) {
1939
1945
  let from = prev.from, to = Math.max(range.to, prev.to);
1940
- if (i <= mainIndex)
1946
+ if (i2 <= mainIndex)
1941
1947
  mainIndex--;
1942
- ranges.splice(--i, 2, range.anchor > range.head ? EditorSelection.range(to, from) : EditorSelection.range(from, to));
1948
+ ranges.splice(--i2, 2, range.anchor > range.head ? EditorSelection.range(to, from) : EditorSelection.range(from, to));
1943
1949
  }
1944
1950
  }
1945
1951
  return new EditorSelection(ranges, mainIndex);
@@ -2010,7 +2016,7 @@ class Facet {
2010
2016
  }
2011
2017
  }
2012
2018
  function sameArray$1(a, b) {
2013
- return a == b || a.length == b.length && a.every((e, i) => e === b[i]);
2019
+ return a == b || a.length == b.length && a.every((e, i2) => e === b[i2]);
2014
2020
  }
2015
2021
  class FacetProvider {
2016
2022
  constructor(dependencies, facet, type, value) {
@@ -2071,8 +2077,8 @@ class FacetProvider {
2071
2077
  function compareArray(a, b, compare2) {
2072
2078
  if (a.length != b.length)
2073
2079
  return false;
2074
- for (let i = 0; i < a.length; i++)
2075
- if (!compare2(a[i], b[i]))
2080
+ for (let i2 = 0; i2 < a.length; i2++)
2081
+ if (!compare2(a[i2], b[i2]))
2076
2082
  return false;
2077
2083
  return true;
2078
2084
  }
@@ -2090,9 +2096,9 @@ function dynamicFacetSlot(addresses, facet, providers) {
2090
2096
  let idx = addresses[facet.id] >> 1;
2091
2097
  function get(state) {
2092
2098
  let values = [];
2093
- for (let i = 0; i < providerAddrs.length; i++) {
2094
- let value = getAddr(state, providerAddrs[i]);
2095
- if (providerTypes[i] == 2)
2099
+ for (let i2 = 0; i2 < providerAddrs.length; i2++) {
2100
+ let value = getAddr(state, providerAddrs[i2]);
2101
+ if (providerTypes[i2] == 2)
2096
2102
  for (let val of value)
2097
2103
  values.push(val);
2098
2104
  else
@@ -2153,7 +2159,7 @@ class StateField {
2153
2159
  return field;
2154
2160
  }
2155
2161
  create(state) {
2156
- let init = state.facet(initField).find((i) => i.field == this);
2162
+ let init = state.facet(initField).find((i2) => i2.field == this);
2157
2163
  return ((init === null || init === void 0 ? void 0 : init.create) || this.createF)(state);
2158
2164
  }
2159
2165
  /**
@@ -2176,7 +2182,7 @@ class StateField {
2176
2182
  },
2177
2183
  reconfigure: (state, oldState) => {
2178
2184
  let init = state.facet(initField), oldInit = oldState.facet(initField), reInit;
2179
- if ((reInit = init.find((i) => i.field == this)) && reInit != oldInit.find((i) => i.field == this)) {
2185
+ if ((reInit = init.find((i2) => i2.field == this)) && reInit != oldInit.find((i2) => i2.field == this)) {
2180
2186
  state.values[idx] = reInit.create(state);
2181
2187
  return 1;
2182
2188
  }
@@ -2649,11 +2655,11 @@ function resolveTransaction(state, specs, filter) {
2649
2655
  let s = resolveTransactionInner(state, specs.length ? specs[0] : {}, state.doc.length);
2650
2656
  if (specs.length && specs[0].filter === false)
2651
2657
  filter = false;
2652
- for (let i = 1; i < specs.length; i++) {
2653
- if (specs[i].filter === false)
2658
+ for (let i2 = 1; i2 < specs.length; i2++) {
2659
+ if (specs[i2].filter === false)
2654
2660
  filter = false;
2655
- let seq = !!specs[i].sequential;
2656
- s = mergeTransaction(s, resolveTransactionInner(state, specs[i], seq ? s.changes.newLength : state.doc.length), seq);
2661
+ let seq = !!specs[i2].sequential;
2662
+ s = mergeTransaction(s, resolveTransactionInner(state, specs[i2], seq ? s.changes.newLength : state.doc.length), seq);
2657
2663
  }
2658
2664
  let tr = Transaction.create(state, s.changes, s.selection, s.effects, s.annotations, s.scrollIntoView);
2659
2665
  return extendTransaction(filter ? filterTransaction(tr) : tr);
@@ -2683,8 +2689,8 @@ function filterTransaction(tr) {
2683
2689
  tr = Transaction.create(state, changes, tr.selection && tr.selection.map(back), StateEffect.mapEffects(tr.effects, back), tr.annotations, tr.scrollIntoView);
2684
2690
  }
2685
2691
  let filters = state.facet(transactionFilter);
2686
- for (let i = filters.length - 1; i >= 0; i--) {
2687
- let filtered = filters[i](tr);
2692
+ for (let i2 = filters.length - 1; i2 >= 0; i2--) {
2693
+ let filtered = filters[i2](tr);
2688
2694
  if (filtered instanceof Transaction)
2689
2695
  tr = filtered;
2690
2696
  else if (Array.isArray(filtered) && filtered.length == 1 && filtered[0] instanceof Transaction)
@@ -2696,8 +2702,8 @@ function filterTransaction(tr) {
2696
2702
  }
2697
2703
  function extendTransaction(tr) {
2698
2704
  let state = tr.startState, extenders = state.facet(transactionExtender), spec = tr;
2699
- for (let i = extenders.length - 1; i >= 0; i--) {
2700
- let extension = extenders[i](tr);
2705
+ for (let i2 = extenders.length - 1; i2 >= 0; i2--) {
2706
+ let extension = extenders[i2](tr);
2701
2707
  if (extension && Object.keys(extension).length)
2702
2708
  spec = mergeTransaction(spec, resolveTransactionInner(state, extension, tr.changes.newLength), true);
2703
2709
  }
@@ -2707,12 +2713,12 @@ const none$2 = [];
2707
2713
  function asArray$1(value) {
2708
2714
  return value == null ? none$2 : Array.isArray(value) ? value : [value];
2709
2715
  }
2710
- var CharCategory = /* @__PURE__ */ function(CharCategory2) {
2716
+ var CharCategory = /* @__PURE__ */ (function(CharCategory2) {
2711
2717
  CharCategory2[CharCategory2["Word"] = 0] = "Word";
2712
2718
  CharCategory2[CharCategory2["Space"] = 1] = "Space";
2713
2719
  CharCategory2[CharCategory2["Other"] = 2] = "Other";
2714
2720
  return CharCategory2;
2715
- }(CharCategory || (CharCategory = {}));
2721
+ })(CharCategory || (CharCategory = {}));
2716
2722
  const nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
2717
2723
  let wordChar;
2718
2724
  try {
@@ -2722,8 +2728,8 @@ try {
2722
2728
  function hasWordChar(str) {
2723
2729
  if (wordChar)
2724
2730
  return wordChar.test(str);
2725
- for (let i = 0; i < str.length; i++) {
2726
- let ch = str[i];
2731
+ for (let i2 = 0; i2 < str.length; i2++) {
2732
+ let ch = str[i2];
2727
2733
  if (/\w/.test(ch) || ch > "€" && (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)))
2728
2734
  return true;
2729
2735
  }
@@ -2735,8 +2741,8 @@ function makeCategorizer(wordChars) {
2735
2741
  return CharCategory.Space;
2736
2742
  if (hasWordChar(char))
2737
2743
  return CharCategory.Word;
2738
- for (let i = 0; i < wordChars.length; i++)
2739
- if (char.indexOf(wordChars[i]) > -1)
2744
+ for (let i2 = 0; i2 < wordChars.length; i2++)
2745
+ if (char.indexOf(wordChars[i2]) > -1)
2740
2746
  return CharCategory.Word;
2741
2747
  return CharCategory.Other;
2742
2748
  };
@@ -2751,8 +2757,8 @@ class EditorState {
2751
2757
  this.computeSlot = computeSlot;
2752
2758
  if (tr)
2753
2759
  tr._state = this;
2754
- for (let i = 0; i < this.config.dynamicSlots.length; i++)
2755
- ensureAddr(this, i << 1);
2760
+ for (let i2 = 0; i2 < this.config.dynamicSlots.length; i2++)
2761
+ ensureAddr(this, i2 << 1);
2756
2762
  this.computeSlot = null;
2757
2763
  }
2758
2764
  field(field, require2 = true) {
@@ -2843,10 +2849,10 @@ class EditorState {
2843
2849
  let result1 = f(sel.ranges[0]);
2844
2850
  let changes = this.changes(result1.changes), ranges = [result1.range];
2845
2851
  let effects = asArray$1(result1.effects);
2846
- for (let i = 1; i < sel.ranges.length; i++) {
2847
- let result = f(sel.ranges[i]);
2852
+ for (let i2 = 1; i2 < sel.ranges.length; i2++) {
2853
+ let result = f(sel.ranges[i2]);
2848
2854
  let newChanges = this.changes(result.changes), newMapped = newChanges.map(changes);
2849
- for (let j = 0; j < i; j++)
2855
+ for (let j = 0; j < i2; j++)
2850
2856
  ranges[j] = ranges[j].map(newMapped);
2851
2857
  let mapBy = changes.mapDesc(newChanges, true);
2852
2858
  ranges.push(result.range.map(mapBy));
@@ -2987,10 +2993,10 @@ class EditorState {
2987
2993
  break;
2988
2994
  }
2989
2995
  if (insert2.length)
2990
- phrase2 = phrase2.replace(/\$(\$|\d*)/g, (m, i) => {
2991
- if (i == "$")
2996
+ phrase2 = phrase2.replace(/\$(\$|\d*)/g, (m, i2) => {
2997
+ if (i2 == "$")
2992
2998
  return "$";
2993
- let n = +(i || 1);
2999
+ let n = +(i2 || 1);
2994
3000
  return !n || n > insert2.length ? m : insert2[n - 1];
2995
3001
  });
2996
3002
  return phrase2;
@@ -3164,14 +3170,14 @@ class Chunk {
3164
3170
  }
3165
3171
  }
3166
3172
  between(offset, from, to, f) {
3167
- for (let i = this.findIndex(from, -1e9, true), e = this.findIndex(to, 1e9, false, i); i < e; i++)
3168
- if (f(this.from[i] + offset, this.to[i] + offset, this.value[i]) === false)
3173
+ for (let i2 = this.findIndex(from, -1e9, true), e = this.findIndex(to, 1e9, false, i2); i2 < e; i2++)
3174
+ if (f(this.from[i2] + offset, this.to[i2] + offset, this.value[i2]) === false)
3169
3175
  return false;
3170
3176
  }
3171
3177
  map(offset, changes) {
3172
3178
  let value = [], from = [], to = [], newPos = -1, maxPoint = -1;
3173
- for (let i = 0; i < this.value.length; i++) {
3174
- let val = this.value[i], curFrom = this.from[i] + offset, curTo = this.to[i] + offset, newFrom, newTo;
3179
+ for (let i2 = 0; i2 < this.value.length; i2++) {
3180
+ let val = this.value[i2], curFrom = this.from[i2] + offset, curTo = this.to[i2] + offset, newFrom, newTo;
3175
3181
  if (curFrom == curTo) {
3176
3182
  let mapped = changes.mapPos(curFrom, val.startSide, val.mapMode);
3177
3183
  if (mapped == null)
@@ -3256,14 +3262,14 @@ class RangeSet {
3256
3262
  add2 = add2.slice().sort(cmpRange);
3257
3263
  if (this.isEmpty)
3258
3264
  return add2.length ? RangeSet.of(add2) : this;
3259
- let cur2 = new LayerCursor(this, null, -1).goto(0), i = 0, spill = [];
3265
+ let cur2 = new LayerCursor(this, null, -1).goto(0), i2 = 0, spill = [];
3260
3266
  let builder = new RangeSetBuilder();
3261
- while (cur2.value || i < add2.length) {
3262
- if (i < add2.length && (cur2.from - add2[i].from || cur2.startSide - add2[i].value.startSide) >= 0) {
3263
- let range = add2[i++];
3267
+ while (cur2.value || i2 < add2.length) {
3268
+ if (i2 < add2.length && (cur2.from - add2[i2].from || cur2.startSide - add2[i2].value.startSide) >= 0) {
3269
+ let range = add2[i2++];
3264
3270
  if (!builder.addInner(range.from, range.to, range.value))
3265
3271
  spill.push(range);
3266
- } else if (cur2.rangeIndex == 1 && cur2.chunkIndex < this.chunk.length && (i == add2.length || this.chunkEnd(cur2.chunkIndex) < add2[i].from) && (!filter || filterFrom > this.chunkEnd(cur2.chunkIndex) || filterTo < this.chunkPos[cur2.chunkIndex]) && builder.addChunk(this.chunkPos[cur2.chunkIndex], this.chunk[cur2.chunkIndex])) {
3272
+ } else if (cur2.rangeIndex == 1 && cur2.chunkIndex < this.chunk.length && (i2 == add2.length || this.chunkEnd(cur2.chunkIndex) < add2[i2].from) && (!filter || filterFrom > this.chunkEnd(cur2.chunkIndex) || filterTo < this.chunkPos[cur2.chunkIndex]) && builder.addChunk(this.chunkPos[cur2.chunkIndex], this.chunk[cur2.chunkIndex])) {
3267
3273
  cur2.nextChunk();
3268
3274
  } else {
3269
3275
  if (!filter || filterFrom > cur2.to || filterTo < cur2.from || filter(cur2.from, cur2.to, cur2.value)) {
@@ -3282,8 +3288,8 @@ class RangeSet {
3282
3288
  if (changes.empty || this.isEmpty)
3283
3289
  return this;
3284
3290
  let chunks = [], chunkPos = [], maxPoint = -1;
3285
- for (let i = 0; i < this.chunk.length; i++) {
3286
- let start = this.chunkPos[i], chunk = this.chunk[i];
3291
+ for (let i2 = 0; i2 < this.chunk.length; i2++) {
3292
+ let start = this.chunkPos[i2], chunk = this.chunk[i2];
3287
3293
  let touch = changes.touchesRange(start, start + chunk.length);
3288
3294
  if (touch === false) {
3289
3295
  maxPoint = Math.max(maxPoint, chunk.maxPoint);
@@ -3310,8 +3316,8 @@ class RangeSet {
3310
3316
  between(from, to, f) {
3311
3317
  if (this.isEmpty)
3312
3318
  return;
3313
- for (let i = 0; i < this.chunk.length; i++) {
3314
- let start = this.chunkPos[i], chunk = this.chunk[i];
3319
+ for (let i2 = 0; i2 < this.chunk.length; i2++) {
3320
+ let start = this.chunkPos[i2], chunk = this.chunk[i2];
3315
3321
  if (to >= start && from <= start + chunk.length && chunk.between(start, from - start, to - start, f) === false)
3316
3322
  return;
3317
3323
  }
@@ -3422,8 +3428,8 @@ class RangeSet {
3422
3428
  if (!sets.length)
3423
3429
  return RangeSet.empty;
3424
3430
  let result = sets[sets.length - 1];
3425
- for (let i = sets.length - 2; i >= 0; i--) {
3426
- for (let layer2 = sets[i]; layer2 != RangeSet.empty; layer2 = layer2.nextLayer)
3431
+ for (let i2 = sets.length - 2; i2 >= 0; i2--) {
3432
+ for (let layer2 = sets[i2]; layer2 != RangeSet.empty; layer2 = layer2.nextLayer)
3427
3433
  result = new RangeSet(layer2.chunkPos, layer2.chunk, result, Math.max(layer2.maxPoint, result.maxPoint));
3428
3434
  }
3429
3435
  return result;
@@ -3432,8 +3438,8 @@ class RangeSet {
3432
3438
  RangeSet.empty = /* @__PURE__ */ new RangeSet([], [], null, -1);
3433
3439
  function lazySort(ranges) {
3434
3440
  if (ranges.length > 1)
3435
- for (let prev = ranges[0], i = 1; i < ranges.length; i++) {
3436
- let cur2 = ranges[i];
3441
+ for (let prev = ranges[0], i2 = 1; i2 < ranges.length; i2++) {
3442
+ let cur2 = ranges[i2];
3437
3443
  if (cmpRange(prev, cur2) > 0)
3438
3444
  return ranges.slice().sort(cmpRange);
3439
3445
  prev = cur2;
@@ -3542,15 +3548,15 @@ class RangeSetBuilder {
3542
3548
  function findSharedChunks(a, b, textDiff) {
3543
3549
  let inA = /* @__PURE__ */ new Map();
3544
3550
  for (let set of a)
3545
- for (let i = 0; i < set.chunk.length; i++)
3546
- if (set.chunk[i].maxPoint <= 0)
3547
- inA.set(set.chunk[i], set.chunkPos[i]);
3551
+ for (let i2 = 0; i2 < set.chunk.length; i2++)
3552
+ if (set.chunk[i2].maxPoint <= 0)
3553
+ inA.set(set.chunk[i2], set.chunkPos[i2]);
3548
3554
  let shared = /* @__PURE__ */ new Set();
3549
3555
  for (let set of b)
3550
- for (let i = 0; i < set.chunk.length; i++) {
3551
- let known = inA.get(set.chunk[i]);
3552
- if (known != null && (textDiff ? textDiff.mapPos(known) : known) == set.chunkPos[i] && !(textDiff === null || textDiff === void 0 ? void 0 : textDiff.touchesRange(known, known + set.chunk[i].length)))
3553
- shared.add(set.chunk[i]);
3556
+ for (let i2 = 0; i2 < set.chunk.length; i2++) {
3557
+ let known = inA.get(set.chunk[i2]);
3558
+ if (known != null && (textDiff ? textDiff.mapPos(known) : known) == set.chunkPos[i2] && !(textDiff === null || textDiff === void 0 ? void 0 : textDiff.touchesRange(known, known + set.chunk[i2].length)))
3559
+ shared.add(set.chunk[i2]);
3554
3560
  }
3555
3561
  return shared;
3556
3562
  }
@@ -3636,10 +3642,10 @@ class HeapCursor {
3636
3642
  }
3637
3643
  static from(sets, skip = null, minPoint = -1) {
3638
3644
  let heap = [];
3639
- for (let i = 0; i < sets.length; i++) {
3640
- for (let cur2 = sets[i]; !cur2.isEmpty; cur2 = cur2.nextLayer) {
3645
+ for (let i2 = 0; i2 < sets.length; i2++) {
3646
+ for (let cur2 = sets[i2]; !cur2.isEmpty; cur2 = cur2.nextLayer) {
3641
3647
  if (cur2.maxPoint >= minPoint)
3642
- heap.push(new LayerCursor(cur2, skip, minPoint, i));
3648
+ heap.push(new LayerCursor(cur2, skip, minPoint, i2));
3643
3649
  }
3644
3650
  }
3645
3651
  return heap.length == 1 ? heap[0] : new HeapCursor(heap);
@@ -3650,16 +3656,16 @@ class HeapCursor {
3650
3656
  goto(pos, side = -1e9) {
3651
3657
  for (let cur2 of this.heap)
3652
3658
  cur2.goto(pos, side);
3653
- for (let i = this.heap.length >> 1; i >= 0; i--)
3654
- heapBubble(this.heap, i);
3659
+ for (let i2 = this.heap.length >> 1; i2 >= 0; i2--)
3660
+ heapBubble(this.heap, i2);
3655
3661
  this.next();
3656
3662
  return this;
3657
3663
  }
3658
3664
  forward(pos, side) {
3659
3665
  for (let cur2 of this.heap)
3660
3666
  cur2.forward(pos, side);
3661
- for (let i = this.heap.length >> 1; i >= 0; i--)
3662
- heapBubble(this.heap, i);
3667
+ for (let i2 = this.heap.length >> 1; i2 >= 0; i2--)
3668
+ heapBubble(this.heap, i2);
3663
3669
  if ((this.to - pos || this.value.endSide - side) < 0)
3664
3670
  this.next();
3665
3671
  }
@@ -3734,14 +3740,14 @@ class SpanCursor {
3734
3740
  this.minActive = findMinIndex(this.active, this.activeTo);
3735
3741
  }
3736
3742
  addActive(trackOpen) {
3737
- let i = 0, { value, to, rank } = this.cursor;
3738
- while (i < this.activeRank.length && (rank - this.activeRank[i] || to - this.activeTo[i]) > 0)
3739
- i++;
3740
- insert(this.active, i, value);
3741
- insert(this.activeTo, i, to);
3742
- insert(this.activeRank, i, rank);
3743
+ let i2 = 0, { value, to, rank } = this.cursor;
3744
+ while (i2 < this.activeRank.length && (rank - this.activeRank[i2] || to - this.activeTo[i2]) > 0)
3745
+ i2++;
3746
+ insert(this.active, i2, value);
3747
+ insert(this.activeTo, i2, to);
3748
+ insert(this.activeRank, i2, rank);
3743
3749
  if (trackOpen)
3744
- insert(trackOpen, i, this.cursor.from);
3750
+ insert(trackOpen, i2, this.cursor.from);
3745
3751
  this.minActive = findMinIndex(this.active, this.activeTo);
3746
3752
  }
3747
3753
  // After calling this, if `this.point` != null, the next range is a
@@ -3789,7 +3795,7 @@ class SpanCursor {
3789
3795
  }
3790
3796
  if (trackOpen) {
3791
3797
  this.openStart = 0;
3792
- for (let i = trackOpen.length - 1; i >= 0 && trackOpen[i] < from; i--)
3798
+ for (let i2 = trackOpen.length - 1; i2 >= 0 && trackOpen[i2] < from; i2--)
3793
3799
  this.openStart++;
3794
3800
  }
3795
3801
  }
@@ -3797,17 +3803,17 @@ class SpanCursor {
3797
3803
  if (!this.active.length)
3798
3804
  return this.active;
3799
3805
  let active = [];
3800
- for (let i = this.active.length - 1; i >= 0; i--) {
3801
- if (this.activeRank[i] < this.pointRank)
3806
+ for (let i2 = this.active.length - 1; i2 >= 0; i2--) {
3807
+ if (this.activeRank[i2] < this.pointRank)
3802
3808
  break;
3803
- if (this.activeTo[i] > to || this.activeTo[i] == to && this.active[i].endSide >= this.point.endSide)
3804
- active.push(this.active[i]);
3809
+ if (this.activeTo[i2] > to || this.activeTo[i2] == to && this.active[i2].endSide >= this.point.endSide)
3810
+ active.push(this.active[i2]);
3805
3811
  }
3806
3812
  return active.reverse();
3807
3813
  }
3808
3814
  openEnd(to) {
3809
3815
  let open = 0;
3810
- for (let i = this.activeTo.length - 1; i >= 0 && this.activeTo[i] > to; i--)
3816
+ for (let i2 = this.activeTo.length - 1; i2 >= 0 && this.activeTo[i2] > to; i2--)
3811
3817
  open++;
3812
3818
  return open;
3813
3819
  }
@@ -3846,57 +3852,57 @@ function compare(a, startA, b, startB, length, comparator) {
3846
3852
  function sameValues(a, b) {
3847
3853
  if (a.length != b.length)
3848
3854
  return false;
3849
- for (let i = 0; i < a.length; i++)
3850
- if (a[i] != b[i] && !cmpVal(a[i], b[i]))
3855
+ for (let i2 = 0; i2 < a.length; i2++)
3856
+ if (a[i2] != b[i2] && !cmpVal(a[i2], b[i2]))
3851
3857
  return false;
3852
3858
  return true;
3853
3859
  }
3854
3860
  function remove(array, index) {
3855
- for (let i = index, e = array.length - 1; i < e; i++)
3856
- array[i] = array[i + 1];
3861
+ for (let i2 = index, e = array.length - 1; i2 < e; i2++)
3862
+ array[i2] = array[i2 + 1];
3857
3863
  array.pop();
3858
3864
  }
3859
3865
  function insert(array, index, value) {
3860
- for (let i = array.length - 1; i >= index; i--)
3861
- array[i + 1] = array[i];
3866
+ for (let i2 = array.length - 1; i2 >= index; i2--)
3867
+ array[i2 + 1] = array[i2];
3862
3868
  array[index] = value;
3863
3869
  }
3864
3870
  function findMinIndex(value, array) {
3865
3871
  let found = -1, foundPos = 1e9;
3866
- for (let i = 0; i < array.length; i++)
3867
- if ((array[i] - foundPos || value[i].endSide - value[found].endSide) < 0) {
3868
- found = i;
3869
- foundPos = array[i];
3872
+ for (let i2 = 0; i2 < array.length; i2++)
3873
+ if ((array[i2] - foundPos || value[i2].endSide - value[found].endSide) < 0) {
3874
+ found = i2;
3875
+ foundPos = array[i2];
3870
3876
  }
3871
3877
  return found;
3872
3878
  }
3873
3879
  function countColumn(string2, tabSize, to = string2.length) {
3874
3880
  let n = 0;
3875
- for (let i = 0; i < to && i < string2.length; ) {
3876
- if (string2.charCodeAt(i) == 9) {
3881
+ for (let i2 = 0; i2 < to && i2 < string2.length; ) {
3882
+ if (string2.charCodeAt(i2) == 9) {
3877
3883
  n += tabSize - n % tabSize;
3878
- i++;
3884
+ i2++;
3879
3885
  } else {
3880
3886
  n++;
3881
- i = findClusterBreak(string2, i);
3887
+ i2 = findClusterBreak(string2, i2);
3882
3888
  }
3883
3889
  }
3884
3890
  return n;
3885
3891
  }
3886
3892
  function findColumn(string2, col, tabSize, strict) {
3887
- for (let i = 0, n = 0; ; ) {
3893
+ for (let i2 = 0, n = 0; ; ) {
3888
3894
  if (n >= col)
3889
- return i;
3890
- if (i == string2.length)
3895
+ return i2;
3896
+ if (i2 == string2.length)
3891
3897
  break;
3892
- n += string2.charCodeAt(i) == 9 ? tabSize - n % tabSize : 1;
3893
- i = findClusterBreak(string2, i);
3898
+ n += string2.charCodeAt(i2) == 9 ? tabSize - n % tabSize : 1;
3899
+ i2 = findClusterBreak(string2, i2);
3894
3900
  }
3895
3901
  return strict === true ? -1 : string2.length;
3896
3902
  }
3897
3903
  const C = "ͼ";
3898
3904
  const COUNT = typeof Symbol == "undefined" ? "__" + C : Symbol.for(C);
3899
- const SET = typeof Symbol == "undefined" ? "__styleSet" + Math.floor(Math.random() * 1e8) : Symbol("styleSet");
3905
+ const SET = typeof Symbol == "undefined" ? "__styleSet" + Math.floor(Math.random() * 1e8) : /* @__PURE__ */ Symbol("styleSet");
3900
3906
  const top = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : {};
3901
3907
  class StyleModule {
3902
3908
  // :: (Object<Style>, ?{finish: ?(string) → string})
@@ -3988,8 +3994,8 @@ class StyleSet {
3988
3994
  mount(modules, root) {
3989
3995
  let sheet = this.sheet;
3990
3996
  let pos = 0, j = 0;
3991
- for (let i = 0; i < modules.length; i++) {
3992
- let mod = modules[i], index = this.modules.indexOf(mod);
3997
+ for (let i2 = 0; i2 < modules.length; i2++) {
3998
+ let mod = modules[i2], index = this.modules.indexOf(mod);
3993
3999
  if (index < j && index > -1) {
3994
4000
  this.modules.splice(index, 1);
3995
4001
  j--;
@@ -4010,8 +4016,8 @@ class StyleSet {
4010
4016
  root.adoptedStyleSheets = [this.sheet, ...root.adoptedStyleSheets];
4011
4017
  } else {
4012
4018
  let text = "";
4013
- for (let i = 0; i < this.modules.length; i++)
4014
- text += this.modules[i].getRules() + "\n";
4019
+ for (let i2 = 0; i2 < this.modules.length; i2++)
4020
+ text += this.modules[i2].getRules() + "\n";
4015
4021
  this.styleTag.textContent = text;
4016
4022
  let target = root.head || root;
4017
4023
  if (this.styleTag.parentNode != target)
@@ -4126,16 +4132,16 @@ function keyName(event) {
4126
4132
  function crelt() {
4127
4133
  var elt = arguments[0];
4128
4134
  if (typeof elt == "string") elt = document.createElement(elt);
4129
- var i = 1, next = arguments[1];
4135
+ var i2 = 1, next = arguments[1];
4130
4136
  if (next && typeof next == "object" && next.nodeType == null && !Array.isArray(next)) {
4131
4137
  for (var name2 in next) if (Object.prototype.hasOwnProperty.call(next, name2)) {
4132
4138
  var value = next[name2];
4133
4139
  if (typeof value == "string") elt.setAttribute(name2, value);
4134
4140
  else if (value != null) elt[name2] = value;
4135
4141
  }
4136
- i++;
4142
+ i2++;
4137
4143
  }
4138
- for (; i < arguments.length; i++) add(elt, arguments[i]);
4144
+ for (; i2 < arguments.length; i2++) add(elt, arguments[i2]);
4139
4145
  return elt;
4140
4146
  }
4141
4147
  function add(elt, child) {
@@ -4145,7 +4151,7 @@ function add(elt, child) {
4145
4151
  else if (child.nodeType != null) {
4146
4152
  elt.appendChild(child);
4147
4153
  } else if (Array.isArray(child)) {
4148
- for (var i = 0; i < child.length; i++) add(elt, child[i]);
4154
+ for (var i2 = 0; i2 < child.length; i2++) add(elt, child[i2]);
4149
4155
  } else {
4150
4156
  throw new RangeError("Unsupported child node: " + child);
4151
4157
  }
@@ -4207,8 +4213,8 @@ function attrsEq(a, b, ignore) {
4207
4213
  return true;
4208
4214
  }
4209
4215
  function setAttrs(dom, attrs) {
4210
- for (let i = dom.attributes.length - 1; i >= 0; i--) {
4211
- let name2 = dom.attributes[i].name;
4216
+ for (let i2 = dom.attributes.length - 1; i2 >= 0; i2--) {
4217
+ let name2 = dom.attributes[i2].name;
4212
4218
  if (attrs[name2] == null)
4213
4219
  dom.removeAttribute(name2);
4214
4220
  }
@@ -4246,8 +4252,8 @@ function updateAttrs(dom, prev, attrs) {
4246
4252
  }
4247
4253
  function getAttrs(dom) {
4248
4254
  let attrs = /* @__PURE__ */ Object.create(null);
4249
- for (let i = 0; i < dom.attributes.length; i++) {
4250
- let attr = dom.attributes[i];
4255
+ for (let i2 = 0; i2 < dom.attributes.length; i2++) {
4256
+ let attr = dom.attributes[i2];
4251
4257
  attrs[attr.name] = attr.value;
4252
4258
  }
4253
4259
  return attrs;
@@ -4336,13 +4342,13 @@ class WidgetType {
4336
4342
  destroy(dom) {
4337
4343
  }
4338
4344
  }
4339
- var BlockType = /* @__PURE__ */ function(BlockType2) {
4345
+ var BlockType = /* @__PURE__ */ (function(BlockType2) {
4340
4346
  BlockType2[BlockType2["Text"] = 0] = "Text";
4341
4347
  BlockType2[BlockType2["WidgetBefore"] = 1] = "WidgetBefore";
4342
4348
  BlockType2[BlockType2["WidgetAfter"] = 2] = "WidgetAfter";
4343
4349
  BlockType2[BlockType2["WidgetRange"] = 3] = "WidgetRange";
4344
4350
  return BlockType2;
4345
- }(BlockType || (BlockType = {}));
4351
+ })(BlockType || (BlockType = {}));
4346
4352
  class Decoration extends RangeValue {
4347
4353
  constructor(startSide, endSide, widget, spec) {
4348
4354
  super();
@@ -4773,8 +4779,8 @@ function focusPreventScroll(dom) {
4773
4779
  } : void 0);
4774
4780
  if (!preventScrollSupported) {
4775
4781
  preventScrollSupported = false;
4776
- for (let i = 0; i < stack.length; ) {
4777
- let elt = stack[i++], top2 = stack[i++], left = stack[i++];
4782
+ for (let i2 = 0; i2 < stack.length; ) {
4783
+ let elt = stack[i2++], top2 = stack[i2++], left = stack[i2++];
4778
4784
  if (elt.scrollTop != top2)
4779
4785
  elt.scrollTop = top2;
4780
4786
  if (elt.scrollLeft != left)
@@ -4789,8 +4795,8 @@ function textRange(node, from, to = from) {
4789
4795
  range.setStart(node, from);
4790
4796
  return range;
4791
4797
  }
4792
- function dispatchKey(elt, name2, code, mods) {
4793
- let options = { key: name2, code: name2, keyCode: code, which: code, cancelable: true };
4798
+ function dispatchKey(elt, name2, code2, mods) {
4799
+ let options = { key: name2, code: name2, keyCode: code2, which: code2, cancelable: true };
4794
4800
  if (mods)
4795
4801
  ({ altKey: options.altKey, ctrlKey: options.ctrlKey, shiftKey: options.shiftKey, metaKey: options.metaKey } = mods);
4796
4802
  let down = new KeyboardEvent("keydown", options);
@@ -4885,16 +4891,16 @@ class DOMPos {
4885
4891
  return new DOMPos(dom.parentNode, domIndex(dom) + 1, precise);
4886
4892
  }
4887
4893
  }
4888
- var Direction = /* @__PURE__ */ function(Direction2) {
4894
+ var Direction = /* @__PURE__ */ (function(Direction2) {
4889
4895
  Direction2[Direction2["LTR"] = 0] = "LTR";
4890
4896
  Direction2[Direction2["RTL"] = 1] = "RTL";
4891
4897
  return Direction2;
4892
- }(Direction || (Direction = {}));
4898
+ })(Direction || (Direction = {}));
4893
4899
  const LTR = Direction.LTR, RTL = Direction.RTL;
4894
4900
  function dec(str) {
4895
4901
  let result = [];
4896
- for (let i = 0; i < str.length; i++)
4897
- result.push(1 << +str[i]);
4902
+ for (let i2 = 0; i2 < str.length; i2++)
4903
+ result.push(1 << +str[i2]);
4898
4904
  return result;
4899
4905
  }
4900
4906
  const LowTypes = /* @__PURE__ */ dec("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008");
@@ -4941,13 +4947,13 @@ class BidiSpan {
4941
4947
  */
4942
4948
  static find(order, index, level, assoc) {
4943
4949
  let maybe = -1;
4944
- for (let i = 0; i < order.length; i++) {
4945
- let span = order[i];
4950
+ for (let i2 = 0; i2 < order.length; i2++) {
4951
+ let span = order[i2];
4946
4952
  if (span.from <= index && span.to >= index) {
4947
4953
  if (span.level == level)
4948
- return i;
4954
+ return i2;
4949
4955
  if (maybe < 0 || (assoc != 0 ? assoc < 0 ? span.from < index : span.to > index : order[maybe].level > span.level))
4950
- maybe = i;
4956
+ maybe = i2;
4951
4957
  }
4952
4958
  }
4953
4959
  if (maybe < 0)
@@ -4958,8 +4964,8 @@ class BidiSpan {
4958
4964
  function isolatesEq(a, b) {
4959
4965
  if (a.length != b.length)
4960
4966
  return false;
4961
- for (let i = 0; i < a.length; i++) {
4962
- let iA = a[i], iB = b[i];
4967
+ for (let i2 = 0; i2 < a.length; i2++) {
4968
+ let iA = a[i2], iB = b[i2];
4963
4969
  if (iA.from != iB.from || iA.to != iB.to || iA.direction != iB.direction || !isolatesEq(iA.inner, iB.inner))
4964
4970
  return false;
4965
4971
  }
@@ -4970,34 +4976,34 @@ function computeCharTypes(line, rFrom, rTo, isolates, outerType) {
4970
4976
  for (let iI = 0; iI <= isolates.length; iI++) {
4971
4977
  let from = iI ? isolates[iI - 1].to : rFrom, to = iI < isolates.length ? isolates[iI].from : rTo;
4972
4978
  let prevType = iI ? 256 : outerType;
4973
- for (let i = from, prev = prevType, prevStrong = prevType; i < to; i++) {
4974
- let type = charType(line.charCodeAt(i));
4979
+ for (let i2 = from, prev = prevType, prevStrong = prevType; i2 < to; i2++) {
4980
+ let type = charType(line.charCodeAt(i2));
4975
4981
  if (type == 512)
4976
4982
  type = prev;
4977
4983
  else if (type == 8 && prevStrong == 4)
4978
4984
  type = 16;
4979
- types[i] = type == 4 ? 2 : type;
4985
+ types[i2] = type == 4 ? 2 : type;
4980
4986
  if (type & 7)
4981
4987
  prevStrong = type;
4982
4988
  prev = type;
4983
4989
  }
4984
- for (let i = from, prev = prevType, prevStrong = prevType; i < to; i++) {
4985
- let type = types[i];
4990
+ for (let i2 = from, prev = prevType, prevStrong = prevType; i2 < to; i2++) {
4991
+ let type = types[i2];
4986
4992
  if (type == 128) {
4987
- if (i < to - 1 && prev == types[i + 1] && prev & 24)
4988
- type = types[i] = prev;
4993
+ if (i2 < to - 1 && prev == types[i2 + 1] && prev & 24)
4994
+ type = types[i2] = prev;
4989
4995
  else
4990
- types[i] = 256;
4996
+ types[i2] = 256;
4991
4997
  } else if (type == 64) {
4992
- let end = i + 1;
4998
+ let end = i2 + 1;
4993
4999
  while (end < to && types[end] == 64)
4994
5000
  end++;
4995
- let replace2 = i && prev == 8 || end < rTo && types[end] == 8 ? prevStrong == 1 ? 1 : 8 : 256;
4996
- for (let j = i; j < end; j++)
5001
+ let replace2 = i2 && prev == 8 || end < rTo && types[end] == 8 ? prevStrong == 1 ? 1 : 8 : 256;
5002
+ for (let j = i2; j < end; j++)
4997
5003
  types[j] = replace2;
4998
- i = end - 1;
5004
+ i2 = end - 1;
4999
5005
  } else if (type == 8 && prevStrong == 1) {
5000
- types[i] = 1;
5006
+ types[i2] = 1;
5001
5007
  }
5002
5008
  prev = type;
5003
5009
  if (type & 7)
@@ -5009,15 +5015,15 @@ function processBracketPairs(line, rFrom, rTo, isolates, outerType) {
5009
5015
  let oppositeType = outerType == 1 ? 2 : 1;
5010
5016
  for (let iI = 0, sI = 0, context = 0; iI <= isolates.length; iI++) {
5011
5017
  let from = iI ? isolates[iI - 1].to : rFrom, to = iI < isolates.length ? isolates[iI].from : rTo;
5012
- for (let i = from, ch, br, type; i < to; i++) {
5013
- if (br = Brackets[ch = line.charCodeAt(i)]) {
5018
+ for (let i2 = from, ch, br, type; i2 < to; i2++) {
5019
+ if (br = Brackets[ch = line.charCodeAt(i2)]) {
5014
5020
  if (br < 0) {
5015
5021
  for (let sJ = sI - 3; sJ >= 0; sJ -= 3) {
5016
5022
  if (BracketStack[sJ + 1] == -br) {
5017
5023
  let flags = BracketStack[sJ + 2];
5018
5024
  let type2 = flags & 2 ? outerType : !(flags & 4) ? 0 : flags & 1 ? oppositeType : outerType;
5019
5025
  if (type2)
5020
- types[i] = types[BracketStack[sJ]] = type2;
5026
+ types[i2] = types[BracketStack[sJ]] = type2;
5021
5027
  sI = sJ;
5022
5028
  break;
5023
5029
  }
@@ -5025,11 +5031,11 @@ function processBracketPairs(line, rFrom, rTo, isolates, outerType) {
5025
5031
  } else if (BracketStack.length == 189) {
5026
5032
  break;
5027
5033
  } else {
5028
- BracketStack[sI++] = i;
5034
+ BracketStack[sI++] = i2;
5029
5035
  BracketStack[sI++] = ch;
5030
5036
  BracketStack[sI++] = context;
5031
5037
  }
5032
- } else if ((type = types[i]) == 2 || type == 1) {
5038
+ } else if ((type = types[i2]) == 2 || type == 1) {
5033
5039
  let embed = type == outerType;
5034
5040
  context = embed ? 0 : 1;
5035
5041
  for (let sJ = sI - 3; sJ >= 0; sJ -= 3) {
@@ -5051,10 +5057,10 @@ function processBracketPairs(line, rFrom, rTo, isolates, outerType) {
5051
5057
  function processNeutrals(rFrom, rTo, isolates, outerType) {
5052
5058
  for (let iI = 0, prev = outerType; iI <= isolates.length; iI++) {
5053
5059
  let from = iI ? isolates[iI - 1].to : rFrom, to = iI < isolates.length ? isolates[iI].from : rTo;
5054
- for (let i = from; i < to; ) {
5055
- let type = types[i];
5060
+ for (let i2 = from; i2 < to; ) {
5061
+ let type = types[i2];
5056
5062
  if (type == 256) {
5057
- let end = i + 1;
5063
+ let end = i2 + 1;
5058
5064
  for (; ; ) {
5059
5065
  if (end == to) {
5060
5066
  if (iI == isolates.length)
@@ -5070,17 +5076,17 @@ function processNeutrals(rFrom, rTo, isolates, outerType) {
5070
5076
  let beforeL = prev == 1;
5071
5077
  let afterL = (end < rTo ? types[end] : outerType) == 1;
5072
5078
  let replace2 = beforeL == afterL ? beforeL ? 1 : 2 : outerType;
5073
- for (let j = end, jI = iI, fromJ = jI ? isolates[jI - 1].to : rFrom; j > i; ) {
5079
+ for (let j = end, jI = iI, fromJ = jI ? isolates[jI - 1].to : rFrom; j > i2; ) {
5074
5080
  if (j == fromJ) {
5075
5081
  j = isolates[--jI].from;
5076
5082
  fromJ = jI ? isolates[jI - 1].to : rFrom;
5077
5083
  }
5078
5084
  types[--j] = replace2;
5079
5085
  }
5080
- i = end;
5086
+ i2 = end;
5081
5087
  } else {
5082
5088
  prev = type;
5083
- i++;
5089
+ i2++;
5084
5090
  }
5085
5091
  }
5086
5092
  }
@@ -5238,8 +5244,8 @@ function moveVisually(line, order, dir, start, forward) {
5238
5244
  return EditorSelection.cursor(nextIndex + line.from, span.forward(forward, dir) ? -1 : 1, span.level);
5239
5245
  }
5240
5246
  function autoDirection(text, from, to) {
5241
- for (let i = from; i < to; i++) {
5242
- let type = charType(text.charCodeAt(i));
5247
+ for (let i2 = from; i2 < to; i2++) {
5248
+ let type = charType(text.charCodeAt(i2));
5243
5249
  if (type == 1)
5244
5250
  return LTR;
5245
5251
  if (type == 2 || type == 4)
@@ -5295,8 +5301,8 @@ const editable = /* @__PURE__ */ Facet.define({ combine: (values) => values.leng
5295
5301
  let nextPluginID = 0;
5296
5302
  const viewPlugin = /* @__PURE__ */ Facet.define({
5297
5303
  combine(plugins) {
5298
- return plugins.filter((p, i) => {
5299
- for (let j = 0; j < i; j++)
5304
+ return plugins.filter((p, i2) => {
5305
+ for (let j = 0; j < i2; j++)
5300
5306
  if (plugins[j].plugin == p.plugin)
5301
5307
  return false;
5302
5308
  return true;
@@ -5407,7 +5413,7 @@ function getIsolatedRanges(view, line) {
5407
5413
  let isolates = view.state.facet(bidiIsolatedRanges);
5408
5414
  if (!isolates.length)
5409
5415
  return isolates;
5410
- let sets = isolates.map((i) => i instanceof Function ? i(view) : i);
5416
+ let sets = isolates.map((i2) => i2 instanceof Function ? i2(view) : i2);
5411
5417
  let result = [];
5412
5418
  RangeSet.spans(sets, line.from, line.to, {
5413
5419
  point() {
@@ -5415,8 +5421,8 @@ function getIsolatedRanges(view, line) {
5415
5421
  span(fromDoc, toDoc, active, open) {
5416
5422
  let from = fromDoc - line.from, to = toDoc - line.from;
5417
5423
  let level = result;
5418
- for (let i = active.length - 1; i >= 0; i--, open--) {
5419
- let direction = active[i].spec.bidiIsolate, update;
5424
+ for (let i2 = active.length - 1; i2 >= 0; i2--, open--) {
5425
+ let direction = active[i2].spec.bidiIsolate, update;
5420
5426
  if (direction == null)
5421
5427
  direction = autoDirection(line.text, from, to);
5422
5428
  if (open > 0 && level.length && (update = level[level.length - 1]).to == from && update.direction == direction) {
@@ -5462,17 +5468,17 @@ class ChangedRange {
5462
5468
  return new ChangedRange(Math.min(this.fromA, other.fromA), Math.max(this.toA, other.toA), Math.min(this.fromB, other.fromB), Math.max(this.toB, other.toB));
5463
5469
  }
5464
5470
  addToSet(set) {
5465
- let i = set.length, me = this;
5466
- for (; i > 0; i--) {
5467
- let range = set[i - 1];
5471
+ let i2 = set.length, me = this;
5472
+ for (; i2 > 0; i2--) {
5473
+ let range = set[i2 - 1];
5468
5474
  if (range.fromA > me.toA)
5469
5475
  continue;
5470
5476
  if (range.toA < me.fromA)
5471
5477
  break;
5472
5478
  me = me.join(range);
5473
- set.splice(i - 1, 1);
5479
+ set.splice(i2 - 1, 1);
5474
5480
  }
5475
- set.splice(i, 0, me);
5481
+ set.splice(i2, 0, me);
5476
5482
  return set;
5477
5483
  }
5478
5484
  // Extend a set to cover all the content in `ranges`, which is a
@@ -5496,8 +5502,8 @@ class ChangedRange {
5496
5502
  let end = ranges[rI + 1];
5497
5503
  rI += 2;
5498
5504
  toB = Math.max(toB, end);
5499
- for (let i = dI; i < diff.length && diff[i].fromB <= toB; i++)
5500
- off = diff[i].toA - diff[i].toB;
5505
+ for (let i2 = dI; i2 < diff.length && diff[i2].fromB <= toB; i2++)
5506
+ off = diff[i2].toA - diff[i2].toB;
5501
5507
  toA = Math.max(toA, end + off);
5502
5508
  } else if (dI < diff.length && diff[dI].fromB <= toB) {
5503
5509
  let next = diff[dI++];
@@ -5770,20 +5776,20 @@ class DocTile extends CompositeTile {
5770
5776
  }
5771
5777
  }
5772
5778
  blockTiles(f) {
5773
- for (let stack = [], cur2 = this, i = 0, pos = 0; ; ) {
5774
- if (i == cur2.children.length) {
5779
+ for (let stack = [], cur2 = this, i2 = 0, pos = 0; ; ) {
5780
+ if (i2 == cur2.children.length) {
5775
5781
  if (!stack.length)
5776
5782
  return;
5777
5783
  cur2 = cur2.parent;
5778
5784
  if (cur2.breakAfter)
5779
5785
  pos++;
5780
- i = stack.pop();
5786
+ i2 = stack.pop();
5781
5787
  } else {
5782
- let next = cur2.children[i++];
5788
+ let next = cur2.children[i2++];
5783
5789
  if (next instanceof BlockWrapperTile) {
5784
- stack.push(i);
5790
+ stack.push(i2);
5785
5791
  cur2 = next;
5786
- i = 0;
5792
+ i2 = 0;
5787
5793
  } else {
5788
5794
  let end = pos + next.length;
5789
5795
  let result = f(next, pos);
@@ -5868,8 +5874,8 @@ class LineTile extends CompositeTile {
5868
5874
  resolveInline(pos, side, forCoords) {
5869
5875
  let before = null, beforeOff = -1, after = null, afterOff = -1;
5870
5876
  function scan(tile, pos2) {
5871
- for (let i = 0, off = 0; i < tile.children.length && off <= pos2; i++) {
5872
- let child = tile.children[i], end = off + child.length;
5877
+ for (let i2 = 0, off = 0; i2 < tile.children.length && off <= pos2; i2++) {
5878
+ let child = tile.children[i2], end = off + child.length;
5873
5879
  if (end >= pos2) {
5874
5880
  if (child.isComposite()) {
5875
5881
  scan(child, pos2 - off);
@@ -6028,9 +6034,9 @@ class WidgetTile extends Tile {
6028
6034
  if (!rects.length)
6029
6035
  return null;
6030
6036
  let fromBack = this.flags & 16 ? true : this.flags & 32 ? false : pos > 0;
6031
- for (let i = fromBack ? rects.length - 1 : 0; ; i += fromBack ? -1 : 1) {
6032
- rect = rects[i];
6033
- if (pos > 0 ? i == 0 : i == rects.length - 1 || rect.top < rect.bottom)
6037
+ for (let i2 = fromBack ? rects.length - 1 : 0; ; i2 += fromBack ? -1 : 1) {
6038
+ rect = rects[i2];
6039
+ if (pos > 0 ? i2 == 0 : i2 == rects.length - 1 || rect.top < rect.bottom)
6034
6040
  break;
6035
6041
  }
6036
6042
  return flattenRect(rect, !fromBack);
@@ -6192,8 +6198,8 @@ class TileBuilder {
6192
6198
  );
6193
6199
  }
6194
6200
  let head = line;
6195
- for (let i = context.marks.length - 1; i >= 0; i--) {
6196
- let mark = context.marks[i];
6201
+ for (let i2 = context.marks.length - 1; i2 >= 0; i2--) {
6202
+ let mark = context.marks[i2];
6197
6203
  let last = head.lastChild;
6198
6204
  if (last instanceof MarkTile && last.mark.eq(mark.mark)) {
6199
6205
  if (last.dom != mark.dom)
@@ -6284,8 +6290,8 @@ class TileBuilder {
6284
6290
  ensureMarks(marks, openStart) {
6285
6291
  var _a2;
6286
6292
  let parent = this.curLine;
6287
- for (let i = marks.length - 1; i >= 0; i--) {
6288
- let mark = marks[i], last;
6293
+ for (let i2 = marks.length - 1; i2 >= 0; i2--) {
6294
+ let mark = marks[i2], last;
6289
6295
  if (openStart > 0 && (last = parent.lastChild) && last instanceof MarkTile && last.mark.eq(mark)) {
6290
6296
  parent = last;
6291
6297
  openStart--;
@@ -6323,15 +6329,15 @@ class TileBuilder {
6323
6329
  this.blockWrappers.goto(this.pos);
6324
6330
  this.wrappers.length = 0;
6325
6331
  }
6326
- for (let i = this.wrappers.length - 1; i >= 0; i--)
6327
- if (this.wrappers[i].to < this.pos)
6328
- this.wrappers.splice(i, 1);
6332
+ for (let i2 = this.wrappers.length - 1; i2 >= 0; i2--)
6333
+ if (this.wrappers[i2].to < this.pos)
6334
+ this.wrappers.splice(i2, 1);
6329
6335
  for (let cur2 = this.blockWrappers; cur2.value && cur2.from <= this.pos; cur2.next())
6330
6336
  if (cur2.to >= this.pos) {
6331
- let wrap = new OpenWrapper(cur2.from, cur2.to, cur2.value, cur2.rank), i = this.wrappers.length;
6332
- while (i > 0 && (this.wrappers[i - 1].rank - wrap.rank || this.wrappers[i - 1].to - wrap.to) < 0)
6333
- i--;
6334
- this.wrappers.splice(i, 0, wrap);
6337
+ let wrap = new OpenWrapper(cur2.from, cur2.to, cur2.value, cur2.rank), i2 = this.wrappers.length;
6338
+ while (i2 > 0 && (this.wrappers[i2 - 1].rank - wrap.rank || this.wrappers[i2 - 1].to - wrap.to) < 0)
6339
+ i2--;
6340
+ this.wrappers.splice(i2, 0, wrap);
6335
6341
  }
6336
6342
  this.wrapperPos = this.pos;
6337
6343
  }
@@ -6407,8 +6413,8 @@ class TextStream {
6407
6413
  }
6408
6414
  }
6409
6415
  const buckets = [WidgetTile, LineTile, TextTile, MarkTile, WidgetBufferTile, BlockWrapperTile, DocTile];
6410
- for (let i = 0; i < buckets.length; i++)
6411
- buckets[i].bucket = i;
6416
+ for (let i2 = 0; i2 < buckets.length; i2++)
6417
+ buckets[i2].bucket = i2;
6412
6418
  class TileCache {
6413
6419
  constructor(view) {
6414
6420
  this.view = view;
@@ -6418,24 +6424,24 @@ class TileCache {
6418
6424
  }
6419
6425
  // Put a tile in the cache.
6420
6426
  add(tile) {
6421
- let i = tile.constructor.bucket, bucket = this.buckets[i];
6427
+ let i2 = tile.constructor.bucket, bucket = this.buckets[i2];
6422
6428
  if (bucket.length < 6)
6423
6429
  bucket.push(tile);
6424
6430
  else
6425
6431
  bucket[
6426
- this.index[i] = (this.index[i] + 1) % 6
6432
+ this.index[i2] = (this.index[i2] + 1) % 6
6427
6433
  /* C.Bucket */
6428
6434
  ] = tile;
6429
6435
  }
6430
6436
  find(cls, test, type = 2) {
6431
- let i = cls.bucket;
6432
- let bucket = this.buckets[i], off = this.index[i];
6437
+ let i2 = cls.bucket;
6438
+ let bucket = this.buckets[i2], off = this.index[i2];
6433
6439
  for (let j = bucket.length - 1; j >= 0; j--) {
6434
6440
  let index = (j + off) % bucket.length, tile = bucket[index];
6435
6441
  if ((!test || test(tile)) && !this.reused.has(tile)) {
6436
6442
  bucket.splice(index, 1);
6437
6443
  if (index < off)
6438
- this.index[i]--;
6444
+ this.index[i2]--;
6439
6445
  this.reused.set(tile, type);
6440
6446
  return tile;
6441
6447
  }
@@ -6445,17 +6451,17 @@ class TileCache {
6445
6451
  findWidget(widget, length, flags) {
6446
6452
  let widgets = this.buckets[0];
6447
6453
  if (widgets.length)
6448
- for (let i = 0, pass = 0; ; i++) {
6449
- if (i == widgets.length) {
6454
+ for (let i2 = 0, pass = 0; ; i2++) {
6455
+ if (i2 == widgets.length) {
6450
6456
  if (pass)
6451
6457
  return null;
6452
6458
  pass = 1;
6453
- i = 0;
6459
+ i2 = 0;
6454
6460
  }
6455
- let tile = widgets[i];
6461
+ let tile = widgets[i2];
6456
6462
  if (!this.reused.has(tile) && (pass == 0 ? tile.widget.compare(widget) : tile.widget.constructor == widget.constructor && widget.updateDOM(tile.dom, this.view, tile.widget))) {
6457
- widgets.splice(i, 1);
6458
- if (i < this.index[0])
6463
+ widgets.splice(i2, 1);
6464
+ if (i2 < this.index[0])
6459
6465
  this.index[0]--;
6460
6466
  if (tile.widget == widget && tile.length == length && (tile.flags & (496 | 1)) == flags) {
6461
6467
  this.reused.set(
@@ -6490,8 +6496,8 @@ class TileCache {
6490
6496
  return tile.dom;
6491
6497
  }
6492
6498
  clear() {
6493
- for (let i = 0; i < this.buckets.length; i++)
6494
- this.buckets[i].length = this.index[i] = 0;
6499
+ for (let i2 = 0; i2 < this.buckets.length; i2++)
6500
+ this.buckets[i2].length = this.index[i2] = 0;
6495
6501
  }
6496
6502
  }
6497
6503
  class TileUpdate {
@@ -6525,12 +6531,12 @@ class TileUpdate {
6525
6531
  }
6526
6532
  run(changes, composition) {
6527
6533
  let compositionContext = composition && this.getCompositionContext(composition.text);
6528
- for (let posA = 0, posB = 0, i = 0; ; ) {
6529
- let next = i < changes.length ? changes[i++] : null;
6534
+ for (let posA = 0, posB = 0, i2 = 0; ; ) {
6535
+ let next = i2 < changes.length ? changes[i2++] : null;
6530
6536
  let skipA = next ? next.fromA : this.old.root.length;
6531
6537
  if (skipA > posA) {
6532
6538
  let len = skipA - posA;
6533
- this.preserve(len, !i, !next);
6539
+ this.preserve(len, !i2, !next);
6534
6540
  posA = skipA;
6535
6541
  posB += len;
6536
6542
  }
@@ -6745,8 +6751,8 @@ function addLineDeco(value, deco) {
6745
6751
  }
6746
6752
  function getMarks(ptr) {
6747
6753
  let found = [];
6748
- for (let i = ptr.parents.length; i > 1; i--) {
6749
- let tile = i == ptr.parents.length ? ptr.tile : ptr.parents[i].tile;
6754
+ for (let i2 = ptr.parents.length; i2 > 1; i2--) {
6755
+ let tile = i2 == ptr.parents.length ? ptr.tile : ptr.parents[i2].tile;
6750
6756
  if (tile instanceof MarkTile)
6751
6757
  found.push(tile.mark);
6752
6758
  }
@@ -7036,8 +7042,8 @@ class DocView {
7036
7042
  after = after.nextSibling;
7037
7043
  if (!after)
7038
7044
  return start + tile.length;
7039
- for (let i = 0, pos = start; ; i++) {
7040
- let child = tile.children[i];
7045
+ for (let i2 = 0, pos = start; ; i2++) {
7046
+ let child = tile.children[i2];
7041
7047
  if (child.dom == after)
7042
7048
  return pos;
7043
7049
  pos += child.length + child.breakAfter;
@@ -7121,9 +7127,9 @@ class DocView {
7121
7127
  if (end == offset2)
7122
7128
  return null;
7123
7129
  let rects = textRange(tile2.dom, offset2, end).getClientRects();
7124
- for (let i = 0; i < rects.length; i++) {
7125
- let rect = rects[i];
7126
- if (i == rects.length - 1 || rect.top < rect.bottom && rect.left < rect.right)
7130
+ for (let i2 = 0; i2 < rects.length; i2++) {
7131
+ let rect = rects[i2];
7132
+ if (i2 == rects.length - 1 || rect.top < rect.bottom && rect.left < rect.right)
7127
7133
  return rect;
7128
7134
  }
7129
7135
  }
@@ -7138,12 +7144,12 @@ class DocView {
7138
7144
  let widest = -1, ltr = this.view.textDirection == Direction.LTR;
7139
7145
  let spaceAbove = 0;
7140
7146
  let scan = (tile, pos, measureBounds) => {
7141
- for (let i = 0; i < tile.children.length; i++) {
7147
+ for (let i2 = 0; i2 < tile.children.length; i2++) {
7142
7148
  if (pos > to)
7143
7149
  break;
7144
- let child = tile.children[i], end = pos + child.length;
7150
+ let child = tile.children[i2], end = pos + child.length;
7145
7151
  let childRect = child.dom.getBoundingClientRect(), { height } = childRect;
7146
- if (measureBounds && !i)
7152
+ if (measureBounds && !i2)
7147
7153
  spaceAbove += childRect.top - measureBounds.top;
7148
7154
  if (child instanceof BlockWrapperTile) {
7149
7155
  if (end > from)
@@ -7168,7 +7174,7 @@ class DocView {
7168
7174
  }
7169
7175
  }
7170
7176
  }
7171
- if (measureBounds && i == tile.children.length - 1)
7177
+ if (measureBounds && i2 == tile.children.length - 1)
7172
7178
  spaceAbove += measureBounds.bottom - childRect.bottom;
7173
7179
  pos = end + child.breakAfter;
7174
7180
  }
@@ -7220,8 +7226,8 @@ class DocView {
7220
7226
  }
7221
7227
  computeBlockGapDeco() {
7222
7228
  let deco = [], vs = this.view.viewState;
7223
- for (let pos = 0, i = 0; ; i++) {
7224
- let next = i == vs.viewports.length ? null : vs.viewports[i];
7229
+ for (let pos = 0, i2 = 0; ; i2++) {
7230
+ let next = i2 == vs.viewports.length ? null : vs.viewports[i2];
7225
7231
  let end = next ? next.from - 1 : this.view.state.doc.length;
7226
7232
  if (end > pos) {
7227
7233
  let height = (vs.lineBlockAt(end).bottom - vs.lineBlockAt(pos).top) / this.view.scaleY;
@@ -7239,19 +7245,19 @@ class DocView {
7239
7245
  return Decoration.set(deco);
7240
7246
  }
7241
7247
  updateDeco() {
7242
- let i = 1;
7248
+ let i2 = 1;
7243
7249
  let allDeco = this.view.state.facet(decorations).map((d) => {
7244
- let dynamic = this.dynamicDecorationMap[i++] = typeof d == "function";
7250
+ let dynamic = this.dynamicDecorationMap[i2++] = typeof d == "function";
7245
7251
  return dynamic ? d(this.view) : d;
7246
7252
  });
7247
- let dynamicOuter = false, outerDeco = this.view.state.facet(outerDecorations).map((d, i2) => {
7253
+ let dynamicOuter = false, outerDeco = this.view.state.facet(outerDecorations).map((d, i3) => {
7248
7254
  let dynamic = typeof d == "function";
7249
7255
  if (dynamic)
7250
7256
  dynamicOuter = true;
7251
7257
  return dynamic ? d(this.view) : d;
7252
7258
  });
7253
7259
  if (outerDeco.length) {
7254
- this.dynamicDecorationMap[i++] = dynamicOuter;
7260
+ this.dynamicDecorationMap[i2++] = dynamicOuter;
7255
7261
  allDeco.push(RangeSet.join(outerDeco));
7256
7262
  }
7257
7263
  this.decorations = [
@@ -7260,8 +7266,8 @@ class DocView {
7260
7266
  this.computeBlockGapDeco(),
7261
7267
  this.view.viewState.lineGapDeco
7262
7268
  ];
7263
- while (i < this.decorations.length)
7264
- this.dynamicDecorationMap[i++] = false;
7269
+ while (i2 < this.decorations.length)
7270
+ this.dynamicDecorationMap[i2++] = false;
7265
7271
  this.blockWrappers = this.view.state.facet(blockWrappers).map((v) => typeof v == "function" ? v(this.view) : v);
7266
7272
  }
7267
7273
  scrollIntoView(target) {
@@ -7601,8 +7607,8 @@ function skipAtomicRanges(atoms, pos, bias) {
7601
7607
  }
7602
7608
  function skipAtomsForSelection(atoms, sel) {
7603
7609
  let ranges = null;
7604
- for (let i = 0; i < sel.ranges.length; i++) {
7605
- let range = sel.ranges[i], updated = null;
7610
+ for (let i2 = 0; i2 < sel.ranges.length; i2++) {
7611
+ let range = sel.ranges[i2], updated = null;
7606
7612
  if (range.empty) {
7607
7613
  let pos = skipAtomicRanges(atoms, range.from, 0);
7608
7614
  if (pos != range.from)
@@ -7616,7 +7622,7 @@ function skipAtomsForSelection(atoms, sel) {
7616
7622
  if (updated) {
7617
7623
  if (!ranges)
7618
7624
  ranges = sel.ranges.slice();
7619
- ranges[i] = updated;
7625
+ ranges[i2] = updated;
7620
7626
  }
7621
7627
  }
7622
7628
  return ranges ? EditorSelection.create(ranges, sel.mainIndex) : sel;
@@ -7714,7 +7720,7 @@ class InlineCoordsScan {
7714
7720
  let dist2 = hi - lo, mid = lo + hi >> 1;
7715
7721
  adjust: if (seen.has(mid)) {
7716
7722
  let scan = lo + Math.floor(Math.random() * dist2);
7717
- for (let i = 0; i < dist2; i++) {
7723
+ for (let i2 = 0; i2 < dist2; i2++) {
7718
7724
  if (!seen.has(scan)) {
7719
7725
  mid = scan;
7720
7726
  break adjust;
@@ -7728,8 +7734,8 @@ class InlineCoordsScan {
7728
7734
  seen.add(mid);
7729
7735
  let rects = getRects(mid);
7730
7736
  if (rects)
7731
- for (let i = 0; i < rects.length; i++) {
7732
- let rect = rects[i], side = 0;
7737
+ for (let i2 = 0; i2 < rects.length; i2++) {
7738
+ let rect = rects[i2], side = 0;
7733
7739
  if (rect.width == 0 && rects.length > 1)
7734
7740
  continue;
7735
7741
  if (rect.bottom < this.y) {
@@ -7771,11 +7777,11 @@ class InlineCoordsScan {
7771
7777
  }
7772
7778
  scanText(tile, offset) {
7773
7779
  let positions = [];
7774
- for (let i = 0; i < tile.length; i = findClusterBreak(tile.text, i))
7775
- positions.push(offset + i);
7780
+ for (let i2 = 0; i2 < tile.length; i2 = findClusterBreak(tile.text, i2))
7781
+ positions.push(offset + i2);
7776
7782
  positions.push(offset + tile.length);
7777
- let scan = this.scan(positions, (i) => {
7778
- let off = positions[i] - offset, end = positions[i + 1] - offset;
7783
+ let scan = this.scan(positions, (i2) => {
7784
+ let off = positions[i2] - offset, end = positions[i2 + 1] - offset;
7779
7785
  return textRange(tile.dom, off, end).getClientRects();
7780
7786
  });
7781
7787
  return scan.after ? new PosAssoc(positions[scan.i + 1], -1) : new PosAssoc(positions[scan.i], 1);
@@ -7791,10 +7797,10 @@ class InlineCoordsScan {
7791
7797
  return this.scanTile(child2, offset);
7792
7798
  }
7793
7799
  let positions = [offset];
7794
- for (let i = 0, pos2 = offset; i < tile.children.length; i++)
7795
- positions.push(pos2 += tile.children[i].length);
7796
- let scan = this.scan(positions, (i) => {
7797
- let child2 = tile.children[i];
7800
+ for (let i2 = 0, pos2 = offset; i2 < tile.children.length; i2++)
7801
+ positions.push(pos2 += tile.children[i2].length);
7802
+ let scan = this.scan(positions, (i2) => {
7803
+ let child2 = tile.children[i2];
7798
7804
  if (child2.flags & 48)
7799
7805
  return null;
7800
7806
  return (child2.dom.nodeType == 1 ? child2.dom : textRange(child2.dom, 0, child2.length)).getClientRects();
@@ -7874,11 +7880,11 @@ class DOMReader {
7874
7880
  let fromView = tile && tile.overrideDOMText;
7875
7881
  if (fromView != null) {
7876
7882
  this.findPointInside(node, fromView.length);
7877
- for (let i = fromView.iter(); !i.next().done; ) {
7878
- if (i.lineBreak)
7883
+ for (let i2 = fromView.iter(); !i2.next().done; ) {
7884
+ if (i2.lineBreak)
7879
7885
  this.lineBreak();
7880
7886
  else
7881
- this.append(i.value);
7887
+ this.append(i2.value);
7882
7888
  }
7883
7889
  } else if (node.nodeType == 3) {
7884
7890
  this.readTextNode(node);
@@ -7980,16 +7986,16 @@ class DOMChange {
7980
7986
  function domBoundsAround(tile, from, to, offset) {
7981
7987
  if (tile.isComposite()) {
7982
7988
  let fromI = -1, fromStart = -1, toI = -1, toEnd = -1;
7983
- for (let i = 0, pos = offset, prevEnd = offset; i < tile.children.length; i++) {
7984
- let child = tile.children[i], end = pos + child.length;
7989
+ for (let i2 = 0, pos = offset, prevEnd = offset; i2 < tile.children.length; i2++) {
7990
+ let child = tile.children[i2], end = pos + child.length;
7985
7991
  if (pos < from && end > to)
7986
7992
  return domBoundsAround(child, from, to, pos);
7987
7993
  if (end >= from && fromI == -1) {
7988
- fromI = i;
7994
+ fromI = i2;
7989
7995
  fromStart = pos;
7990
7996
  }
7991
7997
  if (pos > to && child.dom.parentNode == tile.dom) {
7992
- toI = i;
7998
+ toI = i2;
7993
7999
  toEnd = prevEnd;
7994
8000
  break;
7995
8001
  }
@@ -8511,8 +8517,8 @@ function isInPrimarySelection(view, event) {
8511
8517
  if (!sel || sel.rangeCount == 0)
8512
8518
  return true;
8513
8519
  let rects = sel.getRangeAt(0).getClientRects();
8514
- for (let i = 0; i < rects.length; i++) {
8515
- let rect = rects[i];
8520
+ for (let i2 = 0; i2 < rects.length; i2++) {
8521
+ let rect = rects[i2];
8516
8522
  if (rect.left <= event.clientX && rect.right >= event.clientX && rect.top <= event.clientY && rect.bottom >= event.clientY)
8517
8523
  return true;
8518
8524
  }
@@ -8551,7 +8557,7 @@ function textFilter(state, facet, text) {
8551
8557
  }
8552
8558
  function doPaste(view, input) {
8553
8559
  input = textFilter(view.state, clipboardInputFilter, input);
8554
- let { state } = view, changes, i = 1, text = state.toText(input);
8560
+ let { state } = view, changes, i2 = 1, text = state.toText(input);
8555
8561
  let byLine = text.lines == state.selection.ranges.length;
8556
8562
  let linewise = lastLinewiseCopy != null && state.selection.ranges.every((r) => r.empty) && lastLinewiseCopy == text.toString();
8557
8563
  if (linewise) {
@@ -8561,7 +8567,7 @@ function doPaste(view, input) {
8561
8567
  if (line.from == lastLine)
8562
8568
  return { range };
8563
8569
  lastLine = line.from;
8564
- let insert2 = state.toText((byLine ? text.line(i++).text : input) + state.lineBreak);
8570
+ let insert2 = state.toText((byLine ? text.line(i2++).text : input) + state.lineBreak);
8565
8571
  return {
8566
8572
  changes: { from: line.from, insert: insert2 },
8567
8573
  range: EditorSelection.cursor(range.from + insert2.length)
@@ -8569,7 +8575,7 @@ function doPaste(view, input) {
8569
8575
  });
8570
8576
  } else if (byLine) {
8571
8577
  changes = state.changeByRange((range) => {
8572
- let line = text.line(i++);
8578
+ let line = text.line(i2++);
8573
8579
  return {
8574
8580
  changes: { from: range.from, to: range.to, insert: line.text },
8575
8581
  range: EditorSelection.cursor(range.from + line.length)
@@ -8693,10 +8699,10 @@ function basicMouseSelection(view, event) {
8693
8699
  };
8694
8700
  }
8695
8701
  function removeRangeAround(sel, pos) {
8696
- for (let i = 0; i < sel.ranges.length; i++) {
8697
- let { from, to } = sel.ranges[i];
8702
+ for (let i2 = 0; i2 < sel.ranges.length; i2++) {
8703
+ let { from, to } = sel.ranges[i2];
8698
8704
  if (from <= pos && to >= pos)
8699
- return EditorSelection.create(sel.ranges.slice(0, i).concat(sel.ranges.slice(i + 1)), sel.mainIndex == i ? 0 : sel.mainIndex - (sel.mainIndex > i ? 1 : 0));
8705
+ return EditorSelection.create(sel.ranges.slice(0, i2).concat(sel.ranges.slice(i2 + 1)), sel.mainIndex == i2 ? 0 : sel.mainIndex - (sel.mainIndex > i2 ? 1 : 0));
8700
8706
  }
8701
8707
  return null;
8702
8708
  }
@@ -8753,15 +8759,15 @@ handlers.drop = (view, event) => {
8753
8759
  if (++read == files.length)
8754
8760
  dropText(view, event, text.filter((s) => s != null).join(view.state.lineBreak), false);
8755
8761
  };
8756
- for (let i = 0; i < files.length; i++) {
8762
+ for (let i2 = 0; i2 < files.length; i2++) {
8757
8763
  let reader = new FileReader();
8758
8764
  reader.onerror = finishFile;
8759
8765
  reader.onload = () => {
8760
8766
  if (!/[\x00-\x08\x0e-\x1f]{2}/.test(reader.result))
8761
- text[i] = reader.result;
8767
+ text[i2] = reader.result;
8762
8768
  finishFile();
8763
8769
  };
8764
- reader.readAsText(files[i]);
8770
+ reader.readAsText(files[i2]);
8765
8771
  }
8766
8772
  return true;
8767
8773
  } else {
@@ -8994,10 +9000,10 @@ class HeightOracle {
8994
9000
  }
8995
9001
  mustRefreshForHeights(lineHeights) {
8996
9002
  let newHeight = false;
8997
- for (let i = 0; i < lineHeights.length; i++) {
8998
- let h = lineHeights[i];
9003
+ for (let i2 = 0; i2 < lineHeights.length; i2++) {
9004
+ let h = lineHeights[i2];
8999
9005
  if (h < 0) {
9000
- i++;
9006
+ i2++;
9001
9007
  } else if (!this.heightSamples[Math.floor(h * 10)]) {
9002
9008
  newHeight = true;
9003
9009
  this.heightSamples[Math.floor(h * 10)] = true;
@@ -9015,10 +9021,10 @@ class HeightOracle {
9015
9021
  this.lineLength = lineLength;
9016
9022
  if (changed) {
9017
9023
  this.heightSamples = {};
9018
- for (let i = 0; i < knownHeights.length; i++) {
9019
- let h = knownHeights[i];
9024
+ for (let i2 = 0; i2 < knownHeights.length; i2++) {
9025
+ let h = knownHeights[i2];
9020
9026
  if (h < 0)
9021
- i++;
9027
+ i2++;
9022
9028
  else
9023
9029
  this.heightSamples[Math.floor(h * 10)] = true;
9024
9030
  }
@@ -9088,12 +9094,12 @@ class BlockInfo {
9088
9094
  return new BlockInfo(this.from, this.length + other.length, this.top, this.height + other.height, content2);
9089
9095
  }
9090
9096
  }
9091
- var QueryType$1 = /* @__PURE__ */ function(QueryType2) {
9097
+ var QueryType$1 = /* @__PURE__ */ (function(QueryType2) {
9092
9098
  QueryType2[QueryType2["ByPos"] = 0] = "ByPos";
9093
9099
  QueryType2[QueryType2["ByHeight"] = 1] = "ByHeight";
9094
9100
  QueryType2[QueryType2["ByPosNoHeight"] = 2] = "ByPosNoHeight";
9095
9101
  return QueryType2;
9096
- }(QueryType$1 || (QueryType$1 = {}));
9102
+ })(QueryType$1 || (QueryType$1 = {}));
9097
9103
  const Epsilon = 1e-3;
9098
9104
  class HeightMap {
9099
9105
  constructor(length, height, flags = 2) {
@@ -9129,16 +9135,16 @@ class HeightMap {
9129
9135
  }
9130
9136
  applyChanges(decorations2, oldDoc, oracle, changes) {
9131
9137
  let me = this, doc2 = oracle.doc;
9132
- for (let i = changes.length - 1; i >= 0; i--) {
9133
- let { fromA, toA, fromB, toB } = changes[i];
9138
+ for (let i2 = changes.length - 1; i2 >= 0; i2--) {
9139
+ let { fromA, toA, fromB, toB } = changes[i2];
9134
9140
  let start = me.lineAt(fromA, QueryType$1.ByPosNoHeight, oracle.setDoc(oldDoc), 0, 0);
9135
9141
  let end = start.to >= toA ? start : me.lineAt(toA, QueryType$1.ByPosNoHeight, oracle, 0, 0);
9136
9142
  toB += end.to - toA;
9137
9143
  toA = end.to;
9138
- while (i > 0 && start.from <= changes[i - 1].toA) {
9139
- fromA = changes[i - 1].fromA;
9140
- fromB = changes[i - 1].fromB;
9141
- i--;
9144
+ while (i2 > 0 && start.from <= changes[i2 - 1].toA) {
9145
+ fromA = changes[i2 - 1].fromA;
9146
+ fromB = changes[i2 - 1].fromB;
9147
+ i2--;
9142
9148
  if (fromA < start.from)
9143
9149
  start = me.lineAt(fromA, QueryType$1.ByPosNoHeight, oracle, 0, 0);
9144
9150
  }
@@ -9159,15 +9165,15 @@ class HeightMap {
9159
9165
  static of(nodes) {
9160
9166
  if (nodes.length == 1)
9161
9167
  return nodes[0];
9162
- let i = 0, j = nodes.length, before = 0, after = 0;
9168
+ let i2 = 0, j = nodes.length, before = 0, after = 0;
9163
9169
  for (; ; ) {
9164
- if (i == j) {
9170
+ if (i2 == j) {
9165
9171
  if (before > after * 2) {
9166
- let split = nodes[i - 1];
9172
+ let split = nodes[i2 - 1];
9167
9173
  if (split.break)
9168
- nodes.splice(--i, 1, split.left, null, split.right);
9174
+ nodes.splice(--i2, 1, split.left, null, split.right);
9169
9175
  else
9170
- nodes.splice(--i, 1, split.left, split.right);
9176
+ nodes.splice(--i2, 1, split.left, split.right);
9171
9177
  j += 1 + split.break;
9172
9178
  before -= split.size;
9173
9179
  } else if (after > before * 2) {
@@ -9182,7 +9188,7 @@ class HeightMap {
9182
9188
  break;
9183
9189
  }
9184
9190
  } else if (before < after) {
9185
- let next = nodes[i++];
9191
+ let next = nodes[i2++];
9186
9192
  if (next)
9187
9193
  before += next.size;
9188
9194
  } else {
@@ -9192,14 +9198,14 @@ class HeightMap {
9192
9198
  }
9193
9199
  }
9194
9200
  let brk = 0;
9195
- if (nodes[i - 1] == null) {
9201
+ if (nodes[i2 - 1] == null) {
9196
9202
  brk = 1;
9197
- i--;
9198
- } else if (nodes[i] == null) {
9203
+ i2--;
9204
+ } else if (nodes[i2] == null) {
9199
9205
  brk = 1;
9200
9206
  j++;
9201
9207
  }
9202
- return new HeightMapBranch(HeightMap.of(nodes.slice(0, i)), brk, HeightMap.of(nodes.slice(j)));
9208
+ return new HeightMapBranch(HeightMap.of(nodes.slice(0, i2)), brk, HeightMap.of(nodes.slice(j)));
9203
9209
  }
9204
9210
  }
9205
9211
  function replace(old, val) {
@@ -9727,8 +9733,8 @@ class LineGap {
9727
9733
  static same(a, b) {
9728
9734
  if (a.length != b.length)
9729
9735
  return false;
9730
- for (let i = 0; i < a.length; i++) {
9731
- let gA = a[i], gB = b[i];
9736
+ for (let i2 = 0; i2 < a.length; i2++) {
9737
+ let gA = a[i2], gB = b[i2];
9732
9738
  if (gA.from != gB.from || gA.to != gB.to || gA.size != gB.size)
9733
9739
  return false;
9734
9740
  }
@@ -9793,7 +9799,7 @@ class ViewState {
9793
9799
  this.heightOracle = new HeightOracle(guessWrapping);
9794
9800
  this.stateDeco = staticDeco(state);
9795
9801
  this.heightMap = HeightMap.empty().applyChanges(this.stateDeco, Text.empty, this.heightOracle.setDoc(state.doc), [new ChangedRange(0, 0, 0, state.doc.length)]);
9796
- for (let i = 0; i < 2; i++) {
9802
+ for (let i2 = 0; i2 < 2; i2++) {
9797
9803
  this.viewport = this.getViewport(0, null);
9798
9804
  if (!this.updateForViewport())
9799
9805
  break;
@@ -9806,8 +9812,8 @@ class ViewState {
9806
9812
  }
9807
9813
  updateForViewport() {
9808
9814
  let viewports = [this.viewport], { main } = this.state.selection;
9809
- for (let i = 0; i <= 1; i++) {
9810
- let pos = i ? main.head : main.anchor;
9815
+ for (let i2 = 0; i2 <= 1; i2++) {
9816
+ let pos = i2 ? main.head : main.anchor;
9811
9817
  if (!viewports.some(({ from, to }) => pos >= from && pos <= to)) {
9812
9818
  let { from, to } = this.lineBlockAt(pos);
9813
9819
  viewports.push(new Viewport(from, to));
@@ -10151,8 +10157,8 @@ class ViewState {
10151
10157
  if (ranges.length != this.visibleRanges.length) {
10152
10158
  changed = 8 | 4;
10153
10159
  } else {
10154
- for (let i = 0; i < ranges.length && !(changed & 8); i++) {
10155
- let old = this.visibleRanges[i], nw = ranges[i];
10160
+ for (let i2 = 0; i2 < ranges.length && !(changed & 8); i2++) {
10161
+ let old = this.visibleRanges[i2], nw = ranges[i2];
10156
10162
  if (old.from != nw.from || old.to != nw.to) {
10157
10163
  changed |= 4;
10158
10164
  if (!(changes && changes.mapPos(old.from, -1) == nw.from && changes.mapPos(old.to, 1) == nw.to))
@@ -10218,8 +10224,8 @@ function findPosition({ total, ranges }, ratio) {
10218
10224
  if (ratio >= 1)
10219
10225
  return ranges[ranges.length - 1].to;
10220
10226
  let dist2 = Math.floor(total * ratio);
10221
- for (let i = 0; ; i++) {
10222
- let { from, to } = ranges[i], size = to - from;
10227
+ for (let i2 = 0; ; i2++) {
10228
+ let { from, to } = ranges[i2], size = to - from;
10223
10229
  if (dist2 <= size)
10224
10230
  return from + dist2;
10225
10231
  dist2 -= size;
@@ -10278,8 +10284,8 @@ class BigScaler {
10278
10284
  }
10279
10285
  }
10280
10286
  toDOM(n) {
10281
- for (let i = 0, base2 = 0, domBase = 0; ; i++) {
10282
- let vp = i < this.viewports.length ? this.viewports[i] : null;
10287
+ for (let i2 = 0, base2 = 0, domBase = 0; ; i2++) {
10288
+ let vp = i2 < this.viewports.length ? this.viewports[i2] : null;
10283
10289
  if (!vp || n < vp.top)
10284
10290
  return domBase + (n - base2) * this.scale;
10285
10291
  if (n <= vp.bottom)
@@ -10289,8 +10295,8 @@ class BigScaler {
10289
10295
  }
10290
10296
  }
10291
10297
  fromDOM(n) {
10292
- for (let i = 0, base2 = 0, domBase = 0; ; i++) {
10293
- let vp = i < this.viewports.length ? this.viewports[i] : null;
10298
+ for (let i2 = 0, base2 = 0, domBase = 0; ; i2++) {
10299
+ let vp = i2 < this.viewports.length ? this.viewports[i2] : null;
10294
10300
  if (!vp || n < vp.domTop)
10295
10301
  return base2 + (n - domBase) / this.scale;
10296
10302
  if (n <= vp.domBottom)
@@ -10302,7 +10308,7 @@ class BigScaler {
10302
10308
  eq(other) {
10303
10309
  if (!(other instanceof BigScaler))
10304
10310
  return false;
10305
- return this.scale == other.scale && this.viewports.length == other.viewports.length && this.viewports.every((vp, i) => vp.from == other.viewports[i].from && vp.to == other.viewports[i].to);
10311
+ return this.scale == other.scale && this.viewports.length == other.viewports.length && this.viewports.every((vp, i2) => vp.from == other.viewports[i2].from && vp.to == other.viewports[i2].to);
10306
10312
  }
10307
10313
  }
10308
10314
  function scaleBlock(block, scaler) {
@@ -10730,7 +10736,7 @@ class DOMObserver {
10730
10736
  }, 500);
10731
10737
  }
10732
10738
  updateGaps(gaps) {
10733
- if (this.gapIntersection && (gaps.length != this.gaps.length || this.gaps.some((g, i) => g != gaps[i]))) {
10739
+ if (this.gapIntersection && (gaps.length != this.gaps.length || this.gaps.some((g, i2) => g != gaps[i2]))) {
10734
10740
  this.gapIntersection.disconnect();
10735
10741
  for (let gap of gaps)
10736
10742
  this.gapIntersection.observe(gap);
@@ -10784,13 +10790,13 @@ class DOMObserver {
10784
10790
  }
10785
10791
  listenForScroll() {
10786
10792
  this.parentCheck = -1;
10787
- let i = 0, changed = null;
10793
+ let i2 = 0, changed = null;
10788
10794
  for (let dom = this.dom; dom; ) {
10789
10795
  if (dom.nodeType == 1) {
10790
- if (!changed && i < this.scrollTargets.length && this.scrollTargets[i] == dom)
10791
- i++;
10796
+ if (!changed && i2 < this.scrollTargets.length && this.scrollTargets[i2] == dom)
10797
+ i2++;
10792
10798
  else if (!changed)
10793
- changed = this.scrollTargets.slice(0, i);
10799
+ changed = this.scrollTargets.slice(0, i2);
10794
10800
  if (changed)
10795
10801
  changed.push(dom);
10796
10802
  dom = dom.assignedSlot || dom.parentNode;
@@ -10800,8 +10806,8 @@ class DOMObserver {
10800
10806
  break;
10801
10807
  }
10802
10808
  }
10803
- if (i < this.scrollTargets.length && !changed)
10804
- changed = this.scrollTargets.slice(0, i);
10809
+ if (i2 < this.scrollTargets.length && !changed)
10810
+ changed = this.scrollTargets.slice(0, i2);
10805
10811
  if (changed) {
10806
10812
  for (let dom of this.scrollTargets)
10807
10813
  dom.removeEventListener("scroll", this.onScroll);
@@ -11113,8 +11119,8 @@ class EditContextManager {
11113
11119
  };
11114
11120
  this.handlers.characterboundsupdate = (e) => {
11115
11121
  let rects = [], prev = null;
11116
- for (let i = this.toEditorPos(e.rangeStart), end = this.toEditorPos(e.rangeEnd); i < end; i++) {
11117
- let rect = view.coordsForChar(i);
11122
+ for (let i2 = this.toEditorPos(e.rangeStart), end = this.toEditorPos(e.rangeEnd); i2 < end; i2++) {
11123
+ let rect = view.coordsForChar(i2);
11118
11124
  prev = rect && new DOMRect(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top) || prev || new DOMRect();
11119
11125
  rects.push(prev);
11120
11126
  }
@@ -11536,8 +11542,8 @@ class EditorView {
11536
11542
  for (let p of this.plugins)
11537
11543
  p.mustUpdate = update;
11538
11544
  }
11539
- for (let i = 0; i < this.plugins.length; i++)
11540
- this.plugins[i].update(this);
11545
+ for (let i2 = 0; i2 < this.plugins.length; i2++)
11546
+ this.plugins[i2].update(this);
11541
11547
  if (prevSpecs != specs)
11542
11548
  this.inputState.ensureHandlers(this.plugins);
11543
11549
  }
@@ -11576,7 +11582,7 @@ class EditorView {
11576
11582
  scrollAnchorHeight = -1;
11577
11583
  this.viewState.scrollAnchorHeight = -1;
11578
11584
  try {
11579
- for (let i = 0; ; i++) {
11585
+ for (let i2 = 0; ; i2++) {
11580
11586
  if (scrollAnchorHeight < 0) {
11581
11587
  if (isScrolledToBottom(scroll || this.win)) {
11582
11588
  scrollAnchorPos = -1;
@@ -11591,7 +11597,7 @@ class EditorView {
11591
11597
  let changed = this.viewState.measure();
11592
11598
  if (!changed && !this.measureRequests.length && this.viewState.scrollTarget == null)
11593
11599
  break;
11594
- if (i > 5) {
11600
+ if (i2 > 5) {
11595
11601
  console.warn(this.measureRequests.length ? "Measure loop restarted more than 5 times" : "Viewport failed to stabilize");
11596
11602
  break;
11597
11603
  }
@@ -11621,12 +11627,12 @@ class EditorView {
11621
11627
  if (redrawn)
11622
11628
  this.docViewUpdate();
11623
11629
  }
11624
- for (let i2 = 0; i2 < measuring.length; i2++)
11625
- if (measured[i2] != BadMeasure) {
11630
+ for (let i3 = 0; i3 < measuring.length; i3++)
11631
+ if (measured[i3] != BadMeasure) {
11626
11632
  try {
11627
- let m = measuring[i2];
11633
+ let m = measuring[i3];
11628
11634
  if (m.write)
11629
- m.write(measured[i2], this);
11635
+ m.write(measured[i3], this);
11630
11636
  } catch (e) {
11631
11637
  logException(this.state, e);
11632
11638
  }
@@ -11737,9 +11743,9 @@ class EditorView {
11737
11743
  if (this.measureRequests.indexOf(request) > -1)
11738
11744
  return;
11739
11745
  if (request.key != null)
11740
- for (let i = 0; i < this.measureRequests.length; i++) {
11741
- if (this.measureRequests[i].key === request.key) {
11742
- this.measureRequests[i] = request;
11746
+ for (let i2 = 0; i2 < this.measureRequests.length; i2++) {
11747
+ if (this.measureRequests[i2].key === request.key) {
11748
+ this.measureRequests[i2] = request;
11743
11749
  return;
11744
11750
  }
11745
11751
  }
@@ -12225,8 +12231,8 @@ class CachedOrder {
12225
12231
  if (changes.empty && !cache2.some((c) => c.fresh))
12226
12232
  return cache2;
12227
12233
  let result = [], lastDir = cache2.length ? cache2[cache2.length - 1].dir : Direction.LTR;
12228
- for (let i = Math.max(0, cache2.length - 10); i < cache2.length; i++) {
12229
- let entry = cache2[i];
12234
+ for (let i2 = Math.max(0, cache2.length - 10); i2 < cache2.length; i2++) {
12235
+ let entry = cache2[i2];
12230
12236
  if (entry.dir == lastDir && !changes.touchesRange(entry.from, entry.to))
12231
12237
  result.push(new CachedOrder(changes.mapPos(entry.from, 1), changes.mapPos(entry.to, -1), entry.dir, entry.isolates, false, entry.order));
12232
12238
  }
@@ -12234,8 +12240,8 @@ class CachedOrder {
12234
12240
  }
12235
12241
  }
12236
12242
  function attrsFromFacet(view, facet, base2) {
12237
- for (let sources = view.state.facet(facet), i = sources.length - 1; i >= 0; i--) {
12238
- let source = sources[i], value = typeof source == "function" ? source(view) : source;
12243
+ for (let sources = view.state.facet(facet), i2 = sources.length - 1; i2 >= 0; i2--) {
12244
+ let source = sources[i2], value = typeof source == "function" ? source(view) : source;
12239
12245
  if (value)
12240
12246
  combineAttrs(value, base2);
12241
12247
  }
@@ -12248,8 +12254,8 @@ function normalizeKeyName(name2, platform) {
12248
12254
  if (result == "Space")
12249
12255
  result = " ";
12250
12256
  let alt, ctrl, shift2, meta2;
12251
- for (let i = 0; i < parts.length - 1; ++i) {
12252
- const mod = parts[i];
12257
+ for (let i2 = 0; i2 < parts.length - 1; ++i2) {
12258
+ const mod = parts[i2];
12253
12259
  if (/^(cmd|meta|m)$/i.test(mod))
12254
12260
  meta2 = true;
12255
12261
  else if (/^a(lt)?$/i.test(mod))
@@ -12320,8 +12326,8 @@ function buildKeymap(bindings, platform = currentPlatform) {
12320
12326
  var _a2, _b;
12321
12327
  let scopeObj = bound[scope] || (bound[scope] = /* @__PURE__ */ Object.create(null));
12322
12328
  let parts = key.split(/ (?!$)/).map((k) => normalizeKeyName(k, platform));
12323
- for (let i = 1; i < parts.length; i++) {
12324
- let prefix = parts.slice(0, i).join(" ");
12329
+ for (let i2 = 1; i2 < parts.length; i2++) {
12330
+ let prefix = parts.slice(0, i2).join(" ");
12325
12331
  checkPrefix(prefix, true);
12326
12332
  if (!scopeObj[prefix])
12327
12333
  scopeObj[prefix] = {
@@ -12534,8 +12540,8 @@ function rectanglesForRange(view, className, range) {
12534
12540
  }
12535
12541
  function pieces({ top: top2, bottom, horizontal }) {
12536
12542
  let pieces2 = [];
12537
- for (let i = 0; i < horizontal.length; i += 2)
12538
- pieces2.push(piece(horizontal[i], top2, horizontal[i + 1], bottom));
12543
+ for (let i2 = 0; i2 < horizontal.length; i2 += 2)
12544
+ pieces2.push(piece(horizontal[i2], top2, horizontal[i2 + 1], bottom));
12539
12545
  return pieces2;
12540
12546
  }
12541
12547
  function drawForLine(from2, to2, line) {
@@ -12632,7 +12638,7 @@ class LayerView {
12632
12638
  }
12633
12639
  }
12634
12640
  draw(markers) {
12635
- if (markers.length != this.drawn.length || markers.some((p, i) => !sameMarker(p, this.drawn[i]))) {
12641
+ if (markers.length != this.drawn.length || markers.some((p, i2) => !sameMarker(p, this.drawn[i2]))) {
12636
12642
  let old = this.dom.firstChild, oldI = 0;
12637
12643
  for (let marker of markers) {
12638
12644
  if (marker.update && old && marker.constructor && this.drawn[oldI].constructor && marker.update(old, this.drawn[oldI])) {
@@ -13027,15 +13033,15 @@ function specialCharPlugin() {
13027
13033
  regexp: conf.specialChars,
13028
13034
  decoration: (m, view, pos) => {
13029
13035
  let { doc: doc2 } = view.state;
13030
- let code = codePointAt(m[0], 0);
13031
- if (code == 9) {
13036
+ let code2 = codePointAt(m[0], 0);
13037
+ if (code2 == 9) {
13032
13038
  let line = doc2.lineAt(pos);
13033
13039
  let size = view.state.tabSize, col = countColumn(line.text, size, pos - line.from);
13034
13040
  return Decoration.replace({
13035
13041
  widget: new TabWidget((size - col % size) * this.view.defaultCharacterWidth / this.view.scaleX)
13036
13042
  });
13037
13043
  }
13038
- return this.decorationCache[code] || (this.decorationCache[code] = Decoration.replace({ widget: new SpecialCharWidget(conf, code) }));
13044
+ return this.decorationCache[code2] || (this.decorationCache[code2] = Decoration.replace({ widget: new SpecialCharWidget(conf, code2) }));
13039
13045
  },
13040
13046
  boundary: conf.replaceTabs ? void 0 : /[^]/
13041
13047
  });
@@ -13054,18 +13060,18 @@ function specialCharPlugin() {
13054
13060
  }));
13055
13061
  }
13056
13062
  const DefaultPlaceholder = "•";
13057
- function placeholder$1(code) {
13058
- if (code >= 32)
13063
+ function placeholder$1(code2) {
13064
+ if (code2 >= 32)
13059
13065
  return DefaultPlaceholder;
13060
- if (code == 10)
13066
+ if (code2 == 10)
13061
13067
  return "␤";
13062
- return String.fromCharCode(9216 + code);
13068
+ return String.fromCharCode(9216 + code2);
13063
13069
  }
13064
13070
  class SpecialCharWidget extends WidgetType {
13065
- constructor(options, code) {
13071
+ constructor(options, code2) {
13066
13072
  super();
13067
13073
  this.options = options;
13068
- this.code = code;
13074
+ this.code = code2;
13069
13075
  }
13070
13076
  eq(other) {
13071
13077
  return other.code == this.code;
@@ -13181,15 +13187,15 @@ function rectangleFor(state, a, b) {
13181
13187
  let ranges = [];
13182
13188
  if (a.off > MaxOff || b.off > MaxOff || a.col < 0 || b.col < 0) {
13183
13189
  let startOff = Math.min(a.off, b.off), endOff = Math.max(a.off, b.off);
13184
- for (let i = startLine; i <= endLine; i++) {
13185
- let line = state.doc.line(i);
13190
+ for (let i2 = startLine; i2 <= endLine; i2++) {
13191
+ let line = state.doc.line(i2);
13186
13192
  if (line.length <= endOff)
13187
13193
  ranges.push(EditorSelection.range(line.from + startOff, line.to + endOff));
13188
13194
  }
13189
13195
  } else {
13190
13196
  let startCol = Math.min(a.col, b.col), endCol = Math.max(a.col, b.col);
13191
- for (let i = startLine; i <= endLine; i++) {
13192
- let line = state.doc.line(i);
13197
+ for (let i2 = startLine; i2 <= endLine; i2++) {
13198
+ let line = state.doc.line(i2);
13193
13199
  let start = findColumn(line.text, startCol, state.tabSize, true);
13194
13200
  if (start < 0) {
13195
13201
  ranges.push(EditorSelection.cursor(line.to));
@@ -13239,7 +13245,7 @@ function rectangleSelectionStyle(view, event) {
13239
13245
  };
13240
13246
  }
13241
13247
  function rectangularSelection(options) {
13242
- let filter = (e) => e.altKey && e.button == 0;
13248
+ let filter = ((e) => e.altKey && e.button == 0);
13243
13249
  return EditorView.mouseSelectionStyle.of((view, event) => filter(event) ? rectangleSelectionStyle(view, event) : null);
13244
13250
  }
13245
13251
  const keys = {
@@ -13250,7 +13256,7 @@ const keys = {
13250
13256
  };
13251
13257
  const showCrosshair = { style: "cursor: crosshair" };
13252
13258
  function crosshairCursor(options = {}) {
13253
- let [code, getter] = keys[options.key || "Alt"];
13259
+ let [code2, getter] = keys[options.key || "Alt"];
13254
13260
  let plugin = ViewPlugin.fromClass(class {
13255
13261
  constructor(view) {
13256
13262
  this.view = view;
@@ -13265,10 +13271,10 @@ function crosshairCursor(options = {}) {
13265
13271
  }, {
13266
13272
  eventObservers: {
13267
13273
  keydown(e) {
13268
- this.set(e.keyCode == code || getter(e));
13274
+ this.set(e.keyCode == code2 || getter(e));
13269
13275
  },
13270
13276
  keyup(e) {
13271
- if (e.keyCode == code || !getter(e))
13277
+ if (e.keyCode == code2 || !getter(e))
13272
13278
  this.set(false);
13273
13279
  },
13274
13280
  mousemove(e) {
@@ -13306,23 +13312,23 @@ class TooltipViewManager {
13306
13312
  return false;
13307
13313
  }
13308
13314
  let tooltipViews = [], newAbove = above ? [] : null;
13309
- for (let i = 0; i < tooltips.length; i++) {
13310
- let tip = tooltips[i], known = -1;
13315
+ for (let i2 = 0; i2 < tooltips.length; i2++) {
13316
+ let tip = tooltips[i2], known = -1;
13311
13317
  if (!tip)
13312
13318
  continue;
13313
- for (let i2 = 0; i2 < this.tooltips.length; i2++) {
13314
- let other = this.tooltips[i2];
13319
+ for (let i3 = 0; i3 < this.tooltips.length; i3++) {
13320
+ let other = this.tooltips[i3];
13315
13321
  if (other && other.create == tip.create)
13316
- known = i2;
13322
+ known = i3;
13317
13323
  }
13318
13324
  if (known < 0) {
13319
- tooltipViews[i] = this.createTooltipView(tip, i ? tooltipViews[i - 1] : null);
13325
+ tooltipViews[i2] = this.createTooltipView(tip, i2 ? tooltipViews[i2 - 1] : null);
13320
13326
  if (newAbove)
13321
- newAbove[i] = !!tip.above;
13327
+ newAbove[i2] = !!tip.above;
13322
13328
  } else {
13323
- let tooltipView = tooltipViews[i] = this.tooltipViews[known];
13329
+ let tooltipView = tooltipViews[i2] = this.tooltipViews[known];
13324
13330
  if (newAbove)
13325
- newAbove[i] = above[known];
13331
+ newAbove[i2] = above[known];
13326
13332
  if (tooltipView.update)
13327
13333
  tooltipView.update(update);
13328
13334
  }
@@ -13333,7 +13339,7 @@ class TooltipViewManager {
13333
13339
  (_a2 = t2.destroy) === null || _a2 === void 0 ? void 0 : _a2.call(t2);
13334
13340
  }
13335
13341
  if (above) {
13336
- newAbove.forEach((val, i) => above[i] = val);
13342
+ newAbove.forEach((val, i2) => above[i2] = val);
13337
13343
  above.length = newAbove.length;
13338
13344
  }
13339
13345
  this.input = input;
@@ -13501,8 +13507,8 @@ const tooltipPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
13501
13507
  bottom: visible.bottom - margins.bottom
13502
13508
  },
13503
13509
  parent: this.parent ? this.container.getBoundingClientRect() : this.view.dom.getBoundingClientRect(),
13504
- pos: this.manager.tooltips.map((t2, i) => {
13505
- let tv = this.manager.tooltipViews[i];
13510
+ pos: this.manager.tooltips.map((t2, i2) => {
13511
+ let tv = this.manager.tooltipViews[i2];
13506
13512
  return tv.getCoords ? tv.getCoords(t2.pos) : this.view.coordsAtPos(t2.pos);
13507
13513
  }),
13508
13514
  size: this.manager.tooltipViews.map(({ dom }) => dom.getBoundingClientRect()),
@@ -13522,9 +13528,9 @@ const tooltipPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
13522
13528
  }
13523
13529
  let { visible, space: space2, scaleX, scaleY } = measured;
13524
13530
  let others = [];
13525
- for (let i = 0; i < this.manager.tooltips.length; i++) {
13526
- let tooltip = this.manager.tooltips[i], tView = this.manager.tooltipViews[i], { dom } = tView;
13527
- let pos = measured.pos[i], size = measured.size[i];
13531
+ for (let i2 = 0; i2 < this.manager.tooltips.length; i2++) {
13532
+ let tooltip = this.manager.tooltips[i2], tView = this.manager.tooltipViews[i2], { dom } = tView;
13533
+ let pos = measured.pos[i2], size = measured.size[i2];
13528
13534
  if (!pos || tooltip.clip !== false && (pos.bottom <= Math.max(visible.top, space2.top) || pos.top >= Math.min(visible.bottom, space2.bottom) || pos.right < Math.max(visible.left, space2.left) - 0.1 || pos.left > Math.min(visible.right, space2.right) + 0.1)) {
13529
13535
  dom.style.top = Outside;
13530
13536
  continue;
@@ -13534,9 +13540,9 @@ const tooltipPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
13534
13540
  let width = size.right - size.left, height = (_a2 = knownHeight.get(tView)) !== null && _a2 !== void 0 ? _a2 : size.bottom - size.top;
13535
13541
  let offset = tView.offset || noOffset, ltr = this.view.textDirection == Direction.LTR;
13536
13542
  let left = size.width > space2.right - space2.left ? ltr ? space2.left : space2.right - size.width : ltr ? Math.max(space2.left, Math.min(pos.left - (arrow ? 14 : 0) + offset.x, space2.right - width)) : Math.min(Math.max(space2.left, pos.left - width + (arrow ? 14 : 0) - offset.x), space2.right - width);
13537
- let above = this.above[i];
13543
+ let above = this.above[i2];
13538
13544
  if (!tooltip.strictSide && (above ? pos.top - height - arrowHeight - offset.y < space2.top : pos.bottom + height + arrowHeight + offset.y > space2.bottom) && above == space2.bottom - pos.bottom > pos.top - space2.top)
13539
- above = this.above[i] = !above;
13545
+ above = this.above[i2] = !above;
13540
13546
  let spaceVert = (above ? pos.top - space2.top : space2.bottom - pos.bottom) - arrowHeight;
13541
13547
  if (spaceVert < height && tView.resize !== false) {
13542
13548
  if (spaceVert < this.view.defaultLineHeight) {
@@ -13665,7 +13671,7 @@ const showTooltip = /* @__PURE__ */ Facet.define({
13665
13671
  enables: [tooltipPlugin, baseTheme$4]
13666
13672
  });
13667
13673
  const showHoverTooltip = /* @__PURE__ */ Facet.define({
13668
- combine: (inputs) => inputs.reduce((a, i) => a.concat(i), [])
13674
+ combine: (inputs) => inputs.reduce((a, i2) => a.concat(i2), [])
13669
13675
  });
13670
13676
  class HoverTooltipHost {
13671
13677
  // Needs to be static so that host tooltip instances always match
@@ -14150,8 +14156,8 @@ function createDialog(view, config2, result) {
14150
14156
  content2.appendChild(crelt("button", { class: "cm-button", type: "submit" }, config2.submitLabel || "OK"));
14151
14157
  }
14152
14158
  let forms = content2.nodeName == "FORM" ? [content2] : content2.querySelectorAll("form");
14153
- for (let i = 0; i < forms.length; i++) {
14154
- let form = forms[i];
14159
+ for (let i2 = 0; i2 < forms.length; i2++) {
14160
+ let form = forms[i2];
14155
14161
  form.addEventListener("keydown", (event) => {
14156
14162
  if (event.keyCode == 27) {
14157
14163
  event.preventDefault();
@@ -14533,9 +14539,9 @@ class GutterElement {
14533
14539
  let c = marker.elementClass;
14534
14540
  if (c)
14535
14541
  cls += " " + c;
14536
- for (let i = iOld; i < this.markers.length; i++)
14537
- if (this.markers[i].compare(marker)) {
14538
- skipTo = i;
14542
+ for (let i2 = iOld; i2 < this.markers.length; i2++)
14543
+ if (this.markers[i2].compare(marker)) {
14544
+ skipTo = i2;
14539
14545
  matched = true;
14540
14546
  break;
14541
14547
  }
@@ -14572,8 +14578,8 @@ class GutterElement {
14572
14578
  function sameMarkers(a, b) {
14573
14579
  if (a.length != b.length)
14574
14580
  return false;
14575
- for (let i = 0; i < a.length; i++)
14576
- if (!a[i].compare(b[i]))
14581
+ for (let i2 = 0; i2 < a.length; i2++)
14582
+ if (!a[i2].compare(b[i2]))
14577
14583
  return false;
14578
14584
  return true;
14579
14585
  }
@@ -14825,8 +14831,8 @@ class NodeType {
14825
14831
  for (let name2 of prop.split(" "))
14826
14832
  direct[name2] = map[prop];
14827
14833
  return (node) => {
14828
- for (let groups = node.prop(NodeProp.group), i = -1; i < (groups ? groups.length : 0); i++) {
14829
- let found = direct[i < 0 ? node.name : groups[i]];
14834
+ for (let groups = node.prop(NodeProp.group), i2 = -1; i2 < (groups ? groups.length : 0); i2++) {
14835
+ let found = direct[i2 < 0 ? node.name : groups[i2]];
14830
14836
  if (found)
14831
14837
  return found;
14832
14838
  }
@@ -14847,8 +14853,8 @@ class NodeSet {
14847
14853
  */
14848
14854
  constructor(types2) {
14849
14855
  this.types = types2;
14850
- for (let i = 0; i < types2.length; i++)
14851
- if (types2[i].id != i)
14856
+ for (let i2 = 0; i2 < types2.length; i2++)
14857
+ if (types2[i2].id != i2)
14852
14858
  throw new RangeError("Node type ids should correspond to array positions when creating a node set");
14853
14859
  }
14854
14860
  /**
@@ -15124,9 +15130,9 @@ class TreeBuffer {
15124
15130
  */
15125
15131
  findChild(startIndex, endIndex, dir, pos, side) {
15126
15132
  let { buffer } = this, pick = -1;
15127
- for (let i = startIndex; i != endIndex; i = buffer[i + 3]) {
15128
- if (checkSide(side, pos, buffer[i + 1], buffer[i + 2])) {
15129
- pick = i;
15133
+ for (let i2 = startIndex; i2 != endIndex; i2 = buffer[i2 + 3]) {
15134
+ if (checkSide(side, pos, buffer[i2 + 1], buffer[i2 + 2])) {
15135
+ pick = i2;
15130
15136
  if (dir > 0)
15131
15137
  break;
15132
15138
  }
@@ -15139,11 +15145,11 @@ class TreeBuffer {
15139
15145
  slice(startI, endI, from) {
15140
15146
  let b = this.buffer;
15141
15147
  let copy = new Uint16Array(endI - startI), len = 0;
15142
- for (let i = startI, j = 0; i < endI; ) {
15143
- copy[j++] = b[i++];
15144
- copy[j++] = b[i++] - from;
15145
- let to = copy[j++] = b[i++] - from;
15146
- copy[j++] = b[i++] - startI;
15148
+ for (let i2 = startI, j = 0; i2 < endI; ) {
15149
+ copy[j++] = b[i2++];
15150
+ copy[j++] = b[i2++] - from;
15151
+ let to = copy[j++] = b[i2++] - from;
15152
+ copy[j++] = b[i2++] - startI;
15147
15153
  len = Math.max(len, to);
15148
15154
  }
15149
15155
  return new TreeBuffer(copy, len, this.set);
@@ -15245,10 +15251,10 @@ class TreeNode extends BaseNode {
15245
15251
  get to() {
15246
15252
  return this.from + this._tree.length;
15247
15253
  }
15248
- nextChild(i, dir, pos, side, mode = 0) {
15254
+ nextChild(i2, dir, pos, side, mode = 0) {
15249
15255
  for (let parent = this; ; ) {
15250
- for (let { children, positions } = parent._tree, e = dir > 0 ? children.length : -1; i != e; i += dir) {
15251
- let next = children[i], start = positions[i] + parent.from, mounted;
15256
+ for (let { children, positions } = parent._tree, e = dir > 0 ? children.length : -1; i2 != e; i2 += dir) {
15257
+ let next = children[i2], start = positions[i2] + parent.from, mounted;
15252
15258
  if (!(mode & IterMode.EnterBracketed && next instanceof Tree && (mounted = MountedTree.get(next)) && !mounted.overlay && mounted.bracketed && pos >= start && pos <= start + next.length) && !checkSide(side, pos, start, start + next.length))
15253
15259
  continue;
15254
15260
  if (next instanceof TreeBuffer) {
@@ -15256,21 +15262,21 @@ class TreeNode extends BaseNode {
15256
15262
  continue;
15257
15263
  let index = next.findChild(0, next.buffer.length, dir, pos - start, side);
15258
15264
  if (index > -1)
15259
- return new BufferNode(new BufferContext(parent, next, i, start), null, index);
15265
+ return new BufferNode(new BufferContext(parent, next, i2, start), null, index);
15260
15266
  } else if (mode & IterMode.IncludeAnonymous || (!next.type.isAnonymous || hasChild(next))) {
15261
15267
  let mounted2;
15262
15268
  if (!(mode & IterMode.IgnoreMounts) && (mounted2 = MountedTree.get(next)) && !mounted2.overlay)
15263
- return new TreeNode(mounted2.tree, start, i, parent);
15264
- let inner = new TreeNode(next, start, i, parent);
15269
+ return new TreeNode(mounted2.tree, start, i2, parent);
15270
+ let inner = new TreeNode(next, start, i2, parent);
15265
15271
  return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side, mode);
15266
15272
  }
15267
15273
  }
15268
15274
  if (mode & IterMode.IncludeAnonymous || !parent.type.isAnonymous)
15269
15275
  return null;
15270
15276
  if (parent.index >= 0)
15271
- i = parent.index + dir;
15277
+ i2 = parent.index + dir;
15272
15278
  else
15273
- i = dir < 0 ? -1 : parent._parent._tree.children.length;
15279
+ i2 = dir < 0 ? -1 : parent._parent._tree.children.length;
15274
15280
  parent = parent._parent;
15275
15281
  if (!parent)
15276
15282
  return null;
@@ -15385,14 +15391,14 @@ function getChildren(node, type, before, after) {
15385
15391
  return after == null ? result : [];
15386
15392
  }
15387
15393
  }
15388
- function matchNodeContext(node, context, i = context.length - 1) {
15389
- for (let p = node; i >= 0; p = p.parent) {
15394
+ function matchNodeContext(node, context, i2 = context.length - 1) {
15395
+ for (let p = node; i2 >= 0; p = p.parent) {
15390
15396
  if (!p)
15391
15397
  return false;
15392
15398
  if (!p.type.isAnonymous) {
15393
- if (context[i] && context[i] != p.name)
15399
+ if (context[i2] && context[i2] != p.name)
15394
15400
  return false;
15395
- i--;
15401
+ i2--;
15396
15402
  }
15397
15403
  }
15398
15404
  return true;
@@ -15527,11 +15533,11 @@ function iterStack(heads) {
15527
15533
  if (!heads.length)
15528
15534
  return null;
15529
15535
  let pick = 0, picked = heads[0];
15530
- for (let i = 1; i < heads.length; i++) {
15531
- let node = heads[i];
15536
+ for (let i2 = 1; i2 < heads.length; i2++) {
15537
+ let node = heads[i2];
15532
15538
  if (node.from > picked.from || node.to < picked.to) {
15533
15539
  picked = node;
15534
- pick = i;
15540
+ pick = i2;
15535
15541
  }
15536
15542
  }
15537
15543
  let next = picked instanceof TreeNode && picked.index < 0 ? null : picked.parent;
@@ -15757,8 +15763,8 @@ class TreeCursor {
15757
15763
  if (this.index < buffer.buffer.buffer.length)
15758
15764
  return false;
15759
15765
  } else {
15760
- for (let i = 0; i < this.index; i++)
15761
- if (buffer.buffer.buffer[i + 3] < this.index)
15766
+ for (let i2 = 0; i2 < this.index; i2++)
15767
+ if (buffer.buffer.buffer[i2 + 3] < this.index)
15762
15768
  return false;
15763
15769
  }
15764
15770
  ({ index, parent } = buffer);
@@ -15767,8 +15773,8 @@ class TreeCursor {
15767
15773
  }
15768
15774
  for (; parent; { index, _parent: parent } = parent) {
15769
15775
  if (index > -1)
15770
- for (let i = index + dir, e = dir < 0 ? -1 : parent._tree.children.length; i != e; i += dir) {
15771
- let child = parent._tree.children[i];
15776
+ for (let i2 = index + dir, e = dir < 0 ? -1 : parent._tree.children.length; i2 != e; i2 += dir) {
15777
+ let child = parent._tree.children[i2];
15772
15778
  if (this.mode & IterMode.IncludeAnonymous || child instanceof TreeBuffer || !child.type.isAnonymous || hasChild(child))
15773
15779
  return false;
15774
15780
  }
@@ -15843,8 +15849,8 @@ class TreeCursor {
15843
15849
  index = this.stack[--d];
15844
15850
  }
15845
15851
  }
15846
- for (let i = depth; i < this.stack.length; i++)
15847
- result = new BufferNode(this.buffer, result, this.stack[i]);
15852
+ for (let i2 = depth; i2 < this.stack.length; i2++)
15853
+ result = new BufferNode(this.buffer, result, this.stack[i2]);
15848
15854
  return this.bufferNode = new BufferNode(this.buffer, result, this.index);
15849
15855
  }
15850
15856
  /**
@@ -15895,14 +15901,14 @@ class TreeCursor {
15895
15901
  if (!this.buffer)
15896
15902
  return matchNodeContext(this.node.parent, context);
15897
15903
  let { buffer } = this.buffer, { types: types2 } = buffer.set;
15898
- for (let i = context.length - 1, d = this.stack.length - 1; i >= 0; d--) {
15904
+ for (let i2 = context.length - 1, d = this.stack.length - 1; i2 >= 0; d--) {
15899
15905
  if (d < 0)
15900
- return matchNodeContext(this._tree, context, i);
15906
+ return matchNodeContext(this._tree, context, i2);
15901
15907
  let type = types2[buffer.buffer[this.stack[d]]];
15902
15908
  if (!type.isAnonymous) {
15903
- if (context[i] && context[i] != type.name)
15909
+ if (context[i2] && context[i2] != type.name)
15904
15910
  return false;
15905
- i--;
15911
+ i2--;
15906
15912
  }
15907
15913
  }
15908
15914
  return true;
@@ -16000,10 +16006,10 @@ function buildTree(data) {
16000
16006
  if (nodeCount) {
16001
16007
  let buffer2 = new Uint16Array(nodeCount * 4);
16002
16008
  let start = nodes[nodes.length - 2];
16003
- for (let i = nodes.length - 3, j = 0; i >= 0; i -= 3) {
16004
- buffer2[j++] = nodes[i];
16005
- buffer2[j++] = nodes[i + 1] - start;
16006
- buffer2[j++] = nodes[i + 2] - start;
16009
+ for (let i2 = nodes.length - 3, j = 0; i2 >= 0; i2 -= 3) {
16010
+ buffer2[j++] = nodes[i2];
16011
+ buffer2[j++] = nodes[i2 + 1] - start;
16012
+ buffer2[j++] = nodes[i2 + 2] - start;
16007
16013
  buffer2[j++] = j;
16008
16014
  }
16009
16015
  children2.push(new TreeBuffer(buffer2, nodes[2] - start, nodeSet));
@@ -16022,9 +16028,9 @@ function buildTree(data) {
16022
16028
  return makeTree(type, children2, positions2, length2, lookAhead2, contextHash2);
16023
16029
  };
16024
16030
  }
16025
- function makeRepeatLeaf(children2, positions2, base2, i, from, to, type, lookAhead2, contextHash2) {
16031
+ function makeRepeatLeaf(children2, positions2, base2, i2, from, to, type, lookAhead2, contextHash2) {
16026
16032
  let localChildren = [], localPositions = [];
16027
- while (children2.length > i) {
16033
+ while (children2.length > i2) {
16028
16034
  localChildren.push(children2.pop());
16029
16035
  localPositions.push(positions2.pop() + base2 - from);
16030
16036
  }
@@ -16132,24 +16138,24 @@ function nodeSize(balanceType, node) {
16132
16138
  }
16133
16139
  function balanceRange(balanceType, children, positions, from, to, start, length, mkTop, mkTree) {
16134
16140
  let total = 0;
16135
- for (let i = from; i < to; i++)
16136
- total += nodeSize(balanceType, children[i]);
16141
+ for (let i2 = from; i2 < to; i2++)
16142
+ total += nodeSize(balanceType, children[i2]);
16137
16143
  let maxChild = Math.ceil(
16138
16144
  total * 1.5 / 8
16139
16145
  /* Balance.BranchFactor */
16140
16146
  );
16141
16147
  let localChildren = [], localPositions = [];
16142
16148
  function divide(children2, positions2, from2, to2, offset) {
16143
- for (let i = from2; i < to2; ) {
16144
- let groupFrom = i, groupStart = positions2[i], groupSize = nodeSize(balanceType, children2[i]);
16145
- i++;
16146
- for (; i < to2; i++) {
16147
- let nextSize = nodeSize(balanceType, children2[i]);
16149
+ for (let i2 = from2; i2 < to2; ) {
16150
+ let groupFrom = i2, groupStart = positions2[i2], groupSize = nodeSize(balanceType, children2[i2]);
16151
+ i2++;
16152
+ for (; i2 < to2; i2++) {
16153
+ let nextSize = nodeSize(balanceType, children2[i2]);
16148
16154
  if (groupSize + nextSize >= maxChild)
16149
16155
  break;
16150
16156
  groupSize += nextSize;
16151
16157
  }
16152
- if (i == groupFrom + 1) {
16158
+ if (i2 == groupFrom + 1) {
16153
16159
  if (groupSize > maxChild) {
16154
16160
  let only = children2[groupFrom];
16155
16161
  divide(only.children, only.positions, 0, only.children.length, positions2[groupFrom] + offset);
@@ -16157,8 +16163,8 @@ function balanceRange(balanceType, children, positions, from, to, start, length,
16157
16163
  }
16158
16164
  localChildren.push(children2[groupFrom]);
16159
16165
  } else {
16160
- let length2 = positions2[i - 1] + children2[i - 1].length - groupStart;
16161
- localChildren.push(balanceRange(balanceType, children2, positions2, groupFrom, i, groupStart, length2, null, mkTree));
16166
+ let length2 = positions2[i2 - 1] + children2[i2 - 1].length - groupStart;
16167
+ localChildren.push(balanceRange(balanceType, children2, positions2, groupFrom, i2, groupStart, length2, null, mkTree));
16162
16168
  }
16163
16169
  localPositions.push(groupStart + offset - start);
16164
16170
  }
@@ -16416,13 +16422,13 @@ class Modifier {
16416
16422
  }
16417
16423
  }
16418
16424
  function sameArray(a, b) {
16419
- return a.length == b.length && a.every((x, i) => x == b[i]);
16425
+ return a.length == b.length && a.every((x, i2) => x == b[i2]);
16420
16426
  }
16421
16427
  function powerSet(array) {
16422
16428
  let sets = [[]];
16423
- for (let i = 0; i < array.length; i++) {
16429
+ for (let i2 = 0; i2 < array.length; i2++) {
16424
16430
  for (let j = 0, e = sets.length; j < e; j++) {
16425
- sets.push(sets[j].concat(array[i]));
16431
+ sets.push(sets[j].concat(array[i2]));
16426
16432
  }
16427
16433
  }
16428
16434
  return sets.sort((a, b) => b.length - a.length);
@@ -16599,8 +16605,8 @@ class HighlightBuilder {
16599
16605
  let inner = cursor2.node.enter(mounted.overlay[0].from + start, 1);
16600
16606
  let innerHighlighters = this.highlighters.filter((h) => !h.scope || h.scope(mounted.tree.type));
16601
16607
  let hasChild2 = cursor2.firstChild();
16602
- for (let i = 0, pos = start; ; i++) {
16603
- let next = i < mounted.overlay.length ? mounted.overlay[i] : null;
16608
+ for (let i2 = 0, pos = start; ; i2++) {
16609
+ let next = i2 < mounted.overlay.length ? mounted.overlay[i2] : null;
16604
16610
  let nextPos = next ? next.from + start : end;
16605
16611
  let rangeFrom2 = Math.max(from, pos), rangeTo2 = Math.min(to, nextPos);
16606
16612
  if (rangeFrom2 < rangeTo2 && hasChild2) {
@@ -17129,10 +17135,10 @@ class Language {
17129
17135
  return;
17130
17136
  }
17131
17137
  }
17132
- for (let i = 0; i < tree.children.length; i++) {
17133
- let ch = tree.children[i];
17138
+ for (let i2 = 0; i2 < tree.children.length; i2++) {
17139
+ let ch = tree.children[i2];
17134
17140
  if (ch instanceof Tree)
17135
- explore(ch, tree.positions[i] + from);
17141
+ explore(ch, tree.positions[i2] + from);
17136
17142
  }
17137
17143
  };
17138
17144
  explore(syntaxTree(state), 0);
@@ -17342,11 +17348,11 @@ class ParseContext {
17342
17348
  return false;
17343
17349
  this.viewport = viewport;
17344
17350
  let startLen = this.skipped.length;
17345
- for (let i = 0; i < this.skipped.length; i++) {
17346
- let { from, to } = this.skipped[i];
17351
+ for (let i2 = 0; i2 < this.skipped.length; i2++) {
17352
+ let { from, to } = this.skipped[i2];
17347
17353
  if (from < viewport.to && to > viewport.from) {
17348
17354
  this.fragments = cutFragments(this.fragments, from, to);
17349
- this.skipped.splice(i--, 1);
17355
+ this.skipped.splice(i2--, 1);
17350
17356
  }
17351
17357
  }
17352
17358
  if (this.skipped.length >= startLen)
@@ -17603,7 +17609,7 @@ function indentString(state, cols) {
17603
17609
  }
17604
17610
  ch = " ";
17605
17611
  }
17606
- for (let i = 0; i < cols; i++)
17612
+ for (let i2 = 0; i2 < cols; i2++)
17607
17613
  result += ch;
17608
17614
  return result;
17609
17615
  }
@@ -17706,8 +17712,8 @@ function syntaxIndentation(cx, ast, pos) {
17706
17712
  let add2 = [];
17707
17713
  for (let cur2 = inner; cur2 && !(cur2.from < stack.node.from || cur2.to > stack.node.to || cur2.from == stack.node.from && cur2.type == stack.node.type); cur2 = cur2.parent)
17708
17714
  add2.push(cur2);
17709
- for (let i = add2.length - 1; i >= 0; i--)
17710
- stack = { node: add2[i], next: stack };
17715
+ for (let i2 = add2.length - 1; i2 >= 0; i2--)
17716
+ stack = { node: add2[i2], next: stack };
17711
17717
  }
17712
17718
  return indentFor(stack, cx, pos);
17713
17719
  }
@@ -17964,8 +17970,8 @@ const foldState = /* @__PURE__ */ StateField.define({
17964
17970
  if (!Array.isArray(value) || value.length % 2)
17965
17971
  throw new RangeError("Invalid JSON for fold state");
17966
17972
  let ranges = [];
17967
- for (let i = 0; i < value.length; ) {
17968
- let from = value[i++], to = value[i++];
17973
+ for (let i2 = 0; i2 < value.length; ) {
17974
+ let from = value[i2++], to = value[i2++];
17969
17975
  if (typeof from != "number" || typeof to != "number")
17970
17976
  throw new RangeError("Invalid JSON for fold state");
17971
17977
  ranges.push(foldWidget.range(from, to));
@@ -18680,8 +18686,8 @@ function prefixMatch(options) {
18680
18686
  let first = /* @__PURE__ */ Object.create(null), rest = /* @__PURE__ */ Object.create(null);
18681
18687
  for (let { label } of options) {
18682
18688
  first[label[0]] = true;
18683
- for (let i = 1; i < label.length; i++)
18684
- rest[label[i]] = true;
18689
+ for (let i2 = 1; i2 < label.length; i2++)
18690
+ rest[label[i2]] = true;
18685
18691
  }
18686
18692
  let source = toSet(first) + toSet(rest) + "*$";
18687
18693
  return [new RegExp("^" + source), new RegExp(source)];
@@ -18804,11 +18810,11 @@ class FuzzyMatcher {
18804
18810
  return this.ret(word.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
18805
18811
  let len = chars.length, anyTo = 0;
18806
18812
  if (direct < 0) {
18807
- for (let i = 0, e = Math.min(word.length, 200); i < e && anyTo < len; ) {
18808
- let next = codePointAt(word, i);
18813
+ for (let i2 = 0, e = Math.min(word.length, 200); i2 < e && anyTo < len; ) {
18814
+ let next = codePointAt(word, i2);
18809
18815
  if (next == chars[anyTo] || next == folded[anyTo])
18810
- any[anyTo++] = i;
18811
- i += codePointSize(next);
18816
+ any[anyTo++] = i2;
18817
+ i2 += codePointSize(next);
18812
18818
  }
18813
18819
  if (anyTo < len)
18814
18820
  return null;
@@ -18817,16 +18823,16 @@ class FuzzyMatcher {
18817
18823
  let byWordTo = 0, byWordFolded = false;
18818
18824
  let adjacentTo = 0, adjacentStart = -1, adjacentEnd = -1;
18819
18825
  let hasLower = /[a-z]/.test(word), wordAdjacent = true;
18820
- for (let i = 0, e = Math.min(word.length, 200), prevType = 0; i < e && byWordTo < len; ) {
18821
- let next = codePointAt(word, i);
18826
+ for (let i2 = 0, e = Math.min(word.length, 200), prevType = 0; i2 < e && byWordTo < len; ) {
18827
+ let next = codePointAt(word, i2);
18822
18828
  if (direct < 0) {
18823
18829
  if (preciseTo < len && next == chars[preciseTo])
18824
- precise[preciseTo++] = i;
18830
+ precise[preciseTo++] = i2;
18825
18831
  if (adjacentTo < len) {
18826
18832
  if (next == chars[adjacentTo] || next == folded[adjacentTo]) {
18827
18833
  if (adjacentTo == 0)
18828
- adjacentStart = i;
18829
- adjacentEnd = i + 1;
18834
+ adjacentStart = i2;
18835
+ adjacentEnd = i2 + 1;
18830
18836
  adjacentTo++;
18831
18837
  } else {
18832
18838
  adjacentTo = 0;
@@ -18834,14 +18840,14 @@ class FuzzyMatcher {
18834
18840
  }
18835
18841
  }
18836
18842
  let ch, type = next < 255 ? next >= 48 && next <= 57 || next >= 97 && next <= 122 ? 2 : next >= 65 && next <= 90 ? 1 : 0 : (ch = fromCodePoint(next)) != ch.toLowerCase() ? 1 : ch != ch.toUpperCase() ? 2 : 0;
18837
- if (!i || type == 1 && hasLower || prevType == 0 && type != 0) {
18843
+ if (!i2 || type == 1 && hasLower || prevType == 0 && type != 0) {
18838
18844
  if (chars[byWordTo] == next || folded[byWordTo] == next && (byWordFolded = true))
18839
- byWord[byWordTo++] = i;
18845
+ byWord[byWordTo++] = i2;
18840
18846
  else if (byWord.length)
18841
18847
  wordAdjacent = false;
18842
18848
  }
18843
18849
  prevType = type;
18844
- i += codePointSize(next);
18850
+ i2 += codePointSize(next);
18845
18851
  }
18846
18852
  if (byWordTo == len && byWord[0] == 0 && wordAdjacent)
18847
18853
  return this.result(-100 + (byWordFolded ? -200 : 0), byWord, word);
@@ -18856,14 +18862,14 @@ class FuzzyMatcher {
18856
18862
  return chars.length == 2 ? null : this.result((any[0] ? -700 : 0) + -200 + -1100, any, word);
18857
18863
  }
18858
18864
  result(score2, positions, word) {
18859
- let result = [], i = 0;
18865
+ let result = [], i2 = 0;
18860
18866
  for (let pos of positions) {
18861
18867
  let to = pos + (this.astral ? codePointSize(codePointAt(word, pos)) : 1);
18862
- if (i && result[i - 1] == pos)
18863
- result[i - 1] = to;
18868
+ if (i2 && result[i2 - 1] == pos)
18869
+ result[i2 - 1] = to;
18864
18870
  else {
18865
- result[i++] = pos;
18866
- result[i++] = to;
18871
+ result[i2++] = pos;
18872
+ result[i2++] = to;
18867
18873
  }
18868
18874
  }
18869
18875
  return this.ret(score2 - word.length, result);
@@ -19154,10 +19160,10 @@ class CompletionTooltip {
19154
19160
  }
19155
19161
  updateSelectedOption(selected) {
19156
19162
  let set = null;
19157
- for (let opt = this.list.firstChild, i = this.range.from; opt; opt = opt.nextSibling, i++) {
19163
+ for (let opt = this.list.firstChild, i2 = this.range.from; opt; opt = opt.nextSibling, i2++) {
19158
19164
  if (opt.nodeName != "LI" || !opt.id) {
19159
- i--;
19160
- } else if (i == selected) {
19165
+ i2--;
19166
+ } else if (i2 == selected) {
19161
19167
  if (!opt.hasAttribute("aria-selected")) {
19162
19168
  opt.setAttribute("aria-selected", "true");
19163
19169
  set = opt;
@@ -19211,11 +19217,11 @@ class CompletionTooltip {
19211
19217
  e.preventDefault();
19212
19218
  });
19213
19219
  let curSection = null;
19214
- for (let i = range.from; i < range.to; i++) {
19215
- let { completion, match } = options[i], { section } = completion;
19220
+ for (let i2 = range.from; i2 < range.to; i2++) {
19221
+ let { completion, match } = options[i2], { section } = completion;
19216
19222
  if (section) {
19217
19223
  let name2 = typeof section == "string" ? section : section.name;
19218
- if (name2 != curSection && (i > range.from || range.from == 0)) {
19224
+ if (name2 != curSection && (i2 > range.from || range.from == 0)) {
19219
19225
  curSection = name2;
19220
19226
  if (typeof section != "string" && section.header) {
19221
19227
  ul.appendChild(section.header(section));
@@ -19226,7 +19232,7 @@ class CompletionTooltip {
19226
19232
  }
19227
19233
  }
19228
19234
  const li = ul.appendChild(document.createElement("li"));
19229
- li.id = id2 + "-" + i;
19235
+ li.id = id2 + "-" + i2;
19230
19236
  li.setAttribute("role", "option");
19231
19237
  let cls = this.optionClass(completion);
19232
19238
  if (cls)
@@ -19357,9 +19363,9 @@ class CompletionDialog {
19357
19363
  let selected = state.facet(completionConfig).selectOnOpen ? 0 : -1;
19358
19364
  if (prev && prev.selected != selected && prev.selected != -1) {
19359
19365
  let selectedValue = prev.options[prev.selected].completion;
19360
- for (let i = 0; i < options.length; i++)
19361
- if (options[i].completion == selectedValue) {
19362
- selected = i;
19366
+ for (let i2 = 0; i2 < options.length; i2++)
19367
+ if (options[i2].completion == selectedValue) {
19368
+ selected = i2;
19363
19369
  break;
19364
19370
  }
19365
19371
  }
@@ -19399,7 +19405,7 @@ class CompletionState {
19399
19405
  );
19400
19406
  return value.update(tr, conf);
19401
19407
  });
19402
- if (active.length == this.active.length && active.every((a, i) => a == this.active[i]))
19408
+ if (active.length == this.active.length && active.every((a, i2) => a == this.active[i2]))
19403
19409
  active = this.active;
19404
19410
  let open = this.open, didSet = tr.effects.some((e) => e.is(setActiveEffect));
19405
19411
  if (open && tr.docChanged)
@@ -19678,8 +19684,8 @@ const completionPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
19678
19684
  let type = getUpdateType(tr, conf);
19679
19685
  return type & 8 || (tr.selection || tr.docChanged) && !(type & 3);
19680
19686
  });
19681
- for (let i = 0; i < this.running.length; i++) {
19682
- let query = this.running[i];
19687
+ for (let i2 = 0; i2 < this.running.length; i2++) {
19688
+ let query = this.running[i2];
19683
19689
  if (doesReset || query.context.abortOnDocChange && update.docChanged || query.updates.length + update.transactions.length > MaxUpdateCount && Date.now() - query.time > MinAbortTime) {
19684
19690
  for (let handler of query.context.abortListeners) {
19685
19691
  try {
@@ -19689,7 +19695,7 @@ const completionPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
19689
19695
  }
19690
19696
  }
19691
19697
  query.context.abortListeners = null;
19692
- this.running.splice(i--, 1);
19698
+ this.running.splice(i2--, 1);
19693
19699
  } else {
19694
19700
  query.updates.push(...update.transactions);
19695
19701
  }
@@ -19749,11 +19755,11 @@ const completionPlugin = /* @__PURE__ */ ViewPlugin.fromClass(class {
19749
19755
  this.debounceAccept = -1;
19750
19756
  let updated = [];
19751
19757
  let conf = this.view.state.facet(completionConfig), cState = this.view.state.field(completionState);
19752
- for (let i = 0; i < this.running.length; i++) {
19753
- let query = this.running[i];
19758
+ for (let i2 = 0; i2 < this.running.length; i2++) {
19759
+ let query = this.running[i2];
19754
19760
  if (query.done === void 0)
19755
19761
  continue;
19756
- this.running.splice(i--, 1);
19762
+ this.running.splice(i2--, 1);
19757
19763
  if (query.done) {
19758
19764
  let pos = cur(query.updates.length ? query.updates[0].startState : this.view.state);
19759
19765
  let limit = Math.min(pos, query.done.from + (query.active.explicit ? 0 : 1));
@@ -19975,7 +19981,7 @@ class Snippet {
19975
19981
  for (let line of this.lines) {
19976
19982
  if (text.length) {
19977
19983
  let indent = baseIndent, tabs = /^\t*/.exec(line)[0].length;
19978
- for (let i = 0; i < tabs; i++)
19984
+ for (let i2 = 0; i2 < tabs; i2++)
19979
19985
  indent += state.facet(indentUnit);
19980
19986
  lineStart.push(pos + indent.length - tabs);
19981
19987
  line = indent + line.slice(tabs);
@@ -19993,16 +19999,16 @@ class Snippet {
19993
19999
  while (m = /[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(line)) {
19994
20000
  let seq = m[1] ? +m[1] : null, rawName = m[2] || m[3] || "", found = -1;
19995
20001
  let name2 = rawName.replace(/\\[{}]/g, (m2) => m2[1]);
19996
- for (let i = 0; i < fields.length; i++) {
19997
- if (seq != null ? fields[i].seq == seq : name2 ? fields[i].name == name2 : false)
19998
- found = i;
20002
+ for (let i2 = 0; i2 < fields.length; i2++) {
20003
+ if (seq != null ? fields[i2].seq == seq : name2 ? fields[i2].name == name2 : false)
20004
+ found = i2;
19999
20005
  }
20000
20006
  if (found < 0) {
20001
- let i = 0;
20002
- while (i < fields.length && (seq == null || fields[i].seq != null && fields[i].seq < seq))
20003
- i++;
20004
- fields.splice(i, 0, { seq, name: name2 });
20005
- found = i;
20007
+ let i2 = 0;
20008
+ while (i2 < fields.length && (seq == null || fields[i2].seq != null && fields[i2].seq < seq))
20009
+ i2++;
20010
+ fields.splice(i2, 0, { seq, name: name2 });
20011
+ found = i2;
20006
20012
  for (let pos of positions)
20007
20013
  if (pos.field >= found)
20008
20014
  pos.field++;
@@ -20197,9 +20203,9 @@ function closeBrackets() {
20197
20203
  }
20198
20204
  const definedClosing = "()[]{}<>«»»«[]{}";
20199
20205
  function closing(ch) {
20200
- for (let i = 0; i < definedClosing.length; i += 2)
20201
- if (definedClosing.charCodeAt(i) == ch)
20202
- return definedClosing.charAt(i + 1);
20206
+ for (let i2 = 0; i2 < definedClosing.length; i2 += 2)
20207
+ if (definedClosing.charCodeAt(i2) == ch)
20208
+ return definedClosing.charAt(i2 + 1);
20203
20209
  return fromCodePoint(ch < 128 ? ch : ch + 1);
20204
20210
  }
20205
20211
  function config(state, pos) {
@@ -20360,7 +20366,7 @@ function nodeStart(state, pos) {
20360
20366
  function probablyInString(state, pos, quoteToken, prefixes) {
20361
20367
  let node = syntaxTree(state).resolveInner(pos, -1);
20362
20368
  let maxPrefix = prefixes.reduce((m, p) => Math.max(m, p.length), 0);
20363
- for (let i = 0; i < 5; i++) {
20369
+ for (let i2 = 0; i2 < 5; i2++) {
20364
20370
  let start = state.sliceDoc(node.from, Math.min(node.to, node.from + quoteToken.length + maxPrefix));
20365
20371
  let quotePos = start.indexOf(quoteToken);
20366
20372
  if (!quotePos || quotePos > -1 && prefixes.indexOf(start.slice(0, quotePos)) > -1) {
@@ -20518,18 +20524,18 @@ function changeBlockComment(option, state, ranges = state.selection.ranges) {
20518
20524
  let tokens = ranges.map((r) => getConfig(state, r.from).block);
20519
20525
  if (!tokens.every((c) => c))
20520
20526
  return null;
20521
- let comments = ranges.map((r, i) => findBlockComment(state, tokens[i], r.from, r.to));
20527
+ let comments = ranges.map((r, i2) => findBlockComment(state, tokens[i2], r.from, r.to));
20522
20528
  if (option != 2 && !comments.every((c) => c)) {
20523
- return { changes: state.changes(ranges.map((range, i) => {
20524
- if (comments[i])
20529
+ return { changes: state.changes(ranges.map((range, i2) => {
20530
+ if (comments[i2])
20525
20531
  return [];
20526
- return [{ from: range.from, insert: tokens[i].open + " " }, { from: range.to, insert: " " + tokens[i].close }];
20532
+ return [{ from: range.from, insert: tokens[i2].open + " " }, { from: range.to, insert: " " + tokens[i2].close }];
20527
20533
  })) };
20528
20534
  } else if (option != 1 && comments.some((c) => c)) {
20529
20535
  let changes = [];
20530
- for (let i = 0, comment2; i < comments.length; i++)
20531
- if (comment2 = comments[i]) {
20532
- let token = tokens[i], { open, close } = comment2;
20536
+ for (let i2 = 0, comment2; i2 < comments.length; i2++)
20537
+ if (comment2 = comments[i2]) {
20538
+ let token = tokens[i2], { open, close } = comment2;
20533
20539
  changes.push({ from: open.pos - token.open.length, to: open.pos + open.margin }, { from: close.pos - close.margin, to: close.pos + token.close.length });
20534
20540
  }
20535
20541
  return { changes };
@@ -20560,9 +20566,9 @@ function changeLineComment(option, state, ranges = state.selection.ranges) {
20560
20566
  pos = line.to + 1;
20561
20567
  }
20562
20568
  if (minIndent < 1e9) {
20563
- for (let i = startI; i < lines.length; i++)
20564
- if (lines[i].indent < lines[i].line.text.length)
20565
- lines[i].indent = minIndent;
20569
+ for (let i2 = startI; i2 < lines.length; i2++)
20570
+ if (lines[i2].indent < lines[i2].line.text.length)
20571
+ lines[i2].indent = minIndent;
20566
20572
  }
20567
20573
  if (lines.length == startI + 1)
20568
20574
  lines[startI].single = true;
@@ -20725,8 +20731,8 @@ function isAdjacent(a, b) {
20725
20731
  let ranges = [], isAdjacent2 = false;
20726
20732
  a.iterChangedRanges((f, t2) => ranges.push(f, t2));
20727
20733
  b.iterChangedRanges((_f, _t, f, t2) => {
20728
- for (let i = 0; i < ranges.length; ) {
20729
- let from = ranges[i++], to = ranges[i++];
20734
+ for (let i2 = 0; i2 < ranges.length; ) {
20735
+ let from = ranges[i2++], to = ranges[i2++];
20730
20736
  if (t2 >= from && f <= to)
20731
20737
  isAdjacent2 = true;
20732
20738
  }
@@ -20734,7 +20740,7 @@ function isAdjacent(a, b) {
20734
20740
  return isAdjacent2;
20735
20741
  }
20736
20742
  function eqSelectionShape(a, b) {
20737
- return a.ranges.length == b.ranges.length && a.ranges.filter((r, i) => r.empty != b.ranges[i].empty).length === 0;
20743
+ return a.ranges.length == b.ranges.length && a.ranges.filter((r, i2) => r.empty != b.ranges[i2].empty).length === 0;
20738
20744
  }
20739
20745
  function conc(a, b) {
20740
20746
  return !a.length ? b : !b.length ? a : a.concat(b);
@@ -21159,7 +21165,7 @@ const deleteByChar = (target, forward, byIndentUnit) => deleteBy(target, (range)
21159
21165
  if (before[before.length - 1] == " ")
21160
21166
  return pos - 1;
21161
21167
  let col = countColumn(before, state.tabSize), drop = col % getIndentUnit(state) || getIndentUnit(state);
21162
- for (let i = 0; i < drop && before[before.length - 1 - i] == " "; i++)
21168
+ for (let i2 = 0; i2 < drop && before[before.length - 1 - i2] == " "; i2++)
21163
21169
  pos--;
21164
21170
  targetPos = pos;
21165
21171
  } else {
@@ -21573,39 +21579,39 @@ class SearchCursor {
21573
21579
  this.bufferPos += codePointSize(next);
21574
21580
  let norm = this.normalize(str);
21575
21581
  if (norm.length)
21576
- for (let i = 0, pos = start; ; i++) {
21577
- let code = norm.charCodeAt(i);
21578
- let match = this.match(code, pos, this.bufferPos + this.bufferStart);
21579
- if (i == norm.length - 1) {
21582
+ for (let i2 = 0, pos = start; ; i2++) {
21583
+ let code2 = norm.charCodeAt(i2);
21584
+ let match = this.match(code2, pos, this.bufferPos + this.bufferStart);
21585
+ if (i2 == norm.length - 1) {
21580
21586
  if (match) {
21581
21587
  this.value = match;
21582
21588
  return this;
21583
21589
  }
21584
21590
  break;
21585
21591
  }
21586
- if (pos == start && i < str.length && str.charCodeAt(i) == code)
21592
+ if (pos == start && i2 < str.length && str.charCodeAt(i2) == code2)
21587
21593
  pos++;
21588
21594
  }
21589
21595
  }
21590
21596
  }
21591
- match(code, pos, end) {
21597
+ match(code2, pos, end) {
21592
21598
  let match = null;
21593
- for (let i = 0; i < this.matches.length; i += 2) {
21594
- let index = this.matches[i], keep = false;
21595
- if (this.query.charCodeAt(index) == code) {
21599
+ for (let i2 = 0; i2 < this.matches.length; i2 += 2) {
21600
+ let index = this.matches[i2], keep = false;
21601
+ if (this.query.charCodeAt(index) == code2) {
21596
21602
  if (index == this.query.length - 1) {
21597
- match = { from: this.matches[i + 1], to: end };
21603
+ match = { from: this.matches[i2 + 1], to: end };
21598
21604
  } else {
21599
- this.matches[i]++;
21605
+ this.matches[i2]++;
21600
21606
  keep = true;
21601
21607
  }
21602
21608
  }
21603
21609
  if (!keep) {
21604
- this.matches.splice(i, 2);
21605
- i -= 2;
21610
+ this.matches.splice(i2, 2);
21611
+ i2 -= 2;
21606
21612
  }
21607
21613
  }
21608
- if (this.query.charCodeAt(0) == code) {
21614
+ if (this.query.charCodeAt(0) == code2) {
21609
21615
  if (this.query.length == 1)
21610
21616
  match = { from: pos, to: end };
21611
21617
  else
@@ -22137,15 +22143,15 @@ class RegExpQuery extends QueryType {
22137
22143
  return this.prevMatchInRange(state, 0, curFrom) || this.prevMatchInRange(state, curTo, state.doc.length);
22138
22144
  }
22139
22145
  getReplacement(result) {
22140
- return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g, (m, i) => {
22141
- if (i == "&")
22146
+ return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g, (m, i2) => {
22147
+ if (i2 == "&")
22142
22148
  return result.match[0];
22143
- if (i == "$")
22149
+ if (i2 == "$")
22144
22150
  return "$";
22145
- for (let l = i.length; l > 0; l--) {
22146
- let n = +i.slice(0, l);
22151
+ for (let l = i2.length; l > 0; l--) {
22152
+ let n = +i2.slice(0, l);
22147
22153
  if (n > 0 && n < result.match.length)
22148
- return result.match[n] + i.slice(l);
22154
+ return result.match[n] + i2.slice(l);
22149
22155
  }
22150
22156
  return m;
22151
22157
  });
@@ -22208,10 +22214,10 @@ const searchHighlighter = /* @__PURE__ */ ViewPlugin.fromClass(class {
22208
22214
  return Decoration.none;
22209
22215
  let { view } = this;
22210
22216
  let builder = new RangeSetBuilder();
22211
- for (let i = 0, ranges = view.visibleRanges, l = ranges.length; i < l; i++) {
22212
- let { from, to } = ranges[i];
22213
- while (i < l - 1 && to > ranges[i + 1].from - 2 * 250)
22214
- to = ranges[++i].to;
22217
+ for (let i2 = 0, ranges = view.visibleRanges, l = ranges.length; i2 < l; i2++) {
22218
+ let { from, to } = ranges[i2];
22219
+ while (i2 < l - 1 && to > ranges[i2 + 1].from - 2 * 250)
22220
+ to = ranges[++i2].to;
22215
22221
  query.highlight(view.state, from, to, (from2, to2) => {
22216
22222
  let selected = view.state.selection.ranges.some((r) => r.from == from2 && r.to == to2);
22217
22223
  builder.add(from2, to2, selected ? selectedMatchMark : matchMark);
@@ -22530,16 +22536,16 @@ function announceMatch(view, { from, to }) {
22530
22536
  let start = Math.max(line.from, from - AnnounceMargin), end = Math.min(lineEnd, to + AnnounceMargin);
22531
22537
  let text = view.state.sliceDoc(start, end);
22532
22538
  if (start != line.from) {
22533
- for (let i = 0; i < AnnounceMargin; i++)
22534
- if (!Break.test(text[i + 1]) && Break.test(text[i])) {
22535
- text = text.slice(i);
22539
+ for (let i2 = 0; i2 < AnnounceMargin; i2++)
22540
+ if (!Break.test(text[i2 + 1]) && Break.test(text[i2])) {
22541
+ text = text.slice(i2);
22536
22542
  break;
22537
22543
  }
22538
22544
  }
22539
22545
  if (end != lineEnd) {
22540
- for (let i = text.length - 1; i > text.length - AnnounceMargin; i--)
22541
- if (!Break.test(text[i - 1]) && Break.test(text[i])) {
22542
- text = text.slice(0, i);
22546
+ for (let i2 = text.length - 1; i2 > text.length - AnnounceMargin; i2--)
22547
+ if (!Break.test(text[i2 - 1]) && Break.test(text[i2])) {
22548
+ text = text.slice(0, i2);
22543
22549
  break;
22544
22550
  }
22545
22551
  }
@@ -22600,8 +22606,8 @@ class LintState {
22600
22606
  let sorted = diagnostics.slice().sort((a, b) => a.from - b.from || a.to - b.to);
22601
22607
  let deco = new RangeSetBuilder(), active = [], pos = 0;
22602
22608
  let scan = state.doc.iter(), scanPos = 0, docLen = state.doc.length;
22603
- for (let i = 0; ; ) {
22604
- let next = i == sorted.length ? null : sorted[i];
22609
+ for (let i2 = 0; ; ) {
22610
+ let next = i2 == sorted.length ? null : sorted[i2];
22605
22611
  if (!next && !active.length)
22606
22612
  break;
22607
22613
  let from, to;
@@ -22614,13 +22620,13 @@ class LintState {
22614
22620
  break;
22615
22621
  to = next.to;
22616
22622
  active.push(next);
22617
- i++;
22623
+ i2++;
22618
22624
  }
22619
- while (i < sorted.length) {
22620
- let next2 = sorted[i];
22625
+ while (i2 < sorted.length) {
22626
+ let next2 = sorted[i2];
22621
22627
  if (next2.from == from && (next2.to > next2.from || next2.to == from)) {
22622
22628
  active.push(next2);
22623
- i++;
22629
+ i2++;
22624
22630
  to = Math.min(next2.to, to);
22625
22631
  } else {
22626
22632
  to = Math.min(next2.from, to);
@@ -22667,9 +22673,9 @@ class LintState {
22667
22673
  pos = to;
22668
22674
  if (pos == docLen)
22669
22675
  break;
22670
- for (let i2 = 0; i2 < active.length; i2++)
22671
- if (active[i2].to <= pos)
22672
- active.splice(i2--, 1);
22676
+ for (let i3 = 0; i3 < active.length; i3++)
22677
+ if (active[i3].to <= pos)
22678
+ active.splice(i3--, 1);
22673
22679
  }
22674
22680
  let set = deco.finish();
22675
22681
  return new LintState(set, panel, findDiagnostic(set));
@@ -22864,8 +22870,8 @@ function batchResults(promises, sink, error) {
22864
22870
  const lintConfig = /* @__PURE__ */ Facet.define({
22865
22871
  combine(input) {
22866
22872
  return {
22867
- sources: input.map((i) => i.source).filter((x) => x != null),
22868
- ...combineConfig(input.map((i) => i.config), {
22873
+ sources: input.map((i2) => i2.source).filter((x) => x != null),
22874
+ ...combineConfig(input.map((i2) => i2.config), {
22869
22875
  delay: 750,
22870
22876
  markerFilter: null,
22871
22877
  tooltipFilter: null,
@@ -22896,8 +22902,8 @@ function assignKeys(actions) {
22896
22902
  let assigned = [];
22897
22903
  if (actions)
22898
22904
  actions: for (let { name: name2 } of actions) {
22899
- for (let i = 0; i < name2.length; i++) {
22900
- let ch = name2[i];
22905
+ for (let i2 = 0; i2 < name2.length; i2++) {
22906
+ let ch = name2[i2];
22901
22907
  if (/[a-zA-Z]/.test(ch) && !assigned.some((c) => c.toLowerCase() == ch.toLowerCase())) {
22902
22908
  assigned.push(ch);
22903
22909
  continue actions;
@@ -22910,7 +22916,7 @@ function assignKeys(actions) {
22910
22916
  function renderDiagnostic(view, diagnostic, inPanel) {
22911
22917
  var _a2;
22912
22918
  let keys2 = inPanel ? assignKeys(diagnostic.actions) : [];
22913
- return crelt("li", { class: "cm-diagnostic cm-diagnostic-" + diagnostic.severity }, crelt("span", { class: "cm-diagnosticText" }, diagnostic.renderMessage ? diagnostic.renderMessage(view) : diagnostic.message), (_a2 = diagnostic.actions) === null || _a2 === void 0 ? void 0 : _a2.map((action, i) => {
22919
+ return crelt("li", { class: "cm-diagnostic cm-diagnostic-" + diagnostic.severity }, crelt("span", { class: "cm-diagnosticText" }, diagnostic.renderMessage ? diagnostic.renderMessage(view) : diagnostic.message), (_a2 = diagnostic.actions) === null || _a2 === void 0 ? void 0 : _a2.map((action, i2) => {
22914
22920
  let fired = false, click = (e) => {
22915
22921
  e.preventDefault();
22916
22922
  if (fired)
@@ -22920,7 +22926,7 @@ function renderDiagnostic(view, diagnostic, inPanel) {
22920
22926
  if (found)
22921
22927
  action.apply(view, found.from, found.to);
22922
22928
  };
22923
- let { name: name2 } = action, keyIndex = keys2[i] ? name2.indexOf(keys2[i]) : -1;
22929
+ let { name: name2 } = action, keyIndex = keys2[i2] ? name2.indexOf(keys2[i2]) : -1;
22924
22930
  let nameElt = keyIndex < 0 ? name2 : [
22925
22931
  name2.slice(0, keyIndex),
22926
22932
  crelt("u", name2.slice(keyIndex, keyIndex + 1)),
@@ -22932,7 +22938,7 @@ function renderDiagnostic(view, diagnostic, inPanel) {
22932
22938
  class: "cm-diagnosticAction" + markClass,
22933
22939
  onclick: click,
22934
22940
  onmousedown: click,
22935
- "aria-label": ` Action: ${name2}${keyIndex < 0 ? "" : ` (access key "${keys2[i]})"`}.`
22941
+ "aria-label": ` Action: ${name2}${keyIndex < 0 ? "" : ` (access key "${keys2[i2]})"`}.`
22936
22942
  }, nameElt);
22937
22943
  }), diagnostic.source && crelt("div", { class: "cm-diagnosticSource" }, diagnostic.source));
22938
22944
  }
@@ -22979,11 +22985,11 @@ class LintPanel {
22979
22985
  this.view.focus();
22980
22986
  } else if (event.keyCode >= 65 && event.keyCode <= 90 && this.selectedIndex >= 0) {
22981
22987
  let { diagnostic } = this.items[this.selectedIndex], keys2 = assignKeys(diagnostic.actions);
22982
- for (let i = 0; i < keys2.length; i++)
22983
- if (keys2[i].toUpperCase().charCodeAt(0) == event.keyCode) {
22988
+ for (let i2 = 0; i2 < keys2.length; i2++)
22989
+ if (keys2[i2].toUpperCase().charCodeAt(0) == event.keyCode) {
22984
22990
  let found = findDiagnostic(this.view.state.field(lintState).diagnostics, diagnostic);
22985
22991
  if (found)
22986
- diagnostic.actions[i].apply(view, found.from, found.to);
22992
+ diagnostic.actions[i2].apply(view, found.from, found.to);
22987
22993
  }
22988
22994
  } else {
22989
22995
  return;
@@ -22991,9 +22997,9 @@ class LintPanel {
22991
22997
  event.preventDefault();
22992
22998
  };
22993
22999
  let onclick = (event) => {
22994
- for (let i = 0; i < this.items.length; i++) {
22995
- if (this.items[i].dom.contains(event.target))
22996
- this.moveSelection(i);
23000
+ for (let i2 = 0; i2 < this.items.length; i2++) {
23001
+ if (this.items[i2].dom.contains(event.target))
23002
+ this.moveSelection(i2);
22997
23003
  }
22998
23004
  };
22999
23005
  this.list = crelt("ul", {
@@ -23015,14 +23021,14 @@ class LintPanel {
23015
23021
  let selected = this.view.state.field(lintState).selected;
23016
23022
  if (!selected)
23017
23023
  return -1;
23018
- for (let i = 0; i < this.items.length; i++)
23019
- if (this.items[i].diagnostic == selected.diagnostic)
23020
- return i;
23024
+ for (let i2 = 0; i2 < this.items.length; i2++)
23025
+ if (this.items[i2].diagnostic == selected.diagnostic)
23026
+ return i2;
23021
23027
  return -1;
23022
23028
  }
23023
23029
  update() {
23024
23030
  let { diagnostics, selected } = this.view.state.field(lintState);
23025
- let i = 0, needsSync = false, newSelectedItem = null;
23031
+ let i2 = 0, needsSync = false, newSelectedItem = null;
23026
23032
  let seen = /* @__PURE__ */ new Set();
23027
23033
  diagnostics.between(0, this.view.state.doc.length, (_start, _end, { spec }) => {
23028
23034
  for (let diagnostic of spec.diagnostics) {
@@ -23030,19 +23036,19 @@ class LintPanel {
23030
23036
  continue;
23031
23037
  seen.add(diagnostic);
23032
23038
  let found = -1, item;
23033
- for (let j = i; j < this.items.length; j++)
23039
+ for (let j = i2; j < this.items.length; j++)
23034
23040
  if (this.items[j].diagnostic == diagnostic) {
23035
23041
  found = j;
23036
23042
  break;
23037
23043
  }
23038
23044
  if (found < 0) {
23039
23045
  item = new PanelItem(this.view, diagnostic);
23040
- this.items.splice(i, 0, item);
23046
+ this.items.splice(i2, 0, item);
23041
23047
  needsSync = true;
23042
23048
  } else {
23043
23049
  item = this.items[found];
23044
- if (found > i) {
23045
- this.items.splice(i, found - i);
23050
+ if (found > i2) {
23051
+ this.items.splice(i2, found - i2);
23046
23052
  needsSync = true;
23047
23053
  }
23048
23054
  }
@@ -23054,10 +23060,10 @@ class LintPanel {
23054
23060
  } else if (item.dom.hasAttribute("aria-selected")) {
23055
23061
  item.dom.removeAttribute("aria-selected");
23056
23062
  }
23057
- i++;
23063
+ i2++;
23058
23064
  }
23059
23065
  });
23060
- while (i < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0)) {
23066
+ while (i2 < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0)) {
23061
23067
  needsSync = true;
23062
23068
  this.items.pop();
23063
23069
  }
@@ -23859,7 +23865,7 @@ class Stack {
23859
23865
  @internal
23860
23866
  */
23861
23867
  toString() {
23862
- return `[${this.stack.filter((_, i) => i % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
23868
+ return `[${this.stack.filter((_, i2) => i2 % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
23863
23869
  }
23864
23870
  // Start an empty stack
23865
23871
  /**
@@ -24106,27 +24112,27 @@ class Stack {
24106
24112
  let nextStates = this.p.parser.nextStates(this.state);
24107
24113
  if (nextStates.length > 4 << 1 || this.stack.length >= 120) {
24108
24114
  let best = [];
24109
- for (let i = 0, s; i < nextStates.length; i += 2) {
24110
- if ((s = nextStates[i + 1]) != this.state && this.p.parser.hasAction(s, next))
24111
- best.push(nextStates[i], s);
24115
+ for (let i2 = 0, s; i2 < nextStates.length; i2 += 2) {
24116
+ if ((s = nextStates[i2 + 1]) != this.state && this.p.parser.hasAction(s, next))
24117
+ best.push(nextStates[i2], s);
24112
24118
  }
24113
24119
  if (this.stack.length < 120)
24114
- for (let i = 0; best.length < 4 << 1 && i < nextStates.length; i += 2) {
24115
- let s = nextStates[i + 1];
24116
- if (!best.some((v, i2) => i2 & 1 && v == s))
24117
- best.push(nextStates[i], s);
24120
+ for (let i2 = 0; best.length < 4 << 1 && i2 < nextStates.length; i2 += 2) {
24121
+ let s = nextStates[i2 + 1];
24122
+ if (!best.some((v, i22) => i22 & 1 && v == s))
24123
+ best.push(nextStates[i2], s);
24118
24124
  }
24119
24125
  nextStates = best;
24120
24126
  }
24121
24127
  let result = [];
24122
- for (let i = 0; i < nextStates.length && result.length < 4; i += 2) {
24123
- let s = nextStates[i + 1];
24128
+ for (let i2 = 0; i2 < nextStates.length && result.length < 4; i2 += 2) {
24129
+ let s = nextStates[i2 + 1];
24124
24130
  if (s == this.state)
24125
24131
  continue;
24126
24132
  let stack = this.split();
24127
24133
  stack.pushState(s, this.pos);
24128
24134
  stack.storeNode(0, stack.pos, stack.pos, 4, true);
24129
- stack.shiftContext(nextStates[i], this.pos);
24135
+ stack.shiftContext(nextStates[i2], this.pos);
24130
24136
  stack.reducePos = this.pos;
24131
24137
  stack.score -= 200;
24132
24138
  result.push(stack);
@@ -24243,8 +24249,8 @@ class Stack {
24243
24249
  sameState(other) {
24244
24250
  if (this.state != other.state || this.stack.length != other.stack.length)
24245
24251
  return false;
24246
- for (let i = 0; i < this.stack.length; i += 3)
24247
- if (this.stack[i] != other.stack[i])
24252
+ for (let i2 = 0; i2 < this.stack.length; i2 += 3)
24253
+ if (this.stack[i2] != other.stack[i2])
24248
24254
  return false;
24249
24255
  return true;
24250
24256
  }
@@ -24504,9 +24510,9 @@ class InputStream {
24504
24510
  if (pos >= this.chunk2Pos && pos < this.chunk2Pos + this.chunk2.length) {
24505
24511
  result = this.chunk2.charCodeAt(pos - this.chunk2Pos);
24506
24512
  } else {
24507
- let i = this.rangeIndex, range = this.range;
24513
+ let i2 = this.rangeIndex, range = this.range;
24508
24514
  while (range.to <= pos)
24509
- range = this.ranges[++i];
24515
+ range = this.ranges[++i2];
24510
24516
  this.chunk2 = this.input.chunk(this.chunk2Pos = pos);
24511
24517
  if (pos + this.chunk2.length > range.to)
24512
24518
  this.chunk2 = this.chunk2.slice(0, range.to - pos);
@@ -24698,9 +24704,9 @@ function readToken(data, input, stack, group, precTable, precOffset) {
24698
24704
  if ((groupMask & data[state]) == 0)
24699
24705
  break;
24700
24706
  let accEnd = data[state + 1];
24701
- for (let i = state + 3; i < accEnd; i += 2)
24702
- if ((data[i + 1] & groupMask) > 0) {
24703
- let term = data[i];
24707
+ for (let i2 = state + 3; i2 < accEnd; i2 += 2)
24708
+ if ((data[i2 + 1] & groupMask) > 0) {
24709
+ let term = data[i2];
24704
24710
  if (dialect.allows(term) && (input.token.value == -1 || input.token.value == term || overrides(term, input.token.value, precTable, precOffset))) {
24705
24711
  input.acceptToken(term);
24706
24712
  break;
@@ -24729,9 +24735,9 @@ function readToken(data, input, stack, group, precTable, precOffset) {
24729
24735
  }
24730
24736
  }
24731
24737
  function findOffset(data, start, term) {
24732
- for (let i = start, next; (next = data[i]) != 65535; i++)
24738
+ for (let i2 = start, next; (next = data[i2]) != 65535; i2++)
24733
24739
  if (next == term)
24734
- return i - start;
24740
+ return i2 - start;
24735
24741
  return -1;
24736
24742
  }
24737
24743
  function overrides(token, prev, tableData, tableOffset) {
@@ -24864,10 +24870,10 @@ class TokenCache {
24864
24870
  );
24865
24871
  let context = stack.curContext ? stack.curContext.hash : 0;
24866
24872
  let lookAhead = 0;
24867
- for (let i = 0; i < tokenizers.length; i++) {
24868
- if ((1 << i & mask) == 0)
24873
+ for (let i2 = 0; i2 < tokenizers.length; i2++) {
24874
+ if ((1 << i2 & mask) == 0)
24869
24875
  continue;
24870
- let tokenizer = tokenizers[i], token = this.tokens[i];
24876
+ let tokenizer = tokenizers[i2], token = this.tokens[i2];
24871
24877
  if (main && !tokenizer.fallback)
24872
24878
  continue;
24873
24879
  if (tokenizer.contextual || token.start != stack.pos || token.mask != mask || token.context != context) {
@@ -24916,9 +24922,9 @@ class TokenCache {
24916
24922
  tokenizer.token(this.stream.reset(start, token), stack);
24917
24923
  if (token.value > -1) {
24918
24924
  let { parser: parser2 } = stack.p;
24919
- for (let i = 0; i < parser2.specialized.length; i++)
24920
- if (parser2.specialized[i] == token.value) {
24921
- let result = parser2.specializers[i](this.stream.read(token.start, token.end), stack);
24925
+ for (let i2 = 0; i2 < parser2.specialized.length; i2++)
24926
+ if (parser2.specialized[i2] == token.value) {
24927
+ let result = parser2.specializers[i2](this.stream.read(token.start, token.end), stack);
24922
24928
  if (result >= 0 && stack.p.parser.dialect.allows(result >> 1)) {
24923
24929
  if ((result & 1) == 0)
24924
24930
  token.value = result >> 1;
@@ -24933,8 +24939,8 @@ class TokenCache {
24933
24939
  }
24934
24940
  }
24935
24941
  putAction(action, token, end, index) {
24936
- for (let i = 0; i < index; i += 3)
24937
- if (this.actions[i] == action)
24942
+ for (let i2 = 0; i2 < index; i2 += 3)
24943
+ if (this.actions[i2] == action)
24938
24944
  return index;
24939
24945
  this.actions[index++] = action;
24940
24946
  this.actions[index++] = token;
@@ -24944,22 +24950,22 @@ class TokenCache {
24944
24950
  addActions(stack, token, end, index) {
24945
24951
  let { state } = stack, { parser: parser2 } = stack.p, { data } = parser2;
24946
24952
  for (let set = 0; set < 2; set++) {
24947
- for (let i = parser2.stateSlot(
24953
+ for (let i2 = parser2.stateSlot(
24948
24954
  state,
24949
24955
  set ? 2 : 1
24950
24956
  /* ParseState.Actions */
24951
- ); ; i += 3) {
24952
- if (data[i] == 65535) {
24953
- if (data[i + 1] == 1) {
24954
- i = pair(data, i + 2);
24957
+ ); ; i2 += 3) {
24958
+ if (data[i2] == 65535) {
24959
+ if (data[i2 + 1] == 1) {
24960
+ i2 = pair(data, i2 + 2);
24955
24961
  } else {
24956
- if (index == 0 && data[i + 1] == 2)
24957
- index = this.putAction(pair(data, i + 2), token, end, index);
24962
+ if (index == 0 && data[i2 + 1] == 2)
24963
+ index = this.putAction(pair(data, i2 + 2), token, end, index);
24958
24964
  break;
24959
24965
  }
24960
24966
  }
24961
- if (data[i] == token)
24962
- index = this.putAction(pair(data, i + 1), token, end, index);
24967
+ if (data[i2] == token)
24968
+ index = this.putAction(pair(data, i2 + 1), token, end, index);
24963
24969
  }
24964
24970
  }
24965
24971
  return index;
@@ -25004,8 +25010,8 @@ class Parse {
25004
25010
  }
25005
25011
  this.bigReductionCount = this.lastBigReductionSize = 0;
25006
25012
  }
25007
- for (let i = 0; i < stacks.length; i++) {
25008
- let stack = stacks[i];
25013
+ for (let i2 = 0; i2 < stacks.length; i2++) {
25014
+ let stack = stacks[i2];
25009
25015
  for (; ; ) {
25010
25016
  this.tokens.mainToken = null;
25011
25017
  if (stack.pos > pos) {
@@ -25057,15 +25063,15 @@ class Parse {
25057
25063
  if (newStacks.some((s) => s.reducePos > pos))
25058
25064
  this.recovering--;
25059
25065
  } else if (newStacks.length > 1) {
25060
- outer: for (let i = 0; i < newStacks.length - 1; i++) {
25061
- let stack = newStacks[i];
25062
- for (let j = i + 1; j < newStacks.length; j++) {
25066
+ outer: for (let i2 = 0; i2 < newStacks.length - 1; i2++) {
25067
+ let stack = newStacks[i2];
25068
+ for (let j = i2 + 1; j < newStacks.length; j++) {
25063
25069
  let other = newStacks[j];
25064
25070
  if (stack.sameState(other) || stack.buffer.length > 500 && other.buffer.length > 500) {
25065
25071
  if ((stack.score - other.score || stack.buffer.length - other.buffer.length) > 0) {
25066
25072
  newStacks.splice(j--, 1);
25067
25073
  } else {
25068
- newStacks.splice(i--, 1);
25074
+ newStacks.splice(i2--, 1);
25069
25075
  continue outer;
25070
25076
  }
25071
25077
  }
@@ -25081,9 +25087,9 @@ class Parse {
25081
25087
  }
25082
25088
  }
25083
25089
  this.minStackPos = newStacks[0].pos;
25084
- for (let i = 1; i < newStacks.length; i++)
25085
- if (newStacks[i].pos < this.minStackPos)
25086
- this.minStackPos = newStacks[i].pos;
25090
+ for (let i2 = 1; i2 < newStacks.length; i2++)
25091
+ if (newStacks[i2].pos < this.minStackPos)
25092
+ this.minStackPos = newStacks[i2].pos;
25087
25093
  return null;
25088
25094
  }
25089
25095
  stopAt(pos) {
@@ -25138,9 +25144,9 @@ class Parse {
25138
25144
  }
25139
25145
  }
25140
25146
  let actions = this.tokens.getActions(stack);
25141
- for (let i = 0; i < actions.length; ) {
25142
- let action = actions[i++], term = actions[i++], end = actions[i++];
25143
- let last = i == actions.length || !split;
25147
+ for (let i2 = 0; i2 < actions.length; ) {
25148
+ let action = actions[i2++], term = actions[i2++], end = actions[i2++];
25149
+ let last = i2 == actions.length || !split;
25144
25150
  let localStack = last ? stack : stack.split();
25145
25151
  let main = this.tokens.mainToken;
25146
25152
  localStack.apply(action, term, main ? main.start : localStack.pos, end);
@@ -25174,8 +25180,8 @@ class Parse {
25174
25180
  }
25175
25181
  runRecovery(stacks, tokens, newStacks) {
25176
25182
  let finished = null, restarted = false;
25177
- for (let i = 0; i < stacks.length; i++) {
25178
- let stack = stacks[i], token = tokens[i << 1], tokenEnd = tokens[(i << 1) + 1];
25183
+ for (let i2 = 0; i2 < stacks.length; i2++) {
25184
+ let stack = stacks[i2], token = tokens[i2 << 1], tokenEnd = tokens[(i2 << 1) + 1];
25179
25185
  let base2 = verbose ? this.stackID(stack) + " -> " : "";
25180
25186
  if (stack.deadEnd) {
25181
25187
  if (restarted)
@@ -25240,11 +25246,11 @@ class Parse {
25240
25246
  }
25241
25247
  }
25242
25248
  function pushStackDedup(stack, newStacks) {
25243
- for (let i = 0; i < newStacks.length; i++) {
25244
- let other = newStacks[i];
25249
+ for (let i2 = 0; i2 < newStacks.length; i2++) {
25250
+ let other = newStacks[i2];
25245
25251
  if (other.pos == stack.pos && other.sameState(stack)) {
25246
- if (newStacks[i].score < stack.score)
25247
- newStacks[i] = stack;
25252
+ if (newStacks[i2].score < stack.score)
25253
+ newStacks[i2] = stack;
25248
25254
  return;
25249
25255
  }
25250
25256
  }
@@ -25285,11 +25291,11 @@ class LRParser extends Parser {
25285
25291
  throw new RangeError(`Parser version (${spec.version}) doesn't match runtime version (${14})`);
25286
25292
  let nodeNames = spec.nodeNames.split(" ");
25287
25293
  this.minRepeatTerm = nodeNames.length;
25288
- for (let i = 0; i < spec.repeatNodeCount; i++)
25294
+ for (let i2 = 0; i2 < spec.repeatNodeCount; i2++)
25289
25295
  nodeNames.push("");
25290
25296
  let topTerms = Object.keys(spec.topRules).map((r) => spec.topRules[r][1]);
25291
25297
  let nodeProps = [];
25292
- for (let i = 0; i < nodeNames.length; i++)
25298
+ for (let i2 = 0; i2 < nodeNames.length; i2++)
25293
25299
  nodeProps.push([]);
25294
25300
  function setProp(nodeID, prop, value) {
25295
25301
  nodeProps[nodeID].push([prop, prop.deserialize(String(value))]);
@@ -25299,25 +25305,25 @@ class LRParser extends Parser {
25299
25305
  let prop = propSpec[0];
25300
25306
  if (typeof prop == "string")
25301
25307
  prop = NodeProp[prop];
25302
- for (let i = 1; i < propSpec.length; ) {
25303
- let next = propSpec[i++];
25308
+ for (let i2 = 1; i2 < propSpec.length; ) {
25309
+ let next = propSpec[i2++];
25304
25310
  if (next >= 0) {
25305
- setProp(next, prop, propSpec[i++]);
25311
+ setProp(next, prop, propSpec[i2++]);
25306
25312
  } else {
25307
- let value = propSpec[i + -next];
25313
+ let value = propSpec[i2 + -next];
25308
25314
  for (let j = -next; j > 0; j--)
25309
- setProp(propSpec[i++], prop, value);
25310
- i++;
25315
+ setProp(propSpec[i2++], prop, value);
25316
+ i2++;
25311
25317
  }
25312
25318
  }
25313
25319
  }
25314
- this.nodeSet = new NodeSet(nodeNames.map((name2, i) => NodeType.define({
25315
- name: i >= this.minRepeatTerm ? void 0 : name2,
25316
- id: i,
25317
- props: nodeProps[i],
25318
- top: topTerms.indexOf(i) > -1,
25319
- error: i == 0,
25320
- skipped: spec.skippedNodes && spec.skippedNodes.indexOf(i) > -1
25320
+ this.nodeSet = new NodeSet(nodeNames.map((name2, i2) => NodeType.define({
25321
+ name: i2 >= this.minRepeatTerm ? void 0 : name2,
25322
+ id: i2,
25323
+ props: nodeProps[i2],
25324
+ top: topTerms.indexOf(i2) > -1,
25325
+ error: i2 == 0,
25326
+ skipped: spec.skippedNodes && spec.skippedNodes.indexOf(i2) > -1
25321
25327
  })));
25322
25328
  if (spec.propSources)
25323
25329
  this.nodeSet = this.nodeSet.extend(...spec.propSources);
@@ -25327,8 +25333,8 @@ class LRParser extends Parser {
25327
25333
  this.context = spec.context;
25328
25334
  this.specializerSpecs = spec.specialized || [];
25329
25335
  this.specialized = new Uint16Array(this.specializerSpecs.length);
25330
- for (let i = 0; i < this.specializerSpecs.length; i++)
25331
- this.specialized[i] = this.specializerSpecs[i].term;
25336
+ for (let i2 = 0; i2 < this.specializerSpecs.length; i2++)
25337
+ this.specialized[i2] = this.specializerSpecs[i2].term;
25332
25338
  this.specializers = this.specializerSpecs.map(getSpecializer);
25333
25339
  this.states = decodeArray(spec.states, Uint32Array);
25334
25340
  this.data = decodeArray(spec.stateData);
@@ -25375,21 +25381,21 @@ class LRParser extends Parser {
25375
25381
  hasAction(state, terminal) {
25376
25382
  let data = this.data;
25377
25383
  for (let set = 0; set < 2; set++) {
25378
- for (let i = this.stateSlot(
25384
+ for (let i2 = this.stateSlot(
25379
25385
  state,
25380
25386
  set ? 2 : 1
25381
25387
  /* ParseState.Actions */
25382
- ), next; ; i += 3) {
25383
- if ((next = data[i]) == 65535) {
25384
- if (data[i + 1] == 1)
25385
- next = data[i = pair(data, i + 2)];
25386
- else if (data[i + 1] == 2)
25387
- return pair(data, i + 2);
25388
+ ), next; ; i2 += 3) {
25389
+ if ((next = data[i2]) == 65535) {
25390
+ if (data[i2 + 1] == 1)
25391
+ next = data[i2 = pair(data, i2 + 2)];
25392
+ else if (data[i2 + 1] == 2)
25393
+ return pair(data, i2 + 2);
25388
25394
  else
25389
25395
  break;
25390
25396
  }
25391
25397
  if (next == terminal || next == 0)
25392
- return pair(data, i + 1);
25398
+ return pair(data, i2 + 1);
25393
25399
  }
25394
25400
  }
25395
25401
  return 0;
@@ -25426,18 +25432,18 @@ class LRParser extends Parser {
25426
25432
  /* ParseState.DefaultReduce */
25427
25433
  );
25428
25434
  let result = deflt ? action(deflt) : void 0;
25429
- for (let i = this.stateSlot(
25435
+ for (let i2 = this.stateSlot(
25430
25436
  state,
25431
25437
  1
25432
25438
  /* ParseState.Actions */
25433
- ); result == null; i += 3) {
25434
- if (this.data[i] == 65535) {
25435
- if (this.data[i + 1] == 1)
25436
- i = pair(this.data, i + 2);
25439
+ ); result == null; i2 += 3) {
25440
+ if (this.data[i2] == 65535) {
25441
+ if (this.data[i2 + 1] == 1)
25442
+ i2 = pair(this.data, i2 + 2);
25437
25443
  else
25438
25444
  break;
25439
25445
  }
25440
- result = action(pair(this.data, i + 1));
25446
+ result = action(pair(this.data, i2 + 1));
25441
25447
  }
25442
25448
  return result;
25443
25449
  }
@@ -25447,21 +25453,21 @@ class LRParser extends Parser {
25447
25453
  */
25448
25454
  nextStates(state) {
25449
25455
  let result = [];
25450
- for (let i = this.stateSlot(
25456
+ for (let i2 = this.stateSlot(
25451
25457
  state,
25452
25458
  1
25453
25459
  /* ParseState.Actions */
25454
- ); ; i += 3) {
25455
- if (this.data[i] == 65535) {
25456
- if (this.data[i + 1] == 1)
25457
- i = pair(this.data, i + 2);
25460
+ ); ; i2 += 3) {
25461
+ if (this.data[i2] == 65535) {
25462
+ if (this.data[i2 + 1] == 1)
25463
+ i2 = pair(this.data, i2 + 2);
25458
25464
  else
25459
25465
  break;
25460
25466
  }
25461
- if ((this.data[i + 2] & 65536 >> 16) == 0) {
25462
- let value = this.data[i + 1];
25463
- if (!result.some((v, i2) => i2 & 1 && v == value))
25464
- result.push(this.data[i], value);
25467
+ if ((this.data[i2 + 2] & 65536 >> 16) == 0) {
25468
+ let value = this.data[i2 + 1];
25469
+ if (!result.some((v, i22) => i22 & 1 && v == value))
25470
+ result.push(this.data[i2], value);
25465
25471
  }
25466
25472
  }
25467
25473
  return result;
@@ -25488,12 +25494,12 @@ class LRParser extends Parser {
25488
25494
  });
25489
25495
  if (config2.specializers) {
25490
25496
  copy.specializers = this.specializers.slice();
25491
- copy.specializerSpecs = this.specializerSpecs.map((s, i) => {
25497
+ copy.specializerSpecs = this.specializerSpecs.map((s, i2) => {
25492
25498
  let found = config2.specializers.find((r) => r.from == s.external);
25493
25499
  if (!found)
25494
25500
  return s;
25495
25501
  let spec = Object.assign(Object.assign({}, s), { external: found.to });
25496
- copy.specializers[i] = getSpecializer(spec);
25502
+ copy.specializers[i2] = getSpecializer(spec);
25497
25503
  return spec;
25498
25504
  });
25499
25505
  }
@@ -25557,9 +25563,9 @@ class LRParser extends Parser {
25557
25563
  flags[id2] = true;
25558
25564
  }
25559
25565
  let disabled = null;
25560
- for (let i = 0; i < values.length; i++)
25561
- if (!flags[i]) {
25562
- for (let j = this.dialects[values[i]], id2; (id2 = this.data[j++]) != 65535; )
25566
+ for (let i2 = 0; i2 < values.length; i2++)
25567
+ if (!flags[i2]) {
25568
+ for (let j = this.dialects[values[i2]], id2; (id2 = this.data[j++]) != 65535; )
25563
25569
  (disabled || (disabled = new Uint8Array(this.maxTerm + 1)))[id2] = 1;
25564
25570
  }
25565
25571
  return new Dialect(dialect, flags, disabled);
@@ -25707,8 +25713,8 @@ function scanTo(type, end) {
25707
25713
  scan: for (; ; input.advance(), len++) {
25708
25714
  if (input.next < 0) break;
25709
25715
  if (input.next == first) {
25710
- for (let i = 1; i < end.length; i++)
25711
- if (input.peek(i) != end.charCodeAt(i)) continue scan;
25716
+ for (let i2 = 1; i2 < end.length; i2++)
25717
+ if (input.peek(i2) != end.charCodeAt(i2)) continue scan;
25712
25718
  break;
25713
25719
  }
25714
25720
  }
@@ -25859,8 +25865,8 @@ function completeFromSchema(eltSpecs, attrSpecs) {
25859
25865
  }
25860
25866
  if (!topElements.length)
25861
25867
  topElements = allElements;
25862
- for (let i = 0; i < allElements.length; i++) {
25863
- let s = eltSpecs[i], elt = allElements[i];
25868
+ for (let i2 = 0; i2 < allElements.length; i2++) {
25869
+ let s = eltSpecs[i2], elt = allElements[i2];
25864
25870
  if (s.children) {
25865
25871
  for (let ch of s.children)
25866
25872
  if (byName[ch])
@@ -26114,12 +26120,12 @@ const jsx = new ExternalTokenizer((input, stack) => {
26114
26120
  back++;
26115
26121
  }
26116
26122
  if (input.next == comma) return;
26117
- for (let i = 0; ; i++) {
26118
- if (i == 7) {
26123
+ for (let i2 = 0; ; i2++) {
26124
+ if (i2 == 7) {
26119
26125
  if (!identifierChar(input.next, true)) return;
26120
26126
  break;
26121
26127
  }
26122
- if (input.next != "extends".charCodeAt(i)) break;
26128
+ if (input.next != "extends".charCodeAt(i2)) break;
26123
26129
  input.advance();
26124
26130
  back++;
26125
26131
  }
@@ -26527,26 +26533,27 @@ export {
26527
26533
  LanguageSupport as L,
26528
26534
  React as R,
26529
26535
  StateField as S,
26530
- autocompletion as a,
26531
- json as b,
26532
- ReactCodeMirror as c,
26533
- javascript as d,
26534
- LRLanguage as e,
26535
- delimitedIndent as f,
26536
+ reactExports as a,
26537
+ autocompletion as b,
26538
+ json as c,
26539
+ ReactCodeMirror as d,
26540
+ javascript as e,
26541
+ LRLanguage as f,
26536
26542
  getDefaultExportFromCjs as g,
26537
26543
  hoverTooltip as h,
26538
26544
  indentNodeProp as i,
26539
26545
  jsxRuntimeExports as j,
26540
26546
  keymap as k,
26541
26547
  linter as l,
26542
- foldNodeProp as m,
26543
- foldInside as n,
26548
+ delimitedIndent as m,
26549
+ foldNodeProp as n,
26544
26550
  oneDark as o,
26545
- LRParser as p,
26546
- StateEffect as q,
26547
- reactExports as r,
26551
+ foldInside as p,
26552
+ LRParser as q,
26553
+ requireReact as r,
26548
26554
  styleTags as s,
26549
26555
  toggleComment as t,
26550
- tags as u,
26556
+ StateEffect as u,
26557
+ tags as v,
26551
26558
  xml as x
26552
26559
  };