@senyao-design-system/editor 0.0.4 → 0.0.6
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.
- package/dist/index.js +26 -14
- package/dist/index.mjs +888 -861
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { sql as
|
|
4
|
-
import { json as
|
|
5
|
-
import { keymap as
|
|
6
|
-
import { indentWithTab as Dt,
|
|
7
|
-
import { autocompletion as
|
|
8
|
-
import { lintGutter as
|
|
9
|
-
import { HighlightStyle as
|
|
1
|
+
import * as ye from "react";
|
|
2
|
+
import Ur, { forwardRef as rt, useContext as Qn, useRef as ue, useEffect as ge, useImperativeHandle as Xn, useMemo as ht, useState as Ft, useCallback as se } from "react";
|
|
3
|
+
import { sql as Br } from "@codemirror/lang-sql";
|
|
4
|
+
import { json as Gr } from "@codemirror/lang-json";
|
|
5
|
+
import { keymap as Ee, EditorView as V, Decoration as Q, ViewPlugin as Kr, getPanel as dt, showPanel as Hr, runScopeHandlers as Zn, placeholder as br, lineNumbers as xr } from "@codemirror/view";
|
|
6
|
+
import { indentWithTab as Dt, history as Er, historyKeymap as Sr, insertNewlineAndIndent as Cr } from "@codemirror/commands";
|
|
7
|
+
import { autocompletion as Jr, closeBrackets as eo } from "@codemirror/autocomplete";
|
|
8
|
+
import { lintGutter as to, linter as ro } from "@codemirror/lint";
|
|
9
|
+
import { HighlightStyle as Qr, syntaxHighlighting as pt, defaultHighlightStyle as Rr, bracketMatching as no, codeFolding as oo, foldGutter as io, foldKeymap as so } from "@codemirror/language";
|
|
10
10
|
import { tags as W } from "@lezer/highlight";
|
|
11
|
-
import { StateEffect as je, StateField as Gt, EditorState as be, Facet as
|
|
12
|
-
var Wt = { exports: {} },
|
|
11
|
+
import { StateEffect as je, StateField as Gt, EditorState as be, Facet as Xr, Prec as Zr, EditorSelection as le, combineConfig as en, codePointAt as ao, fromCodePoint as co, codePointSize as lo, RangeSetBuilder as uo, CharCategory as ae, findClusterBreak as tn } from "@codemirror/state";
|
|
12
|
+
var Wt = { exports: {} }, Ke = {};
|
|
13
13
|
/**
|
|
14
14
|
* @license React
|
|
15
15
|
* react-jsx-runtime.production.min.js
|
|
@@ -19,21 +19,21 @@ var Wt = { exports: {} }, He = {};
|
|
|
19
19
|
* This source code is licensed under the MIT license found in the
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
21
21
|
*/
|
|
22
|
-
var
|
|
23
|
-
function
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
var e =
|
|
27
|
-
function a(c, l,
|
|
28
|
-
var f,
|
|
29
|
-
|
|
30
|
-
for (f in l) n.call(l, f) && !i.hasOwnProperty(f) && (
|
|
31
|
-
if (c && c.defaultProps) for (f in l = c.defaultProps, l)
|
|
32
|
-
return { $$typeof: t, type: c, key:
|
|
33
|
-
}
|
|
34
|
-
return
|
|
35
|
-
}
|
|
36
|
-
var
|
|
22
|
+
var wr;
|
|
23
|
+
function fo() {
|
|
24
|
+
if (wr) return Ke;
|
|
25
|
+
wr = 1;
|
|
26
|
+
var e = Ur, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
27
|
+
function a(c, l, d) {
|
|
28
|
+
var f, v = {}, R = null, m = null;
|
|
29
|
+
d !== void 0 && (R = "" + d), l.key !== void 0 && (R = "" + l.key), l.ref !== void 0 && (m = l.ref);
|
|
30
|
+
for (f in l) n.call(l, f) && !i.hasOwnProperty(f) && (v[f] = l[f]);
|
|
31
|
+
if (c && c.defaultProps) for (f in l = c.defaultProps, l) v[f] === void 0 && (v[f] = l[f]);
|
|
32
|
+
return { $$typeof: t, type: c, key: R, ref: m, props: v, _owner: o.current };
|
|
33
|
+
}
|
|
34
|
+
return Ke.Fragment = r, Ke.jsx = a, Ke.jsxs = a, Ke;
|
|
35
|
+
}
|
|
36
|
+
var He = {};
|
|
37
37
|
/**
|
|
38
38
|
* @license React
|
|
39
39
|
* react-jsx-runtime.development.js
|
|
@@ -43,27 +43,27 @@ var Je = {};
|
|
|
43
43
|
* This source code is licensed under the MIT license found in the
|
|
44
44
|
* LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
|
-
var
|
|
47
|
-
function
|
|
48
|
-
return
|
|
49
|
-
var e =
|
|
46
|
+
var _r;
|
|
47
|
+
function ho() {
|
|
48
|
+
return _r || (_r = 1, process.env.NODE_ENV !== "production" && function() {
|
|
49
|
+
var e = Ur, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), w = Symbol.iterator, g = "@@iterator";
|
|
50
50
|
function x(s) {
|
|
51
51
|
if (s === null || typeof s != "object")
|
|
52
52
|
return null;
|
|
53
|
-
var u =
|
|
53
|
+
var u = w && s[w] || s[g];
|
|
54
54
|
return typeof u == "function" ? u : null;
|
|
55
55
|
}
|
|
56
|
-
var
|
|
57
|
-
function
|
|
56
|
+
var S = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
57
|
+
function y(s) {
|
|
58
58
|
{
|
|
59
|
-
for (var u = arguments.length, p = new Array(u > 1 ? u - 1 : 0),
|
|
60
|
-
p[
|
|
61
|
-
|
|
59
|
+
for (var u = arguments.length, p = new Array(u > 1 ? u - 1 : 0), _ = 1; _ < u; _++)
|
|
60
|
+
p[_ - 1] = arguments[_];
|
|
61
|
+
C("error", s, p);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function C(s, u, p) {
|
|
65
65
|
{
|
|
66
|
-
var
|
|
66
|
+
var _ = S.ReactDebugCurrentFrame, N = _.getStackAddendum();
|
|
67
67
|
N !== "" && (u += "%s", p = p.concat([N]));
|
|
68
68
|
var j = p.map(function(P) {
|
|
69
69
|
return String(P);
|
|
@@ -71,29 +71,29 @@ function ao() {
|
|
|
71
71
|
j.unshift("Warning: " + u), Function.prototype.apply.call(console[s], console, j);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var
|
|
75
|
-
|
|
74
|
+
var T = !1, h = !1, q = !1, $ = !1, Ye = !1, Se;
|
|
75
|
+
Se = Symbol.for("react.module.reference");
|
|
76
76
|
function Te(s) {
|
|
77
|
-
return !!(typeof s == "string" || typeof s == "function" || s === n || s === i || Ye || s === o || s ===
|
|
77
|
+
return !!(typeof s == "string" || typeof s == "function" || s === n || s === i || Ye || s === o || s === d || s === f || $ || s === m || T || h || q || typeof s == "object" && s !== null && (s.$$typeof === R || s.$$typeof === v || s.$$typeof === a || s.$$typeof === c || s.$$typeof === l || // This needs to include all possible module reference object
|
|
78
78
|
// types supported by any Flight configuration anywhere since
|
|
79
79
|
// we don't know which Flight build this will end up being used
|
|
80
80
|
// with.
|
|
81
|
-
s.$$typeof ===
|
|
81
|
+
s.$$typeof === Se || s.getModuleId !== void 0));
|
|
82
82
|
}
|
|
83
83
|
function ke(s, u, p) {
|
|
84
|
-
var
|
|
85
|
-
if (
|
|
86
|
-
return
|
|
84
|
+
var _ = s.displayName;
|
|
85
|
+
if (_)
|
|
86
|
+
return _;
|
|
87
87
|
var N = u.displayName || u.name || "";
|
|
88
88
|
return N !== "" ? p + "(" + N + ")" : p;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function Ce(s) {
|
|
91
91
|
return s.displayName || "Context";
|
|
92
92
|
}
|
|
93
93
|
function Z(s) {
|
|
94
94
|
if (s == null)
|
|
95
95
|
return null;
|
|
96
|
-
if (typeof s.tag == "number" &&
|
|
96
|
+
if (typeof s.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
|
|
97
97
|
return s.displayName || s.name || null;
|
|
98
98
|
if (typeof s == "string")
|
|
99
99
|
return s;
|
|
@@ -106,7 +106,7 @@ function ao() {
|
|
|
106
106
|
return "Profiler";
|
|
107
107
|
case o:
|
|
108
108
|
return "StrictMode";
|
|
109
|
-
case
|
|
109
|
+
case d:
|
|
110
110
|
return "Suspense";
|
|
111
111
|
case f:
|
|
112
112
|
return "SuspenseList";
|
|
@@ -115,16 +115,16 @@ function ao() {
|
|
|
115
115
|
switch (s.$$typeof) {
|
|
116
116
|
case c:
|
|
117
117
|
var u = s;
|
|
118
|
-
return
|
|
118
|
+
return Ce(u) + ".Consumer";
|
|
119
119
|
case a:
|
|
120
120
|
var p = s;
|
|
121
|
-
return
|
|
121
|
+
return Ce(p._context) + ".Provider";
|
|
122
122
|
case l:
|
|
123
123
|
return ke(s, s.render, "ForwardRef");
|
|
124
|
-
case
|
|
125
|
-
var
|
|
126
|
-
return
|
|
127
|
-
case
|
|
124
|
+
case v:
|
|
125
|
+
var _ = s.displayName || null;
|
|
126
|
+
return _ !== null ? _ : Z(s.type) || "Memo";
|
|
127
|
+
case R: {
|
|
128
128
|
var N = s, j = N._payload, P = N._init;
|
|
129
129
|
try {
|
|
130
130
|
return Z(P(j));
|
|
@@ -135,14 +135,14 @@ function ao() {
|
|
|
135
135
|
}
|
|
136
136
|
return null;
|
|
137
137
|
}
|
|
138
|
-
var ce = Object.assign, pe = 0, b,
|
|
138
|
+
var ce = Object.assign, pe = 0, b, k, M, A, Y, G, oe;
|
|
139
139
|
function me() {
|
|
140
140
|
}
|
|
141
141
|
me.__reactDisabledLog = !0;
|
|
142
142
|
function _t() {
|
|
143
143
|
{
|
|
144
144
|
if (pe === 0) {
|
|
145
|
-
b = console.log,
|
|
145
|
+
b = console.log, k = console.info, M = console.warn, A = console.error, Y = console.group, G = console.groupCollapsed, oe = console.groupEnd;
|
|
146
146
|
var s = {
|
|
147
147
|
configurable: !0,
|
|
148
148
|
enumerable: !0,
|
|
@@ -175,13 +175,13 @@ function ao() {
|
|
|
175
175
|
value: b
|
|
176
176
|
}),
|
|
177
177
|
info: ce({}, s, {
|
|
178
|
-
value:
|
|
178
|
+
value: k
|
|
179
179
|
}),
|
|
180
180
|
warn: ce({}, s, {
|
|
181
|
-
value:
|
|
181
|
+
value: M
|
|
182
182
|
}),
|
|
183
183
|
error: ce({}, s, {
|
|
184
|
-
value:
|
|
184
|
+
value: A
|
|
185
185
|
}),
|
|
186
186
|
group: ce({}, s, {
|
|
187
187
|
value: Y
|
|
@@ -194,37 +194,37 @@ function ao() {
|
|
|
194
194
|
})
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
|
-
pe < 0 &&
|
|
197
|
+
pe < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
var Ve =
|
|
200
|
+
var Ve = S.ReactCurrentDispatcher, ze;
|
|
201
201
|
function Me(s, u, p) {
|
|
202
202
|
{
|
|
203
203
|
if (ze === void 0)
|
|
204
204
|
try {
|
|
205
205
|
throw Error();
|
|
206
206
|
} catch (N) {
|
|
207
|
-
var
|
|
208
|
-
ze =
|
|
207
|
+
var _ = N.stack.trim().match(/\n( *(at )?)/);
|
|
208
|
+
ze = _ && _[1] || "";
|
|
209
209
|
}
|
|
210
210
|
return `
|
|
211
211
|
` + ze + s;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
var Ue = !1,
|
|
214
|
+
var Ue = !1, Oe;
|
|
215
215
|
{
|
|
216
216
|
var kt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
217
|
-
|
|
217
|
+
Oe = new kt();
|
|
218
218
|
}
|
|
219
219
|
function E(s, u) {
|
|
220
220
|
if (!s || Ue)
|
|
221
221
|
return "";
|
|
222
222
|
{
|
|
223
|
-
var p =
|
|
223
|
+
var p = Oe.get(s);
|
|
224
224
|
if (p !== void 0)
|
|
225
225
|
return p;
|
|
226
226
|
}
|
|
227
|
-
var
|
|
227
|
+
var _;
|
|
228
228
|
Ue = !0;
|
|
229
229
|
var N = Error.prepareStackTrace;
|
|
230
230
|
Error.prepareStackTrace = void 0;
|
|
@@ -243,14 +243,14 @@ function ao() {
|
|
|
243
243
|
try {
|
|
244
244
|
Reflect.construct(P, []);
|
|
245
245
|
} catch (ee) {
|
|
246
|
-
|
|
246
|
+
_ = ee;
|
|
247
247
|
}
|
|
248
248
|
Reflect.construct(s, [], P);
|
|
249
249
|
} else {
|
|
250
250
|
try {
|
|
251
251
|
P.call();
|
|
252
252
|
} catch (ee) {
|
|
253
|
-
|
|
253
|
+
_ = ee;
|
|
254
254
|
}
|
|
255
255
|
s.call(P.prototype);
|
|
256
256
|
}
|
|
@@ -258,24 +258,24 @@ function ao() {
|
|
|
258
258
|
try {
|
|
259
259
|
throw Error();
|
|
260
260
|
} catch (ee) {
|
|
261
|
-
|
|
261
|
+
_ = ee;
|
|
262
262
|
}
|
|
263
263
|
s();
|
|
264
264
|
}
|
|
265
265
|
} catch (ee) {
|
|
266
|
-
if (ee &&
|
|
267
|
-
for (var
|
|
268
|
-
`), X =
|
|
269
|
-
`), z =
|
|
266
|
+
if (ee && _ && typeof ee.stack == "string") {
|
|
267
|
+
for (var O = ee.stack.split(`
|
|
268
|
+
`), X = _.stack.split(`
|
|
269
|
+
`), z = O.length - 1, U = X.length - 1; z >= 1 && U >= 0 && O[z] !== X[U]; )
|
|
270
270
|
U--;
|
|
271
271
|
for (; z >= 1 && U >= 0; z--, U--)
|
|
272
|
-
if (
|
|
272
|
+
if (O[z] !== X[U]) {
|
|
273
273
|
if (z !== 1 || U !== 1)
|
|
274
274
|
do
|
|
275
|
-
if (z--, U--, U < 0 ||
|
|
275
|
+
if (z--, U--, U < 0 || O[z] !== X[U]) {
|
|
276
276
|
var ie = `
|
|
277
|
-
` +
|
|
278
|
-
return s.displayName && ie.includes("<anonymous>") && (ie = ie.replace("<anonymous>", s.displayName)), typeof s == "function" &&
|
|
277
|
+
` + O[z].replace(" at new ", " at ");
|
|
278
|
+
return s.displayName && ie.includes("<anonymous>") && (ie = ie.replace("<anonymous>", s.displayName)), typeof s == "function" && Oe.set(s, ie), ie;
|
|
279
279
|
}
|
|
280
280
|
while (z >= 1 && U >= 0);
|
|
281
281
|
break;
|
|
@@ -284,25 +284,25 @@ function ao() {
|
|
|
284
284
|
} finally {
|
|
285
285
|
Ue = !1, Ve.current = j, Tt(), Error.prepareStackTrace = N;
|
|
286
286
|
}
|
|
287
|
-
var $e = s ? s.displayName || s.name : "",
|
|
288
|
-
return typeof s == "function" &&
|
|
287
|
+
var $e = s ? s.displayName || s.name : "", we = $e ? Me($e) : "";
|
|
288
|
+
return typeof s == "function" && Oe.set(s, we), we;
|
|
289
289
|
}
|
|
290
290
|
function Be(s, u, p) {
|
|
291
291
|
return E(s, !1);
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Pe(s) {
|
|
294
294
|
var u = s.prototype;
|
|
295
295
|
return !!(u && u.isReactComponent);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Re(s, u, p) {
|
|
298
298
|
if (s == null)
|
|
299
299
|
return "";
|
|
300
300
|
if (typeof s == "function")
|
|
301
|
-
return E(s,
|
|
301
|
+
return E(s, Pe(s));
|
|
302
302
|
if (typeof s == "string")
|
|
303
303
|
return Me(s);
|
|
304
304
|
switch (s) {
|
|
305
|
-
case
|
|
305
|
+
case d:
|
|
306
306
|
return Me("Suspense");
|
|
307
307
|
case f:
|
|
308
308
|
return Me("SuspenseList");
|
|
@@ -311,56 +311,56 @@ function ao() {
|
|
|
311
311
|
switch (s.$$typeof) {
|
|
312
312
|
case l:
|
|
313
313
|
return Be(s.render);
|
|
314
|
-
case
|
|
315
|
-
return
|
|
316
|
-
case
|
|
317
|
-
var
|
|
314
|
+
case v:
|
|
315
|
+
return Re(s.type, u, p);
|
|
316
|
+
case R: {
|
|
317
|
+
var _ = s, N = _._payload, j = _._init;
|
|
318
318
|
try {
|
|
319
|
-
return
|
|
319
|
+
return Re(j(N), u, p);
|
|
320
320
|
} catch {
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
return "";
|
|
325
325
|
}
|
|
326
|
-
var Ge = Object.prototype.hasOwnProperty, ir = {}, sr =
|
|
326
|
+
var Ge = Object.prototype.hasOwnProperty, ir = {}, sr = S.ReactDebugCurrentFrame;
|
|
327
327
|
function it(s) {
|
|
328
328
|
if (s) {
|
|
329
|
-
var u = s._owner, p =
|
|
329
|
+
var u = s._owner, p = Re(s.type, s._source, u ? u.type : null);
|
|
330
330
|
sr.setExtraStackFrame(p);
|
|
331
331
|
} else
|
|
332
332
|
sr.setExtraStackFrame(null);
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function Mn(s, u, p, _, N) {
|
|
335
335
|
{
|
|
336
336
|
var j = Function.call.bind(Ge);
|
|
337
337
|
for (var P in s)
|
|
338
338
|
if (j(s, P)) {
|
|
339
|
-
var
|
|
339
|
+
var O = void 0;
|
|
340
340
|
try {
|
|
341
341
|
if (typeof s[P] != "function") {
|
|
342
|
-
var X = Error((
|
|
342
|
+
var X = Error((_ || "React class") + ": " + p + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
343
343
|
throw X.name = "Invariant Violation", X;
|
|
344
344
|
}
|
|
345
|
-
|
|
345
|
+
O = s[P](u, P, _, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
346
346
|
} catch (z) {
|
|
347
|
-
|
|
347
|
+
O = z;
|
|
348
348
|
}
|
|
349
|
-
|
|
349
|
+
O && !(O instanceof Error) && (it(N), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", _ || "React class", p, P, typeof O), it(null)), O instanceof Error && !(O.message in ir) && (ir[O.message] = !0, it(N), y("Failed %s type: %s", p, O.message), it(null));
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
var
|
|
353
|
+
var On = Array.isArray;
|
|
354
354
|
function Mt(s) {
|
|
355
|
-
return
|
|
355
|
+
return On(s);
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function Pn(s) {
|
|
358
358
|
{
|
|
359
359
|
var u = typeof Symbol == "function" && Symbol.toStringTag, p = u && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
360
360
|
return p;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function An(s) {
|
|
364
364
|
try {
|
|
365
365
|
return ar(s), !1;
|
|
366
366
|
} catch {
|
|
@@ -371,16 +371,16 @@ function ao() {
|
|
|
371
371
|
return "" + s;
|
|
372
372
|
}
|
|
373
373
|
function cr(s) {
|
|
374
|
-
if (
|
|
375
|
-
return
|
|
374
|
+
if (An(s))
|
|
375
|
+
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Pn(s)), ar(s);
|
|
376
376
|
}
|
|
377
|
-
var lr =
|
|
377
|
+
var lr = S.ReactCurrentOwner, $n = {
|
|
378
378
|
key: !0,
|
|
379
379
|
ref: !0,
|
|
380
380
|
__self: !0,
|
|
381
381
|
__source: !0
|
|
382
382
|
}, ur, fr;
|
|
383
|
-
function
|
|
383
|
+
function Fn(s) {
|
|
384
384
|
if (Ge.call(s, "ref")) {
|
|
385
385
|
var u = Object.getOwnPropertyDescriptor(s, "ref").get;
|
|
386
386
|
if (u && u.isReactWarning)
|
|
@@ -388,7 +388,7 @@ function ao() {
|
|
|
388
388
|
}
|
|
389
389
|
return s.ref !== void 0;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Ln(s) {
|
|
392
392
|
if (Ge.call(s, "key")) {
|
|
393
393
|
var u = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
394
394
|
if (u && u.isReactWarning)
|
|
@@ -396,13 +396,13 @@ function ao() {
|
|
|
396
396
|
}
|
|
397
397
|
return s.key !== void 0;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function Nn(s, u) {
|
|
400
400
|
typeof s.ref == "string" && lr.current;
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function In(s, u) {
|
|
403
403
|
{
|
|
404
404
|
var p = function() {
|
|
405
|
-
ur || (ur = !0,
|
|
405
|
+
ur || (ur = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", u));
|
|
406
406
|
};
|
|
407
407
|
p.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
408
408
|
get: p,
|
|
@@ -410,10 +410,10 @@ function ao() {
|
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function Dn(s, u) {
|
|
414
414
|
{
|
|
415
415
|
var p = function() {
|
|
416
|
-
fr || (fr = !0,
|
|
416
|
+
fr || (fr = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", u));
|
|
417
417
|
};
|
|
418
418
|
p.isReactWarning = !0, Object.defineProperty(s, "ref", {
|
|
419
419
|
get: p,
|
|
@@ -421,8 +421,8 @@ function ao() {
|
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
var
|
|
425
|
-
var
|
|
424
|
+
var Wn = function(s, u, p, _, N, j, P) {
|
|
425
|
+
var O = {
|
|
426
426
|
// This tag allows us to uniquely identify this as a React Element
|
|
427
427
|
$$typeof: t,
|
|
428
428
|
// Built-in properties that belong on the element
|
|
@@ -433,58 +433,58 @@ function ao() {
|
|
|
433
433
|
// Record the component responsible for creating this element.
|
|
434
434
|
_owner: j
|
|
435
435
|
};
|
|
436
|
-
return
|
|
436
|
+
return O._store = {}, Object.defineProperty(O._store, "validated", {
|
|
437
437
|
configurable: !1,
|
|
438
438
|
enumerable: !1,
|
|
439
439
|
writable: !0,
|
|
440
440
|
value: !1
|
|
441
|
-
}), Object.defineProperty(
|
|
441
|
+
}), Object.defineProperty(O, "_self", {
|
|
442
442
|
configurable: !1,
|
|
443
443
|
enumerable: !1,
|
|
444
444
|
writable: !1,
|
|
445
|
-
value:
|
|
446
|
-
}), Object.defineProperty(
|
|
445
|
+
value: _
|
|
446
|
+
}), Object.defineProperty(O, "_source", {
|
|
447
447
|
configurable: !1,
|
|
448
448
|
enumerable: !1,
|
|
449
449
|
writable: !1,
|
|
450
450
|
value: N
|
|
451
|
-
}), Object.freeze && (Object.freeze(
|
|
451
|
+
}), Object.freeze && (Object.freeze(O.props), Object.freeze(O)), O;
|
|
452
452
|
};
|
|
453
|
-
function
|
|
453
|
+
function jn(s, u, p, _, N) {
|
|
454
454
|
{
|
|
455
|
-
var j, P = {},
|
|
456
|
-
p !== void 0 && (cr(p),
|
|
455
|
+
var j, P = {}, O = null, X = null;
|
|
456
|
+
p !== void 0 && (cr(p), O = "" + p), Ln(u) && (cr(u.key), O = "" + u.key), Fn(u) && (X = u.ref, Nn(u, N));
|
|
457
457
|
for (j in u)
|
|
458
|
-
Ge.call(u, j) &&
|
|
458
|
+
Ge.call(u, j) && !$n.hasOwnProperty(j) && (P[j] = u[j]);
|
|
459
459
|
if (s && s.defaultProps) {
|
|
460
460
|
var z = s.defaultProps;
|
|
461
461
|
for (j in z)
|
|
462
462
|
P[j] === void 0 && (P[j] = z[j]);
|
|
463
463
|
}
|
|
464
|
-
if (
|
|
464
|
+
if (O || X) {
|
|
465
465
|
var U = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
|
|
466
|
-
|
|
466
|
+
O && In(P, U), X && Dn(P, U);
|
|
467
467
|
}
|
|
468
|
-
return
|
|
468
|
+
return Wn(s, O, X, N, _, lr.current, P);
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
var
|
|
471
|
+
var Ot = S.ReactCurrentOwner, hr = S.ReactDebugCurrentFrame;
|
|
472
472
|
function Ae(s) {
|
|
473
473
|
if (s) {
|
|
474
|
-
var u = s._owner, p =
|
|
474
|
+
var u = s._owner, p = Re(s.type, s._source, u ? u.type : null);
|
|
475
475
|
hr.setExtraStackFrame(p);
|
|
476
476
|
} else
|
|
477
477
|
hr.setExtraStackFrame(null);
|
|
478
478
|
}
|
|
479
|
-
var
|
|
480
|
-
|
|
479
|
+
var Pt;
|
|
480
|
+
Pt = !1;
|
|
481
481
|
function At(s) {
|
|
482
482
|
return typeof s == "object" && s !== null && s.$$typeof === t;
|
|
483
483
|
}
|
|
484
484
|
function dr() {
|
|
485
485
|
{
|
|
486
|
-
if (
|
|
487
|
-
var s = Z(
|
|
486
|
+
if (Ot.current) {
|
|
487
|
+
var s = Z(Ot.current.type);
|
|
488
488
|
if (s)
|
|
489
489
|
return `
|
|
490
490
|
|
|
@@ -493,11 +493,11 @@ Check the render method of \`` + s + "`.";
|
|
|
493
493
|
return "";
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function qn(s) {
|
|
497
497
|
return "";
|
|
498
498
|
}
|
|
499
499
|
var pr = {};
|
|
500
|
-
function
|
|
500
|
+
function Yn(s) {
|
|
501
501
|
{
|
|
502
502
|
var u = dr();
|
|
503
503
|
if (!u) {
|
|
@@ -514,12 +514,12 @@ Check the top-level render call using <` + p + ">.");
|
|
|
514
514
|
if (!s._store || s._store.validated || s.key != null)
|
|
515
515
|
return;
|
|
516
516
|
s._store.validated = !0;
|
|
517
|
-
var p =
|
|
517
|
+
var p = Yn(u);
|
|
518
518
|
if (pr[p])
|
|
519
519
|
return;
|
|
520
520
|
pr[p] = !0;
|
|
521
|
-
var
|
|
522
|
-
s && s._owner && s._owner !==
|
|
521
|
+
var _ = "";
|
|
522
|
+
s && s._owner && s._owner !== Ot.current && (_ = " It was passed a child from " + Z(s._owner.type) + "."), Ae(s), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, _), Ae(null);
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
function gr(s, u) {
|
|
@@ -528,8 +528,8 @@ Check the top-level render call using <` + p + ">.");
|
|
|
528
528
|
return;
|
|
529
529
|
if (Mt(s))
|
|
530
530
|
for (var p = 0; p < s.length; p++) {
|
|
531
|
-
var
|
|
532
|
-
At(
|
|
531
|
+
var _ = s[p];
|
|
532
|
+
At(_) && mr(_, u);
|
|
533
533
|
}
|
|
534
534
|
else if (At(s))
|
|
535
535
|
s._store && (s._store.validated = !0);
|
|
@@ -541,7 +541,7 @@ Check the top-level render call using <` + p + ">.");
|
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function Vn(s) {
|
|
545
545
|
{
|
|
546
546
|
var u = s.type;
|
|
547
547
|
if (u == null || typeof u == "string")
|
|
@@ -551,102 +551,102 @@ Check the top-level render call using <` + p + ">.");
|
|
|
551
551
|
p = u.propTypes;
|
|
552
552
|
else if (typeof u == "object" && (u.$$typeof === l || // Note: Memo only checks outer props here.
|
|
553
553
|
// Inner props are checked in the reconciler.
|
|
554
|
-
u.$$typeof ===
|
|
554
|
+
u.$$typeof === v))
|
|
555
555
|
p = u.propTypes;
|
|
556
556
|
else
|
|
557
557
|
return;
|
|
558
558
|
if (p) {
|
|
559
|
-
var
|
|
560
|
-
|
|
561
|
-
} else if (u.PropTypes !== void 0 && !
|
|
562
|
-
|
|
559
|
+
var _ = Z(u);
|
|
560
|
+
Mn(p, s.props, "prop", _, s);
|
|
561
|
+
} else if (u.PropTypes !== void 0 && !Pt) {
|
|
562
|
+
Pt = !0;
|
|
563
563
|
var N = Z(u);
|
|
564
|
-
|
|
564
|
+
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
|
|
565
565
|
}
|
|
566
|
-
typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved &&
|
|
566
|
+
typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function zn(s) {
|
|
570
570
|
{
|
|
571
571
|
for (var u = Object.keys(s.props), p = 0; p < u.length; p++) {
|
|
572
|
-
var
|
|
573
|
-
if (
|
|
574
|
-
Ae(s),
|
|
572
|
+
var _ = u[p];
|
|
573
|
+
if (_ !== "children" && _ !== "key") {
|
|
574
|
+
Ae(s), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", _), Ae(null);
|
|
575
575
|
break;
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
s.ref !== null && (Ae(s),
|
|
578
|
+
s.ref !== null && (Ae(s), y("Invalid attribute `ref` supplied to `React.Fragment`."), Ae(null));
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
var
|
|
582
|
-
function
|
|
581
|
+
var yr = {};
|
|
582
|
+
function vr(s, u, p, _, N, j) {
|
|
583
583
|
{
|
|
584
584
|
var P = Te(s);
|
|
585
585
|
if (!P) {
|
|
586
|
-
var
|
|
587
|
-
(s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (
|
|
588
|
-
var X =
|
|
589
|
-
X ?
|
|
586
|
+
var O = "";
|
|
587
|
+
(s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (O += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
588
|
+
var X = qn();
|
|
589
|
+
X ? O += X : O += dr();
|
|
590
590
|
var z;
|
|
591
|
-
s === null ? z = "null" : Mt(s) ? z = "array" : s !== void 0 && s.$$typeof === t ? (z = "<" + (Z(s.type) || "Unknown") + " />",
|
|
591
|
+
s === null ? z = "null" : Mt(s) ? z = "array" : s !== void 0 && s.$$typeof === t ? (z = "<" + (Z(s.type) || "Unknown") + " />", O = " Did you accidentally export a JSX literal instead of a component?") : z = typeof s, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", z, O);
|
|
592
592
|
}
|
|
593
|
-
var U =
|
|
593
|
+
var U = jn(s, u, p, N, j);
|
|
594
594
|
if (U == null)
|
|
595
595
|
return U;
|
|
596
596
|
if (P) {
|
|
597
597
|
var ie = u.children;
|
|
598
598
|
if (ie !== void 0)
|
|
599
|
-
if (
|
|
599
|
+
if (_)
|
|
600
600
|
if (Mt(ie)) {
|
|
601
601
|
for (var $e = 0; $e < ie.length; $e++)
|
|
602
602
|
gr(ie[$e], s);
|
|
603
603
|
Object.freeze && Object.freeze(ie);
|
|
604
604
|
} else
|
|
605
|
-
|
|
605
|
+
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
606
606
|
else
|
|
607
607
|
gr(ie, s);
|
|
608
608
|
}
|
|
609
609
|
if (Ge.call(u, "key")) {
|
|
610
|
-
var
|
|
611
|
-
return
|
|
610
|
+
var we = Z(s), ee = Object.keys(u).filter(function(Jn) {
|
|
611
|
+
return Jn !== "key";
|
|
612
612
|
}), $t = ee.length > 0 ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
613
|
-
if (!
|
|
614
|
-
var
|
|
615
|
-
|
|
613
|
+
if (!yr[we + $t]) {
|
|
614
|
+
var Hn = ee.length > 0 ? "{" + ee.join(": ..., ") + ": ...}" : "{}";
|
|
615
|
+
y(`A props object containing a "key" prop is being spread into JSX:
|
|
616
616
|
let props = %s;
|
|
617
617
|
<%s {...props} />
|
|
618
618
|
React keys must be passed directly to JSX without using spread:
|
|
619
619
|
let props = %s;
|
|
620
|
-
<%s key={someKey} {...props} />`, $t,
|
|
620
|
+
<%s key={someKey} {...props} />`, $t, we, Hn, we), yr[we + $t] = !0;
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
return s === n ?
|
|
623
|
+
return s === n ? zn(U) : Vn(U), U;
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
|
-
function
|
|
627
|
-
return
|
|
626
|
+
function Un(s, u, p) {
|
|
627
|
+
return vr(s, u, p, !0);
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
return
|
|
629
|
+
function Bn(s, u, p) {
|
|
630
|
+
return vr(s, u, p, !1);
|
|
631
631
|
}
|
|
632
|
-
var
|
|
633
|
-
|
|
634
|
-
}()),
|
|
632
|
+
var Gn = Bn, Kn = Un;
|
|
633
|
+
He.Fragment = n, He.jsx = Gn, He.jsxs = Kn;
|
|
634
|
+
}()), He;
|
|
635
635
|
}
|
|
636
|
-
process.env.NODE_ENV === "production" ? Wt.exports =
|
|
637
|
-
var
|
|
638
|
-
function
|
|
636
|
+
process.env.NODE_ENV === "production" ? Wt.exports = fo() : Wt.exports = ho();
|
|
637
|
+
var Tr = Wt.exports;
|
|
638
|
+
function po(e) {
|
|
639
639
|
if (e.sheet)
|
|
640
640
|
return e.sheet;
|
|
641
641
|
for (var t = 0; t < document.styleSheets.length; t++)
|
|
642
642
|
if (document.styleSheets[t].ownerNode === e)
|
|
643
643
|
return document.styleSheets[t];
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function mo(e) {
|
|
646
646
|
var t = document.createElement("style");
|
|
647
647
|
return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
|
|
648
648
|
}
|
|
649
|
-
var
|
|
649
|
+
var go = /* @__PURE__ */ function() {
|
|
650
650
|
function e(r) {
|
|
651
651
|
var n = this;
|
|
652
652
|
this._insertTag = function(o) {
|
|
@@ -658,10 +658,10 @@ var uo = /* @__PURE__ */ function() {
|
|
|
658
658
|
return t.hydrate = function(n) {
|
|
659
659
|
n.forEach(this._insertTag);
|
|
660
660
|
}, t.insert = function(n) {
|
|
661
|
-
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(
|
|
661
|
+
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(mo(this));
|
|
662
662
|
var o = this.tags[this.tags.length - 1];
|
|
663
663
|
if (this.isSpeedy) {
|
|
664
|
-
var i =
|
|
664
|
+
var i = po(o);
|
|
665
665
|
try {
|
|
666
666
|
i.insertRule(n, i.cssRules.length);
|
|
667
667
|
} catch {
|
|
@@ -675,14 +675,14 @@ var uo = /* @__PURE__ */ function() {
|
|
|
675
675
|
return (o = n.parentNode) == null ? void 0 : o.removeChild(n);
|
|
676
676
|
}), this.tags = [], this.ctr = 0;
|
|
677
677
|
}, e;
|
|
678
|
-
}(),
|
|
679
|
-
function
|
|
680
|
-
return
|
|
678
|
+
}(), J = "-ms-", mt = "-moz-", F = "-webkit-", rn = "comm", Kt = "rule", Ht = "decl", yo = "@import", nn = "@keyframes", vo = "@layer", bo = Math.abs, St = String.fromCharCode, xo = Object.assign;
|
|
679
|
+
function Eo(e, t) {
|
|
680
|
+
return H(e, 0) ^ 45 ? (((t << 2 ^ H(e, 0)) << 2 ^ H(e, 1)) << 2 ^ H(e, 2)) << 2 ^ H(e, 3) : 0;
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function on(e) {
|
|
683
683
|
return e.trim();
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function So(e, t) {
|
|
686
686
|
return (e = t.exec(e)) ? e[0] : e;
|
|
687
687
|
}
|
|
688
688
|
function L(e, t, r) {
|
|
@@ -691,7 +691,7 @@ function L(e, t, r) {
|
|
|
691
691
|
function jt(e, t) {
|
|
692
692
|
return e.indexOf(t);
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function H(e, t) {
|
|
695
695
|
return e.charCodeAt(t) | 0;
|
|
696
696
|
}
|
|
697
697
|
function Xe(e, t, r) {
|
|
@@ -700,33 +700,33 @@ function Xe(e, t, r) {
|
|
|
700
700
|
function fe(e) {
|
|
701
701
|
return e.length;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function Jt(e) {
|
|
704
704
|
return e.length;
|
|
705
705
|
}
|
|
706
706
|
function st(e, t) {
|
|
707
707
|
return t.push(e), e;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function Co(e, t) {
|
|
710
710
|
return e.map(t).join("");
|
|
711
711
|
}
|
|
712
|
-
var Ct = 1, De = 1,
|
|
712
|
+
var Ct = 1, De = 1, sn = 0, te = 0, B = 0, qe = "";
|
|
713
713
|
function Rt(e, t, r, n, o, i, a) {
|
|
714
714
|
return { value: e, root: t, parent: r, type: n, props: o, children: i, line: Ct, column: De, length: a, return: "" };
|
|
715
715
|
}
|
|
716
|
-
function
|
|
717
|
-
return
|
|
716
|
+
function Je(e, t) {
|
|
717
|
+
return xo(Rt("", null, null, "", null, null, 0), e, { length: -e.length }, t);
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function Ro() {
|
|
720
720
|
return B;
|
|
721
721
|
}
|
|
722
|
-
function
|
|
723
|
-
return B = te > 0 ?
|
|
722
|
+
function wo() {
|
|
723
|
+
return B = te > 0 ? H(qe, --te) : 0, De--, B === 10 && (De = 1, Ct--), B;
|
|
724
724
|
}
|
|
725
725
|
function ne() {
|
|
726
|
-
return B = te <
|
|
726
|
+
return B = te < sn ? H(qe, te++) : 0, De++, B === 10 && (De = 1, Ct++), B;
|
|
727
727
|
}
|
|
728
728
|
function de() {
|
|
729
|
-
return
|
|
729
|
+
return H(qe, te);
|
|
730
730
|
}
|
|
731
731
|
function lt() {
|
|
732
732
|
return te;
|
|
@@ -766,21 +766,21 @@ function Ze(e) {
|
|
|
766
766
|
}
|
|
767
767
|
return 0;
|
|
768
768
|
}
|
|
769
|
-
function
|
|
770
|
-
return Ct = De = 1,
|
|
769
|
+
function an(e) {
|
|
770
|
+
return Ct = De = 1, sn = fe(qe = e), te = 0, [];
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function cn(e) {
|
|
773
773
|
return qe = "", e;
|
|
774
774
|
}
|
|
775
775
|
function ut(e) {
|
|
776
|
-
return
|
|
776
|
+
return on(nt(te - 1, qt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function _o(e) {
|
|
779
779
|
for (; (B = de()) && B < 33; )
|
|
780
780
|
ne();
|
|
781
781
|
return Ze(e) > 2 || Ze(B) > 3 ? "" : " ";
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function To(e, t) {
|
|
784
784
|
for (; --t && ne() && !(B < 48 || B > 102 || B > 57 && B < 65 || B > 70 && B < 97); )
|
|
785
785
|
;
|
|
786
786
|
return nt(e, lt() + (t < 6 && de() == 32 && ne() == 32));
|
|
@@ -803,171 +803,171 @@ function qt(e) {
|
|
|
803
803
|
}
|
|
804
804
|
return te;
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function ko(e, t) {
|
|
807
807
|
for (; ne() && e + B !== 57; )
|
|
808
808
|
if (e + B === 84 && de() === 47)
|
|
809
809
|
break;
|
|
810
810
|
return "/*" + nt(t, te - 1) + "*" + St(e === 47 ? e : ne());
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function Mo(e) {
|
|
813
813
|
for (; !Ze(de()); )
|
|
814
814
|
ne();
|
|
815
815
|
return nt(e, te);
|
|
816
816
|
}
|
|
817
|
-
function
|
|
818
|
-
return
|
|
817
|
+
function Oo(e) {
|
|
818
|
+
return cn(ft("", null, null, null, [""], e = an(e), 0, [0], e));
|
|
819
819
|
}
|
|
820
820
|
function ft(e, t, r, n, o, i, a, c, l) {
|
|
821
|
-
for (var
|
|
822
|
-
switch (
|
|
821
|
+
for (var d = 0, f = 0, v = a, R = 0, m = 0, w = 0, g = 1, x = 1, S = 1, y = 0, C = "", T = o, h = i, q = n, $ = C; x; )
|
|
822
|
+
switch (w = y, y = ne()) {
|
|
823
823
|
case 40:
|
|
824
|
-
if (
|
|
825
|
-
jt(
|
|
824
|
+
if (w != 108 && H($, v - 1) == 58) {
|
|
825
|
+
jt($ += L(ut(y), "&", "&\f"), "&\f") != -1 && (S = -1);
|
|
826
826
|
break;
|
|
827
827
|
}
|
|
828
828
|
case 34:
|
|
829
829
|
case 39:
|
|
830
830
|
case 91:
|
|
831
|
-
|
|
831
|
+
$ += ut(y);
|
|
832
832
|
break;
|
|
833
833
|
case 9:
|
|
834
834
|
case 10:
|
|
835
835
|
case 13:
|
|
836
836
|
case 32:
|
|
837
|
-
|
|
837
|
+
$ += _o(w);
|
|
838
838
|
break;
|
|
839
839
|
case 92:
|
|
840
|
-
|
|
840
|
+
$ += To(lt() - 1, 7);
|
|
841
841
|
continue;
|
|
842
842
|
case 47:
|
|
843
843
|
switch (de()) {
|
|
844
844
|
case 42:
|
|
845
845
|
case 47:
|
|
846
|
-
st(
|
|
846
|
+
st(Po(ko(ne(), lt()), t, r), l);
|
|
847
847
|
break;
|
|
848
848
|
default:
|
|
849
|
-
|
|
849
|
+
$ += "/";
|
|
850
850
|
}
|
|
851
851
|
break;
|
|
852
|
-
case 123 *
|
|
853
|
-
c[
|
|
854
|
-
case 125 *
|
|
852
|
+
case 123 * g:
|
|
853
|
+
c[d++] = fe($) * S;
|
|
854
|
+
case 125 * g:
|
|
855
855
|
case 59:
|
|
856
856
|
case 0:
|
|
857
|
-
switch (
|
|
857
|
+
switch (y) {
|
|
858
858
|
case 0:
|
|
859
859
|
case 125:
|
|
860
860
|
x = 0;
|
|
861
861
|
case 59 + f:
|
|
862
|
-
|
|
862
|
+
S == -1 && ($ = L($, /\f/g, "")), m > 0 && fe($) - v && st(m > 32 ? Mr($ + ";", n, r, v - 1) : Mr(L($, " ", "") + ";", n, r, v - 2), l);
|
|
863
863
|
break;
|
|
864
864
|
case 59:
|
|
865
|
-
|
|
865
|
+
$ += ";";
|
|
866
866
|
default:
|
|
867
|
-
if (st(q =
|
|
867
|
+
if (st(q = kr($, t, r, d, f, o, c, C, T = [], h = [], v), i), y === 123)
|
|
868
868
|
if (f === 0)
|
|
869
|
-
ft(
|
|
869
|
+
ft($, t, q, q, T, i, v, c, h);
|
|
870
870
|
else
|
|
871
|
-
switch (
|
|
871
|
+
switch (R === 99 && H($, 3) === 110 ? 100 : R) {
|
|
872
872
|
case 100:
|
|
873
873
|
case 108:
|
|
874
874
|
case 109:
|
|
875
875
|
case 115:
|
|
876
|
-
ft(e, q, q, n && st(
|
|
876
|
+
ft(e, q, q, n && st(kr(e, q, q, 0, 0, o, c, C, o, T = [], v), h), o, h, v, c, n ? T : h);
|
|
877
877
|
break;
|
|
878
878
|
default:
|
|
879
|
-
ft(
|
|
879
|
+
ft($, q, q, q, [""], h, 0, c, h);
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
|
-
|
|
882
|
+
d = f = m = 0, g = S = 1, C = $ = "", v = a;
|
|
883
883
|
break;
|
|
884
884
|
case 58:
|
|
885
|
-
|
|
885
|
+
v = 1 + fe($), m = w;
|
|
886
886
|
default:
|
|
887
|
-
if (
|
|
888
|
-
if (
|
|
889
|
-
--
|
|
890
|
-
else if (
|
|
887
|
+
if (g < 1) {
|
|
888
|
+
if (y == 123)
|
|
889
|
+
--g;
|
|
890
|
+
else if (y == 125 && g++ == 0 && wo() == 125)
|
|
891
891
|
continue;
|
|
892
892
|
}
|
|
893
|
-
switch (
|
|
893
|
+
switch ($ += St(y), y * g) {
|
|
894
894
|
case 38:
|
|
895
|
-
|
|
895
|
+
S = f > 0 ? 1 : ($ += "\f", -1);
|
|
896
896
|
break;
|
|
897
897
|
case 44:
|
|
898
|
-
c[
|
|
898
|
+
c[d++] = (fe($) - 1) * S, S = 1;
|
|
899
899
|
break;
|
|
900
900
|
case 64:
|
|
901
|
-
de() === 45 && (
|
|
901
|
+
de() === 45 && ($ += ut(ne())), R = de(), f = v = fe(C = $ += Mo(lt())), y++;
|
|
902
902
|
break;
|
|
903
903
|
case 45:
|
|
904
|
-
|
|
904
|
+
w === 45 && fe($) == 2 && (g = 0);
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
return i;
|
|
908
908
|
}
|
|
909
|
-
function
|
|
910
|
-
for (var
|
|
911
|
-
for (var
|
|
912
|
-
(
|
|
913
|
-
return Rt(e, t, r, o === 0 ?
|
|
909
|
+
function kr(e, t, r, n, o, i, a, c, l, d, f) {
|
|
910
|
+
for (var v = o - 1, R = o === 0 ? i : [""], m = Jt(R), w = 0, g = 0, x = 0; w < n; ++w)
|
|
911
|
+
for (var S = 0, y = Xe(e, v + 1, v = bo(g = a[w])), C = e; S < m; ++S)
|
|
912
|
+
(C = on(g > 0 ? R[S] + " " + y : L(y, /&\f/g, R[S]))) && (l[x++] = C);
|
|
913
|
+
return Rt(e, t, r, o === 0 ? Kt : c, l, d, f);
|
|
914
914
|
}
|
|
915
|
-
function
|
|
916
|
-
return Rt(e, t, r,
|
|
915
|
+
function Po(e, t, r) {
|
|
916
|
+
return Rt(e, t, r, rn, St(Ro()), Xe(e, 2, -2), 0);
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
return Rt(e, t, r,
|
|
918
|
+
function Mr(e, t, r, n) {
|
|
919
|
+
return Rt(e, t, r, Ht, Xe(e, 0, n), Xe(e, n + 1, -1), n);
|
|
920
920
|
}
|
|
921
921
|
function Ne(e, t) {
|
|
922
|
-
for (var r = "", n =
|
|
922
|
+
for (var r = "", n = Jt(e), o = 0; o < n; o++)
|
|
923
923
|
r += t(e[o], o, e, t) || "";
|
|
924
924
|
return r;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function Ao(e, t, r, n) {
|
|
927
927
|
switch (e.type) {
|
|
928
|
-
case
|
|
928
|
+
case vo:
|
|
929
929
|
if (e.children.length) break;
|
|
930
|
-
case
|
|
931
|
-
case
|
|
930
|
+
case yo:
|
|
931
|
+
case Ht:
|
|
932
932
|
return e.return = e.return || e.value;
|
|
933
|
-
case
|
|
933
|
+
case rn:
|
|
934
934
|
return "";
|
|
935
|
-
case
|
|
935
|
+
case nn:
|
|
936
936
|
return e.return = e.value + "{" + Ne(e.children, n) + "}";
|
|
937
|
-
case
|
|
937
|
+
case Kt:
|
|
938
938
|
e.value = e.props.join(",");
|
|
939
939
|
}
|
|
940
940
|
return fe(r = Ne(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
|
|
941
941
|
}
|
|
942
|
-
function
|
|
943
|
-
var t =
|
|
942
|
+
function $o(e) {
|
|
943
|
+
var t = Jt(e);
|
|
944
944
|
return function(r, n, o, i) {
|
|
945
945
|
for (var a = "", c = 0; c < t; c++)
|
|
946
946
|
a += e[c](r, n, o, i) || "";
|
|
947
947
|
return a;
|
|
948
948
|
};
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function Fo(e) {
|
|
951
951
|
return function(t) {
|
|
952
952
|
t.root || (t = t.return) && e(t);
|
|
953
953
|
};
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function Lo(e) {
|
|
956
956
|
var t = /* @__PURE__ */ Object.create(null);
|
|
957
957
|
return function(r) {
|
|
958
958
|
return t[r] === void 0 && (t[r] = e(r)), t[r];
|
|
959
959
|
};
|
|
960
960
|
}
|
|
961
|
-
var
|
|
961
|
+
var No = function(t, r, n) {
|
|
962
962
|
for (var o = 0, i = 0; o = i, i = de(), o === 38 && i === 12 && (r[n] = 1), !Ze(i); )
|
|
963
963
|
ne();
|
|
964
964
|
return nt(t, te);
|
|
965
|
-
},
|
|
965
|
+
}, Io = function(t, r) {
|
|
966
966
|
var n = -1, o = 44;
|
|
967
967
|
do
|
|
968
968
|
switch (Ze(o)) {
|
|
969
969
|
case 0:
|
|
970
|
-
o === 38 && de() === 12 && (r[n] = 1), t[n] +=
|
|
970
|
+
o === 38 && de() === 12 && (r[n] = 1), t[n] += No(te - 1, r, n);
|
|
971
971
|
break;
|
|
972
972
|
case 2:
|
|
973
973
|
t[n] += ut(o);
|
|
@@ -982,22 +982,22 @@ var Oo = function(t, r, n) {
|
|
|
982
982
|
}
|
|
983
983
|
while (o = ne());
|
|
984
984
|
return t;
|
|
985
|
-
},
|
|
986
|
-
return
|
|
987
|
-
},
|
|
985
|
+
}, Do = function(t, r) {
|
|
986
|
+
return cn(Io(an(t), r));
|
|
987
|
+
}, Or = /* @__PURE__ */ new WeakMap(), Wo = function(t) {
|
|
988
988
|
if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
|
|
989
989
|
// negative .length indicates that this rule has been already prefixed
|
|
990
990
|
t.length < 1)) {
|
|
991
991
|
for (var r = t.value, n = t.parent, o = t.column === n.column && t.line === n.line; n.type !== "rule"; )
|
|
992
992
|
if (n = n.parent, !n) return;
|
|
993
|
-
if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !
|
|
994
|
-
|
|
995
|
-
for (var i = [], a =
|
|
996
|
-
for (var f = 0; f < c.length; f++,
|
|
997
|
-
t.props[
|
|
993
|
+
if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !Or.get(n)) && !o) {
|
|
994
|
+
Or.set(t, !0);
|
|
995
|
+
for (var i = [], a = Do(r, i), c = n.props, l = 0, d = 0; l < a.length; l++)
|
|
996
|
+
for (var f = 0; f < c.length; f++, d++)
|
|
997
|
+
t.props[d] = i[l] ? a[l].replace(/&\f/g, c[f]) : c[f] + " " + a[l];
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
|
-
},
|
|
1000
|
+
}, jo = function(t) {
|
|
1001
1001
|
if (t.type === "decl") {
|
|
1002
1002
|
var r = t.value;
|
|
1003
1003
|
// charcode for l
|
|
@@ -1005,8 +1005,8 @@ var Oo = function(t, r, n) {
|
|
|
1005
1005
|
r.charCodeAt(2) === 98 && (t.return = "", t.value = "");
|
|
1006
1006
|
}
|
|
1007
1007
|
};
|
|
1008
|
-
function
|
|
1009
|
-
switch (
|
|
1008
|
+
function ln(e, t) {
|
|
1009
|
+
switch (Eo(e, t)) {
|
|
1010
1010
|
case 5103:
|
|
1011
1011
|
return F + "print-" + e + e;
|
|
1012
1012
|
case 5737:
|
|
@@ -1040,24 +1040,24 @@ function an(e, t) {
|
|
|
1040
1040
|
case 4810:
|
|
1041
1041
|
case 6968:
|
|
1042
1042
|
case 2756:
|
|
1043
|
-
return F + e + mt + e +
|
|
1043
|
+
return F + e + mt + e + J + e + e;
|
|
1044
1044
|
case 6828:
|
|
1045
1045
|
case 4268:
|
|
1046
|
-
return F + e +
|
|
1046
|
+
return F + e + J + e + e;
|
|
1047
1047
|
case 6165:
|
|
1048
|
-
return F + e +
|
|
1048
|
+
return F + e + J + "flex-" + e + e;
|
|
1049
1049
|
case 5187:
|
|
1050
|
-
return F + e + L(e, /(\w+).+(:[^]+)/, F + "box-$1$2" +
|
|
1050
|
+
return F + e + L(e, /(\w+).+(:[^]+)/, F + "box-$1$2" + J + "flex-$1$2") + e;
|
|
1051
1051
|
case 5443:
|
|
1052
|
-
return F + e +
|
|
1052
|
+
return F + e + J + "flex-item-" + L(e, /flex-|-self/, "") + e;
|
|
1053
1053
|
case 4675:
|
|
1054
|
-
return F + e +
|
|
1054
|
+
return F + e + J + "flex-line-pack" + L(e, /align-content|flex-|-self/, "") + e;
|
|
1055
1055
|
case 5548:
|
|
1056
|
-
return F + e +
|
|
1056
|
+
return F + e + J + L(e, "shrink", "negative") + e;
|
|
1057
1057
|
case 5292:
|
|
1058
|
-
return F + e +
|
|
1058
|
+
return F + e + J + L(e, "basis", "preferred-size") + e;
|
|
1059
1059
|
case 6060:
|
|
1060
|
-
return F + "box-" + L(e, "-grow", "") + F + e +
|
|
1060
|
+
return F + "box-" + L(e, "-grow", "") + F + e + J + L(e, "grow", "positive") + e;
|
|
1061
1061
|
case 4554:
|
|
1062
1062
|
return F + L(e, /([^-])(transform)/g, "$1" + F + "$2") + e;
|
|
1063
1063
|
case 6187:
|
|
@@ -1066,7 +1066,7 @@ function an(e, t) {
|
|
|
1066
1066
|
case 3959:
|
|
1067
1067
|
return L(e, /(image-set\([^]*)/, F + "$1$`$1");
|
|
1068
1068
|
case 4968:
|
|
1069
|
-
return L(L(e, /(.+:)(flex-)?(.*)/, F + "box-pack:$3" +
|
|
1069
|
+
return L(L(e, /(.+:)(flex-)?(.*)/, F + "box-pack:$3" + J + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + F + e + e;
|
|
1070
1070
|
case 4095:
|
|
1071
1071
|
case 3583:
|
|
1072
1072
|
case 4068:
|
|
@@ -1084,101 +1084,101 @@ function an(e, t) {
|
|
|
1084
1084
|
case 5789:
|
|
1085
1085
|
case 5021:
|
|
1086
1086
|
case 4765:
|
|
1087
|
-
if (fe(e) - 1 - t > 6) switch (
|
|
1087
|
+
if (fe(e) - 1 - t > 6) switch (H(e, t + 1)) {
|
|
1088
1088
|
case 109:
|
|
1089
|
-
if (
|
|
1089
|
+
if (H(e, t + 4) !== 45) break;
|
|
1090
1090
|
case 102:
|
|
1091
|
-
return L(e, /(.+:)(.+)-([^]+)/, "$1" + F + "$2-$3$1" + mt + (
|
|
1091
|
+
return L(e, /(.+:)(.+)-([^]+)/, "$1" + F + "$2-$3$1" + mt + (H(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
1092
1092
|
case 115:
|
|
1093
|
-
return ~jt(e, "stretch") ?
|
|
1093
|
+
return ~jt(e, "stretch") ? ln(L(e, "stretch", "fill-available"), t) + e : e;
|
|
1094
1094
|
}
|
|
1095
1095
|
break;
|
|
1096
1096
|
case 4949:
|
|
1097
|
-
if (
|
|
1097
|
+
if (H(e, t + 1) !== 115) break;
|
|
1098
1098
|
case 6444:
|
|
1099
|
-
switch (
|
|
1099
|
+
switch (H(e, fe(e) - 3 - (~jt(e, "!important") && 10))) {
|
|
1100
1100
|
case 107:
|
|
1101
1101
|
return L(e, ":", ":" + F) + e;
|
|
1102
1102
|
case 101:
|
|
1103
|
-
return L(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + F + (
|
|
1103
|
+
return L(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + F + (H(e, 14) === 45 ? "inline-" : "") + "box$3$1" + F + "$2$3$1" + J + "$2box$3") + e;
|
|
1104
1104
|
}
|
|
1105
1105
|
break;
|
|
1106
1106
|
case 5936:
|
|
1107
|
-
switch (
|
|
1107
|
+
switch (H(e, t + 11)) {
|
|
1108
1108
|
case 114:
|
|
1109
|
-
return F + e +
|
|
1109
|
+
return F + e + J + L(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
1110
1110
|
case 108:
|
|
1111
|
-
return F + e +
|
|
1111
|
+
return F + e + J + L(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
1112
1112
|
case 45:
|
|
1113
|
-
return F + e +
|
|
1113
|
+
return F + e + J + L(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
1114
1114
|
}
|
|
1115
|
-
return F + e +
|
|
1115
|
+
return F + e + J + e + e;
|
|
1116
1116
|
}
|
|
1117
1117
|
return e;
|
|
1118
1118
|
}
|
|
1119
|
-
var
|
|
1119
|
+
var qo = function(t, r, n, o) {
|
|
1120
1120
|
if (t.length > -1 && !t.return) switch (t.type) {
|
|
1121
|
-
case
|
|
1122
|
-
t.return =
|
|
1121
|
+
case Ht:
|
|
1122
|
+
t.return = ln(t.value, t.length);
|
|
1123
1123
|
break;
|
|
1124
|
-
case
|
|
1125
|
-
return Ne([
|
|
1124
|
+
case nn:
|
|
1125
|
+
return Ne([Je(t, {
|
|
1126
1126
|
value: L(t.value, "@", "@" + F)
|
|
1127
1127
|
})], o);
|
|
1128
|
-
case
|
|
1129
|
-
if (t.length) return
|
|
1130
|
-
switch (
|
|
1128
|
+
case Kt:
|
|
1129
|
+
if (t.length) return Co(t.props, function(i) {
|
|
1130
|
+
switch (So(i, /(::plac\w+|:read-\w+)/)) {
|
|
1131
1131
|
case ":read-only":
|
|
1132
1132
|
case ":read-write":
|
|
1133
|
-
return Ne([
|
|
1133
|
+
return Ne([Je(t, {
|
|
1134
1134
|
props: [L(i, /:(read-\w+)/, ":" + mt + "$1")]
|
|
1135
1135
|
})], o);
|
|
1136
1136
|
case "::placeholder":
|
|
1137
|
-
return Ne([
|
|
1137
|
+
return Ne([Je(t, {
|
|
1138
1138
|
props: [L(i, /:(plac\w+)/, ":" + F + "input-$1")]
|
|
1139
|
-
}),
|
|
1139
|
+
}), Je(t, {
|
|
1140
1140
|
props: [L(i, /:(plac\w+)/, ":" + mt + "$1")]
|
|
1141
|
-
}),
|
|
1142
|
-
props: [L(i, /:(plac\w+)/,
|
|
1141
|
+
}), Je(t, {
|
|
1142
|
+
props: [L(i, /:(plac\w+)/, J + "input-$1")]
|
|
1143
1143
|
})], o);
|
|
1144
1144
|
}
|
|
1145
1145
|
return "";
|
|
1146
1146
|
});
|
|
1147
1147
|
}
|
|
1148
|
-
},
|
|
1148
|
+
}, Yo = [qo], Vo = function(t) {
|
|
1149
1149
|
var r = t.key;
|
|
1150
1150
|
if (r === "css") {
|
|
1151
1151
|
var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
1152
|
-
Array.prototype.forEach.call(n, function(
|
|
1153
|
-
var x =
|
|
1154
|
-
x.indexOf(" ") !== -1 && (document.head.appendChild(
|
|
1152
|
+
Array.prototype.forEach.call(n, function(g) {
|
|
1153
|
+
var x = g.getAttribute("data-emotion");
|
|
1154
|
+
x.indexOf(" ") !== -1 && (document.head.appendChild(g), g.setAttribute("data-s", ""));
|
|
1155
1155
|
});
|
|
1156
1156
|
}
|
|
1157
|
-
var o = t.stylisPlugins ||
|
|
1157
|
+
var o = t.stylisPlugins || Yo, i = {}, a, c = [];
|
|
1158
1158
|
a = t.container || document.head, Array.prototype.forEach.call(
|
|
1159
1159
|
// this means we will ignore elements which don't have a space in them which
|
|
1160
1160
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1161
1161
|
document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
|
|
1162
|
-
function(
|
|
1163
|
-
for (var x =
|
|
1164
|
-
i[x[
|
|
1165
|
-
c.push(
|
|
1162
|
+
function(g) {
|
|
1163
|
+
for (var x = g.getAttribute("data-emotion").split(" "), S = 1; S < x.length; S++)
|
|
1164
|
+
i[x[S]] = !0;
|
|
1165
|
+
c.push(g);
|
|
1166
1166
|
}
|
|
1167
1167
|
);
|
|
1168
|
-
var l,
|
|
1168
|
+
var l, d = [Wo, jo];
|
|
1169
1169
|
{
|
|
1170
|
-
var f,
|
|
1171
|
-
f.insert(
|
|
1172
|
-
})],
|
|
1173
|
-
return Ne(
|
|
1170
|
+
var f, v = [Ao, Fo(function(g) {
|
|
1171
|
+
f.insert(g);
|
|
1172
|
+
})], R = $o(d.concat(o, v)), m = function(x) {
|
|
1173
|
+
return Ne(Oo(x), R);
|
|
1174
1174
|
};
|
|
1175
|
-
l = function(x,
|
|
1176
|
-
f =
|
|
1175
|
+
l = function(x, S, y, C) {
|
|
1176
|
+
f = y, m(x ? x + "{" + S.styles + "}" : S.styles), C && (w.inserted[S.name] = !0);
|
|
1177
1177
|
};
|
|
1178
1178
|
}
|
|
1179
|
-
var
|
|
1179
|
+
var w = {
|
|
1180
1180
|
key: r,
|
|
1181
|
-
sheet: new
|
|
1181
|
+
sheet: new go({
|
|
1182
1182
|
key: r,
|
|
1183
1183
|
container: a,
|
|
1184
1184
|
nonce: t.nonce,
|
|
@@ -1191,7 +1191,7 @@ var No = function(t, r, n, o) {
|
|
|
1191
1191
|
registered: {},
|
|
1192
1192
|
insert: l
|
|
1193
1193
|
};
|
|
1194
|
-
return
|
|
1194
|
+
return w.sheet.hydrate(c), w;
|
|
1195
1195
|
}, Yt = { exports: {} }, I = {};
|
|
1196
1196
|
/** @license React v16.13.1
|
|
1197
1197
|
* react-is.production.min.js
|
|
@@ -1201,32 +1201,32 @@ var No = function(t, r, n, o) {
|
|
|
1201
1201
|
* This source code is licensed under the MIT license found in the
|
|
1202
1202
|
* LICENSE file in the root directory of this source tree.
|
|
1203
1203
|
*/
|
|
1204
|
-
var
|
|
1205
|
-
function
|
|
1206
|
-
if (
|
|
1207
|
-
|
|
1208
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111,
|
|
1209
|
-
function
|
|
1210
|
-
if (typeof
|
|
1211
|
-
var q =
|
|
1204
|
+
var Pr;
|
|
1205
|
+
function zo() {
|
|
1206
|
+
if (Pr) return I;
|
|
1207
|
+
Pr = 1;
|
|
1208
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, v = e ? Symbol.for("react.suspense") : 60113, R = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, w = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, S = e ? Symbol.for("react.responder") : 60118, y = e ? Symbol.for("react.scope") : 60119;
|
|
1209
|
+
function C(h) {
|
|
1210
|
+
if (typeof h == "object" && h !== null) {
|
|
1211
|
+
var q = h.$$typeof;
|
|
1212
1212
|
switch (q) {
|
|
1213
1213
|
case t:
|
|
1214
|
-
switch (
|
|
1214
|
+
switch (h = h.type, h) {
|
|
1215
1215
|
case l:
|
|
1216
|
-
case
|
|
1216
|
+
case d:
|
|
1217
1217
|
case n:
|
|
1218
1218
|
case i:
|
|
1219
1219
|
case o:
|
|
1220
|
-
case
|
|
1221
|
-
return
|
|
1220
|
+
case v:
|
|
1221
|
+
return h;
|
|
1222
1222
|
default:
|
|
1223
|
-
switch (
|
|
1223
|
+
switch (h = h && h.$$typeof, h) {
|
|
1224
1224
|
case c:
|
|
1225
1225
|
case f:
|
|
1226
|
-
case
|
|
1227
|
-
case
|
|
1226
|
+
case w:
|
|
1227
|
+
case m:
|
|
1228
1228
|
case a:
|
|
1229
|
-
return
|
|
1229
|
+
return h;
|
|
1230
1230
|
default:
|
|
1231
1231
|
return q;
|
|
1232
1232
|
}
|
|
@@ -1236,36 +1236,36 @@ function Wo() {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1240
|
-
return
|
|
1241
|
-
}
|
|
1242
|
-
return I.AsyncMode = l, I.ConcurrentMode =
|
|
1243
|
-
return
|
|
1244
|
-
}, I.isConcurrentMode =
|
|
1245
|
-
return
|
|
1246
|
-
}, I.isContextProvider = function(
|
|
1247
|
-
return
|
|
1248
|
-
}, I.isElement = function(
|
|
1249
|
-
return typeof
|
|
1250
|
-
}, I.isForwardRef = function(
|
|
1251
|
-
return
|
|
1252
|
-
}, I.isFragment = function(
|
|
1253
|
-
return
|
|
1254
|
-
}, I.isLazy = function(
|
|
1255
|
-
return
|
|
1256
|
-
}, I.isMemo = function(
|
|
1257
|
-
return
|
|
1258
|
-
}, I.isPortal = function(
|
|
1259
|
-
return
|
|
1260
|
-
}, I.isProfiler = function(
|
|
1261
|
-
return
|
|
1262
|
-
}, I.isStrictMode = function(
|
|
1263
|
-
return
|
|
1264
|
-
}, I.isSuspense = function(
|
|
1265
|
-
return
|
|
1266
|
-
}, I.isValidElementType = function(
|
|
1267
|
-
return typeof
|
|
1268
|
-
}, I.typeOf =
|
|
1239
|
+
function T(h) {
|
|
1240
|
+
return C(h) === d;
|
|
1241
|
+
}
|
|
1242
|
+
return I.AsyncMode = l, I.ConcurrentMode = d, I.ContextConsumer = c, I.ContextProvider = a, I.Element = t, I.ForwardRef = f, I.Fragment = n, I.Lazy = w, I.Memo = m, I.Portal = r, I.Profiler = i, I.StrictMode = o, I.Suspense = v, I.isAsyncMode = function(h) {
|
|
1243
|
+
return T(h) || C(h) === l;
|
|
1244
|
+
}, I.isConcurrentMode = T, I.isContextConsumer = function(h) {
|
|
1245
|
+
return C(h) === c;
|
|
1246
|
+
}, I.isContextProvider = function(h) {
|
|
1247
|
+
return C(h) === a;
|
|
1248
|
+
}, I.isElement = function(h) {
|
|
1249
|
+
return typeof h == "object" && h !== null && h.$$typeof === t;
|
|
1250
|
+
}, I.isForwardRef = function(h) {
|
|
1251
|
+
return C(h) === f;
|
|
1252
|
+
}, I.isFragment = function(h) {
|
|
1253
|
+
return C(h) === n;
|
|
1254
|
+
}, I.isLazy = function(h) {
|
|
1255
|
+
return C(h) === w;
|
|
1256
|
+
}, I.isMemo = function(h) {
|
|
1257
|
+
return C(h) === m;
|
|
1258
|
+
}, I.isPortal = function(h) {
|
|
1259
|
+
return C(h) === r;
|
|
1260
|
+
}, I.isProfiler = function(h) {
|
|
1261
|
+
return C(h) === i;
|
|
1262
|
+
}, I.isStrictMode = function(h) {
|
|
1263
|
+
return C(h) === o;
|
|
1264
|
+
}, I.isSuspense = function(h) {
|
|
1265
|
+
return C(h) === v;
|
|
1266
|
+
}, I.isValidElementType = function(h) {
|
|
1267
|
+
return typeof h == "string" || typeof h == "function" || h === n || h === d || h === i || h === o || h === v || h === R || typeof h == "object" && h !== null && (h.$$typeof === w || h.$$typeof === m || h.$$typeof === a || h.$$typeof === c || h.$$typeof === f || h.$$typeof === x || h.$$typeof === S || h.$$typeof === y || h.$$typeof === g);
|
|
1268
|
+
}, I.typeOf = C, I;
|
|
1269
1269
|
}
|
|
1270
1270
|
var D = {};
|
|
1271
1271
|
/** @license React v16.13.1
|
|
@@ -1276,37 +1276,37 @@ var D = {};
|
|
|
1276
1276
|
* This source code is licensed under the MIT license found in the
|
|
1277
1277
|
* LICENSE file in the root directory of this source tree.
|
|
1278
1278
|
*/
|
|
1279
|
-
var
|
|
1280
|
-
function
|
|
1281
|
-
return
|
|
1282
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111,
|
|
1283
|
-
function
|
|
1279
|
+
var Ar;
|
|
1280
|
+
function Uo() {
|
|
1281
|
+
return Ar || (Ar = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1282
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, v = e ? Symbol.for("react.suspense") : 60113, R = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, w = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, S = e ? Symbol.for("react.responder") : 60118, y = e ? Symbol.for("react.scope") : 60119;
|
|
1283
|
+
function C(E) {
|
|
1284
1284
|
return typeof E == "string" || typeof E == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1285
|
-
E === n || E ===
|
|
1285
|
+
E === n || E === d || E === i || E === o || E === v || E === R || typeof E == "object" && E !== null && (E.$$typeof === w || E.$$typeof === m || E.$$typeof === a || E.$$typeof === c || E.$$typeof === f || E.$$typeof === x || E.$$typeof === S || E.$$typeof === y || E.$$typeof === g);
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1287
|
+
function T(E) {
|
|
1288
1288
|
if (typeof E == "object" && E !== null) {
|
|
1289
1289
|
var Be = E.$$typeof;
|
|
1290
1290
|
switch (Be) {
|
|
1291
1291
|
case t:
|
|
1292
|
-
var
|
|
1293
|
-
switch (
|
|
1292
|
+
var Pe = E.type;
|
|
1293
|
+
switch (Pe) {
|
|
1294
1294
|
case l:
|
|
1295
|
-
case
|
|
1295
|
+
case d:
|
|
1296
1296
|
case n:
|
|
1297
1297
|
case i:
|
|
1298
1298
|
case o:
|
|
1299
|
-
case
|
|
1300
|
-
return
|
|
1299
|
+
case v:
|
|
1300
|
+
return Pe;
|
|
1301
1301
|
default:
|
|
1302
|
-
var
|
|
1303
|
-
switch (
|
|
1302
|
+
var Re = Pe && Pe.$$typeof;
|
|
1303
|
+
switch (Re) {
|
|
1304
1304
|
case c:
|
|
1305
1305
|
case f:
|
|
1306
|
-
case
|
|
1307
|
-
case
|
|
1306
|
+
case w:
|
|
1307
|
+
case m:
|
|
1308
1308
|
case a:
|
|
1309
|
-
return
|
|
1309
|
+
return Re;
|
|
1310
1310
|
default:
|
|
1311
1311
|
return Be;
|
|
1312
1312
|
}
|
|
@@ -1316,74 +1316,74 @@ function jo() {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
1318
1318
|
}
|
|
1319
|
-
var
|
|
1320
|
-
function
|
|
1321
|
-
return
|
|
1319
|
+
var h = l, q = d, $ = c, Ye = a, Se = t, Te = f, ke = n, Ce = w, Z = m, ce = r, pe = i, b = o, k = v, M = !1;
|
|
1320
|
+
function A(E) {
|
|
1321
|
+
return M || (M = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), Y(E) || T(E) === l;
|
|
1322
1322
|
}
|
|
1323
1323
|
function Y(E) {
|
|
1324
|
-
return
|
|
1324
|
+
return T(E) === d;
|
|
1325
1325
|
}
|
|
1326
1326
|
function G(E) {
|
|
1327
|
-
return
|
|
1327
|
+
return T(E) === c;
|
|
1328
1328
|
}
|
|
1329
1329
|
function oe(E) {
|
|
1330
|
-
return
|
|
1330
|
+
return T(E) === a;
|
|
1331
1331
|
}
|
|
1332
1332
|
function me(E) {
|
|
1333
1333
|
return typeof E == "object" && E !== null && E.$$typeof === t;
|
|
1334
1334
|
}
|
|
1335
1335
|
function _t(E) {
|
|
1336
|
-
return
|
|
1336
|
+
return T(E) === f;
|
|
1337
1337
|
}
|
|
1338
1338
|
function Tt(E) {
|
|
1339
|
-
return
|
|
1339
|
+
return T(E) === n;
|
|
1340
1340
|
}
|
|
1341
1341
|
function Ve(E) {
|
|
1342
|
-
return
|
|
1342
|
+
return T(E) === w;
|
|
1343
1343
|
}
|
|
1344
1344
|
function ze(E) {
|
|
1345
|
-
return
|
|
1345
|
+
return T(E) === m;
|
|
1346
1346
|
}
|
|
1347
1347
|
function Me(E) {
|
|
1348
|
-
return
|
|
1348
|
+
return T(E) === r;
|
|
1349
1349
|
}
|
|
1350
1350
|
function Ue(E) {
|
|
1351
|
-
return
|
|
1351
|
+
return T(E) === i;
|
|
1352
1352
|
}
|
|
1353
|
-
function
|
|
1354
|
-
return
|
|
1353
|
+
function Oe(E) {
|
|
1354
|
+
return T(E) === o;
|
|
1355
1355
|
}
|
|
1356
1356
|
function kt(E) {
|
|
1357
|
-
return
|
|
1357
|
+
return T(E) === v;
|
|
1358
1358
|
}
|
|
1359
|
-
D.AsyncMode =
|
|
1359
|
+
D.AsyncMode = h, D.ConcurrentMode = q, D.ContextConsumer = $, D.ContextProvider = Ye, D.Element = Se, D.ForwardRef = Te, D.Fragment = ke, D.Lazy = Ce, D.Memo = Z, D.Portal = ce, D.Profiler = pe, D.StrictMode = b, D.Suspense = k, D.isAsyncMode = A, D.isConcurrentMode = Y, D.isContextConsumer = G, D.isContextProvider = oe, D.isElement = me, D.isForwardRef = _t, D.isFragment = Tt, D.isLazy = Ve, D.isMemo = ze, D.isPortal = Me, D.isProfiler = Ue, D.isStrictMode = Oe, D.isSuspense = kt, D.isValidElementType = C, D.typeOf = T;
|
|
1360
1360
|
}()), D;
|
|
1361
1361
|
}
|
|
1362
|
-
process.env.NODE_ENV === "production" ? Yt.exports =
|
|
1363
|
-
var
|
|
1362
|
+
process.env.NODE_ENV === "production" ? Yt.exports = zo() : Yt.exports = Uo();
|
|
1363
|
+
var Bo = Yt.exports, un = Bo, Go = {
|
|
1364
1364
|
$$typeof: !0,
|
|
1365
1365
|
render: !0,
|
|
1366
1366
|
defaultProps: !0,
|
|
1367
1367
|
displayName: !0,
|
|
1368
1368
|
propTypes: !0
|
|
1369
|
-
},
|
|
1369
|
+
}, Ko = {
|
|
1370
1370
|
$$typeof: !0,
|
|
1371
1371
|
compare: !0,
|
|
1372
1372
|
defaultProps: !0,
|
|
1373
1373
|
displayName: !0,
|
|
1374
1374
|
propTypes: !0,
|
|
1375
1375
|
type: !0
|
|
1376
|
-
},
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
var
|
|
1380
|
-
function
|
|
1376
|
+
}, fn = {};
|
|
1377
|
+
fn[un.ForwardRef] = Go;
|
|
1378
|
+
fn[un.Memo] = Ko;
|
|
1379
|
+
var Ho = !0;
|
|
1380
|
+
function Jo(e, t, r) {
|
|
1381
1381
|
var n = "";
|
|
1382
1382
|
return r.split(" ").forEach(function(o) {
|
|
1383
1383
|
e[o] !== void 0 ? t.push(e[o] + ";") : o && (n += o + " ");
|
|
1384
1384
|
}), n;
|
|
1385
1385
|
}
|
|
1386
|
-
var
|
|
1386
|
+
var hn = function(t, r, n) {
|
|
1387
1387
|
var o = t.key + "-" + r.name;
|
|
1388
1388
|
// we only need to add the styles to the registered cache if the
|
|
1389
1389
|
// class name could be used further down
|
|
@@ -1394,9 +1394,9 @@ var un = function(t, r, n) {
|
|
|
1394
1394
|
// in node since emotion-server relies on whether a style is in
|
|
1395
1395
|
// the registered cache to know whether a style is global or not
|
|
1396
1396
|
// also, note that this check will be dead code eliminated in the browser
|
|
1397
|
-
|
|
1398
|
-
},
|
|
1399
|
-
|
|
1397
|
+
Ho === !1) && t.registered[o] === void 0 && (t.registered[o] = r.styles);
|
|
1398
|
+
}, Qo = function(t, r, n) {
|
|
1399
|
+
hn(t, r, n);
|
|
1400
1400
|
var o = t.key + "-" + r.name;
|
|
1401
1401
|
if (t.inserted[r.name] === void 0) {
|
|
1402
1402
|
var i = r;
|
|
@@ -1405,7 +1405,7 @@ var un = function(t, r, n) {
|
|
|
1405
1405
|
while (i !== void 0);
|
|
1406
1406
|
}
|
|
1407
1407
|
};
|
|
1408
|
-
function
|
|
1408
|
+
function Xo(e) {
|
|
1409
1409
|
for (var t = 0, r, n = 0, o = e.length; o >= 4; ++n, o -= 4)
|
|
1410
1410
|
r = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, r = /* Math.imul(k, m): */
|
|
1411
1411
|
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
|
|
@@ -1424,7 +1424,7 @@ function Go(e) {
|
|
|
1424
1424
|
return t ^= t >>> 13, t = /* Math.imul(h, m): */
|
|
1425
1425
|
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
|
|
1426
1426
|
}
|
|
1427
|
-
var
|
|
1427
|
+
var Zo = {
|
|
1428
1428
|
animationIterationCount: 1,
|
|
1429
1429
|
aspectRatio: 1,
|
|
1430
1430
|
borderImageOutset: 1,
|
|
@@ -1473,18 +1473,18 @@ var Ho = {
|
|
|
1473
1473
|
strokeMiterlimit: 1,
|
|
1474
1474
|
strokeOpacity: 1,
|
|
1475
1475
|
strokeWidth: 1
|
|
1476
|
-
},
|
|
1476
|
+
}, ei = /[A-Z]|^ms/g, ti = /_EMO_([^_]+?)_([^]*?)_EMO_/g, dn = function(t) {
|
|
1477
1477
|
return t.charCodeAt(1) === 45;
|
|
1478
|
-
},
|
|
1478
|
+
}, $r = function(t) {
|
|
1479
1479
|
return t != null && typeof t != "boolean";
|
|
1480
|
-
}, Lt = /* @__PURE__ */
|
|
1481
|
-
return
|
|
1482
|
-
}),
|
|
1480
|
+
}, Lt = /* @__PURE__ */ Lo(function(e) {
|
|
1481
|
+
return dn(e) ? e : e.replace(ei, "-$&").toLowerCase();
|
|
1482
|
+
}), Fr = function(t, r) {
|
|
1483
1483
|
switch (t) {
|
|
1484
1484
|
case "animation":
|
|
1485
1485
|
case "animationName":
|
|
1486
1486
|
if (typeof r == "string")
|
|
1487
|
-
return r.replace(
|
|
1487
|
+
return r.replace(ti, function(n, o, i) {
|
|
1488
1488
|
return he = {
|
|
1489
1489
|
name: o,
|
|
1490
1490
|
styles: i,
|
|
@@ -1492,7 +1492,7 @@ var Ho = {
|
|
|
1492
1492
|
}, o;
|
|
1493
1493
|
});
|
|
1494
1494
|
}
|
|
1495
|
-
return
|
|
1495
|
+
return Zo[t] !== 1 && !dn(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
|
|
1496
1496
|
};
|
|
1497
1497
|
function et(e, t, r) {
|
|
1498
1498
|
if (r == null)
|
|
@@ -1524,12 +1524,12 @@ function et(e, t, r) {
|
|
|
1524
1524
|
var c = i.styles + ";";
|
|
1525
1525
|
return c;
|
|
1526
1526
|
}
|
|
1527
|
-
return
|
|
1527
|
+
return ri(e, t, r);
|
|
1528
1528
|
}
|
|
1529
1529
|
case "function": {
|
|
1530
1530
|
if (e !== void 0) {
|
|
1531
|
-
var l = he,
|
|
1532
|
-
return he = l, et(e, t,
|
|
1531
|
+
var l = he, d = r(e);
|
|
1532
|
+
return he = l, et(e, t, d);
|
|
1533
1533
|
}
|
|
1534
1534
|
break;
|
|
1535
1535
|
}
|
|
@@ -1537,7 +1537,7 @@ function et(e, t, r) {
|
|
|
1537
1537
|
var f = r;
|
|
1538
1538
|
return f;
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1540
|
+
function ri(e, t, r) {
|
|
1541
1541
|
var n = "";
|
|
1542
1542
|
if (Array.isArray(r))
|
|
1543
1543
|
for (var o = 0; o < r.length; o++)
|
|
@@ -1547,27 +1547,27 @@ function Qo(e, t, r) {
|
|
|
1547
1547
|
var a = r[i];
|
|
1548
1548
|
if (typeof a != "object") {
|
|
1549
1549
|
var c = a;
|
|
1550
|
-
|
|
1550
|
+
$r(c) && (n += Lt(i) + ":" + Fr(i, c) + ";");
|
|
1551
1551
|
} else if (Array.isArray(a) && typeof a[0] == "string" && t == null)
|
|
1552
1552
|
for (var l = 0; l < a.length; l++)
|
|
1553
|
-
|
|
1553
|
+
$r(a[l]) && (n += Lt(i) + ":" + Fr(i, a[l]) + ";");
|
|
1554
1554
|
else {
|
|
1555
|
-
var
|
|
1555
|
+
var d = et(e, t, a);
|
|
1556
1556
|
switch (i) {
|
|
1557
1557
|
case "animation":
|
|
1558
1558
|
case "animationName": {
|
|
1559
|
-
n += Lt(i) + ":" +
|
|
1559
|
+
n += Lt(i) + ":" + d + ";";
|
|
1560
1560
|
break;
|
|
1561
1561
|
}
|
|
1562
1562
|
default:
|
|
1563
|
-
n += i + "{" +
|
|
1563
|
+
n += i + "{" + d + "}";
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
1566
|
}
|
|
1567
1567
|
return n;
|
|
1568
1568
|
}
|
|
1569
|
-
var
|
|
1570
|
-
function
|
|
1569
|
+
var Lr = /label:\s*([^\s;{]+)\s*(;|$)/g, he;
|
|
1570
|
+
function ni(e, t, r) {
|
|
1571
1571
|
if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
|
|
1572
1572
|
return e[0];
|
|
1573
1573
|
var n = !0, o = "";
|
|
@@ -1584,86 +1584,86 @@ function Xo(e, t, r) {
|
|
|
1584
1584
|
var l = i;
|
|
1585
1585
|
o += l[c];
|
|
1586
1586
|
}
|
|
1587
|
-
|
|
1588
|
-
for (var
|
|
1589
|
-
|
|
1590
|
-
var
|
|
1587
|
+
Lr.lastIndex = 0;
|
|
1588
|
+
for (var d = "", f; (f = Lr.exec(o)) !== null; )
|
|
1589
|
+
d += "-" + f[1];
|
|
1590
|
+
var v = Xo(o) + d;
|
|
1591
1591
|
return {
|
|
1592
|
-
name:
|
|
1592
|
+
name: v,
|
|
1593
1593
|
styles: o,
|
|
1594
1594
|
next: he
|
|
1595
1595
|
};
|
|
1596
1596
|
}
|
|
1597
|
-
var
|
|
1597
|
+
var oi = function(t) {
|
|
1598
1598
|
return t();
|
|
1599
|
-
},
|
|
1599
|
+
}, ii = ye.useInsertionEffect ? ye.useInsertionEffect : !1, si = ii || oi, pn = /* @__PURE__ */ ye.createContext(
|
|
1600
1600
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1601
1601
|
// because this module is primarily intended for the browser and node
|
|
1602
1602
|
// but it's also required in react native and similar environments sometimes
|
|
1603
1603
|
// and we could have a special build just for that
|
|
1604
1604
|
// but this is much easier and the native packages
|
|
1605
1605
|
// might use a different theme context in the future anyway
|
|
1606
|
-
typeof HTMLElement < "u" ? /* @__PURE__ */
|
|
1606
|
+
typeof HTMLElement < "u" ? /* @__PURE__ */ Vo({
|
|
1607
1607
|
key: "css"
|
|
1608
1608
|
}) : null
|
|
1609
1609
|
);
|
|
1610
|
-
|
|
1611
|
-
var
|
|
1610
|
+
pn.Provider;
|
|
1611
|
+
var ai = function(t) {
|
|
1612
1612
|
return /* @__PURE__ */ rt(function(r, n) {
|
|
1613
|
-
var o =
|
|
1613
|
+
var o = Qn(pn);
|
|
1614
1614
|
return t(r, o, n);
|
|
1615
1615
|
});
|
|
1616
|
-
},
|
|
1616
|
+
}, ci = /* @__PURE__ */ ye.createContext({}), Qt = {}.hasOwnProperty, Vt = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", li = function(t, r) {
|
|
1617
1617
|
var n = {};
|
|
1618
1618
|
for (var o in r)
|
|
1619
1619
|
Qt.call(r, o) && (n[o] = r[o]);
|
|
1620
1620
|
return n[Vt] = t, n;
|
|
1621
|
-
},
|
|
1621
|
+
}, ui = function(t) {
|
|
1622
1622
|
var r = t.cache, n = t.serialized, o = t.isStringTag;
|
|
1623
|
-
return
|
|
1624
|
-
return
|
|
1623
|
+
return hn(r, n, o), si(function() {
|
|
1624
|
+
return Qo(r, n, o);
|
|
1625
1625
|
}), null;
|
|
1626
|
-
},
|
|
1626
|
+
}, fi = /* @__PURE__ */ ai(function(e, t, r) {
|
|
1627
1627
|
var n = e.css;
|
|
1628
1628
|
typeof n == "string" && t.registered[n] !== void 0 && (n = t.registered[n]);
|
|
1629
1629
|
var o = e[Vt], i = [n], a = "";
|
|
1630
|
-
typeof e.className == "string" ? a =
|
|
1631
|
-
var c =
|
|
1630
|
+
typeof e.className == "string" ? a = Jo(t.registered, i, e.className) : e.className != null && (a = e.className + " ");
|
|
1631
|
+
var c = ni(i, void 0, ye.useContext(ci));
|
|
1632
1632
|
a += t.key + "-" + c.name;
|
|
1633
1633
|
var l = {};
|
|
1634
|
-
for (var
|
|
1635
|
-
Qt.call(e,
|
|
1636
|
-
return l.className = a, r && (l.ref = r), /* @__PURE__ */
|
|
1634
|
+
for (var d in e)
|
|
1635
|
+
Qt.call(e, d) && d !== "css" && d !== Vt && (l[d] = e[d]);
|
|
1636
|
+
return l.className = a, r && (l.ref = r), /* @__PURE__ */ ye.createElement(ye.Fragment, null, /* @__PURE__ */ ye.createElement(ui, {
|
|
1637
1637
|
cache: t,
|
|
1638
1638
|
serialized: c,
|
|
1639
1639
|
isStringTag: typeof o == "string"
|
|
1640
|
-
}), /* @__PURE__ */
|
|
1641
|
-
}),
|
|
1642
|
-
return Qt.call(r, "css") ?
|
|
1640
|
+
}), /* @__PURE__ */ ye.createElement(o, l));
|
|
1641
|
+
}), hi = fi, wt = function(t, r, n) {
|
|
1642
|
+
return Qt.call(r, "css") ? Tr.jsx(hi, li(t, r), n) : Tr.jsx(t, r, n);
|
|
1643
1643
|
};
|
|
1644
|
-
function
|
|
1644
|
+
function di(e) {
|
|
1645
1645
|
switch (e.toLowerCase()) {
|
|
1646
1646
|
case "sql":
|
|
1647
|
-
return
|
|
1647
|
+
return Br();
|
|
1648
1648
|
case "json":
|
|
1649
|
-
return
|
|
1649
|
+
return Gr();
|
|
1650
1650
|
default:
|
|
1651
1651
|
return [];
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
|
-
function
|
|
1654
|
+
function pi(e) {
|
|
1655
1655
|
return ["sql", "json"].includes(e.toLowerCase());
|
|
1656
1656
|
}
|
|
1657
|
-
function
|
|
1658
|
-
return
|
|
1657
|
+
function mi(e = {}) {
|
|
1658
|
+
return Jr(e);
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1661
|
-
return [
|
|
1660
|
+
function fs(e) {
|
|
1661
|
+
return [to(), ro(e)];
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1664
|
-
return
|
|
1663
|
+
function gi() {
|
|
1664
|
+
return Ee.of([Dt]);
|
|
1665
1665
|
}
|
|
1666
|
-
const
|
|
1666
|
+
const hs = [gi(), mi()], yi = Qr.define([{
|
|
1667
1667
|
tag: W.keyword,
|
|
1668
1668
|
color: "#1a1aa6",
|
|
1669
1669
|
fontWeight: "bold"
|
|
@@ -1705,7 +1705,7 @@ const as = [fi(), ui()], hi = Jr.define([{
|
|
|
1705
1705
|
tag: W.link,
|
|
1706
1706
|
color: "#0563c1",
|
|
1707
1707
|
textDecoration: "underline"
|
|
1708
|
-
}]),
|
|
1708
|
+
}]), Nr = [V.theme({
|
|
1709
1709
|
"&": {
|
|
1710
1710
|
backgroundColor: "#ffffff",
|
|
1711
1711
|
color: "#333333",
|
|
@@ -1749,7 +1749,7 @@ const as = [fi(), ui()], hi = Jr.define([{
|
|
|
1749
1749
|
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
|
|
1750
1750
|
backgroundColor: "rgba(181, 213, 255, 0.5)"
|
|
1751
1751
|
}
|
|
1752
|
-
}), pt(
|
|
1752
|
+
}), pt(yi)], vi = Qr.define([{
|
|
1753
1753
|
tag: W.keyword,
|
|
1754
1754
|
color: "#569cd6",
|
|
1755
1755
|
fontWeight: "bold"
|
|
@@ -1791,7 +1791,7 @@ const as = [fi(), ui()], hi = Jr.define([{
|
|
|
1791
1791
|
tag: W.link,
|
|
1792
1792
|
color: "#4e94ce",
|
|
1793
1793
|
textDecoration: "underline"
|
|
1794
|
-
}]),
|
|
1794
|
+
}]), bi = [V.theme({
|
|
1795
1795
|
"&": {
|
|
1796
1796
|
backgroundColor: "#1e1e1e",
|
|
1797
1797
|
color: "#d4d4d4",
|
|
@@ -1835,18 +1835,18 @@ const as = [fi(), ui()], hi = Jr.define([{
|
|
|
1835
1835
|
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
|
|
1836
1836
|
backgroundColor: "rgba(255, 255, 255, 0.1)"
|
|
1837
1837
|
}
|
|
1838
|
-
}), pt(
|
|
1839
|
-
function
|
|
1838
|
+
}), pt(vi)];
|
|
1839
|
+
function xi(e) {
|
|
1840
1840
|
switch (e) {
|
|
1841
1841
|
case "light":
|
|
1842
|
-
return
|
|
1842
|
+
return Nr;
|
|
1843
1843
|
case "dark":
|
|
1844
|
-
return
|
|
1844
|
+
return bi;
|
|
1845
1845
|
default:
|
|
1846
|
-
return
|
|
1846
|
+
return Nr;
|
|
1847
1847
|
}
|
|
1848
1848
|
}
|
|
1849
|
-
const
|
|
1849
|
+
const Ir = (e) => {
|
|
1850
1850
|
const t = {
|
|
1851
1851
|
value: "",
|
|
1852
1852
|
readOnlyRanges: []
|
|
@@ -1863,7 +1863,7 @@ const Lr = (e) => {
|
|
|
1863
1863
|
end: l
|
|
1864
1864
|
}), r = l;
|
|
1865
1865
|
}), t;
|
|
1866
|
-
}, gt = je.define(),
|
|
1866
|
+
}, gt = je.define(), Dr = Gt.define({
|
|
1867
1867
|
create() {
|
|
1868
1868
|
return Q.none;
|
|
1869
1869
|
},
|
|
@@ -1871,14 +1871,14 @@ const Lr = (e) => {
|
|
|
1871
1871
|
e = e.map(t.changes);
|
|
1872
1872
|
for (const r of t.effects)
|
|
1873
1873
|
if (r.is(gt))
|
|
1874
|
-
return console.log(2939),
|
|
1874
|
+
return console.log(2939), mn(r.value);
|
|
1875
1875
|
return t.docChanged, e;
|
|
1876
1876
|
},
|
|
1877
1877
|
provide(e) {
|
|
1878
1878
|
return V.decorations.from(e);
|
|
1879
1879
|
}
|
|
1880
1880
|
});
|
|
1881
|
-
function
|
|
1881
|
+
function mn(e) {
|
|
1882
1882
|
const t = [];
|
|
1883
1883
|
return console.log(e, 9999299), e.forEach((r) => {
|
|
1884
1884
|
r.start < r.end && t.push(Q.mark({
|
|
@@ -1893,15 +1893,15 @@ function dn(e) {
|
|
|
1893
1893
|
}), Q.set(t);
|
|
1894
1894
|
}
|
|
1895
1895
|
const Xt = /* @__PURE__ */ new WeakMap();
|
|
1896
|
-
function
|
|
1896
|
+
function Ei(e) {
|
|
1897
1897
|
let t = e.map((r) => ({
|
|
1898
1898
|
...r
|
|
1899
1899
|
}));
|
|
1900
1900
|
return [
|
|
1901
1901
|
// 添加状态字段
|
|
1902
|
-
|
|
1902
|
+
Dr.init(() => mn(t)),
|
|
1903
1903
|
// 添加按键映射,专门处理回车键
|
|
1904
|
-
|
|
1904
|
+
Ee.of([{
|
|
1905
1905
|
key: "Enter",
|
|
1906
1906
|
run: (r) => {
|
|
1907
1907
|
const n = r.state.selection.main, {
|
|
@@ -1960,8 +1960,8 @@ function gi(e) {
|
|
|
1960
1960
|
// 动态更新只读区域的装饰
|
|
1961
1961
|
V.updateListener.of((r) => {
|
|
1962
1962
|
if (r.docChanged) {
|
|
1963
|
-
const n =
|
|
1964
|
-
!
|
|
1963
|
+
const n = Ci(t, r);
|
|
1964
|
+
!Si(t, n) ? (t = n, Xt.set(r.view, n), r.view.dispatch({
|
|
1965
1965
|
effects: gt.of(n)
|
|
1966
1966
|
})) : r.view.dispatch({
|
|
1967
1967
|
effects: gt.of(n)
|
|
@@ -1971,12 +1971,12 @@ function gi(e) {
|
|
|
1971
1971
|
// 添加一个延迟执行的额外更新,以确保在文档变化后能重新计算语法高亮
|
|
1972
1972
|
V.updateListener.of((r) => {
|
|
1973
1973
|
r.docChanged && setTimeout(() => {
|
|
1974
|
-
r.view.state.field(
|
|
1974
|
+
r.view.state.field(Dr, !1) && r.view.dispatch({});
|
|
1975
1975
|
}, 10);
|
|
1976
1976
|
})
|
|
1977
1977
|
];
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1979
|
+
function Si(e, t) {
|
|
1980
1980
|
if (e.length !== t.length)
|
|
1981
1981
|
return !1;
|
|
1982
1982
|
for (let r = 0; r < e.length; r++)
|
|
@@ -1984,7 +1984,7 @@ function vi(e, t) {
|
|
|
1984
1984
|
return !1;
|
|
1985
1985
|
return !0;
|
|
1986
1986
|
}
|
|
1987
|
-
function
|
|
1987
|
+
function Ci(e, t) {
|
|
1988
1988
|
var o;
|
|
1989
1989
|
if (!t.docChanged)
|
|
1990
1990
|
return e;
|
|
@@ -1993,20 +1993,20 @@ function yi(e, t) {
|
|
|
1993
1993
|
const a = {
|
|
1994
1994
|
...i
|
|
1995
1995
|
};
|
|
1996
|
-
return t.changes.iterChanges((c, l,
|
|
1997
|
-
const
|
|
1998
|
-
if (c === 0 && (r = !0), c === 0 &&
|
|
1999
|
-
a.start =
|
|
1996
|
+
return t.changes.iterChanges((c, l, d, f) => {
|
|
1997
|
+
const v = f - d, R = l - c, m = v - R;
|
|
1998
|
+
if (c === 0 && (r = !0), c === 0 && v > 0 && i.start === 0) {
|
|
1999
|
+
a.start = v, a.end += m;
|
|
2000
2000
|
return;
|
|
2001
2001
|
}
|
|
2002
2002
|
if (l <= i.start)
|
|
2003
|
-
a.start +=
|
|
2003
|
+
a.start += m, a.end += m;
|
|
2004
2004
|
else if (c >= i.start && c < i.end && l >= i.end)
|
|
2005
2005
|
a.end = c;
|
|
2006
2006
|
else if (!(c >= i.start && l <= i.end)) {
|
|
2007
2007
|
if (c < i.end && l > i.end) {
|
|
2008
|
-
const
|
|
2009
|
-
a.end = c + Math.min(
|
|
2008
|
+
const w = i.end - c;
|
|
2009
|
+
a.end = c + Math.min(w, v);
|
|
2010
2010
|
}
|
|
2011
2011
|
}
|
|
2012
2012
|
}), a;
|
|
@@ -2020,10 +2020,10 @@ function yi(e, t) {
|
|
|
2020
2020
|
}
|
|
2021
2021
|
return n.filter((i) => i.start < i.end);
|
|
2022
2022
|
}
|
|
2023
|
-
function
|
|
2023
|
+
function Ri(e) {
|
|
2024
2024
|
return Xt.get(e) || [];
|
|
2025
2025
|
}
|
|
2026
|
-
function
|
|
2026
|
+
function ve(e, t) {
|
|
2027
2027
|
const r = t.map((n) => ({
|
|
2028
2028
|
...n
|
|
2029
2029
|
}));
|
|
@@ -2033,7 +2033,7 @@ function ye(e, t) {
|
|
|
2033
2033
|
e.dom && document.contains(e.dom) && e.dispatch({});
|
|
2034
2034
|
}, 10);
|
|
2035
2035
|
}
|
|
2036
|
-
function
|
|
2036
|
+
function K() {
|
|
2037
2037
|
var e = arguments[0];
|
|
2038
2038
|
typeof e == "string" && (e = document.createElement(e));
|
|
2039
2039
|
var t = 1, r = arguments[1];
|
|
@@ -2044,20 +2044,20 @@ function H() {
|
|
|
2044
2044
|
}
|
|
2045
2045
|
t++;
|
|
2046
2046
|
}
|
|
2047
|
-
for (; t < arguments.length; t++)
|
|
2047
|
+
for (; t < arguments.length; t++) gn(e, arguments[t]);
|
|
2048
2048
|
return e;
|
|
2049
2049
|
}
|
|
2050
|
-
function
|
|
2050
|
+
function gn(e, t) {
|
|
2051
2051
|
if (typeof t == "string")
|
|
2052
2052
|
e.appendChild(document.createTextNode(t));
|
|
2053
2053
|
else if (t != null) if (t.nodeType != null)
|
|
2054
2054
|
e.appendChild(t);
|
|
2055
2055
|
else if (Array.isArray(t))
|
|
2056
|
-
for (var r = 0; r < t.length; r++)
|
|
2056
|
+
for (var r = 0; r < t.length; r++) gn(e, t[r]);
|
|
2057
2057
|
else
|
|
2058
2058
|
throw new RangeError("Unsupported child node: " + t);
|
|
2059
2059
|
}
|
|
2060
|
-
const
|
|
2060
|
+
const Wr = typeof String.prototype.normalize == "function" ? (e) => e.normalize("NFKD") : (e) => e;
|
|
2061
2061
|
class We {
|
|
2062
2062
|
/**
|
|
2063
2063
|
Create a text cursor. The query is the search string, `from` to
|
|
@@ -2073,7 +2073,7 @@ class We {
|
|
|
2073
2073
|
(when supported).
|
|
2074
2074
|
*/
|
|
2075
2075
|
constructor(t, r, n = 0, o = t.length, i, a) {
|
|
2076
|
-
this.test = a, this.value = { from: 0, to: 0 }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = t.iterRange(n, o), this.bufferStart = n, this.normalize = i ? (c) => i(
|
|
2076
|
+
this.test = a, this.value = { from: 0, to: 0 }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = t.iterRange(n, o), this.bufferStart = n, this.normalize = i ? (c) => i(Wr(c)) : Wr, this.query = this.normalize(r);
|
|
2077
2077
|
}
|
|
2078
2078
|
peek() {
|
|
2079
2079
|
if (this.bufferPos == this.buffer.length) {
|
|
@@ -2081,7 +2081,7 @@ class We {
|
|
|
2081
2081
|
return -1;
|
|
2082
2082
|
this.bufferPos = 0, this.buffer = this.iter.value;
|
|
2083
2083
|
}
|
|
2084
|
-
return
|
|
2084
|
+
return ao(this.buffer, this.bufferPos);
|
|
2085
2085
|
}
|
|
2086
2086
|
/**
|
|
2087
2087
|
Look for the next match. Updates the iterator's
|
|
@@ -2104,8 +2104,8 @@ class We {
|
|
|
2104
2104
|
let t = this.peek();
|
|
2105
2105
|
if (t < 0)
|
|
2106
2106
|
return this.done = !0, this;
|
|
2107
|
-
let r =
|
|
2108
|
-
this.bufferPos +=
|
|
2107
|
+
let r = co(t), n = this.bufferStart + this.bufferPos;
|
|
2108
|
+
this.bufferPos += lo(t);
|
|
2109
2109
|
let o = this.normalize(r);
|
|
2110
2110
|
if (o.length)
|
|
2111
2111
|
for (let i = 0, a = n; ; i++) {
|
|
@@ -2131,19 +2131,19 @@ class We {
|
|
|
2131
2131
|
typeof Symbol < "u" && (We.prototype[Symbol.iterator] = function() {
|
|
2132
2132
|
return this;
|
|
2133
2133
|
});
|
|
2134
|
-
const
|
|
2135
|
-
class
|
|
2134
|
+
const yn = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, Zt = "gm" + (/x/.unicode == null ? "" : "u");
|
|
2135
|
+
class vn {
|
|
2136
2136
|
/**
|
|
2137
2137
|
Create a cursor that will search the given range in the given
|
|
2138
2138
|
document. `query` should be the raw pattern (as you'd pass it to
|
|
2139
2139
|
`new RegExp`).
|
|
2140
2140
|
*/
|
|
2141
2141
|
constructor(t, r, n, o = 0, i = t.length) {
|
|
2142
|
-
if (this.text = t, this.to = i, this.curLine = "", this.done = !1, this.value =
|
|
2143
|
-
return new
|
|
2142
|
+
if (this.text = t, this.to = i, this.curLine = "", this.done = !1, this.value = yn, /\\[sWDnr]|\n|\r|\[\^/.test(r))
|
|
2143
|
+
return new bn(t, r, n, o, i);
|
|
2144
2144
|
this.re = new RegExp(r, Zt + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.iter = t.iter();
|
|
2145
2145
|
let a = t.lineAt(o);
|
|
2146
|
-
this.curLineStart = a.from, this.matchPos =
|
|
2146
|
+
this.curLineStart = a.from, this.matchPos = yt(t, o), this.getLine(this.curLineStart);
|
|
2147
2147
|
}
|
|
2148
2148
|
getLine(t) {
|
|
2149
2149
|
this.iter.next(t), this.iter.lineBreak ? this.curLine = "" : (this.curLine = this.iter.value, this.curLineStart + this.curLine.length > this.to && (this.curLine = this.curLine.slice(0, this.to - this.curLineStart)), this.iter.next());
|
|
@@ -2160,7 +2160,7 @@ class gn {
|
|
|
2160
2160
|
let r = this.matchPos <= this.to && this.re.exec(this.curLine);
|
|
2161
2161
|
if (r) {
|
|
2162
2162
|
let n = this.curLineStart + r.index, o = n + r[0].length;
|
|
2163
|
-
if (this.matchPos =
|
|
2163
|
+
if (this.matchPos = yt(this.text, o + (n == o ? 1 : 0)), n == this.curLineStart + this.curLine.length && this.nextLine(), (n < o || n > this.value.to) && (!this.test || this.test(n, o, r)))
|
|
2164
2164
|
return this.value = { from: n, to: o, match: r }, this;
|
|
2165
2165
|
t = this.matchPos - this.curLineStart;
|
|
2166
2166
|
} else if (this.curLineStart + this.curLine.length < this.to)
|
|
@@ -2190,9 +2190,9 @@ class Ie {
|
|
|
2190
2190
|
return a > r && (i = t.sliceString(r, a) + i, a = r), o.to < n && (i += t.sliceString(o.to, n)), Nt.set(t, new Ie(a, i)), new Ie(r, i.slice(r - a, n - a));
|
|
2191
2191
|
}
|
|
2192
2192
|
}
|
|
2193
|
-
class
|
|
2193
|
+
class bn {
|
|
2194
2194
|
constructor(t, r, n, o, i) {
|
|
2195
|
-
this.text = t, this.to = i, this.done = !1, this.value =
|
|
2195
|
+
this.text = t, this.to = i, this.done = !1, this.value = yn, this.matchPos = yt(t, o), this.re = new RegExp(r, Zt + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.flat = Ie.get(t, o, this.chunkEnd(
|
|
2196
2196
|
o + 5e3
|
|
2197
2197
|
/* Chunk.Base */
|
|
2198
2198
|
));
|
|
@@ -2206,7 +2206,7 @@ class vn {
|
|
|
2206
2206
|
if (r && !r[0] && r.index == t && (this.re.lastIndex = t + 1, r = this.re.exec(this.flat.text)), r) {
|
|
2207
2207
|
let n = this.flat.from + r.index, o = n + r[0].length;
|
|
2208
2208
|
if ((this.flat.to >= this.to || r.index + r[0].length <= this.flat.text.length - 10) && (!this.test || this.test(n, o, r)))
|
|
2209
|
-
return this.value = { from: n, to: o, match: r }, this.matchPos =
|
|
2209
|
+
return this.value = { from: n, to: o, match: r }, this.matchPos = yt(this.text, o + (n == o ? 1 : 0)), this;
|
|
2210
2210
|
}
|
|
2211
2211
|
if (this.flat.to == this.to)
|
|
2212
2212
|
return this.done = !0, this;
|
|
@@ -2214,17 +2214,17 @@ class vn {
|
|
|
2214
2214
|
}
|
|
2215
2215
|
}
|
|
2216
2216
|
}
|
|
2217
|
-
typeof Symbol < "u" && (
|
|
2217
|
+
typeof Symbol < "u" && (vn.prototype[Symbol.iterator] = bn.prototype[Symbol.iterator] = function() {
|
|
2218
2218
|
return this;
|
|
2219
2219
|
});
|
|
2220
|
-
function
|
|
2220
|
+
function wi(e) {
|
|
2221
2221
|
try {
|
|
2222
2222
|
return new RegExp(e, Zt), !0;
|
|
2223
2223
|
} catch {
|
|
2224
2224
|
return !1;
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
|
-
function
|
|
2227
|
+
function yt(e, t) {
|
|
2228
2228
|
if (t >= e.length)
|
|
2229
2229
|
return t;
|
|
2230
2230
|
let r = e.lineAt(t), n;
|
|
@@ -2233,7 +2233,7 @@ function vt(e, t) {
|
|
|
2233
2233
|
return t;
|
|
2234
2234
|
}
|
|
2235
2235
|
function zt(e) {
|
|
2236
|
-
let t = String(e.state.doc.lineAt(e.state.selection.main.head).number), r =
|
|
2236
|
+
let t = String(e.state.doc.lineAt(e.state.selection.main.head).number), r = K("input", { class: "cm-textfield", name: "line", value: t }), n = K("form", {
|
|
2237
2237
|
class: "cm-gotoLine",
|
|
2238
2238
|
onkeydown: (i) => {
|
|
2239
2239
|
i.keyCode == 27 ? (i.preventDefault(), e.dispatch({ effects: Qe.of(!1) }), e.focus()) : i.keyCode == 13 && (i.preventDefault(), o());
|
|
@@ -2241,7 +2241,7 @@ function zt(e) {
|
|
|
2241
2241
|
onsubmit: (i) => {
|
|
2242
2242
|
i.preventDefault(), o();
|
|
2243
2243
|
}
|
|
2244
|
-
},
|
|
2244
|
+
}, K("label", e.state.phrase("Go to line"), ": ", r), " ", K("button", { class: "cm-button", type: "submit" }, e.state.phrase("go")), K("button", {
|
|
2245
2245
|
name: "close",
|
|
2246
2246
|
onclick: () => {
|
|
2247
2247
|
e.dispatch({ effects: Qe.of(!1) }), e.focus();
|
|
@@ -2253,20 +2253,20 @@ function zt(e) {
|
|
|
2253
2253
|
let i = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(r.value);
|
|
2254
2254
|
if (!i)
|
|
2255
2255
|
return;
|
|
2256
|
-
let { state: a } = e, c = a.doc.lineAt(a.selection.main.head), [, l,
|
|
2257
|
-
if (
|
|
2258
|
-
let x =
|
|
2259
|
-
l && (x = x * (l == "-" ? -1 : 1) + c.number / a.doc.lines),
|
|
2260
|
-
} else
|
|
2261
|
-
let
|
|
2256
|
+
let { state: a } = e, c = a.doc.lineAt(a.selection.main.head), [, l, d, f, v] = i, R = f ? +f.slice(1) : 0, m = d ? +d : c.number;
|
|
2257
|
+
if (d && v) {
|
|
2258
|
+
let x = m / 100;
|
|
2259
|
+
l && (x = x * (l == "-" ? -1 : 1) + c.number / a.doc.lines), m = Math.round(a.doc.lines * x);
|
|
2260
|
+
} else d && l && (m = m * (l == "-" ? -1 : 1) + c.number);
|
|
2261
|
+
let w = a.doc.line(Math.max(1, Math.min(a.doc.lines, m))), g = le.cursor(w.from + Math.max(0, Math.min(R, w.length)));
|
|
2262
2262
|
e.dispatch({
|
|
2263
|
-
effects: [Qe.of(!1), V.scrollIntoView(
|
|
2264
|
-
selection:
|
|
2263
|
+
effects: [Qe.of(!1), V.scrollIntoView(g.from, { y: "center" })],
|
|
2264
|
+
selection: g
|
|
2265
2265
|
}), e.focus();
|
|
2266
2266
|
}
|
|
2267
2267
|
return { dom: n };
|
|
2268
2268
|
}
|
|
2269
|
-
const Qe = /* @__PURE__ */ je.define(),
|
|
2269
|
+
const Qe = /* @__PURE__ */ je.define(), jr = /* @__PURE__ */ Gt.define({
|
|
2270
2270
|
create() {
|
|
2271
2271
|
return !0;
|
|
2272
2272
|
},
|
|
@@ -2275,15 +2275,15 @@ const Qe = /* @__PURE__ */ je.define(), Dr = /* @__PURE__ */ Gt.define({
|
|
|
2275
2275
|
r.is(Qe) && (e = r.value);
|
|
2276
2276
|
return e;
|
|
2277
2277
|
},
|
|
2278
|
-
provide: (e) =>
|
|
2279
|
-
}),
|
|
2278
|
+
provide: (e) => Hr.from(e, (t) => t ? zt : null)
|
|
2279
|
+
}), _i = (e) => {
|
|
2280
2280
|
let t = dt(e, zt);
|
|
2281
2281
|
if (!t) {
|
|
2282
2282
|
let r = [Qe.of(!0)];
|
|
2283
|
-
e.state.field(
|
|
2283
|
+
e.state.field(jr, !1) == null && r.push(je.appendConfig.of([jr, Ti])), e.dispatch({ effects: r }), t = dt(e, zt);
|
|
2284
2284
|
}
|
|
2285
2285
|
return t && t.dom.querySelector("input").select(), !0;
|
|
2286
|
-
},
|
|
2286
|
+
}, Ti = /* @__PURE__ */ V.baseTheme({
|
|
2287
2287
|
".cm-panel.cm-gotoLine": {
|
|
2288
2288
|
padding: "2px 6px 4px",
|
|
2289
2289
|
position: "relative",
|
|
@@ -2299,14 +2299,14 @@ const Qe = /* @__PURE__ */ je.define(), Dr = /* @__PURE__ */ Gt.define({
|
|
|
2299
2299
|
padding: "0"
|
|
2300
2300
|
}
|
|
2301
2301
|
}
|
|
2302
|
-
}),
|
|
2302
|
+
}), ki = {
|
|
2303
2303
|
highlightWordAroundCursor: !1,
|
|
2304
2304
|
minSelectionLength: 1,
|
|
2305
2305
|
maxMatches: 100,
|
|
2306
2306
|
wholeWords: !1
|
|
2307
|
-
},
|
|
2307
|
+
}, xn = /* @__PURE__ */ Xr.define({
|
|
2308
2308
|
combine(e) {
|
|
2309
|
-
return
|
|
2309
|
+
return en(e, ki, {
|
|
2310
2310
|
highlightWordAroundCursor: (t, r) => t || r,
|
|
2311
2311
|
minSelectionLength: Math.min,
|
|
2312
2312
|
maxMatches: Math.min
|
|
@@ -2314,17 +2314,17 @@ const Qe = /* @__PURE__ */ je.define(), Dr = /* @__PURE__ */ Gt.define({
|
|
|
2314
2314
|
}
|
|
2315
2315
|
});
|
|
2316
2316
|
function er(e) {
|
|
2317
|
-
let t = [
|
|
2318
|
-
return e && t.push(
|
|
2317
|
+
let t = [$i, Ai];
|
|
2318
|
+
return e && t.push(xn.of(e)), t;
|
|
2319
2319
|
}
|
|
2320
|
-
const
|
|
2321
|
-
function
|
|
2320
|
+
const Mi = /* @__PURE__ */ Q.mark({ class: "cm-selectionMatch" }), Oi = /* @__PURE__ */ Q.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
|
|
2321
|
+
function qr(e, t, r, n) {
|
|
2322
2322
|
return (r == 0 || e(t.sliceDoc(r - 1, r)) != ae.Word) && (n == t.doc.length || e(t.sliceDoc(n, n + 1)) != ae.Word);
|
|
2323
2323
|
}
|
|
2324
|
-
function
|
|
2324
|
+
function Pi(e, t, r, n) {
|
|
2325
2325
|
return e(t.sliceDoc(r, r + 1)) == ae.Word && e(t.sliceDoc(n - 1, n)) == ae.Word;
|
|
2326
2326
|
}
|
|
2327
|
-
const
|
|
2327
|
+
const Ai = /* @__PURE__ */ Kr.fromClass(class {
|
|
2328
2328
|
constructor(e) {
|
|
2329
2329
|
this.decorations = this.getDeco(e);
|
|
2330
2330
|
}
|
|
@@ -2332,7 +2332,7 @@ const Ti = /* @__PURE__ */ Br.fromClass(class {
|
|
|
2332
2332
|
(e.selectionSet || e.docChanged || e.viewportChanged) && (this.decorations = this.getDeco(e.view));
|
|
2333
2333
|
}
|
|
2334
2334
|
getDeco(e) {
|
|
2335
|
-
let t = e.state.facet(
|
|
2335
|
+
let t = e.state.facet(xn), { state: r } = e, n = r.selection;
|
|
2336
2336
|
if (n.ranges.length > 1)
|
|
2337
2337
|
return Q.none;
|
|
2338
2338
|
let o = n.main, i, a = null;
|
|
@@ -2348,17 +2348,17 @@ const Ti = /* @__PURE__ */ Br.fromClass(class {
|
|
|
2348
2348
|
if (l < t.minSelectionLength || l > 200)
|
|
2349
2349
|
return Q.none;
|
|
2350
2350
|
if (t.wholeWords) {
|
|
2351
|
-
if (i = r.sliceDoc(o.from, o.to), a = r.charCategorizer(o.head), !(
|
|
2351
|
+
if (i = r.sliceDoc(o.from, o.to), a = r.charCategorizer(o.head), !(qr(a, r, o.from, o.to) && Pi(a, r, o.from, o.to)))
|
|
2352
2352
|
return Q.none;
|
|
2353
2353
|
} else if (i = r.sliceDoc(o.from, o.to), !i)
|
|
2354
2354
|
return Q.none;
|
|
2355
2355
|
}
|
|
2356
2356
|
let c = [];
|
|
2357
2357
|
for (let l of e.visibleRanges) {
|
|
2358
|
-
let
|
|
2359
|
-
for (; !
|
|
2360
|
-
let { from: f, to:
|
|
2361
|
-
if ((!a ||
|
|
2358
|
+
let d = new We(r.doc, i, l.from, l.to);
|
|
2359
|
+
for (; !d.next().done; ) {
|
|
2360
|
+
let { from: f, to: v } = d.value;
|
|
2361
|
+
if ((!a || qr(a, r, f, v)) && (o.empty && f <= o.from && v >= o.to ? c.push(Oi.range(f, v)) : (f >= o.to || v <= o.from) && c.push(Mi.range(f, v)), c.length > t.maxMatches))
|
|
2362
2362
|
return Q.none;
|
|
2363
2363
|
}
|
|
2364
2364
|
}
|
|
@@ -2366,14 +2366,14 @@ const Ti = /* @__PURE__ */ Br.fromClass(class {
|
|
|
2366
2366
|
}
|
|
2367
2367
|
}, {
|
|
2368
2368
|
decorations: (e) => e.decorations
|
|
2369
|
-
}),
|
|
2369
|
+
}), $i = /* @__PURE__ */ V.baseTheme({
|
|
2370
2370
|
".cm-selectionMatch": { backgroundColor: "#99ff7780" },
|
|
2371
2371
|
".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
|
|
2372
|
-
}),
|
|
2372
|
+
}), Fi = ({ state: e, dispatch: t }) => {
|
|
2373
2373
|
let { selection: r } = e, n = le.create(r.ranges.map((o) => e.wordAt(o.head) || le.cursor(o.head)), r.mainIndex);
|
|
2374
2374
|
return n.eq(r) ? !1 : (t(e.update({ selection: n })), !0);
|
|
2375
2375
|
};
|
|
2376
|
-
function
|
|
2376
|
+
function Li(e, t) {
|
|
2377
2377
|
let { main: r, ranges: n } = e.selection, o = e.wordAt(r.head), i = o && o.from == r.from && o.to == r.to;
|
|
2378
2378
|
for (let a = !1, c = new We(e.doc, t, n[n.length - 1].to); ; )
|
|
2379
2379
|
if (c.next(), c.done) {
|
|
@@ -2391,40 +2391,40 @@ function Pi(e, t) {
|
|
|
2391
2391
|
return c.value;
|
|
2392
2392
|
}
|
|
2393
2393
|
}
|
|
2394
|
-
const
|
|
2394
|
+
const Ni = ({ state: e, dispatch: t }) => {
|
|
2395
2395
|
let { ranges: r } = e.selection;
|
|
2396
2396
|
if (r.some((i) => i.from === i.to))
|
|
2397
|
-
return
|
|
2397
|
+
return Fi({ state: e, dispatch: t });
|
|
2398
2398
|
let n = e.sliceDoc(r[0].from, r[0].to);
|
|
2399
2399
|
if (e.selection.ranges.some((i) => e.sliceDoc(i.from, i.to) != n))
|
|
2400
2400
|
return !1;
|
|
2401
|
-
let o =
|
|
2401
|
+
let o = Li(e, n);
|
|
2402
2402
|
return o ? (t(e.update({
|
|
2403
2403
|
selection: e.selection.addRange(le.range(o.from, o.to), !1),
|
|
2404
2404
|
effects: V.scrollIntoView(o.to)
|
|
2405
2405
|
})), !0) : !1;
|
|
2406
|
-
}, _e = /* @__PURE__ */
|
|
2406
|
+
}, _e = /* @__PURE__ */ Xr.define({
|
|
2407
2407
|
combine(e) {
|
|
2408
|
-
return
|
|
2408
|
+
return en(e, {
|
|
2409
2409
|
top: !1,
|
|
2410
2410
|
caseSensitive: !1,
|
|
2411
2411
|
literal: !1,
|
|
2412
2412
|
regexp: !1,
|
|
2413
2413
|
wholeWord: !1,
|
|
2414
|
-
createPanel: (t) => new
|
|
2414
|
+
createPanel: (t) => new Gi(t),
|
|
2415
2415
|
scrollToMatch: (t) => V.scrollIntoView(t)
|
|
2416
2416
|
});
|
|
2417
2417
|
}
|
|
2418
2418
|
});
|
|
2419
|
-
function
|
|
2419
|
+
function En(e) {
|
|
2420
2420
|
return e ? [_e.of(e), Bt] : Bt;
|
|
2421
2421
|
}
|
|
2422
|
-
class
|
|
2422
|
+
class Sn {
|
|
2423
2423
|
/**
|
|
2424
2424
|
Create a query object.
|
|
2425
2425
|
*/
|
|
2426
2426
|
constructor(t) {
|
|
2427
|
-
this.search = t.search, this.caseSensitive = !!t.caseSensitive, this.literal = !!t.literal, this.regexp = !!t.regexp, this.replace = t.replace || "", this.valid = !!this.search && (!this.regexp ||
|
|
2427
|
+
this.search = t.search, this.caseSensitive = !!t.caseSensitive, this.literal = !!t.literal, this.regexp = !!t.regexp, this.replace = t.replace || "", this.valid = !!this.search && (!this.regexp || wi(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!t.wholeWord;
|
|
2428
2428
|
}
|
|
2429
2429
|
/**
|
|
2430
2430
|
@internal
|
|
@@ -2443,7 +2443,7 @@ class xn {
|
|
|
2443
2443
|
@internal
|
|
2444
2444
|
*/
|
|
2445
2445
|
create() {
|
|
2446
|
-
return this.regexp ? new
|
|
2446
|
+
return this.regexp ? new ji(this) : new Di(this);
|
|
2447
2447
|
}
|
|
2448
2448
|
/**
|
|
2449
2449
|
Get a search cursor for this query, searching through the given
|
|
@@ -2454,18 +2454,18 @@ class xn {
|
|
|
2454
2454
|
return n == null && (n = o.doc.length), this.regexp ? Le(this, o, r, n) : Fe(this, o, r, n);
|
|
2455
2455
|
}
|
|
2456
2456
|
}
|
|
2457
|
-
class
|
|
2457
|
+
class Cn {
|
|
2458
2458
|
constructor(t) {
|
|
2459
2459
|
this.spec = t;
|
|
2460
2460
|
}
|
|
2461
2461
|
}
|
|
2462
2462
|
function Fe(e, t, r, n) {
|
|
2463
|
-
return new We(t.doc, e.unquoted, r, n, e.caseSensitive ? void 0 : (o) => o.toLowerCase(), e.wholeWord ?
|
|
2463
|
+
return new We(t.doc, e.unquoted, r, n, e.caseSensitive ? void 0 : (o) => o.toLowerCase(), e.wholeWord ? Ii(t.doc, t.charCategorizer(t.selection.main.head)) : void 0);
|
|
2464
2464
|
}
|
|
2465
|
-
function
|
|
2466
|
-
return (r, n, o, i) => ((i > r || i + o.length < n) && (i = Math.max(0, r - 2), o = e.sliceString(i, Math.min(e.length, n + 2))), (t(
|
|
2465
|
+
function Ii(e, t) {
|
|
2466
|
+
return (r, n, o, i) => ((i > r || i + o.length < n) && (i = Math.max(0, r - 2), o = e.sliceString(i, Math.min(e.length, n + 2))), (t(vt(o, r - i)) != ae.Word || t(bt(o, r - i)) != ae.Word) && (t(bt(o, n - i)) != ae.Word || t(vt(o, n - i)) != ae.Word));
|
|
2467
2467
|
}
|
|
2468
|
-
class
|
|
2468
|
+
class Di extends Cn {
|
|
2469
2469
|
constructor(t) {
|
|
2470
2470
|
super(t);
|
|
2471
2471
|
}
|
|
@@ -2514,21 +2514,21 @@ class $i extends En {
|
|
|
2514
2514
|
}
|
|
2515
2515
|
}
|
|
2516
2516
|
function Le(e, t, r, n) {
|
|
2517
|
-
return new
|
|
2517
|
+
return new vn(t.doc, e.search, {
|
|
2518
2518
|
ignoreCase: !e.caseSensitive,
|
|
2519
|
-
test: e.wholeWord ?
|
|
2519
|
+
test: e.wholeWord ? Wi(t.charCategorizer(t.selection.main.head)) : void 0
|
|
2520
2520
|
}, r, n);
|
|
2521
2521
|
}
|
|
2522
|
-
function
|
|
2523
|
-
return e.slice(
|
|
2522
|
+
function vt(e, t) {
|
|
2523
|
+
return e.slice(tn(e, t, !1), t);
|
|
2524
2524
|
}
|
|
2525
2525
|
function bt(e, t) {
|
|
2526
|
-
return e.slice(t,
|
|
2526
|
+
return e.slice(t, tn(e, t));
|
|
2527
2527
|
}
|
|
2528
|
-
function
|
|
2529
|
-
return (t, r, n) => !n[0].length || (e(
|
|
2528
|
+
function Wi(e) {
|
|
2529
|
+
return (t, r, n) => !n[0].length || (e(vt(n.input, n.index)) != ae.Word || e(bt(n.input, n.index)) != ae.Word) && (e(bt(n.input, n.index + n[0].length)) != ae.Word || e(vt(n.input, n.index + n[0].length)) != ae.Word);
|
|
2530
2530
|
}
|
|
2531
|
-
class
|
|
2531
|
+
class ji extends Cn {
|
|
2532
2532
|
nextMatch(t, r, n) {
|
|
2533
2533
|
let o = Le(this.spec, t, n, t.doc.length).next();
|
|
2534
2534
|
return o.done && (o = Le(this.spec, t, 0, r).next()), o.done ? null : o.value;
|
|
@@ -2593,14 +2593,14 @@ const tt = /* @__PURE__ */ je.define(), tr = /* @__PURE__ */ je.define(), xe = /
|
|
|
2593
2593
|
r.is(tt) ? e = new It(r.value.create(), e.panel) : r.is(tr) && (e = new It(e.query, r.value ? rr : null));
|
|
2594
2594
|
return e;
|
|
2595
2595
|
},
|
|
2596
|
-
provide: (e) =>
|
|
2596
|
+
provide: (e) => Hr.from(e, (t) => t.panel)
|
|
2597
2597
|
});
|
|
2598
2598
|
class It {
|
|
2599
2599
|
constructor(t, r) {
|
|
2600
2600
|
this.query = t, this.panel = r;
|
|
2601
2601
|
}
|
|
2602
2602
|
}
|
|
2603
|
-
const
|
|
2603
|
+
const qi = /* @__PURE__ */ Q.mark({ class: "cm-searchMatch" }), Yi = /* @__PURE__ */ Q.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), Vi = /* @__PURE__ */ Kr.fromClass(class {
|
|
2604
2604
|
constructor(e) {
|
|
2605
2605
|
this.view = e, this.decorations = this.highlight(e.state.field(xe));
|
|
2606
2606
|
}
|
|
@@ -2611,14 +2611,14 @@ const Ni = /* @__PURE__ */ Q.mark({ class: "cm-searchMatch" }), Ii = /* @__PURE_
|
|
|
2611
2611
|
highlight({ query: e, panel: t }) {
|
|
2612
2612
|
if (!t || !e.spec.valid)
|
|
2613
2613
|
return Q.none;
|
|
2614
|
-
let { view: r } = this, n = new
|
|
2614
|
+
let { view: r } = this, n = new uo();
|
|
2615
2615
|
for (let o = 0, i = r.visibleRanges, a = i.length; o < a; o++) {
|
|
2616
2616
|
let { from: c, to: l } = i[o];
|
|
2617
2617
|
for (; o < a - 1 && l > i[o + 1].from - 2 * 250; )
|
|
2618
2618
|
l = i[++o].to;
|
|
2619
|
-
e.highlight(r.state, c, l, (
|
|
2620
|
-
let
|
|
2621
|
-
n.add(
|
|
2619
|
+
e.highlight(r.state, c, l, (d, f) => {
|
|
2620
|
+
let v = r.state.selection.ranges.some((R) => R.from == d && R.to == f);
|
|
2621
|
+
n.add(d, f, v ? Yi : qi);
|
|
2622
2622
|
});
|
|
2623
2623
|
}
|
|
2624
2624
|
return n.finish();
|
|
@@ -2629,7 +2629,7 @@ const Ni = /* @__PURE__ */ Q.mark({ class: "cm-searchMatch" }), Ii = /* @__PURE_
|
|
|
2629
2629
|
function ot(e) {
|
|
2630
2630
|
return (t) => {
|
|
2631
2631
|
let r = t.state.field(xe, !1);
|
|
2632
|
-
return r && r.query.spec.valid ? e(t, r) :
|
|
2632
|
+
return r && r.query.spec.valid ? e(t, r) : _n(t);
|
|
2633
2633
|
};
|
|
2634
2634
|
}
|
|
2635
2635
|
const xt = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
@@ -2641,7 +2641,7 @@ const xt = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
|
2641
2641
|
selection: o,
|
|
2642
2642
|
effects: [nr(e, n), i.scrollToMatch(o.main, e)],
|
|
2643
2643
|
userEvent: "select.search"
|
|
2644
|
-
}),
|
|
2644
|
+
}), wn(e), !0;
|
|
2645
2645
|
}), Et = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
2646
2646
|
let { state: r } = e, { from: n } = r.selection.main, o = t.prevMatch(r, n, n);
|
|
2647
2647
|
if (!o)
|
|
@@ -2651,14 +2651,14 @@ const xt = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
|
2651
2651
|
selection: i,
|
|
2652
2652
|
effects: [nr(e, o), a.scrollToMatch(i.main, e)],
|
|
2653
2653
|
userEvent: "select.search"
|
|
2654
|
-
}),
|
|
2655
|
-
}),
|
|
2654
|
+
}), wn(e), !0;
|
|
2655
|
+
}), zi = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
2656
2656
|
let r = t.matchAll(e.state, 1e3);
|
|
2657
2657
|
return !r || !r.length ? !1 : (e.dispatch({
|
|
2658
2658
|
selection: le.create(r.map((n) => le.range(n.from, n.to))),
|
|
2659
2659
|
userEvent: "select.search.matches"
|
|
2660
2660
|
}), !0);
|
|
2661
|
-
}),
|
|
2661
|
+
}), Ui = ({ state: e, dispatch: t }) => {
|
|
2662
2662
|
let r = e.selection;
|
|
2663
2663
|
if (r.ranges.length > 1 || r.main.empty)
|
|
2664
2664
|
return !1;
|
|
@@ -2672,23 +2672,23 @@ const xt = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
|
2672
2672
|
selection: le.create(i, a),
|
|
2673
2673
|
userEvent: "select.search.matches"
|
|
2674
2674
|
})), !0;
|
|
2675
|
-
},
|
|
2675
|
+
}, Yr = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
2676
2676
|
let { state: r } = e, { from: n, to: o } = r.selection.main;
|
|
2677
2677
|
if (r.readOnly)
|
|
2678
2678
|
return !1;
|
|
2679
2679
|
let i = t.nextMatch(r, n, n);
|
|
2680
2680
|
if (!i)
|
|
2681
2681
|
return !1;
|
|
2682
|
-
let a = i, c = [], l,
|
|
2683
|
-
a.from == n && a.to == o && (
|
|
2684
|
-
let
|
|
2685
|
-
return a && (l = le.single(a.from, a.to).map(
|
|
2686
|
-
changes:
|
|
2682
|
+
let a = i, c = [], l, d, f = [];
|
|
2683
|
+
a.from == n && a.to == o && (d = r.toText(t.getReplacement(a)), c.push({ from: a.from, to: a.to, insert: d }), a = t.nextMatch(r, a.from, a.to), f.push(V.announce.of(r.phrase("replaced match on line $", r.doc.lineAt(n).number) + ".")));
|
|
2684
|
+
let v = e.state.changes(c);
|
|
2685
|
+
return a && (l = le.single(a.from, a.to).map(v), f.push(nr(e, a)), f.push(r.facet(_e).scrollToMatch(l.main, e))), e.dispatch({
|
|
2686
|
+
changes: v,
|
|
2687
2687
|
selection: l,
|
|
2688
2688
|
effects: f,
|
|
2689
2689
|
userEvent: "input.replace"
|
|
2690
2690
|
}), !0;
|
|
2691
|
-
}),
|
|
2691
|
+
}), Bi = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
2692
2692
|
if (e.state.readOnly)
|
|
2693
2693
|
return !1;
|
|
2694
2694
|
let r = t.matchAll(e.state, 1e9).map((o) => {
|
|
@@ -2712,27 +2712,27 @@ function Ut(e, t) {
|
|
|
2712
2712
|
let c = e.selection.main, l = c.empty || c.to > c.from + 100 ? "" : e.sliceDoc(c.from, c.to);
|
|
2713
2713
|
if (t && !l)
|
|
2714
2714
|
return t;
|
|
2715
|
-
let
|
|
2716
|
-
return new
|
|
2717
|
-
search: ((r = t == null ? void 0 : t.literal) !== null && r !== void 0 ? r :
|
|
2718
|
-
caseSensitive: (n = t == null ? void 0 : t.caseSensitive) !== null && n !== void 0 ? n :
|
|
2719
|
-
literal: (o = t == null ? void 0 : t.literal) !== null && o !== void 0 ? o :
|
|
2720
|
-
regexp: (i = t == null ? void 0 : t.regexp) !== null && i !== void 0 ? i :
|
|
2721
|
-
wholeWord: (a = t == null ? void 0 : t.wholeWord) !== null && a !== void 0 ? a :
|
|
2715
|
+
let d = e.facet(_e);
|
|
2716
|
+
return new Sn({
|
|
2717
|
+
search: ((r = t == null ? void 0 : t.literal) !== null && r !== void 0 ? r : d.literal) ? l : l.replace(/\n/g, "\\n"),
|
|
2718
|
+
caseSensitive: (n = t == null ? void 0 : t.caseSensitive) !== null && n !== void 0 ? n : d.caseSensitive,
|
|
2719
|
+
literal: (o = t == null ? void 0 : t.literal) !== null && o !== void 0 ? o : d.literal,
|
|
2720
|
+
regexp: (i = t == null ? void 0 : t.regexp) !== null && i !== void 0 ? i : d.regexp,
|
|
2721
|
+
wholeWord: (a = t == null ? void 0 : t.wholeWord) !== null && a !== void 0 ? a : d.wholeWord
|
|
2722
2722
|
});
|
|
2723
2723
|
}
|
|
2724
|
-
function
|
|
2724
|
+
function Rn(e) {
|
|
2725
2725
|
let t = dt(e, rr);
|
|
2726
2726
|
return t && t.dom.querySelector("[main-field]");
|
|
2727
2727
|
}
|
|
2728
|
-
function
|
|
2729
|
-
let t =
|
|
2728
|
+
function wn(e) {
|
|
2729
|
+
let t = Rn(e);
|
|
2730
2730
|
t && t == e.root.activeElement && t.select();
|
|
2731
2731
|
}
|
|
2732
|
-
const
|
|
2732
|
+
const _n = (e) => {
|
|
2733
2733
|
let t = e.state.field(xe, !1);
|
|
2734
2734
|
if (t && t.panel) {
|
|
2735
|
-
let r =
|
|
2735
|
+
let r = Rn(e);
|
|
2736
2736
|
if (r && r != e.root.activeElement) {
|
|
2737
2737
|
let n = Ut(e.state, t.query.spec);
|
|
2738
2738
|
n.valid && e.dispatch({ effects: tt.of(n) }), r.focus(), r.select();
|
|
@@ -2743,26 +2743,26 @@ const Rn = (e) => {
|
|
|
2743
2743
|
t ? tt.of(Ut(e.state, t.query.spec)) : je.appendConfig.of(Bt)
|
|
2744
2744
|
] });
|
|
2745
2745
|
return !0;
|
|
2746
|
-
},
|
|
2746
|
+
}, Tn = (e) => {
|
|
2747
2747
|
let t = e.state.field(xe, !1);
|
|
2748
2748
|
if (!t || !t.panel)
|
|
2749
2749
|
return !1;
|
|
2750
2750
|
let r = dt(e, rr);
|
|
2751
2751
|
return r && r.dom.contains(e.root.activeElement) && e.focus(), e.dispatch({ effects: tr.of(!1) }), !0;
|
|
2752
|
-
},
|
|
2753
|
-
{ key: "Mod-f", run:
|
|
2752
|
+
}, kn = [
|
|
2753
|
+
{ key: "Mod-f", run: _n, scope: "editor search-panel" },
|
|
2754
2754
|
{ key: "F3", run: xt, shift: Et, scope: "editor search-panel", preventDefault: !0 },
|
|
2755
2755
|
{ key: "Mod-g", run: xt, shift: Et, scope: "editor search-panel", preventDefault: !0 },
|
|
2756
|
-
{ key: "Escape", run:
|
|
2757
|
-
{ key: "Mod-Shift-l", run:
|
|
2758
|
-
{ key: "Mod-Alt-g", run:
|
|
2759
|
-
{ key: "Mod-d", run:
|
|
2756
|
+
{ key: "Escape", run: Tn, scope: "editor search-panel" },
|
|
2757
|
+
{ key: "Mod-Shift-l", run: Ui },
|
|
2758
|
+
{ key: "Mod-Alt-g", run: _i },
|
|
2759
|
+
{ key: "Mod-d", run: Ni, preventDefault: !0 }
|
|
2760
2760
|
];
|
|
2761
|
-
class
|
|
2761
|
+
class Gi {
|
|
2762
2762
|
constructor(t) {
|
|
2763
2763
|
this.view = t;
|
|
2764
2764
|
let r = this.query = t.state.field(xe).query.spec;
|
|
2765
|
-
this.commit = this.commit.bind(this), this.searchField =
|
|
2765
|
+
this.commit = this.commit.bind(this), this.searchField = K("input", {
|
|
2766
2766
|
value: r.search,
|
|
2767
2767
|
placeholder: re(t, "Find"),
|
|
2768
2768
|
"aria-label": re(t, "Find"),
|
|
@@ -2772,7 +2772,7 @@ class Yi {
|
|
|
2772
2772
|
"main-field": "true",
|
|
2773
2773
|
onchange: this.commit,
|
|
2774
2774
|
onkeyup: this.commit
|
|
2775
|
-
}), this.replaceField =
|
|
2775
|
+
}), this.replaceField = K("input", {
|
|
2776
2776
|
value: r.replace,
|
|
2777
2777
|
placeholder: re(t, "Replace"),
|
|
2778
2778
|
"aria-label": re(t, "Replace"),
|
|
@@ -2781,19 +2781,19 @@ class Yi {
|
|
|
2781
2781
|
form: "",
|
|
2782
2782
|
onchange: this.commit,
|
|
2783
2783
|
onkeyup: this.commit
|
|
2784
|
-
}), this.caseField =
|
|
2784
|
+
}), this.caseField = K("input", {
|
|
2785
2785
|
type: "checkbox",
|
|
2786
2786
|
name: "case",
|
|
2787
2787
|
form: "",
|
|
2788
2788
|
checked: r.caseSensitive,
|
|
2789
2789
|
onchange: this.commit
|
|
2790
|
-
}), this.reField =
|
|
2790
|
+
}), this.reField = K("input", {
|
|
2791
2791
|
type: "checkbox",
|
|
2792
2792
|
name: "re",
|
|
2793
2793
|
form: "",
|
|
2794
2794
|
checked: r.regexp,
|
|
2795
2795
|
onchange: this.commit
|
|
2796
|
-
}), this.wordField =
|
|
2796
|
+
}), this.wordField = K("input", {
|
|
2797
2797
|
type: "checkbox",
|
|
2798
2798
|
name: "word",
|
|
2799
2799
|
form: "",
|
|
@@ -2801,32 +2801,32 @@ class Yi {
|
|
|
2801
2801
|
onchange: this.commit
|
|
2802
2802
|
});
|
|
2803
2803
|
function n(o, i, a) {
|
|
2804
|
-
return
|
|
2804
|
+
return K("button", { class: "cm-button", name: o, onclick: i, type: "button" }, a);
|
|
2805
2805
|
}
|
|
2806
|
-
this.dom =
|
|
2806
|
+
this.dom = K("div", { onkeydown: (o) => this.keydown(o), class: "cm-search" }, [
|
|
2807
2807
|
this.searchField,
|
|
2808
2808
|
n("next", () => xt(t), [re(t, "next")]),
|
|
2809
2809
|
n("prev", () => Et(t), [re(t, "previous")]),
|
|
2810
|
-
n("select", () =>
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2810
|
+
n("select", () => zi(t), [re(t, "all")]),
|
|
2811
|
+
K("label", null, [this.caseField, re(t, "match case")]),
|
|
2812
|
+
K("label", null, [this.reField, re(t, "regexp")]),
|
|
2813
|
+
K("label", null, [this.wordField, re(t, "by word")]),
|
|
2814
2814
|
...t.state.readOnly ? [] : [
|
|
2815
|
-
|
|
2815
|
+
K("br"),
|
|
2816
2816
|
this.replaceField,
|
|
2817
|
-
n("replace", () =>
|
|
2818
|
-
n("replaceAll", () =>
|
|
2817
|
+
n("replace", () => Yr(t), [re(t, "replace")]),
|
|
2818
|
+
n("replaceAll", () => Bi(t), [re(t, "replace all")])
|
|
2819
2819
|
],
|
|
2820
|
-
|
|
2820
|
+
K("button", {
|
|
2821
2821
|
name: "close",
|
|
2822
|
-
onclick: () =>
|
|
2822
|
+
onclick: () => Tn(t),
|
|
2823
2823
|
"aria-label": re(t, "close"),
|
|
2824
2824
|
type: "button"
|
|
2825
2825
|
}, ["×"])
|
|
2826
2826
|
]);
|
|
2827
2827
|
}
|
|
2828
2828
|
commit() {
|
|
2829
|
-
let t = new
|
|
2829
|
+
let t = new Sn({
|
|
2830
2830
|
search: this.searchField.value,
|
|
2831
2831
|
caseSensitive: this.caseField.checked,
|
|
2832
2832
|
regexp: this.reField.checked,
|
|
@@ -2836,7 +2836,7 @@ class Yi {
|
|
|
2836
2836
|
t.eq(this.query) || (this.query = t, this.view.dispatch({ effects: tt.of(t) }));
|
|
2837
2837
|
}
|
|
2838
2838
|
keydown(t) {
|
|
2839
|
-
|
|
2839
|
+
Zn(this.view, t, "search-panel") ? t.preventDefault() : t.keyCode == 13 && t.target == this.searchField ? (t.preventDefault(), (t.shiftKey ? Et : xt)(this.view)) : t.keyCode == 13 && t.target == this.replaceField && (t.preventDefault(), Yr(this.view));
|
|
2840
2840
|
}
|
|
2841
2841
|
update(t) {
|
|
2842
2842
|
for (let r of t.transactions)
|
|
@@ -2878,7 +2878,7 @@ function nr(e, { from: t, to: r }) {
|
|
|
2878
2878
|
}
|
|
2879
2879
|
return V.announce.of(`${e.state.phrase("current match")}. ${c} ${e.state.phrase("on line")} ${n.number}.`);
|
|
2880
2880
|
}
|
|
2881
|
-
const
|
|
2881
|
+
const Ki = /* @__PURE__ */ V.baseTheme({
|
|
2882
2882
|
".cm-panel.cm-search": {
|
|
2883
2883
|
padding: "2px 6px 4px",
|
|
2884
2884
|
position: "relative",
|
|
@@ -2909,9 +2909,9 @@ const Vi = /* @__PURE__ */ V.baseTheme({
|
|
|
2909
2909
|
"&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
|
|
2910
2910
|
}), Bt = [
|
|
2911
2911
|
xe,
|
|
2912
|
-
/* @__PURE__ */
|
|
2913
|
-
|
|
2914
|
-
],
|
|
2912
|
+
/* @__PURE__ */ Zr.low(Vi),
|
|
2913
|
+
Ki
|
|
2914
|
+
], ds = {
|
|
2915
2915
|
// 搜索面板标题
|
|
2916
2916
|
Search: "搜索",
|
|
2917
2917
|
Replace: "替换",
|
|
@@ -2944,7 +2944,7 @@ const Vi = /* @__PURE__ */ V.baseTheme({
|
|
|
2944
2944
|
"Query too long": "查询内容过长",
|
|
2945
2945
|
"Search string too long": "搜索字符串过长"
|
|
2946
2946
|
};
|
|
2947
|
-
function
|
|
2947
|
+
function Hi() {
|
|
2948
2948
|
return V.theme({
|
|
2949
2949
|
// 搜索面板样式优化
|
|
2950
2950
|
".cm-panel.cm-search": {
|
|
@@ -2964,7 +2964,7 @@ function zi() {
|
|
|
2964
2964
|
}
|
|
2965
2965
|
});
|
|
2966
2966
|
}
|
|
2967
|
-
function
|
|
2967
|
+
function Ji(e) {
|
|
2968
2968
|
setTimeout(() => {
|
|
2969
2969
|
const t = e.dom.querySelector(".cm-panel.cm-search");
|
|
2970
2970
|
if (!t) return;
|
|
@@ -3009,33 +3009,33 @@ function Ui(e) {
|
|
|
3009
3009
|
});
|
|
3010
3010
|
}, 100);
|
|
3011
3011
|
}
|
|
3012
|
-
function
|
|
3012
|
+
function Vr() {
|
|
3013
3013
|
return [
|
|
3014
|
-
|
|
3014
|
+
Hi(),
|
|
3015
3015
|
// 中文样式
|
|
3016
|
-
|
|
3016
|
+
En({
|
|
3017
3017
|
top: !0
|
|
3018
3018
|
// 搜索面板显示在顶部
|
|
3019
3019
|
}),
|
|
3020
3020
|
er(),
|
|
3021
3021
|
// 高亮相同的选中文本
|
|
3022
|
-
|
|
3022
|
+
Ee.of(kn),
|
|
3023
3023
|
// 搜索相关的键盘快捷键
|
|
3024
3024
|
// 监听 DOM 变化以应用中文翻译
|
|
3025
3025
|
V.updateListener.of((e) => {
|
|
3026
|
-
e.view.dom.querySelector(".cm-panel.cm-search") &&
|
|
3026
|
+
e.view.dom.querySelector(".cm-panel.cm-search") && Ji(e.view);
|
|
3027
3027
|
})
|
|
3028
3028
|
];
|
|
3029
3029
|
}
|
|
3030
|
-
function
|
|
3030
|
+
function ps() {
|
|
3031
3031
|
return [er()];
|
|
3032
3032
|
}
|
|
3033
|
-
function
|
|
3034
|
-
return [
|
|
3033
|
+
function zr() {
|
|
3034
|
+
return [En({
|
|
3035
3035
|
top: !0
|
|
3036
|
-
}), er(),
|
|
3036
|
+
}), er(), Ee.of(kn)];
|
|
3037
3037
|
}
|
|
3038
|
-
const
|
|
3038
|
+
const ms = [
|
|
3039
3039
|
{
|
|
3040
3040
|
key: "Ctrl-f",
|
|
3041
3041
|
mac: "Cmd-f",
|
|
@@ -3052,7 +3052,7 @@ const us = [
|
|
|
3052
3052
|
run: () => !0
|
|
3053
3053
|
}
|
|
3054
3054
|
// 查找上一个的替代快捷键
|
|
3055
|
-
],
|
|
3055
|
+
], Qi = ({
|
|
3056
3056
|
value: e,
|
|
3057
3057
|
onChange: t,
|
|
3058
3058
|
extensions: r = [],
|
|
@@ -3062,128 +3062,130 @@ const us = [
|
|
|
3062
3062
|
style: a = {},
|
|
3063
3063
|
placeholder: c = "",
|
|
3064
3064
|
showLineNumbers: l = !0,
|
|
3065
|
-
onEditorViewCreated:
|
|
3065
|
+
onEditorViewCreated: d,
|
|
3066
3066
|
locale: f = "zh-CN"
|
|
3067
|
-
},
|
|
3068
|
-
const
|
|
3067
|
+
}, v) => {
|
|
3068
|
+
const R = ue(null), m = ue();
|
|
3069
3069
|
return ge(() => {
|
|
3070
|
-
if (!
|
|
3071
|
-
const
|
|
3072
|
-
|
|
3070
|
+
if (!R.current) return;
|
|
3071
|
+
const w = [
|
|
3072
|
+
Er(),
|
|
3073
|
+
Ee.of([...Sr, Dt, {
|
|
3073
3074
|
key: "Enter",
|
|
3074
|
-
run:
|
|
3075
|
+
run: Cr
|
|
3075
3076
|
}]),
|
|
3076
3077
|
V.lineWrapping,
|
|
3077
|
-
pt(
|
|
3078
|
+
pt(Rr),
|
|
3078
3079
|
be.allowMultipleSelections.of(!0),
|
|
3079
|
-
f === "zh-CN" ?
|
|
3080
|
+
f === "zh-CN" ? Vr() : zr(),
|
|
3080
3081
|
c ? br(c) : [],
|
|
3081
3082
|
// 行号功能,根据配置决定是否启用
|
|
3082
3083
|
l ? xr() : [],
|
|
3083
|
-
V.updateListener.of((
|
|
3084
|
-
if (
|
|
3085
|
-
const
|
|
3086
|
-
value:
|
|
3084
|
+
V.updateListener.of((S) => {
|
|
3085
|
+
if (S.docChanged && t) {
|
|
3086
|
+
const y = {
|
|
3087
|
+
value: S.state.doc.toString(),
|
|
3087
3088
|
readOnlyRanges: []
|
|
3088
3089
|
// 基础编辑器没有只读区域逻辑,由特定编辑器实现
|
|
3089
3090
|
};
|
|
3090
|
-
t(
|
|
3091
|
+
t(y);
|
|
3091
3092
|
}
|
|
3092
3093
|
})
|
|
3093
3094
|
];
|
|
3094
|
-
o &&
|
|
3095
|
-
const
|
|
3095
|
+
o && w.push(be.readOnly.of(!0));
|
|
3096
|
+
const g = be.create({
|
|
3096
3097
|
doc: e,
|
|
3097
|
-
extensions: [...
|
|
3098
|
+
extensions: [...w, ...r]
|
|
3098
3099
|
}), x = new V({
|
|
3099
|
-
state:
|
|
3100
|
-
parent:
|
|
3100
|
+
state: g,
|
|
3101
|
+
parent: R.current
|
|
3101
3102
|
});
|
|
3102
|
-
return
|
|
3103
|
-
var
|
|
3104
|
-
(
|
|
3103
|
+
return m.current = x, d && d(x), () => {
|
|
3104
|
+
var S;
|
|
3105
|
+
(S = m.current) == null || S.destroy();
|
|
3105
3106
|
};
|
|
3106
3107
|
}, []), ge(() => {
|
|
3107
|
-
|
|
3108
|
+
m.current && e !== m.current.state.doc.toString() && m.current.dispatch({
|
|
3108
3109
|
changes: {
|
|
3109
3110
|
from: 0,
|
|
3110
|
-
to:
|
|
3111
|
+
to: m.current.state.doc.length,
|
|
3111
3112
|
insert: e
|
|
3112
3113
|
}
|
|
3113
3114
|
});
|
|
3114
3115
|
}, [e]), ge(() => {
|
|
3115
|
-
if (!
|
|
3116
|
-
const
|
|
3117
|
-
|
|
3118
|
-
const
|
|
3119
|
-
|
|
3116
|
+
if (!m.current || !R.current) return;
|
|
3117
|
+
const w = m.current.state.doc.toString();
|
|
3118
|
+
m.current.destroy();
|
|
3119
|
+
const g = [
|
|
3120
|
+
Er(),
|
|
3121
|
+
Ee.of([...Sr, Dt, {
|
|
3120
3122
|
key: "Enter",
|
|
3121
|
-
run:
|
|
3123
|
+
run: Cr
|
|
3122
3124
|
}]),
|
|
3123
3125
|
V.lineWrapping,
|
|
3124
|
-
pt(
|
|
3126
|
+
pt(Rr),
|
|
3125
3127
|
be.allowMultipleSelections.of(!0),
|
|
3126
|
-
f === "zh-CN" ?
|
|
3128
|
+
f === "zh-CN" ? Vr() : zr(),
|
|
3127
3129
|
c ? br(c) : [],
|
|
3128
3130
|
// 行号功能,根据配置决定是否启用
|
|
3129
3131
|
l ? xr() : [],
|
|
3130
|
-
V.updateListener.of((
|
|
3131
|
-
if (
|
|
3132
|
-
const
|
|
3133
|
-
value:
|
|
3132
|
+
V.updateListener.of((y) => {
|
|
3133
|
+
if (y.docChanged && t) {
|
|
3134
|
+
const C = {
|
|
3135
|
+
value: y.state.doc.toString(),
|
|
3134
3136
|
readOnlyRanges: []
|
|
3135
3137
|
// 基础编辑器没有只读区域逻辑,由特定编辑器实现
|
|
3136
3138
|
};
|
|
3137
|
-
t(
|
|
3139
|
+
t(C);
|
|
3138
3140
|
}
|
|
3139
3141
|
})
|
|
3140
3142
|
];
|
|
3141
|
-
o &&
|
|
3143
|
+
o && g.push(be.readOnly.of(!0));
|
|
3142
3144
|
const x = be.create({
|
|
3143
|
-
doc:
|
|
3144
|
-
extensions: [...
|
|
3145
|
-
}),
|
|
3145
|
+
doc: w,
|
|
3146
|
+
extensions: [...g, ...r]
|
|
3147
|
+
}), S = new V({
|
|
3146
3148
|
state: x,
|
|
3147
|
-
parent:
|
|
3149
|
+
parent: R.current
|
|
3148
3150
|
});
|
|
3149
|
-
|
|
3150
|
-
}, [o, l]),
|
|
3151
|
-
insertTextAtCursor: (
|
|
3152
|
-
const
|
|
3153
|
-
|
|
3151
|
+
m.current = S, d && d(S);
|
|
3152
|
+
}, [o, l]), Xn(v, () => ({
|
|
3153
|
+
insertTextAtCursor: (w) => {
|
|
3154
|
+
const g = m.current;
|
|
3155
|
+
g && (g.dispatch(g.state.replaceSelection(w)), g.focus());
|
|
3154
3156
|
},
|
|
3155
|
-
goToPosition: (
|
|
3156
|
-
const
|
|
3157
|
-
if (
|
|
3158
|
-
const x =
|
|
3159
|
-
|
|
3157
|
+
goToPosition: (w) => {
|
|
3158
|
+
const g = m.current;
|
|
3159
|
+
if (g) {
|
|
3160
|
+
const x = g.state.doc.length, S = Math.max(0, Math.min(w, x));
|
|
3161
|
+
g.dispatch({
|
|
3160
3162
|
selection: {
|
|
3161
|
-
anchor:
|
|
3162
|
-
head:
|
|
3163
|
+
anchor: S,
|
|
3164
|
+
head: S
|
|
3163
3165
|
},
|
|
3164
3166
|
scrollIntoView: !0
|
|
3165
|
-
}),
|
|
3167
|
+
}), g.focus();
|
|
3166
3168
|
}
|
|
3167
3169
|
},
|
|
3168
|
-
goToLine: (
|
|
3169
|
-
const x =
|
|
3170
|
+
goToLine: (w, g = 0) => {
|
|
3171
|
+
const x = m.current;
|
|
3170
3172
|
if (x) {
|
|
3171
|
-
const
|
|
3173
|
+
const S = x.state.doc, y = Math.max(1, Math.min(w, S.lines)), C = S.line(y), T = Math.max(0, Math.min(g, C.length)) + C.from;
|
|
3172
3174
|
x.dispatch({
|
|
3173
3175
|
selection: {
|
|
3174
|
-
anchor:
|
|
3175
|
-
head:
|
|
3176
|
+
anchor: T,
|
|
3177
|
+
head: T
|
|
3176
3178
|
},
|
|
3177
3179
|
scrollIntoView: !0
|
|
3178
3180
|
}), x.focus();
|
|
3179
3181
|
}
|
|
3180
3182
|
},
|
|
3181
|
-
getEditorView: () =>
|
|
3182
|
-
})), /* @__PURE__ */ wt("div", { ref:
|
|
3183
|
+
getEditorView: () => m.current
|
|
3184
|
+
})), /* @__PURE__ */ wt("div", { ref: R, className: `senyao-editor ${o ? "disabled" : ""} ${i}`, style: {
|
|
3183
3185
|
height: n,
|
|
3184
3186
|
...a
|
|
3185
3187
|
} });
|
|
3186
|
-
}, or = rt(
|
|
3188
|
+
}, or = rt(Qi), Xi = ({
|
|
3187
3189
|
value: e,
|
|
3188
3190
|
onChange: t,
|
|
3189
3191
|
language: r = "json",
|
|
@@ -3193,11 +3195,11 @@ const us = [
|
|
|
3193
3195
|
...a
|
|
3194
3196
|
}, c) => {
|
|
3195
3197
|
const l = ht(() => {
|
|
3196
|
-
const
|
|
3197
|
-
return [
|
|
3198
|
+
const d = pi(r) ? di(r) : [], f = xi(o);
|
|
3199
|
+
return [d, f, ...n];
|
|
3198
3200
|
}, [r, n, o]);
|
|
3199
3201
|
return /* @__PURE__ */ wt(or, { ref: c, value: e, onChange: t, extensions: l, showLineNumbers: i, ...a });
|
|
3200
|
-
},
|
|
3202
|
+
}, gs = rt(Xi), Zi = ({
|
|
3201
3203
|
value: e,
|
|
3202
3204
|
onChange: t,
|
|
3203
3205
|
extensions: r = [],
|
|
@@ -3206,72 +3208,72 @@ const us = [
|
|
|
3206
3208
|
showLineNumbers: i = !0,
|
|
3207
3209
|
...a
|
|
3208
3210
|
}, c) => {
|
|
3209
|
-
const l = ue(null), f = ((b) => b != null && typeof b == "object" && "value" in b)(e),
|
|
3211
|
+
const l = ue(null), f = ((b) => b != null && typeof b == "object" && "value" in b)(e), v = f ? e.value : e, R = (f && "readOnlyRanges" in e ? e.readOnlyRanges : n) ?? [], [m, w] = Ft(v ?? ""), g = ue(null), [x, S] = Ft(R), y = ue(m), [C, T] = Ft(null), h = ue(!1), q = ue(/* @__PURE__ */ new Map()), $ = ue(!1);
|
|
3210
3212
|
ge(() => {
|
|
3211
|
-
if (o &&
|
|
3213
|
+
if (o && R.length > 0 && !C) {
|
|
3212
3214
|
const b = [];
|
|
3213
|
-
let
|
|
3214
|
-
for (let
|
|
3215
|
-
const
|
|
3216
|
-
|
|
3217
|
-
content:
|
|
3215
|
+
let k = 0;
|
|
3216
|
+
for (let M = 0; M < R.length; M++) {
|
|
3217
|
+
const A = R[M];
|
|
3218
|
+
A.start > k && b.push({
|
|
3219
|
+
content: m.substring(k, A.start),
|
|
3218
3220
|
editable: !0
|
|
3219
3221
|
}), b.push({
|
|
3220
|
-
content:
|
|
3222
|
+
content: m.substring(A.start, A.end),
|
|
3221
3223
|
editable: !1
|
|
3222
|
-
}),
|
|
3224
|
+
}), k = A.end;
|
|
3223
3225
|
}
|
|
3224
|
-
|
|
3225
|
-
content:
|
|
3226
|
+
k < m.length && b.push({
|
|
3227
|
+
content: m.substring(k),
|
|
3226
3228
|
editable: !0
|
|
3227
|
-
}),
|
|
3228
|
-
}
|
|
3229
|
-
}, [o,
|
|
3230
|
-
if (
|
|
3231
|
-
const b = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"],
|
|
3232
|
-
b.forEach((
|
|
3233
|
-
const
|
|
3234
|
-
|
|
3235
|
-
}), q.current =
|
|
3229
|
+
}), T(b);
|
|
3230
|
+
}
|
|
3231
|
+
}, [o, R, m, C]), ge(() => {
|
|
3232
|
+
if (m) {
|
|
3233
|
+
const b = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], k = /* @__PURE__ */ new Map();
|
|
3234
|
+
b.forEach((M) => {
|
|
3235
|
+
const A = m.indexOf(M);
|
|
3236
|
+
A >= 0 && k.set(M, A);
|
|
3237
|
+
}), q.current = k;
|
|
3236
3238
|
}
|
|
3237
3239
|
}, []);
|
|
3238
3240
|
const Ye = ht(() => {
|
|
3239
|
-
const b = [
|
|
3240
|
-
return x.length > 0 && b.push(
|
|
3241
|
-
}, [r, x]),
|
|
3242
|
-
const
|
|
3243
|
-
return
|
|
3244
|
-
}, []), Te = se((b,
|
|
3241
|
+
const b = [Br(), Jr()];
|
|
3242
|
+
return x.length > 0 && b.push(Ei(x)), [...b, ...r];
|
|
3243
|
+
}, [r, x]), Se = se((b, k, M = 0) => {
|
|
3244
|
+
const A = b.indexOf(k, M);
|
|
3245
|
+
return A >= 0 ? A : null;
|
|
3246
|
+
}, []), Te = se((b, k) => {
|
|
3245
3247
|
if (!o || !b || b.length === 0) return b;
|
|
3246
|
-
const
|
|
3247
|
-
let
|
|
3248
|
+
const M = [...b];
|
|
3249
|
+
let A = 0;
|
|
3248
3250
|
for (let G = 0; G < b.length; G++) {
|
|
3249
3251
|
const oe = b[G];
|
|
3250
3252
|
if (!oe.editable) {
|
|
3251
|
-
const me =
|
|
3252
|
-
me !== null && (G > 0 && b[G - 1].editable && me >
|
|
3253
|
-
...
|
|
3254
|
-
content:
|
|
3255
|
-
}),
|
|
3253
|
+
const me = Se(k, oe.content, A);
|
|
3254
|
+
me !== null && (G > 0 && b[G - 1].editable && me > A && (M[G - 1] = {
|
|
3255
|
+
...M[G - 1],
|
|
3256
|
+
content: k.substring(A, me)
|
|
3257
|
+
}), A = me + oe.content.length);
|
|
3256
3258
|
}
|
|
3257
3259
|
}
|
|
3258
3260
|
const Y = b[b.length - 1];
|
|
3259
|
-
return Y.editable &&
|
|
3261
|
+
return Y.editable && A < k.length && (M[b.length - 1] = {
|
|
3260
3262
|
...Y,
|
|
3261
|
-
content:
|
|
3263
|
+
content: k.substring(A)
|
|
3264
|
+
}), M;
|
|
3265
|
+
}, [o, Se]), ke = se((b) => {
|
|
3266
|
+
let k = !1;
|
|
3267
|
+
return q.current.forEach((M, A) => {
|
|
3268
|
+
const Y = b.indexOf(A);
|
|
3269
|
+
Y >= 0 && Math.abs(Y - M) > 0 && (q.current.set(A, Y), Y > M && (M === 0 || M < 15) && (k = !0));
|
|
3262
3270
|
}), k;
|
|
3263
|
-
}, [
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
const Y = b.indexOf(O);
|
|
3267
|
-
Y >= 0 && Math.abs(Y - k) > 0 && (q.current.set(O, Y), Y > k && (k === 0 || k < 15) && (T = !0));
|
|
3268
|
-
}), T;
|
|
3269
|
-
}, []), Se = se(() => {
|
|
3270
|
-
if (!m.current) return;
|
|
3271
|
-
const b = m.current, T = b.state.doc.toString(), k = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], O = b.state.selection;
|
|
3271
|
+
}, []), Ce = se(() => {
|
|
3272
|
+
if (!g.current) return;
|
|
3273
|
+
const b = g.current, k = b.state.doc.toString(), M = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], A = b.state.selection;
|
|
3272
3274
|
let Y = !1;
|
|
3273
|
-
for (const G of
|
|
3274
|
-
const oe =
|
|
3275
|
+
for (const G of M) {
|
|
3276
|
+
const oe = k.indexOf(G);
|
|
3275
3277
|
if (oe >= 0) {
|
|
3276
3278
|
b.dispatch({
|
|
3277
3279
|
selection: {
|
|
@@ -3285,150 +3287,175 @@ const us = [
|
|
|
3285
3287
|
}
|
|
3286
3288
|
Y && setTimeout(() => {
|
|
3287
3289
|
b.dom && document.contains(b.dom) && b.dispatch({
|
|
3288
|
-
selection:
|
|
3290
|
+
selection: A,
|
|
3289
3291
|
scrollIntoView: !1
|
|
3290
3292
|
});
|
|
3291
3293
|
}, 10);
|
|
3292
3294
|
}, []), Z = se(() => {
|
|
3293
|
-
if (!
|
|
3294
|
-
const b =
|
|
3295
|
-
x.length > 0 && (
|
|
3296
|
-
b.dom && document.contains(b.dom) && (
|
|
3295
|
+
if (!g.current) return;
|
|
3296
|
+
const b = g.current;
|
|
3297
|
+
x.length > 0 && (ve(b, []), setTimeout(() => {
|
|
3298
|
+
b.dom && document.contains(b.dom) && (ve(b, x), setTimeout(() => {
|
|
3297
3299
|
b.dom && document.contains(b.dom) && b.dispatch({});
|
|
3298
3300
|
}, 10));
|
|
3299
3301
|
}, 10));
|
|
3300
3302
|
}, [x]), ce = se((b) => {
|
|
3301
|
-
const
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
}, 10)),
|
|
3305
|
-
const
|
|
3306
|
-
if (o &&
|
|
3307
|
-
const Y = Te(
|
|
3308
|
-
|
|
3303
|
+
const k = b.value, M = y.current;
|
|
3304
|
+
w(k), M !== k && (!M || k.length > (M == null ? void 0 : M.length) && !M.startsWith(k.substring(0, 5)) && k.includes(M.substring(0, 10))) && (h.current = !0, ke(k) && setTimeout(() => {
|
|
3305
|
+
Ce();
|
|
3306
|
+
}, 10)), y.current = k;
|
|
3307
|
+
const A = g.current ? Ri(g.current) : x;
|
|
3308
|
+
if (o && C) {
|
|
3309
|
+
const Y = Te(C, k);
|
|
3310
|
+
T(Y);
|
|
3309
3311
|
const {
|
|
3310
3312
|
readOnlyRanges: G
|
|
3311
|
-
} =
|
|
3312
|
-
|
|
3313
|
-
value:
|
|
3313
|
+
} = Ir(Y);
|
|
3314
|
+
S(G), g.current && ve(g.current, G), t && t({
|
|
3315
|
+
value: k,
|
|
3314
3316
|
readOnlyRanges: G
|
|
3315
3317
|
});
|
|
3316
3318
|
} else
|
|
3317
3319
|
t && t({
|
|
3318
|
-
value:
|
|
3319
|
-
readOnlyRanges:
|
|
3320
|
+
value: k,
|
|
3321
|
+
readOnlyRanges: A
|
|
3320
3322
|
});
|
|
3321
|
-
}, [t, o,
|
|
3323
|
+
}, [t, o, C, x, Te, ke, Ce]);
|
|
3322
3324
|
ge(() => {
|
|
3323
|
-
!o && JSON.stringify(
|
|
3324
|
-
}, [
|
|
3325
|
-
if (o &&
|
|
3325
|
+
!o && JSON.stringify(R) !== JSON.stringify(x) && (S(R), g.current && ve(g.current, R));
|
|
3326
|
+
}, [R, x, o]), ge(() => {
|
|
3327
|
+
if (o && C) {
|
|
3326
3328
|
const {
|
|
3327
3329
|
readOnlyRanges: b
|
|
3328
|
-
} =
|
|
3329
|
-
JSON.stringify(b) !== JSON.stringify(x) && (
|
|
3330
|
+
} = Ir(C);
|
|
3331
|
+
JSON.stringify(b) !== JSON.stringify(x) && (S(b), g.current && ve(g.current, b));
|
|
3330
3332
|
}
|
|
3331
|
-
}, [
|
|
3332
|
-
|
|
3333
|
-
}, [
|
|
3334
|
-
|
|
3333
|
+
}, [C, x, o]), ge(() => {
|
|
3334
|
+
g.current && h.current && (h.current = !1, g.current.dispatch({}));
|
|
3335
|
+
}, [m]), ge(() => {
|
|
3336
|
+
g.current && x.length > 0 && !$.current && ($.current = !0, setTimeout(() => {
|
|
3335
3337
|
Z();
|
|
3336
3338
|
}, 50), setTimeout(() => {
|
|
3337
3339
|
Z();
|
|
3338
3340
|
}, 200));
|
|
3339
3341
|
}, [Z, x]);
|
|
3340
3342
|
const pe = se((b) => {
|
|
3341
|
-
if (
|
|
3342
|
-
|
|
3343
|
-
|
|
3343
|
+
if (g.current = b, x.length > 0 && (ve(b, x), setTimeout(() => {
|
|
3344
|
+
ve(b, []), setTimeout(() => {
|
|
3345
|
+
ve(b, x);
|
|
3344
3346
|
}, 10);
|
|
3345
|
-
}, 50)),
|
|
3346
|
-
const
|
|
3347
|
-
|
|
3348
|
-
const Y =
|
|
3349
|
-
Y >= 0 &&
|
|
3350
|
-
}), q.current =
|
|
3351
|
-
}
|
|
3352
|
-
}, [x,
|
|
3353
|
-
return /* @__PURE__ */ wt(or, { ref: l, value:
|
|
3354
|
-
},
|
|
3347
|
+
}, 50)), m) {
|
|
3348
|
+
const k = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], M = /* @__PURE__ */ new Map();
|
|
3349
|
+
k.forEach((A) => {
|
|
3350
|
+
const Y = m.indexOf(A);
|
|
3351
|
+
Y >= 0 && M.set(A, Y);
|
|
3352
|
+
}), q.current = M;
|
|
3353
|
+
}
|
|
3354
|
+
}, [x, m]);
|
|
3355
|
+
return /* @__PURE__ */ wt(or, { ref: l, value: m, onChange: ce, extensions: Ye, showLineNumbers: i, onEditorViewCreated: pe, ...a });
|
|
3356
|
+
}, ys = rt(Zi), es = (e, t) => {
|
|
3355
3357
|
const {
|
|
3356
3358
|
value: r,
|
|
3357
3359
|
onChange: n,
|
|
3358
3360
|
extensions: o = [],
|
|
3359
3361
|
showLineNumbers: i = !0,
|
|
3360
3362
|
enableFormatting: a = !1,
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
+
enableCodeFolding: c = !0,
|
|
3364
|
+
...l
|
|
3365
|
+
} = e, d = ue(!0), f = ue(null), v = se((y) => {
|
|
3363
3366
|
try {
|
|
3364
|
-
return
|
|
3367
|
+
return y === "" || JSON.parse(y), !0;
|
|
3365
3368
|
} catch {
|
|
3366
3369
|
return !1;
|
|
3367
3370
|
}
|
|
3368
|
-
}, []),
|
|
3371
|
+
}, []), R = se((y) => {
|
|
3369
3372
|
try {
|
|
3370
|
-
if (!
|
|
3371
|
-
const
|
|
3372
|
-
return JSON.stringify(
|
|
3373
|
+
if (!y.trim()) return "";
|
|
3374
|
+
const C = JSON.parse(y);
|
|
3375
|
+
return JSON.stringify(C, null, 2);
|
|
3373
3376
|
} catch {
|
|
3374
|
-
return
|
|
3377
|
+
return y;
|
|
3375
3378
|
}
|
|
3376
|
-
}, []),
|
|
3377
|
-
if (!
|
|
3378
|
-
const
|
|
3379
|
-
if (
|
|
3380
|
-
const
|
|
3379
|
+
}, []), m = se(() => {
|
|
3380
|
+
if (!f.current) return !1;
|
|
3381
|
+
const y = f.current, C = y.state.doc.toString(), T = R(C);
|
|
3382
|
+
if (T === C) return !1;
|
|
3383
|
+
const h = y.state.update({
|
|
3381
3384
|
changes: {
|
|
3382
3385
|
from: 0,
|
|
3383
|
-
to:
|
|
3384
|
-
insert:
|
|
3386
|
+
to: y.state.doc.length,
|
|
3387
|
+
insert: T
|
|
3385
3388
|
}
|
|
3386
3389
|
});
|
|
3387
|
-
return
|
|
3388
|
-
}, [
|
|
3390
|
+
return y.dispatch(h), !0;
|
|
3391
|
+
}, [R]), w = ht(() => Ee.of([{
|
|
3389
3392
|
key: "Alt-f",
|
|
3390
3393
|
mac: "Mod-Alt-f",
|
|
3391
|
-
run: () =>
|
|
3392
|
-
}]), [
|
|
3394
|
+
run: () => m()
|
|
3395
|
+
}]), [m]), g = se((y) => {
|
|
3393
3396
|
if (n) {
|
|
3394
|
-
const
|
|
3395
|
-
|
|
3396
|
-
}
|
|
3397
|
-
}, [n,
|
|
3398
|
-
|
|
3399
|
-
|
|
3397
|
+
const C = v(y.value);
|
|
3398
|
+
d.current = C, n(y);
|
|
3399
|
+
}
|
|
3400
|
+
}, [n, v]), x = ht(() => {
|
|
3401
|
+
const y = [Gr(), no(), eo(), Zr.highest(w), ...o];
|
|
3402
|
+
return c && y.push(oo(), io({
|
|
3403
|
+
markerDOM: (C) => {
|
|
3404
|
+
const T = document.createElement("span");
|
|
3405
|
+
return T.style.cssText = `
|
|
3406
|
+
display: inline-flex;
|
|
3407
|
+
align-items: center;
|
|
3408
|
+
justify-content: center;
|
|
3409
|
+
width: 16px;
|
|
3410
|
+
height: 16px;
|
|
3411
|
+
cursor: pointer;
|
|
3412
|
+
color: #8c8c8c;
|
|
3413
|
+
font-size: 16px;
|
|
3414
|
+
transition: all 0.2s ease;
|
|
3415
|
+
user-select: none;
|
|
3416
|
+
border-radius: 2px;
|
|
3417
|
+
`, T.textContent = C ? "▾" : "▸", T.onmouseenter = () => {
|
|
3418
|
+
T.style.backgroundColor = "rgba(24, 144, 255, 0.08)";
|
|
3419
|
+
}, T.onmouseleave = () => {
|
|
3420
|
+
T.style.backgroundColor = "transparent";
|
|
3421
|
+
}, T;
|
|
3422
|
+
}
|
|
3423
|
+
}), Ee.of(so)), y;
|
|
3424
|
+
}, [w, o, c]), S = se((y) => {
|
|
3425
|
+
f.current = y, a && r && setTimeout(() => {
|
|
3426
|
+
m();
|
|
3400
3427
|
}, 0);
|
|
3401
|
-
}, [a, r,
|
|
3402
|
-
return /* @__PURE__ */ wt(or, { ref: t, value: r, showLineNumbers: i, onChange:
|
|
3403
|
-
},
|
|
3428
|
+
}, [a, r, m]);
|
|
3429
|
+
return /* @__PURE__ */ wt(or, { ref: t, value: r, showLineNumbers: i, onChange: g, extensions: x, onEditorViewCreated: S, ...l });
|
|
3430
|
+
}, vs = rt(es);
|
|
3404
3431
|
export {
|
|
3405
|
-
|
|
3432
|
+
gs as Editor,
|
|
3406
3433
|
or as GenericEditor,
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3434
|
+
vs as JSONEditor,
|
|
3435
|
+
ys as SQLEditor,
|
|
3436
|
+
Ji as applyChinese,
|
|
3437
|
+
Ir as blocksToEditorData,
|
|
3438
|
+
Hi as chineseLanguageExtension,
|
|
3439
|
+
Tn as closeSearchPanel,
|
|
3440
|
+
hs as commonExtensions,
|
|
3441
|
+
mi as createAutocompletionExtension,
|
|
3442
|
+
zr as createEnglishSearchExtension,
|
|
3443
|
+
ps as createHighlightOnlyExtension,
|
|
3444
|
+
gi as createKeymapExtension,
|
|
3445
|
+
fs as createLintExtension,
|
|
3446
|
+
Vr as createSearchExtension,
|
|
3447
|
+
ms as customSearchKeymap,
|
|
3448
|
+
bi as darkTheme,
|
|
3449
|
+
Ri as getCurrentReadOnlyRanges,
|
|
3450
|
+
di as getLanguageExtension,
|
|
3451
|
+
xi as getThemeExtension,
|
|
3425
3452
|
er as highlightSelectionMatches,
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3453
|
+
pi as isSupportedLanguage,
|
|
3454
|
+
Nr as lightTheme,
|
|
3455
|
+
_n as openSearchPanel,
|
|
3456
|
+
Ei as readOnlyRanges,
|
|
3457
|
+
En as search,
|
|
3458
|
+
kn as searchKeymap,
|
|
3459
|
+
ds as searchTranslationsZhCN,
|
|
3460
|
+
ve as updateReadOnlyRanges
|
|
3434
3461
|
};
|