/** * @license jahashtable, a JavaScript implementation of a hash table. It creates a single constructor function called * Hashtable in the global scope. * * http://www.timdown.co.uk/jshashtable/ * Copyright 2013 Tim Down. * Version: 3.0 * Build date: 17 July 2013 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ var Hashtable=function(e){var t="function",n="string";if("undefined"==typeof encodeURIComponent||Array.prototype.splice===e||Object.prototype.hasOwnProperty===e)return null;function i(e){return typeof e==n?e:""+e}function r(e){var o;return typeof e==n?e:typeof e.hashCode==t?typeof(o=e.hashCode())==n?o:r(o):i(e)}function o(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}function a(e,t){return e.equals(t)}function c(e,n){return typeof n.equals==t?n.equals(e):e===n}function s(t){return function(n){if(null===n)throw new Error("null is not a valid "+t);if(n===e)throw new Error(t+" must not be undefined")}}var l=s("key"),u=s("value");function d(e,t,n,i){this[0]=e,this.entries=[],this.addEntry(t,n),null!==i&&(this.getEqualityFunction=function(){return i})}function g(e){return function(t){for(var n,i=this.entries.length,r=this.getEqualityFunction(t);i--;)if(r(t,(n=this.entries[i])[0]))switch(e){case 0:return!0;case 1:return n;case 2:return[i,n[1]]}return!1}}function p(e){return function(t){for(var n=t.length,i=0,r=this.entries,o=r.length;i=101&&(e=!0),e}function startsWith(e,t){return 0===e.indexOf(t)}function DomDataCollection(e){var t=this;function n(){}function r(e){return"function"==typeof e}t.config={recursion_level:1,collection_mode:"partial",functionsToExclude:[],function_list_size:1024,json_script:e||"json2.js"},t.emptyDomData=function(){t.dom_data={functions:{names:[],excluded:{size:0,count:0},truncated:!1},inputs:[],iFrames:[],scripts:[],collection_status:DomDataCollection.NotStarted}},t.startInspection=function(){var e=!1,n=!0;if(BrowserDetect.init(),"Explorer"!==BrowserDetect.browser)try{t.inspectJSFunctions(),n=!1}catch(t){e=e||!0}else t.dom_data.functions=[],void 0!==t.dom_data.functions&&void 0!==t.dom_data.functions.names||(t.dom_data.functions={names:[],excluded:{size:0,count:0},truncated:!1});try{t.inspectFrames(),n=!1}catch(t){e=e||!0}try{t.inspectScripts(),n=!1}catch(t){e=e||!0}try{t.inspectInputFields(),n=!1}catch(t){e=e||!0}t.dom_data.collection_status=e?n?DomDataCollection.Fail:DomDataCollection.Partial:DomDataCollection.Success,"Explorer"!==BrowserDetect.browser&&t.handleSizeLimit()},t.domDataAsJSON=function(){return stripIllegalChars(JSON.stringify(t.dom_data))},t.recursiveGetAllFunctionNamesUnderElement=function(e,i,o){var a,c,s=t.config,l=s.recursion_level,u=s.collection_mode;void 0!==t.dom_data.functions&&void 0!==t.dom_data.functions.names||(t.dom_data.functions={names:[],excluded:{size:0,count:0},truncated:!1});var d=t.dom_data.functions,g=d.excluded;for(var p in i)try{var f=i[p];if(a=""+f,e.length>0?prefix=e+".":prefix="",c=prefix+p,r(f))if(t.functionShouldBeCollected(f,p)){var v=d.names;v[v.length]=c}else"partial"==u&&(g.size+=a.length,g.count++);o+1i){for(var c=r.names,s=c.toString(),l=o.length-JSON.stringify(c).length+"[]".length,u=!1,d=c.length;!u;)1e3==a++&&(u=!0),lastComma=s.lastIndexOf(","),lastComma>=0&&d>0?(quotation_marks=2*d,l+lastComma+quotation_marks>i?(s=s.substring(0,lastComma-1),d--):u=!0):u=!0;d>1?(r.truncated=!0,r.names=r.names.slice(0,d-1),e.functions.truncated=!0):(t.emptyDomData(),(e=t.dom_data).collection_status=DomDataCollection.Partial,e.functions.truncated=!0)}},t.inspectFrames=function(){t.countElements("iframe")},t.countElements=function(e){var n=document.getElementsByTagName(e);void 0===t.dom_data.iFrames&&(t.dom_data.iFrames=[]);var r=t.dom_data.iFrames,o=r.length;for(i=0;i0?element_name=c:s&&s.length>0?element_name=s:element_name="NO_NAME",i[r+o]=element_name}i.sort()},t.inspectInputFields=function(){t.collectFields("input"),t.collectFields("textarea"),t.collectFields("select"),t.collectFields("button")},loadJSON=function(){if(!window.JSON){var e=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.src=t.config.json_script,e.appendChild(n)}},t.emptyDomData(),loadJSON()}function IE_FingerPrint(){this.deviceprint_browser=function(){var e=navigator.userAgent.toLowerCase();return t=e+SEP+navigator.appVersion+SEP+navigator.platform,t+=SEP+navigator.appMinorVersion+SEP+navigator.cpuClass+SEP+navigator.browserLanguage,t+="3.7.2.0",t},this.deviceprint_software=function(){var t="",r=!0;try{var o;document.body.addBehavior("#default#clientCaps");var a=n.length;for(i=0;i0)return parseInt(t.substring(n+5,t.indexOf(".",n)),10);if(t.indexOf("Trident/")>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}return(e=t.indexOf("Edge/"))>0?parseInt(t.substring(e+5,t.indexOf(".",e)),10):(e=t.indexOf("Edg/"))>0&&parseInt(t.substring(e+4,t.indexOf(".",e)),10)}function genRandomNumber(e,t){if(t-e<=0)throw new Exception("max must be larger than min");return(new Date).getTime()%(t-=e)+e}function getRandomPort(){return 0==detectIE()?randrange(4e3,6e4):genRandomNumber(4e3,6e4)}DomDataCollection.Success=0,DomDataCollection.Fail=1,DomDataCollection.Partial=2,DomDataCollection.NotStarted=3,IE_FingerPrint.prototype=new FingerPrint,Mozilla_FingerPrint.prototype=new FingerPrint,Opera_FingerPrint.prototype=new FingerPrint,Timer.prototype.start=function(){this.startTime=(new Date).getTime()},Timer.prototype.duration=function(){return(new Date).getTime()-this.startTime};var ProxyCollector={};function BlackberryLocationCollector(){var e=this,t=null;this.getGeolocationWatchId=function(){return t};var n=null;this.getGeolocationLastPosition=function(){return n};var i=4;this.getGeolocationStatusCode=function(){return i};this.getGeolocationErrorMessage=function(){return""};var r={aidMode:2,timeout:180,relevancy:120,expiration:48,alertDebug:!1},o=-1,a=0;this.getInvokeCount=function(){return a},this.handleBlackBerryLocationTimeout=function(){-1!=o&&(e.stopWatch(),i=3,0===a&&0!==r.aidMode&&(a++,e.startLocationWatch()))},this.handlePosition=function(){clearTimeout(o),o=-1;var t=!1;if(0===blackberry.location.latitude&&0===blackberry.location.longitude)r.alertDebug&&alert("Got empty position"),null===n&&(i=2);else{var c,s=null;if(s=blackberry.location.timestamp?getTimestampInMillis(blackberry.location.timestamp):(new Date).getTime(),(c=(new Date).getTime())-s<=60*r.expiration*60*1e3)if(null===n||s>n.timestamp){var l=null===n?0:n.timestamp;r.alertDebug&&alert("Saved new position. New timestamp: "+s+" Old: "+l),n={timestamp:s,coords:{latitude:blackberry.location.latitude,longitude:blackberry.location.longitude}},i=0}else r.alertDebug&&alert("New position is not saved. New timestamp: "+s+" Old: "+n.timestamp);else r.alertDebug&&alert("New position is not saved. It is expired: "+1e3*(c-s)*60*60+" hours old")}null!==n&&(t=(c=(new Date).getTime())-n.timestamp<1e3*r.relevancy);e.stopWatch(),r.alertDebug&&alert("Relevant position? "+t),(0===a&&0!==r.aidMode||!t)&&(a++,e.startLocationWatch())},this.init=function(e,t,n,i){e>=0&&e<=2&&(r.aidMode=e),null!==t&&t>=90&&t<=300&&(r.timeout=t),null!==n&&n>=60&&n<=240&&(r.relevancy=n),null!==i&&i>=24&&i<=60&&(r.expiration=i)},this.startLocationWatch=function(){0===a?blackberry.location.setAidMode(0):blackberry.location.setAidMode(r.aidMode);var n=1e3*r.timeout;return o=setTimeout("geoLocator.handleBlackBerryLocationTimeout()",n),blackberry.location.onLocationUpdate(e.handlePosition),blackberry.location.refreshLocation(),t=1,!0},this.stopWatch=function(){try{blackberry.location.removeLocationUpdate(e.handlePosition)}catch(e){}t=-2},this.generateGeolocationJSONStruct=function(){var e=null;if(null!==n){var t=convertTimestampToGMT(n.timestamp);e={GeoLocationInfo:[{Status:i,Longitude:n.coords.longitude,Latitude:n.coords.latitude,Timestamp:t}]}}else e={GeoLocationInfo:[{Status:i}]};return JSON.stringify(e)}}function detectFields(){var e,t,n=document.getElementsByTagName("form"),i=n.length,r=[];r.push("url="+window.location.href);for(var o=0;o255)return!1;return!0}return!1},ProxyCollector.initProxyCollection=function(){ProxyCollector.isValidIPAddress(ProxyCollector.externalIP)&&ProxyCollector.isValidIPAddress(ProxyCollector.internalIP)&&ProxyCollector.collect()};var SEP="|",PAIR="=",DEV="~";function FingerPrint(){var e=new Hashtable;e.put("npnul32","def"),e.put("npqtplugin6","qt6"),e.put("npqtplugin5","qt5"),e.put("npqtplugin4","qt4"),e.put("npqtplugin3","qt3"),e.put("npqtplugin2","qt2"),e.put("npqtplugin","qt1"),e.put("nppdf32","pdf"),e.put("NPSWF32","swf"),e.put("NPJava11","j11"),e.put("NPJava12","j12"),e.put("NPJava13","j13"),e.put("NPJava32","j32"),e.put("NPJava14","j14"),e.put("npoji600","j61"),e.put("NPJava131_16","j16"),e.put("NPOFFICE","mso"),e.put("npdsplay","wpm"),e.put("npwmsdrm","drm"),e.put("npdrmv2","drn"),e.put("nprjplug","rjl"),e.put("nppl3260","rpl"),e.put("nprpjplug","rpv"),e.put("npchime","chm"),e.put("npCortona","cor"),e.put("np32dsw","dsw"),e.put("np32asw","asw"),e.put("internal-pdf-viewer","pdf"),e.put("mhjfbmdgcfjbbpaeojofohoefgiehjai","pdf"),e.put("internal-nacl-plugin","nacl"),e.put("widevinecdmadapter","dll"),e.put("Flash","flash"),e.put("npctrl","dll"),this.deviceprint_version=function(){return"3.8.0.0-SNAPSHOT"},this.deviceprint_browser=function(){return navigator.userAgent.toLowerCase()+SEP+navigator.appVersion+SEP+navigator.platform},this.deviceprint_software=function(){var t="",n=!0,r="",o=navigator.plugins,a=navigator.mimeTypes;if(o.length>0){var c="",s=o.length;for(i=0;i0)for("",i=0;i0){var o="",a="";for(i=0;i10?new FingerPrint:new IE_FingerPrint;break;case"Firefox":e=new Mozilla_FingerPrint;break;case"Opera":e=new Opera_FingerPrint;break;case"Edge":case"Edg":e=(t=detectIE())>10?new FingerPrint:new IE_FingerPrint;break;default:e=new FingerPrint}var n="version="+e.deviceprint_version()+"&pm_fpua="+e.deviceprint_browser()+"&pm_fpsc="+e.deviceprint_display()+"&pm_fpsw="+e.deviceprint_software()+"&pm_fptz="+e.deviceprint_timezone()+"&pm_fpln="+e.deviceprint_language()+"&pm_fpjv="+e.deviceprint_java()+"&pm_fpco="+e.deviceprint_cookie();return n=(n=(n=(n=n+"&pm_fpasw="+e.deviceprint_all_software())+"&pm_fpan="+e.deviceprint_appName()+"&pm_fpacn="+e.deviceprint_appCodeName()+"&pm_fpol="+e.deviceprint_online()+"&pm_fposp="+e.deviceprint_opsProfile()+"&pm_fpup="+e.deviceprint_userProfile()+"&pm_fpsaw="+e.deviceprint_screen_availWidth()+"&pm_fpspd="+e.deviceprint_screen_pixelDepth()+"&pm_fpsbd="+e.deviceprint_screen_bufferDepth()+"&pm_fpsdx="+e.deviceprint_screen_deviceXDPI()+"&pm_fpsdy="+e.deviceprint_screen_deviceYDPI()+"&pm_fpslx="+e.deviceprint_screen_logicalXDPI()+"&pm_fpsly="+e.deviceprint_screen_logicalYDPI()+"&pm_fpsfse="+e.deviceprint_screen_fontSmoothingEnabled()+"&pm_fpsui="+e.deviceprint_screen_updateInterval())+"&pm_os="+BrowserDetect.OS+"&pm_brmjv="+parseInt(BrowserDetect.version,10)+"&pm_br="+BrowserDetect.browser)+"&pm_inpt="+e.deviceprint_ping_in()+"&pm_expt="+e.deviceprint_ping_ex()}function form_add_data(e,t,n){return e&&e.length>0?e+="&":e="",e+=t+"="+escape(n.toString())}function form_add_deviceprint(e,t,n){return e=form_add_data(e,t+"d",n)}function detectIE(){var e,t=window.navigator.userAgent,n=t.indexOf("MSIE ");if(n>0)return parseInt(t.substring(n+5,t.indexOf(".",n)),10);if(t.indexOf("Trident/")>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}return(e=t.indexOf("Edge/"))>0?parseInt(t.substring(e+5,t.indexOf(".",e)),10):(e=t.indexOf("Edg/"))>0&&parseInt(t.substring(e+4,t.indexOf(".",e)),10)}var HTML5="HTML5",BLACKBERRY="blackberry",UNDEFINED="undefined",GEO_LOCATION_DEFAULT_STRUCT='{"GeoLocationInfo":[{"Status":4}]}',geoLocator=null,geoLocatorStatus=!1;function detectDeviceCollectionAPIMode(){return typeof navigator.geolocation!=UNDEFINED?HTML5:typeof window.blackberry!=UNDEFINED&&blackberry.location.GPSSupported?BLACKBERRY:UNDEFINED}function init(e,t,n,i,r){var o=detectDeviceCollectionAPIMode();return o==HTML5?((geoLocator=new HTML5LocationCollector).init(e,t,n,i),!0):o==BLACKBERRY&&((geoLocator=new BlackberryLocationCollector).init(r,t,n,i),!0)}function startCollection(e,t,n,i,r){return!!(geoLocatorStatus=init(e,t,n,i,r))&&geoLocator.startLocationWatch()}function stopCollection(){geoLocatorStatus&&geoLocator.stopWatch()}function getGeolocationStruct(){return geoLocatorStatus?geoLocator.generateGeolocationJSONStruct():GEO_LOCATION_DEFAULT_STRUCT}function HTML5LocationCollector(){var e=this,t=-1;this.getGeolocationWatchId=function(){return t};var n=null;this.getGeolocationLastPosition=function(){return n};var i=4;this.getGeolocationStatusCode=function(){return i};var r="";this.getGeolocationErrorMessage=function(){return r};var o={accuracy:100,timeout:180,relevancy:120,expiration:48};this.getGeolocationConfig=function(){return o},this.startLocationWatch=function(){var e={enableHighAccuracy:!0,timeout:1e3*o.timeout,maximumAge:o.expiration};return navigator.geolocation?(t=navigator.geolocation.watchPosition(this.handlePosition,this.handleError,e),!0):(i=4,!1)},this.init=function(e,t,n,i){null!==e&&e>=0&&e<=200&&(o.accuracy=e),null!==t&&t>=90&&t<=300&&(o.timeout=t),null!==n&&n>=60&&n<=240&&(o.relevancy=n),null!==i&&i>=24&&i<=60&&(o.expiration=i)},this.handlePosition=function(t){var r=(new Date).getTime();(r-getTimestampInMillis(t.timestamp)<=60*o.expiration*60*1e3&&(null===n||t.timestamp>n.timestamp||t.coords.accuracy=0;a--)r[a]!=p||(found=!0);i[p]=o[p]}n=!1,t=function(){var e=(document.createEvent?document.createEvent("Event"):document.createEventObject()).timeStamp||new Date;(e=new Date(e)).getYear()>2100&&(e=new Date(e/1e3));return e=e.getTime()}(),e={elements:new UIElementList,events:[],collection_status:0,toString:function(){return"RecordedData: {elements: "+this.elements+", events: "+this.events+"}"}},g()}function a(){for(var e=function(){for(var e=[],t=document.getElementsByTagName("input"),n=0,i=t.length;n2100&&(t/=1e3)):t=(new Date).getTime();return t}(i);a.offset(l-t),e.events.push(a)}return!0}function u(e){var t=e||window.event;return function(e){if("keydown"==e.type){var t=e.which||e.charCode||e.keyCode;if(("undefined"!=typeof KeyboardEvent&&t==KeyboardEvent.DOM_VK_V||118==t||86==t)&&(e.ctrlKey||e.metaKey))return!0}return!1}(t)?l({target:d(t),type:"paste"}):l(t)}function d(e){return e.target?e.target:e.srcElement}function g(){var e=l,t=document;t.addEventListener?(t.addEventListener("keydown",u,!1),t.addEventListener("paste",e,!1),t.addEventListener("focus",e,!0),t.addEventListener("blur",e,!0)):t.attachEvent&&(t.onkeydown=u,t.onfocusin=e,t.onfocusout=e)}function f(e){return"keydown"==e.type?RSAUIEvent.KeyDown:"submit"==e.type?RSAUIEvent.Submit:"paste"==e.type?RSAUIEvent.Paste:"focus"==e.type||"focusin"==e.type?RSAUIEvent.Focus:"blur"==e.type||"focusout"==e.type?RSAUIEvent.Blur:RSAUIEvent.Unknown}function v(e){return e.nodeName+(e.type?":"+e.type:"")}function m(e){return e.id?e.id:e.name?e.name:e.nodeName}return o(),g(),{addElement:function(e){return s(e)},getEventType:function(e){return f(e)},getEventCode:function(e){return function(e){return e==RSAUIEvent.KeyDown?"keydown":e==RSAUIEvent.Submit?"submit":e==RSAUIEvent.Focus?"focus":e==RSAUIEvent.Blur?"blur":e==RSAUIEvent.Paste?"paste":"unknown"}(e)},getRecordedData:function(){return e},getElementType:function(e){return v(e)},getElementId:function(e){return m(e)},initEventCollection:function(e){o(e)},getConfig:function(){return i},serialize:function(){!function(){a();for(var t=e.elements,n=t.size();n>=1;n--){var i=t.getByIndex(n),r=i.id(),o=document.getElementById(r);if(!o){var c=document.getElementsByName(r);c.length>0&&(o=c[0])}o&&o.value&&i.length(o.value.length)}}();for(var i=this.getRecordedData(),r=i.elements,o=TimestampCollector.getStatus(),c=[],s=0;s0;y--){var C=r.getByIndex(y),E=C.serialize()+";";if(h.length,d&&v+h.length+E.length>g){n=!0;break}null==C.type().match("INPUT:checkbox")&&C.length()>0&&0==C.eventCount()&&(h=E+h)}v+=h.length;for(var _="";p--;){var w=l[p],P=w.index(),x=w.serialize()+";",b=(E=r.getByIndex(P).serialize()+";",x.length);if(c[P]||(b+=E.length),_.length,d&&v+_.length+b>g){n=!0;break}c[P]||(h=E+h,v+=E.length),c[P]=!0,_=x+_}return h.length>0&&(h=h.substring(0,h.length-1)),_.length>0&&(_=_.substring(0,_.length-1)),h+"@"+_+"@"+(n?1:0)+f+m}}}();function RSAUIEvent(){var e=this===window?{}:this;e.index=function(t){if(0===arguments.length)return e._index;e._index=arguments[0]},e.offset=function(t){if(0===arguments.length)return e._offset;e._offset=arguments[0]},e.type=function(t){if(0===arguments.length)return e._type;e._type=arguments[0]},e.serialize=function(){return e.index()+","+e.type()+",0"},e.toString=function(){return"UIEvent: [index: "+e.index()+", type: "+e.type()+", offset: "+e.offset()+"]"}}function InteractionElement(){var e=this===window?{}:this;e._eventCount=0,e.id=function(t){if(0===arguments.length)return e._id;e._id=arguments[0]},e.index=function(t){if(0===arguments.length)return e._index;e._index=arguments[0]},e.length=function(t){if(0===arguments.length)return e._length;e._length=arguments[0]},e.type=function(t){if(0===arguments.length)return e._type;e._type=arguments[0]},e.incrementEventCount=function(){e._eventCount++},e.eventCount=function(){return e._eventCount},e.serialize=function(){var t=e.index();return e.index()+","+t+","+e.type()+","+e.length()},e.toString=function(){return"InteractionElement: [id: "+e.id()+", index: "+e.index()+", length: "+e.length()+", type: "+e.type()+"]"}}function UIElementList(){var e=this===window?{}:this,t=new Hashtable,n=new Hashtable;e.get=function(e){return t.get(e)},e.getByIndex=function(e){return n.get(e)},e.containsKey=function(e){return t.containsKey(e)},e.indexByKey=function(e){return get(e).index()},e.size=function(){return t.size()},e.put=function(e){var i=e.id();if(!t.containsKey(i)){t.put(i,e);var r=t.size();e.index(r),n.put(r,e)}},e.toString=function(){return"[size: "+t.size()+", names: ["+t+"], indexes: ["+n+"]]"}}function activeXDetect(e){var t=null;try{t=document.body.getComponentVersion("{"+e+"}","ComponentID")}catch(e){}return null!==t&&t}function stripIllegalChars(e){t="";for(var n=(e=e.toLowerCase()).length,i=0;i=0&&(filenameLen=o.length,o=o.substring(a+i.length,filenameLen));var c=o.indexOf(r);return c>=0&&(o=o.slice(0,c)),o}RSAUIEvent.Unknown=0,RSAUIEvent.KeyDown=1,RSAUIEvent.Submit=2,RSAUIEvent.Focus=3,RSAUIEvent.Blur=4,RSAUIEvent.Paste=5;var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"an unknown browser",this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version",this.OS=this.searchString(this.dataOS,this.browser)||"an unknown OS"},searchString:function(e,t){for(var n=e.length,i=t,r=0;r