@senyao-design-system/editor 0.0.2 → 0.0.4

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.mjs CHANGED
@@ -1,14 +1,15 @@
1
- import * as se from "react";
2
- import et, { forwardRef as Yt, useContext as Wt, useRef as de, useEffect as ie, useMemo as vr, useState as Nr, useCallback as re } from "react";
3
- import { sql as rt } from "@codemirror/lang-sql";
4
- import { json as tt } from "@codemirror/lang-json";
5
- import { keymap as Be, EditorView as te, Decoration as cr, placeholder as jr } from "@codemirror/view";
6
- import { indentWithTab as fr } from "@codemirror/commands";
7
- import { autocompletion as Vt } from "@codemirror/autocomplete";
8
- import { lintGutter as nt, linter as ot } from "@codemirror/lint";
9
- import { StateEffect as Ut, StateField as Gt, EditorState as le } from "@codemirror/state";
10
- import { syntaxHighlighting as Lr, defaultHighlightStyle as Dr } from "@codemirror/language";
11
- var ur = { exports: {} }, Oe = {};
1
+ import * as ve from "react";
2
+ import Vr, { forwardRef as rt, useContext as Jn, useRef as ue, useEffect as ge, useImperativeHandle as Kn, useMemo as ht, useState as Ft, useCallback as se } from "react";
3
+ import { sql as zr } from "@codemirror/lang-sql";
4
+ import { json as Ur } from "@codemirror/lang-json";
5
+ import { keymap as we, EditorView as V, Decoration as Q, ViewPlugin as Br, getPanel as dt, showPanel as Gr, runScopeHandlers as Qn, placeholder as br, lineNumbers as xr } from "@codemirror/view";
6
+ import { indentWithTab as Dt, insertNewlineAndIndent as Er } from "@codemirror/commands";
7
+ import { autocompletion as Hr, closeBrackets as Xn } from "@codemirror/autocomplete";
8
+ import { lintGutter as Zn, linter as eo } from "@codemirror/lint";
9
+ import { HighlightStyle as Jr, syntaxHighlighting as pt, defaultHighlightStyle as Sr, bracketMatching as to } from "@codemirror/language";
10
+ import { tags as W } from "@lezer/highlight";
11
+ import { StateEffect as je, StateField as Gt, EditorState as be, Facet as Kr, Prec as Qr, EditorSelection as le, combineConfig as Xr, codePointAt as ro, fromCodePoint as no, codePointSize as oo, RangeSetBuilder as io, CharCategory as ae, findClusterBreak as Zr } from "@codemirror/state";
12
+ var Wt = { exports: {} }, He = {};
12
13
  /**
13
14
  * @license React
14
15
  * react-jsx-runtime.production.min.js
@@ -18,21 +19,21 @@ var ur = { exports: {} }, Oe = {};
18
19
  * This source code is licensed under the MIT license found in the
19
20
  * LICENSE file in the root directory of this source tree.
20
21
  */
21
- var Yr;
22
- function qt() {
23
- if (Yr) return Oe;
24
- Yr = 1;
25
- var e = et, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
26
- function c(s, d, p) {
27
- var u, g = {}, _ = null, S = null;
28
- p !== void 0 && (_ = "" + p), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (S = d.ref);
29
- for (u in d) o.call(d, u) && !i.hasOwnProperty(u) && (g[u] = d[u]);
30
- if (s && s.defaultProps) for (u in d = s.defaultProps, d) g[u] === void 0 && (g[u] = d[u]);
31
- return { $$typeof: r, type: s, key: _, ref: S, props: g, _owner: a.current };
32
- }
33
- return Oe.Fragment = n, Oe.jsx = c, Oe.jsxs = c, Oe;
34
- }
35
- var Pe = {};
22
+ var Cr;
23
+ function so() {
24
+ if (Cr) return He;
25
+ Cr = 1;
26
+ var e = Vr, 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, h) {
28
+ var f, y = {}, C = null, v = null;
29
+ h !== void 0 && (C = "" + h), l.key !== void 0 && (C = "" + l.key), l.ref !== void 0 && (v = l.ref);
30
+ for (f in l) n.call(l, f) && !i.hasOwnProperty(f) && (y[f] = l[f]);
31
+ if (c && c.defaultProps) for (f in l = c.defaultProps, l) y[f] === void 0 && (y[f] = l[f]);
32
+ return { $$typeof: t, type: c, key: C, ref: v, props: y, _owner: o.current };
33
+ }
34
+ return He.Fragment = r, He.jsx = a, He.jsxs = a, He;
35
+ }
36
+ var Je = {};
36
37
  /**
37
38
  * @license React
38
39
  * react-jsx-runtime.development.js
@@ -42,91 +43,91 @@ var Pe = {};
42
43
  * This source code is licensed under the MIT license found in the
43
44
  * LICENSE file in the root directory of this source tree.
44
45
  */
