Socket
Socket
Sign inDemoInstall

clientjs

Package Overview
Dependencies
16
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.11 to 0.2.0

CHANGELOG.md

95

dist/client.min.js

@@ -1,81 +0,14 @@

(function(f){var d,e,p=function(){d=(new (window.UAParser||exports.UAParser)).getResult();e=new Detector;return this};p.prototype={getSoftwareVersion:function(){return"0.1.11"},getBrowserData:function(){return d},getFingerprint:function(){var b=d.ua,c=this.getScreenPrint(),a=this.getPlugins(),g=this.getFonts(),n=this.isLocalStorage(),f=this.isSessionStorage(),h=this.getTimeZone(),u=this.getLanguage(),m=this.getSystemLanguage(),e=this.isCookie(),C=this.getCanvasPrint();return murmurhash3_32_gc(b+"|"+
c+"|"+a+"|"+g+"|"+n+"|"+f+"|"+h+"|"+u+"|"+m+"|"+e+"|"+C,256)},getCustomFingerprint:function(){for(var b="",c=0;c<arguments.length;c++)b+=arguments[c]+"|";return murmurhash3_32_gc(b,256)},getUserAgent:function(){return d.ua},getUserAgentLowerCase:function(){return d.ua.toLowerCase()},getBrowser:function(){return d.browser.name},getBrowserVersion:function(){return d.browser.version},getBrowserMajorVersion:function(){return d.browser.major},isIE:function(){return/IE/i.test(d.browser.name)},isChrome:function(){return/Chrome/i.test(d.browser.name)},
isFirefox:function(){return/Firefox/i.test(d.browser.name)},isSafari:function(){return/Safari/i.test(d.browser.name)},isMobileSafari:function(){return/Mobile\sSafari/i.test(d.browser.name)},isOpera:function(){return/Opera/i.test(d.browser.name)},getEngine:function(){return d.engine.name},getEngineVersion:function(){return d.engine.version},getOS:function(){return d.os.name},getOSVersion:function(){return d.os.version},isWindows:function(){return/Windows/i.test(d.os.name)},isMac:function(){return/Mac/i.test(d.os.name)},
isLinux:function(){return/Linux/i.test(d.os.name)},isUbuntu:function(){return/Ubuntu/i.test(d.os.name)},isSolaris:function(){return/Solaris/i.test(d.os.name)},getDevice:function(){return d.device.model},getDeviceType:function(){return d.device.type},getDeviceVendor:function(){return d.device.vendor},getCPU:function(){return d.cpu.architecture},isMobile:function(){var b=d.ua||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(b)||
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(b.substr(0,
4))},isMobileMajor:function(){return this.isMobileAndroid()||this.isMobileBlackBerry()||this.isMobileIOS()||this.isMobileOpera()||this.isMobileWindows()},isMobileAndroid:function(){return d.ua.match(/Android/i)?!0:!1},isMobileOpera:function(){return d.ua.match(/Opera Mini/i)?!0:!1},isMobileWindows:function(){return d.ua.match(/IEMobile/i)?!0:!1},isMobileBlackBerry:function(){return d.ua.match(/BlackBerry/i)?!0:!1},isMobileIOS:function(){return d.ua.match(/iPhone|iPad|iPod/i)?!0:!1},isIphone:function(){return d.ua.match(/iPhone/i)?
!0:!1},isIpad:function(){return d.ua.match(/iPad/i)?!0:!1},isIpod:function(){return d.ua.match(/iPod/i)?!0:!1},getScreenPrint:function(){return"Current Resolution: "+this.getCurrentResolution()+", Available Resolution: "+this.getAvailableResolution()+", Color Depth: "+this.getColorDepth()+", Device XDPI: "+this.getDeviceXDPI()+", Device YDPI: "+this.getDeviceYDPI()},getColorDepth:function(){return screen.colorDepth},getCurrentResolution:function(){return screen.width+"x"+screen.height},getAvailableResolution:function(){return screen.availWidth+
"x"+screen.availHeight},getDeviceXDPI:function(){return screen.deviceXDPI},getDeviceYDPI:function(){return screen.deviceYDPI},getPlugins:function(){for(var b="",c=0;c<navigator.plugins.length;c++)b=c==navigator.plugins.length-1?b+navigator.plugins[c].name:b+(navigator.plugins[c].name+", ");return b},isJava:function(){return navigator.javaEnabled()},getJavaVersion:function(){return deployJava.getJREs().toString()},isFlash:function(){return navigator.plugins["Shockwave Flash"]?!0:!1},getFlashVersion:function(){return this.isFlash()?
(objPlayerVersion=swfobject.getFlashPlayerVersion(),objPlayerVersion.major+"."+objPlayerVersion.minor+"."+objPlayerVersion.release):""},isSilverlight:function(){return navigator.plugins["Silverlight Plug-In"]?!0:!1},getSilverlightVersion:function(){return this.isSilverlight()?navigator.plugins["Silverlight Plug-In"].description:""},isMimeTypes:function(){return navigator.mimeTypes.length?!0:!1},getMimeTypes:function(){for(var b="",c=0;c<navigator.mimeTypes.length;c++)b=c==navigator.mimeTypes.length-
1?b+navigator.mimeTypes[c].description:b+(navigator.mimeTypes[c].description+", ");return b},isFont:function(b){return e.detect(b)},getFonts:function(){for(var b="Abadi MT Condensed Light;Adobe Fangsong Std;Adobe Hebrew;Adobe Ming Std;Agency FB;Aharoni;Andalus;Angsana New;AngsanaUPC;Aparajita;Arab;Arabic Transparent;Arabic Typesetting;Arial Baltic;Arial Black;Arial CE;Arial CYR;Arial Greek;Arial TUR;Arial;Batang;BatangChe;Bauhaus 93;Bell MT;Bitstream Vera Serif;Bodoni MT;Bookman Old Style;Braggadocio;Broadway;Browallia New;BrowalliaUPC;Calibri Light;Calibri;Californian FB;Cambria Math;Cambria;Candara;Castellar;Casual;Centaur;Century Gothic;Chalkduster;Colonna MT;Comic Sans MS;Consolas;Constantia;Copperplate Gothic Light;Corbel;Cordia New;CordiaUPC;Courier New Baltic;Courier New CE;Courier New CYR;Courier New Greek;Courier New TUR;Courier New;DFKai-SB;DaunPenh;David;DejaVu LGC Sans Mono;Desdemona;DilleniaUPC;DokChampa;Dotum;DotumChe;Ebrima;Engravers MT;Eras Bold ITC;Estrangelo Edessa;EucrosiaUPC;Euphemia;Eurostile;FangSong;Forte;FrankRuehl;Franklin Gothic Heavy;Franklin Gothic Medium;FreesiaUPC;French Script MT;Gabriola;Gautami;Georgia;Gigi;Gisha;Goudy Old Style;Gulim;GulimChe;GungSeo;Gungsuh;GungsuhChe;Haettenschweiler;Harrington;Hei S;HeiT;Heisei Kaku Gothic;Hiragino Sans GB;Impact;Informal Roman;IrisUPC;Iskoola Pota;JasmineUPC;KacstOne;KaiTi;Kalinga;Kartika;Khmer UI;Kino MT;KodchiangUPC;Kokila;Kozuka Gothic Pr6N;Lao UI;Latha;Leelawadee;Levenim MT;LilyUPC;Lohit Gujarati;Loma;Lucida Bright;Lucida Console;Lucida Fax;Lucida Sans Unicode;MS Gothic;MS Mincho;MS PGothic;MS PMincho;MS Reference Sans Serif;MS UI Gothic;MV Boli;Magneto;Malgun Gothic;Mangal;Marlett;Matura MT Script Capitals;Meiryo UI;Meiryo;Menlo;Microsoft Himalaya;Microsoft JhengHei;Microsoft New Tai Lue;Microsoft PhagsPa;Microsoft Sans Serif;Microsoft Tai Le;Microsoft Uighur;Microsoft YaHei;Microsoft Yi Baiti;MingLiU;MingLiU-ExtB;MingLiU_HKSCS;MingLiU_HKSCS-ExtB;Miriam Fixed;Miriam;Mongolian Baiti;MoolBoran;NSimSun;Narkisim;News Gothic MT;Niagara Solid;Nyala;PMingLiU;PMingLiU-ExtB;Palace Script MT;Palatino Linotype;Papyrus;Perpetua;Plantagenet Cherokee;Playbill;Prelude Bold;Prelude Condensed Bold;Prelude Condensed Medium;Prelude Medium;PreludeCompressedWGL Black;PreludeCompressedWGL Bold;PreludeCompressedWGL Light;PreludeCompressedWGL Medium;PreludeCondensedWGL Black;PreludeCondensedWGL Bold;PreludeCondensedWGL Light;PreludeCondensedWGL Medium;PreludeWGL Black;PreludeWGL Bold;PreludeWGL Light;PreludeWGL Medium;Raavi;Rachana;Rockwell;Rod;Sakkal Majalla;Sawasdee;Script MT Bold;Segoe Print;Segoe Script;Segoe UI Light;Segoe UI Semibold;Segoe UI Symbol;Segoe UI;Shonar Bangla;Showcard Gothic;Shruti;SimHei;SimSun;SimSun-ExtB;Simplified Arabic Fixed;Simplified Arabic;Snap ITC;Sylfaen;Symbol;Tahoma;Times New Roman Baltic;Times New Roman CE;Times New Roman CYR;Times New Roman Greek;Times New Roman TUR;Times New Roman;TlwgMono;Traditional Arabic;Trebuchet MS;Tunga;Tw Cen MT Condensed Extra Bold;Ubuntu;Umpush;Univers;Utopia;Utsaah;Vani;Verdana;Vijaya;Vladimir Script;Vrinda;Webdings;Wide Latin;Wingdings".split(";"),
c="",a=0;a<b.length;a++)e.detect(b[a])&&(c=a==b.length-1?c+b[a]:c+(b[a]+", "));return c},isLocalStorage:function(){try{return!!f.localStorage}catch(b){return!0}},isSessionStorage:function(){try{return!!f.sessionStorage}catch(b){return!0}},isCookie:function(){return navigator.cookieEnabled},getTimeZone:function(){return String(String(new Date).split("(")[1]).split(")")[0]},getLanguage:function(){return navigator.language},getSystemLanguage:function(){return navigator.systemLanguage},isCanvas:function(){var b=
document.createElement("canvas");try{return!(!b.getContext||!b.getContext("2d"))}catch(c){return!1}},getCanvasPrint:function(){var b=document.createElement("canvas"),c;try{c=b.getContext("2d")}catch(a){return""}c.textBaseline="top";c.font="14px 'Arial'";c.textBaseline="alphabetic";c.fillStyle="#f60";c.fillRect(125,1,62,20);c.fillStyle="#069";c.fillText("ClientJS,org <canvas> 1.0",2,15);c.fillStyle="rgba(102, 204, 0, 0.7)";c.fillText("ClientJS,org <canvas> 1.0",4,17);return b.toDataURL()}};"object"===
typeof module&&"undefined"!==typeof exports&&(module.exports=p);f.ClientJS=p})(window);var deployJava=function(){function f(a){c.debug&&(console.log?console.log(a):alert(a))}function d(a){if(null==a||0==a.length)return"http://java.com/dt-redirect";"&"==a.charAt(0)&&(a=a.substring(1,a.length));return"http://java.com/dt-redirect?"+a}var e=["id","class","title","style"];"classid codebase codetype data type archive declare standby height width usemap name tabindex align border hspace vspace".split(" ").concat(e,["lang","dir"],"onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup".split(" "));
var p="codebase code name archive object width height alt align hspace vspace".split(" ").concat(e),b;try{b=-1!=document.location.protocol.indexOf("http")?"//java.com/js/webstart.png":"http://java.com/js/webstart.png"}catch(a){b="http://java.com/js/webstart.png"}var c={debug:null,version:"20120801",firefoxJavaVersion:null,myInterval:null,preInstallJREList:null,returnPage:null,brand:null,locale:null,installType:null,EAInstallEnabled:!1,EarlyAccessURL:null,oldMimeType:"application/npruntime-scriptable-plugin;DeploymentToolkit",
mimeType:"application/java-deployment-toolkit",launchButtonPNG:b,browserName:null,browserName2:null,getJREs:function(){var a=[];if(this.isPluginInstalled())for(var g=this.getPlugin().jvms,b=0;b<g.getLength();b++)a[b]=g.get(b).version;else g=this.getBrowser(),"MSIE"==g?this.testUsingActiveX("1.7.0")?a[0]="1.7.0":this.testUsingActiveX("1.6.0")?a[0]="1.6.0":this.testUsingActiveX("1.5.0")?a[0]="1.5.0":this.testUsingActiveX("1.4.2")?a[0]="1.4.2":this.testForMSVM()&&(a[0]="1.1"):"Netscape Family"==g&&(this.getJPIVersionUsingMimeType(),
null!=this.firefoxJavaVersion?a[0]=this.firefoxJavaVersion:this.testUsingMimeTypes("1.7")?a[0]="1.7.0":this.testUsingMimeTypes("1.6")?a[0]="1.6.0":this.testUsingMimeTypes("1.5")?a[0]="1.5.0":this.testUsingMimeTypes("1.4.2")?a[0]="1.4.2":"Safari"==this.browserName2&&(this.testUsingPluginsArray("1.7.0")?a[0]="1.7.0":this.testUsingPluginsArray("1.6")?a[0]="1.6.0":this.testUsingPluginsArray("1.5")?a[0]="1.5.0":this.testUsingPluginsArray("1.4.2")&&(a[0]="1.4.2")));if(this.debug)for(b=0;b<a.length;++b)f("[getJREs()] We claim to have detected Java SE "+
a[b]);return a},installJRE:function(a,g){if(this.isPluginInstalled()&&this.isAutoInstallEnabled(a)){var b=!1;if(b=this.isCallbackSupported()?this.getPlugin().installJRE(a,g):this.getPlugin().installJRE(a))this.refresh(),null!=this.returnPage&&(document.location=this.returnPage);return b}return this.installLatestJRE()},isAutoInstallEnabled:function(a){if(!this.isPluginInstalled())return!1;"undefined"==typeof a&&(a=null);if("MSIE"!=deployJava.browserName||deployJava.compareVersionToPattern(deployJava.getPlugin().version,
["10","0","0"],!1,!0))a=!0;else if(null==a)a=!1;else{var g="1.6.0_33+";if(null==g||0==g.length)a=!0;else{var b=g.charAt(g.length-1);"+"!=b&&"*"!=b&&-1!=g.indexOf("_")&&"_"!=b&&(g+="*",b="*");g=g.substring(0,g.length-1);if(0<g.length){var c=g.charAt(g.length-1);if("."==c||"_"==c)g=g.substring(0,g.length-1)}a="*"==b?0==a.indexOf(g):"+"==b?g<=a:!1}a=!a}return a},isCallbackSupported:function(){return this.isPluginInstalled()&&this.compareVersionToPattern(this.getPlugin().version,["10","2","0"],!1,!0)},
installLatestJRE:function(a){if(this.isPluginInstalled()&&this.isAutoInstallEnabled()){var g=!1;if(g=this.isCallbackSupported()?this.getPlugin().installLatestJRE(a):this.getPlugin().installLatestJRE())this.refresh(),null!=this.returnPage&&(document.location=this.returnPage);return g}a=this.getBrowser();g=navigator.platform.toLowerCase();if("true"==this.EAInstallEnabled&&-1!=g.indexOf("win")&&null!=this.EarlyAccessURL)this.preInstallJREList=this.getJREs(),null!=this.returnPage&&(this.myInterval=setInterval("deployJava.poll()",
3E3)),location.href=this.EarlyAccessURL;else{if("MSIE"==a)return this.IEInstall();if("Netscape Family"==a&&-1!=g.indexOf("win32"))return this.FFInstall();location.href=d((null!=this.returnPage?"&returnPage="+this.returnPage:"")+(null!=this.locale?"&locale="+this.locale:"")+(null!=this.brand?"&brand="+this.brand:""))}return!1},runApplet:function(a,g,b){if("undefined"==b||null==b)b="1.1";var c=b.match("^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$");null==this.returnPage&&(this.returnPage=document.location);
null!=c?"?"!=this.getBrowser()?this.versionCheck(b+"+")?this.writeAppletTag(a,g):this.installJRE(b+"+")&&(this.refresh(),location.href=document.location,this.writeAppletTag(a,g)):this.writeAppletTag(a,g):f("[runApplet()] Invalid minimumVersion argument to runApplet():"+b)},writeAppletTag:function(a,g){var b="<applet ",c="",h=!0;if(null==g||"object"!=typeof g)g={};for(var d in a){var m;a:{m=d.toLowerCase();for(var f=p.length,e=0;e<f;e++)if(p[e]===m){m=!0;break a}m=!1}m?(b+=" "+d+'="'+a[d]+'"',"code"==
d&&(h=!1)):g[d]=a[d]}d=!1;for(var q in g){"codebase_lookup"==q&&(d=!0);if("object"==q||"java_object"==q||"java_code"==q)h=!1;c+='<param name="'+q+'" value="'+g[q]+'"/>'}d||(c+='<param name="codebase_lookup" value="false"/>');h&&(b+=' code="dummy"');document.write(b+">\n"+c+"\n</applet>")},versionCheck:function(a){var g=0,b=a.match("^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?(\\*|\\+)?$");if(null!=b){for(var c=a=!1,h=[],d=1;d<b.length;++d)"string"==typeof b[d]&&""!=b[d]&&(h[g]=b[d],g++);"+"==h[h.length-
1]?(c=!0,a=!1,h.length--):"*"==h[h.length-1]?(c=!1,a=!0,h.length--):4>h.length&&(c=!1,a=!0);g=this.getJREs();for(d=0;d<g.length;++d)if(this.compareVersionToPattern(g[d],h,a,c))return!0}else g="Invalid versionPattern passed to versionCheck: "+a,f("[versionCheck()] "+g),alert(g);return!1},isWebStartInstalled:function(a){if("?"==this.getBrowser())return!0;if("undefined"==a||null==a)a="1.4.2";var b=!1;null!=a.match("^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$")?b=this.versionCheck(a+"+"):(f("[isWebStartInstaller()] Invalid minimumVersion argument to isWebStartInstalled(): "+
a),b=this.versionCheck("1.4.2+"));return b},getJPIVersionUsingMimeType:function(){for(var a=0;a<navigator.mimeTypes.length;++a){var b=navigator.mimeTypes[a].type.match(/^application\/x-java-applet;jpi-version=(.*)$/);if(null!=b&&(this.firefoxJavaVersion=b[1],"Opera"!=this.browserName2))break}},launchWebStartApplication:function(a){navigator.userAgent.toLowerCase();this.getJPIVersionUsingMimeType();if(0==this.isWebStartInstalled("1.7.0")&&(0==this.installJRE("1.7.0+")||0==this.isWebStartInstalled("1.7.0")))return!1;
var b=null;document.documentURI&&(b=document.documentURI);null==b&&(b=document.URL);var c=this.getBrowser(),d;"MSIE"==c?d='<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="0" height="0"><PARAM name="launchjnlp" value="'+a+'"><PARAM name="docbase" value="'+b+'"></object>':"Netscape Family"==c&&(d='<embed type="application/x-java-applet;jpi-version='+this.firefoxJavaVersion+'" width="0" height="0" launchjnlp="'+a+'"docbase="'+b+'" />');"undefined"==document.body||null==document.body?
(document.write(d),document.location=b):(a=document.createElement("div"),a.id="div1",a.style.position="relative",a.style.left="-10000px",a.style.margin="0px auto",a.className="dynamicDiv",a.innerHTML=d,document.body.appendChild(a))},createWebStartLaunchButtonEx:function(a,b){null==this.returnPage&&(this.returnPage=a);document.write('<a href="'+("javascript:deployJava.launchWebStartApplication('"+a+"');")+'" onMouseOver="window.status=\'\'; return true;"><img src="'+this.launchButtonPNG+'" border="0" /></a>')},
createWebStartLaunchButton:function(a,b){null==this.returnPage&&(this.returnPage=a);document.write('<a href="'+("javascript:if (!deployJava.isWebStartInstalled(&quot;"+b+"&quot;)) {if (deployJava.installLatestJRE()) {if (deployJava.launch(&quot;"+a+"&quot;)) {}}} else {if (deployJava.launch(&quot;"+a+"&quot;)) {}}")+'" onMouseOver="window.status=\'\'; return true;"><img src="'+this.launchButtonPNG+'" border="0" /></a>')},launch:function(a){document.location=a;return!0},isPluginInstalled:function(){var a=
this.getPlugin();return a&&a.jvms?!0:!1},isAutoUpdateEnabled:function(){return this.isPluginInstalled()?this.getPlugin().isAutoUpdateEnabled():!1},setAutoUpdateEnabled:function(){return this.isPluginInstalled()?this.getPlugin().setAutoUpdateEnabled():!1},setInstallerType:function(a){this.installType=a;return this.isPluginInstalled()?this.getPlugin().setInstallerType(a):!1},setAdditionalPackages:function(a){return this.isPluginInstalled()?this.getPlugin().setAdditionalPackages(a):!1},setEarlyAccess:function(a){this.EAInstallEnabled=
a},isPlugin2:function(){if(this.isPluginInstalled()&&this.versionCheck("1.6.0_10+"))try{return this.getPlugin().isPlugin2()}catch(a){}return!1},allowPlugin:function(){this.getBrowser();return"Safari"!=this.browserName2&&"Opera"!=this.browserName2},getPlugin:function(){this.refresh();var a=null;this.allowPlugin()&&(a=document.getElementById("deployJavaPlugin"));return a},compareVersionToPattern:function(a,b,c,d){if(void 0==a||void 0==b)return!1;var h=a.match("^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$");
if(null!=h){var f=0;a=[];for(var m=1;m<h.length;++m)"string"==typeof h[m]&&""!=h[m]&&(a[f]=h[m],f++);h=Math.min(a.length,b.length);if(d){for(m=0;m<h;++m){if(a[m]<b[m])return!1;if(a[m]>b[m])break}return!0}for(m=0;m<h;++m)if(a[m]!=b[m])return!1;return c?!0:a.length==b.length}return!1},getBrowser:function(){if(null==this.browserName){var a=navigator.userAgent.toLowerCase();f("[getBrowser()] navigator.userAgent.toLowerCase() -> "+a);-1!=a.indexOf("msie")&&-1==a.indexOf("opera")?this.browserName2=this.browserName=
"MSIE":-1!=a.indexOf("iphone")?(this.browserName="Netscape Family",this.browserName2="iPhone"):-1!=a.indexOf("firefox")&&-1==a.indexOf("opera")?(this.browserName="Netscape Family",this.browserName2="Firefox"):-1!=a.indexOf("chrome")?(this.browserName="Netscape Family",this.browserName2="Chrome"):-1!=a.indexOf("safari")?(this.browserName="Netscape Family",this.browserName2="Safari"):-1!=a.indexOf("mozilla")&&-1==a.indexOf("opera")?(this.browserName="Netscape Family",this.browserName2="Other"):-1!=
a.indexOf("opera")?(this.browserName="Netscape Family",this.browserName2="Opera"):(this.browserName="?",this.browserName2="unknown");f("[getBrowser()] Detected browser name:"+this.browserName+", "+this.browserName2)}return this.browserName},testUsingActiveX:function(a){a="JavaWebStart.isInstalled."+a+".0";if("undefined"==typeof ActiveXObject||!ActiveXObject)return f("[testUsingActiveX()] Browser claims to be IE, but no ActiveXObject object?"),!1;try{return null!=new ActiveXObject(a)}catch(b){return!1}},
testForMSVM:function(){if("undefined"!=typeof oClientCaps){var a=oClientCaps.getComponentVersion("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}","ComponentID");return""==a||"5,0,5000,0"==a?!1:!0}return!1},testUsingMimeTypes:function(a){if(!navigator.mimeTypes)return f("[testUsingMimeTypes()] Browser claims to be Netscape family, but no mimeTypes[] array?"),!1;for(var b=0;b<navigator.mimeTypes.length;++b){s=navigator.mimeTypes[b].type;var c=s.match(/^application\/x-java-applet\x3Bversion=(1\.8|1\.7|1\.6|1\.5|1\.4\.2)$/);
if(null!=c&&this.compareVersions(c[1],a))return!0}return!1},testUsingPluginsArray:function(a){if(!navigator.plugins||!navigator.plugins.length)return!1;for(var b=navigator.platform.toLowerCase(),c=0;c<navigator.plugins.length;++c)if(s=navigator.plugins[c].description,-1!=s.search(/^Java Switchable Plug-in (Cocoa)/)){if(this.compareVersions("1.5.0",a))return!0}else if(-1!=s.search(/^Java/)&&-1!=b.indexOf("win")&&(this.compareVersions("1.5.0",a)||this.compareVersions("1.6.0",a)))return!0;return this.compareVersions("1.5.0",
a)?!0:!1},IEInstall:function(){location.href=d((null!=this.returnPage?"&returnPage="+this.returnPage:"")+(null!=this.locale?"&locale="+this.locale:"")+(null!=this.brand?"&brand="+this.brand:""));return!1},done:function(a,b){},FFInstall:function(){location.href=d((null!=this.returnPage?"&returnPage="+this.returnPage:"")+(null!=this.locale?"&locale="+this.locale:"")+(null!=this.brand?"&brand="+this.brand:"")+(null!=this.installType?"&type="+this.installType:""));return!1},compareVersions:function(a,
b){for(var c=a.split("."),d=b.split("."),h=0;h<c.length;++h)c[h]=Number(c[h]);for(h=0;h<d.length;++h)d[h]=Number(d[h]);2==c.length&&(c[2]=0);return c[0]>d[0]?!0:c[0]<d[0]?!1:c[1]>d[1]?!0:c[1]<d[1]?!1:c[2]>d[2]?!0:c[2]<d[2]?!1:!0},enableAlerts:function(){this.browserName=null;this.debug=!0},poll:function(){this.refresh();var a=this.getJREs();0==this.preInstallJREList.length&&0!=a.length&&(clearInterval(this.myInterval),null!=this.returnPage&&(location.href=this.returnPage));0!=this.preInstallJREList.length&&
0!=a.length&&this.preInstallJREList[0]!=a[0]&&(clearInterval(this.myInterval),null!=this.returnPage&&(location.href=this.returnPage))},writePluginTag:function(){var a=this.getBrowser();"MSIE"==a?document.write('<object classid="clsid:CAFEEFAC-DEC7-0000-0001-ABCDEFFEDCBA" id="deployJavaPlugin" width="0" height="0"></object>'):"Netscape Family"==a&&this.allowPlugin()&&this.writeEmbedTag()},refresh:function(){navigator.plugins.refresh(!1);"Netscape Family"==this.getBrowser()&&this.allowPlugin()&&null==
document.getElementById("deployJavaPlugin")&&this.writeEmbedTag()},writeEmbedTag:function(){var a=!1;if(null!=navigator.mimeTypes){for(var b=0;b<navigator.mimeTypes.length;b++)navigator.mimeTypes[b].type==this.mimeType&&navigator.mimeTypes[b].enabledPlugin&&(document.write('<embed id="deployJavaPlugin" type="'+this.mimeType+'" hidden="true" />'),a=!0);if(!a)for(b=0;b<navigator.mimeTypes.length;b++)navigator.mimeTypes[b].type==this.oldMimeType&&navigator.mimeTypes[b].enabledPlugin&&document.write('<embed id="deployJavaPlugin" type="'+
this.oldMimeType+'" hidden="true" />')}}};c.writePluginTag();if(null==c.locale){e=null;if(null==e)try{e=navigator.userLanguage}catch(a){}if(null==e)try{e=navigator.systemLanguage}catch(a){}if(null==e)try{e=navigator.language}catch(a){}null!=e&&(e.replace("-","_"),c.locale=e)}return c}();var Detector=function(){var f=["monospace","sans-serif","serif"],d=document.getElementsByTagName("body")[0],e=document.createElement("span");e.style.fontSize="72px";e.innerHTML="mmmmmmmmmmlli";var p={},b={},c;for(c in f)e.style.fontFamily=f[c],d.appendChild(e),p[f[c]]=e.offsetWidth,b[f[c]]=e.offsetHeight,d.removeChild(e);this.detect=function(a){var c=!1,n;for(n in f){e.style.fontFamily=a+","+f[n];d.appendChild(e);var v=e.offsetWidth!=p[f[n]]||e.offsetHeight!=b[f[n]];d.removeChild(e);c=c||v}return c}};function murmurhash3_32_gc(f,d){var e,p,b,c,a;e=f.length&3;p=f.length-e;b=d;for(a=0;a<p;)c=f.charCodeAt(a)&255|(f.charCodeAt(++a)&255)<<8|(f.charCodeAt(++a)&255)<<16|(f.charCodeAt(++a)&255)<<24,++a,c=3432918353*(c&65535)+((3432918353*(c>>>16)&65535)<<16)&4294967295,c=c<<15|c>>>17,c=461845907*(c&65535)+((461845907*(c>>>16)&65535)<<16)&4294967295,b^=c,b=b<<13|b>>>19,b=5*(b&65535)+((5*(b>>>16)&65535)<<16)&4294967295,b=(b&65535)+27492+(((b>>>16)+58964&65535)<<16);c=0;switch(e){case 3:c^=(f.charCodeAt(a+
2)&255)<<16;case 2:c^=(f.charCodeAt(a+1)&255)<<8;case 1:c^=f.charCodeAt(a)&255,c=3432918353*(c&65535)+((3432918353*(c>>>16)&65535)<<16)&4294967295,c=c<<15|c>>>17,b^=461845907*(c&65535)+((461845907*(c>>>16)&65535)<<16)&4294967295}b^=f.length;b^=b>>>16;b=2246822507*(b&65535)+((2246822507*(b>>>16)&65535)<<16)&4294967295;b^=b>>>13;b=3266489909*(b&65535)+((3266489909*(b>>>16)&65535)<<16)&4294967295;return(b^b>>>16)>>>0};var swfobject=function(){function f(){if(!y){try{var a=l.getElementsByTagName("body")[0].appendChild(l.createElement("span"));a.parentNode.removeChild(a)}catch(b){return}y=!0;for(var a=F.length,c=0;c<a;c++)F[c]()}}function d(a){y?a():F[F.length]=a}function e(a){if("undefined"!=typeof r.addEventListener)r.addEventListener("load",a,!1);else if("undefined"!=typeof l.addEventListener)l.addEventListener("load",a,!1);else if("undefined"!=typeof r.attachEvent)B(r,"onload",a);else if("function"==typeof r.onload){var b=
r.onload;r.onload=function(){b();a()}}else r.onload=a}function p(){var a=l.getElementsByTagName("body")[0],c=l.createElement("object");c.setAttribute("type","application/x-shockwave-flash");var d=a.appendChild(c);if(d){var g=0;(function(){if("undefined"!=typeof d.GetVariable){var h=d.GetVariable("$version");h&&(h=h.split(" ")[1].split(","),k.pv=[parseInt(h[0],10),parseInt(h[1],10),parseInt(h[2],10)])}else if(10>g){g++;setTimeout(arguments.callee,10);return}a.removeChild(c);d=null;b()})()}else b()}
function b(){var b=x.length;if(0<b)for(var z=0;z<b;z++){var d=x[z].id,h=x[z].callbackFn,f={success:!1,id:d};if(0<k.pv[0]){var e=m(d);if(e)if(!C(x[z].swfVersion)||k.wk&&312>k.wk)if(x[z].expressInstall&&a()){f={};f.data=x[z].expressInstall;f.width=e.getAttribute("width")||"0";f.height=e.getAttribute("height")||"0";e.getAttribute("class")&&(f.styleclass=e.getAttribute("class"));e.getAttribute("align")&&(f.align=e.getAttribute("align"));for(var l={},e=e.getElementsByTagName("param"),q=e.length,u=0;u<
q;u++)"movie"!=e[u].getAttribute("name").toLowerCase()&&(l[e[u].getAttribute("name")]=e[u].getAttribute("value"));g(f,l,d,h)}else n(e),h&&h(f);else A(d,!0),h&&(f.success=!0,f.ref=c(d),h(f))}else A(d,!0),h&&((d=c(d))&&"undefined"!=typeof d.SetVariable&&(f.success=!0,f.ref=d),h(f))}}function c(a){var b=null;(a=m(a))&&"OBJECT"==a.nodeName&&("undefined"!=typeof a.SetVariable?b=a:(a=a.getElementsByTagName("object")[0])&&(b=a));return b}function a(){return!G&&C("6.0.65")&&(k.win||k.mac)&&!(k.wk&&312>k.wk)}
function g(a,b,c,d){G=!0;J=d||null;L={success:!1,id:c};var g=m(c);if(g){"OBJECT"==g.nodeName?(E=v(g),H=null):(E=g,H=c);a.id="SWFObjectExprInst";if("undefined"==typeof a.width||!/%$/.test(a.width)&&310>parseInt(a.width,10))a.width="310";if("undefined"==typeof a.height||!/%$/.test(a.height)&&137>parseInt(a.height,10))a.height="137";l.title=l.title.slice(0,47)+" - Flash Player Installation";d=k.ie&&k.win?"ActiveX":"PlugIn";d="MMredirectURL="+r.location.toString().replace(/&/g,"%26")+"&MMplayerType="+
d+"&MMdoctitle="+l.title;b.flashvars="undefined"!=typeof b.flashvars?b.flashvars+("&"+d):d;k.ie&&k.win&&4!=g.readyState&&(d=l.createElement("div"),c+="SWFObjectNew",d.setAttribute("id",c),g.parentNode.insertBefore(d,g),g.style.display="none",function(){4==g.readyState?g.parentNode.removeChild(g):setTimeout(arguments.callee,10)}());h(a,b,c)}}function n(a){if(k.ie&&k.win&&4!=a.readyState){var b=l.createElement("div");a.parentNode.insertBefore(b,a);b.parentNode.replaceChild(v(a),b);a.style.display="none";
(function(){4==a.readyState?a.parentNode.removeChild(a):setTimeout(arguments.callee,10)})()}else a.parentNode.replaceChild(v(a),a)}function v(a){var b=l.createElement("div");if(k.win&&k.ie)b.innerHTML=a.innerHTML;else if(a=a.getElementsByTagName("object")[0])if(a=a.childNodes)for(var c=a.length,d=0;d<c;d++)1==a[d].nodeType&&"PARAM"==a[d].nodeName||8==a[d].nodeType||b.appendChild(a[d].cloneNode(!0));return b}function h(a,b,c){var d,g=m(c);if(k.wk&&312>k.wk)return d;if(g)if("undefined"==typeof a.id&&
(a.id=c),k.ie&&k.win){var h="",f;for(f in a)a[f]!=Object.prototype[f]&&("data"==f.toLowerCase()?b.movie=a[f]:"styleclass"==f.toLowerCase()?h+=' class="'+a[f]+'"':"classid"!=f.toLowerCase()&&(h+=" "+f+'="'+a[f]+'"'));f="";for(var e in b)b[e]!=Object.prototype[e]&&(f+='<param name="'+e+'" value="'+b[e]+'" />');g.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+h+">"+f+"</object>";I[I.length]=a.id;d=m(a.id)}else{e=l.createElement("object");e.setAttribute("type","application/x-shockwave-flash");
for(var q in a)a[q]!=Object.prototype[q]&&("styleclass"==q.toLowerCase()?e.setAttribute("class",a[q]):"classid"!=q.toLowerCase()&&e.setAttribute(q,a[q]));for(h in b)b[h]!=Object.prototype[h]&&"movie"!=h.toLowerCase()&&(a=e,f=h,q=b[h],c=l.createElement("param"),c.setAttribute("name",f),c.setAttribute("value",q),a.appendChild(c));g.parentNode.replaceChild(e,g);d=e}return d}function u(a){var b=m(a);b&&"OBJECT"==b.nodeName&&(k.ie&&k.win?(b.style.display="none",function(){if(4==b.readyState){var c=m(a);
if(c){for(var d in c)"function"==typeof c[d]&&(c[d]=null);c.parentNode.removeChild(c)}}else setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))}function m(a){var b=null;try{b=l.getElementById(a)}catch(c){}return b}function B(a,b,c){a.attachEvent(b,c);D[D.length]=[a,b,c]}function C(a){var b=k.pv;a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||0;a[2]=parseInt(a[2],10)||0;return b[0]>a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?!0:!1}function q(a,b,c,d){if(!k.ie||
!k.mac){var h=l.getElementsByTagName("head")[0];h&&(c=c&&"string"==typeof c?c:"screen",d&&(K=w=null),w&&K==c||(d=l.createElement("style"),d.setAttribute("type","text/css"),d.setAttribute("media",c),w=h.appendChild(d),k.ie&&k.win&&"undefined"!=typeof l.styleSheets&&0<l.styleSheets.length&&(w=l.styleSheets[l.styleSheets.length-1]),K=c),k.ie&&k.win?w&&"object"==typeof w.addRule&&w.addRule(a,b):w&&"undefined"!=typeof l.createTextNode&&w.appendChild(l.createTextNode(a+" {"+b+"}")))}}function A(a,b){if(M){var c=
b?"visible":"hidden";y&&m(a)?m(a).style.visibility=c:q("#"+a,"visibility:"+c)}}function N(a){return null!=/[\\\"<>\.;]/.exec(a)&&"undefined"!=typeof encodeURIComponent?encodeURIComponent(a):a}var r=window,l=document,t=navigator,O=!1,F=[function(){O?p():b()}],x=[],I=[],D=[],E,H,J,L,y=!1,G=!1,w,K,M=!0,k=function(){var a="undefined"!=typeof l.getElementById&&"undefined"!=typeof l.getElementsByTagName&&"undefined"!=typeof l.createElement,b=t.userAgent.toLowerCase(),c=t.platform.toLowerCase(),d=c?/win/.test(c):
/win/.test(b),c=c?/mac/.test(c):/mac/.test(b),b=/webkit/.test(b)?parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,h=!+"\v1",g=[0,0,0],f=null;if("undefined"!=typeof t.plugins&&"object"==typeof t.plugins["Shockwave Flash"])!(f=t.plugins["Shockwave Flash"].description)||"undefined"!=typeof t.mimeTypes&&t.mimeTypes["application/x-shockwave-flash"]&&!t.mimeTypes["application/x-shockwave-flash"].enabledPlugin||(O=!0,h=!1,f=f.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),g[0]=parseInt(f.replace(/^(.*)\..*$/,
"$1"),10),g[1]=parseInt(f.replace(/^.*\.(.*)\s.*$/,"$1"),10),g[2]=/[a-zA-Z]/.test(f)?parseInt(f.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if("undefined"!=typeof r.ActiveXObject)try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");e&&(f=e.GetVariable("$version"))&&(h=!0,f=f.split(" ")[1].split(","),g=[parseInt(f[0],10),parseInt(f[1],10),parseInt(f[2],10)])}catch(m){}return{w3:a,pv:g,wk:b,ie:h,win:d,mac:c}}();(function(){k.w3&&(("undefined"!=typeof l.readyState&&"complete"==l.readyState||
"undefined"==typeof l.readyState&&(l.getElementsByTagName("body")[0]||l.body))&&f(),y||("undefined"!=typeof l.addEventListener&&l.addEventListener("DOMContentLoaded",f,!1),k.ie&&k.win&&(l.attachEvent("onreadystatechange",function(){"complete"==l.readyState&&(l.detachEvent("onreadystatechange",arguments.callee),f())}),r==top&&function(){if(!y){try{l.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}f()}}()),k.wk&&function(){y||(/loaded|complete/.test(l.readyState)?f():
setTimeout(arguments.callee,0))}(),e(f)))})();(function(){k.ie&&k.win&&window.attachEvent("onunload",function(){for(var a=D.length,b=0;b<a;b++)D[b][0].detachEvent(D[b][1],D[b][2]);a=I.length;for(b=0;b<a;b++)u(I[b]);for(var c in k)k[c]=null;k=null;for(var d in swfobject)swfobject[d]=null;swfobject=null})})();return{registerObject:function(a,b,c,d){if(k.w3&&a&&b){var h={};h.id=a;h.swfVersion=b;h.expressInstall=c;h.callbackFn=d;x[x.length]=h;A(a,!1)}else d&&d({success:!1,id:a})},getObjectById:function(a){if(k.w3)return c(a)},
embedSWF:function(b,c,f,e,m,q,l,u,p,r){var n={success:!1,id:c};k.w3&&!(k.wk&&312>k.wk)&&b&&c&&f&&e&&m?(A(c,!1),d(function(){f+="";e+="";var d={};if(p&&"object"===typeof p)for(var k in p)d[k]=p[k];d.data=b;d.width=f;d.height=e;k={};if(u&&"object"===typeof u)for(var B in u)k[B]=u[B];if(l&&"object"===typeof l)for(var t in l)k.flashvars="undefined"!=typeof k.flashvars?k.flashvars+("&"+t+"="+l[t]):t+"="+l[t];if(C(m))B=h(d,k,c),d.id==c&&A(c,!0),n.success=!0,n.ref=B;else{if(q&&a()){d.data=q;g(d,k,c,r);return}A(c,
!0)}r&&r(n)})):r&&r(n)},switchOffAutoHideShow:function(){M=!1},ua:k,getFlashPlayerVersion:function(){return{major:k.pv[0],minor:k.pv[1],release:k.pv[2]}},hasFlashPlayerVersion:C,createSWF:function(a,b,c){if(k.w3)return h(a,b,c)},showExpressInstall:function(b,c,d,h){k.w3&&a()&&g(b,c,d,h)},removeSWF:function(a){k.w3&&u(a)},createCSS:function(a,b,c,d){k.w3&&q(a,b,c,d)},addDomLoadEvent:d,addLoadEvent:e,getQueryParamValue:function(a){var b=l.location.search||l.location.hash;if(b){/\?/.test(b)&&(b=b.split("?")[1]);
if(null==a)return N(b);for(var b=b.split("&"),c=0;c<b.length;c++)if(b[c].substring(0,b[c].indexOf("="))==a)return N(b[c].substring(b[c].indexOf("=")+1))}return""},expressInstallCallback:function(){if(G){var a=m("SWFObjectExprInst");a&&E&&(a.parentNode.replaceChild(E,a),H&&(A(H,!0),k.ie&&k.win&&(E.style.display="block")),J&&J(L));G=!1}}}}();(function(f,d){var e={extend:function(a,b){for(var c in b)-1!=="browser cpu device engine os".indexOf(c)&&0===b[c].length%2&&(a[c]=b[c].concat(a[c]));return a},has:function(a,b){return"string"===typeof a?-1!==b.toLowerCase().indexOf(a.toLowerCase()):!1},lowerize:function(a){return a.toLowerCase()},major:function(a){return"string"===typeof a?a.split(".")[0]:d}},p=function(){for(var a,b=0,c,f,g,e,p,n,r=arguments;b<r.length&&!p;){var l=r[b],t=r[b+1];if("undefined"===typeof a)for(g in a={},t)t.hasOwnProperty(g)&&
(e=t[g],"object"===typeof e?a[e[0]]=d:a[e]=d);for(c=f=0;c<l.length&&!p;)if(p=l[c++].exec(this.getUA()))for(g=0;g<t.length;g++)n=p[++f],e=t[g],"object"===typeof e&&0<e.length?2==e.length?a[e[0]]="function"==typeof e[1]?e[1].call(this,n):e[1]:3==e.length?a[e[0]]="function"!==typeof e[1]||e[1].exec&&e[1].test?n?n.replace(e[1],e[2]):d:n?e[1].call(this,n,e[2]):d:4==e.length&&(a[e[0]]=n?e[3].call(this,n.replace(e[1],e[2])):d):a[e]=n?n:d;b+=2}return a},b=function(a,b){for(var c in b)if("object"===typeof b[c]&&
0<b[c].length)for(var f=0;f<b[c].length;f++){if(e.has(b[c][f],a))return"?"===c?d:c}else if(e.has(b[c],a))return"?"===c?d:c;return a},c={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2E3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},a={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],["name","version"],[/\s(opr)\/([\w\.]+)/i],[["name",
"Opera"],"version"],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs)\/([\w\.-]+)/i],["name","version"],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[["name","IE"],"version"],[/(edge)\/((\d+)?[\w\.]+)/i],["name","version"],[/(yabrowser)\/([\w\.]+)/i],
[["name","Yandex"],"version"],[/(comodo_dragon)\/([\w\.]+)/i],[["name",/_/g," "],"version"],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i,/(qqbrowser)[\/\s]?([\w\.]+)/i],["name","version"],[/(uc\s?browser)[\/\s]?([\w\.]+)/i,/ucweb.+(ucbrowser)[\/\s]?([\w\.]+)/i,/JUC.+(ucweb)[\/\s]?([\w\.]+)/i],[["name","UCBrowser"],"version"],[/(dolfin)\/([\w\.]+)/i],[["name","Dolphin"],"version"],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[["name","Chrome"],"version"],[/XiaoMi\/MiuiBrowser\/([\w\.]+)/i],
["version",["name","MIUI Browser"]],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)/i],["version",["name","Android Browser"]],[/FBAV\/([\w\.]+);/i],["version",["name","Facebook"]],[/fxios\/([\w\.-]+)/i],["version",["name","Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],["version",["name","Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],["version","name"],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],["name",["version",b,{"1.0":"/8","1.2":"/1","1.3":"/3",
"2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(konqueror)\/([\w\.]+)/i,/(webkit|khtml)\/([\w\.]+)/i],["name","version"],[/(navigator|netscape)\/([\w\.-]+)/i],[["name","Netscape"],"version"],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,
/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]+)*/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],["name","version"]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",e.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",e.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],
[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",e.lowerize]]],device:[[/\((ipad|playbook);[\w\s\);-]+(rim|apple)/i],["model","vendor",["type","tablet"]],[/applecoremedia\/[\w\.]+ \((ipad)/],["model",["vendor","Apple"],["type","tablet"]],[/(apple\s{0,1}tv)/i],[["model","Apple TV"],["vendor","Apple"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],
["vendor","model",["type","tablet"]],[/(kf[A-z]+)\sbuild\/[\w\.]+.*silk\//i],["model",["vendor","Amazon"],["type","tablet"]],[/(sd|kf)[0349hijorstuw]+\sbuild\/[\w\.]+.*silk\//i],[["model",b,{"Fire Phone":["SD","KF"]}],["vendor","Amazon"],["type","mobile"]],[/\((ip[honed|\s\w*]+);.+(apple)/i],["model","vendor",["type","mobile"]],[/\((ip[honed|\s\w*]+);/i],["model",["vendor","Apple"],["type","mobile"]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|huawei|meizu|motorola|polytron)[\s_-]?([\w-]+)*/i,
/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],["vendor","model",["type","mobile"]],[/\(bb10;\s(\w+)/i],["model",["vendor","BlackBerry"],["type","mobile"]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7)/i],["model",["vendor","Asus"],["type","tablet"]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[["vendor","Sony"],["model","Xperia Tablet"],["type","tablet"]],[/(?:sony)?(?:(?:(?:c|d)\d{4})|(?:so[-l].+))\sbuild\//i],[["vendor","Sony"],["model","Xperia Phone"],["type",
"mobile"]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],["vendor","model",["type","console"]],[/android.+;\s(shield)\sbuild/i],["model",["vendor","Nvidia"],["type","console"]],[/(playstation\s[34portablevi]+)/i],["model",["vendor","Sony"],["type","console"]],[/(sprint\s(\w+))/i],[["vendor",b,{HTC:"APA",Sprint:"Sprint"}],["model",b,{"Evo Shift 4G":"7373KT"}],["type","mobile"]],[/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i],["vendor","model",["type","tablet"]],[/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i,/(zte)-(\w+)*/i,
/(alcatel|geeksphone|huawei|lenovo|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]+)*/i],["vendor",["model",/_/g," "],["type","mobile"]],[/(nexus\s9)/i],["model",["vendor","HTC"],["type","tablet"]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],["model",["vendor","Microsoft"],["type","console"]],[/(kin\.[onetw]{3})/i],[["model",/\./g," "],["vendor","Microsoft"],["type","mobile"]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w+)*/i,/(XT\d{3,4}) build\//i,/(nexus\s[6])/i],
["model",["vendor","Motorola"],["type","mobile"]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],["model",["vendor","Motorola"],["type","tablet"]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n8000|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[["vendor","Samsung"],"model",["type","tablet"]],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-n900))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i,/sec-((sgh\w+))/i],[["vendor","Samsung"],"model",["type","mobile"]],[/(samsung);smarttv/i],["vendor","model",["type","smarttv"]],
[/\(dtv[\);].+(aquos)/i],["model",["vendor","Sharp"],["type","smarttv"]],[/sie-(\w+)*/i],["model",["vendor","Siemens"],["type","mobile"]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]+)*/i],[["vendor","Nokia"],"model",["type","mobile"]],[/android\s3\.[\s\w;-]{10}(a\d{3})/i],["model",["vendor","Acer"],["type","tablet"]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[["vendor","LG"],"model",["type","tablet"]],[/(lg) netcast\.tv/i],["vendor","model",["type","smarttv"]],[/(nexus\s[45])/i,
/lg[e;\s\/-]+(\w+)*/i],["model",["vendor","LG"],["type","mobile"]],[/android.+(ideatab[a-z0-9\-\s]+)/i],["model",["vendor","Lenovo"],["type","tablet"]],[/linux;.+((jolla));/i],["vendor","model",["type","mobile"]],[/((pebble))app\/[\d\.]+\s/i],["vendor","model",["type","wearable"]],[/android.+;\s(glass)\s\d/i],["model",["vendor","Google"],["type","wearable"]],[/android.+(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:one|one[\s_]plus)?[\s_]*(?:\d\w)?)\s+build/i],
[["model",/_/g," "],["vendor","Xiaomi"],["type","mobile"]],[/\s(tablet)[;\/\s]/i,/\s(mobile)[;\/\s]/i],[["type",e.lowerize],"vendor","model"]],engine:[[/windows.+\sedge\/([\w\.]+)/i],["version",["name","EdgeHTML"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],["name","version"],[/rv\:([\w\.]+).*(gecko)/i],["version","name"]],os:[[/microsoft\s(windows)\s(vista|xp)/i],["name","version"],
[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],["name",["version",b,c]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[["name","Windows"],["version",b,c]],[/\((bb)(10);/i],[["name","BlackBerry"],"version"],[/(blackberry)\w*\/?([\w\.]+)*/i,/(tizen)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,/linux;.+(sailfish);/i],["name","version"],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i],
[["name","Symbian"],"version"],[/\((series40);/i],["name"],[/mozilla.+\(mobile;.+gecko.+firefox/i],[["name","Firefox OS"],"version"],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w+)*/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?([\w\.-]+)*/i,/(hurd|linux)\s?([\w\.]+)*/i,/(gnu)\s?([\w\.]+)*/i],["name","version"],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[["name","Chromium OS"],
"version"],[/(sunos)\s?([\w\.]+\d)*/i],[["name","Solaris"],"version"],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i],["name","version"],[/(ip[honead]+)(?:.*os\s([\w]+)*\slike\smac|;\sopera)/i],[["name","iOS"],["version",/_/g,"."]],[/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,/(macintosh|mac(?=_powerpc)\s)/i],[["name","Mac OS"],["version",/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i,/(haiku)\s(\w+)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,
/(unix)\s?([\w\.]+)*/i],["name","version"]]},g=function(b,c){if(!(this instanceof g))return(new g(b,c)).getResult();var d=b||(f&&f.navigator&&f.navigator.userAgent?f.navigator.userAgent:""),n=c?e.extend(a,c):a;this.getBrowser=function(){var a=p.apply(this,n.browser);a.major=e.major(a.version);return a};this.getCPU=function(){return p.apply(this,n.cpu)};this.getDevice=function(){return p.apply(this,n.device)};this.getEngine=function(){return p.apply(this,n.engine)};this.getOS=function(){return p.apply(this,
n.os)};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return d};this.setUA=function(a){d=a;return this};this.setUA(d);return this};g.VERSION="0.7.10";g.BROWSER={NAME:"name",MAJOR:"major",VERSION:"version"};g.CPU={ARCHITECTURE:"architecture"};g.DEVICE={MODEL:"model",VENDOR:"vendor",TYPE:"type",CONSOLE:"console",MOBILE:"mobile",SMARTTV:"smarttv",TABLET:"tablet",WEARABLE:"wearable",
EMBEDDED:"embedded"};g.ENGINE={NAME:"name",VERSION:"version"};g.OS={NAME:"name",VERSION:"version"};"undefined"!==typeof exports?("undefined"!==typeof module&&module.exports&&(exports=module.exports=g),exports.UAParser=g):"function"===typeof define&&define.amd?define(function(){return g}):f.UAParser=g;var n=f.jQuery||f.Zepto;if("undefined"!==typeof n){var v=new g;n.ua=v.getResult();n.ua.get=function(){return v.getUA()};n.ua.set=function(a){v.setUA(a);a=v.getResult();for(var b in a)n.ua[b]=a[b]}}})("object"===
typeof window?window:this);
!function(e,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i();else if("function"==typeof define&&define.amd)define([],i);else{var t=i();for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(this,(function(){return function(e){var i={};function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,i){if(1&i&&(e=t(e)),8&i)return e;if(4&i&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&i&&"string"!=typeof e)for(var r in e)t.d(n,r,function(i){return e[i]}.bind(null,r));return n},t.n=function(e){var i=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,i){return Object.prototype.hasOwnProperty.call(e,i)},t.p="",t(t.s=11)}([function(e,i,t){"use strict";var n,r,o=t(1)(),a=t(3),s=t(4),l=t(5),u=function(){var e=new s;return n=e.getResult(),r=new l,this};u.prototype={getSoftwareVersion:function(){return"0.1.11"},getBrowserData:function(){return n},getFingerprint:function(){var e="|",i=n.ua,t=this.getScreenPrint(),r=this.getPlugins(),o=this.getFonts(),s=this.isLocalStorage(),l=this.isSessionStorage(),u=this.getTimeZone(),c=this.getLanguage(),d=this.getSystemLanguage(),p=this.isCookie(),f=this.getCanvasPrint();return a(i+e+t+e+r+e+o+e+s+e+l+e+u+e+c+e+d+e+p+e+f,256)},getCustomFingerprint:function(){for(var e="|",i="",t=0;t<arguments.length;t++)i+=arguments[t]+e;return a(i,256)},getUserAgent:function(){return n.ua},getUserAgentLowerCase:function(){return n.ua.toLowerCase()},getBrowser:function(){return n.browser.name},getBrowserVersion:function(){return n.browser.version},getBrowserMajorVersion:function(){return n.browser.major},isIE:function(){return/IE/i.test(n.browser.name)},isChrome:function(){return/Chrome/i.test(n.browser.name)},isFirefox:function(){return/Firefox/i.test(n.browser.name)},isSafari:function(){return/Safari/i.test(n.browser.name)},isMobileSafari:function(){return/Mobile\sSafari/i.test(n.browser.name)},isOpera:function(){return/Opera/i.test(n.browser.name)},getEngine:function(){return n.engine.name},getEngineVersion:function(){return n.engine.version},getOS:function(){return n.os.name},getOSVersion:function(){return n.os.version},isWindows:function(){return/Windows/i.test(n.os.name)},isMac:function(){return/Mac/i.test(n.os.name)},isLinux:function(){return/Linux/i.test(n.os.name)},isUbuntu:function(){return/Ubuntu/i.test(n.os.name)},isSolaris:function(){return/Solaris/i.test(n.os.name)},getDevice:function(){return n.device.model},getDeviceType:function(){return n.device.type},getDeviceVendor:function(){return n.device.vendor},getCPU:function(){return n.cpu.architecture},isMobile:function(){var e=n.ua||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))},isMobileMajor:function(){return this.isMobileAndroid()||this.isMobileBlackBerry()||this.isMobileIOS()||this.isMobileOpera()||this.isMobileWindows()},isMobileAndroid:function(){return!!n.ua.match(/Android/i)},isMobileOpera:function(){return!!n.ua.match(/Opera Mini/i)},isMobileWindows:function(){return!!n.ua.match(/IEMobile/i)},isMobileBlackBerry:function(){return!!n.ua.match(/BlackBerry/i)},isMobileIOS:function(){return!!n.ua.match(/iPhone|iPad|iPod/i)},isIphone:function(){return!!n.ua.match(/iPhone/i)},isIpad:function(){return!!n.ua.match(/iPad/i)},isIpod:function(){return!!n.ua.match(/iPod/i)},getScreenPrint:function(){return"Current Resolution: "+this.getCurrentResolution()+", Available Resolution: "+this.getAvailableResolution()+", Color Depth: "+this.getColorDepth()+", Device XDPI: "+this.getDeviceXDPI()+", Device YDPI: "+this.getDeviceYDPI()},getColorDepth:function(){return screen.colorDepth},getCurrentResolution:function(){return screen.width+"x"+screen.height},getAvailableResolution:function(){return screen.availWidth+"x"+screen.availHeight},getDeviceXDPI:function(){return screen.deviceXDPI},getDeviceYDPI:function(){return screen.deviceYDPI},getPlugins:function(){for(var e="",i=0;i<navigator.plugins.length;i++)i==navigator.plugins.length-1?e+=navigator.plugins[i].name:e+=navigator.plugins[i].name+", ";return e},isJava:function(){return navigator.javaEnabled()},getJavaVersion:function(){throw new Error("Please use client.java.js or client.js if you need this functionality!")},isFlash:function(){return!!navigator.plugins["Shockwave Flash"]},getFlashVersion:function(){throw new Error("Please use client.flash.js or client.js if you need this functionality!")},isSilverlight:function(){return!!navigator.plugins["Silverlight Plug-In"]},getSilverlightVersion:function(){return this.isSilverlight()?navigator.plugins["Silverlight Plug-In"].description:""},isMimeTypes:function(){return!(!navigator.mimeTypes||!navigator.mimeTypes.length)},getMimeTypes:function(){var e="";if(navigator.mimeTypes)for(var i=0;i<navigator.mimeTypes.length;i++)i==navigator.mimeTypes.length-1?e+=navigator.mimeTypes[i].description:e+=navigator.mimeTypes[i].description+", ";return e},isFont:function(e){return r.detect(e)},getFonts:function(){for(var e=["Abadi MT Condensed Light","Adobe Fangsong Std","Adobe Hebrew","Adobe Ming Std","Agency FB","Aharoni","Andalus","Angsana New","AngsanaUPC","Aparajita","Arab","Arabic Transparent","Arabic Typesetting","Arial Baltic","Arial Black","Arial CE","Arial CYR","Arial Greek","Arial TUR","Arial","Batang","BatangChe","Bauhaus 93","Bell MT","Bitstream Vera Serif","Bodoni MT","Bookman Old Style","Braggadocio","Broadway","Browallia New","BrowalliaUPC","Calibri Light","Calibri","Californian FB","Cambria Math","Cambria","Candara","Castellar","Casual","Centaur","Century Gothic","Chalkduster","Colonna MT","Comic Sans MS","Consolas","Constantia","Copperplate Gothic Light","Corbel","Cordia New","CordiaUPC","Courier New Baltic","Courier New CE","Courier New CYR","Courier New Greek","Courier New TUR","Courier New","DFKai-SB","DaunPenh","David","DejaVu LGC Sans Mono","Desdemona","DilleniaUPC","DokChampa","Dotum","DotumChe","Ebrima","Engravers MT","Eras Bold ITC","Estrangelo Edessa","EucrosiaUPC","Euphemia","Eurostile","FangSong","Forte","FrankRuehl","Franklin Gothic Heavy","Franklin Gothic Medium","FreesiaUPC","French Script MT","Gabriola","Gautami","Georgia","Gigi","Gisha","Goudy Old Style","Gulim","GulimChe","GungSeo","Gungsuh","GungsuhChe","Haettenschweiler","Harrington","Hei S","HeiT","Heisei Kaku Gothic","Hiragino Sans GB","Impact","Informal Roman","IrisUPC","Iskoola Pota","JasmineUPC","KacstOne","KaiTi","Kalinga","Kartika","Khmer UI","Kino MT","KodchiangUPC","Kokila","Kozuka Gothic Pr6N","Lao UI","Latha","Leelawadee","Levenim MT","LilyUPC","Lohit Gujarati","Loma","Lucida Bright","Lucida Console","Lucida Fax","Lucida Sans Unicode","MS Gothic","MS Mincho","MS PGothic","MS PMincho","MS Reference Sans Serif","MS UI Gothic","MV Boli","Magneto","Malgun Gothic","Mangal","Marlett","Matura MT Script Capitals","Meiryo UI","Meiryo","Menlo","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Sans Serif","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU-ExtB","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","Miriam Fixed","Miriam","Mongolian Baiti","MoolBoran","NSimSun","Narkisim","News Gothic MT","Niagara Solid","Nyala","PMingLiU","PMingLiU-ExtB","Palace Script MT","Palatino Linotype","Papyrus","Perpetua","Plantagenet Cherokee","Playbill","Prelude Bold","Prelude Condensed Bold","Prelude Condensed Medium","Prelude Medium","PreludeCompressedWGL Black","PreludeCompressedWGL Bold","PreludeCompressedWGL Light","PreludeCompressedWGL Medium","PreludeCondensedWGL Black","PreludeCondensedWGL Bold","PreludeCondensedWGL Light","PreludeCondensedWGL Medium","PreludeWGL Black","PreludeWGL Bold","PreludeWGL Light","PreludeWGL Medium","Raavi","Rachana","Rockwell","Rod","Sakkal Majalla","Sawasdee","Script MT Bold","Segoe Print","Segoe Script","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Segoe UI","Shonar Bangla","Showcard Gothic","Shruti","SimHei","SimSun","SimSun-ExtB","Simplified Arabic Fixed","Simplified Arabic","Snap ITC","Sylfaen","Symbol","Tahoma","Times New Roman Baltic","Times New Roman CE","Times New Roman CYR","Times New Roman Greek","Times New Roman TUR","Times New Roman","TlwgMono","Traditional Arabic","Trebuchet MS","Tunga","Tw Cen MT Condensed Extra Bold","Ubuntu","Umpush","Univers","Utopia","Utsaah","Vani","Verdana","Vijaya","Vladimir Script","Vrinda","Webdings","Wide Latin","Wingdings"],i="",t=0;t<e.length;t++)r.detect(e[t])&&(i+=t==e.length-1?e[t]:e[t]+", ");return i},isLocalStorage:function(){try{return!!o.localStorage}catch(e){return!0}},isSessionStorage:function(){try{return!!o.sessionStorage}catch(e){return!0}},isCookie:function(){return navigator.cookieEnabled},getTimeZone:function(){var e,i;return e=new Date,(i=String(-e.getTimezoneOffset()/60))<0?"-"+("0"+(i*=-1)).slice(-2):"+"+("0"+i).slice(-2)},getLanguage:function(){return navigator.language},getSystemLanguage:function(){return navigator.systemLanguage||window.navigator.language},isCanvas:function(){var e=document.createElement("canvas");try{return!(!e.getContext||!e.getContext("2d"))}catch(i){return!1}},getCanvasPrint:function(){var e,i=document.createElement("canvas");try{e=i.getContext("2d")}catch(n){return""}var t="ClientJS,org <canvas> 1.0";return e.textBaseline="top",e.font="14px 'Arial'",e.textBaseline="alphabetic",e.fillStyle="#f60",e.fillRect(125,1,62,20),e.fillStyle="#069",e.fillText(t,2,15),e.fillStyle="rgba(102, 204, 0, 0.7)",e.fillText(t,4,17),i.toDataURL()}},i.ClientJS=u},function(e,i,t){"use strict";var n=t(2);e.exports=function(){return"object"==typeof global&&global&&global.Math===Math&&global.Array===Array?global:n}},function(e,i,t){"use strict";"undefined"!=typeof self?e.exports=self:"undefined"!=typeof window?e.exports=window:e.exports=Function("return this")()},function(e,i,t){e.exports=function(e,i){var t,n,r,o,a,s,l,u;for(t=3&e.length,n=e.length-t,r=i,a=3432918353,s=461845907,u=0;u<n;)l=255&e.charCodeAt(u)|(255&e.charCodeAt(++u))<<8|(255&e.charCodeAt(++u))<<16|(255&e.charCodeAt(++u))<<24,++u,r=27492+(65535&(o=5*(65535&(r=(r^=l=(65535&(l=(l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|r>>>19))+((5*(r>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,t){case 3:l^=(255&e.charCodeAt(u+2))<<16;case 2:l^=(255&e.charCodeAt(u+1))<<8;case 1:r^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return r^=e.length,r=2246822507*(65535&(r^=r>>>16))+((2246822507*(r>>>16)&65535)<<16)&4294967295,r=3266489909*(65535&(r^=r>>>13))+((3266489909*(r>>>16)&65535)<<16)&4294967295,(r^=r>>>16)>>>0}},function(e,i,t){var n;
/*!@license
* UAParser.js v0.7.28
* Lightweight JavaScript-based User-Agent string parser
* https://github.com/faisalman/ua-parser-js
*
* Copyright © 2012-2021 Faisal Salman <f@faisalman.com>
* Licensed under MIT License
*/!function(r,o){"use strict";var a="function",s="undefined",l="object",u="string",c="model",d="name",p="type",f="vendor",h="version",m="architecture",g="console",w="mobile",v="tablet",b="smarttv",y="wearable",x="embedded",S={extend:function(e,i){var t={};for(var n in e)i[n]&&i[n].length%2==0?t[n]=i[n].concat(e[n]):t[n]=e[n];return t},has:function(e,i){return typeof e===u&&-1!==i.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return typeof e===u?e.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(e,i){return e=e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof i===s?e:e.substring(0,255)}},C={rgx:function(e,i){for(var t,n,r,s,u,c,d=0;d<i.length&&!u;){var p=i[d],f=i[d+1];for(t=n=0;t<p.length&&!u;)if(u=p[t++].exec(e))for(r=0;r<f.length;r++)c=u[++n],typeof(s=f[r])===l&&s.length>0?2==s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:3==s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=c?c.replace(s[1],s[2]):o:this[s[0]]=c?s[1].call(this,c,s[2]):o:4==s.length&&(this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):o):this[s]=c||o;d+=2}},str:function(e,i){for(var t in i)if(typeof i[t]===l&&i[t].length>0){for(var n=0;n<i[t].length;n++)if(S.has(i[t][n],e))return"?"===t?o:t}else if(S.has(i[t],e))return"?"===t?o:t;return e}},T={browser:{oldSafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},k={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[d,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera)(?:.+version\/|[\/\s]+)([\w\.]+)/i],[d,h],[/opios[\/\s]+([\w\.]+)/i],[h,[d,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[h,[d,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[d,h],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[h,[d,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[h,[d,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[d,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[h,[d,"IE"]],[/yabrowser\/([\w\.]+)/i],[h,[d,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure Browser"],h],[/focus\/([\w\.]+)/i],[h,[d,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[h,[d,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[h,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[d,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[h,[d,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[h,[d,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[d,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1 Browser"],h],[/(comodo_dragon)\/([\w\.]+)/i],[[d,/_/g," "],h],[/\s(electron)\/([\w\.]+)\ssafari/i,/(tesla)(?:\sqtcarbrowser|\/(20[12]\d\.[\w\.-]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[d,h],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[d],[/;fbav\/([\w\.]+);/i],[h,[d,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[d,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/\s]([\w\.-]+)/i],[d,h],[/\bgsa\/([\w\.]+)\s.*safari\//i],[h,[d,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[h,[d,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[d,"Chrome WebView"],h],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[h,[d,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[d,h],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[h,[d,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[h,d],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[d,[h,C.str,T.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[d,h],[/(navigator|netscape)\/([\w\.-]+)/i],[[d,"Netscape"],h],[/ile\svr;\srv:([\w\.]+)\).+firefox/i],[h,[d,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[d,h]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,S.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[m,/ower/,"",S.lowerize]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,S.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus\s10)/i],[c,[f,"Samsung"],[p,v]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy\snexus)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[c,[f,"Samsung"],[p,w]],[/\((ip(?:hone|od)[\s\w]*);/i],[c,[f,"Apple"],[p,w]],[/\((ipad);[\w\s\),;-]+apple/i,/applecoremedia\/[\w\.]+\s\((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[f,"Apple"],[p,v]],[/\b((?:agr|ags[23]|bah2?|sht?)-a?[lw]\d{2})/i],[c,[f,"Huawei"],[p,v]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[c,[f,"Huawei"],[p,w]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\sbuild\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[c,/_/g," "],[f,"Xiaomi"],[p,w]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[c,/_/g," "],[f,"Xiaomi"],[p,v]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[c,[f,"OPPO"],[p,w]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[c,[f,"Vivo"],[p,w]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[c,[f,"Realme"],[p,w]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot(?:orola)?[\s-](\w*)/i,/((?:moto[\s\w\(\)]+|xt\d{3,4}|nexus\s6)(?=\sbuild|\)))/i],[c,[f,"Motorola"],[p,w]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[c,[f,"Motorola"],[p,v]],[/((?=lg)?[vl]k\-?\d{3})\sbuild|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[c,[f,"LG"],[p,v]],[/(lm-?f100[nv]?|nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\sbuild/i],[c,[f,"LG"],[p,w]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|yt[\d\w-]{6}|tb[\d\w-]{6})/i],[c,[f,"Lenovo"],[p,v]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[[c,/_/g," "],[f,"Nokia"],[p,w]],[/droid.+;\s(pixel\sc)[\s)]/i],[c,[f,"Google"],[p,v]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[c,[f,"Google"],[p,w]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[f,"Sony"],[p,w]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[c,"Xperia Tablet"],[f,"Sony"],[p,v]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\sbuild/i,/\boneplus\s(a\d{4})[\s)]/i],[c,[f,"OnePlus"],[p,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi)(\sbuild\/|\))/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[c,[f,"Amazon"],[p,v]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[c,"Fire Phone"],[f,"Amazon"],[p,w]],[/\((playbook);[\w\s\),;-]+(rim)/i],[c,f,[p,v]],[/((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10;\s(\w+)/i],[c,[f,"BlackBerry"],[p,w]],[/(?:\b|asus_)(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00[cj])/i],[c,[f,"ASUS"],[p,v]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[c,[f,"ASUS"],[p,w]],[/(nexus\s9)/i],[c,[f,"HTC"],[p,v]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[f,[c,/_/g," "],[p,w]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[c,[f,"Acer"],[p,v]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[c,[f,"Meizu"],[p,w]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[f,c,[p,w]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[f,c,[p,v]],[/\s(surface\sduo)\s/i],[c,[f,"Microsoft"],[p,v]],[/droid\s[\d\.]+;\s(fp\du?)\sbuild/i],[c,[f,"Fairphone"],[p,w]],[/\s(u304aa)\sbuild/i],[c,[f,"AT&T"],[p,w]],[/sie-(\w*)/i],[c,[f,"Siemens"],[p,w]],[/[;\/]\s?(rct\w+)\sbuild/i],[c,[f,"RCA"],[p,v]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[c,[f,"Dell"],[p,v]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[c,[f,"Verizon"],[p,v]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[c,[f,"Barnes & Noble"],[p,v]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[c,[f,"NuVision"],[p,v]],[/;\s(k88)\sbuild/i],[c,[f,"ZTE"],[p,v]],[/;\s(nx\d{3}j)\sbuild/i],[c,[f,"ZTE"],[p,w]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[c,[f,"Swiss"],[p,w]],[/[;\/]\s?(zur\d{3})\sbuild/i],[c,[f,"Swiss"],[p,v]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[c,[f,"Zeki"],[p,v]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[f,"Dragon Touch"],c,[p,v]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[c,[f,"Insignia"],[p,v]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[c,[f,"NextBook"],[p,v]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[f,"Voice"],c,[p,w]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[f,"LvTel"],c,[p,w]],[/;\s(ph-1)\s/i],[c,[f,"Essential"],[p,w]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[c,[f,"Envizen"],[p,v]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[c,[f,"MachSpeed"],[p,v]],[/[;\/]\s?tu_(1491)\sbuild/i],[c,[f,"Rotor"],[p,v]],[/(shield[\w\s]+)\sbuild/i],[c,[f,"Nvidia"],[p,v]],[/(sprint)\s(\w+)/i],[f,c,[p,w]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[f,"Microsoft"],[p,w]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[f,"Zebra"],[p,v]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[f,"Zebra"],[p,w]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[f,c,[p,g]],[/droid.+;\s(shield)\sbuild/i],[c,[f,"Nvidia"],[p,g]],[/(playstation\s[345portablevi]+)/i],[c,[f,"Sony"],[p,g]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[c,[f,"Microsoft"],[p,g]],[/smart-tv.+(samsung)/i],[f,[p,b]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[f,"Samsung"],[p,b]],[/(?:linux;\snetcast.+smarttv|lg\snetcast\.tv-201\d)/i],[[f,"LG"],[p,b]],[/(apple)\s?tv/i],[f,[c,"Apple TV"],[p,b]],[/crkey/i],[[c,"Chromecast"],[f,"Google"],[p,b]],[/droid.+aft([\w])(\sbuild\/|\))/i],[c,[f,"Amazon"],[p,b]],[/\(dtv[\);].+(aquos)/i],[c,[f,"Sharp"],[p,b]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[f,S.trim],[c,S.trim],[p,b]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[p,b]],[/((pebble))app\/[\d\.]+\s/i],[f,c,[p,y]],[/droid.+;\s(glass)\s\d/i],[c,[f,"Google"],[p,y]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[c,[f,"Zebra"],[p,y]],[/(tesla)(?:\sqtcarbrowser|\/20[12]\d\.[\w\.-]+)/i],[f,[p,x]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[c,[p,w]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[c,[p,v]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[p,S.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[c,[f,"Generic"]],[/(phone)/i],[[p,w]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[h,[d,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[d,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,d]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[d,h],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[d,[h,C.str,T.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[d,"Windows"],[h,C.str,T.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[d,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[d,"Mac OS"],[h,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/\((series40);/i],[d,h],[/\(bb(10);/i],[h,[d,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[h,[d,"Symbian"]],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[d,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[d,"webOS"]],[/crkey\/([\d\.]+)/i],[h,[d,"Chromecast"]],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[d,"Chromium OS"],h],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i,/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku)\s(\w+)/i],[d,h],[/(sunos)\s?([\w\.\d]*)/i],[[d,"Solaris"],h],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[d,h]]},E=function(e,i){if("object"==typeof e&&(i=e,e=o),!(this instanceof E))return new E(e,i).getResult();var t=e||(void 0!==r&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),n=i?S.extend(k,i):k;return this.getBrowser=function(){var e={name:o,version:o};return C.rgx.call(e,t,n.browser),e.major=S.major(e.version),e},this.getCPU=function(){var e={architecture:o};return C.rgx.call(e,t,n.cpu),e},this.getDevice=function(){var e={vendor:o,model:o,type:o};return C.rgx.call(e,t,n.device),e},this.getEngine=function(){var e={name:o,version:o};return C.rgx.call(e,t,n.engine),e},this.getOS=function(){var e={name:o,version:o};return C.rgx.call(e,t,n.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return t},this.setUA=function(e){return t=typeof e===u&&e.length>255?S.trim(e,255):e,this},this.setUA(t),this};E.VERSION="0.7.28",E.BROWSER={NAME:d,MAJOR:"major",VERSION:h},E.CPU={ARCHITECTURE:m},E.DEVICE={MODEL:c,VENDOR:f,TYPE:p,CONSOLE:g,MOBILE:w,SMARTTV:b,TABLET:v,WEARABLE:y,EMBEDDED:x},E.ENGINE={NAME:d,VERSION:h},E.OS={NAME:d,VERSION:h},typeof i!==s?(typeof e!==s&&e.exports&&(i=e.exports=E),i.UAParser=E):(n=function(){return E}.call(i,t,i,e))===o||(e.exports=n);var A=void 0!==r&&(r.jQuery||r.Zepto);if(A&&!A.ua){var M=new E;A.ua=M.getResult(),A.ua.get=function(){return M.getUA()},A.ua.set=function(e){M.setUA(e);var i=M.getResult();for(var t in i)A.ua[t]=i[t]}}}("object"==typeof window?window:this)},function(e,i){e.exports=function(){var e=["monospace","sans-serif","serif"],i=document.getElementsByTagName("body")[0],t=document.createElement("span");t.style.fontSize="72px",t.innerHTML="mmmmmmmmmmlli";var n={},r={};for(var o in e)t.style.fontFamily=e[o],i.appendChild(t),n[e[o]]=t.offsetWidth,r[e[o]]=t.offsetHeight,i.removeChild(t);this.detect=function(o){var a=!1;for(var s in e){t.style.fontFamily=o+","+e[s],i.appendChild(t);var l=t.offsetWidth!=n[e[s]]||t.offsetHeight!=r[e[s]];i.removeChild(t),a=a||l}return a}}},function(e,i){"function"==typeof Object.create?e.exports=function(e,i){i&&(e.super_=i,e.prototype=Object.create(i.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,i){if(i){e.super_=i;var t=function(){};t.prototype=i.prototype,e.prototype=new t,e.prototype.constructor=e}}},function(e,i,t){"use strict";var n=t(8);e.exports=function(){return n.getJREs().toString()}},function(e,i,t){"use strict";var n="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:[_\\.](\\d+))?)?)?",r=n+"$",o=n+"(\\*|\\+)?$",a={core:["id","class","title","style"],applet:["codebase","code","name","archive","object","width","height","alt","align","hspace","vspace"]},s=a.applet.concat(a.core);function l(e){f.debug&&(console.log?console.log(e):alert(e))}function u(e,i){var t=0,n=e.match(o);if(null!=n){if(i)return!0;for(var r=!1,a=!1,s=new Array,u=1;u<n.length;++u)"string"==typeof n[u]&&""!=n[u]&&(s[t]=n[u],t++);"+"==s[s.length-1]?(a=!0,r=!1,s.length--):"*"==s[s.length-1]?(a=!1,r=!0,s.length--):s.length<4&&(a=!1,r=!0);for(var c=f.getJREs(),d=0;d<c.length;++d)if(f.compareVersionToPattern(c[d],s,r,a))return!0;return!1}var p="Invalid versionPattern passed to versionCheck: "+e;return l("[versionCheck()] "+p),alert(p),!1}function c(e){document.location="jnlp:"+function(e){var i;if(function(e){for(var i=["http://","https://","file://"],t=0;t<i.length;t++)if(e.toLowerCase().startsWith(i[t]))return!0;return!1}(e))i=e;else{var t=window.location.href,n=t.lastIndexOf("/");i=(n>-1?t.substring(0,n+1):t+"/")+e}return i}(e)}function d(){return"Edge"==f.getBrowser()||"Chrome"==f.browserName2||"FirefoxNoPlugin"==f.browserName2&&!u("1.8*",!1)||"NoActiveX"==f.browserName2}function p(e){var i="https://java.com/dt-redirect";return null==e||0==e.length?i:("&"==e.charAt(0)&&(e=e.substring(1,e.length)),i+"?"+e)}"function"!=typeof String.prototype.startsWith&&(String.prototype.startsWith=function(e,i){return i=i||0,this.indexOf(e,i)===i});var f={debug:null,version:"20120801",firefoxJavaVersion:null,useStaticMimeType:!1,myInterval:null,preInstallJREList:null,brand:null,locale:null,installType:null,EAInstallEnabled:!1,EarlyAccessURL:null,oldMimeType:"application/npruntime-scriptable-plugin;DeploymentToolkit",mimeType:"application/java-deployment-toolkit",launchButtonPNG:function(){var e="//java.com/js/webstart.png";try{return-1!=document.location.protocol.indexOf("http")?e:"https:"+e}catch(i){return"https:"+e}}(),browserName:null,browserName2:null,getJREs:function(){var e=new Array;if(this.isPluginInstalled())for(var i=this.getPlugin().jvms,t=0;t<i.getLength();t++)e[t]=i.get(t).version;else{var n=this.getBrowser();"MSIE"==n?this.testUsingActiveX("9")?e[0]="9":this.testUsingActiveX("1.8.0")?e[0]="1.8.0":this.testUsingActiveX("1.7.0")?e[0]="1.7.0":this.testUsingActiveX("1.6.0")?e[0]="1.6.0":this.testUsingActiveX("1.5.0")?e[0]="1.5.0":this.testUsingActiveX("1.4.2")?e[0]="1.4.2":this.testForMSVM()&&(e[0]="1.1"):"Netscape Family"==n&&(this.getJPIVersionUsingMimeType(),null!=this.firefoxJavaVersion?e[0]=this.firefoxJavaVersion:this.testUsingMimeTypes("9")?e[0]="9":this.testUsingMimeTypes("1.8")?e[0]="1.8.0":this.testUsingMimeTypes("1.7")?e[0]="1.7.0":this.testUsingMimeTypes("1.6")?e[0]="1.6.0":this.testUsingMimeTypes("1.5")?e[0]="1.5.0":this.testUsingMimeTypes("1.4.2")?e[0]="1.4.2":"Safari"==this.browserName2&&(this.testUsingPluginsArray("9")?e[0]="9":this.testUsingPluginsArray("1.8")?e[0]="1.8.0":this.testUsingPluginsArray("1.7")?e[0]="1.7.0":this.testUsingPluginsArray("1.6")?e[0]="1.6.0":this.testUsingPluginsArray("1.5")?e[0]="1.5.0":this.testUsingPluginsArray("1.4.2")&&(e[0]="1.4.2")))}if(this.debug)for(var r=0;r<e.length;++r)l("[getJREs()] We claim to have detected Java SE "+e[r]);return e},installJRE:function(e){return l("The Deployment Toolkit installJRE() method no longer installs JRE. It just checks if the requested version of JRE is installed and calls installLatestJRE() otherwise. More Information on usage of the Deployment Toolkit can be found in the Deployment Guide at https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/"),"undefined"!=e&&null!=e||(e="1.1"),null==e.match(o)&&(l("Invalid requestVersion argument to installJRE(): "+e),e="1.6"),!!this.versionCheck(e)||this.installLatestJRE()},isAutoInstallEnabled:function(e){return!!this.isPluginInstalled()&&(void 0===e&&(e=null),function(e){return"MSIE"!=f.browserName||!!f.compareVersionToPattern(f.getPlugin().version,["10","0","0"],!1,!0)||null!=e&&!function(e,i){if(null==e||0==e.length)return!0;var t=e.charAt(e.length-1);if("+"!=t&&"*"!=t&&-1!=e.indexOf("_")&&"_"!=t&&(e+="*",t="*"),(e=e.substring(0,e.length-1)).length>0){var n=e.charAt(e.length-1);"."!=n&&"_"!=n||(e=e.substring(0,e.length-1))}return"*"==t?0==i.indexOf(e):"+"==t&&e<=i}("1.6.0_33+",e)}(e))},isCallbackSupported:function(){return this.isPluginInstalled()&&this.compareVersionToPattern(this.getPlugin().version,["10","2","0"],!1,!0)},installLatestJRE:function(){if(l("The Deployment Toolkit installLatestJRE() method no longer installs JRE. If user's version of Java is below the security baseline it redirects user to java.com to get an updated JRE. More Information on usage of the Deployment Toolkit can be found in the Deployment Guide at ://docs.oracle.com/javase/8/docs/technotes/guides/deploy/"),!this.isPluginInstalled()||!this.getPlugin().installLatestJRE()){var e=this.getBrowser(),i=navigator.platform.toLowerCase();return"MSIE"==e?this.IEInstall():"Netscape Family"==e&&-1!=i.indexOf("win32")?this.FFInstall():(location.href=p((null!=this.locale?"&locale="+this.locale:"")+(null!=this.brand?"&brand="+this.brand:"")),!1)}return!0},runApplet:function(e,i,t){if("undefined"!=t&&null!=t||(t="1.1"),null!=t.match(r))if("?"!=this.getBrowser()){if(d()){var n=setInterval((function(){var e;"complete"==document.readyState&&(clearInterval(n),(e=document.createElement("div")).id="messagebox",e.setAttribute("style","background-color: #ffffce;text-align: left;border: solid 1px #f0c000; padding: 1.65em 1.65em .75em 0.5em; font-family: Helvetica, Arial, sans-serif; font-size: 75%; bottom:0; left:0; right:0; position:fixed; margin:auto; opacity:0.9; width:400px;"),e.innerHTML='<span style="margin-left:10px;font-weight:bold;float:right;font-size:22px;line-height:20px;cursor:pointer;color:red;" onclick="this.parentElement.style.display=\'none\';">&times;</span><img src="https://java.com/js/alert_16.png"><div style="border: .85px; margin:-2.2em 0 0.55em 2.5em;"><p>Java Plug-in is not supported by this browser. <a href="https://java.com/dt-redirect">More info</a></p>',document.body.appendChild(e))}),15);return void l("[runApplet()] Java Plug-in is not supported by this browser")}(this.versionCheck(t+"+")||this.installJRE(t+"+"))&&this.writeAppletTag(e,i)}else this.writeAppletTag(e,i);else l("[runApplet()] Invalid minimumVersion argument to runApplet():"+t)},writeAppletTag:function(e,i){var t="<applet ",n="",r=!0;for(var o in null!=i&&"object"==typeof i||(i=new Object),e)(function(e,i){for(var t=e.length,n=0;n<t;n++)if(e[n]===i)return!0;return!1})(s,o.toLowerCase())?(t+=" "+o+'="'+e[o]+'"',"code"==o&&(r=!1)):i[o]=e[o];var a=!1;for(var l in i)"codebase_lookup"==l&&(a=!0),"object"!=l&&"java_object"!=l&&"java_code"!=l||(r=!1),n+='<param name="'+l+'" value="'+i[l]+'"/>';a||(n+='<param name="codebase_lookup" value="false"/>'),r&&(t+=' code="dummy"'),t+=">",document.write(t+"\n"+n+"\n</applet>")},versionCheck:function(e){return u(e,d())},isWebStartInstalled:function(e){if(d())return!0;if("?"==this.getBrowser())return!0;"undefined"!=e&&null!=e||(e="1.4.2");var i=!1;return null!=e.match(r)?i=this.versionCheck(e+"+"):(l("[isWebStartInstaller()] Invalid minimumVersion argument to isWebStartInstalled(): "+e),i=this.versionCheck("1.4.2+")),i},getJPIVersionUsingMimeType:function(){var e,i;for(e=0;e<navigator.mimeTypes.length;++e)if(null!=(i=navigator.mimeTypes[e].type.match(/^application\/x-java-applet;jpi-version=(.*)$/)))return this.firefoxJavaVersion=i[1],void(this.useStaticMimeType=!0);for(e=0;e<navigator.mimeTypes.length;++e)null!=(i=navigator.mimeTypes[e].type.match(/^application\/x-java-applet;version=(.*)$/))&&(null==this.firefoxJavaVersion||this.compareVersions(i[1],this.firefoxJavaVersion))&&(this.firefoxJavaVersion=i[1])},launchWebStartApplication:function(e){if(this.getJPIVersionUsingMimeType(),0==u("1.7.0+",!1))if(d())c(e);else if(0==this.installJRE("1.7.0+")||0==this.isWebStartInstalled("1.7.0"))return!1;var i=null;document.documentURI&&(i=document.documentURI),null==i&&(i=document.URL);var t,n=this.getBrowser();if("MSIE"==n?t='<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="0" height="0"><PARAM name="launchjnlp" value="'+e+'"><PARAM name="docbase" value="'+encodeURIComponent(i)+'"></object>':"Netscape Family"==n&&(t='<embed type="'+(this.useStaticMimeType?"application/x-java-applet;jpi-version=":"application/x-java-applet;version=")+this.firefoxJavaVersion+'" width="0" height="0" launchjnlp="'+e+'"docbase="'+encodeURIComponent(i)+'" />'),"undefined"==document.body||null==document.body)document.write(t),document.location=i;else{var r=document.createElement("div");r.id="div1",r.style.position="relative",r.style.left="-10000px",r.style.margin="0px auto",r.className="dynamicDiv",r.innerHTML=t,document.body.appendChild(r)}},createWebStartLaunchButtonEx:function(e){var i="javascript:deployJava.launchWebStartApplication('"+e+"');";document.write('<a href="'+i+'" onMouseOver="window.status=\'\'; return true;"><img src="'+this.launchButtonPNG+'" border="0" /></a>')},createWebStartLaunchButton:function(e,i){var t="javascript:if (!deployJava.isWebStartInstalled(&quot;"+i+"&quot;)) {if (deployJava.installLatestJRE()) {if (deployJava.launch(&quot;"+e+"&quot;)) {}}} else {if (deployJava.launch(&quot;"+e+"&quot;)) {}}";document.write('<a href="'+t+'" onMouseOver="window.status=\'\'; return true;"><img src="'+this.launchButtonPNG+'" border="0" /></a>')},launch:function(e){return document.location=e,!0},launchEx:function(e){return c(e),!0},isPluginInstalled:function(){var e=this.getPlugin();return!(!e||!e.jvms)},isAutoUpdateEnabled:function(){return!!this.isPluginInstalled()&&this.getPlugin().isAutoUpdateEnabled()},setAutoUpdateEnabled:function(){return!!this.isPluginInstalled()&&this.getPlugin().setAutoUpdateEnabled()},setInstallerType:function(e){return l("The Deployment Toolkit no longer installs JRE. Method setInstallerType() is no-op. More Information on usage of the Deployment Toolkit can be found in the Deployment Guide at ://docs.oracle.com/javase/8/docs/technotes/guides/deploy/"),!1},setAdditionalPackages:function(e){return l("The Deployment Toolkit no longer installs JRE. Method setAdditionalPackages() is no-op. More Information on usage of the Deployment Toolkit can be found in the Deployment Guide at ://docs.oracle.com/javase/8/docs/technotes/guides/deploy/"),!1},setEarlyAccess:function(e){this.EAInstallEnabled=e},isPlugin2:function(){if(this.isPluginInstalled()&&this.versionCheck("1.6.0_10+"))try{return this.getPlugin().isPlugin2()}catch(e){}return!1},allowPlugin:function(){return this.getBrowser(),"Safari"!=this.browserName2&&"Opera"!=this.browserName2},getPlugin:function(){this.refresh();var e=null;return this.allowPlugin()&&(e=document.getElementById("deployJavaPlugin")),e},compareVersionToPattern:function(e,i,t,n){if(e==undefined||i==undefined)return!1;var o=e.match(r);if(null!=o){for(var a=0,s=new Array,l=1;l<o.length;++l)"string"==typeof o[l]&&""!=o[l]&&(s[a]=o[l],a++);var u=Math.min(s.length,i.length);if(n){for(var c=0;c<u;++c){var d=parseInt(s[c]),p=parseInt(i[c]);if(d<p)return!1;if(d>p)return!0}return!0}for(var f=0;f<u;++f)if(s[f]!=i[f])return!1;return!!t||s.length==i.length}return!1},getBrowser:function(){if(null==this.browserName){var e=navigator.userAgent.toLowerCase();if(l("[getBrowser()] navigator.userAgent.toLowerCase() -> "+e),-1!=e.indexOf("edge"))this.browserName="Edge",this.browserName2="Edge";else if(-1!=e.indexOf("msie")&&-1==e.indexOf("opera"))this.browserName="MSIE",this.browserName2="MSIE";else if(-1!=e.indexOf("trident")||-1!=e.indexOf("Trident")){if(this.browserName="MSIE",this.browserName2="MSIE",-1!=e.indexOf("windows nt 6.3")||-1!=e.indexOf("windows nt 6.2"))try{new ActiveXObject("htmlfile")}catch(i){this.browserName2="NoActiveX"}}else-1!=e.indexOf("iphone")?(this.browserName="Netscape Family",this.browserName2="iPhone"):-1!=e.indexOf("firefox")&&-1==e.indexOf("opera")?(this.browserName="Netscape Family",this.isPluginInstalled()?this.browserName2="Firefox":this.browserName2="FirefoxNoPlugin"):-1!=e.indexOf("chrome")?(this.browserName="Netscape Family",this.browserName2="Chrome"):-1!=e.indexOf("safari")?(this.browserName="Netscape Family",this.browserName2="Safari"):-1!=e.indexOf("mozilla")&&-1==e.indexOf("opera")?(this.browserName="Netscape Family",this.browserName2="Other"):-1!=e.indexOf("opera")?(this.browserName="Netscape Family",this.browserName2="Opera"):(this.browserName="?",this.browserName2="unknown");l("[getBrowser()] Detected browser name:"+this.browserName+", "+this.browserName2)}return this.browserName},testUsingActiveX:function(e){var i="JavaWebStart.isInstalled."+e+".0";if("undefined"==typeof ActiveXObject||!ActiveXObject)return l("[testUsingActiveX()] Browser claims to be IE, but no ActiveXObject object?"),!1;try{return null!=new ActiveXObject(i)}catch(t){return!1}},testForMSVM:function(){if("undefined"!=typeof oClientCaps){var e=oClientCaps.getComponentVersion("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}","ComponentID");return""!=e&&"5,0,5000,0"!=e}return!1},testUsingMimeTypes:function(e){if(!navigator.mimeTypes)return l("[testUsingMimeTypes()] Browser claims to be Netscape family, but no mimeTypes[] array?"),!1;for(var i=0;i<navigator.mimeTypes.length;++i){var t=navigator.mimeTypes[i].type.match(/^application\/x-java-applet\x3Bversion=(1\.8|1\.7|1\.6|1\.5|1\.4\.2)$/);if(null!=t&&this.compareVersions(t[1],e))return!0}return!1},testUsingPluginsArray:function(e){if(!navigator.plugins||!navigator.plugins.length)return!1;for(var i=navigator.platform.toLowerCase(),t=0;t<navigator.plugins.length;++t){var n=navigator.plugins[t].description;if(-1!=n.search(/^Java Switchable Plug-in (Cocoa)/)){if(this.compareVersions("1.5.0",e))return!0}else if(-1!=n.search(/^Java/)&&-1!=i.indexOf("win")&&(this.compareVersions("1.5.0",e)||this.compareVersions("1.6.0",e)))return!0}return!!this.compareVersions("1.5.0",e)},IEInstall:function(){return location.href=p((null!=this.locale?"&locale="+this.locale:"")+(null!=this.brand?"&brand="+this.brand:"")),!1},done:function(e,i){},FFInstall:function(){return location.href=p((null!=this.locale?"&locale="+this.locale:"")+(null!=this.brand?"&brand="+this.brand:"")+(null!=this.installType?"&type="+this.installType:"")),!1},compareVersions:function(e,i){for(var t=e.split("."),n=i.split("."),r=0;r<t.length;++r)t[r]=Number(t[r]);for(var o=0;o<n.length;++o)n[o]=Number(n[o]);return 2==t.length&&(t[2]=0),t[0]>n[0]||!(t[0]<n[0])&&(t[1]>n[1]||!(t[1]<n[1])&&(t[2]>n[2]||!(t[2]<n[2])))},enableAlerts:function(){this.browserName=null,this.debug=!0},poll:function(){this.refresh();var e=this.getJREs();0==this.preInstallJREList.length&&0!=e.length&&clearInterval(this.myInterval),0!=this.preInstallJREList.length&&0!=e.length&&this.preInstallJREList[0]!=e[0]&&clearInterval(this.myInterval)},writePluginTag:function(){var e=this.getBrowser();"MSIE"==e?document.write('<object classid="clsid:CAFEEFAC-DEC7-0000-0001-ABCDEFFEDCBA" id="deployJavaPlugin" width="0" height="0"></object>'):"Netscape Family"==e&&this.allowPlugin()&&this.writeEmbedTag()},refresh:function(){(navigator.plugins.refresh(!1),"Netscape Family"==this.getBrowser()&&this.allowPlugin())&&(null==document.getElementById("deployJavaPlugin")&&this.writeEmbedTag())},writeEmbedTag:function(){var e=!1;if(null!=navigator.mimeTypes){for(var i=0;i<navigator.mimeTypes.length;i++)navigator.mimeTypes[i].type==this.mimeType&&navigator.mimeTypes[i].enabledPlugin&&(document.write('<embed id="deployJavaPlugin" type="'+this.mimeType+'" hidden="true" />'),e=!0);if(!e)for(var t=0;t<navigator.mimeTypes.length;t++)navigator.mimeTypes[t].type==this.oldMimeType&&navigator.mimeTypes[t].enabledPlugin&&document.write('<embed id="deployJavaPlugin" type="'+this.oldMimeType+'" hidden="true" />')}}};if(f.writePluginTag(),null==f.locale){var h=null;if(null==h)try{h=navigator.userLanguage}catch(m){}if(null==h)try{h=navigator.systemLanguage}catch(m){}if(null==h)try{h=navigator.language}catch(m){}null!=h&&(h.replace("-","_"),f.locale=h)}e.exports=f},function(e,i,t){"use strict";var n=t(10);e.exports=function(){if(this.isFlash()){var e=n.getFlashPlayerVersion();return e.major+"."+e.minor+"."+e.release}return""}},function(e,i){
/*! SWFObject v2.3.20130521 <http://github.com/swfobject/swfobject>
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var t,n,r,o,a,s,l="undefined",u="object",c="Shockwave Flash",d="application/x-shockwave-flash",p="SWFObjectExprInst",f="onreadystatechange",h=window,m=document,g=navigator,w=!1,v=[],b=[],y=[],x=[],S=!1,C=!1,T=!0,k=!1,E=function(){var e=typeof m.getElementById!==l&&typeof m.getElementsByTagName!==l&&typeof m.createElement!==l,i=g.userAgent.toLowerCase(),t=g.platform.toLowerCase(),n=/win/.test(t||i),r=/mac/.test(t||i),o=!!/webkit/.test(i)&&parseFloat(i.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")),a="Microsoft Internet Explorer"===g.appName,s=[0,0,0],p=null;if(typeof g.plugins!==l&&typeof g.plugins[c]===u)(p=g.plugins[c].description)&&typeof g.mimeTypes!==l&&g.mimeTypes[d]&&g.mimeTypes[d].enabledPlugin&&(w=!0,a=!1,p=p.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),s[0]=G(p.replace(/^(.*)\..*$/,"$1")),s[1]=G(p.replace(/^.*\.(.*)\s.*$/,"$1")),s[2]=/[a-zA-Z]/.test(p)?G(p.replace(/^.*[a-zA-Z]+(.*)$/,"$1")):0);else if(typeof h.ActiveXObject!==l)try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");f&&(p=f.GetVariable("$version"))&&(a=!0,s=[G((p=p.split(" ")[1].split(","))[0]),G(p[1]),G(p[2])])}catch(v){}return{w3:e,pv:s,wk:o,ie:a,win:n,mac:r}}();function A(){if(!S&&document.getElementsByTagName("body")[0]){try{var e,i=J("span");i.style.display="none",(e=m.getElementsByTagName("body")[0].appendChild(i)).parentNode.removeChild(e),e=null,i=null}catch(r){return}S=!0;for(var t=v.length,n=0;n<t;n++)v[n]()}}function M(e){S?e():v[v.length]=e}function P(){var e=b.length;if(e>0)for(var i=0;i<e;i++){var t=b[i].id,n=b[i].callbackFn,r={success:!1,id:t};if(E.pv[0]>0){var o=D(t);if(o)if(!_(b[i].swfVersion)||E.wk&&E.wk<312)if(b[i].expressInstall&&I()){var a={};a.data=b[i].expressInstall,a.width=o.getAttribute("width")||"0",a.height=o.getAttribute("height")||"0",o.getAttribute("class")&&(a.styleclass=o.getAttribute("class")),o.getAttribute("align")&&(a.align=o.getAttribute("align"));for(var s={},u=o.getElementsByTagName("param"),c=u.length,d=0;d<c;d++)"movie"!==u[d].getAttribute("name").toLowerCase()&&(s[u[d].getAttribute("name")]=u[d].getAttribute("value"));B(a,s,t,n)}else L(o),n&&n(r);else z(t,!0),n&&(r.success=!0,r.ref=N(t),r.id=t,n(r))}else if(z(t,!0),n){var p=N(t);p&&typeof p.SetVariable!==l&&(r.success=!0,r.ref=p,r.id=p.id),n(r)}}}function N(e){var i=null,t=D(e);return t&&"OBJECT"===t.nodeName.toUpperCase()&&(i=typeof t.SetVariable!==l?t:t.getElementsByTagName(u)[0]||t),i}function I(){return!C&&_("6.0.65")&&(E.win||E.mac)&&!(E.wk&&E.wk<312)}function B(e,i,a,s){var u=D(a);if(a=V(a),C=!0,r=s||null,o={success:!1,id:a},u){"OBJECT"===u.nodeName.toUpperCase()?(t=j(u),n=null):(t=u,n=a),e.id=p,(typeof e.width===l||!/%$/.test(e.width)&&G(e.width)<310)&&(e.width="310"),(typeof e.height===l||!/%$/.test(e.height)&&G(e.height)<137)&&(e.height="137");var c=E.ie?"ActiveX":"PlugIn",d="MMredirectURL="+encodeURIComponent(h.location.toString().replace(/&/g,"%26"))+"&MMplayerType="+c+"&MMdoctitle="+encodeURIComponent(m.title.slice(0,47)+" - Flash Player Installation");if(typeof i.flashvars!==l?i.flashvars+="&"+d:i.flashvars=d,E.ie&&4!=u.readyState){var f=J("div");a+="SWFObjectNew",f.setAttribute("id",a),u.parentNode.insertBefore(f,u),u.style.display="none",R(u)}O(e,i,a)}}function L(e){if(E.ie&&4!=e.readyState){e.style.display="none";var i=J("div");e.parentNode.insertBefore(i,e),i.parentNode.replaceChild(j(e),i),R(e)}else e.parentNode.replaceChild(j(e),e)}function j(e){var i=J("div");if(E.win&&E.ie)i.innerHTML=e.innerHTML;else{var t=e.getElementsByTagName(u)[0];if(t){var n=t.childNodes;if(n)for(var r=n.length,o=0;o<r;o++)1==n[o].nodeType&&"PARAM"===n[o].nodeName||8==n[o].nodeType||i.appendChild(n[o].cloneNode(!0))}}return i}function O(e,i,t){var n,r,o,a,s=D(t);if(t=V(t),E.wk&&E.wk<312)return n;if(s){var c,p,f,h=E.ie?J("div"):J(u);for(f in typeof e.id===l&&(e.id=t),i)Object.prototype.hasOwnProperty.call(i,f)&&"movie"!==f.toLowerCase()&&U(h,f,i[f]);for(c in E.ie&&(r=e.data,o=h.innerHTML,(a=J("div")).innerHTML="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'><param name='movie' value='"+r+"'>"+o+"</object>",h=a.firstChild),e)Object.prototype.hasOwnProperty.call(e,c)&&("styleclass"===(p=c.toLowerCase())?h.setAttribute("class",e[c]):"classid"!==p&&"data"!==p&&h.setAttribute(c,e[c]));E.ie?y[y.length]=e.id:(h.setAttribute("type",d),h.setAttribute("data",e.data)),s.parentNode.replaceChild(h,s),n=h}return n}function U(e,i,t){var n=J("param");n.setAttribute("name",i),n.setAttribute("value",t),e.appendChild(n)}function R(e){var i=D(e);i&&"OBJECT"===i.nodeName.toUpperCase()&&(E.ie?(i.style.display="none",function t(){if(4==i.readyState){for(var e in i)"function"==typeof i[e]&&(i[e]=null);i.parentNode.removeChild(i)}else setTimeout(t,10)}()):i.parentNode.removeChild(i))}function F(e){return e&&e.nodeType&&1===e.nodeType}function V(e){return F(e)?e.id:e}function D(e){if(F(e))return e;var i=null;try{i=m.getElementById(e)}catch(t){}return i}function J(e){return m.createElement(e)}function G(e){return parseInt(e,10)}function _(e){e+="";var i=E.pv,t=e.split(".");return t[0]=G(t[0]),t[1]=G(t[1])||0,t[2]=G(t[2])||0,i[0]>t[0]||i[0]==t[0]&&i[1]>t[1]||i[0]==t[0]&&i[1]==t[1]&&i[2]>=t[2]}function W(e,i,t,n){var r=m.getElementsByTagName("head")[0];if(r){var o="string"==typeof t?t:"screen";if(n&&(a=null,s=null),!a||s!=o){var u=J("style");u.setAttribute("type","text/css"),u.setAttribute("media",o),a=r.appendChild(u),E.ie&&typeof m.styleSheets!==l&&m.styleSheets.length>0&&(a=m.styleSheets[m.styleSheets.length-1]),s=o}a&&(typeof a.addRule!==l?a.addRule(e,i):typeof m.createTextNode!==l&&a.appendChild(m.createTextNode(e+" {"+i+"}")))}}function z(e,i){if(T){var t=i?"visible":"hidden",n=D(e);S&&n?n.style.visibility=t:"string"==typeof e&&W("#"+e,"visibility:"+t)}}function q(e){return null!==/[\\"<>.;]/.exec(e)&&typeof encodeURIComponent!==l?encodeURIComponent(e):e}E.w3&&((typeof m.readyState!==l&&("complete"===m.readyState||"interactive"===m.readyState)||typeof m.readyState===l&&(m.getElementsByTagName("body")[0]||m.body))&&A(),S||(typeof m.addEventListener!==l&&m.addEventListener("DOMContentLoaded",A,!1),E.ie&&(m.attachEvent(f,(function X(){"complete"===m.readyState&&(m.detachEvent(f,X),A())})),h==top&&function $(){if(!S){try{m.documentElement.doScroll("left")}catch(e){return void setTimeout($,0)}A()}}()),E.wk&&function K(){S||(/loaded|complete/.test(m.readyState)?A():setTimeout(K,0))}())),v[0]=function(){w?function(){var e=m.getElementsByTagName("body")[0],i=J(u);i.setAttribute("style","visibility: hidden;"),i.setAttribute("type",d);var t=e.appendChild(i);if(t){var n=0;!function r(){if(typeof t.GetVariable!==l)try{var o=t.GetVariable("$version");o&&(o=o.split(" ")[1].split(","),E.pv=[G(o[0]),G(o[1]),G(o[2])])}catch(a){E.pv=[8,0,0]}else if(n<10)return n++,void setTimeout(r,10);e.removeChild(i),t=null,P()}()}else P()}():P()},E.ie&&window.attachEvent("onunload",(function(){for(var e=x.length,i=0;i<e;i++)x[i][0].detachEvent(x[i][1],x[i][2]);for(var t=y.length,n=0;n<t;n++)R(y[n]);for(var r in E)E[r]=null;for(var o in E=null,H)H[o]=null;H=null}));var H={registerObject:function(e,i,t,n){if(E.w3&&e&&i){var r={};r.id=e,r.swfVersion=i,r.expressInstall=t,r.callbackFn=n,b[b.length]=r,z(e,!1)}else n&&n({success:!1,id:e})},getObjectById:function(e){if(E.w3)return N(e)},embedSWF:function(e,i,t,n,r,o,a,s,c,d){var p=V(i),f={success:!1,id:p};E.w3&&!(E.wk&&E.wk<312)&&e&&i&&t&&n&&r?(z(p,!1),M((function(){t+="",n+="";var h={};if(c&&typeof c===u)for(var m in c)h[m]=c[m];h.data=e,h.width=t,h.height=n;var g={};if(s&&typeof s===u)for(var w in s)g[w]=s[w];if(a&&typeof a===u)for(var v in a)if(Object.prototype.hasOwnProperty.call(a,v)){var b=k?encodeURIComponent(v):v,y=k?encodeURIComponent(a[v]):a[v];typeof g.flashvars!==l?g.flashvars+="&"+b+"="+y:g.flashvars=b+"="+y}if(_(r)){var x=O(h,g,i);h.id==p&&z(p,!0),f.success=!0,f.ref=x,f.id=x.id}else{if(o&&I())return h.data=o,void B(h,g,i,d);z(p,!0)}d&&d(f)}))):d&&d(f)},switchOffAutoHideShow:function(){T=!1},enableUriEncoding:function(e){k=typeof e===l||e},ua:E,getFlashPlayerVersion:function(){return{major:E.pv[0],minor:E.pv[1],release:E.pv[2]}},hasFlashPlayerVersion:_,createSWF:function(e,i,t){return E.w3?O(e,i,t):undefined},showExpressInstall:function(e,i,t,n){E.w3&&I()&&B(e,i,t,n)},removeSWF:function(e){E.w3&&R(e)},createCSS:function(e,i,t,n){E.w3&&W(e,i,t,n)},addDomLoadEvent:M,addLoadEvent:function(e){if(typeof h.addEventListener!==l)h.addEventListener("load",e,!1);else if(typeof m.addEventListener!==l)m.addEventListener("load",e,!1);else if(typeof h.attachEvent!==l)!function(e,i,t){e.attachEvent(i,t),x[x.length]=[e,i,t]}(h,"onload",e);else if("function"==typeof h.onload){var i=h.onload;h.onload=function(){i(),e()}}else h.onload=e},getQueryParamValue:function(e){var i=m.location.search||m.location.hash;if(i){if(/\?/.test(i)&&(i=i.split("?")[1]),!e)return q(i);for(var t=i.split("&"),n=0;n<t.length;n++)if(t[n].substring(0,t[n].indexOf("="))==e)return q(t[n].substring(t[n].indexOf("=")+1))}return""},expressInstallCallback:function(){if(C){var e=D(p);e&&t&&(e.parentNode.replaceChild(t,e),n&&(z(n,!0),E.ie&&(t.style.display="block")),r&&r(o)),C=!1}},version:"2.3"};e.exports=H},function(e,i,t){"use strict";var n=t(6),r=t(0).ClientJS,o=t(7),a=t(9);function s(){r.apply(this,arguments)}n(s,r),s.prototype.getJavaVersion=o,s.prototype.getFlashVersion=a,i.ClientJS=s}])}));
//# sourceMappingURL=client.min.js.map
{
"name": "clientjs",
"version": "0.1.11",
"version": "0.2.0",
"homepage": "https://clientjs.org",
"repository": {
"type": "git",
"url": "git://github.com/jackspirou/clientjs.git"
"url": "https://github.com/jackspirou/clientjs.git"
},

@@ -35,23 +35,55 @@ "description": "Device information and digital fingerprinting written in pure JavaScript.",

"scripts": {
"build": "webpack -c webpack.config.js",
"checks": "npm run lint && npm test && npm run build",
"lint": "eslint --fix '**/*.js'",
"lint:check": "eslint '**/*.js'",
"postinstall": "node scripts/install.js",
"test": "node scripts/test.js",
"posttest": "./node_modules/karma/bin/karma start karma/aircover.conf.js",
"prepublish": "./node_modules/gulp/bin/gulp.js"
"posttest": "npm run test:aircover",
"prepare": "husky install",
"prepublishOnly": "npm run checks",
"preversion": "npm run checks",
"test": "npm run test:local",
"test:local": "karma start karma/local.conf.js",
"test:aircover": "karma start karma/aircover.conf.js",
"test:drone": "karma start karma/drone.conf.js"
},
"main": "dist/client.min.js",
"main": "src/client.js",
"browser": "dist/client.base.min.js",
"files": [
"dist/**/*",
"logo.jpg",
"scripts/**/*",
"src/**/*",
"!.eslintrc.js"
],
"devDependencies": {
"gulp": "^3.9.0",
"gulp-closure-compiler": "^0.4.0",
"jasmine-core": "~2.4.1",
"karma": "^0.13.19",
"karma-chrome-launcher": "~0.2.2",
"karma-coverage": "^0.5.3",
"karma-firefox-launcher": "~0.1.7",
"karma-jasmine": "^0.3.6",
"karma-opera-launcher": "~0.3.0",
"karma-phantomjs-launcher": "^0.2.3",
"karma-safari-launcher": "~0.1.1",
"karma-sauce-launcher": "^0.3.0",
"phantomjs": "^1.9.19"
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@release-it/keep-a-changelog": "^2.3.0",
"eslint": "^7.32.0",
"husky": "^7.0.1",
"istanbul-instrumenter-loader": "^3.0.1",
"jasmine-core": "^3.9.0",
"karma": "^6.3.4",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-firefox-launcher": "^2.1.1",
"karma-jasmine": "^4.0.1",
"karma-opera-launcher": "^1.0.0",
"karma-safari-launcher": "^1.0.0",
"karma-sauce-launcher": "^4.3.6",
"karma-sourcemap-loader": "^0.3.8",
"karma-webpack": "^4.0.2",
"lint-staged": "^11.1.2",
"release-it": "^14.11.5",
"terser-webpack-plugin": "^4.2.3",
"webpack": "^4.44.2",
"webpack-cli": "^4.8.0"
},
"dependencies": {
"globalthis": "^1.0.2",
"inherits": "^2.0.4",
"murmurhash-js": "^1.0.0",
"ua-parser-js": "^0.7.28"
},
"license": "Apache-2.0",

@@ -58,0 +90,0 @@ "licenses": [

@@ -1,5 +0,7 @@

# ClientJS [![Sauce Test Status](https://saucelabs.com/buildstatus/clientjs)](https://saucelabs.com/u/clientjs) [![Build Status](http://beta.drone.io/api/badges/jackspirou/clientjs/status.svg)](http://beta.drone.io/jackspirou/clientjs) [![Aircover Coverage](https://aircover.co/badges/jackspirou/clientjs/coverage.svg)](https://aircover.co/jackspirou/clientjs) [![Join the chat at https://gitter.im/jackspirou/clientjs](https://badges.gitter.im/jackspirou/clientjs.svg)](https://gitter.im/jackspirou/clientjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
![Sauce Test Status](logo.jpg)
**Device information and digital fingerprinting written in _pure JavaScript_.**
**Device information and digital fingerprinting written in _pure_ JavaScript.**
[![Sauce Test Status](https://saucelabs.com/buildstatus/clientjs)](https://saucelabs.com/u/clientjs) [![Build Status](http://beta.drone.io/api/badges/jackspirou/clientjs/status.svg)](http://beta.drone.io/jackspirou/clientjs) [![Aircover Coverage](https://aircover.co/badges/jackspirou/clientjs/coverage.svg)](https://aircover.co/jackspirou/clientjs) [![Kanban board for ClientJS issues at https://huboard.com/jackspirou/clientjs](https://img.shields.io/badge/Hu-Board-7965cc.svg)](https://huboard.com/jackspirou/clientjs) [![Join the chat at https://gitter.im/jackspirou/clientjs](https://badges.gitter.im/jackspirou/clientjs.svg)](https://gitter.im/jackspirou/clientjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Sauce Test Status](https://saucelabs.com/browser-matrix/clientjs.svg)](https://saucelabs.com/u/clientjs)

@@ -13,3 +15,3 @@

- It's pure native JavaScript
- It's decently lightweight at ~45 KB
- It's decently lightweight at ~50 KB (full bundle) or ~28 KB (minimal bundle)
- All user data points are available by design, not just the 32bit integer fingerprint

@@ -21,3 +23,3 @@

## Installation
To use ClientJS, simply include `dist/client.min.js`.
To use ClientJS, simply include `dist/client.min.js` or one of the other bundles (see [bundles](#bundles) section for more details)

@@ -39,7 +41,11 @@ ClientJS is available for download via [bower](http://bower.io/search/?q=clientjs) and [npm](https://www.npmjs.com/package/clientjs).

## Fingerprinting
Digital fingerprints are based on device/browser settings. They allow you to make an "educated guess" about the identify of a new or returning visitor. By taking multiple data points, combining them, and representing them as a number, you can be surprisingly accurate at recognizing not only browsers and devices, but also individual users.
Digital fingerprints are based on device/browser settings.
They allow you to make an "educated guess" about the identify of a new or returning visitor.
By taking multiple data points, combining them, and representing them as a number, you can be surprisingly accurate at recognizing not only browsers and devices, but also individual users.
This is useful for identifying users/devices without cookies or sessions. It is not a full proof technique, but it has been shown to be statistically significant at accurately identifying devices.
This is useful for identifying users or devices without cookies or sessions.
It is not a full proof technique, but it has been shown to be statistically significant at accurately identifying devices.
Simply create a new ClientJS object. Then call the `getFingerprint()` method which will return the browser/device fingerprint as a 32bit integer hash ID.
Simply create a new ClientJS object.
Then call the `getFingerprint()` method which will return the browser/device fingerprint as a 32bit integer hash ID.

@@ -50,6 +56,16 @@ Below is an example of how to generate and display a fingerprint:

// Create a new ClientJS object
var client = new ClientJS();
// in a browser:
const client = new ClientJS();
// or in a CommonJS environment:
const { ClientJS } = require('clientjs');
const client = new ClientJS();
// or via ES6 imports:
import { ClientJS } from 'clientjs';
const client = new ClientJS();
// Get the client's fingerprint id
var fingerprint = client.getFingerprint();
const fingerprint = client.getFingerprint();

@@ -78,2 +94,10 @@ // Print the 32bit hash id to the console

## Bundles
For maximum flexibility, this library is distributed in 4 different pre-bundled variants for the browser:
- `dist/client.min.js` - full distribution bundle, contains Flash and Java detection mechanisms
- `dist/client.flash.min.js` - contains Flash detection mechanism but misses Java detection (`getJavaVersion()` will throw an error when called)
- `dist/client.java.min.js` - contains Java detection mechanism but misses Flash detection (`getFlashVersion()` will throw an error when called)
- `dist/client.base.min.js` - misses both, Flash and Java detection mechanisms (`getFlashVersion()` and `getJavaVersion()` will throw an error when called)
## Available Methods

@@ -84,4 +108,4 @@ Below is the current list of available methods to find information on a users browser/device.

```
var client = new ClientJS();
```js
const client = new ClientJS();

@@ -142,5 +166,5 @@ client.getBrowserData();

client.isJava();
client.getJavaVersion();
client.getJavaVersion(); // functional only in java and full builds, throws an error otherwise
client.isFlash();
client.getFlashVersion();
client.getFlashVersion(); // functional only in flash and full builds, throws an error otherwise
client.isSilverlight();

@@ -169,3 +193,4 @@ client.getSilverlightVersion();

## Shoulders of Giants
It is important to note this project owes much to other pieces great works. We had the advantage of observing how others had approached this problem.
It is important to note this project owes much to other pieces great works.
We had the advantage of observing how others had approached this problem.

@@ -178,9 +203,9 @@ Built Upon:

## Vendor Code
All dependencies are included into `client.min.js` when the `build.sh` bash file minifies the project. Vendored dependencies should not be included separately.
All dependencies are included into the minified bundles when the `npm run build` script minifies the project. Vendored dependencies should not be included separately.
Dependencies Include:
- ua-parser.js
- fontdetect.js
- swfobject.js
- swfobject.js - included only in full and Flash builds (only `client.min.js` and `client.flash.min.js`)
- murmurhash3.js
- deployJava.js - included only in full and Java builds (only `client.min.js` and `client.java.min.js`)

@@ -190,3 +215,3 @@ ## Contributing

Once cloned, install all dependencies. ClientJS uses [Karma](https://karma-runner.github.io/0.13/index.html) as its testing environment.
Once cloned, install all dependencies. ClientJS uses [Karma](https://karma-runner.github.io/5.2/index.html) as its testing environment.

@@ -196,5 +221,2 @@ ```shell

$ npm install
# If you want tu run karma from the command line
$ npm install -g karma-cli
```

@@ -205,3 +227,3 @@

```shell
$ karma start
$ npm test
```

@@ -208,0 +230,0 @@

@@ -0,1 +1,3 @@

'use strict';
// Creates sauce.json if not yet present after install

@@ -2,0 +4,0 @@ var fs = require('fs');

@@ -1,690 +0,16 @@

//
// ClientJS. An easy to use, simple, and flexible client information library written in JavaScript.
//
// Version: 0.1.11
//
// Original Author: Jack Spirou
// Original Data: 5 Nov 2013
'use strict';
// ClientJS. Return a JavaScript object containing information collected about a client.
// Return browser/device fingerprint as a 32 bit integer hash ID.
var inherits = require('inherits');
var ClientJS = require('./client.base').ClientJS;
var getJavaVersion = require('./modules/java-detection');
var getFlashVersion = require('./modules/flash-detection');
// BUILT UPON:
// - https://github.com/Valve/fingerprintjs
// - http://darkwavetech.com/device_fingerprint.html
// - detectmobilebrowsers.com JavaScript Mobile Detection Script
function ClientJSFull() {
ClientJS.apply(this, arguments);
}
inherits(ClientJSFull, ClientJS);
// Dependencies Include:
// - ua-parser.js
// - fontdetect.js
// - swfobject.js
// - murmurhash3.js
ClientJSFull.prototype.getJavaVersion = getJavaVersion;
ClientJSFull.prototype.getFlashVersion = getFlashVersion;
// BROWSER FINGERPRINT DATA POINTS
// - userAgent
// - screenPrint
// - colordepth
// - currentResolution
// - availableResolution
// - deviceXDPI
// - deviceYDPI
// - plugin list
// - font list
// - localStorage
// - sessionStorage
// - timezone
// - language
// - systemLanguage
// - cookies
// - canvasPrint
// METHOD Naming CONVENTION
// is[MethodName] = return boolean
// get[MethodName] = return int|string|object
// METHODS
//
// var client = new ClientJS();
//
// client.getSoftwareVersion();
// client.getBrowserData();
// client.getFingerPrint();
// client.getCustomFingerprint(...);
//
// client.getUserAgent();
// client.getUserAgentLowerCase();
//
// client.getBrowser();
// client.getBrowserVersion();
// client.getBrowserMajorVersion();
// client.isIE();
// client.isChrome();
// client.isFirefox();
// client.isSafari();
// client.isMobileSafari();
// client.isOpera();
//
// client.getEngine();
// client.getEngineVersion();
//
// client.getOS();
// client.getOSVersion();
// client.isWindows();
// client.isMac();
// client.isLinux();
// client.isUbuntu();
// client.isSolaris();
//
// client.getDevice();
// client.getDeviceType();
// client.getDeviceVendor();
//
// client.getCPU();
//
// client.isMobile();
// client.isMobileMajor();
// client.isMobileAndroid();
// client.isMobileOpera();
// client.isMobileWindows();
// client.isMobileBlackBerry();
//
// client.isMobileIOS();
// client.isIphone();
// client.isIpad();
// client.isIpod();
//
// client.getScreenPrint();
// client.getColorDepth();
// client.getCurrentResolution();
// client.getAvailableResolution();
// client.getDeviceXDPI();
// client.getDeviceYDPI();
//
// client.getPlugins();
// client.isJava();
// client.getJavaVersion();
// client.isFlash();
// client.getFlashVersion();
// client.isSilverlight();
// client.getSilverlightVersion();
//
// client.getMimeTypes();
// client.isMimeTypes();
//
// client.isFont();
// client.getFonts();
//
// client.isLocalStorage();
// client.isSessionStorage();
// client.isCookie();
//
// client.getTimeZone();
//
// client.getLanguage();
// client.getSystemLanguage();
//
// client.isCanvas();
// client.getCanvasPrint();
// Anonymous auto JavaScript function execution.
(function(scope) {
'use strict';
var browserData; // Global user agent browser object.
var fontDetective; // Global font detective object.
// ClientJS constructor which sets the browserData object and returs the client object.
var ClientJS = function() {
var parser = new(window.UAParser || exports.UAParser);
browserData = parser.getResult();
fontDetective = new Detector();
return this;
};
// ClientJS prototype which contains all methods.
ClientJS.prototype = {
//
// MAIN METHODS
//
// Get Software Version. Return a string containing this software version number.
getSoftwareVersion: function() {
var version = "0.1.11";
return version;
},
// Get Browser Data. Return an object containing browser user agent.
getBrowserData: function() {
return browserData;
},
// Get Fingerprint. Return a 32-bit integer representing the browsers fingerprint.
getFingerprint: function() {
var bar = '|';
var userAgent = browserData.ua;
var screenPrint = this.getScreenPrint();
var pluginList = this.getPlugins();
var fontList = this.getFonts();
var localStorage = this.isLocalStorage();
var sessionStorage = this.isSessionStorage();
var timeZone = this.getTimeZone();
var language = this.getLanguage();
var systemLanguage = this.getSystemLanguage();
var cookies = this.isCookie();
var canvasPrint = this.getCanvasPrint();
var key = userAgent + bar + screenPrint + bar + pluginList + bar + fontList + bar + localStorage + bar + sessionStorage + bar + timeZone + bar + language + bar + systemLanguage + bar + cookies + bar + canvasPrint;
var seed = 256;
return murmurhash3_32_gc(key, seed);
},
// Get Custom Fingerprint. Take a string of datapoints and eturn a 32-bit integer representing the browsers fingerprint.
getCustomFingerprint: function() {
var bar = '|';
var key = "";
for (var i = 0; i < arguments.length; i++) {
key += arguments[i] + bar;
}
return murmurhash3_32_gc(key, 256);
},
//
// USER AGENT METHODS
//
// Get User Agent. Return a string containing unparsed user agent.
getUserAgent: function() {
return browserData.ua;
},
// Get User Agent Lower Case. Return a lowercase string containing the user agent.
getUserAgentLowerCase: function() {
return browserData.ua.toLowerCase();
},
//
// BROWSER METHODS
//
// Get Browser. Return a string containing the browser name.
getBrowser: function() {
return browserData.browser.name;
},
// Get Browser Version. Return a string containing the browser version.
getBrowserVersion: function() {
return browserData.browser.version;
},
// Get Browser Major Version. Return a string containing the major browser version.
getBrowserMajorVersion: function() {
return browserData.browser.major;
},
// Is IE. Check if the browser is IE.
isIE: function() {
return (/IE/i.test(browserData.browser.name));
},
// Is Chrome. Check if the browser is Chrome.
isChrome: function() {
return (/Chrome/i.test(browserData.browser.name));
},
// Is Firefox. Check if the browser is Firefox.
isFirefox: function() {
return (/Firefox/i.test(browserData.browser.name));
},
// Is Safari. Check if the browser is Safari.
isSafari: function() {
return (/Safari/i.test(browserData.browser.name));
},
// Is Mobile Safari. Check if the browser is Safari.
isMobileSafari: function() {
return (/Mobile\sSafari/i.test(browserData.browser.name));
},
// Is Opera. Check if the browser is Opera.
isOpera: function() {
return (/Opera/i.test(browserData.browser.name));
},
//
// ENGINE METHODS
//
// Get Engine. Return a string containing the browser engine.
getEngine: function() {
return browserData.engine.name;
},
// Get Engine Version. Return a string containing the browser engine version.
getEngineVersion: function() {
return browserData.engine.version;
},
//
// OS METHODS
//
// Get OS. Return a string containing the OS.
getOS: function() {
return browserData.os.name;
},
// Get OS Version. Return a string containing the OS Version.
getOSVersion: function() {
return browserData.os.version;
},
// Is Windows. Check if the OS is Windows.
isWindows: function() {
return (/Windows/i.test(browserData.os.name));
},
// Is Mac. Check if the OS is Mac.
isMac: function() {
return (/Mac/i.test(browserData.os.name));
},
// Is Linux. Check if the OS is Linux.
isLinux: function() {
return (/Linux/i.test(browserData.os.name));
},
// Is Ubuntu. Check if the OS is Ubuntu.
isUbuntu: function() {
return (/Ubuntu/i.test(browserData.os.name));
},
// Is Solaris. Check if the OS is Solaris.
isSolaris: function() {
return (/Solaris/i.test(browserData.os.name));
},
//
// DEVICE METHODS
//
// Get Device. Return a string containing the device.
getDevice: function() {
return browserData.device.model;
},
// Get Device Type. Return a string containing the device type.
getDeviceType: function() {
return browserData.device.type;
},
// Get Device Vendor. Return a string containing the device vendor.
getDeviceVendor: function() {
return browserData.device.vendor;
},
//
// CPU METHODS
//
// Get CPU. Return a string containing the CPU architecture.
getCPU: function() {
return browserData.cpu.architecture;
},
//
// MOBILE METHODS
//
// Is Mobile. Check if the browser is on a mobile device.
isMobile: function() {
// detectmobilebrowsers.com JavaScript Mobile Detection Script
var dataString = browserData.ua || navigator.vendor || window.opera;
return (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(dataString) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(dataString.substr(0, 4)));
},
// Is Mobile Major. Check if the browser is on a major mobile device.
isMobileMajor: function() {
return (this.isMobileAndroid() || this.isMobileBlackBerry() || this.isMobileIOS() || this.isMobileOpera() || this.isMobileWindows());
},
// Is Mobile. Check if the browser is on an android mobile device.
isMobileAndroid: function() {
if (browserData.ua.match(/Android/i)) {
return true;
}
return false;
},
// Is Mobile Opera. Check if the browser is on an opera mobile device.
isMobileOpera: function() {
if (browserData.ua.match(/Opera Mini/i)) {
return true;
}
return false;
},
// Is Mobile Windows. Check if the browser is on a windows mobile device.
isMobileWindows: function() {
if (browserData.ua.match(/IEMobile/i)) {
return true;
}
return false;
},
// Is Mobile BlackBerry. Check if the browser is on a blackberry mobile device.
isMobileBlackBerry: function() {
if (browserData.ua.match(/BlackBerry/i)) {
return true;
}
return false;
},
//
// MOBILE APPLE METHODS
//
// Is Mobile iOS. Check if the browser is on an Apple iOS device.
isMobileIOS: function() {
if (browserData.ua.match(/iPhone|iPad|iPod/i)) {
return true;
}
return false;
},
// Is Iphone. Check if the browser is on an Apple iPhone.
isIphone: function() {
if (browserData.ua.match(/iPhone/i)) {
return true;
}
return false;
},
// Is Ipad. Check if the browser is on an Apple iPad.
isIpad: function() {
if (browserData.ua.match(/iPad/i)) {
return true;
}
return false;
},
// Is Ipod. Check if the browser is on an Apple iPod.
isIpod: function() {
if (browserData.ua.match(/iPod/i)) {
return true;
}
return false;
},
//
// SCREEN METHODS
//
// Get Screen Print. Return a string containing screen information.
getScreenPrint: function() {
return "Current Resolution: " + this.getCurrentResolution() + ", Available Resolution: " + this.getAvailableResolution() + ", Color Depth: " + this.getColorDepth() + ", Device XDPI: " + this.getDeviceXDPI() + ", Device YDPI: " + this.getDeviceYDPI();
},
// Get Color Depth. Return a string containing the color depth.
getColorDepth: function() {
return screen.colorDepth;
},
// Get Current Resolution. Return a string containing the current resolution.
getCurrentResolution: function() {
return screen.width + "x" + screen.height;
},
// Get Available Resolution. Return a string containing the available resolution.
getAvailableResolution: function() {
return screen.availWidth + "x" + screen.availHeight;
},
// Get Device XPDI. Return a string containing the device XPDI.
getDeviceXDPI: function() {
return screen.deviceXDPI;
},
// Get Device YDPI. Return a string containing the device YDPI.
getDeviceYDPI: function() {
return screen.deviceYDPI;
},
//
// PLUGIN METHODS
//
// Get Plugins. Return a string containing a list of installed plugins.
getPlugins: function() {
var pluginsList = "";
for (var i = 0; i < navigator.plugins.length; i++) {
if (i == navigator.plugins.length - 1) {
pluginsList += navigator.plugins[i].name;
} else {
pluginsList += navigator.plugins[i].name + ", ";
}
}
return pluginsList;
},
// Is Java. Check if Java is installed.
isJava: function() {
return navigator.javaEnabled();
},
// Get Java Version. Return a string containing the Java Version.
getJavaVersion: function() {
return deployJava.getJREs().toString();
},
// Is Flash. Check if Flash is installed.
isFlash: function() {
var objPlugin = navigator.plugins["Shockwave Flash"];
if (objPlugin) {
return true;
}
return false;
},
// Get Flash Version. Return a string containing the Flash Version.
getFlashVersion: function() {
if (this.isFlash()) {
objPlayerVersion = swfobject.getFlashPlayerVersion();
return objPlayerVersion.major + "." + objPlayerVersion.minor + "." + objPlayerVersion.release;
}
return "";
},
// Is Silverlight. Check if Silverlight is installed.
isSilverlight: function() {
var objPlugin = navigator.plugins["Silverlight Plug-In"];
if (objPlugin) {
return true;
}
return false;
},
// Get Silverlight Version. Return a string containing the Silverlight Version.
getSilverlightVersion: function() {
if (this.isSilverlight()) {
var objPlugin = navigator.plugins["Silverlight Plug-In"];
return objPlugin.description;
}
return "";
},
//
// MIME TYPE METHODS
//
// Is Mime Types. Check if a mime type is installed.
isMimeTypes: function() {
if (navigator.mimeTypes.length) {
return true;
}
return false;
},
// Get Mime Types. Return a string containing a list of installed mime types.
getMimeTypes: function() {
var mimeTypeList = "";
for (var i = 0; i < navigator.mimeTypes.length; i++) {
if (i == navigator.mimeTypes.length - 1) {
mimeTypeList += navigator.mimeTypes[i].description;
} else {
mimeTypeList += navigator.mimeTypes[i].description + ", ";
}
}
return mimeTypeList;
},
//
// FONT METHODS
//
// Is Font. Check if a font is installed.
isFont: function(font) {
return fontDetective.detect(font);
},
// Get Fonts. Return a string containing a list of installed fonts.
getFonts: function() {
var fontArray = ["Abadi MT Condensed Light", "Adobe Fangsong Std", "Adobe Hebrew", "Adobe Ming Std", "Agency FB", "Aharoni", "Andalus", "Angsana New", "AngsanaUPC", "Aparajita", "Arab", "Arabic Transparent", "Arabic Typesetting", "Arial Baltic", "Arial Black", "Arial CE", "Arial CYR", "Arial Greek", "Arial TUR", "Arial", "Batang", "BatangChe", "Bauhaus 93", "Bell MT", "Bitstream Vera Serif", "Bodoni MT", "Bookman Old Style", "Braggadocio", "Broadway", "Browallia New", "BrowalliaUPC", "Calibri Light", "Calibri", "Californian FB", "Cambria Math", "Cambria", "Candara", "Castellar", "Casual", "Centaur", "Century Gothic", "Chalkduster", "Colonna MT", "Comic Sans MS", "Consolas", "Constantia", "Copperplate Gothic Light", "Corbel", "Cordia New", "CordiaUPC", "Courier New Baltic", "Courier New CE", "Courier New CYR", "Courier New Greek", "Courier New TUR", "Courier New", "DFKai-SB", "DaunPenh", "David", "DejaVu LGC Sans Mono", "Desdemona", "DilleniaUPC", "DokChampa", "Dotum", "DotumChe", "Ebrima", "Engravers MT", "Eras Bold ITC", "Estrangelo Edessa", "EucrosiaUPC", "Euphemia", "Eurostile", "FangSong", "Forte", "FrankRuehl", "Franklin Gothic Heavy", "Franklin Gothic Medium", "FreesiaUPC", "French Script MT", "Gabriola", "Gautami", "Georgia", "Gigi", "Gisha", "Goudy Old Style", "Gulim", "GulimChe", "GungSeo", "Gungsuh", "GungsuhChe", "Haettenschweiler", "Harrington", "Hei S", "HeiT", "Heisei Kaku Gothic", "Hiragino Sans GB", "Impact", "Informal Roman", "IrisUPC", "Iskoola Pota", "JasmineUPC", "KacstOne", "KaiTi", "Kalinga", "Kartika", "Khmer UI", "Kino MT", "KodchiangUPC", "Kokila", "Kozuka Gothic Pr6N", "Lao UI", "Latha", "Leelawadee", "Levenim MT", "LilyUPC", "Lohit Gujarati", "Loma", "Lucida Bright", "Lucida Console", "Lucida Fax", "Lucida Sans Unicode", "MS Gothic", "MS Mincho", "MS PGothic", "MS PMincho", "MS Reference Sans Serif", "MS UI Gothic", "MV Boli", "Magneto", "Malgun Gothic", "Mangal", "Marlett", "Matura MT Script Capitals", "Meiryo UI", "Meiryo", "Menlo", "Microsoft Himalaya", "Microsoft JhengHei", "Microsoft New Tai Lue", "Microsoft PhagsPa", "Microsoft Sans Serif", "Microsoft Tai Le", "Microsoft Uighur", "Microsoft YaHei", "Microsoft Yi Baiti", "MingLiU", "MingLiU-ExtB", "MingLiU_HKSCS", "MingLiU_HKSCS-ExtB", "Miriam Fixed", "Miriam", "Mongolian Baiti", "MoolBoran", "NSimSun", "Narkisim", "News Gothic MT", "Niagara Solid", "Nyala", "PMingLiU", "PMingLiU-ExtB", "Palace Script MT", "Palatino Linotype", "Papyrus", "Perpetua", "Plantagenet Cherokee", "Playbill", "Prelude Bold", "Prelude Condensed Bold", "Prelude Condensed Medium", "Prelude Medium", "PreludeCompressedWGL Black", "PreludeCompressedWGL Bold", "PreludeCompressedWGL Light", "PreludeCompressedWGL Medium", "PreludeCondensedWGL Black", "PreludeCondensedWGL Bold", "PreludeCondensedWGL Light", "PreludeCondensedWGL Medium", "PreludeWGL Black", "PreludeWGL Bold", "PreludeWGL Light", "PreludeWGL Medium", "Raavi", "Rachana", "Rockwell", "Rod", "Sakkal Majalla", "Sawasdee", "Script MT Bold", "Segoe Print", "Segoe Script", "Segoe UI Light", "Segoe UI Semibold", "Segoe UI Symbol", "Segoe UI", "Shonar Bangla", "Showcard Gothic", "Shruti", "SimHei", "SimSun", "SimSun-ExtB", "Simplified Arabic Fixed", "Simplified Arabic", "Snap ITC", "Sylfaen", "Symbol", "Tahoma", "Times New Roman Baltic", "Times New Roman CE", "Times New Roman CYR", "Times New Roman Greek", "Times New Roman TUR", "Times New Roman", "TlwgMono", "Traditional Arabic", "Trebuchet MS", "Tunga", "Tw Cen MT Condensed Extra Bold", "Ubuntu", "Umpush", "Univers", "Utopia", "Utsaah", "Vani", "Verdana", "Vijaya", "Vladimir Script", "Vrinda", "Webdings", "Wide Latin", "Wingdings"];
var fontString = "";
for (var i = 0; i < fontArray.length; i++) {
if (fontDetective.detect(fontArray[i])) {
if (i == fontArray.length - 1) {
fontString += fontArray[i];
} else {
fontString += fontArray[i] + ", ";
}
}
}
return fontString;
},
//
// STORAGE METHODS
//
// Is Local Storage. Check if local storage is enabled.
isLocalStorage: function() {
try {
return !!scope.localStorage;
} catch (e) {
return true; // SecurityError when referencing it means it exists
}
},
// Is Session Storage. Check if session storage is enabled.
isSessionStorage: function() {
try {
return !!scope.sessionStorage;
} catch (e) {
return true; // SecurityError when referencing it means it exists
}
},
// Is Cookie. Check if cookies are enabled.
isCookie: function() {
return navigator.cookieEnabled;
},
//
// TIME METHODS
//
// Get Time Zone. Return a string containing the time zone.
getTimeZone: function() {
var rightNow = new Date();
return String(String(rightNow).split("(")[1]).split(")")[0];
},
//
// LANGUAGE METHODS
//
// Get Language. Return a string containing the user language.
getLanguage: function() {
return navigator.language;
},
// Get System Language. Return a string containing the system language.
getSystemLanguage: function() {
return navigator.systemLanguage;
},
//
// CANVAS METHODS
//
// Is Canvas. Check if the canvas element is enabled.
isCanvas: function() {
// create a canvas element
var elem = document.createElement('canvas');
// try/catch for older browsers that don't support the canvas element
try {
// check if context and context 2d exists
return !!(elem.getContext && elem.getContext('2d'));
} catch (e) {
// catch if older browser
return false;
}
},
// Get Canvas Print. Return a string containing the canvas URI data.
getCanvasPrint: function() {
// create a canvas element
var canvas = document.createElement('canvas');
// define a context var that will be used for browsers with canvas support
var ctx;
// try/catch for older browsers that don't support the canvas element
try {
// attempt to give ctx a 2d canvas context value
ctx = canvas.getContext('2d');
} catch (e) {
// return empty string if canvas element not supported
return "";
}
// https://www.browserleaks.com/canvas#how-does-it-work
// Text with lowercase/uppercase/punctuation symbols
var txt = 'ClientJS,org <canvas> 1.0';
ctx.textBaseline = "top";
// The most common type
ctx.font = "14px 'Arial'";
ctx.textBaseline = "alphabetic";
ctx.fillStyle = "#f60";
ctx.fillRect(125, 1, 62, 20);
// Some tricks for color mixing to increase the difference in rendering
ctx.fillStyle = "#069";
ctx.fillText(txt, 2, 15);
ctx.fillStyle = "rgba(102, 204, 0, 0.7)";
ctx.fillText(txt, 4, 17);
return canvas.toDataURL();
}
};
if (typeof module === 'object' && typeof exports !== "undefined") {
module.exports = ClientJS;
}
scope.ClientJS = ClientJS;
})(window);
exports.ClientJS = ClientJSFull;

@@ -1,805 +0,1454 @@

var deployJava = function() {
var l = {
core: ["id", "class", "title", "style"],
i18n: ["lang", "dir"],
events: ["onclick", "ondblclick", "onmousedown", "onmouseup", "onmouseover", "onmousemove", "onmouseout", "onkeypress", "onkeydown", "onkeyup"],
applet: ["codebase", "code", "name", "archive", "object", "width", "height", "alt", "align", "hspace", "vspace"],
object: ["classid", "codebase", "codetype", "data", "type", "archive", "declare", "standby", "height", "width", "usemap", "name", "tabindex", "align", "border", "hspace", "vspace"]
/* globals ActiveXObject:readonly, oClientCaps:readonly */
/* eslint-disable strict */
/*
* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 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 THE COPYRIGHT OWNER OR
* CONTRIBUTORS 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.
*/
/*
* deployJava.js
*
* This file is part of the Deployment Toolkit. It provides functions for web
* pages to detect the presence of a JRE and easily run
* applets or Web Start programs. More Information on usage of the
* Deployment Toolkit can be found in the Deployment Guide at:
* https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/
*
* The "live" copy of this file may be found at :
* http://java.com/js/deployJava.js.
* For web pages provisioned using https, you may want to access the copy at:
* https://java.com/js/deployJava.js.
*
* You are encouraged to link directly to the live copies.
* The above files are stripped of comments and whitespace for performance,
* You can access this file w/o the whitespace and comments removed at:
* https://java.com/js/deployJava.txt.
*
*/
/* The following regular expression is used as the base for the parsing
* of the version string. The version string could be either in the old format
* (1.7.0_65, 1.7.0, 1.7) or in the new format (9.1.2.3, 9.1.2, 9.1, 9)
* and must include only VNUM parts of the version string (the full
* version string format is $VNUM(-$PRE)?(\+$BUILD)?(-$OPT)?, see JEP 223 for more details)
*
* ^ - Beginning of the string
* ( - Capturing group 1
* \\d+ - Match any digit one or more times
* ) - Match once
* (?: - Non capturing group
* \\. - Match '.' character
* ( - Capturing group 2
* \\d+ - Match any digit one or more times
* ) - Match once
* (?: - Non capturing group
* \\. - Match '.' character
* ( - Capturing group 3
* \\d+ - Match any digit one or more times
* ) - Match once
* (?: - Non capturing group
* [_\\.] - Math '_' (old version format) or '.' (new version format)
* ( - Capturing group 4
* \\d+ - Match any digit one or more times
* ) - Match once
* )? - Match zero or one time
* )? - Match zero or one time
* )? - Match zero or one time
*
*
*
*/
'use strict';
var version_regex_base = '^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:[_\\.](\\d+))?)?)?';
/*
* version_regex_base - see version_regex_base comment above
* $ - End of the string
*
*/
var version_regex_strict = version_regex_base + '$';
/*
* version_regex_base - see version_regex_base comment above
* ( - Capturing group 5
* \\* - Match '*'
* | - OR
* \\+ - Match '+'
* )? - Match zero or one time
* $ - End of string
*
*/
var version_regex_with_family_modifier = version_regex_base + '(\\*|\\+)?$';
/** HTML attribute filter implementation */
var hattrs = {
core: ['id', 'class', 'title', 'style'],
applet: [
'codebase',
'code',
'name',
'archive',
'object',
'width',
'height',
'alt',
'align',
'hspace',
'vspace',
],
};
var applet_valid_attrs = hattrs.applet.concat(hattrs.core);
// startsWith() is not supported by IE
if (typeof String.prototype.startsWith !== 'function') {
String.prototype.startsWith = function (searchString, position) {
position = position || 0;
return this.indexOf(searchString, position) === position;
};
var b = l.object.concat(l.core, l.i18n, l.events);
var m = l.applet.concat(l.core);
}
function g(o) {
if (!d.debug) {
return
// generic log function, use console.log unless it isn't available
// then revert to alert()
function log(message) {
if (!deployJava.debug) {
return;
}
if (console.log) {
console.log(message);
} else {
alert(message);
}
}
function showMessageBox() {
var message =
'Java Plug-in is not supported by this browser. <a href="https://java.com/dt-redirect">More info</a>';
var mbStyle =
'background-color: #ffffce;text-align: left;border: solid 1px #f0c000; padding: 1.65em 1.65em .75em 0.5em; font-family: Helvetica, Arial, sans-serif; font-size: 75%; bottom:0; left:0; right:0; position:fixed; margin:auto; opacity:0.9; width:400px;';
var messageStyle = 'border: .85px; margin:-2.2em 0 0.55em 2.5em;';
var closeButtonStyle =
'margin-left:10px;font-weight:bold;float:right;font-size:22px;line-height:20px;cursor:pointer;color:red;';
var messageBox =
'<span style="' +
closeButtonStyle +
'" onclick="this.parentElement.style.display=\'none\';">&times;</span><img src="https://java.com/js/alert_16.png"><div style="' +
messageStyle +
'"><p>' +
message +
'</p>';
var divTag = document.createElement('div');
divTag.id = 'messagebox';
divTag.setAttribute('style', mbStyle);
divTag.innerHTML = messageBox;
document.body.appendChild(divTag);
}
//checks where given version string matches query
//
//NB: assume format is correct. Can add format check later if needed
// from dtjava.js
function versionCheckEx(query, version) {
if (query == null || query.length == 0) return true;
var c = query.charAt(query.length - 1);
//if it is not explicit pattern but does not have update version then need to append *
if (c != '+' && c != '*' && query.indexOf('_') != -1 && c != '_') {
query = query + '*';
c = '*';
}
query = query.substring(0, query.length - 1);
//if query ends with ".", "_" then we want to strip it to allow match of "1.6.*" to shorter form such as "1.6"
//TODO: add support for match of "1.7.0*" to "1.7"?
if (query.length > 0) {
var z = query.charAt(query.length - 1);
if (z == '.' || z == '_') {
query = query.substring(0, query.length - 1);
}
if (console.log) {
console.log(o)
} else {
alert(o)
}
}
if (c == '*') {
//it is match if version starts from it
return version.indexOf(query) == 0;
} else if (c == '+') {
//match if query string is lexicographically smaller
return query <= version;
}
return false;
}
function k(p, o) {
if (p == null || p.length == 0) {
return true
function doVersionCheck(versionPattern, noplugin) {
var index = 0;
var matchData = versionPattern.match(version_regex_with_family_modifier);
if (matchData != null) {
if (noplugin) {
return true;
}
var r = p.charAt(p.length - 1);
if (r != "+" && r != "*" && (p.indexOf("_") != -1 && r != "_")) {
p = p + "*";
r = "*"
}
p = p.substring(0, p.length - 1);
if (p.length > 0) {
var q = p.charAt(p.length - 1);
if (q == "." || q == "_") {
p = p.substring(0, p.length - 1)
// default is exact version match
// examples:
// local machine has 1.7.0_04 only installed
// exact match request is "1.7.0_05": return false
// family match request is "1.7.0*": return true
// minimum match request is "1.6+": return true
var familyMatch = false;
var minMatch = false;
var patternArray = new Array();
for (var i = 1; i < matchData.length; ++i) {
// browser dependency here.
// Fx sets 'undefined', IE sets '' string for unmatched groups
if (typeof matchData[i] == 'string' && matchData[i] != '') {
patternArray[index] = matchData[i];
index++;
}
}
if (r == "*") {
return (o.indexOf(p) == 0)
} else {
if (r == "+") {
return p <= o
if (patternArray[patternArray.length - 1] == '+') {
// + specified in request - doing a minimum match
minMatch = true;
familyMatch = false;
patternArray.length--;
} else if (patternArray[patternArray.length - 1] == '*') {
// * specified in request - doing a family match
minMatch = false;
familyMatch = true;
patternArray.length--;
} else if (patternArray.length < 4) {
// versionPattern does not include all four version components
// and does not end with a star or plus, it will be treated as
// if it ended with a star. (family match)
minMatch = false;
familyMatch = true;
}
var list = deployJava.getJREs();
for (var j = 0; j < list.length; ++j) {
if (deployJava.compareVersionToPattern(list[j], patternArray, familyMatch, minMatch)) {
return true;
}
}
return false
return false;
} else {
var msg = 'Invalid versionPattern passed to versionCheck: ' + versionPattern;
log('[versionCheck()] ' + msg);
alert(msg);
return false;
}
}
function e() {
var o = "//java.com/js/webstart.png";
try {
return document.location.protocol.indexOf("http") != -1 ? o : "http:" + o
} catch (p) {
return "http:" + o
function isWebStartFound() {
return doVersionCheck('1.7.0+', false);
}
function isAbsoluteUrl(url) {
var protocols = ['http://', 'https://', 'file://'];
for (var i = 0; i < protocols.length; i++) {
if (url.toLowerCase().startsWith(protocols[i])) {
return true;
}
}
return false;
}
function n(p) {
var o = "http://java.com/dt-redirect";
if (p == null || p.length == 0) {
return o
}
if (p.charAt(0) == "&") {
p = p.substring(1, p.length)
}
return o + "?" + p
function getAbsoluteUrl(jnlp) {
var absoluteUrl;
if (isAbsoluteUrl(jnlp)) {
absoluteUrl = jnlp;
} else {
var location = window.location.href;
var pos = location.lastIndexOf('/');
var docbase = pos > -1 ? location.substring(0, pos + 1) : location + '/';
absoluteUrl = docbase + jnlp;
}
return absoluteUrl;
}
function j(q, p) {
var o = q.length;
for (var r = 0; r < o; r++) {
if (q[r] === p) {
return true
}
}
return false
function launchWithJnlpProtocol(jnlp) {
document.location = 'jnlp:' + getAbsoluteUrl(jnlp);
}
function isNoPluginWebBrowser() {
var browser = deployJava.getBrowser();
if (
browser == 'Edge' ||
deployJava.browserName2 == 'Chrome' ||
(deployJava.browserName2 == 'FirefoxNoPlugin' && !doVersionCheck('1.8*', false)) ||
deployJava.browserName2 == 'NoActiveX'
) {
return true;
}
return false;
}
function c(o) {
return j(m, o.toLowerCase())
function getWebStartLaunchIconURL() {
var imageUrl = '//java.com/js/webstart.png';
try {
// for http/https; use protocol less url; use http for all other protocol
return document.location.protocol.indexOf('http') != -1 ? imageUrl : 'https:' + imageUrl;
} catch (err) {
return 'https:' + imageUrl;
}
}
function i(o) {
return j(b, o.toLowerCase())
// GetJava page
function constructGetJavaURL(query) {
var getJavaURL = 'https://java.com/dt-redirect';
if (query == null || query.length == 0) return getJavaURL;
if (query.charAt(0) == '&') {
query = query.substring(1, query.length);
}
return getJavaURL + '?' + query;
}
function a(o) {
if ("MSIE" != deployJava.browserName) {
return true
}
if (deployJava.compareVersionToPattern(deployJava.getPlugin().version, ["10", "0", "0"], false, true)) {
return true
}
if (o == null) {
return false
}
return !k("1.6.0_33+", o)
function arHas(ar, attr) {
var len = ar.length;
for (var i = 0; i < len; i++) {
if (ar[i] === attr) return true;
}
var d = {
debug: null,
version: "20120801",
firefoxJavaVersion: null,
myInterval: null,
preInstallJREList: null,
returnPage: null,
brand: null,
locale: null,
installType: null,
EAInstallEnabled: false,
EarlyAccessURL: null,
oldMimeType: "application/npruntime-scriptable-plugin;DeploymentToolkit",
mimeType: "application/java-deployment-toolkit",
launchButtonPNG: e(),
browserName: null,
browserName2: null,
getJREs: function() {
var t = new Array();
if (this.isPluginInstalled()) {
var r = this.getPlugin();
var o = r.jvms;
for (var q = 0; q < o.getLength(); q++) {
t[q] = o.get(q).version
}
} else {
var p = this.getBrowser();
if (p == "MSIE") {
if (this.testUsingActiveX("1.7.0")) {
t[0] = "1.7.0"
} else {
if (this.testUsingActiveX("1.6.0")) {
t[0] = "1.6.0"
} else {
if (this.testUsingActiveX("1.5.0")) {
t[0] = "1.5.0"
} else {
if (this.testUsingActiveX("1.4.2")) {
t[0] = "1.4.2"
} else {
if (this.testForMSVM()) {
t[0] = "1.1"
}
}
}
}
}
} else {
if (p == "Netscape Family") {
this.getJPIVersionUsingMimeType();
if (this.firefoxJavaVersion != null) {
t[0] = this.firefoxJavaVersion
} else {
if (this.testUsingMimeTypes("1.7")) {
t[0] = "1.7.0"
} else {
if (this.testUsingMimeTypes("1.6")) {
t[0] = "1.6.0"
} else {
if (this.testUsingMimeTypes("1.5")) {
t[0] = "1.5.0"
} else {
if (this.testUsingMimeTypes("1.4.2")) {
t[0] = "1.4.2"
} else {
if (this.browserName2 == "Safari") {
if (this.testUsingPluginsArray("1.7.0")) {
t[0] = "1.7.0"
} else {
if (this.testUsingPluginsArray("1.6")) {
t[0] = "1.6.0"
} else {
if (this.testUsingPluginsArray("1.5")) {
t[0] = "1.5.0"
} else {
if (this.testUsingPluginsArray("1.4.2")) {
t[0] = "1.4.2"
}
}
}
}
}
}
}
}
}
}
}
}
return false;
}
function isValidAppletAttr(attr) {
return arHas(applet_valid_attrs, attr.toLowerCase());
}
/**
* returns true if we can enable DT plugin auto-install without chance of
* deadlock on cert mismatch dialog
*
* requestedJREVersion param is optional - if null, it will be
* treated as installing any JRE version
*
* DT plugin for 6uX only knows about JRE installer signed by SUN cert.
* If it encounter Oracle signed JRE installer, it will have chance of
* deadlock when running with IE. This function is to guard against this.
*/
function enableWithoutCertMisMatchWorkaround(requestedJREVersion) {
// Non-IE browser are okay
if ('MSIE' != deployJava.browserName) return true;
// if DT plugin is 10.0.0 or above, return true
// This is because they are aware of both SUN and Oracle signature and
// will not show cert mismatch dialog that might cause deadlock
if (
deployJava.compareVersionToPattern(
deployJava.getPlugin().version,
['10', '0', '0'],
false,
true
)
) {
return true;
}
// If we got there, DT plugin is 6uX
if (requestedJREVersion == null) {
// if requestedJREVersion is not defined - it means ANY.
// can not guarantee it is safe to install ANY version because 6uX
// DT does not know about Oracle certificates and may deadlock
return false;
}
// 6u32 or earlier JRE installer used Sun certificate
// 6u33+ uses Oracle's certificate
// DT in JRE6 does not know about Oracle certificate => can only
// install 6u32 or earlier without risk of deadlock
return !versionCheckEx('1.6.0_33+', requestedJREVersion);
}
/* HTML attribute filters */
var deployJava = {
debug: null,
/* version of deployJava.js */
version: '20120801',
firefoxJavaVersion: null,
useStaticMimeType: false,
myInterval: null,
preInstallJREList: null,
brand: null,
locale: null,
installType: null,
EAInstallEnabled: false,
EarlyAccessURL: null,
// mime-type of the DeployToolkit plugin object
oldMimeType: 'application/npruntime-scriptable-plugin;DeploymentToolkit',
mimeType: 'application/java-deployment-toolkit',
/* location of the Java Web Start launch button graphic is right next to
* deployJava.js at:
* https://java.com/js/webstart.png
*
* Use protocol less url here for http/https support
*/
launchButtonPNG: getWebStartLaunchIconURL(),
browserName: null,
browserName2: null,
/**
* Returns an array of currently-installed JRE version strings.
* Version strings are of the form #.#[.#[_#]], with the function returning
* as much version information as it can determine, from just family
* versions ("1.4.2", "1.5") through the full version ("1.5.0_06").
*
* Detection is done on a best-effort basis. Under some circumstances
* only the highest installed JRE version will be detected, and
* JREs older than 1.4.2 will not always be detected.
*/
getJREs: function () {
var list = new Array();
if (this.isPluginInstalled()) {
var plugin = this.getPlugin();
var VMs = plugin.jvms;
for (var i = 0; i < VMs.getLength(); i++) {
list[i] = VMs.get(i).version;
}
if (this.debug) {
for (var q = 0; q < t.length; ++q) {
g("[getJREs()] We claim to have detected Java SE " + t[q])
} else {
var browser = this.getBrowser();
if (browser == 'MSIE') {
if (this.testUsingActiveX('9')) {
list[0] = '9';
} else if (this.testUsingActiveX('1.8.0')) {
list[0] = '1.8.0';
} else if (this.testUsingActiveX('1.7.0')) {
list[0] = '1.7.0';
} else if (this.testUsingActiveX('1.6.0')) {
list[0] = '1.6.0';
} else if (this.testUsingActiveX('1.5.0')) {
list[0] = '1.5.0';
} else if (this.testUsingActiveX('1.4.2')) {
list[0] = '1.4.2';
} else if (this.testForMSVM()) {
list[0] = '1.1';
}
}
return t
},
installJRE: function(r, p) {
var o = false;
if (this.isPluginInstalled() && this.isAutoInstallEnabled(r)) {
var q = false;
if (this.isCallbackSupported()) {
q = this.getPlugin().installJRE(r, p)
} else {
q = this.getPlugin().installJRE(r)
}
if (q) {
this.refresh();
if (this.returnPage != null) {
document.location = this.returnPage
} else if (browser == 'Netscape Family') {
this.getJPIVersionUsingMimeType();
if (this.firefoxJavaVersion != null) {
list[0] = this.firefoxJavaVersion;
} else if (this.testUsingMimeTypes('9')) {
list[0] = '9';
} else if (this.testUsingMimeTypes('1.8')) {
list[0] = '1.8.0';
} else if (this.testUsingMimeTypes('1.7')) {
list[0] = '1.7.0';
} else if (this.testUsingMimeTypes('1.6')) {
list[0] = '1.6.0';
} else if (this.testUsingMimeTypes('1.5')) {
list[0] = '1.5.0';
} else if (this.testUsingMimeTypes('1.4.2')) {
list[0] = '1.4.2';
} else if (this.browserName2 == 'Safari') {
if (this.testUsingPluginsArray('9')) {
list[0] = '9';
} else if (this.testUsingPluginsArray('1.8')) {
list[0] = '1.8.0';
} else if (this.testUsingPluginsArray('1.7')) {
list[0] = '1.7.0';
} else if (this.testUsingPluginsArray('1.6')) {
list[0] = '1.6.0';
} else if (this.testUsingPluginsArray('1.5')) {
list[0] = '1.5.0';
} else if (this.testUsingPluginsArray('1.4.2')) {
list[0] = '1.4.2';
}
}
return q
} else {
return this.installLatestJRE()
}
},
isAutoInstallEnabled: function(o) {
if (!this.isPluginInstalled()) {
return false
}
if (this.debug) {
for (var j = 0; j < list.length; ++j) {
log('[getJREs()] We claim to have detected Java SE ' + list[j]);
}
if (typeof o == "undefined") {
o = null
}
return a(o)
},
isCallbackSupported: function() {
return this.isPluginInstalled() && this.compareVersionToPattern(this.getPlugin().version, ["10", "2", "0"], false, true)
},
installLatestJRE: function(q) {
if (this.isPluginInstalled() && this.isAutoInstallEnabled()) {
var r = false;
if (this.isCallbackSupported()) {
r = this.getPlugin().installLatestJRE(q)
} else {
r = this.getPlugin().installLatestJRE()
}
if (r) {
this.refresh();
if (this.returnPage != null) {
document.location = this.returnPage
}
}
return r
}
return list;
},
/**
* Calls this.installLatestJRE() if the requested version of JRE is not installed.
*
* The requestVersion string is of the form #[.#[.#[_#]]][+|*],
* which includes strings such as "1.4", "1.5.0*", and "1.6.0_02+".
* A star (*) means "any version starting within this family" and
* a plus (+) means "any version greater or equal to this".
* "1.5.0*" * matches 1.5.0_06 but not 1.6.0_01, whereas
* "1.5.0+" matches both.
*
*/
installJRE: function (requestVersion) {
log(
'The Deployment Toolkit installJRE() method no longer installs JRE. It just checks ' +
'if the requested version of JRE is installed and calls installLatestJRE() otherwise. ' +
'More Information on usage of the Deployment Toolkit can be found in the ' +
'Deployment Guide at https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/'
);
if (requestVersion == 'undefined' || requestVersion == null) {
requestVersion = '1.1';
}
var matchData = requestVersion.match(version_regex_with_family_modifier);
if (matchData == null) {
log('Invalid requestVersion argument to installJRE(): ' + requestVersion);
requestVersion = '1.6';
}
if (!this.versionCheck(requestVersion)) {
return this.installLatestJRE();
}
return true;
},
/**
* returns true if jre auto install for the requestedJREVersion is enabled
* for the local system; false otherwise
*
* requestedJREVersion param is optional - if not specified, it will be
* treated as installing any JRE version
*
* DT plugin for 6uX only knows about JRE installer signed by SUN cert.
* If it encounter Oracle signed JRE installer, it will have chance of
* deadlock when running with IE. This function is to guard against this.
*/
isAutoInstallEnabled: function (requestedJREVersion) {
// if no DT plugin, return false
if (!this.isPluginInstalled()) return false;
if (typeof requestedJREVersion == 'undefined') {
requestedJREVersion = null;
}
return enableWithoutCertMisMatchWorkaround(requestedJREVersion);
},
/**
* returns true if jre install callback is supported
* callback support is added since dt plugin version 10.2.0 or above
*/
isCallbackSupported: function () {
return (
this.isPluginInstalled() &&
this.compareVersionToPattern(this.getPlugin().version, ['10', '2', '0'], false, true)
);
},
/**
* Redirects the browser window to the java.com JRE installation page,
* and (if possible) redirects back to the current URL upon successful
* installation, if the installed version of JRE is below the security
* baseline or Deployment Toolkit plugin is not installed or disabled.
*
*/
installLatestJRE: function () {
log(
"The Deployment Toolkit installLatestJRE() method no longer installs JRE. If user's version of " +
'Java is below the security baseline it redirects user to java.com to get an updated JRE. ' +
'More Information on usage of the Deployment Toolkit can be found in the Deployment Guide at ' +
'://docs.oracle.com/javase/8/docs/technotes/guides/deploy/'
);
if (!this.isPluginInstalled() || !this.getPlugin().installLatestJRE()) {
var browser = this.getBrowser();
var platform = navigator.platform.toLowerCase();
if (browser == 'MSIE') {
return this.IEInstall();
} else if (browser == 'Netscape Family' && platform.indexOf('win32') != -1) {
return this.FFInstall();
} else {
var p = this.getBrowser();
var o = navigator.platform.toLowerCase();
if ((this.EAInstallEnabled == "true") && (o.indexOf("win") != -1) && (this.EarlyAccessURL != null)) {
this.preInstallJREList = this.getJREs();
if (this.returnPage != null) {
this.myInterval = setInterval("deployJava.poll()", 3000)
}
location.href = this.EarlyAccessURL;
return false
} else {
if (p == "MSIE") {
return this.IEInstall()
} else {
if ((p == "Netscape Family") && (o.indexOf("win32") != -1)) {
return this.FFInstall()
} else {
location.href = n(((this.returnPage != null) ? ("&returnPage=" + this.returnPage) : "") + ((this.locale != null) ? ("&locale=" + this.locale) : "") + ((this.brand != null) ? ("&brand=" + this.brand) : ""))
}
}
return false
}
location.href = constructGetJavaURL(
(this.locale != null ? '&locale=' + this.locale : '') +
(this.brand != null ? '&brand=' + this.brand : '')
);
}
},
runApplet: function(p, u, r) {
if (r == "undefined" || r == null) {
r = "1.1"
}
var t = "^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";
var o = r.match(t);
if (this.returnPage == null) {
this.returnPage = document.location
}
if (o != null) {
var q = this.getBrowser();
if (q != "?") {
if (this.versionCheck(r + "+")) {
this.writeAppletTag(p, u)
} else {
if (this.installJRE(r + "+")) {
this.refresh();
location.href = document.location;
this.writeAppletTag(p, u)
// we have to return false although there may be an install
// in progress now, when complete it may go to return page
return false;
}
return true;
},
/**
* Ensures that an appropriate JRE is installed and then runs an applet.
* minimumVersion is of the form #[.#[.#[_#]]], and is the minimum
* JRE version necessary to run this applet. minimumVersion is optional,
* defaulting to the value "1.1" (which matches any JRE).
* If an equal or greater JRE is detected, runApplet() will call
* writeAppletTag(attributes, parameters) to output the applet tag,
* otherwise it will call installJRE(minimumVersion + '+').
*
* After installJRE() is called, the script will attempt to detect that the
* JRE installation has completed and begin running the applet, but there
* are circumstances (such as when the JRE installation requires a browser
* restart) when this cannot be fulfilled.
*
* As with writeAppletTag(), this function should only be called prior to
* the web page being completely rendered. Note that version wildcards
* (star (*) and plus (+)) are not supported, and including them in the
* minimumVersion will result in an error message.
*/
runApplet: function (attributes, parameters, minimumVersion) {
if (minimumVersion == 'undefined' || minimumVersion == null) {
minimumVersion = '1.1';
}
var matchData = minimumVersion.match(version_regex_strict);
if (matchData != null) {
var browser = this.getBrowser();
if (browser != '?') {
if (isNoPluginWebBrowser()) {
var readyStateCheck = setInterval(function () {
if (document.readyState == 'complete') {
clearInterval(readyStateCheck);
showMessageBox();
}
}
} else {
this.writeAppletTag(p, u)
}, 15);
log('[runApplet()] Java Plug-in is not supported by this browser');
return;
}
} else {
g("[runApplet()] Invalid minimumVersion argument to runApplet():" + r)
}
},
writeAppletTag: function(r, w) {
var o = "<applet ";
var q = "";
var t = "</applet>";
var x = true;
if (null == w || typeof w != "object") {
w = new Object()
}
for (var p in r) {
if (!c(p)) {
w[p] = r[p]
} else {
o += (" " + p + '="' + r[p] + '"');
if (p == "code") {
x = false
}
if (this.versionCheck(minimumVersion + '+')) {
this.writeAppletTag(attributes, parameters);
} else if (this.installJRE(minimumVersion + '+')) {
this.writeAppletTag(attributes, parameters);
}
}
var v = false;
for (var u in w) {
if (u == "codebase_lookup") {
v = true
}
if (u == "object" || u == "java_object" || u == "java_code") {
x = false
}
q += '<param name="' + u + '" value="' + w[u] + '"/>'
}
if (!v) {
q += '<param name="codebase_lookup" value="false"/>'
}
if (x) {
o += (' code="dummy"')
}
o += ">";
document.write(o + "\n" + q + "\n" + t)
},
versionCheck: function(p) {
var v = 0;
var x = "^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?(\\*|\\+)?$";
var y = p.match(x);
if (y != null) {
var r = false;
var u = false;
var q = new Array();
for (var t = 1; t < y.length; ++t) {
if ((typeof y[t] == "string") && (y[t] != "")) {
q[v] = y[t];
v++
}
}
if (q[q.length - 1] == "+") {
u = true;
r = false;
q.length--
} else {
if (q[q.length - 1] == "*") {
u = false;
r = true;
q.length--
} else {
if (q.length < 4) {
u = false;
r = true
}
}
}
var w = this.getJREs();
for (var t = 0; t < w.length; ++t) {
if (this.compareVersionToPattern(w[t], q, r, u)) {
return true
}
}
return false
} else {
var o = "Invalid versionPattern passed to versionCheck: " + p;
g("[versionCheck()] " + o);
alert(o);
return false
// for unknown or Safari - just try to show applet
this.writeAppletTag(attributes, parameters);
}
},
isWebStartInstalled: function(r) {
var q = this.getBrowser();
if (q == "?") {
return true
}
if (r == "undefined" || r == null) {
r = "1.4.2"
}
var p = false;
var t = "^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";
var o = r.match(t);
if (o != null) {
p = this.versionCheck(r + "+")
} else {
log('[runApplet()] Invalid minimumVersion argument to runApplet():' + minimumVersion);
}
},
/**
* Outputs an applet tag with the specified attributes and parameters, where
* both attributes and parameters are associative arrays. Each key/value
* pair in attributes becomes an attribute of the applet tag itself, while
* key/value pairs in parameters become <PARAM> tags. No version checking
* or other special behaviors are performed; the tag is simply written to
* the page using document.writeln().
*
* As document.writeln() is generally only safe to use while the page is
* being rendered, you should never call this function after the page
* has been completed.
*/
writeAppletTag: function (attributes, parameters) {
var startApplet = '<' + 'applet ';
var params = '';
var endApplet = '<' + '/' + 'applet' + '>';
var addCodeAttribute = true;
if (null == parameters || typeof parameters != 'object') {
parameters = new Object();
}
for (var attribute in attributes) {
if (!isValidAppletAttr(attribute)) {
parameters[attribute] = attributes[attribute];
} else {
g("[isWebStartInstaller()] Invalid minimumVersion argument to isWebStartInstalled(): " + r);
p = this.versionCheck("1.4.2+")
}
return p
},
getJPIVersionUsingMimeType: function() {
for (var p = 0; p < navigator.mimeTypes.length; ++p) {
var q = navigator.mimeTypes[p].type;
var o = q.match(/^application\/x-java-applet;jpi-version=(.*)$/);
if (o != null) {
this.firefoxJavaVersion = o[1];
if ("Opera" != this.browserName2) {
break
}
startApplet += ' ' + attribute + '="' + attributes[attribute] + '"';
if (attribute == 'code') {
addCodeAttribute = false;
}
}
},
launchWebStartApplication: function(r) {
var o = navigator.userAgent.toLowerCase();
this.getJPIVersionUsingMimeType();
if (this.isWebStartInstalled("1.7.0") == false) {
if ((this.installJRE("1.7.0+") == false) || ((this.isWebStartInstalled("1.7.0") == false))) {
return false
}
}
var codebaseParam = false;
for (var parameter in parameters) {
if (parameter == 'codebase_lookup') {
codebaseParam = true;
}
var u = null;
if (document.documentURI) {
u = document.documentURI
// Originally, parameter 'object' was used for serialized
// applets, later, to avoid confusion with object tag in IE
// the 'java_object' was added. Plugin supports both.
if (parameter == 'object' || parameter == 'java_object' || parameter == 'java_code') {
addCodeAttribute = false;
}
if (u == null) {
u = document.URL
params += '<param name="' + parameter + '" value="' + parameters[parameter] + '"/>';
}
if (!codebaseParam) {
params += '<param name="codebase_lookup" value="false"/>';
}
if (addCodeAttribute) {
startApplet += ' code="dummy"';
}
startApplet += '>';
document.write(startApplet + '\n' + params + '\n' + endApplet);
},
/**
* Returns true if there is a matching JRE version currently installed
* (among those detected by getJREs()). The versionPattern string is
* of the form #[.#[.#[_#]]][+|*], which includes strings such as "1.4",
* "1.5.0*", and "1.6.0_02+".
* A star (*) means "any version within this family" and a plus (+) means
* "any version greater or equal to the specified version". "1.5.0*"
* matches 1.5.0_06 but not 1.6.0_01, whereas "1.5.0+" matches both.
*
* If the versionPattern does not include all four version components
* but does not end with a star or plus, it will be treated as if it
* ended with a star. "1.5" is exactly equivalent to "1.5*", and will
* match any version number beginning with "1.5".
*
* If getJREs() is unable to detect the precise version number, a match
* could be ambiguous. For example if getJREs() detects "1.5", there is
* no way to know whether the JRE matches "1.5.0_06+". versionCheck()
* compares only as much of the version information as could be detected,
* so versionCheck("1.5.0_06+") would return true in in this case.
*
* Invalid versionPattern will result in a JavaScript error alert.
* versionPatterns which are valid but do not match any existing JRE
* release (e.g. "32.65+") will always return false.
*/
versionCheck: function (versionPattern) {
return doVersionCheck(versionPattern, isNoPluginWebBrowser());
},
/**
* Returns true if an installation of Java Web Start of the specified
* minimumVersion can be detected. minimumVersion is optional, and
* if not specified, '1.4.2' will be used.
* (Versions earlier than 1.4.2 may not be detected.)
*/
isWebStartInstalled: function (minimumVersion) {
if (isNoPluginWebBrowser()) {
return true;
}
var browser = this.getBrowser();
if (browser == '?') {
// we really don't know - better to try to use it than reinstall
return true;
}
if (minimumVersion == 'undefined' || minimumVersion == null) {
minimumVersion = '1.4.2';
}
var retval = false;
var matchData = minimumVersion.match(version_regex_strict);
if (matchData != null) {
retval = this.versionCheck(minimumVersion + '+');
} else {
log(
'[isWebStartInstaller()] Invalid minimumVersion argument to isWebStartInstalled(): ' +
minimumVersion
);
retval = this.versionCheck('1.4.2+');
}
return retval;
},
// obtain JPI version using navigator.mimeTypes array
// if found, set the version to this.firefoxJavaVersion
getJPIVersionUsingMimeType: function () {
var i, s, m;
// Walk through the full list of mime types.
// Try static MIME type first (for JRE versions earlier than JRE 9)
for (i = 0; i < navigator.mimeTypes.length; ++i) {
s = navigator.mimeTypes[i].type;
m = s.match(/^application\/x-java-applet;jpi-version=(.*)$/);
if (m != null) {
this.firefoxJavaVersion = m[1];
this.useStaticMimeType = true;
return;
}
var p = this.getBrowser();
var q;
if (p == "MSIE") {
q = '<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="0" height="0"><PARAM name="launchjnlp" value="' + r + '"><PARAM name="docbase" value="' + u + '"></object>'
} else {
if (p == "Netscape Family") {
q = '<embed type="application/x-java-applet;jpi-version=' + this.firefoxJavaVersion + '" width="0" height="0" launchjnlp="' + r + '"docbase="' + u + '" />'
}
for (i = 0; i < navigator.mimeTypes.length; ++i) {
s = navigator.mimeTypes[i].type;
m = s.match(/^application\/x-java-applet;version=(.*)$/);
if (m != null) {
if (
this.firefoxJavaVersion == null ||
this.compareVersions(m[1], this.firefoxJavaVersion)
) {
this.firefoxJavaVersion = m[1];
}
}
if (document.body == "undefined" || document.body == null) {
document.write(q);
document.location = u
} else {
var t = document.createElement("div");
t.id = "div1";
t.style.position = "relative";
t.style.left = "-10000px";
t.style.margin = "0px auto";
t.className = "dynamicDiv";
t.innerHTML = q;
document.body.appendChild(t)
}
},
// launch the specified JNLP application using the passed in jnlp file
// the jnlp file does not need to have a codebase
// this requires JRE 7 or above to work
// if machine has no JRE 7 or above, we will try to auto-install and then launch
// (function will return false if JRE auto-install failed)
launchWebStartApplication: function (jnlp) {
this.getJPIVersionUsingMimeType();
// make sure we are JRE 7 or above
if (isWebStartFound() == false) {
if (isNoPluginWebBrowser()) {
launchWithJnlpProtocol(jnlp);
} else if (this.installJRE('1.7.0+') == false || this.isWebStartInstalled('1.7.0') == false) {
return false;
}
},
createWebStartLaunchButtonEx: function(q, p) {
if (this.returnPage == null) {
this.returnPage = q
}
var jnlpDocbase = null;
// use document.documentURI for docbase
if (document.documentURI) {
jnlpDocbase = document.documentURI;
}
// fallback to document.URL if documentURI not available
if (jnlpDocbase == null) {
jnlpDocbase = document.URL;
}
var browser = this.getBrowser();
var launchTag;
if (browser == 'MSIE') {
launchTag =
'<' +
'object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" ' +
'width="0" height="0">' +
'<' +
'PARAM name="launchjnlp" value="' +
jnlp +
'"' +
'>' +
'<' +
'PARAM name="docbase" value="' +
encodeURIComponent(jnlpDocbase) +
'"' +
'>' +
'<' +
'/' +
'object' +
'>';
} else if (browser == 'Netscape Family') {
launchTag =
'<embed type="' +
(this.useStaticMimeType
? 'application/x-java-applet;jpi-version='
: 'application/x-java-applet;version=') +
this.firefoxJavaVersion +
'" ' +
'width="0" height="0" ' +
'launchjnlp="' +
jnlp +
'"' +
'docbase="' +
encodeURIComponent(jnlpDocbase) +
'"' +
' />';
}
if (document.body == 'undefined' || document.body == null) {
document.write(launchTag);
// go back to original page, otherwise current page becomes blank
document.location = jnlpDocbase;
} else {
var divTag = document.createElement('div');
divTag.id = 'div1';
divTag.style.position = 'relative';
divTag.style.left = '-10000px';
divTag.style.margin = '0px auto';
divTag.className = 'dynamicDiv';
divTag.innerHTML = launchTag;
document.body.appendChild(divTag);
}
},
createWebStartLaunchButtonEx: function (jnlp) {
var url = "javascript:deployJava.launchWebStartApplication('" + jnlp + "');";
document.write(
'<' +
'a href="' +
url +
'" onMouseOver="window.status=\'\'; ' +
'return true;"><' +
'img ' +
'src="' +
this.launchButtonPNG +
'" ' +
'border="0" /><' +
'/' +
'a' +
'>'
);
},
/**
* Outputs a launch button for the specified JNLP URL. When clicked, the
* button will ensure that an appropriate JRE is installed and then launch
* the JNLP application. minimumVersion is of the form #[.#[.#[_#]]], and
* is the minimum JRE version necessary to run this JNLP application.
* minimumVersion is optional, and if it is not specified, '1.4.2'
* will be used.
* If an appropriate JRE or Web Start installation is detected,
* the JNLP application will be launched, otherwise installLatestJRE()
* will be called.
*
* After installLatestJRE() is called, the script will attempt to detect
* that the JRE installation has completed and launch the JNLP application,
* but there are circumstances (such as when the JRE installation
* requires a browser restart) when this cannot be fulfilled.
*/
createWebStartLaunchButton: function (jnlp, minimumVersion) {
var url =
'javascript:' +
'if (!deployJava.isWebStartInstalled(&quot;' +
minimumVersion +
'&quot;)) {' +
'if (deployJava.installLatestJRE()) {' +
'if (deployJava.launch(&quot;' +
jnlp +
'&quot;)) {}' +
'}' +
'} else {' +
'if (deployJava.launch(&quot;' +
jnlp +
'&quot;)) {}' +
'}';
document.write(
'<' +
'a href="' +
url +
'" onMouseOver="window.status=\'\'; ' +
'return true;"><' +
'img ' +
'src="' +
this.launchButtonPNG +
'" ' +
'border="0" /><' +
'/' +
'a' +
'>'
);
},
/**
* Launch a JNLP application, (using the plugin if available)
*/
launch: function (jnlp) {
/*
* Using the plugin to launch Java Web Start is disabled for the time being
*/
document.location = jnlp;
return true;
},
/**
* Launch a JNLP application, using JNLP protocol handler
*/
launchEx: function (jnlp) {
launchWithJnlpProtocol(jnlp);
return true;
},
/*
* returns true if the ActiveX or XPI plugin is installed
*/
isPluginInstalled: function () {
var plugin = this.getPlugin();
if (plugin && plugin.jvms) {
return true;
} else {
return false;
}
},
/*
* returns true if the plugin is installed and AutoUpdate is enabled
*/
isAutoUpdateEnabled: function () {
if (this.isPluginInstalled()) {
return this.getPlugin().isAutoUpdateEnabled();
}
return false;
},
/*
* sets AutoUpdate on if plugin is installed
*/
setAutoUpdateEnabled: function () {
if (this.isPluginInstalled()) {
return this.getPlugin().setAutoUpdateEnabled();
}
return false;
},
/*
* sets the preferred install type : null, online, kernel
*/
setInstallerType: function (_type) {
log(
'The Deployment Toolkit no longer installs JRE. Method setInstallerType() is no-op. ' +
'More Information on usage of the Deployment Toolkit can be found in the Deployment Guide at ' +
'://docs.oracle.com/javase/8/docs/technotes/guides/deploy/'
);
return false;
},
/*
* sets additional package list - to be used by kernel installer
*/
setAdditionalPackages: function (_packageList) {
log(
'The Deployment Toolkit no longer installs JRE. Method setAdditionalPackages() is no-op. ' +
'More Information on usage of the Deployment Toolkit can be found in the Deployment Guide at ' +
'://docs.oracle.com/javase/8/docs/technotes/guides/deploy/'
);
return false;
},
/*
* sets preference to install Early Access versions if available
*/
setEarlyAccess: function (enabled) {
this.EAInstallEnabled = enabled;
},
/*
* Determines if the next generation plugin (Plugin II) is default
*/
isPlugin2: function () {
if (this.isPluginInstalled()) {
if (this.versionCheck('1.6.0_10+')) {
try {
return this.getPlugin().isPlugin2();
} catch (err) {
// older plugin w/o isPlugin2() function -
}
}
var o = "javascript:deployJava.launchWebStartApplication('" + q + "');";
document.write('<a href="' + o + '" onMouseOver="window.status=\'\'; return true;"><img src="' + this.launchButtonPNG + '" border="0" /></a>')
},
createWebStartLaunchButton: function(q, p) {
if (this.returnPage == null) {
this.returnPage = q
}
var o = "javascript:if (!deployJava.isWebStartInstalled(&quot;" + p + "&quot;)) {if (deployJava.installLatestJRE()) {if (deployJava.launch(&quot;" + q + "&quot;)) {}}} else {if (deployJava.launch(&quot;" + q + "&quot;)) {}}";
document.write('<a href="' + o + '" onMouseOver="window.status=\'\'; return true;"><img src="' + this.launchButtonPNG + '" border="0" /></a>')
},
launch: function(o) {
document.location = o;
return true
},
isPluginInstalled: function() {
var o = this.getPlugin();
if (o && o.jvms) {
return true
} else {
return false
}
},
isAutoUpdateEnabled: function() {
if (this.isPluginInstalled()) {
return this.getPlugin().isAutoUpdateEnabled()
}
return false
},
setAutoUpdateEnabled: function() {
if (this.isPluginInstalled()) {
return this.getPlugin().setAutoUpdateEnabled()
}
return false
},
setInstallerType: function(o) {
this.installType = o;
if (this.isPluginInstalled()) {
return this.getPlugin().setInstallerType(o)
}
return false
},
setAdditionalPackages: function(o) {
if (this.isPluginInstalled()) {
return this.getPlugin().setAdditionalPackages(o)
}
return false
},
setEarlyAccess: function(o) {
this.EAInstallEnabled = o
},
isPlugin2: function() {
if (this.isPluginInstalled()) {
if (this.versionCheck("1.6.0_10+")) {
try {
return this.getPlugin().isPlugin2()
} catch (o) {}
}
return false;
},
//support native DT plugin?
allowPlugin: function () {
this.getBrowser();
// Safari and Opera browsers find the plugin but it
// doesn't work, so until we can get it to work - don't use it.
var ret = 'Safari' != this.browserName2 && 'Opera' != this.browserName2;
return ret;
},
getPlugin: function () {
this.refresh();
var ret = null;
if (this.allowPlugin()) {
ret = document.getElementById('deployJavaPlugin');
}
return ret;
},
compareVersionToPattern: function (version, patternArray, familyMatch, minMatch) {
if (version == undefined || patternArray == undefined) {
return false;
}
var matchData = version.match(version_regex_strict);
if (matchData != null) {
var index = 0;
var result = new Array();
for (var i = 1; i < matchData.length; ++i) {
if (typeof matchData[i] == 'string' && matchData[i] != '') {
result[index] = matchData[i];
index++;
}
}
return false
},
allowPlugin: function() {
this.getBrowser();
var o = ("Safari" != this.browserName2 && "Opera" != this.browserName2);
return o
},
getPlugin: function() {
this.refresh();
var o = null;
if (this.allowPlugin()) {
o = document.getElementById("deployJavaPlugin")
}
return o
},
compareVersionToPattern: function(v, p, r, t) {
if (v == undefined || p == undefined) {
return false
}
var w = "^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";
var x = v.match(w);
if (x != null) {
var u = 0;
var y = new Array();
for (var q = 1; q < x.length; ++q) {
if ((typeof x[q] == "string") && (x[q] != "")) {
y[u] = x[q];
u++
var l = Math.min(result.length, patternArray.length);
// result contains what is installed in local machine
// patternArray is what is being requested by application
if (minMatch) {
// minimum version match, return true if what we have (installed)
// is greater or equal to what is requested. false otherwise.
for (var j = 0; j < l; ++j) {
var resultTemp = parseInt(result[j]);
var patternArrayTemp = parseInt(patternArray[j]);
if (resultTemp < patternArrayTemp) {
return false;
} else if (resultTemp > patternArrayTemp) {
return true;
}
}
var o = Math.min(y.length, p.length);
if (t) {
for (var q = 0; q < o; ++q) {
if (y[q] < p[q]) {
return false
} else {
if (y[q] > p[q]) {
return true
}
}
}
return true
} else {
for (var q = 0; q < o; ++q) {
if (y[q] != p[q]) {
return false
}
}
if (r) {
return true
} else {
return (y.length == p.length)
}
}
return true;
} else {
return false
}
},
getBrowser: function() {
if (this.browserName == null) {
var o = navigator.userAgent.toLowerCase();
g("[getBrowser()] navigator.userAgent.toLowerCase() -> " + o);
if ((o.indexOf("msie") != -1) && (o.indexOf("opera") == -1)) {
this.browserName = "MSIE";
this.browserName2 = "MSIE"
} else {
if (o.indexOf("iphone") != -1) {
this.browserName = "Netscape Family";
this.browserName2 = "iPhone"
} else {
if ((o.indexOf("firefox") != -1) && (o.indexOf("opera") == -1)) {
this.browserName = "Netscape Family";
this.browserName2 = "Firefox"
} else {
if (o.indexOf("chrome") != -1) {
this.browserName = "Netscape Family";
this.browserName2 = "Chrome"
} else {
if (o.indexOf("safari") != -1) {
this.browserName = "Netscape Family";
this.browserName2 = "Safari"
} else {
if ((o.indexOf("mozilla") != -1) && (o.indexOf("opera") == -1)) {
this.browserName = "Netscape Family";
this.browserName2 = "Other"
} else {
if (o.indexOf("opera") != -1) {
this.browserName = "Netscape Family";
this.browserName2 = "Opera"
} else {
this.browserName = "?";
this.browserName2 = "unknown"
}
}
}
}
}
}
for (var k = 0; k < l; ++k) {
if (result[k] != patternArray[k]) return false;
}
g("[getBrowser()] Detected browser name:" + this.browserName + ", " + this.browserName2)
}
return this.browserName
},
testUsingActiveX: function(o) {
var q = "JavaWebStart.isInstalled." + o + ".0";
if (typeof ActiveXObject == "undefined" || !ActiveXObject) {
g("[testUsingActiveX()] Browser claims to be IE, but no ActiveXObject object?");
return false
}
try {
return (new ActiveXObject(q) != null)
} catch (p) {
return false
}
},
testForMSVM: function() {
var p = "{08B0E5C0-4FCB-11CF-AAA5-00401C608500}";
if (typeof oClientCaps != "undefined") {
var o = oClientCaps.getComponentVersion(p, "ComponentID");
if ((o == "") || (o == "5,0,5000,0")) {
return false
if (familyMatch) {
// family match - return true as long as what we have
// (installed) matches up to the request pattern
return true;
} else {
return true
// exact match
// result and patternArray needs to have exact same content
return result.length == patternArray.length;
}
} else {
return false
}
},
testUsingMimeTypes: function(p) {
if (!navigator.mimeTypes) {
g("[testUsingMimeTypes()] Browser claims to be Netscape family, but no mimeTypes[] array?");
return false
}
for (var q = 0; q < navigator.mimeTypes.length; ++q) {
s = navigator.mimeTypes[q].type;
var o = s.match(/^application\/x-java-applet\x3Bversion=(1\.8|1\.7|1\.6|1\.5|1\.4\.2)$/);
if (o != null) {
if (this.compareVersions(o[1], p)) {
return true
} else {
return false;
}
},
getBrowser: function () {
if (this.browserName == null) {
var browser = navigator.userAgent.toLowerCase();
log('[getBrowser()] navigator.userAgent.toLowerCase() -> ' + browser);
// order is important here. Safari userAgent contains mozilla,
// IE 11 userAgent contains mozilla and netscape,
// and Chrome userAgent contains both mozilla and safari.
if (browser.indexOf('edge') != -1) {
this.browserName = 'Edge';
this.browserName2 = 'Edge';
} else if (browser.indexOf('msie') != -1 && browser.indexOf('opera') == -1) {
this.browserName = 'MSIE';
this.browserName2 = 'MSIE';
} else if (browser.indexOf('trident') != -1 || browser.indexOf('Trident') != -1) {
this.browserName = 'MSIE';
this.browserName2 = 'MSIE';
// For Windows 8 and Windows 8.1 check for Metro mode
if (browser.indexOf('windows nt 6.3') != -1 || browser.indexOf('windows nt 6.2') != -1) {
try {
// try to create a known ActiveX object
new ActiveXObject('htmlfile');
} catch (e) {
// ActiveX is disabled
this.browserName2 = 'NoActiveX';
}
}
}
return false
},
testUsingPluginsArray: function(p) {
if ((!navigator.plugins) || (!navigator.plugins.length)) {
return false
}
var o = navigator.platform.toLowerCase();
for (var q = 0; q < navigator.plugins.length; ++q) {
s = navigator.plugins[q].description;
if (s.search(/^Java Switchable Plug-in (Cocoa)/) != -1) {
if (this.compareVersions("1.5.0", p)) {
return true
}
} else if (browser.indexOf('iphone') != -1) {
// this included both iPhone and iPad
this.browserName = 'Netscape Family';
this.browserName2 = 'iPhone';
} else if (browser.indexOf('firefox') != -1 && browser.indexOf('opera') == -1) {
this.browserName = 'Netscape Family';
if (this.isPluginInstalled()) {
this.browserName2 = 'Firefox';
} else {
if (s.search(/^Java/) != -1) {
if (o.indexOf("win") != -1) {
if (this.compareVersions("1.5.0", p) || this.compareVersions("1.6.0", p)) {
return true
}
}
}
this.browserName2 = 'FirefoxNoPlugin';
}
} else if (browser.indexOf('chrome') != -1) {
this.browserName = 'Netscape Family';
this.browserName2 = 'Chrome';
} else if (browser.indexOf('safari') != -1) {
this.browserName = 'Netscape Family';
this.browserName2 = 'Safari';
} else if (browser.indexOf('mozilla') != -1 && browser.indexOf('opera') == -1) {
this.browserName = 'Netscape Family';
this.browserName2 = 'Other';
} else if (browser.indexOf('opera') != -1) {
this.browserName = 'Netscape Family';
this.browserName2 = 'Opera';
} else {
this.browserName = '?';
this.browserName2 = 'unknown';
}
if (this.compareVersions("1.5.0", p)) {
return true
log('[getBrowser()] Detected browser name:' + this.browserName + ', ' + this.browserName2);
}
return this.browserName;
},
testUsingActiveX: function (version) {
var objectName = 'JavaWebStart.isInstalled.' + version + '.0';
// we need the typeof check here for this to run on FF/Chrome
// the check needs to be in place here - cannot even pass ActiveXObject
// as arg to another function
if (typeof ActiveXObject == 'undefined' || !ActiveXObject) {
log('[testUsingActiveX()] Browser claims to be IE, but no ActiveXObject object?');
return false;
}
try {
return new ActiveXObject(objectName) != null;
} catch (exception) {
return false;
}
},
testForMSVM: function () {
var clsid = '{08B0E5C0-4FCB-11CF-AAA5-00401C608500}';
if (typeof oClientCaps != 'undefined') {
var v = oClientCaps.getComponentVersion(clsid, 'ComponentID');
if (v == '' || v == '5,0,5000,0') {
return false;
} else {
return true;
}
return false
},
IEInstall: function() {
location.href = n(((this.returnPage != null) ? ("&returnPage=" + this.returnPage) : "") + ((this.locale != null) ? ("&locale=" + this.locale) : "") + ((this.brand != null) ? ("&brand=" + this.brand) : ""));
return false
},
done: function(p, o) {},
FFInstall: function() {
location.href = n(((this.returnPage != null) ? ("&returnPage=" + this.returnPage) : "") + ((this.locale != null) ? ("&locale=" + this.locale) : "") + ((this.brand != null) ? ("&brand=" + this.brand) : "") + ((this.installType != null) ? ("&type=" + this.installType) : ""));
return false
},
compareVersions: function(r, t) {
var p = r.split(".");
var o = t.split(".");
for (var q = 0; q < p.length; ++q) {
p[q] = Number(p[q])
}
for (var q = 0; q < o.length; ++q) {
o[q] = Number(o[q])
}
if (p.length == 2) {
p[2] = 0
}
if (p[0] > o[0]) {
return true
}
if (p[0] < o[0]) {
return false
}
if (p[1] > o[1]) {
return true
}
if (p[1] < o[1]) {
return false
}
if (p[2] > o[2]) {
return true
}
if (p[2] < o[2]) {
return false
}
return true
},
enableAlerts: function() {
this.browserName = null;
this.debug = true
},
poll: function() {
this.refresh();
var o = this.getJREs();
if ((this.preInstallJREList.length == 0) && (o.length != 0)) {
clearInterval(this.myInterval);
if (this.returnPage != null) {
location.href = this.returnPage
} else {
return false;
}
},
testUsingMimeTypes: function (version) {
if (!navigator.mimeTypes) {
log('[testUsingMimeTypes()] Browser claims to be Netscape family, but no mimeTypes[] array?');
return false;
}
for (var i = 0; i < navigator.mimeTypes.length; ++i) {
var s = navigator.mimeTypes[i].type;
var m = s.match(/^application\/x-java-applet\x3Bversion=(1\.8|1\.7|1\.6|1\.5|1\.4\.2)$/);
if (m != null) {
if (this.compareVersions(m[1], version)) {
return true;
}
}
if ((this.preInstallJREList.length != 0) && (o.length != 0) && (this.preInstallJREList[0] != o[0])) {
clearInterval(this.myInterval);
if (this.returnPage != null) {
location.href = this.returnPage
}
return false;
},
testUsingPluginsArray: function (version) {
if (!navigator.plugins || !navigator.plugins.length) {
return false;
}
var platform = navigator.platform.toLowerCase();
for (var i = 0; i < navigator.plugins.length; ++i) {
var s = navigator.plugins[i].description;
if (s.search(/^Java Switchable Plug-in (Cocoa)/) != -1) {
// Safari on MAC
if (this.compareVersions('1.5.0', version)) {
return true;
}
}
},
writePluginTag: function() {
var o = this.getBrowser();
if (o == "MSIE") {
document.write('<object classid="clsid:CAFEEFAC-DEC7-0000-0001-ABCDEFFEDCBA" id="deployJavaPlugin" width="0" height="0"></object>')
} else {
if (o == "Netscape Family" && this.allowPlugin()) {
this.writeEmbedTag()
} else if (s.search(/^Java/) != -1) {
if (platform.indexOf('win') != -1) {
// still can't tell - opera, safari on windows
// return true for 1.5.0 and 1.6.0
if (this.compareVersions('1.5.0', version) || this.compareVersions('1.6.0', version)) {
return true;
}
}
}
},
refresh: function() {
navigator.plugins.refresh(false);
var o = this.getBrowser();
if (o == "Netscape Family" && this.allowPlugin()) {
var p = document.getElementById("deployJavaPlugin");
if (p == null) {
this.writeEmbedTag()
}
}
// if above dosn't work on Apple or Windows, just allow 1.5.0
if (this.compareVersions('1.5.0', version)) {
return true;
}
return false;
},
IEInstall: function () {
location.href = constructGetJavaURL(
(this.locale != null ? '&locale=' + this.locale : '') +
(this.brand != null ? '&brand=' + this.brand : '')
);
// should not actually get here
return false;
},
done: function (_name, _result) {},
FFInstall: function () {
location.href = constructGetJavaURL(
(this.locale != null ? '&locale=' + this.locale : '') +
(this.brand != null ? '&brand=' + this.brand : '') +
(this.installType != null ? '&type=' + this.installType : '')
);
// should not actually get here
return false;
},
// return true if 'installed' (considered as a JRE version string) is
// greater than or equal to 'required' (again, a JRE version string).
compareVersions: function (installed, required) {
var a = installed.split('.');
var b = required.split('.');
for (var i = 0; i < a.length; ++i) {
a[i] = Number(a[i]);
}
for (var j = 0; j < b.length; ++j) {
b[j] = Number(b[j]);
}
if (a.length == 2) {
a[2] = 0;
}
if (a[0] > b[0]) return true;
if (a[0] < b[0]) return false;
if (a[1] > b[1]) return true;
if (a[1] < b[1]) return false;
if (a[2] > b[2]) return true;
if (a[2] < b[2]) return false;
return true;
},
enableAlerts: function () {
// reset this so we can show the browser detection
this.browserName = null;
this.debug = true;
},
poll: function () {
this.refresh();
var postInstallJREList = this.getJREs();
if (this.preInstallJREList.length == 0 && postInstallJREList.length != 0) {
clearInterval(this.myInterval);
}
if (
this.preInstallJREList.length != 0 &&
postInstallJREList.length != 0 &&
this.preInstallJREList[0] != postInstallJREList[0]
) {
clearInterval(this.myInterval);
}
},
writePluginTag: function () {
var browser = this.getBrowser();
if (browser == 'MSIE') {
document.write(
'<' +
'object classid="clsid:CAFEEFAC-DEC7-0000-0001-ABCDEFFEDCBA" ' +
'id="deployJavaPlugin" width="0" height="0">' +
'<' +
'/' +
'object' +
'>'
);
} else if (browser == 'Netscape Family' && this.allowPlugin()) {
this.writeEmbedTag();
}
},
refresh: function () {
navigator.plugins.refresh(false);
var browser = this.getBrowser();
if (browser == 'Netscape Family' && this.allowPlugin()) {
var plugin = document.getElementById('deployJavaPlugin');
// only do this again if no plugin
if (plugin == null) {
this.writeEmbedTag();
}
},
writeEmbedTag: function() {
var o = false;
if (navigator.mimeTypes != null) {
for (var p = 0; p < navigator.mimeTypes.length; p++) {
if (navigator.mimeTypes[p].type == this.mimeType) {
if (navigator.mimeTypes[p].enabledPlugin) {
document.write('<embed id="deployJavaPlugin" type="' + this.mimeType + '" hidden="true" />');
o = true
}
}
},
writeEmbedTag: function () {
var written = false;
if (navigator.mimeTypes != null) {
for (var i = 0; i < navigator.mimeTypes.length; i++) {
if (navigator.mimeTypes[i].type == this.mimeType) {
if (navigator.mimeTypes[i].enabledPlugin) {
document.write(
'<' + 'embed id="deployJavaPlugin" type="' + this.mimeType + '" hidden="true" />'
);
written = true;
}
}
if (!o) {
for (var p = 0; p < navigator.mimeTypes.length; p++) {
if (navigator.mimeTypes[p].type == this.oldMimeType) {
if (navigator.mimeTypes[p].enabledPlugin) {
document.write('<embed id="deployJavaPlugin" type="' + this.oldMimeType + '" hidden="true" />')
}
}
// if we ddn't find new mimeType, look for old mimeType
if (!written)
for (var j = 0; j < navigator.mimeTypes.length; j++) {
if (navigator.mimeTypes[j].type == this.oldMimeType) {
if (navigator.mimeTypes[j].enabledPlugin) {
document.write(
'<' + 'embed id="deployJavaPlugin" type="' + this.oldMimeType + '" hidden="true" />'
);
}
}
}
}
}
};
d.writePluginTag();
if (d.locale == null) {
var h = null;
if (h == null) {
try {
h = navigator.userLanguage
} catch (f) {}
},
}; // deployJava object
deployJava.writePluginTag();
if (deployJava.locale == null) {
var loc = null;
if (loc == null)
try {
loc = navigator.userLanguage;
} catch (err) {
// ignore error
}
if (h == null) {
try {
h = navigator.systemLanguage
} catch (f) {}
if (loc == null)
try {
loc = navigator.systemLanguage;
} catch (err) {
// ignore error
}
if (h == null) {
try {
h = navigator.language
} catch (f) {}
if (loc == null)
try {
loc = navigator.language;
} catch (err) {
// ignore error
}
if (h != null) {
h.replace("-", "_");
d.locale = h
}
if (loc != null) {
loc.replace('-', '_');
deployJava.locale = loc;
}
return d
}();
}
module.exports = deployJava;

@@ -0,1 +1,3 @@

/* eslint-disable strict */
/**

@@ -25,3 +27,3 @@ * JavaScript code to detect available availability of a

*/
var Detector = function() {
module.exports = function Detector() {
// a font will be compared against all the three default fonts.

@@ -28,0 +30,0 @@ // and if it doesn't match all 3 then that font is not available.

@@ -1,777 +0,821 @@

/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
/*! SWFObject v2.3.20130521 <http://github.com/swfobject/swfobject>
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject = function() {
var UNDEF = "undefined",
OBJECT = "object",
SHOCKWAVE_FLASH = "Shockwave Flash",
SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
FLASH_MIME_TYPE = "application/x-shockwave-flash",
EXPRESS_INSTALL_ID = "SWFObjectExprInst",
ON_READY_STATE_CHANGE = "onreadystatechange",
/* global ActiveXObject: false */
/* eslint-disable strict */
win = window,
doc = document,
nav = navigator,
var UNDEF = "undefined",
OBJECT = "object",
SHOCKWAVE_FLASH = "Shockwave Flash",
SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
FLASH_MIME_TYPE = "application/x-shockwave-flash",
EXPRESS_INSTALL_ID = "SWFObjectExprInst",
ON_READY_STATE_CHANGE = "onreadystatechange",
plugin = false,
domLoadFnArr = [main],
regObjArr = [],
objIdArr = [],
listenersArr = [],
storedAltContent,
storedAltContentId,
storedCallbackFn,
storedCallbackObj,
isDomLoaded = false,
isExpressInstallActive = false,
dynamicStylesheet,
dynamicStylesheetMedia,
autoHideShow = true,
win = window,
doc = document,
nav = navigator,
/* Centralized function for browser feature detection
- User agent string detection is only used when no good alternative is possible
- Is executed directly for optimal performance
*/
ua = function() {
var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
u = nav.userAgent.toLowerCase(),
p = nav.platform.toLowerCase(),
windows = p ? /win/.test(p) : /win/.test(u),
mac = p ? /mac/.test(p) : /mac/.test(u),
webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
playerVersion = [0,0,0],
d = null;
if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
d = nav.plugins[SHOCKWAVE_FLASH].description;
if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
plugin = true;
ie = false; // cascaded feature detection for Internet Explorer
d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
}
}
else if (typeof win.ActiveXObject != UNDEF) {
try {
var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
if (a) { // a will return null when ActiveX is disabled
d = a.GetVariable("$version");
if (d) {
ie = true; // cascaded feature detection for Internet Explorer
d = d.split(" ")[1].split(",");
playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
}
}
}
catch(e) {}
}
return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
}(),
plugin = false,
domLoadFnArr = [],
regObjArr = [],
objIdArr = [],
listenersArr = [],
storedFbContent,
storedFbContentId,
storedCallbackFn,
storedCallbackObj,
isDomLoaded = false,
isExpressInstallActive = false,
dynamicStylesheet,
dynamicStylesheetMedia,
autoHideShow = true,
encodeURIEnabled = false,
/* Cross-browser onDomLoad
- Will fire an event as soon as the DOM of a web page is loaded
- Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- Regular onload serves as fallback
*/
onDomLoad = function() {
if (!ua.w3) { return; }
if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
callDomLoadFunctions();
}
if (!isDomLoaded) {
if (typeof doc.addEventListener != UNDEF) {
doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
}
if (ua.ie && ua.win) {
doc.attachEvent(ON_READY_STATE_CHANGE, function() {
if (doc.readyState == "complete") {
doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
callDomLoadFunctions();
}
});
if (win == top) { // if not inside an iframe
(function(){
if (isDomLoaded) { return; }
try {
doc.documentElement.doScroll("left");
}
catch(e) {
setTimeout(arguments.callee, 0);
return;
}
callDomLoadFunctions();
})();
}
}
if (ua.wk) {
(function(){
if (isDomLoaded) { return; }
if (!/loaded|complete/.test(doc.readyState)) {
setTimeout(arguments.callee, 0);
return;
}
callDomLoadFunctions();
})();
}
addLoadEvent(callDomLoadFunctions);
}
}();
/* Centralized function for browser feature detection
- User agent string detection is only used when no good alternative is possible
- Is executed directly for optimal performance
*/
ua = function () {
var w3cdom = typeof doc.getElementById !== UNDEF && typeof doc.getElementsByTagName !== UNDEF && typeof doc.createElement !== UNDEF,
u = nav.userAgent.toLowerCase(),
p = nav.platform.toLowerCase(),
windows = p ? /win/.test(p) : /win/.test(u),
mac = p ? /mac/.test(p) : /mac/.test(u),
webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
ie = nav.appName === "Microsoft Internet Explorer",
playerVersion = [0, 0, 0],
d = null;
if (typeof nav.plugins !== UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] === OBJECT) {
d = nav.plugins[SHOCKWAVE_FLASH].description;
// nav.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
if (d && (typeof nav.mimeTypes !== UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) {
plugin = true;
ie = false; // cascaded feature detection for Internet Explorer
d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
playerVersion[0] = toInt(d.replace(/^(.*)\..*$/, "$1"));
playerVersion[1] = toInt(d.replace(/^.*\.(.*)\s.*$/, "$1"));
playerVersion[2] = /[a-zA-Z]/.test(d) ? toInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1")) : 0;
}
}
else if (typeof win.ActiveXObject !== UNDEF) {
try {
var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
if (a) { // a will return null when ActiveX is disabled
d = a.GetVariable("$version");
if (d) {
ie = true; // cascaded feature detection for Internet Explorer
d = d.split(" ")[1].split(",");
playerVersion = [toInt(d[0]), toInt(d[1]), toInt(d[2])];
}
}
}
catch (e) {
// ignore error
}
}
return {w3: w3cdom, pv: playerVersion, wk: webkit, ie: ie, win: windows, mac: mac};
}();
function callDomLoadFunctions() {
if (isDomLoaded) { return; }
try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
t.parentNode.removeChild(t);
}
catch (e) { return; }
isDomLoaded = true;
var dl = domLoadFnArr.length;
for (var i = 0; i < dl; i++) {
domLoadFnArr[i]();
}
}
/* Cross-browser onDomLoad
- Will fire an event as soon as the DOM of a web page is loaded
- Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- Regular onload serves as fallback
*/
(function () {
if (!ua.w3) { return; }
if ((typeof doc.readyState !== UNDEF && (doc.readyState === "complete" || doc.readyState === "interactive")) || (typeof doc.readyState === UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
callDomLoadFunctions();
}
if (!isDomLoaded) {
if (typeof doc.addEventListener !== UNDEF) {
doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
}
if (ua.ie) {
doc.attachEvent(ON_READY_STATE_CHANGE, function detach() {
if (doc.readyState === "complete") {
doc.detachEvent(ON_READY_STATE_CHANGE, detach);
callDomLoadFunctions();
}
});
if (win == top) { // if not inside an iframe
(function checkDomLoadedIE() {
if (isDomLoaded) { return; }
try {
doc.documentElement.doScroll("left");
}
catch (e) {
setTimeout(checkDomLoadedIE, 0);
return;
}
callDomLoadFunctions();
}());
}
}
if (ua.wk) {
(function checkDomLoadedWK() {
if (isDomLoaded) { return; }
if (!/loaded|complete/.test(doc.readyState)) {
setTimeout(checkDomLoadedWK, 0);
return;
}
callDomLoadFunctions();
}());
}
}
}());
function addDomLoadEvent(fn) {
if (isDomLoaded) {
fn();
}
else {
domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
}
}
function callDomLoadFunctions() {
if (isDomLoaded || !document.getElementsByTagName("body")[0]) { return; }
try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
var t, span = createElement("span");
span.style.display = "none"; //hide the span in case someone has styled spans via CSS
t = doc.getElementsByTagName("body")[0].appendChild(span);
t.parentNode.removeChild(t);
t = null; //clear the variables
span = null;
}
catch (e) { return; }
isDomLoaded = true;
var dl = domLoadFnArr.length;
for (var i = 0; i < dl; i++) {
domLoadFnArr[i]();
}
}
/* Cross-browser onload
- Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- Will fire an event as soon as a web page including all of its assets are loaded
*/
function addLoadEvent(fn) {
if (typeof win.addEventListener != UNDEF) {
win.addEventListener("load", fn, false);
}
else if (typeof doc.addEventListener != UNDEF) {
doc.addEventListener("load", fn, false);
}
else if (typeof win.attachEvent != UNDEF) {
addListener(win, "onload", fn);
}
else if (typeof win.onload == "function") {
var fnOld = win.onload;
win.onload = function() {
fnOld();
fn();
};
}
else {
win.onload = fn;
}
}
function addDomLoadEvent(fn) {
if (isDomLoaded) {
fn();
}
else {
domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
}
}
/* Main function
- Will preferably execute onDomLoad, otherwise onload (as a fallback)
*/
function main() {
if (plugin) {
testPlayerVersion();
}
else {
matchVersions();
}
}
/* Cross-browser onload
- Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- Will fire an event as soon as a web page including all of its assets are loaded
*/
function addLoadEvent(fn) {
if (typeof win.addEventListener !== UNDEF) {
win.addEventListener("load", fn, false);
}
else if (typeof doc.addEventListener !== UNDEF) {
doc.addEventListener("load", fn, false);
}
else if (typeof win.attachEvent !== UNDEF) {
addListener(win, "onload", fn);
}
else if (typeof win.onload === "function") {
var fnOld = win.onload;
win.onload = function () {
fnOld();
fn();
};
}
else {
win.onload = fn;
}
}
/* Detect the Flash Player version for non-Internet Explorer browsers
- Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
a. Both release and build numbers can be detected
b. Avoid wrong descriptions by corrupt installers provided by Adobe
c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
*/
function testPlayerVersion() {
var b = doc.getElementsByTagName("body")[0];
var o = createElement(OBJECT);
o.setAttribute("type", FLASH_MIME_TYPE);
var t = b.appendChild(o);
if (t) {
var counter = 0;
(function(){
if (typeof t.GetVariable != UNDEF) {
var d = t.GetVariable("$version");
if (d) {
d = d.split(" ")[1].split(",");
ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
}
}
else if (counter < 10) {
counter++;
setTimeout(arguments.callee, 10);
return;
}
b.removeChild(o);
t = null;
matchVersions();
})();
}
else {
matchVersions();
}
}
/* Detect the Flash Player version for non-Internet Explorer browsers
- Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
a. Both release and build numbers can be detected
b. Avoid wrong descriptions by corrupt installers provided by Adobe
c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
*/
function testPlayerVersion() {
var b = doc.getElementsByTagName("body")[0];
var o = createElement(OBJECT);
o.setAttribute("style", "visibility: hidden;");
o.setAttribute("type", FLASH_MIME_TYPE);
var t = b.appendChild(o);
if (t) {
var counter = 0;
(function checkGetVariable() {
if (typeof t.GetVariable !== UNDEF) {
try {
var d = t.GetVariable("$version");
if (d) {
d = d.split(" ")[1].split(",");
ua.pv = [toInt(d[0]), toInt(d[1]), toInt(d[2])];
}
} catch (e) {
//t.GetVariable("$version") is known to fail in Flash Player 8 on Firefox
//If this error is encountered, assume FP8 or lower. Time to upgrade.
ua.pv = [8, 0, 0];
}
}
else if (counter < 10) {
counter++;
setTimeout(checkGetVariable, 10);
return;
}
b.removeChild(o);
t = null;
matchVersions();
}());
}
else {
matchVersions();
}
}
/* Perform Flash Player and SWF version matching; static publishing only
*/
function matchVersions() {
var rl = regObjArr.length;
if (rl > 0) {
for (var i = 0; i < rl; i++) { // for each registered object element
var id = regObjArr[i].id;
var cb = regObjArr[i].callbackFn;
var cbObj = {success:false, id:id};
if (ua.pv[0] > 0) {
var obj = getElementById(id);
if (obj) {
if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
setVisibility(id, true);
if (cb) {
cbObj.success = true;
cbObj.ref = getObjectById(id);
cb(cbObj);
}
}
else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
var att = {};
att.data = regObjArr[i].expressInstall;
att.width = obj.getAttribute("width") || "0";
att.height = obj.getAttribute("height") || "0";
if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
// parse HTML object param element's name-value pairs
var par = {};
var p = obj.getElementsByTagName("param");
var pl = p.length;
for (var j = 0; j < pl; j++) {
if (p[j].getAttribute("name").toLowerCase() != "movie") {
par[p[j].getAttribute("name")] = p[j].getAttribute("value");
}
}
showExpressInstall(att, par, id, cb);
}
else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
displayAltContent(obj);
if (cb) { cb(cbObj); }
}
}
}
else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
setVisibility(id, true);
if (cb) {
var o = getObjectById(id); // test whether there is an HTML object element or not
if (o && typeof o.SetVariable != UNDEF) {
cbObj.success = true;
cbObj.ref = o;
}
cb(cbObj);
}
}
}
}
}
/* Perform Flash Player and SWF version matching; static publishing only
*/
function matchVersions() {
var rl = regObjArr.length;
if (rl > 0) {
for (var i = 0; i < rl; i++) { // for each registered object element
var id = regObjArr[i].id;
var cb = regObjArr[i].callbackFn;
var cbObj = {success: false, id: id};
if (ua.pv[0] > 0) {
var obj = getElementById(id);
if (obj) {
if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
setVisibility(id, true);
if (cb) {
cbObj.success = true;
cbObj.ref = getObjectById(id);
cbObj.id = id;
cb(cbObj);
}
}
else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
var att = {};
att.data = regObjArr[i].expressInstall;
att.width = obj.getAttribute("width") || "0";
att.height = obj.getAttribute("height") || "0";
if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
// parse HTML object param element's name-value pairs
var par = {};
var p = obj.getElementsByTagName("param");
var pl = p.length;
for (var j = 0; j < pl; j++) {
if (p[j].getAttribute("name").toLowerCase() !== "movie") {
par[p[j].getAttribute("name")] = p[j].getAttribute("value");
}
}
showExpressInstall(att, par, id, cb);
}
else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display fallback content instead of SWF
displayFbContent(obj);
if (cb) { cb(cbObj); }
}
}
}
else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or fallback content)
setVisibility(id, true);
if (cb) {
var o = getObjectById(id); // test whether there is an HTML object element or not
if (o && typeof o.SetVariable !== UNDEF) {
cbObj.success = true;
cbObj.ref = o;
cbObj.id = o.id;
}
cb(cbObj);
}
}
}
}
}
function getObjectById(objectIdStr) {
var r = null;
var o = getElementById(objectIdStr);
if (o && o.nodeName == "OBJECT") {
if (typeof o.SetVariable != UNDEF) {
r = o;
}
else {
var n = o.getElementsByTagName(OBJECT)[0];
if (n) {
r = n;
}
}
}
return r;
}
/* Main function
- Will preferably execute onDomLoad, otherwise onload (as a fallback)
*/
domLoadFnArr[0] = function () {
if (plugin) {
testPlayerVersion();
}
else {
matchVersions();
}
};
/* Requirements for Adobe Express Install
- only one instance can be active at a time
- fp 6.0.65 or higher
- Win/Mac OS only
- no Webkit engines older than version 312
*/
function canExpressInstall() {
return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
}
function getObjectById(objectIdStr) {
var r = null,
o = getElementById(objectIdStr);
/* Show the Adobe Express Install dialog
- Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
*/
function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
isExpressInstallActive = true;
storedCallbackFn = callbackFn || null;
storedCallbackObj = {success:false, id:replaceElemIdStr};
var obj = getElementById(replaceElemIdStr);
if (obj) {
if (obj.nodeName == "OBJECT") { // static publishing
storedAltContent = abstractAltContent(obj);
storedAltContentId = null;
}
else { // dynamic publishing
storedAltContent = obj;
storedAltContentId = replaceElemIdStr;
}
att.id = EXPRESS_INSTALL_ID;
if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
fv = "MMredirectURL=" + win.location.toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
if (typeof par.flashvars != UNDEF) {
par.flashvars += "&" + fv;
}
else {
par.flashvars = fv;
}
// IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
// because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
if (ua.ie && ua.win && obj.readyState != 4) {
var newObj = createElement("div");
replaceElemIdStr += "SWFObjectNew";
newObj.setAttribute("id", replaceElemIdStr);
obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
obj.style.display = "none";
(function(){
if (obj.readyState == 4) {
obj.parentNode.removeChild(obj);
}
else {
setTimeout(arguments.callee, 10);
}
})();
}
createSWF(att, par, replaceElemIdStr);
}
}
if (o && o.nodeName.toUpperCase() === "OBJECT") {
//If targeted object is valid Flash file
if (typeof o.SetVariable !== UNDEF) {
r = o;
} else {
//If SetVariable is not working on targeted object but a nested object is
//available, assume classic nested object markup. Return nested object.
/* Functions to abstract and display alternative content
*/
function displayAltContent(obj) {
if (ua.ie && ua.win && obj.readyState != 4) {
// IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
// because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
var el = createElement("div");
obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
el.parentNode.replaceChild(abstractAltContent(obj), el);
obj.style.display = "none";
(function(){
if (obj.readyState == 4) {
obj.parentNode.removeChild(obj);
}
else {
setTimeout(arguments.callee, 10);
}
})();
}
else {
obj.parentNode.replaceChild(abstractAltContent(obj), obj);
}
}
//If SetVariable is not working on targeted object and there is no nested object,
//return the original object anyway. This is probably new simplified markup.
function abstractAltContent(obj) {
var ac = createElement("div");
if (ua.win && ua.ie) {
ac.innerHTML = obj.innerHTML;
}
else {
var nestedObj = obj.getElementsByTagName(OBJECT)[0];
if (nestedObj) {
var c = nestedObj.childNodes;
if (c) {
var cl = c.length;
for (var i = 0; i < cl; i++) {
if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
ac.appendChild(c[i].cloneNode(true));
}
}
}
}
}
return ac;
}
r = o.getElementsByTagName(OBJECT)[0] || o;
}
}
/* Cross-browser dynamic SWF creation
*/
function createSWF(attObj, parObj, id) {
var r, el = getElementById(id);
if (ua.wk && ua.wk < 312) { return r; }
if (el) {
if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
attObj.id = id;
}
if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
var att = "";
for (var i in attObj) {
if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
if (i.toLowerCase() == "data") {
parObj.movie = attObj[i];
}
else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
att += ' class="' + attObj[i] + '"';
}
else if (i.toLowerCase() != "classid") {
att += ' ' + i + '="' + attObj[i] + '"';
}
}
}
var par = "";
for (var j in parObj) {
if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
par += '<param name="' + j + '" value="' + parObj[j] + '" />';
}
}
el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
r = getElementById(attObj.id);
}
else { // well-behaving browsers
var o = createElement(OBJECT);
o.setAttribute("type", FLASH_MIME_TYPE);
for (var m in attObj) {
if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
o.setAttribute("class", attObj[m]);
}
else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
o.setAttribute(m, attObj[m]);
}
}
}
for (var n in parObj) {
if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
createObjParam(o, n, parObj[n]);
}
}
el.parentNode.replaceChild(o, el);
r = o;
}
}
return r;
}
return r;
}
function createObjParam(el, pName, pValue) {
var p = createElement("param");
p.setAttribute("name", pName);
p.setAttribute("value", pValue);
el.appendChild(p);
}
/* Requirements for Adobe Express Install
- only one instance can be active at a time
- fp 6.0.65 or higher
- Win/Mac OS only
- no Webkit engines older than version 312
*/
function canExpressInstall() {
return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
}
/* Cross-browser SWF removal
- Especially needed to safely and completely remove a SWF in Internet Explorer
*/
function removeSWF(id) {
var obj = getElementById(id);
if (obj && obj.nodeName == "OBJECT") {
if (ua.ie && ua.win) {
obj.style.display = "none";
(function(){
if (obj.readyState == 4) {
removeObjectInIE(id);
}
else {
setTimeout(arguments.callee, 10);
}
})();
}
else {
obj.parentNode.removeChild(obj);
}
}
}
/* Show the Adobe Express Install dialog
- Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
*/
function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
function removeObjectInIE(id) {
var obj = getElementById(id);
if (obj) {
for (var i in obj) {
if (typeof obj[i] == "function") {
obj[i] = null;
}
}
obj.parentNode.removeChild(obj);
}
}
var obj = getElementById(replaceElemIdStr);
/* Functions to optimize JavaScript compression
*/
function getElementById(id) {
var el = null;
try {
el = doc.getElementById(id);
}
catch (e) {}
return el;
}
//Ensure that replaceElemIdStr is really a string and not an element
replaceElemIdStr = getId(replaceElemIdStr);
function createElement(el) {
return doc.createElement(el);
}
isExpressInstallActive = true;
storedCallbackFn = callbackFn || null;
storedCallbackObj = {success: false, id: replaceElemIdStr};
/* Updated attachEvent function for Internet Explorer
- Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
*/
function addListener(target, eventType, fn) {
target.attachEvent(eventType, fn);
listenersArr[listenersArr.length] = [target, eventType, fn];
}
if (obj) {
if (obj.nodeName.toUpperCase() === "OBJECT") { // static publishing
storedFbContent = abstractFbContent(obj);
storedFbContentId = null;
}
else { // dynamic publishing
storedFbContent = obj;
storedFbContentId = replaceElemIdStr;
}
att.id = EXPRESS_INSTALL_ID;
if (typeof att.width === UNDEF || (!/%$/.test(att.width) && toInt(att.width) < 310)) { att.width = "310"; }
if (typeof att.height === UNDEF || (!/%$/.test(att.height) && toInt(att.height) < 137)) { att.height = "137"; }
var pt = ua.ie ? "ActiveX" : "PlugIn",
fv = "MMredirectURL=" + encodeURIComponent(win.location.toString().replace(/&/g, "%26")) + "&MMplayerType=" + pt + "&MMdoctitle=" + encodeURIComponent(doc.title.slice(0, 47) + " - Flash Player Installation");
if (typeof par.flashvars !== UNDEF) {
par.flashvars += "&" + fv;
}
else {
par.flashvars = fv;
}
// IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
// because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
if (ua.ie && obj.readyState != 4) {
var newObj = createElement("div");
replaceElemIdStr += "SWFObjectNew";
newObj.setAttribute("id", replaceElemIdStr);
obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
obj.style.display = "none";
removeSWF(obj); //removeSWF accepts elements now
}
createSWF(att, par, replaceElemIdStr);
}
}
/* Flash Player and SWF content version matching
*/
function hasPlayerVersion(rv) {
var pv = ua.pv, v = rv.split(".");
v[0] = parseInt(v[0], 10);
v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
v[2] = parseInt(v[2], 10) || 0;
return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
}
/* Functions to abstract and display fallback content
*/
function displayFbContent(obj) {
if (ua.ie && obj.readyState != 4) {
// IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
// because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
obj.style.display = "none";
var el = createElement("div");
obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the fallback content
el.parentNode.replaceChild(abstractFbContent(obj), el);
removeSWF(obj); //removeSWF accepts elements now
}
else {
obj.parentNode.replaceChild(abstractFbContent(obj), obj);
}
}
/* Cross-browser dynamic CSS creation
- Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
*/
function createCSS(sel, decl, media, newStyle) {
if (ua.ie && ua.mac) { return; }
var h = doc.getElementsByTagName("head")[0];
if (!h) { return; } // to also support badly authored HTML pages that lack a head element
var m = (media && typeof media == "string") ? media : "screen";
if (newStyle) {
dynamicStylesheet = null;
dynamicStylesheetMedia = null;
}
if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
// create dynamic stylesheet + get a global reference to it
var s = createElement("style");
s.setAttribute("type", "text/css");
s.setAttribute("media", m);
dynamicStylesheet = h.appendChild(s);
if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
}
dynamicStylesheetMedia = m;
}
// add style rule
if (ua.ie && ua.win) {
if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
dynamicStylesheet.addRule(sel, decl);
}
}
else {
if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
}
}
}
function abstractFbContent(obj) {
var ac = createElement("div");
if (ua.win && ua.ie) {
ac.innerHTML = obj.innerHTML;
}
else {
var nestedObj = obj.getElementsByTagName(OBJECT)[0];
if (nestedObj) {
var c = nestedObj.childNodes;
if (c) {
var cl = c.length;
for (var i = 0; i < cl; i++) {
if (!(c[i].nodeType == 1 && c[i].nodeName === "PARAM") && !(c[i].nodeType == 8)) {
ac.appendChild(c[i].cloneNode(true));
}
}
}
}
}
return ac;
}
function setVisibility(id, isVisible) {
if (!autoHideShow) { return; }
var v = isVisible ? "visible" : "hidden";
if (isDomLoaded && getElementById(id)) {
getElementById(id).style.visibility = v;
}
else {
createCSS("#" + id, "visibility:" + v);
}
}
function createIeObject(url, paramStr) {
var div = createElement("div");
div.innerHTML = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'><param name='movie' value='" + url + "'>" + paramStr + "</object>";
return div.firstChild;
}
/* Filter to avoid XSS attacks
*/
function urlEncodeIfNecessary(s) {
var regex = /[\\\"<>\.;]/;
var hasBadChars = regex.exec(s) != null;
return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
}
/* Cross-browser dynamic SWF creation
*/
function createSWF(attObj, parObj, id) {
var r, el = getElementById(id);
id = getId(id); // ensure id is truly an ID and not an element
/* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
*/
var cleanup = function() {
if (ua.ie && ua.win) {
window.attachEvent("onunload", function() {
// remove listeners to avoid memory leaks
var ll = listenersArr.length;
for (var i = 0; i < ll; i++) {
listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
}
// cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
var il = objIdArr.length;
for (var j = 0; j < il; j++) {
removeSWF(objIdArr[j]);
}
// cleanup library's main closures to avoid memory leaks
for (var k in ua) {
ua[k] = null;
}
ua = null;
for (var l in swfobject) {
swfobject[l] = null;
}
swfobject = null;
});
}
}();
if (ua.wk && ua.wk < 312) { return r; }
return {
/* Public API
- Reference: http://code.google.com/p/swfobject/wiki/documentation
*/
registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
if (ua.w3 && objectIdStr && swfVersionStr) {
var regObj = {};
regObj.id = objectIdStr;
regObj.swfVersion = swfVersionStr;
regObj.expressInstall = xiSwfUrlStr;
regObj.callbackFn = callbackFn;
regObjArr[regObjArr.length] = regObj;
setVisibility(objectIdStr, false);
}
else if (callbackFn) {
callbackFn({success:false, id:objectIdStr});
}
},
if (el) {
var o = (ua.ie) ? createElement("div") : createElement(OBJECT),
attr,
attrLower,
param;
getObjectById: function(objectIdStr) {
if (ua.w3) {
return getObjectById(objectIdStr);
}
},
if (typeof attObj.id === UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the fallback content
attObj.id = id;
}
embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
var callbackObj = {success:false, id:replaceElemIdStr};
if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
setVisibility(replaceElemIdStr, false);
addDomLoadEvent(function() {
widthStr += ""; // auto-convert to string
heightStr += "";
var att = {};
if (attObj && typeof attObj === OBJECT) {
for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
att[i] = attObj[i];
}
}
att.data = swfUrlStr;
att.width = widthStr;
att.height = heightStr;
var par = {};
if (parObj && typeof parObj === OBJECT) {
for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
par[j] = parObj[j];
}
}
if (flashvarsObj && typeof flashvarsObj === OBJECT) {
for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
if (typeof par.flashvars != UNDEF) {
par.flashvars += "&" + k + "=" + flashvarsObj[k];
}
else {
par.flashvars = k + "=" + flashvarsObj[k];
}
}
}
if (hasPlayerVersion(swfVersionStr)) { // create SWF
var obj = createSWF(att, par, replaceElemIdStr);
if (att.id == replaceElemIdStr) {
setVisibility(replaceElemIdStr, true);
}
callbackObj.success = true;
callbackObj.ref = obj;
}
else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
att.data = xiSwfUrlStr;
showExpressInstall(att, par, replaceElemIdStr, callbackFn);
return;
}
else { // show alternative content
setVisibility(replaceElemIdStr, true);
}
if (callbackFn) { callbackFn(callbackObj); }
});
}
else if (callbackFn) { callbackFn(callbackObj); }
},
//Add params
for (param in parObj) {
//filter out prototype additions from other potential libraries and IE specific param element
if (Object.prototype.hasOwnProperty.call(parObj, param) && param.toLowerCase() !== "movie") {
createObjParam(o, param, parObj[param]);
}
}
switchOffAutoHideShow: function() {
autoHideShow = false;
},
//Create IE object, complete with param nodes
if (ua.ie) { o = createIeObject(attObj.data, o.innerHTML); }
ua: ua,
//Add attributes to object
for (attr in attObj) {
if (Object.prototype.hasOwnProperty.call(attObj, attr)) { // filter out prototype additions from other potential libraries
attrLower = attr.toLowerCase();
getFlashPlayerVersion: function() {
return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
},
// 'class' is an ECMA4 reserved keyword
if (attrLower === "styleclass") {
o.setAttribute("class", attObj[attr]);
} else if (attrLower !== "classid" && attrLower !== "data") {
o.setAttribute(attr, attObj[attr]);
}
}
}
hasFlashPlayerVersion: hasPlayerVersion,
if (ua.ie) {
objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
} else {
o.setAttribute("type", FLASH_MIME_TYPE);
o.setAttribute("data", attObj.data);
}
createSWF: function(attObj, parObj, replaceElemIdStr) {
if (ua.w3) {
return createSWF(attObj, parObj, replaceElemIdStr);
}
else {
return undefined;
}
},
el.parentNode.replaceChild(o, el);
r = o;
}
showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
if (ua.w3 && canExpressInstall()) {
showExpressInstall(att, par, replaceElemIdStr, callbackFn);
}
},
return r;
}
removeSWF: function(objElemIdStr) {
if (ua.w3) {
removeSWF(objElemIdStr);
}
},
function createObjParam(el, pName, pValue) {
var p = createElement("param");
p.setAttribute("name", pName);
p.setAttribute("value", pValue);
el.appendChild(p);
}
createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
if (ua.w3) {
createCSS(selStr, declStr, mediaStr, newStyleBoolean);
}
},
/* Cross-browser SWF removal
- Especially needed to safely and completely remove a SWF in Internet Explorer
*/
function removeSWF(id) {
var obj = getElementById(id);
if (obj && obj.nodeName.toUpperCase() === "OBJECT") {
if (ua.ie) {
obj.style.display = "none";
(function removeSWFInIE() {
if (obj.readyState == 4) {
//This step prevents memory leaks in Internet Explorer
for (var i in obj) {
if (typeof obj[i] === "function") {
obj[i] = null;
}
}
obj.parentNode.removeChild(obj);
} else {
setTimeout(removeSWFInIE, 10);
}
}());
}
else {
obj.parentNode.removeChild(obj);
}
}
}
addDomLoadEvent: addDomLoadEvent,
function isElement(id) {
return (id && id.nodeType && id.nodeType === 1);
}
addLoadEvent: addLoadEvent,
function getId(thing) {
return (isElement(thing)) ? thing.id : thing;
}
getQueryParamValue: function(param) {
var q = doc.location.search || doc.location.hash;
if (q) {
if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
if (param == null) {
return urlEncodeIfNecessary(q);
}
var pairs = q.split("&");
for (var i = 0; i < pairs.length; i++) {
if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
}
}
}
return "";
},
/* Functions to optimize JavaScript compression
*/
function getElementById(id) {
// For internal usage only
expressInstallCallback: function() {
if (isExpressInstallActive) {
var obj = getElementById(EXPRESS_INSTALL_ID);
if (obj && storedAltContent) {
obj.parentNode.replaceChild(storedAltContent, obj);
if (storedAltContentId) {
setVisibility(storedAltContentId, true);
if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
}
if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
}
isExpressInstallActive = false;
}
}
};
}();
//Allow users to pass an element OR an element's ID
if (isElement(id)) { return id; }
var el = null;
try {
el = doc.getElementById(id);
}
catch (e) {
// ignore error
}
return el;
}
function createElement(el) {
return doc.createElement(el);
}
//To aid compression; replaces 14 instances of pareseInt with radix
function toInt(str) {
return parseInt(str, 10);
}
/* Updated attachEvent function for Internet Explorer
- Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
*/
function addListener(target, eventType, fn) {
target.attachEvent(eventType, fn);
listenersArr[listenersArr.length] = [target, eventType, fn];
}
/* Flash Player and SWF content version matching
*/
function hasPlayerVersion(rv) {
rv += ""; //Coerce number to string, if needed.
var pv = ua.pv, v = rv.split(".");
v[0] = toInt(v[0]);
v[1] = toInt(v[1]) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
v[2] = toInt(v[2]) || 0;
return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
}
/* Cross-browser dynamic CSS creation
- Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
*/
function createCSS(sel, decl, media, newStyle) {
var h = doc.getElementsByTagName("head")[0];
if (!h) { return; } // to also support badly authored HTML pages that lack a head element
var m = (typeof media === "string") ? media : "screen";
if (newStyle) {
dynamicStylesheet = null;
dynamicStylesheetMedia = null;
}
if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
// create dynamic stylesheet + get a global reference to it
var s = createElement("style");
s.setAttribute("type", "text/css");
s.setAttribute("media", m);
dynamicStylesheet = h.appendChild(s);
if (ua.ie && typeof doc.styleSheets !== UNDEF && doc.styleSheets.length > 0) {
dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
}
dynamicStylesheetMedia = m;
}
// add style rule
if (dynamicStylesheet) {
if (typeof dynamicStylesheet.addRule !== UNDEF) {
dynamicStylesheet.addRule(sel, decl);
} else if (typeof doc.createTextNode !== UNDEF) {
dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
}
}
}
function setVisibility(id, isVisible) {
if (!autoHideShow) { return; }
var v = isVisible ? "visible" : "hidden",
el = getElementById(id);
if (isDomLoaded && el) {
el.style.visibility = v;
} else if (typeof id === "string") {
createCSS("#" + id, "visibility:" + v);
}
}
/* Filter to avoid XSS attacks
*/
function urlEncodeIfNecessary(s) {
var regex = /[\\"<>.;]/;
var hasBadChars = regex.exec(s) !== null;
return hasBadChars && typeof encodeURIComponent !== UNDEF ? encodeURIComponent(s) : s;
}
/* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
*/
(function () {
if (ua.ie) {
window.attachEvent("onunload", function () {
// remove listeners to avoid memory leaks
var ll = listenersArr.length;
for (var i = 0; i < ll; i++) {
listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
}
// cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
var il = objIdArr.length;
for (var j = 0; j < il; j++) {
removeSWF(objIdArr[j]);
}
// cleanup library's main closures to avoid memory leaks
for (var k in ua) {
ua[k] = null;
}
ua = null;
for (var l in swfobject) {
swfobject[l] = null;
}
swfobject = null;
});
}
}());
var swfobject = {
/* Public API
- Reference: http://code.google.com/p/swfobject/wiki/documentation
*/
registerObject: function (objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
if (ua.w3 && objectIdStr && swfVersionStr) {
var regObj = {};
regObj.id = objectIdStr;
regObj.swfVersion = swfVersionStr;
regObj.expressInstall = xiSwfUrlStr;
regObj.callbackFn = callbackFn;
regObjArr[regObjArr.length] = regObj;
setVisibility(objectIdStr, false);
}
else if (callbackFn) {
callbackFn({success: false, id: objectIdStr});
}
},
getObjectById: function (objectIdStr) {
if (ua.w3) {
return getObjectById(objectIdStr);
}
},
embedSWF: function (swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
var id = getId(replaceElemIdStr),
callbackObj = {success: false, id: id};
if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
setVisibility(id, false);
addDomLoadEvent(function () {
widthStr += ""; // auto-convert to string
heightStr += "";
var att = {};
if (attObj && typeof attObj === OBJECT) {
for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
att[i] = attObj[i];
}
}
att.data = swfUrlStr;
att.width = widthStr;
att.height = heightStr;
var par = {};
if (parObj && typeof parObj === OBJECT) {
for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
par[j] = parObj[j];
}
}
if (flashvarsObj && typeof flashvarsObj === OBJECT) {
for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
if (Object.prototype.hasOwnProperty.call(flashvarsObj, k)) {
var key = (encodeURIEnabled) ? encodeURIComponent(k) : k,
value = (encodeURIEnabled) ? encodeURIComponent(flashvarsObj[k]) : flashvarsObj[k];
if (typeof par.flashvars !== UNDEF) {
par.flashvars += "&" + key + "=" + value;
}
else {
par.flashvars = key + "=" + value;
}
}
}
}
if (hasPlayerVersion(swfVersionStr)) { // create SWF
var obj = createSWF(att, par, replaceElemIdStr);
if (att.id == id) {
setVisibility(id, true);
}
callbackObj.success = true;
callbackObj.ref = obj;
callbackObj.id = obj.id;
}
else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
att.data = xiSwfUrlStr;
showExpressInstall(att, par, replaceElemIdStr, callbackFn);
return;
}
else { // show fallback content
setVisibility(id, true);
}
if (callbackFn) { callbackFn(callbackObj); }
});
}
else if (callbackFn) { callbackFn(callbackObj); }
},
switchOffAutoHideShow: function () {
autoHideShow = false;
},
enableUriEncoding: function (bool) {
encodeURIEnabled = (typeof bool === UNDEF) ? true : bool;
},
ua: ua,
getFlashPlayerVersion: function () {
return {major: ua.pv[0], minor: ua.pv[1], release: ua.pv[2]};
},
hasFlashPlayerVersion: hasPlayerVersion,
createSWF: function (attObj, parObj, replaceElemIdStr) {
if (ua.w3) {
return createSWF(attObj, parObj, replaceElemIdStr);
}
else {
return undefined;
}
},
showExpressInstall: function (att, par, replaceElemIdStr, callbackFn) {
if (ua.w3 && canExpressInstall()) {
showExpressInstall(att, par, replaceElemIdStr, callbackFn);
}
},
removeSWF: function (objElemIdStr) {
if (ua.w3) {
removeSWF(objElemIdStr);
}
},
createCSS: function (selStr, declStr, mediaStr, newStyleBoolean) {
if (ua.w3) {
createCSS(selStr, declStr, mediaStr, newStyleBoolean);
}
},
addDomLoadEvent: addDomLoadEvent,
addLoadEvent: addLoadEvent,
getQueryParamValue: function (param) {
var q = doc.location.search || doc.location.hash;
if (q) {
if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
if (!param) {
return urlEncodeIfNecessary(q);
}
var pairs = q.split("&");
for (var i = 0; i < pairs.length; i++) {
if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
}
}
}
return "";
},
// For internal usage only
expressInstallCallback: function () {
if (isExpressInstallActive) {
var obj = getElementById(EXPRESS_INSTALL_ID);
if (obj && storedFbContent) {
obj.parentNode.replaceChild(storedFbContent, obj);
if (storedFbContentId) {
setVisibility(storedFbContentId, true);
if (ua.ie) { storedFbContent.style.display = "block"; }
}
if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
}
isExpressInstallActive = false;
}
},
version: "2.3"
};
module.exports = swfobject;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc