@thumbmarkjs/thumbmarkjs 1.9.1 → 1.10.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/README.md +96 -102
- package/dist/thumbmark.cjs.js +1 -1
- package/dist/thumbmark.cjs.js.map +1 -1
- package/dist/thumbmark.esm.d.ts +6 -0
- package/dist/thumbmark.esm.js +1 -1
- package/dist/thumbmark.esm.js.map +1 -1
- package/dist/thumbmark.umd.js +1 -1
- package/dist/thumbmark.umd.js.map +1 -1
- package/dist/types/factory.d.ts +0 -4
- package/dist/types/options.d.ts +6 -0
- package/package.json +102 -71
- package/src/factory.ts +0 -4
- package/src/functions/api.ts +19 -6
- package/src/functions/index.ts +1 -1
- package/src/options.ts +7 -0
- package/dist/types/components/intl/index.d.ts +0 -2
- package/dist/types/components/mediaDevices/index.d.ts +0 -2
- package/src/components/canvas/index.test.ts +0 -38
- package/src/components/hardware/index.test.ts +0 -80
- package/src/components/intl/index.test.ts +0 -124
- package/src/components/intl/index.ts +0 -41
- package/src/components/mediaDevices/index.test.ts +0 -120
- package/src/components/mediaDevices/index.ts +0 -26
- package/src/components/system/browser.test.ts +0 -108
- package/src/components/webgl/index.test.ts +0 -223
- package/src/functions/api.test.ts +0 -366
- package/src/functions/filterComponents.test.ts +0 -273
- package/src/functions/functions.test.ts +0 -142
- package/src/functions/metadata.test.ts +0 -211
- package/src/options.test.ts +0 -10
- package/src/thumbmark.custom-components.test.ts +0 -87
- package/src/thumbmark.test.ts +0 -59
- package/src/utils/cache.test.ts +0 -95
- package/src/utils/raceAll.test.ts +0 -86
- package/src/utils/stableStringify.test.ts +0 -335
- package/src/utils/visitorId.test.ts +0 -102
package/README.md
CHANGED
|
@@ -1,150 +1,144 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<picture>
|
|
2
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://www.thumbmarkjs.com/logo-dark.svg?v=2">
|
|
3
|
+
<source media="(prefers-color-scheme: light)" srcset="https://www.thumbmarkjs.com/logo-light.svg?v=2">
|
|
4
|
+
<img alt="ThumbmarkJS" src="https://www.thumbmarkjs.com/logo-dark.svg?v=2" height="60">
|
|
5
|
+
</picture><br><br>
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/@thumbmarkjs/thumbmarkjs)
|
|
8
|
+
[](https://www.npmjs.com/package/@thumbmarkjs/thumbmarkjs)
|
|
9
|
+
[](https://www.jsdelivr.com/package/npm/@thumbmarkjs/thumbmarkjs)
|
|
10
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
ThumbmarkJS is a free, open-source JavaScript browser fingerprinting library. Use it to identify returning visitors, detect fraud and bots, and more — all client-side, with no backend required.
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
MIT-licensed and commercially usable, it is used on **60,000+ websites**, generating over a **billion fingerprints every month**.
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
- Produces significantly **more unique fingerprints** by adding server-side components
|
|
16
|
-
- Adds smart signals such as bot, vpn, tor & datacenter traffic detection, and also **threat level**
|
|
17
|
-
- Provides uniqueness scoring
|
|
16
|
+
## Try it now
|
|
18
17
|
|
|
18
|
+
Visit the [live demo →](https://www.thumbmarkjs.com/resources/demo/) to see your browser's fingerprint and the individual components that make it up.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Or paste this into your browser's developer console to get your fingerprint hash and component breakdown directly:
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
```javascript
|
|
23
|
+
import('https://cdn.jsdelivr.net/npm/@thumbmarkjs/thumbmarkjs/dist/thumbmark.umd.js')
|
|
24
|
+
.then(() => {
|
|
25
|
+
const tm = new ThumbmarkJS.Thumbmark();
|
|
26
|
+
tm.get().then((res) => console.log(res));
|
|
27
|
+
})
|
|
28
|
+
```
|
|
23
29
|
|
|
30
|
+
## Performance
|
|
24
31
|
|
|
25
|
-
|
|
32
|
+
The client library achieves ~80% uniqueness across general browser populations. Mac/Safari users can show higher collision rates or higher noise depending on the audience.
|
|
26
33
|
|
|
27
|
-
|
|
34
|
+
### Need higher accuracy? Try the ThumbmarkJS API
|
|
28
35
|
|
|
29
|
-
|
|
36
|
+
The open-source library is great for many use cases, but if you need production-grade accuracy for fraud prevention or user identification, the [ThumbmarkJS API](https://www.thumbmarkjs.com) takes it significantly further. A free tier is available.
|
|
30
37
|
|
|
31
|
-
|
|
32
|
-
The visitor ID further improves both uniqueness and especially stability. Detailed statistics coming.
|
|
38
|
+
The API combines the client-side signals with server-side analysis — including TLS handshake details, HTTP headers, and connection-level data — to produce fingerprints with over 99% uniqueness. It also adds smart signals: bot detection, VPN and TOR detection, datacenter traffic identification, and a threat level score per visitor.
|
|
33
39
|
|
|
34
|
-
|
|
40
|
+
[Learn more at thumbmarkjs.com →](https://www.thumbmarkjs.com)
|
|
35
41
|
|
|
36
|
-
|
|
42
|
+
## Installation
|
|
37
43
|
|
|
38
|
-
|
|
44
|
+
### NPM
|
|
39
45
|
|
|
40
|
-
|
|
46
|
+
```bash
|
|
47
|
+
npm install @thumbmarkjs/thumbmarkjs
|
|
48
|
+
```
|
|
41
49
|
|
|
42
|
-
|
|
50
|
+
> ⚠️ ThumbmarkJS runs in the browser. It requires browser APIs to compute fingerprint components and cannot run server-side.
|
|
43
51
|
|
|
44
|
-
|
|
52
|
+
See the [NPM usage guide →](https://docs.thumbmarkjs.com/docs/installation/usage-npm)
|
|
45
53
|
|
|
46
|
-
|
|
54
|
+
### CDN (jsDelivr)
|
|
47
55
|
|
|
48
|
-
Transpiled bundles are available on [
|
|
56
|
+
Transpiled bundles are available on [jsDelivr](https://www.jsdelivr.com/package/npm/@thumbmarkjs/thumbmarkjs):
|
|
49
57
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
| Format | URL |
|
|
59
|
+
|---|---|
|
|
60
|
+
| UMD | `https://cdn.jsdelivr.net/npm/@thumbmarkjs/thumbmarkjs/dist/thumbmark.umd.js` |
|
|
61
|
+
| CommonJS | `https://cdn.jsdelivr.net/npm/@thumbmarkjs/thumbmarkjs/dist/thumbmark.cjs.js` |
|
|
62
|
+
| ESM | `https://cdn.jsdelivr.net/npm/@thumbmarkjs/thumbmarkjs/dist/thumbmark.esm.js` |
|
|
54
63
|
|
|
55
|
-
|
|
64
|
+
## Documentation
|
|
56
65
|
|
|
57
|
-
|
|
66
|
+
Full documentation at **[docs.thumbmarkjs.com](https://docs.thumbmarkjs.com/docs/intro)** — including installation, configuration, integrations, and the API reference.
|
|
58
67
|
|
|
59
|
-
|
|
60
|
-
.then(() => {
|
|
61
|
-
const tm = new ThumbmarkJS.Thumbmark();
|
|
62
|
-
tm.get().then((res) => {
|
|
63
|
-
console.log(res)
|
|
64
|
-
})
|
|
65
|
-
})
|
|
68
|
+
### Configuration
|
|
66
69
|
|
|
67
|
-
|
|
70
|
+
Options are passed to the `Thumbmark` constructor:
|
|
68
71
|
|
|
69
|
-
|
|
72
|
+
```javascript
|
|
73
|
+
const tm = new ThumbmarkJS.Thumbmark({
|
|
74
|
+
option_key: option_value
|
|
75
|
+
})
|
|
76
|
+
```
|
|
70
77
|
|
|
71
|
-
|
|
78
|
+
| Option | Type | Default | Description |
|
|
79
|
+
|---|---|---|---|
|
|
80
|
+
| `api_key` | string | — | API key from [thumbmarkjs.com](https://thumbmarkjs.com). Enables server-side signals and visitorId. |
|
|
81
|
+
| `exclude` | string[] | — | Components to exclude from the fingerprint hash. Excluding a top-level component also improves performance. |
|
|
82
|
+
| `include` | string[] | — | Only include these components. `exclude` still applies. |
|
|
83
|
+
| `permissions_to_check` | string[] | — | Limit which browser permissions are checked. Permissions are the slowest component to resolve. |
|
|
84
|
+
| `timeout` | integer | 5000 | Component timeout in milliseconds. |
|
|
85
|
+
| `logging` | boolean | true | At most 0.01% of runs collect anonymous logs to improve the library. Has no effect on users. |
|
|
86
|
+
| `performance` | boolean | false | When true, includes per-component resolution time in milliseconds. |
|
|
87
|
+
| `stabilize` | string[] | `['private', 'iframe']` | Preset exclusion list for stability across private browsing and iframes. |
|
|
88
|
+
| `metadata` | varies | — | Passed to webhooks. Does not affect the fingerprint. |
|
|
72
89
|
|
|
73
|
-
|
|
90
|
+
See the [configuration reference →](https://docs.thumbmarkjs.com/docs/configuration/options)
|
|
74
91
|
|
|
75
|
-
|
|
76
|
-
npm install @thumbmarkjs/thumbmarkjs
|
|
77
|
-
```
|
|
92
|
+
### Integrations
|
|
78
93
|
|
|
79
|
-
|
|
94
|
+
React, Vue, Angular, and Preact integration plugins are available. [See the integrations docs →](https://docs.thumbmarkjs.com/docs/category/integrations)
|
|
80
95
|
|
|
81
|
-
|
|
96
|
+
### Fingerprint components
|
|
82
97
|
|
|
83
|
-
|
|
98
|
+
ThumbmarkJS combines multiple browser fingerprinting techniques to maximise uniqueness. The following signals are collected client-side:
|
|
84
99
|
|
|
85
|
-
|
|
100
|
+
- Audio fingerprinting
|
|
101
|
+
- Canvas fingerprinting
|
|
102
|
+
- WebGL fingerprinting and GPU info
|
|
103
|
+
- Available fonts and rendering behaviour
|
|
104
|
+
- Hardware details
|
|
105
|
+
- Browser languages and timezone
|
|
106
|
+
- Math precision characteristics
|
|
107
|
+
- Browser permissions
|
|
108
|
+
- Installed plugins
|
|
109
|
+
- Screen details and media queries
|
|
110
|
+
- Speech synthesis voices
|
|
111
|
+
- System and browser details
|
|
112
|
+
- WebRTC fingerprinting
|
|
86
113
|
|
|
87
|
-
|
|
114
|
+
The following are available via the API only:
|
|
88
115
|
|
|
89
|
-
|
|
116
|
+
- TLS handshake details
|
|
117
|
+
- HTTP headers
|
|
118
|
+
- Connection and IP details
|
|
90
119
|
|
|
91
|
-
|
|
92
|
-
const tm = new ThumbmarkJS.Thumbmark({
|
|
93
|
-
option_key: option_value
|
|
94
|
-
})
|
|
95
|
-
```
|
|
120
|
+
See the [full components reference →](https://docs.thumbmarkjs.com/docs/category/components)
|
|
96
121
|
|
|
97
|
-
|
|
98
|
-
| - | - | - | - |
|
|
99
|
-
| api_key | string | 'ae8679607bf79f......' | Setting this to a key you've obtained from [https://thumbmarkjs.com](thumbmarkjs.com) makes thumbmarks incredibly more unique and enables **visitorId**
|
|
100
|
-
| exclude | string[] | ['webgl', 'system.browser.version'] | Removes components from the fingerprint hash. An excluded top-level component improves performance. |
|
|
101
|
-
| include | string[] | ['webgl', 'system.browser.version'] | Only includes the listed components. exclude still excludes included components. |
|
|
102
|
-
| permissions_to_check | string[] | ['gyroscope', 'accelerometer'] | Checks only selected permissions. Like 'include', but more low-level. Permissions take the longest to resolve, so this is if you need to cut down some milliseconds. |
|
|
103
|
-
| timeout | integer | 5000 | Default is 5000. Component timeout in milliseconds.
|
|
104
|
-
| logging | boolean | true | Default is true. Some releases collect at most 0.01% logs to improve the library. This doesn't affect the user. |
|
|
105
|
-
| performance | boolean | false | Default is false. Setting to true includes millisecond performance of component resolving |
|
|
106
|
-
| stabilize | string[] | ['private', 'iframe'] | A preset exclusion list for different scenarios. Default is `['private', 'iframe']` which means thumbmark uses settings designed to stabilize for private browsing and iframes (i.e. thumbmark should be stable over those situations).
|
|
107
|
-
| metadata | varies | 'event-123' | Passes metadata to webhooks. Does not affect thumbmark. |
|
|
122
|
+
### Custom components
|
|
108
123
|
|
|
109
|
-
|
|
124
|
+
Add your own signals to the fingerprint with `includeComponent(key, fn)`:
|
|
110
125
|
|
|
111
126
|
```javascript
|
|
112
|
-
|
|
113
|
-
api_key: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
|
|
114
|
-
exclude: ['math']
|
|
115
|
-
});
|
|
127
|
+
tm.includeComponent('my_signal', () => 'custom_value');
|
|
116
128
|
```
|
|
117
129
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
You can add custom components to the hash with `includeComponent`, which takes two parameters, the `key` being the key of the component in the JSON and the function that returns the value (a string, a number or a JSON object). Custom components are described in [here in the documentation](https://docs.thumbmarkjs.com/docs/configuration/custom-components).
|
|
121
|
-
`Thumbmark#includeComponent()` stores the component on that instance.
|
|
122
|
-
For legacy compatibility, deprecated top-level `includeComponent()` registrations are still merged during execution.
|
|
123
|
-
If both define the same key, the instance registration wins.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
## Components included in fingerprint
|
|
127
|
-
- audio fingerprint
|
|
128
|
-
- canvas fingerprint
|
|
129
|
-
- webgl fingerprint
|
|
130
|
-
- available fonts and how they render
|
|
131
|
-
- videocard
|
|
132
|
-
- browser languages and time zone
|
|
133
|
-
- browser permissions
|
|
134
|
-
- available plugins
|
|
135
|
-
- a ton of screen details including media queries
|
|
136
|
-
- TLS handshake details (API only)
|
|
137
|
-
- HTTP headers (API only)
|
|
138
|
-
- Connection/IP details (API only)
|
|
130
|
+
The function can return a string, number, or object. See the [custom components docs →](https://docs.thumbmarkjs.com/docs/configuration/custom-components)
|
|
139
131
|
|
|
140
|
-
|
|
132
|
+
### Technical details
|
|
141
133
|
|
|
142
|
-
|
|
134
|
+
The library is intentionally simple to build, extend, and audit. See [technical_details.md](technical_details.md) for an overview of the architecture.
|
|
143
135
|
|
|
144
|
-
|
|
136
|
+
## Using ThumbmarkJS?
|
|
145
137
|
|
|
146
|
-
|
|
138
|
+
We'd love to hear about your use case. [Share your experience →](https://form.jotform.com/261132396063352)
|
|
147
139
|
|
|
148
|
-
|
|
140
|
+
## Community & support
|
|
149
141
|
|
|
150
|
-
-
|
|
142
|
+
- 💬 [Discord](https://discord.gg/PAqxQ3TnDA) — questions, ideas, and discussion
|
|
143
|
+
- 📧 [contact@thumbmarkjs.com](mailto:contact@thumbmarkjs.com)
|
|
144
|
+
- 📖 [Documentation](https://docs.thumbmarkjs.com)
|
package/dist/thumbmark.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=2592e5,t="thumbmark",n="https://api.thumbmarkjs.com",r={exclude:[],include:[],stabilize:["private","iframe"],logging:!0,timeout:5e3,cache_api_call:!0,cache_lifetime_in_ms:0,performance:!1,experimental:!1,property_name_factory:e=>`${t}_${e}`};let o={...r};const i={private:[{exclude:["canvas"],browsers:["firefox","safari>=17","brave"]},{exclude:["audio"],browsers:["samsungbrowser","safari"]},{exclude:["fonts"],browsers:["firefox"]},{exclude:["audio.sampleHash","hardware.deviceMemory","header.acceptLanguage.q","system.hardwareConcurrency","plugins"],browsers:["brave"]},{exclude:["tls.extensions"],browsers:["firefox","chrome","safari"]},{exclude:["header.acceptLanguage"],browsers:["edge","chrome"]}],iframe:[{exclude:["system.applePayVersion","system.cookieEnabled"],browsers:["safari"]},{exclude:["permissions"]}],vpn:[{exclude:["ip"]}],always:[{exclude:["speech"],browsers:["brave","firefox"]}]},a="undefined"!=typeof window?window.OfflineAudioContext||window.webkitOfflineAudioContext:null;function s(e){let t=0;for(let n=0;n<e.length;++n)t+=Math.abs(e[n]);return t}function c(e,t,n){if(1===e.length)return e[0];if(3===e.length){const r=e[0].data,o=e[1].data,i=e[2].data,a=new Uint8ClampedArray(r.length);for(let e=0;e<r.length;e++){const t=r[e],n=o[e],s=i[e];a[e]=t===n||t===s?t:n===s?n:t}return new ImageData(a,t,n)}let r=[];for(let t=0;t<e[0].data.length;t++){let n=[];for(let r=0;r<e.length;r++)n.push(e[r].data[t]);r.push(l(n))}const o=new Uint8ClampedArray(r);return new ImageData(o,t,n)}function l(e){if(0===e.length)return 0;const t={};for(const n of e)t[n]=(t[n]||0)+1;let n=e[0];for(const e in t)t[e]>t[n]&&(n=parseInt(e,10));return n}function u(e){return e^=e>>>16,e=Math.imul(e,2246822507),e^=e>>>13,e=Math.imul(e,3266489909),(e^=e>>>16)>>>0}const m=new Uint32Array([597399067,2869860233,951274213,2716044179]);function d(e,t){return e<<t|e>>>32-t}function p(e,t=0){if(t=t?0|t:0,"string"==typeof e&&(e=function(e){if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e).buffer;const t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<128?t.push(r):r<2048?t.push(192|r>>6,128|63&r):r<55296||r>=57344?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return new Uint8Array(t).buffer}(e)),!(e instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");const n=new Uint32Array([t,t,t,t]);!function(e,t){const n=e.byteLength/16|0,r=new Uint32Array(e,0,4*n);for(let e=0;e<n;e++){const n=r.subarray(4*e,4*(e+1));n[0]=Math.imul(n[0],m[0]),n[0]=d(n[0],15),n[0]=Math.imul(n[0],m[1]),t[0]=t[0]^n[0],t[0]=d(t[0],19),t[0]=t[0]+t[1],t[0]=Math.imul(t[0],5)+1444728091,n[1]=Math.imul(n[1],m[1]),n[1]=d(n[1],16),n[1]=Math.imul(n[1],m[2]),t[1]=t[1]^n[1],t[1]=d(t[1],17),t[1]=t[1]+t[2],t[1]=Math.imul(t[1],5)+197830471,n[2]=Math.imul(n[2],m[2]),n[2]=d(n[2],17),n[2]=Math.imul(n[2],m[3]),t[2]=t[2]^n[2],t[2]=d(t[2],15),t[2]=t[2]+t[3],t[2]=Math.imul(t[2],5)+2530024501,n[3]=Math.imul(n[3],m[3]),n[3]=d(n[3],18),n[3]=Math.imul(n[3],m[0]),t[3]=t[3]^n[3],t[3]=d(t[3],13),t[3]=t[3]+t[0],t[3]=Math.imul(t[3],5)+850148119}}(e,n),function(e,t){const n=e.byteLength/16|0,r=e.byteLength%16,o=new Uint32Array(4),i=new Uint8Array(e,16*n,r);switch(r){case 15:o[3]=o[3]^i[14]<<16;case 14:o[3]=o[3]^i[13]<<8;case 13:o[3]=o[3]^i[12],o[3]=Math.imul(o[3],m[3]),o[3]=d(o[3],18),o[3]=Math.imul(o[3],m[0]),t[3]=t[3]^o[3];case 12:o[2]=o[2]^i[11]<<24;case 11:o[2]=o[2]^i[10]<<16;case 10:o[2]=o[2]^i[9]<<8;case 9:o[2]=o[2]^i[8],o[2]=Math.imul(o[2],m[2]),o[2]=d(o[2],17),o[2]=Math.imul(o[2],m[3]),t[2]=t[2]^o[2];case 8:o[1]=o[1]^i[7]<<24;case 7:o[1]=o[1]^i[6]<<16;case 6:o[1]=o[1]^i[5]<<8;case 5:o[1]=o[1]^i[4],o[1]=Math.imul(o[1],m[1]),o[1]=d(o[1],16),o[1]=Math.imul(o[1],m[2]),t[1]=t[1]^o[1];case 4:o[0]=o[0]^i[3]<<24;case 3:o[0]=o[0]^i[2]<<16;case 2:o[0]=o[0]^i[1]<<8;case 1:o[0]=o[0]^i[0],o[0]=Math.imul(o[0],m[0]),o[0]=d(o[0],15),o[0]=Math.imul(o[0],m[1]),t[0]=t[0]^o[0]}}(e,n),function(e,t){t[0]=t[0]^e.byteLength,t[1]=t[1]^e.byteLength,t[2]=t[2]^e.byteLength,t[3]=t[3]^e.byteLength,t[0]=t[0]+t[1]|0,t[0]=t[0]+t[2]|0,t[0]=t[0]+t[3]|0,t[1]=t[1]+t[0]|0,t[2]=t[2]+t[0]|0,t[3]=t[3]+t[0]|0,t[0]=u(t[0]),t[1]=u(t[1]),t[2]=u(t[2]),t[3]=u(t[3]),t[0]=t[0]+t[1]|0,t[0]=t[0]+t[2]|0,t[0]=t[0]+t[3]|0,t[1]=t[1]+t[0]|0,t[2]=t[2]+t[0]|0,t[3]=t[3]+t[0]|0}(e,n);const r=new Uint8Array(n.buffer);return Array.from(r).map((e=>e.toString(16).padStart(2,"0"))).join("")}const f=280;async function h(e){for(var t;!document.body;)await g(50);const n=document.createElement("iframe");n.setAttribute("frameBorder","0");const r=n.style;r.setProperty("position","fixed"),r.setProperty("display","block","important"),r.setProperty("visibility","visible"),r.setProperty("border","0"),r.setProperty("opacity","0"),n.src="about:blank",document.body.appendChild(n);const o=n.contentDocument||(null===(t=n.contentWindow)||void 0===t?void 0:t.document);if(!o)throw new Error("Iframe document is not accessible");e({iframe:o}),setTimeout((()=>{document.body.removeChild(n)}),0)}function g(e,t){return new Promise((n=>setTimeout(n,e,t)))}const w=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],v=["monospace","sans-serif","serif"];function y(e,t){return e.font=`72px ${t}`,e.measureText("WwMmLli0Oo").width}function S(){var e;const t=document.createElement("canvas"),n=null!==(e=t.getContext("webgl"))&&void 0!==e?e:t.getContext("experimental-webgl");if(n&&"getParameter"in n)try{const e=(n.getParameter(n.VENDOR)||"").toString(),t=(n.getParameter(n.RENDERER)||"").toString();let r={vendor:e,renderer:t,version:(n.getParameter(n.VERSION)||"").toString(),shadingLanguageVersion:(n.getParameter(n.SHADING_LANGUAGE_VERSION)||"").toString()};if(!t.length||!e.length){const e=n.getExtension("WEBGL_debug_renderer_info");if(e){const t=(n.getParameter(e.UNMASKED_VENDOR_WEBGL)||"").toString(),o=(n.getParameter(e.UNMASKED_RENDERER_WEBGL)||"").toString();t&&(r.vendorUnmasked=t),o&&(r.rendererUnmasked=o)}}return r}catch(e){}return"undefined"}function b(){const e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}const x=(e,t,n,r)=>{const o=(n-t)/r;let i=0;for(let n=0;n<r;n++){i+=e(t+(n+.5)*o)}return i*o};function C(e,t){const n={};return t.forEach((t=>{const r=function(e){if(0===e.length)return null;const t={};e.forEach((e=>{const n=String(e);t[n]=(t[n]||0)+1}));let n=e[0],r=1;return Object.keys(t).forEach((e=>{t[e]>r&&(n=e,r=t[e])})),n}(e.map((e=>t in e?e[t]:void 0)).filter((e=>void 0!==e)));r&&(n[t]=r)})),n}const M=["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"];const _=new Map;function P(){if("undefined"==typeof navigator)return{name:"unknown",version:"unknown"};const e=!!navigator.brave,t=(e?"B|":"N|")+navigator.userAgent,n=_.get(t);if(n)return n;const r=[{name:"Brave",detect:()=>e}];let o;for(const e of r)if(e.detect()){const n=A(navigator.userAgent);return o={name:e.name,version:n.version},_.set(t,o),o}return o=A(navigator.userAgent),_.set(t,o),o}function A(e){var t,n,r,o,i,a;const s=[/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>EdgA|EdgiOS|Edg)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>OPR|OPX)\/(?<version>\d+(?:\.\d+)+)/,/Opera[\s\/](?<version>\d+(?:\.\d+)+)/,/Opera Mini\/(?<version>\d+(?:\.\d+)+)/,/Opera Mobi\/(?<version>\d+(?:\.\d+)+)/,/(?<name>Vivaldi)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>CriOS)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>FxiOS)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>Chrome|Chromium)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>Firefox|Waterfox|Iceweasel|IceCat)\/(?<version>\d+(?:\.\d+)+)/,/Version\/(?<version1>[\d.]+).*Safari\/[\d.]+|(?<name>Safari)\/(?<version2>[\d.]+)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)+)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)+)/],c={edg:"Edge",edga:"Edge",edgios:"Edge",opr:"Opera",opx:"Opera",crios:"Chrome",fxios:"Firefox",samsung:"SamsungBrowser",vivaldi:"Vivaldi"};for(const l of s){const s=e.match(l);if(s){let e=null===(t=s.groups)||void 0===t?void 0:t.name,u=(null===(n=s.groups)||void 0===n?void 0:n.version)||(null===(r=s.groups)||void 0===r?void 0:r.version1)||(null===(o=s.groups)||void 0===o?void 0:o.version2);if(e||!(null===(i=s.groups)||void 0===i?void 0:i.version1)&&!(null===(a=s.groups)||void 0===a?void 0:a.version2)||(e="Safari"),!e&&l.source.includes("Opera Mini")&&(e="Opera Mini"),!e&&l.source.includes("Opera Mobi")&&(e="Opera Mobi"),!e&&l.source.includes("Opera")&&(e="Opera"),!e&&s[1]&&(e=s[1]),!u&&s[2]&&(u=s[2]),e){return{name:c[e.toLowerCase()]||e,version:u||"unknown"}}}}return{name:"unknown",version:"unknown"}}function E(){if("undefined"==typeof navigator||!navigator.userAgent)return!1;const e=navigator.userAgent;return/Mobi|Android|iPhone|iPod|IEMobile|Opera Mini|Opera Mobi|webOS|BlackBerry|Windows Phone/i.test(e)&&!/iPad/i.test(e)}function T(){let e=[];const t={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(t).forEach((n=>{t[n].forEach((t=>{matchMedia(`(${n}: ${t})`).matches&&e.push(`${n}: ${t}`)}))})),e}function I(){if("https:"===window.location.protocol&&"function"==typeof window.ApplePaySession)try{const e=window.ApplePaySession.supportsVersion;for(let t=15;t>0;t--)if(e(t))return t}catch(e){return 0}return 0}const R="SamsungBrowser"!==P().name?1:3,k="Brave"!==P().name,O=137,D=(()=>{const e=new Float32Array(548),t=2*Math.PI/O;for(let n=0;n<O;n++){const r=n*t;e[4*n]=0,e[4*n+1]=0,e[4*n+2]=100*Math.cos(r),e[4*n+3]=50*Math.sin(r)}return e})();let F=null;function L(){try{if("undefined"==typeof document)return null;const e=document.createElement("canvas");e.width=200,e.height=100;const t=e.getContext("webgl");if(!t)return null;e.addEventListener("webglcontextlost",(e=>{e.preventDefault(),F=null}),{once:!0});const n=t.createShader(t.VERTEX_SHADER),r=t.createShader(t.FRAGMENT_SHADER);if(!n||!r)return null;if(t.shaderSource(n,"\n attribute vec2 position;\n void main() {\n gl_Position = vec4(position, 0.0, 1.0);\n }\n"),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))return null;if(t.shaderSource(r,"\n precision mediump float;\n void main() {\n gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color\n }\n"),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))return null;const o=t.createProgram();if(!o)return null;if(t.attachShader(o,n),t.attachShader(o,r),t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS))return null;const i=t.createBuffer();return i?(t.bindBuffer(t.ARRAY_BUFFER,i),t.bufferData(t.ARRAY_BUFFER,D,t.STATIC_DRAW),t.bindBuffer(t.ARRAY_BUFFER,null),{canvas:e,gl:t,program:o,buffer:i}):null}catch(e){return null}}function N(e){const t=new Set;return function e(n){if(n&&n.toJSON&&"function"==typeof n.toJSON&&(n=n.toJSON()),void 0===n)return;if("number"==typeof n)return isFinite(n)?""+n:"null";if("object"!=typeof n)return JSON.stringify(n);let r,o;if(Array.isArray(n)){for(o="[",r=0;r<n.length;r++)r&&(o+=","),o+=e(n[r])||"null";return o+"]"}if(null===n)return"null";if(t.has(n))throw new TypeError("Converting circular structure to JSON");t.add(n);const i=Object.keys(n).sort();for(o="",r=0;r<i.length;r++){const t=i[r],a=e(n[t]);a&&(o&&(o+=","),o+=JSON.stringify(t)+":"+a)}return t.delete(n),"{"+o+"}"}(e)||""}const U=["𝔄","𝔅","ℭ","𝔇","𝔈","𝔉","𝔸","𝔹","ℂ","𝔻","𝔼","𝔽"],B=["β","ψ","λ","ε","ζ","α","ξ","μ","ρ","φ","κ","τ","η","σ","ι","ω","γ","ν","χ","δ","θ","π","υ","ο"];function $(e,t){return`<math><mrow>${t}</mrow></math>`}function V(){let e="<mo>∏</mo>";return U.forEach(((t,n)=>{const r=2*n,o=B.slice(r,r+2);2===o.length&&(e+=`<mmultiscripts><mi>${t}</mi><none/><mi>${o[1]}</mi><mprescripts></mprescripts><mi>${o[0]}</mi><none/></mmultiscripts>`)})),$(0,`<munderover><mmultiscripts>${e}</mmultiscripts></munderover>`)}function j(){const e=[];return U.forEach(((t,n)=>{const r=2*n,o=B.slice(r,r+2);2===o.length&&e.push($(0,`<mmultiscripts><mi>${t}</mi><none/><mi>${o[1]}</mi><mprescripts></mprescripts><mi>${o[0]}</mi><none/></mmultiscripts>`))})),e}const H={audio:async function(){return a?async function(){return new Promise(((e,t)=>{try{const t=new a(1,5e3,44100),n=t.createBufferSource(),r=t.createOscillator();r.frequency.value=1e3;const o=t.createDynamicsCompressor();let i;o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.2,r.connect(o),o.connect(t.destination),r.start(),t.oncomplete=r=>{i=r.renderedBuffer.getChannelData(0),e({sampleHash:s(i),maxChannels:t.destination.maxChannelCount,channelCountMode:n.channelCountMode})},t.startRendering()}catch(e){t(e)}}))}():null},canvas:async function(){return new Promise((e=>{const t=Array.from({length:3},(()=>function(){const e=document.createElement("canvas"),t=e.getContext("2d");if(!t)return null;e.width=f,e.height=20;const n=t.createLinearGradient(0,0,e.width,e.height);n.addColorStop(0,"red"),n.addColorStop(1/6,"orange"),n.addColorStop(2/6,"yellow"),n.addColorStop(.5,"green"),n.addColorStop(4/6,"blue"),n.addColorStop(5/6,"indigo"),n.addColorStop(1,"violet"),t.fillStyle=n,t.fillRect(0,0,e.width,e.height);const r="Random Text WMwmil10Oo";return t.font="23.123px Arial",t.fillStyle="black",t.fillText(r,-5,15),t.fillStyle="rgba(0, 0, 255, 0.5)",t.fillText(r,-3.3,17.7),t.beginPath(),t.moveTo(0,0),t.lineTo(2*e.width/7,e.height),t.strokeStyle="white",t.lineWidth=2,t.stroke(),t.getImageData(0,0,e.width,e.height)}())).filter((e=>null!==e));0!==t.length?e({commonPixelsHash:p(c(t,f,20).data.toString()).toString()}):e(null)}))},fonts:async function(e){return new Promise((e=>{try{h((async({iframe:t})=>{const n=t.createElement("canvas").getContext("2d");if(!n)return void e(null);const r=v.map((e=>y(n,e)));let o={};w.forEach((e=>{const t=y(n,e);r.includes(t)||(o[e]=t)})),e(o)}))}catch(t){e(null)}}))},hardware:function(){return new Promise(((e,t)=>{const n=void 0!==navigator.deviceMemory?navigator.deviceMemory:0,r=window.performance&&window.performance.memory?window.performance.memory:0;e({videocard:S(),architecture:b(),deviceMemory:n.toString()||"undefined",jsHeapSizeLimit:r.jsHeapSizeLimit||0})}))},locales:function(){return new Promise((e=>{e({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}))},math:function(){return new Promise((e=>{e({acos:Math.acos(.5),asin:x(Math.asin,-1,1,97),cos:x(Math.cos,0,Math.PI,97),largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),sin:x(Math.sin,-Math.PI,Math.PI,97),tan:x(Math.tan,0,2*Math.PI,97)})}))},permissions:async function(e){const t=(null==e?void 0:e.permissions_to_check)||M;return C(await Promise.all(Array.from({length:3},(()=>async function(e){const t={};for(const n of e)try{const e=await navigator.permissions.query({name:n});t[n]=e.state.toString()}catch(e){}return t}(t)))),t)},plugins:async function(){const e=[];if(navigator.plugins)for(let t=0;t<navigator.plugins.length;t++){const n=navigator.plugins[t];e.push([n.name,n.filename,n.description].join("|"))}return new Promise((t=>{t({plugins:e})}))},screen:function(){return new Promise((e=>{if("undefined"==typeof matchMedia||"undefined"==typeof screen)return void e(null);const t={is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:T()};E()&&navigator.maxTouchPoints>0&&(t.resolution=function(){const e=window.screen.width,t=window.screen.height,n=Math.max(e,t).toString(),r=Math.min(e,t).toString();return`${n}x${r}`}()),e(t)}))},system:function(){return new Promise((e=>{const t=P();e({platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:t.name,version:t.version},mobile:E(),applePayVersion:I(),cookieEnabled:window.navigator.cookieEnabled})}))},webgl:async function(){const e=k?(F||(F=L()),F):L();if(!e)return{webgl:"unsupported"};try{const t=Array.from({length:R},(()=>function(e){const{canvas:t,gl:n,program:r,buffer:o}=e;try{n.useProgram(r),n.bindBuffer(n.ARRAY_BUFFER,o);const e=n.getAttribLocation(r,"position");n.enableVertexAttribArray(e),n.vertexAttribPointer(e,2,n.FLOAT,!1,0,0),n.viewport(0,0,t.width,t.height),n.clearColor(0,0,0,1),n.clear(n.COLOR_BUFFER_BIT),n.drawArrays(n.LINES,0,274);const i=new Uint8ClampedArray(t.width*t.height*4);return n.readPixels(0,0,t.width,t.height,n.RGBA,n.UNSIGNED_BYTE,i),new ImageData(i,t.width,t.height)}catch(e){return F=null,new ImageData(1,1)}finally{n.bindBuffer(n.ARRAY_BUFFER,null),n.useProgram(null),n.viewport(0,0,n.drawingBufferWidth,n.drawingBufferHeight),n.clearColor(0,0,0,0)}}(e)));return{commonPixelsHash:p(c(t,e.canvas.width,e.canvas.height).data.toString()).toString()}}catch(e){return{webgl:"unsupported"}}},webrtc:async function(e){return new Promise((e=>{let t;try{const n=window.RTCPeerConnection||window.webkitRTCPeerConnection||window.mozRTCPeerConnection;if(!n)return void e({supported:!1,error:"WebRTC not supported"});t=new n({iceCandidatePoolSize:1,iceServers:[]});const r=t;r.createDataChannel("");(async()=>{try{const t={offerToReceiveAudio:!0,offerToReceiveVideo:!0},n=await r.createOffer(t);await r.setLocalDescription(n);const o=n.sdp||"",i=[...new Set((o.match(/extmap:\d+ [^\n\r]+/g)||[]).map((e=>e.replace(/extmap:\d+ /,""))))].sort(),a=e=>{const t=o.match(new RegExp(`m=${e} [^\\s]+ [^\\s]+ ([^\\n\\r]+)`));return t?t[1].split(" "):[]},s=(e,t)=>t.map((t=>{const n=new RegExp(`(rtpmap|fmtp|rtcp-fb):${t} (.+)`,"g"),r=[...o.matchAll(n)];if(!r.length)return null;const i={};return r.forEach((t=>{const[n,r,o]=t,a=o.split("/");"rtpmap"===r?(i.mimeType=`${e}/${a[0]}`,i.clockRate=+a[1],"audio"===e&&(i.channels=+a[2]||1)):"rtcp-fb"===r?(i.feedbackSupport=i.feedbackSupport||[],i.feedbackSupport.push(o)):"fmtp"===r&&(i.sdpFmtpLine=o)})),i})).filter(Boolean),c=s("audio",a("audio")),l=s("video",a("video")),u={audio:{count:c.length,hash:p(N(c))},video:{count:l.length,hash:p(N(l))},extensionsHash:p(N(i))};r.close();const m={supported:!0,...u,candidateType:"host"};e({details:m,hash:p(N(m))})}catch(t){r.close(),e({supported:!0,error:`WebRTC offer failed: ${t.message}`})}})()}catch(n){null==t||t.close(),e({supported:!1,error:`WebRTC error: ${n.message}`})}}))},speech:async function(){return new Promise((e=>{try{if("undefined"==typeof window||!window.speechSynthesis||"function"!=typeof window.speechSynthesis.getVoices)return void e({supported:!1,error:"Speech Synthesis API not supported"});let t=!1,n=null;const r=r=>{if(!t){t=!0,n&&clearTimeout(n);try{const t=r.map((e=>{const t=e=>e.replace(/\\/g,"\\\\").replace(/,/g,"\\,");return[t(e.voiceURI||""),t(e.name||""),t(e.lang||""),e.localService?"1":"0",e.default?"1":"0"].join(",")}));t.sort();const n={voiceCount:r.length,voicesHash:p(N(t))};e({details:n,hash:p(N(n))})}catch(t){e({supported:!0,error:`Voice processing failed: ${t.message}`})}}},o=window.speechSynthesis.getVoices();if(o.length>0)return void r(o);n=setTimeout((()=>{const e=window.speechSynthesis.getVoices();r(e)}),800);const i=()=>{window.speechSynthesis.removeEventListener("voiceschanged",i);const e=window.speechSynthesis.getVoices();r(e)};window.speechSynthesis.addEventListener("voiceschanged",i)}catch(t){e({supported:!1,error:`Speech Synthesis error: ${t.message}`})}}))}},W={intl:async function(){if("undefined"==typeof Intl)return null;try{const e=new Date(Date.UTC(2024,0,15,12,30,45)),t={dateFullFormat:new Intl.DateTimeFormat("en-US",{dateStyle:"full",timeZone:"UTC"}).format(e),dateMediumFormat:new Intl.DateTimeFormat("en-US",{dateStyle:"medium",timeZone:"UTC"}).format(e),timeFormat:new Intl.DateTimeFormat("en-US",{timeStyle:"long",timeZone:"UTC"}).format(e),numberFormat:new Intl.NumberFormat("en-US").format(123456.789),currencyFormat:new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(123456.789),percentFormat:new Intl.NumberFormat("en-US",{style:"percent"}).format(.456),nonLatinDate:new Intl.DateTimeFormat("ar-EG",{timeZone:"UTC"}).format(e),nonLatinNumber:new Intl.NumberFormat("zh-Hans-CN-u-nu-hanidec").format(123456.789)},n=Intl;return"function"==typeof n.ListFormat&&(t.listFormat=new n.ListFormat("en",{type:"conjunction"}).format(["a","b","c"])),"function"==typeof n.DisplayNames&&(t.displayNames=new n.DisplayNames("en",{type:"region"}).of("US")||""),{details:t,hash:p(N(t))}}catch(e){return null}},mathml:async function(){return new Promise((e=>{try{h((async({iframe:t})=>{try{if(!function(e){try{const t=e.createElement("math");t.innerHTML="<mrow><mi>x</mi></mrow>",t.style.position="absolute",t.style.visibility="hidden",e.body.appendChild(t);const n=t.getBoundingClientRect();return e.body.removeChild(t),n.width>0&&n.height>0}catch(e){return!1}}(t))return void e({supported:!1,error:"MathML not supported"});const n=[$("integral","<msubsup><mo>∫</mo><mi>a</mi><mi>b</mi></msubsup><mfrac><mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mrow><mi>g</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mfrac><mi>dx</mi>"),$("fraction","<mfrac><mrow><mi>π</mi><mo>×</mo><msup><mi>r</mi><mn>2</mn></msup></mrow><mrow><mn>2</mn><mi>σ</mi></mrow></mfrac>"),$("matrix","<mo>[</mo><mtable><mtr><mtd><mi>α</mi></mtd><mtd><mi>β</mi></mtd></mtr><mtr><mtd><mi>γ</mi></mtd><mtd><mi>δ</mi></mtd></mtr></mtable><mo>]</mo>"),V(),...j()],r=[];let o="";n.forEach(((e,n)=>{const i=function(e,t){try{const n=t.createElement("math");n.innerHTML=e.replace(/<\/?math>/g,""),n.style.whiteSpace="nowrap",n.style.position="absolute",n.style.visibility="hidden",n.style.top="-9999px",t.body.appendChild(n);const r=n.getBoundingClientRect(),o=(t.defaultView||window).getComputedStyle(n),i={dimensions:{width:r.width,height:r.height},fontInfo:{fontFamily:o.fontFamily,fontSize:o.fontSize,fontWeight:o.fontWeight,fontStyle:o.fontStyle,lineHeight:o.lineHeight,fontVariant:o.fontVariant||"normal",fontStretch:o.fontStretch||"normal",fontSizeAdjust:o.fontSizeAdjust||"none",textRendering:o.textRendering||"auto",fontFeatureSettings:o.fontFeatureSettings||"normal",fontVariantNumeric:o.fontVariantNumeric||"normal",fontKerning:o.fontKerning||"auto"}};return t.body.removeChild(n),i}catch(e){return{error:e.message}}}(e,t);r.push({width:i.dimensions.width,height:i.dimensions.height}),0===n&&i.fontInfo&&(o=p(N(i.fontInfo)))}));const i={fontStyleHash:o,dimensions:r};e({details:i,hash:p(N(i))})}catch(t){e({supported:!1,error:`MathML error: ${t.message}`})}}))}catch(t){e({supported:!1,error:`MathML error: ${t.message}`})}}))},mediadevices:async function(){if("undefined"==typeof navigator||!navigator.mediaDevices||"function"!=typeof navigator.mediaDevices.enumerateDevices)return null;try{const e=await navigator.mediaDevices.enumerateDevices(),t={};for(const n of e)t[n.kind]=(t[n.kind]||0)+1;return{audioinput:t.audioinput||0,audiooutput:t.audiooutput||0,videoinput:t.videoinput||0}}catch(e){return null}}},z={},G={timeout:"true"};function J(){return"1.9.1"}function q(e,t){var n,r;let o=P();if("unknown"===o.name&&t){const e=null===(n=t.system)||void 0===n?void 0:n.browser;(null==e?void 0:e.name)&&(o={name:String(e.name),version:String(e.version||"unknown")})}const a=o.name.toLowerCase(),s=parseInt(o.version.split(".")[0]||"0",10),c=Array.isArray(null==e?void 0:e.exclude)?[...e.exclude]:[],l=[...new Set([...(null==e?void 0:e.stabilize)||[],"always"])];for(const e of l){const t=i[e];if(t)for(const e of t)"browsers"in e&&!(null===(r=e.browsers)||void 0===r?void 0:r.some((e=>{const t=e.match(/(.+?)(>=)(\d+)/);return t?a===t[1]&&s>=+t[3]:a===e})))||c.push(...e.exclude)}return c}function K(e,t){const n=q(t,e),r=Array.isArray(null==t?void 0:t.include)?t.include:[];return function e(t,o=""){const i={};for(const[a,s]of Object.entries(t)){const t=o?`${o}.${a}`:a;if("object"!=typeof s||Array.isArray(s)||null===s){const e=n.some((e=>t.startsWith(e))),o=r.some((e=>t.startsWith(e)));e&&!o||(i[a]=s)}else{const n=e(s,t);Object.keys(n).length>0&&(i[a]=n)}}return i}(e)}const Y="visitor_id";function Z(e){return e.storage_property_name?e.storage_property_name:e.property_name_factory(Y)}const X=`${t}_${Y}`;function Q(e,t){try{localStorage.setItem(Z(t),e)}catch(e){}}const ee="cache";function te(e){try{const t=localStorage.getItem(e.property_name_factory(ee)),n=JSON.parse(t);return n||{}}catch(e){}return{}}function ne(t){return t.cache_lifetime_in_ms>e?Date.now()+e:Date.now()+t.cache_lifetime_in_ms}class re extends Error{constructor(e){super(`HTTP error! status: ${e}`),this.status=e}}let oe=null,ie=null;async function ae(e,t,n,r){const o=await fetch(e,{method:"POST",headers:{"x-api-key":n.api_key,Authorization:"custom-authorized","Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok)throw new re(o.status);const i=await o.json();return i.visitorId&&i.visitorId!==r&&Q(i.visitorId,n),ie=i,function(e,t){if(!e.cache_api_call||!e.cache_lifetime_in_ms)return;!function(e,t){const n={...te(e),...t};try{localStorage.setItem(e.property_name_factory(ee),JSON.stringify(n))}catch(e){}}(e,{apiResponseExpiry:ne(e),apiResponse:t})}(n,i),i}const se=(e,t)=>{if(e.cache_api_call){if(ie)return Promise.resolve(ie);const t=function(e){const t=te(e);if(t&&t.apiResponse&&t.apiResponseExpiry&&Date.now()<=t.apiResponseExpiry)return t.apiResponse;return}(e);if(t)return Promise.resolve(t);if(oe)return oe}const r=`${e.api_endpoint||n}/thumbmark`,o=function(e){try{const t=Z(e);let n=localStorage.getItem(t);return n||t===X||(n=localStorage.getItem(X),n&&Q(n,e)),n}catch(e){return null}}(e),i={components:t,options:e,clientHash:p(N(t)),version:"1.9.1"};if(o&&(i.visitorId=o),e.metadata){const t="function"==typeof e.metadata?e.metadata():e.metadata;if(t){("string"==typeof t?t.length:JSON.stringify(t).length)>1e3?console.error("ThumbmarkJS: Metadata exceeds 1000 characters. Skipping metadata."):i.metadata=t}}const a=e.timeout||5e3,s=async function(e,t,n,r){for(let o=0;o<3;o++){o>0&&await new Promise((e=>setTimeout(e,200*o)));try{return await ae(e,t,n,r)}catch(e){if(e instanceof re||2===o)throw e}}throw new Error("Unreachable")}(r,i,e,o).finally((()=>{oe=null})),c=new Promise((t=>{setTimeout((()=>{const n=te(e);t((null==n?void 0:n.apiResponse)||{info:{timed_out:!0},...o&&{visitorId:o}})}),a)}));return oe=Promise.race([s,c]),oe};async function ce(e,t={}){var o,i;if("undefined"==typeof document||"undefined"==typeof window)return{thumbmark:"",components:{},info:{},version:"1.9.1",error:[{type:"fatal",message:"Browser environment required"}]};try{const a={...r,...e},s=[],c=a.logging&&!sessionStorage.getItem("_tmjs_l")&&Math.random()<1e-4,l={...H,...z,...t},{elapsed:u,resolvedComponents:m,errors:d,pipelineTimings:f}=await le(l,a);s.push(...d);let h={},g={},w={};if(c||a.experimental){const{elapsed:e,resolvedComponents:t,errors:n,pipelineTimings:r}=await le(W,a);h=t,g=e,w=r,s.push(...n)}const v=a.api_key?se(a,m):null;let y=null;if(v)try{y=await v}catch(e){if(e instanceof re&&403===e.status)return{error:[{type:"api_unauthorized",message:"Invalid API key or quota exceeded"}],components:{},info:{},version:"1.9.1",thumbmark:""};s.push({type:e instanceof re?"api_error":"network_error",message:e instanceof Error?e.message:String(e)})}(null===(o=null==y?void 0:y.info)||void 0===o?void 0:o.timed_out)&&s.push({type:"api_timeout",message:"API request timed out"});const S=performance.now(),b=K((null==y?void 0:y.components)||{},a),x=performance.now()-S,C={...m,...b},M=(null==y?void 0:y.info)||{uniqueness:{score:"api only"}};let _,P=0,A=0;if(null==y?void 0:y.thumbmark)_=y.thumbmark;else{const e=performance.now(),t=N(C);P=performance.now()-e;const n=performance.now();_=p(t),A=performance.now()-n}const E="1.9.1";c&&async function(e,t,r,o={},i=[]){var a;const s=`${n}/log`,c={thumbmark:e,components:t,experimental:o,version:"1.9.1",options:r,path:null===(a=null===window||void 0===window?void 0:window.location)||void 0===a?void 0:a.pathname,...i.length>0&&{errors:i}};sessionStorage.setItem("_tmjs_l","1");try{await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})}catch(e){}}(_,C,a,h,s).catch((()=>{}));const T=null!==(i=w["_pipeline.filter"])&&void 0!==i?i:0,I={"_pipeline.dispatch":f["_pipeline.dispatch"],"_pipeline.resolve":f["_pipeline.resolve"],"_pipeline.filter":f["_pipeline.filter"]+T+x,"_pipeline.stringify":P,"_pipeline.hash":A,"_pipeline.assembly":0},R={...u,...g,...f,...I},k=a.performance?{elapsed:R}:{},O=performance.now(),D={...(null==y?void 0:y.visitorId)&&{visitorId:y.visitorId},thumbmark:_,components:C,info:M,version:E,...k,...s.length>0&&{error:s},...Object.keys(h).length>0&&a.experimental&&{experimental:h},...(null==y?void 0:y.requestId)&&{requestId:y.requestId},...(null==y?void 0:y.metadata)&&{metadata:y.metadata}};return R["_pipeline.assembly"]=performance.now()-O,D}catch(e){return{thumbmark:"",components:{},info:{},version:"1.9.1",error:[{type:"fatal",message:e instanceof Error?e.message:String(e)}]}}}async function le(e,t){const n={...r,...t},o=q(n).filter((e=>!e.includes("."))),i=Object.entries(e).filter((([e])=>{var t;return!(null===(t=null==n?void 0:n.exclude)||void 0===t?void 0:t.includes(e))})).filter((([e])=>!o.includes(e))).filter((([e])=>{var t,r,o,i;return(null===(t=null==n?void 0:n.include)||void 0===t?void 0:t.some((e=>e.includes("."))))?null===(r=null==n?void 0:n.include)||void 0===r?void 0:r.some((t=>t.startsWith(e))):0===(null===(o=null==n?void 0:n.include)||void 0===o?void 0:o.length)||(null===(i=null==n?void 0:n.include)||void 0===i?void 0:i.includes(e))})),a=i.map((([e])=>e)),s={},c=performance.now(),l=i.map((([e,n])=>{const r=performance.now(),o=n(t);return s[`_dispatch.${e}`]=performance.now()-r,o})),u=performance.now()-c,m=performance.now(),d=await function(e,t,n){return Promise.all(e.map((e=>{const r=performance.now();let o;const i=e.then((e=>(void 0!==o&&clearTimeout(o),{value:e,elapsed:performance.now()-r}))).catch((e=>(void 0!==o&&clearTimeout(o),{value:n,elapsed:performance.now()-r,error:e instanceof Error?e.message:String(e)}))),a=new Promise((e=>{o=setTimeout((()=>{e({value:n,elapsed:performance.now()-r,error:"timeout"})}),t)}));return Promise.race([i,a])})))}(l,(null==n?void 0:n.timeout)||5e3,G),p=performance.now()-m,f={},h={},g=[];d.forEach(((e,t)=>{var n;const r=a[t];f[r]=null!==(n=e.elapsed)&&void 0!==n?n:0,"timeout"===e.error?g.push({type:"component_timeout",message:`Component '${r}' timed out`,component:r}):e.error&&g.push({type:"component_error",message:e.error,component:r}),null!=e.value&&(h[r]=e.value)}));const w=performance.now(),v=K(h,n),y={"_pipeline.dispatch":u,"_pipeline.resolve":p,"_pipeline.filter":performance.now()-w,...s};return{elapsed:f,resolvedComponents:v,errors:g,pipelineTimings:y}}exports.Thumbmark=class{constructor(e){this.options={...r,...e},this.customComponents={}}async get(e){return ce({...this.options,...e},this.customComponents)}getVersion(){return"1.9.1"}includeComponent(e,t){this.customComponents[e]=t}},exports.filterThumbmarkData=K,exports.getFingerprint=async function(e){try{const t=await ce(o);return e?{hash:t.thumbmark.toString(),data:t.components}:t.thumbmark.toString()}catch(e){throw e}},exports.getFingerprintData=async function(){return(await ce(o)).components},exports.getFingerprintPerformance=async function(){try{const{elapsed:e,resolvedComponents:t}=await le(H,o);return{...t,elapsed:e}}catch(e){throw e}},exports.getThumbmark=ce,exports.getVersion=J,exports.includeComponent=(e,t,n)=>{z[e]=t},exports.setOption=function(e,t){o[e]=t},exports.stabilizationExclusionRules=i,exports.stableStringify=N;
|
|
1
|
+
"use strict";const e=2592e5,t="thumbmark",n="https://api.thumbmarkjs.com",r={exclude:[],include:[],stabilize:["private","iframe"],logging:!0,timeout:5e3,cache_api_call:!0,cache_lifetime_in_ms:0,performance:!1,experimental:!1,simple_request:!1,property_name_factory:e=>`${t}_${e}`};let o={...r};const i={private:[{exclude:["canvas"],browsers:["firefox","safari>=17","brave"]},{exclude:["audio"],browsers:["samsungbrowser","safari"]},{exclude:["fonts"],browsers:["firefox"]},{exclude:["audio.sampleHash","hardware.deviceMemory","header.acceptLanguage.q","system.hardwareConcurrency","plugins"],browsers:["brave"]},{exclude:["tls.extensions"],browsers:["firefox","chrome","safari"]},{exclude:["header.acceptLanguage"],browsers:["edge","chrome"]}],iframe:[{exclude:["system.applePayVersion","system.cookieEnabled"],browsers:["safari"]},{exclude:["permissions"]}],vpn:[{exclude:["ip"]}],always:[{exclude:["speech"],browsers:["brave","firefox"]}]},a="undefined"!=typeof window?window.OfflineAudioContext||window.webkitOfflineAudioContext:null;function s(e){let t=0;for(let n=0;n<e.length;++n)t+=Math.abs(e[n]);return t}function c(e,t,n){if(1===e.length)return e[0];if(3===e.length){const r=e[0].data,o=e[1].data,i=e[2].data,a=new Uint8ClampedArray(r.length);for(let e=0;e<r.length;e++){const t=r[e],n=o[e],s=i[e];a[e]=t===n||t===s?t:n===s?n:t}return new ImageData(a,t,n)}let r=[];for(let t=0;t<e[0].data.length;t++){let n=[];for(let r=0;r<e.length;r++)n.push(e[r].data[t]);r.push(l(n))}const o=new Uint8ClampedArray(r);return new ImageData(o,t,n)}function l(e){if(0===e.length)return 0;const t={};for(const n of e)t[n]=(t[n]||0)+1;let n=e[0];for(const e in t)t[e]>t[n]&&(n=parseInt(e,10));return n}function u(e){return e^=e>>>16,e=Math.imul(e,2246822507),e^=e>>>13,e=Math.imul(e,3266489909),(e^=e>>>16)>>>0}const m=new Uint32Array([597399067,2869860233,951274213,2716044179]);function d(e,t){return e<<t|e>>>32-t}function p(e,t=0){if(t=t?0|t:0,"string"==typeof e&&(e=function(e){if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e).buffer;const t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<128?t.push(r):r<2048?t.push(192|r>>6,128|63&r):r<55296||r>=57344?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return new Uint8Array(t).buffer}(e)),!(e instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");const n=new Uint32Array([t,t,t,t]);!function(e,t){const n=e.byteLength/16|0,r=new Uint32Array(e,0,4*n);for(let e=0;e<n;e++){const n=r.subarray(4*e,4*(e+1));n[0]=Math.imul(n[0],m[0]),n[0]=d(n[0],15),n[0]=Math.imul(n[0],m[1]),t[0]=t[0]^n[0],t[0]=d(t[0],19),t[0]=t[0]+t[1],t[0]=Math.imul(t[0],5)+1444728091,n[1]=Math.imul(n[1],m[1]),n[1]=d(n[1],16),n[1]=Math.imul(n[1],m[2]),t[1]=t[1]^n[1],t[1]=d(t[1],17),t[1]=t[1]+t[2],t[1]=Math.imul(t[1],5)+197830471,n[2]=Math.imul(n[2],m[2]),n[2]=d(n[2],17),n[2]=Math.imul(n[2],m[3]),t[2]=t[2]^n[2],t[2]=d(t[2],15),t[2]=t[2]+t[3],t[2]=Math.imul(t[2],5)+2530024501,n[3]=Math.imul(n[3],m[3]),n[3]=d(n[3],18),n[3]=Math.imul(n[3],m[0]),t[3]=t[3]^n[3],t[3]=d(t[3],13),t[3]=t[3]+t[0],t[3]=Math.imul(t[3],5)+850148119}}(e,n),function(e,t){const n=e.byteLength/16|0,r=e.byteLength%16,o=new Uint32Array(4),i=new Uint8Array(e,16*n,r);switch(r){case 15:o[3]=o[3]^i[14]<<16;case 14:o[3]=o[3]^i[13]<<8;case 13:o[3]=o[3]^i[12],o[3]=Math.imul(o[3],m[3]),o[3]=d(o[3],18),o[3]=Math.imul(o[3],m[0]),t[3]=t[3]^o[3];case 12:o[2]=o[2]^i[11]<<24;case 11:o[2]=o[2]^i[10]<<16;case 10:o[2]=o[2]^i[9]<<8;case 9:o[2]=o[2]^i[8],o[2]=Math.imul(o[2],m[2]),o[2]=d(o[2],17),o[2]=Math.imul(o[2],m[3]),t[2]=t[2]^o[2];case 8:o[1]=o[1]^i[7]<<24;case 7:o[1]=o[1]^i[6]<<16;case 6:o[1]=o[1]^i[5]<<8;case 5:o[1]=o[1]^i[4],o[1]=Math.imul(o[1],m[1]),o[1]=d(o[1],16),o[1]=Math.imul(o[1],m[2]),t[1]=t[1]^o[1];case 4:o[0]=o[0]^i[3]<<24;case 3:o[0]=o[0]^i[2]<<16;case 2:o[0]=o[0]^i[1]<<8;case 1:o[0]=o[0]^i[0],o[0]=Math.imul(o[0],m[0]),o[0]=d(o[0],15),o[0]=Math.imul(o[0],m[1]),t[0]=t[0]^o[0]}}(e,n),function(e,t){t[0]=t[0]^e.byteLength,t[1]=t[1]^e.byteLength,t[2]=t[2]^e.byteLength,t[3]=t[3]^e.byteLength,t[0]=t[0]+t[1]|0,t[0]=t[0]+t[2]|0,t[0]=t[0]+t[3]|0,t[1]=t[1]+t[0]|0,t[2]=t[2]+t[0]|0,t[3]=t[3]+t[0]|0,t[0]=u(t[0]),t[1]=u(t[1]),t[2]=u(t[2]),t[3]=u(t[3]),t[0]=t[0]+t[1]|0,t[0]=t[0]+t[2]|0,t[0]=t[0]+t[3]|0,t[1]=t[1]+t[0]|0,t[2]=t[2]+t[0]|0,t[3]=t[3]+t[0]|0}(e,n);const r=new Uint8Array(n.buffer);return Array.from(r).map((e=>e.toString(16).padStart(2,"0"))).join("")}const f=280;async function h(e){for(var t;!document.body;)await g(50);const n=document.createElement("iframe");n.setAttribute("frameBorder","0");const r=n.style;r.setProperty("position","fixed"),r.setProperty("display","block","important"),r.setProperty("visibility","visible"),r.setProperty("border","0"),r.setProperty("opacity","0"),n.src="about:blank",document.body.appendChild(n);const o=n.contentDocument||(null===(t=n.contentWindow)||void 0===t?void 0:t.document);if(!o)throw new Error("Iframe document is not accessible");e({iframe:o}),setTimeout((()=>{document.body.removeChild(n)}),0)}function g(e,t){return new Promise((n=>setTimeout(n,e,t)))}const w=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],v=["monospace","sans-serif","serif"];function y(e,t){return e.font=`72px ${t}`,e.measureText("WwMmLli0Oo").width}function S(){var e;const t=document.createElement("canvas"),n=null!==(e=t.getContext("webgl"))&&void 0!==e?e:t.getContext("experimental-webgl");if(n&&"getParameter"in n)try{const e=(n.getParameter(n.VENDOR)||"").toString(),t=(n.getParameter(n.RENDERER)||"").toString();let r={vendor:e,renderer:t,version:(n.getParameter(n.VERSION)||"").toString(),shadingLanguageVersion:(n.getParameter(n.SHADING_LANGUAGE_VERSION)||"").toString()};if(!t.length||!e.length){const e=n.getExtension("WEBGL_debug_renderer_info");if(e){const t=(n.getParameter(e.UNMASKED_VENDOR_WEBGL)||"").toString(),o=(n.getParameter(e.UNMASKED_RENDERER_WEBGL)||"").toString();t&&(r.vendorUnmasked=t),o&&(r.rendererUnmasked=o)}}return r}catch(e){}return"undefined"}function b(){const e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}const x=(e,t,n,r)=>{const o=(n-t)/r;let i=0;for(let n=0;n<r;n++){i+=e(t+(n+.5)*o)}return i*o};function _(e,t){const n={};return t.forEach((t=>{const r=function(e){if(0===e.length)return null;const t={};e.forEach((e=>{const n=String(e);t[n]=(t[n]||0)+1}));let n=e[0],r=1;return Object.keys(t).forEach((e=>{t[e]>r&&(n=e,r=t[e])})),n}(e.map((e=>t in e?e[t]:void 0)).filter((e=>void 0!==e)));r&&(n[t]=r)})),n}const M=["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"];const C=new Map;function P(){if("undefined"==typeof navigator)return{name:"unknown",version:"unknown"};const e=!!navigator.brave,t=(e?"B|":"N|")+navigator.userAgent,n=C.get(t);if(n)return n;const r=[{name:"Brave",detect:()=>e}];let o;for(const e of r)if(e.detect()){const n=A(navigator.userAgent);return o={name:e.name,version:n.version},C.set(t,o),o}return o=A(navigator.userAgent),C.set(t,o),o}function A(e){var t,n,r,o,i,a;const s=[/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>EdgA|EdgiOS|Edg)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>OPR|OPX)\/(?<version>\d+(?:\.\d+)+)/,/Opera[\s\/](?<version>\d+(?:\.\d+)+)/,/Opera Mini\/(?<version>\d+(?:\.\d+)+)/,/Opera Mobi\/(?<version>\d+(?:\.\d+)+)/,/(?<name>Vivaldi)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>CriOS)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>FxiOS)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>Chrome|Chromium)\/(?<version>\d+(?:\.\d+)+)/,/(?<name>Firefox|Waterfox|Iceweasel|IceCat)\/(?<version>\d+(?:\.\d+)+)/,/Version\/(?<version1>[\d.]+).*Safari\/[\d.]+|(?<name>Safari)\/(?<version2>[\d.]+)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)+)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)+)/],c={edg:"Edge",edga:"Edge",edgios:"Edge",opr:"Opera",opx:"Opera",crios:"Chrome",fxios:"Firefox",samsung:"SamsungBrowser",vivaldi:"Vivaldi"};for(const l of s){const s=e.match(l);if(s){let e=null===(t=s.groups)||void 0===t?void 0:t.name,u=(null===(n=s.groups)||void 0===n?void 0:n.version)||(null===(r=s.groups)||void 0===r?void 0:r.version1)||(null===(o=s.groups)||void 0===o?void 0:o.version2);if(e||!(null===(i=s.groups)||void 0===i?void 0:i.version1)&&!(null===(a=s.groups)||void 0===a?void 0:a.version2)||(e="Safari"),!e&&l.source.includes("Opera Mini")&&(e="Opera Mini"),!e&&l.source.includes("Opera Mobi")&&(e="Opera Mobi"),!e&&l.source.includes("Opera")&&(e="Opera"),!e&&s[1]&&(e=s[1]),!u&&s[2]&&(u=s[2]),e){return{name:c[e.toLowerCase()]||e,version:u||"unknown"}}}}return{name:"unknown",version:"unknown"}}function E(){if("undefined"==typeof navigator||!navigator.userAgent)return!1;const e=navigator.userAgent;return/Mobi|Android|iPhone|iPod|IEMobile|Opera Mini|Opera Mobi|webOS|BlackBerry|Windows Phone/i.test(e)&&!/iPad/i.test(e)}function T(){let e=[];const t={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(t).forEach((n=>{t[n].forEach((t=>{matchMedia(`(${n}: ${t})`).matches&&e.push(`${n}: ${t}`)}))})),e}function R(){if("https:"===window.location.protocol&&"function"==typeof window.ApplePaySession)try{const e=window.ApplePaySession.supportsVersion;for(let t=15;t>0;t--)if(e(t))return t}catch(e){return 0}return 0}const k="SamsungBrowser"!==P().name?1:3,I="Brave"!==P().name,O=137,L=(()=>{const e=new Float32Array(548),t=2*Math.PI/O;for(let n=0;n<O;n++){const r=n*t;e[4*n]=0,e[4*n+1]=0,e[4*n+2]=100*Math.cos(r),e[4*n+3]=50*Math.sin(r)}return e})();let B=null;function D(){try{if("undefined"==typeof document)return null;const e=document.createElement("canvas");e.width=200,e.height=100;const t=e.getContext("webgl");if(!t)return null;e.addEventListener("webglcontextlost",(e=>{e.preventDefault(),B=null}),{once:!0});const n=t.createShader(t.VERTEX_SHADER),r=t.createShader(t.FRAGMENT_SHADER);if(!n||!r)return null;if(t.shaderSource(n,"\n attribute vec2 position;\n void main() {\n gl_Position = vec4(position, 0.0, 1.0);\n }\n"),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))return null;if(t.shaderSource(r,"\n precision mediump float;\n void main() {\n gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color\n }\n"),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))return null;const o=t.createProgram();if(!o)return null;if(t.attachShader(o,n),t.attachShader(o,r),t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS))return null;const i=t.createBuffer();return i?(t.bindBuffer(t.ARRAY_BUFFER,i),t.bufferData(t.ARRAY_BUFFER,L,t.STATIC_DRAW),t.bindBuffer(t.ARRAY_BUFFER,null),{canvas:e,gl:t,program:o,buffer:i}):null}catch(e){return null}}function $(e){const t=new Set;return function e(n){if(n&&n.toJSON&&"function"==typeof n.toJSON&&(n=n.toJSON()),void 0===n)return;if("number"==typeof n)return isFinite(n)?""+n:"null";if("object"!=typeof n)return JSON.stringify(n);let r,o;if(Array.isArray(n)){for(o="[",r=0;r<n.length;r++)r&&(o+=","),o+=e(n[r])||"null";return o+"]"}if(null===n)return"null";if(t.has(n))throw new TypeError("Converting circular structure to JSON");t.add(n);const i=Object.keys(n).sort();for(o="",r=0;r<i.length;r++){const t=i[r],a=e(n[t]);a&&(o&&(o+=","),o+=JSON.stringify(t)+":"+a)}return t.delete(n),"{"+o+"}"}(e)||""}const N=["𝔄","𝔅","ℭ","𝔇","𝔈","𝔉","𝔸","𝔹","ℂ","𝔻","𝔼","𝔽"],F=["β","ψ","λ","ε","ζ","α","ξ","μ","ρ","φ","κ","τ","η","σ","ι","ω","γ","ν","χ","δ","θ","π","υ","ο"];function U(e,t){return`<math><mrow>${t}</mrow></math>`}function V(){let e="<mo>∏</mo>";return N.forEach(((t,n)=>{const r=2*n,o=F.slice(r,r+2);2===o.length&&(e+=`<mmultiscripts><mi>${t}</mi><none/><mi>${o[1]}</mi><mprescripts></mprescripts><mi>${o[0]}</mi><none/></mmultiscripts>`)})),U(0,`<munderover><mmultiscripts>${e}</mmultiscripts></munderover>`)}function j(){const e=[];return N.forEach(((t,n)=>{const r=2*n,o=F.slice(r,r+2);2===o.length&&e.push(U(0,`<mmultiscripts><mi>${t}</mi><none/><mi>${o[1]}</mi><mprescripts></mprescripts><mi>${o[0]}</mi><none/></mmultiscripts>`))})),e}const W={audio:async function(){return a?async function(){return new Promise(((e,t)=>{try{const t=new a(1,5e3,44100),n=t.createBufferSource(),r=t.createOscillator();r.frequency.value=1e3;const o=t.createDynamicsCompressor();let i;o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.2,r.connect(o),o.connect(t.destination),r.start(),t.oncomplete=r=>{i=r.renderedBuffer.getChannelData(0),e({sampleHash:s(i),maxChannels:t.destination.maxChannelCount,channelCountMode:n.channelCountMode})},t.startRendering()}catch(e){t(e)}}))}():null},canvas:async function(){return new Promise((e=>{const t=Array.from({length:3},(()=>function(){const e=document.createElement("canvas"),t=e.getContext("2d");if(!t)return null;e.width=f,e.height=20;const n=t.createLinearGradient(0,0,e.width,e.height);n.addColorStop(0,"red"),n.addColorStop(1/6,"orange"),n.addColorStop(2/6,"yellow"),n.addColorStop(.5,"green"),n.addColorStop(4/6,"blue"),n.addColorStop(5/6,"indigo"),n.addColorStop(1,"violet"),t.fillStyle=n,t.fillRect(0,0,e.width,e.height);const r="Random Text WMwmil10Oo";return t.font="23.123px Arial",t.fillStyle="black",t.fillText(r,-5,15),t.fillStyle="rgba(0, 0, 255, 0.5)",t.fillText(r,-3.3,17.7),t.beginPath(),t.moveTo(0,0),t.lineTo(2*e.width/7,e.height),t.strokeStyle="white",t.lineWidth=2,t.stroke(),t.getImageData(0,0,e.width,e.height)}())).filter((e=>null!==e));0!==t.length?e({commonPixelsHash:p(c(t,f,20).data.toString()).toString()}):e(null)}))},fonts:async function(e){return new Promise((e=>{try{h((async({iframe:t})=>{const n=t.createElement("canvas").getContext("2d");if(!n)return void e(null);const r=v.map((e=>y(n,e)));let o={};w.forEach((e=>{const t=y(n,e);r.includes(t)||(o[e]=t)})),e(o)}))}catch(t){e(null)}}))},hardware:function(){return new Promise(((e,t)=>{const n=void 0!==navigator.deviceMemory?navigator.deviceMemory:0,r=window.performance&&window.performance.memory?window.performance.memory:0;e({videocard:S(),architecture:b(),deviceMemory:n.toString()||"undefined",jsHeapSizeLimit:r.jsHeapSizeLimit||0})}))},locales:function(){return new Promise((e=>{e({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}))},math:function(){return new Promise((e=>{e({acos:Math.acos(.5),asin:x(Math.asin,-1,1,97),cos:x(Math.cos,0,Math.PI,97),largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),sin:x(Math.sin,-Math.PI,Math.PI,97),tan:x(Math.tan,0,2*Math.PI,97)})}))},permissions:async function(e){const t=(null==e?void 0:e.permissions_to_check)||M;return _(await Promise.all(Array.from({length:3},(()=>async function(e){const t={};for(const n of e)try{const e=await navigator.permissions.query({name:n});t[n]=e.state.toString()}catch(e){}return t}(t)))),t)},plugins:async function(){const e=[];if(navigator.plugins)for(let t=0;t<navigator.plugins.length;t++){const n=navigator.plugins[t];e.push([n.name,n.filename,n.description].join("|"))}return new Promise((t=>{t({plugins:e})}))},screen:function(){return new Promise((e=>{if("undefined"==typeof matchMedia||"undefined"==typeof screen)return void e(null);const t={is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:T()};E()&&navigator.maxTouchPoints>0&&(t.resolution=function(){const e=window.screen.width,t=window.screen.height,n=Math.max(e,t).toString(),r=Math.min(e,t).toString();return`${n}x${r}`}()),e(t)}))},system:function(){return new Promise((e=>{const t=P();e({platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:t.name,version:t.version},mobile:E(),applePayVersion:R(),cookieEnabled:window.navigator.cookieEnabled})}))},webgl:async function(){const e=I?(B||(B=D()),B):D();if(!e)return{webgl:"unsupported"};try{const t=Array.from({length:k},(()=>function(e){const{canvas:t,gl:n,program:r,buffer:o}=e;try{n.useProgram(r),n.bindBuffer(n.ARRAY_BUFFER,o);const e=n.getAttribLocation(r,"position");n.enableVertexAttribArray(e),n.vertexAttribPointer(e,2,n.FLOAT,!1,0,0),n.viewport(0,0,t.width,t.height),n.clearColor(0,0,0,1),n.clear(n.COLOR_BUFFER_BIT),n.drawArrays(n.LINES,0,274);const i=new Uint8ClampedArray(t.width*t.height*4);return n.readPixels(0,0,t.width,t.height,n.RGBA,n.UNSIGNED_BYTE,i),new ImageData(i,t.width,t.height)}catch(e){return B=null,new ImageData(1,1)}finally{n.bindBuffer(n.ARRAY_BUFFER,null),n.useProgram(null),n.viewport(0,0,n.drawingBufferWidth,n.drawingBufferHeight),n.clearColor(0,0,0,0)}}(e)));return{commonPixelsHash:p(c(t,e.canvas.width,e.canvas.height).data.toString()).toString()}}catch(e){return{webgl:"unsupported"}}},webrtc:async function(e){return new Promise((e=>{let t;try{const n=window.RTCPeerConnection||window.webkitRTCPeerConnection||window.mozRTCPeerConnection;if(!n)return void e({supported:!1,error:"WebRTC not supported"});t=new n({iceCandidatePoolSize:1,iceServers:[]});const r=t;r.createDataChannel("");(async()=>{try{const t={offerToReceiveAudio:!0,offerToReceiveVideo:!0},n=await r.createOffer(t);await r.setLocalDescription(n);const o=n.sdp||"",i=[...new Set((o.match(/extmap:\d+ [^\n\r]+/g)||[]).map((e=>e.replace(/extmap:\d+ /,""))))].sort(),a=e=>{const t=o.match(new RegExp(`m=${e} [^\\s]+ [^\\s]+ ([^\\n\\r]+)`));return t?t[1].split(" "):[]},s=(e,t)=>t.map((t=>{const n=new RegExp(`(rtpmap|fmtp|rtcp-fb):${t} (.+)`,"g"),r=[...o.matchAll(n)];if(!r.length)return null;const i={};return r.forEach((t=>{const[n,r,o]=t,a=o.split("/");"rtpmap"===r?(i.mimeType=`${e}/${a[0]}`,i.clockRate=+a[1],"audio"===e&&(i.channels=+a[2]||1)):"rtcp-fb"===r?(i.feedbackSupport=i.feedbackSupport||[],i.feedbackSupport.push(o)):"fmtp"===r&&(i.sdpFmtpLine=o)})),i})).filter(Boolean),c=s("audio",a("audio")),l=s("video",a("video")),u={audio:{count:c.length,hash:p($(c))},video:{count:l.length,hash:p($(l))},extensionsHash:p($(i))};r.close();const m={supported:!0,...u,candidateType:"host"};e({details:m,hash:p($(m))})}catch(t){r.close(),e({supported:!0,error:`WebRTC offer failed: ${t.message}`})}})()}catch(n){null==t||t.close(),e({supported:!1,error:`WebRTC error: ${n.message}`})}}))},speech:async function(){return new Promise((e=>{try{if("undefined"==typeof window||!window.speechSynthesis||"function"!=typeof window.speechSynthesis.getVoices)return void e({supported:!1,error:"Speech Synthesis API not supported"});let t=!1,n=null;const r=r=>{if(!t){t=!0,n&&clearTimeout(n);try{const t=r.map((e=>{const t=e=>e.replace(/\\/g,"\\\\").replace(/,/g,"\\,");return[t(e.voiceURI||""),t(e.name||""),t(e.lang||""),e.localService?"1":"0",e.default?"1":"0"].join(",")}));t.sort();const n={voiceCount:r.length,voicesHash:p($(t))};e({details:n,hash:p($(n))})}catch(t){e({supported:!0,error:`Voice processing failed: ${t.message}`})}}},o=window.speechSynthesis.getVoices();if(o.length>0)return void r(o);n=setTimeout((()=>{const e=window.speechSynthesis.getVoices();r(e)}),800);const i=()=>{window.speechSynthesis.removeEventListener("voiceschanged",i);const e=window.speechSynthesis.getVoices();r(e)};window.speechSynthesis.addEventListener("voiceschanged",i)}catch(t){e({supported:!1,error:`Speech Synthesis error: ${t.message}`})}}))}},H={mathml:async function(){return new Promise((e=>{try{h((async({iframe:t})=>{try{if(!function(e){try{const t=e.createElement("math");t.innerHTML="<mrow><mi>x</mi></mrow>",t.style.position="absolute",t.style.visibility="hidden",e.body.appendChild(t);const n=t.getBoundingClientRect();return e.body.removeChild(t),n.width>0&&n.height>0}catch(e){return!1}}(t))return void e({supported:!1,error:"MathML not supported"});const n=[U("integral","<msubsup><mo>∫</mo><mi>a</mi><mi>b</mi></msubsup><mfrac><mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mrow><mi>g</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mfrac><mi>dx</mi>"),U("fraction","<mfrac><mrow><mi>π</mi><mo>×</mo><msup><mi>r</mi><mn>2</mn></msup></mrow><mrow><mn>2</mn><mi>σ</mi></mrow></mfrac>"),U("matrix","<mo>[</mo><mtable><mtr><mtd><mi>α</mi></mtd><mtd><mi>β</mi></mtd></mtr><mtr><mtd><mi>γ</mi></mtd><mtd><mi>δ</mi></mtd></mtr></mtable><mo>]</mo>"),V(),...j()],r=[];let o="";n.forEach(((e,n)=>{const i=function(e,t){try{const n=t.createElement("math");n.innerHTML=e.replace(/<\/?math>/g,""),n.style.whiteSpace="nowrap",n.style.position="absolute",n.style.visibility="hidden",n.style.top="-9999px",t.body.appendChild(n);const r=n.getBoundingClientRect(),o=(t.defaultView||window).getComputedStyle(n),i={dimensions:{width:r.width,height:r.height},fontInfo:{fontFamily:o.fontFamily,fontSize:o.fontSize,fontWeight:o.fontWeight,fontStyle:o.fontStyle,lineHeight:o.lineHeight,fontVariant:o.fontVariant||"normal",fontStretch:o.fontStretch||"normal",fontSizeAdjust:o.fontSizeAdjust||"none",textRendering:o.textRendering||"auto",fontFeatureSettings:o.fontFeatureSettings||"normal",fontVariantNumeric:o.fontVariantNumeric||"normal",fontKerning:o.fontKerning||"auto"}};return t.body.removeChild(n),i}catch(e){return{error:e.message}}}(e,t);r.push({width:i.dimensions.width,height:i.dimensions.height}),0===n&&i.fontInfo&&(o=p($(i.fontInfo)))}));const i={fontStyleHash:o,dimensions:r};e({details:i,hash:p($(i))})}catch(t){e({supported:!1,error:`MathML error: ${t.message}`})}}))}catch(t){e({supported:!1,error:`MathML error: ${t.message}`})}}))}},z={},G={timeout:"true"};function q(){return"1.10.0"}function J(e,t){var n,r;let o=P();if("unknown"===o.name&&t){const e=null===(n=t.system)||void 0===n?void 0:n.browser;(null==e?void 0:e.name)&&(o={name:String(e.name),version:String(e.version||"unknown")})}const a=o.name.toLowerCase(),s=parseInt(o.version.split(".")[0]||"0",10),c=Array.isArray(null==e?void 0:e.exclude)?[...e.exclude]:[],l=[...new Set([...(null==e?void 0:e.stabilize)||[],"always"])];for(const e of l){const t=i[e];if(t)for(const e of t)"browsers"in e&&!(null===(r=e.browsers)||void 0===r?void 0:r.some((e=>{const t=e.match(/(.+?)(>=)(\d+)/);return t?a===t[1]&&s>=+t[3]:a===e})))||c.push(...e.exclude)}return c}function K(e,t){const n=J(t,e),r=Array.isArray(null==t?void 0:t.include)?t.include:[];return function e(t,o=""){const i={};for(const[a,s]of Object.entries(t)){const t=o?`${o}.${a}`:a;if("object"!=typeof s||Array.isArray(s)||null===s){const e=n.some((e=>t.startsWith(e))),o=r.some((e=>t.startsWith(e)));e&&!o||(i[a]=s)}else{const n=e(s,t);Object.keys(n).length>0&&(i[a]=n)}}return i}(e)}const Y="visitor_id";function X(e){return e.storage_property_name?e.storage_property_name:e.property_name_factory(Y)}const Z=`${t}_${Y}`;function Q(e,t){try{localStorage.setItem(X(t),e)}catch(e){}}const ee="cache";function te(e){try{const t=localStorage.getItem(e.property_name_factory(ee)),n=JSON.parse(t);return n||{}}catch(e){}return{}}function ne(t){return t.cache_lifetime_in_ms>e?Date.now()+e:Date.now()+t.cache_lifetime_in_ms}class re extends Error{constructor(e){super(`HTTP error! status: ${e}`),this.status=e}}let oe=null,ie=null;async function ae(e,t,n,r){const o=n.simple_request?{"Content-Type":"text/plain"}:{"x-api-key":n.api_key,Authorization:"custom-authorized","Content-Type":"application/json"},i=await fetch(e,{method:"POST",headers:o,body:JSON.stringify(t)});if(!i.ok)throw new re(i.status);const a=await i.json();return a.visitorId&&a.visitorId!==r&&Q(a.visitorId,n),ie=a,function(e,t){if(!e.cache_api_call||!e.cache_lifetime_in_ms)return;!function(e,t){const n={...te(e),...t};try{localStorage.setItem(e.property_name_factory(ee),JSON.stringify(n))}catch(e){}}(e,{apiResponseExpiry:ne(e),apiResponse:t})}(n,a),a}const se=(e,t)=>{if(e.cache_api_call){if(ie)return Promise.resolve(ie);const t=function(e){const t=te(e);if(t&&t.apiResponse&&t.apiResponseExpiry&&Date.now()<=t.apiResponseExpiry)return t.apiResponse;return}(e);if(t)return Promise.resolve(t);if(oe)return oe}const r=e.api_endpoint||n;let o;try{const e=new URL(r);o="/"!==e.pathname||r.endsWith("/")?r:`${e.origin}/thumbmark`}catch(e){o=`${r}/thumbmark`}const i=function(e){try{const t=X(e);let n=localStorage.getItem(t);return n||t===Z||(n=localStorage.getItem(Z),n&&Q(n,e)),n}catch(e){return null}}(e),{api_key:a,...s}=e,c={components:t,options:s,clientHash:p($(t)),version:"1.10.0"};if(i&&(c.visitorId=i),e.metadata){const t="function"==typeof e.metadata?e.metadata():e.metadata;if(t){("string"==typeof t?t.length:JSON.stringify(t).length)>1e3?console.error("ThumbmarkJS: Metadata exceeds 1000 characters. Skipping metadata."):c.metadata=t}}const l=e.timeout||5e3,u=async function(e,t,n,r){for(let o=0;o<3;o++){o>0&&await new Promise((e=>setTimeout(e,200*o)));try{return await ae(e,t,n,r)}catch(e){if(e instanceof re||2===o)throw e}}throw new Error("Unreachable")}(o,c,e,i).finally((()=>{oe=null})),m=new Promise((t=>{setTimeout((()=>{const n=te(e);t((null==n?void 0:n.apiResponse)||{info:{timed_out:!0},...i&&{visitorId:i}})}),l)}));return oe=Promise.race([u,m]),oe};async function ce(e,t={}){var o,i;if("undefined"==typeof document||"undefined"==typeof window)return{thumbmark:"",components:{},info:{},version:"1.10.0",error:[{type:"fatal",message:"Browser environment required"}]};try{const a={...r,...e},s=[],c=a.logging&&!sessionStorage.getItem("_tmjs_l")&&Math.random()<1e-4,l={...W,...z,...t},{elapsed:u,resolvedComponents:m,errors:d,pipelineTimings:f}=await le(l,a);s.push(...d);let h={},g={},w={};if(c||a.experimental){const{elapsed:e,resolvedComponents:t,errors:n,pipelineTimings:r}=await le(H,a);h=t,g=e,w=r,s.push(...n)}const v=a.api_key||a.simple_request?se(a,m):null;let y=null;if(v)try{y=await v}catch(e){if(e instanceof re&&403===e.status)return{error:[{type:"api_unauthorized",message:"Invalid API key or quota exceeded"}],components:{},info:{},version:"1.10.0",thumbmark:""};s.push({type:e instanceof re?"api_error":"network_error",message:e instanceof Error?e.message:String(e)})}(null===(o=null==y?void 0:y.info)||void 0===o?void 0:o.timed_out)&&s.push({type:"api_timeout",message:"API request timed out"});const S=performance.now(),b=K((null==y?void 0:y.components)||{},a),x=performance.now()-S,_={...m,...b},M=(null==y?void 0:y.info)||{uniqueness:{score:"api only"}};let C,P=0,A=0;if(null==y?void 0:y.thumbmark)C=y.thumbmark;else{const e=performance.now(),t=$(_);P=performance.now()-e;const n=performance.now();C=p(t),A=performance.now()-n}const E="1.10.0";c&&async function(e,t,r,o={},i=[]){var a;const s=`${n}/log`,c={thumbmark:e,components:t,experimental:o,version:"1.10.0",options:r,path:null===(a=null===window||void 0===window?void 0:window.location)||void 0===a?void 0:a.pathname,...i.length>0&&{errors:i}};sessionStorage.setItem("_tmjs_l","1");try{await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})}catch(e){}}(C,_,a,h,s).catch((()=>{}));const T=null!==(i=w["_pipeline.filter"])&&void 0!==i?i:0,R={"_pipeline.dispatch":f["_pipeline.dispatch"],"_pipeline.resolve":f["_pipeline.resolve"],"_pipeline.filter":f["_pipeline.filter"]+T+x,"_pipeline.stringify":P,"_pipeline.hash":A,"_pipeline.assembly":0},k={...u,...g,...f,...R},I=a.performance?{elapsed:k}:{},O=performance.now(),L={...(null==y?void 0:y.visitorId)&&{visitorId:y.visitorId},thumbmark:C,components:_,info:M,version:E,...I,...s.length>0&&{error:s},...Object.keys(h).length>0&&a.experimental&&{experimental:h},...(null==y?void 0:y.requestId)&&{requestId:y.requestId},...(null==y?void 0:y.metadata)&&{metadata:y.metadata}};return k["_pipeline.assembly"]=performance.now()-O,L}catch(e){return{thumbmark:"",components:{},info:{},version:"1.10.0",error:[{type:"fatal",message:e instanceof Error?e.message:String(e)}]}}}async function le(e,t){const n={...r,...t},o=J(n).filter((e=>!e.includes("."))),i=Object.entries(e).filter((([e])=>{var t;return!(null===(t=null==n?void 0:n.exclude)||void 0===t?void 0:t.includes(e))})).filter((([e])=>!o.includes(e))).filter((([e])=>{var t,r,o,i;return(null===(t=null==n?void 0:n.include)||void 0===t?void 0:t.some((e=>e.includes("."))))?null===(r=null==n?void 0:n.include)||void 0===r?void 0:r.some((t=>t.startsWith(e))):0===(null===(o=null==n?void 0:n.include)||void 0===o?void 0:o.length)||(null===(i=null==n?void 0:n.include)||void 0===i?void 0:i.includes(e))})),a=i.map((([e])=>e)),s={},c=performance.now(),l=i.map((([e,n])=>{const r=performance.now(),o=n(t);return s[`_dispatch.${e}`]=performance.now()-r,o})),u=performance.now()-c,m=performance.now(),d=await function(e,t,n){return Promise.all(e.map((e=>{const r=performance.now();let o;const i=e.then((e=>(void 0!==o&&clearTimeout(o),{value:e,elapsed:performance.now()-r}))).catch((e=>(void 0!==o&&clearTimeout(o),{value:n,elapsed:performance.now()-r,error:e instanceof Error?e.message:String(e)}))),a=new Promise((e=>{o=setTimeout((()=>{e({value:n,elapsed:performance.now()-r,error:"timeout"})}),t)}));return Promise.race([i,a])})))}(l,(null==n?void 0:n.timeout)||5e3,G),p=performance.now()-m,f={},h={},g=[];d.forEach(((e,t)=>{var n;const r=a[t];f[r]=null!==(n=e.elapsed)&&void 0!==n?n:0,"timeout"===e.error?g.push({type:"component_timeout",message:`Component '${r}' timed out`,component:r}):e.error&&g.push({type:"component_error",message:e.error,component:r}),null!=e.value&&(h[r]=e.value)}));const w=performance.now(),v=K(h,n),y={"_pipeline.dispatch":u,"_pipeline.resolve":p,"_pipeline.filter":performance.now()-w,...s};return{elapsed:f,resolvedComponents:v,errors:g,pipelineTimings:y}}exports.Thumbmark=class{constructor(e){this.options={...r,...e},this.customComponents={}}async get(e){return ce({...this.options,...e},this.customComponents)}getVersion(){return"1.10.0"}includeComponent(e,t){this.customComponents[e]=t}},exports.filterThumbmarkData=K,exports.getFingerprint=async function(e){try{const t=await ce(o);return e?{hash:t.thumbmark.toString(),data:t.components}:t.thumbmark.toString()}catch(e){throw e}},exports.getFingerprintData=async function(){return(await ce(o)).components},exports.getFingerprintPerformance=async function(){try{const{elapsed:e,resolvedComponents:t}=await le(W,o);return{...t,elapsed:e}}catch(e){throw e}},exports.getThumbmark=ce,exports.getVersion=q,exports.includeComponent=(e,t,n)=>{z[e]=t},exports.setOption=function(e,t){o[e]=t},exports.stabilizationExclusionRules=i,exports.stableStringify=$;
|
|
2
2
|
//# sourceMappingURL=thumbmark.cjs.js.map
|