45
- var Wr;
46
- function Bt() {
47
- return Wr || (Wr = 1, process.env.NODE_ENV !== "production" && function() {
48
- var e = et, r = Symbol.for("react.element"), n = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), s = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), b = Symbol.iterator, x = "@@iterator";
49
- function D(t) {
50
- if (t === null || typeof t != "object")
46
+ var Rr;
47
+ function ao() {
48
+ return Rr || (Rr = 1, process.env.NODE_ENV !== "production" && function() {
49
+ var e = Vr, 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"), h = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), R = Symbol.iterator, m = "@@iterator";
50
+ function x(s) {
51
+ if (s === null || typeof s != "object")
51
52
  return null;
52
- var f = b && t[b] || t[x];
53
- return typeof f == "function" ? f : null;
53
+ var u = R && s[R] || s[m];
54
+ return typeof u == "function" ? u : null;
54
55
  }
55
- var w = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
56
- function E(t) {
56
+ var g = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
57
+ function S(s) {
57
58
  {
58
- for (var f = arguments.length, h = new Array(f > 1 ? f - 1 : 0), y = 1; y < f; y++)
59
- h[y - 1] = arguments[y];
60
- k("error", t, h);
59
+ for (var u = arguments.length, p = new Array(u > 1 ? u - 1 : 0), w = 1; w < u; w++)
60
+ p[w - 1] = arguments[w];
61
+ _("error", s, p);
61
62
  }
62
63
  }
63
- function k(t, f, h) {
64
+ function _(s, u, p) {
64
65
  {
65
- var y = w.ReactDebugCurrentFrame, I = y.getStackAddendum();
66
- I !== "" && (f += "%s", h = h.concat([I]));
67
- var L = h.map(function(T) {
68
- return String(T);
66
+ var w = g.ReactDebugCurrentFrame, N = w.getStackAddendum();
67
+ N !== "" && (u += "%s", p = p.concat([N]));
68
+ var j = p.map(function(P) {
69
+ return String(P);
69
70
  });
70
- L.unshift("Warning: " + f), Function.prototype.apply.call(console[t], console, L);
71
+ j.unshift("Warning: " + u), Function.prototype.apply.call(console[s], console, j);
71
72
  }
72
73
  }
73
- var j = !1, l = !1, U = !1, $ = !1, v = !1, R;
74
- R = Symbol.for("react.module.reference");
75
- function O(t) {
76
- return !!(typeof t == "string" || typeof t == "function" || t === o || t === i || v || t === a || t === p || t === u || $ || t === S || j || l || U || typeof t == "object" && t !== null && (t.$$typeof === _ || t.$$typeof === g || t.$$typeof === c || t.$$typeof === s || t.$$typeof === d || // This needs to include all possible module reference object
74
+ var $ = !1, d = !1, q = !1, A = !1, Ye = !1, Ee;
75
+ Ee = Symbol.for("react.module.reference");
76
+ function Te(s) {
77
+ return !!(typeof s == "string" || typeof s == "function" || s === n || s === i || Ye || s === o || s === h || s === f || A || s === v || $ || d || q || typeof s == "object" && s !== null && (s.$$typeof === C || s.$$typeof === y || s.$$typeof === a || s.$$typeof === c || s.$$typeof === l || // This needs to include all possible module reference object
77
78
  // types supported by any Flight configuration anywhere since
78
79
  // we don't know which Flight build this will end up being used
79
80
  // with.
80
- t.$$typeof === R || t.getModuleId !== void 0));
81
+ s.$$typeof === Ee || s.getModuleId !== void 0));
81
82
  }
82
- function P(t, f, h) {
83
- var y = t.displayName;
84
- if (y)
85
- return y;
86
- var I = f.displayName || f.name || "";
87
- return I !== "" ? h + "(" + I + ")" : h;
83
+ function ke(s, u, p) {
84
+ var w = s.displayName;
85
+ if (w)
86
+ return w;
87
+ var N = u.displayName || u.name || "";
88
+ return N !== "" ? p + "(" + N + ")" : p;
88
89
  }
89
- function W(t) {
90
- return t.displayName || "Context";
90
+ function Se(s) {
91
+ return s.displayName || "Context";
91
92
  }
92
- function Y(t) {
93
- if (t == null)
93
+ function Z(s) {
94
+ if (s == null)
94
95
  return null;
95
- if (typeof t.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
96
- return t.displayName || t.name || null;
97
- if (typeof t == "string")
98
- return t;
99
- switch (t) {
100
- case o:
101
- return "Fragment";
96
+ if (typeof s.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
97
+ return s.displayName || s.name || null;
98
+ if (typeof s == "string")
99
+ return s;
100
+ switch (s) {
102
101
  case n:
102
+ return "Fragment";
103
+ case r:
103
104
  return "Portal";
104
105
  case i:
105
106
  return "Profiler";
106
- case a:
107
+ case o:
107
108
  return "StrictMode";
108
- case p:
109
+ case h:
109
110
  return "Suspense";
110
- case u:
111
+ case f:
111
112
  return "SuspenseList";
112
113
  }
113
- if (typeof t == "object")
114
- switch (t.$$typeof) {
115
- case s:
116
- var f = t;
117
- return W(f) + ".Consumer";
114
+ if (typeof s == "object")
115
+ switch (s.$$typeof) {
118
116
  case c:
119
- var h = t;
120
- return W(h._context) + ".Provider";
121
- case d:
122
- return P(t, t.render, "ForwardRef");
123
- case g:
124
- var y = t.displayName || null;
125
- return y !== null ? y : Y(t.type) || "Memo";
126
- case _: {
127
- var I = t, L = I._payload, T = I._init;
117
+ var u = s;
118
+ return Se(u) + ".Consumer";
119
+ case a:
120
+ var p = s;
121
+ return Se(p._context) + ".Provider";
122
+ case l:
123
+ return ke(s, s.render, "ForwardRef");
124
+ case y:
125
+ var w = s.displayName || null;
126
+ return w !== null ? w : Z(s.type) || "Memo";
127
+ case C: {
128
+ var N = s, j = N._payload, P = N._init;
128
129
  try {
129
- return Y(T(L));
130
+ return Z(P(j));
130
131
  } catch {
131
132
  return null;
132
133
  }
@@ -134,606 +135,606 @@ function Bt() {
134
135
  }
135
136
  return null;
136
137
  }
137
- var B = Object.assign, Q = 0, Fe, Ne, Se, je, Re, Le, De;
138
- function Ye() {
138
+ var ce = Object.assign, pe = 0, b, T, k, O, Y, G, oe;
139
+ function me() {
139
140
  }
140
- Ye.__reactDisabledLog = !0;
141
- function Qe() {
141
+ me.__reactDisabledLog = !0;
142
+ function _t() {
142
143
  {
143
- if (Q === 0) {
144
- Fe = console.log, Ne = console.info, Se = console.warn, je = console.error, Re = console.group, Le = console.groupCollapsed, De = console.groupEnd;
145
- var t = {
144
+ if (pe === 0) {
145
+ b = console.log, T = console.info, k = console.warn, O = console.error, Y = console.group, G = console.groupCollapsed, oe = console.groupEnd;
146
+ var s = {
146
147
  configurable: !0,
147
148
  enumerable: !0,
148
- value: Ye,
149
+ value: me,
149
150
  writable: !0
150
151
  };
151
152
  Object.defineProperties(console, {
152
- info: t,
153
- log: t,
154
- warn: t,
155
- error: t,
156
- group: t,
157
- groupCollapsed: t,
158
- groupEnd: t
153
+ info: s,
154
+ log: s,
155
+ warn: s,
156
+ error: s,
157
+ group: s,
158
+ groupCollapsed: s,
159
+ groupEnd: s
159
160
  });
160
161
  }
161
- Q++;
162
+ pe++;
162
163
  }
163
164
  }
164
- function er() {
165
+ function Tt() {
165
166
  {
166
- if (Q--, Q === 0) {
167
- var t = {
167
+ if (pe--, pe === 0) {
168
+ var s = {
168
169
  configurable: !0,
169
170
  enumerable: !0,
170
171
  writable: !0
171
172
  };
172
173
  Object.defineProperties(console, {
173
- log: B({}, t, {
174
- value: Fe
174
+ log: ce({}, s, {
175
+ value: b
175
176
  }),
176
- info: B({}, t, {
177
- value: Ne
177
+ info: ce({}, s, {
178
+ value: T
178
179
  }),
179
- warn: B({}, t, {
180
- value: Se
180
+ warn: ce({}, s, {
181
+ value: k
181
182
  }),
182
- error: B({}, t, {
183
- value: je
183
+ error: ce({}, s, {
184
+ value: O
184
185
  }),
185
- group: B({}, t, {
186
- value: Re
186
+ group: ce({}, s, {
187
+ value: Y
187
188
  }),
188
- groupCollapsed: B({}, t, {
189
- value: Le
189
+ groupCollapsed: ce({}, s, {
190
+ value: G
190
191
  }),
191
- groupEnd: B({}, t, {
192
- value: De
192
+ groupEnd: ce({}, s, {
193
+ value: oe
193
194
  })
194
195
  });
195
196
  }
196
- Q < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
197
+ pe < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
197
198
  }
198
199
  }
199
- var Ce = w.ReactCurrentDispatcher, _e;
200
- function he(t, f, h) {
200
+ var Ve = g.ReactCurrentDispatcher, ze;
201
+ function Me(s, u, p) {
201
202
  {
202
- if (_e === void 0)
203
+ if (ze === void 0)
203
204
  try {
204
205
  throw Error();
205
- } catch (I) {
206
- var y = I.stack.trim().match(/\n( *(at )?)/);
207
- _e = y && y[1] || "";
206
+ } catch (N) {
207
+ var w = N.stack.trim().match(/\n( *(at )?)/);
208
+ ze = w && w[1] || "";
208
209
  }
209
210
  return `
210
- ` + _e + t;
211
+ ` + ze + s;
211
212
  }
212
213
  }
213
- var xe = !1, pe;
214
+ var Ue = !1, Pe;
214
215
  {
215
- var rr = typeof WeakMap == "function" ? WeakMap : Map;
216
- pe = new rr();
216
+ var kt = typeof WeakMap == "function" ? WeakMap : Map;
217
+ Pe = new kt();
217
218
  }
218
- function m(t, f) {
219
- if (!t || xe)
219
+ function E(s, u) {
220
+ if (!s || Ue)
220
221
  return "";
221
222
  {
222
- var h = pe.get(t);
223
- if (h !== void 0)
224
- return h;
223
+ var p = Pe.get(s);
224
+ if (p !== void 0)
225
+ return p;
225
226
  }
226
- var y;
227
- xe = !0;
228
- var I = Error.prepareStackTrace;
227
+ var w;
228
+ Ue = !0;
229
+ var N = Error.prepareStackTrace;
229
230
  Error.prepareStackTrace = void 0;
230
- var L;
231
- L = Ce.current, Ce.current = null, Qe();
231
+ var j;
232
+ j = Ve.current, Ve.current = null, _t();
232
233
  try {
233
- if (f) {
234
- var T = function() {
234
+ if (u) {
235
+ var P = function() {
235
236
  throw Error();
236
237
  };
237
- if (Object.defineProperty(T.prototype, "props", {
238
+ if (Object.defineProperty(P.prototype, "props", {
238
239
  set: function() {
239
240
  throw Error();
240
241
  }
241
242
  }), typeof Reflect == "object" && Reflect.construct) {
242
243
  try {
243
- Reflect.construct(T, []);
244
- } catch (H) {
245
- y = H;
244
+ Reflect.construct(P, []);
245
+ } catch (ee) {
246
+ w = ee;
246
247
  }
247
- Reflect.construct(t, [], T);
248
+ Reflect.construct(s, [], P);
248
249
  } else {
249
250
  try {
250
- T.call();
251
- } catch (H) {
252
- y = H;
251
+ P.call();
252
+ } catch (ee) {
253
+ w = ee;
253
254
  }
254
- t.call(T.prototype);
255
+ s.call(P.prototype);
255
256
  }
256
257
  } else {
257
258
  try {
258
259
  throw Error();
259
- } catch (H) {
260
- y = H;
260
+ } catch (ee) {
261
+ w = ee;
261
262
  }
262
- t();
263
+ s();
263
264
  }
264
- } catch (H) {
265
- if (H && y && typeof H.stack == "string") {
266
- for (var C = H.stack.split(`
267
- `), K = y.stack.split(`
268
- `), V = C.length - 1, G = K.length - 1; V >= 1 && G >= 0 && C[V] !== K[G]; )
269
- G--;
270
- for (; V >= 1 && G >= 0; V--, G--)
271
- if (C[V] !== K[G]) {
272
- if (V !== 1 || G !== 1)
265
+ } catch (ee) {
266
+ if (ee && w && typeof ee.stack == "string") {
267
+ for (var M = ee.stack.split(`
268
+ `), X = w.stack.split(`
269
+ `), z = M.length - 1, U = X.length - 1; z >= 1 && U >= 0 && M[z] !== X[U]; )
270
+ U--;
271
+ for (; z >= 1 && U >= 0; z--, U--)
272
+ if (M[z] !== X[U]) {
273
+ if (z !== 1 || U !== 1)
273
274
  do
274
- if (V--, G--, G < 0 || C[V] !== K[G]) {
275
- var ee = `
276
- ` + C[V].replace(" at new ", " at ");
277
- return t.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", t.displayName)), typeof t == "function" && pe.set(t, ee), ee;
275
+ if (z--, U--, U < 0 || M[z] !== X[U]) {
276
+ var ie = `
277
+ ` + M[z].replace(" at new ", " at ");
278
+ return s.displayName && ie.includes("<anonymous>") && (ie = ie.replace("<anonymous>", s.displayName)), typeof s == "function" && Pe.set(s, ie), ie;
278
279
  }
279
- while (V >= 1 && G >= 0);
280
+ while (z >= 1 && U >= 0);
280
281
  break;
281
282
  }
282
283
  }
283
284
  } finally {
284
- xe = !1, Ce.current = L, er(), Error.prepareStackTrace = I;
285
+ Ue = !1, Ve.current = j, Tt(), Error.prepareStackTrace = N;
285
286
  }
286
- var ge = t ? t.displayName || t.name : "", ue = ge ? he(ge) : "";
287
- return typeof t == "function" && pe.set(t, ue), ue;
287
+ var $e = s ? s.displayName || s.name : "", Re = $e ? Me($e) : "";
288
+ return typeof s == "function" && Pe.set(s, Re), Re;
288
289
  }
289
- function we(t, f, h) {
290
- return m(t, !1);
290
+ function Be(s, u, p) {
291
+ return E(s, !1);
291
292
  }
292
- function ve(t) {
293
- var f = t.prototype;
294
- return !!(f && f.isReactComponent);
293
+ function Oe(s) {
294
+ var u = s.prototype;
295
+ return !!(u && u.isReactComponent);
295
296
  }
296
- function fe(t, f, h) {
297
- if (t == null)
297
+ function Ce(s, u, p) {
298
+ if (s == null)
298
299
  return "";
299
- if (typeof t == "function")
300
- return m(t, ve(t));
301
- if (typeof t == "string")
302
- return he(t);
303
- switch (t) {
304
- case p:
305
- return he("Suspense");
306
- case u:
307
- return he("SuspenseList");
300
+ if (typeof s == "function")
301
+ return E(s, Oe(s));
302
+ if (typeof s == "string")
303
+ return Me(s);
304
+ switch (s) {
305
+ case h:
306
+ return Me("Suspense");
307
+ case f:
308
+ return Me("SuspenseList");
308
309
  }
309
- if (typeof t == "object")
310
- switch (t.$$typeof) {
311
- case d:
312
- return we(t.render);
313
- case g:
314
- return fe(t.type, f, h);
315
- case _: {
316
- var y = t, I = y._payload, L = y._init;
310
+ if (typeof s == "object")
311
+ switch (s.$$typeof) {
312
+ case l:
313
+ return Be(s.render);
314
+ case y:
315
+ return Ce(s.type, u, p);
316
+ case C: {
317
+ var w = s, N = w._payload, j = w._init;
317
318
  try {
318
- return fe(L(I), f, h);
319
+ return Ce(j(N), u, p);
319
320
  } catch {
320
321
  }
321
322
  }
322
323
  }
323
324
  return "";
324
325
  }
325
- var Te = Object.prototype.hasOwnProperty, Rr = {}, Cr = w.ReactDebugCurrentFrame;
326
- function We(t) {
327
- if (t) {
328
- var f = t._owner, h = fe(t.type, t._source, f ? f.type : null);
329
- Cr.setExtraStackFrame(h);
326
+ var Ge = Object.prototype.hasOwnProperty, ir = {}, sr = g.ReactDebugCurrentFrame;
327
+ function it(s) {
328
+ if (s) {
329
+ var u = s._owner, p = Ce(s.type, s._source, u ? u.type : null);
330
+ sr.setExtraStackFrame(p);
330
331
  } else
331
- Cr.setExtraStackFrame(null);
332
+ sr.setExtraStackFrame(null);
332
333
  }
333
- function yt(t, f, h, y, I) {
334
+ function Tn(s, u, p, w, N) {
334
335
  {
335
- var L = Function.call.bind(Te);
336
- for (var T in t)
337
- if (L(t, T)) {
338
- var C = void 0;
336
+ var j = Function.call.bind(Ge);
337
+ for (var P in s)
338
+ if (j(s, P)) {
339
+ var M = void 0;
339
340
  try {
340
- if (typeof t[T] != "function") {
341
- var K = Error((y || "React class") + ": " + h + " type `" + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[T] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
342
- throw K.name = "Invariant Violation", K;
341
+ if (typeof s[P] != "function") {
342
+ var X = Error((w || "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
+ throw X.name = "Invariant Violation", X;
343
344
  }
344
- C = t[T](f, T, y, h, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
345
- } catch (V) {
346
- C = V;
345
+ M = s[P](u, P, w, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
346
+ } catch (z) {
347
+ M = z;
347
348
  }
348
- C && !(C instanceof Error) && (We(I), E("%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).", y || "React class", h, T, typeof C), We(null)), C instanceof Error && !(C.message in Rr) && (Rr[C.message] = !0, We(I), E("Failed %s type: %s", h, C.message), We(null));
349
+ M && !(M instanceof Error) && (it(N), S("%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).", w || "React class", p, P, typeof M), it(null)), M instanceof Error && !(M.message in ir) && (ir[M.message] = !0, it(N), S("Failed %s type: %s", p, M.message), it(null));
349
350
  }
350
351
  }
351
352
  }
352
- var bt = Array.isArray;
353
- function tr(t) {
354
- return bt(t);
353
+ var kn = Array.isArray;
354
+ function Mt(s) {
355
+ return kn(s);
355
356
  }
356
- function Et(t) {
357
+ function Mn(s) {
357
358
  {
358
- var f = typeof Symbol == "function" && Symbol.toStringTag, h = f && t[Symbol.toStringTag] || t.constructor.name || "Object";
359
- return h;
359
+ var u = typeof Symbol == "function" && Symbol.toStringTag, p = u && s[Symbol.toStringTag] || s.constructor.name || "Object";
360
+ return p;
360
361
  }
361
362
  }
362
- function St(t) {
363
+ function Pn(s) {
363
364
  try {
364
- return _r(t), !1;
365
+ return ar(s), !1;
365
366
  } catch {
366
367
  return !0;
367
368
  }
368
369
  }
369
- function _r(t) {
370
- return "" + t;
370
+ function ar(s) {
371
+ return "" + s;
371
372
  }
372
- function xr(t) {
373
- if (St(t))
374
- return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Et(t)), _r(t);
373
+ function cr(s) {
374
+ if (Pn(s))
375
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Mn(s)), ar(s);
375
376
  }
376
- var wr = w.ReactCurrentOwner, Rt = {
377
+ var lr = g.ReactCurrentOwner, On = {
377
378
  key: !0,
378
379
  ref: !0,
379
380
  __self: !0,
380
381
  __source: !0
381
- }, Tr, Or;
382
- function Ct(t) {
383
- if (Te.call(t, "ref")) {
384
- var f = Object.getOwnPropertyDescriptor(t, "ref").get;
385
- if (f && f.isReactWarning)
382
+ }, ur, fr;
383
+ function An(s) {
384
+ if (Ge.call(s, "ref")) {
385
+ var u = Object.getOwnPropertyDescriptor(s, "ref").get;
386
+ if (u && u.isReactWarning)
386
387
  return !1;
387
388
  }
388
- return t.ref !== void 0;
389
+ return s.ref !== void 0;
389
390
  }
390
- function _t(t) {
391
- if (Te.call(t, "key")) {
392
- var f = Object.getOwnPropertyDescriptor(t, "key").get;
393
- if (f && f.isReactWarning)
391
+ function $n(s) {
392
+ if (Ge.call(s, "key")) {
393
+ var u = Object.getOwnPropertyDescriptor(s, "key").get;
394
+ if (u && u.isReactWarning)
394
395
  return !1;
395
396
  }
396
- return t.key !== void 0;
397
+ return s.key !== void 0;
397
398
  }
398
- function xt(t, f) {
399
- typeof t.ref == "string" && wr.current;
399
+ function Fn(s, u) {
400
+ typeof s.ref == "string" && lr.current;
400
401
  }
401
- function wt(t, f) {
402
+ function Ln(s, u) {
402
403
  {
403
- var h = function() {
404
- Tr || (Tr = !0, E("%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)", f));
404
+ var p = function() {
405
+ ur || (ur = !0, S("%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));
405
406
  };
406
- h.isReactWarning = !0, Object.defineProperty(t, "key", {
407
- get: h,
407
+ p.isReactWarning = !0, Object.defineProperty(s, "key", {
408
+ get: p,
408
409
  configurable: !0
409
410
  });
410
411
  }
411
412
  }
412
- function Tt(t, f) {
413
+ function Nn(s, u) {
413
414
  {
414
- var h = function() {
415
- Or || (Or = !0, E("%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)", f));
415
+ var p = function() {
416
+ fr || (fr = !0, S("%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));
416
417
  };
417
- h.isReactWarning = !0, Object.defineProperty(t, "ref", {
418
- get: h,
418
+ p.isReactWarning = !0, Object.defineProperty(s, "ref", {
419
+ get: p,
419
420
  configurable: !0
420
421
  });
421
422
  }
422
423
  }
423
- var Ot = function(t, f, h, y, I, L, T) {
424
- var C = {
424
+ var In = function(s, u, p, w, N, j, P) {
425
+ var M = {
425
426
  // This tag allows us to uniquely identify this as a React Element
426
- $$typeof: r,
427
+ $$typeof: t,
427
428
  // Built-in properties that belong on the element
428
- type: t,
429
- key: f,
430
- ref: h,
431
- props: T,
429
+ type: s,
430
+ key: u,
431
+ ref: p,
432
+ props: P,
432
433
  // Record the component responsible for creating this element.
433
- _owner: L
434
+ _owner: j
434
435
  };
435
- return C._store = {}, Object.defineProperty(C._store, "validated", {
436
+ return M._store = {}, Object.defineProperty(M._store, "validated", {
436
437
  configurable: !1,
437
438
  enumerable: !1,
438
439
  writable: !0,
439
440
  value: !1
440
- }), Object.defineProperty(C, "_self", {
441
+ }), Object.defineProperty(M, "_self", {
441
442
  configurable: !1,
442
443
  enumerable: !1,
443
444
  writable: !1,
444
- value: y
445
- }), Object.defineProperty(C, "_source", {
445
+ value: w
446
+ }), Object.defineProperty(M, "_source", {
446
447
  configurable: !1,
447
448
  enumerable: !1,
448
449
  writable: !1,
449
- value: I
450
- }), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
450
+ value: N
451
+ }), Object.freeze && (Object.freeze(M.props), Object.freeze(M)), M;
451
452
  };
452
- function Pt(t, f, h, y, I) {
453
+ function Dn(s, u, p, w, N) {
453
454
  {
454
- var L, T = {}, C = null, K = null;
455
- h !== void 0 && (xr(h), C = "" + h), _t(f) && (xr(f.key), C = "" + f.key), Ct(f) && (K = f.ref, xt(f, I));
456
- for (L in f)
457
- Te.call(f, L) && !Rt.hasOwnProperty(L) && (T[L] = f[L]);
458
- if (t && t.defaultProps) {
459
- var V = t.defaultProps;
460
- for (L in V)
461
- T[L] === void 0 && (T[L] = V[L]);
455
+ var j, P = {}, M = null, X = null;
456
+ p !== void 0 && (cr(p), M = "" + p), $n(u) && (cr(u.key), M = "" + u.key), An(u) && (X = u.ref, Fn(u, N));
457
+ for (j in u)
458
+ Ge.call(u, j) && !On.hasOwnProperty(j) && (P[j] = u[j]);
459
+ if (s && s.defaultProps) {
460
+ var z = s.defaultProps;
461
+ for (j in z)
462
+ P[j] === void 0 && (P[j] = z[j]);
462
463
  }
463
- if (C || K) {
464
- var G = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
465
- C && wt(T, G), K && Tt(T, G);
464
+ if (M || X) {
465
+ var U = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
466
+ M && Ln(P, U), X && Nn(P, U);
466
467
  }
467
- return Ot(t, C, K, I, y, wr.current, T);
468
+ return In(s, M, X, N, w, lr.current, P);
468
469
  }
469
470
  }
470
- var nr = w.ReactCurrentOwner, Pr = w.ReactDebugCurrentFrame;
471
- function me(t) {
472
- if (t) {
473
- var f = t._owner, h = fe(t.type, t._source, f ? f.type : null);
474
- Pr.setExtraStackFrame(h);
471
+ var Pt = g.ReactCurrentOwner, hr = g.ReactDebugCurrentFrame;
472
+ function Ae(s) {
473
+ if (s) {
474
+ var u = s._owner, p = Ce(s.type, s._source, u ? u.type : null);
475
+ hr.setExtraStackFrame(p);
475
476
  } else
476
- Pr.setExtraStackFrame(null);
477
+ hr.setExtraStackFrame(null);
477
478
  }
478
- var or;
479
- or = !1;
480
- function ar(t) {
481
- return typeof t == "object" && t !== null && t.$$typeof === r;
479
+ var Ot;
480
+ Ot = !1;
481
+ function At(s) {
482
+ return typeof s == "object" && s !== null && s.$$typeof === t;
482
483
  }
483
- function kr() {
484
+ function dr() {
484
485
  {
485
- if (nr.current) {
486
- var t = Y(nr.current.type);
487
- if (t)
486
+ if (Pt.current) {
487
+ var s = Z(Pt.current.type);
488
+ if (s)
488
489
  return `
489
490
 
490
- Check the render method of \`` + t + "`.";
491
+ Check the render method of \`` + s + "`.";
491
492
  }
492
493
  return "";
493
494
  }
494
495
  }
495
- function kt(t) {
496
+ function Wn(s) {
496
497
  return "";
497
498
  }
498
- var $r = {};
499
- function $t(t) {
499
+ var pr = {};
500
+ function jn(s) {
500
501
  {
501
- var f = kr();
502
- if (!f) {
503
- var h = typeof t == "string" ? t : t.displayName || t.name;
504
- h && (f = `
502
+ var u = dr();
503
+ if (!u) {
504
+ var p = typeof s == "string" ? s : s.displayName || s.name;
505
+ p && (u = `
505
506
 
506
- Check the top-level render call using <` + h + ">.");
507
+ Check the top-level render call using <` + p + ">.");
507
508
  }
508
- return f;
509
+ return u;
509
510
  }
510
511
  }
511
- function Ar(t, f) {
512
+ function mr(s, u) {
512
513
  {
513
- if (!t._store || t._store.validated || t.key != null)
514
+ if (!s._store || s._store.validated || s.key != null)
514
515
  return;
515
- t._store.validated = !0;
516
- var h = $t(f);
517
- if ($r[h])
516
+ s._store.validated = !0;
517
+ var p = jn(u);
518
+ if (pr[p])
518
519
  return;
519
- $r[h] = !0;
520
- var y = "";
521
- t && t._owner && t._owner !== nr.current && (y = " It was passed a child from " + Y(t._owner.type) + "."), me(t), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', h, y), me(null);
520
+ pr[p] = !0;
521
+ var w = "";
522
+ s && s._owner && s._owner !== Pt.current && (w = " It was passed a child from " + Z(s._owner.type) + "."), Ae(s), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, w), Ae(null);
522
523
  }
523
524
  }
524
- function Mr(t, f) {
525
+ function gr(s, u) {
525
526
  {
526
- if (typeof t != "object")
527
+ if (typeof s != "object")
527
528
  return;
528
- if (tr(t))
529
- for (var h = 0; h < t.length; h++) {
530
- var y = t[h];
531
- ar(y) && Ar(y, f);
529
+ if (Mt(s))
530
+ for (var p = 0; p < s.length; p++) {
531
+ var w = s[p];
532
+ At(w) && mr(w, u);
532
533
  }
533
- else if (ar(t))
534
- t._store && (t._store.validated = !0);
535
- else if (t) {
536
- var I = D(t);
537
- if (typeof I == "function" && I !== t.entries)
538
- for (var L = I.call(t), T; !(T = L.next()).done; )
539
- ar(T.value) && Ar(T.value, f);
534
+ else if (At(s))
535
+ s._store && (s._store.validated = !0);
536
+ else if (s) {
537
+ var N = x(s);
538
+ if (typeof N == "function" && N !== s.entries)
539
+ for (var j = N.call(s), P; !(P = j.next()).done; )
540
+ At(P.value) && mr(P.value, u);
540
541
  }
541
542
  }
542
543
  }
543
- function At(t) {
544
+ function qn(s) {
544
545
  {
545
- var f = t.type;
546
- if (f == null || typeof f == "string")
546
+ var u = s.type;
547
+ if (u == null || typeof u == "string")
547
548
  return;
548
- var h;
549
- if (typeof f == "function")
550
- h = f.propTypes;
551
- else if (typeof f == "object" && (f.$$typeof === d || // Note: Memo only checks outer props here.
549
+ var p;
550
+ if (typeof u == "function")
551
+ p = u.propTypes;
552
+ else if (typeof u == "object" && (u.$$typeof === l || // Note: Memo only checks outer props here.
552
553
  // Inner props are checked in the reconciler.
553
- f.$$typeof === g))
554
- h = f.propTypes;
554
+ u.$$typeof === y))
555
+ p = u.propTypes;
555
556
  else
556
557
  return;
557
- if (h) {
558
- var y = Y(f);
559
- yt(h, t.props, "prop", y, t);
560
- } else if (f.PropTypes !== void 0 && !or) {
561
- or = !0;
562
- var I = Y(f);
563
- E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", I || "Unknown");
558
+ if (p) {
559
+ var w = Z(u);
560
+ Tn(p, s.props, "prop", w, s);
561
+ } else if (u.PropTypes !== void 0 && !Ot) {
562
+ Ot = !0;
563
+ var N = Z(u);
564
+ S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
564
565
  }
565
- typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
566
+ typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
566
567
  }
567
568
  }
568
- function Mt(t) {
569
+ function Yn(s) {
569
570
  {
570
- for (var f = Object.keys(t.props), h = 0; h < f.length; h++) {
571
- var y = f[h];
572
- if (y !== "children" && y !== "key") {
573
- me(t), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", y), me(null);
571
+ for (var u = Object.keys(s.props), p = 0; p < u.length; p++) {
572
+ var w = u[p];
573
+ if (w !== "children" && w !== "key") {
574
+ Ae(s), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), Ae(null);
574
575
  break;
575
576
  }
576
577
  }
577
- t.ref !== null && (me(t), E("Invalid attribute `ref` supplied to `React.Fragment`."), me(null));
578
+ s.ref !== null && (Ae(s), S("Invalid attribute `ref` supplied to `React.Fragment`."), Ae(null));
578
579
  }
579
580
  }
580
- var Ir = {};
581
- function Fr(t, f, h, y, I, L) {
581
+ var vr = {};
582
+ function yr(s, u, p, w, N, j) {
582
583
  {
583
- var T = O(t);
584
- if (!T) {
585
- var C = "";
586
- (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
587
- var K = kt();
588
- K ? C += K : C += kr();
589
- var V;
590
- t === null ? V = "null" : tr(t) ? V = "array" : t !== void 0 && t.$$typeof === r ? (V = "<" + (Y(t.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : V = typeof t, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", V, C);
584
+ var P = Te(s);
585
+ if (!P) {
586
+ var M = "";
587
+ (s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (M += " 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 = Wn();
589
+ X ? M += X : M += dr();
590
+ var z;
591
+ s === null ? z = "null" : Mt(s) ? z = "array" : s !== void 0 && s.$$typeof === t ? (z = "<" + (Z(s.type) || "Unknown") + " />", M = " Did you accidentally export a JSX literal instead of a component?") : z = typeof s, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", z, M);
591
592
  }
592
- var G = Pt(t, f, h, I, L);
593
- if (G == null)
594
- return G;
595
- if (T) {
596
- var ee = f.children;
597
- if (ee !== void 0)
598
- if (y)
599
- if (tr(ee)) {
600
- for (var ge = 0; ge < ee.length; ge++)
601
- Mr(ee[ge], t);
602
- Object.freeze && Object.freeze(ee);
593
+ var U = Dn(s, u, p, N, j);
594
+ if (U == null)
595
+ return U;
596
+ if (P) {
597
+ var ie = u.children;
598
+ if (ie !== void 0)
599
+ if (w)
600
+ if (Mt(ie)) {
601
+ for (var $e = 0; $e < ie.length; $e++)
602
+ gr(ie[$e], s);
603
+ Object.freeze && Object.freeze(ie);
603
604
  } else
604
- E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
605
+ S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
605
606
  else
606
- Mr(ee, t);
607
+ gr(ie, s);
607
608
  }
608
- if (Te.call(f, "key")) {
609
- var ue = Y(t), H = Object.keys(f).filter(function(Dt) {
610
- return Dt !== "key";
611
- }), ir = H.length > 0 ? "{key: someKey, " + H.join(": ..., ") + ": ...}" : "{key: someKey}";
612
- if (!Ir[ue + ir]) {
613
- var Lt = H.length > 0 ? "{" + H.join(": ..., ") + ": ...}" : "{}";
614
- E(`A props object containing a "key" prop is being spread into JSX:
609
+ if (Ge.call(u, "key")) {
610
+ var Re = Z(s), ee = Object.keys(u).filter(function(Hn) {
611
+ return Hn !== "key";
612
+ }), $t = ee.length > 0 ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}";
613
+ if (!vr[Re + $t]) {
614
+ var Gn = ee.length > 0 ? "{" + ee.join(": ..., ") + ": ...}" : "{}";
615
+ S(`A props object containing a "key" prop is being spread into JSX:
615
616
  let props = %s;
616
617
  <%s {...props} />
617
618
  React keys must be passed directly to JSX without using spread:
618
619
  let props = %s;
619
- <%s key={someKey} {...props} />`, ir, ue, Lt, ue), Ir[ue + ir] = !0;
620
+ <%s key={someKey} {...props} />`, $t, Re, Gn, Re), vr[Re + $t] = !0;
620
621
  }
621
622
  }
622
- return t === o ? Mt(G) : At(G), G;
623
+ return s === n ? Yn(U) : qn(U), U;
623
624
  }
624
625
  }
625
- function It(t, f, h) {
626
- return Fr(t, f, h, !0);
626
+ function Vn(s, u, p) {
627
+ return yr(s, u, p, !0);
627
628
  }
628
- function Ft(t, f, h) {
629
- return Fr(t, f, h, !1);
629
+ function zn(s, u, p) {
630
+ return yr(s, u, p, !1);
630
631
  }
631
- var Nt = Ft, jt = It;
632
- Pe.Fragment = o, Pe.jsx = Nt, Pe.jsxs = jt;
633
- }()), Pe;
632
+ var Un = zn, Bn = Vn;
633
+ Je.Fragment = n, Je.jsx = Un, Je.jsxs = Bn;
634
+ }()), Je;
634
635
  }
635
- process.env.NODE_ENV === "production" ? ur.exports = qt() : ur.exports = Bt();
636
- var Vr = ur.exports;
637
- function Jt(e) {
636
+ process.env.NODE_ENV === "production" ? Wt.exports = so() : Wt.exports = ao();
637
+ var wr = Wt.exports;
638
+ function co(e) {
638
639
  if (e.sheet)
639
640
  return e.sheet;
640
- for (var r = 0; r < document.styleSheets.length; r++)
641
- if (document.styleSheets[r].ownerNode === e)
642
- return document.styleSheets[r];
641
+ for (var t = 0; t < document.styleSheets.length; t++)
642
+ if (document.styleSheets[t].ownerNode === e)
643
+ return document.styleSheets[t];
643
644
  }
644
- function zt(e) {
645
- var r = document.createElement("style");
646
- return r.setAttribute("data-emotion", e.key), e.nonce !== void 0 && r.setAttribute("nonce", e.nonce), r.appendChild(document.createTextNode("")), r.setAttribute("data-s", ""), r;
645
+ function lo(e) {
646
+ var t = document.createElement("style");
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;
647
648
  }
648
- var Kt = /* @__PURE__ */ function() {
649
- function e(n) {
650
- var o = this;
651
- this._insertTag = function(a) {
649
+ var uo = /* @__PURE__ */ function() {
650
+ function e(r) {
651
+ var n = this;
652
+ this._insertTag = function(o) {
652
653
  var i;
653
- o.tags.length === 0 ? o.insertionPoint ? i = o.insertionPoint.nextSibling : o.prepend ? i = o.container.firstChild : i = o.before : i = o.tags[o.tags.length - 1].nextSibling, o.container.insertBefore(a, i), o.tags.push(a);
654
- }, this.isSpeedy = n.speedy === void 0 ? !0 : n.speedy, this.tags = [], this.ctr = 0, this.nonce = n.nonce, this.key = n.key, this.container = n.container, this.prepend = n.prepend, this.insertionPoint = n.insertionPoint, this.before = null;
655
- }
656
- var r = e.prototype;
657
- return r.hydrate = function(o) {
658
- o.forEach(this._insertTag);
659
- }, r.insert = function(o) {
660
- this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(zt(this));
661
- var a = this.tags[this.tags.length - 1];
654
+ n.tags.length === 0 ? n.insertionPoint ? i = n.insertionPoint.nextSibling : n.prepend ? i = n.container.firstChild : i = n.before : i = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(o, i), n.tags.push(o);
655
+ }, this.isSpeedy = r.speedy === void 0 ? !0 : r.speedy, this.tags = [], this.ctr = 0, this.nonce = r.nonce, this.key = r.key, this.container = r.container, this.prepend = r.prepend, this.insertionPoint = r.insertionPoint, this.before = null;
656
+ }
657
+ var t = e.prototype;
658
+ return t.hydrate = function(n) {
659
+ n.forEach(this._insertTag);
660
+ }, t.insert = function(n) {
661
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(lo(this));
662
+ var o = this.tags[this.tags.length - 1];
662
663
  if (this.isSpeedy) {
663
- var i = Jt(a);
664
+ var i = co(o);
664
665
  try {
665
- i.insertRule(o, i.cssRules.length);
666
+ i.insertRule(n, i.cssRules.length);
666
667
  } catch {
667
668
  }
668
669
  } else
669
- a.appendChild(document.createTextNode(o));
670
+ o.appendChild(document.createTextNode(n));
670
671
  this.ctr++;
671
- }, r.flush = function() {
672
- this.tags.forEach(function(o) {
673
- var a;
674
- return (a = o.parentNode) == null ? void 0 : a.removeChild(o);
672
+ }, t.flush = function() {
673
+ this.tags.forEach(function(n) {
674
+ var o;
675
+ return (o = n.parentNode) == null ? void 0 : o.removeChild(n);
675
676
  }), this.tags = [], this.ctr = 0;
676
677
  }, e;
677
- }(), z = "-ms-", Je = "-moz-", A = "-webkit-", at = "comm", mr = "rule", gr = "decl", Ht = "@import", it = "@keyframes", Xt = "@layer", Zt = Math.abs, Ke = String.fromCharCode, Qt = Object.assign;
678
- function en(e, r) {
679
- return J(e, 0) ^ 45 ? (((r << 2 ^ J(e, 0)) << 2 ^ J(e, 1)) << 2 ^ J(e, 2)) << 2 ^ J(e, 3) : 0;
678
+ }(), K = "-ms-", mt = "-moz-", F = "-webkit-", en = "comm", Ht = "rule", Jt = "decl", fo = "@import", tn = "@keyframes", ho = "@layer", po = Math.abs, St = String.fromCharCode, mo = Object.assign;
679
+ function go(e, t) {
680
+ return J(e, 0) ^ 45 ? (((t << 2 ^ J(e, 0)) << 2 ^ J(e, 1)) << 2 ^ J(e, 2)) << 2 ^ J(e, 3) : 0;
680
681
  }
681
- function st(e) {
682
+ function rn(e) {
682
683
  return e.trim();
683
684
  }
684
- function rn(e, r) {
685
- return (e = r.exec(e)) ? e[0] : e;
685
+ function vo(e, t) {
686
+ return (e = t.exec(e)) ? e[0] : e;
686
687
  }
687
- function M(e, r, n) {
688
- return e.replace(r, n);
688
+ function L(e, t, r) {
689
+ return e.replace(t, r);
689
690
  }
690
- function lr(e, r) {
691
- return e.indexOf(r);
691
+ function jt(e, t) {
692
+ return e.indexOf(t);
692
693
  }
693
- function J(e, r) {
694
- return e.charCodeAt(r) | 0;
694
+ function J(e, t) {
695
+ return e.charCodeAt(t) | 0;
695
696
  }
696
- function $e(e, r, n) {
697
- return e.slice(r, n);
697
+ function Xe(e, t, r) {
698
+ return e.slice(t, r);
698
699
  }
699
- function ne(e) {
700
+ function fe(e) {
700
701
  return e.length;
701
702
  }
702
- function yr(e) {
703
+ function Kt(e) {
703
704
  return e.length;
704
705
  }
705
- function Ve(e, r) {
706
- return r.push(e), e;
706
+ function st(e, t) {
707
+ return t.push(e), e;
707
708
  }
708
- function tn(e, r) {
709
- return e.map(r).join("");
709
+ function yo(e, t) {
710
+ return e.map(t).join("");
710
711
  }
711
- var He = 1, be = 1, ct = 0, X = 0, q = 0, Ee = "";
712
- function Xe(e, r, n, o, a, i, c) {
713
- return { value: e, root: r, parent: n, type: o, props: a, children: i, line: He, column: be, length: c, return: "" };
712
+ var Ct = 1, De = 1, nn = 0, te = 0, B = 0, qe = "";
713
+ function Rt(e, t, r, n, o, i, a) {
714
+ return { value: e, root: t, parent: r, type: n, props: o, children: i, line: Ct, column: De, length: a, return: "" };
714
715
  }
715
- function ke(e, r) {
716
- return Qt(Xe("", null, null, "", null, null, 0), e, { length: -e.length }, r);
716
+ function Ke(e, t) {
717
+ return mo(Rt("", null, null, "", null, null, 0), e, { length: -e.length }, t);
717
718
  }
718
- function nn() {
719
- return q;
719
+ function bo() {
720
+ return B;
720
721
  }
721
- function on() {
722
- return q = X > 0 ? J(Ee, --X) : 0, be--, q === 10 && (be = 1, He--), q;
722
+ function xo() {
723
+ return B = te > 0 ? J(qe, --te) : 0, De--, B === 10 && (De = 1, Ct--), B;
723
724
  }
724
- function Z() {
725
- return q = X < ct ? J(Ee, X++) : 0, be++, q === 10 && (be = 1, He++), q;
725
+ function ne() {
726
+ return B = te < nn ? J(qe, te++) : 0, De++, B === 10 && (De = 1, Ct++), B;
726
727
  }
727
- function ae() {
728
- return J(Ee, X);
728
+ function de() {
729
+ return J(qe, te);
729
730
  }
730
- function Ue() {
731
- return X;
731
+ function lt() {
732
+ return te;
732
733
  }
733
- function Ie(e, r) {
734
- return $e(Ee, e, r);
734
+ function nt(e, t) {
735
+ return Xe(qe, e, t);
735
736
  }
736
- function Ae(e) {
737
+ function Ze(e) {
737
738
  switch (e) {
738
739
  case 0:
739
740
  case 9:
@@ -765,249 +766,249 @@ function Ae(e) {
765
766
  }
766
767
  return 0;
767
768
  }
768
- function ft(e) {
769
- return He = be = 1, ct = ne(Ee = e), X = 0, [];
769
+ function on(e) {
770
+ return Ct = De = 1, nn = fe(qe = e), te = 0, [];
770
771
  }
771
- function ut(e) {
772
- return Ee = "", e;
772
+ function sn(e) {
773
+ return qe = "", e;
773
774
  }
774
- function Ge(e) {
775
- return st(Ie(X - 1, dr(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
775
+ function ut(e) {
776
+ return rn(nt(te - 1, qt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
776
777
  }
777
- function an(e) {
778
- for (; (q = ae()) && q < 33; )
779
- Z();
780
- return Ae(e) > 2 || Ae(q) > 3 ? "" : " ";
778
+ function Eo(e) {
779
+ for (; (B = de()) && B < 33; )
780
+ ne();
781
+ return Ze(e) > 2 || Ze(B) > 3 ? "" : " ";
781
782
  }
782
- function sn(e, r) {
783
- for (; --r && Z() && !(q < 48 || q > 102 || q > 57 && q < 65 || q > 70 && q < 97); )
783
+ function So(e, t) {
784
+ for (; --t && ne() && !(B < 48 || B > 102 || B > 57 && B < 65 || B > 70 && B < 97); )
784
785
  ;
785
- return Ie(e, Ue() + (r < 6 && ae() == 32 && Z() == 32));
786
+ return nt(e, lt() + (t < 6 && de() == 32 && ne() == 32));
786
787
  }
787
- function dr(e) {
788
- for (; Z(); )
789
- switch (q) {
788
+ function qt(e) {
789
+ for (; ne(); )
790
+ switch (B) {
790
791
  case e:
791
- return X;
792
+ return te;
792
793
  case 34:
793
794
  case 39:
794
- e !== 34 && e !== 39 && dr(q);
795
+ e !== 34 && e !== 39 && qt(B);
795
796
  break;
796
797
  case 40:
797
- e === 41 && dr(e);
798
+ e === 41 && qt(e);
798
799
  break;
799
800
  case 92:
800
- Z();
801
+ ne();
801
802
  break;
802
803
  }
803
- return X;
804
+ return te;
804
805
  }
805
- function cn(e, r) {
806
- for (; Z() && e + q !== 57; )
807
- if (e + q === 84 && ae() === 47)
806
+ function Co(e, t) {
807
+ for (; ne() && e + B !== 57; )
808
+ if (e + B === 84 && de() === 47)
808
809
  break;
809
- return "/*" + Ie(r, X - 1) + "*" + Ke(e === 47 ? e : Z());
810
+ return "/*" + nt(t, te - 1) + "*" + St(e === 47 ? e : ne());
810
811
  }
811
- function fn(e) {
812
- for (; !Ae(ae()); )
813
- Z();
814
- return Ie(e, X);
812
+ function Ro(e) {
813
+ for (; !Ze(de()); )
814
+ ne();
815
+ return nt(e, te);
815
816
  }
816
- function un(e) {
817
- return ut(qe("", null, null, null, [""], e = ft(e), 0, [0], e));
817
+ function wo(e) {
818
+ return sn(ft("", null, null, null, [""], e = on(e), 0, [0], e));
818
819
  }
819
- function qe(e, r, n, o, a, i, c, s, d) {
820
- for (var p = 0, u = 0, g = c, _ = 0, S = 0, b = 0, x = 1, D = 1, w = 1, E = 0, k = "", j = a, l = i, U = o, $ = k; D; )
821
- switch (b = E, E = Z()) {
820
+ function ft(e, t, r, n, o, i, a, c, l) {
821
+ for (var h = 0, f = 0, y = a, C = 0, v = 0, R = 0, m = 1, x = 1, g = 1, S = 0, _ = "", $ = o, d = i, q = n, A = _; x; )
822
+ switch (R = S, S = ne()) {
822
823
  case 40:
823
- if (b != 108 && J($, g - 1) == 58) {
824
- lr($ += M(Ge(E), "&", "&\f"), "&\f") != -1 && (w = -1);
824
+ if (R != 108 && J(A, y - 1) == 58) {
825
+ jt(A += L(ut(S), "&", "&\f"), "&\f") != -1 && (g = -1);
825
826
  break;
826
827
  }
827
828
  case 34:
828
829
  case 39:
829
830
  case 91:
830
- $ += Ge(E);
831
+ A += ut(S);
831
832
  break;
832
833
  case 9:
833
834
  case 10:
834
835
  case 13:
835
836
  case 32:
836
- $ += an(b);
837
+ A += Eo(R);
837
838
  break;
838
839
  case 92:
839
- $ += sn(Ue() - 1, 7);
840
+ A += So(lt() - 1, 7);
840
841
  continue;
841
842
  case 47:
842
- switch (ae()) {
843
+ switch (de()) {
843
844
  case 42:
844
845
  case 47:
845
- Ve(ln(cn(Z(), Ue()), r, n), d);
846
+ st(_o(Co(ne(), lt()), t, r), l);
846
847
  break;
847
848
  default:
848
- $ += "/";
849
+ A += "/";
849
850
  }
850
851
  break;
851
- case 123 * x:
852
- s[p++] = ne($) * w;
853
- case 125 * x:
852
+ case 123 * m:
853
+ c[h++] = fe(A) * g;
854
+ case 125 * m:
854
855
  case 59:
855
856
  case 0:
856
- switch (E) {
857
+ switch (S) {
857
858
  case 0:
858
859
  case 125:
859
- D = 0;
860
- case 59 + u:
861
- w == -1 && ($ = M($, /\f/g, "")), S > 0 && ne($) - g && Ve(S > 32 ? Gr($ + ";", o, n, g - 1) : Gr(M($, " ", "") + ";", o, n, g - 2), d);
860
+ x = 0;
861
+ case 59 + f:
862
+ g == -1 && (A = L(A, /\f/g, "")), v > 0 && fe(A) - y && st(v > 32 ? Tr(A + ";", n, r, y - 1) : Tr(L(A, " ", "") + ";", n, r, y - 2), l);
862
863
  break;
863
864
  case 59:
864
- $ += ";";
865
+ A += ";";
865
866
  default:
866
- if (Ve(U = Ur($, r, n, p, u, a, s, k, j = [], l = [], g), i), E === 123)
867
- if (u === 0)
868
- qe($, r, U, U, j, i, g, s, l);
867
+ if (st(q = _r(A, t, r, h, f, o, c, _, $ = [], d = [], y), i), S === 123)
868
+ if (f === 0)
869
+ ft(A, t, q, q, $, i, y, c, d);
869
870
  else
870
- switch (_ === 99 && J($, 3) === 110 ? 100 : _) {
871
+ switch (C === 99 && J(A, 3) === 110 ? 100 : C) {
871
872
  case 100:
872
873
  case 108:
873
874
  case 109:
874
875
  case 115:
875
- qe(e, U, U, o && Ve(Ur(e, U, U, 0, 0, a, s, k, a, j = [], g), l), a, l, g, s, o ? j : l);
876
+ ft(e, q, q, n && st(_r(e, q, q, 0, 0, o, c, _, o, $ = [], y), d), o, d, y, c, n ? $ : d);
876
877
  break;
877
878
  default:
878
- qe($, U, U, U, [""], l, 0, s, l);
879
+ ft(A, q, q, q, [""], d, 0, c, d);
879
880
  }
880
881
  }
881
- p = u = S = 0, x = w = 1, k = $ = "", g = c;
882
+ h = f = v = 0, m = g = 1, _ = A = "", y = a;
882
883
  break;
883
884
  case 58:
884
- g = 1 + ne($), S = b;
885
+ y = 1 + fe(A), v = R;
885
886
  default:
886
- if (x < 1) {
887
- if (E == 123)
888
- --x;
889
- else if (E == 125 && x++ == 0 && on() == 125)
887
+ if (m < 1) {
888
+ if (S == 123)
889
+ --m;
890
+ else if (S == 125 && m++ == 0 && xo() == 125)
890
891
  continue;
891
892
  }
892
- switch ($ += Ke(E), E * x) {
893
+ switch (A += St(S), S * m) {
893
894
  case 38:
894
- w = u > 0 ? 1 : ($ += "\f", -1);
895
+ g = f > 0 ? 1 : (A += "\f", -1);
895
896
  break;
896
897
  case 44:
897
- s[p++] = (ne($) - 1) * w, w = 1;
898
+ c[h++] = (fe(A) - 1) * g, g = 1;
898
899
  break;
899
900
  case 64:
900
- ae() === 45 && ($ += Ge(Z())), _ = ae(), u = g = ne(k = $ += fn(Ue())), E++;
901
+ de() === 45 && (A += ut(ne())), C = de(), f = y = fe(_ = A += Ro(lt())), S++;
901
902
  break;
902
903
  case 45:
903
- b === 45 && ne($) == 2 && (x = 0);
904
+ R === 45 && fe(A) == 2 && (m = 0);
904
905
  }
905
906
  }
906
907
  return i;
907
908
  }
908
- function Ur(e, r, n, o, a, i, c, s, d, p, u) {
909
- for (var g = a - 1, _ = a === 0 ? i : [""], S = yr(_), b = 0, x = 0, D = 0; b < o; ++b)
910
- for (var w = 0, E = $e(e, g + 1, g = Zt(x = c[b])), k = e; w < S; ++w)
911
- (k = st(x > 0 ? _[w] + " " + E : M(E, /&\f/g, _[w]))) && (d[D++] = k);
912
- return Xe(e, r, n, a === 0 ? mr : s, d, p, u);
909
+ function _r(e, t, r, n, o, i, a, c, l, h, f) {
910
+ for (var y = o - 1, C = o === 0 ? i : [""], v = Kt(C), R = 0, m = 0, x = 0; R < n; ++R)
911
+ for (var g = 0, S = Xe(e, y + 1, y = po(m = a[R])), _ = e; g < v; ++g)
912
+ (_ = rn(m > 0 ? C[g] + " " + S : L(S, /&\f/g, C[g]))) && (l[x++] = _);
913
+ return Rt(e, t, r, o === 0 ? Ht : c, l, h, f);
913
914
  }
914
- function ln(e, r, n) {
915
- return Xe(e, r, n, at, Ke(nn()), $e(e, 2, -2), 0);
915
+ function _o(e, t, r) {
916
+ return Rt(e, t, r, en, St(bo()), Xe(e, 2, -2), 0);
916
917
  }
917
- function Gr(e, r, n, o) {
918
- return Xe(e, r, n, gr, $e(e, 0, o), $e(e, o + 1, -1), o);
918
+ function Tr(e, t, r, n) {
919
+ return Rt(e, t, r, Jt, Xe(e, 0, n), Xe(e, n + 1, -1), n);
919
920
  }
920
- function ye(e, r) {
921
- for (var n = "", o = yr(e), a = 0; a < o; a++)
922
- n += r(e[a], a, e, r) || "";
923
- return n;
921
+ function Ne(e, t) {
922
+ for (var r = "", n = Kt(e), o = 0; o < n; o++)
923
+ r += t(e[o], o, e, t) || "";
924
+ return r;
924
925
  }
925
- function dn(e, r, n, o) {
926
+ function To(e, t, r, n) {
926
927
  switch (e.type) {
927
- case Xt:
928
+ case ho:
928
929
  if (e.children.length) break;
929
- case Ht:
930
- case gr:
930
+ case fo:
931
+ case Jt:
931
932
  return e.return = e.return || e.value;
932
- case at:
933
+ case en:
933
934
  return "";
934
- case it:
935
- return e.return = e.value + "{" + ye(e.children, o) + "}";
936
- case mr:
935
+ case tn:
936
+ return e.return = e.value + "{" + Ne(e.children, n) + "}";
937
+ case Ht:
937
938
  e.value = e.props.join(",");
938
939
  }
939
- return ne(n = ye(e.children, o)) ? e.return = e.value + "{" + n + "}" : "";
940
+ return fe(r = Ne(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
940
941
  }
941
- function hn(e) {
942
- var r = yr(e);
943
- return function(n, o, a, i) {
944
- for (var c = "", s = 0; s < r; s++)
945
- c += e[s](n, o, a, i) || "";
946
- return c;
942
+ function ko(e) {
943
+ var t = Kt(e);
944
+ return function(r, n, o, i) {
945
+ for (var a = "", c = 0; c < t; c++)
946
+ a += e[c](r, n, o, i) || "";
947
+ return a;
947
948
  };
948
949
  }
949
- function pn(e) {
950
- return function(r) {
951
- r.root || (r = r.return) && e(r);
950
+ function Mo(e) {
951
+ return function(t) {
952
+ t.root || (t = t.return) && e(t);
952
953
  };
953
954
  }
954
- function vn(e) {
955
- var r = /* @__PURE__ */ Object.create(null);
956
- return function(n) {
957
- return r[n] === void 0 && (r[n] = e(n)), r[n];
955
+ function Po(e) {
956
+ var t = /* @__PURE__ */ Object.create(null);
957
+ return function(r) {
958
+ return t[r] === void 0 && (t[r] = e(r)), t[r];
958
959
  };
959
960
  }
960
- var mn = function(r, n, o) {
961
- for (var a = 0, i = 0; a = i, i = ae(), a === 38 && i === 12 && (n[o] = 1), !Ae(i); )
962
- Z();
963
- return Ie(r, X);
964
- }, gn = function(r, n) {
965
- var o = -1, a = 44;
961
+ var Oo = function(t, r, n) {
962
+ for (var o = 0, i = 0; o = i, i = de(), o === 38 && i === 12 && (r[n] = 1), !Ze(i); )
963
+ ne();
964
+ return nt(t, te);
965
+ }, Ao = function(t, r) {
966
+ var n = -1, o = 44;
966
967
  do
967
- switch (Ae(a)) {
968
+ switch (Ze(o)) {
968
969
  case 0:
969
- a === 38 && ae() === 12 && (n[o] = 1), r[o] += mn(X - 1, n, o);
970
+ o === 38 && de() === 12 && (r[n] = 1), t[n] += Oo(te - 1, r, n);
970
971
  break;
971
972
  case 2:
972
- r[o] += Ge(a);
973
+ t[n] += ut(o);
973
974
  break;
974
975
  case 4:
975
- if (a === 44) {
976
- r[++o] = ae() === 58 ? "&\f" : "", n[o] = r[o].length;
976
+ if (o === 44) {
977
+ t[++n] = de() === 58 ? "&\f" : "", r[n] = t[n].length;
977
978
  break;
978
979
  }
979
980
  default:
980
- r[o] += Ke(a);
981
- }
982
- while (a = Z());
983
- return r;
984
- }, yn = function(r, n) {
985
- return ut(gn(ft(r), n));
986
- }, qr = /* @__PURE__ */ new WeakMap(), bn = function(r) {
987
- if (!(r.type !== "rule" || !r.parent || // positive .length indicates that this rule contains pseudo
981
+ t[n] += St(o);
982
+ }
983
+ while (o = ne());
984
+ return t;
985
+ }, $o = function(t, r) {
986
+ return sn(Ao(on(t), r));
987
+ }, kr = /* @__PURE__ */ new WeakMap(), Fo = function(t) {
988
+ if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
988
989
  // negative .length indicates that this rule has been already prefixed
989
- r.length < 1)) {
990
- for (var n = r.value, o = r.parent, a = r.column === o.column && r.line === o.line; o.type !== "rule"; )
991
- if (o = o.parent, !o) return;
992
- if (!(r.props.length === 1 && n.charCodeAt(0) !== 58 && !qr.get(o)) && !a) {
993
- qr.set(r, !0);
994
- for (var i = [], c = yn(n, i), s = o.props, d = 0, p = 0; d < c.length; d++)
995
- for (var u = 0; u < s.length; u++, p++)
996
- r.props[p] = i[d] ? c[d].replace(/&\f/g, s[u]) : s[u] + " " + c[d];
997
- }
998
- }
999
- }, En = function(r) {
1000
- if (r.type === "decl") {
1001
- var n = r.value;
990
+ t.length < 1)) {
991
+ for (var r = t.value, n = t.parent, o = t.column === n.column && t.line === n.line; n.type !== "rule"; )
992
+ if (n = n.parent, !n) return;
993
+ if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !kr.get(n)) && !o) {
994
+ kr.set(t, !0);
995
+ for (var i = [], a = $o(r, i), c = n.props, l = 0, h = 0; l < a.length; l++)
996
+ for (var f = 0; f < c.length; f++, h++)
997
+ t.props[h] = i[l] ? a[l].replace(/&\f/g, c[f]) : c[f] + " " + a[l];
998
+ }
999
+ }
1000
+ }, Lo = function(t) {
1001
+ if (t.type === "decl") {
1002
+ var r = t.value;
1002
1003
  // charcode for l
1003
- n.charCodeAt(0) === 108 && // charcode for b
1004
- n.charCodeAt(2) === 98 && (r.return = "", r.value = "");
1004
+ r.charCodeAt(0) === 108 && // charcode for b
1005
+ r.charCodeAt(2) === 98 && (t.return = "", t.value = "");
1005
1006
  }
1006
1007
  };
1007
- function lt(e, r) {
1008
- switch (en(e, r)) {
1008
+ function an(e, t) {
1009
+ switch (go(e, t)) {
1009
1010
  case 5103:
1010
- return A + "print-" + e + e;
1011
+ return F + "print-" + e + e;
1011
1012
  case 5737:
1012
1013
  case 4201:
1013
1014
  case 3177:
@@ -1033,44 +1034,44 @@ function lt(e, r) {
1033
1034
  case 5365:
1034
1035
  case 5621:
1035
1036
  case 3829:
1036
- return A + e + e;
1037
+ return F + e + e;
1037
1038
  case 5349:
1038
1039
  case 4246:
1039
1040
  case 4810:
1040
1041
  case 6968:
1041
1042
  case 2756:
1042
- return A + e + Je + e + z + e + e;
1043
+ return F + e + mt + e + K + e + e;
1043
1044
  case 6828:
1044
1045
  case 4268:
1045
- return A + e + z + e + e;
1046
+ return F + e + K + e + e;
1046
1047
  case 6165:
1047
- return A + e + z + "flex-" + e + e;
1048
+ return F + e + K + "flex-" + e + e;
1048
1049
  case 5187:
1049
- return A + e + M(e, /(\w+).+(:[^]+)/, A + "box-$1$2" + z + "flex-$1$2") + e;
1050
+ return F + e + L(e, /(\w+).+(:[^]+)/, F + "box-$1$2" + K + "flex-$1$2") + e;
1050
1051
  case 5443:
1051
- return A + e + z + "flex-item-" + M(e, /flex-|-self/, "") + e;
1052
+ return F + e + K + "flex-item-" + L(e, /flex-|-self/, "") + e;
1052
1053
  case 4675:
1053
- return A + e + z + "flex-line-pack" + M(e, /align-content|flex-|-self/, "") + e;
1054
+ return F + e + K + "flex-line-pack" + L(e, /align-content|flex-|-self/, "") + e;
1054
1055
  case 5548:
1055
- return A + e + z + M(e, "shrink", "negative") + e;
1056
+ return F + e + K + L(e, "shrink", "negative") + e;
1056
1057
  case 5292:
1057
- return A + e + z + M(e, "basis", "preferred-size") + e;
1058
+ return F + e + K + L(e, "basis", "preferred-size") + e;
1058
1059
  case 6060:
1059
- return A + "box-" + M(e, "-grow", "") + A + e + z + M(e, "grow", "positive") + e;
1060
+ return F + "box-" + L(e, "-grow", "") + F + e + K + L(e, "grow", "positive") + e;
1060
1061
  case 4554:
1061
- return A + M(e, /([^-])(transform)/g, "$1" + A + "$2") + e;
1062
+ return F + L(e, /([^-])(transform)/g, "$1" + F + "$2") + e;
1062
1063
  case 6187:
1063
- return M(M(M(e, /(zoom-|grab)/, A + "$1"), /(image-set)/, A + "$1"), e, "") + e;
1064
+ return L(L(L(e, /(zoom-|grab)/, F + "$1"), /(image-set)/, F + "$1"), e, "") + e;
1064
1065
  case 5495:
1065
1066
  case 3959:
1066
- return M(e, /(image-set\([^]*)/, A + "$1$`$1");
1067
+ return L(e, /(image-set\([^]*)/, F + "$1$`$1");
1067
1068
  case 4968:
1068
- return M(M(e, /(.+:)(flex-)?(.*)/, A + "box-pack:$3" + z + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + A + e + e;
1069
+ return L(L(e, /(.+:)(flex-)?(.*)/, F + "box-pack:$3" + K + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + F + e + e;
1069
1070
  case 4095:
1070
1071
  case 3583:
1071
1072
  case 4068:
1072
1073
  case 2532:
1073
- return M(e, /(.+)-inline(.+)/, A + "$1$2") + e;
1074
+ return L(e, /(.+)-inline(.+)/, F + "$1$2") + e;
1074
1075
  case 8116:
1075
1076
  case 7059:
1076
1077
  case 5753:
@@ -1083,115 +1084,115 @@ function lt(e, r) {
1083
1084
  case 5789:
1084
1085
  case 5021:
1085
1086
  case 4765:
1086
- if (ne(e) - 1 - r > 6) switch (J(e, r + 1)) {
1087
+ if (fe(e) - 1 - t > 6) switch (J(e, t + 1)) {
1087
1088
  case 109:
1088
- if (J(e, r + 4) !== 45) break;
1089
+ if (J(e, t + 4) !== 45) break;
1089
1090
  case 102:
1090
- return M(e, /(.+:)(.+)-([^]+)/, "$1" + A + "$2-$3$1" + Je + (J(e, r + 3) == 108 ? "$3" : "$2-$3")) + e;
1091
+ return L(e, /(.+:)(.+)-([^]+)/, "$1" + F + "$2-$3$1" + mt + (J(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
1091
1092
  case 115:
1092
- return ~lr(e, "stretch") ? lt(M(e, "stretch", "fill-available"), r) + e : e;
1093
+ return ~jt(e, "stretch") ? an(L(e, "stretch", "fill-available"), t) + e : e;
1093
1094
  }
1094
1095
  break;
1095
1096
  case 4949:
1096
- if (J(e, r + 1) !== 115) break;
1097
+ if (J(e, t + 1) !== 115) break;
1097
1098
  case 6444:
1098
- switch (J(e, ne(e) - 3 - (~lr(e, "!important") && 10))) {
1099
+ switch (J(e, fe(e) - 3 - (~jt(e, "!important") && 10))) {
1099
1100
  case 107:
1100
- return M(e, ":", ":" + A) + e;
1101
+ return L(e, ":", ":" + F) + e;
1101
1102
  case 101:
1102
- return M(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + A + (J(e, 14) === 45 ? "inline-" : "") + "box$3$1" + A + "$2$3$1" + z + "$2box$3") + e;
1103
+ return L(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + F + (J(e, 14) === 45 ? "inline-" : "") + "box$3$1" + F + "$2$3$1" + K + "$2box$3") + e;
1103
1104
  }
1104
1105
  break;
1105
1106
  case 5936:
1106
- switch (J(e, r + 11)) {
1107
+ switch (J(e, t + 11)) {
1107
1108
  case 114:
1108
- return A + e + z + M(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
1109
+ return F + e + K + L(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
1109
1110
  case 108:
1110
- return A + e + z + M(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
1111
+ return F + e + K + L(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
1111
1112
  case 45:
1112
- return A + e + z + M(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
1113
+ return F + e + K + L(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
1113
1114
  }
1114
- return A + e + z + e + e;
1115
+ return F + e + K + e + e;
1115
1116
  }
1116
1117
  return e;
1117
1118
  }
1118
- var Sn = function(r, n, o, a) {
1119
- if (r.length > -1 && !r.return) switch (r.type) {
1120
- case gr:
1121
- r.return = lt(r.value, r.length);
1119
+ var No = function(t, r, n, o) {
1120
+ if (t.length > -1 && !t.return) switch (t.type) {
1121
+ case Jt:
1122
+ t.return = an(t.value, t.length);
1122
1123
  break;
1123
- case it:
1124
- return ye([ke(r, {
1125
- value: M(r.value, "@", "@" + A)
1126
- })], a);
1127
- case mr:
1128
- if (r.length) return tn(r.props, function(i) {
1129
- switch (rn(i, /(::plac\w+|:read-\w+)/)) {
1124
+ case tn:
1125
+ return Ne([Ke(t, {
1126
+ value: L(t.value, "@", "@" + F)
1127
+ })], o);
1128
+ case Ht:
1129
+ if (t.length) return yo(t.props, function(i) {
1130
+ switch (vo(i, /(::plac\w+|:read-\w+)/)) {
1130
1131
  case ":read-only":
1131
1132
  case ":read-write":
1132
- return ye([ke(r, {
1133
- props: [M(i, /:(read-\w+)/, ":" + Je + "$1")]
1134
- })], a);
1133
+ return Ne([Ke(t, {
1134
+ props: [L(i, /:(read-\w+)/, ":" + mt + "$1")]
1135
+ })], o);
1135
1136
  case "::placeholder":
1136
- return ye([ke(r, {
1137
- props: [M(i, /:(plac\w+)/, ":" + A + "input-$1")]
1138
- }), ke(r, {
1139
- props: [M(i, /:(plac\w+)/, ":" + Je + "$1")]
1140
- }), ke(r, {
1141
- props: [M(i, /:(plac\w+)/, z + "input-$1")]
1142
- })], a);
1137
+ return Ne([Ke(t, {
1138
+ props: [L(i, /:(plac\w+)/, ":" + F + "input-$1")]
1139
+ }), Ke(t, {
1140
+ props: [L(i, /:(plac\w+)/, ":" + mt + "$1")]
1141
+ }), Ke(t, {
1142
+ props: [L(i, /:(plac\w+)/, K + "input-$1")]
1143
+ })], o);
1143
1144
  }
1144
1145
  return "";
1145
1146
  });
1146
1147
  }
1147
- }, Rn = [Sn], Cn = function(r) {
1148
- var n = r.key;
1149
- if (n === "css") {
1150
- var o = document.querySelectorAll("style[data-emotion]:not([data-s])");
1151
- Array.prototype.forEach.call(o, function(x) {
1152
- var D = x.getAttribute("data-emotion");
1153
- D.indexOf(" ") !== -1 && (document.head.appendChild(x), x.setAttribute("data-s", ""));
1148
+ }, Io = [No], Do = function(t) {
1149
+ var r = t.key;
1150
+ if (r === "css") {
1151
+ var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
1152
+ Array.prototype.forEach.call(n, function(m) {
1153
+ var x = m.getAttribute("data-emotion");
1154
+ x.indexOf(" ") !== -1 && (document.head.appendChild(m), m.setAttribute("data-s", ""));
1154
1155
  });
1155
1156
  }
1156
- var a = r.stylisPlugins || Rn, i = {}, c, s = [];
1157
- c = r.container || document.head, Array.prototype.forEach.call(
1157
+ var o = t.stylisPlugins || Io, i = {}, a, c = [];
1158
+ a = t.container || document.head, Array.prototype.forEach.call(
1158
1159
  // this means we will ignore elements which don't have a space in them which
1159
1160
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
1160
- document.querySelectorAll('style[data-emotion^="' + n + ' "]'),
1161
- function(x) {
1162
- for (var D = x.getAttribute("data-emotion").split(" "), w = 1; w < D.length; w++)
1163
- i[D[w]] = !0;
1164
- s.push(x);
1161
+ document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
1162
+ function(m) {
1163
+ for (var x = m.getAttribute("data-emotion").split(" "), g = 1; g < x.length; g++)
1164
+ i[x[g]] = !0;
1165
+ c.push(m);
1165
1166
  }
1166
1167
  );
1167
- var d, p = [bn, En];
1168
+ var l, h = [Fo, Lo];
1168
1169
  {
1169
- var u, g = [dn, pn(function(x) {
1170
- u.insert(x);
1171
- })], _ = hn(p.concat(a, g)), S = function(D) {
1172
- return ye(un(D), _);
1170
+ var f, y = [To, Mo(function(m) {
1171
+ f.insert(m);
1172
+ })], C = ko(h.concat(o, y)), v = function(x) {
1173
+ return Ne(wo(x), C);
1173
1174
  };
1174
- d = function(D, w, E, k) {
1175
- u = E, S(D ? D + "{" + w.styles + "}" : w.styles), k && (b.inserted[w.name] = !0);
1175
+ l = function(x, g, S, _) {
1176
+ f = S, v(x ? x + "{" + g.styles + "}" : g.styles), _ && (R.inserted[g.name] = !0);
1176
1177
  };
1177
1178
  }
1178
- var b = {
1179
- key: n,
1180
- sheet: new Kt({
1181
- key: n,
1182
- container: c,
1183
- nonce: r.nonce,
1184
- speedy: r.speedy,
1185
- prepend: r.prepend,
1186
- insertionPoint: r.insertionPoint
1179
+ var R = {
1180
+ key: r,
1181
+ sheet: new uo({
1182
+ key: r,
1183
+ container: a,
1184
+ nonce: t.nonce,
1185
+ speedy: t.speedy,
1186
+ prepend: t.prepend,
1187
+ insertionPoint: t.insertionPoint
1187
1188
  }),
1188
- nonce: r.nonce,
1189
+ nonce: t.nonce,
1189
1190
  inserted: i,
1190
1191
  registered: {},
1191
- insert: d
1192
+ insert: l
1192
1193
  };
1193
- return b.sheet.hydrate(s), b;
1194
- }, hr = { exports: {} }, F = {};
1194
+ return R.sheet.hydrate(c), R;
1195
+ }, Yt = { exports: {} }, I = {};
1195
1196
  /** @license React v16.13.1
1196
1197
  * react-is.production.min.js
1197
1198
  *
@@ -1200,73 +1201,73 @@ var Sn = function(r, n, o, a) {
1200
1201
  * This source code is licensed under the MIT license found in the
1201
1202
  * LICENSE file in the root directory of this source tree.
1202
1203
  */
1203
- var Br;
1204
- function _n() {
1205
- if (Br) return F;
1206
- Br = 1;
1207
- var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, _ = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, b = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, D = e ? Symbol.for("react.fundamental") : 60117, w = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
1208
- function k(l) {
1209
- if (typeof l == "object" && l !== null) {
1210
- var U = l.$$typeof;
1211
- switch (U) {
1212
- case r:
1213
- switch (l = l.type, l) {
1214
- case d:
1215
- case p:
1216
- case o:
1204
+ var Mr;
1205
+ function Wo() {
1206
+ if (Mr) return I;
1207
+ Mr = 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, h = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, C = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, R = e ? Symbol.for("react.lazy") : 60116, m = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, g = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
1209
+ function _(d) {
1210
+ if (typeof d == "object" && d !== null) {
1211
+ var q = d.$$typeof;
1212
+ switch (q) {
1213
+ case t:
1214
+ switch (d = d.type, d) {
1215
+ case l:
1216
+ case h:
1217
+ case n:
1217
1218
  case i:
1218
- case a:
1219
- case g:
1220
- return l;
1219
+ case o:
1220
+ case y:
1221
+ return d;
1221
1222
  default:
1222
- switch (l = l && l.$$typeof, l) {
1223
- case s:
1224
- case u:
1225
- case b:
1226
- case S:
1223
+ switch (d = d && d.$$typeof, d) {
1227
1224
  case c:
1228
- return l;
1225
+ case f:
1226
+ case R:
1227
+ case v:
1228
+ case a:
1229
+ return d;
1229
1230
  default:
1230
- return U;
1231
+ return q;
1231
1232
  }
1232
1233
  }
1233
- case n:
1234
- return U;
1234
+ case r:
1235
+ return q;
1235
1236
  }
1236
1237
  }
1237
1238
  }
1238
- function j(l) {
1239
- return k(l) === p;
1240
- }
1241
- return F.AsyncMode = d, F.ConcurrentMode = p, F.ContextConsumer = s, F.ContextProvider = c, F.Element = r, F.ForwardRef = u, F.Fragment = o, F.Lazy = b, F.Memo = S, F.Portal = n, F.Profiler = i, F.StrictMode = a, F.Suspense = g, F.isAsyncMode = function(l) {
1242
- return j(l) || k(l) === d;
1243
- }, F.isConcurrentMode = j, F.isContextConsumer = function(l) {
1244
- return k(l) === s;
1245
- }, F.isContextProvider = function(l) {
1246
- return k(l) === c;
1247
- }, F.isElement = function(l) {
1248
- return typeof l == "object" && l !== null && l.$$typeof === r;
1249
- }, F.isForwardRef = function(l) {
1250
- return k(l) === u;
1251
- }, F.isFragment = function(l) {
1252
- return k(l) === o;
1253
- }, F.isLazy = function(l) {
1254
- return k(l) === b;
1255
- }, F.isMemo = function(l) {
1256
- return k(l) === S;
1257
- }, F.isPortal = function(l) {
1258
- return k(l) === n;
1259
- }, F.isProfiler = function(l) {
1260
- return k(l) === i;
1261
- }, F.isStrictMode = function(l) {
1262
- return k(l) === a;
1263
- }, F.isSuspense = function(l) {
1264
- return k(l) === g;
1265
- }, F.isValidElementType = function(l) {
1266
- return typeof l == "string" || typeof l == "function" || l === o || l === p || l === i || l === a || l === g || l === _ || typeof l == "object" && l !== null && (l.$$typeof === b || l.$$typeof === S || l.$$typeof === c || l.$$typeof === s || l.$$typeof === u || l.$$typeof === D || l.$$typeof === w || l.$$typeof === E || l.$$typeof === x);
1267
- }, F.typeOf = k, F;
1268
- }
1269
- var N = {};
1239
+ function $(d) {
1240
+ return _(d) === h;
1241
+ }
1242
+ return I.AsyncMode = l, I.ConcurrentMode = h, I.ContextConsumer = c, I.ContextProvider = a, I.Element = t, I.ForwardRef = f, I.Fragment = n, I.Lazy = R, I.Memo = v, I.Portal = r, I.Profiler = i, I.StrictMode = o, I.Suspense = y, I.isAsyncMode = function(d) {
1243
+ return $(d) || _(d) === l;
1244
+ }, I.isConcurrentMode = $, I.isContextConsumer = function(d) {
1245
+ return _(d) === c;
1246
+ }, I.isContextProvider = function(d) {
1247
+ return _(d) === a;
1248
+ }, I.isElement = function(d) {
1249
+ return typeof d == "object" && d !== null && d.$$typeof === t;
1250
+ }, I.isForwardRef = function(d) {
1251
+ return _(d) === f;
1252
+ }, I.isFragment = function(d) {
1253
+ return _(d) === n;
1254
+ }, I.isLazy = function(d) {
1255
+ return _(d) === R;
1256
+ }, I.isMemo = function(d) {
1257
+ return _(d) === v;
1258
+ }, I.isPortal = function(d) {
1259
+ return _(d) === r;
1260
+ }, I.isProfiler = function(d) {
1261
+ return _(d) === i;
1262
+ }, I.isStrictMode = function(d) {
1263
+ return _(d) === o;
1264
+ }, I.isSuspense = function(d) {
1265
+ return _(d) === y;
1266
+ }, I.isValidElementType = function(d) {
1267
+ return typeof d == "string" || typeof d == "function" || d === n || d === h || d === i || d === o || d === y || d === C || typeof d == "object" && d !== null && (d.$$typeof === R || d.$$typeof === v || d.$$typeof === a || d.$$typeof === c || d.$$typeof === f || d.$$typeof === x || d.$$typeof === g || d.$$typeof === S || d.$$typeof === m);
1268
+ }, I.typeOf = _, I;
1269
+ }
1270
+ var D = {};
1270
1271
  /** @license React v16.13.1
1271
1272
  * react-is.development.js
1272
1273
  *
@@ -1275,155 +1276,155 @@ var N = {};
1275
1276
  * This source code is licensed under the MIT license found in the
1276
1277
  * LICENSE file in the root directory of this source tree.
1277
1278
  */
1278
- var Jr;
1279
- function xn() {
1280
- return Jr || (Jr = 1, process.env.NODE_ENV !== "production" && function() {
1281
- var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, _ = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, b = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, D = e ? Symbol.for("react.fundamental") : 60117, w = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
1282
- function k(m) {
1283
- return typeof m == "string" || typeof m == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1284
- m === o || m === p || m === i || m === a || m === g || m === _ || typeof m == "object" && m !== null && (m.$$typeof === b || m.$$typeof === S || m.$$typeof === c || m.$$typeof === s || m.$$typeof === u || m.$$typeof === D || m.$$typeof === w || m.$$typeof === E || m.$$typeof === x);
1285
- }
1286
- function j(m) {
1287
- if (typeof m == "object" && m !== null) {
1288
- var we = m.$$typeof;
1289
- switch (we) {
1290
- case r:
1291
- var ve = m.type;
1292
- switch (ve) {
1293
- case d:
1294
- case p:
1295
- case o:
1279
+ var Pr;
1280
+ function jo() {
1281
+ return Pr || (Pr = 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, h = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, C = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, R = e ? Symbol.for("react.lazy") : 60116, m = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, g = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
1283
+ function _(E) {
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 === h || E === i || E === o || E === y || E === C || typeof E == "object" && E !== null && (E.$$typeof === R || E.$$typeof === v || E.$$typeof === a || E.$$typeof === c || E.$$typeof === f || E.$$typeof === x || E.$$typeof === g || E.$$typeof === S || E.$$typeof === m);
1286
+ }
1287
+ function $(E) {
1288
+ if (typeof E == "object" && E !== null) {
1289
+ var Be = E.$$typeof;
1290
+ switch (Be) {
1291
+ case t:
1292
+ var Oe = E.type;
1293
+ switch (Oe) {
1294
+ case l:
1295
+ case h:
1296
+ case n:
1296
1297
  case i:
1297
- case a:
1298
- case g:
1299
- return ve;
1298
+ case o:
1299
+ case y:
1300
+ return Oe;
1300
1301
  default:
1301
- var fe = ve && ve.$$typeof;
1302
- switch (fe) {
1303
- case s:
1304
- case u:
1305
- case b:
1306
- case S:
1302
+ var Ce = Oe && Oe.$$typeof;
1303
+ switch (Ce) {
1307
1304
  case c:
1308
- return fe;
1305
+ case f:
1306
+ case R:
1307
+ case v:
1308
+ case a:
1309
+ return Ce;
1309
1310
  default:
1310
- return we;
1311
+ return Be;
1311
1312
  }
1312
1313
  }
1313
- case n:
1314
- return we;
1314
+ case r:
1315
+ return Be;
1315
1316
  }
1316
1317
  }
1317
1318
  }
1318
- var l = d, U = p, $ = s, v = c, R = r, O = u, P = o, W = b, Y = S, B = n, Q = i, Fe = a, Ne = g, Se = !1;
1319
- function je(m) {
1320
- return Se || (Se = !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.")), Re(m) || j(m) === d;
1319
+ var d = l, q = h, A = c, Ye = a, Ee = t, Te = f, ke = n, Se = R, Z = v, ce = r, pe = i, b = o, T = y, k = !1;
1320
+ function O(E) {
1321
+ return k || (k = !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) || $(E) === l;
1321
1322
  }
1322
- function Re(m) {
1323
- return j(m) === p;
1323
+ function Y(E) {
1324
+ return $(E) === h;
1324
1325
  }
1325
- function Le(m) {
1326
- return j(m) === s;
1326
+ function G(E) {
1327
+ return $(E) === c;
1327
1328
  }
1328
- function De(m) {
1329
- return j(m) === c;
1329
+ function oe(E) {
1330
+ return $(E) === a;
1330
1331
  }
1331
- function Ye(m) {
1332
- return typeof m == "object" && m !== null && m.$$typeof === r;
1332
+ function me(E) {
1333
+ return typeof E == "object" && E !== null && E.$$typeof === t;
1333
1334
  }
1334
- function Qe(m) {
1335
- return j(m) === u;
1335
+ function _t(E) {
1336
+ return $(E) === f;
1336
1337
  }
1337
- function er(m) {
1338
- return j(m) === o;
1338
+ function Tt(E) {
1339
+ return $(E) === n;
1339
1340
  }
1340
- function Ce(m) {
1341
- return j(m) === b;
1341
+ function Ve(E) {
1342
+ return $(E) === R;
1342
1343
  }
1343
- function _e(m) {
1344
- return j(m) === S;
1344
+ function ze(E) {
1345
+ return $(E) === v;
1345
1346
  }
1346
- function he(m) {
1347
- return j(m) === n;
1347
+ function Me(E) {
1348
+ return $(E) === r;
1348
1349
  }
1349
- function xe(m) {
1350
- return j(m) === i;
1350
+ function Ue(E) {
1351
+ return $(E) === i;
1351
1352
  }
1352
- function pe(m) {
1353
- return j(m) === a;
1353
+ function Pe(E) {
1354
+ return $(E) === o;
1354
1355
  }
1355
- function rr(m) {
1356
- return j(m) === g;
1356
+ function kt(E) {
1357
+ return $(E) === y;
1357
1358
  }
1358
- N.AsyncMode = l, N.ConcurrentMode = U, N.ContextConsumer = $, N.ContextProvider = v, N.Element = R, N.ForwardRef = O, N.Fragment = P, N.Lazy = W, N.Memo = Y, N.Portal = B, N.Profiler = Q, N.StrictMode = Fe, N.Suspense = Ne, N.isAsyncMode = je, N.isConcurrentMode = Re, N.isContextConsumer = Le, N.isContextProvider = De, N.isElement = Ye, N.isForwardRef = Qe, N.isFragment = er, N.isLazy = Ce, N.isMemo = _e, N.isPortal = he, N.isProfiler = xe, N.isStrictMode = pe, N.isSuspense = rr, N.isValidElementType = k, N.typeOf = j;
1359
- }()), N;
1359
+ D.AsyncMode = d, D.ConcurrentMode = q, D.ContextConsumer = A, D.ContextProvider = Ye, D.Element = Ee, D.ForwardRef = Te, D.Fragment = ke, D.Lazy = Se, D.Memo = Z, D.Portal = ce, D.Profiler = pe, D.StrictMode = b, D.Suspense = T, D.isAsyncMode = O, 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 = Pe, D.isSuspense = kt, D.isValidElementType = _, D.typeOf = $;
1360
+ }()), D;
1360
1361
  }
1361
- process.env.NODE_ENV === "production" ? hr.exports = _n() : hr.exports = xn();
1362
- var wn = hr.exports, dt = wn, Tn = {
1362
+ process.env.NODE_ENV === "production" ? Yt.exports = Wo() : Yt.exports = jo();
1363
+ var qo = Yt.exports, cn = qo, Yo = {
1363
1364
  $$typeof: !0,
1364
1365
  render: !0,
1365
1366
  defaultProps: !0,
1366
1367
  displayName: !0,
1367
1368
  propTypes: !0
1368
- }, On = {
1369
+ }, Vo = {
1369
1370
  $$typeof: !0,
1370
1371
  compare: !0,
1371
1372
  defaultProps: !0,
1372
1373
  displayName: !0,
1373
1374
  propTypes: !0,
1374
1375
  type: !0
1375
- }, ht = {};
1376
- ht[dt.ForwardRef] = Tn;
1377
- ht[dt.Memo] = On;
1378
- var Pn = !0;
1379
- function kn(e, r, n) {
1380
- var o = "";
1381
- return n.split(" ").forEach(function(a) {
1382
- e[a] !== void 0 ? r.push(e[a] + ";") : a && (o += a + " ");
1383
- }), o;
1384
- }
1385
- var pt = function(r, n, o) {
1386
- var a = r.key + "-" + n.name;
1376
+ }, ln = {};
1377
+ ln[cn.ForwardRef] = Yo;
1378
+ ln[cn.Memo] = Vo;
1379
+ var zo = !0;
1380
+ function Uo(e, t, r) {
1381
+ var n = "";
1382
+ return r.split(" ").forEach(function(o) {
1383
+ e[o] !== void 0 ? t.push(e[o] + ";") : o && (n += o + " ");
1384
+ }), n;
1385
+ }
1386
+ var un = function(t, r, n) {
1387
+ var o = t.key + "-" + r.name;
1387
1388
  // we only need to add the styles to the registered cache if the
1388
1389
  // class name could be used further down
1389
1390
  // the tree but if it's a string tag, we know it won't
1390
1391
  // so we don't have to add it to registered cache.
1391
1392
  // this improves memory usage since we can avoid storing the whole style string
1392
- (o === !1 || // we need to always store it if we're in compat mode and
1393
+ (n === !1 || // we need to always store it if we're in compat mode and
1393
1394
  // in node since emotion-server relies on whether a style is in
1394
1395
  // the registered cache to know whether a style is global or not
1395
1396
  // also, note that this check will be dead code eliminated in the browser
1396
- Pn === !1) && r.registered[a] === void 0 && (r.registered[a] = n.styles);
1397
- }, $n = function(r, n, o) {
1398
- pt(r, n, o);
1399
- var a = r.key + "-" + n.name;
1400
- if (r.inserted[n.name] === void 0) {
1401
- var i = n;
1397
+ zo === !1) && t.registered[o] === void 0 && (t.registered[o] = r.styles);
1398
+ }, Bo = function(t, r, n) {
1399
+ un(t, r, n);
1400
+ var o = t.key + "-" + r.name;
1401
+ if (t.inserted[r.name] === void 0) {
1402
+ var i = r;
1402
1403
  do
1403
- r.insert(n === i ? "." + a : "", i, r.sheet, !0), i = i.next;
1404
+ t.insert(r === i ? "." + o : "", i, t.sheet, !0), i = i.next;
1404
1405
  while (i !== void 0);
1405
1406
  }
1406
1407
  };
1407
- function An(e) {
1408
- for (var r = 0, n, o = 0, a = e.length; a >= 4; ++o, a -= 4)
1409
- n = e.charCodeAt(o) & 255 | (e.charCodeAt(++o) & 255) << 8 | (e.charCodeAt(++o) & 255) << 16 | (e.charCodeAt(++o) & 255) << 24, n = /* Math.imul(k, m): */
1410
- (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
1411
- n >>> 24, r = /* Math.imul(k, m): */
1412
- (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
1413
- (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16);
1414
- switch (a) {
1408
+ function Go(e) {
1409
+ for (var t = 0, r, n = 0, o = e.length; o >= 4; ++n, o -= 4)
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
+ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
1412
+ r >>> 24, t = /* Math.imul(k, m): */
1413
+ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
1414
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
1415
+ switch (o) {
1415
1416
  case 3:
1416
- r ^= (e.charCodeAt(o + 2) & 255) << 16;
1417
+ t ^= (e.charCodeAt(n + 2) & 255) << 16;
1417
1418
  case 2:
1418
- r ^= (e.charCodeAt(o + 1) & 255) << 8;
1419
+ t ^= (e.charCodeAt(n + 1) & 255) << 8;
1419
1420
  case 1:
1420
- r ^= e.charCodeAt(o) & 255, r = /* Math.imul(h, m): */
1421
- (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16);
1421
+ t ^= e.charCodeAt(n) & 255, t = /* Math.imul(h, m): */
1422
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
1422
1423
  }
1423
- return r ^= r >>> 13, r = /* Math.imul(h, m): */
1424
- (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), ((r ^ r >>> 15) >>> 0).toString(36);
1424
+ return t ^= t >>> 13, t = /* Math.imul(h, m): */
1425
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
1425
1426
  }
1426
- var Mn = {
1427
+ var Ho = {
1427
1428
  animationIterationCount: 1,
1428
1429
  aspectRatio: 1,
1429
1430
  borderImageOutset: 1,
@@ -1472,230 +1473,352 @@ var Mn = {
1472
1473
  strokeMiterlimit: 1,
1473
1474
  strokeOpacity: 1,
1474
1475
  strokeWidth: 1
1475
- }, In = /[A-Z]|^ms/g, Fn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, vt = function(r) {
1476
- return r.charCodeAt(1) === 45;
1477
- }, zr = function(r) {
1478
- return r != null && typeof r != "boolean";
1479
- }, sr = /* @__PURE__ */ vn(function(e) {
1480
- return vt(e) ? e : e.replace(In, "-$&").toLowerCase();
1481
- }), Kr = function(r, n) {
1482
- switch (r) {
1476
+ }, Jo = /[A-Z]|^ms/g, Ko = /_EMO_([^_]+?)_([^]*?)_EMO_/g, fn = function(t) {
1477
+ return t.charCodeAt(1) === 45;
1478
+ }, Or = function(t) {
1479
+ return t != null && typeof t != "boolean";
1480
+ }, Lt = /* @__PURE__ */ Po(function(e) {
1481
+ return fn(e) ? e : e.replace(Jo, "-$&").toLowerCase();
1482
+ }), Ar = function(t, r) {
1483
+ switch (t) {
1483
1484
  case "animation":
1484
1485
  case "animationName":
1485
- if (typeof n == "string")
1486
- return n.replace(Fn, function(o, a, i) {
1487
- return oe = {
1488
- name: a,
1486
+ if (typeof r == "string")
1487
+ return r.replace(Ko, function(n, o, i) {
1488
+ return he = {
1489
+ name: o,
1489
1490
  styles: i,
1490
- next: oe
1491
- }, a;
1491
+ next: he
1492
+ }, o;
1492
1493
  });
1493
1494
  }
1494
- return Mn[r] !== 1 && !vt(r) && typeof n == "number" && n !== 0 ? n + "px" : n;
1495
+ return Ho[t] !== 1 && !fn(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
1495
1496
  };
1496
- function Me(e, r, n) {
1497
- if (n == null)
1497
+ function et(e, t, r) {
1498
+ if (r == null)
1498
1499
  return "";
1499
- var o = n;
1500
- if (o.__emotion_styles !== void 0)
1501
- return o;
1502
- switch (typeof n) {
1500
+ var n = r;
1501
+ if (n.__emotion_styles !== void 0)
1502
+ return n;
1503
+ switch (typeof r) {
1503
1504
  case "boolean":
1504
1505
  return "";
1505
1506
  case "object": {
1506
- var a = n;
1507
- if (a.anim === 1)
1508
- return oe = {
1509
- name: a.name,
1510
- styles: a.styles,
1511
- next: oe
1512
- }, a.name;
1513
- var i = n;
1507
+ var o = r;
1508
+ if (o.anim === 1)
1509
+ return he = {
1510
+ name: o.name,
1511
+ styles: o.styles,
1512
+ next: he
1513
+ }, o.name;
1514
+ var i = r;
1514
1515
  if (i.styles !== void 0) {
1515
- var c = i.next;
1516
- if (c !== void 0)
1517
- for (; c !== void 0; )
1518
- oe = {
1519
- name: c.name,
1520
- styles: c.styles,
1521
- next: oe
1522
- }, c = c.next;
1523
- var s = i.styles + ";";
1524
- return s;
1516
+ var a = i.next;
1517
+ if (a !== void 0)
1518
+ for (; a !== void 0; )
1519
+ he = {
1520
+ name: a.name,
1521
+ styles: a.styles,
1522
+ next: he
1523
+ }, a = a.next;
1524
+ var c = i.styles + ";";
1525
+ return c;
1525
1526
  }
1526
- return Nn(e, r, n);
1527
+ return Qo(e, t, r);
1527
1528
  }
1528
1529
  case "function": {
1529
1530
  if (e !== void 0) {
1530
- var d = oe, p = n(e);
1531
- return oe = d, Me(e, r, p);
1531
+ var l = he, h = r(e);
1532
+ return he = l, et(e, t, h);
1532
1533
  }
1533
1534
  break;
1534
1535
  }
1535
1536
  }
1536
- var u = n;
1537
- return u;
1537
+ var f = r;
1538
+ return f;
1538
1539
  }
1539
- function Nn(e, r, n) {
1540
- var o = "";
1541
- if (Array.isArray(n))
1542
- for (var a = 0; a < n.length; a++)
1543
- o += Me(e, r, n[a]) + ";";
1540
+ function Qo(e, t, r) {
1541
+ var n = "";
1542
+ if (Array.isArray(r))
1543
+ for (var o = 0; o < r.length; o++)
1544
+ n += et(e, t, r[o]) + ";";
1544
1545
  else
1545
- for (var i in n) {
1546
- var c = n[i];
1547
- if (typeof c != "object") {
1548
- var s = c;
1549
- zr(s) && (o += sr(i) + ":" + Kr(i, s) + ";");
1550
- } else if (Array.isArray(c) && typeof c[0] == "string" && r == null)
1551
- for (var d = 0; d < c.length; d++)
1552
- zr(c[d]) && (o += sr(i) + ":" + Kr(i, c[d]) + ";");
1546
+ for (var i in r) {
1547
+ var a = r[i];
1548
+ if (typeof a != "object") {
1549
+ var c = a;
1550
+ Or(c) && (n += Lt(i) + ":" + Ar(i, c) + ";");
1551
+ } else if (Array.isArray(a) && typeof a[0] == "string" && t == null)
1552
+ for (var l = 0; l < a.length; l++)
1553
+ Or(a[l]) && (n += Lt(i) + ":" + Ar(i, a[l]) + ";");
1553
1554
  else {
1554
- var p = Me(e, r, c);
1555
+ var h = et(e, t, a);
1555
1556
  switch (i) {
1556
1557
  case "animation":
1557
1558
  case "animationName": {
1558
- o += sr(i) + ":" + p + ";";
1559
+ n += Lt(i) + ":" + h + ";";
1559
1560
  break;
1560
1561
  }
1561
1562
  default:
1562
- o += i + "{" + p + "}";
1563
+ n += i + "{" + h + "}";
1563
1564
  }
1564
1565
  }
1565
1566
  }
1566
- return o;
1567
+ return n;
1567
1568
  }
1568
- var Hr = /label:\s*([^\s;{]+)\s*(;|$)/g, oe;
1569
- function jn(e, r, n) {
1569
+ var $r = /label:\s*([^\s;{]+)\s*(;|$)/g, he;
1570
+ function Xo(e, t, r) {
1570
1571
  if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
1571
1572
  return e[0];
1572
- var o = !0, a = "";
1573
- oe = void 0;
1573
+ var n = !0, o = "";
1574
+ he = void 0;
1574
1575
  var i = e[0];
1575
1576
  if (i == null || i.raw === void 0)
1576
- o = !1, a += Me(n, r, i);
1577
+ n = !1, o += et(r, t, i);
1577
1578
  else {
1578
- var c = i;
1579
- a += c[0];
1580
- }
1581
- for (var s = 1; s < e.length; s++)
1582
- if (a += Me(n, r, e[s]), o) {
1583
- var d = i;
1584
- a += d[s];
1585
- }
1586
- Hr.lastIndex = 0;
1587
- for (var p = "", u; (u = Hr.exec(a)) !== null; )
1588
- p += "-" + u[1];
1589
- var g = An(a) + p;
1579
+ var a = i;
1580
+ o += a[0];
1581
+ }
1582
+ for (var c = 1; c < e.length; c++)
1583
+ if (o += et(r, t, e[c]), n) {
1584
+ var l = i;
1585
+ o += l[c];
1586
+ }
1587
+ $r.lastIndex = 0;
1588
+ for (var h = "", f; (f = $r.exec(o)) !== null; )
1589
+ h += "-" + f[1];
1590
+ var y = Go(o) + h;
1590
1591
  return {
1591
- name: g,
1592
- styles: a,
1593
- next: oe
1592
+ name: y,
1593
+ styles: o,
1594
+ next: he
1594
1595
  };
1595
1596
  }
1596
- var Ln = function(r) {
1597
- return r();
1598
- }, Dn = se.useInsertionEffect ? se.useInsertionEffect : !1, Yn = Dn || Ln, mt = /* @__PURE__ */ se.createContext(
1597
+ var Zo = function(t) {
1598
+ return t();
1599
+ }, ei = ve.useInsertionEffect ? ve.useInsertionEffect : !1, ti = ei || Zo, hn = /* @__PURE__ */ ve.createContext(
1599
1600
  // we're doing this to avoid preconstruct's dead code elimination in this one case
1600
1601
  // because this module is primarily intended for the browser and node
1601
1602
  // but it's also required in react native and similar environments sometimes
1602
1603
  // and we could have a special build just for that
1603
1604
  // but this is much easier and the native packages
1604
1605
  // might use a different theme context in the future anyway
1605
- typeof HTMLElement < "u" ? /* @__PURE__ */ Cn({
1606
+ typeof HTMLElement < "u" ? /* @__PURE__ */ Do({
1606
1607
  key: "css"
1607
1608
  }) : null
1608
1609
  );
1609
- mt.Provider;
1610
- var Wn = function(r) {
1611
- return /* @__PURE__ */ Yt(function(n, o) {
1612
- var a = Wt(mt);
1613
- return r(n, a, o);
1610
+ hn.Provider;
1611
+ var ri = function(t) {
1612
+ return /* @__PURE__ */ rt(function(r, n) {
1613
+ var o = Jn(hn);
1614
+ return t(r, o, n);
1614
1615
  });
1615
- }, Vn = /* @__PURE__ */ se.createContext({}), br = {}.hasOwnProperty, pr = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", Un = function(r, n) {
1616
- var o = {};
1617
- for (var a in n)
1618
- br.call(n, a) && (o[a] = n[a]);
1619
- return o[pr] = r, o;
1620
- }, Gn = function(r) {
1621
- var n = r.cache, o = r.serialized, a = r.isStringTag;
1622
- return pt(n, o, a), Yn(function() {
1623
- return $n(n, o, a);
1616
+ }, ni = /* @__PURE__ */ ve.createContext({}), Qt = {}.hasOwnProperty, Vt = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", oi = function(t, r) {
1617
+ var n = {};
1618
+ for (var o in r)
1619
+ Qt.call(r, o) && (n[o] = r[o]);
1620
+ return n[Vt] = t, n;
1621
+ }, ii = function(t) {
1622
+ var r = t.cache, n = t.serialized, o = t.isStringTag;
1623
+ return un(r, n, o), ti(function() {
1624
+ return Bo(r, n, o);
1624
1625
  }), null;
1625
- }, qn = /* @__PURE__ */ Wn(function(e, r, n) {
1626
- var o = e.css;
1627
- typeof o == "string" && r.registered[o] !== void 0 && (o = r.registered[o]);
1628
- var a = e[pr], i = [o], c = "";
1629
- typeof e.className == "string" ? c = kn(r.registered, i, e.className) : e.className != null && (c = e.className + " ");
1630
- var s = jn(i, void 0, se.useContext(Vn));
1631
- c += r.key + "-" + s.name;
1632
- var d = {};
1633
- for (var p in e)
1634
- br.call(e, p) && p !== "css" && p !== pr && (d[p] = e[p]);
1635
- return d.className = c, n && (d.ref = n), /* @__PURE__ */ se.createElement(se.Fragment, null, /* @__PURE__ */ se.createElement(Gn, {
1636
- cache: r,
1637
- serialized: s,
1638
- isStringTag: typeof a == "string"
1639
- }), /* @__PURE__ */ se.createElement(a, d));
1640
- }), Bn = qn, Ze = function(r, n, o) {
1641
- return br.call(n, "css") ? Vr.jsx(Bn, Un(r, n), o) : Vr.jsx(r, n, o);
1626
+ }, si = /* @__PURE__ */ ri(function(e, t, r) {
1627
+ var n = e.css;
1628
+ typeof n == "string" && t.registered[n] !== void 0 && (n = t.registered[n]);
1629
+ var o = e[Vt], i = [n], a = "";
1630
+ typeof e.className == "string" ? a = Uo(t.registered, i, e.className) : e.className != null && (a = e.className + " ");
1631
+ var c = Xo(i, void 0, ve.useContext(ni));
1632
+ a += t.key + "-" + c.name;
1633
+ var l = {};
1634
+ for (var h in e)
1635
+ Qt.call(e, h) && h !== "css" && h !== Vt && (l[h] = e[h]);
1636
+ return l.className = a, r && (l.ref = r), /* @__PURE__ */ ve.createElement(ve.Fragment, null, /* @__PURE__ */ ve.createElement(ii, {
1637
+ cache: t,
1638
+ serialized: c,
1639
+ isStringTag: typeof o == "string"
1640
+ }), /* @__PURE__ */ ve.createElement(o, l));
1641
+ }), ai = si, wt = function(t, r, n) {
1642
+ return Qt.call(r, "css") ? wr.jsx(ai, oi(t, r), n) : wr.jsx(t, r, n);
1642
1643
  };
1643
- function Jn(e) {
1644
+ function ci(e) {
1644
1645
  switch (e.toLowerCase()) {
1645
1646
  case "sql":
1646
- return rt();
1647
+ return zr();
1647
1648
  case "json":
1648
- return tt();
1649
+ return Ur();
1649
1650
  default:
1650
1651
  return [];
1651
1652
  }
1652
1653
  }
1653
- function zn(e) {
1654
+ function li(e) {
1654
1655
  return ["sql", "json"].includes(e.toLowerCase());
1655
1656
  }
1656
- function Kn(e = {}) {
1657
- return Vt(e);
1657
+ function ui(e = {}) {
1658
+ return Hr(e);
1658
1659
  }
1659
- function ho(e) {
1660
- return [nt(), ot(e)];
1660
+ function ss(e) {
1661
+ return [Zn(), eo(e)];
1661
1662
  }
1662
- function Hn() {
1663
- return Be.of([fr]);
1663
+ function fi() {
1664
+ return we.of([Dt]);
1664
1665
  }
1665
- const po = [Hn(), Kn()], Xr = te.theme({
1666
+ const as = [fi(), ui()], hi = Jr.define([{
1667
+ tag: W.keyword,
1668
+ color: "#1a1aa6",
1669
+ fontWeight: "bold"
1670
+ }, {
1671
+ tag: W.comment,
1672
+ color: "#008000",
1673
+ fontStyle: "italic"
1674
+ }, {
1675
+ tag: W.string,
1676
+ color: "#a31515"
1677
+ }, {
1678
+ tag: W.number,
1679
+ color: "#098658"
1680
+ }, {
1681
+ tag: W.operator,
1682
+ color: "#777777"
1683
+ }, {
1684
+ tag: W.propertyName,
1685
+ color: "#0451a5"
1686
+ }, {
1687
+ tag: W.variableName,
1688
+ color: "#001080"
1689
+ }, {
1690
+ tag: W.definition(W.variableName),
1691
+ color: "#1a1aa6"
1692
+ }, {
1693
+ tag: W.typeName,
1694
+ color: "#267f99"
1695
+ }, {
1696
+ tag: W.className,
1697
+ color: "#267f99"
1698
+ }, {
1699
+ tag: W.meta,
1700
+ color: "#5c5c5c"
1701
+ }, {
1702
+ tag: W.regexp,
1703
+ color: "#811f3f"
1704
+ }, {
1705
+ tag: W.link,
1706
+ color: "#0563c1",
1707
+ textDecoration: "underline"
1708
+ }]), Fr = [V.theme({
1666
1709
  "&": {
1667
1710
  backgroundColor: "#ffffff",
1668
- color: "#333333"
1711
+ color: "#333333",
1712
+ fontSize: "14px",
1713
+ height: "100%"
1714
+ },
1715
+ ".cm-scroller": {
1716
+ fontFamily: '"Menlo", "Monaco", "Courier New", monospace',
1717
+ overflow: "auto"
1718
+ },
1719
+ ".cm-content": {
1720
+ padding: "8px 0",
1721
+ caretColor: "#333",
1722
+ textAlign: "left"
1669
1723
  },
1670
1724
  ".cm-gutters": {
1671
- backgroundColor: "#f5f5f5",
1672
- color: "#999999",
1673
- border: "none"
1725
+ backgroundColor: "#f8f9fa",
1726
+ color: "#6e7781",
1727
+ borderRight: "1px solid #ddd"
1728
+ },
1729
+ ".cm-lineNumbers": {
1730
+ minWidth: "40px"
1731
+ },
1732
+ ".cm-lineNumbers .cm-gutterElement": {
1733
+ padding: "0 8px 0 4px",
1734
+ textAlign: "right",
1735
+ fontSize: "12px"
1674
1736
  },
1675
1737
  ".cm-activeLine": {
1676
- backgroundColor: "rgba(0, 0, 0, 0.05)"
1738
+ backgroundColor: "rgba(0, 0, 0, 0.04)"
1677
1739
  },
1678
1740
  ".cm-activeLineGutter": {
1679
- backgroundColor: "rgba(0, 0, 0, 0.05)"
1741
+ backgroundColor: "rgba(0, 0, 0, 0.04)"
1680
1742
  },
1681
1743
  ".cm-selectionMatch": {
1682
- backgroundColor: "rgba(0, 0, 0, 0.05)"
1744
+ backgroundColor: "rgba(181, 213, 255, 0.3)"
1683
1745
  },
1684
1746
  "&.cm-focused .cm-cursor": {
1685
1747
  borderLeftColor: "#333333"
1686
1748
  },
1687
1749
  "&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
1688
- backgroundColor: "rgba(0, 0, 255, 0.1)"
1750
+ backgroundColor: "rgba(181, 213, 255, 0.5)"
1689
1751
  }
1690
- }), Xn = te.theme({
1752
+ }), pt(hi)], di = Jr.define([{
1753
+ tag: W.keyword,
1754
+ color: "#569cd6",
1755
+ fontWeight: "bold"
1756
+ }, {
1757
+ tag: W.comment,
1758
+ color: "#6A9955",
1759
+ fontStyle: "italic"
1760
+ }, {
1761
+ tag: W.string,
1762
+ color: "#ce9178"
1763
+ }, {
1764
+ tag: W.number,
1765
+ color: "#b5cea8"
1766
+ }, {
1767
+ tag: W.operator,
1768
+ color: "#d4d4d4"
1769
+ }, {
1770
+ tag: W.propertyName,
1771
+ color: "#9cdcfe"
1772
+ }, {
1773
+ tag: W.variableName,
1774
+ color: "#9cdcfe"
1775
+ }, {
1776
+ tag: W.definition(W.variableName),
1777
+ color: "#4fc1ff"
1778
+ }, {
1779
+ tag: W.typeName,
1780
+ color: "#4ec9b0"
1781
+ }, {
1782
+ tag: W.className,
1783
+ color: "#4ec9b0"
1784
+ }, {
1785
+ tag: W.meta,
1786
+ color: "#d4d4d4"
1787
+ }, {
1788
+ tag: W.regexp,
1789
+ color: "#d16969"
1790
+ }, {
1791
+ tag: W.link,
1792
+ color: "#4e94ce",
1793
+ textDecoration: "underline"
1794
+ }]), pi = [V.theme({
1691
1795
  "&": {
1692
1796
  backgroundColor: "#1e1e1e",
1693
- color: "#d4d4d4"
1797
+ color: "#d4d4d4",
1798
+ fontSize: "14px",
1799
+ height: "100%"
1800
+ },
1801
+ ".cm-scroller": {
1802
+ fontFamily: '"Menlo", "Monaco", "Courier New", monospace',
1803
+ overflow: "auto"
1804
+ },
1805
+ ".cm-content": {
1806
+ padding: "8px 0",
1807
+ caretColor: "#d4d4d4",
1808
+ textAlign: "left"
1694
1809
  },
1695
1810
  ".cm-gutters": {
1696
- backgroundColor: "#1e1e1e",
1697
- color: "#8a8a8a",
1698
- border: "none"
1811
+ backgroundColor: "#252526",
1812
+ color: "#858585",
1813
+ borderRight: "1px solid #404040"
1814
+ },
1815
+ ".cm-lineNumbers": {
1816
+ minWidth: "40px"
1817
+ },
1818
+ ".cm-lineNumbers .cm-gutterElement": {
1819
+ padding: "0 8px 0 4px",
1820
+ textAlign: "right",
1821
+ fontSize: "12px"
1699
1822
  },
1700
1823
  ".cm-activeLine": {
1701
1824
  backgroundColor: "rgba(255, 255, 255, 0.07)"
@@ -1704,7 +1827,7 @@ const po = [Hn(), Kn()], Xr = te.theme({
1704
1827
  backgroundColor: "rgba(255, 255, 255, 0.07)"
1705
1828
  },
1706
1829
  ".cm-selectionMatch": {
1707
- backgroundColor: "rgba(255, 255, 255, 0.07)"
1830
+ backgroundColor: "rgba(255, 255, 255, 0.1)"
1708
1831
  },
1709
1832
  "&.cm-focused .cm-cursor": {
1710
1833
  borderLeftColor: "#d4d4d4"
@@ -1712,53 +1835,53 @@ const po = [Hn(), Kn()], Xr = te.theme({
1712
1835
  "&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
1713
1836
  backgroundColor: "rgba(255, 255, 255, 0.1)"
1714
1837
  }
1715
- });
1716
- function Zn(e) {
1838
+ }), pt(di)];
1839
+ function mi(e) {
1717
1840
  switch (e) {
1718
1841
  case "light":
1719
- return Xr;
1842
+ return Fr;
1720
1843
  case "dark":
1721
- return Xn;
1844
+ return pi;
1722
1845
  default:
1723
- return Xr;
1846
+ return Fr;
1724
1847
  }
1725
1848
  }
1726
- const Zr = (e) => {
1727
- const r = {
1849
+ const Lr = (e) => {
1850
+ const t = {
1728
1851
  value: "",
1729
1852
  readOnlyRanges: []
1730
1853
  };
1731
- let n = 0;
1732
- return e.forEach((o) => {
1854
+ let r = 0;
1855
+ return e.forEach((n) => {
1733
1856
  const {
1734
- content: a,
1857
+ content: o,
1735
1858
  editable: i
1736
- } = o, c = a.replace(/\r\n/g, `
1737
- `), s = n, d = s + c.length;
1738
- r.value += a, i || r.readOnlyRanges.push({
1739
- start: s,
1740
- end: d
1741
- }), n = d;
1742
- }), r;
1743
- }, ze = Ut.define(), Qr = Gt.define({
1859
+ } = n, a = o.replace(/\r\n/g, `
1860
+ `), c = r, l = c + a.length;
1861
+ t.value += o, i || t.readOnlyRanges.push({
1862
+ start: c,
1863
+ end: l
1864
+ }), r = l;
1865
+ }), t;
1866
+ }, gt = je.define(), Nr = Gt.define({
1744
1867
  create() {
1745
- return cr.none;
1868
+ return Q.none;
1746
1869
  },
1747
- update(e, r) {
1748
- e = e.map(r.changes);
1749
- for (const n of r.effects)
1750
- if (n.is(ze))
1751
- return console.log(2939), gt(n.value);
1752
- return r.docChanged, e;
1870
+ update(e, t) {
1871
+ e = e.map(t.changes);
1872
+ for (const r of t.effects)
1873
+ if (r.is(gt))
1874
+ return console.log(2939), dn(r.value);
1875
+ return t.docChanged, e;
1753
1876
  },
1754
1877
  provide(e) {
1755
- return te.decorations.from(e);
1878
+ return V.decorations.from(e);
1756
1879
  }
1757
1880
  });
1758
- function gt(e) {
1759
- const r = [];
1760
- return console.log(e, 9999299), e.forEach((n) => {
1761
- n.start < n.end && r.push(cr.mark({
1881
+ function dn(e) {
1882
+ const t = [];
1883
+ return console.log(e, 9999299), e.forEach((r) => {
1884
+ r.start < r.end && t.push(Q.mark({
1762
1885
  inclusive: !0,
1763
1886
  attributes: {
1764
1887
  class: "cm-readOnly",
@@ -1766,451 +1889,1546 @@ function gt(e) {
1766
1889
  },
1767
1890
  // 设置较低的优先级,确保语法高亮装饰可以覆盖
1768
1891
  priority: -100
1769
- }).range(n.start, n.end));
1770
- }), cr.set(r);
1892
+ }).range(r.start, r.end));
1893
+ }), Q.set(t);
1771
1894
  }
1772
- const Er = /* @__PURE__ */ new WeakMap();
1773
- function Qn(e) {
1774
- let r = e.map((n) => ({
1775
- ...n
1895
+ const Xt = /* @__PURE__ */ new WeakMap();
1896
+ function gi(e) {
1897
+ let t = e.map((r) => ({
1898
+ ...r
1776
1899
  }));
1777
1900
  return [
1778
1901
  // 添加状态字段
1779
- Qr.init(() => gt(r)),
1902
+ Nr.init(() => dn(t)),
1780
1903
  // 添加按键映射,专门处理回车键
1781
- Be.of([{
1904
+ we.of([{
1782
1905
  key: "Enter",
1783
- run: (n) => {
1784
- const o = n.state.selection.main, {
1785
- from: a,
1906
+ run: (r) => {
1907
+ const n = r.state.selection.main, {
1908
+ from: o,
1786
1909
  to: i
1787
- } = o;
1788
- if (a !== i) {
1789
- for (const s of r)
1790
- if (a < s.end && i > s.start)
1910
+ } = n;
1911
+ if (o !== i) {
1912
+ for (const c of t)
1913
+ if (o < c.end && i > c.start)
1791
1914
  return !1;
1792
1915
  }
1793
- let c = !1;
1794
- for (const s of r)
1795
- if (a > s.start && a < s.end) {
1796
- c = !0;
1916
+ let a = !1;
1917
+ for (const c of t)
1918
+ if (o > c.start && o < c.end) {
1919
+ a = !0;
1797
1920
  break;
1798
1921
  }
1799
- return c ? !1 : (n.dispatch({
1922
+ return a ? !1 : (r.dispatch({
1800
1923
  changes: {
1801
- from: a,
1924
+ from: o,
1802
1925
  to: i,
1803
1926
  insert: `
1804
1927
  `
1805
1928
  },
1806
1929
  selection: {
1807
- anchor: a + 1
1930
+ anchor: o + 1
1808
1931
  }
1809
1932
  }), !0);
1810
1933
  }
1811
1934
  }]),
1812
1935
  // 添加事务过滤器,阻止只读区域的编辑
1813
- le.transactionFilter.of((n) => {
1814
- if (!n.docChanged || n.isUserEvent("input.type.Enter") || n.isUserEvent("input.enter"))
1815
- return n;
1816
- let o = !1;
1817
- return n.changes.iterChanges((a, i, c, s) => {
1818
- if (!(n.newDoc.sliceString(c, s) === `
1819
- ` && a === i)) {
1820
- for (const u of r)
1821
- if (a === i) {
1822
- if (a > u.start && a < u.end) {
1823
- o = !0;
1936
+ be.transactionFilter.of((r) => {
1937
+ if (!r.docChanged || r.isUserEvent("input.type.Enter") || r.isUserEvent("input.enter"))
1938
+ return r;
1939
+ let n = !1;
1940
+ return r.changes.iterChanges((o, i, a, c) => {
1941
+ if (!(r.newDoc.sliceString(a, c) === `
1942
+ ` && o === i)) {
1943
+ for (const f of t)
1944
+ if (o === i) {
1945
+ if (o > f.start && o < f.end) {
1946
+ n = !0;
1824
1947
  break;
1825
1948
  }
1826
1949
  } else if (
1827
1950
  // 删除或替换操作
1828
- a < u.end && i > u.start || // 处理边界情况:删除操作正好落在只读区域的开始或结束位置
1829
- a === u.start && i > a || i === u.end && a < i
1951
+ o < f.end && i > f.start || // 处理边界情况:删除操作正好落在只读区域的开始或结束位置
1952
+ o === f.start && i > o || i === f.end && o < i
1830
1953
  ) {
1831
- o = !0;
1954
+ n = !0;
1832
1955
  break;
1833
1956
  }
1834
1957
  }
1835
- }), o ? [] : n;
1958
+ }), n ? [] : r;
1836
1959
  }),
1837
1960
  // 动态更新只读区域的装饰
1838
- te.updateListener.of((n) => {
1839
- if (n.docChanged) {
1840
- const o = ro(r, n);
1841
- !eo(r, o) ? (r = o, Er.set(n.view, o), n.view.dispatch({
1842
- effects: ze.of(o)
1843
- })) : n.view.dispatch({
1844
- effects: ze.of(o)
1961
+ V.updateListener.of((r) => {
1962
+ if (r.docChanged) {
1963
+ const n = yi(t, r);
1964
+ !vi(t, n) ? (t = n, Xt.set(r.view, n), r.view.dispatch({
1965
+ effects: gt.of(n)
1966
+ })) : r.view.dispatch({
1967
+ effects: gt.of(n)
1845
1968
  });
1846
1969
  }
1847
1970
  }),
1848
1971
  // 添加一个延迟执行的额外更新,以确保在文档变化后能重新计算语法高亮
1849
- te.updateListener.of((n) => {
1850
- n.docChanged && setTimeout(() => {
1851
- n.view.state.field(Qr, !1) && n.view.dispatch({});
1972
+ V.updateListener.of((r) => {
1973
+ r.docChanged && setTimeout(() => {
1974
+ r.view.state.field(Nr, !1) && r.view.dispatch({});
1852
1975
  }, 10);
1853
1976
  })
1854
1977
  ];
1855
1978
  }
1856
- function eo(e, r) {
1857
- if (e.length !== r.length)
1979
+ function vi(e, t) {
1980
+ if (e.length !== t.length)
1858
1981
  return !1;
1859
- for (let n = 0; n < e.length; n++)
1860
- if (e[n].start !== r[n].start || e[n].end !== r[n].end)
1982
+ for (let r = 0; r < e.length; r++)
1983
+ if (e[r].start !== t[r].start || e[r].end !== t[r].end)
1861
1984
  return !1;
1862
1985
  return !0;
1863
1986
  }
1864
- function ro(e, r) {
1865
- var a;
1866
- if (!r.docChanged)
1987
+ function yi(e, t) {
1988
+ var o;
1989
+ if (!t.docChanged)
1867
1990
  return e;
1868
- let n = !1;
1869
- const o = e.map((i) => {
1870
- const c = {
1991
+ let r = !1;
1992
+ const n = e.map((i) => {
1993
+ const a = {
1871
1994
  ...i
1872
1995
  };
1873
- return r.changes.iterChanges((s, d, p, u) => {
1874
- const g = u - p, _ = d - s, S = g - _;
1875
- if (s === 0 && (n = !0), s === 0 && g > 0 && i.start === 0) {
1876
- c.start = g, c.end += S;
1996
+ return t.changes.iterChanges((c, l, h, f) => {
1997
+ const y = f - h, C = l - c, v = y - C;
1998
+ if (c === 0 && (r = !0), c === 0 && y > 0 && i.start === 0) {
1999
+ a.start = y, a.end += v;
1877
2000
  return;
1878
2001
  }
1879
- if (d <= i.start)
1880
- c.start += S, c.end += S;
1881
- else if (s >= i.start && s < i.end && d >= i.end)
1882
- c.end = s;
1883
- else if (!(s >= i.start && d <= i.end)) {
1884
- if (s < i.end && d > i.end) {
1885
- const b = i.end - s;
1886
- c.end = s + Math.min(b, g);
2002
+ if (l <= i.start)
2003
+ a.start += v, a.end += v;
2004
+ else if (c >= i.start && c < i.end && l >= i.end)
2005
+ a.end = c;
2006
+ else if (!(c >= i.start && l <= i.end)) {
2007
+ if (c < i.end && l > i.end) {
2008
+ const R = i.end - c;
2009
+ a.end = c + Math.min(R, y);
1887
2010
  }
1888
2011
  }
1889
- }), c;
2012
+ }), a;
1890
2013
  });
1891
- if (n && o.length > 0) {
1892
- const i = ((a = r.changes.newDoc) == null ? void 0 : a.toString()) || "";
1893
- let c = 0;
1894
- for (let s = 0; s < i.length && /\s/.test(i[s]); s++)
1895
- c++;
1896
- o[0].start === 0 && c > 0 && (o[0].start = c);
2014
+ if (r && n.length > 0) {
2015
+ const i = ((o = t.changes.newDoc) == null ? void 0 : o.toString()) || "";
2016
+ let a = 0;
2017
+ for (let c = 0; c < i.length && /\s/.test(i[c]); c++)
2018
+ a++;
2019
+ n[0].start === 0 && a > 0 && (n[0].start = a);
1897
2020
  }
1898
- return o.filter((i) => i.start < i.end);
2021
+ return n.filter((i) => i.start < i.end);
1899
2022
  }
1900
- function to(e) {
1901
- return Er.get(e) || [];
2023
+ function bi(e) {
2024
+ return Xt.get(e) || [];
1902
2025
  }
1903
- function ce(e, r) {
1904
- const n = r.map((o) => ({
1905
- ...o
2026
+ function ye(e, t) {
2027
+ const r = t.map((n) => ({
2028
+ ...n
1906
2029
  }));
1907
- Er.set(e, n), e.dispatch({
1908
- effects: ze.of(n)
2030
+ Xt.set(e, r), e.dispatch({
2031
+ effects: gt.of(r)
1909
2032
  }), setTimeout(() => {
1910
2033
  e.dom && document.contains(e.dom) && e.dispatch({});
1911
2034
  }, 10);
1912
2035
  }
1913
- const Sr = ({
2036
+ function H() {
2037
+ var e = arguments[0];
2038
+ typeof e == "string" && (e = document.createElement(e));
2039
+ var t = 1, r = arguments[1];
2040
+ if (r && typeof r == "object" && r.nodeType == null && !Array.isArray(r)) {
2041
+ for (var n in r) if (Object.prototype.hasOwnProperty.call(r, n)) {
2042
+ var o = r[n];
2043
+ typeof o == "string" ? e.setAttribute(n, o) : o != null && (e[n] = o);
2044
+ }
2045
+ t++;
2046
+ }
2047
+ for (; t < arguments.length; t++) pn(e, arguments[t]);
2048
+ return e;
2049
+ }
2050
+ function pn(e, t) {
2051
+ if (typeof t == "string")
2052
+ e.appendChild(document.createTextNode(t));
2053
+ else if (t != null) if (t.nodeType != null)
2054
+ e.appendChild(t);
2055
+ else if (Array.isArray(t))
2056
+ for (var r = 0; r < t.length; r++) pn(e, t[r]);
2057
+ else
2058
+ throw new RangeError("Unsupported child node: " + t);
2059
+ }
2060
+ const Ir = typeof String.prototype.normalize == "function" ? (e) => e.normalize("NFKD") : (e) => e;
2061
+ class We {
2062
+ /**
2063
+ Create a text cursor. The query is the search string, `from` to
2064
+ `to` provides the region to search.
2065
+
2066
+ When `normalize` is given, it will be called, on both the query
2067
+ string and the content it is matched against, before comparing.
2068
+ You can, for example, create a case-insensitive search by
2069
+ passing `s => s.toLowerCase()`.
2070
+
2071
+ Text is always normalized with
2072
+ [`.normalize("NFKD")`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
2073
+ (when supported).
2074
+ */
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(Ir(c)) : Ir, this.query = this.normalize(r);
2077
+ }
2078
+ peek() {
2079
+ if (this.bufferPos == this.buffer.length) {
2080
+ if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done)
2081
+ return -1;
2082
+ this.bufferPos = 0, this.buffer = this.iter.value;
2083
+ }
2084
+ return ro(this.buffer, this.bufferPos);
2085
+ }
2086
+ /**
2087
+ Look for the next match. Updates the iterator's
2088
+ [`value`](https://codemirror.net/6/docs/ref/#search.SearchCursor.value) and
2089
+ [`done`](https://codemirror.net/6/docs/ref/#search.SearchCursor.done) properties. Should be called
2090
+ at least once before using the cursor.
2091
+ */
2092
+ next() {
2093
+ for (; this.matches.length; )
2094
+ this.matches.pop();
2095
+ return this.nextOverlapping();
2096
+ }
2097
+ /**
2098
+ The `next` method will ignore matches that partially overlap a
2099
+ previous match. This method behaves like `next`, but includes
2100
+ such matches.
2101
+ */
2102
+ nextOverlapping() {
2103
+ for (; ; ) {
2104
+ let t = this.peek();
2105
+ if (t < 0)
2106
+ return this.done = !0, this;
2107
+ let r = no(t), n = this.bufferStart + this.bufferPos;
2108
+ this.bufferPos += oo(t);
2109
+ let o = this.normalize(r);
2110
+ if (o.length)
2111
+ for (let i = 0, a = n; ; i++) {
2112
+ let c = o.charCodeAt(i), l = this.match(c, a, this.bufferPos + this.bufferStart);
2113
+ if (i == o.length - 1) {
2114
+ if (l)
2115
+ return this.value = l, this;
2116
+ break;
2117
+ }
2118
+ a == n && i < r.length && r.charCodeAt(i) == c && a++;
2119
+ }
2120
+ }
2121
+ }
2122
+ match(t, r, n) {
2123
+ let o = null;
2124
+ for (let i = 0; i < this.matches.length; i += 2) {
2125
+ let a = this.matches[i], c = !1;
2126
+ this.query.charCodeAt(a) == t && (a == this.query.length - 1 ? o = { from: this.matches[i + 1], to: n } : (this.matches[i]++, c = !0)), c || (this.matches.splice(i, 2), i -= 2);
2127
+ }
2128
+ return this.query.charCodeAt(0) == t && (this.query.length == 1 ? o = { from: r, to: n } : this.matches.push(1, r)), o && this.test && !this.test(o.from, o.to, this.buffer, this.bufferStart) && (o = null), o;
2129
+ }
2130
+ }
2131
+ typeof Symbol < "u" && (We.prototype[Symbol.iterator] = function() {
2132
+ return this;
2133
+ });
2134
+ const mn = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, Zt = "gm" + (/x/.unicode == null ? "" : "u");
2135
+ class gn {
2136
+ /**
2137
+ Create a cursor that will search the given range in the given
2138
+ document. `query` should be the raw pattern (as you'd pass it to
2139
+ `new RegExp`).
2140
+ */
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 = mn, /\\[sWDnr]|\n|\r|\[\^/.test(r))
2143
+ return new vn(t, r, n, o, i);
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
+ let a = t.lineAt(o);
2146
+ this.curLineStart = a.from, this.matchPos = vt(t, o), this.getLine(this.curLineStart);
2147
+ }
2148
+ getLine(t) {
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());
2150
+ }
2151
+ nextLine() {
2152
+ this.curLineStart = this.curLineStart + this.curLine.length + 1, this.curLineStart > this.to ? this.curLine = "" : this.getLine(0);
2153
+ }
2154
+ /**
2155
+ Move to the next match, if there is one.
2156
+ */
2157
+ next() {
2158
+ for (let t = this.matchPos - this.curLineStart; ; ) {
2159
+ this.re.lastIndex = t;
2160
+ let r = this.matchPos <= this.to && this.re.exec(this.curLine);
2161
+ if (r) {
2162
+ let n = this.curLineStart + r.index, o = n + r[0].length;
2163
+ if (this.matchPos = vt(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
+ return this.value = { from: n, to: o, match: r }, this;
2165
+ t = this.matchPos - this.curLineStart;
2166
+ } else if (this.curLineStart + this.curLine.length < this.to)
2167
+ this.nextLine(), t = 0;
2168
+ else
2169
+ return this.done = !0, this;
2170
+ }
2171
+ }
2172
+ }
2173
+ const Nt = /* @__PURE__ */ new WeakMap();
2174
+ class Ie {
2175
+ constructor(t, r) {
2176
+ this.from = t, this.text = r;
2177
+ }
2178
+ get to() {
2179
+ return this.from + this.text.length;
2180
+ }
2181
+ static get(t, r, n) {
2182
+ let o = Nt.get(t);
2183
+ if (!o || o.from >= n || o.to <= r) {
2184
+ let c = new Ie(r, t.sliceString(r, n));
2185
+ return Nt.set(t, c), c;
2186
+ }
2187
+ if (o.from == r && o.to == n)
2188
+ return o;
2189
+ let { text: i, from: a } = o;
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
+ }
2192
+ }
2193
+ class vn {
2194
+ constructor(t, r, n, o, i) {
2195
+ this.text = t, this.to = i, this.done = !1, this.value = mn, this.matchPos = vt(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
+ o + 5e3
2197
+ /* Chunk.Base */
2198
+ ));
2199
+ }
2200
+ chunkEnd(t) {
2201
+ return t >= this.to ? this.to : this.text.lineAt(t).to;
2202
+ }
2203
+ next() {
2204
+ for (; ; ) {
2205
+ let t = this.re.lastIndex = this.matchPos - this.flat.from, r = this.re.exec(this.flat.text);
2206
+ if (r && !r[0] && r.index == t && (this.re.lastIndex = t + 1, r = this.re.exec(this.flat.text)), r) {
2207
+ let n = this.flat.from + r.index, o = n + r[0].length;
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 = vt(this.text, o + (n == o ? 1 : 0)), this;
2210
+ }
2211
+ if (this.flat.to == this.to)
2212
+ return this.done = !0, this;
2213
+ this.flat = Ie.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
2214
+ }
2215
+ }
2216
+ }
2217
+ typeof Symbol < "u" && (gn.prototype[Symbol.iterator] = vn.prototype[Symbol.iterator] = function() {
2218
+ return this;
2219
+ });
2220
+ function xi(e) {
2221
+ try {
2222
+ return new RegExp(e, Zt), !0;
2223
+ } catch {
2224
+ return !1;
2225
+ }
2226
+ }
2227
+ function vt(e, t) {
2228
+ if (t >= e.length)
2229
+ return t;
2230
+ let r = e.lineAt(t), n;
2231
+ for (; t < r.to && (n = r.text.charCodeAt(t - r.from)) >= 56320 && n < 57344; )
2232
+ t++;
2233
+ return t;
2234
+ }
2235
+ function zt(e) {
2236
+ let t = String(e.state.doc.lineAt(e.state.selection.main.head).number), r = H("input", { class: "cm-textfield", name: "line", value: t }), n = H("form", {
2237
+ class: "cm-gotoLine",
2238
+ onkeydown: (i) => {
2239
+ i.keyCode == 27 ? (i.preventDefault(), e.dispatch({ effects: Qe.of(!1) }), e.focus()) : i.keyCode == 13 && (i.preventDefault(), o());
2240
+ },
2241
+ onsubmit: (i) => {
2242
+ i.preventDefault(), o();
2243
+ }
2244
+ }, H("label", e.state.phrase("Go to line"), ": ", r), " ", H("button", { class: "cm-button", type: "submit" }, e.state.phrase("go")), H("button", {
2245
+ name: "close",
2246
+ onclick: () => {
2247
+ e.dispatch({ effects: Qe.of(!1) }), e.focus();
2248
+ },
2249
+ "aria-label": e.state.phrase("close"),
2250
+ type: "button"
2251
+ }, ["×"]));
2252
+ function o() {
2253
+ let i = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(r.value);
2254
+ if (!i)
2255
+ return;
2256
+ let { state: a } = e, c = a.doc.lineAt(a.selection.main.head), [, l, h, f, y] = i, C = f ? +f.slice(1) : 0, v = h ? +h : c.number;
2257
+ if (h && y) {
2258
+ let x = v / 100;
2259
+ l && (x = x * (l == "-" ? -1 : 1) + c.number / a.doc.lines), v = Math.round(a.doc.lines * x);
2260
+ } else h && l && (v = v * (l == "-" ? -1 : 1) + c.number);
2261
+ let R = a.doc.line(Math.max(1, Math.min(a.doc.lines, v))), m = le.cursor(R.from + Math.max(0, Math.min(C, R.length)));
2262
+ e.dispatch({
2263
+ effects: [Qe.of(!1), V.scrollIntoView(m.from, { y: "center" })],
2264
+ selection: m
2265
+ }), e.focus();
2266
+ }
2267
+ return { dom: n };
2268
+ }
2269
+ const Qe = /* @__PURE__ */ je.define(), Dr = /* @__PURE__ */ Gt.define({
2270
+ create() {
2271
+ return !0;
2272
+ },
2273
+ update(e, t) {
2274
+ for (let r of t.effects)
2275
+ r.is(Qe) && (e = r.value);
2276
+ return e;
2277
+ },
2278
+ provide: (e) => Gr.from(e, (t) => t ? zt : null)
2279
+ }), Ei = (e) => {
2280
+ let t = dt(e, zt);
2281
+ if (!t) {
2282
+ let r = [Qe.of(!0)];
2283
+ e.state.field(Dr, !1) == null && r.push(je.appendConfig.of([Dr, Si])), e.dispatch({ effects: r }), t = dt(e, zt);
2284
+ }
2285
+ return t && t.dom.querySelector("input").select(), !0;
2286
+ }, Si = /* @__PURE__ */ V.baseTheme({
2287
+ ".cm-panel.cm-gotoLine": {
2288
+ padding: "2px 6px 4px",
2289
+ position: "relative",
2290
+ "& label": { fontSize: "80%" },
2291
+ "& [name=close]": {
2292
+ position: "absolute",
2293
+ top: "0",
2294
+ bottom: "0",
2295
+ right: "4px",
2296
+ backgroundColor: "inherit",
2297
+ border: "none",
2298
+ font: "inherit",
2299
+ padding: "0"
2300
+ }
2301
+ }
2302
+ }), Ci = {
2303
+ highlightWordAroundCursor: !1,
2304
+ minSelectionLength: 1,
2305
+ maxMatches: 100,
2306
+ wholeWords: !1
2307
+ }, yn = /* @__PURE__ */ Kr.define({
2308
+ combine(e) {
2309
+ return Xr(e, Ci, {
2310
+ highlightWordAroundCursor: (t, r) => t || r,
2311
+ minSelectionLength: Math.min,
2312
+ maxMatches: Math.min
2313
+ });
2314
+ }
2315
+ });
2316
+ function er(e) {
2317
+ let t = [ki, Ti];
2318
+ return e && t.push(yn.of(e)), t;
2319
+ }
2320
+ const Ri = /* @__PURE__ */ Q.mark({ class: "cm-selectionMatch" }), wi = /* @__PURE__ */ Q.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
2321
+ function Wr(e, t, r, n) {
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
+ }
2324
+ function _i(e, t, r, n) {
2325
+ return e(t.sliceDoc(r, r + 1)) == ae.Word && e(t.sliceDoc(n - 1, n)) == ae.Word;
2326
+ }
2327
+ const Ti = /* @__PURE__ */ Br.fromClass(class {
2328
+ constructor(e) {
2329
+ this.decorations = this.getDeco(e);
2330
+ }
2331
+ update(e) {
2332
+ (e.selectionSet || e.docChanged || e.viewportChanged) && (this.decorations = this.getDeco(e.view));
2333
+ }
2334
+ getDeco(e) {
2335
+ let t = e.state.facet(yn), { state: r } = e, n = r.selection;
2336
+ if (n.ranges.length > 1)
2337
+ return Q.none;
2338
+ let o = n.main, i, a = null;
2339
+ if (o.empty) {
2340
+ if (!t.highlightWordAroundCursor)
2341
+ return Q.none;
2342
+ let l = r.wordAt(o.head);
2343
+ if (!l)
2344
+ return Q.none;
2345
+ a = r.charCategorizer(o.head), i = r.sliceDoc(l.from, l.to);
2346
+ } else {
2347
+ let l = o.to - o.from;
2348
+ if (l < t.minSelectionLength || l > 200)
2349
+ return Q.none;
2350
+ if (t.wholeWords) {
2351
+ if (i = r.sliceDoc(o.from, o.to), a = r.charCategorizer(o.head), !(Wr(a, r, o.from, o.to) && _i(a, r, o.from, o.to)))
2352
+ return Q.none;
2353
+ } else if (i = r.sliceDoc(o.from, o.to), !i)
2354
+ return Q.none;
2355
+ }
2356
+ let c = [];
2357
+ for (let l of e.visibleRanges) {
2358
+ let h = new We(r.doc, i, l.from, l.to);
2359
+ for (; !h.next().done; ) {
2360
+ let { from: f, to: y } = h.value;
2361
+ if ((!a || Wr(a, r, f, y)) && (o.empty && f <= o.from && y >= o.to ? c.push(wi.range(f, y)) : (f >= o.to || y <= o.from) && c.push(Ri.range(f, y)), c.length > t.maxMatches))
2362
+ return Q.none;
2363
+ }
2364
+ }
2365
+ return Q.set(c);
2366
+ }
2367
+ }, {
2368
+ decorations: (e) => e.decorations
2369
+ }), ki = /* @__PURE__ */ V.baseTheme({
2370
+ ".cm-selectionMatch": { backgroundColor: "#99ff7780" },
2371
+ ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
2372
+ }), Mi = ({ state: e, dispatch: t }) => {
2373
+ let { selection: r } = e, n = le.create(r.ranges.map((o) => e.wordAt(o.head) || le.cursor(o.head)), r.mainIndex);
2374
+ return n.eq(r) ? !1 : (t(e.update({ selection: n })), !0);
2375
+ };
2376
+ function Pi(e, t) {
2377
+ let { main: r, ranges: n } = e.selection, o = e.wordAt(r.head), i = o && o.from == r.from && o.to == r.to;
2378
+ for (let a = !1, c = new We(e.doc, t, n[n.length - 1].to); ; )
2379
+ if (c.next(), c.done) {
2380
+ if (a)
2381
+ return null;
2382
+ c = new We(e.doc, t, 0, Math.max(0, n[n.length - 1].from - 1)), a = !0;
2383
+ } else {
2384
+ if (a && n.some((l) => l.from == c.value.from))
2385
+ continue;
2386
+ if (i) {
2387
+ let l = e.wordAt(c.value.from);
2388
+ if (!l || l.from != c.value.from || l.to != c.value.to)
2389
+ continue;
2390
+ }
2391
+ return c.value;
2392
+ }
2393
+ }
2394
+ const Oi = ({ state: e, dispatch: t }) => {
2395
+ let { ranges: r } = e.selection;
2396
+ if (r.some((i) => i.from === i.to))
2397
+ return Mi({ state: e, dispatch: t });
2398
+ let n = e.sliceDoc(r[0].from, r[0].to);
2399
+ if (e.selection.ranges.some((i) => e.sliceDoc(i.from, i.to) != n))
2400
+ return !1;
2401
+ let o = Pi(e, n);
2402
+ return o ? (t(e.update({
2403
+ selection: e.selection.addRange(le.range(o.from, o.to), !1),
2404
+ effects: V.scrollIntoView(o.to)
2405
+ })), !0) : !1;
2406
+ }, _e = /* @__PURE__ */ Kr.define({
2407
+ combine(e) {
2408
+ return Xr(e, {
2409
+ top: !1,
2410
+ caseSensitive: !1,
2411
+ literal: !1,
2412
+ regexp: !1,
2413
+ wholeWord: !1,
2414
+ createPanel: (t) => new Yi(t),
2415
+ scrollToMatch: (t) => V.scrollIntoView(t)
2416
+ });
2417
+ }
2418
+ });
2419
+ function bn(e) {
2420
+ return e ? [_e.of(e), Bt] : Bt;
2421
+ }
2422
+ class xn {
2423
+ /**
2424
+ Create a query object.
2425
+ */
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 || xi(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!t.wholeWord;
2428
+ }
2429
+ /**
2430
+ @internal
2431
+ */
2432
+ unquote(t) {
2433
+ return this.literal ? t : t.replace(/\\([nrt\\])/g, (r, n) => n == "n" ? `
2434
+ ` : n == "r" ? "\r" : n == "t" ? " " : "\\");
2435
+ }
2436
+ /**
2437
+ Compare this query to another query.
2438
+ */
2439
+ eq(t) {
2440
+ return this.search == t.search && this.replace == t.replace && this.caseSensitive == t.caseSensitive && this.regexp == t.regexp && this.wholeWord == t.wholeWord;
2441
+ }
2442
+ /**
2443
+ @internal
2444
+ */
2445
+ create() {
2446
+ return this.regexp ? new Li(this) : new $i(this);
2447
+ }
2448
+ /**
2449
+ Get a search cursor for this query, searching through the given
2450
+ range in the given state.
2451
+ */
2452
+ getCursor(t, r = 0, n) {
2453
+ let o = t.doc ? t : be.create({ doc: t });
2454
+ return n == null && (n = o.doc.length), this.regexp ? Le(this, o, r, n) : Fe(this, o, r, n);
2455
+ }
2456
+ }
2457
+ class En {
2458
+ constructor(t) {
2459
+ this.spec = t;
2460
+ }
2461
+ }
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 ? Ai(t.doc, t.charCategorizer(t.selection.main.head)) : void 0);
2464
+ }
2465
+ function Ai(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(yt(o, r - i)) != ae.Word || t(bt(o, r - i)) != ae.Word) && (t(bt(o, n - i)) != ae.Word || t(yt(o, n - i)) != ae.Word));
2467
+ }
2468
+ class $i extends En {
2469
+ constructor(t) {
2470
+ super(t);
2471
+ }
2472
+ nextMatch(t, r, n) {
2473
+ let o = Fe(this.spec, t, n, t.doc.length).nextOverlapping();
2474
+ if (o.done) {
2475
+ let i = Math.min(t.doc.length, r + this.spec.unquoted.length);
2476
+ o = Fe(this.spec, t, 0, i).nextOverlapping();
2477
+ }
2478
+ return o.done || o.value.from == r && o.value.to == n ? null : o.value;
2479
+ }
2480
+ // Searching in reverse is, rather than implementing an inverted search
2481
+ // cursor, done by scanning chunk after chunk forward.
2482
+ prevMatchInRange(t, r, n) {
2483
+ for (let o = n; ; ) {
2484
+ let i = Math.max(r, o - 1e4 - this.spec.unquoted.length), a = Fe(this.spec, t, i, o), c = null;
2485
+ for (; !a.nextOverlapping().done; )
2486
+ c = a.value;
2487
+ if (c)
2488
+ return c;
2489
+ if (i == r)
2490
+ return null;
2491
+ o -= 1e4;
2492
+ }
2493
+ }
2494
+ prevMatch(t, r, n) {
2495
+ let o = this.prevMatchInRange(t, 0, r);
2496
+ return o || (o = this.prevMatchInRange(t, Math.max(0, n - this.spec.unquoted.length), t.doc.length)), o && (o.from != r || o.to != n) ? o : null;
2497
+ }
2498
+ getReplacement(t) {
2499
+ return this.spec.unquote(this.spec.replace);
2500
+ }
2501
+ matchAll(t, r) {
2502
+ let n = Fe(this.spec, t, 0, t.doc.length), o = [];
2503
+ for (; !n.next().done; ) {
2504
+ if (o.length >= r)
2505
+ return null;
2506
+ o.push(n.value);
2507
+ }
2508
+ return o;
2509
+ }
2510
+ highlight(t, r, n, o) {
2511
+ let i = Fe(this.spec, t, Math.max(0, r - this.spec.unquoted.length), Math.min(n + this.spec.unquoted.length, t.doc.length));
2512
+ for (; !i.next().done; )
2513
+ o(i.value.from, i.value.to);
2514
+ }
2515
+ }
2516
+ function Le(e, t, r, n) {
2517
+ return new gn(t.doc, e.search, {
2518
+ ignoreCase: !e.caseSensitive,
2519
+ test: e.wholeWord ? Fi(t.charCategorizer(t.selection.main.head)) : void 0
2520
+ }, r, n);
2521
+ }
2522
+ function yt(e, t) {
2523
+ return e.slice(Zr(e, t, !1), t);
2524
+ }
2525
+ function bt(e, t) {
2526
+ return e.slice(t, Zr(e, t));
2527
+ }
2528
+ function Fi(e) {
2529
+ return (t, r, n) => !n[0].length || (e(yt(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(yt(n.input, n.index + n[0].length)) != ae.Word);
2530
+ }
2531
+ class Li extends En {
2532
+ nextMatch(t, r, n) {
2533
+ let o = Le(this.spec, t, n, t.doc.length).next();
2534
+ return o.done && (o = Le(this.spec, t, 0, r).next()), o.done ? null : o.value;
2535
+ }
2536
+ prevMatchInRange(t, r, n) {
2537
+ for (let o = 1; ; o++) {
2538
+ let i = Math.max(
2539
+ r,
2540
+ n - o * 1e4
2541
+ /* FindPrev.ChunkSize */
2542
+ ), a = Le(this.spec, t, i, n), c = null;
2543
+ for (; !a.next().done; )
2544
+ c = a.value;
2545
+ if (c && (i == r || c.from > i + 10))
2546
+ return c;
2547
+ if (i == r)
2548
+ return null;
2549
+ }
2550
+ }
2551
+ prevMatch(t, r, n) {
2552
+ return this.prevMatchInRange(t, 0, r) || this.prevMatchInRange(t, n, t.doc.length);
2553
+ }
2554
+ getReplacement(t) {
2555
+ return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g, (r, n) => {
2556
+ if (n == "&")
2557
+ return t.match[0];
2558
+ if (n == "$")
2559
+ return "$";
2560
+ for (let o = n.length; o > 0; o--) {
2561
+ let i = +n.slice(0, o);
2562
+ if (i > 0 && i < t.match.length)
2563
+ return t.match[i] + n.slice(o);
2564
+ }
2565
+ return r;
2566
+ });
2567
+ }
2568
+ matchAll(t, r) {
2569
+ let n = Le(this.spec, t, 0, t.doc.length), o = [];
2570
+ for (; !n.next().done; ) {
2571
+ if (o.length >= r)
2572
+ return null;
2573
+ o.push(n.value);
2574
+ }
2575
+ return o;
2576
+ }
2577
+ highlight(t, r, n, o) {
2578
+ let i = Le(this.spec, t, Math.max(
2579
+ 0,
2580
+ r - 250
2581
+ /* RegExp.HighlightMargin */
2582
+ ), Math.min(n + 250, t.doc.length));
2583
+ for (; !i.next().done; )
2584
+ o(i.value.from, i.value.to);
2585
+ }
2586
+ }
2587
+ const tt = /* @__PURE__ */ je.define(), tr = /* @__PURE__ */ je.define(), xe = /* @__PURE__ */ Gt.define({
2588
+ create(e) {
2589
+ return new It(Ut(e).create(), null);
2590
+ },
2591
+ update(e, t) {
2592
+ for (let r of t.effects)
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
+ return e;
2595
+ },
2596
+ provide: (e) => Gr.from(e, (t) => t.panel)
2597
+ });
2598
+ class It {
2599
+ constructor(t, r) {
2600
+ this.query = t, this.panel = r;
2601
+ }
2602
+ }
2603
+ const Ni = /* @__PURE__ */ Q.mark({ class: "cm-searchMatch" }), Ii = /* @__PURE__ */ Q.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), Di = /* @__PURE__ */ Br.fromClass(class {
2604
+ constructor(e) {
2605
+ this.view = e, this.decorations = this.highlight(e.state.field(xe));
2606
+ }
2607
+ update(e) {
2608
+ let t = e.state.field(xe);
2609
+ (t != e.startState.field(xe) || e.docChanged || e.selectionSet || e.viewportChanged) && (this.decorations = this.highlight(t));
2610
+ }
2611
+ highlight({ query: e, panel: t }) {
2612
+ if (!t || !e.spec.valid)
2613
+ return Q.none;
2614
+ let { view: r } = this, n = new io();
2615
+ for (let o = 0, i = r.visibleRanges, a = i.length; o < a; o++) {
2616
+ let { from: c, to: l } = i[o];
2617
+ for (; o < a - 1 && l > i[o + 1].from - 2 * 250; )
2618
+ l = i[++o].to;
2619
+ e.highlight(r.state, c, l, (h, f) => {
2620
+ let y = r.state.selection.ranges.some((C) => C.from == h && C.to == f);
2621
+ n.add(h, f, y ? Ii : Ni);
2622
+ });
2623
+ }
2624
+ return n.finish();
2625
+ }
2626
+ }, {
2627
+ decorations: (e) => e.decorations
2628
+ });
2629
+ function ot(e) {
2630
+ return (t) => {
2631
+ let r = t.state.field(xe, !1);
2632
+ return r && r.query.spec.valid ? e(t, r) : Rn(t);
2633
+ };
2634
+ }
2635
+ const xt = /* @__PURE__ */ ot((e, { query: t }) => {
2636
+ let { to: r } = e.state.selection.main, n = t.nextMatch(e.state, r, r);
2637
+ if (!n)
2638
+ return !1;
2639
+ let o = le.single(n.from, n.to), i = e.state.facet(_e);
2640
+ return e.dispatch({
2641
+ selection: o,
2642
+ effects: [nr(e, n), i.scrollToMatch(o.main, e)],
2643
+ userEvent: "select.search"
2644
+ }), Cn(e), !0;
2645
+ }), Et = /* @__PURE__ */ ot((e, { query: t }) => {
2646
+ let { state: r } = e, { from: n } = r.selection.main, o = t.prevMatch(r, n, n);
2647
+ if (!o)
2648
+ return !1;
2649
+ let i = le.single(o.from, o.to), a = e.state.facet(_e);
2650
+ return e.dispatch({
2651
+ selection: i,
2652
+ effects: [nr(e, o), a.scrollToMatch(i.main, e)],
2653
+ userEvent: "select.search"
2654
+ }), Cn(e), !0;
2655
+ }), Wi = /* @__PURE__ */ ot((e, { query: t }) => {
2656
+ let r = t.matchAll(e.state, 1e3);
2657
+ return !r || !r.length ? !1 : (e.dispatch({
2658
+ selection: le.create(r.map((n) => le.range(n.from, n.to))),
2659
+ userEvent: "select.search.matches"
2660
+ }), !0);
2661
+ }), ji = ({ state: e, dispatch: t }) => {
2662
+ let r = e.selection;
2663
+ if (r.ranges.length > 1 || r.main.empty)
2664
+ return !1;
2665
+ let { from: n, to: o } = r.main, i = [], a = 0;
2666
+ for (let c = new We(e.doc, e.sliceDoc(n, o)); !c.next().done; ) {
2667
+ if (i.length > 1e3)
2668
+ return !1;
2669
+ c.value.from == n && (a = i.length), i.push(le.range(c.value.from, c.value.to));
2670
+ }
2671
+ return t(e.update({
2672
+ selection: le.create(i, a),
2673
+ userEvent: "select.search.matches"
2674
+ })), !0;
2675
+ }, jr = /* @__PURE__ */ ot((e, { query: t }) => {
2676
+ let { state: r } = e, { from: n, to: o } = r.selection.main;
2677
+ if (r.readOnly)
2678
+ return !1;
2679
+ let i = t.nextMatch(r, n, n);
2680
+ if (!i)
2681
+ return !1;
2682
+ let a = i, c = [], l, h, f = [];
2683
+ a.from == n && a.to == o && (h = r.toText(t.getReplacement(a)), c.push({ from: a.from, to: a.to, insert: h }), 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 y = e.state.changes(c);
2685
+ return a && (l = le.single(a.from, a.to).map(y), f.push(nr(e, a)), f.push(r.facet(_e).scrollToMatch(l.main, e))), e.dispatch({
2686
+ changes: y,
2687
+ selection: l,
2688
+ effects: f,
2689
+ userEvent: "input.replace"
2690
+ }), !0;
2691
+ }), qi = /* @__PURE__ */ ot((e, { query: t }) => {
2692
+ if (e.state.readOnly)
2693
+ return !1;
2694
+ let r = t.matchAll(e.state, 1e9).map((o) => {
2695
+ let { from: i, to: a } = o;
2696
+ return { from: i, to: a, insert: t.getReplacement(o) };
2697
+ });
2698
+ if (!r.length)
2699
+ return !1;
2700
+ let n = e.state.phrase("replaced $ matches", r.length) + ".";
2701
+ return e.dispatch({
2702
+ changes: r,
2703
+ effects: V.announce.of(n),
2704
+ userEvent: "input.replace.all"
2705
+ }), !0;
2706
+ });
2707
+ function rr(e) {
2708
+ return e.state.facet(_e).createPanel(e);
2709
+ }
2710
+ function Ut(e, t) {
2711
+ var r, n, o, i, a;
2712
+ let c = e.selection.main, l = c.empty || c.to > c.from + 100 ? "" : e.sliceDoc(c.from, c.to);
2713
+ if (t && !l)
2714
+ return t;
2715
+ let h = e.facet(_e);
2716
+ return new xn({
2717
+ search: ((r = t == null ? void 0 : t.literal) !== null && r !== void 0 ? r : h.literal) ? l : l.replace(/\n/g, "\\n"),
2718
+ caseSensitive: (n = t == null ? void 0 : t.caseSensitive) !== null && n !== void 0 ? n : h.caseSensitive,
2719
+ literal: (o = t == null ? void 0 : t.literal) !== null && o !== void 0 ? o : h.literal,
2720
+ regexp: (i = t == null ? void 0 : t.regexp) !== null && i !== void 0 ? i : h.regexp,
2721
+ wholeWord: (a = t == null ? void 0 : t.wholeWord) !== null && a !== void 0 ? a : h.wholeWord
2722
+ });
2723
+ }
2724
+ function Sn(e) {
2725
+ let t = dt(e, rr);
2726
+ return t && t.dom.querySelector("[main-field]");
2727
+ }
2728
+ function Cn(e) {
2729
+ let t = Sn(e);
2730
+ t && t == e.root.activeElement && t.select();
2731
+ }
2732
+ const Rn = (e) => {
2733
+ let t = e.state.field(xe, !1);
2734
+ if (t && t.panel) {
2735
+ let r = Sn(e);
2736
+ if (r && r != e.root.activeElement) {
2737
+ let n = Ut(e.state, t.query.spec);
2738
+ n.valid && e.dispatch({ effects: tt.of(n) }), r.focus(), r.select();
2739
+ }
2740
+ } else
2741
+ e.dispatch({ effects: [
2742
+ tr.of(!0),
2743
+ t ? tt.of(Ut(e.state, t.query.spec)) : je.appendConfig.of(Bt)
2744
+ ] });
2745
+ return !0;
2746
+ }, wn = (e) => {
2747
+ let t = e.state.field(xe, !1);
2748
+ if (!t || !t.panel)
2749
+ return !1;
2750
+ let r = dt(e, rr);
2751
+ return r && r.dom.contains(e.root.activeElement) && e.focus(), e.dispatch({ effects: tr.of(!1) }), !0;
2752
+ }, _n = [
2753
+ { key: "Mod-f", run: Rn, scope: "editor search-panel" },
2754
+ { key: "F3", run: xt, shift: Et, scope: "editor search-panel", preventDefault: !0 },
2755
+ { key: "Mod-g", run: xt, shift: Et, scope: "editor search-panel", preventDefault: !0 },
2756
+ { key: "Escape", run: wn, scope: "editor search-panel" },
2757
+ { key: "Mod-Shift-l", run: ji },
2758
+ { key: "Mod-Alt-g", run: Ei },
2759
+ { key: "Mod-d", run: Oi, preventDefault: !0 }
2760
+ ];
2761
+ class Yi {
2762
+ constructor(t) {
2763
+ this.view = t;
2764
+ let r = this.query = t.state.field(xe).query.spec;
2765
+ this.commit = this.commit.bind(this), this.searchField = H("input", {
2766
+ value: r.search,
2767
+ placeholder: re(t, "Find"),
2768
+ "aria-label": re(t, "Find"),
2769
+ class: "cm-textfield",
2770
+ name: "search",
2771
+ form: "",
2772
+ "main-field": "true",
2773
+ onchange: this.commit,
2774
+ onkeyup: this.commit
2775
+ }), this.replaceField = H("input", {
2776
+ value: r.replace,
2777
+ placeholder: re(t, "Replace"),
2778
+ "aria-label": re(t, "Replace"),
2779
+ class: "cm-textfield",
2780
+ name: "replace",
2781
+ form: "",
2782
+ onchange: this.commit,
2783
+ onkeyup: this.commit
2784
+ }), this.caseField = H("input", {
2785
+ type: "checkbox",
2786
+ name: "case",
2787
+ form: "",
2788
+ checked: r.caseSensitive,
2789
+ onchange: this.commit
2790
+ }), this.reField = H("input", {
2791
+ type: "checkbox",
2792
+ name: "re",
2793
+ form: "",
2794
+ checked: r.regexp,
2795
+ onchange: this.commit
2796
+ }), this.wordField = H("input", {
2797
+ type: "checkbox",
2798
+ name: "word",
2799
+ form: "",
2800
+ checked: r.wholeWord,
2801
+ onchange: this.commit
2802
+ });
2803
+ function n(o, i, a) {
2804
+ return H("button", { class: "cm-button", name: o, onclick: i, type: "button" }, a);
2805
+ }
2806
+ this.dom = H("div", { onkeydown: (o) => this.keydown(o), class: "cm-search" }, [
2807
+ this.searchField,
2808
+ n("next", () => xt(t), [re(t, "next")]),
2809
+ n("prev", () => Et(t), [re(t, "previous")]),
2810
+ n("select", () => Wi(t), [re(t, "all")]),
2811
+ H("label", null, [this.caseField, re(t, "match case")]),
2812
+ H("label", null, [this.reField, re(t, "regexp")]),
2813
+ H("label", null, [this.wordField, re(t, "by word")]),
2814
+ ...t.state.readOnly ? [] : [
2815
+ H("br"),
2816
+ this.replaceField,
2817
+ n("replace", () => jr(t), [re(t, "replace")]),
2818
+ n("replaceAll", () => qi(t), [re(t, "replace all")])
2819
+ ],
2820
+ H("button", {
2821
+ name: "close",
2822
+ onclick: () => wn(t),
2823
+ "aria-label": re(t, "close"),
2824
+ type: "button"
2825
+ }, ["×"])
2826
+ ]);
2827
+ }
2828
+ commit() {
2829
+ let t = new xn({
2830
+ search: this.searchField.value,
2831
+ caseSensitive: this.caseField.checked,
2832
+ regexp: this.reField.checked,
2833
+ wholeWord: this.wordField.checked,
2834
+ replace: this.replaceField.value
2835
+ });
2836
+ t.eq(this.query) || (this.query = t, this.view.dispatch({ effects: tt.of(t) }));
2837
+ }
2838
+ keydown(t) {
2839
+ Qn(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(), jr(this.view));
2840
+ }
2841
+ update(t) {
2842
+ for (let r of t.transactions)
2843
+ for (let n of r.effects)
2844
+ n.is(tt) && !n.value.eq(this.query) && this.setQuery(n.value);
2845
+ }
2846
+ setQuery(t) {
2847
+ this.query = t, this.searchField.value = t.search, this.replaceField.value = t.replace, this.caseField.checked = t.caseSensitive, this.reField.checked = t.regexp, this.wordField.checked = t.wholeWord;
2848
+ }
2849
+ mount() {
2850
+ this.searchField.select();
2851
+ }
2852
+ get pos() {
2853
+ return 80;
2854
+ }
2855
+ get top() {
2856
+ return this.view.state.facet(_e).top;
2857
+ }
2858
+ }
2859
+ function re(e, t) {
2860
+ return e.state.phrase(t);
2861
+ }
2862
+ const at = 30, ct = /[\s\.,:;?!]/;
2863
+ function nr(e, { from: t, to: r }) {
2864
+ let n = e.state.doc.lineAt(t), o = e.state.doc.lineAt(r).to, i = Math.max(n.from, t - at), a = Math.min(o, r + at), c = e.state.sliceDoc(i, a);
2865
+ if (i != n.from) {
2866
+ for (let l = 0; l < at; l++)
2867
+ if (!ct.test(c[l + 1]) && ct.test(c[l])) {
2868
+ c = c.slice(l);
2869
+ break;
2870
+ }
2871
+ }
2872
+ if (a != o) {
2873
+ for (let l = c.length - 1; l > c.length - at; l--)
2874
+ if (!ct.test(c[l - 1]) && ct.test(c[l])) {
2875
+ c = c.slice(0, l);
2876
+ break;
2877
+ }
2878
+ }
2879
+ return V.announce.of(`${e.state.phrase("current match")}. ${c} ${e.state.phrase("on line")} ${n.number}.`);
2880
+ }
2881
+ const Vi = /* @__PURE__ */ V.baseTheme({
2882
+ ".cm-panel.cm-search": {
2883
+ padding: "2px 6px 4px",
2884
+ position: "relative",
2885
+ "& [name=close]": {
2886
+ position: "absolute",
2887
+ top: "0",
2888
+ right: "4px",
2889
+ backgroundColor: "inherit",
2890
+ border: "none",
2891
+ font: "inherit",
2892
+ padding: 0,
2893
+ margin: 0
2894
+ },
2895
+ "& input, & button, & label": {
2896
+ margin: ".2em .6em .2em 0"
2897
+ },
2898
+ "& input[type=checkbox]": {
2899
+ marginRight: ".2em"
2900
+ },
2901
+ "& label": {
2902
+ fontSize: "80%",
2903
+ whiteSpace: "pre"
2904
+ }
2905
+ },
2906
+ "&light .cm-searchMatch": { backgroundColor: "#ffff0054" },
2907
+ "&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" },
2908
+ "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
2909
+ "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
2910
+ }), Bt = [
2911
+ xe,
2912
+ /* @__PURE__ */ Qr.low(Di),
2913
+ Vi
2914
+ ], cs = {
2915
+ // 搜索面板标题
2916
+ Search: "搜索",
2917
+ Replace: "替换",
2918
+ Find: "查找",
2919
+ // 按钮
2920
+ "Replace all": "全部替换",
2921
+ Next: "下一个",
2922
+ Previous: "上一个",
2923
+ All: "全部",
2924
+ Close: "关闭",
2925
+ done: "完成",
2926
+ // 选项
2927
+ "Match case": "区分大小写",
2928
+ "Match whole word": "全字匹配",
2929
+ "Use regular expression": "使用正则表达式",
2930
+ "by word": "按单词",
2931
+ replace: "替换",
2932
+ // 输入框提示
2933
+ "Search for": "搜索内容",
2934
+ "Replace with": "替换为",
2935
+ // 状态信息
2936
+ "No matches": "无匹配结果",
2937
+ "replaced $ matches": "已替换 $ 个匹配项",
2938
+ "replaced match on line $": "已替换第 $ 行的匹配项",
2939
+ "on line": "在第",
2940
+ line: "行",
2941
+ "$ of $ matches": "第 $ 个,共 $ 个匹配",
2942
+ // 错误信息
2943
+ "Invalid regular expression": "无效的正则表达式",
2944
+ "Query too long": "查询内容过长",
2945
+ "Search string too long": "搜索字符串过长"
2946
+ };
2947
+ function zi() {
2948
+ return V.theme({
2949
+ // 搜索面板样式优化
2950
+ ".cm-panel.cm-search": {
2951
+ fontSize: "14px",
2952
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'
2953
+ },
2954
+ ".cm-search label": {
2955
+ fontSize: "13px"
2956
+ },
2957
+ ".cm-search input": {
2958
+ fontSize: "13px",
2959
+ fontFamily: "inherit"
2960
+ },
2961
+ ".cm-search button": {
2962
+ fontSize: "12px",
2963
+ fontFamily: "inherit"
2964
+ }
2965
+ });
2966
+ }
2967
+ function Ui(e) {
2968
+ setTimeout(() => {
2969
+ const t = e.dom.querySelector(".cm-panel.cm-search");
2970
+ if (!t) return;
2971
+ t.querySelectorAll("label").forEach((i) => {
2972
+ var c;
2973
+ switch ((c = i.textContent) == null ? void 0 : c.trim()) {
2974
+ case "Match case":
2975
+ i.textContent = "区分大小写";
2976
+ break;
2977
+ case "Match whole word":
2978
+ i.textContent = "全字匹配";
2979
+ break;
2980
+ case "Use regular expression":
2981
+ i.textContent = "使用正则表达式";
2982
+ break;
2983
+ }
2984
+ }), t.querySelectorAll("button").forEach((i) => {
2985
+ var c;
2986
+ switch ((c = i.textContent) == null ? void 0 : c.trim()) {
2987
+ case "Next":
2988
+ i.textContent = "下一个";
2989
+ break;
2990
+ case "Previous":
2991
+ i.textContent = "上一个";
2992
+ break;
2993
+ case "All":
2994
+ i.textContent = "全部";
2995
+ break;
2996
+ case "Replace all":
2997
+ i.textContent = "全部替换";
2998
+ break;
2999
+ case "Close":
3000
+ i.textContent = "关闭";
3001
+ break;
3002
+ case "done":
3003
+ i.textContent = "完成";
3004
+ break;
3005
+ }
3006
+ }), t.querySelectorAll('input[type="text"]').forEach((i, a) => {
3007
+ const c = i;
3008
+ a === 0 ? c.placeholder = "搜索内容" : a === 1 && (c.placeholder = "替换为");
3009
+ });
3010
+ }, 100);
3011
+ }
3012
+ function qr() {
3013
+ return [
3014
+ zi(),
3015
+ // 中文样式
3016
+ bn({
3017
+ top: !0
3018
+ // 搜索面板显示在顶部
3019
+ }),
3020
+ er(),
3021
+ // 高亮相同的选中文本
3022
+ we.of(_n),
3023
+ // 搜索相关的键盘快捷键
3024
+ // 监听 DOM 变化以应用中文翻译
3025
+ V.updateListener.of((e) => {
3026
+ e.view.dom.querySelector(".cm-panel.cm-search") && Ui(e.view);
3027
+ })
3028
+ ];
3029
+ }
3030
+ function ls() {
3031
+ return [er()];
3032
+ }
3033
+ function Yr() {
3034
+ return [bn({
3035
+ top: !0
3036
+ }), er(), we.of(_n)];
3037
+ }
3038
+ const us = [
3039
+ {
3040
+ key: "Ctrl-f",
3041
+ mac: "Cmd-f",
3042
+ run: () => !0
3043
+ },
3044
+ // 将被搜索面板接管
3045
+ {
3046
+ key: "F3",
3047
+ run: () => !0
3048
+ },
3049
+ // 查找下一个的替代快捷键
3050
+ {
3051
+ key: "Shift-F3",
3052
+ run: () => !0
3053
+ }
3054
+ // 查找上一个的替代快捷键
3055
+ ], Bi = ({
1914
3056
  value: e,
1915
- onChange: r,
1916
- extensions: n = [],
1917
- height: o = "300px",
1918
- disabled: a = !1,
3057
+ onChange: t,
3058
+ extensions: r = [],
3059
+ height: n = "300px",
3060
+ disabled: o = !1,
1919
3061
  className: i = "",
1920
- style: c = {},
1921
- placeholder: s = "",
1922
- onEditorViewCreated: d
1923
- }) => {
1924
- const p = de(null), u = de();
1925
- return ie(() => {
1926
- if (!p.current) return;
1927
- const g = [Be.of([fr]), te.lineWrapping, Lr(Dr), le.allowMultipleSelections.of(!0), s ? jr(s) : [], te.updateListener.of((b) => {
1928
- if (b.docChanged && r) {
1929
- const x = {
1930
- value: b.state.doc.toString(),
1931
- readOnlyRanges: []
1932
- // 基础编辑器没有只读区域逻辑,由特定编辑器实现
1933
- };
1934
- r(x);
1935
- }
1936
- })];
1937
- a && g.push(le.readOnly.of(!0));
1938
- const _ = le.create({
3062
+ style: a = {},
3063
+ placeholder: c = "",
3064
+ showLineNumbers: l = !0,
3065
+ onEditorViewCreated: h,
3066
+ locale: f = "zh-CN"
3067
+ }, y) => {
3068
+ const C = ue(null), v = ue();
3069
+ return ge(() => {
3070
+ if (!C.current) return;
3071
+ const R = [
3072
+ we.of([Dt, {
3073
+ key: "Enter",
3074
+ run: Er
3075
+ }]),
3076
+ V.lineWrapping,
3077
+ pt(Sr),
3078
+ be.allowMultipleSelections.of(!0),
3079
+ f === "zh-CN" ? qr() : Yr(),
3080
+ c ? br(c) : [],
3081
+ // 行号功能,根据配置决定是否启用
3082
+ l ? xr() : [],
3083
+ V.updateListener.of((g) => {
3084
+ if (g.docChanged && t) {
3085
+ const S = {
3086
+ value: g.state.doc.toString(),
3087
+ readOnlyRanges: []
3088
+ // 基础编辑器没有只读区域逻辑,由特定编辑器实现
3089
+ };
3090
+ t(S);
3091
+ }
3092
+ })
3093
+ ];
3094
+ o && R.push(be.readOnly.of(!0));
3095
+ const m = be.create({
1939
3096
  doc: e,
1940
- extensions: [...g, ...n]
1941
- }), S = new te({
1942
- state: _,
1943
- parent: p.current
3097
+ extensions: [...R, ...r]
3098
+ }), x = new V({
3099
+ state: m,
3100
+ parent: C.current
1944
3101
  });
1945
- return u.current = S, d && d(S), () => {
1946
- var b;
1947
- (b = u.current) == null || b.destroy();
3102
+ return v.current = x, h && h(x), () => {
3103
+ var g;
3104
+ (g = v.current) == null || g.destroy();
1948
3105
  };
1949
- }, []), ie(() => {
1950
- u.current && e !== u.current.state.doc.toString() && u.current.dispatch({
3106
+ }, []), ge(() => {
3107
+ v.current && e !== v.current.state.doc.toString() && v.current.dispatch({
1951
3108
  changes: {
1952
3109
  from: 0,
1953
- to: u.current.state.doc.length,
3110
+ to: v.current.state.doc.length,
1954
3111
  insert: e
1955
3112
  }
1956
3113
  });
1957
- }, [e]), ie(() => {
1958
- if (!u.current || !p.current) return;
1959
- const g = u.current.state.doc.toString();
1960
- u.current.destroy();
1961
- const _ = [Be.of([fr]), te.lineWrapping, Lr(Dr), le.allowMultipleSelections.of(!0), s ? jr(s) : [], te.updateListener.of((x) => {
1962
- if (x.docChanged && r) {
1963
- const D = {
1964
- value: x.state.doc.toString(),
1965
- readOnlyRanges: []
1966
- // 基础编辑器没有只读区域逻辑,由特定编辑器实现
1967
- };
1968
- r(D);
1969
- }
1970
- })];
1971
- a && _.push(le.readOnly.of(!0));
1972
- const S = le.create({
1973
- doc: g,
1974
- extensions: [..._, ...n]
1975
- }), b = new te({
1976
- state: S,
1977
- parent: p.current
3114
+ }, [e]), ge(() => {
3115
+ if (!v.current || !C.current) return;
3116
+ const R = v.current.state.doc.toString();
3117
+ v.current.destroy();
3118
+ const m = [
3119
+ we.of([Dt, {
3120
+ key: "Enter",
3121
+ run: Er
3122
+ }]),
3123
+ V.lineWrapping,
3124
+ pt(Sr),
3125
+ be.allowMultipleSelections.of(!0),
3126
+ f === "zh-CN" ? qr() : Yr(),
3127
+ c ? br(c) : [],
3128
+ // 行号功能,根据配置决定是否启用
3129
+ l ? xr() : [],
3130
+ V.updateListener.of((S) => {
3131
+ if (S.docChanged && t) {
3132
+ const _ = {
3133
+ value: S.state.doc.toString(),
3134
+ readOnlyRanges: []
3135
+ // 基础编辑器没有只读区域逻辑,由特定编辑器实现
3136
+ };
3137
+ t(_);
3138
+ }
3139
+ })
3140
+ ];
3141
+ o && m.push(be.readOnly.of(!0));
3142
+ const x = be.create({
3143
+ doc: R,
3144
+ extensions: [...m, ...r]
3145
+ }), g = new V({
3146
+ state: x,
3147
+ parent: C.current
1978
3148
  });
1979
- u.current = b, d && d(b);
1980
- }, [a]), /* @__PURE__ */ Ze("div", { ref: p, className: `senyao-editor ${a ? "disabled" : ""} ${i}`, style: {
1981
- height: o,
1982
- ...c
3149
+ v.current = g, h && h(g);
3150
+ }, [o, l]), Kn(y, () => ({
3151
+ insertTextAtCursor: (R) => {
3152
+ const m = v.current;
3153
+ m && (m.dispatch(m.state.replaceSelection(R)), m.focus());
3154
+ },
3155
+ goToPosition: (R) => {
3156
+ const m = v.current;
3157
+ if (m) {
3158
+ const x = m.state.doc.length, g = Math.max(0, Math.min(R, x));
3159
+ m.dispatch({
3160
+ selection: {
3161
+ anchor: g,
3162
+ head: g
3163
+ },
3164
+ scrollIntoView: !0
3165
+ }), m.focus();
3166
+ }
3167
+ },
3168
+ goToLine: (R, m = 0) => {
3169
+ const x = v.current;
3170
+ if (x) {
3171
+ const g = x.state.doc, S = Math.max(1, Math.min(R, g.lines)), _ = g.line(S), $ = Math.max(0, Math.min(m, _.length)) + _.from;
3172
+ x.dispatch({
3173
+ selection: {
3174
+ anchor: $,
3175
+ head: $
3176
+ },
3177
+ scrollIntoView: !0
3178
+ }), x.focus();
3179
+ }
3180
+ },
3181
+ getEditorView: () => v.current
3182
+ })), /* @__PURE__ */ wt("div", { ref: C, className: `senyao-editor ${o ? "disabled" : ""} ${i}`, style: {
3183
+ height: n,
3184
+ ...a
1983
3185
  } });
1984
- }, vo = ({
1985
- value: e,
1986
- onChange: r,
1987
- language: n = "json",
1988
- extensions: o = [],
1989
- theme: a = "light",
1990
- ...i
1991
- }) => {
1992
- const c = vr(() => {
1993
- const s = zn(n) ? Jn(n) : [], d = Zn(a);
1994
- return [s, d, ...o];
1995
- }, [n, o, a]);
1996
- return /* @__PURE__ */ Ze(Sr, { value: e, onChange: r, extensions: c, ...i });
1997
- }, mo = ({
3186
+ }, or = rt(Bi), Gi = ({
1998
3187
  value: e,
1999
- onChange: r,
3188
+ onChange: t,
3189
+ language: r = "json",
2000
3190
  extensions: n = [],
2001
- readOnlyRanges: o = [],
2002
- manageReadOnlyRanges: a = !0,
2003
- ...i
2004
- }) => {
2005
- const c = de(null), [s, d] = Nr(o), p = de(e), [u, g] = Nr(null), _ = de(!1), S = de(/* @__PURE__ */ new Map()), b = de(!1);
2006
- ie(() => {
2007
- if (a && o.length > 0 && !u) {
2008
- const v = [];
2009
- let R = 0;
2010
- for (let O = 0; O < o.length; O++) {
2011
- const P = o[O];
2012
- P.start > R && v.push({
2013
- content: e.substring(R, P.start),
3191
+ theme: o = "light",
3192
+ showLineNumbers: i = !0,
3193
+ ...a
3194
+ }, c) => {
3195
+ const l = ht(() => {
3196
+ const h = li(r) ? ci(r) : [], f = mi(o);
3197
+ return [h, f, ...n];
3198
+ }, [r, n, o]);
3199
+ return /* @__PURE__ */ wt(or, { ref: c, value: e, onChange: t, extensions: l, showLineNumbers: i, ...a });
3200
+ }, fs = rt(Gi), Hi = ({
3201
+ value: e,
3202
+ onChange: t,
3203
+ extensions: r = [],
3204
+ readOnlyRanges: n,
3205
+ manageReadOnlyRanges: o = !0,
3206
+ showLineNumbers: i = !0,
3207
+ ...a
3208
+ }, c) => {
3209
+ const l = ue(null), f = ((b) => b != null && typeof b == "object" && "value" in b)(e), y = f ? e.value : e, C = (f && "readOnlyRanges" in e ? e.readOnlyRanges : n) ?? [], [v, R] = Ft(y ?? ""), m = ue(null), [x, g] = Ft(C), S = ue(v), [_, $] = Ft(null), d = ue(!1), q = ue(/* @__PURE__ */ new Map()), A = ue(!1);
3210
+ ge(() => {
3211
+ if (o && C.length > 0 && !_) {
3212
+ const b = [];
3213
+ let T = 0;
3214
+ for (let k = 0; k < C.length; k++) {
3215
+ const O = C[k];
3216
+ O.start > T && b.push({
3217
+ content: v.substring(T, O.start),
2014
3218
  editable: !0
2015
- }), v.push({
2016
- content: e.substring(P.start, P.end),
3219
+ }), b.push({
3220
+ content: v.substring(O.start, O.end),
2017
3221
  editable: !1
2018
- }), R = P.end;
3222
+ }), T = O.end;
2019
3223
  }
2020
- R < e.length && v.push({
2021
- content: e.substring(R),
3224
+ T < v.length && b.push({
3225
+ content: v.substring(T),
2022
3226
  editable: !0
2023
- }), g(v);
3227
+ }), $(b);
2024
3228
  }
2025
- }, [a, o, e, u]), ie(() => {
2026
- if (e) {
2027
- const v = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], R = /* @__PURE__ */ new Map();
2028
- v.forEach((O) => {
2029
- const P = e.indexOf(O);
2030
- P >= 0 && R.set(O, P);
2031
- }), S.current = R;
3229
+ }, [o, C, v, _]), ge(() => {
3230
+ if (v) {
3231
+ const b = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], T = /* @__PURE__ */ new Map();
3232
+ b.forEach((k) => {
3233
+ const O = v.indexOf(k);
3234
+ O >= 0 && T.set(k, O);
3235
+ }), q.current = T;
2032
3236
  }
2033
3237
  }, []);
2034
- const x = vr(() => {
2035
- const v = [rt()];
2036
- return s.length > 0 && v.push(Qn(s)), [...v, ...n];
2037
- }, [n, s]), D = re((v, R, O = 0) => {
2038
- const P = v.indexOf(R, O);
2039
- return P >= 0 ? P : null;
2040
- }, []), w = re((v, R) => {
2041
- if (!a || !v || v.length === 0) return v;
2042
- const O = [...v];
2043
- let P = 0;
2044
- for (let Y = 0; Y < v.length; Y++) {
2045
- const B = v[Y];
2046
- if (!B.editable) {
2047
- const Q = D(R, B.content, P);
2048
- Q !== null && (Y > 0 && v[Y - 1].editable && Q > P && (O[Y - 1] = {
2049
- ...O[Y - 1],
2050
- content: R.substring(P, Q)
2051
- }), P = Q + B.content.length);
3238
+ const Ye = ht(() => {
3239
+ const b = [zr(), Hr()];
3240
+ return x.length > 0 && b.push(gi(x)), [...b, ...r];
3241
+ }, [r, x]), Ee = se((b, T, k = 0) => {
3242
+ const O = b.indexOf(T, k);
3243
+ return O >= 0 ? O : null;
3244
+ }, []), Te = se((b, T) => {
3245
+ if (!o || !b || b.length === 0) return b;
3246
+ const k = [...b];
3247
+ let O = 0;
3248
+ for (let G = 0; G < b.length; G++) {
3249
+ const oe = b[G];
3250
+ if (!oe.editable) {
3251
+ const me = Ee(T, oe.content, O);
3252
+ me !== null && (G > 0 && b[G - 1].editable && me > O && (k[G - 1] = {
3253
+ ...k[G - 1],
3254
+ content: T.substring(O, me)
3255
+ }), O = me + oe.content.length);
2052
3256
  }
2053
3257
  }
2054
- const W = v[v.length - 1];
2055
- return W.editable && P < R.length && (O[v.length - 1] = {
2056
- ...W,
2057
- content: R.substring(P)
2058
- }), O;
2059
- }, [a, D]), E = re((v) => {
2060
- let R = !1;
2061
- return S.current.forEach((O, P) => {
2062
- const W = v.indexOf(P);
2063
- W >= 0 && Math.abs(W - O) > 0 && (S.current.set(P, W), W > O && (O === 0 || O < 15) && (R = !0));
2064
- }), R;
2065
- }, []), k = re(() => {
2066
- if (!c.current) return;
2067
- const v = c.current, R = v.state.doc.toString(), O = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], P = v.state.selection;
2068
- let W = !1;
2069
- for (const Y of O) {
2070
- const B = R.indexOf(Y);
2071
- if (B >= 0) {
2072
- v.dispatch({
3258
+ const Y = b[b.length - 1];
3259
+ return Y.editable && O < T.length && (k[b.length - 1] = {
3260
+ ...Y,
3261
+ content: T.substring(O)
3262
+ }), k;
3263
+ }, [o, Ee]), ke = se((b) => {
3264
+ let T = !1;
3265
+ return q.current.forEach((k, O) => {
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;
3272
+ let Y = !1;
3273
+ for (const G of k) {
3274
+ const oe = T.indexOf(G);
3275
+ if (oe >= 0) {
3276
+ b.dispatch({
2073
3277
  selection: {
2074
- anchor: B,
2075
- head: B + Y.length
3278
+ anchor: oe,
3279
+ head: oe + G.length
2076
3280
  },
2077
3281
  scrollIntoView: !1
2078
- }), W = !0;
3282
+ }), Y = !0;
2079
3283
  break;
2080
3284
  }
2081
3285
  }
2082
- W && setTimeout(() => {
2083
- v.dom && document.contains(v.dom) && v.dispatch({
2084
- selection: P,
3286
+ Y && setTimeout(() => {
3287
+ b.dom && document.contains(b.dom) && b.dispatch({
3288
+ selection: O,
2085
3289
  scrollIntoView: !1
2086
3290
  });
2087
3291
  }, 10);
2088
- }, []), j = re(() => {
2089
- if (!c.current) return;
2090
- const v = c.current;
2091
- s.length > 0 && (ce(v, []), setTimeout(() => {
2092
- v.dom && document.contains(v.dom) && (ce(v, s), setTimeout(() => {
2093
- v.dom && document.contains(v.dom) && v.dispatch({});
3292
+ }, []), Z = se(() => {
3293
+ if (!m.current) return;
3294
+ const b = m.current;
3295
+ x.length > 0 && (ye(b, []), setTimeout(() => {
3296
+ b.dom && document.contains(b.dom) && (ye(b, x), setTimeout(() => {
3297
+ b.dom && document.contains(b.dom) && b.dispatch({});
2094
3298
  }, 10));
2095
3299
  }, 10));
2096
- }, [s]), l = re((v) => {
2097
- const R = v.value, O = p.current;
2098
- O !== R && R.length > O.length && !O.startsWith(R.substring(0, 5)) && R.includes(O.substring(0, 10)) && (_.current = !0, E(R) && setTimeout(() => {
2099
- k();
2100
- }, 10)), p.current = R;
2101
- const P = c.current ? to(c.current) : s;
2102
- if (a && u) {
2103
- const W = w(u, R);
2104
- g(W);
3300
+ }, [x]), ce = se((b) => {
3301
+ const T = b.value, k = S.current;
3302
+ R(T), k !== T && (!k || T.length > (k == null ? void 0 : k.length) && !k.startsWith(T.substring(0, 5)) && T.includes(k.substring(0, 10))) && (d.current = !0, ke(T) && setTimeout(() => {
3303
+ Se();
3304
+ }, 10)), S.current = T;
3305
+ const O = m.current ? bi(m.current) : x;
3306
+ if (o && _) {
3307
+ const Y = Te(_, T);
3308
+ $(Y);
2105
3309
  const {
2106
- readOnlyRanges: Y
2107
- } = Zr(W);
2108
- d(Y), c.current && ce(c.current, Y), r && r({
2109
- value: R,
2110
- readOnlyRanges: Y
3310
+ readOnlyRanges: G
3311
+ } = Lr(Y);
3312
+ g(G), m.current && ye(m.current, G), t && t({
3313
+ value: T,
3314
+ readOnlyRanges: G
2111
3315
  });
2112
3316
  } else
2113
- r && r({
2114
- value: R,
2115
- readOnlyRanges: P
3317
+ t && t({
3318
+ value: T,
3319
+ readOnlyRanges: O
2116
3320
  });
2117
- }, [r, a, u, s, w, E, k]);
2118
- ie(() => {
2119
- !a && JSON.stringify(o) !== JSON.stringify(s) && (d(o), c.current && ce(c.current, o));
2120
- }, [o, s, a]), ie(() => {
2121
- if (a && u) {
3321
+ }, [t, o, _, x, Te, ke, Se]);
3322
+ ge(() => {
3323
+ !o && JSON.stringify(C) !== JSON.stringify(x) && (g(C), m.current && ye(m.current, C));
3324
+ }, [C, x, o]), ge(() => {
3325
+ if (o && _) {
2122
3326
  const {
2123
- readOnlyRanges: v
2124
- } = Zr(u);
2125
- JSON.stringify(v) !== JSON.stringify(s) && (d(v), c.current && ce(c.current, v));
2126
- }
2127
- }, [u, s, a]), ie(() => {
2128
- c.current && _.current && (_.current = !1, c.current.dispatch({}));
2129
- }, [e]), ie(() => {
2130
- c.current && s.length > 0 && !b.current && (b.current = !0, setTimeout(() => {
2131
- j();
3327
+ readOnlyRanges: b
3328
+ } = Lr(_);
3329
+ JSON.stringify(b) !== JSON.stringify(x) && (g(b), m.current && ye(m.current, b));
3330
+ }
3331
+ }, [_, x, o]), ge(() => {
3332
+ m.current && d.current && (d.current = !1, m.current.dispatch({}));
3333
+ }, [v]), ge(() => {
3334
+ m.current && x.length > 0 && !A.current && (A.current = !0, setTimeout(() => {
3335
+ Z();
2132
3336
  }, 50), setTimeout(() => {
2133
- j();
3337
+ Z();
2134
3338
  }, 200));
2135
- }, [j, s]);
2136
- const U = re((v) => {
2137
- if (c.current = v, s.length > 0 && (ce(v, s), setTimeout(() => {
2138
- ce(v, []), setTimeout(() => {
2139
- ce(v, s);
3339
+ }, [Z, x]);
3340
+ const pe = se((b) => {
3341
+ if (m.current = b, x.length > 0 && (ye(b, x), setTimeout(() => {
3342
+ ye(b, []), setTimeout(() => {
3343
+ ye(b, x);
2140
3344
  }, 10);
2141
- }, 50)), e) {
2142
- const R = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], O = /* @__PURE__ */ new Map();
2143
- R.forEach((P) => {
2144
- const W = e.indexOf(P);
2145
- W >= 0 && O.set(P, W);
2146
- }), S.current = O;
2147
- }
2148
- }, [s, e]), $ = re((v) => {
2149
- l(v), c.current && setTimeout(() => {
2150
- c.current && c.current.dispatch({});
2151
- }, 0);
2152
- }, [l]);
2153
- return /* @__PURE__ */ Ze(Sr, { value: e, onChange: $, extensions: x, onEditorViewCreated: U, ...i });
2154
- }, go = ({
2155
- value: e,
2156
- onChange: r,
2157
- extensions: n = [],
2158
- enableFormatting: o = !0,
2159
- ...a
2160
- }) => {
2161
- const i = re((p) => {
2162
- const u = p.state.doc.toString(), g = [];
3345
+ }, 50)), v) {
3346
+ const T = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], k = /* @__PURE__ */ new Map();
3347
+ T.forEach((O) => {
3348
+ const Y = v.indexOf(O);
3349
+ Y >= 0 && k.set(O, Y);
3350
+ }), q.current = k;
3351
+ }
3352
+ }, [x, v]);
3353
+ return /* @__PURE__ */ wt(or, { ref: l, value: v, onChange: ce, extensions: Ye, showLineNumbers: i, onEditorViewCreated: pe, ...a });
3354
+ }, hs = rt(Hi), Ji = (e, t) => {
3355
+ const {
3356
+ value: r,
3357
+ onChange: n,
3358
+ extensions: o = [],
3359
+ showLineNumbers: i = !0,
3360
+ enableFormatting: a = !1,
3361
+ ...c
3362
+ } = e, l = ue(!0), h = ue(null), f = se((g) => {
2163
3363
  try {
2164
- JSON.parse(u);
2165
- } catch (_) {
2166
- _ instanceof Error && g.push({
2167
- from: 0,
2168
- to: u.length,
2169
- message: _.message,
2170
- severity: "error"
2171
- });
3364
+ return g === "" || JSON.parse(g), !0;
3365
+ } catch {
3366
+ return !1;
2172
3367
  }
2173
- return g;
2174
- }, []), c = re((p) => {
3368
+ }, []), y = se((g) => {
2175
3369
  try {
2176
- const u = JSON.parse(p);
2177
- return JSON.stringify(u, null, 2);
3370
+ if (!g.trim()) return "";
3371
+ const S = JSON.parse(g);
3372
+ return JSON.stringify(S, null, 2);
2178
3373
  } catch {
2179
- return p;
2180
- }
2181
- }, []), s = re((p) => {
2182
- if (r) {
2183
- if (o) {
2184
- const u = c(p.value);
2185
- if (u !== p.value) {
2186
- r({
2187
- value: u,
2188
- readOnlyRanges: p.readOnlyRanges
2189
- });
2190
- return;
2191
- }
2192
- }
2193
- r(p);
3374
+ return g;
2194
3375
  }
2195
- }, [o, c, r]), d = vr(() => [tt(), nt(), ot(i), ...n], [i, n]);
2196
- return /* @__PURE__ */ Ze(Sr, { value: e, onChange: s, extensions: d, ...a });
2197
- };
3376
+ }, []), C = se(() => {
3377
+ if (!h.current) return !1;
3378
+ const g = h.current, S = g.state.doc.toString(), _ = y(S);
3379
+ if (_ === S) return !1;
3380
+ const $ = g.state.update({
3381
+ changes: {
3382
+ from: 0,
3383
+ to: g.state.doc.length,
3384
+ insert: _
3385
+ }
3386
+ });
3387
+ return g.dispatch($), !0;
3388
+ }, [y]), v = ht(() => we.of([{
3389
+ key: "Alt-f",
3390
+ mac: "Mod-Alt-f",
3391
+ run: () => C()
3392
+ }]), [C]), R = se((g) => {
3393
+ if (n) {
3394
+ const S = f(g.value);
3395
+ l.current = S, n(g);
3396
+ }
3397
+ }, [n, f]), m = ht(() => [Ur(), to(), Xn(), Qr.highest(v), ...o], [v, o]), x = se((g) => {
3398
+ h.current = g, a && r && setTimeout(() => {
3399
+ C();
3400
+ }, 0);
3401
+ }, [a, r, C]);
3402
+ return /* @__PURE__ */ wt(or, { ref: t, value: r, showLineNumbers: i, onChange: R, extensions: m, onEditorViewCreated: x, ...c });
3403
+ }, ds = rt(Ji);
2198
3404
  export {
2199
- vo as Editor,
2200
- Sr as GenericEditor,
2201
- go as JSONEditor,
2202
- mo as SQLEditor,
2203
- Zr as blocksToEditorData,
2204
- po as commonExtensions,
2205
- Kn as createAutocompletionExtension,
2206
- Hn as createKeymapExtension,
2207
- ho as createLintExtension,
2208
- Xn as darkTheme,
2209
- to as getCurrentReadOnlyRanges,
2210
- Jn as getLanguageExtension,
2211
- Zn as getThemeExtension,
2212
- zn as isSupportedLanguage,
2213
- Xr as lightTheme,
2214
- Qn as readOnlyRanges,
2215
- ce as updateReadOnlyRanges
3405
+ fs as Editor,
3406
+ or as GenericEditor,
3407
+ ds as JSONEditor,
3408
+ hs as SQLEditor,
3409
+ Ui as applyChinese,
3410
+ Lr as blocksToEditorData,
3411
+ zi as chineseLanguageExtension,
3412
+ wn as closeSearchPanel,
3413
+ as as commonExtensions,
3414
+ ui as createAutocompletionExtension,
3415
+ Yr as createEnglishSearchExtension,
3416
+ ls as createHighlightOnlyExtension,
3417
+ fi as createKeymapExtension,
3418
+ ss as createLintExtension,
3419
+ qr as createSearchExtension,
3420
+ us as customSearchKeymap,
3421
+ pi as darkTheme,
3422
+ bi as getCurrentReadOnlyRanges,
3423
+ ci as getLanguageExtension,
3424
+ mi as getThemeExtension,
3425
+ er as highlightSelectionMatches,
3426
+ li as isSupportedLanguage,
3427
+ Fr as lightTheme,
3428
+ Rn as openSearchPanel,
3429
+ gi as readOnlyRanges,
3430
+ bn as search,
3431
+ _n as searchKeymap,
3432
+ cs as searchTranslationsZhCN,
3433
+ ye as updateReadOnlyRanges
2216
3434
  };