vendor: 4,795 bytes, lines 1-19
1/** 2 * NOTICE OF LICENSE 3 * 4 * This source file is subject to the Academic Free License version 3.0 5 * that is bundled with this package in the file LICENSE.md. 6 * It is also available through the world-wide-web at this URL: 7 * https://opensource.org/licenses/AFL-3.0 8 * If you did not receive a copy of the license and are unable to 9 * obtain it through the world-wide-web, please send an email 10 * to [email protected] so we can send you a copy immediately. 11 * 12 * @author NetReviews SAS <[email protected]> 13 * @copyright 2012-2023 NetReviews SAS 14 * @license NetReviews 15 * @version Release: $Revision: 8.0.0 16 * @date 07/09/2023 17 * International Registered Trademark & Property of NetReviews SAS 18 */ 19!function(e,t,i){"use strict";"function"==typeof define&&define.amd?define(i):"undefined"!=typeof module&&module.exports?module.exports=i():t.exports?t.exports=i():t[e]=i()}("Fingerprint2",this,function(){"use strict";var e=function(t){if(!(this instanceof e))return new e(t);var i={swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",detectScreenOrientation:!0,sortPluginsFor:[/palemoon/i],userDefinedFonts:[]};this.options=this.extend(t,i),this.nativeForEach=Array.prototype.forEach,this.nativeMap=Array.prototype.map};return e.prototype={extend:function(e,t){if(null==e)return t;for(var i in e)null!=e[i]&&t[i]!==e[i]&&(t[i]=e[i]);return t},get:function(e){var t=this,i={data:[],push:function(e){var i=e.key,a=e.value;"function"==typeof t.options.preprocessor&&(a=t.options.preprocessor(i,a)),this.data.push({key:i,value:a})}};i=this.userAgentKey(i),i=this.languageKey(i),i=this.colorDepthKey(i),i=this.pixelRatioKey(i),i=this.hardwareConcurrencyKey(i),i=this.screenResolutionKey(i),i=this.availableScreenResolutionKey(i),i=this.timezoneOffsetKey(i),i=this.sessionStorageKey(i),i=this.localStorageKey(i),i=this.indexedDbKey(i),i=this.addBehaviorKey(i),i=this.openDatabaseKey(i),i=this.cpuClassKey(i),i=this.platformKey(i),i=this.doNotTrackKey(i),i=this.pluginsKey(i),i=this.canvasKey(i),i=this.webglKey(i),i=this.adBlockKey(i),i=this.hasLiedLanguagesKey(i),i=this.hasLiedResolutionKey(i),i=this.hasLiedOsKey(i),i=this.hasLiedBrowserKey(i),i=this.touchSupportKey(i),i=this.customEntropyFunction(i),this.fontsKey(i,function(i){var a=[];t.each(i.data,function(e){var t=e.value;"undefined"!=typeof e.value.join&&(t=e.value.join(";")),a.push(t)});var r=t.x64hash128(a.join("~~~"),31);return e(r,i.data)})},customEntropyFunction:function(e){return"function"==typeof this.options.customFunction&&e.push({key:"custom",value:this.options.customFunction()}),e},userAgentKey:function(e){return this.options.excludeUserAgent||e.push({key:"user_agent",value:this.getUserAgent()}),e},getUserAgent:function(){return navigator.userAgent},languageKey:function(e){return this.options.excludeLanguage||e.push({key:"language",value:navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||""}),e},colorDepthKey:function(e){return this.options.excludeColorDepth||e.push({key:"color_depth",value:screen.colorDepth||-1}),e},pixelRatioKey:function(e){return this.options.excludePixelRatio||e.push({key:"pixel_ratio",value:this.getPixelRatio()}),e},getPixelRatio:function(){return window.devicePixelRatio||""},screenResolutionKey:function(e){return this.options.excludeScreenResolution?e:this.getScreenResolution(e)},getScreenResolution:function(e){var t;return t=this.options.detectScreenOrientation&&screen.height>screen.width?[screen.height,screen.width]:[screen.width,screen.height],"undefined"!=typeof t&&e.push({key:"resolution",value:t}),e},availableScreenResolutionKey:function(e){return this.options.excludeAvailableScreenResolution?e:this.getAvailableScreenResolution(e)},getAvailableScreenResolution:function(e){var t;return screen.availWidth&&screen.availHeight&&(t=this.options.detectScreenOrientation?screen.availHeight>screen.availWidth?[screen.availHeight,screen.availWidth]:[screen.availWidth,screen.availHeight]:[screen.availHeight,screen.availWidth]),"undefined"!=typeof t&&e.push({key:"available_resolution",value:t}),e},timezoneOffsetKey:function(e){return this.options.excludeTimezoneOffset||e.push({key:"timezone_offset",value:(new Date).getTimezoneOffset()}),e},sessionStorageKey:function(e){return!this.options.excludeSessionStorage&&this.hasSessionStorage()&&e.push({key:"session_storage",value:1}),e},localStorageKey:function(e){return!this.options.excludeSessionStorage&&this.hasLocalStorage()&&e.push({key:"local_storage",value:1}),e},indexedDbKey:function(e){return!this.options.excludeIndexedDB&&this.hasIndexedDB()&&e.push({key:"indexed_db",value:1}),e},addBehaviorKey:function(e){return document.body&&!this.options.excludeAddBehavior&&document.body.addBehavior&&e.push({key:"add_behavior",value:1}),e}
vendor: 2,911 bytes, line 19
19,openDatabaseKey:function(e){return!this.options.excludeOpenDatabase&&window.openDatabase&&e.push({key:"open_database",value:1}),e},cpuClassKey:function(e){return this.options.excludeCpuClass||e.push({key:"cpu_class",value:this.getNavigatorCpuClass()}),e},platformKey:function(e){return this.options.excludePlatform||e.push({key:"navigator_platform",value:this.getNavigatorPlatform()}),e},doNotTrackKey:function(e){return this.options.excludeDoNotTrack||e.push({key:"do_not_track",value:this.getDoNotTrack()}),e},canvasKey:function(e){return!this.options.excludeCanvas&&this.isCanvasSupported()&&e.push({key:"canvas",value:this.getCanvasFp()}),e},webglKey:function(e){return this.options.excludeWebGL?e:this.isWebGlSupported()?(e.push({key:"webgl",value:this.getWebglFp()}),e):e},adBlockKey:function(e){return this.options.excludeAdBlock||e.push({key:"adblock",value:this.getAdBlock()}),e},hasLiedLanguagesKey:function(e){return this.options.excludeHasLiedLanguages||e.push({key:"has_lied_languages",value:this.getHasLiedLanguages()}),e},hasLiedResolutionKey:function(e){return this.options.excludeHasLiedResolution||e.push({key:"has_lied_resolution",value:this.getHasLiedResolution()}),e},hasLiedOsKey:function(e){return this.options.excludeHasLiedOs||e.push({key:"has_lied_os",value:this.getHasLiedOs()}),e},hasLiedBrowserKey:function(e){return this.options.excludeHasLiedBrowser||e.push({key:"has_lied_browser",value:this.getHasLiedBrowser()}),e},fontsKey:function(e,t){return this.options.excludeJsFonts?this.flashFontsKey(e,t):this.jsFontsKey(e,t)},flashFontsKey:function(e,t){return this.options.excludeFlashFonts?t(e):this.hasSwfObjectLoaded()&&this.hasMinFlashInstalled()?"undefined"==typeof this.options.swfPath?t(e):void this.loadSwfAndDetectFonts(function(i){e.push({key:"swf_fonts",value:i.join(";")}),t(e)}):t(e)},jsFontsKey:function(e,t){var i=this;return setTimeout(function(){var a=["monospace","sans-serif","serif"],r=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Garamond","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"],n
vendor: 6,129 bytes, line 19
19=["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"];
vendor: 1,138 bytes, line 19
19i.options.extendedJsFonts&&(r=r.concat(n)),r=r.concat(i.options.userDefinedFonts);var o="mmmmmmmmmmlli",s="72px",l=document.getElementsByTagName("body")[0],h=document.createElement("div"),u=document.createElement("div"),c={},d={},g=function(){var e=document.createElement("span");return e.style.position="absolute",e.style.left="-9999px",e.style.fontSize=s,e.style.lineHeight="normal",e.innerHTML=o,e},p=function(e,t){var i=g();return i.style.fontFamily="'"+e+"',"+t,i},f=function(){for(var e=[],t=0,i=a.length;t<i;t++){var r=g();r.style.fontFamily=a[t],h.appendChild(r),e.push(r)}return e},m=function(){for(var e={},t=0,i=r.length;t<i;t++){for(var n=[],o=0,s=a.length;o<s;o++){var l=p(r[t],a[o]);u.appendChild(l),n.push(l)}e[r[t]]=n}return e},T=function(e){for(var t=!1,i=0;i<a.length;i++)if(t=e[i].offsetWidth!==c[a[i]]||e[i].offsetHeight!==d[a[i]])return t;return t},S=f();l.appendChild(h);for(var x=0,v=a.length;x<v;x++)c[a[x]]=S[x].offsetWidth,d[a[x]]=S[x].offsetHeight;var E=m();l.appendChild(u);for(var M=[],A=0,y=r.length;A<y;A++)T(E[r[A]])&&M.push(r[A]);l.removeChild(u),l.removeChild(h),e.push({key:"js_fonts",value:M}),t(e)},1)
vendor: 15,533 bytes, line 19
19},pluginsKey:function(e){return this.options.excludePlugins||(this.isIE()?this.options.excludeIEPlugins||e.push({key:"ie_plugins",value:this.getIEPlugins()}):e.push({key:"regular_plugins",value:this.getRegularPlugins()})),e},getRegularPlugins:function(){for(var e=[],t=0,i=navigator.plugins.length;t<i;t++)e.push(navigator.plugins[t]);return this.pluginsShouldBeSorted()&&(e=e.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0})),this.map(e,function(e){var t=this.map(e,function(e){return[e.type,e.suffixes].join("~")}).join(",");return[e.name,e.description,t].join("::")},this)},getIEPlugins:function(){var e=[];if(Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(window,"ActiveXObject")||"ActiveXObject"in window){var t=["AcroPDF.PDF","Adodb.Stream","AgControl.AgControl","DevalVRXCtrl.DevalVRXCtrl.1","MacromediaFlashPaper.MacromediaFlashPaper","Msxml2.DOMDocument","Msxml2.XMLHTTP","PDF.PdfCtrl","QuickTime.QuickTime","QuickTimeCheckObject.QuickTimeCheck.1","RealPlayer","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)","Scripting.Dictionary","SWCtl.SWCtl","Shell.UIHelper","ShockwaveFlash.ShockwaveFlash","Skype.Detection","TDCCtl.TDCCtl","WMPlayer.OCX","rmocx.RealPlayer G2 Control","rmocx.RealPlayer G2 Control.1"];e=this.map(t,function(e){try{return new ActiveXObject(e),e}catch(t){return null}})}return navigator.plugins&&(e=e.concat(this.getRegularPlugins())),e},pluginsShouldBeSorted:function(){for(var e=!1,t=0,i=this.options.sortPluginsFor.length;t<i;t++){var a=this.options.sortPluginsFor[t];if(navigator.userAgent.match(a)){e=!0;break}}return e},touchSupportKey:function(e){return this.options.excludeTouchSupport||e.push({key:"touch_support",value:this.getTouchSupport()}),e},hardwareConcurrencyKey:function(e){return this.options.excludeHardwareConcurrency||e.push({key:"hardware_concurrency",value:this.getHardwareConcurrency()}),e},hasSessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},hasLocalStorage:function(){try{return!!window.localStorage}catch(e){return!0}},hasIndexedDB:function(){try{return!!window.indexedDB}catch(e){return!0}},getHardwareConcurrency:function(){return navigator.hardwareConcurrency?navigator.hardwareConcurrency:"unknown"},getNavigatorCpuClass:function(){return navigator.cpuClass?navigator.cpuClass:"unknown"},getNavigatorPlatform:function(){return navigator.platform?navigator.platform:"unknown"},getDoNotTrack:function(){return navigator.doNotTrack?navigator.doNotTrack:navigator.msDoNotTrack?navigator.msDoNotTrack:window.doNotTrack?window.doNotTrack:"unknown"},getTouchSupport:function(){var e=0,t=!1;"undefined"!=typeof navigator.maxTouchPoints?e=navigator.maxTouchPoints:"undefined"!=typeof navigator.msMaxTouchPoints&&(e=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),t=!0}catch(i){}var a="ontouchstart"in window;return[e,t,a]},getCanvasFp:function(){var e=[],t=document.createElement("canvas");t.width=2e3,t.height=200,t.style.display="inline";var i=t.getContext("2d");return i.rect(0,0,10,10),i.rect(2,2,6,6),e.push("canvas winding:"+(i.isPointInPath(5,5,"evenodd")===!1?"yes":"no")),i.textBaseline="alphabetic",i.fillStyle="#f60",i.fillRect(125,1,62,20),i.fillStyle="#069",this.options.dontUseFakeFontInCanvas?i.font="11pt Arial":i.font="11pt no-real-font-123",i.fillText("Cwm fjordbank glyphs vext quiz, \ud83d\ude03",2,15),i.fillStyle="rgba(102, 204, 0, 0.2)",i.font="18pt Arial",i.fillText("Cwm fjordbank glyphs vext quiz, \ud83d\ude03",4,45),i.globalCompositeOperation="multiply",i.fillStyle="rgb(255,0,255)",i.beginPath(),i.arc(50,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(0,255,255)",i.beginPath(),i.arc(100,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,255,0)",i.beginPath(),i.arc(75,100,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,0,255)",i.arc(75,75,75,0,2*Math.PI,!0),i.arc(75,75,25,0,2*Math.PI,!0),i.fill("evenodd"),e.push("canvas fp:"+t.toDataURL()),e.join("~")},getWebglFp:function(){var e,t=function(t){return e.clearColor(0,0,0,1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),"["+t[0]+", "+t[1]+"]"},i=function(e){var t,i=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic");return i?(t=e.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT),0===t&&(t=2),t):null};if(e=this.getWebglCanvas(),!e)return null;var a=[],r="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",n="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",o=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,o);var s=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);e.bufferData(e.ARRAY_BUFFER,s,e.STATIC_DRAW),o.itemSize=3,o.numItems=3;var l=e.createProgram(),h=e.createShader(e.VERTEX_SHADER);e.shaderSource(h,r),e.compileShader(h);var u=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(u,n),e.compileShader(u),e.attachShader(l,h),e.attachShader(l,u),e.linkProgram(l),e.useProgram(l),l.vertexPosAttrib=e.getAttribLocation(l,"attrVertex"),l.offsetUniform=e.getUniformLocation(l,"uniformOffset"),e.enableVertexAttribArray(l.vertexPosArray),e.vertexAttribPointer(l.vertexPosAttrib,o.itemSize,e.FLOAT,!1,0,0),e.uniform2f(l.offsetUniform,1,1),e.drawArrays(e.TRIANGLE_STRIP,0,o.numItems),null!=e.canvas&&a.push(e.canvas.toDataURL()),a.push("extensions:"+e.getSupportedExtensions().join(";")),a.push("webgl aliased line width range:"+t(e.getParameter(e.ALIASED_LINE_WIDTH_RANGE))),a.push("webgl aliased point size range:"+t(e.getParameter(e.ALIASED_POINT_SIZE_RANGE))),a.push("webgl alpha bits:"+e.getParameter(e.ALPHA_BITS)),a.push("webgl antialiasing:"+(e.getContextAttributes().antialias?"yes":"no")),a.push("webgl blue bits:"+e.getParameter(e.BLUE_BITS)),a.push("webgl depth bits:"+e.getParameter(e.DEPTH_BITS)),a.push("webgl green bits:"+e.getParameter(e.GREEN_BITS)),a.push("webgl max anisotropy:"+i(e)),a.push("webgl max combined texture image units:"+e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),a.push("webgl max cube map texture size:"+e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE)),a.push("webgl max fragment uniform vectors:"+e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS)),a.push("webgl max render buffer size:"+e.getParameter(e.MAX_RENDERBUFFER_SIZE)),a.push("webgl max texture image units:"+e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),a.push("webgl max texture size:"+e.getParameter(e.MAX_TEXTURE_SIZE)),a.push("webgl max varying vectors:"+e.getParameter(e.MAX_VARYING_VECTORS)),a.push("webgl max vertex attribs:"+e.getParameter(e.MAX_VERTEX_ATTRIBS)),a.push("webgl max vertex texture image units:"+e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),a.push("webgl max vertex uniform vectors:"+e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS)),a.push("webgl max viewport dims:"+t(e.getParameter(e.MAX_VIEWPORT_DIMS))),a.push("webgl red bits:"+e.getParameter(e.RED_BITS)),a.push("webgl renderer:"+e.getParameter(e.RENDERER)),a.push("webgl shading language version:"+e.getParameter(e.SHADING_LANGUAGE_VERSION)),a.push("webgl stencil bits:"+e.getParameter(e.STENCIL_BITS)),a.push("webgl vendor:"+e.getParameter(e.VENDOR)),a.push("webgl version:"+e.getParameter(e.VERSION));try{var c=e.getExtension("WEBGL_debug_renderer_info");c&&(a.push("webgl unmasked vendor:"+e.getParameter(c.UNMASKED_VENDOR_WEBGL)),a.push("webgl unmasked renderer:"+e.getParameter(c.UNMASKED_RENDERER_WEBGL)))}catch(d){}return e.getShaderPrecisionFormat?(a.push("webgl vertex shader high float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision),a.push("webgl vertex shader high float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).rangeMin),a.push("webgl vertex shader high float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).rangeMax),a.push("webgl vertex shader medium float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision),a.push("webgl vertex shader medium float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).rangeMin),a.push("webgl vertex shader medium float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).rangeMax),a.push("webgl vertex shader low float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).precision),a.push("webgl vertex shader low float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).rangeMin),a.push("webgl vertex shader low float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).rangeMax),a.push("webgl fragment shader high float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision),a.push("webgl fragment shader high float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).rangeMin),a.push("webgl fragment shader high float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).rangeMax),a.push("webgl fragment shader medium float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision),a.push("webgl fragment shader medium float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).rangeMin),a.push("webgl fragment shader medium float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).rangeMax),a.push("webgl fragment shader low float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).precision),a.push("webgl fragment shader low float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).rangeMin),a.push("webgl fragment shader low float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).rangeMax),a.push("webgl vertex shader high int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).precision),a.push("webgl vertex shader high int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).rangeMin),a.push("webgl vertex shader high int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).rangeMax),a.push("webgl vertex shader medium int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).precision),a.push("webgl vertex shader medium int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).rangeMin),a.push("webgl vertex shader medium int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).rangeMax),a.push("webgl vertex shader low int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).precision),a.push("webgl vertex shader low int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).rangeMin),a.push("webgl vertex shader low int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).rangeMax),a.push("webgl fragment shader high int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).precision),a.push("webgl fragment shader high int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).rangeMin),a.push("webgl fragment shader high int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).rangeMax),a.push("webgl fragment shader medium int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).precision),a.push("webgl fragment shader medium int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).rangeMin),a.push("webgl fragment shader medium int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).rangeMax),a.push("webgl fragment shader low int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).precision),a.push("webgl fragment shader low int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).rangeMin),a.push("webgl fragment shader low int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).rangeMax),a.join("~")):a.join("~")},getAdBlock:function(){var e=document.createElement("div");e.innerHTML=" ",e.className="adsbox";var t=!1;try{document.body.appendChild(e),t=0===document.getElementsByClassName("adsbox")[0].offsetHeight,document.body.removeChild(e)}catch(i){t=!1}return t},getHasLiedLanguages:function(){if("undefined"!=typeof navigator.languages)try{var e=navigator.languages[0].substr(0,2);if(e!==navigator.language.substr(0,2))return!0}catch(t){return!0}return!1},getHasLiedResolution:function(){return screen.width<screen.availWidth||screen.height<screen.availHeight},getHasLiedOs:function(){var e,t=navigator.userAgent.toLowerCase(),i=navigator.oscpu,a=navigator.platform.toLowerCase();e=t.indexOf("windows phone")>=0?"Windows Phone":t.indexOf("win")>=0?"Windows":t.indexOf("android")>=0?"Android":t.indexOf("linux")>=0?"Linux":t.indexOf("iphone")>=0||t.indexOf("ipad")>=0?"iOS":t.indexOf("mac")>=0?"Mac":"Other";var r;if(r="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,r&&"Windows Phone"!==e&&"Android"!==e&&"iOS"!==e&&"Other"!==e)return!0;if("undefined"!=typeof i){if(i=i.toLowerCase(),i.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e)return!0;if(i.indexOf("linux")>=0&&"Linux"!==e&&"Android"!==e)return!0;if(i.indexOf("mac")>=0&&"Mac"!==e&&"iOS"!==e)return!0;if(0===i.indexOf("win")&&0===i.indexOf("linux")&&i.indexOf("mac")>=0&&"other"!==e)return!0}return a.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e||((a.indexOf("linux")>=0||a.indexOf("android")>=0||a.indexOf("pike")>=0)&&"Linux"!==e&&"Android"!==e||((a.indexOf("mac")>=0||a.indexOf("ipad")>=0||a.indexOf("ipod")>=0||a.indexOf("iphone")>=0)&&"Mac"!==e&&"iOS"!==e||(0===a.indexOf("win")&&0===a.indexOf("linux")&&a.indexOf("mac")>=0&&"other"!==e||"undefined"==typeof navigator.plugins&&"Windows"!==e&&"Windows Phone"!==e)))},getHasLiedBrowser:function(){var e,t=navigator.userAgent.toLowerCase(),i=navigator.productSub;if(e=t.indexOf("firefox")>=0?"Firefox":t.indexOf("opera")>=0||t.indexOf("opr")>=0?"Opera":t.indexOf("chrome")>=0?"Chrome":t.indexOf("safari")>=0?"Safari":t.indexOf("trident")>=0?"Internet Explorer":"Other",("Chrome"===e||"Safari"===e||"Opera"===e)&&"20030107"!==i)return!0;var a=eval.toString().length;if(37===a&&"Safari"!==e&&"Firefox"!==e&&"Other"!==e)return!0;if(39===a&&"Internet Explorer"!==e&&"Other"!==e)return!0;if(33===a&&"Chrome"!==e&&"Opera"!==e&&"Other"!==e)return!0;var r;try{throw"a"}catch(n){try{n.toSource(),r=!0}catch(o){r=!1}}return!(!r||"Firefox"===e||"Other"===e)},isCanvasSupported:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},isWebGlSupported:function(){if(!this.isCanvasSupported())return!1;var e,t=document.createElement("canvas");try{e=t.getContext&&(t.getContext("webgl")||t.getContext("experimental-webgl"))}catch(i){e=!1}return!!window.WebGLRenderingContext&&!!e},isIE:function(){return"Microsoft Internet Explorer"===navigator.appName||!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))},hasSwfObjectLoaded:function(){return"undefined"!=typeof window.swfobject},hasMinFlashInstalled:function(){return swfobject.hasFlashPlayerVersion("9.0.0")},addFlashDivNode:function(){var e=document.createElement("div");e.setAttribute("id",this.options.swfContainerId),document.body.appendChild(e)},
vendor: 4,789 bytes, lines 19-23
19loadSwfAndDetectFonts:function(e){var t="___fp_swf_loaded";window[t]=function(t){e(t)};var i=this.options.swfContainerId;this.addFlashDivNode();var a={onReady:t},r={allowScriptAccess:"always",menu:"false"};swfobject.embedSWF(this.options.swfPath,i,"1","1","9.0.0",!1,a,r,{})},getWebglCanvas:function(){var e=document.createElement("canvas"),t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(i){}return t||(t=null),t},each:function(e,t,i){if(null!==e)if(this.nativeForEach&&e.forEach===this.nativeForEach)e.forEach(t,i);else if(e.length===+e.length){for(var a=0,r=e.length;a<r;a++)if(t.call(i,e[a],a,e)==={})return}else for(var n in e)if(e.hasOwnProperty(n)&&t.call(i,e[n],n,e)==={})return},map:function(e,t,i){var a=[];return null==e?a:this.nativeMap&&e.map===this.nativeMap?e.map(t,i):(this.each(e,function(e,r,n){a[a.length]=t.call(i,e,r,n)}),a)},x64Add:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var i=[0,0,0,0];return i[3]+=e[3]+t[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=e[2]+t[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=e[1]+t[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=e[0]+t[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]},x64Multiply:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var i=[0,0,0,0];return i[3]+=e[3]*t[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=e[2]*t[3],i[1]+=i[2]>>>16,i[2]&=65535,i[2]+=e[3]*t[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=e[1]*t[3],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=e[2]*t[2],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=e[3]*t[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]},x64Rotl:function(e,t){return t%=64,32===t?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])},x64LeftShift:function(e,t){return t%=64,0===t?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]},x64Xor:function(e,t){return[e[0]^t[0],e[1]^t[1]]},x64Fmix:function(e){return e=this.x64Xor(e,[0,e[0]>>>1]),e=this.x64Multiply(e,[4283543511,3981806797]),e=this.x64Xor(e,[0,e[0]>>>1]),e=this.x64Multiply(e,[3301882366,444984403]),e=this.x64Xor(e,[0,e[0]>>>1])},x64hash128:function(e,t){ 20 e=e||"",t=t||0;for(var i=e.length%16,a=e.length-i,r=[0,t],n=[0,t],o=[0,0],s=[0,0],l=[2277735313,289559509],h=[1291169091,658871167],u=0;u<a;u+=16)o=[255&e.charCodeAt(u+4)|(255&e.charCodeAt(u+5))<<8|(255&e.charCodeAt(u+6))<<16|(255&e.charCodeAt(u+7))<<24,255&e.charCodeAt(u)|(255&e.charCodeAt(u+1))<<8|(255&e.charCodeAt(u+2))<<16|(255&e.charCodeAt(u+3))<<24],s=[255&e.charCodeAt(u+12)|(255&e.charCodeAt(u+13))<<8|(255&e.charCodeAt(u+14))<<16|(255&e.charCodeAt(u+15))<<24,255&e.charCodeAt(u+8)|(255&e.charCodeAt(u+9))<<8|(255&e.charCodeAt(u+10))<<16|(255&e.charCodeAt(u+11))<<24],o=this.x64Multiply(o,l),o=this.x64Rotl(o,31),o=this.x64Multiply(o,h),r=this.x64Xor(r,o),r=this.x64Rotl(r,27),r=this.x64Add(r,n),r=this.x64Add(this.x64Multiply(r,[0,5]),[0,1390208809]),s=this.x64Multiply(s,h),s=this.x64Rotl(s,33),s=this.x64Multiply(s,l),n=this.x64Xor(n,s),n=this.x64Rotl(n,31),n=this.x64Add(n,r),n=this.x64Add(this.x64Multiply(n,[0,5]),[0,944331445]);switch(o=[0,0],s=[0,0],i){case 15:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+14)],48));case 14:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+13)],40));case 13:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+12)],32));case 12:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+11)],24));case 11:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+10)],16));case 10:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+9)],8));case 9:s=this.x64Xor(s,[0,e.charCodeAt(u+8)]),s=this.x64Multiply(s,h),s=this.x64Rotl(s,33),s=this.x64Multiply(s,l),n=this.x64Xor(n,s);case 8:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+7)],56));case 7:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+6)],48));case 6:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+5)],40));case 5:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+4)],32));case 4:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+3)],24));case 3:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+2)],16));case 2:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+1)],8));case 1:o=this.x64Xor(o,[0,e.charCodeAt(u)]),o=this.x64Multiply(o,l),o=this.x64Rotl(o,31),o=this.x64Multiply(o,h),r=this.x64Xor(r,o)}return r=this.x64Xor(r,[0,e.length]),n=this.x64Xor(n,[0,e.length]),r=this.x64Add(r,n),n=this.x64Add(n,r),r=this.x64Fmix(r),n=this.x64Fmix(n),r=this.x64Add(r,n),n=this.x64Add(n,r),("00000000"+(r[0]>>>0).toString(16)).slice(-8)+("00000000"+(r[1]>>>0).toString(16)).slice(-8)+("00000000"+(n[0]>>>0).toString(16)).slice(-8)+("00000000"+(n[1]>>>0).toString(16)).slice(-8)}},e.VERSION="1.5.1",e}); 21 22 23var jQueryIsLoaded = false;
24try { 25if (typeof jQuery === 'undefined') 26 jQueryIsLoaded = false; 27else 28 jQueryIsLoaded = true; 29} catch (err) { 30jQueryIsLoaded = false; 31} 32 33if (!jQueryIsLoaded) { 34//https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js 35loadScript("https://www.avis-verifies.com/review/js/jquery-1.8.2.min.js"); 36} 37 38if (typeof window.avisVerifies === 'undefined') { 39window.avisVerifies = {}; 40} 41 42if (typeof jQuery !== 'undefined') { 43function av_widget_click() { 44 45if ($('.netreviews_tab').length) { //prestashop 1.7 46 if ($('#netreviews_tab').length){ 47 $("#netreviews_tab").click(); 48 $('html,body').animate({ 49 scrollTop: $("#netreviews_tab").offset().top 50 }, 'slow'); 51 }else{ 52 var tagclassname_av = $('.netreviews_tab').attr('id'); 53 $("a[href='#" + tagclassname_av + "']").click(); 54 $('html,body').animate({ 55 scrollTop: $("a[href='#" + tagclassname_av + "']").offset().top 56 }, 'slow'); 57 } 58 } else { 59 $("a[href='#netreviews_reviews_tab']").click(); 60 $('html,body').animate({ 61 scrollTop: $("#netreviews_reviews_tab").offset().top 62 // scrollTop: $(".avisverifies_tab").offset().top 63 }, 'slow'); 64 } 65 66} 67 68function netreviewsFilter(filter_option) { 69 var current_page = parseInt($("#netreviews_rating_section").attr("data-current-page")); 70 var sortbynote = parseInt($("#netreviews_rating_section").attr("data-sortbynote")); 71 var current_option_filter = $("#netreviews_rating_section").attr("data-current-option"); 72 $(".sortbynote").hide(); 73 if(filter_option != 'more'){ 74 if(filter_option > 0){ //when click on the notes 75 sortbynote = filter_option; 76 current_option_filter='horodate_DESC'; 77 $("#netreviews_rating_section").attr("data-sortbynote",filter_option); 78 $("#netreviews_rating_section").attr("data-current-option",'horodate_DESC'); 79 $(".netreviews_all_reviews").show(); 80 $('#netreviews_reviews_filter option:selected').removeAttr('selected'); 81 $(".sortbynote").show().prop('selected', true); 82 }else{ 83 sortbynote = 0; 84 $('.netreviews_stats_stars_big').css('opacity', '1'); 85 $("#netreviews_rating_section").attr("data-sortbynote",0); 86 current_option_filter = $("#netreviews_reviews_filter").val(); 87 $("#netreviews_rating_section").attr("data-current-option",current_option_filter); 88 } 89 current_page = 1; 90 $("#netreviews_rating_section").attr("data-current-page",1); 91 }else{ 92 current_page = current_page+1; 93 $("#netreviews_rating_section").attr("data-current-page",current_page); 94 } 95 96 $.ajax({ 97 url: $("#netreviews_rating_section").attr("data-url-ajax") + "netreviews/ajax-load.php", 98 type: "POST", 99 data: { 100 id_product: $("#netreviews_rating_section").attr("data-productid"), 101 nom_group: $("#netreviews_rating_section").attr("data-group-name"), 102 id_shop: $("#netreviews_rating_section").attr("data-idshop"), 103 reviews_max_pages: parseInt($("#netreviews_rating_section").attr("data-max-page")), 104 current_page: current_page, 105 sortbynote: sortbynote, 106 current_option_filter: current_option_filter, 107 filter_option: filter_option 108 }, 109 beforeSend: function() { 110 if(filter_option != 'more'){ 111 $('.loader_av').addClass("avisVerifiesAjaxImage"); 112 }else{ 113 $('.netreviews_button').addClass("active"); 114 } 115 $('.netreviews_all_reviews').click(function() { 116 $(this).delay(800).hide(); 117 $(".sortinitial").prop('selected', true); 118 $('.netreviews_stats_stars_big').css('opacity', '1'); 119 }); 120 }, 121 success: function(html) { 122 $('.netreviews_reviews_section').replaceWith(html); 123 window.avisVerifies.avLoadCookies(); 124 }, 125 error: function(jqXHR, textStatus, errorThrown) { 126 alert('something went wrong...'); 127 } 128 }); 129} 130 131 132function manageAnimations(){ 133 $('#netreviews_informations_label').click(function() { 134 if(!$('#netreviews_informations').hasClass('netreviews_active_info')) { 135 $('#netreviews_informations').addClass("netreviews_active_info"); 136 $('#netreviews_informations').fadeIn(); 137 } 138 else { 139 $('#netreviews_informations').removeClass("netreviews_active_info"); 140 $('#netreviews_informations').fadeOut(); 141 } 142 }); 143 $('#netreviews_informations').click(function() { 144 if($('#netreviews_informations').hasClass('netreviews_active_info')) { 145 $('#netreviews_informations').removeClass("netreviews_active_info"); 146 $('#netreviews_informations').fadeOut(); 147 } 148 }); 149} 150 151 152$(document).ready(function() { 153 manageAnimations(); 154 avhelpfulExec = false;
155 avInitialFingerPrint = ''; 156 avHelpfulCookie = {}; 157 avMessagesCookie = {}; 158 avHelpfulErrorMessage = $("#avHelpfulErrorMessage").val(); 159 avHelpfulSuccessMessage = $("#avHelpfulSuccessMessage").val(); 160 avHelpfulIdwebsite = $("#av_idwebsite").val(); 161 avHelpfulURL = $("#avHelpfulURL").val(); 162 voteButtons = document.getElementsByClassName("netreviewsVote"); 163 window.avisVerifies.avLoadCookies(); 164 165 // if the width's too small, display mobile version automatically 166 if($("#netreviews_reviews_tab").width() < 481){ 167 $("#netreviews_reviews_tab").addClass("nrResponsive"); 168 } 169 170 $('.netreviews_stats_stars_big').click(function () { 171 $('.netreviews_all_reviews').css('display', 'flex'); 172 $('.netreviews_stats_stars_big').css('opacity', '0.2'); 173 $(this).css('opacity', '1'); 174 }); 175 176 if ($('.netreviews_tab').length) { //prestashop 1.7 177 var av_tag = $("a[href='#"+$('.netreviews_tab').attr('id')+"']").text(); 178 if(av_tag ==""){ 179 $("a[href='#"+$('.netreviews_tab').attr('id')+"']").hide(); 180 } 181 } 182 183 if($('#checkboxNetreviewsConsent')){ 184 if($('#checkboxNetreviewsConsent')){ 185 $('#checkboxNetreviewsConsent').insertBefore('#conditions-to-approve'); 186 } 187 if($('#HOOK_PAYMENT')){ 188 $('#checkboxNetreviewsConsent').insertBefore('#HOOK_PAYMENT'); 189 } 190 } 191 192 if (storageAvailable('sessionStorage')) { 193 console.log('session Storage available'); 194 195 // On checkbox page 196 if($('#checkboxNetreviewsConsent #checkbox').length == 1){ 197 198 sessionStorage.setItem('netreviews_consent_collect_reviews', 'no'); 199 sessionStorage.setItem('netreviews_id_shop', $('#netreviews-id-shop').val()); 200 sessionStorage.setItem('netreviews_url_ajax', $("#netreviews-url-for-ajax").val()); 201 sessionStorage.setItem('netreviews_group_name', $('#netreviews-group-name').val()); 202 sessionStorage.setItem('netreviews_id_customer', $('#netreviews-id-customer').val()); 203 sessionStorage.setItem('netreviews_version_prestashop', $('#netreviews-version-presta').val()); 204 205 $('#checkboxNetreviewsConsent #checkbox').click(function(){ 206 if($('#checkboxNetreviewsConsent #checkbox').is(":checked")){ 207 sessionStorage.setItem('netreviews_consent_collect_reviews', 'yes'); 208 } 209 if(!$('#checkboxNetreviewsConsent #checkbox').is(":checked")){ 210 sessionStorage.setItem('netreviews_consent_collect_reviews', 'no'); 211 } 212 }); 213 } 214 215 var prestaVersion = sessionStorage.getItem('netreviews_version_prestashop'); 216 217 if(prestaVersion) { 218 if(prestaVersion >= '1.7') { 219 var button = $('#payment-confirmation button'); 220 } else if (prestaVersion >= '1.6' && prestaVersion < '1.7') { 221 var button = $('#cart_navigation button'); 222 } else if (prestaVersion >= '1.5' && prestaVersion < '1.6') { 223 var button = $('#cart_navigation input'); 224 } 225 226 if(button) { 227 button.click(function(){ 228 var collect_consent = sessionStorage.getItem('netreviews_consent_collect_reviews'); 229 var idShop = sessionStorage.getItem('netreviews_id_shop'); 230 var url = sessionStorage.getItem('netreviews_url_ajax'); 231 var groupName = sessionStorage.getItem('netreviews_group_name'); 232 var idCustomer = sessionStorage.getItem('netreviews_id_customer'); 233 234 $.ajax({ 235 url: url, 236 type: "POST", 237 data:{ 238 collect_consent: collect_consent, 239 ajax: true, 240 idShop: idShop, 241 groupName: groupName, 242 idCustomer: idCustomer 243 }, 244 success: function(response){ 245 console.log(response); 246 sessionStorage.removeItem('netreviews_consent_collect_reviews'); 247 sessionStorage.removeItem('netreviews_id_shop'); 248 sessionStorage.removeItem('netreviews_url_ajax'); 249 sessionStorage.removeItem('netreviews_group_name'); 250 sessionStorage.removeItem('netreviews_id_customer'); 251 sessionStorage.removeItem('netreviews_version_prestashop'); 252 }, 253 error: function(jqXHR, textStatus, errorThrown ){ 254 alert(errorThrown); 255 } 256 }); 257 }); 258 } 259 } 260 261 262 } 263 else { 264 console.log('session Storage not available for us'); 265 } 266 267 if($('.NETREVIEWS_PRODUCT_STARS')) { 268 $('.NETREVIEWS_PRODUCT_STARS').css('text-align', 'left'); 269 } 270 271 $("div.product-container div.skeepers_product__stars").on( "click", function() { 272 av_widget_click(); 273 } ); 274}); 275 276function storageAvailable(type) { 277 var storage; 278 try { 279 storage = window[type]; 280 var x = '__storage_test__'; 281 storage.setItem(x, x); 282 storage.removeItem(x); 283 return true; 284 } 285 catch(e) { 286 return e instanceof DOMException && ( 287 // everything except Firefox 288 e.code === 22 || 289 // Firefox 290 e.code === 1014 || 291 // test name field too, because code might not be present 292 // everything except Firefox 293 e.name === 'QuotaExceededError' || 294 // Firefox 295 e.name === 'NS_ERROR_DOM_QUOTA_REACHED') && 296 // acknowledge QuotaExceededError only if there's something already stored 297 (storage && storage.length !== 0); 298 } 299} 300 301function switchCommentsVisibility(review_number,type) { 302 $('div[review_number=' + review_number + ']').toggle(); 303 $('a#display' + review_number + '[review_number=' + review_number + ']').toggleClass("active"); 304 $('a#hide' + review_number + '[review_number=' + review_number + ']').toggleClass("active"); 305 avMessagesCookie[review_number] = {}; 306 avMessagesCookie[review_number]["type"] = type; 307 console.log(avMessagesCookie); 308 var cookie_string_comment = "netreviews_comment=" + JSON.stringify(avMessagesCookie); 309 document.cookie = cookie_string_comment; 310} 311} // end jquery 312 313 314window.avisVerifies.avLoadCookies = function (){ 315// load netreviews_helpful 316avLoadCookie(); 317avLoadCookie_comment(); 318// Display existing votes 319avDisplayVotes(); 320avDisplayExchangemessages(); 321} 322 323// Au clic de l'internaute sur un vote 324function avHelpfulClick(idProduct,vote,sign) { 325// Si double click pas d'action 326if (avhelpfulExec) { return false; } 327avhelpfulExec = true; 328// On recupère l'element <a> 329var link = document.getElementById(idProduct + '_' + vote); 330// On check si le lien est déjà actif ou non 331var linkIsActive = avHasClass(link,'active'); 332// Affichage en direct de l'action 333if (!linkIsActive) { 334 // Le lien n'est pas déjà actif > color 335 avColorButton(idProduct,vote); 336 avShowMessage(idProduct,avHelpfulSuccessMessage,'success'); 337} 338else { 339 // Le lien est déjà actif > uncolor 340 avUnColorButtons(idProduct); 341 avShowMessage(idProduct,'',''); 342} 343// On calcul le fingerPrint de l'internaute 344new Fingerprint2().get(function(result, components){ 345 // On recharge les coockies 346 avLoadCookie(); 347 // new vote > create 348 if (!linkIsActive) { 349 avCallHelpfulWebservice('create',idProduct,vote,sign,result); 350 } 351 // vote already sent > delete
352 else { 353 avCallHelpfulWebservice('delete',idProduct,vote,sign,result); 354 } 355}); 356} 357// Appel au webservice 358function avCallHelpfulWebservice(method,idProduct,vote,sign,fingerPrint) { 359// Si un vote existe déjà pour cet avis on récupère le fingerPrint existant 360var existingVote = getExistingVote(idProduct); 361if (typeof existingVote.fingerPrint != "undefined" && existingVote.fingerPrint != "") { 362 fingerPrint = existingVote.fingerPrint; 363} 364// Appel au webservice 365var http = new XMLHttpRequest(); 366var params = "method=" + method + "&idWebsite=" + avHelpfulIdwebsite + "&idProduct=" + idProduct + "&isHelpful=" + vote + "&fingerPrint=" + fingerPrint + "&sign=" + sign; 367http.open("POST", avHelpfulURL, true); 368http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 369http.onreadystatechange = function() { 370 if(http.readyState == 4 && http.status == 200) { 371 try { 372 var obj = JSON.parse(http.responseText); 373 if (typeof obj.success !== "undefined") { 374 // SUCCESS 375 if (obj.success == '1') { 376 if (obj.method == 'create') { 377 // save cookie 378 avHelpfulCookie[obj.idProduct] = {}; 379 avHelpfulCookie[obj.idProduct]["vote"] = obj.isHelpful; 380 avHelpfulCookie[obj.idProduct]["fingerPrint"] = obj.fingerPrint; 381 avSaveCookie(); 382 } 383 if (obj.method == 'delete') { 384 // remove cookie 385 if (typeof avHelpfulCookie[obj.idProduct] !== "undefined") { 386 delete avHelpfulCookie[obj.idProduct]; 387 avSaveCookie(); 388 } 389 } 390 } 391 // ERROR 392 if (obj.success == '0') { 393 avUnColorButtons(obj.idProduct); 394 avShowMessage(obj.idProduct,avHelpfulErrorMessage,'error'); 395 console.log('[NetReviews] Error ' + obj.errorCode + ' : ' + obj.errorMessage); 396 } 397 } 398 } catch (e) { 399 console.error("Parsing error:", e); 400 avUnColorButtons(idProduct); 401 avShowMessage(idProduct,avHelpfulErrorMessage,'error'); 402 console.log('[NetReviews] Unknown error.'); 403 } 404 } 405 avhelpfulExec = false; 406} 407http.send(params); 408} 409// Met en avant le vote de l'internaute 410function avColorButton(idProduct,isHelpful) { 411var link = document.getElementById(idProduct + '_' + isHelpful); 412var linkIsActive = avHasClass(link,'active'); 413if (!linkIsActive) { 414 link.classList.add("active"); 415} 416if (isHelpful=='0') { 417 var otherLink = document.getElementById(idProduct + '_1') 418} 419else { 420 var otherLink = document.getElementById(idProduct + '_0') 421} 422otherLink.classList.remove("active"); 423} 424// Masque le vote de l'internaute 425function avUnColorButtons(idProduct) { 426var link_yes = document.getElementById(idProduct + '_1'); 427var link_no = document.getElementById(idProduct + '_0'); 428link_yes.classList.remove("active"); 429link_no.classList.remove("active"); 430} 431// Affiche un message de confirmation ou d'erreur 432function avShowMessage(idProduct,message,type) { 433var p = document.getElementById(idProduct + '_msg'); 434if (typeof p !== "undefined" && p != "null") { 435 p.innerHTML = message; 436 if (message != "") {p.style.display = 'block';} 437 if (message == "") {p.style.display = 'none';} 438 if (type == 'success') { p.style.color = '#0c9c5b'; } 439 if (type == 'error') { p.style.color = '#bf2525'; } 440} 441} 442// Test si un element possède une classe css 443function avHasClass(element, cls) { 444return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1; 445} 446// Charge le cookie netreviews_helpful 447function avLoadCookie() { 448var name = "netreviews_helpful="; 449var decodedCookie = decodeURIComponent(document.cookie); 450var ca = decodedCookie.split(';'); 451avHelpfulCookie = {}; 452for(var i = 0; i <ca.length; i++) { 453 var c = ca[i]; 454 while (c.charAt(0) == ' ') { 455 c = c.substring(1); 456 } 457 if (c.indexOf(name) == 0) { 458 avHelpfulCookie = JSON.parse(c.substring(name.length, c.length)); 459 } 460} 461} 462 463function avLoadCookie_comment() { 464var name = "netreviews_comment="; 465var decodedCookie = decodeURIComponent(document.cookie); 466var ca = decodedCookie.split(';'); 467avMessagesCookie = {}; 468for(var i = 0; i <ca.length; i++) { 469 var c = ca[i]; 470 while (c.charAt(0) == ' ') { 471 c = c.substring(1); 472 } 473 if (c.indexOf(name) == 0) { 474 avMessagesCookie = JSON.parse(c.substring(name.length, c.length)); 475 } 476} 477} 478// Sauvegarde le cookie netreviews_helpful 479function avSaveCookie() { 480var expiration_date = new Date(); 481expiration_date.setFullYear(expiration_date.getFullYear() + 1); 482var cookie_value = JSON.stringify(avHelpfulCookie); 483var cookie_string = "netreviews_helpful=" + cookie_value + "; path=/; expires=" + expiration_date.toUTCString(); 484document.cookie = cookie_string; 485} 486// Affiche les votes existants 487function avDisplayVotes () { 488var voteButtons = document.getElementsByClassName("netreviewsVote"); 489// console.log(voteButtons); 490for (var i = 0; i < voteButtons.length; i++) { 491 var idProduct = voteButtons[i].getAttribute("data-review-id"); 492 if (typeof idProduct !== "undefined" && idProduct != "") { 493 var existingVote = getExistingVote(idProduct); 494 if (typeof existingVote.vote != "undefined") { 495 avColorButton(idProduct,existingVote.vote); 496 } 497 } 498} 499} 500 501function avDisplayExchangemessages () { 502var commentstatus = document.getElementsByClassName("netreviews_button_comment"); 503// // console.log(commentstatus); 504for (var i = 0; i < commentstatus.length; i++) { 505 var reviewnumber = commentstatus[i].getAttribute("review_number"); 506 if (typeof reviewnumber !== "undefined" && reviewnumber && avMessagesCookie[reviewnumber]!== "undefined" && avMessagesCookie[reviewnumber]) { 507 if (avMessagesCookie[reviewnumber]["type"] == 1){ 508 $('a#display' + reviewnumber).removeClass("active"); 509 $('a#hide' + reviewnumber).addClass("active"); 510 $('div[review_number=' + reviewnumber + ']').show(); 511 } 512 } 513} 514} 515 516// Affiche les votes existants 517function getExistingVote (idProduct) { 518if (typeof avHelpfulCookie[idProduct] !== "undefined") 519 return avHelpfulCookie[idProduct]; 520else 521 return {}; 522} 523 524function loadScript(url, callback) { 525var script = document.createElement("script") 526script.type = "text/javascript"; 527if (script.readyState) { //IE 528 script.onreadystatechange = function() { 529 if (script.readyState == "loaded" || script.readyState == "complete") { 530 script.onreadystatechange = null; 531 callback(); 532 } 533 }; 534} else { //Others 535 script.onload = function() { 536 callback(); 537 }; 538} 539script.src = url; 540document.getElementsByTagName("head")[0].appendChild(script); 541} 542 543/*jslint devel: true */ 544 545//(function () { 546(function($avjq) { 547 548 "use strict"; 549 550 /** 551 * Adding an event listener on every thumbnail for the modal to open and adding keyboard event binding 552 * @function _init 553 // */ 554 (function _init() { 555 addListeners(); 556 document.addEventListener('keydown', nrKeyboardEvent); 557 })(); 558 559 /** 560 * Function handling the add of event listeners on each thumbnail 561 * @function addListeners 562 */ 563 function addListeners() { 564 document.addEventListener('click', function (event) { 565 if (event.target.className === 'netreviews_image_thumb') { 566 var targetElement = event.target || event.srcElement; 567 openModal(targetElement); 568 } 569 }); 570 } 571 572 /** 573 * Carousel constructor 574 * 575 * @param {object} parent Parent div containing an <ul> list that is going to be used for carousel setup 576 * @param {number} currentItem Clicked item number 577 * @param {number} count Number of children in the list (<li>) 578 * @constructor 579 */ 580 function Carousel(parent, currentItem, count) { 581 var vm = this; 582 vm.element = parent; 583 vm.current = currentItem; 584 vm.count = count; 585 vm.arrPrev = document.createTextNode('â¹'); 586 vm.arrNext = document.createTextNode('âº'); 587 vm.cPrevClass = 'carousel-prev'; 588 vm.cNextClass = 'carousel-next'; 589 vm.arrowClass = 'carousel-arrow'; 590 vm.crslClass = 'netreviews_media_part'; 591 vm.showPrev = showPrev; 592 vm.showNext = showNext; 593 vm.showArrows = showArrows; 594 595 /** 596 * Go to previous image 597 * @function showPrev 598 */ 599 function showPrev() { 600 if (vm.current === 0) { 601 vm.current = vm.count - 1; 602 } 603 else { 604 vm.current = vm.current - 1; 605 } 606 updateModal(vm.element.querySelectorAll('.' + vm.crslClass + ' > li > a')[vm.current]); 607 } 608 609 /**
610 * Go to next image 611 * @function showNext 612 */ 613 function showNext() { 614 if (vm.current === vm.count - 1) { 615 vm.current = 0; 616 } 617 else { 618 vm.current = vm.current + 1; 619 } 620 updateModal(vm.element.querySelectorAll('.' + vm.crslClass + ' > li > a')[vm.current]); 621 } 622 623 /** 624 * Create the navigation arrows (prev/next) and attach to carousel. 625 * @function showArrows 626 */ 627 function showArrows() { 628 var modal = document.getElementById('netreviews_media_modal'); 629 630 var buttonPrev = document.createElement('a'); 631 buttonPrev.appendChild(vm.arrPrev); 632 buttonPrev.classList.add(vm.cPrevClass); 633 buttonPrev.classList.add(vm.arrowClass); 634 buttonPrev.id = 'netreviews_media_prev'; 635 636 var buttonNext = document.createElement('a'); 637 buttonNext.appendChild(vm.arrNext); 638 buttonNext.classList.add(vm.cNextClass); 639 buttonNext.classList.add(vm.arrowClass); 640 buttonNext.id = 'netreviews_media_next'; 641 642 // Adding event listener on arrow click 643 buttonPrev.addEventListener('click', vm.showPrev); 644 buttonNext.addEventListener('click', vm.showNext); 645 646 // Adapting buttons positions 647 var browserheight = $avjq(window).height(); 648 649 buttonPrev.style.top = ((browserheight - 75) / 2) + 'px'; 650 buttonNext.style.top = ((browserheight - 75) / 2) + 'px'; 651 652 modal.appendChild(buttonPrev); 653 modal.appendChild(buttonNext); 654 } 655 } 656 657 /** 658 * Get current media index on click 659 * @function indexInParent 660 * 661 * @param node 662 * @returns {number} Media number 663 */ 664 function indexInParent(node) { 665 var children = node.parentNode.childNodes; 666 var num = 0; 667 for (var i = 0; i < children.length; i++) { 668 if (children[i] === node) { 669 return num; 670 } 671 if (children[i].nodeType === 1) { 672 num++; 673 } 674 } 675 } 676 677 /** 678 * Catch keyboard keydown : next / prev 679 * @function nrKeyboardEvent 680 */ 681 function nrKeyboardEvent(e) { 682 e = e || window.event; 683 var buttonPrev = document.getElementById('netreviews_media_prev'); 684 var buttonNext = document.getElementById('netreviews_media_next'); 685 var buttonClose = document.getElementById('netreviews_media_close'); 686 switch (e.keyCode) { 687 case 37: 688 if (typeof buttonPrev !== 'undefined' && buttonPrev !== null) { 689 buttonPrev.click(); 690 } 691 break; 692 case 39: 693 if (typeof buttonNext !== 'undefined' && buttonNext !== null) { 694 buttonNext.click(); 695 } 696 break; 697 case 27: 698 if (typeof buttonClose !== 'undefined' && buttonClose !== null) { 699 buttonClose.click(); 700 } 701 break; 702 } 703 } 704 705 /** 706 * Open modal container 707 * @function openModal 708 */ 709 function openModal(event) { 710 711 var identifier = event; 712 var closeButton = document.getElementById("netreviews_media_close"); 713 var dataType = identifier.getAttribute('data-type'); 714 var dataSrc = identifier.getAttribute('data-src'); 715 var modal = document.getElementById('netreviews_media_modal'); 716 var parent = identifier.parentNode.parentNode; 717 var count = identifier.parentNode.parentNode.querySelectorAll('li').length; 718 var current = indexInParent(identifier.parentNode); 719 var loader = document.createElement('div'); 720 721 loader.id = 'loader'; 722 loader.className = 'loader-image'; 723 modal.appendChild(loader); 724 725 // Render the carousel with focus on current clicked element 726 if (count > 1) { // OK 727 var carousel = new Carousel(parent, current, count); 728 carousel.showArrows(); 729 } 730 731 closeButton.addEventListener("click", closeModal); // OK 732 733 fillModal(modal, dataType, dataSrc); 734 } 735 736 /** 737 * Fill modal with media info 738 * @function fillModal 739 * 740 * @param modal 741 * @param dataType 742 * @param dataSrc 743 */ 744 function fillModal(modal, dataType, dataSrc) { 745 var modalContent = document.getElementById('netreviews_media_content'); 746 // Image display 747 if (dataType === 'image') { 748 var newImg = new Image(); 749 newImg.onload = function () { 750 modalContent.innerHTML = "<img id='netreviews_media_image' src='" + dataSrc + "'/>";
751 resizeMedia('netreviews_media_image', newImg.height, newImg.width); 752 modal.style.display = 'block'; 753 }; 754 newImg.src = dataSrc; 755 } 756 // Video display 757 758 else if (dataType === 'video') { 759 modalContent.innerHTML = "<iframe id='netreviews_media_video' src='" + dataSrc + "'/>"; 760 resizeMedia('netreviews_media_video', '500', '800'); 761 modal.style.display = 'block'; 762 } 763 } 764 765 /** 766 * On prev/next arrow click, update modal with media info 767 * @function updateModal 768 * 769 * @param {Object} item An <a> tag containing source and type attribute 770 */ 771 function updateModal(item) { 772 var dataSrc = item.getAttribute('data-src'); 773 var dataType = item.getAttribute('data-type'); 774 var modal = document.getElementById('netreviews_media_modal'); 775 776 fillModal(modal, dataType, dataSrc); 777 } 778 779 /** 780 * Close modal 781 * @function closeModal 782 */ 783 function closeModal() { 784 var iframeNetreviews = document.getElementById('netreviews_media_iframe'); 785 var modal = document.getElementById('netreviews_media_modal'); 786 var modalContent = document.getElementById('netreviews_media_content'); 787 788 // Empty modal 789 modalContent.innerHTML = ''; 790 removeArrows(); 791 removeLoader(); 792 793 modal.style.display = 'none'; 794 if (iframeNetreviews) { 795 iframeNetreviews.setAttribute('src', ''); 796 } 797 } 798 799 /** 800 * Remove arrows from carousel on modal close 801 * @function removeArrows 802 */ 803 function removeArrows() { 804 var arrows = document.getElementsByClassName('carousel-arrow'); 805 var modal = document.getElementById('netreviews_media_modal'); 806 var arrayFromArrows = []; 807 808 for (var j = 0; j < arrows.length; j++) { 809 arrayFromArrows.push(arrows[j]); 810 } 811 812 arrayFromArrows.forEach(function (element) { 813 modal.removeChild(element); 814 }); 815 } 816 817 /** 818 * Remove loader on modal close 819 * @function removeLoader 820 */ 821 function removeLoader() { 822 var modal = document.getElementById('netreviews_media_modal'); 823 var loader = document.getElementById('loader'); 824 modal.removeChild(loader); 825 } 826 827 /** 828 * Resize media to fit container 829 * @function resizeMedia 830 * 831 * @param {Object} blocId 832 * @param {number} initialImgHeight 833 * @param {number} initialImgWidth 834 */ 835 function resizeMedia(blocId, initialImgHeight, initialImgWidth) { 836 837 var desiredWidth; 838 var desiredHeight; 839 //display ratio 840 var displayRatio = 0.8; 841 //define image ratio 842 var ratio = initialImgHeight / initialImgWidth; 843 844 //get browser dimensions 845 var browserwidth = $avjq(window).width(); 846 var browserheight = $avjq(window).height(); 847 848 //image plus large que haute 849 if (initialImgWidth > initialImgHeight) { 850 // Dimensions souhaitées 851 desiredWidth = browserwidth * displayRatio; 852 desiredHeight = (browserwidth * ratio) * displayRatio; 853 // Si hauteur plus grande que l'ecran on adapte par la hauteur 854 if (desiredHeight > browserheight) { 855 desiredHeight = browserheight * displayRatio; 856 desiredWidth = (browserheight / ratio) * displayRatio; 857 } 858 } 859 //image plus haute que large 860 else { 861 // Dimensions souhaitées 862 desiredHeight = browserheight * displayRatio; 863 desiredWidth = (browserheight / ratio) * displayRatio; 864 // Si largeur plus grande que l'ecran on adapte par la largeur 865 if (desiredWidth > browserwidth) { 866 desiredWidth = browserwidth * displayRatio; 867 desiredHeight = (browserwidth * ratio) * displayRatio; 868 } 869 } 870 // La taille maximum d'affichage est la taille réelle de l'image 871 // Ne jamais zoomer une image 872 if (initialImgWidth < desiredWidth && initialImgHeight < desiredHeight) { 873 desiredWidth = initialImgWidth; 874 desiredHeight = initialImgHeight; 875 } 876 877 // On redimensionne l'image 878 document.getElementById(blocId).style.width = desiredWidth + 'px'; 879 document.getElementById(blocId).style.height = desiredHeight + 'px'; 880 881 // On update la position de l'image 882 document.getElementById(blocId).style.left = ((browserwidth - desiredWidth) / 2) + 'px'; 883 document.getElementById(blocId).style.top = ((browserheight - desiredHeight) / 2) + 'px'; 884 885 } 886})(jQuery); 887 888/*** FontAwesome ***/ 889window.FontAwesomeKitConfig = {"asyncLoading":{"enabled":true},"autoA11y":{"enabled":true},"baseUrl":"https://ka-f.fontawesome.com","baseUrlKit":"https://kit.fontawesome.com","detectConflictsUntil":null,"iconUploads":{},"id":83317600,"license":"free","method":"css","minify":{"enabled":true},"token":"fd565dd76c","v4FontFaceShim":{"enabled":true}
889,"v4shim":{"enabled":true},"version":"5.15.4"}; 890!function(t){"function"==typeof define&&define.amd?define("kit-loader",t):t()}((function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function r(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?n(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=t[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){var n=e&&e.addOn||"",r=e&&e.baseFilename||t.license+n,o=e&&e.minify?".min":"",i=e&&e.fileSuffix||t.method,c=e&&e.subdir||t.method;return t.baseUrl+"/releases/"+("latest"===t.version?"latest":"v".concat(t.version))+"/"+c+"/"+r+o+"."+i}function a(t){return t.baseUrlKit+"/"+t.token+"/"+t.id+"/kit-upload.css"}function u(t,e){var n=e||["fa"],r="."+Array.prototype.join.call(n,",."),o=t.querySelectorAll(r);Array.prototype.forEach.call(o,(function(e){var n=e.getAttribute("title");e.setAttribute("aria-hidden","true");var r=!e.nextElementSibling||!e.nextElementSibling.classList.contains("sr-only");if(n&&r){var o=t.createElement("span");o.innerHTML=n,o.classList.add("sr-only"),e.parentNode.insertBefore(o,e.nextSibling)}}))}var f,s=function(){},d="undefined"!=typeof global&&void 0!==global.process&&"function"==typeof global.process.emit,l="undefined"==typeof setImmediate?setTimeout:setImmediate,h=[];function m(){for(var t=0;t<h.length;t++)h[t][0](h[t][1]);h=[],f=!1}function p(t,e){h.push([t,e]),f||(f=!0,l(m,0))}function y(t){var e=t.owner,n=e._state,r=e._data,o=t[n],i=t.then;if("function"==typeof o){n="fulfilled";try{r=o(r)}catch(t){w(i,t)}}b(i,r)||("fulfilled"===n&&v(i,r),"rejected"===n&&w(i,r))}function b(e,n){var r;try{if(e===n)throw new TypeError("A promises callback cannot return that same promise.");if(n&&("function"==typeof n||"object"===t(n))){var o=n.then;if("function"==typeof o)return o.call(n,(function(t){r||(r=!0,n===t?g(e,t):v(e,t))}),(function(t){r||(r=!0,w(e,t))})),!0}}catch(t){return r||w(e,t),!0}return!1}function v(t,e){t!==e&&b(t,e)||g(t,e)}function g(t,e){"pending"===t._state&&(t._state="settled",t._data=e,p(S,t))}function w(t,e){"pending"===t._state&&(t._state="settled",t._data=e,p(O,t))}function A(t){t._then=t._then.forEach(y)}function S(t){t._state="fulfilled",A(t)}function O(t){t._state="rejected",A(t),!t._handled&&d&&global.process.emit("unhandledRejection",t._data,t)}function j(t){global.process.emit("rejectionHandled",t)}function E(t){if("function"!=typeof t)throw new TypeError("Promise resolver "+t+" is not a function");if(this instanceof E==!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
890onstructor cannot be called as a function.");this._then=[],function(t,e){function n(t){w(e,t)}try{t((function(t){v(e,t)}),n)}catch(t){n(t)}}(t,this)}E.prototype={constructor:E,_state:"pending",_then:null,_data:void 0,_handled:!1,then:function(t,e){var n={owner:this,then:new this.constructor(s),fulfilled:t,rejected:e};return!e&&!t||this._handled||(this._handled=!0,"rejected"===this._state&&d&&p(j,this)),"fulfilled"===this._state||"rejected"===this._state?p(y,n):this._then.push(n),n.then},catch:function(t){return this.then(null,t)}},E.all=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.all().");return new E((function(e,n){var r=[],o=0;function i(t){return o++,function(n){r[t]=n,--o||e(r)}}for(var c,a=0;a<t.length;a++)(c=t[a])&&"function"==typeof c.then?c.then(i(a),n):r[a]=c;o||e(r)}))},E.race=function(t){if(!Array.isArray(t))throw new TypeError("You must pass an array to Promise.race().");return new E((function(e,n){for(var r,o=0;o<t.length;o++)(r=t[o])&&"function"==typeof r.then?r.then(e,n):e(r)}))},E.resolve=function(e){return e&&"object"===t(e)&&e.constructor===E?e:new E((function(t){t(e)}))}
890,E.reject=function(t){return new E((function(e,n){n(t)}))};var _="function"==typeof Promise?Promise:E;function P(t,e){var n=e.fetch,r=e.XMLHttpRequest,o=e.token,i=t;return"URLSearchParams"in window?(i=new URL(t)).searchParams.set("token",o):i=i+"?token="+encodeURIComponent(o),i=i.toString(),new _((function(t,e){if("function"==typeof n)n(i,{mode:"cors",cache:"default"}).then((function(t){if(t.ok)return t.text();throw new Error("")})).then((function(e){t(e)})).catch(e);else if("function"==typeof r){var o=new r;o.addEventListener("loadend",(function(){this.responseText?t(this.responseText):e(new Error(""))}));["abort","error","timeout"].map((function(t){o.addEventListener(t,(function(){e(new Error(""))}))})),o.open("GET",i),o.send()}else{e(new Error(""))}}))}function C(t,e,n){var r=t;return[[/(url\("?)\.\.\/\.\.\/\.\./g,function(t,n){return"".concat(n).concat(e)}],[/(url\("?)\.\.\/webfonts/g,function(t,r){return"".concat(r).concat(e,"/releases/v").concat(n,"/webfonts")}],[/(url\("?)https:\/\/kit-free([^.])*\.fontawesome\.com/g,function(t,n){return"".concat(n).concat(e)}
890]].forEach((function(t){var e=o(t,2),n=e[0],i=e[1];r=r.replace(n,i)})),r}function F(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=e.document||o,i=u.bind(u,o,["fa","fab","fas","far","fal","fad","fak"]),f=Object.keys(t.iconUploads||{}).length>0;t.autoA11y.enabled&&n(i);var s=[{id:"fa-main",addOn:void 0}];t.v4shim.enabled&&s.push({id:"fa-v4-shims",addOn:"-v4-shims"}),t.v4FontFaceShim.enabled&&s.push({id:"fa-v4-font-face",addOn:"-v4-font-face"}),f&&s.push({id:"fa-kit-upload",customCss:!0});var d=s.map((function(n){return new _((function(o,i){P(n.customCss?a(t):c(t,{addOn:n.addOn,minify:t.minify.enabled}),e).then((function(i){o(U(i,r(r({},e),{},{baseUrl:t.baseUrl,version:t.version,id:n.id,contentFilter:function(t,e){return C(t,e.baseUrl,e.version)}})))})).catch(i)}))}));return _.all(d)}function U(t,e){var n=e.contentFilter||function(t,e){return t},r=document.createElement("style"),o=document.createTextNode(n(t,e));return r.appendChild(o),r.media="all",e.id&&r.setAttribute("id",e.id),e&&e.detectingConflicts&&e.detectionIgnoreAttr&&r.setAttributeNode(document.createAttribute(e.detectionIgnoreAttr)),r}function k(t,e){e.autoA11y=t.autoA11y.enabled,"pro"===t.license&&(e.autoFetchSvg=!0,e.fetchSvgFrom=t.baseUrl+"/releases/"+("latest"===t.version?"latest":"v".concat(t.version))+"/svgs",e.fetchUploadedSvgFrom=t.uploadsUrl);var n=[];return t.v4shim.enabled&&n.push(new _((function(n,o){P(c(t,{addOn:"-v4-shims",minify:t.minify.enabled}),e).then((function(t){n(I(t,r(r({},e),{},{id:"fa-v4-shims"})))})).catch(o)}))),n.push(new _((function(n,o){P(c(t,{minify:t.minify.enabled}),e).then((function(t){var o=I(t,r(r({},e),{},{id:"fa-main"}));n(function(t,e){var n=e&&void 0!==e.autoFetchSvg?e.autoFetchSvg:void 0,r=e&&void 0!==e.autoA11y?e.autoA11y:void 0;void 0!==r&&t.setAttribute("data-auto-a11y",r?"true":"false");n&&(t.setAttributeNode(document.createAttribute("data-auto-fetch-svg")),t.setAttribute("data-fetch-svg-from",e.fetchSvgFrom),t.setAttribute("data-fetch-uploaded-svg-from",e.fetchUploadedSvgFrom));return t}(o,e))})).catch(o)}))),_.all(n)}function I(t,e){var n=document.createElement("SCRIPT"),r=document.createTextNode(t);return n.appendChild(r),n.referrerPolicy="strict-origin",e.id&&n.setAttribute("id",e.id),e&&e.detectingConflicts&&e.detectionIgnoreAttr&&n.setAttributeNode(document.createAttribute(e.detectionIgnoreAttr)),n}function L(t){var e,n=[],r=document,o=r.documentElement.doScroll,i=(o?/^loaded|^c/:/^loaded|^i|^c/).test(r.readyState);i||r.addEventListener("DOMContentLoaded",e=function(){for(r.removeEventListener("DOMContentLoaded",e),i=1;e=n.shift();)e()}),i?setTimeout(t,0):n.push(t)}function T(t){"undefined"!=typeof MutationObserver&&new MutationObserver(t).observe(document,{childList:!0,subtree:!0})}try{if(window.FontAwesomeKitConfig){var x=window.FontAwesomeKitConfig,M={detectingConflicts:x.detectConflictsUntil&&new Date<=new Date(x.detectConflictsUntil),detectionIgnoreAttr:"data-fa-detection-ignore",fetch:window.fetch,token:x.token,XMLHttpRequest:window.XMLHttpRequest,document:document},D=document.currentScript,N=D?D.parentElement:document.head;(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"js"===t.method?k(t,e):"css"===t.method?F(t,e,(function(t){L(t),T(t)})):void 0})(x,M).then((function(t){t.map((function(t){try{N.insertBefore(t,D?D.nextSibling:null)}catch(e){N.appendChild(t)}})),M.detectingConflicts&&D&&L((function(){D.setAttributeNode(document.createAttribute(M.detectionIgnoreAttr));var t=function(t,e){var n=document.createElement("script");return e&&e.detectionIgnoreAttr&&n.setAttributeNode(document.createAttribute(e.detectionIgnoreAttr)),n.src=c(t,{baseFilename:"conflict-detection",fileSuffix:"js",subdir:"js",minify:t.minify.enabled}),n}(x,M);document.body.appendChild(t)}))})).catch((function(t){console.error("".concat("Font Awesome Kit:"," ").concat(t))}))}}catch(t){console.error("".concat("Font Awesome Kit:"," ").concat(t))}}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.