@fingerprintjs/fingerprintjs
Advanced tools
Comparing version 3.0.0-beta.3 to 3.0.0
/** | ||
* FingerprintJS v3.0.0-beta.3 - Copyright (c) FingerprintJS, Inc, 2020 (https://fingerprintjs.com) | ||
* FingerprintJS v3.0.0 - Copyright (c) FingerprintJS, Inc, 2020 (https://fingerprintjs.com) | ||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. | ||
@@ -246,3 +246,3 @@ * | ||
var version = "3.0.0-beta.3"; | ||
var version = "3.0.0"; | ||
@@ -1014,2 +1014,5 @@ function requestIdleCallbackIfAvailable(fallbackTimeout) { | ||
} | ||
function hashComponents(components) { | ||
return x64hash128(componentsToCanonicalString(components)); | ||
} | ||
/** | ||
@@ -1026,3 +1029,3 @@ * Makes a GetResult implementation that calculates the visitor id hash on demand. | ||
if (visitorIdCache === undefined) { | ||
visitorIdCache = x64hash128(componentsToCanonicalString(this.components)); | ||
visitorIdCache = hashComponents(this.components); | ||
} | ||
@@ -1075,11 +1078,13 @@ return visitorIdCache; | ||
const getHash = x64hash128; | ||
// The exports below are for private usage. They may change unexpectedly. Usage is at your own risk. | ||
// The default export is a syntax sugar (`import * as FP from '...' ā import FP from '...'`). | ||
// It should contain all the public exported values. | ||
var index = { load, hashComponents, componentsToDebugString }; | ||
// The exports below are for private usage. They may change unexpectedly. Use them at your own risk. | ||
/** Not documented, out of Semantic Versioning, usage is at your own risk */ | ||
const murmurX64Hash128 = x64hash128; | ||
exports.componentsToCanonicalString = componentsToCanonicalString; | ||
exports.componentsToDebugString = componentsToDebugString; | ||
exports.default = index; | ||
exports.getComponents = getComponents; | ||
exports.getHash = getHash; | ||
exports.hashComponents = hashComponents; | ||
exports.isChromium = isChromium; | ||
@@ -1086,0 +1091,0 @@ exports.isDesktopSafari = isDesktopSafari; |
/** | ||
* FingerprintJS v3.0.0-beta.3 - Copyright (c) FingerprintJS, Inc, 2020 (https://fingerprintjs.com) | ||
* FingerprintJS v3.0.0 - Copyright (c) FingerprintJS, Inc, 2020 (https://fingerprintjs.com) | ||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. | ||
@@ -239,4 +239,4 @@ * | ||
} | ||
declare function componentsToCanonicalString(components: UnknownComponents): string; | ||
declare function componentsToDebugString(components: UnknownComponents): string; | ||
declare function hashComponents(components: UnknownComponents): string; | ||
/** | ||
@@ -276,6 +276,11 @@ * Builds an instance of Agent and waits a delay required for a proper operation. | ||
declare const getHash: (input: string) => string; | ||
declare const _default: { | ||
load: typeof load; | ||
hashComponents: typeof hashComponents; | ||
componentsToDebugString: typeof componentsToDebugString; | ||
}; | ||
/** Not documented, out of Semantic Versioning, usage is at your own risk */ | ||
declare const murmurX64Hash128: typeof x64hash128; | ||
export { Agent, BuiltinComponents, Component, GetOptions, GetResult, LoadOptions, SourcesToComponents, UnknownComponents, componentsToCanonicalString, componentsToDebugString, getComponents, getHash, isChromium, isDesktopSafari, isGecko, isIEOrOldEdge, load, murmurX64Hash128 }; | ||
export default _default; | ||
export { Agent, BuiltinComponents, Component, GetOptions, GetResult, LoadOptions, SourcesToComponents, UnknownComponents, componentsToDebugString, getComponents, hashComponents, isChromium, isDesktopSafari, isGecko, isIEOrOldEdge, load, murmurX64Hash128 }; |
/** | ||
* FingerprintJS v3.0.0-beta.3 - Copyright (c) FingerprintJS, Inc, 2020 (https://fingerprintjs.com) | ||
* FingerprintJS v3.0.0 - Copyright (c) FingerprintJS, Inc, 2020 (https://fingerprintjs.com) | ||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. | ||
@@ -242,3 +242,3 @@ * | ||
var version = "3.0.0-beta.3"; | ||
var version = "3.0.0"; | ||
@@ -1010,2 +1010,5 @@ function requestIdleCallbackIfAvailable(fallbackTimeout) { | ||
} | ||
function hashComponents(components) { | ||
return x64hash128(componentsToCanonicalString(components)); | ||
} | ||
/** | ||
@@ -1022,3 +1025,3 @@ * Makes a GetResult implementation that calculates the visitor id hash on demand. | ||
if (visitorIdCache === undefined) { | ||
visitorIdCache = x64hash128(componentsToCanonicalString(this.components)); | ||
visitorIdCache = hashComponents(this.components); | ||
} | ||
@@ -1071,7 +1074,10 @@ return visitorIdCache; | ||
const getHash = x64hash128; | ||
// The exports below are for private usage. They may change unexpectedly. Usage is at your own risk. | ||
// The default export is a syntax sugar (`import * as FP from '...' ā import FP from '...'`). | ||
// It should contain all the public exported values. | ||
var index = { load, hashComponents, componentsToDebugString }; | ||
// The exports below are for private usage. They may change unexpectedly. Use them at your own risk. | ||
/** Not documented, out of Semantic Versioning, usage is at your own risk */ | ||
const murmurX64Hash128 = x64hash128; | ||
export { componentsToCanonicalString, componentsToDebugString, getComponents, getHash, isChromium, isDesktopSafari, isGecko, isIEOrOldEdge, load, murmurX64Hash128 }; | ||
export default index; | ||
export { componentsToDebugString, getComponents, hashComponents, isChromium, isDesktopSafari, isGecko, isIEOrOldEdge, load, murmurX64Hash128 }; |
/** | ||
* FingerprintJS v3.0.0-beta.3 - Copyright (c) FingerprintJS, Inc, 2020 (https://fingerprintjs.com) | ||
* FingerprintJS v3.0.0 - Copyright (c) FingerprintJS, Inc, 2020 (https://fingerprintjs.com) | ||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. | ||
@@ -268,3 +268,3 @@ * | ||
var version = "3.0.0-beta.3"; | ||
var version = "3.0.0"; | ||
@@ -1036,2 +1036,5 @@ function requestIdleCallbackIfAvailable(fallbackTimeout) { | ||
} | ||
function hashComponents(components) { | ||
return x64hash128(componentsToCanonicalString(components)); | ||
} | ||
/** | ||
@@ -1048,3 +1051,3 @@ * Makes a GetResult implementation that calculates the visitor id hash on demand. | ||
if (visitorIdCache === undefined) { | ||
visitorIdCache = x64hash128(componentsToCanonicalString(this.components)); | ||
visitorIdCache = hashComponents(this.components); | ||
} | ||
@@ -1097,11 +1100,13 @@ return visitorIdCache; | ||
const getHash = x64hash128; | ||
// The exports below are for private usage. They may change unexpectedly. Usage is at your own risk. | ||
// The default export is a syntax sugar (`import * as FP from '...' ā import FP from '...'`). | ||
// It should contain all the public exported values. | ||
var index = { load, hashComponents, componentsToDebugString }; | ||
// The exports below are for private usage. They may change unexpectedly. Use them at your own risk. | ||
/** Not documented, out of Semantic Versioning, usage is at your own risk */ | ||
const murmurX64Hash128 = x64hash128; | ||
exports.componentsToCanonicalString = componentsToCanonicalString; | ||
exports.componentsToDebugString = componentsToDebugString; | ||
exports.default = index; | ||
exports.getComponents = getComponents; | ||
exports.getHash = getHash; | ||
exports.hashComponents = hashComponents; | ||
exports.isChromium = isChromium; | ||
@@ -1108,0 +1113,0 @@ exports.isDesktopSafari = isDesktopSafari; |
/** | ||
* FingerprintJS v3.0.0-beta.3 - Copyright (c) FingerprintJS, Inc, 2020 (https://fingerprintjs.com) | ||
* FingerprintJS v3.0.0 - Copyright (c) FingerprintJS, Inc, 2020 (https://fingerprintjs.com) | ||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. | ||
@@ -9,2 +9,2 @@ * | ||
var FingerprintJS=function(t){"use strict";function e(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var n=[0,0,0,0];return n[3]+=t[3]+e[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]+e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]+e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]+e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function n(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var n=[0,0,0,0];return n[3]+=t[3]*e[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]*e[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=t[3]*e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]*e[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[2]*e[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[3]*e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]*e[3]+t[1]*e[2]+t[2]*e[1]+t[3]*e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function o(t,e){return 32===(e%=64)?[t[1],t[0]]:e<32?[t[0]<<e|t[1]>>>32-e,t[1]<<e|t[0]>>>32-e]:(e-=32,[t[1]<<e|t[0]>>>32-e,t[0]<<e|t[1]>>>32-e])}function r(t,e){return 0===(e%=64)?t:e<32?[t[0]<<e|t[1]>>>32-e,t[1]<<e]:[t[1]<<e-32,0]}function i(t,e){return[t[0]^e[0],t[1]^e[1]]}function a(t){return t=i(t,[0,t[0]>>>1]),t=i(t=n(t,[4283543511,3981806797]),[0,t[0]>>>1]),t=i(t=n(t,[3301882366,444984403]),[0,t[0]>>>1])}function c(t,c){c=c||0;for(var s=(t=t||"").length%16,u=t.length-s,l=[0,c],d=[0,c],f=[0,0],h=[0,0],g=[2277735313,289559509],m=[1291169091,658871167],p=0;p<u;p+=16)f=[255&t.charCodeAt(p+4)|(255&t.charCodeAt(p+5))<<8|(255&t.charCodeAt(p+6))<<16|(255&t.charCodeAt(p+7))<<24,255&t.charCodeAt(p)|(255&t.charCodeAt(p+1))<<8|(255&t.charCodeAt(p+2))<<16|(255&t.charCodeAt(p+3))<<24],h=[255&t.charCodeAt(p+12)|(255&t.charCodeAt(p+13))<<8|(255&t.charCodeAt(p+14))<<16|(255&t.charCodeAt(p+15))<<24,255&t.charCodeAt(p+8)|(255&t.charCodeAt(p+9))<<8|(255&t.charCodeAt(p+10))<<16|(255&t.charCodeAt(p+11))<<24],f=o(f=n(f,g),31),l=e(l=o(l=i(l,f=n(f,m)),27),d),l=e(n(l,[0,5]),[0,1390208809]),h=o(h=n(h,m),33),d=e(d=o(d=i(d,h=n(h,g)),31),l),d=e(n(d,[0,5]),[0,944331445]);switch(f=[0,0],h=[0,0],s){case 15:h=i(h,r([0,t.charCodeAt(p+14)],48));case 14:h=i(h,r([0,t.charCodeAt(p+13)],40));case 13:h=i(h,r([0,t.charCodeAt(p+12)],32));case 12:h=i(h,r([0,t.charCodeAt(p+11)],24));case 11:h=i(h,r([0,t.charCodeAt(p+10)],16));case 10:h=i(h,r([0,t.charCodeAt(p+9)],8));case 9:h=n(h=i(h,[0,t.charCodeAt(p+8)]),m),d=i(d,h=n(h=o(h,33),g));case 8:f=i(f,r([0,t.charCodeAt(p+7)],56));case 7:f=i(f,r([0,t.charCodeAt(p+6)],48));case 6:f=i(f,r([0,t.charCodeAt(p+5)],40));case 5:f=i(f,r([0,t.charCodeAt(p+4)],32));case 4:f=i(f,r([0,t.charCodeAt(p+3)],24));case 3:f=i(f,r([0,t.charCodeAt(p+2)],16));case 2:f=i(f,r([0,t.charCodeAt(p+1)],8));case 1:f=n(f=i(f,[0,t.charCodeAt(p)]),g),l=i(l,f=n(f=o(f,31),m))}return l=e(l=i(l,[0,t.length]),d=i(d,[0,t.length])),d=e(d,l),l=e(l=a(l),d=a(d)),d=e(d,l),("00000000"+(l[0]>>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)+("00000000"+(d[0]>>>0).toString(16)).slice(-8)+("00000000"+(d[1]>>>0).toString(16)).slice(-8)}function s(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{s(o.next(t))}catch(e){i(e)}}function c(t){try{s(o.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((o=o.apply(t,e||[])).next())}))}function u(t){return"number"==typeof t?0|t:parseInt(t)}function l(t){return t.reduce(((t,e)=>t+(e?1:0)),0)}const d=navigator,f=window;const h=document,g=["monospace","sans-serif","serif"],m=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"],p={fontStyle:"normal",fontWeight:"normal",letterSpacing:"normal",lineBreak:"auto",lineHeight:"normal",textTransform:"none",textAlign:"left",textDecoration:"none",textShadow:"none",whiteSpace:"normal",wordBreak:"normal",wordSpacing:"normal"};function v(t){return t.toDataURL()}const y=navigator,C=window;const S=window,w=navigator,A=document;function b(){return l(["msWriteProfilerMark"in S,"msLaunchUri"in w,"msSaveBlob"in w])>=2}function M(){return l(["userActivation"in w,"mediaSession"in w,0===w.vendor.indexOf("Google"),"BackgroundFetchManager"in S,"BatteryManager"in S,"webkitMediaStream"in S,"webkitSpeechGrammar"in S])>=5}const T=navigator;const k=window;const O=window;const P=window;const x=document;const I={osCpu:function(){return navigator.oscpu},languages:function(){const t=[],e=T.language||T.userLanguage||T.browserLanguage||T.systemLanguage;if(void 0!==e&&t.push([e]),Array.isArray(T.languages))M()&&l([!("MediaSettingsRange"in S),!("PhotoCapabilities"in S),"RTCEncodedAudioFrame"in S,""+S.Intl=="[object Intl]"])>=2||t.push(T.languages);else if("string"==typeof T.languages){const e=T.languages;e&&t.push(e.split(","))}return t},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return navigator.deviceMemory},screenResolution:function(){const t=[u(k.screen.width),u(k.screen.height)];return t.sort().reverse(),t},availableScreenResolution:function(){if(O.screen.availWidth&&O.screen.availHeight){const t=[u(O.screen.availWidth),u(O.screen.availHeight)];return t.sort().reverse(),t}},hardwareConcurrency:function(){try{const t=u(navigator.hardwareConcurrency);return isNaN(t)?1:t}catch(t){return 1}},timezoneOffset:function(){return(new Date).getTimezoneOffset()},timezone:function(){var t;if(null===(t=P.Intl)||void 0===t?void 0:t.DateTimeFormat)return(new P.Intl.DateTimeFormat).resolvedOptions().timeZone},sessionStorage:function(){try{return!!window.sessionStorage}catch(t){return!0}},localStorage:function(){try{return!!window.localStorage}catch(t){return!0}},indexedDB:function(){if(!b())try{return!!window.indexedDB}catch(t){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){return navigator.platform},plugins:function(){if(!navigator.plugins)return;const t=[];for(let e=0;e<navigator.plugins.length;++e){const n=navigator.plugins[e];if(!n)continue;const o=[];for(const t of n)o.push({type:t.type,suffixes:t.suffixes});t.push({name:n.name,description:n.description,mimeTypes:o})}return t},canvas:function(){const[t,e]=function(){const t=document.createElement("canvas");return t.width=240,t.height=140,t.style.display="inline",[t,t.getContext("2d")]}();if(!function(t,e){return!(!e||!t.toDataURL)}(t,e))return{winding:!1,data:""};e.rect(0,0,10,10),e.rect(2,2,6,6);const n=!e.isPointInPath(5,5,"evenodd");e.textBaseline="alphabetic",e.fillStyle="#f60",e.fillRect(125,1,62,20),e.fillStyle="#069",e.font="11pt no-real-font-123";const o="Cwm fjordbank š gly";return e.fillText(o,2,15),e.fillStyle="rgba(102, 204, 0, 0.2)",e.font="18pt Arial",e.fillText(o,4,45),e.globalCompositeOperation="multiply",e.fillStyle="rgb(255,0,255)",e.beginPath(),e.arc(50,50,50,0,2*Math.PI,!0),e.closePath(),e.fill(),e.fillStyle="rgb(0,255,255)",e.beginPath(),e.arc(100,50,50,0,2*Math.PI,!0),e.closePath(),e.fill(),e.fillStyle="rgb(255,255,0)",e.beginPath(),e.arc(75,100,50,0,2*Math.PI,!0),e.closePath(),e.fill(),e.fillStyle="rgb(255,0,255)",e.arc(75,75,75,0,2*Math.PI,!0),e.arc(75,75,25,0,2*Math.PI,!0),e.fill("evenodd"),{winding:n,data:v(t)}},touchSupport:function(){let t,e=0;void 0!==y.maxTouchPoints?e=u(y.maxTouchPoints):void 0!==y.msMaxTouchPoints&&(e=y.msMaxTouchPoints);try{document.createEvent("TouchEvent"),t=!0}catch(n){t=!1}return{maxTouchPoints:e,touchEvent:t,touchStart:"ontouchstart"in C}},fonts:function(){const t=h.body,e=h.createElement("div"),n=h.createElement("div"),o={},r={},i=()=>{const t=h.createElement("span");return Object.assign(t.style,p,{position:"absolute",left:"-9999px",fontSize:"48px"}),t.textContent="mmMwWLliI0O&1",t},a=(t,e)=>{const n=i();return n.style.fontFamily=`'${t}',${e}`,n},c=t=>g.some(((e,n)=>t[n].offsetWidth!==o[e]||t[n].offsetHeight!==r[e])),s=g.map((t=>{const n=i();return n.style.fontFamily=t,e.appendChild(n),n}));t.appendChild(e);for(let d=0,f=g.length;d<f;d++)o[g[d]]=s[d].offsetWidth,r[g[d]]=s[d].offsetHeight;const u=(()=>{const t={};for(const e of m)t[e]=g.map((t=>{const o=a(e,t);return n.appendChild(o),o}));return t})();t.appendChild(n);const l=[];for(let d=0,f=m.length;d<f;d++)c(u[m[d]])&&l.push(m[d]);return t.removeChild(n),t.removeChild(e),l},audio:function(){return s(this,void 0,void 0,(function*(){if(d.userAgent.match(/OS 11.+Version\/11.+Safari/))return-1;const t=f.OfflineAudioContext||f.webkitOfflineAudioContext;if(!t)return-2;const e=new t(1,44100,44100),n=e.createOscillator();n.type="triangle",n.frequency.setValueAtTime(1e4,e.currentTime);const o=e.createDynamicsCompressor();for(const[r,i]of[["threshold",-50],["knee",40],["ratio",12],["reduction",-20],["attack",0],["release",.25]])"function"==typeof o[r].setValueAtTime&&o[r].setValueAtTime(i,e.currentTime);return n.connect(o),o.connect(e.destination),n.start(0),e.startRendering(),new Promise((t=>{const r=setTimeout((()=>{e.oncomplete=()=>{},t(-3)}),1e3);e.oncomplete=e=>{let i;try{clearTimeout(r),i=e.renderedBuffer.getChannelData(0).slice(4500,5e3).reduce(((t,e)=>t+Math.abs(e)),0),n.disconnect(),o.disconnect()}catch(a){return void t(-4)}t(i)}}))}))},pluginsSupport:function(){return void 0!==navigator.plugins},productSub:function(){return navigator.productSub},emptyEvalLength:function(){return eval.toString().length},errorFF:function(){try{throw"a"}catch(t){try{return t.toSource(),!0}catch(e){return!1}}},vendor:function(){return navigator.vendor},chrome:function(){return void 0!==window.chrome},cookiesEnabled:function(){try{x.cookie="cookietest=1";const t=-1!==x.cookie.indexOf("cookietest=");return x.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",t}catch(t){return!1}}};function B(t,e,n){return s(this,void 0,void 0,(function*(){let o=Date.now();const r={};for(const a of Object.keys(t)){if(function(t,e){for(let n=0,o=t.length;n<o;++n)if(t[n]===e)return!0;return!1}(n,a))continue;let c,s;try{c={value:yield t[a](e)}}catch(i){c=i&&"object"==typeof i&&"message"in i?{error:i}:{error:{message:i}}}s=Date.now(),r[a]=Object.assign(Object.assign({},c),{duration:s-o}),o=s}return r}))}function E(t){let e="";for(const n of Object.keys(t)){const o=t[n],r=o.error?"error":JSON.stringify(o.value);e+=`${e?"|":""}${n.replace(/([:|\\])/g,"\\$1")}:${r}`}return e}function D(t){return JSON.stringify(t,((t,e)=>{var n;return e instanceof Error?Object.assign(Object.assign({},e),{message:e.message,stack:null===(n=e.stack)||void 0===n?void 0:n.split("\n")}):e}),2)}class R{get(t={}){return s(this,void 0,void 0,(function*(){const e=yield B(I,void 0,[]),n=function(t){let e;return{components:t,get visitorId(){return void 0===e&&(e=c(E(this.components))),e},set visitorId(t){e=t}}}(e);return t.debug&&console.log(`Copy the text below to get the debug data:\n\n\`\`\`\nversion: 3.0.0-beta.3\ngetOptions: ${JSON.stringify(t,void 0,2)}\nvisitorId: ${n.visitorId}\ncomponents: ${D(e)}\n\`\`\``),n}))}}const L=c,F=c;return t.componentsToCanonicalString=E,t.componentsToDebugString=D,t.getComponents=B,t.getHash=L,t.isChromium=M,t.isDesktopSafari=function(){return"safari"in S},t.isGecko=function(){var t;return l(["buildID"in w,(null===(t=A.documentElement)||void 0===t?void 0:t.style)&&"MozAppearance"in A.documentElement.style,"MediaRecorderErrorEvent"in S,"mozInnerScreenX"in S,"CSSMozDocumentRule"in S,"CanvasCaptureMediaStream"in S])>=4},t.isIEOrOldEdge=b,t.load=function({delayFallback:t=50}={}){return s(this,void 0,void 0,(function*(){var e;return yield(e=t,new Promise((t=>{window.requestIdleCallback?window.requestIdleCallback((()=>t())):setTimeout(t,e)}))),new R}))},t.murmurX64Hash128=F,t}({}); | ||
var FingerprintJS=function(t){"use strict";function e(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var n=[0,0,0,0];return n[3]+=t[3]+e[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]+e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]+e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]+e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function n(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var n=[0,0,0,0];return n[3]+=t[3]*e[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]*e[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=t[3]*e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]*e[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[2]*e[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[3]*e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]*e[3]+t[1]*e[2]+t[2]*e[1]+t[3]*e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function o(t,e){return 32===(e%=64)?[t[1],t[0]]:e<32?[t[0]<<e|t[1]>>>32-e,t[1]<<e|t[0]>>>32-e]:(e-=32,[t[1]<<e|t[0]>>>32-e,t[0]<<e|t[1]>>>32-e])}function r(t,e){return 0===(e%=64)?t:e<32?[t[0]<<e|t[1]>>>32-e,t[1]<<e]:[t[1]<<e-32,0]}function i(t,e){return[t[0]^e[0],t[1]^e[1]]}function a(t){return t=i(t,[0,t[0]>>>1]),t=i(t=n(t,[4283543511,3981806797]),[0,t[0]>>>1]),t=i(t=n(t,[3301882366,444984403]),[0,t[0]>>>1])}function c(t,c){c=c||0;for(var s=(t=t||"").length%16,u=t.length-s,l=[0,c],d=[0,c],f=[0,0],h=[0,0],g=[2277735313,289559509],m=[1291169091,658871167],p=0;p<u;p+=16)f=[255&t.charCodeAt(p+4)|(255&t.charCodeAt(p+5))<<8|(255&t.charCodeAt(p+6))<<16|(255&t.charCodeAt(p+7))<<24,255&t.charCodeAt(p)|(255&t.charCodeAt(p+1))<<8|(255&t.charCodeAt(p+2))<<16|(255&t.charCodeAt(p+3))<<24],h=[255&t.charCodeAt(p+12)|(255&t.charCodeAt(p+13))<<8|(255&t.charCodeAt(p+14))<<16|(255&t.charCodeAt(p+15))<<24,255&t.charCodeAt(p+8)|(255&t.charCodeAt(p+9))<<8|(255&t.charCodeAt(p+10))<<16|(255&t.charCodeAt(p+11))<<24],f=o(f=n(f,g),31),l=e(l=o(l=i(l,f=n(f,m)),27),d),l=e(n(l,[0,5]),[0,1390208809]),h=o(h=n(h,m),33),d=e(d=o(d=i(d,h=n(h,g)),31),l),d=e(n(d,[0,5]),[0,944331445]);switch(f=[0,0],h=[0,0],s){case 15:h=i(h,r([0,t.charCodeAt(p+14)],48));case 14:h=i(h,r([0,t.charCodeAt(p+13)],40));case 13:h=i(h,r([0,t.charCodeAt(p+12)],32));case 12:h=i(h,r([0,t.charCodeAt(p+11)],24));case 11:h=i(h,r([0,t.charCodeAt(p+10)],16));case 10:h=i(h,r([0,t.charCodeAt(p+9)],8));case 9:h=n(h=i(h,[0,t.charCodeAt(p+8)]),m),d=i(d,h=n(h=o(h,33),g));case 8:f=i(f,r([0,t.charCodeAt(p+7)],56));case 7:f=i(f,r([0,t.charCodeAt(p+6)],48));case 6:f=i(f,r([0,t.charCodeAt(p+5)],40));case 5:f=i(f,r([0,t.charCodeAt(p+4)],32));case 4:f=i(f,r([0,t.charCodeAt(p+3)],24));case 3:f=i(f,r([0,t.charCodeAt(p+2)],16));case 2:f=i(f,r([0,t.charCodeAt(p+1)],8));case 1:f=n(f=i(f,[0,t.charCodeAt(p)]),g),l=i(l,f=n(f=o(f,31),m))}return l=e(l=i(l,[0,t.length]),d=i(d,[0,t.length])),d=e(d,l),l=e(l=a(l),d=a(d)),d=e(d,l),("00000000"+(l[0]>>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)+("00000000"+(d[0]>>>0).toString(16)).slice(-8)+("00000000"+(d[1]>>>0).toString(16)).slice(-8)}function s(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{s(o.next(t))}catch(e){i(e)}}function c(t){try{s(o.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((o=o.apply(t,e||[])).next())}))}function u(t){return"number"==typeof t?0|t:parseInt(t)}function l(t){return t.reduce(((t,e)=>t+(e?1:0)),0)}const d=navigator,f=window;const h=document,g=["monospace","sans-serif","serif"],m=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"],p={fontStyle:"normal",fontWeight:"normal",letterSpacing:"normal",lineBreak:"auto",lineHeight:"normal",textTransform:"none",textAlign:"left",textDecoration:"none",textShadow:"none",whiteSpace:"normal",wordBreak:"normal",wordSpacing:"normal"};function v(t){return t.toDataURL()}const y=navigator,C=window;const S=window,w=navigator,A=document;function b(){return l(["msWriteProfilerMark"in S,"msLaunchUri"in w,"msSaveBlob"in w])>=2}function M(){return l(["userActivation"in w,"mediaSession"in w,0===w.vendor.indexOf("Google"),"BackgroundFetchManager"in S,"BatteryManager"in S,"webkitMediaStream"in S,"webkitSpeechGrammar"in S])>=5}const T=navigator;const k=window;const O=window;const P=window;const x=document;const I={osCpu:function(){return navigator.oscpu},languages:function(){const t=[],e=T.language||T.userLanguage||T.browserLanguage||T.systemLanguage;if(void 0!==e&&t.push([e]),Array.isArray(T.languages))M()&&l([!("MediaSettingsRange"in S),!("PhotoCapabilities"in S),"RTCEncodedAudioFrame"in S,""+S.Intl=="[object Intl]"])>=2||t.push(T.languages);else if("string"==typeof T.languages){const e=T.languages;e&&t.push(e.split(","))}return t},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return navigator.deviceMemory},screenResolution:function(){const t=[u(k.screen.width),u(k.screen.height)];return t.sort().reverse(),t},availableScreenResolution:function(){if(O.screen.availWidth&&O.screen.availHeight){const t=[u(O.screen.availWidth),u(O.screen.availHeight)];return t.sort().reverse(),t}},hardwareConcurrency:function(){try{const t=u(navigator.hardwareConcurrency);return isNaN(t)?1:t}catch(t){return 1}},timezoneOffset:function(){return(new Date).getTimezoneOffset()},timezone:function(){var t;if(null===(t=P.Intl)||void 0===t?void 0:t.DateTimeFormat)return(new P.Intl.DateTimeFormat).resolvedOptions().timeZone},sessionStorage:function(){try{return!!window.sessionStorage}catch(t){return!0}},localStorage:function(){try{return!!window.localStorage}catch(t){return!0}},indexedDB:function(){if(!b())try{return!!window.indexedDB}catch(t){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){return navigator.platform},plugins:function(){if(!navigator.plugins)return;const t=[];for(let e=0;e<navigator.plugins.length;++e){const n=navigator.plugins[e];if(!n)continue;const o=[];for(const t of n)o.push({type:t.type,suffixes:t.suffixes});t.push({name:n.name,description:n.description,mimeTypes:o})}return t},canvas:function(){const[t,e]=function(){const t=document.createElement("canvas");return t.width=240,t.height=140,t.style.display="inline",[t,t.getContext("2d")]}();if(!function(t,e){return!(!e||!t.toDataURL)}(t,e))return{winding:!1,data:""};e.rect(0,0,10,10),e.rect(2,2,6,6);const n=!e.isPointInPath(5,5,"evenodd");e.textBaseline="alphabetic",e.fillStyle="#f60",e.fillRect(125,1,62,20),e.fillStyle="#069",e.font="11pt no-real-font-123";const o="Cwm fjordbank š gly";return e.fillText(o,2,15),e.fillStyle="rgba(102, 204, 0, 0.2)",e.font="18pt Arial",e.fillText(o,4,45),e.globalCompositeOperation="multiply",e.fillStyle="rgb(255,0,255)",e.beginPath(),e.arc(50,50,50,0,2*Math.PI,!0),e.closePath(),e.fill(),e.fillStyle="rgb(0,255,255)",e.beginPath(),e.arc(100,50,50,0,2*Math.PI,!0),e.closePath(),e.fill(),e.fillStyle="rgb(255,255,0)",e.beginPath(),e.arc(75,100,50,0,2*Math.PI,!0),e.closePath(),e.fill(),e.fillStyle="rgb(255,0,255)",e.arc(75,75,75,0,2*Math.PI,!0),e.arc(75,75,25,0,2*Math.PI,!0),e.fill("evenodd"),{winding:n,data:v(t)}},touchSupport:function(){let t,e=0;void 0!==y.maxTouchPoints?e=u(y.maxTouchPoints):void 0!==y.msMaxTouchPoints&&(e=y.msMaxTouchPoints);try{document.createEvent("TouchEvent"),t=!0}catch(n){t=!1}return{maxTouchPoints:e,touchEvent:t,touchStart:"ontouchstart"in C}},fonts:function(){const t=h.body,e=h.createElement("div"),n=h.createElement("div"),o={},r={},i=()=>{const t=h.createElement("span");return Object.assign(t.style,p,{position:"absolute",left:"-9999px",fontSize:"48px"}),t.textContent="mmMwWLliI0O&1",t},a=(t,e)=>{const n=i();return n.style.fontFamily=`'${t}',${e}`,n},c=t=>g.some(((e,n)=>t[n].offsetWidth!==o[e]||t[n].offsetHeight!==r[e])),s=g.map((t=>{const n=i();return n.style.fontFamily=t,e.appendChild(n),n}));t.appendChild(e);for(let d=0,f=g.length;d<f;d++)o[g[d]]=s[d].offsetWidth,r[g[d]]=s[d].offsetHeight;const u=(()=>{const t={};for(const e of m)t[e]=g.map((t=>{const o=a(e,t);return n.appendChild(o),o}));return t})();t.appendChild(n);const l=[];for(let d=0,f=m.length;d<f;d++)c(u[m[d]])&&l.push(m[d]);return t.removeChild(n),t.removeChild(e),l},audio:function(){return s(this,void 0,void 0,(function*(){if(d.userAgent.match(/OS 11.+Version\/11.+Safari/))return-1;const t=f.OfflineAudioContext||f.webkitOfflineAudioContext;if(!t)return-2;const e=new t(1,44100,44100),n=e.createOscillator();n.type="triangle",n.frequency.setValueAtTime(1e4,e.currentTime);const o=e.createDynamicsCompressor();for(const[r,i]of[["threshold",-50],["knee",40],["ratio",12],["reduction",-20],["attack",0],["release",.25]])"function"==typeof o[r].setValueAtTime&&o[r].setValueAtTime(i,e.currentTime);return n.connect(o),o.connect(e.destination),n.start(0),e.startRendering(),new Promise((t=>{const r=setTimeout((()=>{e.oncomplete=()=>{},t(-3)}),1e3);e.oncomplete=e=>{let i;try{clearTimeout(r),i=e.renderedBuffer.getChannelData(0).slice(4500,5e3).reduce(((t,e)=>t+Math.abs(e)),0),n.disconnect(),o.disconnect()}catch(a){return void t(-4)}t(i)}}))}))},pluginsSupport:function(){return void 0!==navigator.plugins},productSub:function(){return navigator.productSub},emptyEvalLength:function(){return eval.toString().length},errorFF:function(){try{throw"a"}catch(t){try{return t.toSource(),!0}catch(e){return!1}}},vendor:function(){return navigator.vendor},chrome:function(){return void 0!==window.chrome},cookiesEnabled:function(){try{x.cookie="cookietest=1";const t=-1!==x.cookie.indexOf("cookietest=");return x.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",t}catch(t){return!1}}};function B(t,e,n){return s(this,void 0,void 0,(function*(){let o=Date.now();const r={};for(const a of Object.keys(t)){if(function(t,e){for(let n=0,o=t.length;n<o;++n)if(t[n]===e)return!0;return!1}(n,a))continue;let c,s;try{c={value:yield t[a](e)}}catch(i){c=i&&"object"==typeof i&&"message"in i?{error:i}:{error:{message:i}}}s=Date.now(),r[a]=Object.assign(Object.assign({},c),{duration:s-o}),o=s}return r}))}function D(t){return JSON.stringify(t,((t,e)=>{var n;return e instanceof Error?Object.assign(Object.assign({},e),{message:e.message,stack:null===(n=e.stack)||void 0===n?void 0:n.split("\n")}):e}),2)}function E(t){return c(function(t){let e="";for(const n of Object.keys(t)){const o=t[n],r=o.error?"error":JSON.stringify(o.value);e+=`${e?"|":""}${n.replace(/([:|\\])/g,"\\$1")}:${r}`}return e}(t))}class R{get(t={}){return s(this,void 0,void 0,(function*(){const e=yield B(I,void 0,[]),n=function(t){let e;return{components:t,get visitorId(){return void 0===e&&(e=E(this.components)),e},set visitorId(t){e=t}}}(e);return t.debug&&console.log(`Copy the text below to get the debug data:\n\n\`\`\`\nversion: 3.0.0\ngetOptions: ${JSON.stringify(t,void 0,2)}\nvisitorId: ${n.visitorId}\ncomponents: ${D(e)}\n\`\`\``),n}))}}function L({delayFallback:t=50}={}){return s(this,void 0,void 0,(function*(){var e;return yield(e=t,new Promise((t=>{window.requestIdleCallback?window.requestIdleCallback((()=>t())):setTimeout(t,e)}))),new R}))}var F={load:L,hashComponents:E,componentsToDebugString:D};const G=c;return t.componentsToDebugString=D,t.default=F,t.getComponents=B,t.hashComponents=E,t.isChromium=M,t.isDesktopSafari=function(){return"safari"in S},t.isGecko=function(){var t;return l(["buildID"in w,(null===(t=A.documentElement)||void 0===t?void 0:t.style)&&"MozAppearance"in A.documentElement.style,"MediaRecorderErrorEvent"in S,"mozInnerScreenX"in S,"CSSMozDocumentRule"in S,"CanvasCaptureMediaStream"in S])>=4},t.isIEOrOldEdge=b,t.load=L,t.murmurX64Hash128=G,t}({}); |
/** | ||
* FingerprintJS v3.0.0-beta.3 - Copyright (c) FingerprintJS, Inc, 2020 (https://fingerprintjs.com) | ||
* FingerprintJS v3.0.0 - Copyright (c) FingerprintJS, Inc, 2020 (https://fingerprintjs.com) | ||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. | ||
@@ -271,3 +271,3 @@ * | ||
var version = "3.0.0-beta.3"; | ||
var version = "3.0.0"; | ||
@@ -1039,2 +1039,5 @@ function requestIdleCallbackIfAvailable(fallbackTimeout) { | ||
} | ||
function hashComponents(components) { | ||
return x64hash128(componentsToCanonicalString(components)); | ||
} | ||
/** | ||
@@ -1051,3 +1054,3 @@ * Makes a GetResult implementation that calculates the visitor id hash on demand. | ||
if (visitorIdCache === undefined) { | ||
visitorIdCache = x64hash128(componentsToCanonicalString(this.components)); | ||
visitorIdCache = hashComponents(this.components); | ||
} | ||
@@ -1100,11 +1103,13 @@ return visitorIdCache; | ||
const getHash = x64hash128; | ||
// The exports below are for private usage. They may change unexpectedly. Usage is at your own risk. | ||
// The default export is a syntax sugar (`import * as FP from '...' ā import FP from '...'`). | ||
// It should contain all the public exported values. | ||
var index = { load, hashComponents, componentsToDebugString }; | ||
// The exports below are for private usage. They may change unexpectedly. Use them at your own risk. | ||
/** Not documented, out of Semantic Versioning, usage is at your own risk */ | ||
const murmurX64Hash128 = x64hash128; | ||
exports.componentsToCanonicalString = componentsToCanonicalString; | ||
exports.componentsToDebugString = componentsToDebugString; | ||
exports.default = index; | ||
exports.getComponents = getComponents; | ||
exports.getHash = getHash; | ||
exports.hashComponents = hashComponents; | ||
exports.isChromium = isChromium; | ||
@@ -1111,0 +1116,0 @@ exports.isDesktopSafari = isDesktopSafari; |
/** | ||
* FingerprintJS v3.0.0-beta.3 - Copyright (c) FingerprintJS, Inc, 2020 (https://fingerprintjs.com) | ||
* FingerprintJS v3.0.0 - Copyright (c) FingerprintJS, Inc, 2020 (https://fingerprintjs.com) | ||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. | ||
@@ -9,2 +9,2 @@ * | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).FingerprintJS={})}(this,(function(e){"use strict";function t(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function n(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function o(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])}function r(e,t){return 0===(t%=64)?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]}function i(e,t){return[e[0]^t[0],e[1]^t[1]]}function a(e){return e=i(e,[0,e[0]>>>1]),e=i(e=n(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=i(e=n(e,[3301882366,444984403]),[0,e[0]>>>1])}function c(e,c){c=c||0;for(var s=(e=e||"").length%16,u=e.length-s,l=[0,c],d=[0,c],f=[0,0],h=[0,0],g=[2277735313,289559509],m=[1291169091,658871167],p=0;p<u;p+=16)f=[255&e.charCodeAt(p+4)|(255&e.charCodeAt(p+5))<<8|(255&e.charCodeAt(p+6))<<16|(255&e.charCodeAt(p+7))<<24,255&e.charCodeAt(p)|(255&e.charCodeAt(p+1))<<8|(255&e.charCodeAt(p+2))<<16|(255&e.charCodeAt(p+3))<<24],h=[255&e.charCodeAt(p+12)|(255&e.charCodeAt(p+13))<<8|(255&e.charCodeAt(p+14))<<16|(255&e.charCodeAt(p+15))<<24,255&e.charCodeAt(p+8)|(255&e.charCodeAt(p+9))<<8|(255&e.charCodeAt(p+10))<<16|(255&e.charCodeAt(p+11))<<24],f=o(f=n(f,g),31),l=t(l=o(l=i(l,f=n(f,m)),27),d),l=t(n(l,[0,5]),[0,1390208809]),h=o(h=n(h,m),33),d=t(d=o(d=i(d,h=n(h,g)),31),l),d=t(n(d,[0,5]),[0,944331445]);switch(f=[0,0],h=[0,0],s){case 15:h=i(h,r([0,e.charCodeAt(p+14)],48));case 14:h=i(h,r([0,e.charCodeAt(p+13)],40));case 13:h=i(h,r([0,e.charCodeAt(p+12)],32));case 12:h=i(h,r([0,e.charCodeAt(p+11)],24));case 11:h=i(h,r([0,e.charCodeAt(p+10)],16));case 10:h=i(h,r([0,e.charCodeAt(p+9)],8));case 9:h=n(h=i(h,[0,e.charCodeAt(p+8)]),m),d=i(d,h=n(h=o(h,33),g));case 8:f=i(f,r([0,e.charCodeAt(p+7)],56));case 7:f=i(f,r([0,e.charCodeAt(p+6)],48));case 6:f=i(f,r([0,e.charCodeAt(p+5)],40));case 5:f=i(f,r([0,e.charCodeAt(p+4)],32));case 4:f=i(f,r([0,e.charCodeAt(p+3)],24));case 3:f=i(f,r([0,e.charCodeAt(p+2)],16));case 2:f=i(f,r([0,e.charCodeAt(p+1)],8));case 1:f=n(f=i(f,[0,e.charCodeAt(p)]),g),l=i(l,f=n(f=o(f,31),m))}return l=t(l=i(l,[0,e.length]),d=i(d,[0,e.length])),d=t(d,l),l=t(l=a(l),d=a(d)),d=t(d,l),("00000000"+(l[0]>>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)+("00000000"+(d[0]>>>0).toString(16)).slice(-8)+("00000000"+(d[1]>>>0).toString(16)).slice(-8)}function s(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{s(o.next(e))}catch(t){i(t)}}function c(e){try{s(o.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((o=o.apply(e,t||[])).next())}))}function u(e){return"number"==typeof e?0|e:parseInt(e)}function l(e){return e.reduce(((e,t)=>e+(t?1:0)),0)}const d=navigator,f=window;const h=document,g=["monospace","sans-serif","serif"],m=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"],p={fontStyle:"normal",fontWeight:"normal",letterSpacing:"normal",lineBreak:"auto",lineHeight:"normal",textTransform:"none",textAlign:"left",textDecoration:"none",textShadow:"none",whiteSpace:"normal",wordBreak:"normal",wordSpacing:"normal"};function v(e){return e.toDataURL()}const y=navigator,C=window;const S=window,w=navigator,A=document;function b(){return l(["msWriteProfilerMark"in S,"msLaunchUri"in w,"msSaveBlob"in w])>=2}function M(){return l(["userActivation"in w,"mediaSession"in w,0===w.vendor.indexOf("Google"),"BackgroundFetchManager"in S,"BatteryManager"in S,"webkitMediaStream"in S,"webkitSpeechGrammar"in S])>=5}const T=navigator;const x=window;const O=window;const k=window;const P=document;const I={osCpu:function(){return navigator.oscpu},languages:function(){const e=[],t=T.language||T.userLanguage||T.browserLanguage||T.systemLanguage;if(void 0!==t&&e.push([t]),Array.isArray(T.languages))M()&&l([!("MediaSettingsRange"in S),!("PhotoCapabilities"in S),"RTCEncodedAudioFrame"in S,""+S.Intl=="[object Intl]"])>=2||e.push(T.languages);else if("string"==typeof T.languages){const t=T.languages;t&&e.push(t.split(","))}return e},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return navigator.deviceMemory},screenResolution:function(){const e=[u(x.screen.width),u(x.screen.height)];return e.sort().reverse(),e},availableScreenResolution:function(){if(O.screen.availWidth&&O.screen.availHeight){const e=[u(O.screen.availWidth),u(O.screen.availHeight)];return e.sort().reverse(),e}},hardwareConcurrency:function(){try{const e=u(navigator.hardwareConcurrency);return isNaN(e)?1:e}catch(e){return 1}},timezoneOffset:function(){return(new Date).getTimezoneOffset()},timezone:function(){var e;if(null===(e=k.Intl)||void 0===e?void 0:e.DateTimeFormat)return(new k.Intl.DateTimeFormat).resolvedOptions().timeZone},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){if(!b())try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){return navigator.platform},plugins:function(){if(!navigator.plugins)return;const e=[];for(let t=0;t<navigator.plugins.length;++t){const n=navigator.plugins[t];if(!n)continue;const o=[];for(const e of n)o.push({type:e.type,suffixes:e.suffixes});e.push({name:n.name,description:n.description,mimeTypes:o})}return e},canvas:function(){const[e,t]=function(){const e=document.createElement("canvas");return e.width=240,e.height=140,e.style.display="inline",[e,e.getContext("2d")]}();if(!function(e,t){return!(!t||!e.toDataURL)}(e,t))return{winding:!1,data:""};t.rect(0,0,10,10),t.rect(2,2,6,6);const n=!t.isPointInPath(5,5,"evenodd");t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.font="11pt no-real-font-123";const o="Cwm fjordbank š gly";return t.fillText(o,2,15),t.fillStyle="rgba(102, 204, 0, 0.2)",t.font="18pt Arial",t.fillText(o,4,45),t.globalCompositeOperation="multiply",t.fillStyle="rgb(255,0,255)",t.beginPath(),t.arc(50,50,50,0,2*Math.PI,!0),t.closePath(),t.fill(),t.fillStyle="rgb(0,255,255)",t.beginPath(),t.arc(100,50,50,0,2*Math.PI,!0),t.closePath(),t.fill(),t.fillStyle="rgb(255,255,0)",t.beginPath(),t.arc(75,100,50,0,2*Math.PI,!0),t.closePath(),t.fill(),t.fillStyle="rgb(255,0,255)",t.arc(75,75,75,0,2*Math.PI,!0),t.arc(75,75,25,0,2*Math.PI,!0),t.fill("evenodd"),{winding:n,data:v(e)}},touchSupport:function(){let e,t=0;void 0!==y.maxTouchPoints?t=u(y.maxTouchPoints):void 0!==y.msMaxTouchPoints&&(t=y.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(n){e=!1}return{maxTouchPoints:t,touchEvent:e,touchStart:"ontouchstart"in C}},fonts:function(){const e=h.body,t=h.createElement("div"),n=h.createElement("div"),o={},r={},i=()=>{const e=h.createElement("span");return Object.assign(e.style,p,{position:"absolute",left:"-9999px",fontSize:"48px"}),e.textContent="mmMwWLliI0O&1",e},a=(e,t)=>{const n=i();return n.style.fontFamily=`'${e}',${t}`,n},c=e=>g.some(((t,n)=>e[n].offsetWidth!==o[t]||e[n].offsetHeight!==r[t])),s=g.map((e=>{const n=i();return n.style.fontFamily=e,t.appendChild(n),n}));e.appendChild(t);for(let d=0,f=g.length;d<f;d++)o[g[d]]=s[d].offsetWidth,r[g[d]]=s[d].offsetHeight;const u=(()=>{const e={};for(const t of m)e[t]=g.map((e=>{const o=a(t,e);return n.appendChild(o),o}));return e})();e.appendChild(n);const l=[];for(let d=0,f=m.length;d<f;d++)c(u[m[d]])&&l.push(m[d]);return e.removeChild(n),e.removeChild(t),l},audio:function(){return s(this,void 0,void 0,(function*(){if(d.userAgent.match(/OS 11.+Version\/11.+Safari/))return-1;const e=f.OfflineAudioContext||f.webkitOfflineAudioContext;if(!e)return-2;const t=new e(1,44100,44100),n=t.createOscillator();n.type="triangle",n.frequency.setValueAtTime(1e4,t.currentTime);const o=t.createDynamicsCompressor();for(const[r,i]of[["threshold",-50],["knee",40],["ratio",12],["reduction",-20],["attack",0],["release",.25]])"function"==typeof o[r].setValueAtTime&&o[r].setValueAtTime(i,t.currentTime);return n.connect(o),o.connect(t.destination),n.start(0),t.startRendering(),new Promise((e=>{const r=setTimeout((()=>{t.oncomplete=()=>{},e(-3)}),1e3);t.oncomplete=t=>{let i;try{clearTimeout(r),i=t.renderedBuffer.getChannelData(0).slice(4500,5e3).reduce(((e,t)=>e+Math.abs(t)),0),n.disconnect(),o.disconnect()}catch(a){return void e(-4)}e(i)}}))}))},pluginsSupport:function(){return void 0!==navigator.plugins},productSub:function(){return navigator.productSub},emptyEvalLength:function(){return eval.toString().length},errorFF:function(){try{throw"a"}catch(e){try{return e.toSource(),!0}catch(t){return!1}}},vendor:function(){return navigator.vendor},chrome:function(){return void 0!==window.chrome},cookiesEnabled:function(){try{P.cookie="cookietest=1";const e=-1!==P.cookie.indexOf("cookietest=");return P.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}}};function B(e,t,n){return s(this,void 0,void 0,(function*(){let o=Date.now();const r={};for(const a of Object.keys(e)){if(function(e,t){for(let n=0,o=e.length;n<o;++n)if(e[n]===t)return!0;return!1}(n,a))continue;let c,s;try{c={value:yield e[a](t)}}catch(i){c=i&&"object"==typeof i&&"message"in i?{error:i}:{error:{message:i}}}s=Date.now(),r[a]=Object.assign(Object.assign({},c),{duration:s-o}),o=s}return r}))}function E(e){let t="";for(const n of Object.keys(e)){const o=e[n],r=o.error?"error":JSON.stringify(o.value);t+=`${t?"|":""}${n.replace(/([:|\\])/g,"\\$1")}:${r}`}return t}function D(e){return JSON.stringify(e,((e,t)=>{var n;return t instanceof Error?Object.assign(Object.assign({},t),{message:t.message,stack:null===(n=t.stack)||void 0===n?void 0:n.split("\n")}):t}),2)}class R{get(e={}){return s(this,void 0,void 0,(function*(){const t=yield B(I,void 0,[]),n=function(e){let t;return{components:e,get visitorId(){return void 0===t&&(t=c(E(this.components))),t},set visitorId(e){t=e}}}(t);return e.debug&&console.log(`Copy the text below to get the debug data:\n\n\`\`\`\nversion: 3.0.0-beta.3\ngetOptions: ${JSON.stringify(e,void 0,2)}\nvisitorId: ${n.visitorId}\ncomponents: ${D(t)}\n\`\`\``),n}))}}const L=c,F=c;e.componentsToCanonicalString=E,e.componentsToDebugString=D,e.getComponents=B,e.getHash=L,e.isChromium=M,e.isDesktopSafari=function(){return"safari"in S},e.isGecko=function(){var e;return l(["buildID"in w,(null===(e=A.documentElement)||void 0===e?void 0:e.style)&&"MozAppearance"in A.documentElement.style,"MediaRecorderErrorEvent"in S,"mozInnerScreenX"in S,"CSSMozDocumentRule"in S,"CanvasCaptureMediaStream"in S])>=4},e.isIEOrOldEdge=b,e.load=function({delayFallback:e=50}={}){return s(this,void 0,void 0,(function*(){var t;return yield(t=e,new Promise((e=>{window.requestIdleCallback?window.requestIdleCallback((()=>e())):setTimeout(e,t)}))),new R}))},e.murmurX64Hash128=F,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).FingerprintJS={})}(this,(function(e){"use strict";function t(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function n(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function o(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])}function r(e,t){return 0===(t%=64)?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]}function i(e,t){return[e[0]^t[0],e[1]^t[1]]}function a(e){return e=i(e,[0,e[0]>>>1]),e=i(e=n(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=i(e=n(e,[3301882366,444984403]),[0,e[0]>>>1])}function c(e,c){c=c||0;for(var s=(e=e||"").length%16,u=e.length-s,l=[0,c],d=[0,c],f=[0,0],h=[0,0],g=[2277735313,289559509],m=[1291169091,658871167],p=0;p<u;p+=16)f=[255&e.charCodeAt(p+4)|(255&e.charCodeAt(p+5))<<8|(255&e.charCodeAt(p+6))<<16|(255&e.charCodeAt(p+7))<<24,255&e.charCodeAt(p)|(255&e.charCodeAt(p+1))<<8|(255&e.charCodeAt(p+2))<<16|(255&e.charCodeAt(p+3))<<24],h=[255&e.charCodeAt(p+12)|(255&e.charCodeAt(p+13))<<8|(255&e.charCodeAt(p+14))<<16|(255&e.charCodeAt(p+15))<<24,255&e.charCodeAt(p+8)|(255&e.charCodeAt(p+9))<<8|(255&e.charCodeAt(p+10))<<16|(255&e.charCodeAt(p+11))<<24],f=o(f=n(f,g),31),l=t(l=o(l=i(l,f=n(f,m)),27),d),l=t(n(l,[0,5]),[0,1390208809]),h=o(h=n(h,m),33),d=t(d=o(d=i(d,h=n(h,g)),31),l),d=t(n(d,[0,5]),[0,944331445]);switch(f=[0,0],h=[0,0],s){case 15:h=i(h,r([0,e.charCodeAt(p+14)],48));case 14:h=i(h,r([0,e.charCodeAt(p+13)],40));case 13:h=i(h,r([0,e.charCodeAt(p+12)],32));case 12:h=i(h,r([0,e.charCodeAt(p+11)],24));case 11:h=i(h,r([0,e.charCodeAt(p+10)],16));case 10:h=i(h,r([0,e.charCodeAt(p+9)],8));case 9:h=n(h=i(h,[0,e.charCodeAt(p+8)]),m),d=i(d,h=n(h=o(h,33),g));case 8:f=i(f,r([0,e.charCodeAt(p+7)],56));case 7:f=i(f,r([0,e.charCodeAt(p+6)],48));case 6:f=i(f,r([0,e.charCodeAt(p+5)],40));case 5:f=i(f,r([0,e.charCodeAt(p+4)],32));case 4:f=i(f,r([0,e.charCodeAt(p+3)],24));case 3:f=i(f,r([0,e.charCodeAt(p+2)],16));case 2:f=i(f,r([0,e.charCodeAt(p+1)],8));case 1:f=n(f=i(f,[0,e.charCodeAt(p)]),g),l=i(l,f=n(f=o(f,31),m))}return l=t(l=i(l,[0,e.length]),d=i(d,[0,e.length])),d=t(d,l),l=t(l=a(l),d=a(d)),d=t(d,l),("00000000"+(l[0]>>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)+("00000000"+(d[0]>>>0).toString(16)).slice(-8)+("00000000"+(d[1]>>>0).toString(16)).slice(-8)}function s(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{s(o.next(e))}catch(t){i(t)}}function c(e){try{s(o.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((o=o.apply(e,t||[])).next())}))}function u(e){return"number"==typeof e?0|e:parseInt(e)}function l(e){return e.reduce(((e,t)=>e+(t?1:0)),0)}const d=navigator,f=window;const h=document,g=["monospace","sans-serif","serif"],m=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"],p={fontStyle:"normal",fontWeight:"normal",letterSpacing:"normal",lineBreak:"auto",lineHeight:"normal",textTransform:"none",textAlign:"left",textDecoration:"none",textShadow:"none",whiteSpace:"normal",wordBreak:"normal",wordSpacing:"normal"};function v(e){return e.toDataURL()}const y=navigator,C=window;const S=window,w=navigator,A=document;function b(){return l(["msWriteProfilerMark"in S,"msLaunchUri"in w,"msSaveBlob"in w])>=2}function M(){return l(["userActivation"in w,"mediaSession"in w,0===w.vendor.indexOf("Google"),"BackgroundFetchManager"in S,"BatteryManager"in S,"webkitMediaStream"in S,"webkitSpeechGrammar"in S])>=5}const T=navigator;const x=window;const O=window;const k=window;const P=document;const I={osCpu:function(){return navigator.oscpu},languages:function(){const e=[],t=T.language||T.userLanguage||T.browserLanguage||T.systemLanguage;if(void 0!==t&&e.push([t]),Array.isArray(T.languages))M()&&l([!("MediaSettingsRange"in S),!("PhotoCapabilities"in S),"RTCEncodedAudioFrame"in S,""+S.Intl=="[object Intl]"])>=2||e.push(T.languages);else if("string"==typeof T.languages){const t=T.languages;t&&e.push(t.split(","))}return e},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return navigator.deviceMemory},screenResolution:function(){const e=[u(x.screen.width),u(x.screen.height)];return e.sort().reverse(),e},availableScreenResolution:function(){if(O.screen.availWidth&&O.screen.availHeight){const e=[u(O.screen.availWidth),u(O.screen.availHeight)];return e.sort().reverse(),e}},hardwareConcurrency:function(){try{const e=u(navigator.hardwareConcurrency);return isNaN(e)?1:e}catch(e){return 1}},timezoneOffset:function(){return(new Date).getTimezoneOffset()},timezone:function(){var e;if(null===(e=k.Intl)||void 0===e?void 0:e.DateTimeFormat)return(new k.Intl.DateTimeFormat).resolvedOptions().timeZone},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){if(!b())try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){return navigator.platform},plugins:function(){if(!navigator.plugins)return;const e=[];for(let t=0;t<navigator.plugins.length;++t){const n=navigator.plugins[t];if(!n)continue;const o=[];for(const e of n)o.push({type:e.type,suffixes:e.suffixes});e.push({name:n.name,description:n.description,mimeTypes:o})}return e},canvas:function(){const[e,t]=function(){const e=document.createElement("canvas");return e.width=240,e.height=140,e.style.display="inline",[e,e.getContext("2d")]}();if(!function(e,t){return!(!t||!e.toDataURL)}(e,t))return{winding:!1,data:""};t.rect(0,0,10,10),t.rect(2,2,6,6);const n=!t.isPointInPath(5,5,"evenodd");t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.font="11pt no-real-font-123";const o="Cwm fjordbank š gly";return t.fillText(o,2,15),t.fillStyle="rgba(102, 204, 0, 0.2)",t.font="18pt Arial",t.fillText(o,4,45),t.globalCompositeOperation="multiply",t.fillStyle="rgb(255,0,255)",t.beginPath(),t.arc(50,50,50,0,2*Math.PI,!0),t.closePath(),t.fill(),t.fillStyle="rgb(0,255,255)",t.beginPath(),t.arc(100,50,50,0,2*Math.PI,!0),t.closePath(),t.fill(),t.fillStyle="rgb(255,255,0)",t.beginPath(),t.arc(75,100,50,0,2*Math.PI,!0),t.closePath(),t.fill(),t.fillStyle="rgb(255,0,255)",t.arc(75,75,75,0,2*Math.PI,!0),t.arc(75,75,25,0,2*Math.PI,!0),t.fill("evenodd"),{winding:n,data:v(e)}},touchSupport:function(){let e,t=0;void 0!==y.maxTouchPoints?t=u(y.maxTouchPoints):void 0!==y.msMaxTouchPoints&&(t=y.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(n){e=!1}return{maxTouchPoints:t,touchEvent:e,touchStart:"ontouchstart"in C}},fonts:function(){const e=h.body,t=h.createElement("div"),n=h.createElement("div"),o={},r={},i=()=>{const e=h.createElement("span");return Object.assign(e.style,p,{position:"absolute",left:"-9999px",fontSize:"48px"}),e.textContent="mmMwWLliI0O&1",e},a=(e,t)=>{const n=i();return n.style.fontFamily=`'${e}',${t}`,n},c=e=>g.some(((t,n)=>e[n].offsetWidth!==o[t]||e[n].offsetHeight!==r[t])),s=g.map((e=>{const n=i();return n.style.fontFamily=e,t.appendChild(n),n}));e.appendChild(t);for(let d=0,f=g.length;d<f;d++)o[g[d]]=s[d].offsetWidth,r[g[d]]=s[d].offsetHeight;const u=(()=>{const e={};for(const t of m)e[t]=g.map((e=>{const o=a(t,e);return n.appendChild(o),o}));return e})();e.appendChild(n);const l=[];for(let d=0,f=m.length;d<f;d++)c(u[m[d]])&&l.push(m[d]);return e.removeChild(n),e.removeChild(t),l},audio:function(){return s(this,void 0,void 0,(function*(){if(d.userAgent.match(/OS 11.+Version\/11.+Safari/))return-1;const e=f.OfflineAudioContext||f.webkitOfflineAudioContext;if(!e)return-2;const t=new e(1,44100,44100),n=t.createOscillator();n.type="triangle",n.frequency.setValueAtTime(1e4,t.currentTime);const o=t.createDynamicsCompressor();for(const[r,i]of[["threshold",-50],["knee",40],["ratio",12],["reduction",-20],["attack",0],["release",.25]])"function"==typeof o[r].setValueAtTime&&o[r].setValueAtTime(i,t.currentTime);return n.connect(o),o.connect(t.destination),n.start(0),t.startRendering(),new Promise((e=>{const r=setTimeout((()=>{t.oncomplete=()=>{},e(-3)}),1e3);t.oncomplete=t=>{let i;try{clearTimeout(r),i=t.renderedBuffer.getChannelData(0).slice(4500,5e3).reduce(((e,t)=>e+Math.abs(t)),0),n.disconnect(),o.disconnect()}catch(a){return void e(-4)}e(i)}}))}))},pluginsSupport:function(){return void 0!==navigator.plugins},productSub:function(){return navigator.productSub},emptyEvalLength:function(){return eval.toString().length},errorFF:function(){try{throw"a"}catch(e){try{return e.toSource(),!0}catch(t){return!1}}},vendor:function(){return navigator.vendor},chrome:function(){return void 0!==window.chrome},cookiesEnabled:function(){try{P.cookie="cookietest=1";const e=-1!==P.cookie.indexOf("cookietest=");return P.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}}};function B(e,t,n){return s(this,void 0,void 0,(function*(){let o=Date.now();const r={};for(const a of Object.keys(e)){if(function(e,t){for(let n=0,o=e.length;n<o;++n)if(e[n]===t)return!0;return!1}(n,a))continue;let c,s;try{c={value:yield e[a](t)}}catch(i){c=i&&"object"==typeof i&&"message"in i?{error:i}:{error:{message:i}}}s=Date.now(),r[a]=Object.assign(Object.assign({},c),{duration:s-o}),o=s}return r}))}function D(e){return JSON.stringify(e,((e,t)=>{var n;return t instanceof Error?Object.assign(Object.assign({},t),{message:t.message,stack:null===(n=t.stack)||void 0===n?void 0:n.split("\n")}):t}),2)}function E(e){return c(function(e){let t="";for(const n of Object.keys(e)){const o=e[n],r=o.error?"error":JSON.stringify(o.value);t+=`${t?"|":""}${n.replace(/([:|\\])/g,"\\$1")}:${r}`}return t}(e))}class R{get(e={}){return s(this,void 0,void 0,(function*(){const t=yield B(I,void 0,[]),n=function(e){let t;return{components:e,get visitorId(){return void 0===t&&(t=E(this.components)),t},set visitorId(e){t=e}}}(t);return e.debug&&console.log(`Copy the text below to get the debug data:\n\n\`\`\`\nversion: 3.0.0\ngetOptions: ${JSON.stringify(e,void 0,2)}\nvisitorId: ${n.visitorId}\ncomponents: ${D(t)}\n\`\`\``),n}))}}function L({delayFallback:e=50}={}){return s(this,void 0,void 0,(function*(){var t;return yield(t=e,new Promise((e=>{window.requestIdleCallback?window.requestIdleCallback((()=>e())):setTimeout(e,t)}))),new R}))}var F={load:L,hashComponents:E,componentsToDebugString:D};const j=c;e.componentsToDebugString=D,e.default=F,e.getComponents=B,e.hashComponents=E,e.isChromium=M,e.isDesktopSafari=function(){return"safari"in S},e.isGecko=function(){var e;return l(["buildID"in w,(null===(e=A.documentElement)||void 0===e?void 0:e.style)&&"MozAppearance"in A.documentElement.style,"MediaRecorderErrorEvent"in S,"mozInnerScreenX"in S,"CSSMozDocumentRule"in S,"CanvasCaptureMediaStream"in S])>=4},e.isIEOrOldEdge=b,e.load=L,e.murmurX64Hash128=j,Object.defineProperty(e,"__esModule",{value:!0})})); |
{ | ||
"name": "@fingerprintjs/fingerprintjs", | ||
"version": "3.0.0-beta.3", | ||
"description": "Modern & flexible browser fingerprinting library", | ||
"version": "3.0.0", | ||
"keywords": [ | ||
"fraud", | ||
"fraud-detection", | ||
"fraud-prevention", | ||
"browser", | ||
"identification", | ||
"fingerprint", | ||
"fingerprinting", | ||
"privacy" | ||
], | ||
"author": "FingerprintJS, Inc (https://fingerprintjs.com)", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/fingerprintjs/fingerprintjs.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/fingerprintjs/fingerprintjs/issues" | ||
}, | ||
"homepage": "https://github.com/fingerprintjs/fingerprintjs", | ||
"main": "dist/fp.cjs.js", | ||
@@ -6,0 +26,0 @@ "module": "dist/fp.esm.js", |
224
readme.md
@@ -1,17 +0,38 @@ | ||
# FingerprintJS | ||
<p align="center"> | ||
<a href="https://fingerprintjs.com"> | ||
<img src="resources/logo.svg" alt="FingerprintJS" width="300px" /> | ||
</a> | ||
</p> | ||
<p align="center"> | ||
<a href="https://github.com/fingerprintjs/fingerprintjs/actions?workflow=Test"> | ||
<img src="https://github.com/fingerprintjs/fingerprintjs/workflows/Test/badge.svg" alt="Build status"> | ||
</a> | ||
<a href="https://www.npmjs.com/package/@fingerprintjs/fingerprintjs"> | ||
<img src="https://img.shields.io/npm/dt/fingerprintjs2.svg" alt="Total downloads from NPM"> | ||
</a> | ||
<a href="https://www.npmjs.com/package/@fingerprintjs/fingerprintjs"> | ||
<img src="https://img.shields.io/npm/v/@fingerprintjs/fingerprintjs.svg" alt="Current NPM version"> | ||
</a> | ||
</p> | ||
Work in progress, stay tuned. | ||
Makes a website visitor identifier from a browser fingerprint. | ||
Unlike cookies and local storage, fingerprint stays the same in incognito/private mode and even when browser data is purged. | ||
## Quick start | ||
### In browser | ||
### Install from CDN | ||
```html | ||
<script> | ||
function onFingerprintJSLoad(fp) { | ||
fp.get().then(({ visitorId }) => console.log(visitorId)); | ||
function onFingerprintJSLoad(fpAgent) { | ||
// The FingerprintJS agent is ready. Get a visitor identifier when you'd like to. | ||
fpAgent.get().then(result => { | ||
// This is the visitor identifier: | ||
const visitorId = result.visitorId; | ||
console.log(visitorId); | ||
}); | ||
} | ||
</script> | ||
<script | ||
async src="https://cdn.jsdelivr.net/npm/@fingerprintjs/fingerprintjs@3.0.0-beta.2/dist/fp.min.js" | ||
async src="https://cdn.jsdelivr.net/npm/@fingerprintjs/fingerprintjs@3/dist/fp.min.js" | ||
onload="FingerprintJS.load().then(onFingerprintJSLoad)" | ||
@@ -21,17 +42,25 @@ ></script> | ||
A simple way to start but not recommended because AdBlock and similar browser extensions often block this URL. | ||
You should at least upload the script to your server. | ||
We recommend to upload [the JS script](https://cdn.jsdelivr.net/npm/@fingerprintjs/fingerprintjs@3/dist/fp.min.js) | ||
to your server because AdBlock and other browser extensions can block the public script URL. | ||
### Webpack/Rollup/Browserify | ||
### Alternatively you can install from NPM to use with Webpack/Rollup/Browserify | ||
```bash | ||
npm i @fingerprintjs/fingerprintjs | ||
# or | ||
yarn add @fingerprintjs/fingerprintjs | ||
``` | ||
```js | ||
import * as FPJS from '@fingerprintjs/fingerprintjs'; | ||
import FingerprintJS from '@fingerprintjs/fingerprintjs'; | ||
(async () => { | ||
const fpjs = await FPJS.load(); | ||
const { visitorId } = await fpjs.get(); | ||
// We recommend to call `load` at application startup. | ||
const fpAgent = await FingerprintJS.load(); | ||
// The FingerprintJS agent is ready. Get a visitor identifier when you'd like to. | ||
const result = await fpAgent.get(); | ||
// This is the visitor identifier: | ||
const visitorId = result.visitorId; | ||
console.log(visitorId); | ||
@@ -41,76 +70,141 @@ })(); | ||
## Version policy | ||
š [Full documentation](#open-source-version-reference) | ||
The library doesn't promise same visitor identifier between any versions | ||
but tries to keep them same as much as reasonable. | ||
## Upgrade to [Pro version](https://fingerprintjs.com) to get 99.5% identification accuracy | ||
The documented JS API follows [Semantic Versioning](https://semver.org). | ||
Using undocumented features is at you own risk. | ||
<p align="center"> | ||
<a href="https://fingerprintjs.com"> | ||
<img src="resources/pro_screenshot.png" alt="Pro screenshot" width="697px" /> | ||
</a> | ||
</p> | ||
## Contribution | ||
<table> | ||
<thead> | ||
<tr> | ||
<th></th> | ||
<!-- The <img>s are to make the table take the full width --> | ||
<th align="center"><img width="350" height="0"> <p>Open Source version</p></th> | ||
<th align="center"><img width="350" height="0"> <p>Pro version</p></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr><td>Identification accuracy</td><td align="center">60%</td><td align="center">99.5%</td></tr> | ||
<tr><td>Bot detection</td><td align="center">ā</td><td align="center">ā </td></tr> | ||
<tr><td>Incognito / Private mode detection</td><td align="center">ā</td><td align="center">ā </td></tr> | ||
<tr><td>Geolocation</td><td align="center">ā</td><td align="center">ā </td></tr> | ||
<tr><td>Security</td><td align="center">ā</td><td align="center">ā </td></tr> | ||
<tr><td>Server API</td><td align="center">ā</td><td align="center">ā </td></tr> | ||
<tr><td>Webhooks</td><td align="center">ā</td><td align="center">ā </td></tr> | ||
</tbody> | ||
</table> | ||
### Development playground | ||
Pro result example: | ||
```bash | ||
# Make sure you have Yarn installed | ||
yarn install | ||
yarn playground:start # Add '--port 8765' to change the server port | ||
```js | ||
{ | ||
"requestId": "HFMlljrzKEiZmhUNDx7Z", | ||
"visitorId": "kHqPGWS1Mj18sZFsP8Wl", | ||
"visitorFound": true, | ||
"incognito": false, | ||
"bot": { "probability": 0.96 }, | ||
"browserName": "Chrome", | ||
"browserVersion": "85.0.4183", | ||
"os": "Mac OS X", | ||
"osVersion": "10.15.6", | ||
"device": "Other", | ||
"ip": "192.65.67.131", | ||
"ipLocation": { | ||
"accuracyRadius": 100, | ||
"latitude": 37.409657, | ||
"longitude": -121.965467 | ||
// ... | ||
} | ||
} | ||
``` | ||
Then open http://localhost:8080 in a browser. | ||
It's reloaded every time the source code is changed. | ||
šæ [Live demo](https://fingerprintjs.com/demo) | ||
To build the playground distribution code (e.g. to upload to a static server), run: | ||
ā± [How to upgrade from Open Source to Pro in 30 seconds](https://dev.fingerprintjs.com/v3/docs/migrating-from-previous-versions#from-fingerprintjs-open-source-version-3) | ||
```bash | ||
yarn playground:build | ||
``` | ||
š [FingerprintJS Pro documentation](https://dev.fingerprintjs.com) | ||
The result will appear at `playground/dist`. | ||
## Open-source version reference | ||
### How to build | ||
### Installation | ||
To build the distribution files of the library, run: | ||
The library is shipped in various formats: | ||
```bash | ||
yarn build | ||
``` | ||
- Global variable | ||
```html | ||
<script> | ||
function initFingerprintJS() { | ||
// ... | ||
} | ||
</script> | ||
<script | ||
async | ||
src="https://cdn.jsdelivr.net/npm/@fingerprintjs/fingerprintjs@3/dist/fp.min.js" | ||
onload="initFingerprintJS()" | ||
></script> | ||
``` | ||
- UMD | ||
```js | ||
require(['https://cdn.jsdelivr.net/npm/@fingerprintjs/fingerprintjs@3/dist/fp.umd.min.js'], (FingerprintJS) => {/* ... */}); | ||
``` | ||
- ECMAScript module | ||
```js | ||
import FingerprintJS from '@fingerprintjs/fingerprintjs'; | ||
``` | ||
- CommonJS | ||
```js | ||
const FingerprintJS = require('@fingerprintjs/fingerprintjs'); | ||
``` | ||
The files will appear at `dist`. | ||
### API | ||
### How to test | ||
- `FingerprintJS.load({ delayFallback?: number }): Promise<Agent>` | ||
There are automatic tests. | ||
They are run by [Jasmine](https://jasmine.github.io) in real browsers using [Karma](https://karma-runner.github.io). | ||
Builds an instance of Agent and waits a delay required for a proper operation. | ||
`delayFallback` is an optional parameter that sets duration (milliseconds) of the fallback for browsers that don't support [requestIdleCallback](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback); | ||
it has a good default value which we don't recommend to change. | ||
To run the tests in a browser on your machine, build the project and run: | ||
```bash | ||
yarn test:local --browsers ChromeHeadless | ||
# or to run in Firefox | ||
yarn test:local --browsers FirefoxHeadless | ||
# or to run in both | ||
yarn test:local | ||
``` | ||
- `agent.get({ debug?: boolean }): Promise<{ visitorId: string, components: {/* ... */} }>` | ||
To run the tests in browsers on [BrowserStack](https://www.browserstack.com), get a BrowserStack access key and run: | ||
Gets the visitor identifier. | ||
`debug: true` prints debug messages to the console. | ||
`visitorId` is the visitor identifier. | ||
`components` is a dictionary of components that have formed the identifier; | ||
each value is an object like `{ value: any, duration: number }` in case of success | ||
and `{ error: object, duration: number }` in case of an unexpected error during getting the component. | ||
- `FingerprintJS.hashComponents(components: object): string` | ||
Converts a dictionary of components (described above) into a short hash string a.k.a. a visitor identifier. | ||
Designed for extending the library with your own components. | ||
- `FingerprintJS.componentsToDebugString(components: object): string` | ||
Converts a dictionary of components (described above) into human-friendly format. | ||
## Migrating from v2 | ||
- [Migration guide](migrating-v2-v3.md) | ||
- [V2 documentation](https://github.com/fingerprintjs/fingerprintjs/tree/v2) | ||
## Version policy | ||
The library doesn't guarantee the same visitor identifier between versions, | ||
but will try to keep them the same as much as possible. | ||
The documented JS API follows [Semantic Versioning](https://semver.org). | ||
Use undocumented features at your own risk. | ||
## Browser support | ||
```bash | ||
# For Linux, macOS and WSL (Linux on Windows) | ||
BROWSERSTACK_USERNAME=your-username BROWSERSTACK_ACCESS_KEY=your-key yarn test:browserstack | ||
npx browserslist "> 1% in us" | ||
``` | ||
Or make a PR to this repository, the test will run in BrowserStack automatically. | ||
BrowserStack sessions are unstable, so a session can fail for no reason; | ||
restart the testing when you see no clear errors related to the tests. | ||
Unit test files are located right next to individual module files that they check. | ||
Integration tests are located in the `tests` directory. | ||
## Contribution | ||
### How to publish | ||
1. Bump the version. Changing the number in [package.json](package.json) is enough. | ||
2. Build and test the project. | ||
3. See what's will get into the NPM package, make sure it contains the distributive files and no excess files. | ||
To see, run `yarn pack`, an archive will appear nearby, open it with any archive browser. | ||
4. Run | ||
```bash | ||
yarn publish --access public # Add '--tag beta' (without the quotes) if you release a beta version | ||
``` | ||
See the [contribution guidelines](contributing.md) to learn how to start a playground, test and build. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
199574
10
4601
0
0
209
0