@ginger-ai/ginger-js 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -0
- package/dist/ginger.cjs.js +2 -0
- package/dist/ginger.cjs.js.map +1 -0
- package/dist/ginger.esm.d.ts +294 -0
- package/dist/ginger.esm.js +2 -0
- package/dist/ginger.esm.js.map +1 -0
- package/dist/ginger.umd.js +2 -0
- package/dist/ginger.umd.js.map +1 -0
- package/dist/types/behaviour/index.d.ts +49 -0
- package/dist/types/behaviour/index.d.ts.map +1 -0
- package/dist/types/client/index.d.ts +35 -0
- package/dist/types/client/index.d.ts.map +1 -0
- package/dist/types/core/constants.d.ts +5 -0
- package/dist/types/core/constants.d.ts.map +1 -0
- package/dist/types/core/dto/bot-detector.dto.d.ts +30 -0
- package/dist/types/core/dto/bot-detector.dto.d.ts.map +1 -0
- package/dist/types/core/dto/device-detector.dto.d.ts +54 -0
- package/dist/types/core/dto/device-detector.dto.d.ts.map +1 -0
- package/dist/types/core/dto/fingerprint.dto.d.ts +29 -0
- package/dist/types/core/dto/fingerprint.dto.d.ts.map +1 -0
- package/dist/types/core/dto/ginger.dto.d.ts +73 -0
- package/dist/types/core/dto/ginger.dto.d.ts.map +1 -0
- package/dist/types/core/dto/incognito-detector.dto.d.ts +4 -0
- package/dist/types/core/dto/incognito-detector.dto.d.ts.map +1 -0
- package/dist/types/core/dto/index.d.ts +10 -0
- package/dist/types/core/dto/index.d.ts.map +1 -0
- package/dist/types/core/dto/metrics.dto.d.ts +19 -0
- package/dist/types/core/dto/metrics.dto.d.ts.map +1 -0
- package/dist/types/core/dto/os-detector.dto.d.ts +6 -0
- package/dist/types/core/dto/os-detector.dto.d.ts.map +1 -0
- package/dist/types/core/dto/tor-detector.dto.d.ts +5 -0
- package/dist/types/core/dto/tor-detector.dto.d.ts.map +1 -0
- package/dist/types/core/helpers.d.ts +8 -0
- package/dist/types/core/helpers.d.ts.map +1 -0
- package/dist/types/core/http/httpClient.d.ts +28 -0
- package/dist/types/core/http/httpClient.d.ts.map +1 -0
- package/dist/types/core/http/request.d.ts +4 -0
- package/dist/types/core/http/request.d.ts.map +1 -0
- package/dist/types/core/index.d.ts +6 -0
- package/dist/types/core/index.d.ts.map +1 -0
- package/dist/types/core/util/error.d.ts +25 -0
- package/dist/types/core/util/error.d.ts.map +1 -0
- package/dist/types/core/util/generate-requestid.d.ts +2 -0
- package/dist/types/core/util/generate-requestid.d.ts.map +1 -0
- package/dist/types/device/components/audio/audio.d.ts +2 -0
- package/dist/types/device/components/audio/audio.d.ts.map +1 -0
- package/dist/types/device/components/canvas/canvas.d.ts +3 -0
- package/dist/types/device/components/canvas/canvas.d.ts.map +1 -0
- package/dist/types/device/components/extra/extra.d.ts +19 -0
- package/dist/types/device/components/extra/extra.d.ts.map +1 -0
- package/dist/types/device/components/fonts/fonts.d.ts +3 -0
- package/dist/types/device/components/fonts/fonts.d.ts.map +1 -0
- package/dist/types/device/components/hardware/hardware.d.ts +2 -0
- package/dist/types/device/components/hardware/hardware.d.ts.map +1 -0
- package/dist/types/device/components/index.d.ts +15 -0
- package/dist/types/device/components/index.d.ts.map +1 -0
- package/dist/types/device/components/locales/locales.d.ts +2 -0
- package/dist/types/device/components/locales/locales.d.ts.map +1 -0
- package/dist/types/device/components/math/math.d.ts +2 -0
- package/dist/types/device/components/math/math.d.ts.map +1 -0
- package/dist/types/device/components/permissions/permissions.d.ts +3 -0
- package/dist/types/device/components/permissions/permissions.d.ts.map +1 -0
- package/dist/types/device/components/plugins/plugins.d.ts +3 -0
- package/dist/types/device/components/plugins/plugins.d.ts.map +1 -0
- package/dist/types/device/components/screen/screen.d.ts +2 -0
- package/dist/types/device/components/screen/screen.d.ts.map +1 -0
- package/dist/types/device/components/screen/screenResolution.d.ts +16 -0
- package/dist/types/device/components/screen/screenResolution.d.ts.map +1 -0
- package/dist/types/device/components/system/browser.d.ts +22 -0
- package/dist/types/device/components/system/browser.d.ts.map +1 -0
- package/dist/types/device/components/system/emoji.d.ts +2 -0
- package/dist/types/device/components/system/emoji.d.ts.map +1 -0
- package/dist/types/device/components/system/system.d.ts +2 -0
- package/dist/types/device/components/system/system.d.ts.map +1 -0
- package/dist/types/device/components/webgl/imageHash.d.ts +3 -0
- package/dist/types/device/components/webgl/imageHash.d.ts.map +1 -0
- package/dist/types/device/components/webgl/webgl.d.ts +54 -0
- package/dist/types/device/components/webgl/webgl.d.ts.map +1 -0
- package/dist/types/device/factory.d.ts +26 -0
- package/dist/types/device/factory.d.ts.map +1 -0
- package/dist/types/device/index.d.ts +61 -0
- package/dist/types/device/index.d.ts.map +1 -0
- package/dist/types/device/modules/bot.d.ts +9 -0
- package/dist/types/device/modules/bot.d.ts.map +1 -0
- package/dist/types/device/modules/browserDetails.d.ts +6 -0
- package/dist/types/device/modules/browserDetails.d.ts.map +1 -0
- package/dist/types/device/modules/device/analyze-data.d.ts +7 -0
- package/dist/types/device/modules/device/analyze-data.d.ts.map +1 -0
- package/dist/types/device/modules/device/gather-data.d.ts +6 -0
- package/dist/types/device/modules/device/gather-data.d.ts.map +1 -0
- package/dist/types/device/modules/device/helpers.d.ts +9 -0
- package/dist/types/device/modules/device/helpers.d.ts.map +1 -0
- package/dist/types/device/modules/device/index.d.ts +3 -0
- package/dist/types/device/modules/device/index.d.ts.map +1 -0
- package/dist/types/device/modules/fp.d.ts +14 -0
- package/dist/types/device/modules/fp.d.ts.map +1 -0
- package/dist/types/device/modules/incognito.d.ts +7 -0
- package/dist/types/device/modules/incognito.d.ts.map +1 -0
- package/dist/types/device/modules/options.d.ts +12 -0
- package/dist/types/device/modules/options.d.ts.map +1 -0
- package/dist/types/device/modules/os.d.ts +3 -0
- package/dist/types/device/modules/os.d.ts.map +1 -0
- package/dist/types/device/modules/tor.d.ts +4 -0
- package/dist/types/device/modules/tor.d.ts.map +1 -0
- package/dist/types/device/utils/async.d.ts +33 -0
- package/dist/types/device/utils/async.d.ts.map +1 -0
- package/dist/types/device/utils/browser_.d.ts +103 -0
- package/dist/types/device/utils/browser_.d.ts.map +1 -0
- package/dist/types/device/utils/commonPixels.d.ts +2 -0
- package/dist/types/device/utils/commonPixels.d.ts.map +1 -0
- package/dist/types/device/utils/data.d.ts +33 -0
- package/dist/types/device/utils/data.d.ts.map +1 -0
- package/dist/types/device/utils/dom.d.ts +26 -0
- package/dist/types/device/utils/dom.d.ts.map +1 -0
- package/dist/types/device/utils/ephemeralIFrame.d.ts +5 -0
- package/dist/types/device/utils/ephemeralIFrame.d.ts.map +1 -0
- package/dist/types/device/utils/getMostFrequent.d.ts +6 -0
- package/dist/types/device/utils/getMostFrequent.d.ts.map +1 -0
- package/dist/types/device/utils/hash.d.ts +6 -0
- package/dist/types/device/utils/hash.d.ts.map +1 -0
- package/dist/types/device/utils/misc.d.ts +7 -0
- package/dist/types/device/utils/misc.d.ts.map +1 -0
- package/dist/types/device/utils/raceAll.d.ts +9 -0
- package/dist/types/device/utils/raceAll.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +52 -0
- package/src/behaviour/index.ts +279 -0
- package/src/client/index.ts +132 -0
- package/src/core/constants.ts +4 -0
- package/src/core/dto/bot-detector.dto.ts +32 -0
- package/src/core/dto/device-detector.dto.ts +67 -0
- package/src/core/dto/fingerprint.dto.ts +38 -0
- package/src/core/dto/ginger.dto.ts +89 -0
- package/src/core/dto/incognito-detector.dto.ts +2 -0
- package/src/core/dto/index.ts +18 -0
- package/src/core/dto/metrics.dto.ts +20 -0
- package/src/core/dto/os-detector.dto.ts +5 -0
- package/src/core/dto/tor-detector.dto.ts +4 -0
- package/src/core/helpers.ts +33 -0
- package/src/core/http/httpClient.ts +52 -0
- package/src/core/http/request.ts +32 -0
- package/src/core/index.ts +5 -0
- package/src/core/util/error.ts +40 -0
- package/src/core/util/generate-requestid.ts +63 -0
- package/src/device/components/audio/audio.ts +58 -0
- package/src/device/components/canvas/canvas.ts +88 -0
- package/src/device/components/extra/extra.ts +581 -0
- package/src/device/components/fonts/fonts.ts +143 -0
- package/src/device/components/hardware/hardware.ts +66 -0
- package/src/device/components/index.ts +14 -0
- package/src/device/components/locales/locales.ts +21 -0
- package/src/device/components/math/math.ts +39 -0
- package/src/device/components/permissions/permissions.ts +60 -0
- package/src/device/components/plugins/plugins.ts +22 -0
- package/src/device/components/screen/screen.ts +13 -0
- package/src/device/components/screen/screenResolution.ts +45 -0
- package/src/device/components/system/browser.ts +838 -0
- package/src/device/components/system/emoji.ts +134 -0
- package/src/device/components/system/system.ts +76 -0
- package/src/device/components/webgl/imageHash.ts +144 -0
- package/src/device/components/webgl/webgl.ts +302 -0
- package/src/device/factory.ts +54 -0
- package/src/device/index.ts +60 -0
- package/src/device/modules/bot.ts +25 -0
- package/src/device/modules/browserDetails.ts +11 -0
- package/src/device/modules/device/analyze-data.ts +150 -0
- package/src/device/modules/device/gather-data.ts +92 -0
- package/src/device/modules/device/helpers.ts +123 -0
- package/src/device/modules/device/index.ts +64 -0
- package/src/device/modules/fp.ts +138 -0
- package/src/device/modules/incognito.ts +253 -0
- package/src/device/modules/options.ts +17 -0
- package/src/device/modules/os.ts +15 -0
- package/src/device/modules/tor.ts +41 -0
- package/src/device/utils/async.ts +106 -0
- package/src/device/utils/browser_.ts +347 -0
- package/src/device/utils/commonPixels.ts +38 -0
- package/src/device/utils/data.ts +161 -0
- package/src/device/utils/dom.ts +148 -0
- package/src/device/utils/ephemeralIFrame.ts +35 -0
- package/src/device/utils/getMostFrequent.ts +39 -0
- package/src/device/utils/hash.ts +202 -0
- package/src/device/utils/misc.ts +18 -0
- package/src/device/utils/raceAll.ts +19 -0
- package/src/index.ts +3 -0
package/README.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Ginger JS
|
|
2
|
+
|
|
3
|
+
GingerJS is a JavaScript library designed for advanced device fingerprinting and behavioral analytics in single-page applications (SPAs). It provides robust capabilities for device identification and user behaviour monitoring, making it an essential tool for enhancing security systems and fraud prevention.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Installation](#installation)
|
|
8
|
+
- [NPM Installation](#npm-installation)
|
|
9
|
+
- [Implementation Guide](#implementation-guide)
|
|
10
|
+
- [Technical Overview](#technical-overview)
|
|
11
|
+
- [Development Setup](#development-setup)
|
|
12
|
+
- [Local Environment](#local-environment)
|
|
13
|
+
- [Building](#building)
|
|
14
|
+
- [Testing](#testing)
|
|
15
|
+
- [License Information](#license-information)
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
### NPM Installation
|
|
20
|
+
|
|
21
|
+
Install via NPM:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @ginger-ai/ginger-js
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Implementation Guide
|
|
28
|
+
|
|
29
|
+
### NPM Implementation
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
import { GingerJsClient } from "@ginger-ai/ginger-js";
|
|
33
|
+
|
|
34
|
+
async function initializeGinger() {
|
|
35
|
+
const gingerjs = new GingerJsClient({
|
|
36
|
+
apikey: "your-api-key"
|
|
37
|
+
});
|
|
38
|
+
const response = await gingerjs.initialize();
|
|
39
|
+
|
|
40
|
+
// Optional: Configure behavior tracking
|
|
41
|
+
gingerjs.trackEvent({
|
|
42
|
+
event_type: "login",
|
|
43
|
+
request_id: response.request_id,
|
|
44
|
+
track_fields: [
|
|
45
|
+
{ id: "username", ltm: true },
|
|
46
|
+
{ id: "password", ltm: true },
|
|
47
|
+
],,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const result = await gingerjs.submitEvent();
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Technical Overview
|
|
56
|
+
|
|
57
|
+
The library operates through a request session-based architecture:
|
|
58
|
+
|
|
59
|
+
1. **Initialization**: Generates a unique `request_id` for tracking purposes
|
|
60
|
+
2. **Behavior Tracking** (Optional):
|
|
61
|
+
- Requires: `event_type`, `request_id`, and `track_fields`
|
|
62
|
+
- Monitors specified input elements for user interaction
|
|
63
|
+
3. **Data Submission**: Returns a structuredββ response:
|
|
64
|
+
```javascript
|
|
65
|
+
{
|
|
66
|
+
event_id: number,
|
|
67
|
+
request_id: string,
|
|
68
|
+
message: string
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Local Environment
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
npm install
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Building
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npm run build
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Testing
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm test
|
|
88
|
+
```
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=()=>{const e=Date.now(),t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".slice(0,34);return`${e}.${n(e,t)}`};function t(e,t){if(0===e)return"00000000";let n="";for(;e>0;){n=t[e%34]+n,e=Math.floor(e/34)}for(;n.length<8;)n="0"+n;return n.slice(-8)}const n=(e,i,o=1)=>{if(o>3)return t(e,i);const r=0x4bf63f8c5b100,a=function(e,t){let n=0;for(let i of e){let e=t.indexOf(i.toUpperCase());if(-1===e)throw new Error("Invalid base-34 character");n=34*n+e}return n}(t((e+function(e){const t=e;return Math.floor(Math.random()*t)}(r))%r,i),i);return n(a,i,o+1)};class i extends Error{constructor(e,t,n){super(e),this.name="GingerError",this.statusCode=t,this.response=n}}class o extends Error{constructor(e){super(e),this.name="GingerClientError"}}const r=["mobile","desktop","tablet"];var a;!function(e){e.typed="typed",e.paste="pasted",e.mixed="mixed"}(a||(a={}));const s=["login","registration","credentials_update","alerts_snooze"],c="https://app.getrayyan.com",d="https://test.getrayyan.com";const l=()=>{let e=0;const t=()=>{"hidden"===document.visibilityState&&e++};return{getCount:()=>e,addListener:()=>document.addEventListener("visibilitychange",t),removeListener:()=>document.removeEventListener("visibilitychange",t)}},u=async(e,t,n,o)=>{try{const r=await fetch(e,{method:n,headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${o}`},body:JSON.stringify(t)});r.ok||await(async e=>{const t=await e.json(),n=t?.error||t.message||"An error occurred";throw new i(n,e.status,e)})(r);return await r.json()}catch(e){throw e}};var m;!function(e){e.POST="POST"}(m||(m={}));class h{constructor(e){(e=>{if(!e)throw new o("'apikey' must be provided.")})(e),this.basePath=function(e){return e.includes("sk_live")||e.includes("pk_live")?c:d}(e),this.apikey=e}async post(e){const{url:t,payload:n,method:i=m.POST}=e,o=`${this.basePath}${t}`;try{return await u(o,n,i,this.apikey)}catch(e){throw e}}}let f={exclude:[],include:[],logging:!0};const w={},p=(e,t)=>{"undefined"!=typeof window&&(w[e]=t)},g={timeout:"true"};function b(e){return e^=e>>>16,e=Math.imul(e,2246822507),e^=e>>>13,e=Math.imul(e,3266489909),(e^=e>>>16)>>>0}const v=new Uint32Array([597399067,2869860233,951274213,2716044179]);function y(e,t){return e<<t|e>>>32-t}function k(e,t=0){var n;if(t=t?0|t:0,"string"==typeof e&&(n=e,e=(new TextEncoder).encode(n).buffer),!(e instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");const i=new Uint32Array([t,t,t,t]);!function(e,t){const n=e.byteLength/16|0,i=new Uint32Array(e,0,4*n);for(let e=0;e<n;e++){const n=i.subarray(4*e,4*(e+1));n[0]=Math.imul(n[0],v[0]),n[0]=y(n[0],15),n[0]=Math.imul(n[0],v[1]),t[0]=t[0]^n[0],t[0]=y(t[0],19),t[0]=t[0]+t[1],t[0]=Math.imul(t[0],5)+1444728091,n[1]=Math.imul(n[1],v[1]),n[1]=y(n[1],16),n[1]=Math.imul(n[1],v[2]),t[1]=t[1]^n[1],t[1]=y(t[1],17),t[1]=t[1]+t[2],t[1]=Math.imul(t[1],5)+197830471,n[2]=Math.imul(n[2],v[2]),n[2]=y(n[2],17),n[2]=Math.imul(n[2],v[3]),t[2]=t[2]^n[2],t[2]=y(t[2],15),t[2]=t[2]+t[3],t[2]=Math.imul(t[2],5)+2530024501,n[3]=Math.imul(n[3],v[3]),n[3]=y(n[3],18),n[3]=Math.imul(n[3],v[0]),t[3]=t[3]^n[3],t[3]=y(t[3],13),t[3]=t[3]+t[0],t[3]=Math.imul(t[3],5)+850148119}}(e,i),function(e,t){const n=e.byteLength/16|0,i=e.byteLength%16,o=new Uint32Array(4),r=new Uint8Array(e,16*n,i);switch(i){case 15:o[3]=o[3]^r[14]<<16;break;case 14:o[3]=o[3]^r[13]<<8;break;case 13:o[3]=o[3]^(0|r[12]),o[3]=Math.imul(o[3],v[3]),o[3]=y(o[3],18),o[3]=Math.imul(o[3],v[0]),t[3]=t[3]^o[3];break;case 12:o[2]=o[2]^r[11]<<24;break;case 11:o[2]=o[2]^r[10]<<16;break;case 10:o[2]=o[2]^r[9]<<8;break;case 9:o[2]=o[2]^(0|r[8]),o[2]=Math.imul(o[2],v[2]),o[2]=y(o[2],17),o[2]=Math.imul(o[2],v[3]),t[2]=t[2]^o[2];break;case 8:o[1]=o[1]^r[7]<<24;break;case 7:o[1]=o[1]^r[6]<<16;break;case 6:o[1]=o[1]^r[5]<<8;break;case 5:o[1]=o[1]^(0|r[4]),o[1]=Math.imul(o[1],v[1]),o[1]=y(o[1],16),o[1]=Math.imul(o[1],v[2]),t[1]=t[1]^o[1];break;case 4:o[0]=o[0]^r[3]<<24;break;case 3:o[0]=o[0]^r[2]<<16;break;case 2:o[0]=o[0]^r[1]<<8;break;case 1:o[0]=o[0]^(0|r[0]),o[0]=Math.imul(o[0],v[0]),o[0]=y(o[0],15),o[0]=Math.imul(o[0],v[1]),t[0]=t[0]^o[0]}}(e,i),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]=b(t[0]),t[1]=b(t[1]),t[2]=b(t[2]),t[3]=b(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,i);const o=new Uint8Array(i.buffer);return Array.from(o).map(e=>e.toString(16).padStart(2,"0")).join("")}async function x(){try{const e=Object.fromEntries(Object.entries(w).filter(([e])=>!f?.exclude?.includes(e)).filter(([e])=>f?.include?.some(e=>e.includes("."))?f?.include?.some(t=>t.startsWith(e)):0===f?.include?.length||f?.include?.includes(e)).map(([e,t])=>[e,t()])),t=Object.keys(e),n=Object.values(e),i=await function(e,t,n){return Promise.all(e.map(e=>{return Promise.race([e,(i=t,o=n,new Promise(e=>{setTimeout(()=>e(o),i)}))]);var i,o}))}(n,f?.timeout||1e3,g),o={};return i.forEach((e,n)=>{void 0!==e&&(o[t[n]]=e)}),S(o,f.exclude||[],f.include||[],"")}catch(e){throw e}}function S(e,t,n,i=""){const o={};for(const[r,a]of Object.entries(e)){const e=i+r+".";if("object"!=typeof a||Array.isArray(a)){const i=t.some(t=>e.startsWith(t)),s=n.some(t=>e.startsWith(t));i&&!s||(o[r]=a)}else{const i=S(a,t,n,e);Object.keys(i).length>0&&(o[r]=i)}}return o}async function L(){try{const e=await x(),t=E(e),n=k(JSON.stringify(t)),i=function(e){const t=E(e);return Object.keys(t)}(t);return{hash:n.toString(),data:e,componentsUsedForHash:i}}catch(e){throw e}}function E(e){return{audio:e.audio,fonts:e.fonts,hardware:e.hardware,math:e.math,permissions:e.permissions,screen:e.screen,system:e.system,emojiFingerprint:e.emojiFingerprint,vendorFlavour:e.vendorFlavour,colorGamut:e.colorGamut,canvas:e.canvas,webglBasics:e.webGlBasics}}async function C(){let e=0;"Atlantic/Reykjavik"===Intl.DateTimeFormat().resolvedOptions().timeZone&&e++;const t=_();return["Mozilla","unknown"].includes(t.vendor)&&e++,window.RTCPeerConnection||e++,navigator.deviceMemory||e++,2===navigator.hardwareConcurrency&&e++,navigator.credentials||e++,navigator.geolocation||e++,{status:e>=6,confidence:`${(e/7).toFixed(2)}`}}const _=()=>{try{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl");if(!t)return{vendor:"unsupported",renderer:"unsupported"};const n=t.getExtension("WEBGL_debug_renderer_info");return n?{vendor:t.getParameter(n.UNMASKED_VENDOR_WEBGL),renderer:t.getParameter(n.UNMASKED_RENDERER_WEBGL)}:{vendor:"unknown",renderer:"unknown"}}catch{return{vendor:"error",renderer:"error"}}};async function A(){return new Promise(function(e,t){let n="unknown";function i(t){e({status:t,browser_name:n})}function o(){let e=0,t=parseInt("-1");try{t.toFixed(t)}catch(t){e=t.message.length}return e}function r(){return void 0!==navigator.msSaveBlob&&39===eval.toString().length}function a(){const e=String(Math.random());try{window.indexedDB.open(e,1).onupgradeneeded=function(t){const n=t.target?.result;try{n.createObjectStore("test",{autoIncrement:!0}).put(new Blob)}catch(e){let t=e;if(e instanceof Error&&(t=e.message??e),"string"!=typeof t)return void i(!1);t.includes("BlobURLs are not yet supported")&&i(!0)}finally{n.close(),window.indexedDB.deleteDatabase(e),navigator.storage?.estimate?navigator.storage.estimate().then(({quota:e})=>{i(!!(e&&e<2e9))}).catch(()=>{i(!1)}):i(!1)}}}catch(e){i(!1)}}function s(){void 0!==navigator.maxTouchPoints?a():function(){const e=window.openDatabase,t=window.localStorage;try{e(null,null,null,null)}catch(e){return void i(!0)}try{t.setItem("test","1"),t.removeItem("test")}catch(e){return void i(!0)}i(!1)}()}function c(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(e,t){i(Math.round(t/1048576)<2*Math.round(function(){const e=window;return void 0!==e.performance&&void 0!==e.performance.memory&&void 0!==e.performance.memory.jsHeapSizeLimit?performance.memory.jsHeapSizeLimit:1073741824}()/1048576))},function(e){t(new Error("detectIncognito somehow failed to query storage quota: "+e.message))})}function d(){void 0!==self.Promise&&void 0!==self.Promise.allSettled?c():(0,window.webkitRequestFileSystem)(0,1,function(){i(!1)},function(){i(!0)})}44===o()?(n="Safari",s()):51===o()?(n=function(){const e=navigator.userAgent;return e.match(/Chrome/)?void 0!==navigator.brave?"Brave":e.match(/Edg/)?"Edge":e.match(/OPR/)?"Opera":"Chrome":"Chromium"}(),d()):25===o()?(n="Firefox",i(void 0===navigator.serviceWorker)):r()?(n="Internet Explorer",i(void 0===window.indexedDB)):t(new Error("detectIncognito cannot determine the browser"))})}var P=function(e,t){return P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},P(e,t)};function V(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((i=i.apply(e,t||[])).next())})}function I(e,t){var n,i,o,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(r=0)),r;)try{if(n=1,i&&(o=2&s[0]?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){r=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(6===s[0]&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e],i=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function M(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var R="awesomium",F="cef",W="cefsharp",T="coachjs",G="electron",j="fminer",O="geb",D="nightmarejs",B="phantomas",H="phantomjs",N="rhino",Z="selenium",z="sequentum",Y="slimerjs",X="webdriverio",U="webdriver",J="headless_chrome",q="unknown",K=function(e){function t(n,i){var o=e.call(this,i)||this;return o.state=n,o.name="BotdError",Object.setPrototypeOf(o,t.prototype),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}P(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error);function $(e){return V(this,void 0,void 0,function(){var t,n,i=this;return I(this,function(o){switch(o.label){case 0:return t={},n=Object.keys(e),[4,Promise.all(n.map(function(n){return V(i,void 0,void 0,function(){var i,o,r,a,s;return I(this,function(c){switch(c.label){case 0:i=e[n],c.label=1;case 1:return c.trys.push([1,3,,4]),o=t,r=n,s={},[4,i()];case 2:return o[r]=(s.value=c.sent(),s.state=0,s),[3,4];case 3:return a=c.sent(),t[n]=a instanceof K?{state:a.state,error:"".concat(a.name,": ").concat(a.message)}:{state:-3,error:a instanceof Error?"".concat(a.name,": ").concat(a.message):String(a)},[3,4];case 4:return[2]}})})}))];case 1:return o.sent(),[2,t]}})})}function Q(e,t){return-1!==e.indexOf(t)}function ee(e,t){return-1!==e.indexOf(t)}function te(e){return Object.getOwnPropertyNames(e)}function ne(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=function(t){if("string"==typeof t){if(Q(e,t))return{value:!0}}else if(null!=function(e,t){if("find"in e)return e.find(t);for(var n=0;n<e.length;n++)if(t(e[n],n,e))return e[n]}(e,function(e){return t.test(e)}))return{value:!0}},o=0,r=t;o<r.length;o++){var a=i(r[o]);if("object"==typeof a)return a.value}return!1}function ie(e){return e.reduce(function(e,t){return e+(t?1:0)},0)}var oe={detectAppVersion:function(e){var t=e.appVersion;return 0===t.state&&(/headless/i.test(t.value)?J:/electron/i.test(t.value)?G:/slimerjs/i.test(t.value)?Y:void 0)},detectDocumentAttributes:function(e){var t=e.documentElementKeys;return 0===t.state&&(ne(t.value,"selenium","webdriver","driver")?Z:void 0)},detectErrorTrace:function(e){var t=e.errorTrace;return 0===t.state&&(/PhantomJS/i.test(t.value)?H:void 0)},detectEvalLengthInconsistency:function(e){var t=e.evalLength,n=e.browserKind,i=e.browserEngineKind;if(0===t.state&&0===n.state&&0===i.state){var o=t.value;return"unknown"!==i.value&&(37===o&&!Q(["webkit","gecko"],i.value)||39===o&&!Q(["internet_explorer"],n.value)||33===o&&!Q(["chromium"],i.value))}},detectFunctionBind:function(e){if(-2===e.functionBind.state)return H},detectLanguagesLengthInconsistency:function(e){var t=e.languages;if(0===t.state&&0===t.value.length)return J},detectNotificationPermissions:function(e){var t=e.notificationPermissions,n=e.browserKind;return 0===n.state&&"chrome"===n.value&&(0===t.state&&t.value?J:void 0)},detectPluginsArray:function(e){var t=e.pluginsArray;if(0===t.state&&!t.value)return J},detectPluginsLengthInconsistency:function(e){var t=e.pluginsLength,n=e.android,i=e.browserKind,o=e.browserEngineKind;if(0===t.state&&0===n.state&&0===i.state&&0===o.state&&"chrome"===i.value&&!n.value&&"chromium"===o.value)return 0===t.value?J:void 0},detectProcess:function(e){var t,n=e.process;return 0===n.state&&("renderer"===n.value.type||null!=(null===(t=n.value.versions)||void 0===t?void 0:t.electron)?G:void 0)},detectUserAgent:function(e){var t=e.userAgent;return 0===t.state&&(/PhantomJS/i.test(t.value)?H:/Headless/i.test(t.value)?J:/Electron/i.test(t.value)?G:/slimerjs/i.test(t.value)?Y:void 0)},detectWebDriver:function(e){var t=e.webDriver;if(0===t.state&&t.value)return J},detectWebGL:function(e){var t=e.webGL;if(0===t.state){var n=t.value,i=n.vendor,o=n.renderer;if("Brian Paul"==i&&"Mesa OffScreen"==o)return J}},detectWindowExternal:function(e){var t=e.windowExternal;return 0===t.state&&(/Sequentum/i.test(t.value)?z:void 0)},detectWindowSize:function(e){var t=e.windowSize,n=e.documentFocus;if(0!==t.state||0!==n.state)return!1;var i=t.value,o=i.outerWidth,r=i.outerHeight;return n.value&&0===o&&0===r?J:void 0},detectMimeTypesConsistent:function(e){var t=e.mimeTypesConsistent;if(0===t.state&&!t.value)return q},detectProductSub:function(e){var t=e.productSub,n=e.browserKind;return 0===t.state&&0===n.state&&("chrome"!==n.value&&"safari"!==n.value&&"opera"!==n.value&&"wechat"!==n.value||"20030107"===t.value?void 0:q)},detectDistinctiveProperties:function(e){var t=e.distinctiveProps;if(0!==t.state)return!1;var n,i=t.value;for(n in i)if(i[n])return n}};function re(){var e,t,n=window,i=navigator;return ie(["webkitPersistentStorage"in i,"webkitTemporaryStorage"in i,0===i.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in n,"BatteryManager"in n,"webkitMediaStream"in n,"webkitSpeechGrammar"in n])>=5?"chromium":ie(["ApplePayError"in n,"CSSPrimitiveValue"in n,"Counter"in n,0===i.vendor.indexOf("Apple"),"getStorageUpdates"in i,"WebKitMediaKeys"in n])>=4?"webkit":ie(["buildID"in navigator,"MozAppearance"in(null!==(t=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==t?t:{}),"onmozfullscreenchange"in n,"mozInnerScreenX"in n,"CSSMozDocumentRule"in n,"CanvasCaptureMediaStream"in n])>=4?"gecko":"unknown"}var ae={android:function(){var e=re(),t="chromium"===e,n="gecko"===e;if(!t&&!n)return!1;var i=window;return ie(["onorientationchange"in i,"orientation"in i,t&&!("SharedWorker"in i),n&&/android/i.test(navigator.appVersion)])>=2},browserKind:function(){var e,t=null===(e=navigator.userAgent)||void 0===e?void 0:e.toLowerCase();return ee(t,"edg/")?"edge":ee(t,"trident")||ee(t,"msie")?"internet_explorer":ee(t,"wechat")?"wechat":ee(t,"firefox")?"firefox":ee(t,"opera")||ee(t,"opr")?"opera":ee(t,"chrome")?"chrome":ee(t,"safari")?"safari":"unknown"},browserEngineKind:re,documentFocus:function(){return void 0!==document.hasFocus&&document.hasFocus()},userAgent:function(){return navigator.userAgent},appVersion:function(){var e=navigator.appVersion;if(null==e)throw new K(-1,"navigator.appVersion is undefined");return e},rtt:function(){if(void 0===navigator.connection)throw new K(-1,"navigator.connection is undefined");if(void 0===navigator.connection.rtt)throw new K(-1,"navigator.connection.rtt is undefined");return navigator.connection.rtt},windowSize:function(){return{outerWidth:window.outerWidth,outerHeight:window.outerHeight,innerWidth:window.innerWidth,innerHeight:window.innerHeight}},pluginsLength:function(){if(void 0===navigator.plugins)throw new K(-1,"navigator.plugins is undefined");if(void 0===navigator.plugins.length)throw new K(-3,"navigator.plugins.length is undefined");return navigator.plugins.length},pluginsArray:function(){if(void 0===navigator.plugins)throw new K(-1,"navigator.plugins is undefined");if(void 0===window.PluginArray)throw new K(-1,"window.PluginArray is undefined");return navigator.plugins instanceof PluginArray},errorTrace:function(){try{null[0]()}catch(e){if(e instanceof Error&&null!=e.stack)return e.stack.toString()}throw new K(-3,"errorTrace signal unexpected behaviour")},productSub:function(){var e=navigator.productSub;if(void 0===e)throw new K(-1,"navigator.productSub is undefined");return e},windowExternal:function(){if(void 0===window.external)throw new K(-1,"window.external is undefined");var e=window.external;if("function"!=typeof e.toString)throw new K(-2,"window.external.toString is not a function");return e.toString()},mimeTypesConsistent:function(){if(void 0===navigator.mimeTypes)throw new K(-1,"navigator.mimeTypes is undefined");for(var e=navigator.mimeTypes,t=Object.getPrototypeOf(e)===MimeTypeArray.prototype,n=0;n<e.length;n++)t&&(t=Object.getPrototypeOf(e[n])===MimeType.prototype);return t},evalLength:function(){return eval.toString().length},webGL:function(){var e=document.createElement("canvas");if("function"!=typeof e.getContext)throw new K(-2,"HTMLCanvasElement.getContext is not a function");var t=e.getContext("webgl");if(null===t)throw new K(-4,"WebGLRenderingContext is null");if("function"!=typeof t.getParameter)throw new K(-2,"WebGLRenderingContext.getParameter is not a function");return{vendor:t.getParameter(t.VENDOR),renderer:t.getParameter(t.RENDERER)}},webDriver:function(){if(null==navigator.webdriver)throw new K(-1,"navigator.webdriver is undefined");return navigator.webdriver},languages:function(){var e,t=navigator,n=[],i=t.language||t.userLanguage||t.browserLanguage||t.systemLanguage;if(void 0!==i&&n.push([i]),Array.isArray(t.languages))"chromium"===re()&&ie([!("MediaSettingsRange"in(e=window)),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3||n.push(t.languages);else if("string"==typeof t.languages){var o=t.languages;o&&n.push(o.split(","))}return n},notificationPermissions:function(){return V(this,void 0,void 0,function(){var e,t;return I(this,function(n){switch(n.label){case 0:if(void 0===window.Notification)throw new K(-1,"window.Notification is undefined");if(void 0===navigator.permissions)throw new K(-1,"navigator.permissions is undefined");if("function"!=typeof(e=navigator.permissions).query)throw new K(-2,"navigator.permissions.query is not a function");n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.query({name:"notifications"})];case 2:return t=n.sent(),[2,"denied"===window.Notification.permission&&"prompt"===t.state];case 3:throw n.sent(),new K(-3,"notificationPermissions signal unexpected behaviour");case 4:return[2]}})})},documentElementKeys:function(){if(void 0===document.documentElement)throw new K(-1,"document.documentElement is undefined");var e=document.documentElement;if("function"!=typeof e.getAttributeNames)throw new K(-2,"document.documentElement.getAttributeNames is not a function");return e.getAttributeNames()},functionBind:function(){if(void 0===Function.prototype.bind)throw new K(-2,"Function.prototype.bind is undefined");return Function.prototype.bind.toString()},process:function(){var e=window.process,t="window.process is";if(void 0===e)throw new K(-1,"".concat(t," undefined"));if(e&&"object"!=typeof e)throw new K(-3,"".concat(t," not an object"));return e},distinctiveProps:function(){var e,t,n=((e={})[R]={window:["awesomium"]},e[F]={window:["RunPerfTest"]},e[W]={window:["CefSharp"]},e[T]={window:["emit"]},e[j]={window:["fmget_targets"]},e[O]={window:["geb"]},e[D]={window:["__nightmare","nightmare"]},e[B]={window:["__phantomas"]},e[H]={window:["callPhantom","_phantom"]},e[N]={window:["spawn"]},e[Z]={window:["_Selenium_IDE_Recorder","_selenium","calledSelenium",/^([a-z]){3}_.*_(Array|Promise|Symbol)$/],document:["__selenium_evaluate","selenium-evaluate","__selenium_unwrapped"]},e[X]={window:["wdioElectron"]},e[U]={window:["webdriver","__webdriverFunc","__lastWatirAlert","__lastWatirConfirm","__lastWatirPrompt","_WEBDRIVER_ELEM_CACHE","ChromeDriverw"],document:["__webdriver_script_fn","__driver_evaluate","__webdriver_evaluate","__fxdriver_evaluate","__driver_unwrapped","__webdriver_unwrapped","__fxdriver_unwrapped","__webdriver_script_fn","__webdriver_script_func","__webdriver_script_function","$cdc_asdjflasutopfhvcZLmcf","$cdc_asdjflasutopfhvcZLmcfl_","$chrome_asyncScriptInfo","__$webdriverAsyncExecutor"]},e[J]={window:["domAutomation","domAutomationController"]},e),i={},o=te(window),r=[];for(t in void 0!==window.document&&(r=te(window.document)),n){var a=n[t];if(void 0!==a){var s=void 0!==a.window&&ne.apply(void 0,M([o],a.window,!1)),c=!(void 0===a.document||!r.length)&&ne.apply(void 0,M([r],a.document,!1));i[t]=s||c}}return i}},se=function(){function e(){this.components=void 0,this.detections=void 0}return e.prototype.getComponents=function(){return this.components},e.prototype.getDetections=function(){return this.detections},e.prototype.detect=function(){if(void 0===this.components)throw new Error("BotDetector.detect can't be called before BotDetector.collect");var e=function(e,t){var n={},i={bot:!1};for(var o in t){var r=(0,t[o])(e),a={bot:!1};"string"==typeof r?a={bot:!0,botKind:r}:r&&(a={bot:!0,botKind:q}),n[o]=a,a.bot&&(i=a)}return[n,i]}(this.components,oe),t=e[0],n=e[1];return this.detections=t,n},e.prototype.collect=function(){return V(this,void 0,void 0,function(){var e;return I(this,function(t){switch(t.label){case 0:return e=this,[4,$(ae)];case 1:return e.components=t.sent(),[2,this.components]}})})},e}();function ce(e){var t=(void 0===e?{}:e).monitoring,n=void 0===t||t;return V(this,void 0,void 0,function(){var e;return I(this,function(t){switch(t.label){case 0:return n&&function(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{var e=new XMLHttpRequest;e.open("get","https://m1.openfpcdn.io/botd/v".concat("1.9.1","/npm-monitoring"),!0),e.send()}catch(e){console.error(e)}}(),[4,(e=new se).collect()];case 1:return t.sent(),[2,e]}})})}async function de(){try{const e=(await ce()).detect();return e.bot?{status:!0,botKind:e.botKind}:{status:!1}}catch(e){return console.error(e),null}}function le(){return ue().name}function ue(){const e={name:"Unknown",version:"Unknown",confidence:0,engine:"Unknown"},t=[],n=navigator.userAgent.toLowerCase();-1===n.indexOf("edg/")&&-1===n.indexOf("edge/")||t.push({name:"Edge",confidence:75});if(function(e,t){44===t.toFixedErrorLength?e.push({name:"Safari",confidence:40}):51===t.toFixedErrorLength?e.push({name:"Chrome",confidence:30}):25===t.toFixedErrorLength&&e.push({name:"Firefox",confidence:30});t.functionToStringLength>30&&t.functionToStringLength<40?e.push({name:"Firefox",confidence:10}):t.functionToStringLength>40&&e.push({name:"Chrome",confidence:15})}(t,function(){let e=0;try{const e=parseInt("-1");e.toFixed(e)}catch(t){e=t.message.length}let t=0;try{t=Function.prototype.toString.call(Function).length}catch(e){}return{toFixedErrorLength:e,functionToStringLength:t}}()),function(e){navigator.brave&&"function"==typeof navigator.brave.isBrave&&e.push({name:"Brave",confidence:90});if(void 0!==window.chrome&&window.chrome.app&&window.chrome.runtime){const t=navigator.userAgent.toLowerCase();-1===t.indexOf("edg/")&&-1===t.indexOf("edge/")?void 0===navigator.brave&&e.push({name:"Chrome",confidence:40}):e.push({name:"Edge",confidence:40})}!(window.chrome&&window.chrome.csi&&window.chrome.loadTimes)||window.opr||window.opera||navigator.brave&&"function"==typeof navigator.brave.isBrave||e.push({name:"Chrome",confidence:60});void 0===window.InstallTrigger&&void 0===window.sidebar||e.push({name:"Firefox",confidence:70});(/constructor/i.test(window.HTMLElement)||"[object SafariRemoteNotification]"===(!(void 0===window.safari)&&window.safari.pushNotification).toString())&&e.push({name:"Safari",confidence:70});(window.msCredentials||document.documentMode)&&e.push({name:"Edge",confidence:60});(window.opr||window.opera)&&e.push({name:"Opera",confidence:60})}(t),function(e){if("function"==typeof navigator.registerProtocolHandler)try{if("chrome"in window){const t=navigator.userAgent.toLowerCase();-1===t.indexOf("edg/")&&-1===t.indexOf("edge/")&&e.push({name:"Chrome",confidence:25})}("ms-access"in navigator||"ms-browser-extension"in navigator||"ms-calculator"in navigator||"ms-drive-to"in navigator||"ms-excel"in navigator||"ms-gamebarservices"in navigator||"ms-search"in navigator||"ms-word"in navigator)&&e.push({name:"Edge",confidence:80}),("opr:"in navigator.plugins||"opera:"in navigator.plugins)&&e.push({name:"Opera",confidence:25})}catch(e){}}(t),function(e){const t=window.getComputedStyle(document.documentElement);""===t.getPropertyValue("--apple-trailing-word")&&""===t.getPropertyValue("-webkit-app-region")||e.push({name:"Safari",confidence:20});""===t.getPropertyValue("-moz-context-properties")&&""===t.getPropertyValue("-moz-user-focus")||e.push({name:"Firefox",confidence:20});""===t.getPropertyValue("-ms-ime-align")&&""===t.getPropertyValue("-ms-flow-from")||e.push({name:"Edge",confidence:60})}(t),function(e){if(performance.memory&&performance.memory.jsHeapSizeLimit){if(performance.memory.jsHeapSizeLimit>2e9){const t=navigator.userAgent.toLowerCase();-1===t.indexOf("edg/")&&-1===t.indexOf("edge/")&&e.push({name:"Chrome",confidence:20})}}if(void 0!==window.chrome&&"function"==typeof window.chrome.loadTimes)try{const t=window.chrome.loadTimes();t&&"number"==typeof t.firstPaintTime&&"number"==typeof t.requestTime&&e.push({name:"Chrome",confidence:30})}catch(e){}}(t),function(e){try{throw new Error}catch(t){if(t.stack&&t.stack.indexOf("()@")>=0&&e.push({name:"Firefox",confidence:15}),t.stack&&t.stack.indexOf("at new")>=0){const t=navigator.userAgent.toLowerCase();-1===t.indexOf("edg/")&&-1===t.indexOf("edge/")&&e.push({name:"Chrome",confidence:20})}t.stack&&-1===t.stack.indexOf("@")&&-1===t.stack.indexOf("at ")&&e.push({name:"Safari",confidence:15})}if(document.createElement("canvas").toDataURL().length>15&&void 0===navigator.brave&&void 0!==window.chrome){const t=new Image;let n=0;t.onload=()=>{n++,0===n&&e.push({name:"Brave",confidence:20})},t.onerror=()=>{e.push({name:"Brave",confidence:10})},t.src="https://www.facebook.com/tr?id=1234567890&ev=PageView"}try{!!window.__JQUERY_OBJECT__&&e.push({name:"Chrome",confidence:15})}catch(e){}-1!==navigator.userAgent.indexOf("Chrome")&&-1===navigator.userAgent.indexOf("Edg")&&-1===navigator.userAgent.indexOf("OPR")&&-1===navigator.userAgent.indexOf("Brave")&&void 0!==window.chrome&&window.chrome.runtime&&e.push({name:"Chrome",confidence:35})}(t),function(e){const t=navigator.userAgent.toLowerCase();-1===t.indexOf("edg/")&&-1===t.indexOf("edge/")||e.push({name:"Edge",confidence:80});try{CSS.supports("-ms-ime-align","auto")&&e.push({name:"Edge",confidence:70})}catch(e){}try{"function"==typeof navigator.msLaunchUri&&e.push({name:"Edge",confidence:85}),void 0!==window.MSInputMethodContext&&e.push({name:"Edge",confidence:80}),(document.documentMode||/edge/i.test(navigator.userAgent))&&e.push({name:"Edge",confidence:75}),void 0!==window.chrome&&window.chrome.runtime&&!window.chrome.webstore&&e.push({name:"Edge",confidence:60})}catch(e){}try{const t=document.createElement("canvas"),n=t.getContext("2d");if(n){t.width=200,t.height=50,n.font="20px Arial",n.textBaseline="top",n.fillText("EdgeBrowserTest",0,0);const i=n.getImageData(0,0,t.width,t.height).data;let o=0;for(let e=0;e<400;e+=4)o=(o<<5)-o+i[e];o<0&&e.push({name:"Edge",confidence:50})}}catch(e){}}(t),function(e){-1!==navigator.userAgent.indexOf("Chrome")&&-1===navigator.userAgent.indexOf("Edg")&&-1===navigator.userAgent.indexOf("OPR")&&void 0!==window.chrome&&window.chrome.runtime&&"function"==typeof window.chrome.loadTimes&&"function"==typeof window.chrome.csi&&void 0===navigator.brave&&e.push({name:"Chrome",confidence:75});try{Array.from(navigator.plugins).some(e=>"Chrome PDF Viewer"===e.name)&&-1!==navigator.userAgent.indexOf("Chrome")&&-1===navigator.userAgent.indexOf("Edg")&&e.push({name:"Chrome",confidence:60})}catch(e){}try{const t=navigator.userAgent.match(/Chrome\/([0-9.]+)/);if(t){const n=t[1];-1!==navigator.appVersion.indexOf(n)&&-1===navigator.userAgent.indexOf("Edg")&&-1===navigator.userAgent.indexOf("OPR")&&e.push({name:"Chrome",confidence:30})}}catch(e){}}(t),function(e){try{if(navigator.brave)return void e.push({name:"Brave",confidence:95});const t=navigator.userAgent;if(t.includes("Brave")||t.includes("brave"))return void e.push({name:"Brave",confidence:90});if(void 0!==window.chrome&&window.chrome.runtime&&!window.google){!("google"in window)&&!window.chrome.webstore&&void 0!==navigator.brave&&e.push({name:"Brave",confidence:60})}}catch(e){}}(t),t.length>0){const n=t.reduce((e,t)=>(e[t.name]=(e[t.name]||0)+t.confidence,e),{});let i=0,o="Unknown";for(const[e,t]of Object.entries(n))t>i&&(i=t,o=e);"Chrome"===o&&function(){try{const e=navigator.userAgent.toLowerCase();if(-1!==e.indexOf("edg/")||-1!==e.indexOf("edge/"))return!0;if(window.msCredentials||document.documentMode||void 0!==window.MSInputMethodContext||"function"==typeof navigator.msLaunchUri)return!0;if(void 0!==window.chrome&&window.chrome.runtime&&!window.chrome.webstore&&!window.opr&&!window.opera)try{const e=Array.from(navigator.plugins).some(e=>"Chrome PDF Viewer"===e.name),t=Array.from(navigator.plugins).some(e=>-1!==e.name.indexOf("Edge"));if(!e||t)return!0}catch(e){}return!1}catch(e){return!1}}()&&(o="Edge"),e.name=o,e.confidence=Math.min(100,i),["Chrome","Edge","Opera","Brave"].includes(o)?e.engine="Blink":"Firefox"===o?e.engine="Gecko":"Safari"===o&&(e.engine="WebKit"),e.version=function(e){const t=navigator.userAgent;let n="Unknown";try{if("Chrome"===e){const e=t.match(/Chrome\/([0-9.]+)/);e&&(n=e[1])}else if("Firefox"===e){const e=t.match(/Firefox\/([0-9.]+)/);e&&(n=e[1])}else if("Safari"===e){const e=t.match(/Version\/([0-9.]+)/);e&&(n=e[1])}else if("Edge"===e){const e=t.match(/Edg(?:e)?\/([0-9.]+)/);e&&(n=e[1])}else if("Opera"===e){const e=t.match(/OPR\/([0-9.]+)/);e&&(n=e[1])}else if("Brave"===e)if(navigator.brave&&navigator.brave.version)n=navigator.brave.version;else{const e=t.match(/Brave\/([0-9.]+)/);if(e)n=e[1];else{const e=t.match(/Chrome\/([0-9.]+)/);e&&(n=e[1])}if(void 0!==navigator.brave)try{navigator.brave.isBrave().then(e=>{})}catch(e){}}}catch(e){}return n}(o)}return e}var me,he="user-agent",fe="",we="function",pe="undefined",ge="object",be="string",ve="browser",ye="cpu",ke="device",xe="engine",Se="os",Le="result",Ee="name",Ce="type",_e="vendor",Ae="version",Pe="architecture",Ve="major",Ie="model",Me="console",Re="mobile",Fe="tablet",We="smarttv",Te="wearable",Ge="xr",je="embedded",Oe="inapp",De="brands",Be="formFactors",He="fullVersionList",Ne="platform",Ze="platformVersion",ze="bitness",Ye="sec-ch-ua",Xe=Ye+"-full-version-list",Ue=Ye+"-arch",Je=Ye+"-"+ze,qe=Ye+"-form-factors",Ke=Ye+"-"+Re,$e=Ye+"-"+Ie,Qe=Ye+"-"+Ne,et=Qe+"-version",tt=[De,He,Re,Ie,Ne,Ze,Pe,Be,ze],nt="Amazon",it="Apple",ot="ASUS",rt="BlackBerry",at="Google",st="Huawei",ct="Lenovo",dt="Honor",lt="LG",ut="Microsoft",mt="Motorola",ht="Nvidia",ft="OnePlus",wt="OPPO",pt="Samsung",gt="Sharp",bt="Sony",vt="Xiaomi",yt="Zebra",kt="Chrome",xt="Chromium",St="Chromecast",Lt="Edge",Et="Firefox",Ct="Opera",_t="Facebook",At="Sogou",Pt="Mobile ",Vt=" Browser",It="Windows",Mt=typeof window!==pe&&window.navigator?window.navigator:void 0,Rt=Mt&&Mt.userAgentData?Mt.userAgentData:void 0,Ft=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Wt=function(e,t){if(typeof e===ge&&e.length>0){for(var n in e)if(Ot(t)==Ot(e[n]))return!0;return!1}return!!Gt(e)&&Ot(t)==Ot(e)},Tt=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||!!t&&Tt(e[n])},Gt=function(e){return typeof e===be},jt=function(e){if(e){for(var t=[],n=Ht(/\\?\"/g,e).split(","),i=0;i<n.length;i++)if(n[i].indexOf(";")>-1){var o=Zt(n[i]).split(";v=");t[i]={brand:o[0],version:o[1]}}else t[i]=Zt(n[i]);return t}},Ot=function(e){return Gt(e)?e.toLowerCase():e},Dt=function(e){return Gt(e)?Ht(/[^\d\.]/g,e).split(".")[0]:void 0},Bt=function(e){for(var t in e){var n=e[t];typeof n==ge&&2==n.length?this[n[0]]=n[1]:this[n]=void 0}return this},Ht=function(e,t){return Gt(t)?t.replace(e,fe):t},Nt=function(e){return Ht(/\\?\"/g,e)},Zt=function(e,t){if(Gt(e))return e=Ht(/^\s\s*/,e),typeof t===pe?e:e.substring(0,500)},zt=function(e,t){if(e&&t)for(var n,i,o,r,a,s,c=0;c<t.length&&!a;){var d=t[c],l=t[c+1];for(n=i=0;n<d.length&&!a&&d[n];)if(a=d[n++].exec(e))for(o=0;o<l.length;o++)s=a[++i],typeof(r=l[o])===ge&&r.length>0?2===r.length?typeof r[1]==we?this[r[0]]=r[1].call(this,s):this[r[0]]=r[1]:r.length>=3&&(typeof r[1]!==we||r[1].exec&&r[1].test?3==r.length?this[r[0]]=s?s.replace(r[1],r[2]):void 0:4==r.length?this[r[0]]=s?r[3].call(this,s.replace(r[1],r[2])):void 0:r.length>4&&(this[r[0]]=s?r[3].apply(this,[s.replace(r[1],r[2])].concat(r.slice(4))):void 0):r.length>3?this[r[0]]=s?r[1].apply(this,r.slice(2)):void 0:this[r[0]]=s?r[1].call(this,s,r[2]):void 0):this[r]=s||void 0;c+=2}},Yt=function(e,t){for(var n in t)if(typeof t[n]===ge&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(Wt(t[n][i],e))return"?"===n?void 0:n}else if(Wt(t[n],e))return"?"===n?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},Xt={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},Ut={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Jt={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},qt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[Ae,[Ee,Pt+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[Ae,[Ee,Lt+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[Ae,[Ee,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[Ee,Ae],[/opios[\/ ]+([\w\.]+)/i],[Ae,[Ee,Ct+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[Ae,[Ee,Ct+" GX"]],[/\bopr\/([\w\.]+)/i],[Ae,[Ee,Ct]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[Ae,[Ee,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[Ae,[Ee,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[Ee,Ae],[/quark(?:pc)?\/([-\w\.]+)/i],[Ae,[Ee,"Quark"]],[/\bddg\/([\w\.]+)/i],[Ae,[Ee,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[Ae,[Ee,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[Ae,[Ee,"WeChat"]],[/konqueror\/([\w\.]+)/i],[Ae,[Ee,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[Ae,[Ee,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[Ae,[Ee,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[Ae,[Ee,"Smart "+ct+Vt]],[/(avast|avg)\/([\w\.]+)/i],[[Ee,/(.+)/,"$1 Secure"+Vt],Ae],[/\bfocus\/([\w\.]+)/i],[Ae,[Ee,Et+" Focus"]],[/\bopt\/([\w\.]+)/i],[Ae,[Ee,Ct+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[Ae,[Ee,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[Ae,[Ee,"Dolphin"]],[/coast\/([\w\.]+)/i],[Ae,[Ee,Ct+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[Ae,[Ee,"MIUI"+Vt]],[/fxios\/([\w\.-]+)/i],[Ae,[Ee,Pt+Et]],[/\bqihoobrowser\/?([\w\.]*)/i],[Ae,[Ee,"360"]],[/\b(qq)\/([\w\.]+)/i],[[Ee,/(.+)/,"$1Browser"],Ae],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[Ee,/(.+)/,"$1"+Vt],Ae],[/samsungbrowser\/([\w\.]+)/i],[Ae,[Ee,pt+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[Ae,[Ee,At+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[Ee,At+" Mobile"],Ae],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[Ee,Ae],[/(lbbrowser|rekonq)/i],[Ee],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[Ae,Ee],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[Ee,_t],Ae,[Ce,Oe]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[Ee,Ae,[Ce,Oe]],[/\bgsa\/([\w\.]+) .*safari\//i],[Ae,[Ee,"GSA"],[Ce,Oe]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[Ae,[Ee,"TikTok"],[Ce,Oe]],[/\[(linkedin)app\]/i],[Ee,[Ce,Oe]],[/(chromium)[\/ ]([-\w\.]+)/i],[Ee,Ae],[/headlesschrome(?:\/([\w\.]+)| )/i],[Ae,[Ee,kt+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[Ae,[Ee,Lt+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[Ee,kt+" WebView"],Ae],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[Ae,[Ee,"Android"+Vt]],[/chrome\/([\w\.]+) mobile/i],[Ae,[Ee,Pt+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[Ee,Ae],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[Ae,[Ee,Pt+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[Ee,Pt+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[Ae,Ee],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[Ee,[Ae,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[Ee,Ae],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[Ee,Pt+Et],Ae],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[Ee,"Netscape"],Ae],[/(wolvic|librewolf)\/([\w\.]+)/i],[Ee,Ae],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[Ae,[Ee,Et+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[Ee,[Ae,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[Ee,[Ae,/[^\d\.]+./,fe]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Pe,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Pe,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Pe,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Pe,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Pe,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[Pe,/ower/,fe,Ot]],[/ sun4\w[;\)]/i],[[Pe,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[Pe,Ot]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[Ie,[_e,pt],[Ce,Fe]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[Ie,[_e,pt],[Ce,Re]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[Ie,[_e,it],[Ce,Re]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[Ie,[_e,it],[Ce,Fe]],[/(macintosh);/i],[Ie,[_e,it]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[Ie,[_e,gt],[Ce,Re]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[Ie,[_e,dt],[Ce,Fe]],[/honor([-\w ]+)[;\)]/i],[Ie,[_e,dt],[Ce,Re]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[Ie,[_e,st],[Ce,Fe]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[Ie,[_e,st],[Ce,Re]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[Ie,/_/g," "],[_e,vt],[Ce,Fe]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[Ie,/_/g," "],[_e,vt],[Ce,Re]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[Ie,[_e,ft],[Ce,Re]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[Ie,[_e,wt],[Ce,Re]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[Ie,[_e,Yt,{OnePlus:["203","304","403","404","413","415"],"*":wt}],[Ce,Fe]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[Ie,[_e,"BLU"],[Ce,Re]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[Ie,[_e,"Vivo"],[Ce,Re]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[Ie,[_e,"Realme"],[Ce,Re]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[Ie,[_e,ct],[Ce,Fe]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[Ie,[_e,ct],[Ce,Re]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[Ie,[_e,mt],[Ce,Re]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[Ie,[_e,mt],[Ce,Fe]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[Ie,[_e,lt],[Ce,Fe]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[Ie,[_e,lt],[Ce,Re]],[/(nokia) (t[12][01])/i],[_e,Ie,[Ce,Fe]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[Ie,/_/g," "],[Ce,Re],[_e,"Nokia"]],[/(pixel (c|tablet))\b/i],[Ie,[_e,at],[Ce,Fe]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[Ie,[_e,at],[Ce,Re]],[/(google) (pixelbook( go)?)/i],[_e,Ie],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[Ie,[_e,bt],[Ce,Re]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[Ie,"Xperia Tablet"],[_e,bt],[Ce,Fe]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[Ie,[_e,nt],[Ce,Fe]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[Ie,/(.+)/g,"Fire Phone $1"],[_e,nt],[Ce,Re]],[/(playbook);[-\w\),; ]+(rim)/i],[Ie,_e,[Ce,Fe]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[Ie,[_e,rt],[Ce,Re]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[Ie,[_e,ot],[Ce,Fe]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[Ie,[_e,ot],[Ce,Re]],[/(nexus 9)/i],[Ie,[_e,"HTC"],[Ce,Fe]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[_e,[Ie,/_/g," "],[Ce,Re]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[Ie,[_e,"TCL"],[Ce,Fe]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[Ie,[_e,"TCL"],[Ce,Re]],[/(itel) ((\w+))/i],[[_e,Ot],Ie,[Ce,Yt,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[Ie,[_e,"Acer"],[Ce,Fe]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[Ie,[_e,"Meizu"],[Ce,Re]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[Ie,[_e,"Ulefone"],[Ce,Re]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[Ie,[_e,"Energizer"],[Ce,Re]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[Ie,[_e,"Cat"],[Ce,Re]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[Ie,[_e,"Smartfren"],[Ce,Re]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[Ie,[_e,"Nothing"],[Ce,Re]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[Ie,[_e,"Archos"],[Ce,Fe]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[Ie,[_e,"Archos"],[Ce,Re]],[/; (n159v)/i],[Ie,[_e,"HMD"],[Ce,Re]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[_e,Ie,[Ce,Fe]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i],[_e,Ie,[Ce,Re]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[_e,Ie,[Ce,Fe]],[/(surface duo)/i],[Ie,[_e,ut],[Ce,Fe]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[Ie,[_e,"Fairphone"],[Ce,Re]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[Ie,[_e,ht],[Ce,Fe]],[/(sprint) (\w+)/i],[_e,Ie,[Ce,Re]],[/(kin\.[onetw]{3})/i],[[Ie,/\./g," "],[_e,ut],[Ce,Re]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[Ie,[_e,yt],[Ce,Fe]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[Ie,[_e,yt],[Ce,Re]],[/smart-tv.+(samsung)/i],[_e,[Ce,We]],[/hbbtv.+maple;(\d+)/i],[[Ie,/^/,"SmartTV"],[_e,pt],[Ce,We]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[_e,Ie,[Ce,We]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[_e,lt],[Ce,We]],[/(apple) ?tv/i],[_e,[Ie,it+" TV"],[Ce,We]],[/crkey.*devicetype\/chromecast/i],[[Ie,St+" Third Generation"],[_e,at],[Ce,We]],[/crkey.*devicetype\/([^/]*)/i],[[Ie,/^/,"Chromecast "],[_e,at],[Ce,We]],[/fuchsia.*crkey/i],[[Ie,St+" Nest Hub"],[_e,at],[Ce,We]],[/crkey/i],[[Ie,St],[_e,at],[Ce,We]],[/(portaltv)/i],[Ie,[_e,_t],[Ce,We]],[/droid.+aft(\w+)( bui|\))/i],[Ie,[_e,nt],[Ce,We]],[/(shield \w+ tv)/i],[Ie,[_e,ht],[Ce,We]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[Ie,[_e,gt],[Ce,We]],[/(bravia[\w ]+)( bui|\))/i],[Ie,[_e,bt],[Ce,We]],[/(mi(tv|box)-?\w+) bui/i],[Ie,[_e,vt],[Ce,We]],[/Hbbtv.*(technisat) (.*);/i],[_e,Ie,[Ce,We]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[_e,/.+\/(\w+)/,"$1",Yt,{LG:"lge"}],[Ie,Zt],[Ce,We]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[Ie,[Ce,We]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:|large screen[\w ]+safari)\b/i],[[Ce,We]],[/(playstation \w+)/i],[Ie,[_e,bt],[Ce,Me]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[Ie,[_e,ut],[Ce,Me]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[_e,Ie,[Ce,Me]],[/droid.+; (shield)( bui|\))/i],[Ie,[_e,ht],[Ce,Me]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[Ie,[_e,pt],[Ce,Te]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[_e,Ie,[Ce,Te]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[Ie,[_e,wt],[Ce,Te]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[Ie,[_e,it],[Ce,Te]],[/(opwwe\d{3})/i],[Ie,[_e,ft],[Ce,Te]],[/(moto 360)/i],[Ie,[_e,mt],[Ce,Te]],[/(smartwatch 3)/i],[Ie,[_e,bt],[Ce,Te]],[/(g watch r)/i],[Ie,[_e,lt],[Ce,Te]],[/droid.+; (wt63?0{2,3})\)/i],[Ie,[_e,yt],[Ce,Te]],[/droid.+; (glass) \d/i],[Ie,[_e,at],[Ce,Ge]],[/(pico) (4|neo3(?: link|pro)?)/i],[_e,Ie,[Ce,Ge]],[/(quest( \d| pro)?s?).+vr/i],[Ie,[_e,_t],[Ce,Ge]],[/mobile vr; rv.+firefox/i],[[Ce,Ge]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[_e,[Ce,je]],[/(aeobc)\b/i],[Ie,[_e,nt],[Ce,je]],[/(homepod).+mac os/i],[Ie,[_e,it],[Ce,je]],[/windows iot/i],[[Ce,je]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[Ie,[Ce,Yt,{mobile:"Mobile",xr:"VR","*":Fe}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[Ce,Fe]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[Ce,Re]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[Ie,[_e,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[Ae,[Ee,Lt+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[Ee,Ae],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[Ae,[Ee,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[Ee,Ae],[/ladybird\//i],[[Ee,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[Ae,Ee]],os:[[/(windows nt) (6\.[23]); arm/i],[[Ee,/N/,"R"],[Ae,Yt,Xt]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[Ee,Ae],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[Ae,/(;|\))/g,"",Yt,Xt],[Ee,It]],[/(windows ce)\/?([\d\.]*)/i],[Ee,Ae],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[Ae,/_/g,"."],[Ee,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[Ee,"macOS"],[Ae,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[Ae,[Ee,St+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[Ae,[Ee,St+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[Ae,[Ee,St+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[Ae,[Ee,St+" Linux"]],[/crkey\/([\d\.]+)/i],[Ae,[Ee,St]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[Ae,Ee],[/(ubuntu) ([\w\.]+) like android/i],[[Ee,/(.+)/,"$1 Touch"],Ae],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[Ee,Ae],[/\(bb(10);/i],[Ae,[Ee,rt]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[Ae,[Ee,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[Ae,[Ee,Et+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[Ae,[Ee,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[Ae,Yt,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[Ee,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[Ae,[Ee,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[Ee,"Chrome OS"],Ae],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[Ee,Ae],[/(sunos) ?([\d\.]*)/i],[[Ee,"Solaris"],Ae],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[Ee,Ae]]},Kt=(Bt.call((me={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[ve,[Ee,Ae,Ve,Ce]],[ye,[Pe]],[ke,[Ce,Ie,_e]],[xe,[Ee,Ae]],[Se,[Ee,Ae]]]),Bt.call(me.isIgnore,[[ve,[Ae,Ve]],[xe,[Ae]],[Se,[Ae]]]),Bt.call(me.isIgnoreRgx,[[ve,/ ?browser$/i],[Se,/ ?os$/i]]),Bt.call(me.toString,[[ve,[Ee,Ae]],[ye,[Pe]],[ke,[_e,Ie]],[xe,[Ee,Ae]],[Se,[Ee,Ae]]]),me),$t=function(e,t){var n=Kt.init[t],i=Kt.isIgnore[t]||0,o=Kt.isIgnoreRgx[t]||0,r=Kt.toString[t]||0;function a(){Bt.call(this,n)}return a.prototype.getItem=function(){return e},a.prototype.withClientHints=function(){return Rt?Rt.getHighEntropyValues(tt).then(function(t){return e.setCH(new Qt(t,!1)).parseCH().get()}):e.parseCH().get()},a.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=Le&&(a.prototype.is=function(e){var t=!1;for(var n in this)if(this.hasOwnProperty(n)&&!Wt(i,n)&&Ot(o?Ht(o,this[n]):this[n])==Ot(o?Ht(o,e):e)){if(t=!0,e!=pe)break}else if(e==pe&&t){t=!t;break}return t},a.prototype.toString=function(){var e=fe;for(var t in r)typeof this[r[t]]!==pe&&(e+=(e?" ":fe)+this[r[t]]);return e||pe}),Rt||(a.prototype.then=function(e){var t=this,n=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};n.prototype={is:a.prototype.is,toString:a.prototype.toString};var i=new n;return e(i),i}),new a};function Qt(e,t){if(e=e||{},Bt.call(this,tt),t)Bt.call(this,[[De,jt(e[Ye])],[He,jt(e[Xe])],[Re,/\?1/.test(e[Ke])],[Ie,Nt(e[$e])],[Ne,Nt(e[Qe])],[Ze,Nt(e[et])],[Pe,Nt(e[Ue])],[Be,jt(e[qe])],[ze,Nt(e[Je])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==pe&&(this[n]=e[n])}function en(e,t,n,i){return this.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},this.set=function(e,t){return this.data[e]=t,this},this.setCH=function(e){return this.uaCH=e,this},this.detectFeature=function(){if(Mt&&Mt.userAgent==this.ua)switch(this.itemType){case ve:Mt.brave&&typeof Mt.brave.isBrave==we&&this.set(Ee,"Brave");break;case ke:!this.get(Ce)&&Rt&&Rt[Re]&&this.set(Ce,Re),"Macintosh"==this.get(Ie)&&Mt&&typeof Mt.standalone!==pe&&Mt.maxTouchPoints&&Mt.maxTouchPoints>2&&this.set(Ie,"iPad").set(Ce,Fe);break;case Se:!this.get(Ee)&&Rt&&Rt[Ne]&&this.set(Ee,Rt[Ne]);break;case Le:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(ve,t(ve)).set(ye,t(ye)).set(ke,t(ke)).set(xe,t(xe)).set(Se,t(Se))}return this},this.parseUA=function(){return this.itemType!=Le&&zt.call(this.data,this.ua,this.rgxMap),this.itemType==ve&&this.set(Ve,Dt(this.get(Ae))),this},this.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case ve:case xe:var n,i=e[He]||e[De];if(i)for(var o in i){var r=i[o].brand||i[o],a=i[o].version;this.itemType==ve&&!/not.a.brand/i.test(r)&&(!n||/Chrom/.test(n)&&r!=xt||n==Lt&&/WebView2/.test(r))&&(r=Yt(r,Jt),(n=this.get(Ee))&&!/Chrom/.test(n)&&/Chrom/.test(r)||this.set(Ee,r).set(Ae,a).set(Ve,Dt(a)),n=r),this.itemType==xe&&r==xt&&this.set(Ae,a)}break;case ye:var s=e[Pe];s&&(s&&"64"==e[ze]&&(s+="64"),zt.call(this.data,s+";",t));break;case ke:if(e[Re]&&this.set(Ce,Re),e[Ie]&&(this.set(Ie,e[Ie]),!this.get(Ce)||!this.get(_e))){var c={};zt.call(c,"droid 9; "+e[Ie]+")",t),!this.get(Ce)&&c.type&&this.set(Ce,c.type),!this.get(_e)&&c.vendor&&this.set(_e,c.vendor)}if(e[Be]){var d;if("string"!=typeof e[Be])for(var l=0;!d&&l<e[Be].length;)d=Yt(e[Be][l++],Ut);else d=Yt(e[Be],Ut);this.set(Ce,d)}break;case Se:var u=e[Ne];if(u){var m=e[Ze];u==It&&(m=parseInt(Dt(m),10)>=13?"11":"10"),this.set(Ee,u).set(Ae,m)}this.get(Ee)==It&&"Xbox"==e[Ie]&&this.set(Ee,"Xbox").set(Ae,void 0);break;case Le:var h=this.data,f=function(t){return h[t].getItem().setCH(e).parseCH().get()};this.set(ve,f(ve)).set(ye,f(ye)).set(ke,f(ke)).set(xe,f(xe)).set(Se,f(Se))}return this},Bt.call(this,[["itemType",e],["ua",t],["uaCH",i],["rgxMap",n],["data",$t(this,e)]]),this}function tn(e,t,n){if(typeof e===ge?(Tt(e,!0)?(typeof t===ge&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e!==be||Tt(t,!0)||(n=t,t=void 0),n&&typeof n.append===we){var i={};n.forEach(function(e,t){i[t]=e}),n=i}if(!(this instanceof tn))return new tn(e,t,n).getResult();var o=typeof e===be?e:n&&n[he]?n[he]:Mt&&Mt.userAgent?Mt.userAgent:fe,r=new Qt(n,!0),a=t?function(e,t){var n={},i=t;if(!Tt(t))for(var o in i={},t)for(var r in t[o])i[r]=t[o][r].concat(i[r]?i[r]:[]);for(var a in e)n[a]=i[a]&&i[a].length%2==0?i[a].concat(e[a]):e[a];return n}(qt,t):qt,s=function(e){return e==Le?function(){return new en(e,o,a,r).set("ua",o).set(ve,this.getBrowser()).set(ye,this.getCPU()).set(ke,this.getDevice()).set(xe,this.getEngine()).set(Se,this.getOS()).get()}:function(){return new en(e,o,a[e],r).parseUA().get()}};return Bt.call(this,[["getBrowser",s(ve)],["getCPU",s(ye)],["getDevice",s(ke)],["getEngine",s(xe)],["getOS",s(Se)],["getResult",s(Le)],["getUA",function(){return o}],["setUA",function(e){return Gt(e)&&(o=e.length>500?Zt(e,500):e),this}]]).setUA(o),this}tn.VERSION="2.0.4",tn.BROWSER=Ft([Ee,Ae,Ve,Ce]),tn.CPU=Ft([Pe]),tn.DEVICE=Ft([Ie,_e,Ce,Me,Re,We,Fe,Te,je]),tn.ENGINE=tn.OS=Ft([Ee,Ae]);const nn=async()=>({...new tn(navigator.userAgent).getResult().os,device_type:on()}),on=()=>{const e=window.innerWidth;return e<=767?"mobile":e<=1024?"tablet":"desktop"},rn=e=>{if(!e)return null;const t=e.toLowerCase();return t.includes("android")?"android":t.includes("iphone")||t.includes("ipad")||"ios"===t?"ios":t.includes("win")?"windows":t.includes("mac")||t.includes("macos")?"macos":t.includes("linux")?"linux":null},an={ios:[/apple a\d+ gpu/i],macos:[/apple m\d+/i,/opengl engine/i],windows:[/angle.*direct3d/i],android:[/adreno|mali|powervr/i],linux:[/mesa|x11/i]},sn=(e,t,n,i)=>"ios"===i||"android"===i?n>768?"tablet":"mobile":"windows"===i||"macos"===i||"linux"===i?"desktop":t?n<600?"mobile":n<=1024?"tablet":!1===e?"desktop":"tablet":t?null:"desktop",cn=e=>parseFloat(e.toFixed(2)),dn=(e,t)=>{let n=1;const i=[],o={confidence:1,spoofingConfidence:0,isSpoofed:!1,detectionConflicts:[],realPlatform:null,realDeviceType:null},a=t.touchPoints>0,s=t.screen.width,c=rn(e.platform),d=(l=t.webGL.renderer?.toLowerCase()||"",an.ios.some(e=>e.test(l))?"ios":an.macos.some(e=>e.test(l))?"macos":an.windows.some(e=>e.test(l))?"windows":an.android.some(e=>e.test(l))?"android":an.linux.some(e=>e.test(l))||/NVIDIA|AMD|Intel/i.test(l)?"linux":null);var l;const u=rn(t.actualPlatform),m=d||u;let h=c;c&&m&&c!==m?(n-=.3,i.push(`Claimed OS "${c}" disagrees with actual OS signal "${m}".`),h=m):c&&!m&&""!==e.platform?(n-=.2,i.push(`Actual OS signal "${t.actualPlatform}" is unrecognized.`),h=c):!c&&m&&(n-=.2,i.push(`Claimed OS signal "${e.platform}" is unrecognized.`),h=m);const f=(t.webGL.vendor||"").toLowerCase(),w=(t.webGL.renderer||"").toLowerCase();if(f&&"n/a"!==f&&"n/a (masked)"!==f){let e=!1,o=null;"android"===h&&(f.includes("apple")||w.includes("apple"))?(e=!0,o="ios"):"ios"!==h||f.includes("apple")||w.includes("apple")?"windows"===h&&(f.includes("apple")||w.includes("apple"))?(e=!0,o="macos"):"macos"!==h||f.includes("apple")||w.includes("apple")||f.includes("intel")||w.includes("intel")||f.includes("amd")||w.includes("amd")||w.includes("radeon")||(e=!0,o=f.includes("qualcomm")||f.includes("adreno")||f.includes("mali")||f.includes("powervr")||f.includes("arm")?"android":"windows"):(e=!0,o=f.includes("qualcomm")||f.includes("adreno")||f.includes("mali")||f.includes("powervr")||f.includes("arm")?"android":f.includes("intel")||w.includes("intel")||f.includes("nvidia")||w.includes("nvidia")||f.includes("amd")||w.includes("amd")||w.includes("radeon")?"windows":"android"),e&&(n-=.5,i.push(`OS "${h}" conflicts with GPU "${t.webGL.vendor} / ${t.webGL.renderer}". GPU suggests "${o||"unknown"}".`),o&&(h=o))}else t.webGL.error&&(n-=.1,i.push(`WebGL info unavailable (${t.webGL.error}).`));let p=null;const g=(b=e.guessedDeviceType)&&r.includes(b)?e.guessedDeviceType:null;var b;!0!==e.mobile||a?!1===e.mobile&&a?(n-=.15,i.push("Claimed mobile=false but touch points detected."),p=sn(e.mobile,a,s,h)):g&&(p=g):(n-=.3,i.push("Claimed mobile=true but no touch points detected."),p="desktop");"mobile"===p&&s>1024?(n-=.15,i.push(`Device type 'mobile', but screen width (${s}px) is large.`),p="tablet"):"desktop"===p&&s<768&&(n-=.15,i.push(`Preliminary type 'desktop', but screen width (${s}px) is small.`),p=a?"mobile":"desktop"),o.realPlatform=h||c;const v=sn(e.mobile,a,s,o.realPlatform);return p?v&&v!==p?(n-=.12,i.push(`Initial device type guess (${p}) adjusted to ${v} based on final signals.`),o.realDeviceType=v):o.realDeviceType=p:o.realDeviceType=v,o.realDeviceType||("ios"===o.realPlatform||"android"===o.realPlatform?o.realDeviceType=v||"mobile":o.realPlatform?o.realDeviceType=v||"desktop":o.realDeviceType=a?s>768?"tablet":"mobile":"desktop"),o.confidence=cn(Math.max(0,n)),o.spoofingConfidence=cn(1-o.confidence),o.isSpoofed=o.spoofingConfidence>.1,o.detectionConflicts=i,o},ln=async()=>{const e={claimed:{platform:"",mobile:!1,brands:[],guessedDeviceType:null},signals:{actualPlatform:"",touchPoints:0,screen:{width:0,height:0,pixelRatio:1},webGL:{vendor:void 0,renderer:void 0,error:""},userAgentString:""},analysis:{confidence:1,spoofingConfidence:0,isSpoofed:!1,detectionConflicts:[],realPlatform:null,realDeviceType:null}},t=(()=>{const e={actualPlatform:navigator.userAgentData?.platform||navigator.platform,touchPoints:navigator.maxTouchPoints||0,screen:{width:screen.width,height:screen.height,pixelRatio:window.devicePixelRatio||1},webGL:{vendor:void 0,renderer:void 0,error:""},userAgentString:navigator.userAgent};try{const t=document.createElement("canvas"),n=t.getContext("webgl2")||t.getContext("webgl")||t.getContext("experimental-webgl");if(n&&"getParameter"in n){const t=n.getExtension("WEBGL_debug_renderer_info");t?(e.webGL.vendor=n.getParameter(t.UNMASKED_VENDOR_WEBGL)||"n/a",e.webGL.renderer=n.getParameter(t.UNMASKED_RENDERER_WEBGL)||"n/a"):(e.webGL.vendor=n.getParameter(n.VENDOR)||"n/a (masked)",e.webGL.renderer=n.getParameter(n.RENDERER)||"n/a (masked)",e.webGL.vendor&&"n/a (masked)"!==e.webGL.vendor||(e.webGL.error="Debug info extension unavailable or vendor masked"))}else e.webGL.error="WebGL context unavailable"}catch(t){console.error("Error getting WebGL data:",t),e.webGL.error=t instanceof Error?t.message:"Unknown WebGL error"}return e})();e.signals=t;const n=await(async e=>{const t={};try{if(navigator.userAgentData){const e=await navigator.userAgentData.getHighEntropyValues(["platform","platformVersion","architecture","model","uaFullVersion","brands","mobile"]);t.platform=e.platform,t.mobile=e.mobile??null,t.brands=e.brands||[],t.mobile?t.guessedDeviceType=screen.width>768?"tablet":"mobile":t.guessedDeviceType="desktop"}else{const n=e,i=n.toLowerCase();i.includes("android")?t.platform="Android":i.includes("iphone")||i.includes("ipad")?t.platform="iOS":i.includes("windows nt")?t.platform="Windows":i.includes("mac os x")||i.includes("macintosh")?t.platform="macOS":i.includes("linux")&&(t.platform="Linux");const o=(e=>{const t=e.toLowerCase();return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(t)?"tablet":/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|hpwos|Opera M(obi|ini)/i.test(t)?"mobile":t.includes("windows nt")||t.includes("macintosh")||t.includes("x11")?"desktop":null})(n);t.guessedDeviceType=o,t.mobile="mobile"===o||"tablet"===o;const r=n.match(/(Apple|Samsung|Google|Microsoft|Sony|LG|HTC|Nokia|Motorola|Huawei|Xiaomi|Pixel|Firefox|Safari|Edge|Chrome)/i);if(r){const e=n.match(new RegExp(r[0]+"[ /]([\\d._]+)"));t.brands.push({brand:r[0],version:e?e[1]:"unknown"})}}}catch(e){console.error("Error getting User Agent Data:",e)}return t})(t.userAgentString);e.claimed=n;const i=dn(n,t);e.analysis=i;return{...e,deviceOs:i.realPlatform,deviceType:i.realDeviceType,tampering:i.isSpoofed?{status:!0,confidence:i.spoofingConfidence}:{status:!1}}};async function un(){const{name:e,version:t}=ue();return{name:e,version:t,user_agent:navigator.userAgent}}function mn(e,t,n){let i=[];for(let t=0;t<e[0].data.length;t++){let n=[];for(let i=0;i<e.length;i++)n.push(e[i].data[t]);i.push(hn(n))}const o=new Uint8ClampedArray(i);return new ImageData(o,t,n)}function hn(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}p("audio",async function(){return new Promise((e,t)=>{try{const t=44100,n=5e3,i=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,n,t),o=i.createBufferSource(),r=i.createAnalyser(),a=new Float32Array(r.frequencyBinCount);r.getFloatFrequencyData(a);const s=i.createOscillator();s.frequency.value=1e3;const c=i.createDynamicsCompressor();c.threshold.value=-50,c.knee.value=40,c.ratio.value=12,c.attack.value=0,c.release.value=.2,s.connect(c),c.connect(i.destination),s.start(),i.oncomplete=()=>{e({oscillator:s.type,maxChannels:i.destination.maxChannelCount,channelCountMode:o.channelCountMode,frequencyBinCount:r.frequencyBinCount})},i.startRendering()}catch(e){console.error("Error creating audio fingerprint:",e),t(e)}})});const fn="SamsungBrowser"!==le()?1:3;function wn(e,t){return new Promise(n=>setTimeout(n,e,t))}"Firefox"!=le()&&p("canvas",function(){return new Promise(e=>{const t=Array.from({length:fn},()=>function(){const e=document.createElement("canvas"),t=e.getContext("2d");if(!t)return new ImageData(1,1);e.width=280,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 i="Random Text WMwmil10Oo";t.font="23.123px Arial",t.fillStyle="black",t.fillText(i,-5,15),t.fillStyle="rgba(0, 0, 255, 0.5)",t.fillText(i,-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();const o=t.getImageData(0,0,e.width,e.height);return o}());e({commonImageDataHash:k(mn(t,280,20).data.toString()).toString()})})});const pn=["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"],gn=["monospace","sans-serif","serif"];function bn(e,t){if(!e)throw new Error("Canvas context not supported");return e.font=`72px ${t}`,e.measureText("WwMmLli0Oo").width}function vn(){const e=document.createElement("canvas"),t=e.getContext("webgl")??e.getContext("experimental-webgl");if(t&&"getParameter"in t)try{const e=(t.getParameter(t.VENDOR)||"").toString();let n={vendor:e,renderer:(t.getParameter(t.RENDERER)||"").toString(),version:(t.getParameter(t.VERSION)||"").toString(),shadingLanguageVersion:(t.getParameter(t.SHADING_LANGUAGE_VERSION)||"").toString()};const i=t.getExtension("WEBGL_debug_renderer_info");if(i){const e=(t.getParameter(i.UNMASKED_VENDOR_WEBGL)||"").toString(),o=(t.getParameter(i.UNMASKED_RENDERER_WEBGL)||"").toString();e&&(n.vendorUnmasked=e),o&&(n.rendererUnmasked=o)}return n}catch(e){}return"undefined"}function yn(){const e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}function kn(e,t){const n={};return t.forEach(t=>{const i=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],i=1;return Object.keys(t).forEach(e=>{t[e]>i&&(n=e,i=t[e])}),n}(e.map(e=>t in e?e[t]:void 0).filter(e=>void 0!==e));i&&(n[t]=i)}),n}let xn;function Sn(e){return e.reduce((e,t)=>e+(t?1:0),0)}function Ln(){const e=window;return Sn(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===navigator.vendor.indexOf("Apple"),"RGBColor"in e,"WebKitMediaKeys"in e])>=4}function En(){const e=window;return t=e.print,/^function\s.*?\{\s*\[native code]\s*}$/.test(String(t))&&"[object WebPageNamespace]"===String(e.browser);var t}function Cn(){const e=window;return Sn(["buildID"in navigator,"MozAppearance"in(document.documentElement?.style??{}),"onmozfullscreenchange"in e,"mozInnerScreenX"in e,"CSSMozDocumentRule"in e,"CanvasCaptureMediaStream"in e])>=4}function _n(){const e=function(){const e=window,t=navigator;return Sn(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,0===(t.vendor||"").indexOf("Google"),"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}(),t=Cn(),n=window,i=navigator;return e?Sn([!("SharedWorker"in n),!("sinkId"in new Audio)])>=2:!!t&&Sn(["onorientationchange"in n,"orientation"in n,/android/i.test(i.appVersion)])>=2}"Firefox"!=le()&&p("fonts",function(){return new Promise((e,t)=>{try{!async function(e){for(;!document.body;)await wn(50);const t=document.createElement("iframe");t.setAttribute("frameBorder","0");const n=t.style;n.setProperty("position","fixed"),n.setProperty("display","block","important"),n.setProperty("visibility","visible"),n.setProperty("border","0"),n.setProperty("opacity","0"),t.src="about:blank",document.body.appendChild(t);const i=t.contentDocument||t.contentWindow?.document;if(!i)throw new Error("Iframe document is not accessible");e({iframe:i}),setTimeout(()=>{document.body.removeChild(t)},0)}(async({iframe:t})=>{const n=t.createElement("canvas").getContext("2d"),i=gn.map(e=>bn(n,e));let o={};pn.forEach(e=>{const t=bn(n,e);i.includes(t)||(o[e]=t)}),e(o)})}catch(e){t({error:"unsupported"})}})}),p("hardware",function(){return new Promise(e=>{const t=window.performance&&window.performance.memory?window.performance.memory:0;e({videocard:vn(),architecture:yn(),jsHeapSizeLimit:t.jsHeapSizeLimit||0})})}),p("locales",function(){return new Promise(e=>{e({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),p("permissions",async function(){xn=f?.permissions_to_check||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","local-fonts","magnetometer","midi","nfc","notifications","payment-handler","persistent-storage","speaker","storage-access","top-level-storage-access","window-management","query"];const e=Array.from({length:f?.retries||3},()=>async function(){const e={};for(const t of xn)try{const n=await navigator.permissions.query({name:t});e[t]=n.state.toString()}catch(e){}return e}());return Promise.all(e).then(e=>kn(e,xn))}),p("screen",function(){return new Promise(e=>{e({colorDepth:screen.colorDepth})})}),p("screenResolution",async function(){return Ln()&&function(){const e=window,t=navigator,{CSS:n,HTMLButtonElement:i}=e;return Sn([!("getStorageUpdates"in t),i&&"popover"in i.prototype,"CSSCounterStyleRule"in e,n.supports("font-size-adjust: ex-height 0.5"),n.supports("text-transform: full-width")])>=4}()&&En()?[]:function(){const e=screen,t=e=>function(e,t){return"number"==typeof e&&isNaN(e)?t:e}(function(e){return parseInt(e)}(e),null),n=[t(e.width),t(e.height)];return n.sort().reverse(),n}()});const An="SamsungBrowser"!==function(){if("undefined"==typeof navigator)return{name:"unknown",version:"unknown"};const e=navigator.userAgent,t=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>samsung).*Version\/(?<version>\d+(?:\.\d+)?)/i],n={edg:"Edge",opr:"Opera",samsung:"SamsungBrowser"};for(const i of t){const t=e.match(i);if(t&&t.groups){return{name:n[t.groups.name.toLowerCase()]||t.groups.name,version:t.groups.version}}}return{name:"unknown",version:"unknown"}}().name?1:3;let Pn,Vn=null;async function In(){"undefined"!=typeof document&&(Pn=document.createElement("canvas"),Pn.width=200,Pn.height=100,Vn=Pn.getContext("webgl"));try{if(!Vn)throw new Error("WebGL not supported");const e=Array.from({length:An},()=>function(){try{if(!Vn)throw new Error("WebGL not supported");const e="\n attribute vec2 position;\n void main() {\n gl_Position = vec4(position, 0.0, 1.0);\n }\n ",t="\n precision mediump float;\n void main() {\n gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color\n }\n ",n=Vn.createShader(Vn.VERTEX_SHADER),i=Vn.createShader(Vn.FRAGMENT_SHADER);if(!n||!i)throw new Error("Failed to create shaders");if(Vn.shaderSource(n,e),Vn.shaderSource(i,t),Vn.compileShader(n),!Vn.getShaderParameter(n,Vn.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+Vn.getShaderInfoLog(n));if(Vn.compileShader(i),!Vn.getShaderParameter(i,Vn.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+Vn.getShaderInfoLog(i));const o=Vn.createProgram();if(!o)throw new Error("Failed to create shader program");if(Vn.attachShader(o,n),Vn.attachShader(o,i),Vn.linkProgram(o),!Vn.getProgramParameter(o,Vn.LINK_STATUS))throw new Error("Shader program linking failed: "+Vn.getProgramInfoLog(o));Vn.useProgram(o);const r=137,a=new Float32Array(4*r),s=2*Math.PI/r;for(let e=0;e<r;e++){const t=e*s;a[4*e]=0,a[4*e+1]=0,a[4*e+2]=Math.cos(t)*(Pn.width/2),a[4*e+3]=Math.sin(t)*(Pn.height/2)}const c=Vn.createBuffer();Vn.bindBuffer(Vn.ARRAY_BUFFER,c),Vn.bufferData(Vn.ARRAY_BUFFER,a,Vn.STATIC_DRAW);const d=Vn.getAttribLocation(o,"position");Vn.enableVertexAttribArray(d),Vn.vertexAttribPointer(d,2,Vn.FLOAT,!1,0,0),Vn.viewport(0,0,Pn.width,Pn.height),Vn.clearColor(0,0,0,1),Vn.clear(Vn.COLOR_BUFFER_BIT),Vn.drawArrays(Vn.LINES,0,2*r);const l=new Uint8ClampedArray(Pn.width*Pn.height*4);Vn.readPixels(0,0,Pn.width,Pn.height,Vn.RGBA,Vn.UNSIGNED_BYTE,l);return new ImageData(l,Pn.width,Pn.height)}catch(e){return new ImageData(1,1)}finally{Vn&&(Vn.bindBuffer(Vn.ARRAY_BUFFER,null),Vn.useProgram(null),Vn.viewport(0,0,Vn.drawingBufferWidth,Vn.drawingBufferHeight),Vn.clearColor(0,0,0,0))}}());return{commonImageHash:k(mn(e,Pn.width,Pn.height).data.toString()).toString()}}catch(e){return}}function Mn(){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}p("webgl",async function({cache:e={}}={cache:{}}){const t=function(e){if(e.webgl)return e.webgl.context;const t=document.createElement("canvas");let n;t.addEventListener("webglCreateContextError",()=>n=void 0);for(const e of["webgl","experimental-webgl"]){try{n=t.getContext(e)}catch{}if(n)break}return e.webgl={context:n},n}(e);if(!t)return{status:-1};if(!function(e){return"function"==typeof e.getParameter}(t))return{status:-2};const n=Cn()?null:t.getExtension("WEBGL_debug_renderer_info"),i=await In();return{version:t.getParameter(t.VERSION)?.toString()||"",vendor:t.getParameter(t.VENDOR)?.toString()||"",vendorUnmasked:n?t.getParameter(n.UNMASKED_VENDOR_WEBGL)?.toString():"",renderer:t.getParameter(t.RENDERER)?.toString()||"",rendererUnmasked:n?t.getParameter(n.UNMASKED_RENDERER_WEBGL)?.toString():"",shadingLanguageVersion:t.getParameter(t.SHADING_LANGUAGE_VERSION)?.toString()||"",...i}}),p("plugins",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})})}),p("system",async function(){return new Promise(e=>{const t=ue();e({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,browser:{name:t.name},applePayVersion:Mn()})})});const Rn=["π","π¨βπ©βπ§βπ¦","πΊπΈ","π","πΌ","π","π³οΈβπ","ππ½","β€οΈ","π€¦ββοΈ"],Fn=["Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","Android Emoji","EmojiOne","Twemoji Mozilla","sans-serif"];function Wn(e,t){try{const n=document.createElement("canvas"),i=20;n.width=i,n.height=i;const o=n.getContext("2d");return o?(o.fillStyle="white",o.fillRect(0,0,i,i),o.textBaseline="middle",o.textAlign="center",o.fillStyle="black",o.font=`16px "${t}"`,o.fillText(e,i/2,i/2),o.getImageData(0,0,i,i).data):null}catch(e){return null}}function Tn(e){const t=[];for(let n=0;n<e.length;n+=32)t.push(e[n],e[n+1],e[n+2]);return t}p("emojiFingerprint",async function(){return new Promise(e=>{try{const t={};let n=[];Rn.forEach((e,i)=>{for(const o of Fn){const r=Wn(e,o);if(r){const e=Tn(r);n=[...n,...e],t[`emoji_${i}`]=k(new Uint8Array(e).buffer).slice(0,16);break}}});e({emojiFingerprintHash:k(new Uint8Array(n).buffer),emojiDetails:t,uniqueEmojisRendered:Object.keys(t).length})}catch(t){e({emojiFingerprintHash:"unsupported",emojiDetails:{},uniqueEmojisRendered:0})}})});const Gn=(e,t,n,i)=>{const o=(n-t)/i;let r=0;for(let n=0;n<i;n++){r+=e(t+(n+.5)*o)}return r*o};function jn(e,t){return new Promise(n=>setTimeout(n,e,t))}function On(e){const[t,n]=function(e){const t=`Unexpected syntax '${e}'`,n=/^\s*([a-z-]*)(.*)$/i.exec(e),i=n[1]||void 0,o={},r=/([.:#][\w-]+|\[.+?\])/gi,a=(e,t)=>{o[e]=o[e]||[],o[e].push(t)};for(;;){const e=r.exec(n[2]);if(!e)break;const i=e[0];switch(i[0]){case".":a("class",i.slice(1));break;case"#":a("id",i.slice(1));break;case"[":{const e=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(i);if(!e)throw new Error(t);a(e[1],e[4]??e[5]??"");break}default:throw new Error(t)}}return[i,o]}(e),i=document.createElement(t??"div");for(const e of Object.keys(n)){const t=n[e].join(" ");"style"===e?Dn(i.style,t):i.setAttribute(e,t)}return i}function Dn(e,t){for(const n of t.split(";")){const t=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(n);if(t){const[,n,i,,o]=t;e.setProperty(n,i,o||"")}}}function Bn(e){return matchMedia(`(forced-colors: ${e})`).matches}p("math",async()=>({acos:Math.acos(.5),asin:Gn(Math.asin,-1,1,97),atan:Gn(Math.atan,-1,1,97),cos:Gn(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:Gn(Math.sin,-Math.PI,Math.PI,97),sinh:Gn(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:Gn(Math.tan,0,2*Math.PI,97),tanh:Gn(Math.tanh,-9/7,7/9,97)}));function Hn(e){e.style.setProperty("visibility","hidden","important"),e.style.setProperty("display","block","important")}p("domBlockers",async function(){if(!Ln()&&!_n())return;const e=function(){const e=atob;return{abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",'[title="ALIENBOLA" i]',e("I0JveC1CYW5uZXItYWRz")],abpvn:[".quangcao","#mobileCatfish",e("LmNsb3NlLWFkcw=="),'[id^="bn_bottom_fixed_"]',"#pmadv"],adBlockFinland:[".mainostila",e("LnNwb25zb3JpdA=="),".ylamainos",e("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"),e("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd")],adBlockPersian:["#navbar_notice_50",".kadr",'TABLE[width="140px"]',"#divAgahi",e("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd")],adBlockWarningRemoval:["#adblock-honeypot",".adblocker-root",".wp_adblock_detect",e("LmhlYWRlci1ibG9ja2VkLWFk"),e("I2FkX2Jsb2NrZXI=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],adGuardBase:[".BetterJsPopOverlay",e("I2FkXzMwMFgyNTA="),e("I2Jhbm5lcmZsb2F0MjI="),e("I2NhbXBhaWduLWJhbm5lcg=="),e("I0FkLUNvbnRlbnQ=")],adGuardChinese:[e("LlppX2FkX2FfSA=="),e("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"),"#widget-quan",e("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"),e("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=")],adGuardFrench:["#pavePub",e("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"),".mobile_adhesion",".widgetadv",e("LmFkc19iYW4=")],adGuardGerman:['aside[data-portal-id="leaderboard"]'],adGuardJapanese:["#kauli_yad_1",e("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="),e("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="),e("LmFkZ29vZ2xl"),e("Ll9faXNib29zdFJldHVybkFk")],adGuardMobile:[e("YW1wLWF1dG8tYWRz"),e("LmFtcF9hZA=="),'amp-embed[type="24smi"]',"#mgid_iframe1",e("I2FkX2ludmlld19hcmVh")],adGuardRussian:[e("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="),e("LnJlY2xhbWE="),'div[id^="smi2adblock"]',e("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"),"#psyduckpockeball"],adGuardSocial:[e("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="),e("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="),".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",".cnt-publi"],adGuardTrackingProtection:["#qoo-counter",e("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="),e("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="),e("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="),"#top100counter"],adGuardTurkish:["#backkapat",e("I3Jla2xhbWk="),e("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="),e("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"),e("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")],bulgarian:[e("dGQjZnJlZW5ldF90YWJsZV9hZHM="),"#ea_intext_div",".lapni-pop-over","#xenium_hot_offers"],easyList:[".yb-floorad",e("LndpZGdldF9wb19hZHNfd2lkZ2V0"),e("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",e("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],easyListChina:[e("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="),e("LmZyb250cGFnZUFkdk0="),"#taotaole","#aafoot.top_box",".cfa_popup"],easyListCookie:[".ezmob-footer",".cc-CookieWarning","[data-cookie-number]",e("LmF3LWNvb2tpZS1iYW5uZXI="),".sygnal24-gdpr-modal-wrap"],easyListCzechSlovak:["#onlajny-stickers",e("I3Jla2xhbW5pLWJveA=="),e("LnJla2xhbWEtbWVnYWJvYXJk"),".sklik",e("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")],easyListDutch:[e("I2FkdmVydGVudGll"),e("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="),".adstekst",e("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="),"#semilo-lrectangle"],easyListGermany:["#SSpotIMPopSlider",e("LnNwb25zb3JsaW5rZ3J1ZW4="),e("I3dlcmJ1bmdza3k="),e("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"),e("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=")],easyListItaly:[e("LmJveF9hZHZfYW5udW5jaQ=="),".sb-box-pubbliredazionale",e("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"),e("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"),e("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")],easyListLithuania:[e("LnJla2xhbW9zX3RhcnBhcw=="),e("LnJla2xhbW9zX251b3JvZG9z"),e("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"),e("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"),e("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")],estonian:[e("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")],fanboyAnnoyances:["#ac-lre-player",".navigate-to-top","#subscribe_popup",".newsletter_holder","#back-top"],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag","#sovrn_container",'div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:["#FollowUs","#meteored_share","#social_follow",".article-sharer",".community__social-desc"],frellwitSwedish:[e("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="),e("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="),"article.category-samarbete",e("ZGl2LmhvbGlkQWRz"),"ul.adsmodern"],greekAdBlock:[e("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"),e("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="),e("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"),"DIV.agores300","TABLE.advright"],hungarian:["#cemp_doboz",".optimonk-iframe-container",e("LmFkX19tYWlu"),e("W2NsYXNzKj0iR29vZ2xlQWRzIl0="),"#hirdetesek_box"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container","#cookies-policy-sticky","#stickyCookieBar"],icelandicAbp:[e("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")],latvian:[e("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="),e("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")],listKr:[e("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="),e("I2xpdmVyZUFkV3JhcHBlcg=="),e("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="),e("aW5zLmZhc3R2aWV3LWFk"),".revenue_unit_item.dable"],listeAr:[e("LmdlbWluaUxCMUFk"),".right-and-left-sponsers",e("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="),e("YVtocmVmKj0iYm9vcmFxLm9yZyJd"),e("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")],listeFr:[e("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="),e("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="),e("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="),".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",e("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"),e("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="),e("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=="),e("ZGl2I3NrYXBpZWNfYWQ=")],ro:[e("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"),e("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"),e("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="),e("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"),'a[href^="/url/"]'],ruAd:[e("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"),e("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="),e("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="),"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]",e("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="),e("LmFkczMwMHM="),".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",e("LmN0cGwtZnVsbGJhbm5lcg=="),".zergnet-recommend",".yt.btn-link.btn-md.btn"]}}(),t=Object.keys(e),n=[].concat(...t.map(t=>e[t])),i=await async function(e){const t=document,n=t.createElement("div"),i=new Array(e.length),o={};Hn(n);for(let o=0;o<e.length;++o){const r=On(e[o]);"DIALOG"===r.tagName&&r.show();const a=t.createElement("div");Hn(a),a.appendChild(r),n.appendChild(a),i[o]=r}for(;!t.body;)await jn(50);t.body.appendChild(n);try{for(let t=0;t<e.length;++t)i[t].offsetParent||(o[e[t]]=!0)}finally{n.parentNode?.removeChild(n)}return o}(n),o=t.filter(t=>{const n=e[t];return Sn(n.map(e=>i[e]))>.6*n.length});return o.sort(),o}),p("vendorFlavour",function(){const e=[];for(const t of["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"]){const n=window[t];n&&"object"==typeof n&&e.push(t)}const t=e.sort();if(t.length>0)return t;{const{name:e}=ue();return[e]}}),p("monochrome",function(){if(matchMedia("(min-monochrome: 0)").matches){for(let e=0;e<=100;++e)if(matchMedia(`(max-monochrome: ${e})`).matches)return e;throw new Error("Too high value")}}),p("forcedColors",function(){return!!Bn("active")||!Bn("none")&&void 0}),p("colorGamut",function(){for(const e of["rec2020","p3","srgb"])if(matchMedia(`(color-gamut: ${e})`).matches)return e}),p("osCpu",function(){return navigator.oscpu}),p("audioLatency",function(){return _n()||Ln()?window.AudioContext?(new AudioContext).baseLatency??-1:-1:-2});const Nn=async(e,t)=>{const[n,i,o,r,a,s,c]=await Zn();return{request_id:e,device:{fingerprint_id:n.hash,type:"web",os:s.deviceOs,os_version:a.version,raw_device_data:n.data,browserDetails:c,bot:o,tampering:s.tampering,incognito:r,tor:i},sdk:{name:t?.name,version:t?.version}}};async function Zn(){return await Promise.all([L(),C(),de(),A(),nn(),ln(),un()])}const{getCount:zn,addListener:Yn,removeListener:Xn}=l();class Un{constructor(e={}){this.isInitialized=!1,this.fields=[],this.trackedFieldIds=new Set,this.config={...Un.DEFAULT_CONFIG,...e},Yn()}initializeTracking(e){e.filter(e=>!this.trackedFieldIds.has(e.id)).forEach(e=>this.trackField(e)),this.isInitialized=!0}get metrics(){return this.ensureInitialized(),this.fields.map(({element:e,...t})=>t)}removeTracking(e){e?this.removeFieldTracking(e):this.removeAllTracking()}trackField(e){const{id:t,ltm:n}=e,i=this.getValidElement(t),o=this.createFieldMetric(t,i,n);this.fields.push(o),this.trackedFieldIds.add(t);const r=this.createInputHandler(o);i.addEventListener("input",r)}getValidElement(e){const t=document.getElementById(e);if(!t)throw new o(`Element with ID "${e}" was not found in the DOM. Please ensure the ID is correctly assigned to an input element.`);if(!this.isValidInputElement(t))throw new o(`Element with ID "${e}" must be an HTMLInputElement or HTMLTextAreaElement.`);return t}isValidInputElement(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement}createFieldMetric(e,t,n){return{field_name:e,started_at:0,ended_at:0,interaction_count:0,fill_method:null,paste_count:0,ltm:n??!1,corrections_count:0,pauses:0,pauseDurations:[],element:t}}createInputHandler(e){return t=>{this.handleInput(e,t)}}handleInput(e,t){const n=performance.now(),i=e.ended_at||0,o=this.analyzeInteraction(e,t,n,i);this.updateFieldMetrics(e,o,n)}analyzeInteraction(e,t,n,i){const o=this.determineFillMethod(e,t);return{fillMethod:o,isCorrection:this.isCorrection(t),isPaste:this.isPaste(o,t),isPause:this.isPause(n,i),pauseDuration:n-i}}updateFieldMetrics(e,t,n){e.started_at||(e.started_at=n),e.ended_at=n,e.fill_method=t.fillMethod,e.interaction_count+=1,t.isCorrection&&(e.corrections_count+=1),t.isPaste&&(e.paste_count+=1),t.isPause&&(e.pauses+=1,e.pauseDurations.push(t.pauseDuration))}determineFillMethod(e,t){const n=t.inputType;if(!n)return a.paste;const i="insertText"===n?a.typed:"insertFromPaste"===n?a.paste:a.mixed;return e.fill_method&&e.fill_method!==i?a.mixed:i}isCorrection(e){return"deleteContentBackward"===e.inputType}isPaste(e,t){return e===a.paste||"insertFromPaste"===t.inputType}isPause(e,t){if(0===t)return!1;return e-t>this.config.pauseThresholdMs}removeFieldTracking(e){const t=this.fields.findIndex(t=>t.field_name===e);if(-1===t)return;const n=this.fields[t];this.cleanupFieldTracking(n),this.fields.splice(t,1),this.trackedFieldIds.delete(e)}removeAllTracking(){this.fields.forEach(e=>this.cleanupFieldTracking(e)),this.fields.length=0,this.trackedFieldIds.clear()}cleanupFieldTracking(e){e.element.removeEventListener("input",this.createInputHandler(e))}ensureInitialized(){if(!this.isInitialized)throw new o("Ginger.trackEvent must be initialized before data can be fetched.")}}Un.DEFAULT_CONFIG={pauseThresholdMs:1500};const Jn=new Un;exports.GingerClientError=o,exports.GingerError=i,exports.GingerHttpClient=h,exports.GingerJsClient=class{constructor({apikey:t}){this.requestId=e(),this.isInitialized=!1,this.getTrackedData=()=>{if(!this.isInitialized)throw new o("Unsuccessful Initialization. Cannot get tracked data.");if(!this.trackDetails)throw new o("Tracking not initiated. Call `trackEvent` before getting tracked data.");const e={distractions_count:zn(),fields:Jn.metrics};return{event_type:this.trackDetails.event_type,request_id:this.trackDetails.request_id,fingerprint_id:this.trackDetails.fingerprint_id,data:{...e}}},this.submitEvent=async()=>{const e=this.getTrackedData();console.log(e);try{const t=await this.httpClient.post({url:"/api/v1/events",payload:e});return Xn(),t.data}catch(e){throw new o(`Tracked Data submission failed: ${String(e)}`)}},this.httpClient=new h(t)}async initialize(){try{const e={name:"@ginger-ai/ginger-js",version:"1.0.0"},t=await Nn(this.requestId,e),n=await this.httpClient.post({url:"/api/v1/devices",payload:t});return this.isInitialized=!0,this.deviceResponse=n.data,n}catch(e){throw this.isInitialized=!1,new o(`Initialization failed: ${e}`)}}trackEvent({event_type:e,track_fields:t,request_id:n}){if(!this.isInitialized)throw new o("Unsuccessful Initialization. Cannot track behaviour.");if(!s.includes(e))throw new o(`Invalid event type: ${e}. Allowed types are: ${s.join(", ")}`);var i;i=t,Jn.initializeTracking(i),this.trackDetails={event_type:e,request_id:n,fingerprint_id:this.deviceResponse?.fingerprint_id||""}}},exports.buildInitialPayload=Nn,exports.fetchModules=Zn,exports.generateRequestId=e,exports.pageVisibility=l;
|
|
2
|
+
//# sourceMappingURL=ginger.cjs.js.map
|