sa-spell-checker 1.0.2 → 1.0.3
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/sa-spell-checker.mjs +890 -397
- package/dist/sa-spell-checker.umd.js +63 -27
- package/package.json +3 -2
|
@@ -3,215 +3,215 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
7
|
-
let
|
|
8
|
-
constructor(
|
|
9
|
-
if (this._$cssResult$ = !0, s !==
|
|
10
|
-
this.cssText =
|
|
6
|
+
const te = globalThis, ye = te.ShadowRoot && (te.ShadyCSS === void 0 || te.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Xe = Symbol(), Oe = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let ft = class {
|
|
8
|
+
constructor(e, t, s) {
|
|
9
|
+
if (this._$cssResult$ = !0, s !== Xe) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
|
+
this.cssText = e, this.t = t;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
|
-
let
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
const s =
|
|
17
|
-
s && (
|
|
13
|
+
let e = this.o;
|
|
14
|
+
const t = this.t;
|
|
15
|
+
if (ye && e === void 0) {
|
|
16
|
+
const s = t !== void 0 && t.length === 1;
|
|
17
|
+
s && (e = Oe.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && Oe.set(t, e));
|
|
18
18
|
}
|
|
19
|
-
return
|
|
19
|
+
return e;
|
|
20
20
|
}
|
|
21
21
|
toString() {
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
else for (const
|
|
28
|
-
const s = document.createElement("style"), i =
|
|
29
|
-
i !== void 0 && s.setAttribute("nonce", i), s.textContent =
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
let
|
|
33
|
-
for (const s of
|
|
34
|
-
return
|
|
25
|
+
const Ze = (r) => new ft(typeof r == "string" ? r : r + "", void 0, Xe), gt = (r, e) => {
|
|
26
|
+
if (ye) r.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
27
|
+
else for (const t of e) {
|
|
28
|
+
const s = document.createElement("style"), i = te.litNonce;
|
|
29
|
+
i !== void 0 && s.setAttribute("nonce", i), s.textContent = t.cssText, r.appendChild(s);
|
|
30
|
+
}
|
|
31
|
+
}, Se = ye ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((e) => {
|
|
32
|
+
let t = "";
|
|
33
|
+
for (const s of e.cssRules) t += s.cssText;
|
|
34
|
+
return Ze(t);
|
|
35
35
|
})(r) : r;
|
|
36
36
|
/**
|
|
37
37
|
* @license
|
|
38
38
|
* Copyright 2017 Google LLC
|
|
39
39
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
40
|
*/
|
|
41
|
-
const { is:
|
|
42
|
-
switch (
|
|
41
|
+
const { is: vt, defineProperty: $t, getOwnPropertyDescriptor: _t, getOwnPropertyNames: mt, getOwnPropertySymbols: yt, getPrototypeOf: bt } = Object, T = globalThis, Re = T.trustedTypes, At = Re ? Re.emptyScript : "", ce = T.reactiveElementPolyfillSupport, G = (r, e) => r, se = { toAttribute(r, e) {
|
|
42
|
+
switch (e) {
|
|
43
43
|
case Boolean:
|
|
44
|
-
r = r ?
|
|
44
|
+
r = r ? At : null;
|
|
45
45
|
break;
|
|
46
46
|
case Object:
|
|
47
47
|
case Array:
|
|
48
48
|
r = r == null ? r : JSON.stringify(r);
|
|
49
49
|
}
|
|
50
50
|
return r;
|
|
51
|
-
}, fromAttribute(r,
|
|
52
|
-
let
|
|
53
|
-
switch (
|
|
51
|
+
}, fromAttribute(r, e) {
|
|
52
|
+
let t = r;
|
|
53
|
+
switch (e) {
|
|
54
54
|
case Boolean:
|
|
55
|
-
|
|
55
|
+
t = r !== null;
|
|
56
56
|
break;
|
|
57
57
|
case Number:
|
|
58
|
-
|
|
58
|
+
t = r === null ? null : Number(r);
|
|
59
59
|
break;
|
|
60
60
|
case Object:
|
|
61
61
|
case Array:
|
|
62
62
|
try {
|
|
63
|
-
|
|
63
|
+
t = JSON.parse(r);
|
|
64
64
|
} catch {
|
|
65
|
-
|
|
65
|
+
t = null;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
return
|
|
69
|
-
} },
|
|
70
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
71
|
-
let
|
|
72
|
-
static addInitializer(
|
|
73
|
-
this._$Ei(), (this.l ?? (this.l = [])).push(
|
|
68
|
+
return t;
|
|
69
|
+
} }, be = (r, e) => !vt(r, e), Ne = { attribute: !0, type: String, converter: se, reflect: !1, useDefault: !1, hasChanged: be };
|
|
70
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), T.litPropertyMetadata ?? (T.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
71
|
+
let j = class extends HTMLElement {
|
|
72
|
+
static addInitializer(e) {
|
|
73
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(e);
|
|
74
74
|
}
|
|
75
75
|
static get observedAttributes() {
|
|
76
76
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
77
77
|
}
|
|
78
|
-
static createProperty(
|
|
79
|
-
if (
|
|
80
|
-
const s = Symbol(), i = this.getPropertyDescriptor(
|
|
81
|
-
i !== void 0 &&
|
|
78
|
+
static createProperty(e, t = Ne) {
|
|
79
|
+
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
80
|
+
const s = Symbol(), i = this.getPropertyDescriptor(e, s, t);
|
|
81
|
+
i !== void 0 && $t(this.prototype, e, i);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
static getPropertyDescriptor(
|
|
85
|
-
const { get: i, set:
|
|
86
|
-
return this[
|
|
87
|
-
}, set(
|
|
88
|
-
this[
|
|
84
|
+
static getPropertyDescriptor(e, t, s) {
|
|
85
|
+
const { get: i, set: n } = _t(this.prototype, e) ?? { get() {
|
|
86
|
+
return this[t];
|
|
87
|
+
}, set(o) {
|
|
88
|
+
this[t] = o;
|
|
89
89
|
} };
|
|
90
|
-
return { get: i, set(
|
|
91
|
-
const
|
|
92
|
-
|
|
90
|
+
return { get: i, set(o) {
|
|
91
|
+
const h = i == null ? void 0 : i.call(this);
|
|
92
|
+
n == null || n.call(this, o), this.requestUpdate(e, h, s);
|
|
93
93
|
}, configurable: !0, enumerable: !0 };
|
|
94
94
|
}
|
|
95
|
-
static getPropertyOptions(
|
|
96
|
-
return this.elementProperties.get(
|
|
95
|
+
static getPropertyOptions(e) {
|
|
96
|
+
return this.elementProperties.get(e) ?? Ne;
|
|
97
97
|
}
|
|
98
98
|
static _$Ei() {
|
|
99
|
-
if (this.hasOwnProperty(
|
|
100
|
-
const
|
|
101
|
-
|
|
99
|
+
if (this.hasOwnProperty(G("elementProperties"))) return;
|
|
100
|
+
const e = bt(this);
|
|
101
|
+
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
102
102
|
}
|
|
103
103
|
static finalize() {
|
|
104
|
-
if (this.hasOwnProperty(
|
|
105
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
106
|
-
const
|
|
107
|
-
for (const i of s) this.createProperty(i,
|
|
104
|
+
if (this.hasOwnProperty(G("finalized"))) return;
|
|
105
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(G("properties"))) {
|
|
106
|
+
const t = this.properties, s = [...mt(t), ...yt(t)];
|
|
107
|
+
for (const i of s) this.createProperty(i, t[i]);
|
|
108
108
|
}
|
|
109
|
-
const
|
|
110
|
-
if (
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
109
|
+
const e = this[Symbol.metadata];
|
|
110
|
+
if (e !== null) {
|
|
111
|
+
const t = litPropertyMetadata.get(e);
|
|
112
|
+
if (t !== void 0) for (const [s, i] of t) this.elementProperties.set(s, i);
|
|
113
113
|
}
|
|
114
114
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
115
|
-
for (const [
|
|
116
|
-
const i = this._$Eu(
|
|
117
|
-
i !== void 0 && this._$Eh.set(i,
|
|
115
|
+
for (const [t, s] of this.elementProperties) {
|
|
116
|
+
const i = this._$Eu(t, s);
|
|
117
|
+
i !== void 0 && this._$Eh.set(i, t);
|
|
118
118
|
}
|
|
119
119
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
120
120
|
}
|
|
121
|
-
static finalizeStyles(
|
|
122
|
-
const
|
|
123
|
-
if (Array.isArray(
|
|
124
|
-
const s = new Set(
|
|
125
|
-
for (const i of s)
|
|
126
|
-
} else
|
|
127
|
-
return
|
|
121
|
+
static finalizeStyles(e) {
|
|
122
|
+
const t = [];
|
|
123
|
+
if (Array.isArray(e)) {
|
|
124
|
+
const s = new Set(e.flat(1 / 0).reverse());
|
|
125
|
+
for (const i of s) t.unshift(Se(i));
|
|
126
|
+
} else e !== void 0 && t.push(Se(e));
|
|
127
|
+
return t;
|
|
128
128
|
}
|
|
129
|
-
static _$Eu(
|
|
130
|
-
const s =
|
|
131
|
-
return s === !1 ? void 0 : typeof s == "string" ? s : typeof
|
|
129
|
+
static _$Eu(e, t) {
|
|
130
|
+
const s = t.attribute;
|
|
131
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
132
132
|
}
|
|
133
133
|
constructor() {
|
|
134
134
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
135
135
|
}
|
|
136
136
|
_$Ev() {
|
|
137
|
-
var t;
|
|
138
|
-
this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
|
|
139
|
-
}
|
|
140
|
-
addController(t) {
|
|
141
137
|
var e;
|
|
142
|
-
|
|
138
|
+
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((t) => t(this));
|
|
143
139
|
}
|
|
144
|
-
|
|
145
|
-
var
|
|
146
|
-
(
|
|
140
|
+
addController(e) {
|
|
141
|
+
var t;
|
|
142
|
+
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(e), this.renderRoot !== void 0 && this.isConnected && ((t = e.hostConnected) == null || t.call(e));
|
|
143
|
+
}
|
|
144
|
+
removeController(e) {
|
|
145
|
+
var t;
|
|
146
|
+
(t = this._$EO) == null || t.delete(e);
|
|
147
147
|
}
|
|
148
148
|
_$E_() {
|
|
149
|
-
const
|
|
150
|
-
for (const s of
|
|
151
|
-
|
|
149
|
+
const e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
|
|
150
|
+
for (const s of t.keys()) this.hasOwnProperty(s) && (e.set(s, this[s]), delete this[s]);
|
|
151
|
+
e.size > 0 && (this._$Ep = e);
|
|
152
152
|
}
|
|
153
153
|
createRenderRoot() {
|
|
154
|
-
const
|
|
155
|
-
return
|
|
154
|
+
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
155
|
+
return gt(e, this.constructor.elementStyles), e;
|
|
156
156
|
}
|
|
157
157
|
connectedCallback() {
|
|
158
|
-
var
|
|
159
|
-
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (
|
|
158
|
+
var e;
|
|
159
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((t) => {
|
|
160
160
|
var s;
|
|
161
|
-
return (s =
|
|
161
|
+
return (s = t.hostConnected) == null ? void 0 : s.call(t);
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
enableUpdating(
|
|
164
|
+
enableUpdating(e) {
|
|
165
165
|
}
|
|
166
166
|
disconnectedCallback() {
|
|
167
|
-
var
|
|
168
|
-
(
|
|
167
|
+
var e;
|
|
168
|
+
(e = this._$EO) == null || e.forEach((t) => {
|
|
169
169
|
var s;
|
|
170
|
-
return (s =
|
|
170
|
+
return (s = t.hostDisconnected) == null ? void 0 : s.call(t);
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
-
attributeChangedCallback(
|
|
174
|
-
this._$AK(
|
|
173
|
+
attributeChangedCallback(e, t, s) {
|
|
174
|
+
this._$AK(e, s);
|
|
175
175
|
}
|
|
176
|
-
_$ET(
|
|
177
|
-
var
|
|
178
|
-
const s = this.constructor.elementProperties.get(
|
|
176
|
+
_$ET(e, t) {
|
|
177
|
+
var n;
|
|
178
|
+
const s = this.constructor.elementProperties.get(e), i = this.constructor._$Eu(e, s);
|
|
179
179
|
if (i !== void 0 && s.reflect === !0) {
|
|
180
|
-
const
|
|
181
|
-
this._$Em =
|
|
180
|
+
const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : se).toAttribute(t, s.type);
|
|
181
|
+
this._$Em = e, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
_$AK(
|
|
185
|
-
var
|
|
186
|
-
const s = this.constructor, i = s._$Eh.get(
|
|
184
|
+
_$AK(e, t) {
|
|
185
|
+
var n, o;
|
|
186
|
+
const s = this.constructor, i = s._$Eh.get(e);
|
|
187
187
|
if (i !== void 0 && this._$Em !== i) {
|
|
188
|
-
const
|
|
188
|
+
const h = s.getPropertyOptions(i), a = typeof h.converter == "function" ? { fromAttribute: h.converter } : ((n = h.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? h.converter : se;
|
|
189
189
|
this._$Em = i;
|
|
190
|
-
const
|
|
191
|
-
this[i] =
|
|
190
|
+
const d = a.fromAttribute(t, h.type);
|
|
191
|
+
this[i] = d ?? ((o = this._$Ej) == null ? void 0 : o.get(i)) ?? d, this._$Em = null;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
requestUpdate(
|
|
195
|
-
var
|
|
196
|
-
if (
|
|
197
|
-
const
|
|
198
|
-
if (i === !1 && (
|
|
199
|
-
this.C(
|
|
194
|
+
requestUpdate(e, t, s, i = !1, n) {
|
|
195
|
+
var o;
|
|
196
|
+
if (e !== void 0) {
|
|
197
|
+
const h = this.constructor;
|
|
198
|
+
if (i === !1 && (n = this[e]), s ?? (s = h.getPropertyOptions(e)), !((s.hasChanged ?? be)(n, t) || s.useDefault && s.reflect && n === ((o = this._$Ej) == null ? void 0 : o.get(e)) && !this.hasAttribute(h._$Eu(e, s)))) return;
|
|
199
|
+
this.C(e, t, s);
|
|
200
200
|
}
|
|
201
201
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
202
202
|
}
|
|
203
|
-
C(
|
|
204
|
-
s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(
|
|
203
|
+
C(e, t, { useDefault: s, reflect: i, wrapped: n }, o) {
|
|
204
|
+
s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, o ?? t ?? this[e]), n !== !0 || o !== void 0) || (this._$AL.has(e) || (this.hasUpdated || s || (t = void 0), this._$AL.set(e, t)), i === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e));
|
|
205
205
|
}
|
|
206
206
|
async _$EP() {
|
|
207
207
|
this.isUpdatePending = !0;
|
|
208
208
|
try {
|
|
209
209
|
await this._$ES;
|
|
210
|
-
} catch (
|
|
211
|
-
Promise.reject(
|
|
210
|
+
} catch (t) {
|
|
211
|
+
Promise.reject(t);
|
|
212
212
|
}
|
|
213
|
-
const
|
|
214
|
-
return
|
|
213
|
+
const e = this.scheduleUpdate();
|
|
214
|
+
return e != null && await e, !this.isUpdatePending;
|
|
215
215
|
}
|
|
216
216
|
scheduleUpdate() {
|
|
217
217
|
return this.performUpdate();
|
|
@@ -221,35 +221,35 @@ let E = class extends HTMLElement {
|
|
|
221
221
|
if (!this.isUpdatePending) return;
|
|
222
222
|
if (!this.hasUpdated) {
|
|
223
223
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
224
|
-
for (const [
|
|
224
|
+
for (const [n, o] of this._$Ep) this[n] = o;
|
|
225
225
|
this._$Ep = void 0;
|
|
226
226
|
}
|
|
227
227
|
const i = this.constructor.elementProperties;
|
|
228
|
-
if (i.size > 0) for (const [
|
|
229
|
-
const { wrapped:
|
|
230
|
-
|
|
228
|
+
if (i.size > 0) for (const [n, o] of i) {
|
|
229
|
+
const { wrapped: h } = o, a = this[n];
|
|
230
|
+
h !== !0 || this._$AL.has(n) || a === void 0 || this.C(n, void 0, o, a);
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
let
|
|
234
|
-
const
|
|
233
|
+
let e = !1;
|
|
234
|
+
const t = this._$AL;
|
|
235
235
|
try {
|
|
236
|
-
|
|
237
|
-
var
|
|
238
|
-
return (
|
|
239
|
-
}), this.update(
|
|
236
|
+
e = this.shouldUpdate(t), e ? (this.willUpdate(t), (s = this._$EO) == null || s.forEach((i) => {
|
|
237
|
+
var n;
|
|
238
|
+
return (n = i.hostUpdate) == null ? void 0 : n.call(i);
|
|
239
|
+
}), this.update(t)) : this._$EM();
|
|
240
240
|
} catch (i) {
|
|
241
|
-
throw
|
|
241
|
+
throw e = !1, this._$EM(), i;
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
e && this._$AE(t);
|
|
244
244
|
}
|
|
245
|
-
willUpdate(
|
|
245
|
+
willUpdate(e) {
|
|
246
246
|
}
|
|
247
|
-
_$AE(
|
|
248
|
-
var
|
|
249
|
-
(
|
|
247
|
+
_$AE(e) {
|
|
248
|
+
var t;
|
|
249
|
+
(t = this._$EO) == null || t.forEach((s) => {
|
|
250
250
|
var i;
|
|
251
251
|
return (i = s.hostUpdated) == null ? void 0 : i.call(s);
|
|
252
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(
|
|
252
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
253
253
|
}
|
|
254
254
|
_$EM() {
|
|
255
255
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
@@ -260,89 +260,89 @@ let E = class extends HTMLElement {
|
|
|
260
260
|
getUpdateComplete() {
|
|
261
261
|
return this._$ES;
|
|
262
262
|
}
|
|
263
|
-
shouldUpdate(
|
|
263
|
+
shouldUpdate(e) {
|
|
264
264
|
return !0;
|
|
265
265
|
}
|
|
266
|
-
update(
|
|
267
|
-
this._$Eq && (this._$Eq = this._$Eq.forEach((
|
|
266
|
+
update(e) {
|
|
267
|
+
this._$Eq && (this._$Eq = this._$Eq.forEach((t) => this._$ET(t, this[t]))), this._$EM();
|
|
268
268
|
}
|
|
269
|
-
updated(
|
|
269
|
+
updated(e) {
|
|
270
270
|
}
|
|
271
|
-
firstUpdated(
|
|
271
|
+
firstUpdated(e) {
|
|
272
272
|
}
|
|
273
273
|
};
|
|
274
|
-
|
|
274
|
+
j.elementStyles = [], j.shadowRootOptions = { mode: "open" }, j[G("elementProperties")] = /* @__PURE__ */ new Map(), j[G("finalized")] = /* @__PURE__ */ new Map(), ce == null || ce({ ReactiveElement: j }), (T.reactiveElementVersions ?? (T.reactiveElementVersions = [])).push("2.1.2");
|
|
275
275
|
/**
|
|
276
276
|
* @license
|
|
277
277
|
* Copyright 2017 Google LLC
|
|
278
278
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
279
279
|
*/
|
|
280
|
-
const
|
|
281
|
-
\f\r]`,
|
|
282
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
283
|
-
function
|
|
284
|
-
if (!
|
|
285
|
-
return
|
|
286
|
-
}
|
|
287
|
-
const
|
|
288
|
-
const
|
|
289
|
-
let i,
|
|
290
|
-
for (let
|
|
291
|
-
const
|
|
292
|
-
let
|
|
293
|
-
for (; u <
|
|
294
|
-
const
|
|
295
|
-
|
|
296
|
-
}
|
|
297
|
-
return [
|
|
280
|
+
const Y = globalThis, Ue = (r) => r, ie = Y.trustedTypes, Pe = ie ? ie.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Je = "$lit$", P = `lit$${Math.random().toFixed(9).slice(2)}$`, Qe = "?" + P, wt = `<${Qe}>`, I = document, V = () => I.createComment(""), X = (r) => r === null || typeof r != "object" && typeof r != "function", Ae = Array.isArray, Et = (r) => Ae(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", de = `[
|
|
281
|
+
\f\r]`, W = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Te = /-->/g, Me = />/g, D = RegExp(`>|${de}(?:([^\\s"'>=/]+)(${de}*=${de}*(?:[^
|
|
282
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ke = /'/g, De = /"/g, et = /^(?:script|style|textarea|title)$/i, Ct = (r) => (e, ...t) => ({ _$litType$: r, strings: e, values: t }), pe = Ct(1), M = Symbol.for("lit-noChange"), $ = Symbol.for("lit-nothing"), Le = /* @__PURE__ */ new WeakMap(), L = I.createTreeWalker(I, 129);
|
|
283
|
+
function tt(r, e) {
|
|
284
|
+
if (!Ae(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
285
|
+
return Pe !== void 0 ? Pe.createHTML(e) : e;
|
|
286
|
+
}
|
|
287
|
+
const xt = (r, e) => {
|
|
288
|
+
const t = r.length - 1, s = [];
|
|
289
|
+
let i, n = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", o = W;
|
|
290
|
+
for (let h = 0; h < t; h++) {
|
|
291
|
+
const a = r[h];
|
|
292
|
+
let d, l, c = -1, u = 0;
|
|
293
|
+
for (; u < a.length && (o.lastIndex = u, l = o.exec(a), l !== null); ) u = o.lastIndex, o === W ? l[1] === "!--" ? o = Te : l[1] !== void 0 ? o = Me : l[2] !== void 0 ? (et.test(l[2]) && (i = RegExp("</" + l[2], "g")), o = D) : l[3] !== void 0 && (o = D) : o === D ? l[0] === ">" ? (o = i ?? W, c = -1) : l[1] === void 0 ? c = -2 : (c = o.lastIndex - l[2].length, d = l[1], o = l[3] === void 0 ? D : l[3] === '"' ? De : ke) : o === De || o === ke ? o = D : o === Te || o === Me ? o = W : (o = D, i = void 0);
|
|
294
|
+
const p = o === D && r[h + 1].startsWith("/>") ? " " : "";
|
|
295
|
+
n += o === W ? a + wt : c >= 0 ? (s.push(d), a.slice(0, c) + Je + a.slice(c) + P + p) : a + P + (c === -2 ? h : p);
|
|
296
|
+
}
|
|
297
|
+
return [tt(r, n + (r[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), s];
|
|
298
298
|
};
|
|
299
|
-
class
|
|
300
|
-
constructor({ strings:
|
|
299
|
+
class Z {
|
|
300
|
+
constructor({ strings: e, _$litType$: t }, s) {
|
|
301
301
|
let i;
|
|
302
302
|
this.parts = [];
|
|
303
|
-
let
|
|
304
|
-
const
|
|
305
|
-
if (this.el =
|
|
306
|
-
const
|
|
307
|
-
|
|
303
|
+
let n = 0, o = 0;
|
|
304
|
+
const h = e.length - 1, a = this.parts, [d, l] = xt(e, t);
|
|
305
|
+
if (this.el = Z.createElement(d, s), L.currentNode = this.el.content, t === 2 || t === 3) {
|
|
306
|
+
const c = this.el.content.firstChild;
|
|
307
|
+
c.replaceWith(...c.childNodes);
|
|
308
308
|
}
|
|
309
|
-
for (; (i =
|
|
309
|
+
for (; (i = L.nextNode()) !== null && a.length < h; ) {
|
|
310
310
|
if (i.nodeType === 1) {
|
|
311
|
-
if (i.hasAttributes()) for (const
|
|
312
|
-
const u =
|
|
313
|
-
|
|
314
|
-
} else
|
|
315
|
-
if (
|
|
316
|
-
const
|
|
311
|
+
if (i.hasAttributes()) for (const c of i.getAttributeNames()) if (c.endsWith(Je)) {
|
|
312
|
+
const u = l[o++], p = i.getAttribute(c).split(P), f = /([.?@])?(.*)/.exec(u);
|
|
313
|
+
a.push({ type: 1, index: n, name: f[2], strings: p, ctor: f[1] === "." ? St : f[1] === "?" ? Rt : f[1] === "@" ? Nt : oe }), i.removeAttribute(c);
|
|
314
|
+
} else c.startsWith(P) && (a.push({ type: 6, index: n }), i.removeAttribute(c));
|
|
315
|
+
if (et.test(i.tagName)) {
|
|
316
|
+
const c = i.textContent.split(P), u = c.length - 1;
|
|
317
317
|
if (u > 0) {
|
|
318
|
-
i.textContent =
|
|
319
|
-
for (let
|
|
320
|
-
i.append(
|
|
318
|
+
i.textContent = ie ? ie.emptyScript : "";
|
|
319
|
+
for (let p = 0; p < u; p++) i.append(c[p], V()), L.nextNode(), a.push({ type: 2, index: ++n });
|
|
320
|
+
i.append(c[u], V());
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
|
-
} else if (i.nodeType === 8) if (i.data ===
|
|
323
|
+
} else if (i.nodeType === 8) if (i.data === Qe) a.push({ type: 2, index: n });
|
|
324
324
|
else {
|
|
325
|
-
let
|
|
326
|
-
for (; (
|
|
325
|
+
let c = -1;
|
|
326
|
+
for (; (c = i.data.indexOf(P, c + 1)) !== -1; ) a.push({ type: 7, index: n }), c += P.length - 1;
|
|
327
327
|
}
|
|
328
|
-
|
|
328
|
+
n++;
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
|
-
static createElement(
|
|
332
|
-
const s =
|
|
333
|
-
return s.innerHTML =
|
|
331
|
+
static createElement(e, t) {
|
|
332
|
+
const s = I.createElement("template");
|
|
333
|
+
return s.innerHTML = e, s;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
function
|
|
337
|
-
var
|
|
338
|
-
if (
|
|
339
|
-
let i = s !== void 0 ? (
|
|
340
|
-
const
|
|
341
|
-
return (i == null ? void 0 : i.constructor) !==
|
|
336
|
+
function B(r, e, t = r, s) {
|
|
337
|
+
var o, h;
|
|
338
|
+
if (e === M) return e;
|
|
339
|
+
let i = s !== void 0 ? (o = t._$Co) == null ? void 0 : o[s] : t._$Cl;
|
|
340
|
+
const n = X(e) ? void 0 : e._$litDirective$;
|
|
341
|
+
return (i == null ? void 0 : i.constructor) !== n && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, t, s)), s !== void 0 ? (t._$Co ?? (t._$Co = []))[s] = i : t._$Cl = i), i !== void 0 && (e = B(r, i._$AS(r, e.values), i, s)), e;
|
|
342
342
|
}
|
|
343
|
-
class
|
|
344
|
-
constructor(
|
|
345
|
-
this._$AV = [], this._$AN = void 0, this._$AD =
|
|
343
|
+
class Ot {
|
|
344
|
+
constructor(e, t) {
|
|
345
|
+
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
346
346
|
}
|
|
347
347
|
get parentNode() {
|
|
348
348
|
return this._$AM.parentNode;
|
|
@@ -350,36 +350,36 @@ class wt {
|
|
|
350
350
|
get _$AU() {
|
|
351
351
|
return this._$AM._$AU;
|
|
352
352
|
}
|
|
353
|
-
u(
|
|
354
|
-
const { el: { content:
|
|
355
|
-
|
|
356
|
-
let
|
|
357
|
-
for (;
|
|
358
|
-
if (
|
|
359
|
-
let
|
|
360
|
-
|
|
353
|
+
u(e) {
|
|
354
|
+
const { el: { content: t }, parts: s } = this._$AD, i = ((e == null ? void 0 : e.creationScope) ?? I).importNode(t, !0);
|
|
355
|
+
L.currentNode = i;
|
|
356
|
+
let n = L.nextNode(), o = 0, h = 0, a = s[0];
|
|
357
|
+
for (; a !== void 0; ) {
|
|
358
|
+
if (o === a.index) {
|
|
359
|
+
let d;
|
|
360
|
+
a.type === 2 ? d = new J(n, n.nextSibling, this, e) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, e) : a.type === 6 && (d = new Ut(n, this, e)), this._$AV.push(d), a = s[++h];
|
|
361
361
|
}
|
|
362
|
-
|
|
362
|
+
o !== (a == null ? void 0 : a.index) && (n = L.nextNode(), o++);
|
|
363
363
|
}
|
|
364
|
-
return
|
|
364
|
+
return L.currentNode = I, i;
|
|
365
365
|
}
|
|
366
|
-
p(
|
|
367
|
-
let
|
|
368
|
-
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(
|
|
366
|
+
p(e) {
|
|
367
|
+
let t = 0;
|
|
368
|
+
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(e, s, t), t += s.strings.length - 2) : s._$AI(e[t])), t++;
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
class
|
|
371
|
+
class J {
|
|
372
372
|
get _$AU() {
|
|
373
|
-
var
|
|
374
|
-
return ((
|
|
373
|
+
var e;
|
|
374
|
+
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
|
|
375
375
|
}
|
|
376
|
-
constructor(
|
|
377
|
-
this.type = 2, this._$AH =
|
|
376
|
+
constructor(e, t, s, i) {
|
|
377
|
+
this.type = 2, this._$AH = $, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
|
|
378
378
|
}
|
|
379
379
|
get parentNode() {
|
|
380
|
-
let
|
|
381
|
-
const
|
|
382
|
-
return
|
|
380
|
+
let e = this._$AA.parentNode;
|
|
381
|
+
const t = this._$AM;
|
|
382
|
+
return t !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = t.parentNode), e;
|
|
383
383
|
}
|
|
384
384
|
get startNode() {
|
|
385
385
|
return this._$AA;
|
|
@@ -387,124 +387,124 @@ class T {
|
|
|
387
387
|
get endNode() {
|
|
388
388
|
return this._$AB;
|
|
389
389
|
}
|
|
390
|
-
_$AI(
|
|
391
|
-
|
|
390
|
+
_$AI(e, t = this) {
|
|
391
|
+
e = B(this, e, t), X(e) ? e === $ || e == null || e === "" ? (this._$AH !== $ && this._$AR(), this._$AH = $) : e !== this._$AH && e !== M && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Et(e) ? this.k(e) : this._(e);
|
|
392
392
|
}
|
|
393
|
-
O(
|
|
394
|
-
return this._$AA.parentNode.insertBefore(
|
|
393
|
+
O(e) {
|
|
394
|
+
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
395
395
|
}
|
|
396
|
-
T(
|
|
397
|
-
this._$AH !==
|
|
396
|
+
T(e) {
|
|
397
|
+
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
398
398
|
}
|
|
399
|
-
_(
|
|
400
|
-
this._$AH !==
|
|
399
|
+
_(e) {
|
|
400
|
+
this._$AH !== $ && X(this._$AH) ? this._$AA.nextSibling.data = e : this.T(I.createTextNode(e)), this._$AH = e;
|
|
401
401
|
}
|
|
402
|
-
$(
|
|
403
|
-
var
|
|
404
|
-
const { values:
|
|
405
|
-
if (((
|
|
402
|
+
$(e) {
|
|
403
|
+
var n;
|
|
404
|
+
const { values: t, _$litType$: s } = e, i = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = Z.createElement(tt(s.h, s.h[0]), this.options)), s);
|
|
405
|
+
if (((n = this._$AH) == null ? void 0 : n._$AD) === i) this._$AH.p(t);
|
|
406
406
|
else {
|
|
407
|
-
const
|
|
408
|
-
|
|
407
|
+
const o = new Ot(i, this), h = o.u(this.options);
|
|
408
|
+
o.p(t), this.T(h), this._$AH = o;
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
_$AC(
|
|
412
|
-
let
|
|
413
|
-
return
|
|
411
|
+
_$AC(e) {
|
|
412
|
+
let t = Le.get(e.strings);
|
|
413
|
+
return t === void 0 && Le.set(e.strings, t = new Z(e)), t;
|
|
414
414
|
}
|
|
415
|
-
k(
|
|
416
|
-
|
|
417
|
-
const
|
|
415
|
+
k(e) {
|
|
416
|
+
Ae(this._$AH) || (this._$AH = [], this._$AR());
|
|
417
|
+
const t = this._$AH;
|
|
418
418
|
let s, i = 0;
|
|
419
|
-
for (const
|
|
420
|
-
i <
|
|
419
|
+
for (const n of e) i === t.length ? t.push(s = new J(this.O(V()), this.O(V()), this, this.options)) : s = t[i], s._$AI(n), i++;
|
|
420
|
+
i < t.length && (this._$AR(s && s._$AB.nextSibling, i), t.length = i);
|
|
421
421
|
}
|
|
422
|
-
_$AR(
|
|
422
|
+
_$AR(e = this._$AA.nextSibling, t) {
|
|
423
423
|
var s;
|
|
424
|
-
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0,
|
|
425
|
-
const i =
|
|
426
|
-
|
|
424
|
+
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, t); e !== this._$AB; ) {
|
|
425
|
+
const i = Ue(e).nextSibling;
|
|
426
|
+
Ue(e).remove(), e = i;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
setConnected(
|
|
430
|
-
var
|
|
431
|
-
this._$AM === void 0 && (this._$Cv =
|
|
429
|
+
setConnected(e) {
|
|
430
|
+
var t;
|
|
431
|
+
this._$AM === void 0 && (this._$Cv = e, (t = this._$AP) == null || t.call(this, e));
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
class
|
|
434
|
+
class oe {
|
|
435
435
|
get tagName() {
|
|
436
436
|
return this.element.tagName;
|
|
437
437
|
}
|
|
438
438
|
get _$AU() {
|
|
439
439
|
return this._$AM._$AU;
|
|
440
440
|
}
|
|
441
|
-
constructor(
|
|
442
|
-
this.type = 1, this._$AH =
|
|
441
|
+
constructor(e, t, s, i, n) {
|
|
442
|
+
this.type = 1, this._$AH = $, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = $;
|
|
443
443
|
}
|
|
444
|
-
_$AI(
|
|
445
|
-
const
|
|
446
|
-
let
|
|
447
|
-
if (
|
|
444
|
+
_$AI(e, t = this, s, i) {
|
|
445
|
+
const n = this.strings;
|
|
446
|
+
let o = !1;
|
|
447
|
+
if (n === void 0) e = B(this, e, t, 0), o = !X(e) || e !== this._$AH && e !== M, o && (this._$AH = e);
|
|
448
448
|
else {
|
|
449
|
-
const
|
|
450
|
-
let
|
|
451
|
-
for (
|
|
449
|
+
const h = e;
|
|
450
|
+
let a, d;
|
|
451
|
+
for (e = n[0], a = 0; a < n.length - 1; a++) d = B(this, h[s + a], t, a), d === M && (d = this._$AH[a]), o || (o = !X(d) || d !== this._$AH[a]), d === $ ? e = $ : e !== $ && (e += (d ?? "") + n[a + 1]), this._$AH[a] = d;
|
|
452
452
|
}
|
|
453
|
-
|
|
453
|
+
o && !i && this.j(e);
|
|
454
454
|
}
|
|
455
|
-
j(
|
|
456
|
-
|
|
455
|
+
j(e) {
|
|
456
|
+
e === $ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
-
class
|
|
459
|
+
class St extends oe {
|
|
460
460
|
constructor() {
|
|
461
461
|
super(...arguments), this.type = 3;
|
|
462
462
|
}
|
|
463
|
-
j(
|
|
464
|
-
this.element[this.name] =
|
|
463
|
+
j(e) {
|
|
464
|
+
this.element[this.name] = e === $ ? void 0 : e;
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
|
-
class
|
|
467
|
+
class Rt extends oe {
|
|
468
468
|
constructor() {
|
|
469
469
|
super(...arguments), this.type = 4;
|
|
470
470
|
}
|
|
471
|
-
j(
|
|
472
|
-
this.element.toggleAttribute(this.name, !!
|
|
471
|
+
j(e) {
|
|
472
|
+
this.element.toggleAttribute(this.name, !!e && e !== $);
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
|
-
class
|
|
476
|
-
constructor(
|
|
477
|
-
super(
|
|
475
|
+
class Nt extends oe {
|
|
476
|
+
constructor(e, t, s, i, n) {
|
|
477
|
+
super(e, t, s, i, n), this.type = 5;
|
|
478
478
|
}
|
|
479
|
-
_$AI(
|
|
480
|
-
if ((
|
|
481
|
-
const s = this._$AH, i =
|
|
482
|
-
i && this.element.removeEventListener(this.name, this, s),
|
|
479
|
+
_$AI(e, t = this) {
|
|
480
|
+
if ((e = B(this, e, t, 0) ?? $) === M) return;
|
|
481
|
+
const s = this._$AH, i = e === $ && s !== $ || e.capture !== s.capture || e.once !== s.once || e.passive !== s.passive, n = e !== $ && (s === $ || i);
|
|
482
|
+
i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
483
483
|
}
|
|
484
|
-
handleEvent(
|
|
485
|
-
var
|
|
486
|
-
typeof this._$AH == "function" ? this._$AH.call(((
|
|
484
|
+
handleEvent(e) {
|
|
485
|
+
var t;
|
|
486
|
+
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
class
|
|
490
|
-
constructor(
|
|
491
|
-
this.element =
|
|
489
|
+
class Ut {
|
|
490
|
+
constructor(e, t, s) {
|
|
491
|
+
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = s;
|
|
492
492
|
}
|
|
493
493
|
get _$AU() {
|
|
494
494
|
return this._$AM._$AU;
|
|
495
495
|
}
|
|
496
|
-
_$AI(
|
|
497
|
-
|
|
496
|
+
_$AI(e) {
|
|
497
|
+
B(this, e);
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
const
|
|
503
|
-
const s = (
|
|
500
|
+
const ue = Y.litHtmlPolyfillSupport;
|
|
501
|
+
ue == null || ue(Z, J), (Y.litHtmlVersions ?? (Y.litHtmlVersions = [])).push("3.3.2");
|
|
502
|
+
const Pt = (r, e, t) => {
|
|
503
|
+
const s = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
504
504
|
let i = s._$litPart$;
|
|
505
505
|
if (i === void 0) {
|
|
506
|
-
const
|
|
507
|
-
s._$litPart$ = i = new
|
|
506
|
+
const n = (t == null ? void 0 : t.renderBefore) ?? null;
|
|
507
|
+
s._$litPart$ = i = new J(e.insertBefore(V(), n), n, void 0, t ?? {});
|
|
508
508
|
}
|
|
509
509
|
return i._$AI(r), i;
|
|
510
510
|
};
|
|
@@ -513,178 +513,671 @@ const Ut = (r, t, e) => {
|
|
|
513
513
|
* Copyright 2017 Google LLC
|
|
514
514
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
515
515
|
*/
|
|
516
|
-
const
|
|
517
|
-
class
|
|
516
|
+
const H = globalThis;
|
|
517
|
+
let q = class extends j {
|
|
518
518
|
constructor() {
|
|
519
519
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
520
520
|
}
|
|
521
521
|
createRenderRoot() {
|
|
522
|
-
var
|
|
523
|
-
const
|
|
524
|
-
return (
|
|
522
|
+
var t;
|
|
523
|
+
const e = super.createRenderRoot();
|
|
524
|
+
return (t = this.renderOptions).renderBefore ?? (t.renderBefore = e.firstChild), e;
|
|
525
525
|
}
|
|
526
|
-
update(
|
|
527
|
-
const
|
|
528
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(
|
|
526
|
+
update(e) {
|
|
527
|
+
const t = this.render();
|
|
528
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Pt(t, this.renderRoot, this.renderOptions);
|
|
529
529
|
}
|
|
530
530
|
connectedCallback() {
|
|
531
|
-
var
|
|
532
|
-
super.connectedCallback(), (
|
|
531
|
+
var e;
|
|
532
|
+
super.connectedCallback(), (e = this._$Do) == null || e.setConnected(!0);
|
|
533
533
|
}
|
|
534
534
|
disconnectedCallback() {
|
|
535
|
-
var
|
|
536
|
-
super.disconnectedCallback(), (
|
|
535
|
+
var e;
|
|
536
|
+
super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
|
|
537
537
|
}
|
|
538
538
|
render() {
|
|
539
|
-
return
|
|
539
|
+
return M;
|
|
540
540
|
}
|
|
541
|
-
}
|
|
542
|
-
var
|
|
543
|
-
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
(
|
|
541
|
+
};
|
|
542
|
+
var Ve;
|
|
543
|
+
q._$litElement$ = !0, q.finalized = !0, (Ve = H.litElementHydrateSupport) == null || Ve.call(H, { LitElement: q });
|
|
544
|
+
const fe = H.litElementPolyfillSupport;
|
|
545
|
+
fe == null || fe({ LitElement: q });
|
|
546
|
+
(H.litElementVersions ?? (H.litElementVersions = [])).push("4.2.2");
|
|
547
547
|
/**
|
|
548
548
|
* @license
|
|
549
549
|
* Copyright 2017 Google LLC
|
|
550
550
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
551
551
|
*/
|
|
552
|
-
const
|
|
553
|
-
|
|
554
|
-
customElements.define(r,
|
|
555
|
-
}) : customElements.define(r,
|
|
552
|
+
const Tt = (r) => (e, t) => {
|
|
553
|
+
t !== void 0 ? t.addInitializer(() => {
|
|
554
|
+
customElements.define(r, e);
|
|
555
|
+
}) : customElements.define(r, e);
|
|
556
556
|
};
|
|
557
557
|
/**
|
|
558
558
|
* @license
|
|
559
559
|
* Copyright 2017 Google LLC
|
|
560
560
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
561
561
|
*/
|
|
562
|
-
const Mt = { attribute: !0, type: String, converter:
|
|
563
|
-
const { kind: s, metadata: i } =
|
|
564
|
-
let
|
|
565
|
-
if (
|
|
566
|
-
const { name:
|
|
567
|
-
return { set(
|
|
568
|
-
const
|
|
569
|
-
|
|
570
|
-
}, init(
|
|
571
|
-
return
|
|
562
|
+
const Mt = { attribute: !0, type: String, converter: se, reflect: !1, hasChanged: be }, kt = (r = Mt, e, t) => {
|
|
563
|
+
const { kind: s, metadata: i } = t;
|
|
564
|
+
let n = globalThis.litPropertyMetadata.get(i);
|
|
565
|
+
if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), s === "setter" && ((r = Object.create(r)).wrapped = !0), n.set(t.name, r), s === "accessor") {
|
|
566
|
+
const { name: o } = t;
|
|
567
|
+
return { set(h) {
|
|
568
|
+
const a = e.get.call(this);
|
|
569
|
+
e.set.call(this, h), this.requestUpdate(o, a, r, !0, h);
|
|
570
|
+
}, init(h) {
|
|
571
|
+
return h !== void 0 && this.C(o, void 0, r, h), h;
|
|
572
572
|
} };
|
|
573
573
|
}
|
|
574
574
|
if (s === "setter") {
|
|
575
|
-
const { name:
|
|
576
|
-
return function(
|
|
577
|
-
const
|
|
578
|
-
|
|
575
|
+
const { name: o } = t;
|
|
576
|
+
return function(h) {
|
|
577
|
+
const a = this[o];
|
|
578
|
+
e.call(this, h), this.requestUpdate(o, a, r, !0, h);
|
|
579
579
|
};
|
|
580
580
|
}
|
|
581
581
|
throw Error("Unsupported decorator location: " + s);
|
|
582
582
|
};
|
|
583
|
-
function
|
|
584
|
-
return (
|
|
585
|
-
const
|
|
586
|
-
return i.constructor.createProperty(
|
|
587
|
-
})(r,
|
|
583
|
+
function F(r) {
|
|
584
|
+
return (e, t) => typeof t == "object" ? kt(r, e, t) : ((s, i, n) => {
|
|
585
|
+
const o = i.hasOwnProperty(n);
|
|
586
|
+
return i.constructor.createProperty(n, s), o ? Object.getOwnPropertyDescriptor(i, n) : void 0;
|
|
587
|
+
})(r, e, t);
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* @license
|
|
591
|
+
* Copyright 2017 Google LLC
|
|
592
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
593
|
+
*/
|
|
594
|
+
function we(r) {
|
|
595
|
+
return F({ ...r, state: !0, attribute: !1 });
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* @license
|
|
599
|
+
* Copyright 2017 Google LLC
|
|
600
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
601
|
+
*/
|
|
602
|
+
const Dt = (r, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(r, e, t), t);
|
|
603
|
+
/**
|
|
604
|
+
* @license
|
|
605
|
+
* Copyright 2017 Google LLC
|
|
606
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
607
|
+
*/
|
|
608
|
+
function rt(r, e) {
|
|
609
|
+
return (t, s, i) => {
|
|
610
|
+
const n = (o) => {
|
|
611
|
+
var h;
|
|
612
|
+
return ((h = o.renderRoot) == null ? void 0 : h.querySelector(r)) ?? null;
|
|
613
|
+
};
|
|
614
|
+
return Dt(t, s, { get() {
|
|
615
|
+
return n(this);
|
|
616
|
+
} });
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* @license
|
|
621
|
+
* Copyright 2017 Google LLC
|
|
622
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
623
|
+
*/
|
|
624
|
+
const st = { ATTRIBUTE: 1, CHILD: 2 }, it = (r) => (...e) => ({ _$litDirective$: r, values: e });
|
|
625
|
+
class nt {
|
|
626
|
+
constructor(e) {
|
|
627
|
+
}
|
|
628
|
+
get _$AU() {
|
|
629
|
+
return this._$AM._$AU;
|
|
630
|
+
}
|
|
631
|
+
_$AT(e, t, s) {
|
|
632
|
+
this._$Ct = e, this._$AM = t, this._$Ci = s;
|
|
633
|
+
}
|
|
634
|
+
_$AS(e, t) {
|
|
635
|
+
return this.update(e, t);
|
|
636
|
+
}
|
|
637
|
+
update(e, t) {
|
|
638
|
+
return this.render(...t);
|
|
639
|
+
}
|
|
588
640
|
}
|
|
589
641
|
/**
|
|
590
642
|
* @license
|
|
591
643
|
* Copyright 2017 Google LLC
|
|
592
644
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
593
645
|
*/
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
646
|
+
let $e = class extends nt {
|
|
647
|
+
constructor(e) {
|
|
648
|
+
if (super(e), this.it = $, e.type !== st.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
649
|
+
}
|
|
650
|
+
render(e) {
|
|
651
|
+
if (e === $ || e == null) return this._t = void 0, this.it = e;
|
|
652
|
+
if (e === M) return e;
|
|
653
|
+
if (typeof e != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
654
|
+
if (e === this.it) return this._t;
|
|
655
|
+
this.it = e;
|
|
656
|
+
const t = [e];
|
|
657
|
+
return t.raw = t, this._t = { _$litType$: this.constructor.resultType, strings: t, values: [] };
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
$e.directiveName = "unsafeHTML", $e.resultType = 1;
|
|
661
|
+
const Lt = it($e);
|
|
662
|
+
/**
|
|
663
|
+
* @license
|
|
664
|
+
* Copyright 2018 Google LLC
|
|
665
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
666
|
+
*/
|
|
667
|
+
const Ht = it(class extends nt {
|
|
668
|
+
constructor(r) {
|
|
669
|
+
var e;
|
|
670
|
+
if (super(r), r.type !== st.ATTRIBUTE || r.name !== "class" || ((e = r.strings) == null ? void 0 : e.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
671
|
+
}
|
|
672
|
+
render(r) {
|
|
673
|
+
return " " + Object.keys(r).filter((e) => r[e]).join(" ") + " ";
|
|
674
|
+
}
|
|
675
|
+
update(r, [e]) {
|
|
676
|
+
var s, i;
|
|
677
|
+
if (this.st === void 0) {
|
|
678
|
+
this.st = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.nt = new Set(r.strings.join(" ").split(/\s/).filter((n) => n !== "")));
|
|
679
|
+
for (const n in e) e[n] && !((s = this.nt) != null && s.has(n)) && this.st.add(n);
|
|
680
|
+
return this.render(e);
|
|
681
|
+
}
|
|
682
|
+
const t = r.element.classList;
|
|
683
|
+
for (const n of this.st) n in e || (t.remove(n), this.st.delete(n));
|
|
684
|
+
for (const n in e) {
|
|
685
|
+
const o = !!e[n];
|
|
686
|
+
o === this.st.has(n) || (i = this.nt) != null && i.has(n) || (o ? (t.add(n), this.st.add(n)) : (t.remove(n), this.st.delete(n)));
|
|
687
|
+
}
|
|
688
|
+
return M;
|
|
689
|
+
}
|
|
690
|
+
}), It = ":host{display:block;width:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.controls{display:flex;gap:12px;align-items:center;margin-bottom:8px;flex-wrap:wrap}.controls label{font-size:12px;font-weight:600;color:#374151}.btn-toggle{font-size:12px;padding:3px 10px;border-radius:4px;cursor:pointer;border:1px solid #76b900;background:#76b900;color:#fff;font-weight:600}.btn-toggle.off{background:#fff;color:#6b7280;border-color:#d1d5db}select{font-size:12px;padding:3px 8px;border:1px solid #d1d5db;border-radius:4px;cursor:pointer;color:#374151;background:#fff}.editor-wrapper{position:relative;background:#fff;border:1px solid #d1d5db;border-radius:6px;transition:border-color .15s,box-shadow .15s}.editor-wrapper:focus-within{border-color:#6366f1;box-shadow:0 0 0 3px #6366f11f}.highlight-layer,textarea{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:14px;line-height:1.5;padding:8px 12px;width:100%;box-sizing:border-box;white-space:pre-wrap;word-break:break-word;overflow-wrap:break-word}.highlight-layer{position:absolute;top:0;left:0;height:100%;color:transparent;pointer-events:none;overflow:hidden;border:none;background:transparent;margin:0}.highlight-layer mark{background:transparent;color:transparent;text-decoration:underline wavy red}textarea{position:relative;display:block;min-height:80px;outline:none;background:transparent;color:#111827;caret-color:#111827;border:none;border-radius:6px;resize:vertical;margin:0}textarea::placeholder{color:#9ca3af}.loading-hint{font-size:11px;color:#9ca3af;margin-top:4px}";
|
|
691
|
+
function zt(r) {
|
|
692
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
693
|
+
}
|
|
694
|
+
/*!
|
|
695
|
+
* Determine if an object is a Buffer
|
|
696
|
+
*
|
|
697
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
698
|
+
* @license MIT
|
|
699
|
+
*/
|
|
700
|
+
var jt = function(e) {
|
|
701
|
+
return e != null && e.constructor != null && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
|
|
702
|
+
}, ot = Ft, Bt = [];
|
|
703
|
+
function Ft(r, e) {
|
|
704
|
+
var t = 0, s;
|
|
705
|
+
if (!e) return Bt;
|
|
706
|
+
if (r.FLAG === "long") {
|
|
707
|
+
for (s = new Array(Math.ceil(e.length / 2)); t < e.length; )
|
|
708
|
+
s[t / 2] = e.slice(t, t + 2), t += 2;
|
|
709
|
+
return s;
|
|
710
|
+
}
|
|
711
|
+
return e.split(r.FLAG === "num" ? "," : "");
|
|
712
|
+
}
|
|
713
|
+
var Wt = ot, Kt = qt, Gt = [].push, ee = "etaoinshrdlcumwfgypbvkjxqz".split(""), K = /\s+/, Yt = [
|
|
714
|
+
"qwertzuop",
|
|
715
|
+
"yxcvbnm",
|
|
716
|
+
"qaw",
|
|
717
|
+
"say",
|
|
718
|
+
"wse",
|
|
719
|
+
"dsx",
|
|
720
|
+
"sy",
|
|
721
|
+
"edr",
|
|
722
|
+
"fdc",
|
|
723
|
+
"dx",
|
|
724
|
+
"rft",
|
|
725
|
+
"gfv",
|
|
726
|
+
"fc",
|
|
727
|
+
"tgz",
|
|
728
|
+
"hgb",
|
|
729
|
+
"gv",
|
|
730
|
+
"zhu",
|
|
731
|
+
"jhn",
|
|
732
|
+
"hb",
|
|
733
|
+
"uji",
|
|
734
|
+
"kjm",
|
|
735
|
+
"jn",
|
|
736
|
+
"iko",
|
|
737
|
+
"lkm"
|
|
738
|
+
];
|
|
739
|
+
function qt(r) {
|
|
740
|
+
var e = /* @__PURE__ */ Object.create(null), t = /* @__PURE__ */ Object.create(null), s = /* @__PURE__ */ Object.create(null), i = [], n = { in: [], out: [] }, o = [], h = r.toString("utf8"), a = [], d = 0, l = h.indexOf(`
|
|
741
|
+
`), c, u, p, f, m, w, b, A, S, v, C, g, x;
|
|
742
|
+
for (s.KEY = []; l > -1; )
|
|
743
|
+
y(h.slice(d, l)), d = l + 1, l = h.indexOf(`
|
|
744
|
+
`, d);
|
|
745
|
+
for (y(h.slice(d)), l = -1; ++l < a.length; )
|
|
746
|
+
if (u = a[l], c = u.split(K), p = c[0], p === "REP") {
|
|
747
|
+
for (f = l + parseInt(c[1], 10); ++l <= f; )
|
|
748
|
+
c = a[l].split(K), i.push([c[1], c[2]]);
|
|
749
|
+
l--;
|
|
750
|
+
} else if (p === "ICONV" || p === "OCONV") {
|
|
751
|
+
for (f = l + parseInt(c[1], 10), A = n[p === "ICONV" ? "in" : "out"]; ++l <= f; )
|
|
752
|
+
c = a[l].split(K), A.push([new RegExp(c[1], "g"), c[2]]);
|
|
753
|
+
l--;
|
|
754
|
+
} else if (p === "COMPOUNDRULE") {
|
|
755
|
+
for (f = l + parseInt(c[1], 10); ++l <= f; )
|
|
756
|
+
for (v = a[l].split(K)[1], S = -1, o.push(v); ++S < v.length; )
|
|
757
|
+
t[v.charAt(S)] = [];
|
|
758
|
+
l--;
|
|
759
|
+
} else if (p === "PFX" || p === "SFX") {
|
|
760
|
+
for (f = l + parseInt(c[3], 10), v = {
|
|
761
|
+
type: p,
|
|
762
|
+
combineable: c[2] === "Y",
|
|
763
|
+
entries: []
|
|
764
|
+
}, e[c[1]] = v; ++l <= f; ) {
|
|
765
|
+
c = a[l].split(K), m = c[2], w = c[3].split("/"), b = c[4], A = {
|
|
766
|
+
add: "",
|
|
767
|
+
remove: "",
|
|
768
|
+
match: "",
|
|
769
|
+
continuation: Wt(s, w[1])
|
|
770
|
+
}, w && w[0] !== "0" && (A.add = w[0]);
|
|
771
|
+
try {
|
|
772
|
+
m !== "0" && (A.remove = p === "SFX" ? He(m) : m), b && b !== "." && (A.match = p === "SFX" ? He(b) : Vt(b));
|
|
773
|
+
} catch {
|
|
774
|
+
A = null;
|
|
775
|
+
}
|
|
776
|
+
A && v.entries.push(A);
|
|
777
|
+
}
|
|
778
|
+
l--;
|
|
779
|
+
} else if (p === "TRY") {
|
|
780
|
+
for (b = c[1], g = -1, C = []; ++g < b.length; )
|
|
781
|
+
x = b.charAt(g), x.toLowerCase() === x && C.push(x);
|
|
782
|
+
for (g = -1; ++g < ee.length; )
|
|
783
|
+
b.indexOf(ee[g]) < 0 && C.push(ee[g]);
|
|
784
|
+
s[p] = C;
|
|
785
|
+
} else p === "KEY" ? Gt.apply(s[p], c[1].split("|")) : p === "COMPOUNDMIN" ? s[p] = Number(c[1]) : p === "ONLYINCOMPOUND" ? (s[p] = c[1], t[c[1]] = []) : s[p] = c[1];
|
|
786
|
+
return isNaN(s.COMPOUNDMIN) && (s.COMPOUNDMIN = 3), s.KEY.length || (s.KEY = Yt), s.TRY || (s.TRY = ee.concat()), s.KEEPCASE || (s.KEEPCASE = !1), {
|
|
787
|
+
compoundRuleCodes: t,
|
|
788
|
+
replacementTable: i,
|
|
789
|
+
conversion: n,
|
|
790
|
+
compoundRules: o,
|
|
791
|
+
rules: e,
|
|
792
|
+
flags: s
|
|
793
|
+
};
|
|
794
|
+
function y(_) {
|
|
795
|
+
_ = _.trim(), _ && _.charCodeAt(0) !== 35 && a.push(_);
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
function He(r) {
|
|
799
|
+
return new RegExp(r + "$");
|
|
800
|
+
}
|
|
801
|
+
function Vt(r) {
|
|
802
|
+
return new RegExp("^" + r);
|
|
803
|
+
}
|
|
804
|
+
var at = Xt;
|
|
805
|
+
function Xt(r, e) {
|
|
806
|
+
for (var t = -1; ++t < e.length; )
|
|
807
|
+
r = r.replace(e[t][0], e[t][1]);
|
|
808
|
+
return r;
|
|
809
|
+
}
|
|
810
|
+
var ae = Zt;
|
|
811
|
+
function Zt(r, e, t) {
|
|
812
|
+
return t && e in r && t.indexOf(r[e]) > -1;
|
|
813
|
+
}
|
|
814
|
+
var Jt = ae, Qt = er;
|
|
815
|
+
function er(r, e) {
|
|
816
|
+
var t = -1;
|
|
817
|
+
if (r.data[e])
|
|
818
|
+
return !Jt(r.flags, "ONLYINCOMPOUND", r.data[e]);
|
|
819
|
+
if (e.length >= r.flags.COMPOUNDMIN) {
|
|
820
|
+
for (; ++t < r.compoundRules.length; )
|
|
821
|
+
if (r.compoundRules[t].test(e))
|
|
822
|
+
return !0;
|
|
823
|
+
}
|
|
824
|
+
return !1;
|
|
825
|
+
}
|
|
826
|
+
var tr = at, ge = Qt, _e = ae, Ee = rr;
|
|
827
|
+
function rr(r, e, t) {
|
|
828
|
+
var s = e.trim(), i;
|
|
829
|
+
if (!s)
|
|
830
|
+
return null;
|
|
831
|
+
if (s = tr(s, r.conversion.in), ge(r, s))
|
|
832
|
+
return !t && _e(r.flags, "FORBIDDENWORD", r.data[s]) ? null : s;
|
|
833
|
+
if (s.toUpperCase() === s) {
|
|
834
|
+
if (i = s.charAt(0) + s.slice(1).toLowerCase(), Ie(r.flags, r.data[i], t))
|
|
835
|
+
return null;
|
|
836
|
+
if (ge(r, i))
|
|
837
|
+
return i;
|
|
838
|
+
}
|
|
839
|
+
if (i = s.toLowerCase(), i !== s) {
|
|
840
|
+
if (Ie(r.flags, r.data[i], t))
|
|
841
|
+
return null;
|
|
842
|
+
if (ge(r, i))
|
|
843
|
+
return i;
|
|
844
|
+
}
|
|
845
|
+
return null;
|
|
846
|
+
}
|
|
847
|
+
function Ie(r, e, t) {
|
|
848
|
+
return _e(r, "KEEPCASE", e) || t || _e(r, "FORBIDDENWORD", e);
|
|
849
|
+
}
|
|
850
|
+
var sr = Ee, ir = nr;
|
|
851
|
+
function nr(r) {
|
|
852
|
+
return !!sr(this, r);
|
|
853
|
+
}
|
|
854
|
+
var or = ar;
|
|
855
|
+
function ar(r) {
|
|
856
|
+
var e = ze(r.charAt(0)), t = r.slice(1);
|
|
857
|
+
return !t || (t = ze(t), e === t) ? e : e === "u" && t === "l" ? "s" : null;
|
|
858
|
+
}
|
|
859
|
+
function ze(r) {
|
|
860
|
+
return r === r.toLowerCase() ? "l" : r === r.toUpperCase() ? "u" : null;
|
|
861
|
+
}
|
|
862
|
+
var re = or, je = at, lr = ae, hr = Ee, cr = pr, dr = [].push;
|
|
863
|
+
function pr(r) {
|
|
864
|
+
var e = this, t = {}, s = [], i = {}, n, o, h = [], a, d, l, c, u, p, f, m, w, b, A, S, v, C, g, x, y, _, U, z, le, he, Q;
|
|
865
|
+
if (r = je(r.trim(), e.conversion.in), !r || e.correct(r))
|
|
866
|
+
return [];
|
|
867
|
+
for (Q = re(r), d = -1; ++d < e.replacementTable.length; )
|
|
868
|
+
for (o = e.replacementTable[d], l = r.indexOf(o[0]); l > -1; )
|
|
869
|
+
h.push(r.replace(o[0], o[1])), l = r.indexOf(o[0], l + 1);
|
|
870
|
+
for (d = -1; ++d < r.length; )
|
|
871
|
+
for (m = r.charAt(d), b = r.slice(0, d), A = r.slice(d + 1), v = m.toLowerCase(), S = v !== m, t = {}, l = -1; ++l < e.flags.KEY.length; )
|
|
872
|
+
if (w = e.flags.KEY[l], c = w.indexOf(v), !(c < 0)) {
|
|
873
|
+
for (p = -1; ++p < w.length; )
|
|
874
|
+
if (p !== c) {
|
|
875
|
+
if (f = w.charAt(p), t[f])
|
|
876
|
+
continue;
|
|
877
|
+
t[f] = !0, S && (f = f.toUpperCase()), h.push(b + f + A);
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
for (d = -1, y = r.charAt(0), a = [""], _ = 1, U = 0; ++d < r.length; ) {
|
|
881
|
+
for (m = y, y = r.charAt(d + 1), b = r.slice(0, d), o = m === y ? "" : m + m, l = -1, u = a.length; ++l < u; )
|
|
882
|
+
l <= _ && a.push(a[l] + o), a[l] += m;
|
|
883
|
+
++U < 3 && (_ = a.length);
|
|
884
|
+
}
|
|
885
|
+
for (dr.apply(h, a), a = [r], o = r.toLowerCase(), (r === o || Q === null) && a.push(r.charAt(0).toUpperCase() + o.slice(1)), o = r.toUpperCase(), r !== o && a.push(o), n = {
|
|
886
|
+
state: {},
|
|
887
|
+
weighted: i,
|
|
888
|
+
suggestions: s
|
|
889
|
+
}, C = Be(e, n, a, h), g = 0, _ = Math.min(C.length, Math.pow(Math.max(15 - r.length, 3), 3)), z = Math.max(Math.pow(10 - r.length, 3), 1); !s.length && g < _; )
|
|
890
|
+
x = g + z, Be(e, n, C.slice(g, x)), g = x;
|
|
891
|
+
for (s.sort(ct), a = [], le = [], d = -1; ++d < s.length; )
|
|
892
|
+
he = je(s[d], e.conversion.out), o = he.toLowerCase(), le.indexOf(o) < 0 && (a.push(he), le.push(o));
|
|
893
|
+
return a;
|
|
894
|
+
function ct(R, N) {
|
|
895
|
+
return dt(R, N) || pt(R, N) || ut(R, N);
|
|
896
|
+
}
|
|
897
|
+
function dt(R, N) {
|
|
898
|
+
return i[R] === i[N] ? 0 : i[R] > i[N] ? -1 : 1;
|
|
899
|
+
}
|
|
900
|
+
function pt(R, N) {
|
|
901
|
+
var Ce = re(R), xe = re(N);
|
|
902
|
+
return Ce === xe ? 0 : Ce === Q ? -1 : xe === Q ? 1 : void 0;
|
|
903
|
+
}
|
|
904
|
+
function ut(R, N) {
|
|
905
|
+
return R.localeCompare(N);
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
function Be(r, e, t, s) {
|
|
909
|
+
var i = r.flags.TRY, n = r.data, o = r.flags, h = [], a = -1, d, l, c, u, p, f, m, w, b, A, S, v, C;
|
|
910
|
+
if (s)
|
|
911
|
+
for (; ++a < s.length; )
|
|
912
|
+
g(s[a], !0);
|
|
913
|
+
for (a = -1; ++a < t.length; )
|
|
914
|
+
for (d = t[a], l = "", c = "", u = d.charAt(0), p = d, f = d.slice(1), m = u.toLowerCase() !== u, w = re(d), b = -1; ++b <= d.length; )
|
|
915
|
+
for (l += c, A = p, p = f, f = p.slice(1), c = u, u = d.charAt(b + 1), S = m, u && (m = u.toLowerCase() !== u), p && S !== m && (g(l + x(p)), g(
|
|
916
|
+
l + x(u) + x(c) + f
|
|
917
|
+
)), g(l + p), p && g(l + u + c + f), C = -1; ++C < i.length; )
|
|
918
|
+
v = i[C], S && v !== v.toUpperCase() ? (w !== "s" && (g(l + v + A), g(l + v + p)), v = v.toUpperCase(), g(l + v + A), g(l + v + p)) : (g(l + v + A), g(l + v + p));
|
|
919
|
+
return h;
|
|
920
|
+
function g(y, _) {
|
|
921
|
+
var U = e.state[y], z;
|
|
922
|
+
U !== !!U && (h.push(y), z = hr(r, y), U = z && !lr(o, "NOSUGGEST", n[z]), e.state[y] = U, U && (e.weighted[y] = _ ? 10 : 0, e.suggestions.push(y))), U && e.weighted[y]++;
|
|
923
|
+
}
|
|
924
|
+
function x(y) {
|
|
925
|
+
var _ = y.charAt(0);
|
|
926
|
+
return (_.toLowerCase() === _ ? _.toUpperCase() : _.toLowerCase()) + y.slice(1);
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
var ur = Ee, Fe = ae, fr = gr;
|
|
930
|
+
function gr(r) {
|
|
931
|
+
var e = this, t = ur(e, r, !0);
|
|
932
|
+
return {
|
|
933
|
+
correct: e.correct(r),
|
|
934
|
+
forbidden: !!(t && Fe(e.flags, "FORBIDDENWORD", e.data[t])),
|
|
935
|
+
warn: !!(t && Fe(e.flags, "WARN", e.data[t]))
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
var vr = lt;
|
|
939
|
+
function lt(r, e, t, s) {
|
|
940
|
+
for (var i = -1, n, o, h, a, d; ++i < e.entries.length; )
|
|
941
|
+
if (n = e.entries[i], a = n.continuation, d = -1, (!n.match || n.match.test(r)) && (o = n.remove ? r.replace(n.remove, "") : r, o = e.type === "SFX" ? o + n.add : n.add + o, s.push(o), a && a.length))
|
|
942
|
+
for (; ++d < a.length; )
|
|
943
|
+
h = t[a[d]], h && lt(o, h, t, s);
|
|
944
|
+
return s;
|
|
945
|
+
}
|
|
946
|
+
var We = vr, ht = mr, $r = [].push, me = [];
|
|
947
|
+
function _r(r, e, t) {
|
|
948
|
+
var s = r[e];
|
|
949
|
+
e in r ? s === me ? r[e] = t.concat() : $r.apply(s, t) : r[e] = t.concat();
|
|
950
|
+
}
|
|
951
|
+
function mr(r, e, t, s) {
|
|
952
|
+
var i = -1, n, o, h, a, d, l, c;
|
|
953
|
+
for ((!("NEEDAFFIX" in s.flags) || t.indexOf(s.flags.NEEDAFFIX) < 0) && _r(r, e, t); ++i < t.length; )
|
|
954
|
+
if (n = s.rules[t[i]], t[i] in s.compoundRuleCodes && s.compoundRuleCodes[t[i]].push(e), n) {
|
|
955
|
+
for (l = We(e, n, s.rules, []), o = -1; ++o < l.length; )
|
|
956
|
+
if (l[o] in r || (r[l[o]] = me), n.combineable) {
|
|
957
|
+
for (h = i; ++h < t.length; )
|
|
958
|
+
if (d = s.rules[t[h]], d && d.combineable && n.type !== d.type)
|
|
959
|
+
for (c = We(
|
|
960
|
+
l[o],
|
|
961
|
+
d,
|
|
962
|
+
s.rules,
|
|
963
|
+
[]
|
|
964
|
+
), a = -1; ++a < c.length; )
|
|
965
|
+
c[a] in r || (r[c[a]] = me);
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
var yr = ht, br = wr, Ar = [];
|
|
970
|
+
function wr(r, e) {
|
|
971
|
+
var t = this;
|
|
972
|
+
return yr(t.data, r, t.data[e] || Ar, t), t;
|
|
973
|
+
}
|
|
974
|
+
var Er = Cr;
|
|
975
|
+
function Cr(r) {
|
|
976
|
+
var e = this;
|
|
977
|
+
return delete e.data[r], e;
|
|
978
|
+
}
|
|
979
|
+
var xr = Or;
|
|
980
|
+
function Or() {
|
|
981
|
+
return this.flags.WORDCHARS || null;
|
|
982
|
+
}
|
|
983
|
+
var Sr = ot, Rr = ht, Nr = Ur, Ke = /\s/g;
|
|
984
|
+
function Ur(r, e, t) {
|
|
985
|
+
for (var s = r.toString("utf8"), i = s.indexOf(`
|
|
986
|
+
`) + 1, n = s.indexOf(`
|
|
987
|
+
`, i); n > -1; )
|
|
988
|
+
s.charCodeAt(i) !== 9 && Ge(s.slice(i, n), e, t), i = n + 1, n = s.indexOf(`
|
|
989
|
+
`, i);
|
|
990
|
+
Ge(s.slice(i), e, t);
|
|
991
|
+
}
|
|
992
|
+
function Ge(r, e, t) {
|
|
993
|
+
for (var s = r.indexOf("/"), i = r.indexOf("#"), n = "", o, h; s > -1 && r.charCodeAt(s - 1) === 92; )
|
|
994
|
+
r = r.slice(0, s - 1) + r.slice(s), s = r.indexOf("/", s);
|
|
995
|
+
i > -1 ? s > -1 && s < i ? (o = r.slice(0, s), Ke.lastIndex = s + 1, h = Ke.exec(r), n = r.slice(s + 1, h ? h.index : void 0)) : o = r.slice(0, i) : s > -1 ? (o = r.slice(0, s), n = r.slice(s + 1)) : o = r, o = o.trim(), o && Rr(t, o, Sr(e.flags, n.trim()), e);
|
|
996
|
+
}
|
|
997
|
+
var Pr = Nr, Tr = Mr;
|
|
998
|
+
function Mr(r) {
|
|
999
|
+
var e = this, t = -1, s, i, n, o;
|
|
1000
|
+
for (Pr(r, e, e.data); ++t < e.compoundRules.length; ) {
|
|
1001
|
+
for (s = e.compoundRules[t], i = "", o = -1; ++o < s.length; )
|
|
1002
|
+
n = s.charAt(o), i += e.compoundRuleCodes[n].length ? "(?:" + e.compoundRuleCodes[n].join("|") + ")" : n;
|
|
1003
|
+
e.compoundRules[t] = new RegExp(i, "i");
|
|
1004
|
+
}
|
|
1005
|
+
return e;
|
|
1006
|
+
}
|
|
1007
|
+
var kr = Dr;
|
|
1008
|
+
function Dr(r) {
|
|
1009
|
+
var e = this, t = r.toString("utf8").split(`
|
|
1010
|
+
`), s = -1, i, n, o, h;
|
|
1011
|
+
for (e.flags.FORBIDDENWORD === void 0 && (e.flags.FORBIDDENWORD = !1), h = e.flags.FORBIDDENWORD; ++s < t.length; )
|
|
1012
|
+
i = t[s].trim(), i && (i = i.split("/"), o = i[0], n = o.charAt(0) === "*", n && (o = o.slice(1)), e.add(o, i[1]), n && e.data[o].push(h));
|
|
1013
|
+
return e;
|
|
1014
|
+
}
|
|
1015
|
+
var Ye = jt, Lr = Kt, Hr = ne, k = ne.prototype;
|
|
1016
|
+
k.correct = ir;
|
|
1017
|
+
k.suggest = cr;
|
|
1018
|
+
k.spell = fr;
|
|
1019
|
+
k.add = br;
|
|
1020
|
+
k.remove = Er;
|
|
1021
|
+
k.wordCharacters = xr;
|
|
1022
|
+
k.dictionary = Tr;
|
|
1023
|
+
k.personal = kr;
|
|
1024
|
+
function ne(r, e) {
|
|
1025
|
+
var t = -1, s;
|
|
1026
|
+
if (!(this instanceof ne))
|
|
1027
|
+
return new ne(r, e);
|
|
1028
|
+
if (typeof r == "string" || Ye(r) ? (typeof e == "string" || Ye(e)) && (s = [{ dic: e }]) : r && ("length" in r ? (s = r, r = r[0] && r[0].aff) : (r.dic && (s = [r]), r = r.aff)), !r)
|
|
1029
|
+
throw new Error("Missing `aff` in dictionary");
|
|
1030
|
+
if (r = Lr(r), this.data = /* @__PURE__ */ Object.create(null), this.compoundRuleCodes = r.compoundRuleCodes, this.replacementTable = r.replacementTable, this.conversion = r.conversion, this.compoundRules = r.compoundRules, this.rules = r.rules, this.flags = r.flags, s)
|
|
1031
|
+
for (; ++t < s.length; )
|
|
1032
|
+
s[t].dic && this.dictionary(s[t].dic);
|
|
1033
|
+
}
|
|
1034
|
+
const Ir = /* @__PURE__ */ zt(Hr), qe = "https://cdn.jsdelivr.net/npm", zr = {
|
|
1035
|
+
"en-US": "dictionary-en",
|
|
1036
|
+
"en-GB": "dictionary-en-gb",
|
|
1037
|
+
fr: "dictionary-fr",
|
|
1038
|
+
de: "dictionary-de",
|
|
1039
|
+
es: "dictionary-es",
|
|
1040
|
+
ko: "dictionary-ko"
|
|
1041
|
+
}, ve = /* @__PURE__ */ new Map();
|
|
1042
|
+
async function jr(r) {
|
|
1043
|
+
if (ve.has(r)) return ve.get(r);
|
|
1044
|
+
const e = zr[r] ?? "dictionary-en", [t, s] = await Promise.all([
|
|
1045
|
+
fetch(`${qe}/${e}/index.aff`).then((n) => n.text()),
|
|
1046
|
+
fetch(`${qe}/${e}/index.dic`).then((n) => n.text())
|
|
1047
|
+
]), i = Ir({ aff: t, dic: s });
|
|
1048
|
+
return ve.set(r, i), i;
|
|
1049
|
+
}
|
|
1050
|
+
function Br(r, e, t) {
|
|
1051
|
+
const s = r.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1052
|
+
return !e || !t ? s + `
|
|
1053
|
+
` : s.replace(/[a-zA-ZÀ-ÿ\u3131-\uD79D][a-zA-ZÀ-ÿ\u3131-\uD79D'']*/g, (n) => {
|
|
1054
|
+
const o = n.replace(/^'+|'+$/g, "");
|
|
1055
|
+
return !o || e.correct(o) ? n : `<mark>${n}</mark>`;
|
|
1056
|
+
}) + `
|
|
1057
|
+
`;
|
|
1058
|
+
}
|
|
1059
|
+
var Fr = Object.defineProperty, Wr = Object.getOwnPropertyDescriptor, O = (r, e, t, s) => {
|
|
1060
|
+
for (var i = s > 1 ? void 0 : s ? Wr(e, t) : e, n = r.length - 1, o; n >= 0; n--)
|
|
1061
|
+
(o = r[n]) && (i = (s ? o(e, t, i) : o(i)) || i);
|
|
1062
|
+
return s && i && Fr(e, t, i), i;
|
|
602
1063
|
};
|
|
603
|
-
|
|
1064
|
+
const Kr = [
|
|
1065
|
+
{ value: "en-US", label: "English (US)" },
|
|
1066
|
+
{ value: "en-GB", label: "English (UK)" },
|
|
1067
|
+
{ value: "fr", label: "French" },
|
|
1068
|
+
{ value: "de", label: "German" },
|
|
1069
|
+
{ value: "es", label: "Spanish" },
|
|
1070
|
+
{ value: "ko", label: "Korean" }
|
|
1071
|
+
];
|
|
1072
|
+
let E = class extends q {
|
|
604
1073
|
constructor() {
|
|
605
|
-
super(...arguments), this.spellcheck = !0, this.lang = "en-US", this.placeholder = "Type here...", this.value = "", this.rows = 4, this._spellcheckOn = !0, this.
|
|
606
|
-
|
|
607
|
-
{ value: "en-GB", label: "English (UK)" },
|
|
608
|
-
{ value: "fr", label: "French" },
|
|
609
|
-
{ value: "de", label: "German" },
|
|
610
|
-
{ value: "es", label: "Spanish" },
|
|
611
|
-
{ value: "ko", label: "Korean" }
|
|
612
|
-
];
|
|
1074
|
+
super(...arguments), this.spellcheck = !0, this.lang = "en-US", this.placeholder = "Type here...", this.value = "", this.rows = 4, this._spellcheckOn = !0, this._loading = !1, this._highlightHTML = `
|
|
1075
|
+
`, this._checker = null, this._debounceTimer = null;
|
|
613
1076
|
}
|
|
614
1077
|
connectedCallback() {
|
|
615
|
-
super.connectedCallback(), this._spellcheckOn = this.spellcheck;
|
|
1078
|
+
super.connectedCallback(), this._spellcheckOn = this.spellcheck, this._resizeObserver = new ResizeObserver(() => this._syncScroll()), this._loadDict();
|
|
616
1079
|
}
|
|
617
|
-
|
|
618
|
-
|
|
1080
|
+
disconnectedCallback() {
|
|
1081
|
+
super.disconnectedCallback(), this._resizeObserver.disconnect();
|
|
619
1082
|
}
|
|
620
|
-
|
|
621
|
-
this.
|
|
1083
|
+
firstUpdated() {
|
|
1084
|
+
this._resizeObserver.observe(this._textarea);
|
|
1085
|
+
}
|
|
1086
|
+
async _loadDict() {
|
|
1087
|
+
this._loading = !0;
|
|
1088
|
+
try {
|
|
1089
|
+
this._checker = await jr(this.lang), this._updateHighlight();
|
|
1090
|
+
} finally {
|
|
1091
|
+
this._loading = !1;
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
_updateHighlight() {
|
|
1095
|
+
this._highlightHTML = Br(this.value, this._checker, this._spellcheckOn);
|
|
1096
|
+
}
|
|
1097
|
+
_syncScroll() {
|
|
1098
|
+
this._overlay && this._textarea && (this._overlay.scrollTop = this._textarea.scrollTop);
|
|
622
1099
|
}
|
|
623
1100
|
_onInput(r) {
|
|
624
|
-
this.value = r.target.value, this.dispatchEvent(
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
1101
|
+
this.value = r.target.value, this._syncScroll(), this.dispatchEvent(new CustomEvent("sa-change", {
|
|
1102
|
+
detail: { value: this.value },
|
|
1103
|
+
bubbles: !0,
|
|
1104
|
+
composed: !0
|
|
1105
|
+
})), this._debounceTimer && clearTimeout(this._debounceTimer), this._debounceTimer = setTimeout(() => this._updateHighlight(), 400);
|
|
1106
|
+
}
|
|
1107
|
+
_onToggle() {
|
|
1108
|
+
this._spellcheckOn = !this._spellcheckOn, this._updateHighlight();
|
|
1109
|
+
}
|
|
1110
|
+
_onLangChange(r) {
|
|
1111
|
+
this.lang = r.target.value, this._loadDict();
|
|
631
1112
|
}
|
|
632
1113
|
render() {
|
|
633
|
-
return
|
|
1114
|
+
return pe`
|
|
634
1115
|
<div class="controls">
|
|
635
1116
|
<label>Spellcheck:</label>
|
|
636
1117
|
<button
|
|
637
|
-
class=${
|
|
1118
|
+
class=${Ht({ "btn-toggle": !0, off: !this._spellcheckOn })}
|
|
638
1119
|
@click=${this._onToggle}
|
|
639
1120
|
>
|
|
640
|
-
${this._spellcheckOn ? "ON" : "OFF"}
|
|
1121
|
+
${this._loading ? "..." : this._spellcheckOn ? "ON" : "OFF"}
|
|
641
1122
|
</button>
|
|
642
|
-
|
|
643
1123
|
<label>Language:</label>
|
|
644
1124
|
<select @change=${this._onLangChange}>
|
|
645
|
-
${
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
${t}
|
|
649
|
-
</option>
|
|
650
|
-
`
|
|
651
|
-
)}
|
|
1125
|
+
${Kr.map(({ value: r, label: e }) => pe`
|
|
1126
|
+
<option value=${r} ?selected=${r === this.lang}>${e}</option>
|
|
1127
|
+
`)}
|
|
652
1128
|
</select>
|
|
653
1129
|
</div>
|
|
654
1130
|
|
|
655
|
-
<
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
1131
|
+
<div class="editor-wrapper">
|
|
1132
|
+
<div class="highlight-layer">${Lt(this._highlightHTML)}</div>
|
|
1133
|
+
<textarea
|
|
1134
|
+
.value=${this.value}
|
|
1135
|
+
placeholder=${this.placeholder}
|
|
1136
|
+
rows=${this.rows}
|
|
1137
|
+
spellcheck="false"
|
|
1138
|
+
@input=${this._onInput}
|
|
1139
|
+
@scroll=${this._syncScroll}
|
|
1140
|
+
></textarea>
|
|
1141
|
+
</div>
|
|
1142
|
+
|
|
1143
|
+
${this._loading ? pe`<p class="loading-hint">Loading dictionary...</p>` : ""}
|
|
663
1144
|
`;
|
|
664
1145
|
}
|
|
665
1146
|
};
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
],
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
],
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
],
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
],
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
],
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
],
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
],
|
|
1147
|
+
E.styles = Ze(It);
|
|
1148
|
+
O([
|
|
1149
|
+
F({ type: Boolean })
|
|
1150
|
+
], E.prototype, "spellcheck", 2);
|
|
1151
|
+
O([
|
|
1152
|
+
F()
|
|
1153
|
+
], E.prototype, "lang", 2);
|
|
1154
|
+
O([
|
|
1155
|
+
F()
|
|
1156
|
+
], E.prototype, "placeholder", 2);
|
|
1157
|
+
O([
|
|
1158
|
+
F()
|
|
1159
|
+
], E.prototype, "value", 2);
|
|
1160
|
+
O([
|
|
1161
|
+
F({ type: Number })
|
|
1162
|
+
], E.prototype, "rows", 2);
|
|
1163
|
+
O([
|
|
1164
|
+
we()
|
|
1165
|
+
], E.prototype, "_spellcheckOn", 2);
|
|
1166
|
+
O([
|
|
1167
|
+
we()
|
|
1168
|
+
], E.prototype, "_loading", 2);
|
|
1169
|
+
O([
|
|
1170
|
+
we()
|
|
1171
|
+
], E.prototype, "_highlightHTML", 2);
|
|
1172
|
+
O([
|
|
1173
|
+
rt("textarea")
|
|
1174
|
+
], E.prototype, "_textarea", 2);
|
|
1175
|
+
O([
|
|
1176
|
+
rt(".highlight-layer")
|
|
1177
|
+
], E.prototype, "_overlay", 2);
|
|
1178
|
+
E = O([
|
|
1179
|
+
Tt("sa-spell-checker")
|
|
1180
|
+
], E);
|
|
688
1181
|
export {
|
|
689
|
-
|
|
1182
|
+
E as SaSpellChecker
|
|
690
1183
|
};
|