diff --git a/_assets/javascripts/analytics.js b/_assets/javascripts/analytics.js new file mode 100644 index 0000000..82c28b9 --- /dev/null +++ b/_assets/javascripts/analytics.js @@ -0,0 +1,73 @@ +/*!! + * Matomo - free/libre analytics platform + * + * JavaScript tracking client + * + * @link https://piwik.org + * @source https://github.com/matomo-org/matomo/blob/master/js/piwik.js + * @license https://piwik.org/free-software/bsd/ BSD-3 Clause (also in js/LICENSE.txt) + * @license magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt BSD-3-Clause + */ +;if(typeof _paq!=="object"){_paq=[]}if(typeof window.Matomo!=="object"){window.Matomo=window.Piwik=(function(){var q,b={},y={},G=document,g=navigator,X=screen,S=window,h=S.performance||S.mozPerformance||S.msPerformance||S.webkitPerformance,s=S.encodeURIComponent,R=S.decodeURIComponent,k=unescape,I=[],E,t,ah=[],x=0,ab=0,T=0,l=false;function o(ao){try{return R(ao)}catch(ap){return unescape(ao)}}function J(ap){var ao=typeof ap;return ao!=="undefined"}function A(ao){return typeof ao==="function"}function V(ao){return typeof ao==="object"}function w(ao){return typeof ao==="string"||ao instanceof String}function ag(ao){return typeof ao==="number"||ao instanceof Number +}function Y(ao){return J(ao)&&(ag(ao)||(w(ao)&&ao.length))}function B(ap){if(!ap){return true}var ao;var aq=true;for(ao in ap){if(Object.prototype.hasOwnProperty.call(ap,ao)){aq=false}}return aq}function ak(ao){var ap=typeof console;if(ap!=="undefined"&&console&&console.error){console.error(ao)}}function af(){var au,at,aw,ap,ao;for(au=0;au0;if(ar){av=aw.split("::");aq=av[0];aw=av[1];if("object"===typeof t[aq]&&"function"===typeof t[aq][aw]){t[aq][aw].apply(t[aq],ap)}else{if(ao){ah.push(ao)}}}else{for(at=0;at0;if(ax){av=aw.split(".");if(aq&&"object"===typeof aq[av[0]]){aq=aq[av[0]];aw=av[1]}else{if(ao){ah.push(ao);break}}}if(aq[aw]){aq[aw].apply(aq,ap)}else{var ay="The method '"+aw+'\' was not found in "_paq" variable. Please have a look at the Matomo tracker documentation: https://developer.matomo.org/api-reference/tracking-javascript'; +ak(ay);if(!ax){throw new TypeError(ay)}}if(aw==="addTracker"){break}if(aw==="setTrackerUrl"||aw==="setSiteId"){break}}else{aw.apply(I[at],ap)}}}}}function an(ar,aq,ap,ao){if(ar.addEventListener){ar.addEventListener(aq,ap,ao);return true}if(ar.attachEvent){return ar.attachEvent("on"+aq,ap)}ar["on"+aq]=ap}function m(ao){if(G.readyState==="complete"){ao()}else{if(S.addEventListener){S.addEventListener("load",ao,false)}else{if(S.attachEvent){S.attachEvent("onload",ao)}}}}function p(ar){var ao=false;if(G.attachEvent){ao=G.readyState==="complete"}else{ao=G.readyState!=="loading"}if(ao){ar();return}var aq;if(G.addEventListener){an(G,"DOMContentLoaded",function ap(){G.removeEventListener("DOMContentLoaded",ap,false);if(!ao){ao=true;ar()}})}else{if(G.attachEvent){G.attachEvent("onreadystatechange",function ap(){if(G.readyState==="complete"){G.detachEvent("onreadystatechange",ap);if(!ao){ao=true;ar()}}});if(G.documentElement.doScroll&&S===S.top){(function ap(){if(!ao){try{G.documentElement.doScroll("left") +}catch(at){setTimeout(ap,0);return}ao=true;ar()}}())}}}an(S,"load",function(){if(!ao){ao=true;ar()}},false)}function ac(ap,av,aw){if(!ap){return""}var ao="",ar,aq,at,au;for(ar in b){if(Object.prototype.hasOwnProperty.call(b,ar)){au=b[ar]&&"function"===typeof b[ar][ap];if(au){aq=b[ar][ap];at=aq(av||{},aw);if(at){ao+=at}}}}return ao}function ai(){var ao;l=true;ac("unload");ao=new Date();var ap=ao.getTimeAlias();if((q-ap)>3000){q=ap+3000}if(q){do{ao=new Date()}while(ao.getTimeAlias()=0;au--){at=av[au].split("=")[0]; +if(at===aq){av.splice(au,1)}}var ay=av.join("&");if(ay){aw=aw+"?"+ay}if(ax){aw+="#"+ax}}return aw}function e(aq,ap){var ao="[\\?&#]"+ap+"=([^&#]*)";var at=new RegExp(ao);var ar=at.exec(aq);return ar?o(ar[1]):""}function a(ao){if(ao&&String(ao)===ao){return ao.replace(/^\s+|\s+$/g,"")}return ao}function D(ao){return unescape(s(ao))}function am(aE){var aq=function(aK,aJ){return(aK<>>(32-aJ))},aF=function(aM){var aK="",aL,aJ;for(aL=7;aL>=0;aL--){aJ=(aM>>>(aL*4))&15;aK+=aJ.toString(16)}return aK},au,aH,aG,ap=[],ay=1732584193,aw=4023233417,av=2562383102,at=271733878,ar=3285377520,aD,aC,aB,aA,az,aI,ao,ax=[];aE=D(aE);ao=aE.length;for(aH=0;aH>>29);ax.push((ao<<3)&4294967295);for(au=0;auau.offsetWidth+au.scrollLeft||aw+az-aAau.offsetHeight+au.scrollTop||aB+ax-aAax?-1:1});if(ao.length<=1){return ao}var ap=0;var ar=0;var at=[];var aq;aq=ao[ap++];while(aq){if(aq===ao[ap]){ar=at.push(ap)}aq=ao[ap++]||null}while(ar--){ao.splice(at[ar],1) +}return ao},getAttributeValueFromNode:function(at,aq){if(!this.hasNodeAttribute(at,aq)){return}if(at&&at.getAttribute){return at.getAttribute(aq)}if(!at||!at.attributes){return}var ar=(typeof at.attributes[aq]);if("undefined"===ar){return}if(at.attributes[aq].value){return at.attributes[aq].value}if(at.attributes[aq].nodeValue){return at.attributes[aq].nodeValue}var ap;var ao=at.attributes;if(!ao){return}for(ap=0;ap1000){break}ao++}},findPieceNode:function(ap){var ao; +ao=ae.findFirstNodeHavingAttribute(ap,this.CONTENT_PIECE_ATTR);if(!ao){ao=ae.findFirstNodeHavingClass(ap,this.CONTENT_PIECE_CLASS)}if(!ao){ao=ae.findFirstNodeHavingClass(ap,this.LEGACY_CONTENT_PIECE_CLASS)}if(ao){return ao}return ap},findTargetNodeNoDefault:function(ao){if(!ao){return}var ap=ae.findFirstNodeHavingAttributeWithValue(ao,this.CONTENT_TARGET_ATTR);if(ap){return ap}ap=ae.findFirstNodeHavingAttribute(ao,this.CONTENT_TARGET_ATTR);if(ap){return ap}ap=ae.findFirstNodeHavingClass(ao,this.CONTENT_TARGET_CLASS);if(ap){return ap}ap=ae.findFirstNodeHavingClass(ao,this.LEGACY_CONTENT_TARGET_CLASS);if(ap){return ap}},findTargetNode:function(ao){var ap=this.findTargetNodeNoDefault(ao);if(ap){return ap}return ao},findContentName:function(ap){if(!ap){return}var at=ae.findFirstNodeHavingAttributeWithValue(ap,this.CONTENT_NAME_ATTR);if(at){return ae.getAttributeValueFromNode(at,this.CONTENT_NAME_ATTR)}var ao=this.findContentPiece(ap);if(ao){return this.removeDomainIfIsInLink(ao)}if(ae.hasNodeAttributeWithValue(ap,"title")){return ae.getAttributeValueFromNode(ap,"title") +}var aq=this.findPieceNode(ap);if(ae.hasNodeAttributeWithValue(aq,"title")){return ae.getAttributeValueFromNode(aq,"title")}var ar=this.findTargetNode(ap);if(ae.hasNodeAttributeWithValue(ar,"title")){return ae.getAttributeValueFromNode(ar,"title")}},findContentPiece:function(ap){if(!ap){return}var ar=ae.findFirstNodeHavingAttributeWithValue(ap,this.CONTENT_PIECE_ATTR);if(ar){return ae.getAttributeValueFromNode(ar,this.CONTENT_PIECE_ATTR)}var ao=this.findPieceNode(ap);var aq=this.findMediaUrlInNode(ao);if(aq){return this.toAbsoluteUrl(aq)}},findContentTarget:function(aq){if(!aq){return}var ar=this.findTargetNode(aq);if(ae.hasNodeAttributeWithValue(ar,this.CONTENT_TARGET_ATTR)){return ae.getAttributeValueFromNode(ar,this.CONTENT_TARGET_ATTR)}var ap;if(ae.hasNodeAttributeWithValue(ar,"href")){ap=ae.getAttributeValueFromNode(ar,"href");return this.toAbsoluteUrl(ap)}var ao=this.findPieceNode(aq);if(ae.hasNodeAttributeWithValue(ao,"href")){ap=ae.getAttributeValueFromNode(ao,"href");return this.toAbsoluteUrl(ap) +}},isSameDomain:function(ao){if(!ao||!ao.indexOf){return false}if(0===ao.indexOf(this.getLocation().origin)){return true}var ap=ao.indexOf(this.getLocation().host);if(8>=ap&&0<=ap){return true}return false},removeDomainIfIsInLink:function(aq){var ap="^https?://[^/]+";var ao="^.*//[^/]+";if(aq&&aq.search&&-1!==aq.search(new RegExp(ap))&&this.isSameDomain(aq)){aq=aq.replace(new RegExp(ao),"");if(!aq){aq="/"}}return aq},findMediaUrlInNode:function(at){if(!at){return}var aq=["img","embed","video","audio"];var ao=at.nodeName.toLowerCase();if(-1!==M(aq,ao)&&ae.findFirstNodeHavingAttributeWithValue(at,"src")){var ar=ae.findFirstNodeHavingAttributeWithValue(at,"src");return ae.getAttributeValueFromNode(ar,"src")}if(ao==="object"&&ae.hasNodeAttributeWithValue(at,"data")){return ae.getAttributeValueFromNode(at,"data")}if(ao==="object"){var au=ae.findNodesByTagName(at,"param");if(au&&au.length){var ap;for(ap=0;ap0}var ap=ar.clientWidth;if(S.innerWidth&&ap>S.innerWidth){ap=S.innerWidth}var ao=ar.clientHeight;if(S.innerHeight&&ao>S.innerHeight){ao=S.innerHeight}return((at.bottom>0||aq)&&at.right>0&&at.left=0)&&aD(dp)!==dq){var dk="There was an error setting cookie `"+dp+"`. Please check domain and path.";ak(dk)}}function b3(dk){var dl;dk=j(dk,av);if(bQ){dl=new RegExp("#.*");return dk.replace(dl,"")}return dk}function bW(dm,dk){var dn=r(dk),dl;if(dn){return dk}if(dk.slice(0,1)==="/"){return r(dm)+"://"+d(dm)+dk}dm=b3(dm);dl=dm.indexOf("?");if(dl>=0){dm=dm.slice(0,dl)}dl=dm.lastIndexOf("/");if(dl!==dm.length-1){dm=dm.slice(0,dl+1)}return dm+dk}function cI(dm,dk){var dl;dm=String(dm).toLowerCase();dk=String(dk).toLowerCase();if(dm===dk){return true}if(dk.slice(0,1)==="."){if(dm===dk.slice(1)){return true +}dl=dm.length-dk.length;if((dl>0)&&(dm.slice(dl)===dk)){return true}}return false}function cl(dk){var dl=document.createElement("a");if(dk.indexOf("//")!==0&&dk.indexOf("http")!==0){if(dk.indexOf("*")===0){dk=dk.substr(1)}if(dk.indexOf(".")===0){dk=dk.substr(1)}dk="http://"+dk}dl.href=v.toAbsoluteUrl(dk);if(dl.pathname){return dl.pathname}return""}function a4(dl,dk){if(!aj(dk,"/")){dk="/"+dk}if(!aj(dl,"/")){dl="/"+dl}var dm=(dk==="/"||dk==="/*");if(dm){return true}if(dl===dk){return true}dk=String(dk).toLowerCase();dl=String(dl).toLowerCase();if(Q(dk,"*")){dk=dk.slice(0,-1);dm=(!dk||dk==="/");if(dm){return true}if(dl===dk){return true}return dl.indexOf(dk)===0}if(!Q(dl,"/")){dl+="/"}if(!Q(dk,"/")){dk+="/"}return dl.indexOf(dk)===0}function ar(dp,dr){var dl,dk,dm,dn,dq;for(dl=0;dl0)&&(dn.slice(dm)===dk)){return true}}}return false}function co(dk,dm){dk=dk.replace("send_image=0","send_image=1");var dl=new Image(1,1);dl.onload=function(){E=0;if(typeof dm==="function"){dm({request:dk,trackerUrl:aE,success:true})}};dl.onerror=function(){if(typeof dm==="function"){dm({request:dk,trackerUrl:aE,success:false})}};dl.src=aE+(aE.indexOf("?")<0?"?":"&")+dk}function cF(dk){if(db==="POST"){return true}return dk&&(dk.length>2000||dk.indexOf('{"requests"')===0)}function aL(){return"object"===typeof g&&"function"===typeof g.sendBeacon&&"function"===typeof Blob}function a7(dp,ds,dr){var dm=aL();if(!dm){return false}var dn={type:"application/x-www-form-urlencoded; charset=UTF-8"};var dt=false;var dl=aE;try{var dk=new Blob([dp],dn);if(dr&&!cF(dp)){dk=new Blob([],dn);dl=dl+(dl.indexOf("?")<0?"?":"&")+dp}dt=g.sendBeacon(dl,dk)}catch(dq){return false}if(dt&&typeof ds==="function"){ds({request:dp,trackerUrl:aE,success:true,isSendBeacon:true})}return dt}function c6(dl,dm,dk){if(!J(dk)||null===dk){dk=true +}if(l&&a7(dl,dm,dk)){return}setTimeout(function(){if(l&&a7(dl,dm,dk)){return}var dq;try{var dp=S.XMLHttpRequest?new S.XMLHttpRequest():S.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;dp.open("POST",aE,true);dp.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)){var dr=l&&a7(dl,dm,dk);if(!dr&&dk){co(dl,dm)}else{if(typeof dm==="function"){dm({request:dl,trackerUrl:aE,success:false,xhr:this})}}}else{if(this.readyState===4&&(typeof dm==="function")){dm({request:dl,trackerUrl:aE,success:true,xhr:this})}}};dp.setRequestHeader("Content-Type",cx);dp.withCredentials=true;dp.send(dl)}catch(dn){dq=l&&a7(dl,dm,dk);if(!dq&&dk){co(dl,dm)}else{if(typeof dm==="function"){dm({request:dl,trackerUrl:aE,success:false})}}}},50)}function cg(dl){var dk=new Date();var dm=dk.getTime()+dl;if(!q||dm>q){q=dm}}function bb(){bd=true;cy=new Date().getTime()}function de(){var dk=new Date().getTime();return !cy||(dk-cy)>a6}function az(){if(de()){bS()}}function dh(){if(aO||!a6){return +}aO=true;an(S,"focus",bb);an(S,"blur",az);ab++;t.addPlugin("HeartBeat"+ab,{unload:function(){if(aO&&de()){bS()}}})}function cD(dp){var dl=new Date();var dk=dl.getTime();c0=dk;if(cC&&dk=dk.length){return[dk]}var dl=0;var dm=dk.length;var dn=[];for(dl;dl=dl&&dk<=(dl+a0)){return true}}return false}function di(dk){if(!cO){return""}var dp=e(dk,av);if(!dp){return""}dp=String(dp);var dm=new RegExp("^[a-zA-Z0-9]+$"); +if(dp.length===32&&dm.test(dp)){var dl=dp.substr(16,32);if(c4(dl)){var dn=dp.substr(0,16);return dn}}return""}function cP(){if(!bP){bP=di(bO)}var dm=new Date(),dk=Math.round(dm.getTime()/1000),dl=aU("id"),dq=aD(dl),dp,dn;if(dq){dp=dq.split(".");dp.unshift("0");if(bP.length){dp[1]=bP}return dp}if(bP.length){dn=bP}else{if("0"===b6()){dn=""}else{dn=cS()}}dp=["1",dn,dk];return dp}function aZ(){var dn=cP(),dl=dn[0],dm=dn[1],dk=dn[2];return{newVisitor:dl,uuid:dm,createTs:dk}}function aH(){var dn=new Date(),dl=dn.getTime(),dp=aZ().createTs;var dk=parseInt(dp,10);var dm=(dk*1000)+cL-dl;return dm}function aN(dk){if(!b7){return}var dm=new Date(),dl=Math.round(dm.getTime()/1000);if(!J(dk)){dk=aZ()}var dn=dk.uuid+"."+dk.createTs+".";df(aU("id"),dn,aH(),br,cZ,bT,aJ)}function bN(){var dk=aD(aU("ref"));if(dk.length){try{dk=S.JSON.parse(dk);if(V(dk)){return dk}}catch(dl){}}return["","",0,""]}function by(dm){var dl=bl+"testcookie_domain";var dk="testvalue";df(dl,dk,10000,null,dm,bT,aJ);if(aD(dl)===dk){bZ(dl,null,dm); +return true}return false}function aF(){var dl=bn;bn=false;var dk,dm;for(dk=0;dk0){dp=parseInt(dp,10);ds(dp)}})}var bF={enabled:true,requests:[],timeout:null,interval:2500,sendRequests:function(){var dk=this.requests; +this.requests=[];if(dk.length===1){bH(dk[0],bL)}else{dg(dk,bL)}},canQueue:function(){return !l&&this.enabled},pushMultiple:function(dl){if(!this.canQueue()){dg(dl,bL);return}var dk;for(dk=0;dk0){if(!J(dl)){dl=""}if(!w(dl)){dl=String(dl)}bo[dk]=dl}};this.getCustomDimension=function(dk){dk=parseInt(dk,10);if(dk>0&&Object.prototype.hasOwnProperty.call(bo,dk)){return bo[dk]}};this.deleteCustomDimension=function(dk){dk=parseInt(dk,10);if(dk>0){delete bo[dk]}};this.setCustomVariable=function(dl,dk,dp,dm){var dn;if(!J(dm)){dm="visit"}if(!J(dk)){return}if(!J(dp)){dp=""}if(dl>0){dk=!w(dk)?String(dk):dk;dp=!w(dp)?String(dp):dp;dn=[dk.slice(0,bv),dp.slice(0,bv)];if(dm==="visit"||dm===2){cG();aR[dl]=dn}else{if(dm==="page"||dm===3){bX[dl]=dn}else{if(dm==="event"){cm[dl]=dn}}}}};this.getCustomVariable=function(dl,dm){var dk;if(!J(dm)){dm="visit"}if(dm==="page"||dm===3){dk=bX[dl]}else{if(dm==="event"){dk=cm[dl]}else{if(dm==="visit"||dm===2){cG();dk=aR[dl]}}}if(!J(dk)||(dk&&dk[0]==="")){return false}return dk};this.deleteCustomVariable=function(dk,dl){if(this.getCustomVariable(dk,dl)){this.setCustomVariable(dk,"","",dl)}};this.deleteCustomVariables=function(dk){if(dk==="page"||dk===3){bX={} +}else{if(dk==="event"){cm={}}else{if(dk==="visit"||dk===2){aR={}}}}};this.storeCustomVariablesInCookie=function(){bR=true};this.setLinkTrackingTimer=function(dk){bL=dk};this.getLinkTrackingTimer=function(){return bL};this.setDownloadExtensions=function(dk){if(w(dk)){dk=dk.split("|")}c8=dk};this.addDownloadExtensions=function(dl){var dk;if(w(dl)){dl=dl.split("|")}for(dk=0;dk1&&ap!=="addTracker"&&ap!=="enableLinkTracking"){ak("The method "+ap+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Matomo trackers documentation: https://developer.matomo.org/guides/tracking-javascript-guide#multiple-piwik-trackers')}av[ap]++}}}}return au}var C=["addTracker","forgetCookieConsentGiven","requireCookieConsent","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSessionCookieTimeout","setVisitorCookieTimeout","setCookieNamePrefix","setCookieSameSite","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setVisitorId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","setCookieConsentGiven","requireConsent","setConsentGiven","disablePerformanceTracking"]; +function ad(aq,ap){var ao=new P(aq,ap);I.push(ao);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){af(_paq[E])}}_paq=new H();t.trigger("TrackerAdded",[ao]);return ao}an(S,"beforeunload",ai,false);an(S,"online",function(){if(J(g.serviceWorker)){g.serviceWorker.ready.then(function(ao){if(ao&&ao.sync){return ao.sync.register("matomoSync")}},function(){})}},false);an(S,"message",function(au){if(!au||!au.origin){return}var aw,ar,ap;var ax=d(au.origin);var at=t.getAsyncTrackers();for(ar=0;ar - + +