Ubuntu

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ (function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["BotTracking"]=t(require("CoreHome"),require("vue")):e["BotTracking"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,o),a.l=!0,a.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="plugins/BotTracking/vue/dist/",o(o.s="fae3")}({"19dc":function(t,o){t.exports=e},"8bbf":function(e,o){e.exports=t},fae3:function(e,t,o){"use strict";if(o.r(t),o.d(t,"SiteWithoutData",(function(){return N})),"undefined"!==typeof window){var n=window.document.currentScript,a=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(o.p=a[1])}var c=o("8bbf");const r=Object(c["createElementVNode"])("span",{class:"icon-chevron-left"},null,-1),i={key:1},l=Object(c["createElementVNode"])("br",null,null,-1),s={key:0,class:"row"},d=Object(c["createElementVNode"])("span",{class:"icon-warning"},null,-1),h={key:1,class:"row tracking-method-detection"},m=["src","alt"],b=["href"],u={class:"row tracking-method-list"},j=Object(c["createElementVNode"])("span",{class:"icon-search"},null,-1),O=["href","onClick"],k=["src"],g={key:1,class:"list-entry-icon","aria-hidden":"true"},p={class:"list-entry-text"},f=["href"],M=["src"],y={key:1,class:"list-entry-icon","aria-hidden":"true"},B={class:"list-entry-text"},v={class:"tracking-method-skip"},w=["href"],D=["data-method"],E=["src","alt"];function T(e,t,o,n,a,T){const S=Object(c["resolveComponent"])("ActivityIndicator"),V=Object(c["resolveComponent"])("VueEntryContainer");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",null,[e.showMethodDetails?(Object(c["openBlock"])(),Object(c["createElementBlock"])("a",{key:0,class:"tracking-method-back",onClick:t[0]||(t[0]=Object(c["withModifiers"])(t=>{e.showOverview()},["prevent"]))},[r,Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Mobile_NavigationBack")),1)])):Object(c["createCommentVNode"])("",!0),Object(c["createElementVNode"])("h1",null,Object(c["toDisplayString"])(e.headline),1),e.loading||e.showMethodDetails?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("p",i,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("BotTracking_SiteWithoutDataChooseTrackingMethodPreamble1"))+" ",1),l,Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("BotTracking_SiteWithoutDataChooseTrackingMethodPreamble2")),1)])),Object(c["createVNode"])(S,{"loading-message":e.translate("BotTracking_DetectingYourSite"),loading:e.loading},null,8,["loading-message","loading"]),e.loading||e.showMethodDetails?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])(c["Fragment"],{key:2},[e.errorMessage?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",s,[d,Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.errorMessage),1),Object(c["createElementVNode"])("a",{class:"btn",href:"#",onClick:t[1]||(t[1]=Object(c["withModifiers"])(t=>e.fetchTrackingMethods(),["prevent"]))},Object(c["toDisplayString"])(e.translate("General_Refresh")),1)])):Object(c["createCommentVNode"])("",!0),e.recommendedMethod?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",h,[Object(c["createElementVNode"])("img",{src:e.recommendedMethod.icon,alt:e.recommendedMethod.name+" logo"},null,8,m),Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("BotTracking_SiteWithoutDataInstallWithXRecommendation",e.recommendedMethod.name)),1),Object(c["createElementVNode"])("p",null,Object(c["toDisplayString"])(e.translate("BotTracking_SiteWithoutDataRecommendationText",e.recommendedMethod.name)),1),Object(c["createElementVNode"])("a",{href:"#"+e.recommendedMethod.id.toLowerCase(),class:"btn",onClick:t[2]||(t[2]=Object(c["withModifiers"])(t=>e.showMethod(e.recommendedMethod.id),["prevent"]))},Object(c["toDisplayString"])(e.translate("BotTracking_SiteWithoutDataInstallWithX",e.recommendedMethod.name)),9,b)])):Object(c["createCommentVNode"])("",!0),Object(c["createElementVNode"])("div",u,[j,Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("BotTracking_SiteWithoutDataOtherInstallMethods")),1),Object(c["createElementVNode"])("p",null,Object(c["toDisplayString"])(e.translate("BotTracking_SiteWithoutDataOtherInstallMethodsIntro")),1),Object(c["createElementVNode"])("ul",null,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.trackingMethods,t=>(Object(c["openBlock"])(),Object(c["createElementBlock"])("li",{class:"list-entry",key:t.id},[t.content?(Object(c["openBlock"])(),Object(c["createElementBlock"])("a",{key:0,href:"#"+t.id.toLowerCase(),onClick:Object(c["withModifiers"])(o=>e.showMethod(t.id),["prevent"])},[t.icon?(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:0,src:t.icon,class:"list-entry-icon"},null,8,k)):(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",g)),Object(c["createElementVNode"])("span",p,Object(c["toDisplayString"])(t.name),1)],8,O)):t.link?(Object(c["openBlock"])(),Object(c["createElementBlock"])("a",{key:1,href:t.link,target:"_blank",rel:"noreferrer noopener"},[t.icon?(Object(c["openBlock"])(),Object(c["createElementBlock"])("img",{key:0,src:t.icon,class:"list-entry-icon"},null,8,M)):(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",y)),Object(c["createElementVNode"])("span",B,Object(c["toDisplayString"])(t.name),1)],8,f)):Object(c["createCommentVNode"])("",!0)]))),128))])]),Object(c["createElementVNode"])("div",v,[Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("BotTracking_SiteWithoutDataNotYetReady")),1),Object(c["createElementVNode"])("a",{href:e.backToMatomoLink},Object(c["toDisplayString"])(e.translate("BotTracking_SiteWithoutDataBackToMatomo")),9,w)])],64)),e.showMethodDetails?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",{key:3,class:"tracking-method-details","data-method":e.showMethodDetails.id},[Object(c["createElementVNode"])("img",{src:e.showMethodDetails.icon,alt:e.showMethodDetails.name+" logo"},null,8,E),Object(c["createVNode"])(V,{html:e.showMethodDetails.content},null,8,["html"])],8,D)):Object(c["createCommentVNode"])("",!0)])}var S=o("19dc"),V=Object(c["defineComponent"])({components:{ActivityIndicator:S["ActivityIndicator"],VueEntryContainer:S["VueEntryContainer"]},props:{backToMatomoLink:String},data(){return{loading:!0,errorMessage:null,showMethodDetails:null,recommendedMethod:null,trackingMethods:[]}},created(){Object(c["watch"])(()=>S["MatomoUrl"].hashParsed.value.activeTab,e=>{this.showMethodDetails=this.findTrackingMethod(e)}),this.fetchTrackingMethods()},methods:{fetchTrackingMethods(){const e={module:"BotTracking",action:"getTrackingMethodsForSite",idSite:S["Matomo"].idSite};this.loading=!0,this.errorMessage=null,S["AjaxHelper"].fetch(e).then(e=>{const t=Array.isArray(null===e||void 0===e?void 0:e.trackingMethods)?[...e.trackingMethods]:[],o=t.findIndex(e=>e.wasDetected);-1!==o?(this.recommendedMethod=t[o],t.splice(o,1)):this.recommendedMethod=null,this.trackingMethods=t}).catch(()=>{this.errorMessage=Object(S["translate"])("General_ErrorRequest","",""),this.recommendedMethod=null,this.trackingMethods=[]}).finally(()=>{this.loading=!1,this.showMethodDetails=this.findTrackingMethod(S["MatomoUrl"].hashParsed.value.activeTab)})},findTrackingMethod(e){if(this.recommendedMethod&&e&&this.recommendedMethod.id.toLowerCase()===e.toLowerCase())return this.recommendedMethod;let t=null;return Object.entries(this.trackingMethods).forEach(([,o])=>{e&&o.id.toLowerCase()===e.toLowerCase()&&o.content&&(t=o)}),t},showMethod(e){S["MatomoUrl"].updateHash(Object.assign(Object.assign({},S["MatomoUrl"].hashParsed.value),{},{activeTab:e.toLowerCase()}))},showOverview(){S["MatomoUrl"].updateHash(Object.assign(Object.assign({},S["MatomoUrl"].hashParsed.value),{},{activeTab:null}))}},computed:{headline(){return this.showMethodDetails&&this.showMethodDetails.name?this.showMethodDetails.isOthers?this.showMethodDetails.name:Object(S["translate"])("BotTracking_SiteWithoutDataInstallWithX",this.showMethodDetails.name):Object(S["translate"])("BotTracking_SiteWithoutDataChooseTrackingMethod")}}});V.render=T;var N=V; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */}})})); //# sourceMappingURL=BotTracking.umd.min.js.map