@paroicms/content-loading-plugin 0.1.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
const
|
|
2
|
-
equals:
|
|
1
|
+
const mt = (e, t) => e === t, me = Symbol("solid-proxy"), z = {
|
|
2
|
+
equals: mt
|
|
3
3
|
};
|
|
4
|
-
let
|
|
5
|
-
const T = 1,
|
|
4
|
+
let je = Xe;
|
|
5
|
+
const T = 1, ee = 2, Be = {
|
|
6
6
|
owned: null,
|
|
7
7
|
cleanups: null,
|
|
8
8
|
context: null,
|
|
9
9
|
owner: null
|
|
10
10
|
};
|
|
11
11
|
var w = null;
|
|
12
|
-
let
|
|
13
|
-
function
|
|
14
|
-
const n = b, r = w,
|
|
12
|
+
let fe = null, yt = null, b = null, R = null, k = null, se = 0;
|
|
13
|
+
function Me(e, t) {
|
|
14
|
+
const n = b, r = w, s = e.length === 0, i = t === void 0 ? r : t, a = s ? Be : {
|
|
15
15
|
owned: null,
|
|
16
16
|
cleanups: null,
|
|
17
17
|
context: i ? i.context : null,
|
|
18
18
|
owner: i
|
|
19
|
-
},
|
|
19
|
+
}, o = s ? e : () => e(() => I(() => oe(a)));
|
|
20
20
|
w = a, b = null;
|
|
21
21
|
try {
|
|
22
|
-
return N(
|
|
22
|
+
return N(o, !0);
|
|
23
23
|
} finally {
|
|
24
24
|
b = n, w = r;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
t = t ? Object.assign({},
|
|
27
|
+
function P(e, t) {
|
|
28
|
+
t = t ? Object.assign({}, z, t) : z;
|
|
29
29
|
const n = {
|
|
30
30
|
value: e,
|
|
31
31
|
observers: null,
|
|
32
32
|
observerSlots: null,
|
|
33
33
|
comparator: t.equals || void 0
|
|
34
|
-
}, r = (
|
|
35
|
-
return [
|
|
34
|
+
}, r = (s) => (typeof s == "function" && (s = s(n.value)), He(n, s));
|
|
35
|
+
return [Ke.bind(n), r];
|
|
36
36
|
}
|
|
37
37
|
function _(e, t, n) {
|
|
38
|
-
const r =
|
|
39
|
-
|
|
38
|
+
const r = Ae(e, t, !1, T);
|
|
39
|
+
K(r);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
const r =
|
|
44
|
-
r.user = !0, k ? k.push(r) :
|
|
41
|
+
function Se(e, t, n) {
|
|
42
|
+
je = $t;
|
|
43
|
+
const r = Ae(e, t, !1, T);
|
|
44
|
+
r.user = !0, k ? k.push(r) : K(r);
|
|
45
45
|
}
|
|
46
46
|
function E(e, t, n) {
|
|
47
|
-
n = n ? Object.assign({},
|
|
48
|
-
const r =
|
|
49
|
-
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0,
|
|
47
|
+
n = n ? Object.assign({}, z, n) : z;
|
|
48
|
+
const r = Ae(e, t, !0, 0);
|
|
49
|
+
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, K(r), Ke.bind(r);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function wt(e) {
|
|
52
52
|
return N(e, !1);
|
|
53
53
|
}
|
|
54
54
|
function I(e) {
|
|
@@ -61,39 +61,39 @@ function I(e) {
|
|
|
61
61
|
b = t;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function G(e, t, n) {
|
|
65
65
|
const r = Array.isArray(e);
|
|
66
|
-
let
|
|
66
|
+
let s, i = n && n.defer;
|
|
67
67
|
return (a) => {
|
|
68
|
-
let
|
|
68
|
+
let o;
|
|
69
69
|
if (r) {
|
|
70
|
-
|
|
71
|
-
for (let l = 0; l < e.length; l++)
|
|
72
|
-
} else
|
|
70
|
+
o = Array(e.length);
|
|
71
|
+
for (let l = 0; l < e.length; l++) o[l] = e[l]();
|
|
72
|
+
} else o = e();
|
|
73
73
|
if (i)
|
|
74
74
|
return i = !1, a;
|
|
75
|
-
const c = I(() => t(
|
|
76
|
-
return
|
|
75
|
+
const c = I(() => t(o, s, a));
|
|
76
|
+
return s = o, c;
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function De(e) {
|
|
80
80
|
return w === null || (w.cleanups === null ? w.cleanups = [e] : w.cleanups.push(e)), e;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function qe() {
|
|
83
83
|
return w;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Ve(e, t) {
|
|
86
86
|
const n = w, r = b;
|
|
87
87
|
w = e, b = null;
|
|
88
88
|
try {
|
|
89
89
|
return N(t, !0);
|
|
90
|
-
} catch (
|
|
91
|
-
|
|
90
|
+
} catch (s) {
|
|
91
|
+
Ee(s);
|
|
92
92
|
} finally {
|
|
93
93
|
w = n, b = r;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function vt(e) {
|
|
97
97
|
const t = b, n = w;
|
|
98
98
|
return Promise.resolve().then(() => {
|
|
99
99
|
b = t, w = n;
|
|
@@ -101,31 +101,31 @@ function wt(e) {
|
|
|
101
101
|
return N(e, !1), b = w = null, r ? r.done : void 0;
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function We(e, t) {
|
|
105
105
|
const n = Symbol("context");
|
|
106
106
|
return {
|
|
107
107
|
id: n,
|
|
108
|
-
Provider:
|
|
108
|
+
Provider: Et(n),
|
|
109
109
|
defaultValue: e
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Ge(e) {
|
|
113
113
|
let t;
|
|
114
114
|
return w && w.context && (t = w.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
const t = E(e), n = E(() =>
|
|
116
|
+
function $e(e) {
|
|
117
|
+
const t = E(e), n = E(() => ye(t()));
|
|
118
118
|
return n.toArray = () => {
|
|
119
119
|
const r = n();
|
|
120
120
|
return Array.isArray(r) ? r : r != null ? [r] : [];
|
|
121
121
|
}, n;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Ke() {
|
|
124
124
|
if (this.sources && this.state)
|
|
125
|
-
if (this.state === T)
|
|
125
|
+
if (this.state === T) K(this);
|
|
126
126
|
else {
|
|
127
127
|
const e = R;
|
|
128
|
-
R = null, N(() =>
|
|
128
|
+
R = null, N(() => ne(this), !1), R = e;
|
|
129
129
|
}
|
|
130
130
|
if (b) {
|
|
131
131
|
const e = this.observers ? this.observers.length : 0;
|
|
@@ -133,41 +133,41 @@ function Ge() {
|
|
|
133
133
|
}
|
|
134
134
|
return this.value;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function He(e, t, n) {
|
|
137
137
|
let r = e.value;
|
|
138
138
|
return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length && N(() => {
|
|
139
|
-
for (let
|
|
140
|
-
const i = e.observers[
|
|
141
|
-
a &&
|
|
139
|
+
for (let s = 0; s < e.observers.length; s += 1) {
|
|
140
|
+
const i = e.observers[s], a = fe && fe.running;
|
|
141
|
+
a && fe.disposed.has(i), (a ? !i.tState : !i.state) && (i.pure ? R.push(i) : k.push(i), i.observers && Qe(i)), a || (i.state = T);
|
|
142
142
|
}
|
|
143
143
|
if (R.length > 1e6)
|
|
144
144
|
throw R = [], new Error();
|
|
145
145
|
}, !1)), t;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function K(e) {
|
|
148
148
|
if (!e.fn) return;
|
|
149
149
|
oe(e);
|
|
150
|
-
const t =
|
|
151
|
-
|
|
150
|
+
const t = se;
|
|
151
|
+
bt(
|
|
152
152
|
e,
|
|
153
153
|
e.value,
|
|
154
154
|
t
|
|
155
155
|
);
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function bt(e, t, n) {
|
|
158
158
|
let r;
|
|
159
|
-
const
|
|
159
|
+
const s = w, i = b;
|
|
160
160
|
b = w = e;
|
|
161
161
|
try {
|
|
162
162
|
r = e.fn(t);
|
|
163
163
|
} catch (a) {
|
|
164
|
-
return e.pure && (e.state = T, e.owned && e.owned.forEach(oe), e.owned = null), e.updatedAt = n + 1,
|
|
164
|
+
return e.pure && (e.state = T, e.owned && e.owned.forEach(oe), e.owned = null), e.updatedAt = n + 1, Ee(a);
|
|
165
165
|
} finally {
|
|
166
|
-
b = i, w =
|
|
166
|
+
b = i, w = s;
|
|
167
167
|
}
|
|
168
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ?
|
|
168
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? He(e, r) : e.value = r, e.updatedAt = n);
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function Ae(e, t, n, r = T, s) {
|
|
171
171
|
const i = {
|
|
172
172
|
fn: e,
|
|
173
173
|
state: r,
|
|
@@ -181,74 +181,74 @@ function $e(e, t, n, r = T, o) {
|
|
|
181
181
|
context: w ? w.context : null,
|
|
182
182
|
pure: n
|
|
183
183
|
};
|
|
184
|
-
return w === null || w !==
|
|
184
|
+
return w === null || w !== Be && (w.owned ? w.owned.push(i) : w.owned = [i]), i;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function te(e) {
|
|
187
187
|
if (e.state === 0) return;
|
|
188
|
-
if (e.state ===
|
|
188
|
+
if (e.state === ee) return ne(e);
|
|
189
189
|
if (e.suspense && I(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
190
190
|
const t = [e];
|
|
191
|
-
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt <
|
|
191
|
+
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < se); )
|
|
192
192
|
e.state && t.push(e);
|
|
193
193
|
for (let n = t.length - 1; n >= 0; n--)
|
|
194
194
|
if (e = t[n], e.state === T)
|
|
195
|
-
|
|
196
|
-
else if (e.state ===
|
|
195
|
+
K(e);
|
|
196
|
+
else if (e.state === ee) {
|
|
197
197
|
const r = R;
|
|
198
|
-
R = null, N(() =>
|
|
198
|
+
R = null, N(() => ne(e, t[0]), !1), R = r;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
function N(e, t) {
|
|
202
202
|
if (R) return e();
|
|
203
203
|
let n = !1;
|
|
204
|
-
t || (R = []), k ? n = !0 : k = [],
|
|
204
|
+
t || (R = []), k ? n = !0 : k = [], se++;
|
|
205
205
|
try {
|
|
206
206
|
const r = e();
|
|
207
|
-
return
|
|
207
|
+
return St(n), r;
|
|
208
208
|
} catch (r) {
|
|
209
|
-
n || (k = null), R = null,
|
|
209
|
+
n || (k = null), R = null, Ee(r);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
function
|
|
213
|
-
if (R && (
|
|
212
|
+
function St(e) {
|
|
213
|
+
if (R && (Xe(R), R = null), e) return;
|
|
214
214
|
const t = k;
|
|
215
|
-
k = null, t.length && N(() =>
|
|
215
|
+
k = null, t.length && N(() => je(t), !1);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
for (let t = 0; t < e.length; t++)
|
|
217
|
+
function Xe(e) {
|
|
218
|
+
for (let t = 0; t < e.length; t++) te(e[t]);
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function $t(e) {
|
|
221
221
|
let t, n = 0;
|
|
222
222
|
for (t = 0; t < e.length; t++) {
|
|
223
223
|
const r = e[t];
|
|
224
|
-
r.user ? e[n++] = r :
|
|
224
|
+
r.user ? e[n++] = r : te(r);
|
|
225
225
|
}
|
|
226
|
-
for (t = 0; t < n; t++)
|
|
226
|
+
for (t = 0; t < n; t++) te(e[t]);
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function ne(e, t) {
|
|
229
229
|
e.state = 0;
|
|
230
230
|
for (let n = 0; n < e.sources.length; n += 1) {
|
|
231
231
|
const r = e.sources[n];
|
|
232
232
|
if (r.sources) {
|
|
233
|
-
const
|
|
234
|
-
|
|
233
|
+
const s = r.state;
|
|
234
|
+
s === T ? r !== t && (!r.updatedAt || r.updatedAt < se) && te(r) : s === ee && ne(r, t);
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function Qe(e) {
|
|
239
239
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
240
240
|
const n = e.observers[t];
|
|
241
|
-
n.state || (n.state =
|
|
241
|
+
n.state || (n.state = ee, n.pure ? R.push(n) : k.push(n), n.observers && Qe(n));
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
function oe(e) {
|
|
245
245
|
let t;
|
|
246
246
|
if (e.sources)
|
|
247
247
|
for (; e.sources.length; ) {
|
|
248
|
-
const n = e.sources.pop(), r = e.sourceSlots.pop(),
|
|
249
|
-
if (
|
|
250
|
-
const i =
|
|
251
|
-
r <
|
|
248
|
+
const n = e.sources.pop(), r = e.sourceSlots.pop(), s = n.observers;
|
|
249
|
+
if (s && s.length) {
|
|
250
|
+
const i = s.pop(), a = n.observerSlots.pop();
|
|
251
|
+
r < s.length && (i.sourceSlots[a] = r, s[r] = i, n.observerSlots[r] = a);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
if (e.owned) {
|
|
@@ -261,36 +261,36 @@ function oe(e) {
|
|
|
261
261
|
}
|
|
262
262
|
e.state = 0;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function At(e) {
|
|
265
265
|
return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
|
|
266
266
|
cause: e
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
|
-
function
|
|
270
|
-
throw
|
|
269
|
+
function Ee(e, t = w) {
|
|
270
|
+
throw At(e);
|
|
271
271
|
}
|
|
272
|
-
function
|
|
273
|
-
if (typeof e == "function" && !e.length) return
|
|
272
|
+
function ye(e) {
|
|
273
|
+
if (typeof e == "function" && !e.length) return ye(e());
|
|
274
274
|
if (Array.isArray(e)) {
|
|
275
275
|
const t = [];
|
|
276
276
|
for (let n = 0; n < e.length; n++) {
|
|
277
|
-
const r =
|
|
277
|
+
const r = ye(e[n]);
|
|
278
278
|
Array.isArray(r) ? t.push.apply(t, r) : t.push(r);
|
|
279
279
|
}
|
|
280
280
|
return t;
|
|
281
281
|
}
|
|
282
282
|
return e;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function Et(e, t) {
|
|
285
285
|
return function(r) {
|
|
286
|
-
let
|
|
286
|
+
let s;
|
|
287
287
|
return _(
|
|
288
|
-
() =>
|
|
288
|
+
() => s = I(() => (w.context = {
|
|
289
289
|
...w.context,
|
|
290
290
|
[e]: r.value
|
|
291
|
-
},
|
|
291
|
+
}, $e(() => r.children))),
|
|
292
292
|
void 0
|
|
293
|
-
),
|
|
293
|
+
), s;
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
296
|
function A(e, t) {
|
|
@@ -299,12 +299,12 @@ function A(e, t) {
|
|
|
299
299
|
function Q() {
|
|
300
300
|
return !0;
|
|
301
301
|
}
|
|
302
|
-
const
|
|
302
|
+
const Rt = {
|
|
303
303
|
get(e, t, n) {
|
|
304
|
-
return t ===
|
|
304
|
+
return t === me ? n : e.get(t);
|
|
305
305
|
},
|
|
306
306
|
has(e, t) {
|
|
307
|
-
return t ===
|
|
307
|
+
return t === me ? !0 : e.has(t);
|
|
308
308
|
},
|
|
309
309
|
set: Q,
|
|
310
310
|
deleteProperty: Q,
|
|
@@ -323,10 +323,10 @@ const Et = {
|
|
|
323
323
|
return e.keys();
|
|
324
324
|
}
|
|
325
325
|
};
|
|
326
|
-
function
|
|
326
|
+
function he(e) {
|
|
327
327
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function xt() {
|
|
330
330
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
331
331
|
const n = this[e]();
|
|
332
332
|
if (n !== void 0) return n;
|
|
@@ -335,78 +335,78 @@ function Rt() {
|
|
|
335
335
|
function Ct(...e) {
|
|
336
336
|
let t = !1;
|
|
337
337
|
for (let a = 0; a < e.length; a++) {
|
|
338
|
-
const
|
|
339
|
-
t = t || !!
|
|
338
|
+
const o = e[a];
|
|
339
|
+
t = t || !!o && me in o, e[a] = typeof o == "function" ? (t = !0, E(o)) : o;
|
|
340
340
|
}
|
|
341
341
|
if (t)
|
|
342
342
|
return new Proxy(
|
|
343
343
|
{
|
|
344
344
|
get(a) {
|
|
345
|
-
for (let
|
|
346
|
-
const c =
|
|
345
|
+
for (let o = e.length - 1; o >= 0; o--) {
|
|
346
|
+
const c = he(e[o])[a];
|
|
347
347
|
if (c !== void 0) return c;
|
|
348
348
|
}
|
|
349
349
|
},
|
|
350
350
|
has(a) {
|
|
351
|
-
for (let
|
|
352
|
-
if (a in
|
|
351
|
+
for (let o = e.length - 1; o >= 0; o--)
|
|
352
|
+
if (a in he(e[o])) return !0;
|
|
353
353
|
return !1;
|
|
354
354
|
},
|
|
355
355
|
keys() {
|
|
356
356
|
const a = [];
|
|
357
|
-
for (let
|
|
358
|
-
a.push(...Object.keys(
|
|
357
|
+
for (let o = 0; o < e.length; o++)
|
|
358
|
+
a.push(...Object.keys(he(e[o])));
|
|
359
359
|
return [...new Set(a)];
|
|
360
360
|
}
|
|
361
361
|
},
|
|
362
|
-
|
|
362
|
+
Rt
|
|
363
363
|
);
|
|
364
364
|
const n = {}, r = /* @__PURE__ */ Object.create(null);
|
|
365
365
|
for (let a = e.length - 1; a >= 0; a--) {
|
|
366
|
-
const
|
|
367
|
-
if (!
|
|
368
|
-
const c = Object.getOwnPropertyNames(
|
|
366
|
+
const o = e[a];
|
|
367
|
+
if (!o) continue;
|
|
368
|
+
const c = Object.getOwnPropertyNames(o);
|
|
369
369
|
for (let l = c.length - 1; l >= 0; l--) {
|
|
370
370
|
const u = c[l];
|
|
371
371
|
if (u === "__proto__" || u === "constructor") continue;
|
|
372
|
-
const h = Object.getOwnPropertyDescriptor(
|
|
372
|
+
const h = Object.getOwnPropertyDescriptor(o, u);
|
|
373
373
|
if (!r[u])
|
|
374
374
|
r[u] = h.get ? {
|
|
375
375
|
enumerable: !0,
|
|
376
376
|
configurable: !0,
|
|
377
|
-
get:
|
|
377
|
+
get: xt.bind(n[u] = [h.get.bind(o)])
|
|
378
378
|
} : h.value !== void 0 ? h : void 0;
|
|
379
379
|
else {
|
|
380
380
|
const p = n[u];
|
|
381
|
-
p && (h.get ? p.push(h.get.bind(
|
|
381
|
+
p && (h.get ? p.push(h.get.bind(o)) : h.value !== void 0 && p.push(() => h.value));
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
const
|
|
385
|
+
const s = {}, i = Object.keys(r);
|
|
386
386
|
for (let a = i.length - 1; a >= 0; a--) {
|
|
387
|
-
const
|
|
388
|
-
c && c.get ? Object.defineProperty(
|
|
387
|
+
const o = i[a], c = r[o];
|
|
388
|
+
c && c.get ? Object.defineProperty(s, o, c) : s[o] = c ? c.value : void 0;
|
|
389
389
|
}
|
|
390
|
-
return
|
|
390
|
+
return s;
|
|
391
391
|
}
|
|
392
392
|
const Lt = (e) => `Stale read from <${e}>.`;
|
|
393
|
-
function
|
|
393
|
+
function D(e) {
|
|
394
394
|
const t = e.keyed, n = E(() => e.when, void 0, {
|
|
395
|
-
equals: (r,
|
|
395
|
+
equals: (r, s) => t ? r === s : !r == !s
|
|
396
396
|
});
|
|
397
397
|
return E(
|
|
398
398
|
() => {
|
|
399
399
|
const r = n();
|
|
400
400
|
if (r) {
|
|
401
|
-
const
|
|
402
|
-
return typeof
|
|
403
|
-
() =>
|
|
401
|
+
const s = e.children;
|
|
402
|
+
return typeof s == "function" && s.length > 0 ? I(
|
|
403
|
+
() => s(
|
|
404
404
|
t ? r : () => {
|
|
405
405
|
if (!I(n)) throw Lt("Show");
|
|
406
406
|
return e.when;
|
|
407
407
|
}
|
|
408
408
|
)
|
|
409
|
-
) :
|
|
409
|
+
) : s;
|
|
410
410
|
}
|
|
411
411
|
return e.fallback;
|
|
412
412
|
},
|
|
@@ -415,82 +415,82 @@ function q(e) {
|
|
|
415
415
|
);
|
|
416
416
|
}
|
|
417
417
|
function Pt(e, t, n) {
|
|
418
|
-
let r = n.length,
|
|
419
|
-
for (; a <
|
|
420
|
-
if (t[a] === n[
|
|
421
|
-
a++,
|
|
418
|
+
let r = n.length, s = t.length, i = r, a = 0, o = 0, c = t[s - 1].nextSibling, l = null;
|
|
419
|
+
for (; a < s || o < i; ) {
|
|
420
|
+
if (t[a] === n[o]) {
|
|
421
|
+
a++, o++;
|
|
422
422
|
continue;
|
|
423
423
|
}
|
|
424
|
-
for (; t[
|
|
425
|
-
|
|
426
|
-
if (
|
|
427
|
-
const u = i < r ?
|
|
428
|
-
for (;
|
|
429
|
-
} else if (i ===
|
|
430
|
-
for (; a <
|
|
424
|
+
for (; t[s - 1] === n[i - 1]; )
|
|
425
|
+
s--, i--;
|
|
426
|
+
if (s === a) {
|
|
427
|
+
const u = i < r ? o ? n[o - 1].nextSibling : n[i - o] : c;
|
|
428
|
+
for (; o < i; ) e.insertBefore(n[o++], u);
|
|
429
|
+
} else if (i === o)
|
|
430
|
+
for (; a < s; )
|
|
431
431
|
(!l || !l.has(t[a])) && t[a].remove(), a++;
|
|
432
|
-
else if (t[a] === n[i - 1] && n[
|
|
433
|
-
const u = t[--
|
|
434
|
-
e.insertBefore(n[
|
|
432
|
+
else if (t[a] === n[i - 1] && n[o] === t[s - 1]) {
|
|
433
|
+
const u = t[--s].nextSibling;
|
|
434
|
+
e.insertBefore(n[o++], t[a++].nextSibling), e.insertBefore(n[--i], u), t[s] = n[i];
|
|
435
435
|
} else {
|
|
436
436
|
if (!l) {
|
|
437
437
|
l = /* @__PURE__ */ new Map();
|
|
438
|
-
let h =
|
|
438
|
+
let h = o;
|
|
439
439
|
for (; h < i; ) l.set(n[h], h++);
|
|
440
440
|
}
|
|
441
441
|
const u = l.get(t[a]);
|
|
442
442
|
if (u != null)
|
|
443
|
-
if (
|
|
443
|
+
if (o < u && u < i) {
|
|
444
444
|
let h = a, p = 1, m;
|
|
445
|
-
for (; ++h <
|
|
445
|
+
for (; ++h < s && h < i && !((m = l.get(t[h])) == null || m !== u + p); )
|
|
446
446
|
p++;
|
|
447
|
-
if (p > u -
|
|
447
|
+
if (p > u - o) {
|
|
448
448
|
const y = t[a];
|
|
449
|
-
for (;
|
|
450
|
-
} else e.replaceChild(n[
|
|
449
|
+
for (; o < u; ) e.insertBefore(n[o++], y);
|
|
450
|
+
} else e.replaceChild(n[o++], t[a++]);
|
|
451
451
|
} else a++;
|
|
452
452
|
else t[a++].remove();
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
const
|
|
457
|
-
function
|
|
458
|
-
let
|
|
459
|
-
return
|
|
460
|
-
|
|
456
|
+
const _e = "_$DX_DELEGATE";
|
|
457
|
+
function Re(e, t, n, r = {}) {
|
|
458
|
+
let s;
|
|
459
|
+
return Me((i) => {
|
|
460
|
+
s = i, t === document ? e() : L(t, e(), t.firstChild ? null : void 0, n);
|
|
461
461
|
}, r.owner), () => {
|
|
462
|
-
|
|
462
|
+
s(), t.textContent = "";
|
|
463
463
|
};
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function x(e, t, n) {
|
|
466
466
|
let r;
|
|
467
|
-
const
|
|
467
|
+
const s = () => {
|
|
468
468
|
const a = document.createElement("template");
|
|
469
469
|
return a.innerHTML = e, a.content.firstChild;
|
|
470
|
-
}, i = () => (r || (r =
|
|
470
|
+
}, i = () => (r || (r = s())).cloneNode(!0);
|
|
471
471
|
return i.cloneNode = i, i;
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
const n = t[
|
|
475
|
-
for (let r = 0,
|
|
473
|
+
function ie(e, t = window.document) {
|
|
474
|
+
const n = t[_e] || (t[_e] = /* @__PURE__ */ new Set());
|
|
475
|
+
for (let r = 0, s = e.length; r < s; r++) {
|
|
476
476
|
const i = e[r];
|
|
477
|
-
n.has(i) || (n.add(i), t.addEventListener(i,
|
|
477
|
+
n.has(i) || (n.add(i), t.addEventListener(i, _t));
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function ae(e, t, n) {
|
|
481
481
|
n == null ? e.removeAttribute(t) : e.setAttribute(t, n);
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function Je(e, t) {
|
|
484
484
|
t == null ? e.removeAttribute("class") : e.className = t;
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function Ot(e, t, n) {
|
|
487
487
|
return I(() => e(t, n));
|
|
488
488
|
}
|
|
489
|
-
function
|
|
490
|
-
if (n !== void 0 && !r && (r = []), typeof t != "function") return
|
|
491
|
-
_((
|
|
489
|
+
function L(e, t, n, r) {
|
|
490
|
+
if (n !== void 0 && !r && (r = []), typeof t != "function") return re(e, t, r, n);
|
|
491
|
+
_((s) => re(e, t(), s, n), r);
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function _t(e) {
|
|
494
494
|
const t = `$$${e.type}`;
|
|
495
495
|
let n = e.composedPath && e.composedPath()[0] || e.target;
|
|
496
496
|
for (e.target !== n && Object.defineProperty(e, "target", {
|
|
@@ -504,13 +504,13 @@ function Ot(e) {
|
|
|
504
504
|
}); n; ) {
|
|
505
505
|
const r = n[t];
|
|
506
506
|
if (r && !n.disabled) {
|
|
507
|
-
const
|
|
508
|
-
if (
|
|
507
|
+
const s = n[`${t}Data`];
|
|
508
|
+
if (s !== void 0 ? r.call(n, s, e) : r.call(n, e), e.cancelBubble) return;
|
|
509
509
|
}
|
|
510
510
|
n = n._$host || n.parentNode || n.host;
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function re(e, t, n, r, s) {
|
|
514
514
|
for (; typeof n == "function"; ) n = n();
|
|
515
515
|
if (t === n) return n;
|
|
516
516
|
const i = typeof t, a = r !== void 0;
|
|
@@ -518,264 +518,273 @@ function ne(e, t, n, r, o) {
|
|
|
518
518
|
if (i === "number" && (t = t.toString(), t === n))
|
|
519
519
|
return n;
|
|
520
520
|
if (a) {
|
|
521
|
-
let
|
|
522
|
-
|
|
521
|
+
let o = n[0];
|
|
522
|
+
o && o.nodeType === 3 ? o.data !== t && (o.data = t) : o = document.createTextNode(t), n = M(e, n, r, o);
|
|
523
523
|
} else
|
|
524
524
|
n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
|
|
525
525
|
} else if (t == null || i === "boolean")
|
|
526
|
-
n =
|
|
526
|
+
n = M(e, n, r);
|
|
527
527
|
else {
|
|
528
528
|
if (i === "function")
|
|
529
529
|
return _(() => {
|
|
530
|
-
let
|
|
531
|
-
for (; typeof
|
|
532
|
-
n =
|
|
530
|
+
let o = t();
|
|
531
|
+
for (; typeof o == "function"; ) o = o();
|
|
532
|
+
n = re(e, o, n, r);
|
|
533
533
|
}), () => n;
|
|
534
534
|
if (Array.isArray(t)) {
|
|
535
|
-
const
|
|
536
|
-
if (
|
|
537
|
-
return _(() => n =
|
|
538
|
-
if (
|
|
539
|
-
if (n =
|
|
540
|
-
} else c ? n.length === 0 ?
|
|
541
|
-
n =
|
|
535
|
+
const o = [], c = n && Array.isArray(n);
|
|
536
|
+
if (we(o, t, n, s))
|
|
537
|
+
return _(() => n = re(e, o, n, r, !0)), () => n;
|
|
538
|
+
if (o.length === 0) {
|
|
539
|
+
if (n = M(e, n, r), a) return n;
|
|
540
|
+
} else c ? n.length === 0 ? Ie(e, o, r) : Pt(e, n, o) : (n && M(e), Ie(e, o));
|
|
541
|
+
n = o;
|
|
542
542
|
} else if (t.nodeType) {
|
|
543
543
|
if (Array.isArray(n)) {
|
|
544
|
-
if (a) return n =
|
|
545
|
-
|
|
544
|
+
if (a) return n = M(e, n, r, t);
|
|
545
|
+
M(e, n, null, t);
|
|
546
546
|
} else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
547
547
|
n = t;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
return n;
|
|
551
551
|
}
|
|
552
|
-
function
|
|
553
|
-
let
|
|
552
|
+
function we(e, t, n, r) {
|
|
553
|
+
let s = !1;
|
|
554
554
|
for (let i = 0, a = t.length; i < a; i++) {
|
|
555
|
-
let
|
|
556
|
-
if (!(
|
|
557
|
-
e.push(
|
|
558
|
-
else if (Array.isArray(
|
|
559
|
-
|
|
555
|
+
let o = t[i], c = n && n[e.length], l;
|
|
556
|
+
if (!(o == null || o === !0 || o === !1)) if ((l = typeof o) == "object" && o.nodeType)
|
|
557
|
+
e.push(o);
|
|
558
|
+
else if (Array.isArray(o))
|
|
559
|
+
s = we(e, o, c) || s;
|
|
560
560
|
else if (l === "function")
|
|
561
561
|
if (r) {
|
|
562
|
-
for (; typeof
|
|
563
|
-
|
|
562
|
+
for (; typeof o == "function"; ) o = o();
|
|
563
|
+
s = we(
|
|
564
564
|
e,
|
|
565
|
-
Array.isArray(
|
|
565
|
+
Array.isArray(o) ? o : [o],
|
|
566
566
|
Array.isArray(c) ? c : [c]
|
|
567
|
-
) ||
|
|
567
|
+
) || s;
|
|
568
568
|
} else
|
|
569
|
-
e.push(
|
|
569
|
+
e.push(o), s = !0;
|
|
570
570
|
else {
|
|
571
|
-
const u = String(
|
|
571
|
+
const u = String(o);
|
|
572
572
|
c && c.nodeType === 3 && c.data === u ? e.push(c) : e.push(document.createTextNode(u));
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
return
|
|
575
|
+
return s;
|
|
576
576
|
}
|
|
577
|
-
function
|
|
578
|
-
for (let r = 0,
|
|
577
|
+
function Ie(e, t, n = null) {
|
|
578
|
+
for (let r = 0, s = t.length; r < s; r++) e.insertBefore(t[r], n);
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function M(e, t, n, r) {
|
|
581
581
|
if (n === void 0) return e.textContent = "";
|
|
582
|
-
const
|
|
582
|
+
const s = r || document.createTextNode("");
|
|
583
583
|
if (t.length) {
|
|
584
584
|
let i = !1;
|
|
585
585
|
for (let a = t.length - 1; a >= 0; a--) {
|
|
586
|
-
const
|
|
587
|
-
if (
|
|
588
|
-
const c =
|
|
589
|
-
!i && !a ? c ? e.replaceChild(
|
|
586
|
+
const o = t[a];
|
|
587
|
+
if (s !== o) {
|
|
588
|
+
const c = o.parentNode === e;
|
|
589
|
+
!i && !a ? c ? e.replaceChild(s, o) : e.insertBefore(s, n) : c && o.remove();
|
|
590
590
|
} else i = !0;
|
|
591
591
|
}
|
|
592
|
-
} else e.insertBefore(
|
|
593
|
-
return [
|
|
592
|
+
} else e.insertBefore(s, n);
|
|
593
|
+
return [s];
|
|
594
594
|
}
|
|
595
|
-
const
|
|
596
|
-
function
|
|
595
|
+
const It = !1;
|
|
596
|
+
function ve(e) {
|
|
597
597
|
return e.varName ? ` for '${e.varName}'` : "";
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function Ut(e) {
|
|
600
600
|
return (
|
|
601
601
|
// use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...
|
|
602
602
|
!isNaN(e) && !isNaN(parseFloat(e))
|
|
603
603
|
);
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function kt(e, t = {}) {
|
|
606
606
|
if (e == null || e === "" && !t.allowEmpty)
|
|
607
|
-
throw new Error(`Missing string value${
|
|
607
|
+
throw new Error(`Missing string value${ve(t)}`);
|
|
608
608
|
return typeof e == "string" ? e : e.toString();
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
return e == null || e === "" && !t.allowEmpty ? void 0 :
|
|
610
|
+
function J(e, t = {}) {
|
|
611
|
+
return e == null || e === "" && !t.allowEmpty ? void 0 : kt(e, t);
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Tt(e, t = {}) {
|
|
614
614
|
if (typeof e == "number")
|
|
615
615
|
return e;
|
|
616
616
|
if (e == null)
|
|
617
|
-
throw new Error(`Missing number value${
|
|
618
|
-
if (typeof e == "string" &&
|
|
617
|
+
throw new Error(`Missing number value${ve(t)}`);
|
|
618
|
+
if (typeof e == "string" && Ut(e))
|
|
619
619
|
return Number(e);
|
|
620
|
-
throw new Error(`Cannot convert to number the value of type '${typeof e}'${
|
|
620
|
+
throw new Error(`Cannot convert to number the value of type '${typeof e}'${ve(t)}`);
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
return e == null ? void 0 :
|
|
622
|
+
function Y(e, t = {}) {
|
|
623
|
+
return e == null ? void 0 : Tt(e, t);
|
|
624
624
|
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
const
|
|
625
|
+
function Nt(e) {
|
|
626
|
+
let t = e;
|
|
627
|
+
const n = t.indexOf("?");
|
|
628
|
+
n !== -1 && (t = t.substring(0, n));
|
|
629
|
+
const r = t.indexOf("#");
|
|
630
|
+
r !== -1 && (t = t.substring(0, r));
|
|
631
|
+
const s = t.lastIndexOf("/");
|
|
632
|
+
return s === -1 ? void 0 : t.slice(0, s);
|
|
633
|
+
}
|
|
634
|
+
const Ye = "/api/plugin/content-loading", Ze = Nt(import.meta.url);
|
|
635
|
+
async function Ft(e) {
|
|
636
|
+
const t = `${Ye}${e}`, n = await fetch(t);
|
|
628
637
|
if (n.status !== 200) throw new Error(`api error ${n.status}`);
|
|
629
638
|
return await n.text();
|
|
630
639
|
}
|
|
631
|
-
var
|
|
632
|
-
function
|
|
633
|
-
for (const [r,
|
|
640
|
+
var ze = (e) => e != null && (e = Object.getPrototypeOf(e), e === Array.prototype || e === Object.prototype);
|
|
641
|
+
function et(e, t, n) {
|
|
642
|
+
for (const [r, s] of Object.entries(t)) {
|
|
634
643
|
const i = `${n}.${r}`;
|
|
635
|
-
e[i] =
|
|
644
|
+
e[i] = s, ze(s) && et(e, s, i);
|
|
636
645
|
}
|
|
637
646
|
}
|
|
638
|
-
function
|
|
647
|
+
function jt(e) {
|
|
639
648
|
const t = { ...e };
|
|
640
649
|
for (const [n, r] of Object.entries(e))
|
|
641
|
-
|
|
650
|
+
ze(r) && et(t, r, n);
|
|
642
651
|
return t;
|
|
643
652
|
}
|
|
644
|
-
var
|
|
653
|
+
var Bt = (e, t) => {
|
|
645
654
|
if (t)
|
|
646
655
|
for (const [n, r] of Object.entries(t))
|
|
647
656
|
e = e.replace(new RegExp(`{{\\s*${n}\\s*}}`, "g"), r);
|
|
648
657
|
return e;
|
|
649
|
-
},
|
|
650
|
-
function
|
|
658
|
+
}, Mt = (e) => e;
|
|
659
|
+
function Dt(e, t = Mt) {
|
|
651
660
|
return (n, ...r) => {
|
|
652
661
|
n[0] === "." && (n = n.slice(1));
|
|
653
|
-
const
|
|
654
|
-
switch (typeof
|
|
662
|
+
const s = e()?.[n];
|
|
663
|
+
switch (typeof s) {
|
|
655
664
|
case "function":
|
|
656
|
-
return
|
|
665
|
+
return s(...r);
|
|
657
666
|
case "string":
|
|
658
|
-
return t(
|
|
667
|
+
return t(s, r[0]);
|
|
659
668
|
default:
|
|
660
|
-
return
|
|
669
|
+
return s;
|
|
661
670
|
}
|
|
662
671
|
};
|
|
663
672
|
}
|
|
664
|
-
const
|
|
673
|
+
const qt = {
|
|
665
674
|
nothingGet: "No results found for",
|
|
666
675
|
search: "Search"
|
|
667
|
-
}, Dt = {
|
|
668
|
-
loadMore: "Load more"
|
|
669
|
-
}, qt = {
|
|
670
|
-
searchApp: Mt,
|
|
671
|
-
infiniteLoading: Dt
|
|
672
676
|
}, Vt = {
|
|
677
|
+
loadMore: "Load more"
|
|
678
|
+
}, Wt = {
|
|
679
|
+
searchApp: qt,
|
|
680
|
+
infiniteLoading: Vt
|
|
681
|
+
}, Gt = {
|
|
673
682
|
nothingGet: "Aucun résultat trouvé pour",
|
|
674
683
|
search: "Rechercher"
|
|
675
|
-
},
|
|
684
|
+
}, Kt = {
|
|
676
685
|
loadMore: "Charger la suite"
|
|
677
|
-
},
|
|
678
|
-
searchApp:
|
|
679
|
-
infiniteLoading:
|
|
680
|
-
},
|
|
681
|
-
function
|
|
686
|
+
}, Ht = {
|
|
687
|
+
searchApp: Gt,
|
|
688
|
+
infiniteLoading: Kt
|
|
689
|
+
}, Ue = { en: Wt, fr: Ht };
|
|
690
|
+
function le(e) {
|
|
682
691
|
const t = E(() => {
|
|
683
|
-
const r = e in
|
|
684
|
-
return
|
|
692
|
+
const r = e in Ue ? e : "en";
|
|
693
|
+
return jt(Ue[r]);
|
|
685
694
|
});
|
|
686
|
-
return { t:
|
|
695
|
+
return { t: Dt(t, Bt) };
|
|
687
696
|
}
|
|
688
|
-
var
|
|
689
|
-
function
|
|
697
|
+
var Xt = /* @__PURE__ */ x("<button class=InfiniteLoading-btn type=button>"), Qt = /* @__PURE__ */ x("<div class=InfiniteLoading-actionArea>"), Jt = /* @__PURE__ */ x("<img class=InfiniteLoading-spinner width=50 height=50 alt=…>");
|
|
698
|
+
function Yt(e, {
|
|
690
699
|
language: t
|
|
691
700
|
}) {
|
|
692
|
-
const n =
|
|
693
|
-
if (!(n === void 0 || r === void 0 || i === void 0 ||
|
|
701
|
+
const n = Y(e.dataset.start), r = Y(e.dataset.total), s = Y(e.dataset.limit), i = J(e.dataset.parentId), a = J(e.dataset.template), o = J(e.dataset.labeledById);
|
|
702
|
+
if (!(n === void 0 || r === void 0 || i === void 0 || s === void 0 || a === void 0)) {
|
|
694
703
|
if (!t) throw new Error("Missing language");
|
|
695
|
-
|
|
704
|
+
Zt({
|
|
696
705
|
language: t,
|
|
697
|
-
limit:
|
|
706
|
+
limit: s,
|
|
698
707
|
parentId: i,
|
|
699
708
|
root: e,
|
|
700
709
|
start: n,
|
|
701
710
|
total: r,
|
|
702
711
|
templateName: a,
|
|
703
|
-
labeledById:
|
|
712
|
+
labeledById: o
|
|
704
713
|
});
|
|
705
714
|
}
|
|
706
715
|
}
|
|
707
|
-
function
|
|
716
|
+
function Zt({
|
|
708
717
|
language: e,
|
|
709
718
|
limit: t,
|
|
710
719
|
root: n,
|
|
711
720
|
start: r,
|
|
712
|
-
total:
|
|
721
|
+
total: s,
|
|
713
722
|
parentId: i,
|
|
714
723
|
templateName: a,
|
|
715
|
-
labeledById:
|
|
724
|
+
labeledById: o
|
|
716
725
|
}) {
|
|
717
726
|
const {
|
|
718
727
|
t: c
|
|
719
|
-
} =
|
|
728
|
+
} = le(e);
|
|
720
729
|
let l = r;
|
|
721
|
-
if (l >=
|
|
730
|
+
if (l >= s) return;
|
|
722
731
|
const u = (() => {
|
|
723
|
-
var y =
|
|
724
|
-
return y.$$click = m,
|
|
732
|
+
var y = Xt();
|
|
733
|
+
return y.$$click = m, L(y, () => c("infiniteLoading.loadMore")), y;
|
|
725
734
|
})(), h = (() => {
|
|
726
|
-
var y =
|
|
727
|
-
return
|
|
735
|
+
var y = Qt();
|
|
736
|
+
return L(y, u), y;
|
|
728
737
|
})(), p = (() => {
|
|
729
|
-
var y =
|
|
730
|
-
return
|
|
738
|
+
var y = Jt();
|
|
739
|
+
return ae(y, "src", `${Ze}/spinner.svg`), y;
|
|
731
740
|
})();
|
|
732
741
|
n.appendChild(h);
|
|
733
742
|
async function m() {
|
|
734
743
|
n.appendChild(p);
|
|
735
|
-
const y = await
|
|
744
|
+
const y = await zt({
|
|
736
745
|
limit: t,
|
|
737
746
|
newStart: l,
|
|
738
747
|
parentId: i,
|
|
739
748
|
templateName: a,
|
|
740
|
-
labeledById:
|
|
749
|
+
labeledById: o
|
|
741
750
|
});
|
|
742
751
|
for (const f of y)
|
|
743
752
|
n.insertBefore(f, h);
|
|
744
|
-
l += t, l >=
|
|
753
|
+
l += t, l >= s && h.remove(), p.remove();
|
|
745
754
|
}
|
|
746
755
|
}
|
|
747
|
-
async function
|
|
756
|
+
async function zt({
|
|
748
757
|
limit: e,
|
|
749
758
|
newStart: t,
|
|
750
759
|
parentId: n,
|
|
751
760
|
templateName: r,
|
|
752
|
-
labeledById:
|
|
761
|
+
labeledById: s
|
|
753
762
|
}) {
|
|
754
|
-
const i =
|
|
755
|
-
return c.innerHTML =
|
|
763
|
+
const i = s ? `?labeled=${encodeURIComponent(s)}` : "", a = `/partials?templateName=${encodeURIComponent(r)}&children-of=${encodeURIComponent(n)}&start=${encodeURIComponent(t)}&limit=${encodeURIComponent(e)}${i}`, o = await Ft(a), c = document.createElement("div");
|
|
764
|
+
return c.innerHTML = o, [...c.children];
|
|
756
765
|
}
|
|
757
|
-
|
|
758
|
-
function
|
|
766
|
+
ie(["click"]);
|
|
767
|
+
function tt() {
|
|
759
768
|
let e = /* @__PURE__ */ new Set();
|
|
760
|
-
function t(
|
|
761
|
-
return e.add(
|
|
769
|
+
function t(s) {
|
|
770
|
+
return e.add(s), () => e.delete(s);
|
|
762
771
|
}
|
|
763
772
|
let n = !1;
|
|
764
|
-
function r(
|
|
773
|
+
function r(s, i) {
|
|
765
774
|
if (n)
|
|
766
775
|
return !(n = !1);
|
|
767
776
|
const a = {
|
|
768
|
-
to:
|
|
777
|
+
to: s,
|
|
769
778
|
options: i,
|
|
770
779
|
defaultPrevented: !1,
|
|
771
780
|
preventDefault: () => a.defaultPrevented = !0
|
|
772
781
|
};
|
|
773
|
-
for (const
|
|
774
|
-
|
|
782
|
+
for (const o of e)
|
|
783
|
+
o.listener({
|
|
775
784
|
...a,
|
|
776
|
-
from:
|
|
785
|
+
from: o.location,
|
|
777
786
|
retry: (c) => {
|
|
778
|
-
c && (n = !0),
|
|
787
|
+
c && (n = !0), o.navigate(s, { ...i, resolve: !1 });
|
|
779
788
|
}
|
|
780
789
|
});
|
|
781
790
|
return !a.defaultPrevented;
|
|
@@ -785,61 +794,61 @@ function et() {
|
|
|
785
794
|
confirm: r
|
|
786
795
|
};
|
|
787
796
|
}
|
|
788
|
-
let
|
|
789
|
-
function
|
|
790
|
-
(!window.history.state || window.history.state._depth == null) && window.history.replaceState({ ...window.history.state, _depth: window.history.length - 1 }, ""),
|
|
797
|
+
let be;
|
|
798
|
+
function xe() {
|
|
799
|
+
(!window.history.state || window.history.state._depth == null) && window.history.replaceState({ ...window.history.state, _depth: window.history.length - 1 }, ""), be = window.history.state._depth;
|
|
791
800
|
}
|
|
792
|
-
|
|
793
|
-
function
|
|
801
|
+
xe();
|
|
802
|
+
function en(e) {
|
|
794
803
|
return {
|
|
795
804
|
...e,
|
|
796
805
|
_depth: window.history.state && window.history.state._depth
|
|
797
806
|
};
|
|
798
807
|
}
|
|
799
|
-
function
|
|
808
|
+
function tn(e, t) {
|
|
800
809
|
let n = !1;
|
|
801
810
|
return () => {
|
|
802
|
-
const r =
|
|
803
|
-
|
|
804
|
-
const
|
|
811
|
+
const r = be;
|
|
812
|
+
xe();
|
|
813
|
+
const s = r == null ? null : be - r;
|
|
805
814
|
if (n) {
|
|
806
815
|
n = !1;
|
|
807
816
|
return;
|
|
808
817
|
}
|
|
809
|
-
|
|
818
|
+
s && t(s) ? (n = !0, window.history.go(-s)) : e();
|
|
810
819
|
};
|
|
811
820
|
}
|
|
812
|
-
const
|
|
813
|
-
function
|
|
814
|
-
const n = e.replace(
|
|
821
|
+
const nn = /^(?:[a-z0-9]+:)?\/\//i, rn = /^\/+|(\/)\/+$/g, nt = "http://sr";
|
|
822
|
+
function W(e, t = !1) {
|
|
823
|
+
const n = e.replace(rn, "$1");
|
|
815
824
|
return n ? t || /^[?#]/.test(n) ? n : "/" + n : "";
|
|
816
825
|
}
|
|
817
|
-
function
|
|
818
|
-
if (
|
|
826
|
+
function Z(e, t, n) {
|
|
827
|
+
if (nn.test(t))
|
|
819
828
|
return;
|
|
820
|
-
const r =
|
|
829
|
+
const r = W(e), s = n && W(n);
|
|
821
830
|
let i = "";
|
|
822
|
-
return !
|
|
831
|
+
return !s || t.startsWith("/") ? i = r : s.toLowerCase().indexOf(r.toLowerCase()) !== 0 ? i = r + s : i = s, (i || "/") + W(t, !i);
|
|
823
832
|
}
|
|
824
|
-
function
|
|
833
|
+
function sn(e, t) {
|
|
825
834
|
if (e == null)
|
|
826
835
|
throw new Error(t);
|
|
827
836
|
return e;
|
|
828
837
|
}
|
|
829
|
-
function
|
|
830
|
-
return
|
|
838
|
+
function on(e, t) {
|
|
839
|
+
return W(e).replace(/\/*(\*.*)?$/g, "") + W(t);
|
|
831
840
|
}
|
|
832
|
-
function
|
|
841
|
+
function rt(e) {
|
|
833
842
|
const t = {};
|
|
834
843
|
return e.searchParams.forEach((n, r) => {
|
|
835
844
|
t[r] = n;
|
|
836
845
|
}), t;
|
|
837
846
|
}
|
|
838
|
-
function
|
|
839
|
-
const [r,
|
|
840
|
-
return (
|
|
841
|
-
const c =
|
|
842
|
-
if (l < 0 || l > 0 &&
|
|
847
|
+
function an(e, t, n) {
|
|
848
|
+
const [r, s] = e.split("/*", 2), i = r.split("/").filter(Boolean), a = i.length;
|
|
849
|
+
return (o) => {
|
|
850
|
+
const c = o.split("/").filter(Boolean), l = c.length - a;
|
|
851
|
+
if (l < 0 || l > 0 && s === void 0 && !t)
|
|
843
852
|
return null;
|
|
844
853
|
const u = {
|
|
845
854
|
path: a ? "" : "/",
|
|
@@ -847,35 +856,35 @@ function on(e, t, n) {
|
|
|
847
856
|
}, h = (p) => n === void 0 ? void 0 : n[p];
|
|
848
857
|
for (let p = 0; p < a; p++) {
|
|
849
858
|
const m = i[p], y = c[p], f = m[0] === ":", d = f ? m.slice(1) : m;
|
|
850
|
-
if (f &&
|
|
859
|
+
if (f && de(y, h(d)))
|
|
851
860
|
u.params[d] = y;
|
|
852
|
-
else if (f || !
|
|
861
|
+
else if (f || !de(y, m))
|
|
853
862
|
return null;
|
|
854
863
|
u.path += `/${y}`;
|
|
855
864
|
}
|
|
856
|
-
if (
|
|
865
|
+
if (s) {
|
|
857
866
|
const p = l ? c.slice(-l).join("/") : "";
|
|
858
|
-
if (
|
|
859
|
-
u.params[
|
|
867
|
+
if (de(p, h(s)))
|
|
868
|
+
u.params[s] = p;
|
|
860
869
|
else
|
|
861
870
|
return null;
|
|
862
871
|
}
|
|
863
872
|
return u;
|
|
864
873
|
};
|
|
865
874
|
}
|
|
866
|
-
function
|
|
875
|
+
function de(e, t) {
|
|
867
876
|
const n = (r) => r.localeCompare(e, void 0, { sensitivity: "base" }) === 0;
|
|
868
877
|
return t === void 0 ? !0 : typeof t == "string" ? n(t) : typeof t == "function" ? t(e) : Array.isArray(t) ? t.some(n) : t instanceof RegExp ? t.test(e) : !1;
|
|
869
878
|
}
|
|
870
|
-
function
|
|
879
|
+
function ln(e) {
|
|
871
880
|
const [t, n] = e.pattern.split("/*", 2), r = t.split("/").filter(Boolean);
|
|
872
|
-
return r.reduce((
|
|
881
|
+
return r.reduce((s, i) => s + (i.startsWith(":") ? 2 : 3), r.length - (n === void 0 ? 0 : 1));
|
|
873
882
|
}
|
|
874
|
-
function
|
|
875
|
-
const t = /* @__PURE__ */ new Map(), n =
|
|
883
|
+
function st(e) {
|
|
884
|
+
const t = /* @__PURE__ */ new Map(), n = qe();
|
|
876
885
|
return new Proxy({}, {
|
|
877
|
-
get(r,
|
|
878
|
-
return t.has(
|
|
886
|
+
get(r, s) {
|
|
887
|
+
return t.has(s) || Ve(n, () => t.set(s, E(() => e()[s]))), t.get(s)();
|
|
879
888
|
},
|
|
880
889
|
getOwnPropertyDescriptor() {
|
|
881
890
|
return {
|
|
@@ -893,41 +902,41 @@ function ot(e) {
|
|
|
893
902
|
if (!t)
|
|
894
903
|
return [e];
|
|
895
904
|
let n = e.slice(0, t.index), r = e.slice(t.index + t[0].length);
|
|
896
|
-
const
|
|
905
|
+
const s = [n, n += t[1]];
|
|
897
906
|
for (; t = /^(\/\:[^\/]+)\?/.exec(r); )
|
|
898
|
-
|
|
899
|
-
return ot(r).reduce((i, a) => [...i, ...
|
|
907
|
+
s.push(n += t[1]), r = r.slice(t[0].length);
|
|
908
|
+
return ot(r).reduce((i, a) => [...i, ...s.map((o) => o + a)], []);
|
|
900
909
|
}
|
|
901
|
-
const
|
|
902
|
-
function
|
|
903
|
-
const { component: n, preload: r, load:
|
|
910
|
+
const cn = 100, it = We(), at = We(), Ce = () => sn(Ge(it), "<A> and 'use' router primitives can be only used inside a Route."), lt = () => Ce().navigatorFactory(), un = () => Ce().location, fn = () => Ce().params;
|
|
911
|
+
function hn(e, t = "") {
|
|
912
|
+
const { component: n, preload: r, load: s, children: i, info: a } = e, o = !i || Array.isArray(i) && !i.length, c = {
|
|
904
913
|
key: e,
|
|
905
914
|
component: n,
|
|
906
|
-
preload: r ||
|
|
915
|
+
preload: r || s,
|
|
907
916
|
info: a
|
|
908
917
|
};
|
|
909
|
-
return
|
|
918
|
+
return ct(e.path).reduce((l, u) => {
|
|
910
919
|
for (const h of ot(u)) {
|
|
911
|
-
const p =
|
|
912
|
-
let m =
|
|
920
|
+
const p = on(t, h);
|
|
921
|
+
let m = o ? p : p.split("/*", 1)[0];
|
|
913
922
|
m = m.split("/").map((y) => y.startsWith(":") || y.startsWith("*") ? y : encodeURIComponent(y)).join("/"), l.push({
|
|
914
923
|
...c,
|
|
915
924
|
originalPath: u,
|
|
916
925
|
pattern: m,
|
|
917
|
-
matcher:
|
|
926
|
+
matcher: an(m, !o, e.matchFilters)
|
|
918
927
|
});
|
|
919
928
|
}
|
|
920
929
|
return l;
|
|
921
930
|
}, []);
|
|
922
931
|
}
|
|
923
|
-
function
|
|
932
|
+
function dn(e, t = 0) {
|
|
924
933
|
return {
|
|
925
934
|
routes: e,
|
|
926
|
-
score:
|
|
935
|
+
score: ln(e[e.length - 1]) * 1e4 - t,
|
|
927
936
|
matcher(n) {
|
|
928
937
|
const r = [];
|
|
929
|
-
for (let
|
|
930
|
-
const i = e[
|
|
938
|
+
for (let s = e.length - 1; s >= 0; s--) {
|
|
939
|
+
const i = e[s], a = i.matcher(n);
|
|
931
940
|
if (!a)
|
|
932
941
|
return null;
|
|
933
942
|
r.unshift({
|
|
@@ -939,23 +948,23 @@ function fn(e, t = 0) {
|
|
|
939
948
|
}
|
|
940
949
|
};
|
|
941
950
|
}
|
|
942
|
-
function
|
|
951
|
+
function ct(e) {
|
|
943
952
|
return Array.isArray(e) ? e : [e];
|
|
944
953
|
}
|
|
945
|
-
function
|
|
946
|
-
const
|
|
947
|
-
for (let i = 0, a =
|
|
948
|
-
const
|
|
949
|
-
if (
|
|
950
|
-
|
|
951
|
-
const c =
|
|
954
|
+
function ut(e, t = "", n = [], r = []) {
|
|
955
|
+
const s = ct(e);
|
|
956
|
+
for (let i = 0, a = s.length; i < a; i++) {
|
|
957
|
+
const o = s[i];
|
|
958
|
+
if (o && typeof o == "object") {
|
|
959
|
+
o.hasOwnProperty("path") || (o.path = "");
|
|
960
|
+
const c = hn(o, t);
|
|
952
961
|
for (const l of c) {
|
|
953
962
|
n.push(l);
|
|
954
|
-
const u = Array.isArray(
|
|
955
|
-
if (
|
|
956
|
-
|
|
963
|
+
const u = Array.isArray(o.children) && o.children.length === 0;
|
|
964
|
+
if (o.children && !u)
|
|
965
|
+
ut(o.children, l.pattern, n, r);
|
|
957
966
|
else {
|
|
958
|
-
const h =
|
|
967
|
+
const h = dn([...n], r.length);
|
|
959
968
|
r.push(h);
|
|
960
969
|
}
|
|
961
970
|
n.pop();
|
|
@@ -964,16 +973,16 @@ function ct(e, t = "", n = [], r = []) {
|
|
|
964
973
|
}
|
|
965
974
|
return n.length ? r : r.sort((i, a) => a.score - i.score);
|
|
966
975
|
}
|
|
967
|
-
function
|
|
976
|
+
function pe(e, t) {
|
|
968
977
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
969
|
-
const
|
|
970
|
-
if (
|
|
971
|
-
return
|
|
978
|
+
const s = e[n].matcher(t);
|
|
979
|
+
if (s)
|
|
980
|
+
return s;
|
|
972
981
|
}
|
|
973
982
|
return [];
|
|
974
983
|
}
|
|
975
|
-
function
|
|
976
|
-
const n = new URL(
|
|
984
|
+
function pn(e, t) {
|
|
985
|
+
const n = new URL(nt), r = E((c) => {
|
|
977
986
|
const l = e();
|
|
978
987
|
try {
|
|
979
988
|
return new URL(l, n);
|
|
@@ -982,10 +991,10 @@ function hn(e, t) {
|
|
|
982
991
|
}
|
|
983
992
|
}, n, {
|
|
984
993
|
equals: (c, l) => c.href === l.href
|
|
985
|
-
}),
|
|
994
|
+
}), s = E(() => r().pathname), i = E(() => r().search, !0), a = E(() => r().hash), o = () => "";
|
|
986
995
|
return {
|
|
987
996
|
get pathname() {
|
|
988
|
-
return
|
|
997
|
+
return s();
|
|
989
998
|
},
|
|
990
999
|
get search() {
|
|
991
1000
|
return i();
|
|
@@ -997,32 +1006,32 @@ function hn(e, t) {
|
|
|
997
1006
|
return t();
|
|
998
1007
|
},
|
|
999
1008
|
get key() {
|
|
1000
|
-
return
|
|
1009
|
+
return o();
|
|
1001
1010
|
},
|
|
1002
|
-
query:
|
|
1011
|
+
query: st(G(i, () => rt(r())))
|
|
1003
1012
|
};
|
|
1004
1013
|
}
|
|
1005
|
-
let
|
|
1006
|
-
function
|
|
1007
|
-
return
|
|
1014
|
+
let j;
|
|
1015
|
+
function gn() {
|
|
1016
|
+
return j;
|
|
1008
1017
|
}
|
|
1009
|
-
function
|
|
1010
|
-
const { signal: [
|
|
1018
|
+
function mn(e, t, n, r = {}) {
|
|
1019
|
+
const { signal: [s, i], utils: a = {} } = e, o = a.parsePath || ((v) => v), c = a.renderPath || ((v) => v), l = a.beforeLeave || tt(), u = Z("", r.base || "");
|
|
1011
1020
|
if (u === void 0)
|
|
1012
1021
|
throw new Error(`${u} is not a valid base path`);
|
|
1013
|
-
u && !
|
|
1014
|
-
const [h, p] =
|
|
1022
|
+
u && !s().value && i({ value: u, replace: !0, scroll: !1 });
|
|
1023
|
+
const [h, p] = P(!1);
|
|
1015
1024
|
let m;
|
|
1016
1025
|
const y = (v, $) => {
|
|
1017
|
-
$.value === f() && $.state === S() || (m === void 0 && p(!0),
|
|
1026
|
+
$.value === f() && $.state === S() || (m === void 0 && p(!0), j = v, m = $, vt(() => {
|
|
1018
1027
|
m === $ && (d(m.value), g(m.state), F[1]([]));
|
|
1019
1028
|
}).finally(() => {
|
|
1020
|
-
m === $ &&
|
|
1021
|
-
|
|
1029
|
+
m === $ && wt(() => {
|
|
1030
|
+
j = void 0, v === "navigate" && pt(m), p(!1), m = void 0;
|
|
1022
1031
|
});
|
|
1023
1032
|
}));
|
|
1024
|
-
}, [f, d] =
|
|
1025
|
-
const v =
|
|
1033
|
+
}, [f, d] = P(s().value), [S, g] = P(s().state), U = pn(f, S), C = [], F = P([]), q = E(() => typeof r.transformUrl == "function" ? pe(t(), r.transformUrl(U.pathname)) : pe(t(), U.pathname)), ft = st(() => {
|
|
1034
|
+
const v = q(), $ = {};
|
|
1026
1035
|
for (let O = 0; O < v.length; O++)
|
|
1027
1036
|
Object.assign($, v[O].params);
|
|
1028
1037
|
return $;
|
|
@@ -1031,87 +1040,89 @@ function pn(e, t, n, r = {}) {
|
|
|
1031
1040
|
path: () => u,
|
|
1032
1041
|
outlet: () => null,
|
|
1033
1042
|
resolvePath(v) {
|
|
1034
|
-
return
|
|
1043
|
+
return Z(u, v);
|
|
1035
1044
|
}
|
|
1036
1045
|
};
|
|
1037
|
-
return _(
|
|
1046
|
+
return _(G(s, (v) => y("native", v), { defer: !0 })), {
|
|
1038
1047
|
base: Le,
|
|
1039
1048
|
location: U,
|
|
1040
|
-
params:
|
|
1049
|
+
params: ft,
|
|
1041
1050
|
isRouting: h,
|
|
1042
1051
|
renderPath: c,
|
|
1043
|
-
parsePath:
|
|
1044
|
-
navigatorFactory:
|
|
1045
|
-
matches:
|
|
1052
|
+
parsePath: o,
|
|
1053
|
+
navigatorFactory: dt,
|
|
1054
|
+
matches: q,
|
|
1046
1055
|
beforeLeave: l,
|
|
1047
|
-
preloadRoute:
|
|
1056
|
+
preloadRoute: gt,
|
|
1048
1057
|
singleFlight: r.singleFlight === void 0 ? !0 : r.singleFlight,
|
|
1049
1058
|
submissions: F
|
|
1050
1059
|
};
|
|
1051
|
-
function
|
|
1060
|
+
function ht(v, $, O) {
|
|
1052
1061
|
I(() => {
|
|
1053
1062
|
if (typeof $ == "number") {
|
|
1054
1063
|
$ && (a.go ? a.go($) : console.warn("Router integration does not support relative routing"));
|
|
1055
1064
|
return;
|
|
1056
1065
|
}
|
|
1057
|
-
const { replace:
|
|
1066
|
+
const H = !$ || $[0] === "?", { replace: ce, resolve: B, scroll: ue, state: V } = {
|
|
1058
1067
|
replace: !1,
|
|
1059
|
-
resolve: !
|
|
1068
|
+
resolve: !H,
|
|
1060
1069
|
scroll: !0,
|
|
1061
1070
|
...O
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1071
|
+
};
|
|
1072
|
+
let Pe;
|
|
1073
|
+
const X = B ? v.resolvePath($) : Z(H && (Pe = s().value) && Pe.split("?")[0] || "", $);
|
|
1074
|
+
if (X === void 0)
|
|
1064
1075
|
throw new Error(`Path '${$}' is not a routable path`);
|
|
1065
|
-
if (
|
|
1076
|
+
if (C.length >= cn)
|
|
1066
1077
|
throw new Error("Too many redirects");
|
|
1067
|
-
const
|
|
1068
|
-
(
|
|
1069
|
-
value:
|
|
1070
|
-
state:
|
|
1078
|
+
const Oe = f();
|
|
1079
|
+
(X !== Oe || V !== S()) && (It || l.confirm(X, O) && (C.push({ value: Oe, replace: ce, scroll: ue, state: S() }), y("navigate", {
|
|
1080
|
+
value: X,
|
|
1081
|
+
state: V
|
|
1071
1082
|
})));
|
|
1072
1083
|
});
|
|
1073
1084
|
}
|
|
1074
|
-
function ht(v) {
|
|
1075
|
-
return v = v || We(it) || Le, ($, O) => ft(v, $, O);
|
|
1076
|
-
}
|
|
1077
1085
|
function dt(v) {
|
|
1078
|
-
|
|
1086
|
+
return v = v || Ge(at) || Le, ($, O) => ht(v, $, O);
|
|
1087
|
+
}
|
|
1088
|
+
function pt(v) {
|
|
1089
|
+
const $ = C[0];
|
|
1079
1090
|
$ && (i({
|
|
1080
1091
|
...v,
|
|
1081
1092
|
replace: $.replace,
|
|
1082
1093
|
scroll: $.scroll
|
|
1083
|
-
}),
|
|
1094
|
+
}), C.length = 0);
|
|
1084
1095
|
}
|
|
1085
|
-
function
|
|
1086
|
-
const O =
|
|
1087
|
-
|
|
1096
|
+
function gt(v, $ = {}) {
|
|
1097
|
+
const O = pe(t(), v.pathname), H = j;
|
|
1098
|
+
j = "preload";
|
|
1088
1099
|
for (let ce in O) {
|
|
1089
|
-
const { route:
|
|
1090
|
-
|
|
1091
|
-
const { preload:
|
|
1092
|
-
$.preloadData &&
|
|
1093
|
-
params:
|
|
1100
|
+
const { route: B, params: ue } = O[ce];
|
|
1101
|
+
B.component && B.component.preload && B.component.preload();
|
|
1102
|
+
const { preload: V } = B;
|
|
1103
|
+
$.preloadData && V && Ve(n(), () => V({
|
|
1104
|
+
params: ue,
|
|
1094
1105
|
location: {
|
|
1095
1106
|
pathname: v.pathname,
|
|
1096
1107
|
search: v.search,
|
|
1097
1108
|
hash: v.hash,
|
|
1098
|
-
query:
|
|
1109
|
+
query: rt(v),
|
|
1099
1110
|
state: null,
|
|
1100
1111
|
key: ""
|
|
1101
1112
|
},
|
|
1102
1113
|
intent: "preload"
|
|
1103
1114
|
}));
|
|
1104
1115
|
}
|
|
1105
|
-
|
|
1116
|
+
j = H;
|
|
1106
1117
|
}
|
|
1107
1118
|
}
|
|
1108
|
-
function
|
|
1109
|
-
const { base:
|
|
1119
|
+
function yn(e, t, n, r) {
|
|
1120
|
+
const { base: s, location: i, params: a } = e, { pattern: o, component: c, preload: l } = r().route, u = E(() => r().path);
|
|
1110
1121
|
c && c.preload && c.preload();
|
|
1111
|
-
const h = l ? l({ params: a, location: i, intent:
|
|
1122
|
+
const h = l ? l({ params: a, location: i, intent: j || "initial" }) : void 0;
|
|
1112
1123
|
return {
|
|
1113
1124
|
parent: t,
|
|
1114
|
-
pattern:
|
|
1125
|
+
pattern: o,
|
|
1115
1126
|
path: u,
|
|
1116
1127
|
outlet: () => c ? A(c, {
|
|
1117
1128
|
params: a,
|
|
@@ -1122,24 +1133,24 @@ function gn(e, t, n, r) {
|
|
|
1122
1133
|
}
|
|
1123
1134
|
}) : n(),
|
|
1124
1135
|
resolvePath(m) {
|
|
1125
|
-
return
|
|
1136
|
+
return Z(s.path(), m, u());
|
|
1126
1137
|
}
|
|
1127
1138
|
};
|
|
1128
1139
|
}
|
|
1129
|
-
const
|
|
1140
|
+
const wn = (e) => (t) => {
|
|
1130
1141
|
const {
|
|
1131
1142
|
base: n
|
|
1132
|
-
} = t, r =
|
|
1143
|
+
} = t, r = $e(() => t.children), s = E(() => ut(r(), t.base || ""));
|
|
1133
1144
|
let i;
|
|
1134
|
-
const a =
|
|
1145
|
+
const a = mn(e, s, () => i, {
|
|
1135
1146
|
base: n,
|
|
1136
1147
|
singleFlight: t.singleFlight,
|
|
1137
1148
|
transformUrl: t.transformUrl
|
|
1138
1149
|
});
|
|
1139
|
-
return e.create && e.create(a), A(
|
|
1150
|
+
return e.create && e.create(a), A(it.Provider, {
|
|
1140
1151
|
value: a,
|
|
1141
1152
|
get children() {
|
|
1142
|
-
return A(
|
|
1153
|
+
return A(vn, {
|
|
1143
1154
|
routerState: a,
|
|
1144
1155
|
get root() {
|
|
1145
1156
|
return t.root;
|
|
@@ -1148,10 +1159,10 @@ const mn = (e) => (t) => {
|
|
|
1148
1159
|
return t.rootPreload || t.rootLoad;
|
|
1149
1160
|
},
|
|
1150
1161
|
get children() {
|
|
1151
|
-
return [E(() => (i =
|
|
1162
|
+
return [E(() => (i = qe()) && null), A(bn, {
|
|
1152
1163
|
routerState: a,
|
|
1153
1164
|
get branches() {
|
|
1154
|
-
return
|
|
1165
|
+
return s();
|
|
1155
1166
|
}
|
|
1156
1167
|
})];
|
|
1157
1168
|
}
|
|
@@ -1159,15 +1170,15 @@ const mn = (e) => (t) => {
|
|
|
1159
1170
|
}
|
|
1160
1171
|
});
|
|
1161
1172
|
};
|
|
1162
|
-
function
|
|
1173
|
+
function vn(e) {
|
|
1163
1174
|
const t = e.routerState.location, n = e.routerState.params, r = E(() => e.preload && I(() => {
|
|
1164
1175
|
e.preload({
|
|
1165
1176
|
params: n,
|
|
1166
1177
|
location: t,
|
|
1167
|
-
intent:
|
|
1178
|
+
intent: gn() || "initial"
|
|
1168
1179
|
});
|
|
1169
1180
|
}));
|
|
1170
|
-
return A(
|
|
1181
|
+
return A(D, {
|
|
1171
1182
|
get when() {
|
|
1172
1183
|
return e.root;
|
|
1173
1184
|
},
|
|
@@ -1175,7 +1186,7 @@ function yn(e) {
|
|
|
1175
1186
|
get fallback() {
|
|
1176
1187
|
return e.children;
|
|
1177
1188
|
},
|
|
1178
|
-
children: (
|
|
1189
|
+
children: (s) => A(s, {
|
|
1179
1190
|
params: n,
|
|
1180
1191
|
location: t,
|
|
1181
1192
|
get data() {
|
|
@@ -1187,45 +1198,45 @@ function yn(e) {
|
|
|
1187
1198
|
})
|
|
1188
1199
|
});
|
|
1189
1200
|
}
|
|
1190
|
-
function
|
|
1201
|
+
function bn(e) {
|
|
1191
1202
|
const t = [];
|
|
1192
1203
|
let n;
|
|
1193
|
-
const r = E(
|
|
1194
|
-
let
|
|
1204
|
+
const r = E(G(e.routerState.matches, (s, i, a) => {
|
|
1205
|
+
let o = i && s.length === i.length;
|
|
1195
1206
|
const c = [];
|
|
1196
|
-
for (let l = 0, u =
|
|
1197
|
-
const h = i && i[l], p =
|
|
1198
|
-
a && h && p.route.key === h.route.key ? c[l] = a[l] : (
|
|
1199
|
-
t[l] = m, c[l] =
|
|
1207
|
+
for (let l = 0, u = s.length; l < u; l++) {
|
|
1208
|
+
const h = i && i[l], p = s[l];
|
|
1209
|
+
a && h && p.route.key === h.route.key ? c[l] = a[l] : (o = !1, t[l] && t[l](), Me((m) => {
|
|
1210
|
+
t[l] = m, c[l] = yn(e.routerState, c[l - 1] || e.routerState.base, ke(() => r()[l + 1]), () => e.routerState.matches()[l]);
|
|
1200
1211
|
}));
|
|
1201
1212
|
}
|
|
1202
|
-
return t.splice(
|
|
1213
|
+
return t.splice(s.length).forEach((l) => l()), a && o ? a : (n = c[0], c);
|
|
1203
1214
|
}));
|
|
1204
|
-
return
|
|
1215
|
+
return ke(() => r() && n)();
|
|
1205
1216
|
}
|
|
1206
|
-
const
|
|
1217
|
+
const ke = (e) => () => A(D, {
|
|
1207
1218
|
get when() {
|
|
1208
1219
|
return e();
|
|
1209
1220
|
},
|
|
1210
1221
|
keyed: !0,
|
|
1211
|
-
children: (t) => A(
|
|
1222
|
+
children: (t) => A(at.Provider, {
|
|
1212
1223
|
value: t,
|
|
1213
1224
|
get children() {
|
|
1214
1225
|
return t.outlet();
|
|
1215
1226
|
}
|
|
1216
1227
|
})
|
|
1217
|
-
}),
|
|
1218
|
-
const t =
|
|
1228
|
+
}), ge = (e) => {
|
|
1229
|
+
const t = $e(() => e.children);
|
|
1219
1230
|
return Ct(e, {
|
|
1220
1231
|
get children() {
|
|
1221
1232
|
return t();
|
|
1222
1233
|
}
|
|
1223
1234
|
});
|
|
1224
1235
|
};
|
|
1225
|
-
function
|
|
1226
|
-
return [e, r ? (
|
|
1236
|
+
function Sn([e, t], n, r) {
|
|
1237
|
+
return [e, r ? (s) => t(r(s)) : t];
|
|
1227
1238
|
}
|
|
1228
|
-
function
|
|
1239
|
+
function $n(e) {
|
|
1229
1240
|
if (e === "#")
|
|
1230
1241
|
return null;
|
|
1231
1242
|
try {
|
|
@@ -1234,45 +1245,45 @@ function bn(e) {
|
|
|
1234
1245
|
return null;
|
|
1235
1246
|
}
|
|
1236
1247
|
}
|
|
1237
|
-
function
|
|
1248
|
+
function An(e) {
|
|
1238
1249
|
let t = !1;
|
|
1239
|
-
const n = (
|
|
1240
|
-
equals: (
|
|
1241
|
-
}), void 0, (
|
|
1242
|
-
return e.init &&
|
|
1243
|
-
t = !0, r[1](n(
|
|
1244
|
-
})),
|
|
1250
|
+
const n = (s) => typeof s == "string" ? { value: s } : s, r = Sn(P(n(e.get()), {
|
|
1251
|
+
equals: (s, i) => s.value === i.value && s.state === i.state
|
|
1252
|
+
}), void 0, (s) => (!t && e.set(s), s));
|
|
1253
|
+
return e.init && De(e.init((s = e.get()) => {
|
|
1254
|
+
t = !0, r[1](n(s)), t = !1;
|
|
1255
|
+
})), wn({
|
|
1245
1256
|
signal: r,
|
|
1246
1257
|
create: e.create,
|
|
1247
1258
|
utils: e.utils
|
|
1248
1259
|
});
|
|
1249
1260
|
}
|
|
1250
|
-
function
|
|
1261
|
+
function En(e, t, n) {
|
|
1251
1262
|
return e.addEventListener(t, n), () => e.removeEventListener(t, n);
|
|
1252
1263
|
}
|
|
1253
|
-
function
|
|
1254
|
-
const n =
|
|
1264
|
+
function Rn(e, t) {
|
|
1265
|
+
const n = $n(`#${e}`);
|
|
1255
1266
|
n ? n.scrollIntoView() : t && window.scrollTo(0, 0);
|
|
1256
1267
|
}
|
|
1257
|
-
const
|
|
1258
|
-
function
|
|
1259
|
-
return (
|
|
1260
|
-
const i =
|
|
1261
|
-
let
|
|
1268
|
+
const xn = /* @__PURE__ */ new Map();
|
|
1269
|
+
function Cn(e = !0, t = !1, n = "/_server", r) {
|
|
1270
|
+
return (s) => {
|
|
1271
|
+
const i = s.base.path(), a = s.navigatorFactory(s.base);
|
|
1272
|
+
let o = {};
|
|
1262
1273
|
function c(f) {
|
|
1263
1274
|
return f.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1264
1275
|
}
|
|
1265
1276
|
function l(f) {
|
|
1266
1277
|
if (f.defaultPrevented || f.button !== 0 || f.metaKey || f.altKey || f.ctrlKey || f.shiftKey)
|
|
1267
1278
|
return;
|
|
1268
|
-
const d = f.composedPath().find((
|
|
1279
|
+
const d = f.composedPath().find((q) => q instanceof Node && q.nodeName.toUpperCase() === "A");
|
|
1269
1280
|
if (!d || t && !d.hasAttribute("link"))
|
|
1270
1281
|
return;
|
|
1271
1282
|
const S = c(d), g = S ? d.href.baseVal : d.href;
|
|
1272
1283
|
if ((S ? d.target.baseVal : d.target) || !g && !d.hasAttribute("state"))
|
|
1273
1284
|
return;
|
|
1274
|
-
const
|
|
1275
|
-
if (d.hasAttribute("download") ||
|
|
1285
|
+
const C = (d.getAttribute("rel") || "").split(/\s+/);
|
|
1286
|
+
if (d.hasAttribute("download") || C && C.includes("external"))
|
|
1276
1287
|
return;
|
|
1277
1288
|
const F = S ? new URL(g, document.baseURI) : new URL(g);
|
|
1278
1289
|
if (!(F.origin !== window.location.origin || i && F.pathname && !F.pathname.toLowerCase().startsWith(i.toLowerCase())))
|
|
@@ -1282,12 +1293,12 @@ function Rn(e = !0, t = !1, n = "/_server", r) {
|
|
|
1282
1293
|
const d = l(f);
|
|
1283
1294
|
if (!d)
|
|
1284
1295
|
return;
|
|
1285
|
-
const [S, g] = d, U =
|
|
1296
|
+
const [S, g] = d, U = s.parsePath(g.pathname + g.search + g.hash), C = S.getAttribute("state");
|
|
1286
1297
|
f.preventDefault(), a(U, {
|
|
1287
1298
|
resolve: !1,
|
|
1288
1299
|
replace: S.hasAttribute("replace"),
|
|
1289
1300
|
scroll: !S.hasAttribute("noscroll"),
|
|
1290
|
-
state:
|
|
1301
|
+
state: C && JSON.parse(C)
|
|
1291
1302
|
});
|
|
1292
1303
|
}
|
|
1293
1304
|
function h(f) {
|
|
@@ -1295,15 +1306,15 @@ function Rn(e = !0, t = !1, n = "/_server", r) {
|
|
|
1295
1306
|
if (!d)
|
|
1296
1307
|
return;
|
|
1297
1308
|
const [S, g] = d;
|
|
1298
|
-
|
|
1309
|
+
o[g.pathname] || s.preloadRoute(g, { preloadData: S.getAttribute("preload") !== "false" });
|
|
1299
1310
|
}
|
|
1300
1311
|
function p(f) {
|
|
1301
1312
|
const d = l(f);
|
|
1302
1313
|
if (!d)
|
|
1303
1314
|
return;
|
|
1304
1315
|
const [S, g] = d;
|
|
1305
|
-
|
|
1306
|
-
|
|
1316
|
+
o[g.pathname] || (o[g.pathname] = setTimeout(() => {
|
|
1317
|
+
s.preloadRoute(g, { preloadData: S.getAttribute("preload") !== "false" }), delete o[g.pathname];
|
|
1307
1318
|
}, 200));
|
|
1308
1319
|
}
|
|
1309
1320
|
function m(f) {
|
|
@@ -1311,7 +1322,7 @@ function Rn(e = !0, t = !1, n = "/_server", r) {
|
|
|
1311
1322
|
if (!d)
|
|
1312
1323
|
return;
|
|
1313
1324
|
const [, S] = d;
|
|
1314
|
-
|
|
1325
|
+
o[S.pathname] && (clearTimeout(o[S.pathname]), delete o[S.pathname]);
|
|
1315
1326
|
}
|
|
1316
1327
|
function y(f) {
|
|
1317
1328
|
if (f.defaultPrevented)
|
|
@@ -1320,25 +1331,25 @@ function Rn(e = !0, t = !1, n = "/_server", r) {
|
|
|
1320
1331
|
if (!d)
|
|
1321
1332
|
return;
|
|
1322
1333
|
if (!d.startsWith("https://action/")) {
|
|
1323
|
-
const g = new URL(d,
|
|
1324
|
-
if (d =
|
|
1334
|
+
const g = new URL(d, nt);
|
|
1335
|
+
if (d = s.parsePath(g.pathname + g.search), !d.startsWith(n))
|
|
1325
1336
|
return;
|
|
1326
1337
|
}
|
|
1327
1338
|
if (f.target.method.toUpperCase() !== "POST")
|
|
1328
1339
|
throw new Error("Only POST forms are supported for Actions");
|
|
1329
|
-
const S =
|
|
1340
|
+
const S = xn.get(d);
|
|
1330
1341
|
if (S) {
|
|
1331
1342
|
f.preventDefault();
|
|
1332
1343
|
const g = new FormData(f.target, f.submitter);
|
|
1333
|
-
S.call({ r:
|
|
1344
|
+
S.call({ r: s, f: f.target }, f.target.enctype === "multipart/form-data" ? g : new URLSearchParams(g));
|
|
1334
1345
|
}
|
|
1335
1346
|
}
|
|
1336
|
-
|
|
1347
|
+
ie(["click", "submit"]), document.addEventListener("click", u), e && (document.addEventListener("mouseover", p), document.addEventListener("mouseout", m), document.addEventListener("focusin", h), document.addEventListener("touchstart", h)), document.addEventListener("submit", y), De(() => {
|
|
1337
1348
|
document.removeEventListener("click", u), e && (document.removeEventListener("mouseover", p), document.removeEventListener("mouseout", m), document.removeEventListener("focusin", h), document.removeEventListener("touchstart", h)), document.removeEventListener("submit", y);
|
|
1338
1349
|
});
|
|
1339
1350
|
};
|
|
1340
1351
|
}
|
|
1341
|
-
function
|
|
1352
|
+
function Ln(e) {
|
|
1342
1353
|
const t = e.replace(/^.*?#/, "");
|
|
1343
1354
|
if (!t.startsWith("/")) {
|
|
1344
1355
|
const [, n = "/"] = window.location.hash.split("#", 2);
|
|
@@ -1346,51 +1357,51 @@ function Cn(e) {
|
|
|
1346
1357
|
}
|
|
1347
1358
|
return t;
|
|
1348
1359
|
}
|
|
1349
|
-
function
|
|
1350
|
-
const t = () => window.location.hash.slice(1), n =
|
|
1351
|
-
return
|
|
1360
|
+
function Pn(e) {
|
|
1361
|
+
const t = () => window.location.hash.slice(1), n = tt();
|
|
1362
|
+
return An({
|
|
1352
1363
|
get: t,
|
|
1353
|
-
set({ value: r, replace:
|
|
1354
|
-
|
|
1355
|
-
const
|
|
1356
|
-
|
|
1364
|
+
set({ value: r, replace: s, scroll: i, state: a }) {
|
|
1365
|
+
s ? window.history.replaceState(en(a), "", "#" + r) : window.history.pushState(a, "", "#" + r);
|
|
1366
|
+
const o = r.indexOf("#"), c = o >= 0 ? r.slice(o + 1) : "";
|
|
1367
|
+
Rn(c, i), xe();
|
|
1357
1368
|
},
|
|
1358
|
-
init: (r) =>
|
|
1359
|
-
create:
|
|
1369
|
+
init: (r) => En(window, "hashchange", tn(r, (s) => !n.confirm(s && s < 0 ? s : t()))),
|
|
1370
|
+
create: Cn(e.preload, e.explicitLinks, e.actionBase),
|
|
1360
1371
|
utils: {
|
|
1361
1372
|
go: (r) => window.history.go(r),
|
|
1362
1373
|
renderPath: (r) => `#${r}`,
|
|
1363
|
-
parsePath:
|
|
1374
|
+
parsePath: Ln,
|
|
1364
1375
|
beforeLeave: n
|
|
1365
1376
|
}
|
|
1366
1377
|
})(e);
|
|
1367
1378
|
}
|
|
1368
|
-
function
|
|
1369
|
-
const t =
|
|
1379
|
+
function On(e) {
|
|
1380
|
+
const t = lt(), n = un(), {
|
|
1370
1381
|
href: r,
|
|
1371
|
-
state:
|
|
1382
|
+
state: s
|
|
1372
1383
|
} = e, i = typeof r == "function" ? r({
|
|
1373
1384
|
navigate: t,
|
|
1374
1385
|
location: n
|
|
1375
1386
|
}) : r;
|
|
1376
1387
|
return t(i, {
|
|
1377
1388
|
replace: !0,
|
|
1378
|
-
state:
|
|
1389
|
+
state: s
|
|
1379
1390
|
}), null;
|
|
1380
1391
|
}
|
|
1381
|
-
const
|
|
1382
|
-
async function
|
|
1392
|
+
const _n = {};
|
|
1393
|
+
async function Te({
|
|
1383
1394
|
language: e,
|
|
1384
1395
|
text: t,
|
|
1385
1396
|
limit: n,
|
|
1386
1397
|
start: r,
|
|
1387
|
-
templateName:
|
|
1398
|
+
templateName: s
|
|
1388
1399
|
}) {
|
|
1389
|
-
const i = `${
|
|
1400
|
+
const i = `${Ye}/search?language=${encodeURIComponent(
|
|
1390
1401
|
e
|
|
1391
1402
|
)}&q=${encodeURIComponent(t)}&limit=${encodeURIComponent(
|
|
1392
1403
|
n
|
|
1393
|
-
)}&start=${encodeURIComponent(r)}&tpl=${encodeURIComponent(
|
|
1404
|
+
)}&start=${encodeURIComponent(r)}&tpl=${encodeURIComponent(s)}`, a = await fetch(i, {
|
|
1394
1405
|
method: "GET"
|
|
1395
1406
|
});
|
|
1396
1407
|
if (a.status !== 200) {
|
|
@@ -1399,47 +1410,47 @@ async function ke({
|
|
|
1399
1410
|
}
|
|
1400
1411
|
return await a.json();
|
|
1401
1412
|
}
|
|
1402
|
-
const
|
|
1403
|
-
SearchForm:
|
|
1413
|
+
const In = "_SearchForm_1a5n6_1", Un = {
|
|
1414
|
+
SearchForm: In
|
|
1404
1415
|
};
|
|
1405
|
-
var
|
|
1406
|
-
const
|
|
1407
|
-
const t =
|
|
1408
|
-
t:
|
|
1409
|
-
} =
|
|
1410
|
-
|
|
1416
|
+
var kn = /* @__PURE__ */ x("<form><input type=search><button type=submit>");
|
|
1417
|
+
const Tn = (e) => {
|
|
1418
|
+
const t = lt(), [n, r] = P(e.value ?? ""), {
|
|
1419
|
+
t: s
|
|
1420
|
+
} = le(e.language);
|
|
1421
|
+
Se(G(() => e.value, () => r(e.value ?? "")));
|
|
1411
1422
|
const i = async (a) => {
|
|
1412
1423
|
a.preventDefault(), t(`/q/${encodeURIComponent(n())}`);
|
|
1413
1424
|
};
|
|
1414
1425
|
return (() => {
|
|
1415
|
-
var a =
|
|
1416
|
-
return a.addEventListener("submit", i),
|
|
1417
|
-
var u =
|
|
1418
|
-
return u !== l.e &&
|
|
1426
|
+
var a = kn(), o = a.firstChild, c = o.nextSibling;
|
|
1427
|
+
return a.addEventListener("submit", i), o.addEventListener("change", (l) => r(l.currentTarget.value)), L(c, () => s("searchApp.search")), _((l) => {
|
|
1428
|
+
var u = Un.SearchForm, h = s("searchApp.search");
|
|
1429
|
+
return u !== l.e && Je(a, l.e = u), h !== l.t && ae(o, "placeholder", l.t = h), l;
|
|
1419
1430
|
}, {
|
|
1420
1431
|
e: void 0,
|
|
1421
1432
|
t: void 0
|
|
1422
|
-
}), _(() =>
|
|
1433
|
+
}), _(() => o.value = n()), a;
|
|
1423
1434
|
})();
|
|
1424
1435
|
};
|
|
1425
|
-
var
|
|
1426
|
-
function
|
|
1436
|
+
var Nn = /* @__PURE__ */ x("<div class=SearchPageResponse>"), Ne = /* @__PURE__ */ x("<div>"), Fn = /* @__PURE__ */ x("<img class=SearchPageResponse-spinner width=80 height=80 alt=…>"), jn = /* @__PURE__ */ x("<button type=button>"), Bn = /* @__PURE__ */ x("<div class=SearchPageResponse-noResultMessage> <span>");
|
|
1437
|
+
function Fe({
|
|
1427
1438
|
language: e,
|
|
1428
1439
|
limit: t,
|
|
1429
1440
|
templateName: n
|
|
1430
1441
|
}) {
|
|
1431
1442
|
const {
|
|
1432
1443
|
t: r
|
|
1433
|
-
} =
|
|
1434
|
-
|
|
1444
|
+
} = le(e), s = fn(), [i, a] = P(""), [o, c] = P(0), [l, u] = P(0), [h, p] = P(!1);
|
|
1445
|
+
Se(G(() => s.searchString, m));
|
|
1435
1446
|
async function m() {
|
|
1436
|
-
if (
|
|
1447
|
+
if (s.searchString) {
|
|
1437
1448
|
p(!0);
|
|
1438
1449
|
try {
|
|
1439
1450
|
a(""), u(0);
|
|
1440
|
-
const f = await
|
|
1451
|
+
const f = await Te({
|
|
1441
1452
|
language: e,
|
|
1442
|
-
text: decodeURIComponent(
|
|
1453
|
+
text: decodeURIComponent(s.searchString),
|
|
1443
1454
|
limit: t,
|
|
1444
1455
|
start: l(),
|
|
1445
1456
|
templateName: n
|
|
@@ -1452,12 +1463,12 @@ function Ne({
|
|
|
1452
1463
|
}
|
|
1453
1464
|
}
|
|
1454
1465
|
async function y() {
|
|
1455
|
-
if (!
|
|
1456
|
-
const f =
|
|
1466
|
+
if (!s.searchString) return;
|
|
1467
|
+
const f = o();
|
|
1457
1468
|
if (f === void 0 || l() >= f) return;
|
|
1458
|
-
const d = await
|
|
1469
|
+
const d = await Te({
|
|
1459
1470
|
language: e,
|
|
1460
|
-
text: decodeURIComponent(
|
|
1471
|
+
text: decodeURIComponent(s.searchString),
|
|
1461
1472
|
limit: t,
|
|
1462
1473
|
start: l(),
|
|
1463
1474
|
templateName: n
|
|
@@ -1465,77 +1476,77 @@ function Ne({
|
|
|
1465
1476
|
d.html && (a(`${i()}${d.html}`), u(l() + t));
|
|
1466
1477
|
}
|
|
1467
1478
|
return (() => {
|
|
1468
|
-
var f =
|
|
1469
|
-
return
|
|
1479
|
+
var f = Ne();
|
|
1480
|
+
return L(f, A(Tn, {
|
|
1470
1481
|
language: e,
|
|
1471
1482
|
get value() {
|
|
1472
|
-
return E(() => !!
|
|
1483
|
+
return E(() => !!s.searchString)() ? decodeURIComponent(s.searchString) : void 0;
|
|
1473
1484
|
}
|
|
1474
|
-
}), null),
|
|
1485
|
+
}), null), L(f, A(D, {
|
|
1475
1486
|
get when() {
|
|
1476
|
-
return
|
|
1487
|
+
return s.searchString;
|
|
1477
1488
|
},
|
|
1478
1489
|
get children() {
|
|
1479
|
-
var d =
|
|
1480
|
-
return
|
|
1490
|
+
var d = Nn();
|
|
1491
|
+
return L(d, (() => {
|
|
1481
1492
|
var S = E(() => !!h());
|
|
1482
1493
|
return () => S() ? (() => {
|
|
1483
|
-
var g =
|
|
1484
|
-
return
|
|
1485
|
-
})() : A(
|
|
1494
|
+
var g = Fn();
|
|
1495
|
+
return ae(g, "src", `${Ze}/spinner.svg`), g;
|
|
1496
|
+
})() : A(D, {
|
|
1486
1497
|
get when() {
|
|
1487
1498
|
return i();
|
|
1488
1499
|
},
|
|
1489
1500
|
get fallback() {
|
|
1490
1501
|
return (() => {
|
|
1491
|
-
var g =
|
|
1492
|
-
return
|
|
1502
|
+
var g = Bn(), U = g.firstChild, C = U.nextSibling;
|
|
1503
|
+
return L(g, () => r("searchApp.nothingGet"), U), L(C, () => s.searchString), g;
|
|
1493
1504
|
})();
|
|
1494
1505
|
},
|
|
1495
1506
|
get children() {
|
|
1496
1507
|
return [(() => {
|
|
1497
|
-
var g =
|
|
1508
|
+
var g = Ne();
|
|
1498
1509
|
return _(() => g.innerHTML = i()), g;
|
|
1499
|
-
})(), A(
|
|
1510
|
+
})(), A(D, {
|
|
1500
1511
|
get when() {
|
|
1501
|
-
return l() <
|
|
1512
|
+
return l() < o();
|
|
1502
1513
|
},
|
|
1503
1514
|
get children() {
|
|
1504
|
-
var g =
|
|
1505
|
-
return g.$$click = y,
|
|
1515
|
+
var g = jn();
|
|
1516
|
+
return g.$$click = y, L(g, () => r("infiniteLoading.loadMore")), g;
|
|
1506
1517
|
}
|
|
1507
1518
|
})];
|
|
1508
1519
|
}
|
|
1509
1520
|
});
|
|
1510
1521
|
})()), d;
|
|
1511
1522
|
}
|
|
1512
|
-
}), null), _(() =>
|
|
1523
|
+
}), null), _(() => Je(f, _n.SiteApp)), f;
|
|
1513
1524
|
})();
|
|
1514
1525
|
}
|
|
1515
|
-
|
|
1516
|
-
function
|
|
1526
|
+
ie(["click"]);
|
|
1527
|
+
function Mn(e, {
|
|
1517
1528
|
language: t
|
|
1518
1529
|
}) {
|
|
1519
1530
|
if (!t) throw new Error("Missing language");
|
|
1520
|
-
const n =
|
|
1521
|
-
n === void 0 || r === void 0 ||
|
|
1531
|
+
const n = Y(e.dataset.limit), r = J(e.dataset.template);
|
|
1532
|
+
n === void 0 || r === void 0 || Re(() => A(Pn, {
|
|
1522
1533
|
explicitLinks: !0,
|
|
1523
1534
|
get children() {
|
|
1524
|
-
return [A(
|
|
1535
|
+
return [A(ge, {
|
|
1525
1536
|
path: "/",
|
|
1526
|
-
component: () => A(
|
|
1537
|
+
component: () => A(On, {
|
|
1527
1538
|
href: "/q"
|
|
1528
1539
|
})
|
|
1529
|
-
}), A(
|
|
1540
|
+
}), A(ge, {
|
|
1530
1541
|
path: "/q",
|
|
1531
|
-
component: () => A(
|
|
1542
|
+
component: () => A(Fe, {
|
|
1532
1543
|
language: t,
|
|
1533
1544
|
templateName: r,
|
|
1534
1545
|
limit: n
|
|
1535
1546
|
})
|
|
1536
|
-
}), A(
|
|
1547
|
+
}), A(ge, {
|
|
1537
1548
|
path: "/q/:searchString",
|
|
1538
|
-
component: () => A(
|
|
1549
|
+
component: () => A(Fe, {
|
|
1539
1550
|
language: t,
|
|
1540
1551
|
templateName: r,
|
|
1541
1552
|
limit: n
|
|
@@ -1544,63 +1555,63 @@ function jn(e, {
|
|
|
1544
1555
|
}
|
|
1545
1556
|
}), e);
|
|
1546
1557
|
}
|
|
1547
|
-
var
|
|
1548
|
-
function
|
|
1558
|
+
var Dn = /* @__PURE__ */ x("<input class=SearchOpenerOverlay-input type=search required>"), qn = /* @__PURE__ */ x("<div class=SearchOpenerOverlay><form class=SearchOpenerOverlay-form><button class=SearchOpenerOverlay-btn type=submit>");
|
|
1559
|
+
function Vn({
|
|
1549
1560
|
searchURL: e,
|
|
1550
1561
|
language: t,
|
|
1551
1562
|
setSearchFormOverlayIsOpen: n
|
|
1552
1563
|
}) {
|
|
1553
1564
|
let r;
|
|
1554
|
-
const [
|
|
1565
|
+
const [s, i] = P(""), {
|
|
1555
1566
|
t: a
|
|
1556
|
-
} =
|
|
1557
|
-
var l =
|
|
1558
|
-
return l.addEventListener("change", (u) => i(u.currentTarget.value)), _(() =>
|
|
1567
|
+
} = le(t), o = (() => {
|
|
1568
|
+
var l = Dn();
|
|
1569
|
+
return l.addEventListener("change", (u) => i(u.currentTarget.value)), _(() => ae(l, "placeholder", a("searchApp.search"))), _(() => l.value = s()), l;
|
|
1559
1570
|
})(), c = (l) => {
|
|
1560
|
-
l.preventDefault(), window.location.href = `${e}#/q/${encodeURIComponent(
|
|
1571
|
+
l.preventDefault(), window.location.href = `${e}#/q/${encodeURIComponent(s())}`, n(!1);
|
|
1561
1572
|
};
|
|
1562
|
-
return
|
|
1563
|
-
|
|
1573
|
+
return Se(() => {
|
|
1574
|
+
o.focus();
|
|
1564
1575
|
}), (() => {
|
|
1565
|
-
var l =
|
|
1576
|
+
var l = qn(), u = l.firstChild, h = u.firstChild;
|
|
1566
1577
|
l.$$click = (m) => {
|
|
1567
1578
|
m.target === r && n(!1);
|
|
1568
1579
|
};
|
|
1569
1580
|
var p = r;
|
|
1570
|
-
return typeof p == "function" ?
|
|
1581
|
+
return typeof p == "function" ? Ot(p, l) : r = l, u.addEventListener("submit", c), L(u, o, h), L(h, () => a("searchApp.search")), l;
|
|
1571
1582
|
})();
|
|
1572
1583
|
}
|
|
1573
|
-
|
|
1574
|
-
var
|
|
1575
|
-
function
|
|
1584
|
+
ie(["click"]);
|
|
1585
|
+
var Wn = /* @__PURE__ */ x('<button type=button class=SearchOpenerBtn><svg class=SearchOpenerBtn-svg width=20 height=20 version=1.1 id=Capa_1 xmlns=http://www.w3.org/2000/svg viewBox="0 0 490.4 490.4"><title>Search Icon</title><g id=SVGRepo_bgCarrier stroke-width=0></g><g id=SVGRepo_tracerCarrier stroke-linecap=round stroke-linejoin=round></g><g id=SVGRepo_iconCarrier><g><path d="M484.1,454.796l-110.5-110.6c29.8-36.3,47.6-82.8,47.6-133.4c0-116.3-94.3-210.6-210.6-210.6S0,94.496,0,210.796 s94.3,210.6,210.6,210.6c50.8,0,97.4-18,133.8-48l110.5,110.5c12.9,11.8,25,4.2,29.2,0C492.5,475.596,492.5,463.096,484.1,454.796z M41.1,210.796c0-93.6,75.9-169.5,169.5-169.5s169.6,75.9,169.6,169.5s-75.9,169.5-169.5,169.5S41.1,304.396,41.1,210.796z"></path> '), Gn = /* @__PURE__ */ x("<div>");
|
|
1586
|
+
function Kn({
|
|
1576
1587
|
searchIconColor: e,
|
|
1577
1588
|
language: t,
|
|
1578
1589
|
searchURL: n
|
|
1579
1590
|
}) {
|
|
1580
|
-
const [r,
|
|
1581
|
-
var
|
|
1582
|
-
return e != null ? c.style.setProperty("fill", e) : c.style.removeProperty("fill"),
|
|
1583
|
-
})(), a =
|
|
1584
|
-
return document.body.appendChild(a), i.addEventListener("click", () =>
|
|
1591
|
+
const [r, s] = P(!1), i = (() => {
|
|
1592
|
+
var o = Wn(), c = o.firstChild;
|
|
1593
|
+
return e != null ? c.style.setProperty("fill", e) : c.style.removeProperty("fill"), o;
|
|
1594
|
+
})(), a = Gn();
|
|
1595
|
+
return document.body.appendChild(a), i.addEventListener("click", () => s(!0)), Re(() => A(D, {
|
|
1585
1596
|
get when() {
|
|
1586
1597
|
return r();
|
|
1587
1598
|
},
|
|
1588
1599
|
get children() {
|
|
1589
|
-
return A(
|
|
1600
|
+
return A(Vn, {
|
|
1590
1601
|
searchURL: n,
|
|
1591
1602
|
language: t,
|
|
1592
|
-
setSearchFormOverlayIsOpen:
|
|
1603
|
+
setSearchFormOverlayIsOpen: s
|
|
1593
1604
|
});
|
|
1594
1605
|
}
|
|
1595
1606
|
}), a), i;
|
|
1596
1607
|
}
|
|
1597
|
-
function
|
|
1608
|
+
function Hn(e, {
|
|
1598
1609
|
language: t
|
|
1599
1610
|
}) {
|
|
1600
1611
|
const n = e.dataset.searchUrl, r = e.dataset.iconColor;
|
|
1601
1612
|
if (!t) throw new Error("Missing language");
|
|
1602
1613
|
if (!n) throw new Error("Missing search url");
|
|
1603
|
-
|
|
1614
|
+
Re(() => A(Kn, {
|
|
1604
1615
|
language: t,
|
|
1605
1616
|
searchURL: n,
|
|
1606
1617
|
searchIconColor: r
|
|
@@ -1608,14 +1619,14 @@ function Gn(e, {
|
|
|
1608
1619
|
}
|
|
1609
1620
|
document.addEventListener("DOMContentLoaded", () => {
|
|
1610
1621
|
const e = document.documentElement.lang, t = {
|
|
1611
|
-
searchOpener:
|
|
1612
|
-
searchForm:
|
|
1613
|
-
infiniteLoading:
|
|
1622
|
+
searchOpener: Hn,
|
|
1623
|
+
searchForm: Mn,
|
|
1624
|
+
infiniteLoading: Yt
|
|
1614
1625
|
}, n = document.querySelectorAll("[data-effect]");
|
|
1615
1626
|
for (const r of n) {
|
|
1616
|
-
const
|
|
1617
|
-
if (!
|
|
1618
|
-
const i = t[
|
|
1627
|
+
const s = r.dataset.effect;
|
|
1628
|
+
if (!s) continue;
|
|
1629
|
+
const i = t[s];
|
|
1619
1630
|
i && i(r, {
|
|
1620
1631
|
language: e
|
|
1621
1632
|
});
|