tabby-rdp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +150 -0
- package/dist/desk.js +86 -0
- package/dist/desk.js.map +1 -0
- package/dist/deskScript.js +44 -0
- package/dist/deskScript.js.map +1 -0
- package/dist/desktop.service.js +665 -0
- package/dist/desktop.service.js.map +1 -0
- package/dist/desktopForm.js +96 -0
- package/dist/desktopForm.js.map +1 -0
- package/dist/desktops.js +45 -0
- package/dist/desktops.js.map +1 -0
- package/dist/header.js +164 -0
- package/dist/header.js.map +1 -0
- package/dist/index.js +52 -0
- package/dist/index.js.map +1 -0
- package/dist/rdcleanpath.js +255 -0
- package/dist/rdcleanpath.js.map +1 -0
- package/dist/remoteSetup.js +188 -0
- package/dist/remoteSetup.js.map +1 -0
- package/dist/signin.js +114 -0
- package/dist/signin.js.map +1 -0
- package/dist/ssh.js +54 -0
- package/dist/ssh.js.map +1 -0
- package/dist/sshChannelStream.js +34 -0
- package/dist/sshChannelStream.js.map +1 -0
- package/dist/targets.js +247 -0
- package/dist/targets.js.map +1 -0
- package/dist/ui.js +212 -0
- package/dist/ui.js.map +1 -0
- package/package.json +41 -0
- package/remote/trd-pty.py +561 -0
- package/vendor/IRONRDP-LICENSE +27 -0
- package/vendor/iron-remote-desktop-rdp.js +2878 -0
- package/vendor/iron-remote-desktop.js +4136 -0
|
@@ -0,0 +1,4136 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __typeError = (msg) => {
|
|
3
|
+
throw TypeError(msg);
|
|
4
|
+
};
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
8
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
9
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
|
+
var _t2, _e2, _a, _b;
|
|
12
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add("5");
|
|
13
|
+
const cr = 2, dr = "[", fr = "]", Je = {}, K = Symbol(), si = false, J = 2, gi = 4, St = 8, Yt = 16, Ce = 32, Be = 64, pt = 128, Y = 256, vt = 512, G = 1024, Ee = 2048, ze = 4096, wt = 8192, Dt = 16384, hr = 32768, br = 65536, pr = 1 << 19, _i = 1 << 20, ct = Symbol("$state"), vr = Symbol("legacy props");
|
|
14
|
+
var xi = Array.isArray, wr = Array.prototype.indexOf, mr = Array.from, mt = Object.keys, gt = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, gr = Object.getOwnPropertyDescriptors, _r = Object.prototype, xr = Array.prototype, yi = Object.getPrototypeOf;
|
|
15
|
+
const dt = () => {
|
|
16
|
+
};
|
|
17
|
+
function Ci(t) {
|
|
18
|
+
for (var e = 0; e < t.length; e++)
|
|
19
|
+
t[e]();
|
|
20
|
+
}
|
|
21
|
+
let tt = [], It = [];
|
|
22
|
+
function Ei() {
|
|
23
|
+
var t = tt;
|
|
24
|
+
tt = [], Ci(t);
|
|
25
|
+
}
|
|
26
|
+
function yr() {
|
|
27
|
+
var t = It;
|
|
28
|
+
It = [], Ci(t);
|
|
29
|
+
}
|
|
30
|
+
function Xt(t) {
|
|
31
|
+
tt.length === 0 && queueMicrotask(Ei), tt.push(t);
|
|
32
|
+
}
|
|
33
|
+
function oi() {
|
|
34
|
+
tt.length > 0 && Ei(), It.length > 0 && yr();
|
|
35
|
+
}
|
|
36
|
+
function ki(t) {
|
|
37
|
+
return t === this.v;
|
|
38
|
+
}
|
|
39
|
+
function Si(t, e) {
|
|
40
|
+
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
41
|
+
}
|
|
42
|
+
function Cr(t) {
|
|
43
|
+
return !Si(t, this.v);
|
|
44
|
+
}
|
|
45
|
+
function Er(t) {
|
|
46
|
+
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
47
|
+
}
|
|
48
|
+
function kr() {
|
|
49
|
+
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
50
|
+
}
|
|
51
|
+
function Sr(t) {
|
|
52
|
+
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
53
|
+
}
|
|
54
|
+
function Dr() {
|
|
55
|
+
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
56
|
+
}
|
|
57
|
+
function Tr() {
|
|
58
|
+
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
59
|
+
}
|
|
60
|
+
function Rr() {
|
|
61
|
+
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
62
|
+
}
|
|
63
|
+
function $r() {
|
|
64
|
+
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
65
|
+
}
|
|
66
|
+
function Or() {
|
|
67
|
+
throw new Error("https://svelte.dev/e/state_unsafe_local_read");
|
|
68
|
+
}
|
|
69
|
+
function Ar() {
|
|
70
|
+
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
71
|
+
}
|
|
72
|
+
let Lr = false;
|
|
73
|
+
function se(t, e) {
|
|
74
|
+
var i = {
|
|
75
|
+
f: 0,
|
|
76
|
+
// TODO ideally we could skip this altogether, but it causes type errors
|
|
77
|
+
v: t,
|
|
78
|
+
reactions: null,
|
|
79
|
+
equals: ki,
|
|
80
|
+
rv: 0,
|
|
81
|
+
wv: 0
|
|
82
|
+
};
|
|
83
|
+
return i;
|
|
84
|
+
}
|
|
85
|
+
function Ft(t) {
|
|
86
|
+
return /* @__PURE__ */ Mr(se(t));
|
|
87
|
+
}
|
|
88
|
+
// @__NO_SIDE_EFFECTS__
|
|
89
|
+
function Di(t, e = false) {
|
|
90
|
+
const i = se(t);
|
|
91
|
+
return e || (i.equals = Cr), i;
|
|
92
|
+
}
|
|
93
|
+
// @__NO_SIDE_EFFECTS__
|
|
94
|
+
function Mr(t) {
|
|
95
|
+
return k !== null && !Q && (k.f & J) !== 0 && (oe === null ? Br([t]) : oe.push(t)), t;
|
|
96
|
+
}
|
|
97
|
+
function j(t, e) {
|
|
98
|
+
return k !== null && !Q && Xi() && (k.f & (J | Yt)) !== 0 && // If the source was created locally within the current derived, then
|
|
99
|
+
// we allow the mutation.
|
|
100
|
+
(oe === null || !oe.includes(t)) && Ar(), Fr(t, e);
|
|
101
|
+
}
|
|
102
|
+
function Fr(t, e) {
|
|
103
|
+
return t.equals(e) || (t.v, t.v = e, t.wv = Ui(), Ti(t, Ee), T !== null && (T.f & G) !== 0 && (T.f & (Ce | Be)) === 0 && (ue === null ? zr([t]) : ue.push(t))), e;
|
|
104
|
+
}
|
|
105
|
+
function Ti(t, e) {
|
|
106
|
+
var i = t.reactions;
|
|
107
|
+
if (i !== null)
|
|
108
|
+
for (var r = i.length, n = 0; n < r; n++) {
|
|
109
|
+
var o = i[n], c = o.f;
|
|
110
|
+
(c & Ee) === 0 && (de(o, e), (c & (G | Y)) !== 0 && ((c & J) !== 0 ? Ti(
|
|
111
|
+
/** @type {Derived} */
|
|
112
|
+
o,
|
|
113
|
+
ze
|
|
114
|
+
) : ei(
|
|
115
|
+
/** @type {Effect} */
|
|
116
|
+
o
|
|
117
|
+
)));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// @__NO_SIDE_EFFECTS__
|
|
121
|
+
function Ri(t) {
|
|
122
|
+
var e = J | Ee, i = k !== null && (k.f & J) !== 0 ? (
|
|
123
|
+
/** @type {Derived} */
|
|
124
|
+
k
|
|
125
|
+
) : null;
|
|
126
|
+
return T === null || i !== null && (i.f & Y) !== 0 ? e |= Y : T.f |= _i, {
|
|
127
|
+
ctx: B,
|
|
128
|
+
deps: null,
|
|
129
|
+
effects: null,
|
|
130
|
+
equals: ki,
|
|
131
|
+
f: e,
|
|
132
|
+
fn: t,
|
|
133
|
+
reactions: null,
|
|
134
|
+
rv: 0,
|
|
135
|
+
v: (
|
|
136
|
+
/** @type {V} */
|
|
137
|
+
null
|
|
138
|
+
),
|
|
139
|
+
wv: 0,
|
|
140
|
+
parent: i ?? T
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function $i(t) {
|
|
144
|
+
var e = t.effects;
|
|
145
|
+
if (e !== null) {
|
|
146
|
+
t.effects = null;
|
|
147
|
+
for (var i = 0; i < e.length; i += 1)
|
|
148
|
+
ye(
|
|
149
|
+
/** @type {Effect} */
|
|
150
|
+
e[i]
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function Nr(t) {
|
|
155
|
+
for (var e = t.parent; e !== null; ) {
|
|
156
|
+
if ((e.f & J) === 0)
|
|
157
|
+
return (
|
|
158
|
+
/** @type {Effect} */
|
|
159
|
+
e
|
|
160
|
+
);
|
|
161
|
+
e = e.parent;
|
|
162
|
+
}
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
function Pr(t) {
|
|
166
|
+
var e, i = T;
|
|
167
|
+
xe(Nr(t));
|
|
168
|
+
try {
|
|
169
|
+
$i(t), e = zi(t);
|
|
170
|
+
} finally {
|
|
171
|
+
xe(i);
|
|
172
|
+
}
|
|
173
|
+
return e;
|
|
174
|
+
}
|
|
175
|
+
function Oi(t) {
|
|
176
|
+
var e = Pr(t), i = (ge || (t.f & Y) !== 0) && t.deps !== null ? ze : G;
|
|
177
|
+
de(t, i), t.equals(e) || (t.v = e, t.wv = Ui());
|
|
178
|
+
}
|
|
179
|
+
function Zt(t) {
|
|
180
|
+
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
181
|
+
}
|
|
182
|
+
let ee = false;
|
|
183
|
+
function at(t) {
|
|
184
|
+
ee = t;
|
|
185
|
+
}
|
|
186
|
+
let z;
|
|
187
|
+
function _t(t) {
|
|
188
|
+
if (t === null)
|
|
189
|
+
throw Zt(), Je;
|
|
190
|
+
return z = t;
|
|
191
|
+
}
|
|
192
|
+
function Ai() {
|
|
193
|
+
return _t(
|
|
194
|
+
/** @type {TemplateNode} */
|
|
195
|
+
/* @__PURE__ */ Tt(z)
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
function Nt(t) {
|
|
199
|
+
if (ee) {
|
|
200
|
+
if (/* @__PURE__ */ Tt(z) !== null)
|
|
201
|
+
throw Zt(), Je;
|
|
202
|
+
z = t;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
function Se(t, e = null, i) {
|
|
206
|
+
if (typeof t != "object" || t === null || ct in t)
|
|
207
|
+
return t;
|
|
208
|
+
const r = yi(t);
|
|
209
|
+
if (r !== _r && r !== xr)
|
|
210
|
+
return t;
|
|
211
|
+
var n = /* @__PURE__ */ new Map(), o = xi(t), c = se(0);
|
|
212
|
+
o && n.set("length", se(
|
|
213
|
+
/** @type {any[]} */
|
|
214
|
+
t.length
|
|
215
|
+
));
|
|
216
|
+
var h;
|
|
217
|
+
return new Proxy(
|
|
218
|
+
/** @type {any} */
|
|
219
|
+
t,
|
|
220
|
+
{
|
|
221
|
+
defineProperty(f, d, p) {
|
|
222
|
+
(!("value" in p) || p.configurable === false || p.enumerable === false || p.writable === false) && Rr();
|
|
223
|
+
var w = n.get(d);
|
|
224
|
+
return w === void 0 ? (w = se(p.value), n.set(d, w)) : j(w, Se(p.value, h)), true;
|
|
225
|
+
},
|
|
226
|
+
deleteProperty(f, d) {
|
|
227
|
+
var p = n.get(d);
|
|
228
|
+
if (p === void 0)
|
|
229
|
+
d in f && n.set(d, se(K));
|
|
230
|
+
else {
|
|
231
|
+
if (o && typeof d == "string") {
|
|
232
|
+
var w = (
|
|
233
|
+
/** @type {Source<number>} */
|
|
234
|
+
n.get("length")
|
|
235
|
+
), s = Number(d);
|
|
236
|
+
Number.isInteger(s) && s < w.v && j(w, s);
|
|
237
|
+
}
|
|
238
|
+
j(p, K), ai(c);
|
|
239
|
+
}
|
|
240
|
+
return true;
|
|
241
|
+
},
|
|
242
|
+
get(f, d, p) {
|
|
243
|
+
var _a2;
|
|
244
|
+
if (d === ct)
|
|
245
|
+
return t;
|
|
246
|
+
var w = n.get(d), s = d in f;
|
|
247
|
+
if (w === void 0 && (!s || ((_a2 = Ue(f, d)) == null ? void 0 : _a2.writable)) && (w = se(Se(s ? f[d] : K, h)), n.set(d, w)), w !== void 0) {
|
|
248
|
+
var a = U(w);
|
|
249
|
+
return a === K ? void 0 : a;
|
|
250
|
+
}
|
|
251
|
+
return Reflect.get(f, d, p);
|
|
252
|
+
},
|
|
253
|
+
getOwnPropertyDescriptor(f, d) {
|
|
254
|
+
var p = Reflect.getOwnPropertyDescriptor(f, d);
|
|
255
|
+
if (p && "value" in p) {
|
|
256
|
+
var w = n.get(d);
|
|
257
|
+
w && (p.value = U(w));
|
|
258
|
+
} else if (p === void 0) {
|
|
259
|
+
var s = n.get(d), a = s == null ? void 0 : s.v;
|
|
260
|
+
if (s !== void 0 && a !== K)
|
|
261
|
+
return {
|
|
262
|
+
enumerable: true,
|
|
263
|
+
configurable: true,
|
|
264
|
+
value: a,
|
|
265
|
+
writable: true
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
return p;
|
|
269
|
+
},
|
|
270
|
+
has(f, d) {
|
|
271
|
+
var _a2;
|
|
272
|
+
if (d === ct)
|
|
273
|
+
return true;
|
|
274
|
+
var p = n.get(d), w = p !== void 0 && p.v !== K || Reflect.has(f, d);
|
|
275
|
+
if (p !== void 0 || T !== null && (!w || ((_a2 = Ue(f, d)) == null ? void 0 : _a2.writable))) {
|
|
276
|
+
p === void 0 && (p = se(w ? Se(f[d], h) : K), n.set(d, p));
|
|
277
|
+
var s = U(p);
|
|
278
|
+
if (s === K)
|
|
279
|
+
return false;
|
|
280
|
+
}
|
|
281
|
+
return w;
|
|
282
|
+
},
|
|
283
|
+
set(f, d, p, w) {
|
|
284
|
+
var _a2;
|
|
285
|
+
var s = n.get(d), a = d in f;
|
|
286
|
+
if (o && d === "length")
|
|
287
|
+
for (var l = p; l < /** @type {Source<number>} */
|
|
288
|
+
s.v; l += 1) {
|
|
289
|
+
var u = n.get(l + "");
|
|
290
|
+
u !== void 0 ? j(u, K) : l in f && (u = se(K), n.set(l + "", u));
|
|
291
|
+
}
|
|
292
|
+
s === void 0 ? (!a || ((_a2 = Ue(f, d)) == null ? void 0 : _a2.writable)) && (s = se(void 0), j(s, Se(p, h)), n.set(d, s)) : (a = s.v !== K, j(s, Se(p, h)));
|
|
293
|
+
var b = Reflect.getOwnPropertyDescriptor(f, d);
|
|
294
|
+
if ((b == null ? void 0 : b.set) && b.set.call(w, p), !a) {
|
|
295
|
+
if (o && typeof d == "string") {
|
|
296
|
+
var $ = (
|
|
297
|
+
/** @type {Source<number>} */
|
|
298
|
+
n.get("length")
|
|
299
|
+
), N = Number(d);
|
|
300
|
+
Number.isInteger(N) && N >= $.v && j($, N + 1);
|
|
301
|
+
}
|
|
302
|
+
ai(c);
|
|
303
|
+
}
|
|
304
|
+
return true;
|
|
305
|
+
},
|
|
306
|
+
ownKeys(f) {
|
|
307
|
+
U(c);
|
|
308
|
+
var d = Reflect.ownKeys(f).filter((s) => {
|
|
309
|
+
var a = n.get(s);
|
|
310
|
+
return a === void 0 || a.v !== K;
|
|
311
|
+
});
|
|
312
|
+
for (var [p, w] of n)
|
|
313
|
+
w.v !== K && !(p in f) && d.push(p);
|
|
314
|
+
return d;
|
|
315
|
+
},
|
|
316
|
+
setPrototypeOf() {
|
|
317
|
+
$r();
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
function ai(t, e = 1) {
|
|
323
|
+
j(t, t.v + e);
|
|
324
|
+
}
|
|
325
|
+
var li, Li, Mi, Fi;
|
|
326
|
+
function Wt() {
|
|
327
|
+
if (li === void 0) {
|
|
328
|
+
li = window, Li = /Firefox/.test(navigator.userAgent);
|
|
329
|
+
var t = Element.prototype, e = Node.prototype;
|
|
330
|
+
Mi = Ue(e, "firstChild").get, Fi = Ue(e, "nextSibling").get, t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__styles = null, t.__e = void 0, Text.prototype.__t = void 0;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
function Ni(t = "") {
|
|
334
|
+
return document.createTextNode(t);
|
|
335
|
+
}
|
|
336
|
+
// @__NO_SIDE_EFFECTS__
|
|
337
|
+
function xt(t) {
|
|
338
|
+
return Mi.call(t);
|
|
339
|
+
}
|
|
340
|
+
// @__NO_SIDE_EFFECTS__
|
|
341
|
+
function Tt(t) {
|
|
342
|
+
return Fi.call(t);
|
|
343
|
+
}
|
|
344
|
+
function Pt(t, e) {
|
|
345
|
+
if (!ee)
|
|
346
|
+
return /* @__PURE__ */ xt(t);
|
|
347
|
+
var i = (
|
|
348
|
+
/** @type {TemplateNode} */
|
|
349
|
+
/* @__PURE__ */ xt(z)
|
|
350
|
+
);
|
|
351
|
+
return i === null && (i = z.appendChild(Ni())), _t(i), i;
|
|
352
|
+
}
|
|
353
|
+
function Ur(t) {
|
|
354
|
+
t.textContent = "";
|
|
355
|
+
}
|
|
356
|
+
let ft = false, yt = false, Ct = null, ht = false, Qt = false;
|
|
357
|
+
function ui(t) {
|
|
358
|
+
Qt = t;
|
|
359
|
+
}
|
|
360
|
+
let et = [];
|
|
361
|
+
let k = null, Q = false;
|
|
362
|
+
function _e(t) {
|
|
363
|
+
k = t;
|
|
364
|
+
}
|
|
365
|
+
let T = null;
|
|
366
|
+
function xe(t) {
|
|
367
|
+
T = t;
|
|
368
|
+
}
|
|
369
|
+
let oe = null;
|
|
370
|
+
function Br(t) {
|
|
371
|
+
oe = t;
|
|
372
|
+
}
|
|
373
|
+
let P = null, H = 0, ue = null;
|
|
374
|
+
function zr(t) {
|
|
375
|
+
ue = t;
|
|
376
|
+
}
|
|
377
|
+
let Pi = 1, Et = 0, ge = false;
|
|
378
|
+
function Ui() {
|
|
379
|
+
return ++Pi;
|
|
380
|
+
}
|
|
381
|
+
function Rt(t) {
|
|
382
|
+
var _a2;
|
|
383
|
+
var e = t.f;
|
|
384
|
+
if ((e & Ee) !== 0)
|
|
385
|
+
return true;
|
|
386
|
+
if ((e & ze) !== 0) {
|
|
387
|
+
var i = t.deps, r = (e & Y) !== 0;
|
|
388
|
+
if (i !== null) {
|
|
389
|
+
var n, o, c = (e & vt) !== 0, h = r && T !== null && !ge, f = i.length;
|
|
390
|
+
if (c || h) {
|
|
391
|
+
var d = (
|
|
392
|
+
/** @type {Derived} */
|
|
393
|
+
t
|
|
394
|
+
), p = d.parent;
|
|
395
|
+
for (n = 0; n < f; n++)
|
|
396
|
+
o = i[n], (c || !((_a2 = o == null ? void 0 : o.reactions) == null ? void 0 : _a2.includes(d))) && (o.reactions ?? (o.reactions = [])).push(d);
|
|
397
|
+
c && (d.f ^= vt), h && p !== null && (p.f & Y) === 0 && (d.f ^= Y);
|
|
398
|
+
}
|
|
399
|
+
for (n = 0; n < f; n++)
|
|
400
|
+
if (o = i[n], Rt(
|
|
401
|
+
/** @type {Derived} */
|
|
402
|
+
o
|
|
403
|
+
) && Oi(
|
|
404
|
+
/** @type {Derived} */
|
|
405
|
+
o
|
|
406
|
+
), o.wv > t.wv)
|
|
407
|
+
return true;
|
|
408
|
+
}
|
|
409
|
+
(!r || T !== null && !ge) && de(t, G);
|
|
410
|
+
}
|
|
411
|
+
return false;
|
|
412
|
+
}
|
|
413
|
+
function Ir(t, e) {
|
|
414
|
+
for (var i = e; i !== null; ) {
|
|
415
|
+
if ((i.f & pt) !== 0)
|
|
416
|
+
try {
|
|
417
|
+
i.fn(t);
|
|
418
|
+
return;
|
|
419
|
+
} catch {
|
|
420
|
+
i.f ^= pt;
|
|
421
|
+
}
|
|
422
|
+
i = i.parent;
|
|
423
|
+
}
|
|
424
|
+
throw ft = false, t;
|
|
425
|
+
}
|
|
426
|
+
function Wr(t) {
|
|
427
|
+
return (t.f & Dt) === 0 && (t.parent === null || (t.parent.f & pt) === 0);
|
|
428
|
+
}
|
|
429
|
+
function $t(t, e, i, r) {
|
|
430
|
+
if (ft) {
|
|
431
|
+
if (i === null && (ft = false), Wr(e))
|
|
432
|
+
throw t;
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
i !== null && (ft = true);
|
|
436
|
+
{
|
|
437
|
+
Ir(t, e);
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
function Bi(t, e, i = true) {
|
|
442
|
+
var r = t.reactions;
|
|
443
|
+
if (r !== null)
|
|
444
|
+
for (var n = 0; n < r.length; n++) {
|
|
445
|
+
var o = r[n];
|
|
446
|
+
(o.f & J) !== 0 ? Bi(
|
|
447
|
+
/** @type {Derived} */
|
|
448
|
+
o,
|
|
449
|
+
e,
|
|
450
|
+
false
|
|
451
|
+
) : e === o && (i ? de(o, Ee) : (o.f & G) !== 0 && de(o, ze), ei(
|
|
452
|
+
/** @type {Effect} */
|
|
453
|
+
o
|
|
454
|
+
));
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
function zi(t) {
|
|
458
|
+
var _a2;
|
|
459
|
+
var e = P, i = H, r = ue, n = k, o = ge, c = oe, h = B, f = Q, d = t.f;
|
|
460
|
+
P = /** @type {null | Value[]} */
|
|
461
|
+
null, H = 0, ue = null, ge = (d & Y) !== 0 && (Q || !ht || k === null), k = (d & (Ce | Be)) === 0 ? t : null, oe = null, ci(t.ctx), Q = false, Et++;
|
|
462
|
+
try {
|
|
463
|
+
var p = (
|
|
464
|
+
/** @type {Function} */
|
|
465
|
+
(0, t.fn)()
|
|
466
|
+
), w = t.deps;
|
|
467
|
+
if (P !== null) {
|
|
468
|
+
var s;
|
|
469
|
+
if (kt(t, H), w !== null && H > 0)
|
|
470
|
+
for (w.length = H + P.length, s = 0; s < P.length; s++)
|
|
471
|
+
w[H + s] = P[s];
|
|
472
|
+
else
|
|
473
|
+
t.deps = w = P;
|
|
474
|
+
if (!ge)
|
|
475
|
+
for (s = H; s < w.length; s++)
|
|
476
|
+
((_a2 = w[s]).reactions ?? (_a2.reactions = [])).push(t);
|
|
477
|
+
} else w !== null && H < w.length && (kt(t, H), w.length = H);
|
|
478
|
+
if (Xi() && ue !== null && !Q && w !== null && (t.f & (J | ze | Ee)) === 0)
|
|
479
|
+
for (s = 0; s < /** @type {Source[]} */
|
|
480
|
+
ue.length; s++)
|
|
481
|
+
Bi(
|
|
482
|
+
ue[s],
|
|
483
|
+
/** @type {Effect} */
|
|
484
|
+
t
|
|
485
|
+
);
|
|
486
|
+
return n !== null && Et++, p;
|
|
487
|
+
} finally {
|
|
488
|
+
P = e, H = i, ue = r, k = n, ge = o, oe = c, ci(h), Q = f;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
function Vr(t, e) {
|
|
492
|
+
let i = e.reactions;
|
|
493
|
+
if (i !== null) {
|
|
494
|
+
var r = wr.call(i, t);
|
|
495
|
+
if (r !== -1) {
|
|
496
|
+
var n = i.length - 1;
|
|
497
|
+
n === 0 ? i = e.reactions = null : (i[r] = i[n], i.pop());
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
i === null && (e.f & J) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
501
|
+
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
502
|
+
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
503
|
+
(P === null || !P.includes(e)) && (de(e, ze), (e.f & (Y | vt)) === 0 && (e.f ^= vt), $i(
|
|
504
|
+
/** @type {Derived} **/
|
|
505
|
+
e
|
|
506
|
+
), kt(
|
|
507
|
+
/** @type {Derived} **/
|
|
508
|
+
e,
|
|
509
|
+
0
|
|
510
|
+
));
|
|
511
|
+
}
|
|
512
|
+
function kt(t, e) {
|
|
513
|
+
var i = t.deps;
|
|
514
|
+
if (i !== null)
|
|
515
|
+
for (var r = e; r < i.length; r++)
|
|
516
|
+
Vr(t, i[r]);
|
|
517
|
+
}
|
|
518
|
+
function Jt(t) {
|
|
519
|
+
var e = t.f;
|
|
520
|
+
if ((e & Dt) === 0) {
|
|
521
|
+
de(t, G);
|
|
522
|
+
var i = T, r = B, n = ht;
|
|
523
|
+
T = t, ht = true;
|
|
524
|
+
try {
|
|
525
|
+
(e & Yt) !== 0 ? nn(t) : Ki(t), Vi(t);
|
|
526
|
+
var o = zi(t);
|
|
527
|
+
t.teardown = typeof o == "function" ? o : null, t.wv = Pi;
|
|
528
|
+
var c = t.deps, h;
|
|
529
|
+
si && Lr && t.f & Ee;
|
|
530
|
+
} catch (f) {
|
|
531
|
+
$t(f, t, i, r || t.ctx);
|
|
532
|
+
} finally {
|
|
533
|
+
ht = n, T = i;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
function Kr() {
|
|
538
|
+
try {
|
|
539
|
+
Dr();
|
|
540
|
+
} catch (t) {
|
|
541
|
+
if (Ct !== null)
|
|
542
|
+
$t(t, Ct, null);
|
|
543
|
+
else
|
|
544
|
+
throw t;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
function Ii() {
|
|
548
|
+
try {
|
|
549
|
+
for (var t = 0; et.length > 0; ) {
|
|
550
|
+
t++ > 1e3 && Kr();
|
|
551
|
+
var e = et, i = e.length;
|
|
552
|
+
et = [];
|
|
553
|
+
for (var r = 0; r < i; r++) {
|
|
554
|
+
var n = e[r];
|
|
555
|
+
(n.f & G) === 0 && (n.f ^= G);
|
|
556
|
+
var o = Hr(n);
|
|
557
|
+
qr(o);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
} finally {
|
|
561
|
+
yt = false, Ct = null;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
function qr(t) {
|
|
565
|
+
var e = t.length;
|
|
566
|
+
if (e !== 0)
|
|
567
|
+
for (var i = 0; i < e; i++) {
|
|
568
|
+
var r = t[i];
|
|
569
|
+
if ((r.f & (Dt | wt)) === 0)
|
|
570
|
+
try {
|
|
571
|
+
Rt(r) && (Jt(r), r.deps === null && r.first === null && r.nodes_start === null && (r.teardown === null ? qi(r) : r.fn = null));
|
|
572
|
+
} catch (n) {
|
|
573
|
+
$t(n, r, null, r.ctx);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
function ei(t) {
|
|
578
|
+
yt || (yt = true, queueMicrotask(Ii));
|
|
579
|
+
for (var e = Ct = t; e.parent !== null; ) {
|
|
580
|
+
e = e.parent;
|
|
581
|
+
var i = e.f;
|
|
582
|
+
if ((i & (Be | Ce)) !== 0) {
|
|
583
|
+
if ((i & G) === 0) return;
|
|
584
|
+
e.f ^= G;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
et.push(e);
|
|
588
|
+
}
|
|
589
|
+
function Hr(t) {
|
|
590
|
+
for (var e = [], i = t.first; i !== null; ) {
|
|
591
|
+
var r = i.f, n = (r & Ce) !== 0, o = n && (r & G) !== 0;
|
|
592
|
+
if (!o && (r & wt) === 0) {
|
|
593
|
+
if ((r & gi) !== 0)
|
|
594
|
+
e.push(i);
|
|
595
|
+
else if (n)
|
|
596
|
+
i.f ^= G;
|
|
597
|
+
else {
|
|
598
|
+
var c = k;
|
|
599
|
+
try {
|
|
600
|
+
k = i, Rt(i) && Jt(i);
|
|
601
|
+
} catch (d) {
|
|
602
|
+
$t(d, i, null, i.ctx);
|
|
603
|
+
} finally {
|
|
604
|
+
k = c;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
var h = i.first;
|
|
608
|
+
if (h !== null) {
|
|
609
|
+
i = h;
|
|
610
|
+
continue;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
var f = i.parent;
|
|
614
|
+
for (i = i.next; i === null && f !== null; )
|
|
615
|
+
i = f.next, f = f.parent;
|
|
616
|
+
}
|
|
617
|
+
return e;
|
|
618
|
+
}
|
|
619
|
+
function Ye(t) {
|
|
620
|
+
var e;
|
|
621
|
+
for (oi(); et.length > 0; )
|
|
622
|
+
yt = true, Ii(), oi();
|
|
623
|
+
return (
|
|
624
|
+
/** @type {T} */
|
|
625
|
+
e
|
|
626
|
+
);
|
|
627
|
+
}
|
|
628
|
+
function U(t) {
|
|
629
|
+
var e = t.f, i = (e & J) !== 0;
|
|
630
|
+
if (k !== null && !Q) {
|
|
631
|
+
oe !== null && oe.includes(t) && Or();
|
|
632
|
+
var r = k.deps;
|
|
633
|
+
t.rv < Et && (t.rv = Et, P === null && r !== null && r[H] === t ? H++ : P === null ? P = [t] : (!ge || !P.includes(t)) && P.push(t));
|
|
634
|
+
} else if (i && /** @type {Derived} */
|
|
635
|
+
t.deps === null && /** @type {Derived} */
|
|
636
|
+
t.effects === null) {
|
|
637
|
+
var n = (
|
|
638
|
+
/** @type {Derived} */
|
|
639
|
+
t
|
|
640
|
+
), o = n.parent;
|
|
641
|
+
o !== null && (o.f & Y) === 0 && (n.f ^= Y);
|
|
642
|
+
}
|
|
643
|
+
return i && (n = /** @type {Derived} */
|
|
644
|
+
t, Rt(n) && Oi(n)), t.v;
|
|
645
|
+
}
|
|
646
|
+
function it(t) {
|
|
647
|
+
var e = Q;
|
|
648
|
+
try {
|
|
649
|
+
return Q = true, t();
|
|
650
|
+
} finally {
|
|
651
|
+
Q = e;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
const jr = -7169;
|
|
655
|
+
function de(t, e) {
|
|
656
|
+
t.f = t.f & jr | e;
|
|
657
|
+
}
|
|
658
|
+
function Gr(t) {
|
|
659
|
+
T === null && k === null && Sr(), k !== null && (k.f & Y) !== 0 && T === null && kr(), Qt && Er();
|
|
660
|
+
}
|
|
661
|
+
function Yr(t, e) {
|
|
662
|
+
var i = e.last;
|
|
663
|
+
i === null ? e.last = e.first = t : (i.next = t, t.prev = i, e.last = t);
|
|
664
|
+
}
|
|
665
|
+
function De(t, e, i, r = true) {
|
|
666
|
+
var n = (t & Be) !== 0, o = T, c = {
|
|
667
|
+
ctx: B,
|
|
668
|
+
deps: null,
|
|
669
|
+
nodes_start: null,
|
|
670
|
+
nodes_end: null,
|
|
671
|
+
f: t | Ee,
|
|
672
|
+
first: null,
|
|
673
|
+
fn: e,
|
|
674
|
+
last: null,
|
|
675
|
+
next: null,
|
|
676
|
+
parent: n ? null : o,
|
|
677
|
+
prev: null,
|
|
678
|
+
teardown: null,
|
|
679
|
+
transitions: null,
|
|
680
|
+
wv: 0
|
|
681
|
+
};
|
|
682
|
+
if (i)
|
|
683
|
+
try {
|
|
684
|
+
Jt(c), c.f |= hr;
|
|
685
|
+
} catch (d) {
|
|
686
|
+
throw ye(c), d;
|
|
687
|
+
}
|
|
688
|
+
else e !== null && ei(c);
|
|
689
|
+
var h = i && c.deps === null && c.first === null && c.nodes_start === null && c.teardown === null && (c.f & (_i | pt)) === 0;
|
|
690
|
+
if (!h && !n && r && (o !== null && Yr(c, o), k !== null && (k.f & J) !== 0)) {
|
|
691
|
+
var f = (
|
|
692
|
+
/** @type {Derived} */
|
|
693
|
+
k
|
|
694
|
+
);
|
|
695
|
+
(f.effects ?? (f.effects = [])).push(c);
|
|
696
|
+
}
|
|
697
|
+
return c;
|
|
698
|
+
}
|
|
699
|
+
function Xr(t) {
|
|
700
|
+
const e = De(St, null, false);
|
|
701
|
+
return de(e, G), e.teardown = t, e;
|
|
702
|
+
}
|
|
703
|
+
function Zr(t) {
|
|
704
|
+
Gr();
|
|
705
|
+
var e = T !== null && (T.f & Ce) !== 0 && B !== null && !B.m;
|
|
706
|
+
if (e) {
|
|
707
|
+
var i = (
|
|
708
|
+
/** @type {ComponentContext} */
|
|
709
|
+
B
|
|
710
|
+
);
|
|
711
|
+
(i.e ?? (i.e = [])).push({
|
|
712
|
+
fn: t,
|
|
713
|
+
effect: T,
|
|
714
|
+
reaction: k
|
|
715
|
+
});
|
|
716
|
+
} else {
|
|
717
|
+
var r = ti(t);
|
|
718
|
+
return r;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
function Qr(t) {
|
|
722
|
+
const e = De(Be, t, true);
|
|
723
|
+
return () => {
|
|
724
|
+
ye(e);
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
function Jr(t) {
|
|
728
|
+
const e = De(Be, t, true);
|
|
729
|
+
return (i = {}) => new Promise((r) => {
|
|
730
|
+
i.outro ? sn(e, () => {
|
|
731
|
+
ye(e), r(void 0);
|
|
732
|
+
}) : (ye(e), r(void 0));
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
function ti(t) {
|
|
736
|
+
return De(gi, t, false);
|
|
737
|
+
}
|
|
738
|
+
function Wi(t) {
|
|
739
|
+
return De(St, t, true);
|
|
740
|
+
}
|
|
741
|
+
function en(t, e = [], i = Ri) {
|
|
742
|
+
const r = e.map(i);
|
|
743
|
+
return tn(() => t(...r.map(U)));
|
|
744
|
+
}
|
|
745
|
+
function tn(t, e = 0) {
|
|
746
|
+
return De(St | Yt | e, t, true);
|
|
747
|
+
}
|
|
748
|
+
function rn(t, e = true) {
|
|
749
|
+
return De(St | Ce, t, true, e);
|
|
750
|
+
}
|
|
751
|
+
function Vi(t) {
|
|
752
|
+
var e = t.teardown;
|
|
753
|
+
if (e !== null) {
|
|
754
|
+
const i = Qt, r = k;
|
|
755
|
+
ui(true), _e(null);
|
|
756
|
+
try {
|
|
757
|
+
e.call(null);
|
|
758
|
+
} finally {
|
|
759
|
+
ui(i), _e(r);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
function Ki(t, e = false) {
|
|
764
|
+
var i = t.first;
|
|
765
|
+
for (t.first = t.last = null; i !== null; ) {
|
|
766
|
+
var r = i.next;
|
|
767
|
+
ye(i, e), i = r;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
function nn(t) {
|
|
771
|
+
for (var e = t.first; e !== null; ) {
|
|
772
|
+
var i = e.next;
|
|
773
|
+
(e.f & Ce) === 0 && ye(e), e = i;
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
function ye(t, e = true) {
|
|
777
|
+
var i = false;
|
|
778
|
+
if ((e || (t.f & pr) !== 0) && t.nodes_start !== null) {
|
|
779
|
+
for (var r = t.nodes_start, n = t.nodes_end; r !== null; ) {
|
|
780
|
+
var o = r === n ? null : (
|
|
781
|
+
/** @type {TemplateNode} */
|
|
782
|
+
/* @__PURE__ */ Tt(r)
|
|
783
|
+
);
|
|
784
|
+
r.remove(), r = o;
|
|
785
|
+
}
|
|
786
|
+
i = true;
|
|
787
|
+
}
|
|
788
|
+
Ki(t, e && !i), kt(t, 0), de(t, Dt);
|
|
789
|
+
var c = t.transitions;
|
|
790
|
+
if (c !== null)
|
|
791
|
+
for (const f of c)
|
|
792
|
+
f.stop();
|
|
793
|
+
Vi(t);
|
|
794
|
+
var h = t.parent;
|
|
795
|
+
h !== null && h.first !== null && qi(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes_start = t.nodes_end = null;
|
|
796
|
+
}
|
|
797
|
+
function qi(t) {
|
|
798
|
+
var e = t.parent, i = t.prev, r = t.next;
|
|
799
|
+
i !== null && (i.next = r), r !== null && (r.prev = i), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = i));
|
|
800
|
+
}
|
|
801
|
+
function sn(t, e) {
|
|
802
|
+
var i = [];
|
|
803
|
+
Hi(t, i, true), on(i, () => {
|
|
804
|
+
ye(t), e && e();
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
function on(t, e) {
|
|
808
|
+
var i = t.length;
|
|
809
|
+
if (i > 0) {
|
|
810
|
+
var r = () => --i || e();
|
|
811
|
+
for (var n of t)
|
|
812
|
+
n.out(r);
|
|
813
|
+
} else
|
|
814
|
+
e();
|
|
815
|
+
}
|
|
816
|
+
function Hi(t, e, i) {
|
|
817
|
+
if ((t.f & wt) === 0) {
|
|
818
|
+
if (t.f ^= wt, t.transitions !== null)
|
|
819
|
+
for (const c of t.transitions)
|
|
820
|
+
(c.is_global || i) && e.push(c);
|
|
821
|
+
for (var r = t.first; r !== null; ) {
|
|
822
|
+
var n = r.next, o = (r.f & br) !== 0 || (r.f & Ce) !== 0;
|
|
823
|
+
Hi(r, e, o ? i : false), r = n;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
function ji(t) {
|
|
828
|
+
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
829
|
+
}
|
|
830
|
+
let B = null;
|
|
831
|
+
function ci(t) {
|
|
832
|
+
B = t;
|
|
833
|
+
}
|
|
834
|
+
function Gi(t, e = false, i) {
|
|
835
|
+
B = {
|
|
836
|
+
p: B,
|
|
837
|
+
c: null,
|
|
838
|
+
e: null,
|
|
839
|
+
m: false,
|
|
840
|
+
s: t,
|
|
841
|
+
x: null,
|
|
842
|
+
l: null
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
function Yi(t) {
|
|
846
|
+
const e = B;
|
|
847
|
+
if (e !== null) {
|
|
848
|
+
t !== void 0 && (e.x = t);
|
|
849
|
+
const c = e.e;
|
|
850
|
+
if (c !== null) {
|
|
851
|
+
var i = T, r = k;
|
|
852
|
+
e.e = null;
|
|
853
|
+
try {
|
|
854
|
+
for (var n = 0; n < c.length; n++) {
|
|
855
|
+
var o = c[n];
|
|
856
|
+
xe(o.effect), _e(o.reaction), ti(o.fn);
|
|
857
|
+
}
|
|
858
|
+
} finally {
|
|
859
|
+
xe(i), _e(r);
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
B = e.p, e.m = true;
|
|
863
|
+
}
|
|
864
|
+
return t || /** @type {T} */
|
|
865
|
+
{};
|
|
866
|
+
}
|
|
867
|
+
function Xi() {
|
|
868
|
+
return true;
|
|
869
|
+
}
|
|
870
|
+
const an = ["touchstart", "touchmove"];
|
|
871
|
+
function ln(t) {
|
|
872
|
+
return an.includes(t);
|
|
873
|
+
}
|
|
874
|
+
function un(t) {
|
|
875
|
+
var e = k, i = T;
|
|
876
|
+
_e(null), xe(null);
|
|
877
|
+
try {
|
|
878
|
+
return t();
|
|
879
|
+
} finally {
|
|
880
|
+
_e(e), xe(i);
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
const Zi = /* @__PURE__ */ new Set(), Vt = /* @__PURE__ */ new Set();
|
|
884
|
+
function cn(t, e, i, r = {}) {
|
|
885
|
+
function n(o) {
|
|
886
|
+
if (r.capture || Xe.call(e, o), !o.cancelBubble)
|
|
887
|
+
return un(() => i == null ? void 0 : i.call(this, o));
|
|
888
|
+
}
|
|
889
|
+
return t.startsWith("pointer") || t.startsWith("touch") || t === "wheel" ? Xt(() => {
|
|
890
|
+
e.addEventListener(t, n, r);
|
|
891
|
+
}) : e.addEventListener(t, n, r), n;
|
|
892
|
+
}
|
|
893
|
+
function lt(t, e, i, r, n) {
|
|
894
|
+
var o = { capture: r, passive: n }, c = cn(t, e, i, o);
|
|
895
|
+
(e === document.body || e === window || e === document) && Xr(() => {
|
|
896
|
+
e.removeEventListener(t, c, o);
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
function dn(t) {
|
|
900
|
+
for (var e = 0; e < t.length; e++)
|
|
901
|
+
Zi.add(t[e]);
|
|
902
|
+
for (var i of Vt)
|
|
903
|
+
i(t);
|
|
904
|
+
}
|
|
905
|
+
function Xe(t) {
|
|
906
|
+
var _a2;
|
|
907
|
+
var e = this, i = (
|
|
908
|
+
/** @type {Node} */
|
|
909
|
+
e.ownerDocument
|
|
910
|
+
), r = t.type, n = ((_a2 = t.composedPath) == null ? void 0 : _a2.call(t)) || [], o = (
|
|
911
|
+
/** @type {null | Element} */
|
|
912
|
+
n[0] || t.target
|
|
913
|
+
), c = 0, h = t.__root;
|
|
914
|
+
if (h) {
|
|
915
|
+
var f = n.indexOf(h);
|
|
916
|
+
if (f !== -1 && (e === document || e === /** @type {any} */
|
|
917
|
+
window)) {
|
|
918
|
+
t.__root = e;
|
|
919
|
+
return;
|
|
920
|
+
}
|
|
921
|
+
var d = n.indexOf(e);
|
|
922
|
+
if (d === -1)
|
|
923
|
+
return;
|
|
924
|
+
f <= d && (c = f);
|
|
925
|
+
}
|
|
926
|
+
if (o = /** @type {Element} */
|
|
927
|
+
n[c] || t.target, o !== e) {
|
|
928
|
+
gt(t, "currentTarget", {
|
|
929
|
+
configurable: true,
|
|
930
|
+
get() {
|
|
931
|
+
return o || i;
|
|
932
|
+
}
|
|
933
|
+
});
|
|
934
|
+
var p = k, w = T;
|
|
935
|
+
_e(null), xe(null);
|
|
936
|
+
try {
|
|
937
|
+
for (var s, a = []; o !== null; ) {
|
|
938
|
+
var l = o.assignedSlot || o.parentNode || /** @type {any} */
|
|
939
|
+
o.host || null;
|
|
940
|
+
try {
|
|
941
|
+
var u = o["__" + r];
|
|
942
|
+
if (u !== void 0 && (!/** @type {any} */
|
|
943
|
+
o.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
944
|
+
// -> the target could not have been disabled because it emits the event in the first place
|
|
945
|
+
t.target === o))
|
|
946
|
+
if (xi(u)) {
|
|
947
|
+
var [b, ...$] = u;
|
|
948
|
+
b.apply(o, [t, ...$]);
|
|
949
|
+
} else
|
|
950
|
+
u.call(o, t);
|
|
951
|
+
} catch (N) {
|
|
952
|
+
s ? a.push(N) : s = N;
|
|
953
|
+
}
|
|
954
|
+
if (t.cancelBubble || l === e || l === null)
|
|
955
|
+
break;
|
|
956
|
+
o = l;
|
|
957
|
+
}
|
|
958
|
+
if (s) {
|
|
959
|
+
for (let N of a)
|
|
960
|
+
queueMicrotask(() => {
|
|
961
|
+
throw N;
|
|
962
|
+
});
|
|
963
|
+
throw s;
|
|
964
|
+
}
|
|
965
|
+
} finally {
|
|
966
|
+
t.__root = e, delete t.currentTarget, _e(p), xe(w);
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
function fn(t) {
|
|
971
|
+
var e = document.createElement("template");
|
|
972
|
+
return e.innerHTML = t, e.content;
|
|
973
|
+
}
|
|
974
|
+
function Kt(t, e) {
|
|
975
|
+
var i = (
|
|
976
|
+
/** @type {Effect} */
|
|
977
|
+
T
|
|
978
|
+
);
|
|
979
|
+
i.nodes_start === null && (i.nodes_start = t, i.nodes_end = e);
|
|
980
|
+
}
|
|
981
|
+
// @__NO_SIDE_EFFECTS__
|
|
982
|
+
function hn(t, e) {
|
|
983
|
+
var i = (e & cr) !== 0, r, n = !t.startsWith("<!>");
|
|
984
|
+
return () => {
|
|
985
|
+
if (ee)
|
|
986
|
+
return Kt(z, null), z;
|
|
987
|
+
r === void 0 && (r = fn(n ? t : "<!>" + t), r = /** @type {Node} */
|
|
988
|
+
/* @__PURE__ */ xt(r));
|
|
989
|
+
var o = (
|
|
990
|
+
/** @type {TemplateNode} */
|
|
991
|
+
i || Li ? document.importNode(r, true) : r.cloneNode(true)
|
|
992
|
+
);
|
|
993
|
+
return Kt(o, o), o;
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
function Qi(t, e) {
|
|
997
|
+
if (ee) {
|
|
998
|
+
T.nodes_end = z, Ai();
|
|
999
|
+
return;
|
|
1000
|
+
}
|
|
1001
|
+
t !== null && t.before(
|
|
1002
|
+
/** @type {Node} */
|
|
1003
|
+
e
|
|
1004
|
+
);
|
|
1005
|
+
}
|
|
1006
|
+
function Ji(t, e) {
|
|
1007
|
+
return er(t, e);
|
|
1008
|
+
}
|
|
1009
|
+
function bn(t, e) {
|
|
1010
|
+
Wt(), e.intro = e.intro ?? false;
|
|
1011
|
+
const i = e.target, r = ee, n = z;
|
|
1012
|
+
try {
|
|
1013
|
+
for (var o = (
|
|
1014
|
+
/** @type {TemplateNode} */
|
|
1015
|
+
/* @__PURE__ */ xt(i)
|
|
1016
|
+
); o && (o.nodeType !== 8 || /** @type {Comment} */
|
|
1017
|
+
o.data !== dr); )
|
|
1018
|
+
o = /** @type {TemplateNode} */
|
|
1019
|
+
/* @__PURE__ */ Tt(o);
|
|
1020
|
+
if (!o)
|
|
1021
|
+
throw Je;
|
|
1022
|
+
at(true), _t(
|
|
1023
|
+
/** @type {Comment} */
|
|
1024
|
+
o
|
|
1025
|
+
), Ai();
|
|
1026
|
+
const c = er(t, { ...e, anchor: o });
|
|
1027
|
+
if (z === null || z.nodeType !== 8 || /** @type {Comment} */
|
|
1028
|
+
z.data !== fr)
|
|
1029
|
+
throw Zt(), Je;
|
|
1030
|
+
return at(false), /** @type {Exports} */
|
|
1031
|
+
c;
|
|
1032
|
+
} catch (c) {
|
|
1033
|
+
if (c === Je)
|
|
1034
|
+
return e.recover === false && Tr(), Wt(), Ur(i), at(false), Ji(t, e);
|
|
1035
|
+
throw c;
|
|
1036
|
+
} finally {
|
|
1037
|
+
at(r), _t(n);
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
const Me = /* @__PURE__ */ new Map();
|
|
1041
|
+
function er(t, { target: e, anchor: i, props: r = {}, events: n, context: o, intro: c = true }) {
|
|
1042
|
+
Wt();
|
|
1043
|
+
var h = /* @__PURE__ */ new Set(), f = (w) => {
|
|
1044
|
+
for (var s = 0; s < w.length; s++) {
|
|
1045
|
+
var a = w[s];
|
|
1046
|
+
if (!h.has(a)) {
|
|
1047
|
+
h.add(a);
|
|
1048
|
+
var l = ln(a);
|
|
1049
|
+
e.addEventListener(a, Xe, { passive: l });
|
|
1050
|
+
var u = Me.get(a);
|
|
1051
|
+
u === void 0 ? (document.addEventListener(a, Xe, { passive: l }), Me.set(a, 1)) : Me.set(a, u + 1);
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
};
|
|
1055
|
+
f(mr(Zi)), Vt.add(f);
|
|
1056
|
+
var d = void 0, p = Jr(() => {
|
|
1057
|
+
var w = i ?? e.appendChild(Ni());
|
|
1058
|
+
return rn(() => {
|
|
1059
|
+
if (o) {
|
|
1060
|
+
Gi({});
|
|
1061
|
+
var s = (
|
|
1062
|
+
/** @type {ComponentContext} */
|
|
1063
|
+
B
|
|
1064
|
+
);
|
|
1065
|
+
s.c = o;
|
|
1066
|
+
}
|
|
1067
|
+
n && (r.$$events = n), ee && Kt(
|
|
1068
|
+
/** @type {TemplateNode} */
|
|
1069
|
+
w,
|
|
1070
|
+
null
|
|
1071
|
+
), d = t(w, r) || {}, ee && (T.nodes_end = z), o && Yi();
|
|
1072
|
+
}), () => {
|
|
1073
|
+
var _a2;
|
|
1074
|
+
for (var s of h) {
|
|
1075
|
+
e.removeEventListener(s, Xe);
|
|
1076
|
+
var a = (
|
|
1077
|
+
/** @type {number} */
|
|
1078
|
+
Me.get(s)
|
|
1079
|
+
);
|
|
1080
|
+
--a === 0 ? (document.removeEventListener(s, Xe), Me.delete(s)) : Me.set(s, a);
|
|
1081
|
+
}
|
|
1082
|
+
Vt.delete(f), w !== i && ((_a2 = w.parentNode) == null ? void 0 : _a2.removeChild(w));
|
|
1083
|
+
};
|
|
1084
|
+
});
|
|
1085
|
+
return qt.set(d, p), d;
|
|
1086
|
+
}
|
|
1087
|
+
let qt = /* @__PURE__ */ new WeakMap();
|
|
1088
|
+
function pn(t, e) {
|
|
1089
|
+
const i = qt.get(t);
|
|
1090
|
+
return i ? (qt.delete(t), i(e)) : Promise.resolve();
|
|
1091
|
+
}
|
|
1092
|
+
function vn(t, e) {
|
|
1093
|
+
Xt(() => {
|
|
1094
|
+
var i = t.getRootNode(), r = (
|
|
1095
|
+
/** @type {ShadowRoot} */
|
|
1096
|
+
i.host ? (
|
|
1097
|
+
/** @type {ShadowRoot} */
|
|
1098
|
+
i
|
|
1099
|
+
) : (
|
|
1100
|
+
/** @type {Document} */
|
|
1101
|
+
i.head ?? /** @type {Document} */
|
|
1102
|
+
i.ownerDocument.head
|
|
1103
|
+
)
|
|
1104
|
+
);
|
|
1105
|
+
if (!r.querySelector("#" + e.hash)) {
|
|
1106
|
+
const n = document.createElement("style");
|
|
1107
|
+
n.id = e.hash, n.textContent = e.code, r.appendChild(n);
|
|
1108
|
+
}
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1111
|
+
const di = [...`
|
|
1112
|
+
\r\f\xA0\v\uFEFF`];
|
|
1113
|
+
function wn(t, e, i) {
|
|
1114
|
+
var r = t == null ? "" : "" + t;
|
|
1115
|
+
if (r = r ? r + " " + e : e, i) {
|
|
1116
|
+
for (var n in i)
|
|
1117
|
+
if (i[n])
|
|
1118
|
+
r = r ? r + " " + n : n;
|
|
1119
|
+
else if (r.length)
|
|
1120
|
+
for (var o = n.length, c = 0; (c = r.indexOf(n, c)) >= 0; ) {
|
|
1121
|
+
var h = c + o;
|
|
1122
|
+
(c === 0 || di.includes(r[c - 1])) && (h === r.length || di.includes(r[h])) ? r = (c === 0 ? "" : r.substring(0, c)) + r.substring(h + 1) : c = h;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
return r === "" ? null : r;
|
|
1126
|
+
}
|
|
1127
|
+
function mn(t, e, i, r, n, o) {
|
|
1128
|
+
var c = t.__className;
|
|
1129
|
+
if (ee || c !== i) {
|
|
1130
|
+
var h = wn(i, r, o);
|
|
1131
|
+
(!ee || h !== t.getAttribute("class")) && (h == null ? t.removeAttribute("class") : t.className = h), t.__className = i;
|
|
1132
|
+
} else if (o)
|
|
1133
|
+
for (var f in o) {
|
|
1134
|
+
var d = !!o[f];
|
|
1135
|
+
(n == null || d !== !!n[f]) && t.classList.toggle(f, d);
|
|
1136
|
+
}
|
|
1137
|
+
return o;
|
|
1138
|
+
}
|
|
1139
|
+
function fi(t, e, i, r) {
|
|
1140
|
+
var n = t.__attributes ?? (t.__attributes = {});
|
|
1141
|
+
ee && (n[e] = t.getAttribute(e)), n[e] !== (n[e] = i) && ("__styles" in t && (t.__styles = {}), i == null ? t.removeAttribute(e) : typeof i != "string" && gn(t).includes(e) ? t[e] = i : t.setAttribute(e, i));
|
|
1142
|
+
}
|
|
1143
|
+
var hi = /* @__PURE__ */ new Map();
|
|
1144
|
+
function gn(t) {
|
|
1145
|
+
var e = hi.get(t.nodeName);
|
|
1146
|
+
if (e) return e;
|
|
1147
|
+
hi.set(t.nodeName, e = []);
|
|
1148
|
+
for (var i, r = t, n = Element.prototype; n !== r; ) {
|
|
1149
|
+
i = gr(r);
|
|
1150
|
+
for (var o in i)
|
|
1151
|
+
i[o].set && e.push(o);
|
|
1152
|
+
r = yi(r);
|
|
1153
|
+
}
|
|
1154
|
+
return e;
|
|
1155
|
+
}
|
|
1156
|
+
function bi(t, e) {
|
|
1157
|
+
return t === e || (t == null ? void 0 : t[ct]) === e;
|
|
1158
|
+
}
|
|
1159
|
+
function Ut(t = {}, e, i, r) {
|
|
1160
|
+
return ti(() => {
|
|
1161
|
+
var n, o;
|
|
1162
|
+
return Wi(() => {
|
|
1163
|
+
n = o, o = [], it(() => {
|
|
1164
|
+
t !== i(...o) && (e(t, ...o), n && bi(i(...n), t) && e(null, ...n));
|
|
1165
|
+
});
|
|
1166
|
+
}), () => {
|
|
1167
|
+
Xt(() => {
|
|
1168
|
+
o && bi(i(...o), t) && e(null, ...o);
|
|
1169
|
+
});
|
|
1170
|
+
};
|
|
1171
|
+
}), t;
|
|
1172
|
+
}
|
|
1173
|
+
function tr(t) {
|
|
1174
|
+
B === null && ji(), Zr(() => {
|
|
1175
|
+
const e = it(t);
|
|
1176
|
+
if (typeof e == "function") return (
|
|
1177
|
+
/** @type {() => void} */
|
|
1178
|
+
e
|
|
1179
|
+
);
|
|
1180
|
+
});
|
|
1181
|
+
}
|
|
1182
|
+
function _n(t) {
|
|
1183
|
+
B === null && ji(), tr(() => () => it(t));
|
|
1184
|
+
}
|
|
1185
|
+
function xn(t, e, i) {
|
|
1186
|
+
if (t == null)
|
|
1187
|
+
return e(void 0), dt;
|
|
1188
|
+
const r = it(
|
|
1189
|
+
() => t.subscribe(
|
|
1190
|
+
e,
|
|
1191
|
+
// @ts-expect-error
|
|
1192
|
+
i
|
|
1193
|
+
)
|
|
1194
|
+
);
|
|
1195
|
+
return r.unsubscribe ? () => r.unsubscribe() : r;
|
|
1196
|
+
}
|
|
1197
|
+
const Fe = [];
|
|
1198
|
+
function ir(t, e = dt) {
|
|
1199
|
+
let i = null;
|
|
1200
|
+
const r = /* @__PURE__ */ new Set();
|
|
1201
|
+
function n(h) {
|
|
1202
|
+
if (Si(t, h) && (t = h, i)) {
|
|
1203
|
+
const f = !Fe.length;
|
|
1204
|
+
for (const d of r)
|
|
1205
|
+
d[1](), Fe.push(d, t);
|
|
1206
|
+
if (f) {
|
|
1207
|
+
for (let d = 0; d < Fe.length; d += 2)
|
|
1208
|
+
Fe[d][0](Fe[d + 1]);
|
|
1209
|
+
Fe.length = 0;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
function o(h) {
|
|
1214
|
+
n(h(
|
|
1215
|
+
/** @type {T} */
|
|
1216
|
+
t
|
|
1217
|
+
));
|
|
1218
|
+
}
|
|
1219
|
+
function c(h, f = dt) {
|
|
1220
|
+
const d = [h, f];
|
|
1221
|
+
return r.add(d), r.size === 1 && (i = e(n, o) || dt), h(
|
|
1222
|
+
/** @type {T} */
|
|
1223
|
+
t
|
|
1224
|
+
), () => {
|
|
1225
|
+
r.delete(d), r.size === 0 && i && (i(), i = null);
|
|
1226
|
+
};
|
|
1227
|
+
}
|
|
1228
|
+
return { set: n, update: o, subscribe: c };
|
|
1229
|
+
}
|
|
1230
|
+
function rr(t) {
|
|
1231
|
+
let e;
|
|
1232
|
+
return xn(t, (i) => e = i)(), e;
|
|
1233
|
+
}
|
|
1234
|
+
function ut(t, e, i, r) {
|
|
1235
|
+
var n;
|
|
1236
|
+
n = /** @type {V} */
|
|
1237
|
+
t[e];
|
|
1238
|
+
var o = (
|
|
1239
|
+
/** @type {V} */
|
|
1240
|
+
r
|
|
1241
|
+
), c = true, h = false, f = () => (h = true, c && (c = false, o = /** @type {V} */
|
|
1242
|
+
r), o), d;
|
|
1243
|
+
d = () => {
|
|
1244
|
+
var a = (
|
|
1245
|
+
/** @type {V} */
|
|
1246
|
+
t[e]
|
|
1247
|
+
);
|
|
1248
|
+
return a === void 0 ? f() : (c = true, h = false, a);
|
|
1249
|
+
};
|
|
1250
|
+
var p = false, w = /* @__PURE__ */ Di(n), s = /* @__PURE__ */ Ri(() => {
|
|
1251
|
+
var a = d(), l = U(w);
|
|
1252
|
+
return p ? (p = false, l) : w.v = a;
|
|
1253
|
+
});
|
|
1254
|
+
return function(a, l) {
|
|
1255
|
+
if (arguments.length > 0) {
|
|
1256
|
+
const u = l ? U(s) : a;
|
|
1257
|
+
return s.equals(u) || (p = true, j(w, u), h && o !== void 0 && (o = u), it(() => U(s))), a;
|
|
1258
|
+
}
|
|
1259
|
+
return U(s);
|
|
1260
|
+
};
|
|
1261
|
+
}
|
|
1262
|
+
function yn(t) {
|
|
1263
|
+
return new Cn(t);
|
|
1264
|
+
}
|
|
1265
|
+
class Cn {
|
|
1266
|
+
/**
|
|
1267
|
+
* @param {ComponentConstructorOptions & {
|
|
1268
|
+
* component: any;
|
|
1269
|
+
* }} options
|
|
1270
|
+
*/
|
|
1271
|
+
constructor(e) {
|
|
1272
|
+
/** @type {any} */
|
|
1273
|
+
__privateAdd(this, _t2);
|
|
1274
|
+
/** @type {Record<string, any>} */
|
|
1275
|
+
__privateAdd(this, _e2);
|
|
1276
|
+
var _a2;
|
|
1277
|
+
var i = /* @__PURE__ */ new Map(), r = (o, c) => {
|
|
1278
|
+
var h = /* @__PURE__ */ Di(c);
|
|
1279
|
+
return i.set(o, h), h;
|
|
1280
|
+
};
|
|
1281
|
+
const n = new Proxy(
|
|
1282
|
+
{ ...e.props || {}, $$events: {} },
|
|
1283
|
+
{
|
|
1284
|
+
get(o, c) {
|
|
1285
|
+
return U(i.get(c) ?? r(c, Reflect.get(o, c)));
|
|
1286
|
+
},
|
|
1287
|
+
has(o, c) {
|
|
1288
|
+
return c === vr ? true : (U(i.get(c) ?? r(c, Reflect.get(o, c))), Reflect.has(o, c));
|
|
1289
|
+
},
|
|
1290
|
+
set(o, c, h) {
|
|
1291
|
+
return j(i.get(c) ?? r(c, h), h), Reflect.set(o, c, h);
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
);
|
|
1295
|
+
__privateSet(this, _e2, (e.hydrate ? bn : Ji)(e.component, {
|
|
1296
|
+
target: e.target,
|
|
1297
|
+
anchor: e.anchor,
|
|
1298
|
+
props: n,
|
|
1299
|
+
context: e.context,
|
|
1300
|
+
intro: e.intro ?? false,
|
|
1301
|
+
recover: e.recover
|
|
1302
|
+
})), (!((_a2 = e == null ? void 0 : e.props) == null ? void 0 : _a2.$$host) || e.sync === false) && Ye(), __privateSet(this, _t2, n.$$events);
|
|
1303
|
+
for (const o of Object.keys(__privateGet(this, _e2)))
|
|
1304
|
+
o === "$set" || o === "$destroy" || o === "$on" || gt(this, o, {
|
|
1305
|
+
get() {
|
|
1306
|
+
return __privateGet(this, _e2)[o];
|
|
1307
|
+
},
|
|
1308
|
+
/** @param {any} value */
|
|
1309
|
+
set(c) {
|
|
1310
|
+
__privateGet(this, _e2)[o] = c;
|
|
1311
|
+
},
|
|
1312
|
+
enumerable: true
|
|
1313
|
+
});
|
|
1314
|
+
__privateGet(this, _e2).$set = /** @param {Record<string, any>} next */
|
|
1315
|
+
(o) => {
|
|
1316
|
+
Object.assign(n, o);
|
|
1317
|
+
}, __privateGet(this, _e2).$destroy = () => {
|
|
1318
|
+
pn(__privateGet(this, _e2));
|
|
1319
|
+
};
|
|
1320
|
+
}
|
|
1321
|
+
/** @param {Record<string, any>} props */
|
|
1322
|
+
$set(e) {
|
|
1323
|
+
__privateGet(this, _e2).$set(e);
|
|
1324
|
+
}
|
|
1325
|
+
/**
|
|
1326
|
+
* @param {string} event
|
|
1327
|
+
* @param {(...args: any[]) => any} callback
|
|
1328
|
+
* @returns {any}
|
|
1329
|
+
*/
|
|
1330
|
+
$on(e, i) {
|
|
1331
|
+
__privateGet(this, _t2)[e] = __privateGet(this, _t2)[e] || [];
|
|
1332
|
+
const r = (...n) => i.call(this, ...n);
|
|
1333
|
+
return __privateGet(this, _t2)[e].push(r), () => {
|
|
1334
|
+
__privateGet(this, _t2)[e] = __privateGet(this, _t2)[e].filter(
|
|
1335
|
+
/** @param {any} fn */
|
|
1336
|
+
(n) => n !== r
|
|
1337
|
+
);
|
|
1338
|
+
};
|
|
1339
|
+
}
|
|
1340
|
+
$destroy() {
|
|
1341
|
+
__privateGet(this, _e2).$destroy();
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
_t2 = new WeakMap();
|
|
1345
|
+
_e2 = new WeakMap();
|
|
1346
|
+
let nr;
|
|
1347
|
+
typeof HTMLElement == "function" && (nr = class extends HTMLElement {
|
|
1348
|
+
/**
|
|
1349
|
+
* @param {*} $$componentCtor
|
|
1350
|
+
* @param {*} $$slots
|
|
1351
|
+
* @param {*} use_shadow_dom
|
|
1352
|
+
*/
|
|
1353
|
+
constructor(t, e, i) {
|
|
1354
|
+
super();
|
|
1355
|
+
/** The Svelte component constructor */
|
|
1356
|
+
__publicField(this, "$$ctor");
|
|
1357
|
+
/** Slots */
|
|
1358
|
+
__publicField(this, "$$s");
|
|
1359
|
+
/** @type {any} The Svelte component instance */
|
|
1360
|
+
__publicField(this, "$$c");
|
|
1361
|
+
/** Whether or not the custom element is connected */
|
|
1362
|
+
__publicField(this, "$$cn", false);
|
|
1363
|
+
/** @type {Record<string, any>} Component props data */
|
|
1364
|
+
__publicField(this, "$$d", {});
|
|
1365
|
+
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
1366
|
+
__publicField(this, "$$r", false);
|
|
1367
|
+
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
1368
|
+
__publicField(this, "$$p_d", {});
|
|
1369
|
+
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
1370
|
+
__publicField(this, "$$l", {});
|
|
1371
|
+
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
1372
|
+
__publicField(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
1373
|
+
/** @type {any} The managed render effect for reflecting attributes */
|
|
1374
|
+
__publicField(this, "$$me");
|
|
1375
|
+
this.$$ctor = t, this.$$s = e, i && this.attachShadow({ mode: "open" });
|
|
1376
|
+
}
|
|
1377
|
+
/**
|
|
1378
|
+
* @param {string} type
|
|
1379
|
+
* @param {EventListenerOrEventListenerObject} listener
|
|
1380
|
+
* @param {boolean | AddEventListenerOptions} [options]
|
|
1381
|
+
*/
|
|
1382
|
+
addEventListener(t, e, i) {
|
|
1383
|
+
if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(e), this.$$c) {
|
|
1384
|
+
const r = this.$$c.$on(t, e);
|
|
1385
|
+
this.$$l_u.set(e, r);
|
|
1386
|
+
}
|
|
1387
|
+
super.addEventListener(t, e, i);
|
|
1388
|
+
}
|
|
1389
|
+
/**
|
|
1390
|
+
* @param {string} type
|
|
1391
|
+
* @param {EventListenerOrEventListenerObject} listener
|
|
1392
|
+
* @param {boolean | AddEventListenerOptions} [options]
|
|
1393
|
+
*/
|
|
1394
|
+
removeEventListener(t, e, i) {
|
|
1395
|
+
if (super.removeEventListener(t, e, i), this.$$c) {
|
|
1396
|
+
const r = this.$$l_u.get(e);
|
|
1397
|
+
r && (r(), this.$$l_u.delete(e));
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
async connectedCallback() {
|
|
1401
|
+
if (this.$$cn = true, !this.$$c) {
|
|
1402
|
+
let t = function(r) {
|
|
1403
|
+
return (n) => {
|
|
1404
|
+
const o = document.createElement("slot");
|
|
1405
|
+
r !== "default" && (o.name = r), Qi(n, o);
|
|
1406
|
+
};
|
|
1407
|
+
};
|
|
1408
|
+
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
1409
|
+
return;
|
|
1410
|
+
const e = {}, i = En(this);
|
|
1411
|
+
for (const r of this.$$s)
|
|
1412
|
+
r in i && (r === "default" && !this.$$d.children ? (this.$$d.children = t(r), e.default = true) : e[r] = t(r));
|
|
1413
|
+
for (const r of this.attributes) {
|
|
1414
|
+
const n = this.$$g_p(r.name);
|
|
1415
|
+
n in this.$$d || (this.$$d[n] = bt(n, r.value, this.$$p_d, "toProp"));
|
|
1416
|
+
}
|
|
1417
|
+
for (const r in this.$$p_d)
|
|
1418
|
+
!(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
|
|
1419
|
+
this.$$c = yn({
|
|
1420
|
+
component: this.$$ctor,
|
|
1421
|
+
target: this.shadowRoot || this,
|
|
1422
|
+
props: {
|
|
1423
|
+
...this.$$d,
|
|
1424
|
+
$$slots: e,
|
|
1425
|
+
$$host: this
|
|
1426
|
+
}
|
|
1427
|
+
}), this.$$me = Qr(() => {
|
|
1428
|
+
Wi(() => {
|
|
1429
|
+
var _a2;
|
|
1430
|
+
this.$$r = true;
|
|
1431
|
+
for (const r of mt(this.$$c)) {
|
|
1432
|
+
if (!((_a2 = this.$$p_d[r]) == null ? void 0 : _a2.reflect)) continue;
|
|
1433
|
+
this.$$d[r] = this.$$c[r];
|
|
1434
|
+
const n = bt(
|
|
1435
|
+
r,
|
|
1436
|
+
this.$$d[r],
|
|
1437
|
+
this.$$p_d,
|
|
1438
|
+
"toAttribute"
|
|
1439
|
+
);
|
|
1440
|
+
n == null ? this.removeAttribute(this.$$p_d[r].attribute || r) : this.setAttribute(this.$$p_d[r].attribute || r, n);
|
|
1441
|
+
}
|
|
1442
|
+
this.$$r = false;
|
|
1443
|
+
});
|
|
1444
|
+
});
|
|
1445
|
+
for (const r in this.$$l)
|
|
1446
|
+
for (const n of this.$$l[r]) {
|
|
1447
|
+
const o = this.$$c.$on(r, n);
|
|
1448
|
+
this.$$l_u.set(n, o);
|
|
1449
|
+
}
|
|
1450
|
+
this.$$l = {};
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
|
|
1454
|
+
// and setting attributes through setAttribute etc, this is helpful
|
|
1455
|
+
/**
|
|
1456
|
+
* @param {string} attr
|
|
1457
|
+
* @param {string} _oldValue
|
|
1458
|
+
* @param {string} newValue
|
|
1459
|
+
*/
|
|
1460
|
+
attributeChangedCallback(t, e, i) {
|
|
1461
|
+
var _a2;
|
|
1462
|
+
this.$$r || (t = this.$$g_p(t), this.$$d[t] = bt(t, i, this.$$p_d, "toProp"), (_a2 = this.$$c) == null ? void 0 : _a2.$set({ [t]: this.$$d[t] }));
|
|
1463
|
+
}
|
|
1464
|
+
disconnectedCallback() {
|
|
1465
|
+
this.$$cn = false, Promise.resolve().then(() => {
|
|
1466
|
+
!this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
|
|
1467
|
+
});
|
|
1468
|
+
}
|
|
1469
|
+
/**
|
|
1470
|
+
* @param {string} attribute_name
|
|
1471
|
+
*/
|
|
1472
|
+
$$g_p(t) {
|
|
1473
|
+
return mt(this.$$p_d).find(
|
|
1474
|
+
(e) => this.$$p_d[e].attribute === t || !this.$$p_d[e].attribute && e.toLowerCase() === t
|
|
1475
|
+
) || t;
|
|
1476
|
+
}
|
|
1477
|
+
});
|
|
1478
|
+
function bt(t, e, i, r) {
|
|
1479
|
+
var _a2;
|
|
1480
|
+
const n = (_a2 = i[t]) == null ? void 0 : _a2.type;
|
|
1481
|
+
if (e = n === "Boolean" && typeof e != "boolean" ? e != null : e, !r || !i[t])
|
|
1482
|
+
return e;
|
|
1483
|
+
if (r === "toAttribute")
|
|
1484
|
+
switch (n) {
|
|
1485
|
+
case "Object":
|
|
1486
|
+
case "Array":
|
|
1487
|
+
return e == null ? null : JSON.stringify(e);
|
|
1488
|
+
case "Boolean":
|
|
1489
|
+
return e ? "" : null;
|
|
1490
|
+
case "Number":
|
|
1491
|
+
return e ?? null;
|
|
1492
|
+
default:
|
|
1493
|
+
return e;
|
|
1494
|
+
}
|
|
1495
|
+
else
|
|
1496
|
+
switch (n) {
|
|
1497
|
+
case "Object":
|
|
1498
|
+
case "Array":
|
|
1499
|
+
return e && JSON.parse(e);
|
|
1500
|
+
case "Boolean":
|
|
1501
|
+
return e;
|
|
1502
|
+
// conversion already handled above
|
|
1503
|
+
case "Number":
|
|
1504
|
+
return e != null ? +e : e;
|
|
1505
|
+
default:
|
|
1506
|
+
return e;
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
function En(t) {
|
|
1510
|
+
const e = {};
|
|
1511
|
+
return t.childNodes.forEach((i) => {
|
|
1512
|
+
e[
|
|
1513
|
+
/** @type {Element} node */
|
|
1514
|
+
i.slot || "default"
|
|
1515
|
+
] = true;
|
|
1516
|
+
}), e;
|
|
1517
|
+
}
|
|
1518
|
+
function kn(t, e, i, r, n, o) {
|
|
1519
|
+
let c = class extends nr {
|
|
1520
|
+
constructor() {
|
|
1521
|
+
super(t, i, n), this.$$p_d = e;
|
|
1522
|
+
}
|
|
1523
|
+
static get observedAttributes() {
|
|
1524
|
+
return mt(e).map(
|
|
1525
|
+
(h) => (e[h].attribute || h).toLowerCase()
|
|
1526
|
+
);
|
|
1527
|
+
}
|
|
1528
|
+
};
|
|
1529
|
+
return mt(e).forEach((h) => {
|
|
1530
|
+
gt(c.prototype, h, {
|
|
1531
|
+
get() {
|
|
1532
|
+
return this.$$c && h in this.$$c ? this.$$c[h] : this.$$d[h];
|
|
1533
|
+
},
|
|
1534
|
+
set(f) {
|
|
1535
|
+
var _a2;
|
|
1536
|
+
f = bt(h, f, e), this.$$d[h] = f;
|
|
1537
|
+
var d = this.$$c;
|
|
1538
|
+
if (d) {
|
|
1539
|
+
var p = (_a2 = Ue(d, h)) == null ? void 0 : _a2.get;
|
|
1540
|
+
p ? d[h] = f : d.$set({ [h]: f });
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
});
|
|
1544
|
+
}), r.forEach((h) => {
|
|
1545
|
+
gt(c.prototype, h, {
|
|
1546
|
+
get() {
|
|
1547
|
+
var _a2;
|
|
1548
|
+
return (_a2 = this.$$c) == null ? void 0 : _a2[h];
|
|
1549
|
+
}
|
|
1550
|
+
});
|
|
1551
|
+
}), o && (c = o(c)), t.element = /** @type {any} */
|
|
1552
|
+
c, c;
|
|
1553
|
+
}
|
|
1554
|
+
class Sn {
|
|
1555
|
+
constructor() {
|
|
1556
|
+
__publicField(this, "verbose", false);
|
|
1557
|
+
}
|
|
1558
|
+
info(e) {
|
|
1559
|
+
this.verbose && console.log(e);
|
|
1560
|
+
}
|
|
1561
|
+
error(e, i) {
|
|
1562
|
+
this.verbose && console.error(e, i);
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
const F = new Sn();
|
|
1566
|
+
function Dn(t) {
|
|
1567
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1568
|
+
}
|
|
1569
|
+
var Ze = { exports: {} }, Tn = Ze.exports, pi;
|
|
1570
|
+
function Rn() {
|
|
1571
|
+
return pi || (pi = 1, (function(t, e) {
|
|
1572
|
+
(function(i, r) {
|
|
1573
|
+
var n = "1.0.41", o = "", c = "?", h = "function", f = "undefined", d = "object", p = "string", w = "major", s = "model", a = "name", l = "type", u = "vendor", b = "version", $ = "architecture", N = "console", _ = "mobile", m = "tablet", O = "smarttv", A = "wearable", fe = "embedded", Ie = 500, Te = "Amazon", he = "Apple", be = "ASUS", rt = "BlackBerry", Re = "Browser", $e = "Chrome", Ot = "Edge", ke = "Firefox", Oe = "Google", nt = "Honor", st = "Huawei", At = "Lenovo", pe = "LG", We = "Microsoft", Ve = "Motorola", Ae = "Nvidia", Ke = "OnePlus", ve = "Opera", we = "OPPO", X = "Samsung", qe = "Sharp", ae = "Sony", I = "Xiaomi", v = "Zebra", S = "Facebook", L = "Chromium OS", R = "Mac OS", M = " Browser", W = function(y, C) {
|
|
1574
|
+
var x = {};
|
|
1575
|
+
for (var D in y)
|
|
1576
|
+
C[D] && C[D].length % 2 === 0 ? x[D] = C[D].concat(y[D]) : x[D] = y[D];
|
|
1577
|
+
return x;
|
|
1578
|
+
}, V = function(y) {
|
|
1579
|
+
for (var C = {}, x = 0; x < y.length; x++)
|
|
1580
|
+
C[y[x].toUpperCase()] = y[x];
|
|
1581
|
+
return C;
|
|
1582
|
+
}, te = function(y, C) {
|
|
1583
|
+
return typeof y === p ? He(C).indexOf(He(y)) !== -1 : false;
|
|
1584
|
+
}, He = function(y) {
|
|
1585
|
+
return y.toLowerCase();
|
|
1586
|
+
}, lr = function(y) {
|
|
1587
|
+
return typeof y === p ? y.replace(/[^\d\.]/g, o).split(".")[0] : r;
|
|
1588
|
+
}, Lt = function(y, C) {
|
|
1589
|
+
if (typeof y === p)
|
|
1590
|
+
return y = y.replace(/^\s\s*/, o), typeof C === f ? y : y.substring(0, Ie);
|
|
1591
|
+
}, je = function(y, C) {
|
|
1592
|
+
for (var x = 0, D, le, ie, E, g, re; x < C.length && !g; ) {
|
|
1593
|
+
var Mt = C[x], ni = C[x + 1];
|
|
1594
|
+
for (D = le = 0; D < Mt.length && !g && Mt[D]; )
|
|
1595
|
+
if (g = Mt[D++].exec(y), g)
|
|
1596
|
+
for (ie = 0; ie < ni.length; ie++)
|
|
1597
|
+
re = g[++le], E = ni[ie], typeof E === d && E.length > 0 ? E.length === 2 ? typeof E[1] == h ? this[E[0]] = E[1].call(this, re) : this[E[0]] = E[1] : E.length === 3 ? typeof E[1] === h && !(E[1].exec && E[1].test) ? this[E[0]] = re ? E[1].call(this, re, E[2]) : r : this[E[0]] = re ? re.replace(E[1], E[2]) : r : E.length === 4 && (this[E[0]] = re ? E[3].call(this, re.replace(E[1], E[2])) : r) : this[E] = re || r;
|
|
1598
|
+
x += 2;
|
|
1599
|
+
}
|
|
1600
|
+
}, Ge = function(y, C) {
|
|
1601
|
+
for (var x in C)
|
|
1602
|
+
if (typeof C[x] === d && C[x].length > 0) {
|
|
1603
|
+
for (var D = 0; D < C[x].length; D++)
|
|
1604
|
+
if (te(C[x][D], y))
|
|
1605
|
+
return x === c ? r : x;
|
|
1606
|
+
} else if (te(C[x], y))
|
|
1607
|
+
return x === c ? r : x;
|
|
1608
|
+
return C.hasOwnProperty("*") ? C["*"] : y;
|
|
1609
|
+
}, ur = {
|
|
1610
|
+
"1.0": "/8",
|
|
1611
|
+
"1.2": "/1",
|
|
1612
|
+
"1.3": "/3",
|
|
1613
|
+
"2.0": "/412",
|
|
1614
|
+
"2.0.2": "/416",
|
|
1615
|
+
"2.0.3": "/417",
|
|
1616
|
+
"2.0.4": "/419",
|
|
1617
|
+
"?": "/"
|
|
1618
|
+
}, ii = {
|
|
1619
|
+
ME: "4.90",
|
|
1620
|
+
"NT 3.11": "NT3.51",
|
|
1621
|
+
"NT 4.0": "NT4.0",
|
|
1622
|
+
2e3: "NT 5.0",
|
|
1623
|
+
XP: ["NT 5.1", "NT 5.2"],
|
|
1624
|
+
Vista: "NT 6.0",
|
|
1625
|
+
7: "NT 6.1",
|
|
1626
|
+
8: "NT 6.2",
|
|
1627
|
+
"8.1": "NT 6.3",
|
|
1628
|
+
10: ["NT 6.4", "NT 10.0"],
|
|
1629
|
+
RT: "ARM"
|
|
1630
|
+
}, ri = {
|
|
1631
|
+
browser: [
|
|
1632
|
+
[
|
|
1633
|
+
/\b(?:crmo|crios)\/([\w\.]+)/i
|
|
1634
|
+
// Chrome for Android/iOS
|
|
1635
|
+
],
|
|
1636
|
+
[b, [a, "Chrome"]],
|
|
1637
|
+
[
|
|
1638
|
+
/edg(?:e|ios|a)?\/([\w\.]+)/i
|
|
1639
|
+
// Microsoft Edge
|
|
1640
|
+
],
|
|
1641
|
+
[b, [a, "Edge"]],
|
|
1642
|
+
[
|
|
1643
|
+
// Presto based
|
|
1644
|
+
/(opera mini)\/([-\w\.]+)/i,
|
|
1645
|
+
// Opera Mini
|
|
1646
|
+
/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,
|
|
1647
|
+
// Opera Mobi/Tablet
|
|
1648
|
+
/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
|
|
1649
|
+
// Opera
|
|
1650
|
+
],
|
|
1651
|
+
[a, b],
|
|
1652
|
+
[
|
|
1653
|
+
/opios[\/ ]+([\w\.]+)/i
|
|
1654
|
+
// Opera mini on iphone >= 8.0
|
|
1655
|
+
],
|
|
1656
|
+
[b, [a, ve + " Mini"]],
|
|
1657
|
+
[
|
|
1658
|
+
/\bop(?:rg)?x\/([\w\.]+)/i
|
|
1659
|
+
// Opera GX
|
|
1660
|
+
],
|
|
1661
|
+
[b, [a, ve + " GX"]],
|
|
1662
|
+
[
|
|
1663
|
+
/\bopr\/([\w\.]+)/i
|
|
1664
|
+
// Opera Webkit
|
|
1665
|
+
],
|
|
1666
|
+
[b, [a, ve]],
|
|
1667
|
+
[
|
|
1668
|
+
// Mixed
|
|
1669
|
+
/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
|
|
1670
|
+
// Baidu
|
|
1671
|
+
],
|
|
1672
|
+
[b, [a, "Baidu"]],
|
|
1673
|
+
[
|
|
1674
|
+
/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i
|
|
1675
|
+
// Maxthon
|
|
1676
|
+
],
|
|
1677
|
+
[b, [a, "Maxthon"]],
|
|
1678
|
+
[
|
|
1679
|
+
/(kindle)\/([\w\.]+)/i,
|
|
1680
|
+
// Kindle
|
|
1681
|
+
/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,
|
|
1682
|
+
// Lunascape/Maxthon/Netfront/Jasmine/Blazer/Sleipnir
|
|
1683
|
+
// Trident based
|
|
1684
|
+
/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,
|
|
1685
|
+
// Avant/IEMobile/SlimBrowser/SlimBoat/Slimjet
|
|
1686
|
+
/(?:ms|\()(ie) ([\w\.]+)/i,
|
|
1687
|
+
// Internet Explorer
|
|
1688
|
+
// Blink/Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
|
|
1689
|
+
/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,
|
|
1690
|
+
// Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio/Dragon
|
|
1691
|
+
/(heytap|ovi|115)browser\/([\d\.]+)/i,
|
|
1692
|
+
// HeyTap/Ovi/115
|
|
1693
|
+
/(weibo)__([\d\.]+)/i
|
|
1694
|
+
// Weibo
|
|
1695
|
+
],
|
|
1696
|
+
[a, b],
|
|
1697
|
+
[
|
|
1698
|
+
/quark(?:pc)?\/([-\w\.]+)/i
|
|
1699
|
+
// Quark
|
|
1700
|
+
],
|
|
1701
|
+
[b, [a, "Quark"]],
|
|
1702
|
+
[
|
|
1703
|
+
/\bddg\/([\w\.]+)/i
|
|
1704
|
+
// DuckDuckGo
|
|
1705
|
+
],
|
|
1706
|
+
[b, [a, "DuckDuckGo"]],
|
|
1707
|
+
[
|
|
1708
|
+
/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i
|
|
1709
|
+
// UCBrowser
|
|
1710
|
+
],
|
|
1711
|
+
[b, [a, "UC" + Re]],
|
|
1712
|
+
[
|
|
1713
|
+
/microm.+\bqbcore\/([\w\.]+)/i,
|
|
1714
|
+
// WeChat Desktop for Windows Built-in Browser
|
|
1715
|
+
/\bqbcore\/([\w\.]+).+microm/i,
|
|
1716
|
+
/micromessenger\/([\w\.]+)/i
|
|
1717
|
+
// WeChat
|
|
1718
|
+
],
|
|
1719
|
+
[b, [a, "WeChat"]],
|
|
1720
|
+
[
|
|
1721
|
+
/konqueror\/([\w\.]+)/i
|
|
1722
|
+
// Konqueror
|
|
1723
|
+
],
|
|
1724
|
+
[b, [a, "Konqueror"]],
|
|
1725
|
+
[
|
|
1726
|
+
/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i
|
|
1727
|
+
// IE11
|
|
1728
|
+
],
|
|
1729
|
+
[b, [a, "IE"]],
|
|
1730
|
+
[
|
|
1731
|
+
/ya(?:search)?browser\/([\w\.]+)/i
|
|
1732
|
+
// Yandex
|
|
1733
|
+
],
|
|
1734
|
+
[b, [a, "Yandex"]],
|
|
1735
|
+
[
|
|
1736
|
+
/slbrowser\/([\w\.]+)/i
|
|
1737
|
+
// Smart Lenovo Browser
|
|
1738
|
+
],
|
|
1739
|
+
[b, [a, "Smart Lenovo " + Re]],
|
|
1740
|
+
[
|
|
1741
|
+
/(avast|avg)\/([\w\.]+)/i
|
|
1742
|
+
// Avast/AVG Secure Browser
|
|
1743
|
+
],
|
|
1744
|
+
[[a, /(.+)/, "$1 Secure " + Re], b],
|
|
1745
|
+
[
|
|
1746
|
+
/\bfocus\/([\w\.]+)/i
|
|
1747
|
+
// Firefox Focus
|
|
1748
|
+
],
|
|
1749
|
+
[b, [a, ke + " Focus"]],
|
|
1750
|
+
[
|
|
1751
|
+
/\bopt\/([\w\.]+)/i
|
|
1752
|
+
// Opera Touch
|
|
1753
|
+
],
|
|
1754
|
+
[b, [a, ve + " Touch"]],
|
|
1755
|
+
[
|
|
1756
|
+
/coc_coc\w+\/([\w\.]+)/i
|
|
1757
|
+
// Coc Coc Browser
|
|
1758
|
+
],
|
|
1759
|
+
[b, [a, "Coc Coc"]],
|
|
1760
|
+
[
|
|
1761
|
+
/dolfin\/([\w\.]+)/i
|
|
1762
|
+
// Dolphin
|
|
1763
|
+
],
|
|
1764
|
+
[b, [a, "Dolphin"]],
|
|
1765
|
+
[
|
|
1766
|
+
/coast\/([\w\.]+)/i
|
|
1767
|
+
// Opera Coast
|
|
1768
|
+
],
|
|
1769
|
+
[b, [a, ve + " Coast"]],
|
|
1770
|
+
[
|
|
1771
|
+
/miuibrowser\/([\w\.]+)/i
|
|
1772
|
+
// MIUI Browser
|
|
1773
|
+
],
|
|
1774
|
+
[b, [a, "MIUI" + M]],
|
|
1775
|
+
[
|
|
1776
|
+
/fxios\/([\w\.-]+)/i
|
|
1777
|
+
// Firefox for iOS
|
|
1778
|
+
],
|
|
1779
|
+
[b, [a, ke]],
|
|
1780
|
+
[
|
|
1781
|
+
/\bqihoobrowser\/?([\w\.]*)/i
|
|
1782
|
+
// 360
|
|
1783
|
+
],
|
|
1784
|
+
[b, [a, "360"]],
|
|
1785
|
+
[
|
|
1786
|
+
/\b(qq)\/([\w\.]+)/i
|
|
1787
|
+
// QQ
|
|
1788
|
+
],
|
|
1789
|
+
[[a, /(.+)/, "$1Browser"], b],
|
|
1790
|
+
[
|
|
1791
|
+
/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i
|
|
1792
|
+
],
|
|
1793
|
+
[[a, /(.+)/, "$1" + M], b],
|
|
1794
|
+
[
|
|
1795
|
+
// Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser
|
|
1796
|
+
/samsungbrowser\/([\w\.]+)/i
|
|
1797
|
+
// Samsung Internet
|
|
1798
|
+
],
|
|
1799
|
+
[b, [a, X + " Internet"]],
|
|
1800
|
+
[
|
|
1801
|
+
/metasr[\/ ]?([\d\.]+)/i
|
|
1802
|
+
// Sogou Explorer
|
|
1803
|
+
],
|
|
1804
|
+
[b, [a, "Sogou Explorer"]],
|
|
1805
|
+
[
|
|
1806
|
+
/(sogou)mo\w+\/([\d\.]+)/i
|
|
1807
|
+
// Sogou Mobile
|
|
1808
|
+
],
|
|
1809
|
+
[[a, "Sogou Mobile"], b],
|
|
1810
|
+
[
|
|
1811
|
+
/(electron)\/([\w\.]+) safari/i,
|
|
1812
|
+
// Electron-based App
|
|
1813
|
+
/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,
|
|
1814
|
+
// Tesla
|
|
1815
|
+
/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i
|
|
1816
|
+
// QQ/2345
|
|
1817
|
+
],
|
|
1818
|
+
[a, b],
|
|
1819
|
+
[
|
|
1820
|
+
/(lbbrowser|rekonq)/i,
|
|
1821
|
+
// LieBao Browser/Rekonq
|
|
1822
|
+
/\[(linkedin)app\]/i
|
|
1823
|
+
// LinkedIn App for iOS & Android
|
|
1824
|
+
],
|
|
1825
|
+
[a],
|
|
1826
|
+
[
|
|
1827
|
+
/ome\/([\w\.]+) \w* ?(iron) saf/i,
|
|
1828
|
+
// Iron
|
|
1829
|
+
/ome\/([\w\.]+).+qihu (360)[es]e/i
|
|
1830
|
+
// 360
|
|
1831
|
+
],
|
|
1832
|
+
[b, a],
|
|
1833
|
+
[
|
|
1834
|
+
// WebView
|
|
1835
|
+
/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
|
|
1836
|
+
// Facebook App for iOS & Android
|
|
1837
|
+
],
|
|
1838
|
+
[[a, S], b],
|
|
1839
|
+
[
|
|
1840
|
+
/(Klarna)\/([\w\.]+)/i,
|
|
1841
|
+
// Klarna Shopping Browser for iOS & Android
|
|
1842
|
+
/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
|
|
1843
|
+
// Kakao App
|
|
1844
|
+
/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
|
|
1845
|
+
// Naver InApp
|
|
1846
|
+
/(daum)apps[\/ ]([\w\.]+)/i,
|
|
1847
|
+
// Daum App
|
|
1848
|
+
/safari (line)\/([\w\.]+)/i,
|
|
1849
|
+
// Line App for iOS
|
|
1850
|
+
/\b(line)\/([\w\.]+)\/iab/i,
|
|
1851
|
+
// Line App for Android
|
|
1852
|
+
/(alipay)client\/([\w\.]+)/i,
|
|
1853
|
+
// Alipay
|
|
1854
|
+
/(twitter)(?:and| f.+e\/([\w\.]+))/i,
|
|
1855
|
+
// Twitter
|
|
1856
|
+
/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i
|
|
1857
|
+
// Chromium/Instagram/Snapchat
|
|
1858
|
+
],
|
|
1859
|
+
[a, b],
|
|
1860
|
+
[
|
|
1861
|
+
/\bgsa\/([\w\.]+) .*safari\//i
|
|
1862
|
+
// Google Search Appliance on iOS
|
|
1863
|
+
],
|
|
1864
|
+
[b, [a, "GSA"]],
|
|
1865
|
+
[
|
|
1866
|
+
/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i
|
|
1867
|
+
// TikTok
|
|
1868
|
+
],
|
|
1869
|
+
[b, [a, "TikTok"]],
|
|
1870
|
+
[
|
|
1871
|
+
/headlesschrome(?:\/([\w\.]+)| )/i
|
|
1872
|
+
// Chrome Headless
|
|
1873
|
+
],
|
|
1874
|
+
[b, [a, $e + " Headless"]],
|
|
1875
|
+
[
|
|
1876
|
+
/ wv\).+(chrome)\/([\w\.]+)/i
|
|
1877
|
+
// Chrome WebView
|
|
1878
|
+
],
|
|
1879
|
+
[[a, $e + " WebView"], b],
|
|
1880
|
+
[
|
|
1881
|
+
/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
|
|
1882
|
+
// Android Browser
|
|
1883
|
+
],
|
|
1884
|
+
[b, [a, "Android " + Re]],
|
|
1885
|
+
[
|
|
1886
|
+
/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
|
|
1887
|
+
// Chrome/OmniWeb/Arora/Tizen/Nokia
|
|
1888
|
+
],
|
|
1889
|
+
[a, b],
|
|
1890
|
+
[
|
|
1891
|
+
/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i
|
|
1892
|
+
// Mobile Safari
|
|
1893
|
+
],
|
|
1894
|
+
[b, [a, "Mobile Safari"]],
|
|
1895
|
+
[
|
|
1896
|
+
/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i
|
|
1897
|
+
// Safari & Safari Mobile
|
|
1898
|
+
],
|
|
1899
|
+
[b, a],
|
|
1900
|
+
[
|
|
1901
|
+
/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i
|
|
1902
|
+
// Safari < 3.0
|
|
1903
|
+
],
|
|
1904
|
+
[a, [b, Ge, ur]],
|
|
1905
|
+
[
|
|
1906
|
+
/(webkit|khtml)\/([\w\.]+)/i
|
|
1907
|
+
],
|
|
1908
|
+
[a, b],
|
|
1909
|
+
[
|
|
1910
|
+
// Gecko based
|
|
1911
|
+
/(navigator|netscape\d?)\/([-\w\.]+)/i
|
|
1912
|
+
// Netscape
|
|
1913
|
+
],
|
|
1914
|
+
[[a, "Netscape"], b],
|
|
1915
|
+
[
|
|
1916
|
+
/(wolvic|librewolf)\/([\w\.]+)/i
|
|
1917
|
+
// Wolvic/LibreWolf
|
|
1918
|
+
],
|
|
1919
|
+
[a, b],
|
|
1920
|
+
[
|
|
1921
|
+
/mobile vr; rv:([\w\.]+)\).+firefox/i
|
|
1922
|
+
// Firefox Reality
|
|
1923
|
+
],
|
|
1924
|
+
[b, [a, ke + " Reality"]],
|
|
1925
|
+
[
|
|
1926
|
+
/ekiohf.+(flow)\/([\w\.]+)/i,
|
|
1927
|
+
// Flow
|
|
1928
|
+
/(swiftfox)/i,
|
|
1929
|
+
// Swiftfox
|
|
1930
|
+
/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,
|
|
1931
|
+
// IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror
|
|
1932
|
+
/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,
|
|
1933
|
+
// Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix
|
|
1934
|
+
/(firefox)\/([\w\.]+)/i,
|
|
1935
|
+
// Other Firefox-based
|
|
1936
|
+
/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,
|
|
1937
|
+
// Mozilla
|
|
1938
|
+
// Other
|
|
1939
|
+
/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
|
|
1940
|
+
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser/Ladybird
|
|
1941
|
+
/\b(links) \(([\w\.]+)/i
|
|
1942
|
+
// Links
|
|
1943
|
+
],
|
|
1944
|
+
[a, [b, /_/g, "."]],
|
|
1945
|
+
[
|
|
1946
|
+
/(cobalt)\/([\w\.]+)/i
|
|
1947
|
+
// Cobalt
|
|
1948
|
+
],
|
|
1949
|
+
[a, [b, /master.|lts./, ""]]
|
|
1950
|
+
],
|
|
1951
|
+
cpu: [
|
|
1952
|
+
[
|
|
1953
|
+
/\b((amd|x|x86[-_]?|wow|win)64)\b/i
|
|
1954
|
+
// AMD64 (x64)
|
|
1955
|
+
],
|
|
1956
|
+
[[$, "amd64"]],
|
|
1957
|
+
[
|
|
1958
|
+
/(ia32(?=;))/i,
|
|
1959
|
+
// IA32 (quicktime)
|
|
1960
|
+
/\b((i[346]|x)86)(pc)?\b/i
|
|
1961
|
+
// IA32 (x86)
|
|
1962
|
+
],
|
|
1963
|
+
[[$, "ia32"]],
|
|
1964
|
+
[
|
|
1965
|
+
/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i
|
|
1966
|
+
// ARM64
|
|
1967
|
+
],
|
|
1968
|
+
[[$, "arm64"]],
|
|
1969
|
+
[
|
|
1970
|
+
/\b(arm(v[67])?ht?n?[fl]p?)\b/i
|
|
1971
|
+
// ARMHF
|
|
1972
|
+
],
|
|
1973
|
+
[[$, "armhf"]],
|
|
1974
|
+
[
|
|
1975
|
+
// PocketPC mistakenly identified as PowerPC
|
|
1976
|
+
/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i
|
|
1977
|
+
],
|
|
1978
|
+
[[$, "arm"]],
|
|
1979
|
+
[
|
|
1980
|
+
/((ppc|powerpc)(64)?)( mac|;|\))/i
|
|
1981
|
+
// PowerPC
|
|
1982
|
+
],
|
|
1983
|
+
[[$, /ower/, o, He]],
|
|
1984
|
+
[
|
|
1985
|
+
/ sun4\w[;\)]/i
|
|
1986
|
+
// SPARC
|
|
1987
|
+
],
|
|
1988
|
+
[[$, "sparc"]],
|
|
1989
|
+
[
|
|
1990
|
+
/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i
|
|
1991
|
+
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
|
|
1992
|
+
],
|
|
1993
|
+
[[$, He]]
|
|
1994
|
+
],
|
|
1995
|
+
device: [
|
|
1996
|
+
[
|
|
1997
|
+
//////////////////////////
|
|
1998
|
+
// MOBILES & TABLETS
|
|
1999
|
+
/////////////////////////
|
|
2000
|
+
// Samsung
|
|
2001
|
+
/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
|
|
2002
|
+
],
|
|
2003
|
+
[s, [u, X], [l, m]],
|
|
2004
|
+
[
|
|
2005
|
+
/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
|
|
2006
|
+
/samsung[- ]((?!sm-[lr])[-\w]+)/i,
|
|
2007
|
+
/sec-(sgh\w+)/i
|
|
2008
|
+
],
|
|
2009
|
+
[s, [u, X], [l, _]],
|
|
2010
|
+
[
|
|
2011
|
+
// Apple
|
|
2012
|
+
/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
|
|
2013
|
+
// iPod/iPhone
|
|
2014
|
+
],
|
|
2015
|
+
[s, [u, he], [l, _]],
|
|
2016
|
+
[
|
|
2017
|
+
/\((ipad);[-\w\),; ]+apple/i,
|
|
2018
|
+
// iPad
|
|
2019
|
+
/applecoremedia\/[\w\.]+ \((ipad)/i,
|
|
2020
|
+
/\b(ipad)\d\d?,\d\d?[;\]].+ios/i
|
|
2021
|
+
],
|
|
2022
|
+
[s, [u, he], [l, m]],
|
|
2023
|
+
[
|
|
2024
|
+
/(macintosh);/i
|
|
2025
|
+
],
|
|
2026
|
+
[s, [u, he]],
|
|
2027
|
+
[
|
|
2028
|
+
// Sharp
|
|
2029
|
+
/\b(sh-?[altvz]?\d\d[a-ekm]?)/i
|
|
2030
|
+
],
|
|
2031
|
+
[s, [u, qe], [l, _]],
|
|
2032
|
+
[
|
|
2033
|
+
// Honor
|
|
2034
|
+
/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i
|
|
2035
|
+
],
|
|
2036
|
+
[s, [u, nt], [l, m]],
|
|
2037
|
+
[
|
|
2038
|
+
/honor([-\w ]+)[;\)]/i
|
|
2039
|
+
],
|
|
2040
|
+
[s, [u, nt], [l, _]],
|
|
2041
|
+
[
|
|
2042
|
+
// Huawei
|
|
2043
|
+
/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i
|
|
2044
|
+
],
|
|
2045
|
+
[s, [u, st], [l, m]],
|
|
2046
|
+
[
|
|
2047
|
+
/(?:huawei)([-\w ]+)[;\)]/i,
|
|
2048
|
+
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
|
|
2049
|
+
],
|
|
2050
|
+
[s, [u, st], [l, _]],
|
|
2051
|
+
[
|
|
2052
|
+
// Xiaomi
|
|
2053
|
+
/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,
|
|
2054
|
+
/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i
|
|
2055
|
+
// Mi Pad tablets
|
|
2056
|
+
],
|
|
2057
|
+
[[s, /_/g, " "], [u, I], [l, m]],
|
|
2058
|
+
[
|
|
2059
|
+
/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
|
|
2060
|
+
// Xiaomi POCO
|
|
2061
|
+
/\b; (\w+) build\/hm\1/i,
|
|
2062
|
+
// Xiaomi Hongmi 'numeric' models
|
|
2063
|
+
/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,
|
|
2064
|
+
// Xiaomi Hongmi
|
|
2065
|
+
/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,
|
|
2066
|
+
// Xiaomi Redmi
|
|
2067
|
+
/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,
|
|
2068
|
+
// Xiaomi Redmi 'numeric' models
|
|
2069
|
+
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,
|
|
2070
|
+
// Xiaomi Mi
|
|
2071
|
+
/ ([\w ]+) miui\/v?\d/i
|
|
2072
|
+
],
|
|
2073
|
+
[[s, /_/g, " "], [u, I], [l, _]],
|
|
2074
|
+
[
|
|
2075
|
+
// OPPO
|
|
2076
|
+
/; (\w+) bui.+ oppo/i,
|
|
2077
|
+
/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
|
|
2078
|
+
],
|
|
2079
|
+
[s, [u, we], [l, _]],
|
|
2080
|
+
[
|
|
2081
|
+
/\b(opd2(\d{3}a?))(?: bui|\))/i
|
|
2082
|
+
],
|
|
2083
|
+
[s, [u, Ge, { OnePlus: ["304", "403", "203"], "*": we }], [l, m]],
|
|
2084
|
+
[
|
|
2085
|
+
// Vivo
|
|
2086
|
+
/vivo (\w+)(?: bui|\))/i,
|
|
2087
|
+
/\b(v[12]\d{3}\w?[at])(?: bui|;)/i
|
|
2088
|
+
],
|
|
2089
|
+
[s, [u, "Vivo"], [l, _]],
|
|
2090
|
+
[
|
|
2091
|
+
// Realme
|
|
2092
|
+
/\b(rmx[1-3]\d{3})(?: bui|;|\))/i
|
|
2093
|
+
],
|
|
2094
|
+
[s, [u, "Realme"], [l, _]],
|
|
2095
|
+
[
|
|
2096
|
+
// Motorola
|
|
2097
|
+
/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
|
|
2098
|
+
/\bmot(?:orola)?[- ](\w*)/i,
|
|
2099
|
+
/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
|
|
2100
|
+
],
|
|
2101
|
+
[s, [u, Ve], [l, _]],
|
|
2102
|
+
[
|
|
2103
|
+
/\b(mz60\d|xoom[2 ]{0,2}) build\//i
|
|
2104
|
+
],
|
|
2105
|
+
[s, [u, Ve], [l, m]],
|
|
2106
|
+
[
|
|
2107
|
+
// LG
|
|
2108
|
+
/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
|
|
2109
|
+
],
|
|
2110
|
+
[s, [u, pe], [l, m]],
|
|
2111
|
+
[
|
|
2112
|
+
/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
|
|
2113
|
+
/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,
|
|
2114
|
+
/\blg-?([\d\w]+) bui/i
|
|
2115
|
+
],
|
|
2116
|
+
[s, [u, pe], [l, _]],
|
|
2117
|
+
[
|
|
2118
|
+
// Lenovo
|
|
2119
|
+
/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,
|
|
2120
|
+
/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i
|
|
2121
|
+
],
|
|
2122
|
+
[s, [u, At], [l, m]],
|
|
2123
|
+
[
|
|
2124
|
+
// Nokia
|
|
2125
|
+
/(nokia) (t[12][01])/i
|
|
2126
|
+
],
|
|
2127
|
+
[u, s, [l, m]],
|
|
2128
|
+
[
|
|
2129
|
+
/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,
|
|
2130
|
+
/nokia[-_ ]?(([-\w\. ]*))/i
|
|
2131
|
+
],
|
|
2132
|
+
[[s, /_/g, " "], [l, _], [u, "Nokia"]],
|
|
2133
|
+
[
|
|
2134
|
+
// Google
|
|
2135
|
+
/(pixel (c|tablet))\b/i
|
|
2136
|
+
// Google Pixel C/Tablet
|
|
2137
|
+
],
|
|
2138
|
+
[s, [u, Oe], [l, m]],
|
|
2139
|
+
[
|
|
2140
|
+
/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
|
|
2141
|
+
// Google Pixel
|
|
2142
|
+
],
|
|
2143
|
+
[s, [u, Oe], [l, _]],
|
|
2144
|
+
[
|
|
2145
|
+
// Sony
|
|
2146
|
+
/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
|
|
2147
|
+
],
|
|
2148
|
+
[s, [u, ae], [l, _]],
|
|
2149
|
+
[
|
|
2150
|
+
/sony tablet [ps]/i,
|
|
2151
|
+
/\b(?:sony)?sgp\w+(?: bui|\))/i
|
|
2152
|
+
],
|
|
2153
|
+
[[s, "Xperia Tablet"], [u, ae], [l, m]],
|
|
2154
|
+
[
|
|
2155
|
+
// OnePlus
|
|
2156
|
+
/ (kb2005|in20[12]5|be20[12][59])\b/i,
|
|
2157
|
+
/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
|
|
2158
|
+
],
|
|
2159
|
+
[s, [u, Ke], [l, _]],
|
|
2160
|
+
[
|
|
2161
|
+
// Amazon
|
|
2162
|
+
/(alexa)webm/i,
|
|
2163
|
+
/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,
|
|
2164
|
+
// Kindle Fire without Silk / Echo Show
|
|
2165
|
+
/(kf[a-z]+)( bui|\)).+silk\//i
|
|
2166
|
+
// Kindle Fire HD
|
|
2167
|
+
],
|
|
2168
|
+
[s, [u, Te], [l, m]],
|
|
2169
|
+
[
|
|
2170
|
+
/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
|
|
2171
|
+
// Fire Phone
|
|
2172
|
+
],
|
|
2173
|
+
[[s, /(.+)/g, "Fire Phone $1"], [u, Te], [l, _]],
|
|
2174
|
+
[
|
|
2175
|
+
// BlackBerry
|
|
2176
|
+
/(playbook);[-\w\),; ]+(rim)/i
|
|
2177
|
+
// BlackBerry PlayBook
|
|
2178
|
+
],
|
|
2179
|
+
[s, u, [l, m]],
|
|
2180
|
+
[
|
|
2181
|
+
/\b((?:bb[a-f]|st[hv])100-\d)/i,
|
|
2182
|
+
/\(bb10; (\w+)/i
|
|
2183
|
+
// BlackBerry 10
|
|
2184
|
+
],
|
|
2185
|
+
[s, [u, rt], [l, _]],
|
|
2186
|
+
[
|
|
2187
|
+
// Asus
|
|
2188
|
+
/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
|
|
2189
|
+
],
|
|
2190
|
+
[s, [u, be], [l, m]],
|
|
2191
|
+
[
|
|
2192
|
+
/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
|
|
2193
|
+
],
|
|
2194
|
+
[s, [u, be], [l, _]],
|
|
2195
|
+
[
|
|
2196
|
+
// HTC
|
|
2197
|
+
/(nexus 9)/i
|
|
2198
|
+
// HTC Nexus 9
|
|
2199
|
+
],
|
|
2200
|
+
[s, [u, "HTC"], [l, m]],
|
|
2201
|
+
[
|
|
2202
|
+
/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
|
|
2203
|
+
// HTC
|
|
2204
|
+
// ZTE
|
|
2205
|
+
/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,
|
|
2206
|
+
/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
|
|
2207
|
+
// Alcatel/GeeksPhone/Nexian/Panasonic/Sony
|
|
2208
|
+
],
|
|
2209
|
+
[u, [s, /_/g, " "], [l, _]],
|
|
2210
|
+
[
|
|
2211
|
+
// TCL
|
|
2212
|
+
/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i
|
|
2213
|
+
],
|
|
2214
|
+
[s, [u, "TCL"], [l, m]],
|
|
2215
|
+
[
|
|
2216
|
+
// itel
|
|
2217
|
+
/(itel) ((\w+))/i
|
|
2218
|
+
],
|
|
2219
|
+
[[u, He], s, [l, Ge, { tablet: ["p10001l", "w7001"], "*": "mobile" }]],
|
|
2220
|
+
[
|
|
2221
|
+
// Acer
|
|
2222
|
+
/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
|
|
2223
|
+
],
|
|
2224
|
+
[s, [u, "Acer"], [l, m]],
|
|
2225
|
+
[
|
|
2226
|
+
// Meizu
|
|
2227
|
+
/droid.+; (m[1-5] note) bui/i,
|
|
2228
|
+
/\bmz-([-\w]{2,})/i
|
|
2229
|
+
],
|
|
2230
|
+
[s, [u, "Meizu"], [l, _]],
|
|
2231
|
+
[
|
|
2232
|
+
// Ulefone
|
|
2233
|
+
/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
|
|
2234
|
+
],
|
|
2235
|
+
[s, [u, "Ulefone"], [l, _]],
|
|
2236
|
+
[
|
|
2237
|
+
// Energizer
|
|
2238
|
+
/; (energy ?\w+)(?: bui|\))/i,
|
|
2239
|
+
/; energizer ([\w ]+)(?: bui|\))/i
|
|
2240
|
+
],
|
|
2241
|
+
[s, [u, "Energizer"], [l, _]],
|
|
2242
|
+
[
|
|
2243
|
+
// Cat
|
|
2244
|
+
/; cat (b35);/i,
|
|
2245
|
+
/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i
|
|
2246
|
+
],
|
|
2247
|
+
[s, [u, "Cat"], [l, _]],
|
|
2248
|
+
[
|
|
2249
|
+
// Smartfren
|
|
2250
|
+
/((?:new )?andromax[\w- ]+)(?: bui|\))/i
|
|
2251
|
+
],
|
|
2252
|
+
[s, [u, "Smartfren"], [l, _]],
|
|
2253
|
+
[
|
|
2254
|
+
// Nothing
|
|
2255
|
+
/droid.+; (a(?:015|06[35]|142p?))/i
|
|
2256
|
+
],
|
|
2257
|
+
[s, [u, "Nothing"], [l, _]],
|
|
2258
|
+
[
|
|
2259
|
+
// Archos
|
|
2260
|
+
/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,
|
|
2261
|
+
/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i
|
|
2262
|
+
],
|
|
2263
|
+
[s, [u, "Archos"], [l, m]],
|
|
2264
|
+
[
|
|
2265
|
+
/archos ([\w ]+)( b|\))/i,
|
|
2266
|
+
/; (ac[3-6]\d\w{2,8})( b|\))/i
|
|
2267
|
+
],
|
|
2268
|
+
[s, [u, "Archos"], [l, _]],
|
|
2269
|
+
[
|
|
2270
|
+
// MIXED
|
|
2271
|
+
/(imo) (tab \w+)/i,
|
|
2272
|
+
// IMO
|
|
2273
|
+
/(infinix) (x1101b?)/i
|
|
2274
|
+
// Infinix XPad
|
|
2275
|
+
],
|
|
2276
|
+
[u, s, [l, m]],
|
|
2277
|
+
[
|
|
2278
|
+
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
|
|
2279
|
+
// BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Infinix/Tecno/Micromax/Advan
|
|
2280
|
+
/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,
|
|
2281
|
+
// HMD/IMO
|
|
2282
|
+
/(hp) ([\w ]+\w)/i,
|
|
2283
|
+
// HP iPAQ
|
|
2284
|
+
/(microsoft); (lumia[\w ]+)/i,
|
|
2285
|
+
// Microsoft Lumia
|
|
2286
|
+
/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,
|
|
2287
|
+
// Lenovo
|
|
2288
|
+
/(oppo) ?([\w ]+) bui/i
|
|
2289
|
+
// OPPO
|
|
2290
|
+
],
|
|
2291
|
+
[u, s, [l, _]],
|
|
2292
|
+
[
|
|
2293
|
+
/(kobo)\s(ereader|touch)/i,
|
|
2294
|
+
// Kobo
|
|
2295
|
+
/(hp).+(touchpad(?!.+tablet)|tablet)/i,
|
|
2296
|
+
// HP TouchPad
|
|
2297
|
+
/(kindle)\/([\w\.]+)/i,
|
|
2298
|
+
// Kindle
|
|
2299
|
+
/(nook)[\w ]+build\/(\w+)/i,
|
|
2300
|
+
// Nook
|
|
2301
|
+
/(dell) (strea[kpr\d ]*[\dko])/i,
|
|
2302
|
+
// Dell Streak
|
|
2303
|
+
/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,
|
|
2304
|
+
// Le Pan Tablets
|
|
2305
|
+
/(trinity)[- ]*(t\d{3}) bui/i,
|
|
2306
|
+
// Trinity Tablets
|
|
2307
|
+
/(gigaset)[- ]+(q\w{1,9}) bui/i,
|
|
2308
|
+
// Gigaset Tablets
|
|
2309
|
+
/(vodafone) ([\w ]+)(?:\)| bui)/i
|
|
2310
|
+
// Vodafone
|
|
2311
|
+
],
|
|
2312
|
+
[u, s, [l, m]],
|
|
2313
|
+
[
|
|
2314
|
+
/(surface duo)/i
|
|
2315
|
+
// Surface Duo
|
|
2316
|
+
],
|
|
2317
|
+
[s, [u, We], [l, m]],
|
|
2318
|
+
[
|
|
2319
|
+
/droid [\d\.]+; (fp\du?)(?: b|\))/i
|
|
2320
|
+
// Fairphone
|
|
2321
|
+
],
|
|
2322
|
+
[s, [u, "Fairphone"], [l, _]],
|
|
2323
|
+
[
|
|
2324
|
+
/(u304aa)/i
|
|
2325
|
+
// AT&T
|
|
2326
|
+
],
|
|
2327
|
+
[s, [u, "AT&T"], [l, _]],
|
|
2328
|
+
[
|
|
2329
|
+
/\bsie-(\w*)/i
|
|
2330
|
+
// Siemens
|
|
2331
|
+
],
|
|
2332
|
+
[s, [u, "Siemens"], [l, _]],
|
|
2333
|
+
[
|
|
2334
|
+
/\b(rct\w+) b/i
|
|
2335
|
+
// RCA Tablets
|
|
2336
|
+
],
|
|
2337
|
+
[s, [u, "RCA"], [l, m]],
|
|
2338
|
+
[
|
|
2339
|
+
/\b(venue[\d ]{2,7}) b/i
|
|
2340
|
+
// Dell Venue Tablets
|
|
2341
|
+
],
|
|
2342
|
+
[s, [u, "Dell"], [l, m]],
|
|
2343
|
+
[
|
|
2344
|
+
/\b(q(?:mv|ta)\w+) b/i
|
|
2345
|
+
// Verizon Tablet
|
|
2346
|
+
],
|
|
2347
|
+
[s, [u, "Verizon"], [l, m]],
|
|
2348
|
+
[
|
|
2349
|
+
/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i
|
|
2350
|
+
// Barnes & Noble Tablet
|
|
2351
|
+
],
|
|
2352
|
+
[s, [u, "Barnes & Noble"], [l, m]],
|
|
2353
|
+
[
|
|
2354
|
+
/\b(tm\d{3}\w+) b/i
|
|
2355
|
+
],
|
|
2356
|
+
[s, [u, "NuVision"], [l, m]],
|
|
2357
|
+
[
|
|
2358
|
+
/\b(k88) b/i
|
|
2359
|
+
// ZTE K Series Tablet
|
|
2360
|
+
],
|
|
2361
|
+
[s, [u, "ZTE"], [l, m]],
|
|
2362
|
+
[
|
|
2363
|
+
/\b(nx\d{3}j) b/i
|
|
2364
|
+
// ZTE Nubia
|
|
2365
|
+
],
|
|
2366
|
+
[s, [u, "ZTE"], [l, _]],
|
|
2367
|
+
[
|
|
2368
|
+
/\b(gen\d{3}) b.+49h/i
|
|
2369
|
+
// Swiss GEN Mobile
|
|
2370
|
+
],
|
|
2371
|
+
[s, [u, "Swiss"], [l, _]],
|
|
2372
|
+
[
|
|
2373
|
+
/\b(zur\d{3}) b/i
|
|
2374
|
+
// Swiss ZUR Tablet
|
|
2375
|
+
],
|
|
2376
|
+
[s, [u, "Swiss"], [l, m]],
|
|
2377
|
+
[
|
|
2378
|
+
/\b((zeki)?tb.*\b) b/i
|
|
2379
|
+
// Zeki Tablets
|
|
2380
|
+
],
|
|
2381
|
+
[s, [u, "Zeki"], [l, m]],
|
|
2382
|
+
[
|
|
2383
|
+
/\b([yr]\d{2}) b/i,
|
|
2384
|
+
/\b(dragon[- ]+touch |dt)(\w{5}) b/i
|
|
2385
|
+
// Dragon Touch Tablet
|
|
2386
|
+
],
|
|
2387
|
+
[[u, "Dragon Touch"], s, [l, m]],
|
|
2388
|
+
[
|
|
2389
|
+
/\b(ns-?\w{0,9}) b/i
|
|
2390
|
+
// Insignia Tablets
|
|
2391
|
+
],
|
|
2392
|
+
[s, [u, "Insignia"], [l, m]],
|
|
2393
|
+
[
|
|
2394
|
+
/\b((nxa|next)-?\w{0,9}) b/i
|
|
2395
|
+
// NextBook Tablets
|
|
2396
|
+
],
|
|
2397
|
+
[s, [u, "NextBook"], [l, m]],
|
|
2398
|
+
[
|
|
2399
|
+
/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i
|
|
2400
|
+
// Voice Xtreme Phones
|
|
2401
|
+
],
|
|
2402
|
+
[[u, "Voice"], s, [l, _]],
|
|
2403
|
+
[
|
|
2404
|
+
/\b(lvtel\-)?(v1[12]) b/i
|
|
2405
|
+
// LvTel Phones
|
|
2406
|
+
],
|
|
2407
|
+
[[u, "LvTel"], s, [l, _]],
|
|
2408
|
+
[
|
|
2409
|
+
/\b(ph-1) /i
|
|
2410
|
+
// Essential PH-1
|
|
2411
|
+
],
|
|
2412
|
+
[s, [u, "Essential"], [l, _]],
|
|
2413
|
+
[
|
|
2414
|
+
/\b(v(100md|700na|7011|917g).*\b) b/i
|
|
2415
|
+
// Envizen Tablets
|
|
2416
|
+
],
|
|
2417
|
+
[s, [u, "Envizen"], [l, m]],
|
|
2418
|
+
[
|
|
2419
|
+
/\b(trio[-\w\. ]+) b/i
|
|
2420
|
+
// MachSpeed Tablets
|
|
2421
|
+
],
|
|
2422
|
+
[s, [u, "MachSpeed"], [l, m]],
|
|
2423
|
+
[
|
|
2424
|
+
/\btu_(1491) b/i
|
|
2425
|
+
// Rotor Tablets
|
|
2426
|
+
],
|
|
2427
|
+
[s, [u, "Rotor"], [l, m]],
|
|
2428
|
+
[
|
|
2429
|
+
/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i
|
|
2430
|
+
// Nvidia Tablets
|
|
2431
|
+
],
|
|
2432
|
+
[s, [u, Ae], [l, m]],
|
|
2433
|
+
[
|
|
2434
|
+
/(sprint) (\w+)/i
|
|
2435
|
+
// Sprint Phones
|
|
2436
|
+
],
|
|
2437
|
+
[u, s, [l, _]],
|
|
2438
|
+
[
|
|
2439
|
+
/(kin\.[onetw]{3})/i
|
|
2440
|
+
// Microsoft Kin
|
|
2441
|
+
],
|
|
2442
|
+
[[s, /\./g, " "], [u, We], [l, _]],
|
|
2443
|
+
[
|
|
2444
|
+
/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
|
|
2445
|
+
// Zebra
|
|
2446
|
+
],
|
|
2447
|
+
[s, [u, v], [l, m]],
|
|
2448
|
+
[
|
|
2449
|
+
/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
|
|
2450
|
+
],
|
|
2451
|
+
[s, [u, v], [l, _]],
|
|
2452
|
+
[
|
|
2453
|
+
///////////////////
|
|
2454
|
+
// SMARTTVS
|
|
2455
|
+
///////////////////
|
|
2456
|
+
/smart-tv.+(samsung)/i
|
|
2457
|
+
// Samsung
|
|
2458
|
+
],
|
|
2459
|
+
[u, [l, O]],
|
|
2460
|
+
[
|
|
2461
|
+
/hbbtv.+maple;(\d+)/i
|
|
2462
|
+
],
|
|
2463
|
+
[[s, /^/, "SmartTV"], [u, X], [l, O]],
|
|
2464
|
+
[
|
|
2465
|
+
/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
|
|
2466
|
+
// LG SmartTV
|
|
2467
|
+
],
|
|
2468
|
+
[[u, pe], [l, O]],
|
|
2469
|
+
[
|
|
2470
|
+
/(apple) ?tv/i
|
|
2471
|
+
// Apple TV
|
|
2472
|
+
],
|
|
2473
|
+
[u, [s, he + " TV"], [l, O]],
|
|
2474
|
+
[
|
|
2475
|
+
/crkey/i
|
|
2476
|
+
// Google Chromecast
|
|
2477
|
+
],
|
|
2478
|
+
[[s, $e + "cast"], [u, Oe], [l, O]],
|
|
2479
|
+
[
|
|
2480
|
+
/droid.+aft(\w+)( bui|\))/i
|
|
2481
|
+
// Fire TV
|
|
2482
|
+
],
|
|
2483
|
+
[s, [u, Te], [l, O]],
|
|
2484
|
+
[
|
|
2485
|
+
/(shield \w+ tv)/i
|
|
2486
|
+
// Nvidia Shield TV
|
|
2487
|
+
],
|
|
2488
|
+
[s, [u, Ae], [l, O]],
|
|
2489
|
+
[
|
|
2490
|
+
/\(dtv[\);].+(aquos)/i,
|
|
2491
|
+
/(aquos-tv[\w ]+)\)/i
|
|
2492
|
+
// Sharp
|
|
2493
|
+
],
|
|
2494
|
+
[s, [u, qe], [l, O]],
|
|
2495
|
+
[
|
|
2496
|
+
/(bravia[\w ]+)( bui|\))/i
|
|
2497
|
+
// Sony
|
|
2498
|
+
],
|
|
2499
|
+
[s, [u, ae], [l, O]],
|
|
2500
|
+
[
|
|
2501
|
+
/(mi(tv|box)-?\w+) bui/i
|
|
2502
|
+
// Xiaomi
|
|
2503
|
+
],
|
|
2504
|
+
[s, [u, I], [l, O]],
|
|
2505
|
+
[
|
|
2506
|
+
/Hbbtv.*(technisat) (.*);/i
|
|
2507
|
+
// TechniSAT
|
|
2508
|
+
],
|
|
2509
|
+
[u, s, [l, O]],
|
|
2510
|
+
[
|
|
2511
|
+
/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
|
|
2512
|
+
// Roku
|
|
2513
|
+
/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
|
|
2514
|
+
// HbbTV devices
|
|
2515
|
+
],
|
|
2516
|
+
[[u, Lt], [s, Lt], [l, O]],
|
|
2517
|
+
[
|
|
2518
|
+
// SmartTV from Unidentified Vendors
|
|
2519
|
+
/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i
|
|
2520
|
+
],
|
|
2521
|
+
[s, [l, O]],
|
|
2522
|
+
[
|
|
2523
|
+
/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
|
|
2524
|
+
],
|
|
2525
|
+
[[l, O]],
|
|
2526
|
+
[
|
|
2527
|
+
///////////////////
|
|
2528
|
+
// CONSOLES
|
|
2529
|
+
///////////////////
|
|
2530
|
+
/(ouya)/i,
|
|
2531
|
+
// Ouya
|
|
2532
|
+
/(nintendo) ([wids3utch]+)/i
|
|
2533
|
+
// Nintendo
|
|
2534
|
+
],
|
|
2535
|
+
[u, s, [l, N]],
|
|
2536
|
+
[
|
|
2537
|
+
/droid.+; (shield)( bui|\))/i
|
|
2538
|
+
// Nvidia Portable
|
|
2539
|
+
],
|
|
2540
|
+
[s, [u, Ae], [l, N]],
|
|
2541
|
+
[
|
|
2542
|
+
/(playstation \w+)/i
|
|
2543
|
+
// Playstation
|
|
2544
|
+
],
|
|
2545
|
+
[s, [u, ae], [l, N]],
|
|
2546
|
+
[
|
|
2547
|
+
/\b(xbox(?: one)?(?!; xbox))[\); ]/i
|
|
2548
|
+
// Microsoft Xbox
|
|
2549
|
+
],
|
|
2550
|
+
[s, [u, We], [l, N]],
|
|
2551
|
+
[
|
|
2552
|
+
///////////////////
|
|
2553
|
+
// WEARABLES
|
|
2554
|
+
///////////////////
|
|
2555
|
+
/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i
|
|
2556
|
+
// Samsung Galaxy Watch
|
|
2557
|
+
],
|
|
2558
|
+
[s, [u, X], [l, A]],
|
|
2559
|
+
[
|
|
2560
|
+
/((pebble))app/i,
|
|
2561
|
+
// Pebble
|
|
2562
|
+
/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i
|
|
2563
|
+
// Asus ZenWatch / LG Watch / Pixel Watch
|
|
2564
|
+
],
|
|
2565
|
+
[u, s, [l, A]],
|
|
2566
|
+
[
|
|
2567
|
+
/(ow(?:19|20)?we?[1-3]{1,3})/i
|
|
2568
|
+
// Oppo Watch
|
|
2569
|
+
],
|
|
2570
|
+
[s, [u, we], [l, A]],
|
|
2571
|
+
[
|
|
2572
|
+
/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
|
|
2573
|
+
// Apple Watch
|
|
2574
|
+
],
|
|
2575
|
+
[s, [u, he], [l, A]],
|
|
2576
|
+
[
|
|
2577
|
+
/(opwwe\d{3})/i
|
|
2578
|
+
// OnePlus Watch
|
|
2579
|
+
],
|
|
2580
|
+
[s, [u, Ke], [l, A]],
|
|
2581
|
+
[
|
|
2582
|
+
/(moto 360)/i
|
|
2583
|
+
// Motorola 360
|
|
2584
|
+
],
|
|
2585
|
+
[s, [u, Ve], [l, A]],
|
|
2586
|
+
[
|
|
2587
|
+
/(smartwatch 3)/i
|
|
2588
|
+
// Sony SmartWatch
|
|
2589
|
+
],
|
|
2590
|
+
[s, [u, ae], [l, A]],
|
|
2591
|
+
[
|
|
2592
|
+
/(g watch r)/i
|
|
2593
|
+
// LG G Watch R
|
|
2594
|
+
],
|
|
2595
|
+
[s, [u, pe], [l, A]],
|
|
2596
|
+
[
|
|
2597
|
+
/droid.+; (wt63?0{2,3})\)/i
|
|
2598
|
+
],
|
|
2599
|
+
[s, [u, v], [l, A]],
|
|
2600
|
+
[
|
|
2601
|
+
///////////////////
|
|
2602
|
+
// XR
|
|
2603
|
+
///////////////////
|
|
2604
|
+
/droid.+; (glass) \d/i
|
|
2605
|
+
// Google Glass
|
|
2606
|
+
],
|
|
2607
|
+
[s, [u, Oe], [l, A]],
|
|
2608
|
+
[
|
|
2609
|
+
/(pico) (4|neo3(?: link|pro)?)/i
|
|
2610
|
+
// Pico
|
|
2611
|
+
],
|
|
2612
|
+
[u, s, [l, A]],
|
|
2613
|
+
[
|
|
2614
|
+
/; (quest( \d| pro)?)/i
|
|
2615
|
+
// Oculus Quest
|
|
2616
|
+
],
|
|
2617
|
+
[s, [u, S], [l, A]],
|
|
2618
|
+
[
|
|
2619
|
+
///////////////////
|
|
2620
|
+
// EMBEDDED
|
|
2621
|
+
///////////////////
|
|
2622
|
+
/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
|
|
2623
|
+
// Tesla
|
|
2624
|
+
],
|
|
2625
|
+
[u, [l, fe]],
|
|
2626
|
+
[
|
|
2627
|
+
/(aeobc)\b/i
|
|
2628
|
+
// Echo Dot
|
|
2629
|
+
],
|
|
2630
|
+
[s, [u, Te], [l, fe]],
|
|
2631
|
+
[
|
|
2632
|
+
/(homepod).+mac os/i
|
|
2633
|
+
// Apple HomePod
|
|
2634
|
+
],
|
|
2635
|
+
[s, [u, he], [l, fe]],
|
|
2636
|
+
[
|
|
2637
|
+
/windows iot/i
|
|
2638
|
+
],
|
|
2639
|
+
[[l, fe]],
|
|
2640
|
+
[
|
|
2641
|
+
////////////////////
|
|
2642
|
+
// MIXED (GENERIC)
|
|
2643
|
+
///////////////////
|
|
2644
|
+
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i
|
|
2645
|
+
// Android Phones from Unidentified Vendors
|
|
2646
|
+
],
|
|
2647
|
+
[s, [l, _]],
|
|
2648
|
+
[
|
|
2649
|
+
/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i
|
|
2650
|
+
// Android Tablets from Unidentified Vendors
|
|
2651
|
+
],
|
|
2652
|
+
[s, [l, m]],
|
|
2653
|
+
[
|
|
2654
|
+
/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i
|
|
2655
|
+
// Unidentifiable Tablet
|
|
2656
|
+
],
|
|
2657
|
+
[[l, m]],
|
|
2658
|
+
[
|
|
2659
|
+
/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
|
|
2660
|
+
// Unidentifiable Mobile
|
|
2661
|
+
],
|
|
2662
|
+
[[l, _]],
|
|
2663
|
+
[
|
|
2664
|
+
/droid .+?; ([\w\. -]+)( bui|\))/i
|
|
2665
|
+
// Generic Android Device
|
|
2666
|
+
],
|
|
2667
|
+
[s, [u, "Generic"]]
|
|
2668
|
+
],
|
|
2669
|
+
engine: [
|
|
2670
|
+
[
|
|
2671
|
+
/windows.+ edge\/([\w\.]+)/i
|
|
2672
|
+
// EdgeHTML
|
|
2673
|
+
],
|
|
2674
|
+
[b, [a, Ot + "HTML"]],
|
|
2675
|
+
[
|
|
2676
|
+
/(arkweb)\/([\w\.]+)/i
|
|
2677
|
+
// ArkWeb
|
|
2678
|
+
],
|
|
2679
|
+
[a, b],
|
|
2680
|
+
[
|
|
2681
|
+
/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
|
|
2682
|
+
// Blink
|
|
2683
|
+
],
|
|
2684
|
+
[b, [a, "Blink"]],
|
|
2685
|
+
[
|
|
2686
|
+
/(presto)\/([\w\.]+)/i,
|
|
2687
|
+
// Presto
|
|
2688
|
+
/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,
|
|
2689
|
+
// WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna/Servo
|
|
2690
|
+
/ekioh(flow)\/([\w\.]+)/i,
|
|
2691
|
+
// Flow
|
|
2692
|
+
/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,
|
|
2693
|
+
// KHTML/Tasman/Links
|
|
2694
|
+
/(icab)[\/ ]([23]\.[\d\.]+)/i,
|
|
2695
|
+
// iCab
|
|
2696
|
+
/\b(libweb)/i
|
|
2697
|
+
// LibWeb
|
|
2698
|
+
],
|
|
2699
|
+
[a, b],
|
|
2700
|
+
[
|
|
2701
|
+
/ladybird\//i
|
|
2702
|
+
],
|
|
2703
|
+
[[a, "LibWeb"]],
|
|
2704
|
+
[
|
|
2705
|
+
/rv\:([\w\.]{1,9})\b.+(gecko)/i
|
|
2706
|
+
// Gecko
|
|
2707
|
+
],
|
|
2708
|
+
[b, a]
|
|
2709
|
+
],
|
|
2710
|
+
os: [
|
|
2711
|
+
[
|
|
2712
|
+
// Windows
|
|
2713
|
+
/microsoft (windows) (vista|xp)/i
|
|
2714
|
+
// Windows (iTunes)
|
|
2715
|
+
],
|
|
2716
|
+
[a, b],
|
|
2717
|
+
[
|
|
2718
|
+
/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i
|
|
2719
|
+
// Windows Phone
|
|
2720
|
+
],
|
|
2721
|
+
[a, [b, Ge, ii]],
|
|
2722
|
+
[
|
|
2723
|
+
/windows nt 6\.2; (arm)/i,
|
|
2724
|
+
// Windows RT
|
|
2725
|
+
/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,
|
|
2726
|
+
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
|
|
2727
|
+
],
|
|
2728
|
+
[[b, Ge, ii], [a, "Windows"]],
|
|
2729
|
+
[
|
|
2730
|
+
// iOS/macOS
|
|
2731
|
+
/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,
|
|
2732
|
+
// iOS
|
|
2733
|
+
/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
|
|
2734
|
+
/cfnetwork\/.+darwin/i
|
|
2735
|
+
],
|
|
2736
|
+
[[b, /_/g, "."], [a, "iOS"]],
|
|
2737
|
+
[
|
|
2738
|
+
/(mac os x) ?([\w\. ]*)/i,
|
|
2739
|
+
/(macintosh|mac_powerpc\b)(?!.+haiku)/i
|
|
2740
|
+
// Mac OS
|
|
2741
|
+
],
|
|
2742
|
+
[[a, R], [b, /_/g, "."]],
|
|
2743
|
+
[
|
|
2744
|
+
// Mobile OSes
|
|
2745
|
+
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
|
|
2746
|
+
// Android-x86/HarmonyOS
|
|
2747
|
+
],
|
|
2748
|
+
[b, a],
|
|
2749
|
+
[
|
|
2750
|
+
/(ubuntu) ([\w\.]+) like android/i
|
|
2751
|
+
// Ubuntu Touch
|
|
2752
|
+
],
|
|
2753
|
+
[[a, /(.+)/, "$1 Touch"], b],
|
|
2754
|
+
[
|
|
2755
|
+
// Android/Blackberry/WebOS/QNX/Bada/RIM/KaiOS/Maemo/MeeGo/S40/Sailfish OS/OpenHarmony/Tizen
|
|
2756
|
+
/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i
|
|
2757
|
+
],
|
|
2758
|
+
[a, b],
|
|
2759
|
+
[
|
|
2760
|
+
/\(bb(10);/i
|
|
2761
|
+
// BlackBerry 10
|
|
2762
|
+
],
|
|
2763
|
+
[b, [a, rt]],
|
|
2764
|
+
[
|
|
2765
|
+
/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i
|
|
2766
|
+
// Symbian
|
|
2767
|
+
],
|
|
2768
|
+
[b, [a, "Symbian"]],
|
|
2769
|
+
[
|
|
2770
|
+
/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
|
|
2771
|
+
// Firefox OS
|
|
2772
|
+
],
|
|
2773
|
+
[b, [a, ke + " OS"]],
|
|
2774
|
+
[
|
|
2775
|
+
/web0s;.+rt(tv)/i,
|
|
2776
|
+
/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
|
|
2777
|
+
// WebOS
|
|
2778
|
+
],
|
|
2779
|
+
[b, [a, "webOS"]],
|
|
2780
|
+
[
|
|
2781
|
+
/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i
|
|
2782
|
+
// watchOS
|
|
2783
|
+
],
|
|
2784
|
+
[b, [a, "watchOS"]],
|
|
2785
|
+
[
|
|
2786
|
+
// Google Chromecast
|
|
2787
|
+
/crkey\/([\d\.]+)/i
|
|
2788
|
+
// Google Chromecast
|
|
2789
|
+
],
|
|
2790
|
+
[b, [a, $e + "cast"]],
|
|
2791
|
+
[
|
|
2792
|
+
/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i
|
|
2793
|
+
// Chromium OS
|
|
2794
|
+
],
|
|
2795
|
+
[[a, L], b],
|
|
2796
|
+
[
|
|
2797
|
+
// Smart TVs
|
|
2798
|
+
/panasonic;(viera)/i,
|
|
2799
|
+
// Panasonic Viera
|
|
2800
|
+
/(netrange)mmh/i,
|
|
2801
|
+
// Netrange
|
|
2802
|
+
/(nettv)\/(\d+\.[\w\.]+)/i,
|
|
2803
|
+
// NetTV
|
|
2804
|
+
// Console
|
|
2805
|
+
/(nintendo|playstation) ([wids345portablevuch]+)/i,
|
|
2806
|
+
// Nintendo/Playstation
|
|
2807
|
+
/(xbox); +xbox ([^\);]+)/i,
|
|
2808
|
+
// Microsoft Xbox (360, One, X, S, Series X, Series S)
|
|
2809
|
+
// Other
|
|
2810
|
+
/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,
|
|
2811
|
+
// Joli/Palm
|
|
2812
|
+
/(mint)[\/\(\) ]?(\w*)/i,
|
|
2813
|
+
// Mint
|
|
2814
|
+
/(mageia|vectorlinux)[; ]/i,
|
|
2815
|
+
// Mageia/VectorLinux
|
|
2816
|
+
/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
|
|
2817
|
+
// Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
|
|
2818
|
+
/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,
|
|
2819
|
+
// Hurd/Linux
|
|
2820
|
+
/(gnu) ?([\w\.]*)/i,
|
|
2821
|
+
// GNU
|
|
2822
|
+
/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,
|
|
2823
|
+
// FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly
|
|
2824
|
+
/(haiku) (\w+)/i
|
|
2825
|
+
// Haiku
|
|
2826
|
+
],
|
|
2827
|
+
[a, b],
|
|
2828
|
+
[
|
|
2829
|
+
/(sunos) ?([\w\.\d]*)/i
|
|
2830
|
+
// Solaris
|
|
2831
|
+
],
|
|
2832
|
+
[[a, "Solaris"], b],
|
|
2833
|
+
[
|
|
2834
|
+
/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
|
|
2835
|
+
// Solaris
|
|
2836
|
+
/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,
|
|
2837
|
+
// AIX
|
|
2838
|
+
/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,
|
|
2839
|
+
// BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX/SerenityOS
|
|
2840
|
+
/(unix) ?([\w\.]*)/i
|
|
2841
|
+
// UNIX
|
|
2842
|
+
],
|
|
2843
|
+
[a, b]
|
|
2844
|
+
]
|
|
2845
|
+
}, Z = function(y, C) {
|
|
2846
|
+
if (typeof y === d && (C = y, y = r), !(this instanceof Z))
|
|
2847
|
+
return new Z(y, C).getResult();
|
|
2848
|
+
var x = typeof i !== f && i.navigator ? i.navigator : r, D = y || (x && x.userAgent ? x.userAgent : o), le = x && x.userAgentData ? x.userAgentData : r, ie = C ? W(ri, C) : ri, E = x && x.userAgent == D;
|
|
2849
|
+
return this.getBrowser = function() {
|
|
2850
|
+
var g = {};
|
|
2851
|
+
return g[a] = r, g[b] = r, je.call(g, D, ie.browser), g[w] = lr(g[b]), E && x && x.brave && typeof x.brave.isBrave == h && (g[a] = "Brave"), g;
|
|
2852
|
+
}, this.getCPU = function() {
|
|
2853
|
+
var g = {};
|
|
2854
|
+
return g[$] = r, je.call(g, D, ie.cpu), g;
|
|
2855
|
+
}, this.getDevice = function() {
|
|
2856
|
+
var g = {};
|
|
2857
|
+
return g[u] = r, g[s] = r, g[l] = r, je.call(g, D, ie.device), E && !g[l] && le && le.mobile && (g[l] = _), E && g[s] == "Macintosh" && x && typeof x.standalone !== f && x.maxTouchPoints && x.maxTouchPoints > 2 && (g[s] = "iPad", g[l] = m), g;
|
|
2858
|
+
}, this.getEngine = function() {
|
|
2859
|
+
var g = {};
|
|
2860
|
+
return g[a] = r, g[b] = r, je.call(g, D, ie.engine), g;
|
|
2861
|
+
}, this.getOS = function() {
|
|
2862
|
+
var g = {};
|
|
2863
|
+
return g[a] = r, g[b] = r, je.call(g, D, ie.os), E && !g[a] && le && le.platform && le.platform != "Unknown" && (g[a] = le.platform.replace(/chrome os/i, L).replace(/macos/i, R)), g;
|
|
2864
|
+
}, this.getResult = function() {
|
|
2865
|
+
return {
|
|
2866
|
+
ua: this.getUA(),
|
|
2867
|
+
browser: this.getBrowser(),
|
|
2868
|
+
engine: this.getEngine(),
|
|
2869
|
+
os: this.getOS(),
|
|
2870
|
+
device: this.getDevice(),
|
|
2871
|
+
cpu: this.getCPU()
|
|
2872
|
+
};
|
|
2873
|
+
}, this.getUA = function() {
|
|
2874
|
+
return D;
|
|
2875
|
+
}, this.setUA = function(g) {
|
|
2876
|
+
return D = typeof g === p && g.length > Ie ? Lt(g, Ie) : g, this;
|
|
2877
|
+
}, this.setUA(D), this;
|
|
2878
|
+
};
|
|
2879
|
+
Z.VERSION = n, Z.BROWSER = V([a, b, w]), Z.CPU = V([$]), Z.DEVICE = V([s, u, l, N, _, O, m, A, fe]), Z.ENGINE = Z.OS = V([a, b]), t.exports && (e = t.exports = Z), e.UAParser = Z;
|
|
2880
|
+
var Le = typeof i !== f && (i.jQuery || i.Zepto);
|
|
2881
|
+
if (Le && !Le.ua) {
|
|
2882
|
+
var ot = new Z();
|
|
2883
|
+
Le.ua = ot.getResult(), Le.ua.get = function() {
|
|
2884
|
+
return ot.getUA();
|
|
2885
|
+
}, Le.ua.set = function(y) {
|
|
2886
|
+
ot.setUA(y);
|
|
2887
|
+
var C = ot.getResult();
|
|
2888
|
+
for (var x in C)
|
|
2889
|
+
Le.ua[x] = C[x];
|
|
2890
|
+
};
|
|
2891
|
+
}
|
|
2892
|
+
})(typeof window == "object" ? window : Tn);
|
|
2893
|
+
})(Ze, Ze.exports)), Ze.exports;
|
|
2894
|
+
}
|
|
2895
|
+
var $n = Rn();
|
|
2896
|
+
const On = /* @__PURE__ */ Dn($n), An = new On(), sr = An.getResult(), Ln = (_a = sr.engine.name) == null ? void 0 : _a.toLowerCase(), vi = Number((_b = sr.engine.version) == null ? void 0 : _b.split(".")[0]), Bt = {
|
|
2897
|
+
"0x0001": "Escape",
|
|
2898
|
+
"0x0002": "Digit1",
|
|
2899
|
+
"0x0003": "Digit2",
|
|
2900
|
+
"0x0004": "Digit3",
|
|
2901
|
+
"0x0005": "Digit4",
|
|
2902
|
+
"0x0006": "Digit5",
|
|
2903
|
+
"0x0007": "Digit6",
|
|
2904
|
+
"0x0008": "Digit7",
|
|
2905
|
+
"0x0009": "Digit8",
|
|
2906
|
+
"0x000A": "Digit9",
|
|
2907
|
+
"0x000B": "Digit0",
|
|
2908
|
+
"0x000C": "Minus",
|
|
2909
|
+
"0x000D": "Equal",
|
|
2910
|
+
"0x000E": "Backspace",
|
|
2911
|
+
"0x000F": "Tab",
|
|
2912
|
+
"0x0010": "KeyQ",
|
|
2913
|
+
"0x0011": "KeyW",
|
|
2914
|
+
"0x0012": "KeyE",
|
|
2915
|
+
"0x0013": "KeyR",
|
|
2916
|
+
"0x0014": "KeyT",
|
|
2917
|
+
"0x0015": "KeyY",
|
|
2918
|
+
"0x0016": "KeyU",
|
|
2919
|
+
"0x0017": "KeyI",
|
|
2920
|
+
"0x0018": "KeyO",
|
|
2921
|
+
"0x0019": "KeyP",
|
|
2922
|
+
"0x001A": "BracketLeft",
|
|
2923
|
+
"0x001B": "BracketRight",
|
|
2924
|
+
"0x001C": "Enter",
|
|
2925
|
+
"0x001D": "ControlLeft",
|
|
2926
|
+
"0x001E": "KeyA",
|
|
2927
|
+
"0x001F": "KeyS",
|
|
2928
|
+
"0x0020": "KeyD",
|
|
2929
|
+
"0x0021": "KeyF",
|
|
2930
|
+
"0x0022": "KeyG",
|
|
2931
|
+
"0x0023": "KeyH",
|
|
2932
|
+
"0x0024": "KeyJ",
|
|
2933
|
+
"0x0025": "KeyK",
|
|
2934
|
+
"0x0026": "KeyL",
|
|
2935
|
+
"0x0027": "Semicolon",
|
|
2936
|
+
"0x0028": "Quote",
|
|
2937
|
+
"0x0029": "Backquote",
|
|
2938
|
+
"0x002A": "ShiftLeft",
|
|
2939
|
+
"0x002B": "Backslash",
|
|
2940
|
+
"0x002C": "KeyZ",
|
|
2941
|
+
"0x002D": "KeyX",
|
|
2942
|
+
"0x002E": "KeyC",
|
|
2943
|
+
"0x002F": "KeyV",
|
|
2944
|
+
"0x0030": "KeyB",
|
|
2945
|
+
"0x0031": "KeyN",
|
|
2946
|
+
"0x0032": "KeyM",
|
|
2947
|
+
"0x0033": "Comma",
|
|
2948
|
+
"0x0034": "Period",
|
|
2949
|
+
"0x0035": "Slash",
|
|
2950
|
+
"0x0036": "ShiftRight",
|
|
2951
|
+
"0x0037": "NumpadMultiply",
|
|
2952
|
+
"0x0038": "AltLeft",
|
|
2953
|
+
"0x0039": "Space",
|
|
2954
|
+
"0x003A": "CapsLock",
|
|
2955
|
+
"0x003B": "F1",
|
|
2956
|
+
"0x003C": "F2",
|
|
2957
|
+
"0x003D": "F3",
|
|
2958
|
+
"0x003E": "F4",
|
|
2959
|
+
"0x003F": "F5",
|
|
2960
|
+
"0x0040": "F6",
|
|
2961
|
+
"0x0041": "F7",
|
|
2962
|
+
"0x0042": "F8",
|
|
2963
|
+
"0x0043": "F9",
|
|
2964
|
+
"0x0044": "F10",
|
|
2965
|
+
"0x0045": "Pause",
|
|
2966
|
+
"0x0046": "ScrollLock",
|
|
2967
|
+
"0x0047": "Numpad7",
|
|
2968
|
+
"0x0048": "Numpad8",
|
|
2969
|
+
"0x0049": "Numpad9",
|
|
2970
|
+
"0x004A": "NumpadSubtract",
|
|
2971
|
+
"0x004B": "Numpad4",
|
|
2972
|
+
"0x004C": "Numpad5",
|
|
2973
|
+
"0x004D": "Numpad6",
|
|
2974
|
+
"0x004E": "NumpadAdd",
|
|
2975
|
+
"0x004F": "Numpad1",
|
|
2976
|
+
"0x0050": "Numpad2",
|
|
2977
|
+
"0x0051": "Numpad3",
|
|
2978
|
+
"0x0052": "Numpad0",
|
|
2979
|
+
"0x0053": "NumpadDecimal",
|
|
2980
|
+
"0x0056": "IntlBackslash",
|
|
2981
|
+
"0x0057": "F11",
|
|
2982
|
+
"0x0058": "F12",
|
|
2983
|
+
"0x0059": "NumpadEqual",
|
|
2984
|
+
"0x0064": "F13",
|
|
2985
|
+
"0x0065": "F14",
|
|
2986
|
+
"0x0066": "F15",
|
|
2987
|
+
"0x0067": "F16",
|
|
2988
|
+
"0x0068": "F17",
|
|
2989
|
+
"0x0069": "F18",
|
|
2990
|
+
"0x006A": "F19",
|
|
2991
|
+
"0x006B": "F20",
|
|
2992
|
+
"0x006C": "F21",
|
|
2993
|
+
"0x006D": "F22",
|
|
2994
|
+
"0x006E": "F23",
|
|
2995
|
+
"0x0070": "KanaMode",
|
|
2996
|
+
"0x0071": "Lang2",
|
|
2997
|
+
"0x0072": "Lang1",
|
|
2998
|
+
"0x0073": "IntlRo",
|
|
2999
|
+
"0x0076": "F24",
|
|
3000
|
+
"0x0079": "Convert",
|
|
3001
|
+
"0x007B": "NonConvert",
|
|
3002
|
+
"0x007D": "IntlYen",
|
|
3003
|
+
"0x007E": "NumpadComma",
|
|
3004
|
+
"0xE010": "MediaTrackPrevious",
|
|
3005
|
+
"0xE019": "MediaTrackNext",
|
|
3006
|
+
"0xE01C": "NumpadEnter",
|
|
3007
|
+
"0xE01D": "ControlRight",
|
|
3008
|
+
"0xE021": "LaunchApp2",
|
|
3009
|
+
"0xE022": "MediaPlayPause",
|
|
3010
|
+
"0xE024": "MediaStop",
|
|
3011
|
+
"0xE032": "BrowserHome",
|
|
3012
|
+
"0xE035": "NumpadDivide",
|
|
3013
|
+
"0xE037": "PrintScreen",
|
|
3014
|
+
"0xE038": "AltRight",
|
|
3015
|
+
"0xE045": "NumLock",
|
|
3016
|
+
"0xE046": "Pause",
|
|
3017
|
+
"0xE047": "Home",
|
|
3018
|
+
"0xE048": "ArrowUp",
|
|
3019
|
+
"0xE049": "PageUp",
|
|
3020
|
+
"0xE04B": "ArrowLeft",
|
|
3021
|
+
"0xE04D": "ArrowRight",
|
|
3022
|
+
"0xE04F": "End",
|
|
3023
|
+
"0xE050": "ArrowDown",
|
|
3024
|
+
"0xE051": "PageDown",
|
|
3025
|
+
"0xE052": "Insert",
|
|
3026
|
+
"0xE053": "Delete",
|
|
3027
|
+
"0xE05D": "ContextMenu",
|
|
3028
|
+
"0xE05E": "Power",
|
|
3029
|
+
"0xE065": "BrowserSearch",
|
|
3030
|
+
"0xE066": "BrowserFavorites",
|
|
3031
|
+
"0xE067": "BrowserRefresh",
|
|
3032
|
+
"0xE068": "BrowserStop",
|
|
3033
|
+
"0xE069": "BrowserForward",
|
|
3034
|
+
"0xE06A": "BrowserBack",
|
|
3035
|
+
"0xE06B": "LaunchApp1",
|
|
3036
|
+
"0xE06C": "LaunchMail",
|
|
3037
|
+
"0xE06D": "MediaSelect"
|
|
3038
|
+
}, wi = {
|
|
3039
|
+
"0x0077": "Lang4",
|
|
3040
|
+
"0x0078": "Lang3",
|
|
3041
|
+
"0xE008": "Undo",
|
|
3042
|
+
"0xE00A": "Paste",
|
|
3043
|
+
"0xE017": "Cut",
|
|
3044
|
+
"0xE018": "Copy",
|
|
3045
|
+
"0xE020": "AudioVolumeMute",
|
|
3046
|
+
"0xE02C": "Eject",
|
|
3047
|
+
"0xE02E": "AudioVolumeDown",
|
|
3048
|
+
"0xE030": "AudioVolumeUp",
|
|
3049
|
+
"0xE03B": "Help",
|
|
3050
|
+
"0xE05B": "MetaLeft",
|
|
3051
|
+
"0xE05C": "MetaRight",
|
|
3052
|
+
"0xE05F": "Sleep",
|
|
3053
|
+
"0xE063": "WakeUp"
|
|
3054
|
+
}, Mn = {
|
|
3055
|
+
"0x0054": "PrintScreen",
|
|
3056
|
+
"0xE020": "VolumeMute",
|
|
3057
|
+
// The documentation says it's 'AudioVolumeMute', but the actual test shows that it's 'VolumeMute'.
|
|
3058
|
+
"0xE02E": "VolumeDown",
|
|
3059
|
+
"0xE030": "VolumeUp",
|
|
3060
|
+
"0xE05B": vi > 117 ? "MetaLeft" : "OSLeft",
|
|
3061
|
+
"0xE05C": vi > 117 ? "MetaRight" : "OSRight"
|
|
3062
|
+
}, Fn = {
|
|
3063
|
+
blink: zt({ ...Bt, ...wi }),
|
|
3064
|
+
gecko: zt({ ...Bt, ...Mn }),
|
|
3065
|
+
webkit: zt({ ...Bt, ...wi })
|
|
3066
|
+
};
|
|
3067
|
+
function zt(t) {
|
|
3068
|
+
const e = {};
|
|
3069
|
+
for (const [i, r] of Object.entries(t))
|
|
3070
|
+
e[r] = i;
|
|
3071
|
+
return e;
|
|
3072
|
+
}
|
|
3073
|
+
const mi = function(t) {
|
|
3074
|
+
const e = Fn[Ln];
|
|
3075
|
+
return parseInt(e[t], 16);
|
|
3076
|
+
};
|
|
3077
|
+
var Ht = /* @__PURE__ */ ((t) => (t.CTRL_LEFT = "ControlLeft", t.SHIFT_LEFT = "ShiftLeft", t.SHIFT_RIGHT = "ShiftRight", t.ALT_LEFT = "AltLeft", t.CTRL_RIGHT = "ControlRight", t.ALT_RIGHT = "AltRight", t.ControlLeft = "ControlLeft", t.ShiftLeft = "ShiftLeft", t.ShiftRight = "ShiftRight", t.AltLeft = "AltLeft", t.ControlRight = "ControlRight", t.AltRight = "AltRight", t))(Ht || {}), Pe = /* @__PURE__ */ ((t) => (t.CAPS_LOCK = "CapsLock", t.NUM_LOCK = "NumLock", t.SCROLL_LOCK = "ScrollLock", t.KANA_MODE = "KanaMode", t.CapsLock = "CapsLock", t.ScrollLock = "ScrollLock", t.NumLock = "NumLock", t.KanaMode = "KanaMode", t))(Pe || {}), ce = /* @__PURE__ */ ((t) => (t[t.CTRL_ALT_DEL = 0] = "CTRL_ALT_DEL", t[t.META = 1] = "META", t[t.CTRL_C = 2] = "CTRL_C", t[t.CTRL_V = 3] = "CTRL_V", t))(ce || {}), me = /* @__PURE__ */ ((t) => (t[t.Fit = 1] = "Fit", t[t.Full = 2] = "Full", t[t.Real = 3] = "Real", t))(me || {}), Qe = /* @__PURE__ */ ((t) => (t[t.Pixel = 0] = "Pixel", t[t.Line = 1] = "Line", t[t.Page = 2] = "Page", t))(Qe || {});
|
|
3078
|
+
class Nn {
|
|
3079
|
+
constructor(e, i, r) {
|
|
3080
|
+
__publicField(this, "username");
|
|
3081
|
+
__publicField(this, "password");
|
|
3082
|
+
__publicField(this, "destination");
|
|
3083
|
+
__publicField(this, "proxyAddress");
|
|
3084
|
+
__publicField(this, "serverDomain");
|
|
3085
|
+
__publicField(this, "authToken");
|
|
3086
|
+
__publicField(this, "desktopSize");
|
|
3087
|
+
__publicField(this, "extensions");
|
|
3088
|
+
this.username = e.username, this.password = e.password, this.proxyAddress = i.address, this.authToken = i.authToken, this.destination = r.destination, this.serverDomain = r.serverDomain, this.extensions = r.extensions, this.desktopSize = r.desktopSize;
|
|
3089
|
+
}
|
|
3090
|
+
}
|
|
3091
|
+
class Pn {
|
|
3092
|
+
/**
|
|
3093
|
+
* Creates a new ConfigBuilder instance.
|
|
3094
|
+
*/
|
|
3095
|
+
constructor() {
|
|
3096
|
+
__publicField(this, "username", "");
|
|
3097
|
+
__publicField(this, "password", "");
|
|
3098
|
+
__publicField(this, "destination", "");
|
|
3099
|
+
__publicField(this, "proxyAddress", "");
|
|
3100
|
+
__publicField(this, "serverDomain", "");
|
|
3101
|
+
__publicField(this, "authToken", "");
|
|
3102
|
+
__publicField(this, "desktopSize");
|
|
3103
|
+
__publicField(this, "extensions", []);
|
|
3104
|
+
}
|
|
3105
|
+
/**
|
|
3106
|
+
* Optional parameter
|
|
3107
|
+
*
|
|
3108
|
+
* @param username - The username to use for authentication
|
|
3109
|
+
* @returns The builder instance for method chaining
|
|
3110
|
+
*/
|
|
3111
|
+
withUsername(e) {
|
|
3112
|
+
return this.username = e, this;
|
|
3113
|
+
}
|
|
3114
|
+
/**
|
|
3115
|
+
* Optional parameter
|
|
3116
|
+
*
|
|
3117
|
+
* @param password - The password for authentication
|
|
3118
|
+
* @returns The builder instance for method chaining
|
|
3119
|
+
*/
|
|
3120
|
+
withPassword(e) {
|
|
3121
|
+
return this.password = e, this;
|
|
3122
|
+
}
|
|
3123
|
+
/**
|
|
3124
|
+
* Required parameter
|
|
3125
|
+
*
|
|
3126
|
+
* @param destination - The destination address to connect to
|
|
3127
|
+
* @returns The builder instance for method chaining
|
|
3128
|
+
*/
|
|
3129
|
+
withDestination(e) {
|
|
3130
|
+
return this.destination = e, this;
|
|
3131
|
+
}
|
|
3132
|
+
/**
|
|
3133
|
+
* Required parameter
|
|
3134
|
+
*
|
|
3135
|
+
* @param proxyAddress - The address of the proxy server
|
|
3136
|
+
* @returns The builder instance for method chaining
|
|
3137
|
+
*/
|
|
3138
|
+
withProxyAddress(e) {
|
|
3139
|
+
return this.proxyAddress = e, this;
|
|
3140
|
+
}
|
|
3141
|
+
/**
|
|
3142
|
+
* Optional parameter
|
|
3143
|
+
*
|
|
3144
|
+
* @param serverDomain - The server domain to connect to
|
|
3145
|
+
* @returns The builder instance for method chaining
|
|
3146
|
+
*/
|
|
3147
|
+
withServerDomain(e) {
|
|
3148
|
+
return this.serverDomain = e, this;
|
|
3149
|
+
}
|
|
3150
|
+
/**
|
|
3151
|
+
* Required parameter
|
|
3152
|
+
*
|
|
3153
|
+
* @param authToken - JWT token to connect to the proxy
|
|
3154
|
+
* @returns The builder instance for method chaining
|
|
3155
|
+
*/
|
|
3156
|
+
withAuthToken(e) {
|
|
3157
|
+
return this.authToken = e, this;
|
|
3158
|
+
}
|
|
3159
|
+
/**
|
|
3160
|
+
* Optional parameter
|
|
3161
|
+
*
|
|
3162
|
+
* @param ext - The extension
|
|
3163
|
+
* @returns The builder instance for method chaining
|
|
3164
|
+
*/
|
|
3165
|
+
withExtension(e) {
|
|
3166
|
+
return this.extensions.push(e), this;
|
|
3167
|
+
}
|
|
3168
|
+
/**
|
|
3169
|
+
* Optional
|
|
3170
|
+
*
|
|
3171
|
+
* @param desktopSize - The desktop size configuration object
|
|
3172
|
+
* @returns The builder instance for method chaining
|
|
3173
|
+
*/
|
|
3174
|
+
withDesktopSize(e) {
|
|
3175
|
+
return this.desktopSize = e, this;
|
|
3176
|
+
}
|
|
3177
|
+
/**
|
|
3178
|
+
* Builds a new Config instance.
|
|
3179
|
+
*
|
|
3180
|
+
* @throws {Error} If required parameters (destination, proxyAddress, authToken) are not set
|
|
3181
|
+
* @returns A new Config instance with the configured values
|
|
3182
|
+
*/
|
|
3183
|
+
build() {
|
|
3184
|
+
if (this.destination === "")
|
|
3185
|
+
throw new Error("destination has to be specified");
|
|
3186
|
+
if (this.proxyAddress === "")
|
|
3187
|
+
throw new Error("proxy address has to be specified");
|
|
3188
|
+
if (this.authToken === "")
|
|
3189
|
+
throw new Error("authentication token has to be specified");
|
|
3190
|
+
const e = { username: this.username, password: this.password }, i = { address: this.proxyAddress, authToken: this.authToken }, r = {
|
|
3191
|
+
destination: this.destination,
|
|
3192
|
+
serverDomain: this.serverDomain,
|
|
3193
|
+
extensions: this.extensions,
|
|
3194
|
+
desktopSize: this.desktopSize
|
|
3195
|
+
};
|
|
3196
|
+
return new Nn(e, i, r);
|
|
3197
|
+
}
|
|
3198
|
+
}
|
|
3199
|
+
class Ne {
|
|
3200
|
+
constructor() {
|
|
3201
|
+
__publicField(this, "subscribers");
|
|
3202
|
+
this.subscribers = [];
|
|
3203
|
+
}
|
|
3204
|
+
subscribe(e) {
|
|
3205
|
+
this.subscribers.push(e);
|
|
3206
|
+
}
|
|
3207
|
+
publish(e) {
|
|
3208
|
+
for (const i of this.subscribers)
|
|
3209
|
+
i(e);
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
class Un {
|
|
3213
|
+
constructor(e) {
|
|
3214
|
+
__publicField(this, "module");
|
|
3215
|
+
__publicField(this, "canvas");
|
|
3216
|
+
__publicField(this, "keyboardUnicodeMode", false);
|
|
3217
|
+
__publicField(this, "backendSupportsUnicodeKeyboardShortcuts");
|
|
3218
|
+
__publicField(this, "onRemoteClipboardChanged");
|
|
3219
|
+
__publicField(this, "onForceClipboardUpdate");
|
|
3220
|
+
__publicField(this, "onCanvasResized");
|
|
3221
|
+
__publicField(this, "onWarningCallback");
|
|
3222
|
+
__publicField(this, "onClipboardRemoteUpdate");
|
|
3223
|
+
__publicField(this, "fileTransferProvider");
|
|
3224
|
+
__publicField(this, "cursorHasOverride", false);
|
|
3225
|
+
__publicField(this, "lastCursorStyle", "default");
|
|
3226
|
+
__publicField(this, "enableClipboard", true);
|
|
3227
|
+
__publicField(this, "_autoClipboard", true);
|
|
3228
|
+
__publicField(this, "sessionStartedObservable", new Ne());
|
|
3229
|
+
__publicField(this, "resizeObservable", new Ne());
|
|
3230
|
+
__publicField(this, "session");
|
|
3231
|
+
__publicField(this, "modifierKeyPressed", []);
|
|
3232
|
+
__publicField(this, "mousePositionObservable", new Ne());
|
|
3233
|
+
__publicField(this, "changeVisibilityObservable", new Ne());
|
|
3234
|
+
__publicField(this, "scaleObservable", new Ne());
|
|
3235
|
+
__publicField(this, "dynamicResizeObservable", new Ne());
|
|
3236
|
+
this.module = e, F.info("Web bridge initialized.");
|
|
3237
|
+
}
|
|
3238
|
+
get autoClipboard() {
|
|
3239
|
+
return this._autoClipboard;
|
|
3240
|
+
}
|
|
3241
|
+
// If set to false, the clipboard will not be enabled and the callbacks will not be registered to the Rust side
|
|
3242
|
+
setEnableClipboard(e) {
|
|
3243
|
+
this.enableClipboard = e;
|
|
3244
|
+
}
|
|
3245
|
+
// If set to true, automatic clipboard synchronization with the server is enabled.
|
|
3246
|
+
//
|
|
3247
|
+
// If set to false, then the client must invoke `PublicAPI.saveRemoteClipboardData` and
|
|
3248
|
+
// `PublicAPI.sendClipboardData` to write to clipboard and to send clipboard data to the server.
|
|
3249
|
+
setEnableAutoClipboard(e) {
|
|
3250
|
+
this._autoClipboard = e;
|
|
3251
|
+
}
|
|
3252
|
+
/// Callback to set the local clipboard content to data received from the remote.
|
|
3253
|
+
setOnRemoteClipboardChanged(e) {
|
|
3254
|
+
this.onRemoteClipboardChanged = e;
|
|
3255
|
+
}
|
|
3256
|
+
/// Callback which is called when the remote requests a forced clipboard update (e.g. on
|
|
3257
|
+
/// clipboard initialization sequence)
|
|
3258
|
+
setOnForceClipboardUpdate(e) {
|
|
3259
|
+
this.onForceClipboardUpdate = e;
|
|
3260
|
+
}
|
|
3261
|
+
/// Callback which is called when the canvas is resized.
|
|
3262
|
+
setOnCanvasResized(e) {
|
|
3263
|
+
this.onCanvasResized = e;
|
|
3264
|
+
}
|
|
3265
|
+
/// Callback which is called when the warning event is emitted.
|
|
3266
|
+
setOnWarningCallback(e) {
|
|
3267
|
+
this.onWarningCallback = e;
|
|
3268
|
+
}
|
|
3269
|
+
/// Callback which is called when the clipboard remote update event is emitted.
|
|
3270
|
+
setOnClipboardRemoteUpdate(e) {
|
|
3271
|
+
this.onClipboardRemoteUpdate = e;
|
|
3272
|
+
}
|
|
3273
|
+
/**
|
|
3274
|
+
* Enable file transfer support. Must be called before connect().
|
|
3275
|
+
* Implicitly enables clipboard (required for file transfer protocol).
|
|
3276
|
+
*
|
|
3277
|
+
* @param provider - Protocol-specific file transfer provider (e.g., RdpFileTransferProvider)
|
|
3278
|
+
* @returns The same provider, for chaining
|
|
3279
|
+
*/
|
|
3280
|
+
enableFileTransfer(e) {
|
|
3281
|
+
var _a2;
|
|
3282
|
+
return (_a2 = this.fileTransferProvider) == null ? void 0 : _a2.dispose(), this.fileTransferProvider = e, this.enableClipboard = true, e;
|
|
3283
|
+
}
|
|
3284
|
+
mouseIn(e) {
|
|
3285
|
+
if (!this.session) return;
|
|
3286
|
+
this.syncModifier(e);
|
|
3287
|
+
const r = [
|
|
3288
|
+
[1, 0],
|
|
3289
|
+
// left button
|
|
3290
|
+
[2, 2],
|
|
3291
|
+
// right button
|
|
3292
|
+
[4, 1]
|
|
3293
|
+
// middle button
|
|
3294
|
+
].filter(([n]) => (e.buttons & n) === 0).map(([, n]) => this.module.DeviceEvent.mouseButtonReleased(n));
|
|
3295
|
+
r.length > 0 && this.doTransactionFromDeviceEvents(r);
|
|
3296
|
+
}
|
|
3297
|
+
mouseOut(e) {
|
|
3298
|
+
this.releaseAllInputs();
|
|
3299
|
+
}
|
|
3300
|
+
focusLost() {
|
|
3301
|
+
this.releaseAllInputs();
|
|
3302
|
+
}
|
|
3303
|
+
sendKeyboardEvent(e) {
|
|
3304
|
+
this.sendKeyboard(e);
|
|
3305
|
+
}
|
|
3306
|
+
shutdown() {
|
|
3307
|
+
var _a2, _b2;
|
|
3308
|
+
(_a2 = this.fileTransferProvider) == null ? void 0 : _a2.dispose(), (_b2 = this.session) == null ? void 0 : _b2.shutdown();
|
|
3309
|
+
}
|
|
3310
|
+
mouseButtonState(e, i, r) {
|
|
3311
|
+
r && e.preventDefault();
|
|
3312
|
+
const n = i ? this.module.DeviceEvent.mouseButtonPressed : this.module.DeviceEvent.mouseButtonReleased;
|
|
3313
|
+
this.doTransactionFromDeviceEvents([n(e.button)]);
|
|
3314
|
+
}
|
|
3315
|
+
updateMousePosition(e) {
|
|
3316
|
+
this.doTransactionFromDeviceEvents([this.module.DeviceEvent.mouseMove(e.x, e.y)]), this.mousePositionObservable.publish(e);
|
|
3317
|
+
}
|
|
3318
|
+
configBuilder() {
|
|
3319
|
+
return new Pn();
|
|
3320
|
+
}
|
|
3321
|
+
async connect(e) {
|
|
3322
|
+
var _a2;
|
|
3323
|
+
const i = new this.module.SessionBuilder();
|
|
3324
|
+
if (i.proxyAddress(e.proxyAddress), i.destination(e.destination), i.serverDomain(e.serverDomain), i.password(e.password), i.authToken(e.authToken), i.username(e.username), i.renderCanvas(this.canvas), i.setCursorStyleCallbackContext(this), i.setCursorStyleCallback(this.setCursorStyleCallback), e.extensions.forEach((o) => {
|
|
3325
|
+
i.extension(o);
|
|
3326
|
+
}), this.onRemoteClipboardChanged != null && this.enableClipboard && i.remoteClipboardChangedCallback(this.onRemoteClipboardChanged), this.onForceClipboardUpdate != null && this.enableClipboard && i.forceClipboardUpdateCallback(this.onForceClipboardUpdate), this.fileTransferProvider != null && this.enableClipboard)
|
|
3327
|
+
for (const o of this.fileTransferProvider.getBuilderExtensions())
|
|
3328
|
+
i.extension(o);
|
|
3329
|
+
this.onCanvasResized != null && i.canvasResizedCallback(this.onCanvasResized), e.desktopSize != null && i.desktopSize(
|
|
3330
|
+
new this.module.DesktopSize(e.desktopSize.width, e.desktopSize.height)
|
|
3331
|
+
);
|
|
3332
|
+
const r = await i.connect();
|
|
3333
|
+
this.session = r, (_a2 = this.fileTransferProvider) == null ? void 0 : _a2.setSession(r), this.resizeObservable.publish({
|
|
3334
|
+
desktopSize: r.desktopSize(),
|
|
3335
|
+
sessionId: 0
|
|
3336
|
+
}), this.sessionStartedObservable.publish(null);
|
|
3337
|
+
const n = async () => {
|
|
3338
|
+
try {
|
|
3339
|
+
return F.info("Starting the session."), await r.run();
|
|
3340
|
+
} finally {
|
|
3341
|
+
this.setVisibility(false);
|
|
3342
|
+
}
|
|
3343
|
+
};
|
|
3344
|
+
return {
|
|
3345
|
+
sessionId: 0,
|
|
3346
|
+
initialDesktopSize: r.desktopSize(),
|
|
3347
|
+
websocketPort: 0,
|
|
3348
|
+
run: n
|
|
3349
|
+
};
|
|
3350
|
+
}
|
|
3351
|
+
sendSpecialCombination(e) {
|
|
3352
|
+
switch (e) {
|
|
3353
|
+
case ce.CTRL_ALT_DEL:
|
|
3354
|
+
this.ctrlAltDel();
|
|
3355
|
+
break;
|
|
3356
|
+
case ce.META:
|
|
3357
|
+
this.sendMeta();
|
|
3358
|
+
break;
|
|
3359
|
+
case ce.CTRL_C:
|
|
3360
|
+
this.sendCtrlC();
|
|
3361
|
+
break;
|
|
3362
|
+
case ce.CTRL_V:
|
|
3363
|
+
this.sendCtrlV();
|
|
3364
|
+
break;
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
rotation_unit_from_wheel_event(e) {
|
|
3368
|
+
switch (e.deltaMode) {
|
|
3369
|
+
case e.DOM_DELTA_PIXEL:
|
|
3370
|
+
return Qe.Pixel;
|
|
3371
|
+
case e.DOM_DELTA_LINE:
|
|
3372
|
+
return Qe.Line;
|
|
3373
|
+
case e.DOM_DELTA_PAGE:
|
|
3374
|
+
return Qe.Page;
|
|
3375
|
+
default:
|
|
3376
|
+
return Qe.Pixel;
|
|
3377
|
+
}
|
|
3378
|
+
}
|
|
3379
|
+
mouseWheel(e) {
|
|
3380
|
+
const i = e.deltaY !== 0, r = i ? e.deltaY : e.deltaX, n = this.rotation_unit_from_wheel_event(e);
|
|
3381
|
+
this.doTransactionFromDeviceEvents([
|
|
3382
|
+
this.module.DeviceEvent.wheelRotations(i, -r, n)
|
|
3383
|
+
]);
|
|
3384
|
+
}
|
|
3385
|
+
emitWarningEvent(e) {
|
|
3386
|
+
var _a2;
|
|
3387
|
+
(_a2 = this.onWarningCallback) == null ? void 0 : _a2.call(this, e);
|
|
3388
|
+
}
|
|
3389
|
+
emitClipboardRemoteUpdateEvent() {
|
|
3390
|
+
var _a2;
|
|
3391
|
+
(_a2 = this.onClipboardRemoteUpdate) == null ? void 0 : _a2.call(this);
|
|
3392
|
+
}
|
|
3393
|
+
setVisibility(e) {
|
|
3394
|
+
this.changeVisibilityObservable.publish(e);
|
|
3395
|
+
}
|
|
3396
|
+
setScale(e) {
|
|
3397
|
+
this.scaleObservable.publish(e);
|
|
3398
|
+
}
|
|
3399
|
+
setCanvas(e) {
|
|
3400
|
+
this.canvas = e;
|
|
3401
|
+
}
|
|
3402
|
+
resizeDynamic(e, i, r) {
|
|
3403
|
+
var _a2;
|
|
3404
|
+
this.dynamicResizeObservable.publish({ width: e, height: i }), (_a2 = this.session) == null ? void 0 : _a2.resize(e, i, r);
|
|
3405
|
+
}
|
|
3406
|
+
/// Triggered by the browser when local clipboard is updated. Clipboard backend should
|
|
3407
|
+
/// cache the content and send it to the server when it is requested.
|
|
3408
|
+
onClipboardChanged(e) {
|
|
3409
|
+
return (async () => {
|
|
3410
|
+
var _a2;
|
|
3411
|
+
await ((_a2 = this.session) == null ? void 0 : _a2.onClipboardPaste(e));
|
|
3412
|
+
})();
|
|
3413
|
+
}
|
|
3414
|
+
onClipboardChangedEmpty() {
|
|
3415
|
+
return (async () => {
|
|
3416
|
+
var _a2;
|
|
3417
|
+
await ((_a2 = this.session) == null ? void 0 : _a2.onClipboardPaste(new this.module.ClipboardData()));
|
|
3418
|
+
})();
|
|
3419
|
+
}
|
|
3420
|
+
setKeyboardUnicodeMode(e) {
|
|
3421
|
+
this.keyboardUnicodeMode = e;
|
|
3422
|
+
}
|
|
3423
|
+
setCursorStyleOverride(e) {
|
|
3424
|
+
e == null ? (this.canvas.style.cursor = this.lastCursorStyle, this.cursorHasOverride = false) : (this.canvas.style.cursor = e, this.cursorHasOverride = true);
|
|
3425
|
+
}
|
|
3426
|
+
invokeExtension(e) {
|
|
3427
|
+
var _a2;
|
|
3428
|
+
(_a2 = this.session) == null ? void 0 : _a2.invokeExtension(e);
|
|
3429
|
+
}
|
|
3430
|
+
releaseAllInputs() {
|
|
3431
|
+
var _a2;
|
|
3432
|
+
(_a2 = this.session) == null ? void 0 : _a2.releaseAllInputs();
|
|
3433
|
+
}
|
|
3434
|
+
supportsUnicodeKeyboardShortcuts() {
|
|
3435
|
+
var _a2, _b2;
|
|
3436
|
+
return this.backendSupportsUnicodeKeyboardShortcuts !== void 0 ? this.backendSupportsUnicodeKeyboardShortcuts : ((_a2 = this.session) == null ? void 0 : _a2.supportsUnicodeKeyboardShortcuts) ? (this.backendSupportsUnicodeKeyboardShortcuts = (_b2 = this.session) == null ? void 0 : _b2.supportsUnicodeKeyboardShortcuts(), this.backendSupportsUnicodeKeyboardShortcuts) : true;
|
|
3437
|
+
}
|
|
3438
|
+
sendKeyboard(e) {
|
|
3439
|
+
e.preventDefault();
|
|
3440
|
+
let i, r;
|
|
3441
|
+
e.type === "keydown" ? (i = this.module.DeviceEvent.keyPressed, r = this.module.DeviceEvent.unicodePressed) : e.type === "keyup" && (i = this.module.DeviceEvent.keyReleased, r = this.module.DeviceEvent.unicodeReleased);
|
|
3442
|
+
let n = true;
|
|
3443
|
+
if (!this.supportsUnicodeKeyboardShortcuts()) {
|
|
3444
|
+
for (const h of ["Alt", "Control", "Meta", "AltGraph", "OS"])
|
|
3445
|
+
if (e.getModifierState(h)) {
|
|
3446
|
+
n = false;
|
|
3447
|
+
break;
|
|
3448
|
+
}
|
|
3449
|
+
}
|
|
3450
|
+
const o = e.code in Ht, c = e.code in Pe;
|
|
3451
|
+
if (o && this.updateModifierKeyState(e), c && this.syncModifier(e), !e.repeat || !o && !c) {
|
|
3452
|
+
const h = mi(e.code), f = Number.isNaN(h);
|
|
3453
|
+
if (!this.keyboardUnicodeMode && i && !f) {
|
|
3454
|
+
this.doTransactionFromDeviceEvents([i(h)]);
|
|
3455
|
+
return;
|
|
3456
|
+
}
|
|
3457
|
+
if (this.keyboardUnicodeMode && r && i) {
|
|
3458
|
+
if (["Dead", "Unidentified"].indexOf(e.key) != -1)
|
|
3459
|
+
return;
|
|
3460
|
+
const d = mi(e.key);
|
|
3461
|
+
Number.isNaN(d) && e.key.length === 1 && !o && n ? this.doTransactionFromDeviceEvents([r(e.key)]) : f || this.doTransactionFromDeviceEvents([i(h)]);
|
|
3462
|
+
return;
|
|
3463
|
+
}
|
|
3464
|
+
}
|
|
3465
|
+
}
|
|
3466
|
+
setCursorStyleCallback(e, i, r, n) {
|
|
3467
|
+
let o;
|
|
3468
|
+
switch (e) {
|
|
3469
|
+
case "hidden": {
|
|
3470
|
+
o = "none";
|
|
3471
|
+
break;
|
|
3472
|
+
}
|
|
3473
|
+
case "default": {
|
|
3474
|
+
o = "default";
|
|
3475
|
+
break;
|
|
3476
|
+
}
|
|
3477
|
+
case "url": {
|
|
3478
|
+
if (i == null || r == null || n == null) {
|
|
3479
|
+
console.error("Invalid custom cursor parameters.");
|
|
3480
|
+
return;
|
|
3481
|
+
}
|
|
3482
|
+
const c = new Image();
|
|
3483
|
+
c.src = i;
|
|
3484
|
+
const h = Math.round(r), f = Math.round(n);
|
|
3485
|
+
o = `url(${i}) ${h} ${f}, default`;
|
|
3486
|
+
break;
|
|
3487
|
+
}
|
|
3488
|
+
default: {
|
|
3489
|
+
console.error(`Unsupported cursor style: ${e}.`);
|
|
3490
|
+
return;
|
|
3491
|
+
}
|
|
3492
|
+
}
|
|
3493
|
+
this.lastCursorStyle = o, this.cursorHasOverride || (this.canvas.style.cursor = o);
|
|
3494
|
+
}
|
|
3495
|
+
syncModifier(e) {
|
|
3496
|
+
var _a2;
|
|
3497
|
+
const i = e.getModifierState(Pe.CAPS_LOCK), r = e.getModifierState(Pe.NUM_LOCK), n = e.getModifierState(Pe.SCROLL_LOCK), o = e.getModifierState(Pe.KANA_MODE);
|
|
3498
|
+
(_a2 = this.session) == null ? void 0 : _a2.synchronizeLockKeys(
|
|
3499
|
+
n,
|
|
3500
|
+
r,
|
|
3501
|
+
i,
|
|
3502
|
+
o
|
|
3503
|
+
);
|
|
3504
|
+
}
|
|
3505
|
+
updateModifierKeyState(e) {
|
|
3506
|
+
const i = Ht[e.code];
|
|
3507
|
+
this.modifierKeyPressed.indexOf(i) === -1 ? this.modifierKeyPressed.push(i) : e.type === "keyup" && this.modifierKeyPressed.splice(this.modifierKeyPressed.indexOf(i), 1);
|
|
3508
|
+
}
|
|
3509
|
+
doTransactionFromDeviceEvents(e) {
|
|
3510
|
+
var _a2;
|
|
3511
|
+
const i = new this.module.InputTransaction();
|
|
3512
|
+
e.forEach((r) => i.addEvent(r)), (_a2 = this.session) == null ? void 0 : _a2.applyInputs(i);
|
|
3513
|
+
}
|
|
3514
|
+
ctrlAltDel() {
|
|
3515
|
+
const e = parseInt("0x001D", 16), i = parseInt("0x0038", 16), r = parseInt("0xE053", 16);
|
|
3516
|
+
this.doTransactionFromDeviceEvents([
|
|
3517
|
+
this.module.DeviceEvent.keyPressed(e),
|
|
3518
|
+
this.module.DeviceEvent.keyPressed(i),
|
|
3519
|
+
this.module.DeviceEvent.keyPressed(r),
|
|
3520
|
+
this.module.DeviceEvent.keyReleased(e),
|
|
3521
|
+
this.module.DeviceEvent.keyReleased(i),
|
|
3522
|
+
this.module.DeviceEvent.keyReleased(r)
|
|
3523
|
+
]);
|
|
3524
|
+
}
|
|
3525
|
+
sendMeta() {
|
|
3526
|
+
const e = parseInt("0xE05B", 16);
|
|
3527
|
+
this.doTransactionFromDeviceEvents([
|
|
3528
|
+
this.module.DeviceEvent.keyPressed(e),
|
|
3529
|
+
this.module.DeviceEvent.keyReleased(e)
|
|
3530
|
+
]);
|
|
3531
|
+
}
|
|
3532
|
+
sendCtrlC() {
|
|
3533
|
+
const e = parseInt("0x001D", 16), i = parseInt("0x002E", 16);
|
|
3534
|
+
this.doTransactionFromDeviceEvents([
|
|
3535
|
+
this.module.DeviceEvent.keyPressed(e),
|
|
3536
|
+
this.module.DeviceEvent.keyPressed(i),
|
|
3537
|
+
this.module.DeviceEvent.keyReleased(i),
|
|
3538
|
+
this.module.DeviceEvent.keyReleased(e)
|
|
3539
|
+
]);
|
|
3540
|
+
}
|
|
3541
|
+
sendCtrlV() {
|
|
3542
|
+
const e = parseInt("0x001D", 16), i = parseInt("0x002F", 16);
|
|
3543
|
+
this.doTransactionFromDeviceEvents([
|
|
3544
|
+
this.module.DeviceEvent.keyPressed(e),
|
|
3545
|
+
this.module.DeviceEvent.keyPressed(i),
|
|
3546
|
+
this.module.DeviceEvent.keyReleased(i),
|
|
3547
|
+
this.module.DeviceEvent.keyReleased(e)
|
|
3548
|
+
]);
|
|
3549
|
+
}
|
|
3550
|
+
}
|
|
3551
|
+
class Bn {
|
|
3552
|
+
constructor(e, i) {
|
|
3553
|
+
__publicField(this, "remoteDesktopService");
|
|
3554
|
+
__publicField(this, "clipboardService");
|
|
3555
|
+
this.remoteDesktopService = e, this.clipboardService = i;
|
|
3556
|
+
}
|
|
3557
|
+
configBuilder() {
|
|
3558
|
+
return this.remoteDesktopService.configBuilder();
|
|
3559
|
+
}
|
|
3560
|
+
connect(e) {
|
|
3561
|
+
return F.info("Initializing connection."), this.remoteDesktopService.connect(e);
|
|
3562
|
+
}
|
|
3563
|
+
ctrlAltDel() {
|
|
3564
|
+
this.remoteDesktopService.sendSpecialCombination(ce.CTRL_ALT_DEL);
|
|
3565
|
+
}
|
|
3566
|
+
metaKey() {
|
|
3567
|
+
this.remoteDesktopService.sendSpecialCombination(ce.META);
|
|
3568
|
+
}
|
|
3569
|
+
ctrlC() {
|
|
3570
|
+
this.remoteDesktopService.sendSpecialCombination(ce.CTRL_C);
|
|
3571
|
+
}
|
|
3572
|
+
ctrlV() {
|
|
3573
|
+
this.remoteDesktopService.sendSpecialCombination(ce.CTRL_V);
|
|
3574
|
+
}
|
|
3575
|
+
setVisibility(e) {
|
|
3576
|
+
F.info(`Change component visibility to: ${e}`), this.remoteDesktopService.setVisibility(e);
|
|
3577
|
+
}
|
|
3578
|
+
setScale(e) {
|
|
3579
|
+
this.remoteDesktopService.setScale(e);
|
|
3580
|
+
}
|
|
3581
|
+
shutdown() {
|
|
3582
|
+
this.remoteDesktopService.shutdown();
|
|
3583
|
+
}
|
|
3584
|
+
setKeyboardUnicodeMode(e) {
|
|
3585
|
+
this.remoteDesktopService.setKeyboardUnicodeMode(e);
|
|
3586
|
+
}
|
|
3587
|
+
setCursorStyleOverride(e) {
|
|
3588
|
+
this.remoteDesktopService.setCursorStyleOverride(e);
|
|
3589
|
+
}
|
|
3590
|
+
resize(e, i, r) {
|
|
3591
|
+
this.remoteDesktopService.resizeDynamic(e, i, r);
|
|
3592
|
+
}
|
|
3593
|
+
setEnableClipboard(e) {
|
|
3594
|
+
this.remoteDesktopService.setEnableClipboard(e);
|
|
3595
|
+
}
|
|
3596
|
+
setEnableAutoClipboard(e) {
|
|
3597
|
+
this.remoteDesktopService.setEnableAutoClipboard(e);
|
|
3598
|
+
}
|
|
3599
|
+
setOnWarningCallback(e) {
|
|
3600
|
+
this.remoteDesktopService.setOnWarningCallback(e);
|
|
3601
|
+
}
|
|
3602
|
+
setOnClipboardRemoteUpdateCallback(e) {
|
|
3603
|
+
this.remoteDesktopService.setOnClipboardRemoteUpdate(e);
|
|
3604
|
+
}
|
|
3605
|
+
async saveRemoteClipboardData() {
|
|
3606
|
+
return await this.clipboardService.saveRemoteClipboardData();
|
|
3607
|
+
}
|
|
3608
|
+
async sendClipboardData() {
|
|
3609
|
+
return await this.clipboardService.sendClipboardData();
|
|
3610
|
+
}
|
|
3611
|
+
invokeExtension(e) {
|
|
3612
|
+
this.remoteDesktopService.invokeExtension(e);
|
|
3613
|
+
}
|
|
3614
|
+
enableFileTransfer(e) {
|
|
3615
|
+
const i = e.onUploadStarted, r = e.onUploadFinished;
|
|
3616
|
+
return e.onUploadStarted = () => {
|
|
3617
|
+
i == null ? void 0 : i(), this.clipboardService.suppressMonitoring();
|
|
3618
|
+
}, e.onUploadFinished = () => {
|
|
3619
|
+
this.clipboardService.resumeMonitoring(), r == null ? void 0 : r();
|
|
3620
|
+
}, this.remoteDesktopService.enableFileTransfer(e);
|
|
3621
|
+
}
|
|
3622
|
+
getExposedFunctions() {
|
|
3623
|
+
return {
|
|
3624
|
+
setVisibility: this.setVisibility.bind(this),
|
|
3625
|
+
configBuilder: this.configBuilder.bind(this),
|
|
3626
|
+
connect: this.connect.bind(this),
|
|
3627
|
+
onWarningCallback: this.setOnWarningCallback.bind(this),
|
|
3628
|
+
onClipboardRemoteUpdateCallback: this.setOnClipboardRemoteUpdateCallback.bind(this),
|
|
3629
|
+
setScale: this.setScale.bind(this),
|
|
3630
|
+
ctrlAltDel: this.ctrlAltDel.bind(this),
|
|
3631
|
+
metaKey: this.metaKey.bind(this),
|
|
3632
|
+
ctrlC: this.ctrlC.bind(this),
|
|
3633
|
+
ctrlV: this.ctrlV.bind(this),
|
|
3634
|
+
shutdown: this.shutdown.bind(this),
|
|
3635
|
+
setKeyboardUnicodeMode: this.setKeyboardUnicodeMode.bind(this),
|
|
3636
|
+
setCursorStyleOverride: this.setCursorStyleOverride.bind(this),
|
|
3637
|
+
resize: this.resize.bind(this),
|
|
3638
|
+
setEnableClipboard: this.setEnableClipboard.bind(this),
|
|
3639
|
+
setEnableAutoClipboard: this.setEnableAutoClipboard.bind(this),
|
|
3640
|
+
saveRemoteClipboardData: this.saveRemoteClipboardData.bind(this),
|
|
3641
|
+
sendClipboardData: this.sendClipboardData.bind(this),
|
|
3642
|
+
invokeExtension: this.invokeExtension.bind(this),
|
|
3643
|
+
enableFileTransfer: this.enableFileTransfer.bind(this)
|
|
3644
|
+
};
|
|
3645
|
+
}
|
|
3646
|
+
}
|
|
3647
|
+
const jt = ir(false);
|
|
3648
|
+
function zn() {
|
|
3649
|
+
const t = ir([]);
|
|
3650
|
+
return {
|
|
3651
|
+
subscribe: t.subscribe,
|
|
3652
|
+
enqueue(e) {
|
|
3653
|
+
t.update((i) => [...i, e]);
|
|
3654
|
+
},
|
|
3655
|
+
shift() {
|
|
3656
|
+
let e;
|
|
3657
|
+
return t.update((i) => i.length == 0 ? i : (e = i[0], i.slice(1))), e;
|
|
3658
|
+
},
|
|
3659
|
+
length() {
|
|
3660
|
+
return rr(t).length;
|
|
3661
|
+
}
|
|
3662
|
+
};
|
|
3663
|
+
}
|
|
3664
|
+
const Gt = zn();
|
|
3665
|
+
var q = /* @__PURE__ */ ((t) => (t[t.Full = 0] = "Full", t[t.TextOnly = 1] = "TextOnly", t[t.TextOnlyServerOnly = 2] = "TextOnlyServerOnly", t[t.None = 3] = "None", t))(q || {}), or = /* @__PURE__ */ ((t) => (t[t.General = 0] = "General", t[t.WrongPassword = 1] = "WrongPassword", t[t.LogonFailure = 2] = "LogonFailure", t[t.AccessDenied = 3] = "AccessDenied", t[t.RDCleanPath = 4] = "RDCleanPath", t[t.ProxyConnect = 5] = "ProxyConnect", t[t.NegotiationFailure = 6] = "NegotiationFailure", t))(or || {});
|
|
3666
|
+
const In = 100;
|
|
3667
|
+
function ne(t) {
|
|
3668
|
+
throw {
|
|
3669
|
+
kind: () => or.General,
|
|
3670
|
+
backtrace: () => t
|
|
3671
|
+
};
|
|
3672
|
+
}
|
|
3673
|
+
class Wn {
|
|
3674
|
+
constructor(e, i) {
|
|
3675
|
+
__publicField(this, "remoteDesktopService");
|
|
3676
|
+
__publicField(this, "module");
|
|
3677
|
+
__publicField(this, "ClipboardApiSupported", q.None);
|
|
3678
|
+
__publicField(this, "lastClientClipboardItems", {});
|
|
3679
|
+
__publicField(this, "lastReceivedClipboardData", {});
|
|
3680
|
+
__publicField(this, "lastSentClipboardData", null);
|
|
3681
|
+
__publicField(this, "clipboardDataToSave", null);
|
|
3682
|
+
__publicField(this, "lastClipboardMonitorLoopError", null);
|
|
3683
|
+
// When true, the clipboard monitoring loop skips reading/sending clipboard updates.
|
|
3684
|
+
// Used to prevent the monitoring loop from clobbering an active file upload's
|
|
3685
|
+
// FormatList with a text/image clipboard update.
|
|
3686
|
+
__publicField(this, "monitoringSuppressed", false);
|
|
3687
|
+
// Firefox v126 and below does not support `navigator.clipboard.read` and `navigator.clipboard.write`.
|
|
3688
|
+
// So, we need to define specific methods to handle text-only clipboard.
|
|
3689
|
+
//
|
|
3690
|
+
// Also, Firefox v124 and below does not support `navigator.clipboard.readText`.
|
|
3691
|
+
// Because of this, we cannot read the data from the clipboard at all.
|
|
3692
|
+
__publicField(this, "ffClipboardDataToSave", null);
|
|
3693
|
+
this.remoteDesktopService = e, this.module = i;
|
|
3694
|
+
}
|
|
3695
|
+
/**
|
|
3696
|
+
* Suppress clipboard monitoring. While suppressed, the 100ms monitoring
|
|
3697
|
+
* loop will skip reading the local clipboard and sending updates to the
|
|
3698
|
+
* remote. This prevents the monitor from clobbering a file upload's
|
|
3699
|
+
* FormatList announcement with a text/image clipboard update.
|
|
3700
|
+
*/
|
|
3701
|
+
suppressMonitoring() {
|
|
3702
|
+
this.monitoringSuppressed = true;
|
|
3703
|
+
}
|
|
3704
|
+
/**
|
|
3705
|
+
* Resume clipboard monitoring after a previous {@link suppressMonitoring} call.
|
|
3706
|
+
*/
|
|
3707
|
+
resumeMonitoring() {
|
|
3708
|
+
this.monitoringSuppressed = false;
|
|
3709
|
+
}
|
|
3710
|
+
async initClipboard() {
|
|
3711
|
+
if (!window.isSecureContext) {
|
|
3712
|
+
this.remoteDesktopService.emitWarningEvent("Clipboard is available only in secure contexts (HTTPS).");
|
|
3713
|
+
return;
|
|
3714
|
+
}
|
|
3715
|
+
if (navigator.clipboard != null && (navigator.clipboard.read != null && navigator.clipboard.write != null ? this.ClipboardApiSupported = q.Full : navigator.clipboard.readText != null ? (this.ClipboardApiSupported = q.TextOnly, this.remoteDesktopService.emitWarningEvent(
|
|
3716
|
+
"Clipboard is limited to text-only data types due to an outdated browser version!"
|
|
3717
|
+
)) : navigator.clipboard.writeText != null && (this.ClipboardApiSupported = q.TextOnlyServerOnly, this.remoteDesktopService.emitWarningEvent(
|
|
3718
|
+
"Clipboard reading is not supported and writing is limited to text-only data types due to an outdated browser version!"
|
|
3719
|
+
))), this.ClipboardApiSupported === q.Full)
|
|
3720
|
+
try {
|
|
3721
|
+
(await navigator.permissions.query({
|
|
3722
|
+
name: "clipboard-read"
|
|
3723
|
+
})).state === "denied" && (this.ClipboardApiSupported = q.TextOnly);
|
|
3724
|
+
} catch {
|
|
3725
|
+
try {
|
|
3726
|
+
await navigator.clipboard.read();
|
|
3727
|
+
} catch {
|
|
3728
|
+
this.ClipboardApiSupported = q.TextOnly;
|
|
3729
|
+
}
|
|
3730
|
+
}
|
|
3731
|
+
if (this.ClipboardApiSupported === q.None) {
|
|
3732
|
+
this.remoteDesktopService.emitWarningEvent(
|
|
3733
|
+
"Clipboard is not supported due to an outdated browser version!"
|
|
3734
|
+
);
|
|
3735
|
+
return;
|
|
3736
|
+
}
|
|
3737
|
+
this.remoteDesktopService.setOnForceClipboardUpdate(this.onForceClipboardUpdate.bind(this)), this.ClipboardApiSupported === q.Full ? this.remoteDesktopService.autoClipboard ? (this.remoteDesktopService.setOnRemoteClipboardChanged(this.onRemoteClipboardChangedAutoMode.bind(this)), this.remoteDesktopService.sessionStartedObservable.subscribe((e) => {
|
|
3738
|
+
this.scheduleOnMonitorClipboardUpdate();
|
|
3739
|
+
})) : this.remoteDesktopService.setOnRemoteClipboardChanged(
|
|
3740
|
+
this.onRemoteClipboardChangedManualMode.bind(this)
|
|
3741
|
+
) : this.remoteDesktopService.setOnRemoteClipboardChanged(this.ffOnRemoteClipboardChanged.bind(this));
|
|
3742
|
+
}
|
|
3743
|
+
// Copies clipboard content received from the server to the local clipboard.
|
|
3744
|
+
// Returns the result of the operation. On failure, it additionally raises an error session event.
|
|
3745
|
+
async saveRemoteClipboardData() {
|
|
3746
|
+
if (this.ClipboardApiSupported !== q.Full)
|
|
3747
|
+
return await this.ffSaveRemoteClipboardData();
|
|
3748
|
+
this.clipboardDataToSave == null && ne("The server did not send the clipboard data.");
|
|
3749
|
+
try {
|
|
3750
|
+
const e = this.clipboardDataToRecord(this.clipboardDataToSave), i = new ClipboardItem(e);
|
|
3751
|
+
await navigator.clipboard.write([i]), this.clipboardDataToSave = null;
|
|
3752
|
+
} catch (e) {
|
|
3753
|
+
ne("Failed to write to the clipboard: " + e);
|
|
3754
|
+
}
|
|
3755
|
+
}
|
|
3756
|
+
// Sends local clipboard's content to the server.
|
|
3757
|
+
// Returns the result of the operation. On failure, it additionally raises an error session event.
|
|
3758
|
+
async sendClipboardData() {
|
|
3759
|
+
if (this.ClipboardApiSupported !== q.Full)
|
|
3760
|
+
return await this.ffSendClipboardData();
|
|
3761
|
+
const e = await navigator.clipboard.read().catch((n) => {
|
|
3762
|
+
ne("Failed to read from the clipboard: " + n);
|
|
3763
|
+
});
|
|
3764
|
+
e.length == 0 && ne("The clipboard has no data.");
|
|
3765
|
+
const i = e[0];
|
|
3766
|
+
i.types.some((n) => n.startsWith("text/") || n.startsWith("image/png")) || ne("The clipboard has no data of supported type (text or image).");
|
|
3767
|
+
const r = new this.module.ClipboardData();
|
|
3768
|
+
for (const n of i.types) {
|
|
3769
|
+
const o = n.startsWith("text/"), c = await i.getType(n);
|
|
3770
|
+
o ? r.addText(n, await c.text()) : r.addBinary(n, new Uint8Array(await c.arrayBuffer()));
|
|
3771
|
+
}
|
|
3772
|
+
r.isEmpty() || (this.lastSentClipboardData = r, await this.remoteDesktopService.onClipboardChanged(r));
|
|
3773
|
+
}
|
|
3774
|
+
scheduleOnMonitorClipboardUpdate() {
|
|
3775
|
+
setTimeout(this.onMonitorClipboard.bind(this), In);
|
|
3776
|
+
}
|
|
3777
|
+
runWhenWindowFocused(e) {
|
|
3778
|
+
document.hasFocus() ? e() : Gt.enqueue(e);
|
|
3779
|
+
}
|
|
3780
|
+
// This function is required to convert `ClipboardData` to an object that can be used
|
|
3781
|
+
// with `ClipboardItem` API.
|
|
3782
|
+
clipboardDataToRecord(e) {
|
|
3783
|
+
const i = {};
|
|
3784
|
+
for (const r of e.items()) {
|
|
3785
|
+
const n = r.mimeType();
|
|
3786
|
+
i[n] = new Blob([r.value()], { type: n });
|
|
3787
|
+
}
|
|
3788
|
+
return i;
|
|
3789
|
+
}
|
|
3790
|
+
clipboardDataToClipboardItemsRecord(e) {
|
|
3791
|
+
const i = {};
|
|
3792
|
+
for (const r of e.items()) {
|
|
3793
|
+
const n = r.mimeType();
|
|
3794
|
+
i[n] = r.value();
|
|
3795
|
+
}
|
|
3796
|
+
return i;
|
|
3797
|
+
}
|
|
3798
|
+
// This callback is required to send initial clipboard state if available.
|
|
3799
|
+
onForceClipboardUpdate() {
|
|
3800
|
+
try {
|
|
3801
|
+
this.lastSentClipboardData ? this.remoteDesktopService.onClipboardChanged(this.lastSentClipboardData) : this.remoteDesktopService.onClipboardChangedEmpty();
|
|
3802
|
+
} catch (e) {
|
|
3803
|
+
console.error("Failed to send initial clipboard state: " + e);
|
|
3804
|
+
}
|
|
3805
|
+
}
|
|
3806
|
+
// This callback is required to update client clipboard state when remote side has changed.
|
|
3807
|
+
onRemoteClipboardChangedManualMode(e) {
|
|
3808
|
+
this.clipboardDataToSave = e, this.remoteDesktopService.emitClipboardRemoteUpdateEvent();
|
|
3809
|
+
}
|
|
3810
|
+
// This callback is required to update client clipboard state when remote side has changed.
|
|
3811
|
+
onRemoteClipboardChangedAutoMode(e) {
|
|
3812
|
+
try {
|
|
3813
|
+
const i = this.clipboardDataToRecord(e), r = new ClipboardItem(i);
|
|
3814
|
+
this.runWhenWindowFocused(() => {
|
|
3815
|
+
this.lastReceivedClipboardData = this.clipboardDataToClipboardItemsRecord(e), navigator.clipboard.write([r]);
|
|
3816
|
+
});
|
|
3817
|
+
} catch (i) {
|
|
3818
|
+
console.error("Failed to set client clipboard: " + i);
|
|
3819
|
+
}
|
|
3820
|
+
}
|
|
3821
|
+
// Called periodically to monitor clipboard changes
|
|
3822
|
+
async onMonitorClipboard() {
|
|
3823
|
+
let e = false;
|
|
3824
|
+
try {
|
|
3825
|
+
if (this.monitoringSuppressed || !document.hasFocus())
|
|
3826
|
+
return;
|
|
3827
|
+
const i = await navigator.clipboard.read();
|
|
3828
|
+
if (i.length == 0)
|
|
3829
|
+
return;
|
|
3830
|
+
const r = i[0];
|
|
3831
|
+
if (!r.types.some((c) => c.startsWith("text/") || c.startsWith("image/png")))
|
|
3832
|
+
return;
|
|
3833
|
+
const n = {};
|
|
3834
|
+
let o = true;
|
|
3835
|
+
for (const c of r.types) {
|
|
3836
|
+
const h = c.startsWith("text/"), f = await r.getType(c), d = h ? await f.text() : new Uint8Array(await f.arrayBuffer()), p = h ? function(s, a) {
|
|
3837
|
+
return s === a;
|
|
3838
|
+
} : function(s, a) {
|
|
3839
|
+
return !(s instanceof Uint8Array) || !(a instanceof Uint8Array) ? false : s.length === a.length && s.every((l, u) => l === a[u]);
|
|
3840
|
+
}, w = this.lastClientClipboardItems[c];
|
|
3841
|
+
p(w, d) || (p(this.lastReceivedClipboardData[c], d) ? this.lastClientClipboardItems[c] = this.lastReceivedClipboardData[c] : o = false), n[c] = d;
|
|
3842
|
+
}
|
|
3843
|
+
if (!o) {
|
|
3844
|
+
this.lastClientClipboardItems = n;
|
|
3845
|
+
const c = new this.module.ClipboardData();
|
|
3846
|
+
Object.entries(n).forEach(([h, f]) => {
|
|
3847
|
+
f != null && (h.startsWith("text/") && typeof f == "string" ? c.addText(h, f) : h.startsWith("image/") && f instanceof Uint8Array && c.addBinary(h, f));
|
|
3848
|
+
}), c.isEmpty() || (this.lastSentClipboardData = c, await this.remoteDesktopService.onClipboardChanged(c));
|
|
3849
|
+
}
|
|
3850
|
+
} catch (i) {
|
|
3851
|
+
if (i instanceof DOMException && i.name === "NotAllowedError") {
|
|
3852
|
+
console.warn("Clipboard monitoring disabled: browser requires user activation for clipboard read."), this.remoteDesktopService.setOnRemoteClipboardChanged(
|
|
3853
|
+
this.onRemoteClipboardChangedManualMode.bind(this)
|
|
3854
|
+
), e = true;
|
|
3855
|
+
return;
|
|
3856
|
+
}
|
|
3857
|
+
i instanceof Error && ((this.lastClipboardMonitorLoopError === null || this.lastClipboardMonitorLoopError.toString() !== i.toString()) && console.error("Clipboard monitoring error: " + i), this.lastClipboardMonitorLoopError = i);
|
|
3858
|
+
} finally {
|
|
3859
|
+
!e && !rr(jt) && this.scheduleOnMonitorClipboardUpdate();
|
|
3860
|
+
}
|
|
3861
|
+
}
|
|
3862
|
+
// This function is required to retrieve the text data from the `ClipboardData`.
|
|
3863
|
+
ffRetrieveTextData(e) {
|
|
3864
|
+
for (const i of e.items())
|
|
3865
|
+
if (i.mimeType().startsWith("text/")) {
|
|
3866
|
+
const r = i.value();
|
|
3867
|
+
if (typeof r == "string") return r;
|
|
3868
|
+
}
|
|
3869
|
+
return "";
|
|
3870
|
+
}
|
|
3871
|
+
// Firefox specific function.
|
|
3872
|
+
// This callback is required to update client clipboard state when remote side has changed.
|
|
3873
|
+
ffOnRemoteClipboardChanged(e) {
|
|
3874
|
+
const i = this.ffRetrieveTextData(e);
|
|
3875
|
+
i !== "" && (this.ffClipboardDataToSave = i, this.remoteDesktopService.emitClipboardRemoteUpdateEvent());
|
|
3876
|
+
}
|
|
3877
|
+
// Firefox specific function. We are using text-only clipboard API here.
|
|
3878
|
+
//
|
|
3879
|
+
// Copies clipboard content received from the server to the local clipboard.
|
|
3880
|
+
// Returns the result of the operation. On failure, it additionally raises an error session event.
|
|
3881
|
+
async ffSaveRemoteClipboardData() {
|
|
3882
|
+
this.ffClipboardDataToSave == null && ne("The server did not send the clipboard data.");
|
|
3883
|
+
try {
|
|
3884
|
+
await navigator.clipboard.writeText(this.ffClipboardDataToSave), this.ffClipboardDataToSave = null;
|
|
3885
|
+
} catch (e) {
|
|
3886
|
+
ne("Failed to write to the clipboard: " + e);
|
|
3887
|
+
}
|
|
3888
|
+
}
|
|
3889
|
+
// Firefox specific function. We are using text-only clipboard API here.
|
|
3890
|
+
//
|
|
3891
|
+
// Sends local clipboard's content to the server.
|
|
3892
|
+
// Returns the result of the operation. On failure, it additionally raises an error session event.
|
|
3893
|
+
async ffSendClipboardData() {
|
|
3894
|
+
this.ClipboardApiSupported !== q.TextOnly && ne("The browser does not support clipboard read.");
|
|
3895
|
+
const e = await navigator.clipboard.readText().catch((r) => {
|
|
3896
|
+
ne("Failed to read from the clipboard: " + r);
|
|
3897
|
+
});
|
|
3898
|
+
e.length == 0 && ne("The clipboard has no data.");
|
|
3899
|
+
const i = new this.module.ClipboardData();
|
|
3900
|
+
i.addText("text/plain", e), i.isEmpty() || (this.lastSentClipboardData = i, await this.remoteDesktopService.onClipboardChanged(i));
|
|
3901
|
+
}
|
|
3902
|
+
}
|
|
3903
|
+
var Vn = (t, e) => e(t, true), Kn = (t, e) => e(t, false), qn = (t) => t.preventDefault(), Hn = /* @__PURE__ */ hn('<div class="svelte-1103xra"><div><div class="screen-viewer svelte-1103xra"><canvas id="renderer" tabindex="0" class="svelte-1103xra"></canvas></div></div></div>');
|
|
3904
|
+
const jn = {
|
|
3905
|
+
hash: "svelte-1103xra",
|
|
3906
|
+
code: ".screen-wrapper.svelte-1103xra {position:relative;}.capturing-inputs.svelte-1103xra {outline:1px solid rgba(0, 97, 166, 0.7);outline-offset:-1px;}canvas.svelte-1103xra {width:100%;height:100%;}.svelte-1103xra::selection {background-color:transparent;}.screen-wrapper.hidden.svelte-1103xra {pointer-events:none !important;position:absolute !important;visibility:hidden;height:100%;width:100%;transform:translate(-100%, -100%);}"
|
|
3907
|
+
};
|
|
3908
|
+
function ar(t, e) {
|
|
3909
|
+
Gi(e, true), vn(t, jn);
|
|
3910
|
+
let i = ut(e, "scale"), r = ut(e, "verbose"), n = ut(e, "flexcenter"), o = ut(e, "module"), c = Ft(false), h = () => {
|
|
3911
|
+
var _a2, _b2;
|
|
3912
|
+
return F.info(`
|
|
3913
|
+
capturingInputs: ${document.activeElement === p}
|
|
3914
|
+
current active element: ${document.activeElement}
|
|
3915
|
+
`), ((_b2 = (_a2 = document.activeElement) == null ? void 0 : _a2.shadowRoot) == null ? void 0 : _b2.firstElementChild) === f;
|
|
3916
|
+
}, f, d, p, w = Ft(""), s = Ft(""), a = new Un(o()), l = new Wn(a, o()), u = new Bn(a, l), b = me.Fit;
|
|
3917
|
+
function $(v) {
|
|
3918
|
+
h() && At(v);
|
|
3919
|
+
}
|
|
3920
|
+
function N() {
|
|
3921
|
+
Ie(), Te(), window.addEventListener("keydown", $, false), window.addEventListener("keyup", $, false), window.addEventListener("focus", Ae), window.addEventListener("blur", Ke), document.addEventListener("visibilitychange", ve);
|
|
3922
|
+
}
|
|
3923
|
+
function _() {
|
|
3924
|
+
n() === "true" && (f.style.flexGrow = "", f.style.display = "", f.style.justifyContent = "", f.style.alignItems = "");
|
|
3925
|
+
}
|
|
3926
|
+
function m(v) {
|
|
3927
|
+
n() === "true" && (f.style.flexGrow = "1", f.style.display = "flex", f.style.justifyContent = "center", f.style.alignItems = "center");
|
|
3928
|
+
}
|
|
3929
|
+
function O(v, S, L) {
|
|
3930
|
+
let R = `height: ${v}; width: ${S}`;
|
|
3931
|
+
R = `${R}; max-height: ${v}; max-width: ${S}; min-height: ${v}; min-width: ${S}`, j(w, Se(R));
|
|
3932
|
+
}
|
|
3933
|
+
function A(v, S, L) {
|
|
3934
|
+
j(s, `height: ${v}; width: ${S}; overflow: ${L}`);
|
|
3935
|
+
}
|
|
3936
|
+
const fe = (v) => {
|
|
3937
|
+
be(i());
|
|
3938
|
+
};
|
|
3939
|
+
function Ie() {
|
|
3940
|
+
a.resizeObservable.subscribe((v) => {
|
|
3941
|
+
F.info(`Resize canvas to: ${v.desktopSize.width}x${v.desktopSize.height}`), p.width = v.desktopSize.width, p.height = v.desktopSize.height, be(i());
|
|
3942
|
+
});
|
|
3943
|
+
}
|
|
3944
|
+
function Te() {
|
|
3945
|
+
window.addEventListener("resize", fe), a.scaleObservable.subscribe((v) => {
|
|
3946
|
+
F.info("Change scale!"), be(v);
|
|
3947
|
+
}), a.dynamicResizeObservable.subscribe((v) => {
|
|
3948
|
+
F.info(`Dynamic resize!, width: ${v.width}, height: ${v.height}`), O(v.height.toString() + "px", v.width.toString() + "px");
|
|
3949
|
+
}), a.changeVisibilityObservable.subscribe((v) => {
|
|
3950
|
+
j(c, Se(v)), v && (A("100%", "100%", "hidden"), setTimeout(() => be(i()), 150));
|
|
3951
|
+
});
|
|
3952
|
+
}
|
|
3953
|
+
function he() {
|
|
3954
|
+
be(b);
|
|
3955
|
+
}
|
|
3956
|
+
function be(v) {
|
|
3957
|
+
if (_(), U(c))
|
|
3958
|
+
switch (v) {
|
|
3959
|
+
case "fit":
|
|
3960
|
+
case me.Fit:
|
|
3961
|
+
F.info("Size to fit"), b = me.Fit, i("fit"), Re();
|
|
3962
|
+
break;
|
|
3963
|
+
case "full":
|
|
3964
|
+
case me.Full:
|
|
3965
|
+
F.info("Size to full"), b = me.Full, rt(), i("full");
|
|
3966
|
+
break;
|
|
3967
|
+
case "real":
|
|
3968
|
+
case me.Real:
|
|
3969
|
+
F.info("Size to real"), b = me.Real, $e(), i("real");
|
|
3970
|
+
break;
|
|
3971
|
+
}
|
|
3972
|
+
}
|
|
3973
|
+
function rt() {
|
|
3974
|
+
const v = pe(), S = v.x, L = v.y;
|
|
3975
|
+
let R = p.width, M = p.height;
|
|
3976
|
+
const W = Math.min(S / p.width, L / p.height);
|
|
3977
|
+
R = R * W, M = M * W, A(`${L}px`, `${S}px`, "hidden"), R = R > 0 ? R : 0, M = M > 0 ? M : 0, O(`${M}px`, `${R}px`);
|
|
3978
|
+
}
|
|
3979
|
+
function Re(v = false) {
|
|
3980
|
+
const S = pe(), L = d.getBoundingClientRect(), R = S.x - L.x, M = S.y - L.y;
|
|
3981
|
+
let W = p.width, V = p.height;
|
|
3982
|
+
if (!v || R < p.width || M < p.height) {
|
|
3983
|
+
const te = Math.min(R / p.width, M / p.height);
|
|
3984
|
+
W = W * te, V = V * te;
|
|
3985
|
+
}
|
|
3986
|
+
W = W > 0 ? W : 0, V = V > 0 ? V : 0, A("initial", "initial", "hidden"), O(`${V}px`, `${W}px`), m();
|
|
3987
|
+
}
|
|
3988
|
+
function $e() {
|
|
3989
|
+
const v = pe(), S = d.getBoundingClientRect(), L = v.x - S.x, R = v.y - S.y;
|
|
3990
|
+
L < p.width || R < p.height ? A(`${Math.min(R, p.height)}px`, `${Math.min(L, p.width)}px`, "auto") : A("initial", "initial", "initial"), O(`${p.height}px`, `${p.width}px`), m();
|
|
3991
|
+
}
|
|
3992
|
+
function Ot(v) {
|
|
3993
|
+
const S = p == null ? void 0 : p.getBoundingClientRect(), L = (p == null ? void 0 : p.width) / S.width, R = (p == null ? void 0 : p.height) / S.height, M = {
|
|
3994
|
+
x: Math.round((v.clientX - S.left) * L),
|
|
3995
|
+
y: Math.round((v.clientY - S.top) * R)
|
|
3996
|
+
};
|
|
3997
|
+
a.updateMousePosition(M);
|
|
3998
|
+
}
|
|
3999
|
+
function ke(v, S) {
|
|
4000
|
+
a.mouseButtonState(v, S, true);
|
|
4001
|
+
}
|
|
4002
|
+
function Oe(v) {
|
|
4003
|
+
a.mouseWheel(v);
|
|
4004
|
+
}
|
|
4005
|
+
function nt(v) {
|
|
4006
|
+
p.focus({ preventScroll: true }), a.mouseIn(v);
|
|
4007
|
+
}
|
|
4008
|
+
function st(v) {
|
|
4009
|
+
a.mouseOut(v);
|
|
4010
|
+
}
|
|
4011
|
+
function At(v) {
|
|
4012
|
+
return a.sendKeyboardEvent(v), true;
|
|
4013
|
+
}
|
|
4014
|
+
function pe() {
|
|
4015
|
+
var _a2;
|
|
4016
|
+
const v = (_a2 = f == null ? void 0 : f.getRootNode()) == null ? void 0 : _a2.host;
|
|
4017
|
+
if (v) {
|
|
4018
|
+
const te = v.getBoundingClientRect();
|
|
4019
|
+
if (te.width > 0 && te.height > 0)
|
|
4020
|
+
return { x: te.right, y: te.bottom };
|
|
4021
|
+
}
|
|
4022
|
+
const S = window, L = document, R = L.documentElement, M = L.getElementsByTagName("body")[0], W = S.innerWidth ?? R.clientWidth ?? M.clientWidth, V = S.innerHeight ?? R.clientHeight ?? M.clientHeight;
|
|
4023
|
+
return { x: W, y: V };
|
|
4024
|
+
}
|
|
4025
|
+
async function We() {
|
|
4026
|
+
F.info("Start canvas initialization..."), p.width = 800, p.height = 600, a.setCanvas(p), a.setOnCanvasResized(he), N();
|
|
4027
|
+
}
|
|
4028
|
+
function Ve() {
|
|
4029
|
+
let v = {
|
|
4030
|
+
irgUserInteraction: u.getExposedFunctions()
|
|
4031
|
+
};
|
|
4032
|
+
F.info("Component ready"), F.info("Dispatching ready event"), f.dispatchEvent(new CustomEvent("ready", {
|
|
4033
|
+
detail: v,
|
|
4034
|
+
bubbles: true,
|
|
4035
|
+
composed: true
|
|
4036
|
+
}));
|
|
4037
|
+
}
|
|
4038
|
+
function Ae() {
|
|
4039
|
+
var _a2;
|
|
4040
|
+
try {
|
|
4041
|
+
for (; Gt.length() > 0; )
|
|
4042
|
+
(_a2 = Gt.shift()) == null ? void 0 : _a2();
|
|
4043
|
+
} catch (v) {
|
|
4044
|
+
console.error("Failed to run the function queued for execution when the window received focus: " + v);
|
|
4045
|
+
}
|
|
4046
|
+
}
|
|
4047
|
+
function Ke() {
|
|
4048
|
+
a.focusLost();
|
|
4049
|
+
}
|
|
4050
|
+
function ve() {
|
|
4051
|
+
document.visibilityState === "hidden" && a.focusLost();
|
|
4052
|
+
}
|
|
4053
|
+
tr(async () => {
|
|
4054
|
+
jt.set(false), F.verbose = r() === "true", F.info("Dom ready"), await We();
|
|
4055
|
+
try {
|
|
4056
|
+
await l.initClipboard();
|
|
4057
|
+
} catch (v) {
|
|
4058
|
+
F.error("Clipboard initialization failed: " + v);
|
|
4059
|
+
}
|
|
4060
|
+
Ve();
|
|
4061
|
+
}), _n(() => {
|
|
4062
|
+
window.removeEventListener("resize", fe), window.removeEventListener("keydown", $, false), window.removeEventListener("keyup", $, false), window.removeEventListener("focus", Ae), window.removeEventListener("blur", Ke), document.removeEventListener("visibilitychange", ve), jt.set(true);
|
|
4063
|
+
});
|
|
4064
|
+
var we = Hn(), X = Pt(we);
|
|
4065
|
+
let qe;
|
|
4066
|
+
var ae = Pt(X), I = Pt(ae);
|
|
4067
|
+
return I.__mousemove = Ot, I.__mousedown = [Vn, ke], I.__mouseup = [Kn, ke], I.__contextmenu = [qn], Ut(I, (v) => p = v, () => p), Nt(ae), Nt(X), Ut(X, (v) => d = v, () => d), Nt(we), Ut(we, (v) => f = v, () => f), en(() => {
|
|
4068
|
+
qe = mn(X, 1, `screen-wrapper scale-${i() ?? ""}`, "svelte-1103xra", qe, {
|
|
4069
|
+
hidden: !U(c),
|
|
4070
|
+
"capturing-inputs": h
|
|
4071
|
+
}), fi(X, "style", U(s)), fi(ae, "style", U(w));
|
|
4072
|
+
}), lt("mouseleave", I, (v) => {
|
|
4073
|
+
st(v);
|
|
4074
|
+
}), lt("mouseenter", I, (v) => {
|
|
4075
|
+
nt(v);
|
|
4076
|
+
}), lt("wheel", I, Oe), lt("selectstart", I, (v) => {
|
|
4077
|
+
v.preventDefault();
|
|
4078
|
+
}), Qi(t, we), Yi({
|
|
4079
|
+
get scale() {
|
|
4080
|
+
return i();
|
|
4081
|
+
},
|
|
4082
|
+
set scale(v) {
|
|
4083
|
+
i(v), Ye();
|
|
4084
|
+
},
|
|
4085
|
+
get verbose() {
|
|
4086
|
+
return r();
|
|
4087
|
+
},
|
|
4088
|
+
set verbose(v) {
|
|
4089
|
+
r(v), Ye();
|
|
4090
|
+
},
|
|
4091
|
+
get flexcenter() {
|
|
4092
|
+
return n();
|
|
4093
|
+
},
|
|
4094
|
+
set flexcenter(v) {
|
|
4095
|
+
n(v), Ye();
|
|
4096
|
+
},
|
|
4097
|
+
get module() {
|
|
4098
|
+
return o();
|
|
4099
|
+
},
|
|
4100
|
+
set module(v) {
|
|
4101
|
+
o(v), Ye();
|
|
4102
|
+
}
|
|
4103
|
+
});
|
|
4104
|
+
}
|
|
4105
|
+
dn([
|
|
4106
|
+
"mousemove",
|
|
4107
|
+
"mousedown",
|
|
4108
|
+
"mouseup",
|
|
4109
|
+
"contextmenu"
|
|
4110
|
+
]);
|
|
4111
|
+
customElements.define("iron-remote-desktop", kn(
|
|
4112
|
+
ar,
|
|
4113
|
+
{
|
|
4114
|
+
scale: {},
|
|
4115
|
+
verbose: {},
|
|
4116
|
+
flexcenter: {},
|
|
4117
|
+
module: {}
|
|
4118
|
+
},
|
|
4119
|
+
[],
|
|
4120
|
+
[],
|
|
4121
|
+
false,
|
|
4122
|
+
(t) => class extends t {
|
|
4123
|
+
constructor() {
|
|
4124
|
+
super(), this.attachShadow({ mode: "open", delegatesFocus: true });
|
|
4125
|
+
}
|
|
4126
|
+
}
|
|
4127
|
+
));
|
|
4128
|
+
const Gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4129
|
+
__proto__: null,
|
|
4130
|
+
default: ar
|
|
4131
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4132
|
+
export {
|
|
4133
|
+
Nn as Config,
|
|
4134
|
+
Pn as ConfigBuilder,
|
|
4135
|
+
Gn as default
|
|
4136
|
+
};
|