-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsplinta.tracker.free.js
5926 lines (5079 loc) · 207 KB
/
splinta.tracker.free.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*!
* Splinta.tracker.js
* Copyright (c) 2018 - 2021 Oparand - CoolCodes
*
* @author: Ifeora Okechukwu
* @vendor: CoolCodes
* @version: 0.1.6
*/
/**
* See: https://github.com/taylorhakes/promise-polyfill/
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(global, (global || {}).document) :
typeof define === 'function' && define.amd ? define(factory) :
(factory(global, global.document));
}(this, (function (w, d) { 'use strict';
!function(V){
function j(e){return{}.toString.call(e).toLowerCase()}function q(e,i){return{}.hasOwnProperty.call(e,i)}(function(i,a,t){var n=!1,e=!0,s=i.document,o=s.documentElement,r=s.addEventListener?"addEventListener":"attachEvent",c=s.addEventListener?"removeEventListener":"detachEvent",d=s.addEventListener?"":"on",l=function(e){"readystatechange"==e.type&&"complete"!=s.readyState||(("load"==e.type?i:s)[c](d+e.type,l,!1),!n&&(n=!0)&&a.call(i,e.type||e,t))},b=function(){try{o.doScroll("left")}catch(e){return void setTimeout(b,50)}l("poll")};if("complete"==s.readyState)a.call(i,"lazy",t);else{if(s.createEventObject&&o.doScroll){try{e=!i.frameElement}catch(e){}e&&b()}s[r](d+"DOMContentLoaded",l,!1),s[r](d+"readystatechange",l,!1),i[r](d+"load",l,!1)}}).apply(null,[window,function(){var e,i,a,t,n=this,s=n.document,o=s.documentElement,r="documentMode",c=n.clientInformation||{},d=n.navigator,l=(c.productSub||d.productSub||n.opera&&n.opera.buildNumber(),c.userAgent||d.userAgent),b=(d.appName,c.appVersion||d.appVersion),p=!1,w=!1,u=!1,g=!1,m=!1,v=l.toLowerCase(),k=(n.chrome||"onafterprint"in n||s.readyState)&&"clientInformation"in n,h="orientation"in n&&!("ondeviceorientation"in n),f=/(?:chrome[^ ]+:)? (edg(?:[ea]|ios)?)\/(\d+(\.\d+)?)/.exec(v)||/(webkit)[ \/]([\w.]+)/.exec(v)||/; (flock)\/(\d+(\.\d+)?)/.exec(v)||/; (vivaldi)\/(\d+(\.\d+)?)/.exec(v)||/(opera|opr|opios)(?:.*version)?[ \/]([\w.]+)/.exec(v)||/(?:(msie) |rv)([\w.]+)/.exec(v)||!/compatible/.test(v)&&!/seamonkey/.test(v)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(v)||[],x={isLinux:function(){return 0==d.platform.indexOf("Linux")},isMac:function(){return 0==d.platform.indexOf("Mac")},isSun:function(){return 0==d.platform.indexOf("Sun")},isWinPC:function(){return 0==d.platform.indexOf("Win32")},isWinMobile:function(e){return 0==d.platform.indexOf("Win")&&(0<l.indexOf("Windows Phone")||0<l.indexOf("IEMobile")||0<l.indexOf("WPDesktop"))},isOperaMini:function(e){return"[object operamini]"==j(n.operamini)&&!!(e.className+=" operamini")||0<l.indexOf("Opera Mini")||e&&"OMiniFold"in e.style&&!!(e.className+=" operamini")},isOperaMobile:function(e){return typeof n.operamini===V&&(x.isAndroid(e)||x.isWinMobile(e))&&("Opera Software ASA"===d.vendor||"function"==typeof d.share)&&k&&!(!e||!(e.className+=" operamobile"))},isIOS:function(e){return!x.isWinMobile(e)&&!!d.platform&&!n.MSStream&&/iPad|iPhone|iPod/.test(d.platform)||0<l.indexOf("iPhone;")||0<l.indexOf("iPad;")||0<l.indexOf("iPod;")||0<l.search(/iPhone OS 3_(1|2)_2/)},isAndroid:function(e){return!x.isWinMobile(e)&&this.isLinux()&&0<l.search(/\; Andriod(?:[\d]+\.[\d]+)/)&&-1==l.search(/like/gi)},isBB:function(e){return"blackberry"in n&&-1<l.search(/BlackBerry|\bBB\d+/)},isWebOS:function(e){return"PalmSystem"in n&&-1<l.search(/(Web|HPW)OS/)}},y=s.body||s.getElementsByTagName("body")[0],M=""===d.vendor&&d.oscpu&&!q(d,"oscpu")&&"number"==typeof n.mozInnerScreenX&&("registerContentHandler"in d||"registerProtocolHandler"in d)&&(/Gecko/g.test(l)||void 0!==n.InstallTrigger),O=(/Presto/g.test(l)||"Opera"===d.appName)&&"[object opera]"==j(n.opera)&&"navigationMode"in n.history,A=k&&(s.createEventObject||"webdriver"in d)&&(/Trident/g.test(l)||"string"==typeof d.cpuClass)&&!!n.toStaticHTML,N=k&&("function"==typeof function(e){try{var i=new Blob(["xxxx"],{type:"text/plain"});return e in i&&i[e]}catch(e){return!1}}("msDetachStream")||"function"==typeof n.RTCIceGatherer)&&("msCredentials"in n||"msTemplatePrinter"in n||!!n.StyleMedia)&&""===d.vendor&&"oncompassneedscalibration"in n&&!A,W=(p=k&&!!n.Intl&&!!n.CSS&&(!!d.usb&&"function"==typeof d.usb.getDevices||"function"==typeof n.Credential))&&!!n.Intl.v8BreakIterator&&function(){try{return"http://lab.example.com/"===new window.PasswordCredential({name:"-",iconURL:"http://lab.example.com",password:"-",id:"-"}).iconURL}catch(e){return!1}}();n.webpage={engine:{},old:{},device:{screen:{},os:"",browser_build:""}};var S=n.innerHeight||o.clientHeight||y.clientHeight,I=n.innerWidth||o.clientWidth||y.clientWidth,P=((I/S).toPrecision(2),(n.screen.width/n.screen.height).toPrecision(4)),T=n.screen.colorDepth||n.screen.pixelDepth;n.webpage.device.screen.color_depth=T,e=A||M?"undefined"===n.devicePixelRatio||void 0!==n.getInterface||A?n.devicePixelRatio||n.screen.deviceXDPI/n.screen.logicalXDPI:parseFloat(n.screen.availWidth/I):n.devicePixelRatio,n.pixelDensity=e;var C={isTouchCapable:function(){return"ontouchstart"in n||10===(d.maxTouchPoints||d.msMaxTouchPoints||1)||n.operamini&&n.operamini.features.touch||"onmsgesturechange"in n&&!q(n,"onmsgesturechange")},onDesktop:function(){return~~e<=1&&1024<=n.screen.width&&(n.screen.width<=1920||!this.onTV())&&!this.onTablet(!0)},onTV:function(){return!!this.isTouchCapable()&&(1.5==~~e&&1920<n.screen.width)},onTablet:function(e){return!(!e&&!this.isTouchCapable())&&((l.match(/RIM/i)||l.match(/ipad;/i)||l.match(/nexus (7|10)/i)||l.match(/KFAPWI/i)||l.match(/tablet/i))&&!this.onMobile())},onMobile:function(){return!!this.isTouchCapable()&&(l.match(/[^-]mobi|mobile/i)&&n.screen.width<768&&n.screen.width/e<768)}},L=function(){return 2<=e};switch(P){case"1.706":case"1.708":case"1.707":case"0.5859":(x.isWinPC(y)||x.isMac(y)||x.isLinux(y))&&600<=n.screen.width?(y.className+=0==P.search(/^(?:1\.70(?:[6-8]))$/)?" 1024x600":" 600x1024",C.onTablet()&&y.setAttribute("aria-view-mode","tablet"),C.onDesktop()&&y.setAttribute("aria-view-mode","desktop")):(x.isWinMobile(y)||x.isBB(y)||x.isAndroid(y)||x.isIOS(y)||x.isOperaMini(y)||x.isOperaMobile(y))&&(y.className+=h?90==Math.abs(n.orientation||0)?" 1024x600":" 600x1024":"0.5859"==P?" 600x1024":" 1024x600",C.onTablet()&&y.setAttribute("aria-view-mode","tablet"),C.onMobile()&&y.setAttribute("aria-view-mode","mobile"));break;case"0.5634":case"0.5625":case"0.5622":(x.isWinMobile(y)||x.isBB(y)||x.isAndroid(y)||x.isIOS(y)||x.isOperaMini(y)||x.isOperaMobile(y))&&(C.onMobile()&&y.setAttribute("aria-view-mode","mobile"),C.onTablet()&&y.setAttribute("aria-view-mode","tablet"));break;case"0.5993":case"1.669":(x.isWinMobile(y)||x.isBB(y)||x.isAndroid(y)||x.isIOS(y)||x.isOperaMini(y)||x.isOperaMobile(y))&&(y.className+=h?90==Math.abs(n.orientation||0)?" 534x320":" 320x534":"1.669"==P?" 534x320":" 320x534",C.onMobile()&&y.setAttribute("aria-view-mode","mobile"));break;case"1.500":case"0.6667":(x.isWinMobile(y)||x.isBB(y)||x.isAndroid(y)||x.isIOS(y)||x.isOperaMini(y)||x.isOperaMobile(y))&&(y.className+=h?90==Math.abs(n.orientation||0)?" 480x320":" 320x480":"0.6667"==P?" 320x480":" 480x320",C.onMobile()&&y.setAttribute("aria-view-mode","mobile"));break;case"1.333":case"0.7500":case"0.7496":(x.isWinPC(y)||x.isMac(y)||x.isLinux(y))&&768<=n.screen.width?(y.className+="1.333"==P?n.screen.width<=1024?" 1024x768":" 1152x864":n.screen.width<=768?" 768x1024":" 864x1152",C.onTablet()&&y.setAttribute("aria-view-mode","tablet"),C.onDesktop()&&y.setAttribute("aria-view-mode","desktop")):(x.isWinMobile(y)||x.isBB(y)||x.isAndroid(y)||x.isIOS(y)||x.isOperaMini(y)||x.isOperaMobile(y))&&(C.onTablet()&&800<=n.screen.width?(y.className+=h?90==Math.abs(n.orientation)?" 800x600":" 600x800":"1.333"==P?" 800x600":" 600x800",y.setAttribute("aria-view-mode","tablet")):C.onMobile()&&360<=n.screen.width&&(y.className+=h?90==Math.abs(n.orientation||0)?" 480x360 640x480":" 360x480 480x640":"1.333"==P?" 480x360 640x480":" 360x480 480x640",y.setAttribute("aria-view-mode","mobile")));break;case"1.250":(x.isWinPC(y)||x.isMac(y)||x.isLinux(y))&&768<=n.screen.width?(y.className+="1.250"==P?" 1280x1024":" 1024x1280",C.onTablet()&&y.setAttribute("aria-view-mode","tablet"),C.onDesktop()&&y.setAttribute("aria-view-mode","desktop")):(x.isWinMobile(y)||x.isBB(y)||x.isAndriod(y)||x.isOperaMobile(y))&&(C.onTablet()&&y.setAttribute("aria-view-mode","tablet"),C.onMobile()&&y.setAttribute("aria-view-mode","mobile"));break;case"1.779":(x.isWinPC(y)||x.isMac(y)||x.isLinux(y))&&768<=n.screen.width&&(y.className+=" 1366x768",C.onTablet()&&y.setAttribute("aria-view-mode","tablet"),C.onDesktop()&&y.setAttribute("aria-view-mode","desktop"));break;case"1.778":(x.isWinPC(y)||x.isMac(y)||x.isLinux(y))&&768<=n.screen.width?(y.className+=1600!==n.screen.availWidth?" 1920x1080":"1600x900",C.onDesktop()&&y.setAttribute("aria-view-mode","desktop"),C.onTV()&&y.setAttribute("aria-view-mode","tv")):h&&(y.className+=90==Math.abs(n.orientation)?" 640x360":" 1080x1920");break;case"0.6000":case"1.667":!(x.isWinPC(y)||x.isMac(y)||x.isLinux(y))&&n.screen.width<=768&&(y.className+=" 480x800",C.onTablet()&&y.setAttribute("aria-view-mode","tablet"),C.onDesktop()&&y.setAttribute("aria-view-mode","desktop"));break;case"1.600":(x.isWinPC(y)||x.isMac(y)||x.isLinux(y))&&768<=n.screen.width&&(1440<n.screen.width&&n.screen.width<=1680&&(y.className+=" 1680x1050"),1280<n.screen.width&&n.screen.width<=1440&&(y.className+=" 1440x900"),n.screen.width<=1280&&(y.className+=" 1280x800"),C.onTablet()&&y.setAttribute("aria-view-mode","tablet"),C.onDesktop()&&y.setAttribute("aria-view-mode","desktop"));break;case"1.805":(x.isWinPC()||x.isMac()||x.isLinux())&&768<=n.screen.width&&(y.className+=" 1386x768",C.onDesktop()&&y.setAttribute("aria-view-mode","desktop"));break;default:C.onDesktop()?(y.setAttribute("aria-view-mode","desktop"),n.webpage.device.type="desktop"):C.onTablet()?(y.setAttribute("aria-view-mode","tablet"),n.webpage.device.type="tablet"):C.onMobile()?(y.setAttribute("aria-view-mode","mobile"),n.webpage.device.type="mobile"):y.setAttribute("aria-view-mode","unknown")}y.setAttribute("aria-last-detected",document.lastModified),y.setAttribute("aria-touch-capable",String(C.isTouchCapable())),n.webpage.device.touch_capable=C.isTouchCapable(),L()?(y.setAttribute("aria-screen-view","retina"),n.webpage.device.screen.type="retina"):(y.setAttribute("aria-screen-view","normal"),n.webpage.device.screen.type="normal"),n.webpage.device.zoom_level=(100*n.pixelDensity).toFixed(),s[r]||O||(w=k&&(!1===s.webkitHidden||s.webkitHidden===V)&&(!!n.chrome.webstore||!!n.chrome.runtime||!!n.crypto)&&/(Chrome|Crios|Crmo|CrOS)/g.test(l)&&-1!==d.vendor.indexOf("Google Inc."),u=-1!==d.vendor.indexOf("Apple Computer, Inc.")&&(/constructor/i.test(n.HTMLElement)||"[object SafariRemoteNotification]"===(!n.safari||void 0!==n.safari&&n.safari.pushNotification).toString())&&("function"==typeof d.share||!d.presentation),g=w&&p&&!!d.presentation&&"function"==typeof d.share&&"function"==typeof d.canShare,m=-1!==d.vendor.indexOf("KDE")&&/Konqueror/g.test(l)&&"KhtmlUserInput"in y.style,-1!=d.vendor.indexOf("Amazon")&&/Silk/gi.test(l),/YAbrowser/gi.test(l));var _,B,E,D,z,F;n.navigator.isSWCapable=function(){return u&&"function"==typeof d.share&&"function"==typeof n.IntersectionObserver&&"function IntersectionObserver() { [native code] }"===String(n.IntersectionObserver)||p&&!O&&!!n.opr&&!!n.opr.addons&&!!n.CSS&&"function"==typeof n.CSS.supports&&"[object CacheStorage]"===String(n.caches)||(g||N)&&"function"==typeof n.PushManager&&"function PushManager() { [native code] }"===String(n.PushManager)||(e=s.createElement("input"),w&&W&&"function"==typeof e.reportValidity&&"function reportValidity() { [native code] }"===String(e.reportValidity))||M&&void 0!==s.charset&&"function"==typeof n.PushManager&&"function PushManager() {\n [native code]\n}"===String(n.PushManager)||!1;var e},a=f[1]||"unknown",(t=parseFloat(f[2]||"0"))<=9&&"msie"==a&&A&&(y.className+=" oldIE",n.webpage.old.ie=!0),t<=10.6&&"opera"==a&&O&&(y.className+=" oldOpera",n.webpage.old.opera=!0),t<=35&&"mozilla"==a&&M&&(l.match(/firefox/i)&&(y.className+=" oldMoz",n.webpage.old.firefox=!0),l.match(/flock/i)&&(y.className+=" oldFlock",n.webpage.old.flock=!0)),t<=13&&"edge"==a&&N&&(y.className+=" oldEdge",n.webpage.old.edge=!0),t<=40&&"webkit"==a&&!p&&(y.className+=w?" oldChrome":u?" oldSafari":"",u?n.webpage.old.safari=!0:w&&(n.webpage.old.chrome=!0),l.match(/flock/i)&&4<=t&&(y.className+=" oldFlock",n.webpage.old.flock=!0)),x.isIOS(y)?(y.setAttribute("aria-os-data","iOS"),n.webpage.device.os="ios"):x.isAndroid(y)?(y.setAttribute("aria-os-data","Linux Andriod"),n.webpage.device.os="linux andriod"):x.isWinPC(y)?(y.setAttribute("aria-os-data","Windows"),n.webpage.device.os="windows"):x.isBB(y)?(y.setAttribute("aria-os-data","Blackberry"),n.webpage.device.os="blackberry"):x.isWebOS(y)?(y.setAttribute("aria-os-data","Web OS"),n.webpage.device.os="webos"):x.isOperaMini(y)?(y.setAttribute("aria-user-agent","Opera Mini"),n.webpage.device.opera_mini=!0):x.isOperaMobile(y)?(y.setAttribute("aria-user-agent","Opera Mobile"),n.webpage.device.opera_mobile=!0):x.isMac(y)?(y.setAttribute("aria-os-data","Macintosh"),n.webpage.device.os="macintosh"):x.isSun(y)?(y.setAttribute("aria-os-data","Sun"),n.webpage.device.os="sun"):x.isLinux(y)?(y.setAttribute("aria-os-data","Linux"),n.webpage.device.os="linux"):(y.setAttribute("aria-os-data","unknown"),n.webpage.device.os="unknown"),"BackCompat"==s.compatMode?(y.setAttribute("aria-setup-mode","quirks"),y.className+=" quirks",n.webpage.quirks=!0):(y.setAttribute("aria-setup-mode","standards"),y.className+=" standards",n.webpage.standards=!0);try{i=y.getAttribute("aria-view-mode"),n.webpage.device.type=i}catch(e){}if(A){var H=parseInt(l.match(/MSIE\s(([0-9]+)[\.0-9]*)/)[2]),R=((_=new Function("/*@cc_on return @_jscript_version; @*/")())===V&&(_=11),_),X=H===R?" IE"+H:R;if("number"!=typeof X)return void(X=" UA-unknown");switch(X=" IE"+(R=parseInt(X)),R){case 7:window.webpage.engine.version="3.0";break;case 8:window.webpage.engine.version="4.0";break;case 9:case 10:window.webpage.engine.version="5.0";break;case 11:window.webpage.engine.version="7.0"}n.webpage.device.zoom_level=10===R||11===R?(s.documentElement.offsetHeight/n.innerHeight*100+.1).toFixed():(s.frames.screen.deviceXDPI/s.frames.screen.systemXDPI*100+.4999).toFixed(),y.className+=" yes-ms",s[r]&&s[r]===R&&("msInterpolationMode"in y.style||"msLinearGradient"in y.style||n.MSInputMethodContext)?-1==y.className.indexOf(X.substring(1))&&(y.className+=X+" forward-ie"):y.className+=X,y.className+=" trident",n.webpage.engine.trident=!0}else if(N)"edge"==a&&"msWriteProfilerMark"in n&&"onwebkitfullscreenchange"in s&&(y.className+="yes-edgehtml microsoftedge like-gecko like-khtml edgehtml legacy-edge",n.webpage.engine.edgehtml=!0,n.webpage.device.browser_build="edgehtml-edge");else if(g)"edg"!=a&&"edga"!=a&&"edgios"!=a||(y.className+="yes-blink microsoftedge like-gecko like-khtml blink chromium-edge",n.webpage.engine.blink=!0,n.webpage.device.browser_build="blink-edge");else if(M)-1<v.search(/firefox|iceweasel/)?(-1==y.className.indexOf("yes-moz")&&(y.className+=" yes-moz firefox gecko",n.webpage.device.browser_build="gecko-firefox"),"rv"==a&&(C.onTablet()||C.onMobile())&&(y.className+=" firefoxos")):-1<v.search(/seamonkey/)?y.className+=" yes-moz seamonkey gecko":-1<v.search(/flock/)&&(y.className+=" yes-moz flock gecko"),n.webpage.engine.gecko=!0;else if(m)-1<y.className.indexOf("yes-khtml")&&(y.className+=" yes-khtml konqueror khtml like-gecko"),n.webpage.engine.khtml=!0;else if(w&&"function"==typeof n.webkitURL){switch(t){case 1:n.webpage.engine.version="528.00";break;case 2:n.webpage.engine.version="530.00";break;case 3:n.webpage.engine.version="532.00";break;case 4:case 4.1:n.webpage.engine.version="532.50";break;case 5:n.webpage.engine.version="533.00";break;case 6:n.webpage.engine.version="534.30";break;case 7:n.webpage.engine.version="534.70";break;case 8:n.webpage.engine.version="534.10";break;case 9:n.webpage.engine.version="534.13";break;case 10:n.webpage.engine.version="534.16";break;case 11:n.webpage.engine.version="534.24"}W?(-1==y.className.indexOf("yes-blink")&&(y.className+=" yes-blink chrome"),l.match(/vivaldi\/(?:[\d]{1,}\.[\d]{1,})/)&&(y.className+=" yes-blink vivaldi"),-1<l.indexOf("nokia_xl")&&(y.className+=" nokia_xl"),y.className+=" blink like-gecko like-khtml",n.webpage.engine.blink=!0,n.webpage.device.browser_build="blink-chrome"):(-1==y.className.indexOf("yes-webkit")&&(l.match(/ubrowser\/(?:[\d]{1,}\.[\d]{1,})/)&&(y.className+=" yes-webkit ucbrowser"),-1<l.indexOf("nokia_xl")?y.className+=" nokia_xl":y.className+=" yes-webkit chrome"),y.className+=" webkit like-gecko like-khtml",n.webpage.engine.webkit=!0,n.webpage.device.browser_build="webkit-chrome"),n.webpage.device.zoom_level=(n.outerWidth/n.innerWidth*100).toFixed()}else if(-1!=l.indexOf("AppleWebkit")||u)-1==y.className.indexOf("yes-webkit")&&(y.className+=" yes-webkit safari like-gecko webkit like-khtml"),n.webpage.engine.webkit=!0,n.webpage.device.browser_build="webkit-safari",n.webpage.device.zoom_level=(s.documentElement.clientWidth/n.innerWidth*100).toFixed();else if(("supportsCSS"in n||"attachEvent"in s)&&O&&"opera"==a){switch(parseInt(n.opera.version())){case 7:case 8:window.webpage.engine.version="1.0";break;case 9:window.webpage.engine.version="2.0";break;case 10:window.webpage.engine.version="2.2";break;case 11:window.webpage.engine.version="2.7";break;case 12:window.webpage.engine.version="2.9";break;case 13:window.webpage.engine.version="2.13";break;case 14:window.webpage.engine.version="2.15"}-1==y.className.indexOf("yes-opera")&&(y.className+=" yes-opera opera presto"),n.webpage.engine.presto=!0,n.webpage.device.zoom_level=(n.top.outerWidth/n.top.innerWidth*100).toFixed()}else if(n.isOpera15OrLater()&&"opr"==a&&"Google Inc."===d.vendor){switch(-1==y.className.indexOf("yes-blink")&&(y.className+=" yes-blink opera blink like-gecko like-khtml"),n.webpage.engine.blink=!0,n.webpage.engine.x_version="537.36",parseInt(t)){case 15:n.webpage.engine.version="28";break;case 16:n.webpage.engine.version="29";break;case 17:n.webpage.engine.version="30";break;case 18:n.webpage.engine.version="31";break;case 19:n.webpage.engine.version="32";break;case 20:n.webpage.engine.version="33";break;case 21:n.webpage.engine.version="34";break;case 22:n.webpage.engine.version="35";break;case 23:n.webpage.engine.version="36";break;case 24:n.webpage.engine.version="37";break;case 25:n.webpage.engine.version="38"}n.webpage.device.browser_build="blink-opera"}B=n.webpage.engine,E=b,window.navigator.oscpu===V&&(F=-1,D=E.indexOf(" ")+1,z=[""],B.webkit||B.blink||B.edgehtml?(F=E.indexOf(")"),window.navigator.oscpu=E.substring(D+1,F).replace("(","").trim()):B.trident?(z=E.split(";"),window.navigator.oscpu=z[3]):B.gecko||(z=E.split(";"),window.navigator.oscpu=(z[0]||"").substring(D))),window.navigator.language===V&&(window.navigator.language=window.navigator.systemLanguage||window.navigator.userLanguage||window.navigator.browserLanguage),n.navigator.ostitle={"Windows NT 5.1":"Windows XP; Intel - 32 bits","Windows NT 6.1":"Windows 7; Intel - 32 bits","Windows NT 6.1; Win64; x64":"Windows 7; Intel - 64 bits","Windows NT 6.2":"Windows 8; Intel - 32 bits","Windows NT 6.2; Win64; x64":"Windows 8; Intel - 64 bits","Windows NT 10.0":"Windows 10 Pro; Intel - 32 bits","Windows NT 10.0; Win64; x64":"Windows 10 Pro; Intel - 64 bits","Macintosh; Intel Mac OS X 10_13_2":"Macintosh OS X 10; Intel - 64 bits","Linux; Andriod 6.0; Nexus 5 Build/MRA58N":"Linux Android Oreo {6.0}; ARM - 64 bits","Linux; Andriod 4.1.2; Nokia_XL Build/JZO54K":"Linux Android Jelly Bean {4.1}; ARM - 32 bits"}[n.navigator.oscpu]||""},{}])
}();
/**
* @this {Document.domain}
* lock API access
*/
// IE 8, very well supported :)
/*Object.defineProperty(d, 'domainMutateCount', {value: 1, writable:false});
Object.defineProperty(d, 'domain', {configurable:false,get:undefined,set:function(domainText){
if(this.domainMutateCount === 0) this.domain = domainText;
}});*/
/**
* @this {Promise}
*/
function finallyConstructor(callback) {
var constructor = this.constructor;
return this.then(
function(value) {
// @ts-ignore
return constructor.resolve(callback()).then(function() {
return value;
});
},
function(reason) {
// @ts-ignore
return constructor.resolve(callback()).then(function() {
// @ts-ignore
return constructor.reject(reason);
});
}
);
}
// Store setTimeout reference so promise-polyfill will be unaffected by
// other code modifying setTimeout (like sinon.useFakeTimers())
var setTimeoutFunc = setTimeout;
function isArray(x) {
return Boolean(x && x.length);
}
function noop() {}
// Polyfill for Function.prototype.bind
function bind(fn, thisArg) {
return function() {
fn.apply(thisArg, arguments);
};
}
/**
* @constructor
* @param {Function} fn
*/
function Promise(fn) {
if (!(this instanceof Promise))
throw new TypeError('Promises must be constructed via new');
if (typeof fn !== 'function') throw new TypeError('not a function');
/** @type {!number} */
this._state = 0;
/** @type {!boolean} */
this._handled = false;
/** @type {Promise|undefined} */
this._value = undefined;
/** @type {!Array<!Function>} */
this._deferreds = [];
doResolve(fn, this);
}
function handle(self, deferred) {
while (self._state === 3) {
self = self._value;
}
if (self._state === 0) {
self._deferreds.push(deferred);
return;
}
self._handled = true;
Promise._immediateFn(function() {
var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
if (cb === null) {
(self._state === 1 ? resolve : reject)(deferred.promise, self._value);
return;
}
var ret;
try {
ret = cb(self._value);
} catch (e) {
reject(deferred.promise, e);
return;
}
resolve(deferred.promise, ret);
});
}
function resolve(self, newValue) {
try {
// Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
if (newValue === self)
throw new TypeError('A promise cannot be resolved with itself.');
if (
newValue &&
(typeof newValue === 'object' || typeof newValue === 'function')
) {
var then = newValue.then;
if (newValue instanceof Promise) {
self._state = 3;
self._value = newValue;
finale(self);
return;
} else if (typeof then === 'function') {
doResolve(bind(then, newValue), self);
return;
}
}
self._state = 1;
self._value = newValue;
finale(self);
} catch (e) {
reject(self, e);
}
}
function reject(self, newValue) {
self._state = 2;
self._value = newValue;
finale(self);
}
function finale(self) {
if (self._state === 2 && self._deferreds.length === 0) {
Promise._immediateFn(function() {
if (!self._handled) {
Promise._unhandledRejectionFn(self._value);
}
});
}
for (var i = 0, len = self._deferreds.length; i < len; i++) {
handle(self, self._deferreds[i]);
}
self._deferreds = null;
}
/**
* @constructor
*/
function Handler(onFulfilled, onRejected, promise) {
this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
this.onRejected = typeof onRejected === 'function' ? onRejected : null;
this.promise = promise;
}
/**
* Take a potentially misbehaving resolver function and make sure
* onFulfilled and onRejected are only called once.
*
* Makes no guarantees about asynchrony.
*/
function doResolve(fn, self) {
var done = false;
try {
fn(
function(value) {
if (done) return;
done = true;
resolve(self, value);
},
function(reason) {
if (done) return;
done = true;
reject(self, reason);
}
);
} catch (ex) {
if (done) return;
done = true;
reject(self, ex);
}
}
Promise.prototype['catch'] = function(onRejected) {
return this.then(null, onRejected);
};
Promise.prototype.then = function(onFulfilled, onRejected) {
// @ts-ignore
var prom = new this.constructor(noop);
handle(this, new Handler(onFulfilled, onRejected, prom));
return prom;
};
Promise.prototype['finally'] = finallyConstructor;
Promise.all = function(arr) {
return new Promise(function(resolve, reject) {
if (!isArray(arr)) {
return reject(new TypeError('Promise.all accepts an array'));
}
var args = Array.prototype.slice.call(arr);
if (args.length === 0) return resolve([]);
var remaining = args.length;
function res(i, val) {
try {
if (val && (typeof val === 'object' || typeof val === 'function')) {
var then = val.then;
if (typeof then === 'function') {
then.call(
val,
function(val) {
res(i, val);
},
reject
);
return;
}
}
args[i] = val;
if (--remaining === 0) {
resolve(args);
}
} catch (ex) {
reject(ex);
}
}
for (var i = 0; i < args.length; i++) {
res(i, args[i]);
}
});
};
Promise.resolve = function(value) {
if (value && typeof value === 'object' && value.constructor === Promise) {
return value;
}
return new Promise(function(resolve) {
resolve(value);
});
};
Promise.reject = function(value) {
return new Promise(function(resolve, reject) {
reject(value);
});
};
Promise.race = function(arr) {
return new Promise(function(resolve, reject) {
if (!isArray(arr)) {
return reject(new TypeError('Promise.race accepts an array'));
}
for (var i = 0, len = arr.length; i < len; i++) {
Promise.resolve(arr[i]).then(resolve, reject);
}
});
};
// Use polyfill for setImmediate for performance gains
Promise._immediateFn =
// @ts-ignore
(typeof setImmediate === 'function' &&
function(fn) {
// @ts-ignore
setImmediate(fn);
}) ||
function(fn) {
setTimeoutFunc(fn, 0);
};
Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
if (typeof console !== 'undefined' && console) {
console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console
}
};
/** @suppress {undefinedVars} */
var globalNS = (function() {
// the only reliable means to get the global object is
// `Function('return this')()`
// However, this causes CSP violations in Chrome apps.
if (typeof self !== 'undefined') {
return self;
}
if (typeof window !== 'undefined') {
return window;
}
if (typeof global !== 'undefined') {
return global;
}
throw new Error('unable to locate global object');
})();
if (!('Promise' in globalNS)) {
globalNS['Promise'] = Promise;
} else if (!globalNS.Promise.prototype['finally']) {
globalNS.Promise.prototype['finally'] = finallyConstructor;
}
})));
/*
* Copyright 2018 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
(function(){function l(){function n(a){return a?"object"===typeof a||"function"===typeof a:!1}var p=null;var g=function(a,b){function f(){}if(!n(a)||!n(b))throw new TypeError("Cannot create proxy with a non-object as target or handler");p=function(){f=function(a){throw new TypeError("Cannot perform '"+a+"' on a proxy that has been revoked");}};var e=b;b={get:null,set:null,apply:null,construct:null};for(var k in e){if(!(k in b))throw new TypeError("Proxy polyfill does not support trap '"+k+"'");b[k]=e[k]}"function"===
typeof e&&(b.apply=e.apply.bind(e));var c=this,g=!1,q=!1;"function"===typeof a?(c=function(){var h=this&&this.constructor===c,d=Array.prototype.slice.call(arguments);f(h?"construct":"apply");return h&&b.construct?b.construct.call(this,a,d):!h&&b.apply?b.apply(a,this,d):h?(d.unshift(a),new (a.bind.apply(a,d))):a.apply(this,d)},g=!0):a instanceof Array&&(c=[],q=!0);var r=b.get?function(a){f("get");return b.get(this,a,c)}:function(a){f("get");return this[a]},v=b.set?function(a,d){f("set");b.set(this,
a,d,c)}:function(a,b){f("set");this[a]=b},t={};Object.getOwnPropertyNames(a).forEach(function(b){if(!((g||q)&&b in c)){var d={enumerable:!!Object.getOwnPropertyDescriptor(a,b).enumerable,get:r.bind(a,b),set:v.bind(a,b)};Object.defineProperty(c,b,d);t[b]=!0}});e=!0;Object.setPrototypeOf?Object.setPrototypeOf(c,Object.getPrototypeOf(a)):c.__proto__?c.__proto__=a.__proto__:e=!1;if(b.get||!e)for(var m in a)t[m]||Object.defineProperty(c,m,{get:r.bind(a,m)});Object.seal(a);Object.seal(c);return c};g.revocable=
function(a,b){return{proxy:new g(a,b),revoke:p}};return g};var u="undefined"!==typeof process&&"[object process]"==={}.toString.call(process)||"undefined"!==typeof navigator&&"ReactNative"===navigator.product?global:self;u.Proxy||(u.Proxy=l(),u.Proxy.revocable=u.Proxy.revocable);})()
/*
* Fingerprintjs2 2.1.0 - Modern & flexible browser fingerprint library v2
* https://github.com/Valve/fingerprintjs2
* Copyright (c) 2015 Valentin Vasilyev ([email protected])
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL VALENTIN VASILYEV BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* global define */
(function (name, context, definition) {
'use strict'
context[name] = definition()
})('Fingerprint2', this, function () {
'use strict'
/// MurmurHash3 related functions
//
// Given two 64bit ints (as an array of two 32bit ints) returns the two
// added together as a 64bit int (as an array of two 32bit ints).
//
var x64Add = function (m, n) {
m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff]
n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff]
var o = [0, 0, 0, 0]
o[3] += m[3] + n[3]
o[2] += o[3] >>> 16
o[3] &= 0xffff
o[2] += m[2] + n[2]
o[1] += o[2] >>> 16
o[2] &= 0xffff
o[1] += m[1] + n[1]
o[0] += o[1] >>> 16
o[1] &= 0xffff
o[0] += m[0] + n[0]
o[0] &= 0xffff
return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]
}
//
// Given two 64bit ints (as an array of two 32bit ints) returns the two
// multiplied together as a 64bit int (as an array of two 32bit ints).
//
var x64Multiply = function (m, n) {
m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff]
n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff]
var o = [0, 0, 0, 0]
o[3] += m[3] * n[3]
o[2] += o[3] >>> 16
o[3] &= 0xffff
o[2] += m[2] * n[3]
o[1] += o[2] >>> 16
o[2] &= 0xffff
o[2] += m[3] * n[2]
o[1] += o[2] >>> 16
o[2] &= 0xffff
o[1] += m[1] * n[3]
o[0] += o[1] >>> 16
o[1] &= 0xffff
o[1] += m[2] * n[2]
o[0] += o[1] >>> 16
o[1] &= 0xffff
o[1] += m[3] * n[1]
o[0] += o[1] >>> 16
o[1] &= 0xffff
o[0] += (m[0] * n[3]) + (m[1] * n[2]) + (m[2] * n[1]) + (m[3] * n[0])
o[0] &= 0xffff
return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]
}
//
// Given a 64bit int (as an array of two 32bit ints) and an int
// representing a number of bit positions, returns the 64bit int (as an
// array of two 32bit ints) rotated left by that number of positions.
//
var x64Rotl = function (m, n) {
n %= 64
if (n === 32) {
return [m[1], m[0]]
} else if (n < 32) {
return [(m[0] << n) | (m[1] >>> (32 - n)), (m[1] << n) | (m[0] >>> (32 - n))]
} else {
n -= 32
return [(m[1] << n) | (m[0] >>> (32 - n)), (m[0] << n) | (m[1] >>> (32 - n))]
}
}
//
// Given a 64bit int (as an array of two 32bit ints) and an int
// representing a number of bit positions, returns the 64bit int (as an
// array of two 32bit ints) shifted left by that number of positions.
//
var x64LeftShift = function (m, n) {
n %= 64
if (n === 0) {
return m
} else if (n < 32) {
return [(m[0] << n) | (m[1] >>> (32 - n)), m[1] << n]
} else {
return [m[1] << (n - 32), 0]
}
}
//
// Given two 64bit ints (as an array of two 32bit ints) returns the two
// xored together as a 64bit int (as an array of two 32bit ints).
//
var x64Xor = function (m, n) {
return [m[0] ^ n[0], m[1] ^ n[1]]
}
//
// Given a block, returns murmurHash3's final x64 mix of that block.
// (`[0, h[0] >>> 1]` is a 33 bit unsigned right shift. This is the
// only place where we need to right shift 64bit ints.)
//
var x64Fmix = function (h) {
h = x64Xor(h, [0, h[0] >>> 1])
h = x64Multiply(h, [0xff51afd7, 0xed558ccd])
h = x64Xor(h, [0, h[0] >>> 1])
h = x64Multiply(h, [0xc4ceb9fe, 0x1a85ec53])
h = x64Xor(h, [0, h[0] >>> 1])
return h
}
//
// Given a string and an optional seed as an int, returns a 128 bit
// hash using the x64 flavor of MurmurHash3, as an unsigned hex.
//
var x64hash128 = function (key, seed) {
key = key || ''
seed = seed || 0
var remainder = key.length % 16
var bytes = key.length - remainder
var h1 = [0, seed]
var h2 = [0, seed]
var k1 = [0, 0]
var k2 = [0, 0]
var c1 = [0x87c37b91, 0x114253d5]
var c2 = [0x4cf5ad43, 0x2745937f]
for (var i = 0; i < bytes; i = i + 16) {
k1 = [((key.charCodeAt(i + 4) & 0xff)) | ((key.charCodeAt(i + 5) & 0xff) << 8) | ((key.charCodeAt(i + 6) & 0xff) << 16) | ((key.charCodeAt(i + 7) & 0xff) << 24), ((key.charCodeAt(i) & 0xff)) | ((key.charCodeAt(i + 1) & 0xff) << 8) | ((key.charCodeAt(i + 2) & 0xff) << 16) | ((key.charCodeAt(i + 3) & 0xff) << 24)]
k2 = [((key.charCodeAt(i + 12) & 0xff)) | ((key.charCodeAt(i + 13) & 0xff) << 8) | ((key.charCodeAt(i + 14) & 0xff) << 16) | ((key.charCodeAt(i + 15) & 0xff) << 24), ((key.charCodeAt(i + 8) & 0xff)) | ((key.charCodeAt(i + 9) & 0xff) << 8) | ((key.charCodeAt(i + 10) & 0xff) << 16) | ((key.charCodeAt(i + 11) & 0xff) << 24)]
k1 = x64Multiply(k1, c1)
k1 = x64Rotl(k1, 31)
k1 = x64Multiply(k1, c2)
h1 = x64Xor(h1, k1)
h1 = x64Rotl(h1, 27)
h1 = x64Add(h1, h2)
h1 = x64Add(x64Multiply(h1, [0, 5]), [0, 0x52dce729])
k2 = x64Multiply(k2, c2)
k2 = x64Rotl(k2, 33)
k2 = x64Multiply(k2, c1)
h2 = x64Xor(h2, k2)
h2 = x64Rotl(h2, 31)
h2 = x64Add(h2, h1)
h2 = x64Add(x64Multiply(h2, [0, 5]), [0, 0x38495ab5])
}
k1 = [0, 0]
k2 = [0, 0]
switch (remainder) {
case 15:
k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 14)], 48))
// fallthrough
case 14:
k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 13)], 40))
// fallthrough
case 13:
k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 12)], 32))
// fallthrough
case 12:
k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 11)], 24))
// fallthrough
case 11:
k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 10)], 16))
// fallthrough
case 10:
k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 9)], 8))
// fallthrough
case 9:
k2 = x64Xor(k2, [0, key.charCodeAt(i + 8)])
k2 = x64Multiply(k2, c2)
k2 = x64Rotl(k2, 33)
k2 = x64Multiply(k2, c1)
h2 = x64Xor(h2, k2)
// fallthrough
case 8:
k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 7)], 56))
// fallthrough
case 7:
k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 6)], 48))
// fallthrough
case 6:
k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 5)], 40))
// fallthrough
case 5:
k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 4)], 32))
// fallthrough
case 4:
k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 3)], 24))
// fallthrough
case 3:
k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 2)], 16))
// fallthrough
case 2:
k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 1)], 8))
// fallthrough
case 1:
k1 = x64Xor(k1, [0, key.charCodeAt(i)])
k1 = x64Multiply(k1, c1)
k1 = x64Rotl(k1, 31)
k1 = x64Multiply(k1, c2)
h1 = x64Xor(h1, k1)
// fallthrough
}
h1 = x64Xor(h1, [0, key.length])
h2 = x64Xor(h2, [0, key.length])
h1 = x64Add(h1, h2)
h2 = x64Add(h2, h1)
h1 = x64Fmix(h1)
h2 = x64Fmix(h2)
h1 = x64Add(h1, h2)
h2 = x64Add(h2, h1)
return ('00000000' + (h1[0] >>> 0).toString(16)).slice(-8) + ('00000000' + (h1[1] >>> 0).toString(16)).slice(-8) + ('00000000' + (h2[0] >>> 0).toString(16)).slice(-8) + ('00000000' + (h2[1] >>> 0).toString(16)).slice(-8)
}
var defaultOptions = {
preprocessor: null,
audio: {
timeout: 1000,
// On iOS 11, audio context can only be used in response to user interaction.
// We require users to explicitly enable audio fingerprinting on iOS 11.
// See https://stackoverflow.com/questions/46363048/onaudioprocess-not-called-on-ios11#46534088
excludeIOS11: true
},
fonts: {
swfContainerId: 'fingerprintjs2',
swfPath: 'flash/compiled/FontList.swf',
userDefinedFonts: [],
extendedJsFonts: false
},
screen: {
// To ensure consistent fingerprints when users rotate their mobile devices
detectScreenOrientation: true
},
plugins: {
sortPluginsFor: [/palemoon/i],
excludeIE: false
},
extraComponents: [],
excludes: {
// Unreliable on Windows, see https://github.com/Valve/fingerprintjs2/issues/375
'enumerateDevices': true,
// devicePixelRatio depends on browser zoom, and it's impossible to detect browser zoom
'pixelRatio': true,
// DNT depends on incognito mode for some browsers (Chrome) and it's impossible to detect incognito mode
'doNotTrack': true,
// uses js fonts already
'fontsFlash': true
},
NOT_AVAILABLE: 'not available',
ERROR: 'error',
EXCLUDED: 'excluded'
}
var each = function (obj, iterator) {
if (Array.prototype.forEach && obj.forEach === Array.prototype.forEach) {
obj.forEach(iterator)
} else if (obj.length === +obj.length) {
for (var i = 0, l = obj.length; i < l; i++) {
iterator(obj[i], i, obj)
}
} else {
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
iterator(obj[key], key, obj)
}
}
}
}
var map = function (obj, iterator) {
var results = []
// Not using strict equality so that this acts as a
// shortcut to checking for `null` and `undefined`.
if (obj == null) {
return results
}
if (Array.prototype.map && obj.map === Array.prototype.map) { return obj.map(iterator) }
each(obj, function (value, index, list) {
results.push(iterator(value, index, list))
})
return results
}
var extendSoft = function (target, source) {
if (source == null) { return target }
var value
var key
for (key in source) {
value = source[key]
if (value != null && !(Object.prototype.hasOwnProperty.call(target, key))) {
target[key] = value
}
}
return target
}
// https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices
var enumerateDevicesKey = function (done, options) {
if (!isEnumerateDevicesSupported()) {
return done(options.NOT_AVAILABLE)
}
navigator.mediaDevices.enumerateDevices().then(function (devices) {
done(devices.map(function (device) {
return 'id=' + device.deviceId + ';gid=' + device.groupId + ';' + device.kind + ';' + device.label
}))
})
.catch(function (error) {
done(error)
})
}
var isEnumerateDevicesSupported = function () {
return (navigator.mediaDevices && navigator.mediaDevices.enumerateDevices)
}
// Inspired by and based on https://github.com/cozylife/audio-fingerprint
var audioKey = function (done, options) {
var audioOptions = options.audio
if (audioOptions.excludeIOS11 && navigator.userAgent.match(/OS 11.+Version\/11.+Safari/)) {
// See comment for excludeUserAgent and https://stackoverflow.com/questions/46363048/onaudioprocess-not-called-on-ios11#46534088
return done(options.EXCLUDED)
}
var AudioContext = window.OfflineAudioContext || window.webkitOfflineAudioContext
if (AudioContext == null) {
return done(options.NOT_AVAILABLE)
}
var context = new AudioContext(1, 44100, 44100)
var oscillator = context.createOscillator()
oscillator.type = 'triangle'
oscillator.frequency.setValueAtTime(10000, context.currentTime)
var compressor = context.createDynamicsCompressor()
each([
['threshold', -50],
['knee', 40],
['ratio', 12],
['reduction', -20],
['attack', 0],
['release', 0.25]
], function (item) {
if (compressor[item[0]] !== undefined && typeof compressor[item[0]].setValueAtTime === 'function') {
compressor[item[0]].setValueAtTime(item[1], context.currentTime)
}
})
oscillator.connect(compressor)
compressor.connect(context.destination)
oscillator.start(0)
context.startRendering()
var audioTimeoutId = setTimeout(function () {
console.warn('Audio fingerprint timed out. Please report bug at https://github.com/Valve/fingerprintjs2 with your user agent: "' + navigator.userAgent + '".')
context.oncomplete = function () { }
context = null
return done('audioTimeout')
}, audioOptions.timeout)
context.oncomplete = function (event) {
var fingerprint
try {
clearTimeout(audioTimeoutId)
fingerprint = event.renderedBuffer.getChannelData(0)
.slice(4500, 5000)
.reduce(function (acc, val) { return acc + Math.abs(val) }, 0)
.toString()
oscillator.disconnect()
compressor.disconnect()
} catch (error) {
done(error)
return
}
done(fingerprint)
}
}
var UserAgent = function (done) {
done(navigator.userAgent)
}
var webdriver = function (done, options) {
done(navigator.webdriver == null ? options.NOT_AVAILABLE : navigator.webdriver)
}
var languageKey = function (done, options) {
done(navigator.language || navigator.userLanguage || navigator.browserLanguage || navigator.systemLanguage || options.NOT_AVAILABLE)
}
var colorDepthKey = function (done, options) {
done(window.screen.colorDepth || options.NOT_AVAILABLE)
}
var deviceMemoryKey = function (done, options) {
done(navigator.deviceMemory || options.NOT_AVAILABLE)
}
var pixelRatioKey = function (done, options) {
done(window.devicePixelRatio || options.NOT_AVAILABLE)
}
var screenResolutionKey = function (done, options) {
done(getScreenResolution(options))
}
var getScreenResolution = function (options) {
var resolution = [window.screen.width, window.screen.height]
if (options.screen.detectScreenOrientation) {
resolution.sort().reverse()
}
return resolution
}
var availableScreenResolutionKey = function (done, options) {
done(getAvailableScreenResolution(options))
}
var getAvailableScreenResolution = function (options) {
if (window.screen.availWidth && window.screen.availHeight) {
var available = [window.screen.availHeight, window.screen.availWidth]
if (options.screen.detectScreenOrientation) {
available.sort().reverse()
}
return available
}
// headless browsers
return options.NOT_AVAILABLE
}
var timezoneOffset = function (done) {
done(new Date().getTimezoneOffset())
}
var timezone = function (done, options) {
if (window.Intl && window.Intl.DateTimeFormat) {
done(new window.Intl.DateTimeFormat().resolvedOptions().timeZone)
return
}
done(options.NOT_AVAILABLE)
}
var sessionStorageKey = function (done, options) {
done(hasSessionStorage(options))
}
var localStorageKey = function (done, options) {
done(hasLocalStorage(options))
}
var indexedDbKey = function (done, options) {
done(hasIndexedDB(options))
}
var addBehaviorKey = function (done) {
// body might not be defined at this point or removed programmatically
done(!!(document.body && document.body.addBehavior))
}
var openDatabaseKey = function (done) {
done(!!window.openDatabase)
}
var cpuClassKey = function (done, options) {
done(getNavigatorCpuClass(options))
}
var platformKey = function (done, options) {
done(getNavigatorPlatform(options))
}
var doNotTrackKey = function (done, options) {
done(getDoNotTrack(options))
}
var canvasKey = function (done, options) {
if (isCanvasSupported()) {
done(getCanvasFp(options))
return
}
done(options.NOT_AVAILABLE)
}
var webglKey = function (done, options) {
if (isWebGlSupported()) {
done(getWebglFp())
return
}
done(options.NOT_AVAILABLE)
}
var webglVendorAndRendererKey = function (done) {
if (isWebGlSupported()) {
done(getWebglVendorAndRenderer())
return
}
done()
}
var adBlockKey = function (done) {
done(getAdBlock())
}
var hasLiedLanguagesKey = function (done) {
done(getHasLiedLanguages())
}
var hasLiedResolutionKey = function (done) {
done(getHasLiedResolution())
}
var hasLiedOsKey = function (done) {
done(getHasLiedOs())
}
var hasLiedBrowserKey = function (done) {
done(getHasLiedBrowser())
}
// flash fonts (will increase fingerprinting time 20X to ~ 130-150ms)
var flashFontsKey = function (done, options) {
// we do flash if swfobject is loaded
if (!hasSwfObjectLoaded()) {
return done('swf object not loaded')
}
if (!hasMinFlashInstalled()) {
return done('flash not installed')
}
if (!options.fonts.swfPath) {
return done('missing options.fonts.swfPath')
}
loadSwfAndDetectFonts(function (fonts) {
done(fonts)
}, options)
}
// kudos to http://www.lalit.org/lab/javascript-css-font-detect/
var jsFontsKey = function (done, options) {
// a font will be compared against all the three default fonts.
// and if it doesn't match all 3 then that font is not available.
var baseFonts = ['monospace', 'sans-serif', 'serif']
var fontList = [
'Andale Mono', 'Arial', 'Arial Black', 'Arial Hebrew', 'Arial MT', 'Arial Narrow', 'Arial Rounded MT Bold', 'Arial Unicode MS',
'Bitstream Vera Sans Mono', 'Book Antiqua', 'Bookman Old Style',
'Calibri', 'Cambria', 'Cambria Math', 'Century', 'Century Gothic', 'Century Schoolbook', 'Comic Sans', 'Comic Sans MS', 'Consolas', 'Courier', 'Courier New',
'Geneva', 'Georgia',
'Helvetica', 'Helvetica Neue',
'Impact',
'Lucida Bright', 'Lucida Calligraphy', 'Lucida Console', 'Lucida Fax', 'LUCIDA GRANDE', 'Lucida Handwriting', 'Lucida Sans', 'Lucida Sans Typewriter', 'Lucida Sans Unicode',
'Microsoft Sans Serif', 'Monaco', 'Monotype Corsiva', 'MS Gothic', 'MS Outlook', 'MS PGothic', 'MS Reference Sans Serif', 'MS Sans Serif', 'MS Serif', 'MYRIAD', 'MYRIAD PRO',
'Palatino', 'Palatino Linotype',
'Segoe Print', 'Segoe Script', 'Segoe UI', 'Segoe UI Light', 'Segoe UI Semibold', 'Segoe UI Symbol',
'Tahoma', 'Times', 'Times New Roman', 'Times New Roman PS', 'Trebuchet MS',
'Verdana', 'Wingdings', 'Wingdings 2', 'Wingdings 3'
]
if (options.fonts.extendedJsFonts) {
var extendedFontList = [
'Abadi MT Condensed Light', 'Academy Engraved LET', 'ADOBE CASLON PRO', 'Adobe Garamond', 'ADOBE GARAMOND PRO', 'Agency FB', 'Aharoni', 'Albertus Extra Bold', 'Albertus Medium', 'Algerian', 'Amazone BT', 'American Typewriter',
'American Typewriter Condensed', 'AmerType Md BT', 'Andalus', 'Angsana New', 'AngsanaUPC', 'Antique Olive', 'Aparajita', 'Apple Chancery', 'Apple Color Emoji', 'Apple SD Gothic Neo', 'Arabic Typesetting', 'ARCHER',
'ARNO PRO', 'Arrus BT', 'Aurora Cn BT', 'AvantGarde Bk BT', 'AvantGarde Md BT', 'AVENIR', 'Ayuthaya', 'Bandy', 'Bangla Sangam MN', 'Bank Gothic', 'BankGothic Md BT', 'Baskerville',
'Baskerville Old Face', 'Batang', 'BatangChe', 'Bauer Bodoni', 'Bauhaus 93', 'Bazooka', 'Bell MT', 'Bembo', 'Benguiat Bk BT', 'Berlin Sans FB', 'Berlin Sans FB Demi', 'Bernard MT Condensed', 'BernhardFashion BT', 'BernhardMod BT', 'Big Caslon', 'BinnerD',
'Blackadder ITC', 'BlairMdITC TT', 'Bodoni 72', 'Bodoni 72 Oldstyle', 'Bodoni 72 Smallcaps', 'Bodoni MT', 'Bodoni MT Black', 'Bodoni MT Condensed', 'Bodoni MT Poster Compressed',
'Bookshelf Symbol 7', 'Boulder', 'Bradley Hand', 'Bradley Hand ITC', 'Bremen Bd BT', 'Britannic Bold', 'Broadway', 'Browallia New', 'BrowalliaUPC', 'Brush Script MT', 'Californian FB', 'Calisto MT', 'Calligrapher', 'Candara',
'CaslonOpnface BT', 'Castellar', 'Centaur', 'Cezanne', 'CG Omega', 'CG Times', 'Chalkboard', 'Chalkboard SE', 'Chalkduster', 'Charlesworth', 'Charter Bd BT', 'Charter BT', 'Chaucer',
'ChelthmITC Bk BT', 'Chiller', 'Clarendon', 'Clarendon Condensed', 'CloisterBlack BT', 'Cochin', 'Colonna MT', 'Constantia', 'Cooper Black', 'Copperplate', 'Copperplate Gothic', 'Copperplate Gothic Bold',
'Copperplate Gothic Light', 'CopperplGoth Bd BT', 'Corbel', 'Cordia New', 'CordiaUPC', 'Cornerstone', 'Coronet', 'Cuckoo', 'Curlz MT', 'DaunPenh', 'Dauphin', 'David', 'DB LCD Temp', 'DELICIOUS', 'Denmark',
'DFKai-SB', 'Didot', 'DilleniaUPC', 'DIN', 'DokChampa', 'Dotum', 'DotumChe', 'Ebrima', 'Edwardian Script ITC', 'Elephant', 'English 111 Vivace BT', 'Engravers MT', 'EngraversGothic BT', 'Eras Bold ITC', 'Eras Demi ITC', 'Eras Light ITC', 'Eras Medium ITC',
'EucrosiaUPC', 'Euphemia', 'Euphemia UCAS', 'EUROSTILE', 'Exotc350 Bd BT', 'FangSong', 'Felix Titling', 'Fixedsys', 'FONTIN', 'Footlight MT Light', 'Forte',
'FrankRuehl', 'Fransiscan', 'Freefrm721 Blk BT', 'FreesiaUPC', 'Freestyle Script', 'French Script MT', 'FrnkGothITC Bk BT', 'Fruitger', 'FRUTIGER',
'Futura', 'Futura Bk BT', 'Futura Lt BT', 'Futura Md BT', 'Futura ZBlk BT', 'FuturaBlack BT', 'Gabriola', 'Galliard BT', 'Gautami', 'Geeza Pro', 'Geometr231 BT', 'Geometr231 Hv BT', 'Geometr231 Lt BT', 'GeoSlab 703 Lt BT',
'GeoSlab 703 XBd BT', 'Gigi', 'Gill Sans', 'Gill Sans MT', 'Gill Sans MT Condensed', 'Gill Sans MT Ext Condensed Bold', 'Gill Sans Ultra Bold', 'Gill Sans Ultra Bold Condensed', 'Gisha', 'Gloucester MT Extra Condensed', 'GOTHAM', 'GOTHAM BOLD',
'Goudy Old Style', 'Goudy Stout', 'GoudyHandtooled BT', 'GoudyOLSt BT', 'Gujarati Sangam MN', 'Gulim', 'GulimChe', 'Gungsuh', 'GungsuhChe', 'Gurmukhi MN', 'Haettenschweiler', 'Harlow Solid Italic', 'Harrington', 'Heather', 'Heiti SC', 'Heiti TC', 'HELV',
'Herald', 'High Tower Text', 'Hiragino Kaku Gothic ProN', 'Hiragino Mincho ProN', 'Hoefler Text', 'Humanst 521 Cn BT', 'Humanst521 BT', 'Humanst521 Lt BT', 'Imprint MT Shadow', 'Incised901 Bd BT', 'Incised901 BT',
'Incised901 Lt BT', 'INCONSOLATA', 'Informal Roman', 'Informal011 BT', 'INTERSTATE', 'IrisUPC', 'Iskoola Pota', 'JasmineUPC', 'Jazz LET', 'Jenson', 'Jester', 'Jokerman', 'Juice ITC', 'Kabel Bk BT', 'Kabel Ult BT', 'Kailasa', 'KaiTi', 'Kalinga', 'Kannada Sangam MN',
'Kartika', 'Kaufmann Bd BT', 'Kaufmann BT', 'Khmer UI', 'KodchiangUPC', 'Kokila', 'Korinna BT', 'Kristen ITC', 'Krungthep', 'Kunstler Script', 'Lao UI', 'Latha', 'Leelawadee', 'Letter Gothic', 'Levenim MT', 'LilyUPC', 'Lithograph', 'Lithograph Light', 'Long Island',
'Lydian BT', 'Magneto', 'Maiandra GD', 'Malayalam Sangam MN', 'Malgun Gothic',
'Mangal', 'Marigold', 'Marion', 'Marker Felt', 'Market', 'Marlett', 'Matisse ITC', 'Matura MT Script Capitals', 'Meiryo', 'Meiryo UI', 'Microsoft Himalaya', 'Microsoft JhengHei', 'Microsoft New Tai Lue', 'Microsoft PhagsPa', 'Microsoft Tai Le',
'Microsoft Uighur', 'Microsoft YaHei', 'Microsoft Yi Baiti', 'MingLiU', 'MingLiU_HKSCS', 'MingLiU_HKSCS-ExtB', 'MingLiU-ExtB', 'Minion', 'Minion Pro', 'Miriam', 'Miriam Fixed', 'Mistral', 'Modern', 'Modern No. 20', 'Mona Lisa Solid ITC TT', 'Mongolian Baiti',
'MONO', 'MoolBoran', 'Mrs Eaves', 'MS LineDraw', 'MS Mincho', 'MS PMincho', 'MS Reference Specialty', 'MS UI Gothic', 'MT Extra', 'MUSEO', 'MV Boli',
'Nadeem', 'Narkisim', 'NEVIS', 'News Gothic', 'News GothicMT', 'NewsGoth BT', 'Niagara Engraved', 'Niagara Solid', 'Noteworthy', 'NSimSun', 'Nyala', 'OCR A Extended', 'Old Century', 'Old English Text MT', 'Onyx', 'Onyx BT', 'OPTIMA', 'Oriya Sangam MN',
'OSAKA', 'OzHandicraft BT', 'Palace Script MT', 'Papyrus', 'Parchment', 'Party LET', 'Pegasus', 'Perpetua', 'Perpetua Titling MT', 'PetitaBold', 'Pickwick', 'Plantagenet Cherokee', 'Playbill', 'PMingLiU', 'PMingLiU-ExtB',
'Poor Richard', 'Poster', 'PosterBodoni BT', 'PRINCETOWN LET', 'Pristina', 'PTBarnum BT', 'Pythagoras', 'Raavi', 'Rage Italic', 'Ravie', 'Ribbon131 Bd BT', 'Rockwell', 'Rockwell Condensed', 'Rockwell Extra Bold', 'Rod', 'Roman', 'Sakkal Majalla',
'Santa Fe LET', 'Savoye LET', 'Sceptre', 'Script', 'Script MT Bold', 'SCRIPTINA', 'Serifa', 'Serifa BT', 'Serifa Th BT', 'ShelleyVolante BT', 'Sherwood',
'Shonar Bangla', 'Showcard Gothic', 'Shruti', 'Signboard', 'SILKSCREEN', 'SimHei', 'Simplified Arabic', 'Simplified Arabic Fixed', 'SimSun', 'SimSun-ExtB', 'Sinhala Sangam MN', 'Sketch Rockwell', 'Skia', 'Small Fonts', 'Snap ITC', 'Snell Roundhand', 'Socket',
'Souvenir Lt BT', 'Staccato222 BT', 'Steamer', 'Stencil', 'Storybook', 'Styllo', 'Subway', 'Swis721 BlkEx BT', 'Swiss911 XCm BT', 'Sylfaen', 'Synchro LET', 'System', 'Tamil Sangam MN', 'Technical', 'Teletype', 'Telugu Sangam MN', 'Tempus Sans ITC',
'Terminal', 'Thonburi', 'Traditional Arabic', 'Trajan', 'TRAJAN PRO', 'Tristan', 'Tubular', 'Tunga', 'Tw Cen MT', 'Tw Cen MT Condensed', 'Tw Cen MT Condensed Extra Bold',
'TypoUpright BT', 'Unicorn', 'Univers', 'Univers CE 55 Medium', 'Univers Condensed', 'Utsaah', 'Vagabond', 'Vani', 'Vijaya', 'Viner Hand ITC', 'VisualUI', 'Vivaldi', 'Vladimir Script', 'Vrinda', 'Westminster', 'WHITNEY', 'Wide Latin',
'ZapfEllipt BT', 'ZapfHumnst BT', 'ZapfHumnst Dm BT', 'Zapfino', 'Zurich BlkEx BT', 'Zurich Ex BT', 'ZWAdobeF']
fontList = fontList.concat(extendedFontList)
}
fontList = fontList.concat(options.fonts.userDefinedFonts)
// remove duplicate fonts
fontList = fontList.filter(function (font, position) {
return fontList.indexOf(font) === position
})
// we use m or w because these two characters take up the maximum width.
// And we use a LLi so that the same matching fonts can get separated
var testString = 'mmmmmmmmmmlli'
// we test using 72px font size, we may use any size. I guess larger the better.
var testSize = '72px'
var h = document.getElementsByTagName('body')[0]
// div to load spans for the base fonts
var baseFontsDiv = document.createElement('div')
// div to load spans for the fonts to detect
var fontsDiv = document.createElement('div')
var defaultWidth = {}
var defaultHeight = {}
// creates a span where the fonts will be loaded
var createSpan = function () {
var s = document.createElement('span')
/*
* We need this css as in some weird browser this
* span elements shows up for a microSec which creates a
* bad user experience
*/
s.style.position = 'absolute'
s.style.left = '-9999px'
s.style.fontSize = testSize
// css font reset to reset external styles
s.style.fontStyle = 'normal'
s.style.fontWeight = 'normal'
s.style.letterSpacing = 'normal'
s.style.lineBreak = 'auto'
s.style.lineHeight = 'normal'
s.style.textTransform = 'none'
s.style.textAlign = 'left'
s.style.textDecoration = 'none'
s.style.textShadow = 'none'
s.style.whiteSpace = 'normal'
s.style.wordBreak = 'normal'
s.style.wordSpacing = 'normal'
s.innerHTML = testString
return s
}
// creates a span and load the font to detect and a base font for fallback
var createSpanWithFonts = function (fontToDetect, baseFont) {
var s = createSpan()
s.style.fontFamily = "'" + fontToDetect + "'," + baseFont
return s
}
// creates spans for the base fonts and adds them to baseFontsDiv
var initializeBaseFontsSpans = function () {
var spans = []
for (var index = 0, length = baseFonts.length; index < length; index++) {
var s = createSpan()
s.style.fontFamily = baseFonts[index]