iconfont-preview-cli 1.0.0 → 1.0.1

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.
@@ -1,55 +1,54 @@
1
- import { defineComponent as J, createVNode as k, computed as pe, ref as N, onMounted as Ae, createElementBlock as Ce, openBlock as me, renderSlot as Ee, unref as ye } from "vue";
2
- import { ElMessage as Me } from "element-plus";
3
- function I(t) {
4
- return Array.isArray ? Array.isArray(t) : oe(t) === "[object Array]";
1
+ import { defineComponent as X, createVNode as L, computed as vt, ref as O, onMounted as Mt, createElementBlock as bt, openBlock as Ft, renderSlot as xt, unref as Bt } from "vue";
2
+ function F(s) {
3
+ return Array.isArray ? Array.isArray(s) : pt(s) === "[object Array]";
5
4
  }
6
- function Fe(t) {
7
- if (typeof t == "string")
8
- return t;
9
- let e = t + "";
10
- return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
5
+ function Dt(s) {
6
+ if (typeof s == "string")
7
+ return s;
8
+ let t = s + "";
9
+ return t == "0" && 1 / s == -1 / 0 ? "-0" : t;
11
10
  }
12
- function Be(t) {
13
- return t == null ? "" : Fe(t);
11
+ function It(s) {
12
+ return s == null ? "" : Dt(s);
14
13
  }
15
- function D(t) {
16
- return typeof t == "string";
14
+ function b(s) {
15
+ return typeof s == "string";
17
16
  }
18
- function ce(t) {
19
- return typeof t == "number";
17
+ function ft(s) {
18
+ return typeof s == "number";
20
19
  }
21
- function De(t) {
22
- return t === !0 || t === !1 || Ie(t) && oe(t) == "[object Boolean]";
20
+ function kt(s) {
21
+ return s === !0 || s === !1 || _t(s) && pt(s) == "[object Boolean]";
23
22
  }
24
- function ue(t) {
25
- return typeof t == "object";
23
+ function dt(s) {
24
+ return typeof s == "object";
26
25
  }
27
- function Ie(t) {
28
- return ue(t) && t !== null;
26
+ function _t(s) {
27
+ return dt(s) && s !== null;
29
28
  }
30
- function E(t) {
31
- return t != null;
29
+ function y(s) {
30
+ return s != null;
32
31
  }
33
- function W(t) {
34
- return !t.trim().length;
32
+ function H(s) {
33
+ return !s.trim().length;
35
34
  }
36
- function oe(t) {
37
- return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(t);
35
+ function pt(s) {
36
+ return s == null ? s === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(s);
38
37
  }
39
- const _e = "Incorrect 'index' type", xe = (t) => `Invalid value for key ${t}`, we = (t) => `Pattern length exceeds max of ${t}.`, Se = (t) => `Missing ${t} property in key`, be = (t) => `Property 'weight' in key '${t}' must be a positive integer`, ee = Object.prototype.hasOwnProperty;
40
- class ve {
41
- constructor(e) {
38
+ const St = "Incorrect 'index' type", Lt = (s) => `Invalid value for key ${s}`, Nt = (s) => `Pattern length exceeds max of ${s}.`, Ot = (s) => `Missing ${s} property in key`, Rt = (s) => `Property 'weight' in key '${s}' must be a positive integer`, et = Object.prototype.hasOwnProperty;
39
+ class Tt {
40
+ constructor(t) {
42
41
  this._keys = [], this._keyMap = {};
43
- let s = 0;
44
- e.forEach((n) => {
45
- let r = ae(n);
46
- this._keys.push(r), this._keyMap[r.id] = r, s += r.weight;
47
- }), this._keys.forEach((n) => {
48
- n.weight /= s;
42
+ let e = 0;
43
+ t.forEach((i) => {
44
+ let o = gt(i);
45
+ this._keys.push(o), this._keyMap[o.id] = o, e += o.weight;
46
+ }), this._keys.forEach((i) => {
47
+ i.weight /= e;
49
48
  });
50
49
  }
51
- get(e) {
52
- return this._keyMap[e];
50
+ get(t) {
51
+ return this._keyMap[t];
53
52
  }
54
53
  keys() {
55
54
  return this._keys;
@@ -58,49 +57,49 @@ class ve {
58
57
  return JSON.stringify(this._keys);
59
58
  }
60
59
  }
61
- function ae(t) {
62
- let e = null, s = null, n = null, r = 1, i = null;
63
- if (D(t) || I(t))
64
- n = t, e = te(t), s = H(t);
60
+ function gt(s) {
61
+ let t = null, e = null, i = null, o = 1, r = null;
62
+ if (b(s) || F(s))
63
+ i = s, t = st(s), e = V(s);
65
64
  else {
66
- if (!ee.call(t, "name"))
67
- throw new Error(Se("name"));
68
- const c = t.name;
69
- if (n = c, ee.call(t, "weight") && (r = t.weight, r <= 0))
70
- throw new Error(be(c));
71
- e = te(c), s = H(c), i = t.getFn;
72
- }
73
- return { path: e, id: s, weight: r, src: n, getFn: i };
65
+ if (!et.call(s, "name"))
66
+ throw new Error(Ot("name"));
67
+ const n = s.name;
68
+ if (i = n, et.call(s, "weight") && (o = s.weight, o <= 0))
69
+ throw new Error(Rt(n));
70
+ t = st(n), e = V(n), r = s.getFn;
71
+ }
72
+ return { path: t, id: e, weight: o, src: i, getFn: r };
74
73
  }
75
- function te(t) {
76
- return I(t) ? t : t.split(".");
74
+ function st(s) {
75
+ return F(s) ? s : s.split(".");
77
76
  }
78
- function H(t) {
79
- return I(t) ? t.join(".") : t;
77
+ function V(s) {
78
+ return F(s) ? s.join(".") : s;
80
79
  }
81
- function Re(t, e) {
82
- let s = [], n = !1;
83
- const r = (i, c, u) => {
84
- if (E(i))
85
- if (!c[u])
86
- s.push(i);
80
+ function $t(s, t) {
81
+ let e = [], i = !1;
82
+ const o = (r, n, c) => {
83
+ if (y(r))
84
+ if (!n[c])
85
+ e.push(r);
87
86
  else {
88
- let o = c[u];
89
- const h = i[o];
90
- if (!E(h))
87
+ let a = n[c];
88
+ const l = r[a];
89
+ if (!y(l))
91
90
  return;
92
- if (u === c.length - 1 && (D(h) || ce(h) || De(h)))
93
- s.push(Be(h));
94
- else if (I(h)) {
95
- n = !0;
96
- for (let a = 0, l = h.length; a < l; a += 1)
97
- r(h[a], c, u + 1);
98
- } else c.length && r(h, c, u + 1);
91
+ if (c === n.length - 1 && (b(l) || ft(l) || kt(l)))
92
+ e.push(It(l));
93
+ else if (F(l)) {
94
+ i = !0;
95
+ for (let u = 0, h = l.length; u < h; u += 1)
96
+ o(l[u], n, c + 1);
97
+ } else n.length && o(l, n, c + 1);
99
98
  }
100
99
  };
101
- return r(t, D(e) ? e.split(".") : e, 0), n ? s : s[0];
100
+ return o(s, b(t) ? t.split(".") : t, 0), i ? e : e[0];
102
101
  }
103
- const ke = {
102
+ const Pt = {
104
103
  // Whether the matches should be included in the result set. When `true`, each record in the result
105
104
  // set will include the indices of the matched characters.
106
105
  // These can consequently be used for highlighting purposes.
@@ -110,7 +109,7 @@ const ke = {
110
109
  findAllMatches: !1,
111
110
  // Minimum number of characters that must be matched before a result is considered a match
112
111
  minMatchCharLength: 1
113
- }, Le = {
112
+ }, jt = {
114
113
  // When `true`, the algorithm continues searching to the end of the input even if a perfect
115
114
  // match is found before the end of the same input.
116
115
  isCaseSensitive: !1,
@@ -123,8 +122,8 @@ const ke = {
123
122
  // Whether to sort the result list, by score
124
123
  shouldSort: !0,
125
124
  // Default sort function: sort by ascending score, ascending index
126
- sortFn: (t, e) => t.score === e.score ? t.idx < e.idx ? -1 : 1 : t.score < e.score ? -1 : 1
127
- }, Ne = {
125
+ sortFn: (s, t) => s.score === t.score ? s.idx < t.idx ? -1 : 1 : s.score < t.score ? -1 : 1
126
+ }, Wt = {
128
127
  // Approximately where in the text is the pattern expected to be found?
129
128
  location: 0,
130
129
  // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match
@@ -136,12 +135,12 @@ const ke = {
136
135
  // the exact location specified, a threshold of '1000' would require a perfect match
137
136
  // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.
138
137
  distance: 100
139
- }, $e = {
138
+ }, zt = {
140
139
  // When `true`, it enables the use of unix-like search commands
141
140
  useExtendedSearch: !1,
142
141
  // The get function to use when fetching an object's properties.
143
142
  // The default will search nested paths *ie foo.bar.baz*
144
- getFn: Re,
143
+ getFn: $t,
145
144
  // When `true`, search will ignore `location` and `distance`, so it won't matter
146
145
  // where in the string the pattern appears.
147
146
  // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score
@@ -154,114 +153,114 @@ const ke = {
154
153
  fieldNormWeight: 1
155
154
  };
156
155
  var f = {
157
- ...Le,
158
- ...ke,
159
- ...Ne,
160
- ...$e
156
+ ...jt,
157
+ ...Pt,
158
+ ...Wt,
159
+ ...zt
161
160
  };
162
- const Oe = /[^ ]+/g;
163
- function Pe(t = 1, e = 3) {
164
- const s = /* @__PURE__ */ new Map(), n = Math.pow(10, e);
161
+ const Ht = /[^ ]+/g;
162
+ function Kt(s = 1, t = 3) {
163
+ const e = /* @__PURE__ */ new Map(), i = Math.pow(10, t);
165
164
  return {
166
- get(r) {
167
- const i = r.match(Oe).length;
168
- if (s.has(i))
169
- return s.get(i);
170
- const c = 1 / Math.pow(i, 0.5 * t), u = parseFloat(Math.round(c * n) / n);
171
- return s.set(i, u), u;
165
+ get(o) {
166
+ const r = o.match(Ht).length;
167
+ if (e.has(r))
168
+ return e.get(r);
169
+ const n = 1 / Math.pow(r, 0.5 * s), c = parseFloat(Math.round(n * i) / i);
170
+ return e.set(r, c), c;
172
171
  },
173
172
  clear() {
174
- s.clear();
173
+ e.clear();
175
174
  }
176
175
  };
177
176
  }
178
- class X {
177
+ class q {
179
178
  constructor({
180
- getFn: e = f.getFn,
181
- fieldNormWeight: s = f.fieldNormWeight
179
+ getFn: t = f.getFn,
180
+ fieldNormWeight: e = f.fieldNormWeight
182
181
  } = {}) {
183
- this.norm = Pe(s, 3), this.getFn = e, this.isCreated = !1, this.setIndexRecords();
182
+ this.norm = Kt(e, 3), this.getFn = t, this.isCreated = !1, this.setIndexRecords();
184
183
  }
185
- setSources(e = []) {
186
- this.docs = e;
184
+ setSources(t = []) {
185
+ this.docs = t;
187
186
  }
188
- setIndexRecords(e = []) {
189
- this.records = e;
187
+ setIndexRecords(t = []) {
188
+ this.records = t;
190
189
  }
191
- setKeys(e = []) {
192
- this.keys = e, this._keysMap = {}, e.forEach((s, n) => {
193
- this._keysMap[s.id] = n;
190
+ setKeys(t = []) {
191
+ this.keys = t, this._keysMap = {}, t.forEach((e, i) => {
192
+ this._keysMap[e.id] = i;
194
193
  });
195
194
  }
196
195
  create() {
197
- this.isCreated || !this.docs.length || (this.isCreated = !0, D(this.docs[0]) ? this.docs.forEach((e, s) => {
198
- this._addString(e, s);
199
- }) : this.docs.forEach((e, s) => {
200
- this._addObject(e, s);
196
+ this.isCreated || !this.docs.length || (this.isCreated = !0, b(this.docs[0]) ? this.docs.forEach((t, e) => {
197
+ this._addString(t, e);
198
+ }) : this.docs.forEach((t, e) => {
199
+ this._addObject(t, e);
201
200
  }), this.norm.clear());
202
201
  }
203
202
  // Adds a doc to the end of the index
204
- add(e) {
205
- const s = this.size();
206
- D(e) ? this._addString(e, s) : this._addObject(e, s);
203
+ add(t) {
204
+ const e = this.size();
205
+ b(t) ? this._addString(t, e) : this._addObject(t, e);
207
206
  }
208
207
  // Removes the doc at the specified index of the index
209
- removeAt(e) {
210
- this.records.splice(e, 1);
211
- for (let s = e, n = this.size(); s < n; s += 1)
212
- this.records[s].i -= 1;
208
+ removeAt(t) {
209
+ this.records.splice(t, 1);
210
+ for (let e = t, i = this.size(); e < i; e += 1)
211
+ this.records[e].i -= 1;
213
212
  }
214
- getValueForItemAtKeyId(e, s) {
215
- return e[this._keysMap[s]];
213
+ getValueForItemAtKeyId(t, e) {
214
+ return t[this._keysMap[e]];
216
215
  }
217
216
  size() {
218
217
  return this.records.length;
219
218
  }
220
- _addString(e, s) {
221
- if (!E(e) || W(e))
219
+ _addString(t, e) {
220
+ if (!y(t) || H(t))
222
221
  return;
223
- let n = {
224
- v: e,
225
- i: s,
226
- n: this.norm.get(e)
222
+ let i = {
223
+ v: t,
224
+ i: e,
225
+ n: this.norm.get(t)
227
226
  };
228
- this.records.push(n);
229
- }
230
- _addObject(e, s) {
231
- let n = { i: s, $: {} };
232
- this.keys.forEach((r, i) => {
233
- let c = r.getFn ? r.getFn(e) : this.getFn(e, r.path);
234
- if (E(c)) {
235
- if (I(c)) {
236
- let u = [];
237
- const o = [{ nestedArrIndex: -1, value: c }];
238
- for (; o.length; ) {
239
- const { nestedArrIndex: h, value: a } = o.pop();
240
- if (E(a))
241
- if (D(a) && !W(a)) {
242
- let l = {
243
- v: a,
244
- i: h,
245
- n: this.norm.get(a)
227
+ this.records.push(i);
228
+ }
229
+ _addObject(t, e) {
230
+ let i = { i: e, $: {} };
231
+ this.keys.forEach((o, r) => {
232
+ let n = o.getFn ? o.getFn(t) : this.getFn(t, o.path);
233
+ if (y(n)) {
234
+ if (F(n)) {
235
+ let c = [];
236
+ const a = [{ nestedArrIndex: -1, value: n }];
237
+ for (; a.length; ) {
238
+ const { nestedArrIndex: l, value: u } = a.pop();
239
+ if (y(u))
240
+ if (b(u) && !H(u)) {
241
+ let h = {
242
+ v: u,
243
+ i: l,
244
+ n: this.norm.get(u)
246
245
  };
247
- u.push(l);
248
- } else I(a) && a.forEach((l, d) => {
249
- o.push({
246
+ c.push(h);
247
+ } else F(u) && u.forEach((h, d) => {
248
+ a.push({
250
249
  nestedArrIndex: d,
251
- value: l
250
+ value: h
252
251
  });
253
252
  });
254
253
  }
255
- n.$[i] = u;
256
- } else if (D(c) && !W(c)) {
257
- let u = {
258
- v: c,
259
- n: this.norm.get(c)
254
+ i.$[r] = c;
255
+ } else if (b(n) && !H(n)) {
256
+ let c = {
257
+ v: n,
258
+ n: this.norm.get(n)
260
259
  };
261
- n.$[i] = u;
260
+ i.$[r] = c;
262
261
  }
263
262
  }
264
- }), this.records.push(n);
263
+ }), this.records.push(i);
265
264
  }
266
265
  toJSON() {
267
266
  return {
@@ -270,224 +269,224 @@ class X {
270
269
  };
271
270
  }
272
271
  }
273
- function he(t, e, { getFn: s = f.getFn, fieldNormWeight: n = f.fieldNormWeight } = {}) {
274
- const r = new X({ getFn: s, fieldNormWeight: n });
275
- return r.setKeys(t.map(ae)), r.setSources(e), r.create(), r;
272
+ function mt(s, t, { getFn: e = f.getFn, fieldNormWeight: i = f.fieldNormWeight } = {}) {
273
+ const o = new q({ getFn: e, fieldNormWeight: i });
274
+ return o.setKeys(s.map(gt)), o.setSources(t), o.create(), o;
276
275
  }
277
- function Te(t, { getFn: e = f.getFn, fieldNormWeight: s = f.fieldNormWeight } = {}) {
278
- const { keys: n, records: r } = t, i = new X({ getFn: e, fieldNormWeight: s });
279
- return i.setKeys(n), i.setIndexRecords(r), i;
276
+ function Vt(s, { getFn: t = f.getFn, fieldNormWeight: e = f.fieldNormWeight } = {}) {
277
+ const { keys: i, records: o } = s, r = new q({ getFn: t, fieldNormWeight: e });
278
+ return r.setKeys(i), r.setIndexRecords(o), r;
280
279
  }
281
- function $(t, {
282
- errors: e = 0,
283
- currentLocation: s = 0,
284
- expectedLocation: n = 0,
285
- distance: r = f.distance,
286
- ignoreLocation: i = f.ignoreLocation
280
+ function R(s, {
281
+ errors: t = 0,
282
+ currentLocation: e = 0,
283
+ expectedLocation: i = 0,
284
+ distance: o = f.distance,
285
+ ignoreLocation: r = f.ignoreLocation
287
286
  } = {}) {
288
- const c = e / t.length;
289
- if (i)
290
- return c;
291
- const u = Math.abs(n - s);
292
- return r ? c + u / r : u ? 1 : c;
287
+ const n = t / s.length;
288
+ if (r)
289
+ return n;
290
+ const c = Math.abs(i - e);
291
+ return o ? n + c / o : c ? 1 : n;
293
292
  }
294
- function je(t = [], e = f.minMatchCharLength) {
295
- let s = [], n = -1, r = -1, i = 0;
296
- for (let c = t.length; i < c; i += 1) {
297
- let u = t[i];
298
- u && n === -1 ? n = i : !u && n !== -1 && (r = i - 1, r - n + 1 >= e && s.push([n, r]), n = -1);
293
+ function Gt(s = [], t = f.minMatchCharLength) {
294
+ let e = [], i = -1, o = -1, r = 0;
295
+ for (let n = s.length; r < n; r += 1) {
296
+ let c = s[r];
297
+ c && i === -1 ? i = r : !c && i !== -1 && (o = r - 1, o - i + 1 >= t && e.push([i, o]), i = -1);
299
298
  }
300
- return t[i - 1] && i - n >= e && s.push([n, i - 1]), s;
299
+ return s[r - 1] && r - i >= t && e.push([i, r - 1]), e;
301
300
  }
302
- const b = 32;
303
- function Ke(t, e, s, {
304
- location: n = f.location,
305
- distance: r = f.distance,
306
- threshold: i = f.threshold,
307
- findAllMatches: c = f.findAllMatches,
308
- minMatchCharLength: u = f.minMatchCharLength,
309
- includeMatches: o = f.includeMatches,
310
- ignoreLocation: h = f.ignoreLocation
301
+ const k = 32;
302
+ function Yt(s, t, e, {
303
+ location: i = f.location,
304
+ distance: o = f.distance,
305
+ threshold: r = f.threshold,
306
+ findAllMatches: n = f.findAllMatches,
307
+ minMatchCharLength: c = f.minMatchCharLength,
308
+ includeMatches: a = f.includeMatches,
309
+ ignoreLocation: l = f.ignoreLocation
311
310
  } = {}) {
312
- if (e.length > b)
313
- throw new Error(we(b));
314
- const a = e.length, l = t.length, d = Math.max(0, Math.min(n, l));
315
- let g = i, p = d;
316
- const A = u > 1 || o, C = A ? Array(l) : [];
317
- let M;
318
- for (; (M = t.indexOf(e, p)) > -1; ) {
319
- let y = $(e, {
320
- currentLocation: M,
311
+ if (t.length > k)
312
+ throw new Error(Nt(k));
313
+ const u = t.length, h = s.length, d = Math.max(0, Math.min(i, h));
314
+ let p = r, g = d;
315
+ const m = c > 1 || a, A = m ? Array(h) : [];
316
+ let w;
317
+ for (; (w = s.indexOf(t, g)) > -1; ) {
318
+ let E = R(t, {
319
+ currentLocation: w,
321
320
  expectedLocation: d,
322
- distance: r,
323
- ignoreLocation: h
321
+ distance: o,
322
+ ignoreLocation: l
324
323
  });
325
- if (g = Math.min(y, g), p = M + a, A) {
326
- let x = 0;
327
- for (; x < a; )
328
- C[M + x] = 1, x += 1;
324
+ if (p = Math.min(E, p), g = w + u, m) {
325
+ let B = 0;
326
+ for (; B < u; )
327
+ A[w + B] = 1, B += 1;
329
328
  }
330
329
  }
331
- p = -1;
332
- let m = [], _ = 1, B = a + l;
333
- const T = 1 << a - 1;
334
- for (let y = 0; y < a; y += 1) {
335
- let x = 0, w = B;
336
- for (; x < w; )
337
- $(e, {
338
- errors: y,
339
- currentLocation: d + w,
330
+ g = -1;
331
+ let C = [], x = 1, M = u + h;
332
+ const j = 1 << u - 1;
333
+ for (let E = 0; E < u; E += 1) {
334
+ let B = 0, D = M;
335
+ for (; B < D; )
336
+ R(t, {
337
+ errors: E,
338
+ currentLocation: d + D,
340
339
  expectedLocation: d,
341
- distance: r,
342
- ignoreLocation: h
343
- }) <= g ? x = w : B = w, w = Math.floor((B - x) / 2 + x);
344
- B = w;
345
- let Z = Math.max(1, d - w + 1), K = c ? l : Math.min(d + w, l) + a, v = Array(K + 2);
346
- v[K + 1] = (1 << y) - 1;
347
- for (let F = K; F >= Z; F -= 1) {
348
- let L = F - 1, q = s[t.charAt(L)];
349
- if (A && (C[L] = +!!q), v[F] = (v[F + 1] << 1 | 1) & q, y && (v[F] |= (m[F + 1] | m[F]) << 1 | 1 | m[F + 1]), v[F] & T && (_ = $(e, {
350
- errors: y,
351
- currentLocation: L,
340
+ distance: o,
341
+ ignoreLocation: l
342
+ }) <= p ? B = D : M = D, D = Math.floor((M - B) / 2 + B);
343
+ M = D;
344
+ let Z = Math.max(1, d - D + 1), z = n ? h : Math.min(d + D, h) + u, _ = Array(z + 2);
345
+ _[z + 1] = (1 << E) - 1;
346
+ for (let v = z; v >= Z; v -= 1) {
347
+ let N = v - 1, tt = e[s.charAt(N)];
348
+ if (m && (A[N] = +!!tt), _[v] = (_[v + 1] << 1 | 1) & tt, E && (_[v] |= (C[v + 1] | C[v]) << 1 | 1 | C[v + 1]), _[v] & j && (x = R(t, {
349
+ errors: E,
350
+ currentLocation: N,
352
351
  expectedLocation: d,
353
- distance: r,
354
- ignoreLocation: h
355
- }), _ <= g)) {
356
- if (g = _, p = L, p <= d)
352
+ distance: o,
353
+ ignoreLocation: l
354
+ }), x <= p)) {
355
+ if (p = x, g = N, g <= d)
357
356
  break;
358
- Z = Math.max(1, 2 * d - p);
357
+ Z = Math.max(1, 2 * d - g);
359
358
  }
360
359
  }
361
- if ($(e, {
362
- errors: y + 1,
360
+ if (R(t, {
361
+ errors: E + 1,
363
362
  currentLocation: d,
364
363
  expectedLocation: d,
365
- distance: r,
366
- ignoreLocation: h
367
- }) > g)
364
+ distance: o,
365
+ ignoreLocation: l
366
+ }) > p)
368
367
  break;
369
- m = v;
368
+ C = _;
370
369
  }
371
- const j = {
372
- isMatch: p >= 0,
370
+ const W = {
371
+ isMatch: g >= 0,
373
372
  // Count exact matches (those with a score of 0) to be "almost" exact
374
- score: Math.max(1e-3, _)
373
+ score: Math.max(1e-3, x)
375
374
  };
376
- if (A) {
377
- const y = je(C, u);
378
- y.length ? o && (j.indices = y) : j.isMatch = !1;
375
+ if (m) {
376
+ const E = Gt(A, c);
377
+ E.length ? a && (W.indices = E) : W.isMatch = !1;
379
378
  }
380
- return j;
379
+ return W;
381
380
  }
382
- function We(t) {
383
- let e = {};
384
- for (let s = 0, n = t.length; s < n; s += 1) {
385
- const r = t.charAt(s);
386
- e[r] = (e[r] || 0) | 1 << n - s - 1;
381
+ function Ut(s) {
382
+ let t = {};
383
+ for (let e = 0, i = s.length; e < i; e += 1) {
384
+ const o = s.charAt(e);
385
+ t[o] = (t[o] || 0) | 1 << i - e - 1;
387
386
  }
388
- return e;
387
+ return t;
389
388
  }
390
- const O = String.prototype.normalize ? ((t) => t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "")) : ((t) => t);
391
- class le {
392
- constructor(e, {
393
- location: s = f.location,
394
- threshold: n = f.threshold,
395
- distance: r = f.distance,
396
- includeMatches: i = f.includeMatches,
397
- findAllMatches: c = f.findAllMatches,
398
- minMatchCharLength: u = f.minMatchCharLength,
399
- isCaseSensitive: o = f.isCaseSensitive,
400
- ignoreDiacritics: h = f.ignoreDiacritics,
401
- ignoreLocation: a = f.ignoreLocation
389
+ const $ = String.prototype.normalize ? ((s) => s.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "")) : ((s) => s);
390
+ class At {
391
+ constructor(t, {
392
+ location: e = f.location,
393
+ threshold: i = f.threshold,
394
+ distance: o = f.distance,
395
+ includeMatches: r = f.includeMatches,
396
+ findAllMatches: n = f.findAllMatches,
397
+ minMatchCharLength: c = f.minMatchCharLength,
398
+ isCaseSensitive: a = f.isCaseSensitive,
399
+ ignoreDiacritics: l = f.ignoreDiacritics,
400
+ ignoreLocation: u = f.ignoreLocation
402
401
  } = {}) {
403
402
  if (this.options = {
404
- location: s,
405
- threshold: n,
406
- distance: r,
407
- includeMatches: i,
408
- findAllMatches: c,
409
- minMatchCharLength: u,
410
- isCaseSensitive: o,
411
- ignoreDiacritics: h,
412
- ignoreLocation: a
413
- }, e = o ? e : e.toLowerCase(), e = h ? O(e) : e, this.pattern = e, this.chunks = [], !this.pattern.length)
403
+ location: e,
404
+ threshold: i,
405
+ distance: o,
406
+ includeMatches: r,
407
+ findAllMatches: n,
408
+ minMatchCharLength: c,
409
+ isCaseSensitive: a,
410
+ ignoreDiacritics: l,
411
+ ignoreLocation: u
412
+ }, t = a ? t : t.toLowerCase(), t = l ? $(t) : t, this.pattern = t, this.chunks = [], !this.pattern.length)
414
413
  return;
415
- const l = (g, p) => {
414
+ const h = (p, g) => {
416
415
  this.chunks.push({
417
- pattern: g,
418
- alphabet: We(g),
419
- startIndex: p
416
+ pattern: p,
417
+ alphabet: Ut(p),
418
+ startIndex: g
420
419
  });
421
420
  }, d = this.pattern.length;
422
- if (d > b) {
423
- let g = 0;
424
- const p = d % b, A = d - p;
425
- for (; g < A; )
426
- l(this.pattern.substr(g, b), g), g += b;
427
- if (p) {
428
- const C = d - b;
429
- l(this.pattern.substr(C), C);
421
+ if (d > k) {
422
+ let p = 0;
423
+ const g = d % k, m = d - g;
424
+ for (; p < m; )
425
+ h(this.pattern.substr(p, k), p), p += k;
426
+ if (g) {
427
+ const A = d - k;
428
+ h(this.pattern.substr(A), A);
430
429
  }
431
430
  } else
432
- l(this.pattern, 0);
431
+ h(this.pattern, 0);
433
432
  }
434
- searchIn(e) {
435
- const { isCaseSensitive: s, ignoreDiacritics: n, includeMatches: r } = this.options;
436
- if (e = s ? e : e.toLowerCase(), e = n ? O(e) : e, this.pattern === e) {
437
- let A = {
433
+ searchIn(t) {
434
+ const { isCaseSensitive: e, ignoreDiacritics: i, includeMatches: o } = this.options;
435
+ if (t = e ? t : t.toLowerCase(), t = i ? $(t) : t, this.pattern === t) {
436
+ let m = {
438
437
  isMatch: !0,
439
438
  score: 0
440
439
  };
441
- return r && (A.indices = [[0, e.length - 1]]), A;
440
+ return o && (m.indices = [[0, t.length - 1]]), m;
442
441
  }
443
442
  const {
444
- location: i,
445
- distance: c,
446
- threshold: u,
447
- findAllMatches: o,
448
- minMatchCharLength: h,
449
- ignoreLocation: a
443
+ location: r,
444
+ distance: n,
445
+ threshold: c,
446
+ findAllMatches: a,
447
+ minMatchCharLength: l,
448
+ ignoreLocation: u
450
449
  } = this.options;
451
- let l = [], d = 0, g = !1;
452
- this.chunks.forEach(({ pattern: A, alphabet: C, startIndex: M }) => {
453
- const { isMatch: m, score: _, indices: B } = Ke(e, A, C, {
454
- location: i + M,
455
- distance: c,
456
- threshold: u,
457
- findAllMatches: o,
458
- minMatchCharLength: h,
459
- includeMatches: r,
460
- ignoreLocation: a
450
+ let h = [], d = 0, p = !1;
451
+ this.chunks.forEach(({ pattern: m, alphabet: A, startIndex: w }) => {
452
+ const { isMatch: C, score: x, indices: M } = Yt(t, m, A, {
453
+ location: r + w,
454
+ distance: n,
455
+ threshold: c,
456
+ findAllMatches: a,
457
+ minMatchCharLength: l,
458
+ includeMatches: o,
459
+ ignoreLocation: u
461
460
  });
462
- m && (g = !0), d += _, m && B && (l = [...l, ...B]);
461
+ C && (p = !0), d += x, C && M && (h = [...h, ...M]);
463
462
  });
464
- let p = {
465
- isMatch: g,
466
- score: g ? d / this.chunks.length : 1
463
+ let g = {
464
+ isMatch: p,
465
+ score: p ? d / this.chunks.length : 1
467
466
  };
468
- return g && r && (p.indices = l), p;
467
+ return p && o && (g.indices = h), g;
469
468
  }
470
469
  }
471
- class S {
472
- constructor(e) {
473
- this.pattern = e;
470
+ class I {
471
+ constructor(t) {
472
+ this.pattern = t;
474
473
  }
475
- static isMultiMatch(e) {
476
- return se(e, this.multiRegex);
474
+ static isMultiMatch(t) {
475
+ return nt(t, this.multiRegex);
477
476
  }
478
- static isSingleMatch(e) {
479
- return se(e, this.singleRegex);
477
+ static isSingleMatch(t) {
478
+ return nt(t, this.singleRegex);
480
479
  }
481
480
  search() {
482
481
  }
483
482
  }
484
- function se(t, e) {
485
- const s = t.match(e);
486
- return s ? s[1] : null;
483
+ function nt(s, t) {
484
+ const e = s.match(t);
485
+ return e ? e[1] : null;
487
486
  }
488
- class ze extends S {
489
- constructor(e) {
490
- super(e);
487
+ class Qt extends I {
488
+ constructor(t) {
489
+ super(t);
491
490
  }
492
491
  static get type() {
493
492
  return "exact";
@@ -498,18 +497,18 @@ class ze extends S {
498
497
  static get singleRegex() {
499
498
  return /^=(.*)$/;
500
499
  }
501
- search(e) {
502
- const s = e === this.pattern;
500
+ search(t) {
501
+ const e = t === this.pattern;
503
502
  return {
504
- isMatch: s,
505
- score: s ? 0 : 1,
503
+ isMatch: e,
504
+ score: e ? 0 : 1,
506
505
  indices: [0, this.pattern.length - 1]
507
506
  };
508
507
  }
509
508
  }
510
- class He extends S {
511
- constructor(e) {
512
- super(e);
509
+ class Jt extends I {
510
+ constructor(t) {
511
+ super(t);
513
512
  }
514
513
  static get type() {
515
514
  return "inverse-exact";
@@ -520,18 +519,18 @@ class He extends S {
520
519
  static get singleRegex() {
521
520
  return /^!(.*)$/;
522
521
  }
523
- search(e) {
524
- const n = e.indexOf(this.pattern) === -1;
522
+ search(t) {
523
+ const i = t.indexOf(this.pattern) === -1;
525
524
  return {
526
- isMatch: n,
527
- score: n ? 0 : 1,
528
- indices: [0, e.length - 1]
525
+ isMatch: i,
526
+ score: i ? 0 : 1,
527
+ indices: [0, t.length - 1]
529
528
  };
530
529
  }
531
530
  }
532
- class Ge extends S {
533
- constructor(e) {
534
- super(e);
531
+ class Xt extends I {
532
+ constructor(t) {
533
+ super(t);
535
534
  }
536
535
  static get type() {
537
536
  return "prefix-exact";
@@ -542,18 +541,18 @@ class Ge extends S {
542
541
  static get singleRegex() {
543
542
  return /^\^(.*)$/;
544
543
  }
545
- search(e) {
546
- const s = e.startsWith(this.pattern);
544
+ search(t) {
545
+ const e = t.startsWith(this.pattern);
547
546
  return {
548
- isMatch: s,
549
- score: s ? 0 : 1,
547
+ isMatch: e,
548
+ score: e ? 0 : 1,
550
549
  indices: [0, this.pattern.length - 1]
551
550
  };
552
551
  }
553
552
  }
554
- class Ve extends S {
555
- constructor(e) {
556
- super(e);
553
+ class qt extends I {
554
+ constructor(t) {
555
+ super(t);
557
556
  }
558
557
  static get type() {
559
558
  return "inverse-prefix-exact";
@@ -564,18 +563,18 @@ class Ve extends S {
564
563
  static get singleRegex() {
565
564
  return /^!\^(.*)$/;
566
565
  }
567
- search(e) {
568
- const s = !e.startsWith(this.pattern);
566
+ search(t) {
567
+ const e = !t.startsWith(this.pattern);
569
568
  return {
570
- isMatch: s,
571
- score: s ? 0 : 1,
572
- indices: [0, e.length - 1]
569
+ isMatch: e,
570
+ score: e ? 0 : 1,
571
+ indices: [0, t.length - 1]
573
572
  };
574
573
  }
575
574
  }
576
- class Ye extends S {
577
- constructor(e) {
578
- super(e);
575
+ class Zt extends I {
576
+ constructor(t) {
577
+ super(t);
579
578
  }
580
579
  static get type() {
581
580
  return "suffix-exact";
@@ -586,18 +585,18 @@ class Ye extends S {
586
585
  static get singleRegex() {
587
586
  return /^(.*)\$$/;
588
587
  }
589
- search(e) {
590
- const s = e.endsWith(this.pattern);
588
+ search(t) {
589
+ const e = t.endsWith(this.pattern);
591
590
  return {
592
- isMatch: s,
593
- score: s ? 0 : 1,
594
- indices: [e.length - this.pattern.length, e.length - 1]
591
+ isMatch: e,
592
+ score: e ? 0 : 1,
593
+ indices: [t.length - this.pattern.length, t.length - 1]
595
594
  };
596
595
  }
597
596
  }
598
- class Qe extends S {
599
- constructor(e) {
600
- super(e);
597
+ class te extends I {
598
+ constructor(t) {
599
+ super(t);
601
600
  }
602
601
  static get type() {
603
602
  return "inverse-suffix-exact";
@@ -608,37 +607,37 @@ class Qe extends S {
608
607
  static get singleRegex() {
609
608
  return /^!(.*)\$$/;
610
609
  }
611
- search(e) {
612
- const s = !e.endsWith(this.pattern);
610
+ search(t) {
611
+ const e = !t.endsWith(this.pattern);
613
612
  return {
614
- isMatch: s,
615
- score: s ? 0 : 1,
616
- indices: [0, e.length - 1]
613
+ isMatch: e,
614
+ score: e ? 0 : 1,
615
+ indices: [0, t.length - 1]
617
616
  };
618
617
  }
619
618
  }
620
- class fe extends S {
621
- constructor(e, {
622
- location: s = f.location,
623
- threshold: n = f.threshold,
624
- distance: r = f.distance,
625
- includeMatches: i = f.includeMatches,
626
- findAllMatches: c = f.findAllMatches,
627
- minMatchCharLength: u = f.minMatchCharLength,
628
- isCaseSensitive: o = f.isCaseSensitive,
629
- ignoreDiacritics: h = f.ignoreDiacritics,
630
- ignoreLocation: a = f.ignoreLocation
619
+ class Ct extends I {
620
+ constructor(t, {
621
+ location: e = f.location,
622
+ threshold: i = f.threshold,
623
+ distance: o = f.distance,
624
+ includeMatches: r = f.includeMatches,
625
+ findAllMatches: n = f.findAllMatches,
626
+ minMatchCharLength: c = f.minMatchCharLength,
627
+ isCaseSensitive: a = f.isCaseSensitive,
628
+ ignoreDiacritics: l = f.ignoreDiacritics,
629
+ ignoreLocation: u = f.ignoreLocation
631
630
  } = {}) {
632
- super(e), this._bitapSearch = new le(e, {
633
- location: s,
634
- threshold: n,
635
- distance: r,
636
- includeMatches: i,
637
- findAllMatches: c,
638
- minMatchCharLength: u,
639
- isCaseSensitive: o,
640
- ignoreDiacritics: h,
641
- ignoreLocation: a
631
+ super(t), this._bitapSearch = new At(t, {
632
+ location: e,
633
+ threshold: i,
634
+ distance: o,
635
+ includeMatches: r,
636
+ findAllMatches: n,
637
+ minMatchCharLength: c,
638
+ isCaseSensitive: a,
639
+ ignoreDiacritics: l,
640
+ ignoreLocation: u
642
641
  });
643
642
  }
644
643
  static get type() {
@@ -650,13 +649,13 @@ class fe extends S {
650
649
  static get singleRegex() {
651
650
  return /^(.*)$/;
652
651
  }
653
- search(e) {
654
- return this._bitapSearch.searchIn(e);
652
+ search(t) {
653
+ return this._bitapSearch.searchIn(t);
655
654
  }
656
655
  }
657
- class de extends S {
658
- constructor(e) {
659
- super(e);
656
+ class yt extends I {
657
+ constructor(t) {
658
+ super(t);
660
659
  }
661
660
  static get type() {
662
661
  return "include";
@@ -667,112 +666,112 @@ class de extends S {
667
666
  static get singleRegex() {
668
667
  return /^'(.*)$/;
669
668
  }
670
- search(e) {
671
- let s = 0, n;
672
- const r = [], i = this.pattern.length;
673
- for (; (n = e.indexOf(this.pattern, s)) > -1; )
674
- s = n + i, r.push([n, s - 1]);
675
- const c = !!r.length;
669
+ search(t) {
670
+ let e = 0, i;
671
+ const o = [], r = this.pattern.length;
672
+ for (; (i = t.indexOf(this.pattern, e)) > -1; )
673
+ e = i + r, o.push([i, e - 1]);
674
+ const n = !!o.length;
676
675
  return {
677
- isMatch: c,
678
- score: c ? 0 : 1,
679
- indices: r
676
+ isMatch: n,
677
+ score: n ? 0 : 1,
678
+ indices: o
680
679
  };
681
680
  }
682
681
  }
683
682
  const G = [
684
- ze,
685
- de,
686
- Ge,
687
- Ve,
688
- Qe,
689
- Ye,
690
- He,
691
- fe
692
- ], ne = G.length, Ue = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, Je = "|";
693
- function Xe(t, e = {}) {
694
- return t.split(Je).map((s) => {
695
- let n = s.trim().split(Ue).filter((i) => i && !!i.trim()), r = [];
696
- for (let i = 0, c = n.length; i < c; i += 1) {
697
- const u = n[i];
698
- let o = !1, h = -1;
699
- for (; !o && ++h < ne; ) {
700
- const a = G[h];
701
- let l = a.isMultiMatch(u);
702
- l && (r.push(new a(l, e)), o = !0);
683
+ Qt,
684
+ yt,
685
+ Xt,
686
+ qt,
687
+ te,
688
+ Zt,
689
+ Jt,
690
+ Ct
691
+ ], it = G.length, ee = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, se = "|";
692
+ function ne(s, t = {}) {
693
+ return s.split(se).map((e) => {
694
+ let i = e.trim().split(ee).filter((r) => r && !!r.trim()), o = [];
695
+ for (let r = 0, n = i.length; r < n; r += 1) {
696
+ const c = i[r];
697
+ let a = !1, l = -1;
698
+ for (; !a && ++l < it; ) {
699
+ const u = G[l];
700
+ let h = u.isMultiMatch(c);
701
+ h && (o.push(new u(h, t)), a = !0);
703
702
  }
704
- if (!o)
705
- for (h = -1; ++h < ne; ) {
706
- const a = G[h];
707
- let l = a.isSingleMatch(u);
708
- if (l) {
709
- r.push(new a(l, e));
703
+ if (!a)
704
+ for (l = -1; ++l < it; ) {
705
+ const u = G[l];
706
+ let h = u.isSingleMatch(c);
707
+ if (h) {
708
+ o.push(new u(h, t));
710
709
  break;
711
710
  }
712
711
  }
713
712
  }
714
- return r;
713
+ return o;
715
714
  });
716
715
  }
717
- const Ze = /* @__PURE__ */ new Set([fe.type, de.type]);
718
- class qe {
719
- constructor(e, {
720
- isCaseSensitive: s = f.isCaseSensitive,
721
- ignoreDiacritics: n = f.ignoreDiacritics,
722
- includeMatches: r = f.includeMatches,
723
- minMatchCharLength: i = f.minMatchCharLength,
724
- ignoreLocation: c = f.ignoreLocation,
725
- findAllMatches: u = f.findAllMatches,
726
- location: o = f.location,
727
- threshold: h = f.threshold,
728
- distance: a = f.distance
716
+ const ie = /* @__PURE__ */ new Set([Ct.type, yt.type]);
717
+ class oe {
718
+ constructor(t, {
719
+ isCaseSensitive: e = f.isCaseSensitive,
720
+ ignoreDiacritics: i = f.ignoreDiacritics,
721
+ includeMatches: o = f.includeMatches,
722
+ minMatchCharLength: r = f.minMatchCharLength,
723
+ ignoreLocation: n = f.ignoreLocation,
724
+ findAllMatches: c = f.findAllMatches,
725
+ location: a = f.location,
726
+ threshold: l = f.threshold,
727
+ distance: u = f.distance
729
728
  } = {}) {
730
729
  this.query = null, this.options = {
731
- isCaseSensitive: s,
732
- ignoreDiacritics: n,
733
- includeMatches: r,
734
- minMatchCharLength: i,
735
- findAllMatches: u,
736
- ignoreLocation: c,
737
- location: o,
738
- threshold: h,
739
- distance: a
740
- }, e = s ? e : e.toLowerCase(), e = n ? O(e) : e, this.pattern = e, this.query = Xe(this.pattern, this.options);
741
- }
742
- static condition(e, s) {
743
- return s.useExtendedSearch;
744
- }
745
- searchIn(e) {
746
- const s = this.query;
747
- if (!s)
730
+ isCaseSensitive: e,
731
+ ignoreDiacritics: i,
732
+ includeMatches: o,
733
+ minMatchCharLength: r,
734
+ findAllMatches: c,
735
+ ignoreLocation: n,
736
+ location: a,
737
+ threshold: l,
738
+ distance: u
739
+ }, t = e ? t : t.toLowerCase(), t = i ? $(t) : t, this.pattern = t, this.query = ne(this.pattern, this.options);
740
+ }
741
+ static condition(t, e) {
742
+ return e.useExtendedSearch;
743
+ }
744
+ searchIn(t) {
745
+ const e = this.query;
746
+ if (!e)
748
747
  return {
749
748
  isMatch: !1,
750
749
  score: 1
751
750
  };
752
- const { includeMatches: n, isCaseSensitive: r, ignoreDiacritics: i } = this.options;
753
- e = r ? e : e.toLowerCase(), e = i ? O(e) : e;
754
- let c = 0, u = [], o = 0;
755
- for (let h = 0, a = s.length; h < a; h += 1) {
756
- const l = s[h];
757
- u.length = 0, c = 0;
758
- for (let d = 0, g = l.length; d < g; d += 1) {
759
- const p = l[d], { isMatch: A, indices: C, score: M } = p.search(e);
760
- if (A) {
761
- if (c += 1, o += M, n) {
762
- const m = p.constructor.type;
763
- Ze.has(m) ? u = [...u, ...C] : u.push(C);
751
+ const { includeMatches: i, isCaseSensitive: o, ignoreDiacritics: r } = this.options;
752
+ t = o ? t : t.toLowerCase(), t = r ? $(t) : t;
753
+ let n = 0, c = [], a = 0;
754
+ for (let l = 0, u = e.length; l < u; l += 1) {
755
+ const h = e[l];
756
+ c.length = 0, n = 0;
757
+ for (let d = 0, p = h.length; d < p; d += 1) {
758
+ const g = h[d], { isMatch: m, indices: A, score: w } = g.search(t);
759
+ if (m) {
760
+ if (n += 1, a += w, i) {
761
+ const C = g.constructor.type;
762
+ ie.has(C) ? c = [...c, ...A] : c.push(A);
764
763
  }
765
764
  } else {
766
- o = 0, c = 0, u.length = 0;
765
+ a = 0, n = 0, c.length = 0;
767
766
  break;
768
767
  }
769
768
  }
770
- if (c) {
769
+ if (n) {
771
770
  let d = {
772
771
  isMatch: !0,
773
- score: o / c
772
+ score: a / n
774
773
  };
775
- return n && (d.indices = u), d;
774
+ return i && (d.indices = c), d;
776
775
  }
777
776
  }
778
777
  return {
@@ -781,17 +780,17 @@ class qe {
781
780
  };
782
781
  }
783
782
  }
784
- const V = [];
785
- function et(...t) {
786
- V.push(...t);
783
+ const Y = [];
784
+ function re(...s) {
785
+ Y.push(...s);
787
786
  }
788
- function Y(t, e) {
789
- for (let s = 0, n = V.length; s < n; s += 1) {
790
- let r = V[s];
791
- if (r.condition(t, e))
792
- return new r(t, e);
787
+ function U(s, t) {
788
+ for (let e = 0, i = Y.length; e < i; e += 1) {
789
+ let o = Y[e];
790
+ if (o.condition(s, t))
791
+ return new o(s, t);
793
792
  }
794
- return new le(t, e);
793
+ return new At(s, t);
795
794
  }
796
795
  const P = {
797
796
  AND: "$and",
@@ -799,227 +798,227 @@ const P = {
799
798
  }, Q = {
800
799
  PATH: "$path",
801
800
  PATTERN: "$val"
802
- }, U = (t) => !!(t[P.AND] || t[P.OR]), tt = (t) => !!t[Q.PATH], st = (t) => !I(t) && ue(t) && !U(t), re = (t) => ({
803
- [P.AND]: Object.keys(t).map((e) => ({
804
- [e]: t[e]
801
+ }, J = (s) => !!(s[P.AND] || s[P.OR]), ce = (s) => !!s[Q.PATH], ue = (s) => !F(s) && dt(s) && !J(s), ot = (s) => ({
802
+ [P.AND]: Object.keys(s).map((t) => ({
803
+ [t]: s[t]
805
804
  }))
806
805
  });
807
- function ge(t, e, { auto: s = !0 } = {}) {
808
- const n = (r) => {
809
- let i = Object.keys(r);
810
- const c = tt(r);
811
- if (!c && i.length > 1 && !U(r))
812
- return n(re(r));
813
- if (st(r)) {
814
- const o = c ? r[Q.PATH] : i[0], h = c ? r[Q.PATTERN] : r[o];
815
- if (!D(h))
816
- throw new Error(xe(o));
817
- const a = {
818
- keyId: H(o),
819
- pattern: h
806
+ function Et(s, t, { auto: e = !0 } = {}) {
807
+ const i = (o) => {
808
+ let r = Object.keys(o);
809
+ const n = ce(o);
810
+ if (!n && r.length > 1 && !J(o))
811
+ return i(ot(o));
812
+ if (ue(o)) {
813
+ const a = n ? o[Q.PATH] : r[0], l = n ? o[Q.PATTERN] : o[a];
814
+ if (!b(l))
815
+ throw new Error(Lt(a));
816
+ const u = {
817
+ keyId: V(a),
818
+ pattern: l
820
819
  };
821
- return s && (a.searcher = Y(h, e)), a;
820
+ return e && (u.searcher = U(l, t)), u;
822
821
  }
823
- let u = {
822
+ let c = {
824
823
  children: [],
825
- operator: i[0]
824
+ operator: r[0]
826
825
  };
827
- return i.forEach((o) => {
828
- const h = r[o];
829
- I(h) && h.forEach((a) => {
830
- u.children.push(n(a));
826
+ return r.forEach((a) => {
827
+ const l = o[a];
828
+ F(l) && l.forEach((u) => {
829
+ c.children.push(i(u));
831
830
  });
832
- }), u;
831
+ }), c;
833
832
  };
834
- return U(t) || (t = re(t)), n(t);
833
+ return J(s) || (s = ot(s)), i(s);
835
834
  }
836
- function nt(t, { ignoreFieldNorm: e = f.ignoreFieldNorm }) {
837
- t.forEach((s) => {
838
- let n = 1;
839
- s.matches.forEach(({ key: r, norm: i, score: c }) => {
840
- const u = r ? r.weight : null;
841
- n *= Math.pow(
842
- c === 0 && u ? Number.EPSILON : c,
843
- (u || 1) * (e ? 1 : i)
835
+ function ae(s, { ignoreFieldNorm: t = f.ignoreFieldNorm }) {
836
+ s.forEach((e) => {
837
+ let i = 1;
838
+ e.matches.forEach(({ key: o, norm: r, score: n }) => {
839
+ const c = o ? o.weight : null;
840
+ i *= Math.pow(
841
+ n === 0 && c ? Number.EPSILON : n,
842
+ (c || 1) * (t ? 1 : r)
844
843
  );
845
- }), s.score = n;
844
+ }), e.score = i;
846
845
  });
847
846
  }
848
- function rt(t, e) {
849
- const s = t.matches;
850
- e.matches = [], E(s) && s.forEach((n) => {
851
- if (!E(n.indices) || !n.indices.length)
847
+ function le(s, t) {
848
+ const e = s.matches;
849
+ t.matches = [], y(e) && e.forEach((i) => {
850
+ if (!y(i.indices) || !i.indices.length)
852
851
  return;
853
- const { indices: r, value: i } = n;
854
- let c = {
855
- indices: r,
856
- value: i
852
+ const { indices: o, value: r } = i;
853
+ let n = {
854
+ indices: o,
855
+ value: r
857
856
  };
858
- n.key && (c.key = n.key.src), n.idx > -1 && (c.refIndex = n.idx), e.matches.push(c);
857
+ i.key && (n.key = i.key.src), i.idx > -1 && (n.refIndex = i.idx), t.matches.push(n);
859
858
  });
860
859
  }
861
- function it(t, e) {
862
- e.score = t.score;
860
+ function he(s, t) {
861
+ t.score = s.score;
863
862
  }
864
- function ct(t, e, {
865
- includeMatches: s = f.includeMatches,
866
- includeScore: n = f.includeScore
863
+ function fe(s, t, {
864
+ includeMatches: e = f.includeMatches,
865
+ includeScore: i = f.includeScore
867
866
  } = {}) {
868
- const r = [];
869
- return s && r.push(rt), n && r.push(it), t.map((i) => {
870
- const { idx: c } = i, u = {
871
- item: e[c],
872
- refIndex: c
867
+ const o = [];
868
+ return e && o.push(le), i && o.push(he), s.map((r) => {
869
+ const { idx: n } = r, c = {
870
+ item: t[n],
871
+ refIndex: n
873
872
  };
874
- return r.length && r.forEach((o) => {
875
- o(i, u);
876
- }), u;
873
+ return o.length && o.forEach((a) => {
874
+ a(r, c);
875
+ }), c;
877
876
  });
878
877
  }
879
- class R {
880
- constructor(e, s = {}, n) {
881
- this.options = { ...f, ...s }, this.options.useExtendedSearch, this._keyStore = new ve(this.options.keys), this.setCollection(e, n);
882
- }
883
- setCollection(e, s) {
884
- if (this._docs = e, s && !(s instanceof X))
885
- throw new Error(_e);
886
- this._myIndex = s || he(this.options.keys, this._docs, {
878
+ class S {
879
+ constructor(t, e = {}, i) {
880
+ this.options = { ...f, ...e }, this.options.useExtendedSearch, this._keyStore = new Tt(this.options.keys), this.setCollection(t, i);
881
+ }
882
+ setCollection(t, e) {
883
+ if (this._docs = t, e && !(e instanceof q))
884
+ throw new Error(St);
885
+ this._myIndex = e || mt(this.options.keys, this._docs, {
887
886
  getFn: this.options.getFn,
888
887
  fieldNormWeight: this.options.fieldNormWeight
889
888
  });
890
889
  }
891
- add(e) {
892
- E(e) && (this._docs.push(e), this._myIndex.add(e));
890
+ add(t) {
891
+ y(t) && (this._docs.push(t), this._myIndex.add(t));
893
892
  }
894
- remove(e = () => !1) {
895
- const s = [];
896
- for (let n = 0, r = this._docs.length; n < r; n += 1) {
897
- const i = this._docs[n];
898
- e(i, n) && (this.removeAt(n), n -= 1, r -= 1, s.push(i));
893
+ remove(t = () => !1) {
894
+ const e = [];
895
+ for (let i = 0, o = this._docs.length; i < o; i += 1) {
896
+ const r = this._docs[i];
897
+ t(r, i) && (this.removeAt(i), i -= 1, o -= 1, e.push(r));
899
898
  }
900
- return s;
899
+ return e;
901
900
  }
902
- removeAt(e) {
903
- this._docs.splice(e, 1), this._myIndex.removeAt(e);
901
+ removeAt(t) {
902
+ this._docs.splice(t, 1), this._myIndex.removeAt(t);
904
903
  }
905
904
  getIndex() {
906
905
  return this._myIndex;
907
906
  }
908
- search(e, { limit: s = -1 } = {}) {
907
+ search(t, { limit: e = -1 } = {}) {
909
908
  const {
910
- includeMatches: n,
911
- includeScore: r,
912
- shouldSort: i,
913
- sortFn: c,
914
- ignoreFieldNorm: u
909
+ includeMatches: i,
910
+ includeScore: o,
911
+ shouldSort: r,
912
+ sortFn: n,
913
+ ignoreFieldNorm: c
915
914
  } = this.options;
916
- let o = D(e) ? D(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e);
917
- return nt(o, { ignoreFieldNorm: u }), i && o.sort(c), ce(s) && s > -1 && (o = o.slice(0, s)), ct(o, this._docs, {
918
- includeMatches: n,
919
- includeScore: r
915
+ let a = b(t) ? b(this._docs[0]) ? this._searchStringList(t) : this._searchObjectList(t) : this._searchLogical(t);
916
+ return ae(a, { ignoreFieldNorm: c }), r && a.sort(n), ft(e) && e > -1 && (a = a.slice(0, e)), fe(a, this._docs, {
917
+ includeMatches: i,
918
+ includeScore: o
920
919
  });
921
920
  }
922
- _searchStringList(e) {
923
- const s = Y(e, this.options), { records: n } = this._myIndex, r = [];
924
- return n.forEach(({ v: i, i: c, n: u }) => {
925
- if (!E(i))
921
+ _searchStringList(t) {
922
+ const e = U(t, this.options), { records: i } = this._myIndex, o = [];
923
+ return i.forEach(({ v: r, i: n, n: c }) => {
924
+ if (!y(r))
926
925
  return;
927
- const { isMatch: o, score: h, indices: a } = s.searchIn(i);
928
- o && r.push({
929
- item: i,
930
- idx: c,
931
- matches: [{ score: h, value: i, norm: u, indices: a }]
926
+ const { isMatch: a, score: l, indices: u } = e.searchIn(r);
927
+ a && o.push({
928
+ item: r,
929
+ idx: n,
930
+ matches: [{ score: l, value: r, norm: c, indices: u }]
932
931
  });
933
- }), r;
934
- }
935
- _searchLogical(e) {
936
- const s = ge(e, this.options), n = (u, o, h) => {
937
- if (!u.children) {
938
- const { keyId: l, searcher: d } = u, g = this._findMatches({
939
- key: this._keyStore.get(l),
940
- value: this._myIndex.getValueForItemAtKeyId(o, l),
932
+ }), o;
933
+ }
934
+ _searchLogical(t) {
935
+ const e = Et(t, this.options), i = (c, a, l) => {
936
+ if (!c.children) {
937
+ const { keyId: h, searcher: d } = c, p = this._findMatches({
938
+ key: this._keyStore.get(h),
939
+ value: this._myIndex.getValueForItemAtKeyId(a, h),
941
940
  searcher: d
942
941
  });
943
- return g && g.length ? [
942
+ return p && p.length ? [
944
943
  {
945
- idx: h,
946
- item: o,
947
- matches: g
944
+ idx: l,
945
+ item: a,
946
+ matches: p
948
947
  }
949
948
  ] : [];
950
949
  }
951
- const a = [];
952
- for (let l = 0, d = u.children.length; l < d; l += 1) {
953
- const g = u.children[l], p = n(g, o, h);
954
- if (p.length)
955
- a.push(...p);
956
- else if (u.operator === P.AND)
950
+ const u = [];
951
+ for (let h = 0, d = c.children.length; h < d; h += 1) {
952
+ const p = c.children[h], g = i(p, a, l);
953
+ if (g.length)
954
+ u.push(...g);
955
+ else if (c.operator === P.AND)
957
956
  return [];
958
957
  }
959
- return a;
960
- }, r = this._myIndex.records, i = {}, c = [];
961
- return r.forEach(({ $: u, i: o }) => {
962
- if (E(u)) {
963
- let h = n(s, u, o);
964
- h.length && (i[o] || (i[o] = { idx: o, item: u, matches: [] }, c.push(i[o])), h.forEach(({ matches: a }) => {
965
- i[o].matches.push(...a);
958
+ return u;
959
+ }, o = this._myIndex.records, r = {}, n = [];
960
+ return o.forEach(({ $: c, i: a }) => {
961
+ if (y(c)) {
962
+ let l = i(e, c, a);
963
+ l.length && (r[a] || (r[a] = { idx: a, item: c, matches: [] }, n.push(r[a])), l.forEach(({ matches: u }) => {
964
+ r[a].matches.push(...u);
966
965
  }));
967
966
  }
968
- }), c;
967
+ }), n;
969
968
  }
970
- _searchObjectList(e) {
971
- const s = Y(e, this.options), { keys: n, records: r } = this._myIndex, i = [];
972
- return r.forEach(({ $: c, i: u }) => {
973
- if (!E(c))
969
+ _searchObjectList(t) {
970
+ const e = U(t, this.options), { keys: i, records: o } = this._myIndex, r = [];
971
+ return o.forEach(({ $: n, i: c }) => {
972
+ if (!y(n))
974
973
  return;
975
- let o = [];
976
- n.forEach((h, a) => {
977
- o.push(
974
+ let a = [];
975
+ i.forEach((l, u) => {
976
+ a.push(
978
977
  ...this._findMatches({
979
- key: h,
980
- value: c[a],
981
- searcher: s
978
+ key: l,
979
+ value: n[u],
980
+ searcher: e
982
981
  })
983
982
  );
984
- }), o.length && i.push({
985
- idx: u,
986
- item: c,
987
- matches: o
983
+ }), a.length && r.push({
984
+ idx: c,
985
+ item: n,
986
+ matches: a
988
987
  });
989
- }), i;
988
+ }), r;
990
989
  }
991
- _findMatches({ key: e, value: s, searcher: n }) {
992
- if (!E(s))
990
+ _findMatches({ key: t, value: e, searcher: i }) {
991
+ if (!y(e))
993
992
  return [];
994
- let r = [];
995
- if (I(s))
996
- s.forEach(({ v: i, i: c, n: u }) => {
997
- if (!E(i))
993
+ let o = [];
994
+ if (F(e))
995
+ e.forEach(({ v: r, i: n, n: c }) => {
996
+ if (!y(r))
998
997
  return;
999
- const { isMatch: o, score: h, indices: a } = n.searchIn(i);
1000
- o && r.push({
1001
- score: h,
1002
- key: e,
1003
- value: i,
1004
- idx: c,
1005
- norm: u,
1006
- indices: a
998
+ const { isMatch: a, score: l, indices: u } = i.searchIn(r);
999
+ a && o.push({
1000
+ score: l,
1001
+ key: t,
1002
+ value: r,
1003
+ idx: n,
1004
+ norm: c,
1005
+ indices: u
1007
1006
  });
1008
1007
  });
1009
1008
  else {
1010
- const { v: i, n: c } = s, { isMatch: u, score: o, indices: h } = n.searchIn(i);
1011
- u && r.push({ score: o, key: e, value: i, norm: c, indices: h });
1009
+ const { v: r, n } = e, { isMatch: c, score: a, indices: l } = i.searchIn(r);
1010
+ c && o.push({ score: a, key: t, value: r, norm: n, indices: l });
1012
1011
  }
1013
- return r;
1012
+ return o;
1014
1013
  }
1015
1014
  }
1016
- R.version = "7.1.0";
1017
- R.createIndex = he;
1018
- R.parseIndex = Te;
1019
- R.config = f;
1020
- R.parseQuery = ge;
1021
- et(qe);
1022
- const ut = /* @__PURE__ */ J({
1015
+ S.version = "7.1.0";
1016
+ S.createIndex = mt;
1017
+ S.parseIndex = Vt;
1018
+ S.config = f;
1019
+ S.parseQuery = Et;
1020
+ re(oe);
1021
+ const de = /* @__PURE__ */ X({
1023
1022
  name: "RenderIconClass",
1024
1023
  props: {
1025
1024
  iconClass: {
@@ -1031,71 +1030,268 @@ const ut = /* @__PURE__ */ J({
1031
1030
  default: () => []
1032
1031
  }
1033
1032
  },
1034
- setup(t) {
1035
- const e = () => {
1033
+ setup(s) {
1034
+ const t = () => {
1036
1035
  const {
1037
- iconClass: s,
1038
- highlightChunks: n
1039
- } = t;
1040
- if (!s || n.length === 0)
1041
- return s;
1042
- const r = [];
1043
- let i = 0;
1044
- for (const [c, u] of n)
1045
- c > i && r.push(s.slice(i, c)), r.push(k("span", {
1036
+ iconClass: e,
1037
+ highlightChunks: i
1038
+ } = s;
1039
+ if (!e || i.length === 0)
1040
+ return e;
1041
+ const o = [];
1042
+ let r = 0;
1043
+ for (const [n, c] of i)
1044
+ n > r && o.push(e.slice(r, n)), o.push(L("span", {
1046
1045
  class: "highlight"
1047
- }, [s.slice(c, u + 1)])), i = u + 1;
1048
- return i < s.length && r.push(s.slice(i)), r;
1046
+ }, [e.slice(n, c + 1)])), r = c + 1;
1047
+ return r < e.length && o.push(e.slice(r)), o;
1049
1048
  };
1050
- return () => k("span", {
1049
+ return () => L("span", {
1051
1050
  class: "render-icon-class"
1052
- }, [e()]);
1051
+ }, [t()]);
1053
1052
  }
1054
1053
  });
1055
- function ot(t) {
1056
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1054
+ function wt(s) {
1055
+ return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
1057
1056
  }
1058
1057
  /*! clipboard-copy. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
1059
- var z, ie;
1060
- function at() {
1061
- if (ie) return z;
1062
- ie = 1, z = n;
1063
- function t() {
1058
+ var K, rt;
1059
+ function pe() {
1060
+ if (rt) return K;
1061
+ rt = 1, K = i;
1062
+ function s() {
1064
1063
  return new DOMException("The request is not allowed", "NotAllowedError");
1065
1064
  }
1066
- async function e(r) {
1065
+ async function t(o) {
1067
1066
  if (!navigator.clipboard)
1068
- throw t();
1069
- return navigator.clipboard.writeText(r);
1070
- }
1071
- async function s(r) {
1072
- const i = document.createElement("span");
1073
- i.textContent = r, i.style.whiteSpace = "pre", i.style.webkitUserSelect = "auto", i.style.userSelect = "all", document.body.appendChild(i);
1074
- const c = window.getSelection(), u = window.document.createRange();
1075
- c.removeAllRanges(), u.selectNode(i), c.addRange(u);
1076
- let o = !1;
1067
+ throw s();
1068
+ return navigator.clipboard.writeText(o);
1069
+ }
1070
+ async function e(o) {
1071
+ const r = document.createElement("span");
1072
+ r.textContent = o, r.style.whiteSpace = "pre", r.style.webkitUserSelect = "auto", r.style.userSelect = "all", document.body.appendChild(r);
1073
+ const n = window.getSelection(), c = window.document.createRange();
1074
+ n.removeAllRanges(), c.selectNode(r), n.addRange(c);
1075
+ let a = !1;
1077
1076
  try {
1078
- o = window.document.execCommand("copy");
1077
+ a = window.document.execCommand("copy");
1079
1078
  } finally {
1080
- c.removeAllRanges(), window.document.body.removeChild(i);
1079
+ n.removeAllRanges(), window.document.body.removeChild(r);
1081
1080
  }
1082
- if (!o) throw t();
1081
+ if (!a) throw s();
1083
1082
  }
1084
- async function n(r) {
1083
+ async function i(o) {
1085
1084
  try {
1086
- await e(r);
1087
- } catch (i) {
1085
+ await t(o);
1086
+ } catch (r) {
1088
1087
  try {
1089
- await s(r);
1090
- } catch (c) {
1091
- throw c || i || t();
1088
+ await e(o);
1089
+ } catch (n) {
1090
+ throw n || r || s();
1092
1091
  }
1093
1092
  }
1094
1093
  }
1095
- return z;
1094
+ return K;
1096
1095
  }
1097
- var ht = at();
1098
- const lt = /* @__PURE__ */ ot(ht), ft = /* @__PURE__ */ J({
1096
+ var ge = pe();
1097
+ const me = /* @__PURE__ */ wt(ge);
1098
+ var T = { exports: {} };
1099
+ /*!
1100
+ * Toastify js 1.12.0
1101
+ * https://github.com/apvarun/toastify-js
1102
+ * @license MIT licensed
1103
+ *
1104
+ * Copyright (C) 2018 Varun A P
1105
+ */
1106
+ var Ae = T.exports, ct;
1107
+ function Ce() {
1108
+ return ct || (ct = 1, (function(s) {
1109
+ (function(t, e) {
1110
+ s.exports ? s.exports = e() : t.Toastify = e();
1111
+ })(Ae, function(t) {
1112
+ var e = function(n) {
1113
+ return new e.lib.init(n);
1114
+ }, i = "1.12.0";
1115
+ e.defaults = {
1116
+ oldestFirst: !0,
1117
+ text: "Toastify is awesome!",
1118
+ node: void 0,
1119
+ duration: 3e3,
1120
+ selector: void 0,
1121
+ callback: function() {
1122
+ },
1123
+ destination: void 0,
1124
+ newWindow: !1,
1125
+ close: !1,
1126
+ gravity: "toastify-top",
1127
+ positionLeft: !1,
1128
+ position: "",
1129
+ backgroundColor: "",
1130
+ avatar: "",
1131
+ className: "",
1132
+ stopOnFocus: !0,
1133
+ onClick: function() {
1134
+ },
1135
+ offset: { x: 0, y: 0 },
1136
+ escapeMarkup: !0,
1137
+ ariaLive: "polite",
1138
+ style: { background: "" }
1139
+ }, e.lib = e.prototype = {
1140
+ toastify: i,
1141
+ constructor: e,
1142
+ // Initializing the object with required parameters
1143
+ init: function(n) {
1144
+ return n || (n = {}), this.options = {}, this.toastElement = null, this.options.text = n.text || e.defaults.text, this.options.node = n.node || e.defaults.node, this.options.duration = n.duration === 0 ? 0 : n.duration || e.defaults.duration, this.options.selector = n.selector || e.defaults.selector, this.options.callback = n.callback || e.defaults.callback, this.options.destination = n.destination || e.defaults.destination, this.options.newWindow = n.newWindow || e.defaults.newWindow, this.options.close = n.close || e.defaults.close, this.options.gravity = n.gravity === "bottom" ? "toastify-bottom" : e.defaults.gravity, this.options.positionLeft = n.positionLeft || e.defaults.positionLeft, this.options.position = n.position || e.defaults.position, this.options.backgroundColor = n.backgroundColor || e.defaults.backgroundColor, this.options.avatar = n.avatar || e.defaults.avatar, this.options.className = n.className || e.defaults.className, this.options.stopOnFocus = n.stopOnFocus === void 0 ? e.defaults.stopOnFocus : n.stopOnFocus, this.options.onClick = n.onClick || e.defaults.onClick, this.options.offset = n.offset || e.defaults.offset, this.options.escapeMarkup = n.escapeMarkup !== void 0 ? n.escapeMarkup : e.defaults.escapeMarkup, this.options.ariaLive = n.ariaLive || e.defaults.ariaLive, this.options.style = n.style || e.defaults.style, n.backgroundColor && (this.options.style.background = n.backgroundColor), this;
1145
+ },
1146
+ // Building the DOM element
1147
+ buildToast: function() {
1148
+ if (!this.options)
1149
+ throw "Toastify is not initialized";
1150
+ var n = document.createElement("div");
1151
+ n.className = "toastify on " + this.options.className, this.options.position ? n.className += " toastify-" + this.options.position : this.options.positionLeft === !0 ? (n.className += " toastify-left", console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")) : n.className += " toastify-right", n.className += " " + this.options.gravity, this.options.backgroundColor && console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');
1152
+ for (var c in this.options.style)
1153
+ n.style[c] = this.options.style[c];
1154
+ if (this.options.ariaLive && n.setAttribute("aria-live", this.options.ariaLive), this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE)
1155
+ n.appendChild(this.options.node);
1156
+ else if (this.options.escapeMarkup ? n.innerText = this.options.text : n.innerHTML = this.options.text, this.options.avatar !== "") {
1157
+ var a = document.createElement("img");
1158
+ a.src = this.options.avatar, a.className = "toastify-avatar", this.options.position == "left" || this.options.positionLeft === !0 ? n.appendChild(a) : n.insertAdjacentElement("afterbegin", a);
1159
+ }
1160
+ if (this.options.close === !0) {
1161
+ var l = document.createElement("button");
1162
+ l.type = "button", l.setAttribute("aria-label", "Close"), l.className = "toast-close", l.innerHTML = "&#10006;", l.addEventListener(
1163
+ "click",
1164
+ (function(A) {
1165
+ A.stopPropagation(), this.removeElement(this.toastElement), window.clearTimeout(this.toastElement.timeOutValue);
1166
+ }).bind(this)
1167
+ );
1168
+ var u = window.innerWidth > 0 ? window.innerWidth : screen.width;
1169
+ (this.options.position == "left" || this.options.positionLeft === !0) && u > 360 ? n.insertAdjacentElement("afterbegin", l) : n.appendChild(l);
1170
+ }
1171
+ if (this.options.stopOnFocus && this.options.duration > 0) {
1172
+ var h = this;
1173
+ n.addEventListener(
1174
+ "mouseover",
1175
+ function(A) {
1176
+ window.clearTimeout(n.timeOutValue);
1177
+ }
1178
+ ), n.addEventListener(
1179
+ "mouseleave",
1180
+ function() {
1181
+ n.timeOutValue = window.setTimeout(
1182
+ function() {
1183
+ h.removeElement(n);
1184
+ },
1185
+ h.options.duration
1186
+ );
1187
+ }
1188
+ );
1189
+ }
1190
+ if (typeof this.options.destination < "u" && n.addEventListener(
1191
+ "click",
1192
+ (function(A) {
1193
+ A.stopPropagation(), this.options.newWindow === !0 ? window.open(this.options.destination, "_blank") : window.location = this.options.destination;
1194
+ }).bind(this)
1195
+ ), typeof this.options.onClick == "function" && typeof this.options.destination > "u" && n.addEventListener(
1196
+ "click",
1197
+ (function(A) {
1198
+ A.stopPropagation(), this.options.onClick();
1199
+ }).bind(this)
1200
+ ), typeof this.options.offset == "object") {
1201
+ var d = o("x", this.options), p = o("y", this.options), g = this.options.position == "left" ? d : "-" + d, m = this.options.gravity == "toastify-top" ? p : "-" + p;
1202
+ n.style.transform = "translate(" + g + "," + m + ")";
1203
+ }
1204
+ return n;
1205
+ },
1206
+ // Displaying the toast
1207
+ showToast: function() {
1208
+ this.toastElement = this.buildToast();
1209
+ var n;
1210
+ if (typeof this.options.selector == "string" ? n = document.getElementById(this.options.selector) : this.options.selector instanceof HTMLElement || typeof ShadowRoot < "u" && this.options.selector instanceof ShadowRoot ? n = this.options.selector : n = document.body, !n)
1211
+ throw "Root element is not defined";
1212
+ var c = e.defaults.oldestFirst ? n.firstChild : n.lastChild;
1213
+ return n.insertBefore(this.toastElement, c), e.reposition(), this.options.duration > 0 && (this.toastElement.timeOutValue = window.setTimeout(
1214
+ (function() {
1215
+ this.removeElement(this.toastElement);
1216
+ }).bind(this),
1217
+ this.options.duration
1218
+ )), this;
1219
+ },
1220
+ hideToast: function() {
1221
+ this.toastElement.timeOutValue && clearTimeout(this.toastElement.timeOutValue), this.removeElement(this.toastElement);
1222
+ },
1223
+ // Removing the element from the DOM
1224
+ removeElement: function(n) {
1225
+ n.className = n.className.replace(" on", ""), window.setTimeout(
1226
+ (function() {
1227
+ this.options.node && this.options.node.parentNode && this.options.node.parentNode.removeChild(this.options.node), n.parentNode && n.parentNode.removeChild(n), this.options.callback.call(n), e.reposition();
1228
+ }).bind(this),
1229
+ 400
1230
+ );
1231
+ }
1232
+ }, e.reposition = function() {
1233
+ for (var n = {
1234
+ top: 15,
1235
+ bottom: 15
1236
+ }, c = {
1237
+ top: 15,
1238
+ bottom: 15
1239
+ }, a = {
1240
+ top: 15,
1241
+ bottom: 15
1242
+ }, l = document.getElementsByClassName("toastify"), u, h = 0; h < l.length; h++) {
1243
+ r(l[h], "toastify-top") === !0 ? u = "toastify-top" : u = "toastify-bottom";
1244
+ var d = l[h].offsetHeight;
1245
+ u = u.substr(9, u.length - 1);
1246
+ var p = 15, g = window.innerWidth > 0 ? window.innerWidth : screen.width;
1247
+ g <= 360 ? (l[h].style[u] = a[u] + "px", a[u] += d + p) : r(l[h], "toastify-left") === !0 ? (l[h].style[u] = n[u] + "px", n[u] += d + p) : (l[h].style[u] = c[u] + "px", c[u] += d + p);
1248
+ }
1249
+ return this;
1250
+ };
1251
+ function o(n, c) {
1252
+ return c.offset[n] ? isNaN(c.offset[n]) ? c.offset[n] : c.offset[n] + "px" : "0px";
1253
+ }
1254
+ function r(n, c) {
1255
+ return !n || typeof c != "string" ? !1 : !!(n.className && n.className.trim().split(/\s+/gi).indexOf(c) > -1);
1256
+ }
1257
+ return e.lib.init.prototype = e.lib, e;
1258
+ });
1259
+ })(T)), T.exports;
1260
+ }
1261
+ var ye = Ce();
1262
+ const ut = /* @__PURE__ */ wt(ye), at = {
1263
+ duration: 3e3,
1264
+ gravity: "top",
1265
+ position: "center",
1266
+ stopOnFocus: !0
1267
+ }, lt = {
1268
+ padding: "11px 15px",
1269
+ "box-shadow": "unset",
1270
+ "border-radius": "4px",
1271
+ "font-size": "14px"
1272
+ }, Ee = () => ({ success: (e) => {
1273
+ ut({
1274
+ ...at,
1275
+ text: e,
1276
+ style: {
1277
+ ...lt,
1278
+ background: "#f0f9eb",
1279
+ color: "#67c23a",
1280
+ border: "1px solid #e1f3d8"
1281
+ }
1282
+ }).showToast();
1283
+ }, error: (e) => {
1284
+ ut({
1285
+ ...at,
1286
+ text: e,
1287
+ style: {
1288
+ ...lt,
1289
+ background: "#fef0f0",
1290
+ color: "#f56c6c",
1291
+ border: "1px solid #fde2e2"
1292
+ }
1293
+ }).showToast();
1294
+ } }), ht = Ee(), we = /* @__PURE__ */ X({
1099
1295
  name: "RenderIcon",
1100
1296
  props: {
1101
1297
  iconInfo: {
@@ -1108,53 +1304,51 @@ const lt = /* @__PURE__ */ ot(ht), ft = /* @__PURE__ */ J({
1108
1304
  },
1109
1305
  copyHandler: Function
1110
1306
  },
1111
- setup(t) {
1112
- const e = async (n) => {
1113
- if (t.copyHandler) {
1114
- t.copyHandler(n);
1307
+ setup(s) {
1308
+ const t = async (i) => {
1309
+ if (s.copyHandler) {
1310
+ s.copyHandler(i);
1115
1311
  return;
1116
1312
  }
1117
- let r = "";
1313
+ let o = "";
1118
1314
  try {
1119
- await lt(n), r = "success";
1315
+ await me(i), o = "success";
1120
1316
  } catch {
1121
- r = "error";
1317
+ o = "error";
1122
1318
  }
1123
- Me({
1124
- message: `copy ${r} [${n}]`,
1125
- type: r
1126
- });
1127
- }, s = pe(() => t.iconInfo.baseClassName ? `${t.iconInfo.baseClassName} ${t.iconClass}` : t.iconClass);
1319
+ const r = `copy ${o} [${i}]`;
1320
+ o === "success" ? ht.success(r) : ht.error(r);
1321
+ }, e = vt(() => s.iconInfo.baseClassName ? `${s.iconInfo.baseClassName} ${s.iconClass}` : s.iconClass);
1128
1322
  return () => {
1129
- var n;
1130
- return k("span", {
1323
+ var i;
1324
+ return L("span", {
1131
1325
  class: "render-icon",
1132
- onClick: () => e(s.value)
1133
- }, [t.iconInfo.renderIcon ? t.iconInfo.renderIcon(s.value) : k("i", {
1134
- class: [t.iconInfo.baseClassName, t.iconClass]
1135
- }, null), k(ut, {
1136
- iconClass: t.iconClass,
1137
- "highlight-chunks": (n = t.iconInfo.matchesMap) == null ? void 0 : n.get(t.iconClass)
1326
+ onClick: () => t(e.value)
1327
+ }, [s.iconInfo.renderIcon ? s.iconInfo.renderIcon(e.value) : L("i", {
1328
+ class: [s.iconInfo.baseClassName, s.iconClass]
1329
+ }, null), L(de, {
1330
+ iconClass: s.iconClass,
1331
+ "highlight-chunks": (i = s.iconInfo.matchesMap) == null ? void 0 : i.get(s.iconClass)
1138
1332
  }, null)]);
1139
1333
  };
1140
1334
  }
1141
- }), dt = {
1335
+ }), ve = {
1142
1336
  getIconsInfo: {
1143
1337
  type: Function,
1144
1338
  required: !0
1145
1339
  },
1146
1340
  cssLinkFormat: {
1147
1341
  type: Function,
1148
- default: (t) => t
1342
+ default: (s) => s
1149
1343
  }
1150
- }, gt = { class: "render-icon-list" }, mt = /* @__PURE__ */ J({
1344
+ }, Me = { class: "render-icon-list" }, xe = /* @__PURE__ */ X({
1151
1345
  __name: "render-icon-list",
1152
- props: dt,
1153
- setup(t, { expose: e }) {
1154
- const s = t, n = N(), r = N(), i = N([]), c = N([]), u = (a) => {
1155
- n.value = a, r.value = a, i.value = a.map((l) => l.filePath), c.value = a.map((l) => ({
1156
- iconInfo: l,
1157
- fuse: new R(l.classNames, {
1346
+ props: ve,
1347
+ setup(s, { expose: t }) {
1348
+ const e = s, i = O(), o = O(), r = O([]), n = O([]), c = (u) => {
1349
+ i.value = u, o.value = u, r.value = u.map((h) => h.filePath), n.value = u.map((h) => ({
1350
+ iconInfo: h,
1351
+ fuse: new S(h.classNames, {
1158
1352
  /**
1159
1353
  * 搜索结果是否包含匹配的相关性分数,开启后会额外包含一个 score 字段,表示匹配的相似度分数
1160
1354
  * 0 表示完全匹配
@@ -1173,61 +1367,61 @@ const lt = /* @__PURE__ */ ot(ht), ft = /* @__PURE__ */ J({
1173
1367
  // 是否按分数对结果列表进行排序
1174
1368
  })
1175
1369
  }));
1176
- }, o = (a) => {
1177
- const l = document.querySelector("head");
1178
- if (!l) {
1370
+ }, a = (u) => {
1371
+ const h = document.querySelector("head");
1372
+ if (!h) {
1179
1373
  console.error("Head element not found");
1180
1374
  return;
1181
1375
  }
1182
1376
  const d = document.createDocumentFragment();
1183
- a.forEach((g) => {
1184
- if (!g.filePath) return;
1185
- const p = s.cssLinkFormat(g.filePath);
1186
- if (document.querySelector(`link[rel='stylesheet'][href='${p}']`))
1377
+ u.forEach((p) => {
1378
+ if (!p.filePath) return;
1379
+ const g = e.cssLinkFormat(p.filePath);
1380
+ if (document.querySelector(`link[rel='stylesheet'][href='${g}']`))
1187
1381
  return;
1188
- const A = document.createElement("link");
1189
- A.rel = "stylesheet", A.href = p, d.appendChild(A);
1190
- }), l.appendChild(d);
1382
+ const m = document.createElement("link");
1383
+ m.rel = "stylesheet", m.href = g, d.appendChild(m);
1384
+ }), h.appendChild(d);
1191
1385
  };
1192
- return Ae(async () => {
1193
- var l;
1194
- const a = await ((l = s.getIconsInfo) == null ? void 0 : l.call(s)) || [];
1195
- o(a), u(a);
1196
- }), e({
1197
- onSearch: (a) => {
1198
- const l = a.trim();
1199
- if (!n.value) return;
1200
- if (!l) {
1201
- i.value = n.value.map((g) => g.filePath), r.value = n.value;
1386
+ return Mt(async () => {
1387
+ var h;
1388
+ const u = await ((h = e.getIconsInfo) == null ? void 0 : h.call(e)) || [];
1389
+ a(u), c(u);
1390
+ }), t({
1391
+ onSearch: (u) => {
1392
+ const h = u.trim();
1393
+ if (!i.value) return;
1394
+ if (!h) {
1395
+ r.value = i.value.map((p) => p.filePath), o.value = i.value;
1202
1396
  return;
1203
1397
  }
1204
1398
  const d = [];
1205
- c.value.forEach(({ iconInfo: g, fuse: p }) => {
1206
- const A = p.search(l);
1207
- if (A.length) {
1208
- const C = /* @__PURE__ */ new Map(), M = [];
1209
- A.forEach((m) => {
1210
- const _ = m.matches || [], B = [];
1211
- _.forEach((T) => {
1212
- B.push(...T.indices);
1213
- }), C.set(m.item, B), M.push(m.item);
1399
+ n.value.forEach(({ iconInfo: p, fuse: g }) => {
1400
+ const m = g.search(h);
1401
+ if (m.length) {
1402
+ const A = /* @__PURE__ */ new Map(), w = [];
1403
+ m.forEach((C) => {
1404
+ const x = C.matches || [], M = [];
1405
+ x.forEach((j) => {
1406
+ M.push(...j.indices);
1407
+ }), A.set(C.item, M), w.push(C.item);
1214
1408
  }), d.push({
1215
- ...g,
1216
- matchesMap: C,
1217
- classNames: M
1409
+ ...p,
1410
+ matchesMap: A,
1411
+ classNames: w
1218
1412
  });
1219
1413
  }
1220
- }), r.value = d, i.value = d.map((g) => g.filePath);
1414
+ }), o.value = d, r.value = d.map((p) => p.filePath);
1221
1415
  }
1222
- }), (a, l) => (me(), Ce("div", gt, [
1223
- Ee(a.$slots, "default", {
1224
- iconsInfo: r.value,
1225
- renderIcon: ye(ft)
1416
+ }), (u, h) => (Ft(), bt("div", Me, [
1417
+ xt(u.$slots, "default", {
1418
+ iconsInfo: o.value,
1419
+ renderIcon: Bt(we)
1226
1420
  })
1227
1421
  ]));
1228
1422
  }
1229
1423
  });
1230
1424
  export {
1231
- mt as RenderIconList,
1232
- dt as renderIconListProps
1425
+ xe as RenderIconList,
1426
+ ve as renderIconListProps
1233
1427
  };