native-fn 1.0.46 → 1.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/native.cjs +173 -92
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +173 -92
- package/dist/native.umd.js +173 -92
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +192 -90
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +192 -90
- package/dist/plugin/app/index.umd.js +192 -90
- package/dist/plugin/app/index.umd.min.js +1 -1
- package/dist/plugin/app/src/types/platform.d.ts +3 -1
- package/dist/plugin/app/src/utils/require.d.ts +1 -1
- package/dist/plugin/camera/index.cjs +171 -90
- package/dist/plugin/camera/index.min.cjs +1 -1
- package/dist/plugin/camera/index.min.mjs +1 -1
- package/dist/plugin/camera/index.mjs +171 -90
- package/dist/plugin/camera/index.umd.js +171 -90
- package/dist/plugin/camera/index.umd.min.js +1 -1
- package/dist/plugin/camera/src/types/platform.d.ts +3 -1
- package/dist/plugin/camera/src/utils/require.d.ts +1 -1
- package/dist/plugin/clipboard/src/types/platform.d.ts +3 -1
- package/dist/plugin/clipboard/src/utils/require.d.ts +1 -1
- package/dist/plugin/fullscreen/index.cjs +171 -90
- package/dist/plugin/fullscreen/index.min.cjs +1 -1
- package/dist/plugin/fullscreen/index.min.mjs +1 -1
- package/dist/plugin/fullscreen/index.mjs +171 -90
- package/dist/plugin/fullscreen/index.umd.js +171 -90
- package/dist/plugin/fullscreen/index.umd.min.js +1 -1
- package/dist/plugin/fullscreen/src/types/platform.d.ts +3 -1
- package/dist/plugin/fullscreen/src/utils/require.d.ts +1 -1
- package/dist/plugin/theme/index.cjs +171 -90
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +171 -90
- package/dist/plugin/theme/index.umd.js +171 -90
- package/dist/plugin/theme/index.umd.min.js +1 -1
- package/dist/plugin/theme/src/types/platform.d.ts +3 -1
- package/dist/plugin/theme/src/utils/require.d.ts +1 -1
- package/dist/src/types/platform.d.ts +3 -1
- package/dist/src/utils/require.d.ts +1 -1
- package/package.json +1 -1
|
@@ -4,18 +4,6 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Theme = factory());
|
|
5
5
|
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
|
-
function require(moduleName) {
|
|
8
|
-
if ('require' in globalThis && typeof globalThis.require === 'function') {
|
|
9
|
-
try {
|
|
10
|
-
return Promise.resolve(globalThis.require(moduleName));
|
|
11
|
-
}
|
|
12
|
-
catch (_) {
|
|
13
|
-
return Promise.resolve(null);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return Promise.resolve(null);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
7
|
var OS;
|
|
20
8
|
(function (OS) {
|
|
21
9
|
OS["Unknown"] = "Unknown";
|
|
@@ -55,6 +43,7 @@
|
|
|
55
43
|
Browsers["IE"] = "IE";
|
|
56
44
|
Browsers["SamsungInternet"] = "SamsungInternet";
|
|
57
45
|
})(Browsers || (Browsers = {}));
|
|
46
|
+
var userAgent = typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' ? navigator.userAgent : '';
|
|
58
47
|
var Platform = {
|
|
59
48
|
device: Devices.Unknown,
|
|
60
49
|
os: OS.Unknown,
|
|
@@ -64,12 +53,14 @@
|
|
|
64
53
|
browser: Browsers.Unknown,
|
|
65
54
|
browserVersion: '',
|
|
66
55
|
renderer: getRenderer(),
|
|
67
|
-
userAgent:
|
|
68
|
-
isWebview: false,
|
|
56
|
+
userAgent: userAgent,
|
|
69
57
|
isMobile: false,
|
|
70
58
|
isDesktop: false,
|
|
71
59
|
isStandalone: false,
|
|
72
|
-
|
|
60
|
+
isWebview: /; ?wv|applewebkit(?!.*safari)/i.test(userAgent),
|
|
61
|
+
isNodeJS: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined,
|
|
62
|
+
isElectron: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined,
|
|
63
|
+
isReactNative: typeof navigator !== 'undefined' && navigator.product === 'ReactNative'
|
|
73
64
|
};
|
|
74
65
|
var OS_RESOLVER_MAP = [
|
|
75
66
|
[/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
|
|
@@ -156,6 +147,137 @@
|
|
|
156
147
|
return '';
|
|
157
148
|
return string.replace(/_/g, '.');
|
|
158
149
|
}
|
|
150
|
+
function resolveSemanticWindowsVersion(version, defaultValue) {
|
|
151
|
+
if (version.major === 10 && version.minor === 0 && version.build >= 22000)
|
|
152
|
+
return '11';
|
|
153
|
+
if (version.major === 10 && version.minor === 0 && version.build < 22000)
|
|
154
|
+
return '10';
|
|
155
|
+
if (version.major === 6 && version.minor === 3)
|
|
156
|
+
return '8.1';
|
|
157
|
+
if (version.major === 6 && version.minor === 2)
|
|
158
|
+
return '8';
|
|
159
|
+
if (version.major === 6 && version.minor === 1)
|
|
160
|
+
return '7';
|
|
161
|
+
if (version.major === 6 && version.minor === 0)
|
|
162
|
+
return 'Vista';
|
|
163
|
+
if (version.major === 5 && version.minor === 1)
|
|
164
|
+
return 'XP';
|
|
165
|
+
if (version.major === 5 && version.minor === 2)
|
|
166
|
+
return 'XP';
|
|
167
|
+
if (version.major === 5 && version.minor === 0)
|
|
168
|
+
return '2000';
|
|
169
|
+
if (version.major === 4 && version.minor === 90)
|
|
170
|
+
return 'ME';
|
|
171
|
+
if (version.major === 4 && version.minor === 0)
|
|
172
|
+
return 'NT 4.0';
|
|
173
|
+
if (version.major === 3 && version.minor === 51)
|
|
174
|
+
return 'NT 3.11';
|
|
175
|
+
return defaultValue;
|
|
176
|
+
}
|
|
177
|
+
function resolveSemanticDarwinVersion(version, defaultValue) {
|
|
178
|
+
if (version.major >= 24)
|
|
179
|
+
return '' + (version.major - 9) + '.' + version.minor + '.' + version.build;
|
|
180
|
+
if (version.major === 23)
|
|
181
|
+
return '14.' + version.minor + '.' + version.build;
|
|
182
|
+
if (version.major === 22)
|
|
183
|
+
return '13.' + version.minor + '.' + version.build;
|
|
184
|
+
if (version.major === 21)
|
|
185
|
+
return '12.' + version.minor + '.' + version.build;
|
|
186
|
+
if (version.major === 20)
|
|
187
|
+
return '11.' + version.minor + '.' + version.build;
|
|
188
|
+
if (version.major === 19)
|
|
189
|
+
return '10.15.' + version.minor;
|
|
190
|
+
if (version.major === 18)
|
|
191
|
+
return '10.14.' + version.minor;
|
|
192
|
+
if (version.major === 17)
|
|
193
|
+
return '10.13.' + version.minor;
|
|
194
|
+
if (version.major === 16)
|
|
195
|
+
return '10.12.' + version.minor;
|
|
196
|
+
if (version.major === 15)
|
|
197
|
+
return '10.11.' + version.minor;
|
|
198
|
+
if (version.major === 14)
|
|
199
|
+
return '10.10.' + version.minor;
|
|
200
|
+
if (version.major === 13)
|
|
201
|
+
return '10.9.' + version.minor;
|
|
202
|
+
if (version.major >= 5 && version.major <= 12)
|
|
203
|
+
return '10.' + (version.major - 4) + '.' + version.minor;
|
|
204
|
+
return defaultValue;
|
|
205
|
+
}
|
|
206
|
+
function resolveSemanticAndroidVersion(version, defaultValue) {
|
|
207
|
+
if (version.major >= 36)
|
|
208
|
+
return '16';
|
|
209
|
+
if (version.major === 35)
|
|
210
|
+
return '15';
|
|
211
|
+
if (version.major === 34)
|
|
212
|
+
return '14';
|
|
213
|
+
if (version.major === 33)
|
|
214
|
+
return '13';
|
|
215
|
+
if (version.major === 32)
|
|
216
|
+
return '12.1';
|
|
217
|
+
if (version.major === 31)
|
|
218
|
+
return '12';
|
|
219
|
+
if (version.major === 30)
|
|
220
|
+
return '11';
|
|
221
|
+
if (version.major === 29)
|
|
222
|
+
return '10';
|
|
223
|
+
if (version.major === 28)
|
|
224
|
+
return '9';
|
|
225
|
+
if (version.major === 27)
|
|
226
|
+
return '8.1';
|
|
227
|
+
if (version.major === 26)
|
|
228
|
+
return '8.0';
|
|
229
|
+
if (version.major === 25)
|
|
230
|
+
return '7.1';
|
|
231
|
+
if (version.major === 24)
|
|
232
|
+
return '7.0';
|
|
233
|
+
if (version.major === 23)
|
|
234
|
+
return '6.0';
|
|
235
|
+
if (version.major === 22)
|
|
236
|
+
return '5.1';
|
|
237
|
+
if (version.major === 21)
|
|
238
|
+
return '5.0';
|
|
239
|
+
if (version.major === 20)
|
|
240
|
+
return '4.4W';
|
|
241
|
+
if (version.major === 19)
|
|
242
|
+
return '4.4';
|
|
243
|
+
if (version.major === 18)
|
|
244
|
+
return '4.3';
|
|
245
|
+
if (version.major === 17)
|
|
246
|
+
return '4.2';
|
|
247
|
+
if (version.major === 16)
|
|
248
|
+
return '4.1';
|
|
249
|
+
if (version.major === 15)
|
|
250
|
+
return '4.0.3';
|
|
251
|
+
if (version.major === 14)
|
|
252
|
+
return '4.0';
|
|
253
|
+
if (version.major === 13)
|
|
254
|
+
return '3.2';
|
|
255
|
+
if (version.major === 12)
|
|
256
|
+
return '3.1';
|
|
257
|
+
if (version.major === 11)
|
|
258
|
+
return '3.0';
|
|
259
|
+
if (version.major === 10)
|
|
260
|
+
return '2.3.3';
|
|
261
|
+
if (version.major === 9)
|
|
262
|
+
return '2.3';
|
|
263
|
+
if (version.major === 8)
|
|
264
|
+
return '2.2';
|
|
265
|
+
if (version.major === 7)
|
|
266
|
+
return '2.1';
|
|
267
|
+
if (version.major === 6)
|
|
268
|
+
return '2.0.1';
|
|
269
|
+
if (version.major === 5)
|
|
270
|
+
return '2.0';
|
|
271
|
+
if (version.major === 4)
|
|
272
|
+
return '1.6';
|
|
273
|
+
if (version.major === 3)
|
|
274
|
+
return '1.5';
|
|
275
|
+
if (version.major === 2)
|
|
276
|
+
return '1.1';
|
|
277
|
+
if (version.major === 1)
|
|
278
|
+
return '1.0';
|
|
279
|
+
return defaultValue;
|
|
280
|
+
}
|
|
159
281
|
function resolveVersion(string, resolver) {
|
|
160
282
|
if (typeof resolver === 'function')
|
|
161
283
|
return resolver(string);
|
|
@@ -172,11 +294,6 @@
|
|
|
172
294
|
return { brand: entry, version: '' };
|
|
173
295
|
return { brand: entry.brand, version: entry.version };
|
|
174
296
|
}
|
|
175
|
-
function getUserAgent() {
|
|
176
|
-
if (typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string')
|
|
177
|
-
return navigator.userAgent;
|
|
178
|
-
return '';
|
|
179
|
-
}
|
|
180
297
|
function getRenderer() {
|
|
181
298
|
if (typeof globalThis.document === 'undefined')
|
|
182
299
|
return '';
|
|
@@ -207,10 +324,7 @@
|
|
|
207
324
|
function getIsWebview() {
|
|
208
325
|
return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
|
|
209
326
|
}
|
|
210
|
-
function
|
|
211
|
-
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined;
|
|
212
|
-
}
|
|
213
|
-
function getNodeOSVersion(string) {
|
|
327
|
+
function getSemanticVersion(string) {
|
|
214
328
|
var parts = string.split('.');
|
|
215
329
|
return {
|
|
216
330
|
major: parseInt(parts[0] || '0'),
|
|
@@ -258,84 +372,49 @@
|
|
|
258
372
|
break;
|
|
259
373
|
}
|
|
260
374
|
}
|
|
261
|
-
if (
|
|
375
|
+
if (Platform.isReactNative) {
|
|
262
376
|
try {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
377
|
+
var reactNative = require('react-native');
|
|
378
|
+
var platform = reactNative.Platform;
|
|
379
|
+
var os = platform.OS;
|
|
380
|
+
var release = platform.Version;
|
|
381
|
+
var version = getSemanticVersion(release);
|
|
382
|
+
switch (os) {
|
|
383
|
+
case 'android':
|
|
384
|
+
Platform.os = OS.Android;
|
|
385
|
+
Platform.osVersion = resolveSemanticAndroidVersion(version, release);
|
|
386
|
+
break;
|
|
387
|
+
case 'ios':
|
|
388
|
+
Platform.os = OS.iOS;
|
|
389
|
+
Platform.osVersion = release;
|
|
390
|
+
break;
|
|
391
|
+
case 'windows':
|
|
392
|
+
Platform.os = OS.Windows;
|
|
393
|
+
Platform.osVersion = resolveSemanticWindowsVersion(version, release);
|
|
394
|
+
break;
|
|
395
|
+
case 'macos':
|
|
396
|
+
Platform.os = OS.MacOS;
|
|
397
|
+
Platform.osVersion = release;
|
|
398
|
+
break;
|
|
399
|
+
}
|
|
267
400
|
}
|
|
268
401
|
catch (_) {
|
|
269
402
|
}
|
|
270
403
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
if (os === null)
|
|
275
|
-
return;
|
|
404
|
+
if (Platform.isNodeJS) {
|
|
405
|
+
try {
|
|
406
|
+
var os = require('os');
|
|
276
407
|
var platform = os.platform();
|
|
277
408
|
var release = os.release();
|
|
278
|
-
var version =
|
|
409
|
+
var version = getSemanticVersion(release);
|
|
279
410
|
switch (platform) {
|
|
280
411
|
case 'win32':
|
|
281
412
|
Platform.os = OS.Windows;
|
|
282
|
-
|
|
283
|
-
Platform.osVersion = '11';
|
|
284
|
-
else if (version.major === 10 && version.minor === 0 && version.build < 22000)
|
|
285
|
-
Platform.osVersion = '10';
|
|
286
|
-
else if (version.major === 6 && version.minor === 3)
|
|
287
|
-
Platform.osVersion = '8.1';
|
|
288
|
-
else if (version.major === 6 && version.minor === 2)
|
|
289
|
-
Platform.osVersion = '8';
|
|
290
|
-
else if (version.major === 6 && version.minor === 1)
|
|
291
|
-
Platform.osVersion = '7';
|
|
292
|
-
else if (version.major === 6 && version.minor === 0)
|
|
293
|
-
Platform.osVersion = 'Vista';
|
|
294
|
-
else if (version.major === 5 && version.minor === 1)
|
|
295
|
-
Platform.osVersion = 'XP';
|
|
296
|
-
else if (version.major === 5 && version.minor === 2)
|
|
297
|
-
Platform.osVersion = 'XP';
|
|
298
|
-
else if (version.major === 5 && version.minor === 0)
|
|
299
|
-
Platform.osVersion = '2000';
|
|
300
|
-
else if (version.major === 4 && version.minor === 90)
|
|
301
|
-
Platform.osVersion = 'ME';
|
|
302
|
-
else if (version.major === 4 && version.minor === 0)
|
|
303
|
-
Platform.osVersion = 'NT 4.0';
|
|
304
|
-
else if (version.major === 3 && version.minor === 51)
|
|
305
|
-
Platform.osVersion = 'NT 3.11';
|
|
306
|
-
else
|
|
307
|
-
Platform.osVersion = release;
|
|
413
|
+
Platform.osVersion = resolveSemanticWindowsVersion(version, release);
|
|
308
414
|
break;
|
|
309
415
|
case 'darwin':
|
|
310
416
|
Platform.os = OS.MacOS;
|
|
311
|
-
|
|
312
|
-
Platform.osVersion = '' + (version.major - 9) + '.' + version.minor + '.' + version.build;
|
|
313
|
-
else if (version.major === 23)
|
|
314
|
-
Platform.osVersion = '14.' + version.minor + '.' + version.build;
|
|
315
|
-
else if (version.major === 22)
|
|
316
|
-
Platform.osVersion = '13.' + version.minor + '.' + version.build;
|
|
317
|
-
else if (version.major === 21)
|
|
318
|
-
Platform.osVersion = '12.' + version.minor + '.' + version.build;
|
|
319
|
-
else if (version.major === 20)
|
|
320
|
-
Platform.osVersion = '11.' + version.minor + '.' + version.build;
|
|
321
|
-
else if (version.major === 19)
|
|
322
|
-
Platform.osVersion = '10.15.' + version.minor;
|
|
323
|
-
else if (version.major === 18)
|
|
324
|
-
Platform.osVersion = '10.14.' + version.minor;
|
|
325
|
-
else if (version.major === 17)
|
|
326
|
-
Platform.osVersion = '10.13.' + version.minor;
|
|
327
|
-
else if (version.major === 16)
|
|
328
|
-
Platform.osVersion = '10.12.' + version.minor;
|
|
329
|
-
else if (version.major === 15)
|
|
330
|
-
Platform.osVersion = '10.11.' + version.minor;
|
|
331
|
-
else if (version.major === 14)
|
|
332
|
-
Platform.osVersion = '10.10.' + version.minor;
|
|
333
|
-
else if (version.major === 13)
|
|
334
|
-
Platform.osVersion = '10.9.' + version.minor;
|
|
335
|
-
else if (version.major >= 5 && version.major <= 12)
|
|
336
|
-
Platform.osVersion = '10.' + (version.major - 4) + '.' + version.minor;
|
|
337
|
-
else
|
|
338
|
-
Platform.osVersion = release;
|
|
417
|
+
Platform.osVersion = resolveSemanticDarwinVersion(version, release);
|
|
339
418
|
break;
|
|
340
419
|
case 'android':
|
|
341
420
|
Platform.os = OS.Android;
|
|
@@ -348,7 +427,9 @@
|
|
|
348
427
|
}
|
|
349
428
|
break;
|
|
350
429
|
}
|
|
351
|
-
}
|
|
430
|
+
}
|
|
431
|
+
catch (_) {
|
|
432
|
+
}
|
|
352
433
|
}
|
|
353
434
|
if (navigator.userAgentData !== undefined && navigator.userAgentData.getHighEntropyValues !== undefined) {
|
|
354
435
|
navigator
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(e="undefined"!=typeof globalThis?globalThis:e||self).Theme=r()}(this,(function(){"use strict";var e,r,n,t;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(r||(r={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(n||(n={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(t||(t={}));var o,i={device:r.Unknown,os:e.Unknown,osVersion:"",engine:n.Unknown,engineVersion:"",browser:t.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var n=r.getExtension("WEBGL_debug_renderer_info");return null===n?r.getParameter(r.RENDERER):r.getParameter(n.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,d],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,d],[/cfnetwork\/.+darwin/i,e.iOS,d],[/mac os x ?([\w. ]*)/i,e.MacOS,d],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,d],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,n.EdgeHTML],[/arkweb\/([\w.]+)/i,n.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,n.Blink],[/presto\/([\w.]+)/i,n.Presto],[/webkit\/([\w.]+)/i,n.WebKit],[/trident\/([\w.]+)/i,n.Trident],[/netfront\/([\w.]+)/i,n.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,n.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,n.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,n.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,t.Chrome],[/webview.+edge\/([\w.]+)/i,t.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,t.Edge],[/opera mini\/([-\w.]+)/i,t.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,t.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,t.Opera],[/opios[\/ ]+([\w.]+)/i,t.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,t.Opera],[/\bopr\/([\w.]+)/i,t.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,t.IE],[/(?:ms|\()ie ([\w.]+)/i,t.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,t.IE],[/\bfocus\/([\w.]+)/i,t.Firefox],[/\bopt\/([\w.]+)/i,t.Opera],[/coast\/([\w.]+)/i,t.Opera],[/fxios\/([\w.-]+)/i,t.Firefox],[/samsungbrowser\/([\w.]+)/i,t.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,t.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,t.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,t.Chrome],[/chrome\/([\w.]+) mobile/i,t.Chrome],[/chrome\/v?([\w.]+)/i,t.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,t.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,t.Safari],[/version\/([\w.,]+) .*safari/i,t.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,t.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,t.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,t.Firefox],[/firefox\/([\w.]+)/i,t.Firefox]];function u(e){if(void 0===e)return"";var r={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==r?r:e}function d(e){return void 0===e?"":e.replace(/_/g,".")}function c(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}for(var f=0;f<a.length;f++){var m=(b=a[f])[0],p=b[1],h=b[2];if(null!==(g=i.userAgent.match(m))){i.os=p,i.osVersion=c(g[1],h),p===e.iOS||p===e.Android?i.device=r.Mobile:p!==e.Windows&&p!==e.MacOS||(i.device=r.Desktop);break}}for(f=0;f<s.length;f++){m=(b=s[f])[0];var v=b[1];h=b[2];if(null!==(g=i.userAgent.match(m))){i.engine=v,i.engineVersion=c(g[1],h);break}}for(f=0;f<l.length;f++){m=(b=l[f])[0];var b,g,w=b[1];h=b[2];if(null!==(g=i.userAgent.match(m))){i.browser=w,i.browserVersion=c(g[1],h);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{import("react-native").then((function(e){console.log(e.Platform)}))}catch(e){}else i.isNodeJS&&function(e){if("require"in globalThis&&"function"==typeof globalThis.require)try{return Promise.resolve(globalThis.require(e))}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}("os").then((function(r){if(null!==r){var n,t=r.platform(),o=r.release(),a=(n=o.split("."),{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")});switch(t){case"win32":i.os=e.Windows,i.osVersion=10===a.major&&0===a.minor&&a.build>=22e3?"11":10===a.major&&0===a.minor&&a.build<22e3?"10":6===a.major&&3===a.minor?"8.1":6===a.major&&2===a.minor?"8":6===a.major&&1===a.minor?"7":6===a.major&&0===a.minor?"Vista":5===a.major&&1===a.minor||5===a.major&&2===a.minor?"XP":5===a.major&&0===a.minor?"2000":4===a.major&&90===a.minor?"ME":4===a.major&&0===a.minor?"NT 4.0":3===a.major&&51===a.minor?"NT 3.11":o;break;case"darwin":i.os=e.MacOS,i.osVersion=a.major>=24?a.major-9+"."+a.minor+"."+a.build:23===a.major?"14."+a.minor+"."+a.build:22===a.major?"13."+a.minor+"."+a.build:21===a.major?"12."+a.minor+"."+a.build:20===a.major?"11."+a.minor+"."+a.build:19===a.major?"10.15."+a.minor:18===a.major?"10.14."+a.minor:17===a.major?"10.13."+a.minor:16===a.major?"10.12."+a.minor:15===a.major?"10.11."+a.minor:14===a.major?"10.10."+a.minor:13===a.major?"10.9."+a.minor:a.major>=5&&a.major<=12?"10."+(a.major-4)+"."+a.minor:o;break;case"android":i.os=e.Android,i.osVersion=o;break;case"linux":/android/i.test(o)&&(i.os=e.Android,i.osVersion=o)}}}));void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(r){for(var n,t=r.fullVersionList||r.brands||[],o=r.platformVersion,a=0;a<t.length;a++){var s=null==(n=t[a])?{brand:"",version:""}:"string"==typeof n?{brand:n,version:""}:{brand:n.brand,version:n.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(i.engineVersion=u)}"string"==typeof o&&(i.os===e.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?i.osVersion="11":i.osVersion=o)})),i.isMobile=i.device===r.Mobile,i.isDesktop=i.device===r.Desktop,i.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(i.userAgent),i.isStandalone=function(r){return"matchMedia"in globalThis&&(r===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(i.os),function(e){e.Unknown="unknown",e.Light="light",e.Dark="dark"}(o||(o={}));var y=globalThis.matchMedia("(prefers-color-scheme: dark)"),T="not all"!==y.media,S=i.browser!==t.Chrome||i.isMobile&&function(e,r){for(var n=e.split("."),t=r.split("."),o=Math.max(n.length,t.length),i=0;i<o;i++){var a=void 0,s=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(s=i<t.length?parseInt(t[i],10):0))return 1;if(a<s)return-1}return 0}(i.browserVersion,"92")>=0,k=globalThis.document.createElement("canvas").getContext("2d",{willReadFrequently:!0}),x=/iemobile/i.test(i.userAgent),E=/windows phone/i.test(i.userAgent),j=[];function M(e){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&e[r],t=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function A(e,r){function n(t){if(!(this instanceof n))return new n(t);var o=new r(t||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(o,n.prototype):o.__proto__=n.prototype,o.name=e,void 0!==t&&(o.message=t),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(o,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(o,n);else if(r.captureStackTrace&&"function"==typeof r.captureStackTrace)r.captureStackTrace(o,n);else try{var i=new r;i.stack&&(o.stack=i.stack)}catch(e){}return o}void 0===r&&(r=Error),n.prototype=Object.create(r.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(n.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0})}catch(r){try{n.prototype.name=e}catch(e){}}try{Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return n}"function"==typeof SuppressedError&&SuppressedError;var I=A("EasingError"),C=A("CubicBezierSyntaxError",I),N=A("LinearSyntaxError",I),F=A("StepSyntaxError",I),L=A("UnsupportedEasingFunctionError",I),O={linear:"linear(0, 1)",ease:"cubic-bezier(0.25, 0.1, 0.25, 1)","ease-in":"cubic-bezier(0.42, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.58, 1)","ease-in-out":"cubic-bezier(0.42, 0, 0.58, 1)","step-start":"steps(1, jump-start)","step-end":"steps(1, jump-end)"};function P(e,r,n){return e<r?r:e>n?n:e}function W(e){var r=function(e){var r=e.match(/cubic-bezier\((.*)\)/);if(null===r)throw new C("Invalid cubic-bezier syntax");var n=r[1].trim().split(","),t=[];if(4!==n.length)throw new C("Cubic-bezier must have exactly 4 numeric values");for(var o=0;o<4;o++){var i=parseFloat(n[o]);if(isNaN(i))throw new C("Cubic-bezier must have exactly 4 numeric values");if(o%2==0&&(i<0||i>1))throw new C("x1 and x2 must be between 0 and 1");t.push(i)}return{x1:t[0],y1:t[1],x2:t[2],y2:t[3]}}(e),n=r.x1,t=r.x2,o=r.y1,i=r.y2;return function(e){if(0===(e=P(e,0,1))||1===e)return e;var r=function(e,r,o){if(void 0===r&&(r=1e-6),void 0===o&&(o=50),e<=0)return 0;if(e>=1)return 1;for(var i=e,a=0;a<o;a++){var s=3*(1-i)*(1-i)*i*n+3*(1-i)*i*i*t+i*i*i,l=3*(1-i)*(1-i)*n+6*(1-i)*i*(t-n)+3*i*i*(1-t);if(Math.abs(l)<r)break;var u=i-(s-e)/l;if(Math.abs(u-i)<r){i=u;break}i=Math.max(0,Math.min(1,u))}return i}(e);return 3*(1-r)*(1-r)*r*o+3*(1-r)*r*r*i+r*r*r}}function D(e){var r=function(e){var r,n,t=e.match(/linear\((.*)\)/);if(null===t)throw new N("Invalid linear syntax");var o=t[1].trim();if(""===o)throw new N("Linear function must have at least one point");for(var i=o.split(","),a=[],s=0;s<i.length;s++){var l=i[s].trim(),u=l.match(/^([+-]?\d*\.?\d+)((?:\s+[+-]?\d*\.?\d+%){2,})$/);if(null===u){var d=l.match(/^([+-]?\d*\.?\d+)\s+([+-]?\d*\.?\d+)%$/);if(null===d){var c=l.match(/^([+-]?\d*\.?\d+)$/);if(null===c)throw new N('Invalid linear point format: "'+l+'"');a.push({position:1===i.length?0:s/(i.length-1),value:parseFloat(c[1])})}else a.push({position:parseFloat(d[2])/100,value:parseFloat(d[1])})}else{var f=parseFloat(u[1]),m=u[2].trim().split(/\s+/);try{for(var p=(r=void 0,M(m)),h=p.next();!h.done;h=p.next()){var v=h.value;a.push({value:f,position:parseFloat(v)/100})}}catch(e){r={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}}}if(0===a.length)throw new N("No valid points found in linear function");return a.sort((function(e,r){return e.position-r.position})),a[0].position>0&&a.unshift({position:0,value:0}),a[a.length-1].position<1&&a.push({position:1,value:1}),a}(e);return function(e){if((e=P(e,0,1))<=r[0].position)return r[0].value;if(e>=r[r.length-1].position)return r[r.length-1].value;for(var n=0;n<r.length-1;n++){var t=r[n],o=r[n+1];if(e>=t.position&&e<=o.position){if(t.position===o.position)return o.value;var i=(e-t.position)/(o.position-t.position);return t.value+(o.value-t.value)*i}}return r[r.length-1].value}}function U(e){if(function(e){return!/(linear|cubic-bezier|steps)\((.*)\)/.test(e)}(e)&&(e=O[e]),function(e){return/cubic-bezier\(/.test(e)}(e))return W(e);if(function(e){return/linear\(/.test(e)}(e))return D(e);if(function(e){return/steps\(\s*(\d+)\s*(?:,\s*(jump-start|jump-end|jump-none|jump-both|start|end)\s*)?\)$/.test(e)}(e))return function(e){var r=e.match(/steps\(\s*(\d+)\s*(?:,\s*(jump-start|jump-end|jump-none|jump-both|start|end)\s*)?\)$/);if(null===r)throw new F("Invalid steps syntax");var n=parseInt(r[1],10),t=r[2];if(n<=0)throw new F("Steps count must be a positive integer");if("jump-none"===t&&n<2)throw new F("jump-none requires at least 2 steps");return function(e){switch(e=P(e,0,1),t){case"start":case"jump-start":return 0===e?1/n:1===e?1:Math.ceil(e*n)/n;case void 0:case"end":case"jump-end":return 1===e?1:Math.floor(e*n)/n;case"jump-both":return 0===e?0:1===e?1:Math.round(e*(n+1))/(n+1);case"jump-none":return 0===e?0:1===e?1:Math.floor(e*(n-1))/(n-1);default:throw new F('Unsupported step position: "'+t+'"')}}}(e);throw new L('Unsupported easing function: "'+e+'"')}var V=A("UnsupportedColorError");function R(e){if("undefined"!=typeof CSS&&CSS.supports&&!CSS.supports("color",e))throw new V('Unsupported color: "'+e+'".');if(null!==k)try{k.clearRect(0,0,1,1),k.fillStyle=e,k.fillRect(0,0,1,1);var r=k.getImageData(0,0,1,1).data;return{red:r[0],green:r[1],blue:r[2],alpha:parseFloat((r[3]/255).toFixed(2))}}catch(e){}var n=function(e,r){if(void 0===r&&(r=!0),void 0!==globalThis.document){var n=globalThis.document.createElement(e);return"width"in n&&(n.width="0"),"height"in n&&(n.height="0"),"border"in n&&(n.border="0"),"frameBorder"in n&&(n.frameBorder="0"),"scrolling"in n&&(n.scrolling="no"),"cellPadding"in n&&(n.cellPadding="0"),"cellSpacing"in n&&(n.cellSpacing="0"),"frame"in n&&(n.frame="void"),"rules"in n&&(n.rules="none"),"noWrap"in n&&(n.noWrap=!0),n.tabIndex=-1,n.setAttribute("role","presentation"),r?(n.style.width="1px",n.style.height="1px"):(n.setAttribute("aria-hidden","true"),n.style.width="0",n.style.height="0",n.style.zIndex="-9999",n.style.display="none",n.style.visibility="hidden",n.style.pointerEvents="none"),n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.padding="0",n.style.margin="0",n.style.border="none",n.style.outline="none",n.style.clip="rect(1px, 1px, 1px, 1px)",n.style.clipPath="inset(50%)",n.style.overflow="hidden",n.style.whiteSpace="nowrap",n}}("div");if(void 0===n)throw new V('Failed to parse color values from: "'+e+'".');n.style.color=e,globalThis.document.body.appendChild(n);try{var t=globalThis.getComputedStyle(n).color,o=t.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/),i=t.match(/rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)\s*(?:\/\s*([\d.]+%?))?\s*\)/),a=o||i;if(null===a)throw new V('Unsupported color: "'+e+'".');var s=parseInt(a[1],10),l=parseInt(a[2],10),u=parseInt(a[3],10),d=1;if(void 0!==a[4]){var c=a[4];d="%"===c.charAt(c.length-1)?parseFloat((parseFloat(c)/100).toFixed(2)):parseFloat(parseFloat(c).toFixed(2))}if(isNaN(s)||isNaN(l)||isNaN(u)||isNaN(d))throw new V('Failed to parse color values from: "'+e+'".');return{red:s,green:l,blue:u,alpha:d}}finally{globalThis.document.body.removeChild(n)}}var z,H={},q=null,B=null,_=null,G=null,K={setThemeColor:function(e,r){void 0===r&&(r={duration:0,easingFunction:"linear",appearance:"default"});var n=r.duration,t=U(r.easingFunction),i=r.appearance;null!==q&&(globalThis.cancelAnimationFrame(q),q=null,null!==B&&(B(te()),B=null));var a=te();void 0===a&&(a=void 0!==r.defaultColor?r.defaultColor:J()===o.Dark?"#181818ff":"#dcdcdcff");var s=R(a),l=R(e);return new Promise((function(e){B=e;var r=null;q=globalThis.requestAnimationFrame((function o(a){null===r&&(r=a);var u,d=a-r;u=0===n?1:Math.min(d/n,1);var c=t(u),f={red:Math.round(s.red+(l.red-s.red)*c),green:Math.round(s.green+(l.green-s.green)*c),blue:Math.round(s.blue+(l.blue-s.blue)*c),alpha:+(s.alpha+(l.alpha-s.alpha)*c).toFixed(2)};(function(e){void 0===e&&(e="default");var r;r=!S||!T||x||E?"default":e;var n=H[r];if(void 0!==n)return n;n=globalThis.document.createElement("meta"),x?n.setAttribute("name","msapplication-navbutton-color"):E?n.setAttribute("name","msapplication-TileColor"):n.setAttribute("name","theme-color");"default"!==e&&n.setAttribute("media","(prefers-color-scheme: "+r+")");return globalThis.document.head.prepend(n),H[e]=n})(i).setAttribute("content",$(f)),u<1?q=globalThis.requestAnimationFrame(o):(q=null,null!==B&&(e(te()),q=null))}))}))},getThemeColor:te,removeThemeColor:function(e){void 0===e&&(e="default");var r=H[e];void 0!==r&&r.remove();H[e]=void 0},detectAppearance:function(){return i.browser===t.SamsungInternet?X():Promise.resolve(J())},onAppearanceChange:function(e,r){void 0===r&&(r=!1);var n={fn:e,capture:!1,once:!1};"boolean"==typeof r&&(r={capture:r});void 0!==r.capture&&(n.capture=r.capture);void 0!==r.once&&(n.once=r.once);void 0!==r.signal&&(n.signal=r.signal);var o=re(n);-1===o?(j.push(n),1===j.length&&(i.browser===t.SamsungInternet?(X().then((function(e){_=e})),G=globalThis.setInterval((function(){X().then((function(e){e!==_&&(_=e,Y(e))}))}),2e3)):(a=n.capture,_=J(),"function"==typeof y.addEventListener?y.addEventListener("change",Q,a):"function"==typeof y.addListener&&y.addListener(Q))),this.detectAppearance().then(Y)):j[o].once&&!n.once&&(j[o].once=!1);var a;void 0!==n.signal&&(n.signal.aborted?ee(n):n.signal.addEventListener("abort",(function e(){void 0!==n.signal&&n.signal.removeEventListener("abort",e),ee(n)})));return function(){ee(n)}}};function Z(e){var r=e.toString(16);switch(r.length){case 0:return"00";case 1:return"0"+r;default:return r}}function $(e){return"#"+Z(e.red)+Z(e.green)+Z(e.blue)+Z(Math.round(255*e.alpha))}function X(){return new Promise((function(e){var r=new Image;r.onload=function(){if(null===k)return e(o.Light);k.drawImage(r,0,0);var n=k.getImageData(0,0,1,1).data;(n[0]&n[1]&n[2])<255?e(o.Dark):e(o.Light)},r.onerror=function(){e(o.Unknown)},r.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IndoaXRlIi8+PC9zdmc+"}))}function J(){return T?y.matches?o.Dark:o.Light:o.Unknown}function Q(e){var r;(r=e.matches?o.Dark:o.Light)!==_&&Y(_=r)}function Y(e){for(var r=0;r<j.length;r++){var n=j[r];n.fn(e),n.once&&ee(n)}}function ee(e){var r,n=re(e);-1!==n&&j.splice(n,1),0===j.length&&(i.browser===t.SamsungInternet?(_=null,null!==G&&(clearInterval(G),G=null)):(r=e.capture,_=null,"function"==typeof y.removeEventListener?y.removeEventListener("change",Q,r):"function"==typeof y.removeListener&&y.removeListener(Q)))}function re(e){for(var r=0;r<j.length;r++)if(j[r].fn===e.fn&&j[r].capture===e.capture)return r;return-1}function ne(){var e;H={},e=x?'meta[name="msapplication-navbutton-color"]':E?'meta[name="msapplication-TileColor"]':'meta[name="theme-color"]';var r=globalThis.document.querySelectorAll(e);if(S&&T&&!x&&!E)for(var n=0;n<r.length;n++){var t=r.item(n),o=t.getAttribute("media");if("(prefers-color-scheme: dark)"===o&&void 0===H.dark?H.dark=t:"(prefers-color-scheme: light)"===o&&void 0===H.light?H.light=t:null===o&&void 0===H.default&&(H.default=t),void 0!==H.dark&&void 0!==H.light&&void 0!==H.default)return}else H.default=r[0]}function te(){var e=function(){if(x)return globalThis.document.querySelector('meta[name="msapplication-navbutton-color"]');if(E)return globalThis.document.querySelector('meta[name="msapplication-TileColor"]');if(!S||!T)return globalThis.document.querySelector('meta[name="theme-color"]');var e,r=globalThis.document.querySelectorAll('meta[name="theme-color"]');e=J()===o.Dark?"(prefers-color-scheme: dark)":"(prefers-color-scheme: light)";for(var n=0;n<r.length;n++){var t=r.item(n);if(t.hasAttribute("content")){var i=t.getAttribute("media");if(null===i||i===e)return t}}return null}();return null!==e?e.getAttribute("content"):i.browser===t.Safari?i.isStandalone?J()===o.Dark?"#ffffffff":"#000000ff":$(R(globalThis.getComputedStyle(globalThis.document.body).backgroundColor)):i.browser===t.Chrome?J()===o.Dark?"#28292cff":"#ffffffff":void 0}return z=new MutationObserver((function(e){for(var r=0;r<e.length;r++){for(var n=e[r],t=n.addedNodes,o=n.removedNodes,i=0;i<t.length;i++)if(t[i]instanceof HTMLMetaElement)return ne();for(i=0;i<o.length;i++)if(o[i]instanceof HTMLMetaElement)return ne()}})),"function"==typeof y.addEventListener?y.addEventListener("change",ne):"function"==typeof y.addListener&&y.addListener(ne),z.observe(globalThis.document.head,{childList:!0}),ne(),{installed:!1,name:"Theme",module:K,Constants:{Appearances:o},Errors:{EasingError:I,UnsupportedEasingFunctionError:L,StepSyntaxError:F,LinearSyntaxError:N,CubicBezierSyntaxError:C,UnsupportedColorError:V}}}));
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(e="undefined"!=typeof globalThis?globalThis:e||self).Theme=r()}(this,(function(){"use strict";var e,r,n,o;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(r||(r={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(n||(n={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={}));var t,i="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",a={device:r.Unknown,os:e.Unknown,osVersion:"",engine:n.Unknown,engineVersion:"",browser:o.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var r=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===r)return"";if(r instanceof WebGLRenderingContext||"getParameter"in r&&"function"==typeof r.getParameter){var n=r.getExtension("WEBGL_debug_renderer_info");return null===n?r.getParameter(r.RENDERER):r.getParameter(n.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:i,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(i),isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isElectron:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron,isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},s=[[/windows nt (6\.[23]); arm/i,e.Windows,c],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,c],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,c],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,c],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,c],[/windows ce\/?([\d.]*)/i,e.Windows,c],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,d],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,d],[/cfnetwork\/.+darwin/i,e.iOS,d],[/mac os x ?([\w. ]*)/i,e.MacOS,d],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,d],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],l=[[/windows.+ edge\/([\w.]+)/i,n.EdgeHTML],[/arkweb\/([\w.]+)/i,n.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,n.Blink],[/presto\/([\w.]+)/i,n.Presto],[/webkit\/([\w.]+)/i,n.WebKit],[/trident\/([\w.]+)/i,n.Trident],[/netfront\/([\w.]+)/i,n.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,n.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,n.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,n.Gecko]],u=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function c(e){if(void 0===e)return"";var r={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==r?r:e}function d(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,r){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":r}function f(e,r){return"function"==typeof r?r(e):"string"==typeof r?r:void 0===e?"":e}function p(e){var r=e.split(".");return{major:parseInt(r[0]||"0"),minor:parseInt(r[1]||"0"),build:parseInt(r[2]||"0")}}for(var v=0;v<s.length;v++){var h=(y=s[v])[0],b=y[1],g=y[2];if(null!==(j=a.userAgent.match(h))){a.os=b,a.osVersion=f(j[1],g),b===e.iOS||b===e.Android?a.device=r.Mobile:b!==e.Windows&&b!==e.MacOS||(a.device=r.Desktop);break}}for(v=0;v<l.length;v++){h=(y=l[v])[0];var w=y[1];g=y[2];if(null!==(j=a.userAgent.match(h))){a.engine=w,a.engineVersion=f(j[1],g);break}}for(v=0;v<u.length;v++){h=(y=u[v])[0];var y,j,S=y[1];g=y[2];if(null!==(j=a.userAgent.match(h))){a.browser=S,a.browserVersion=f(j[1],g);break}}if(a.isReactNative)try{b=(x=require("react-native").Platform).OS;var k=p(T=x.Version);switch(b){case"android":a.os=e.Android,a.osVersion=function(e,r){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major?"4.4W":19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":r}(k,T);break;case"ios":a.os=e.iOS,a.osVersion=T;break;case"windows":a.os=e.Windows,a.osVersion=m(k,T);break;case"macos":a.os=e.MacOS,a.osVersion=T}}catch(e){}if(a.isNodeJS)try{var T,x=(b=require("os")).platform();k=p(T=b.release());switch(x){case"win32":a.os=e.Windows,a.osVersion=m(k,T);break;case"darwin":a.os=e.MacOS,a.osVersion=function(e,r){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:r}(k,T);break;case"android":a.os=e.Android,a.osVersion=T;break;case"linux":/android/i.test(T)&&(a.os=e.Android,a.osVersion=T)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(r){for(var n,o=r.fullVersionList||r.brands||[],t=r.platformVersion,i=0;i<o.length;i++){var s=null==(n=o[i])?{brand:"",version:""}:"string"==typeof n?{brand:n,version:""}:{brand:n.brand,version:n.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(a.engineVersion=u)}"string"==typeof t&&(a.os===e.Windows&&parseInt(t.replace(/[^\d.]/g,"").split(".")[0],10)>=13?a.osVersion="11":a.osVersion=t)})),a.isMobile=a.device===r.Mobile,a.isDesktop=a.device===r.Desktop,a.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(a.userAgent),a.isStandalone=function(r){return"matchMedia"in globalThis&&(r===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(a.os),function(e){e.Unknown="unknown",e.Light="light",e.Dark="dark"}(t||(t={}));var E=globalThis.matchMedia("(prefers-color-scheme: dark)"),M="not all"!==E.media,A=a.browser!==o.Chrome||a.isMobile&&function(e,r){for(var n=e.split("."),o=r.split("."),t=Math.max(n.length,o.length),i=0;i<t;i++){var a=void 0,s=void 0;if((a=i<n.length?parseInt(n[i],10):0)>(s=i<o.length?parseInt(o[i],10):0))return 1;if(a<s)return-1}return 0}(a.browserVersion,"92")>=0,I=globalThis.document.createElement("canvas").getContext("2d",{willReadFrequently:!0}),C=/iemobile/i.test(a.userAgent),N=/windows phone/i.test(a.userAgent),F=[];function L(e){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&e[r],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function O(e,r){function n(o){if(!(this instanceof n))return new n(o);var t=new r(o||"");if("function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(t,n.prototype):t.__proto__=n.prototype,t.name=e,void 0!==o&&(t.message=o),"undefined"!=typeof Symbol&&Symbol.toStringTag)try{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}if("function"==typeof Error.captureStackTrace)Error.captureStackTrace(t,n);else if(r.captureStackTrace&&"function"==typeof r.captureStackTrace)r.captureStackTrace(t,n);else try{var i=new r;i.stack&&(t.stack=i.stack)}catch(e){}return t}void 0===r&&(r=Error),n.prototype=Object.create(r.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}});try{Object.defineProperty(n.prototype,"name",{value:e,writable:!0,enumerable:!1,configurable:!0})}catch(r){try{n.prototype.name=e}catch(e){}}try{Object.defineProperty(n,"name",{value:e,writable:!1,enumerable:!1,configurable:!0})}catch(e){}return n}"function"==typeof SuppressedError&&SuppressedError;var W=O("EasingError"),V=O("CubicBezierSyntaxError",W),P=O("LinearSyntaxError",W),D=O("StepSyntaxError",W),U=O("UnsupportedEasingFunctionError",W),R={linear:"linear(0, 1)",ease:"cubic-bezier(0.25, 0.1, 0.25, 1)","ease-in":"cubic-bezier(0.42, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.58, 1)","ease-in-out":"cubic-bezier(0.42, 0, 0.58, 1)","step-start":"steps(1, jump-start)","step-end":"steps(1, jump-end)"};function z(e,r,n){return e<r?r:e>n?n:e}function H(e){var r=function(e){var r=e.match(/cubic-bezier\((.*)\)/);if(null===r)throw new V("Invalid cubic-bezier syntax");var n=r[1].trim().split(","),o=[];if(4!==n.length)throw new V("Cubic-bezier must have exactly 4 numeric values");for(var t=0;t<4;t++){var i=parseFloat(n[t]);if(isNaN(i))throw new V("Cubic-bezier must have exactly 4 numeric values");if(t%2==0&&(i<0||i>1))throw new V("x1 and x2 must be between 0 and 1");o.push(i)}return{x1:o[0],y1:o[1],x2:o[2],y2:o[3]}}(e),n=r.x1,o=r.x2,t=r.y1,i=r.y2;return function(e){if(0===(e=z(e,0,1))||1===e)return e;var r=function(e,r,t){if(void 0===r&&(r=1e-6),void 0===t&&(t=50),e<=0)return 0;if(e>=1)return 1;for(var i=e,a=0;a<t;a++){var s=3*(1-i)*(1-i)*i*n+3*(1-i)*i*i*o+i*i*i,l=3*(1-i)*(1-i)*n+6*(1-i)*i*(o-n)+3*i*i*(1-o);if(Math.abs(l)<r)break;var u=i-(s-e)/l;if(Math.abs(u-i)<r){i=u;break}i=Math.max(0,Math.min(1,u))}return i}(e);return 3*(1-r)*(1-r)*r*t+3*(1-r)*r*r*i+r*r*r}}function B(e){var r=function(e){var r,n,o=e.match(/linear\((.*)\)/);if(null===o)throw new P("Invalid linear syntax");var t=o[1].trim();if(""===t)throw new P("Linear function must have at least one point");for(var i=t.split(","),a=[],s=0;s<i.length;s++){var l=i[s].trim(),u=l.match(/^([+-]?\d*\.?\d+)((?:\s+[+-]?\d*\.?\d+%){2,})$/);if(null===u){var c=l.match(/^([+-]?\d*\.?\d+)\s+([+-]?\d*\.?\d+)%$/);if(null===c){var d=l.match(/^([+-]?\d*\.?\d+)$/);if(null===d)throw new P('Invalid linear point format: "'+l+'"');a.push({position:1===i.length?0:s/(i.length-1),value:parseFloat(d[1])})}else a.push({position:parseFloat(c[2])/100,value:parseFloat(c[1])})}else{var m=parseFloat(u[1]),f=u[2].trim().split(/\s+/);try{for(var p=(r=void 0,L(f)),v=p.next();!v.done;v=p.next()){var h=v.value;a.push({value:m,position:parseFloat(h)/100})}}catch(e){r={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}}}if(0===a.length)throw new P("No valid points found in linear function");return a.sort((function(e,r){return e.position-r.position})),a[0].position>0&&a.unshift({position:0,value:0}),a[a.length-1].position<1&&a.push({position:1,value:1}),a}(e);return function(e){if((e=z(e,0,1))<=r[0].position)return r[0].value;if(e>=r[r.length-1].position)return r[r.length-1].value;for(var n=0;n<r.length-1;n++){var o=r[n],t=r[n+1];if(e>=o.position&&e<=t.position){if(o.position===t.position)return t.value;var i=(e-o.position)/(t.position-o.position);return o.value+(t.value-o.value)*i}}return r[r.length-1].value}}function q(e){if(function(e){return!/(linear|cubic-bezier|steps)\((.*)\)/.test(e)}(e)&&(e=R[e]),function(e){return/cubic-bezier\(/.test(e)}(e))return H(e);if(function(e){return/linear\(/.test(e)}(e))return B(e);if(function(e){return/steps\(\s*(\d+)\s*(?:,\s*(jump-start|jump-end|jump-none|jump-both|start|end)\s*)?\)$/.test(e)}(e))return function(e){var r=e.match(/steps\(\s*(\d+)\s*(?:,\s*(jump-start|jump-end|jump-none|jump-both|start|end)\s*)?\)$/);if(null===r)throw new D("Invalid steps syntax");var n=parseInt(r[1],10),o=r[2];if(n<=0)throw new D("Steps count must be a positive integer");if("jump-none"===o&&n<2)throw new D("jump-none requires at least 2 steps");return function(e){switch(e=z(e,0,1),o){case"start":case"jump-start":return 0===e?1/n:1===e?1:Math.ceil(e*n)/n;case void 0:case"end":case"jump-end":return 1===e?1:Math.floor(e*n)/n;case"jump-both":return 0===e?0:1===e?1:Math.round(e*(n+1))/(n+1);case"jump-none":return 0===e?0:1===e?1:Math.floor(e*(n-1))/(n-1);default:throw new D('Unsupported step position: "'+o+'"')}}}(e);throw new U('Unsupported easing function: "'+e+'"')}var _=O("UnsupportedColorError");function G(e){if("undefined"!=typeof CSS&&CSS.supports&&!CSS.supports("color",e))throw new _('Unsupported color: "'+e+'".');if(null!==I)try{I.clearRect(0,0,1,1),I.fillStyle=e,I.fillRect(0,0,1,1);var r=I.getImageData(0,0,1,1).data;return{red:r[0],green:r[1],blue:r[2],alpha:parseFloat((r[3]/255).toFixed(2))}}catch(e){}var n=function(e,r){if(void 0===r&&(r=!0),void 0!==globalThis.document){var n=globalThis.document.createElement(e);return"width"in n&&(n.width="0"),"height"in n&&(n.height="0"),"border"in n&&(n.border="0"),"frameBorder"in n&&(n.frameBorder="0"),"scrolling"in n&&(n.scrolling="no"),"cellPadding"in n&&(n.cellPadding="0"),"cellSpacing"in n&&(n.cellSpacing="0"),"frame"in n&&(n.frame="void"),"rules"in n&&(n.rules="none"),"noWrap"in n&&(n.noWrap=!0),n.tabIndex=-1,n.setAttribute("role","presentation"),r?(n.style.width="1px",n.style.height="1px"):(n.setAttribute("aria-hidden","true"),n.style.width="0",n.style.height="0",n.style.zIndex="-9999",n.style.display="none",n.style.visibility="hidden",n.style.pointerEvents="none"),n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.padding="0",n.style.margin="0",n.style.border="none",n.style.outline="none",n.style.clip="rect(1px, 1px, 1px, 1px)",n.style.clipPath="inset(50%)",n.style.overflow="hidden",n.style.whiteSpace="nowrap",n}}("div");if(void 0===n)throw new _('Failed to parse color values from: "'+e+'".');n.style.color=e,globalThis.document.body.appendChild(n);try{var o=globalThis.getComputedStyle(n).color,t=o.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/),i=o.match(/rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)\s*(?:\/\s*([\d.]+%?))?\s*\)/),a=t||i;if(null===a)throw new _('Unsupported color: "'+e+'".');var s=parseInt(a[1],10),l=parseInt(a[2],10),u=parseInt(a[3],10),c=1;if(void 0!==a[4]){var d=a[4];c="%"===d.charAt(d.length-1)?parseFloat((parseFloat(d)/100).toFixed(2)):parseFloat(parseFloat(d).toFixed(2))}if(isNaN(s)||isNaN(l)||isNaN(u)||isNaN(c))throw new _('Failed to parse color values from: "'+e+'".');return{red:s,green:l,blue:u,alpha:c}}finally{globalThis.document.body.removeChild(n)}}var K,Z={},$=null,X=null,J=null,Q=null,Y={setThemeColor:function(e,r){void 0===r&&(r={duration:0,easingFunction:"linear",appearance:"default"});var n=r.duration,o=q(r.easingFunction),i=r.appearance;null!==$&&(globalThis.cancelAnimationFrame($),$=null,null!==X&&(X(ue()),X=null));var a=ue();void 0===a&&(a=void 0!==r.defaultColor?r.defaultColor:oe()===t.Dark?"#181818ff":"#dcdcdcff");var s=G(a),l=G(e);return new Promise((function(e){X=e;var r=null;$=globalThis.requestAnimationFrame((function t(a){null===r&&(r=a);var u,c=a-r;u=0===n?1:Math.min(c/n,1);var d=o(u),m={red:Math.round(s.red+(l.red-s.red)*d),green:Math.round(s.green+(l.green-s.green)*d),blue:Math.round(s.blue+(l.blue-s.blue)*d),alpha:+(s.alpha+(l.alpha-s.alpha)*d).toFixed(2)};(function(e){void 0===e&&(e="default");var r;r=!A||!M||C||N?"default":e;var n=Z[r];if(void 0!==n)return n;n=globalThis.document.createElement("meta"),C?n.setAttribute("name","msapplication-navbutton-color"):N?n.setAttribute("name","msapplication-TileColor"):n.setAttribute("name","theme-color");"default"!==e&&n.setAttribute("media","(prefers-color-scheme: "+r+")");return globalThis.document.head.prepend(n),Z[e]=n})(i).setAttribute("content",re(m)),u<1?$=globalThis.requestAnimationFrame(t):($=null,null!==X&&(e(ue()),$=null))}))}))},getThemeColor:ue,removeThemeColor:function(e){void 0===e&&(e="default");var r=Z[e];void 0!==r&&r.remove();Z[e]=void 0},detectAppearance:function(){return a.browser===o.SamsungInternet?ne():Promise.resolve(oe())},onAppearanceChange:function(e,r){void 0===r&&(r=!1);var n={fn:e,capture:!1,once:!1};"boolean"==typeof r&&(r={capture:r});void 0!==r.capture&&(n.capture=r.capture);void 0!==r.once&&(n.once=r.once);void 0!==r.signal&&(n.signal=r.signal);var t=se(n);-1===t?(F.push(n),1===F.length&&(a.browser===o.SamsungInternet?(ne().then((function(e){J=e})),Q=globalThis.setInterval((function(){ne().then((function(e){e!==J&&(J=e,ie(e))}))}),2e3)):(i=n.capture,J=oe(),"function"==typeof E.addEventListener?E.addEventListener("change",te,i):"function"==typeof E.addListener&&E.addListener(te))),this.detectAppearance().then(ie)):F[t].once&&!n.once&&(F[t].once=!1);var i;void 0!==n.signal&&(n.signal.aborted?ae(n):n.signal.addEventListener("abort",(function e(){void 0!==n.signal&&n.signal.removeEventListener("abort",e),ae(n)})));return function(){ae(n)}}};function ee(e){var r=e.toString(16);switch(r.length){case 0:return"00";case 1:return"0"+r;default:return r}}function re(e){return"#"+ee(e.red)+ee(e.green)+ee(e.blue)+ee(Math.round(255*e.alpha))}function ne(){return new Promise((function(e){var r=new Image;r.onload=function(){if(null===I)return e(t.Light);I.drawImage(r,0,0);var n=I.getImageData(0,0,1,1).data;(n[0]&n[1]&n[2])<255?e(t.Dark):e(t.Light)},r.onerror=function(){e(t.Unknown)},r.src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IndoaXRlIi8+PC9zdmc+"}))}function oe(){return M?E.matches?t.Dark:t.Light:t.Unknown}function te(e){var r;(r=e.matches?t.Dark:t.Light)!==J&&ie(J=r)}function ie(e){for(var r=0;r<F.length;r++){var n=F[r];n.fn(e),n.once&&ae(n)}}function ae(e){var r,n=se(e);-1!==n&&F.splice(n,1),0===F.length&&(a.browser===o.SamsungInternet?(J=null,null!==Q&&(clearInterval(Q),Q=null)):(r=e.capture,J=null,"function"==typeof E.removeEventListener?E.removeEventListener("change",te,r):"function"==typeof E.removeListener&&E.removeListener(te)))}function se(e){for(var r=0;r<F.length;r++)if(F[r].fn===e.fn&&F[r].capture===e.capture)return r;return-1}function le(){var e;Z={},e=C?'meta[name="msapplication-navbutton-color"]':N?'meta[name="msapplication-TileColor"]':'meta[name="theme-color"]';var r=globalThis.document.querySelectorAll(e);if(A&&M&&!C&&!N)for(var n=0;n<r.length;n++){var o=r.item(n),t=o.getAttribute("media");if("(prefers-color-scheme: dark)"===t&&void 0===Z.dark?Z.dark=o:"(prefers-color-scheme: light)"===t&&void 0===Z.light?Z.light=o:null===t&&void 0===Z.default&&(Z.default=o),void 0!==Z.dark&&void 0!==Z.light&&void 0!==Z.default)return}else Z.default=r[0]}function ue(){var e=function(){if(C)return globalThis.document.querySelector('meta[name="msapplication-navbutton-color"]');if(N)return globalThis.document.querySelector('meta[name="msapplication-TileColor"]');if(!A||!M)return globalThis.document.querySelector('meta[name="theme-color"]');var e,r=globalThis.document.querySelectorAll('meta[name="theme-color"]');e=oe()===t.Dark?"(prefers-color-scheme: dark)":"(prefers-color-scheme: light)";for(var n=0;n<r.length;n++){var o=r.item(n);if(o.hasAttribute("content")){var i=o.getAttribute("media");if(null===i||i===e)return o}}return null}();return null!==e?e.getAttribute("content"):a.browser===o.Safari?a.isStandalone?oe()===t.Dark?"#ffffffff":"#000000ff":re(G(globalThis.getComputedStyle(globalThis.document.body).backgroundColor)):a.browser===o.Chrome?oe()===t.Dark?"#28292cff":"#ffffffff":void 0}return K=new MutationObserver((function(e){for(var r=0;r<e.length;r++){for(var n=e[r],o=n.addedNodes,t=n.removedNodes,i=0;i<o.length;i++)if(o[i]instanceof HTMLMetaElement)return le();for(i=0;i<t.length;i++)if(t[i]instanceof HTMLMetaElement)return le()}})),"function"==typeof E.addEventListener?E.addEventListener("change",le):"function"==typeof E.addListener&&E.addListener(le),K.observe(globalThis.document.head,{childList:!0}),le(),{installed:!1,name:"Theme",module:Y,Constants:{Appearances:t},Errors:{EasingError:W,UnsupportedEasingFunctionError:U,StepSyntaxError:D,LinearSyntaxError:P,CubicBezierSyntaxError:V,UnsupportedColorError:_}}}));
|
|
@@ -9,9 +9,11 @@ export declare interface PlatformInstance {
|
|
|
9
9
|
browserVersion: string;
|
|
10
10
|
renderer: string;
|
|
11
11
|
userAgent: string;
|
|
12
|
-
isWebview: boolean;
|
|
13
12
|
isStandalone: boolean;
|
|
14
13
|
isMobile: boolean;
|
|
15
14
|
isDesktop: boolean;
|
|
15
|
+
isWebview: boolean;
|
|
16
16
|
isNodeJS: boolean;
|
|
17
|
+
isElectron: boolean;
|
|
18
|
+
isReactNative: boolean;
|
|
17
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function require<T = any>(moduleName: string):
|
|
1
|
+
export default function require<T = any>(moduleName: string): T | null;
|
|
@@ -9,9 +9,11 @@ export declare interface PlatformInstance {
|
|
|
9
9
|
browserVersion: string;
|
|
10
10
|
renderer: string;
|
|
11
11
|
userAgent: string;
|
|
12
|
-
isWebview: boolean;
|
|
13
12
|
isStandalone: boolean;
|
|
14
13
|
isMobile: boolean;
|
|
15
14
|
isDesktop: boolean;
|
|
15
|
+
isWebview: boolean;
|
|
16
16
|
isNodeJS: boolean;
|
|
17
|
+
isElectron: boolean;
|
|
18
|
+
isReactNative: boolean;
|
|
17
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function require<T = any>(moduleName: string):
|
|
1
|
+
export default function require<T = any>(moduleName: string): T | null;
|