stepzen-graphiql 2.1.0 → 2.1.3-experimental.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/babel-D4jPkB8I.js +15 -0
- package/dist/babel-JpECBl9w.mjs +7255 -0
- package/dist/components/ExplorerPage/ExplorerPage.d.ts +1 -1
- package/dist/components/ExplorerPage/GraphiQLInterface.d.ts +15 -6
- package/dist/components/ExplorerPage/Snippets.d.ts +0 -2
- package/dist/components/ExplorerPage/clearResponse.d.ts +1 -1
- package/dist/components/ExplorerPage/clearTooltip.d.ts +1 -1
- package/dist/estree-C0Hb5Q7V.mjs +4528 -0
- package/dist/estree-U7n5DgHH.js +44 -0
- package/dist/graphql-BTSjQZiC.js +28 -0
- package/dist/graphql-CBsByfto.js +28 -0
- package/dist/graphql-DDJE6tIl.mjs +157 -0
- package/dist/graphql-DrfUc9jr.mjs +1256 -0
- package/dist/graphql-DrfV554J.js +6 -0
- package/dist/graphql-QzAQRYwl.mjs +1221 -0
- package/dist/graphqlMode-DN1ezrYh.js +1 -0
- package/dist/graphqlMode-vV8mnLBW.mjs +262 -0
- package/dist/index-CjC6wsAG.js +1 -0
- package/dist/index-RniHQi68.mjs +84805 -0
- package/dist/index-gvW0eRXD.js +687 -0
- package/dist/index-tHknWeFg.mjs +295 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/jsonMode-BW-tqoSY.js +15 -0
- package/dist/jsonMode-Cj0cONq6.mjs +2002 -0
- package/dist/lib/graphiql-helpers.d.ts +2 -2
- package/dist/lite-Dpvo4tIS.js +1 -0
- package/dist/lite-hj39DC-n.mjs +135 -0
- package/dist/monaco-editor-C-pj7hSk.mjs +17 -0
- package/dist/monaco-editor-CBZFMjO6.js +1 -0
- package/dist/mouseTarget-C-J1vBNL.mjs +9353 -0
- package/dist/mouseTarget-S3azYj9_.js +9 -0
- package/dist/standalone-BhI0QomE.mjs +2458 -0
- package/dist/standalone-YWSF5RH2.js +29 -0
- package/dist/style.css +2 -2
- package/dist/style2.css +1 -0
- package/dist/toggleHighContrast-BK2acAo4.mjs +97805 -0
- package/dist/toggleHighContrast-MyO5wNxT.js +726 -0
- package/package.json +13 -15
- package/dist/Range-CPFFy5pj.mjs +0 -26
- package/dist/Range-CUfOrqgY.js +0 -1
- package/dist/SchemaReference-DNGK8Gti.mjs +0 -146
- package/dist/SchemaReference-PZPPI4-g.js +0 -1
- package/dist/brace-fold-DFRMFuzG.mjs +0 -122
- package/dist/brace-fold-QYFeMqi4.js +0 -1
- package/dist/closebrackets-5W81jIxx.js +0 -2
- package/dist/closebrackets-BJdKNrct.mjs +0 -165
- package/dist/codemirror-CK47QajN.mjs +0 -27
- package/dist/codemirror-DMBo1i5w.js +0 -24
- package/dist/codemirror-DgPcZxSc.mjs +0 -6121
- package/dist/codemirror-P5arRD-4.js +0 -1
- package/dist/comment-DZX4WUX2.js +0 -2
- package/dist/comment-DaZ9yeFw.mjs +0 -150
- package/dist/dialog-BWHlvTdM.js +0 -1
- package/dist/dialog-BvB91RPq.mjs +0 -26
- package/dist/dialog-Ci1bnuc2.mjs +0 -74
- package/dist/dialog-Dh2DOTOu.js +0 -1
- package/dist/foldgutter-CEPGXQXV.mjs +0 -238
- package/dist/foldgutter-lfb5vdue.js +0 -1
- package/dist/forEachState-DA54msa8.mjs +0 -11
- package/dist/forEachState-DY_pA9Bd.js +0 -1
- package/dist/hint-BImUj9vL.mjs +0 -24
- package/dist/hint-BYh7bCzG.js +0 -1
- package/dist/hint-CeNacopx.mjs +0 -123
- package/dist/hint-Cqs-Eq99.js +0 -1
- package/dist/index-BXTilrNr.mjs +0 -11
- package/dist/index-BqePscbb.js +0 -1
- package/dist/index-Of0v8HXf.js +0 -650
- package/dist/index-c_h-B3RW.mjs +0 -89430
- package/dist/info-DKGfeFeR.mjs +0 -99
- package/dist/info-addon-0QldEyjg.js +0 -1
- package/dist/info-addon-BQBJGmtN.mjs +0 -66
- package/dist/info-euxfaXDv.js +0 -1
- package/dist/javascript-BMRweX7z.js +0 -1
- package/dist/javascript-CEIhlHWT.mjs +0 -26
- package/dist/javascript-RO_jaPiE.mjs +0 -707
- package/dist/javascript-poxRzxcy.js +0 -1
- package/dist/jsx-BY-uBax7.js +0 -1
- package/dist/jsx-CZtHOvZL.mjs +0 -414
- package/dist/jump-Bn-VPPJQ.js +0 -1
- package/dist/jump-BrK8-pOa.mjs +0 -85
- package/dist/jump-to-line-V4vHDeSQ.mjs +0 -61
- package/dist/jump-to-line-Zpc7tkYy.js +0 -1
- package/dist/lint-BBDtrEaL.js +0 -1
- package/dist/lint-BEn4QK3F.mjs +0 -216
- package/dist/lint-BgrfL8k7.js +0 -1
- package/dist/lint-CiQwkfWf.mjs +0 -112
- package/dist/lint-DxY_4HRh.js +0 -6
- package/dist/lint-naD3ldhf.mjs +0 -272
- package/dist/matchbrackets-BB4g2Y6d.mjs +0 -87
- package/dist/matchbrackets-DPv_MB7c.js +0 -1
- package/dist/matchbrackets-DhN7zJoS.js +0 -1
- package/dist/matchbrackets-eKECiv9B.mjs +0 -26
- package/dist/mode-CgGO246j.js +0 -1
- package/dist/mode-CwlRWrPi.mjs +0 -73
- package/dist/mode-DyP1DXNa.js +0 -1
- package/dist/mode-indent-9VnFlqY-.mjs +0 -8
- package/dist/mode-indent-m3TP74Ia.js +0 -1
- package/dist/mode-kdpxZ9Hq.mjs +0 -25
- package/dist/mode-r_2HfIrS.js +0 -1
- package/dist/mode-xgi1fEzL.mjs +0 -64
- package/dist/search-BuLFIkN5.mjs +0 -268
- package/dist/search-CclAH4eV.js +0 -2
- package/dist/searchcursor-B9F32jvl.mjs +0 -26
- package/dist/searchcursor-CV26OekK.js +0 -1
- package/dist/searchcursor-DHtNMOPb.mjs +0 -239
- package/dist/searchcursor-eGwb3e2h.js +0 -7
- package/dist/show-hint-BfWoiGzQ.mjs +0 -357
- package/dist/show-hint-CQ_VjC6w.js +0 -1
- package/dist/sublime-C6Rg9CL1.mjs +0 -563
- package/dist/sublime-DFk-sDtd.js +0 -6
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import { r as A } from "./codemirror-DgPcZxSc.mjs";
|
|
2
|
-
var I = { exports: {} }, z;
|
|
3
|
-
function G() {
|
|
4
|
-
return z || (z = 1, function(y, C) {
|
|
5
|
-
(function(v) {
|
|
6
|
-
v(A());
|
|
7
|
-
})(function(v) {
|
|
8
|
-
var s = v.Pos;
|
|
9
|
-
function D(e) {
|
|
10
|
-
var t = e.flags;
|
|
11
|
-
return t ?? (e.ignoreCase ? "i" : "") + (e.global ? "g" : "") + (e.multiline ? "m" : "");
|
|
12
|
-
}
|
|
13
|
-
function O(e, t) {
|
|
14
|
-
for (var n = D(e), r = n, l = 0; l < t.length; l++) r.indexOf(t.charAt(l)) == -1 && (r += t.charAt(l));
|
|
15
|
-
return n == r ? e : new RegExp(e.source, r);
|
|
16
|
-
}
|
|
17
|
-
function S(e) {
|
|
18
|
-
return /\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source);
|
|
19
|
-
}
|
|
20
|
-
function d(e, t, n) {
|
|
21
|
-
t = O(t, "g");
|
|
22
|
-
for (var r = n.line, l = n.ch, i = e.lastLine(); r <= i; r++, l = 0) {
|
|
23
|
-
t.lastIndex = l;
|
|
24
|
-
var h = e.getLine(r), f = t.exec(h);
|
|
25
|
-
if (f)
|
|
26
|
-
return {
|
|
27
|
-
from: s(r, f.index),
|
|
28
|
-
to: s(r, f.index + f[0].length),
|
|
29
|
-
match: f
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function N(e, t, n) {
|
|
34
|
-
if (!S(t)) return d(e, t, n);
|
|
35
|
-
t = O(t, "gm");
|
|
36
|
-
for (var r, l = 1, i = n.line, h = e.lastLine(); i <= h; ) {
|
|
37
|
-
for (var f = 0; f < l && !(i > h); f++) {
|
|
38
|
-
var L = e.getLine(i++);
|
|
39
|
-
r = r == null ? L : r + `
|
|
40
|
-
` + L;
|
|
41
|
-
}
|
|
42
|
-
l = l * 2, t.lastIndex = n.ch;
|
|
43
|
-
var u = t.exec(r);
|
|
44
|
-
if (u) {
|
|
45
|
-
var a = r.slice(0, u.index).split(`
|
|
46
|
-
`), c = u[0].split(`
|
|
47
|
-
`), o = n.line + a.length - 1, g = a[a.length - 1].length;
|
|
48
|
-
return {
|
|
49
|
-
from: s(o, g),
|
|
50
|
-
to: s(
|
|
51
|
-
o + c.length - 1,
|
|
52
|
-
c.length == 1 ? g + c[0].length : c[c.length - 1].length
|
|
53
|
-
),
|
|
54
|
-
match: u
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function E(e, t, n) {
|
|
60
|
-
for (var r, l = 0; l <= e.length; ) {
|
|
61
|
-
t.lastIndex = l;
|
|
62
|
-
var i = t.exec(e);
|
|
63
|
-
if (!i) break;
|
|
64
|
-
var h = i.index + i[0].length;
|
|
65
|
-
if (h > e.length - n) break;
|
|
66
|
-
(!r || h > r.index + r[0].length) && (r = i), l = i.index + 1;
|
|
67
|
-
}
|
|
68
|
-
return r;
|
|
69
|
-
}
|
|
70
|
-
function R(e, t, n) {
|
|
71
|
-
t = O(t, "g");
|
|
72
|
-
for (var r = n.line, l = n.ch, i = e.firstLine(); r >= i; r--, l = -1) {
|
|
73
|
-
var h = e.getLine(r), f = E(h, t, l < 0 ? 0 : h.length - l);
|
|
74
|
-
if (f)
|
|
75
|
-
return {
|
|
76
|
-
from: s(r, f.index),
|
|
77
|
-
to: s(r, f.index + f[0].length),
|
|
78
|
-
match: f
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
function b(e, t, n) {
|
|
83
|
-
if (!S(t)) return R(e, t, n);
|
|
84
|
-
t = O(t, "gm");
|
|
85
|
-
for (var r, l = 1, i = e.getLine(n.line).length - n.ch, h = n.line, f = e.firstLine(); h >= f; ) {
|
|
86
|
-
for (var L = 0; L < l && h >= f; L++) {
|
|
87
|
-
var u = e.getLine(h--);
|
|
88
|
-
r = r == null ? u : u + `
|
|
89
|
-
` + r;
|
|
90
|
-
}
|
|
91
|
-
l *= 2;
|
|
92
|
-
var a = E(r, t, i);
|
|
93
|
-
if (a) {
|
|
94
|
-
var c = r.slice(0, a.index).split(`
|
|
95
|
-
`), o = a[0].split(`
|
|
96
|
-
`), g = h + c.length, p = c[c.length - 1].length;
|
|
97
|
-
return {
|
|
98
|
-
from: s(g, p),
|
|
99
|
-
to: s(
|
|
100
|
-
g + o.length - 1,
|
|
101
|
-
o.length == 1 ? p + o[0].length : o[o.length - 1].length
|
|
102
|
-
),
|
|
103
|
-
match: a
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
var F, P;
|
|
109
|
-
String.prototype.normalize ? (F = function(e) {
|
|
110
|
-
return e.normalize("NFD").toLowerCase();
|
|
111
|
-
}, P = function(e) {
|
|
112
|
-
return e.normalize("NFD");
|
|
113
|
-
}) : (F = function(e) {
|
|
114
|
-
return e.toLowerCase();
|
|
115
|
-
}, P = function(e) {
|
|
116
|
-
return e;
|
|
117
|
-
});
|
|
118
|
-
function m(e, t, n, r) {
|
|
119
|
-
if (e.length == t.length) return n;
|
|
120
|
-
for (var l = 0, i = n + Math.max(0, e.length - t.length); ; ) {
|
|
121
|
-
if (l == i) return l;
|
|
122
|
-
var h = l + i >> 1, f = r(e.slice(0, h)).length;
|
|
123
|
-
if (f == n) return h;
|
|
124
|
-
f > n ? i = h : l = h + 1;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
function B(e, t, n, r) {
|
|
128
|
-
if (!t.length) return null;
|
|
129
|
-
var l = r ? F : P, i = l(t).split(/\r|\n\r?/);
|
|
130
|
-
t: for (var h = n.line, f = n.ch, L = e.lastLine() + 1 - i.length; h <= L; h++, f = 0) {
|
|
131
|
-
var u = e.getLine(h).slice(f), a = l(u);
|
|
132
|
-
if (i.length == 1) {
|
|
133
|
-
var c = a.indexOf(i[0]);
|
|
134
|
-
if (c == -1) continue t;
|
|
135
|
-
var n = m(u, a, c, l) + f;
|
|
136
|
-
return {
|
|
137
|
-
from: s(h, m(u, a, c, l) + f),
|
|
138
|
-
to: s(h, m(u, a, c + i[0].length, l) + f)
|
|
139
|
-
};
|
|
140
|
-
} else {
|
|
141
|
-
var o = a.length - i[0].length;
|
|
142
|
-
if (a.slice(o) != i[0]) continue t;
|
|
143
|
-
for (var g = 1; g < i.length - 1; g++)
|
|
144
|
-
if (l(e.getLine(h + g)) != i[g]) continue t;
|
|
145
|
-
var p = e.getLine(h + i.length - 1), x = l(p), w = i[i.length - 1];
|
|
146
|
-
if (x.slice(0, w.length) != w) continue t;
|
|
147
|
-
return {
|
|
148
|
-
from: s(h, m(u, a, o, l) + f),
|
|
149
|
-
to: s(h + i.length - 1, m(p, x, w.length, l))
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
function j(e, t, n, r) {
|
|
155
|
-
if (!t.length) return null;
|
|
156
|
-
var l = r ? F : P, i = l(t).split(/\r|\n\r?/);
|
|
157
|
-
t: for (var h = n.line, f = n.ch, L = e.firstLine() - 1 + i.length; h >= L; h--, f = -1) {
|
|
158
|
-
var u = e.getLine(h);
|
|
159
|
-
f > -1 && (u = u.slice(0, f));
|
|
160
|
-
var a = l(u);
|
|
161
|
-
if (i.length == 1) {
|
|
162
|
-
var c = a.lastIndexOf(i[0]);
|
|
163
|
-
if (c == -1) continue t;
|
|
164
|
-
return {
|
|
165
|
-
from: s(h, m(u, a, c, l)),
|
|
166
|
-
to: s(h, m(u, a, c + i[0].length, l))
|
|
167
|
-
};
|
|
168
|
-
} else {
|
|
169
|
-
var o = i[i.length - 1];
|
|
170
|
-
if (a.slice(0, o.length) != o) continue t;
|
|
171
|
-
for (var g = 1, n = h - i.length + 1; g < i.length - 1; g++)
|
|
172
|
-
if (l(e.getLine(n + g)) != i[g]) continue t;
|
|
173
|
-
var p = e.getLine(h + 1 - i.length), x = l(p);
|
|
174
|
-
if (x.slice(x.length - i[0].length) != i[0]) continue t;
|
|
175
|
-
return {
|
|
176
|
-
from: s(h + 1 - i.length, m(p, x, p.length - i[0].length, l)),
|
|
177
|
-
to: s(h, m(u, a, o.length, l))
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
function k(e, t, n, r) {
|
|
183
|
-
this.atOccurrence = !1, this.afterEmptyMatch = !1, this.doc = e, n = n ? e.clipPos(n) : s(0, 0), this.pos = { from: n, to: n };
|
|
184
|
-
var l;
|
|
185
|
-
typeof r == "object" ? l = r.caseFold : (l = r, r = null), typeof t == "string" ? (l == null && (l = !1), this.matches = function(i, h) {
|
|
186
|
-
return (i ? j : B)(e, t, h, l);
|
|
187
|
-
}) : (t = O(t, "gm"), !r || r.multiline !== !1 ? this.matches = function(i, h) {
|
|
188
|
-
return (i ? b : N)(e, t, h);
|
|
189
|
-
} : this.matches = function(i, h) {
|
|
190
|
-
return (i ? R : d)(e, t, h);
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
k.prototype = {
|
|
194
|
-
findNext: function() {
|
|
195
|
-
return this.find(!1);
|
|
196
|
-
},
|
|
197
|
-
findPrevious: function() {
|
|
198
|
-
return this.find(!0);
|
|
199
|
-
},
|
|
200
|
-
find: function(e) {
|
|
201
|
-
var t = this.doc.clipPos(e ? this.pos.from : this.pos.to);
|
|
202
|
-
if (this.afterEmptyMatch && this.atOccurrence && (t = s(t.line, t.ch), e ? (t.ch--, t.ch < 0 && (t.line--, t.ch = (this.doc.getLine(t.line) || "").length)) : (t.ch++, t.ch > (this.doc.getLine(t.line) || "").length && (t.ch = 0, t.line++)), v.cmpPos(t, this.doc.clipPos(t)) != 0))
|
|
203
|
-
return this.atOccurrence = !1;
|
|
204
|
-
var n = this.matches(e, t);
|
|
205
|
-
if (this.afterEmptyMatch = n && v.cmpPos(n.from, n.to) == 0, n)
|
|
206
|
-
return this.pos = n, this.atOccurrence = !0, this.pos.match || !0;
|
|
207
|
-
var r = s(e ? this.doc.firstLine() : this.doc.lastLine() + 1, 0);
|
|
208
|
-
return this.pos = { from: r, to: r }, this.atOccurrence = !1;
|
|
209
|
-
},
|
|
210
|
-
from: function() {
|
|
211
|
-
if (this.atOccurrence) return this.pos.from;
|
|
212
|
-
},
|
|
213
|
-
to: function() {
|
|
214
|
-
if (this.atOccurrence) return this.pos.to;
|
|
215
|
-
},
|
|
216
|
-
replace: function(e, t) {
|
|
217
|
-
if (this.atOccurrence) {
|
|
218
|
-
var n = v.splitLines(e);
|
|
219
|
-
this.doc.replaceRange(n, this.pos.from, this.pos.to, t), this.pos.to = s(
|
|
220
|
-
this.pos.from.line + n.length - 1,
|
|
221
|
-
n[n.length - 1].length + (n.length == 1 ? this.pos.from.ch : 0)
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}, v.defineExtension("getSearchCursor", function(e, t, n) {
|
|
226
|
-
return new k(this.doc, e, t, n);
|
|
227
|
-
}), v.defineDocExtension("getSearchCursor", function(e, t, n) {
|
|
228
|
-
return new k(this, e, t, n);
|
|
229
|
-
}), v.defineExtension("selectMatches", function(e, t) {
|
|
230
|
-
for (var n = [], r = this.getSearchCursor(e, this.getCursor("from"), t); r.findNext() && !(v.cmpPos(r.to(), this.getCursor("to")) > 0); )
|
|
231
|
-
n.push({ anchor: r.from(), head: r.to() });
|
|
232
|
-
n.length && this.setSelections(n, 0);
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
}()), I.exports;
|
|
236
|
-
}
|
|
237
|
-
export {
|
|
238
|
-
G as r
|
|
239
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";const A=require("./codemirror-DMBo1i5w.js");var I={exports:{}},z;function y(){return z||(z=1,function(C,W){(function(v){v(A.requireCodemirror())})(function(v){var a=v.Pos;function D(e){var t=e.flags;return t??(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function O(e,t){for(var n=D(e),r=n,l=0;l<t.length;l++)r.indexOf(t.charAt(l))==-1&&(r+=t.charAt(l));return n==r?e:new RegExp(e.source,r)}function S(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function d(e,t,n){t=O(t,"g");for(var r=n.line,l=n.ch,i=e.lastLine();r<=i;r++,l=0){t.lastIndex=l;var h=e.getLine(r),f=t.exec(h);if(f)return{from:a(r,f.index),to:a(r,f.index+f[0].length),match:f}}}function N(e,t,n){if(!S(t))return d(e,t,n);t=O(t,"gm");for(var r,l=1,i=n.line,h=e.lastLine();i<=h;){for(var f=0;f<l&&!(i>h);f++){var L=e.getLine(i++);r=r==null?L:r+`
|
|
2
|
-
`+L}l=l*2,t.lastIndex=n.ch;var u=t.exec(r);if(u){var s=r.slice(0,u.index).split(`
|
|
3
|
-
`),c=u[0].split(`
|
|
4
|
-
`),o=n.line+s.length-1,g=s[s.length-1].length;return{from:a(o,g),to:a(o+c.length-1,c.length==1?g+c[0].length:c[c.length-1].length),match:u}}}}function E(e,t,n){for(var r,l=0;l<=e.length;){t.lastIndex=l;var i=t.exec(e);if(!i)break;var h=i.index+i[0].length;if(h>e.length-n)break;(!r||h>r.index+r[0].length)&&(r=i),l=i.index+1}return r}function R(e,t,n){t=O(t,"g");for(var r=n.line,l=n.ch,i=e.firstLine();r>=i;r--,l=-1){var h=e.getLine(r),f=E(h,t,l<0?0:h.length-l);if(f)return{from:a(r,f.index),to:a(r,f.index+f[0].length),match:f}}}function b(e,t,n){if(!S(t))return R(e,t,n);t=O(t,"gm");for(var r,l=1,i=e.getLine(n.line).length-n.ch,h=n.line,f=e.firstLine();h>=f;){for(var L=0;L<l&&h>=f;L++){var u=e.getLine(h--);r=r==null?u:u+`
|
|
5
|
-
`+r}l*=2;var s=E(r,t,i);if(s){var c=r.slice(0,s.index).split(`
|
|
6
|
-
`),o=s[0].split(`
|
|
7
|
-
`),g=h+c.length,p=c[c.length-1].length;return{from:a(g,p),to:a(g+o.length-1,o.length==1?p+o[0].length:o[o.length-1].length),match:s}}}}var F,P;String.prototype.normalize?(F=function(e){return e.normalize("NFD").toLowerCase()},P=function(e){return e.normalize("NFD")}):(F=function(e){return e.toLowerCase()},P=function(e){return e});function m(e,t,n,r){if(e.length==t.length)return n;for(var l=0,i=n+Math.max(0,e.length-t.length);;){if(l==i)return l;var h=l+i>>1,f=r(e.slice(0,h)).length;if(f==n)return h;f>n?i=h:l=h+1}}function B(e,t,n,r){if(!t.length)return null;var l=r?F:P,i=l(t).split(/\r|\n\r?/);t:for(var h=n.line,f=n.ch,L=e.lastLine()+1-i.length;h<=L;h++,f=0){var u=e.getLine(h).slice(f),s=l(u);if(i.length==1){var c=s.indexOf(i[0]);if(c==-1)continue t;var n=m(u,s,c,l)+f;return{from:a(h,m(u,s,c,l)+f),to:a(h,m(u,s,c+i[0].length,l)+f)}}else{var o=s.length-i[0].length;if(s.slice(o)!=i[0])continue t;for(var g=1;g<i.length-1;g++)if(l(e.getLine(h+g))!=i[g])continue t;var p=e.getLine(h+i.length-1),x=l(p),w=i[i.length-1];if(x.slice(0,w.length)!=w)continue t;return{from:a(h,m(u,s,o,l)+f),to:a(h+i.length-1,m(p,x,w.length,l))}}}}function j(e,t,n,r){if(!t.length)return null;var l=r?F:P,i=l(t).split(/\r|\n\r?/);t:for(var h=n.line,f=n.ch,L=e.firstLine()-1+i.length;h>=L;h--,f=-1){var u=e.getLine(h);f>-1&&(u=u.slice(0,f));var s=l(u);if(i.length==1){var c=s.lastIndexOf(i[0]);if(c==-1)continue t;return{from:a(h,m(u,s,c,l)),to:a(h,m(u,s,c+i[0].length,l))}}else{var o=i[i.length-1];if(s.slice(0,o.length)!=o)continue t;for(var g=1,n=h-i.length+1;g<i.length-1;g++)if(l(e.getLine(n+g))!=i[g])continue t;var p=e.getLine(h+1-i.length),x=l(p);if(x.slice(x.length-i[0].length)!=i[0])continue t;return{from:a(h+1-i.length,m(p,x,p.length-i[0].length,l)),to:a(h,m(u,s,o.length,l))}}}}function k(e,t,n,r){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,n=n?e.clipPos(n):a(0,0),this.pos={from:n,to:n};var l;typeof r=="object"?l=r.caseFold:(l=r,r=null),typeof t=="string"?(l==null&&(l=!1),this.matches=function(i,h){return(i?j:B)(e,t,h,l)}):(t=O(t,"gm"),!r||r.multiline!==!1?this.matches=function(i,h){return(i?b:N)(e,t,h)}:this.matches=function(i,h){return(i?R:d)(e,t,h)})}k.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){var t=this.doc.clipPos(e?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(t=a(t.line,t.ch),e?(t.ch--,t.ch<0&&(t.line--,t.ch=(this.doc.getLine(t.line)||"").length)):(t.ch++,t.ch>(this.doc.getLine(t.line)||"").length&&(t.ch=0,t.line++)),v.cmpPos(t,this.doc.clipPos(t))!=0))return this.atOccurrence=!1;var n=this.matches(e,t);if(this.afterEmptyMatch=n&&v.cmpPos(n.from,n.to)==0,n)return this.pos=n,this.atOccurrence=!0,this.pos.match||!0;var r=a(e?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:r,to:r},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(e,t){if(this.atOccurrence){var n=v.splitLines(e);this.doc.replaceRange(n,this.pos.from,this.pos.to,t),this.pos.to=a(this.pos.from.line+n.length-1,n[n.length-1].length+(n.length==1?this.pos.from.ch:0))}}},v.defineExtension("getSearchCursor",function(e,t,n){return new k(this.doc,e,t,n)}),v.defineDocExtension("getSearchCursor",function(e,t,n){return new k(this,e,t,n)}),v.defineExtension("selectMatches",function(e,t){for(var n=[],r=this.getSearchCursor(e,this.getCursor("from"),t);r.findNext()&&!(v.cmpPos(r.to(),this.getCursor("to"))>0);)n.push({anchor:r.from(),head:r.to()});n.length&&this.setSelections(n,0)})})}()),I.exports}exports.requireSearchcursor=y;
|
|
@@ -1,357 +0,0 @@
|
|
|
1
|
-
import { g as rt } from "./index-c_h-B3RW.mjs";
|
|
2
|
-
import { r as ct } from "./codemirror-DgPcZxSc.mjs";
|
|
3
|
-
function lt(S, O) {
|
|
4
|
-
for (var r = 0; r < O.length; r++) {
|
|
5
|
-
const v = O[r];
|
|
6
|
-
if (typeof v != "string" && !Array.isArray(v)) {
|
|
7
|
-
for (const m in v)
|
|
8
|
-
if (m !== "default" && !(m in S)) {
|
|
9
|
-
const w = Object.getOwnPropertyDescriptor(v, m);
|
|
10
|
-
w && Object.defineProperty(S, m, w.get ? w : {
|
|
11
|
-
enumerable: !0,
|
|
12
|
-
get: () => v[m]
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return Object.freeze(Object.defineProperty(S, Symbol.toStringTag, { value: "Module" }));
|
|
18
|
-
}
|
|
19
|
-
var X = { exports: {} }, G;
|
|
20
|
-
function ht() {
|
|
21
|
-
return G || (G = 1, function(S, O) {
|
|
22
|
-
(function(r) {
|
|
23
|
-
r(ct());
|
|
24
|
-
})(function(r) {
|
|
25
|
-
var v = "CodeMirror-hint", m = "CodeMirror-hint-active";
|
|
26
|
-
r.showHint = function(t, e, i) {
|
|
27
|
-
if (!e) return t.showHint(i);
|
|
28
|
-
i && i.async && (e.async = !0);
|
|
29
|
-
var n = { hint: e };
|
|
30
|
-
if (i) for (var s in i) n[s] = i[s];
|
|
31
|
-
return t.showHint(n);
|
|
32
|
-
}, r.defineExtension("showHint", function(t) {
|
|
33
|
-
t = tt(this, this.getCursor("start"), t);
|
|
34
|
-
var e = this.listSelections();
|
|
35
|
-
if (!(e.length > 1)) {
|
|
36
|
-
if (this.somethingSelected()) {
|
|
37
|
-
if (!t.hint.supportsSelection) return;
|
|
38
|
-
for (var i = 0; i < e.length; i++)
|
|
39
|
-
if (e[i].head.line != e[i].anchor.line) return;
|
|
40
|
-
}
|
|
41
|
-
this.state.completionActive && this.state.completionActive.close();
|
|
42
|
-
var n = this.state.completionActive = new w(this, t);
|
|
43
|
-
n.options.hint && (r.signal(this, "startCompletion", this), n.update(!0));
|
|
44
|
-
}
|
|
45
|
-
}), r.defineExtension("closeHint", function() {
|
|
46
|
-
this.state.completionActive && this.state.completionActive.close();
|
|
47
|
-
});
|
|
48
|
-
function w(t, e) {
|
|
49
|
-
if (this.cm = t, this.options = e, this.widget = null, this.debounce = 0, this.tick = 0, this.startPos = this.cm.getCursor("start"), this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length, this.options.updateOnCursorActivity) {
|
|
50
|
-
var i = this;
|
|
51
|
-
t.on("cursorActivity", this.activityFunc = function() {
|
|
52
|
-
i.cursorActivity();
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
var Q = window.requestAnimationFrame || function(t) {
|
|
57
|
-
return setTimeout(t, 1e3 / 60);
|
|
58
|
-
}, Z = window.cancelAnimationFrame || clearTimeout;
|
|
59
|
-
w.prototype = {
|
|
60
|
-
close: function() {
|
|
61
|
-
this.active() && (this.cm.state.completionActive = null, this.tick = null, this.options.updateOnCursorActivity && this.cm.off("cursorActivity", this.activityFunc), this.widget && this.data && r.signal(this.data, "close"), this.widget && this.widget.close(), r.signal(this.cm, "endCompletion", this.cm));
|
|
62
|
-
},
|
|
63
|
-
active: function() {
|
|
64
|
-
return this.cm.state.completionActive == this;
|
|
65
|
-
},
|
|
66
|
-
pick: function(t, e) {
|
|
67
|
-
var i = t.list[e], n = this;
|
|
68
|
-
this.cm.operation(function() {
|
|
69
|
-
i.hint ? i.hint(n.cm, t, i) : n.cm.replaceRange(
|
|
70
|
-
_(i),
|
|
71
|
-
i.from || t.from,
|
|
72
|
-
i.to || t.to,
|
|
73
|
-
"complete"
|
|
74
|
-
), r.signal(t, "pick", i), n.cm.scrollIntoView();
|
|
75
|
-
}), this.options.closeOnPick && this.close();
|
|
76
|
-
},
|
|
77
|
-
cursorActivity: function() {
|
|
78
|
-
this.debounce && (Z(this.debounce), this.debounce = 0);
|
|
79
|
-
var t = this.startPos;
|
|
80
|
-
this.data && (t = this.data.from);
|
|
81
|
-
var e = this.cm.getCursor(), i = this.cm.getLine(e.line);
|
|
82
|
-
if (e.line != this.startPos.line || i.length - e.ch != this.startLen - this.startPos.ch || e.ch < t.ch || this.cm.somethingSelected() || !e.ch || this.options.closeCharacters.test(i.charAt(e.ch - 1)))
|
|
83
|
-
this.close();
|
|
84
|
-
else {
|
|
85
|
-
var n = this;
|
|
86
|
-
this.debounce = Q(function() {
|
|
87
|
-
n.update();
|
|
88
|
-
}), this.widget && this.widget.disable();
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
update: function(t) {
|
|
92
|
-
if (this.tick != null) {
|
|
93
|
-
var e = this, i = ++this.tick;
|
|
94
|
-
U(this.options.hint, this.cm, this.options, function(n) {
|
|
95
|
-
e.tick == i && e.finishUpdate(n, t);
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
finishUpdate: function(t, e) {
|
|
100
|
-
this.data && r.signal(this.data, "update");
|
|
101
|
-
var i = this.widget && this.widget.picked || e && this.options.completeSingle;
|
|
102
|
-
this.widget && this.widget.close(), this.data = t, t && t.list.length && (i && t.list.length == 1 ? this.pick(t, 0) : (this.widget = new B(this, t), r.signal(t, "shown")));
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
function tt(t, e, i) {
|
|
106
|
-
var n = t.options.hintOptions, s = {};
|
|
107
|
-
for (var c in D) s[c] = D[c];
|
|
108
|
-
if (n) for (var c in n)
|
|
109
|
-
n[c] !== void 0 && (s[c] = n[c]);
|
|
110
|
-
if (i) for (var c in i)
|
|
111
|
-
i[c] !== void 0 && (s[c] = i[c]);
|
|
112
|
-
return s.hint.resolve && (s.hint = s.hint.resolve(t, e)), s;
|
|
113
|
-
}
|
|
114
|
-
function _(t) {
|
|
115
|
-
return typeof t == "string" ? t : t.text;
|
|
116
|
-
}
|
|
117
|
-
function et(t, e) {
|
|
118
|
-
var i = {
|
|
119
|
-
Up: function() {
|
|
120
|
-
e.moveFocus(-1);
|
|
121
|
-
},
|
|
122
|
-
Down: function() {
|
|
123
|
-
e.moveFocus(1);
|
|
124
|
-
},
|
|
125
|
-
PageUp: function() {
|
|
126
|
-
e.moveFocus(-e.menuSize() + 1, !0);
|
|
127
|
-
},
|
|
128
|
-
PageDown: function() {
|
|
129
|
-
e.moveFocus(e.menuSize() - 1, !0);
|
|
130
|
-
},
|
|
131
|
-
Home: function() {
|
|
132
|
-
e.setFocus(0);
|
|
133
|
-
},
|
|
134
|
-
End: function() {
|
|
135
|
-
e.setFocus(e.length - 1);
|
|
136
|
-
},
|
|
137
|
-
Enter: e.pick,
|
|
138
|
-
Tab: e.pick,
|
|
139
|
-
Esc: e.close
|
|
140
|
-
}, n = /Mac/.test(navigator.platform);
|
|
141
|
-
n && (i["Ctrl-P"] = function() {
|
|
142
|
-
e.moveFocus(-1);
|
|
143
|
-
}, i["Ctrl-N"] = function() {
|
|
144
|
-
e.moveFocus(1);
|
|
145
|
-
});
|
|
146
|
-
var s = t.options.customKeys, c = s ? {} : i;
|
|
147
|
-
function o(u, l) {
|
|
148
|
-
var a;
|
|
149
|
-
typeof l != "string" ? a = function(H) {
|
|
150
|
-
return l(H, e);
|
|
151
|
-
} : i.hasOwnProperty(l) ? a = i[l] : a = l, c[u] = a;
|
|
152
|
-
}
|
|
153
|
-
if (s)
|
|
154
|
-
for (var f in s) s.hasOwnProperty(f) && o(f, s[f]);
|
|
155
|
-
var h = t.options.extraKeys;
|
|
156
|
-
if (h)
|
|
157
|
-
for (var f in h) h.hasOwnProperty(f) && o(f, h[f]);
|
|
158
|
-
return c;
|
|
159
|
-
}
|
|
160
|
-
function K(t, e) {
|
|
161
|
-
for (; e && e != t; ) {
|
|
162
|
-
if (e.nodeName.toUpperCase() === "LI" && e.parentNode == t) return e;
|
|
163
|
-
e = e.parentNode;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
function B(t, e) {
|
|
167
|
-
this.id = "cm-complete-" + Math.floor(Math.random(1e6)), this.completion = t, this.data = e, this.picked = !1;
|
|
168
|
-
var i = this, n = t.cm, s = n.getInputField().ownerDocument, c = s.defaultView || s.parentWindow, o = this.hints = s.createElement("ul");
|
|
169
|
-
o.setAttribute("role", "listbox"), o.setAttribute("aria-expanded", "true"), o.id = this.id;
|
|
170
|
-
var f = t.cm.options.theme;
|
|
171
|
-
o.className = "CodeMirror-hints " + f, this.selectedHint = e.selectedHint || 0;
|
|
172
|
-
for (var h = e.list, u = 0; u < h.length; ++u) {
|
|
173
|
-
var l = o.appendChild(s.createElement("li")), a = h[u], H = v + (u != this.selectedHint ? "" : " " + m);
|
|
174
|
-
a.className != null && (H = a.className + " " + H), l.className = H, u == this.selectedHint && l.setAttribute("aria-selected", "true"), l.id = this.id + "-" + u, l.setAttribute("role", "option"), a.render ? a.render(l, e, a) : l.appendChild(s.createTextNode(a.displayText || _(a))), l.hintId = u;
|
|
175
|
-
}
|
|
176
|
-
var A = t.options.container || s.body, y = n.cursorCoords(t.options.alignWithWord ? e.from : null), F = y.left, E = y.bottom, M = !0, N = 0, I = 0;
|
|
177
|
-
if (A !== s.body) {
|
|
178
|
-
var st = ["absolute", "relative", "fixed"].indexOf(c.getComputedStyle(A).position) !== -1, C = st ? A : A.offsetParent, j = C.getBoundingClientRect(), q = s.body.getBoundingClientRect();
|
|
179
|
-
N = j.left - q.left - C.scrollLeft, I = j.top - q.top - C.scrollTop;
|
|
180
|
-
}
|
|
181
|
-
o.style.left = F - N + "px", o.style.top = E - I + "px";
|
|
182
|
-
var x = c.innerWidth || Math.max(s.body.offsetWidth, s.documentElement.offsetWidth), W = c.innerHeight || Math.max(s.body.offsetHeight, s.documentElement.offsetHeight);
|
|
183
|
-
A.appendChild(o), n.getInputField().setAttribute("aria-autocomplete", "list"), n.getInputField().setAttribute("aria-owns", this.id), n.getInputField().setAttribute("aria-activedescendant", this.id + "-" + this.selectedHint);
|
|
184
|
-
var g = t.options.moveOnOverlap ? o.getBoundingClientRect() : new DOMRect(), z = t.options.paddingForScrollbar ? o.scrollHeight > o.clientHeight + 1 : !1, b;
|
|
185
|
-
setTimeout(function() {
|
|
186
|
-
b = n.getScrollInfo();
|
|
187
|
-
});
|
|
188
|
-
var ot = g.bottom - W;
|
|
189
|
-
if (ot > 0) {
|
|
190
|
-
var L = g.bottom - g.top, P = g.top - (y.bottom - y.top) - 2;
|
|
191
|
-
W - g.top < P ? (L > P && (o.style.height = (L = P) + "px"), o.style.top = (E = y.top - L) + I + "px", M = !1) : o.style.height = W - g.top - 2 + "px";
|
|
192
|
-
}
|
|
193
|
-
var T = g.right - x;
|
|
194
|
-
if (z && (T += n.display.nativeBarWidth), T > 0 && (g.right - g.left > x && (o.style.width = x - 5 + "px", T -= g.right - g.left - x), o.style.left = (F = Math.max(y.left - T - N, 0)) + "px"), z) for (var k = o.firstChild; k; k = k.nextSibling)
|
|
195
|
-
k.style.paddingRight = n.display.nativeBarWidth + "px";
|
|
196
|
-
if (n.addKeyMap(this.keyMap = et(t, {
|
|
197
|
-
moveFocus: function(p, d) {
|
|
198
|
-
i.changeActive(i.selectedHint + p, d);
|
|
199
|
-
},
|
|
200
|
-
setFocus: function(p) {
|
|
201
|
-
i.changeActive(p);
|
|
202
|
-
},
|
|
203
|
-
menuSize: function() {
|
|
204
|
-
return i.screenAmount();
|
|
205
|
-
},
|
|
206
|
-
length: h.length,
|
|
207
|
-
close: function() {
|
|
208
|
-
t.close();
|
|
209
|
-
},
|
|
210
|
-
pick: function() {
|
|
211
|
-
i.pick();
|
|
212
|
-
},
|
|
213
|
-
data: e
|
|
214
|
-
})), t.options.closeOnUnfocus) {
|
|
215
|
-
var V;
|
|
216
|
-
n.on("blur", this.onBlur = function() {
|
|
217
|
-
V = setTimeout(function() {
|
|
218
|
-
t.close();
|
|
219
|
-
}, 100);
|
|
220
|
-
}), n.on("focus", this.onFocus = function() {
|
|
221
|
-
clearTimeout(V);
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
n.on("scroll", this.onScroll = function() {
|
|
225
|
-
var p = n.getScrollInfo(), d = n.getWrapperElement().getBoundingClientRect();
|
|
226
|
-
b || (b = n.getScrollInfo());
|
|
227
|
-
var $ = E + b.top - p.top, R = $ - (c.pageYOffset || (s.documentElement || s.body).scrollTop);
|
|
228
|
-
if (M || (R += o.offsetHeight), R <= d.top || R >= d.bottom) return t.close();
|
|
229
|
-
o.style.top = $ + "px", o.style.left = F + b.left - p.left + "px";
|
|
230
|
-
}), r.on(o, "dblclick", function(p) {
|
|
231
|
-
var d = K(o, p.target || p.srcElement);
|
|
232
|
-
d && d.hintId != null && (i.changeActive(d.hintId), i.pick());
|
|
233
|
-
}), r.on(o, "click", function(p) {
|
|
234
|
-
var d = K(o, p.target || p.srcElement);
|
|
235
|
-
d && d.hintId != null && (i.changeActive(d.hintId), t.options.completeOnSingleClick && i.pick());
|
|
236
|
-
}), r.on(o, "mousedown", function() {
|
|
237
|
-
setTimeout(function() {
|
|
238
|
-
n.focus();
|
|
239
|
-
}, 20);
|
|
240
|
-
});
|
|
241
|
-
var Y = this.getSelectedHintRange();
|
|
242
|
-
return (Y.from !== 0 || Y.to !== 0) && this.scrollToActive(), r.signal(e, "select", h[this.selectedHint], o.childNodes[this.selectedHint]), !0;
|
|
243
|
-
}
|
|
244
|
-
B.prototype = {
|
|
245
|
-
close: function() {
|
|
246
|
-
if (this.completion.widget == this) {
|
|
247
|
-
this.completion.widget = null, this.hints.parentNode && this.hints.parentNode.removeChild(this.hints), this.completion.cm.removeKeyMap(this.keyMap);
|
|
248
|
-
var t = this.completion.cm.getInputField();
|
|
249
|
-
t.removeAttribute("aria-activedescendant"), t.removeAttribute("aria-owns");
|
|
250
|
-
var e = this.completion.cm;
|
|
251
|
-
this.completion.options.closeOnUnfocus && (e.off("blur", this.onBlur), e.off("focus", this.onFocus)), e.off("scroll", this.onScroll);
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
disable: function() {
|
|
255
|
-
this.completion.cm.removeKeyMap(this.keyMap);
|
|
256
|
-
var t = this;
|
|
257
|
-
this.keyMap = { Enter: function() {
|
|
258
|
-
t.picked = !0;
|
|
259
|
-
} }, this.completion.cm.addKeyMap(this.keyMap);
|
|
260
|
-
},
|
|
261
|
-
pick: function() {
|
|
262
|
-
this.completion.pick(this.data, this.selectedHint);
|
|
263
|
-
},
|
|
264
|
-
changeActive: function(t, e) {
|
|
265
|
-
if (t >= this.data.list.length ? t = e ? this.data.list.length - 1 : 0 : t < 0 && (t = e ? 0 : this.data.list.length - 1), this.selectedHint != t) {
|
|
266
|
-
var i = this.hints.childNodes[this.selectedHint];
|
|
267
|
-
i && (i.className = i.className.replace(" " + m, ""), i.removeAttribute("aria-selected")), i = this.hints.childNodes[this.selectedHint = t], i.className += " " + m, i.setAttribute("aria-selected", "true"), this.completion.cm.getInputField().setAttribute("aria-activedescendant", i.id), this.scrollToActive(), r.signal(this.data, "select", this.data.list[this.selectedHint], i);
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
scrollToActive: function() {
|
|
271
|
-
var t = this.getSelectedHintRange(), e = this.hints.childNodes[t.from], i = this.hints.childNodes[t.to], n = this.hints.firstChild;
|
|
272
|
-
e.offsetTop < this.hints.scrollTop ? this.hints.scrollTop = e.offsetTop - n.offsetTop : i.offsetTop + i.offsetHeight > this.hints.scrollTop + this.hints.clientHeight && (this.hints.scrollTop = i.offsetTop + i.offsetHeight - this.hints.clientHeight + n.offsetTop);
|
|
273
|
-
},
|
|
274
|
-
screenAmount: function() {
|
|
275
|
-
return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1;
|
|
276
|
-
},
|
|
277
|
-
getSelectedHintRange: function() {
|
|
278
|
-
var t = this.completion.options.scrollMargin || 0;
|
|
279
|
-
return {
|
|
280
|
-
from: Math.max(0, this.selectedHint - t),
|
|
281
|
-
to: Math.min(this.data.list.length - 1, this.selectedHint + t)
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
};
|
|
285
|
-
function it(t, e) {
|
|
286
|
-
if (!t.somethingSelected()) return e;
|
|
287
|
-
for (var i = [], n = 0; n < e.length; n++)
|
|
288
|
-
e[n].supportsSelection && i.push(e[n]);
|
|
289
|
-
return i;
|
|
290
|
-
}
|
|
291
|
-
function U(t, e, i, n) {
|
|
292
|
-
if (t.async)
|
|
293
|
-
t(e, n, i);
|
|
294
|
-
else {
|
|
295
|
-
var s = t(e, i);
|
|
296
|
-
s && s.then ? s.then(n) : n(s);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
function nt(t, e) {
|
|
300
|
-
var i = t.getHelpers(e, "hint"), n;
|
|
301
|
-
if (i.length) {
|
|
302
|
-
var s = function(c, o, f) {
|
|
303
|
-
var h = it(c, i);
|
|
304
|
-
function u(l) {
|
|
305
|
-
if (l == h.length) return o(null);
|
|
306
|
-
U(h[l], c, f, function(a) {
|
|
307
|
-
a && a.list.length > 0 ? o(a) : u(l + 1);
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
u(0);
|
|
311
|
-
};
|
|
312
|
-
return s.async = !0, s.supportsSelection = !0, s;
|
|
313
|
-
} else return (n = t.getHelper(t.getCursor(), "hintWords")) ? function(c) {
|
|
314
|
-
return r.hint.fromList(c, { words: n });
|
|
315
|
-
} : r.hint.anyword ? function(c, o) {
|
|
316
|
-
return r.hint.anyword(c, o);
|
|
317
|
-
} : function() {
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
r.registerHelper("hint", "auto", {
|
|
321
|
-
resolve: nt
|
|
322
|
-
}), r.registerHelper("hint", "fromList", function(t, e) {
|
|
323
|
-
var i = t.getCursor(), n = t.getTokenAt(i), s, c = r.Pos(i.line, n.start), o = i;
|
|
324
|
-
n.start < i.ch && /\w/.test(n.string.charAt(i.ch - n.start - 1)) ? s = n.string.substr(0, i.ch - n.start) : (s = "", c = i);
|
|
325
|
-
for (var f = [], h = 0; h < e.words.length; h++) {
|
|
326
|
-
var u = e.words[h];
|
|
327
|
-
u.slice(0, s.length) == s && f.push(u);
|
|
328
|
-
}
|
|
329
|
-
if (f.length) return { list: f, from: c, to: o };
|
|
330
|
-
}), r.commands.autocomplete = r.showHint;
|
|
331
|
-
var D = {
|
|
332
|
-
hint: r.hint.auto,
|
|
333
|
-
completeSingle: !0,
|
|
334
|
-
alignWithWord: !0,
|
|
335
|
-
closeCharacters: /[\s()\[\]{};:>,]/,
|
|
336
|
-
closeOnPick: !0,
|
|
337
|
-
closeOnUnfocus: !0,
|
|
338
|
-
updateOnCursorActivity: !0,
|
|
339
|
-
completeOnSingleClick: !0,
|
|
340
|
-
container: null,
|
|
341
|
-
customKeys: null,
|
|
342
|
-
extraKeys: null,
|
|
343
|
-
paddingForScrollbar: !0,
|
|
344
|
-
moveOnOverlap: !0
|
|
345
|
-
};
|
|
346
|
-
r.defineOption("hintOptions", null);
|
|
347
|
-
});
|
|
348
|
-
}()), X.exports;
|
|
349
|
-
}
|
|
350
|
-
var J = ht();
|
|
351
|
-
const at = /* @__PURE__ */ rt(J), pt = /* @__PURE__ */ lt({
|
|
352
|
-
__proto__: null,
|
|
353
|
-
default: at
|
|
354
|
-
}, [J]);
|
|
355
|
-
export {
|
|
356
|
-
pt as s
|
|
357
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const rt=require("./index-Of0v8HXf.js"),ct=require("./codemirror-DMBo1i5w.js");function lt(S,O){for(var r=0;r<O.length;r++){const v=O[r];if(typeof v!="string"&&!Array.isArray(v)){for(const m in v)if(m!=="default"&&!(m in S)){const w=Object.getOwnPropertyDescriptor(v,m);w&&Object.defineProperty(S,m,w.get?w:{enumerable:!0,get:()=>v[m]})}}}return Object.freeze(Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}))}var X={exports:{}},G;function ht(){return G||(G=1,function(S,O){(function(r){r(ct.requireCodemirror())})(function(r){var v="CodeMirror-hint",m="CodeMirror-hint-active";r.showHint=function(t,e,i){if(!e)return t.showHint(i);i&&i.async&&(e.async=!0);var n={hint:e};if(i)for(var s in i)n[s]=i[s];return t.showHint(n)},r.defineExtension("showHint",function(t){t=tt(this,this.getCursor("start"),t);var e=this.listSelections();if(!(e.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;i<e.length;i++)if(e[i].head.line!=e[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var n=this.state.completionActive=new w(this,t);n.options.hint&&(r.signal(this,"startCompletion",this),n.update(!0))}}),r.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function w(t,e){if(this.cm=t,this.options=e,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var i=this;t.on("cursorActivity",this.activityFunc=function(){i.cursorActivity()})}}var Q=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},Z=window.cancelAnimationFrame||clearTimeout;w.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&r.signal(this.data,"close"),this.widget&&this.widget.close(),r.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,e){var i=t.list[e],n=this;this.cm.operation(function(){i.hint?i.hint(n.cm,t,i):n.cm.replaceRange(_(i),i.from||t.from,i.to||t.to,"complete"),r.signal(t,"pick",i),n.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(Z(this.debounce),this.debounce=0);var t=this.startPos;this.data&&(t=this.data.from);var e=this.cm.getCursor(),i=this.cm.getLine(e.line);if(e.line!=this.startPos.line||i.length-e.ch!=this.startLen-this.startPos.ch||e.ch<t.ch||this.cm.somethingSelected()||!e.ch||this.options.closeCharacters.test(i.charAt(e.ch-1)))this.close();else{var n=this;this.debounce=Q(function(){n.update()}),this.widget&&this.widget.disable()}},update:function(t){if(this.tick!=null){var e=this,i=++this.tick;U(this.options.hint,this.cm,this.options,function(n){e.tick==i&&e.finishUpdate(n,t)})}},finishUpdate:function(t,e){this.data&&r.signal(this.data,"update");var i=this.widget&&this.widget.picked||e&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(i&&t.list.length==1?this.pick(t,0):(this.widget=new B(this,t),r.signal(t,"shown")))}};function tt(t,e,i){var n=t.options.hintOptions,s={};for(var c in q)s[c]=q[c];if(n)for(var c in n)n[c]!==void 0&&(s[c]=n[c]);if(i)for(var c in i)i[c]!==void 0&&(s[c]=i[c]);return s.hint.resolve&&(s.hint=s.hint.resolve(t,e)),s}function _(t){return typeof t=="string"?t:t.text}function et(t,e){var i={Up:function(){e.moveFocus(-1)},Down:function(){e.moveFocus(1)},PageUp:function(){e.moveFocus(-e.menuSize()+1,!0)},PageDown:function(){e.moveFocus(e.menuSize()-1,!0)},Home:function(){e.setFocus(0)},End:function(){e.setFocus(e.length-1)},Enter:e.pick,Tab:e.pick,Esc:e.close},n=/Mac/.test(navigator.platform);n&&(i["Ctrl-P"]=function(){e.moveFocus(-1)},i["Ctrl-N"]=function(){e.moveFocus(1)});var s=t.options.customKeys,c=s?{}:i;function o(u,l){var a;typeof l!="string"?a=function(H){return l(H,e)}:i.hasOwnProperty(l)?a=i[l]:a=l,c[u]=a}if(s)for(var f in s)s.hasOwnProperty(f)&&o(f,s[f]);var h=t.options.extraKeys;if(h)for(var f in h)h.hasOwnProperty(f)&&o(f,h[f]);return c}function K(t,e){for(;e&&e!=t;){if(e.nodeName.toUpperCase()==="LI"&&e.parentNode==t)return e;e=e.parentNode}}function B(t,e){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=t,this.data=e,this.picked=!1;var i=this,n=t.cm,s=n.getInputField().ownerDocument,c=s.defaultView||s.parentWindow,o=this.hints=s.createElement("ul");o.setAttribute("role","listbox"),o.setAttribute("aria-expanded","true"),o.id=this.id;var f=t.cm.options.theme;o.className="CodeMirror-hints "+f,this.selectedHint=e.selectedHint||0;for(var h=e.list,u=0;u<h.length;++u){var l=o.appendChild(s.createElement("li")),a=h[u],H=v+(u!=this.selectedHint?"":" "+m);a.className!=null&&(H=a.className+" "+H),l.className=H,u==this.selectedHint&&l.setAttribute("aria-selected","true"),l.id=this.id+"-"+u,l.setAttribute("role","option"),a.render?a.render(l,e,a):l.appendChild(s.createTextNode(a.displayText||_(a))),l.hintId=u}var A=t.options.container||s.body,y=n.cursorCoords(t.options.alignWithWord?e.from:null),F=y.left,E=y.bottom,D=!0,N=0,I=0;if(A!==s.body){var st=["absolute","relative","fixed"].indexOf(c.getComputedStyle(A).position)!==-1,C=st?A:A.offsetParent,M=C.getBoundingClientRect(),j=s.body.getBoundingClientRect();N=M.left-j.left-C.scrollLeft,I=M.top-j.top-C.scrollTop}o.style.left=F-N+"px",o.style.top=E-I+"px";var x=c.innerWidth||Math.max(s.body.offsetWidth,s.documentElement.offsetWidth),W=c.innerHeight||Math.max(s.body.offsetHeight,s.documentElement.offsetHeight);A.appendChild(o),n.getInputField().setAttribute("aria-autocomplete","list"),n.getInputField().setAttribute("aria-owns",this.id),n.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var g=t.options.moveOnOverlap?o.getBoundingClientRect():new DOMRect,z=t.options.paddingForScrollbar?o.scrollHeight>o.clientHeight+1:!1,b;setTimeout(function(){b=n.getScrollInfo()});var ot=g.bottom-W;if(ot>0){var L=g.bottom-g.top,P=g.top-(y.bottom-y.top)-2;W-g.top<P?(L>P&&(o.style.height=(L=P)+"px"),o.style.top=(E=y.top-L)+I+"px",D=!1):o.style.height=W-g.top-2+"px"}var T=g.right-x;if(z&&(T+=n.display.nativeBarWidth),T>0&&(g.right-g.left>x&&(o.style.width=x-5+"px",T-=g.right-g.left-x),o.style.left=(F=Math.max(y.left-T-N,0))+"px"),z)for(var k=o.firstChild;k;k=k.nextSibling)k.style.paddingRight=n.display.nativeBarWidth+"px";if(n.addKeyMap(this.keyMap=et(t,{moveFocus:function(p,d){i.changeActive(i.selectedHint+p,d)},setFocus:function(p){i.changeActive(p)},menuSize:function(){return i.screenAmount()},length:h.length,close:function(){t.close()},pick:function(){i.pick()},data:e})),t.options.closeOnUnfocus){var V;n.on("blur",this.onBlur=function(){V=setTimeout(function(){t.close()},100)}),n.on("focus",this.onFocus=function(){clearTimeout(V)})}n.on("scroll",this.onScroll=function(){var p=n.getScrollInfo(),d=n.getWrapperElement().getBoundingClientRect();b||(b=n.getScrollInfo());var $=E+b.top-p.top,R=$-(c.pageYOffset||(s.documentElement||s.body).scrollTop);if(D||(R+=o.offsetHeight),R<=d.top||R>=d.bottom)return t.close();o.style.top=$+"px",o.style.left=F+b.left-p.left+"px"}),r.on(o,"dblclick",function(p){var d=K(o,p.target||p.srcElement);d&&d.hintId!=null&&(i.changeActive(d.hintId),i.pick())}),r.on(o,"click",function(p){var d=K(o,p.target||p.srcElement);d&&d.hintId!=null&&(i.changeActive(d.hintId),t.options.completeOnSingleClick&&i.pick())}),r.on(o,"mousedown",function(){setTimeout(function(){n.focus()},20)});var Y=this.getSelectedHintRange();return(Y.from!==0||Y.to!==0)&&this.scrollToActive(),r.signal(e,"select",h[this.selectedHint],o.childNodes[this.selectedHint]),!0}B.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var t=this.completion.cm.getInputField();t.removeAttribute("aria-activedescendant"),t.removeAttribute("aria-owns");var e=this.completion.cm;this.completion.options.closeOnUnfocus&&(e.off("blur",this.onBlur),e.off("focus",this.onFocus)),e.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var t=this;this.keyMap={Enter:function(){t.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,e){if(t>=this.data.list.length?t=e?this.data.list.length-1:0:t<0&&(t=e?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+m,""),i.removeAttribute("aria-selected")),i=this.hints.childNodes[this.selectedHint=t],i.className+=" "+m,i.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",i.id),this.scrollToActive(),r.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var t=this.getSelectedHintRange(),e=this.hints.childNodes[t.from],i=this.hints.childNodes[t.to],n=this.hints.firstChild;e.offsetTop<this.hints.scrollTop?this.hints.scrollTop=e.offsetTop-n.offsetTop:i.offsetTop+i.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+n.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var t=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-t),to:Math.min(this.data.list.length-1,this.selectedHint+t)}}};function it(t,e){if(!t.somethingSelected())return e;for(var i=[],n=0;n<e.length;n++)e[n].supportsSelection&&i.push(e[n]);return i}function U(t,e,i,n){if(t.async)t(e,n,i);else{var s=t(e,i);s&&s.then?s.then(n):n(s)}}function nt(t,e){var i=t.getHelpers(e,"hint"),n;if(i.length){var s=function(c,o,f){var h=it(c,i);function u(l){if(l==h.length)return o(null);U(h[l],c,f,function(a){a&&a.list.length>0?o(a):u(l+1)})}u(0)};return s.async=!0,s.supportsSelection=!0,s}else return(n=t.getHelper(t.getCursor(),"hintWords"))?function(c){return r.hint.fromList(c,{words:n})}:r.hint.anyword?function(c,o){return r.hint.anyword(c,o)}:function(){}}r.registerHelper("hint","auto",{resolve:nt}),r.registerHelper("hint","fromList",function(t,e){var i=t.getCursor(),n=t.getTokenAt(i),s,c=r.Pos(i.line,n.start),o=i;n.start<i.ch&&/\w/.test(n.string.charAt(i.ch-n.start-1))?s=n.string.substr(0,i.ch-n.start):(s="",c=i);for(var f=[],h=0;h<e.words.length;h++){var u=e.words[h];u.slice(0,s.length)==s&&f.push(u)}if(f.length)return{list:f,from:c,to:o}}),r.commands.autocomplete=r.showHint;var q={hint:r.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};r.defineOption("hintOptions",null)})}()),X.exports}var J=ht();const at=rt.getDefaultExportFromCjs(J),ft=lt({__proto__:null,default:at},[J]);exports.showHint=ft;
|