From efd1d2a68a439afb42d1d1703e61da106994df54 Mon Sep 17 00:00:00 2001 From: sgiehl Date: Thu, 14 Sep 2023 09:31:59 +0200 Subject: [PATCH 1/7] Adjustments for new no data page layout --- SiteContentDetection/SpaPwa.php | 14 +++++----- TagManager.php | 5 +++- images/spa.png | Bin 0 -> 11903 bytes templates/trackingCodeReact.twig | 11 ++++++++ vue/dist/TagManager.umd.js | 24 +++++++++--------- vue/dist/TagManager.umd.min.js | 2 +- .../TrackingCodePage.vue | 2 +- 7 files changed, 36 insertions(+), 22 deletions(-) create mode 100644 images/spa.png diff --git a/SiteContentDetection/SpaPwa.php b/SiteContentDetection/SpaPwa.php index 9af2063aa..4e91637e2 100644 --- a/SiteContentDetection/SpaPwa.php +++ b/SiteContentDetection/SpaPwa.php @@ -20,10 +20,15 @@ class SpaPwa extends SiteContentDetectionAbstract { public static function getName(): string { - return 'SPA / PWA'; + return 'Single Page Application'; } - public static function getContentType(): string + public static function getIcon(): string + { + return './plugins/TagManager/images/spa.png'; + } + + public static function getContentType(): int { return self::TYPE_JS_FRAMEWORK; } @@ -38,11 +43,6 @@ public function isDetected(?string $data = null, ?array $headers = null): bool return false; } - public function shouldShowInstructionTab(SiteContentDetector $detector = null): bool - { - return true; - } - public function renderInstructionsTab(SiteContentDetector $detector): string { $model = StaticContainer::get('Piwik\Plugins\TagManager\Model\Container'); diff --git a/TagManager.php b/TagManager.php index 17601af59..ebba7de69 100644 --- a/TagManager.php +++ b/TagManager.php @@ -16,6 +16,7 @@ use Piwik\Log; use Piwik\Piwik; use Piwik\Plugin; +use Piwik\Plugins\SitesManager\SiteContentDetection\ReactJs; use Piwik\Plugin\Manager; use Piwik\Plugins\TagManager\Access\Capability\PublishLiveContainer; use Piwik\Plugins\TagManager\Access\Capability\TagManagerWrite; @@ -33,6 +34,7 @@ use Piwik\Plugins\TagManager\Model\Container\ContainerIdGenerator; use Piwik\Plugins\TagManager\Model\Salt; use Piwik\Site; +use Piwik\SiteContentDetector; use Piwik\View; use Piwik\Context; use Piwik\Log\LoggerInterface; @@ -278,12 +280,13 @@ public function setTagManagerCode(&$out) $out = $newContent; } - public function embedReactTagManagerTrackingCode(&$out) + public function embedReactTagManagerTrackingCode(&$out, SiteContentDetector $detector) { Piwik::checkUserHasSomeViewAccess(); $model = $this->getContainerModel(); $view = new View("@TagManager/trackingCodeReact"); $view->action = Piwik::getAction(); + $view->wasDetected = $detector->wasDetected(ReactJs::getId()); $view->showContainerRow = $model->getNumContainersTotal() > 1; $out .= $view->render(); } diff --git a/images/spa.png b/images/spa.png new file mode 100644 index 0000000000000000000000000000000000000000..2583ba059968f806587e0bc68b33c35b5285f832 GIT binary patch literal 11903 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¬THHZ@|9$8xL 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 literal 0 HcmV?d00001 diff --git a/templates/trackingCodeReact.twig b/templates/trackingCodeReact.twig index 8bf08a1be..e582e1203 100644 --- a/templates/trackingCodeReact.twig +++ b/templates/trackingCodeReact.twig @@ -1,3 +1,14 @@ +{% if wasDetected %} +
+ {{ 'SitesManager_ReactDetected'|translate( + '', + '', + '', + '' + ) }} +
+{% endif %} +

{{'TagManager_SiteWithoutDataReactIntro'|translate}}


{{'SitesManager_SiteWithoutDataCloudflareFollowStepsIntro'|translate}}

diff --git a/vue/dist/TagManager.umd.js b/vue/dist/TagManager.umd.js index a9debf5b5..b0cd7d3e7 100644 --- a/vue/dist/TagManager.umd.js +++ b/vue/dist/TagManager.umd.js @@ -9440,27 +9440,27 @@ TrackingCodeCommonvue_type_script_lang_ts.render = TrackingCodeCommonvue_type_te TagmanagerTrackingCodevue_type_script_lang_ts.render = TagmanagerTrackingCodevue_type_template_id_6a09ff25_render /* harmony default export */ var TagmanagerTrackingCode = (TagmanagerTrackingCodevue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/TagmanagerTrackingCode/TrackingCodePage.vue?vue&type=template&id=3b68ce26 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/TagmanagerTrackingCode/TrackingCodePage.vue?vue&type=template&id=5195f22b -var TrackingCodePagevue_type_template_id_3b68ce26_hoisted_1 = { +var TrackingCodePagevue_type_template_id_5195f22b_hoisted_1 = { key: 0 }; -var TrackingCodePagevue_type_template_id_3b68ce26_hoisted_2 = ["innerHTML"]; +var TrackingCodePagevue_type_template_id_5195f22b_hoisted_2 = ["innerHTML"]; -var TrackingCodePagevue_type_template_id_3b68ce26_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var TrackingCodePagevue_type_template_id_5195f22b_hoisted_3 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -var TrackingCodePagevue_type_template_id_3b68ce26_hoisted_4 = ["innerHTML"]; +var TrackingCodePagevue_type_template_id_5195f22b_hoisted_4 = ["innerHTML"]; -var TrackingCodePagevue_type_template_id_3b68ce26_hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); +var TrackingCodePagevue_type_template_id_5195f22b_hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("br", null, null, -1); -function TrackingCodePagevue_type_template_id_3b68ce26_render(_ctx, _cache, $props, $setup, $data, $options) { +function TrackingCodePagevue_type_template_id_5195f22b_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_TagmanagerTrackingCode = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("TagmanagerTrackingCode"); var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock"); - return _ctx.currentAction === 'siteWithoutDataTabs' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", TrackingCodePagevue_type_template_id_3b68ce26_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { + return _ctx.currentAction === 'getTrackingMethodsForSite' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", TrackingCodePagevue_type_template_id_5195f22b_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { innerHTML: _ctx.$sanitize(_ctx.siteWithoutDataMtmIntro) - }, null, 8, TrackingCodePagevue_type_template_id_3b68ce26_hoisted_2), TrackingCodePagevue_type_template_id_3b68ce26_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("strong", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_SiteWithoutDataCloudflareFollowStepsIntro')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_TagmanagerTrackingCode, { + }, null, 8, TrackingCodePagevue_type_template_id_5195f22b_hoisted_2), TrackingCodePagevue_type_template_id_5195f22b_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("strong", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_SiteWithoutDataCloudflareFollowStepsIntro')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_TagmanagerTrackingCode, { "show-container-row": _ctx.showContainerRow, "current-action": _ctx.currentAction, showTestSection: _ctx.isJsTrackerInstallCheckAvailable @@ -9472,7 +9472,7 @@ function TrackingCodePagevue_type_template_id_3b68ce26_render(_ctx, _cache, $pro default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { innerHTML: _ctx.$sanitize(_ctx.siteWithoutDataMtmIntro) - }, null, 8, TrackingCodePagevue_type_template_id_3b68ce26_hoisted_4), TrackingCodePagevue_type_template_id_3b68ce26_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("strong", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_SiteWithoutDataCloudflareFollowStepsIntro')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_TagmanagerTrackingCode, { + }, null, 8, TrackingCodePagevue_type_template_id_5195f22b_hoisted_4), TrackingCodePagevue_type_template_id_5195f22b_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("strong", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('SitesManager_SiteWithoutDataCloudflareFollowStepsIntro')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_TagmanagerTrackingCode, { "show-container-row": _ctx.showContainerRow, "current-action": _ctx.currentAction, showTestSection: false @@ -9481,7 +9481,7 @@ function TrackingCodePagevue_type_template_id_3b68ce26_render(_ctx, _cache, $pro _: 1 }, 8, ["content-title"])); } -// CONCATENATED MODULE: ./plugins/TagManager/vue/src/TagmanagerTrackingCode/TrackingCodePage.vue?vue&type=template&id=3b68ce26 +// CONCATENATED MODULE: ./plugins/TagManager/vue/src/TagmanagerTrackingCode/TrackingCodePage.vue?vue&type=template&id=5195f22b // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/TagmanagerTrackingCode/TrackingCodePage.vue?vue&type=script&lang=ts @@ -9527,7 +9527,7 @@ function TrackingCodePagevue_type_template_id_3b68ce26_render(_ctx, _cache, $pro -TrackingCodePagevue_type_script_lang_ts.render = TrackingCodePagevue_type_template_id_3b68ce26_render +TrackingCodePagevue_type_script_lang_ts.render = TrackingCodePagevue_type_template_id_5195f22b_render /* harmony default export */ var TrackingCodePage = (TrackingCodePagevue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/TagmanagerTrackingCode/TrackingSPAPage.vue?vue&type=template&id=4a0674e4 diff --git a/vue/dist/TagManager.umd.min.js b/vue/dist/TagManager.umd.min.js index aba3d532f..facf691b5 100644 --- a/vue/dist/TagManager.umd.min.js +++ b/vue/dist/TagManager.umd.min.js @@ -58,7 +58,7 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var $s=function(){function e(){var t=this;Ps(this,e),Gs(this,"privateState",Object(i["reactive"])({containers:[],isLoadingContainers:!1,isLoadingSingle:!1,isUpdating:!1})),Gs(this,"state",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState)}))),Gs(this,"isLoading",Object(i["computed"])((function(){var e=t.state.value;return e.isLoadingContainers||e.isLoadingSingle}))),Gs(this,"isUpdating",Object(i["computed"])((function(){return t.state.value.isUpdating}))),Gs(this,"containers",Object(i["computed"])((function(){return t.state.value.containers}))),Gs(this,"fetchPromise",null)}return Fs(e,[{key:"reload",value:function(){return this.privateState.containers=[],this.fetchPromise=null,this.fetchContainers()}},{key:"fetchContainers",value:function(){var e=this;return this.privateState.isLoadingContainers=!0,this.privateState.containers=[],this.fetchPromise||(this.fetchPromise=u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1"})),Promise.resolve(this.fetchPromise).then((function(t){return e.privateState.containers=t,e.privateState.isLoadingContainers=!1,e.containers.value})).finally((function(){e.privateState.isLoadingContainers=!1}))}},{key:"findContainer",value:function(e){var t=this,n=this.containers.value.find((function(t){return t.idcontainer===e}));return n?Promise.resolve(n):(this.privateState.isLoadingSingle=!0,u["AjaxHelper"].fetch({idContainer:e,method:"TagManager.getContainer",filter_limit:"-1"}).then((function(e){return t.privateState.containers=[].concat(xs(t.privateState.containers),[e]),Object(i["readonly"])(e)})).finally((function(){t.privateState.isLoadingSingle=!1})))}},{key:"deleteContainer",value:function(e){var t=this;return this.privateState.isUpdating=!0,this.privateState.containers=[],u["AjaxHelper"].fetch({idContainer:e,method:"TagManager.deleteContainer"},{withTokenInUrl:!0}).finally((function(){t.privateState.isUpdating=!1}))}},{key:"createOrUpdateContainer",value:function(e,t){var n=this;return this.privateState.isUpdating=!0,u["AjaxHelper"].post({method:t,idContainer:e.idcontainer},{name:e.name,description:e.description,context:e.context},{withTokenInUrl:!0}).finally((function(){n.privateState.isUpdating=!1}))}}]),e}(),Rs=new $s,zs="containertagmanagement",Ws=Object(i["defineComponent"])({props:{idContainer:String},components:{ContentBlock:u["ContentBlock"],Field:g["Field"],SaveButton:g["SaveButton"]},data:function(){return{isDirty:!1,editTitle:"",isUpdatingVersion:!1,container:{}}},created:function(){Ds.init(),yt.init(),this.initIdContainer()},watch:{idContainer:function(e){null!==e&&this.initIdContainer()}},methods:{removeAnyContainerNotification:function(){u["NotificationsStore"].remove(zs),u["NotificationsStore"].remove("ajaxHelper")},showNotification:function(e,t){var n=u["NotificationsStore"].show({message:e,context:t,id:zs,type:"transient"});setTimeout((function(){u["NotificationsStore"].scrollToNotification(n)}),200)},showErrorFieldNotProvidedNotification:function(e){var t=Object(u["translate"])("TagManager_ErrorXNotProvided",[e]);this.showNotification(t,"error")},initIdContainer:function(){var e=this;this.container={},u["Matomo"].helper.lazyScrollToContent(),this.edit&&this.idContainer?(this.editTitle=Object(u["translate"])("TagManager_EditContainer"),Rs.findContainer(this.idContainer).then((function(t){t&&(e.container=Object(u["clone"])(t),e.isDirty=!1)}))):this.create&&(this.editTitle=Object(u["translate"])("TagManager_CreateNewContainer"),this.container={idSite:u["Matomo"].idSite,name:"",context:"web",description:""},this.isDirty=!1)},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idContainer,u["MatomoUrl"].updateHash(e)},createContainer:function(){var e=this;this.removeAnyContainerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingVersion=!0,Rs.createOrUpdateContainer(this.container,"TagManager.addContainer").then((function(t){if(e.isUpdatingVersion=!1,t){e.isDirty=!1;var n=t.value;e.showNotification(Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Container")),"success"),u["MatomoUrl"].updateUrl(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:"dashboard",idContainer:n}))}})).finally((function(){e.isUpdatingVersion=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateContainer:function(){var e=this;this.removeAnyContainerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdating=!0,Rs.createOrUpdateContainer(this.container,"TagManager.updateContainer").then((function(t){t&&(e.isDirty=!1,e.container={},Rs.reload().then((function(){e.initIdContainer()})),e.showNotification(Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Container")),"success"))})))},checkRequiredFieldsAreSet:function(){if(!this.container.name){var e=Object(u["translate"])("General_Name");return this.showErrorFieldNotProvidedNotification(e),!1}return!0}},computed:{contexts:function(){return Ds.contextsOptions.value},create:function(){return"0"===this.idContainer},edit:function(){return!this.create},isLoading:function(){return ft.isLoading.value||yt.isLoading.value},isUpdating:function(){return ft.isUpdating.value||this.isUpdatingVersion}}});Ws.render=Es;var qs=Ws,Xs={class:"tagManagerManageList tagManagerContainerList"},Ks={class:"index"},Js={class:"name"},Ys={class:"description"},Qs={class:"created"},Zs={class:"action"},ed={colspan:"5"},td={class:"loadingPiwik"},nd=Object(i["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),ad={colspan:"5"},rd=["id"],id=["title"],od={class:"name"},ld=["title"],cd={class:"created"},sd={class:"action"},dd=["href","title"],ud=["onClick","title"],gd=["onClick","title"],bd=["onClick","title"],md={class:"tableActionBar"},pd=Object(i["createElementVNode"])("span",{class:"icon-add"}," ",-1),hd={class:"ui-confirm",id:"confirmDeleteContainer",ref:"confirmDeleteContainer"},fd=["value"],vd=["value"];function jd(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("ContentBlock"),c=Object(i["resolveDirective"])("content-table");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Xs,[Object(i["createVNode"])(l,{feature:"Tag Manager","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Containers"))},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("TagManager_ContainerUsageBenefits")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("table",null,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",Ks,Object(i["toDisplayString"])(e.translate("General_Id")),1),Object(i["createElementVNode"])("th",Js,Object(i["toDisplayString"])(e.translate("General_Name")),1),Object(i["createElementVNode"])("th",Ys,Object(i["toDisplayString"])(e.translate("General_Description")),1),Object(i["createElementVNode"])("th",Qs,Object(i["toDisplayString"])(e.translate("TagManager_CreatedDate")),1),Object(i["createElementVNode"])("th",Zs,Object(i["toDisplayString"])(e.translate("General_Actions")),1)])]),Object(i["createElementVNode"])("tbody",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",ed,[Object(i["createElementVNode"])("span",td,[nd,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[i["vShow"],e.isLoading||e.isUpdating]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",ad,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_NoContainersFound"))+" ",1),Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{class:"createContainerNow",onClick:t[0]||(t[0]=function(t){return e.createContainer()})},Object(i["toDisplayString"])(e.translate("TagManager_CreateNewContainerNow")),513),[[i["vShow"],e.hasWriteAccess]])])],512),[[i["vShow"],!e.isLoading&&0===e.containers.length]]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sortedContainers,(function(t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{id:"container".concat(t.idcontainer),class:"containers",key:t.idcontainer},[Object(i["createElementVNode"])("td",{class:"index",title:"".concat(e.translate("TagManager_Context"),": ")+e.contexts[t.context]},Object(i["toDisplayString"])(t.idcontainer),9,id),Object(i["createElementVNode"])("td",od,Object(i["toDisplayString"])(t.name),1),Object(i["createElementVNode"])("td",{class:"description",title:t.description},Object(i["toDisplayString"])(e.truncateText(t.description,50)),9,ld),Object(i["createElementVNode"])("td",cd,[Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(t.created_date_pretty),1)]),Object(i["createElementVNode"])("td",sd,[Object(i["createElementVNode"])("a",{class:"table-action icon-configure",href:"?module=TagManager&action="+e.containerDefaultAction+"&idContainer="+t.idcontainer+"&idSite="+t.idsite+"&period=day&date=yesterday",title:e.translate("TagManager_ConfigureX",e.translate("TagManager_Container"))},null,8,dd),Object(i["createElementVNode"])("a",{class:"table-action installCode icon-embed",onClick:function(n){return e.installCode(t.idcontainer)},title:e.translate("TagManager_InstallCode")},null,8,ud),Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editContainer(t.idcontainer)},title:e.translate("TagManager_EditX",e.translate("TagManager_Container"))},null,8,gd),[[i["vShow"],e.hasWriteAccess]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteContainer(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Container"))},null,8,bd),[[i["vShow"],e.hasWriteAccess]])])],8,rd)})),128))])],512),[[c]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",md,[Object(i["createElementVNode"])("a",{class:"createNewContainer",value:"",onClick:t[1]||(t[1]=function(t){return e.createContainer()})},[pd,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_CreateNewContainer")),1)])],512),[[i["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title"]),Object(i["createElementVNode"])("div",hd,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("TagManager_DeleteContainerConfirm")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,fd),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,vd)],512)])}function Od(e){return Cd(e)||yd(e)||Vd(e)||Td()}function Td(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Vd(e,t){if(e){if("string"===typeof e)return Nd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nd(e,t):void 0}}function yd(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Cd(e){if(Array.isArray(e))return Nd(e)}function Nd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.created_date?-1:0})),e}},methods:{createContainer:function(){this.editContainer("0")},editContainer:function(e){u["MatomoUrl"].updateHash(Object.assign(Object.assign({},u["MatomoUrl"].hashParsed.value),{},{idContainer:e}))},installCode:function(e){Sd.showInstallCode(e)},deleteContainer:function(e){function t(){Rs.deleteContainer(e.idcontainer).then((function(){Rs.reload()}))}u["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteContainer,{yes:t})},truncateText:function(e,t){return e.length>t?"".concat(e.substr(0,t-3),"..."):e}}});kd.render=jd;var wd=kd,Md={class:"manageContainer"};function _d(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("ContainerList"),c=Object(i["resolveComponent"])("ContainerEdit");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Md,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l)],512),[[i["vShow"],!e.editMode]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(c,{"id-container":e.idContainer},null,8,["id-container"])],512),[[i["vShow"],e.editMode]])])}var Dd=Object(i["defineComponent"])({props:{},components:{ContainerList:wd,ContainerEdit:qs},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(i["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idContainer}),(function(t){e.onIdContainerParamChange(t)})),u["NotificationsStore"].remove("containertagmanagement"),this.onIdContainerParamChange(u["MatomoUrl"].hashParsed.value.idContainer)},computed:{idContainer:function(){var e=u["MatomoUrl"].hashParsed.value.idContainer;return this.isAddAllowed||""!==e?e:null},editMode:function(){return!!this.idContainer}},methods:{onIdContainerParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddVersion",t),this.isAddAllowed=!!t.isAllowed}}}});Dd.render=_d;var xd=Dd,Ad={class:"containerDashboard"},Bd={key:0},Ld={class:"dashboardCreationDate"},Ud={key:0},Id=Object(i["createElementVNode"])("br",null,null,-1),Pd={class:"row",style:{"margin-left":"-0.75rem"}},Hd={class:"col m6 s12"},Fd={key:0},Gd=["href","title"],$d={key:0},Rd=Object(i["createElementVNode"])("hr",null,null,-1),zd=["href"],Wd=Object(i["createElementVNode"])("span",{class:"icon-edit"}," ",-1),qd=["href"],Xd=Object(i["createElementVNode"])("span",{class:"icon-add"}," ",-1),Kd={class:"col m6 s12"},Jd={key:0},Yd=["href","title"],Qd=Object(i["createElementVNode"])("hr",null,null,-1),Zd=["href"],eu=Object(i["createElementVNode"])("span",{class:"icon-edit"}," ",-1),tu=["href"],nu=Object(i["createElementVNode"])("span",{class:"icon-add"}," ",-1),au={class:"row",style:{"margin-left":"-0.75rem"}},ru={class:"col m6 s12"},iu=["href","title"],ou={key:0},lu=Object(i["createElementVNode"])("hr",null,null,-1),cu=["href"],su=Object(i["createElementVNode"])("span",{class:"icon-edit"}," ",-1),du=["href"],uu=Object(i["createElementVNode"])("span",{class:"icon-add"}," ",-1),gu={class:"col m6 s12"},bu=["title","href"],mu={key:0},pu=Object(i["createElementVNode"])("br",null,null,-1),hu=["title"],fu={key:0},vu=Object(i["createElementVNode"])("hr",null,null,-1),ju=["href"],Ou=Object(i["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Tu=["href"],Vu=Object(i["createElementVNode"])("span",{class:"icon-add"}," ",-1);function yu(e,t,n,a,r,o){var l,c,s=Object(i["resolveComponent"])("ActivityIndicator"),d=Object(i["resolveComponent"])("EnrichedHeadline"),u=Object(i["resolveComponent"])("ContentBlock"),g=Object(i["resolveDirective"])("content-intro");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ad,[Object(i["createVNode"])(s,{loading:e.isLoading},null,8,["loading"]),e.isLoading?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Bd,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h2",null,[Object(i["createVNode"])(d,{"feature-name":"Tag Manager","inline-help":e.dashboardHelpText},{default:Object(i["withCtx"])((function(){var t;return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_ContainerX",null===(t=e.container)||void 0===t?void 0:t.name)),1)]})),_:1},8,["inline-help"])]),Object(i["createElementVNode"])("p",Ld,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.containerMetaInformation)+" ",1),null!==(l=e.containerVersion)&&void 0!==l&&l.description?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Ud,[Id,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_Description"))+": "+Object(i["toDisplayString"])(null===(c=e.containerVersion)||void 0===c?void 0:c.description),1)])):Object(i["createCommentVNode"])("",!0)])],512),[[g]]),Object(i["createElementVNode"])("div",Pd,[Object(i["createElementVNode"])("div",Hd,[Object(i["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.tagCount," ").concat(e.translate("TagManager_Tags")),"help-text":e.tagsHelpText},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,[e.tagCount?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Fd,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sortedContainerVersionTags,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:n},[Object(i["createElementVNode"])("a",{href:e.linkTo("manageTags",{idTag:t.idtag}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(i["toDisplayString"])(t.name),9,Gd),n!==e.sortedContainerVersionTags.length-1?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",$d,", ")):Object(i["createCommentVNode"])("",!0)])})),128))])):Object(i["createCommentVNode"])("",!0)]),Rd,Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags")},[Wd,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_EditTags")),1)],8,zd),Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags",{idTag:0})},[Xd,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_CreateNewTag")),1)],8,qd)]})),_:1},8,["content-title","help-text"])]),Object(i["createElementVNode"])("div",Kd,[Object(i["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.triggerCount," ").concat(e.translate("TagManager_Triggers")),"help-text":e.triggersHelpText},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,[e.triggerCount?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Jd,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sortedTriggers,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:n},[Object(i["createElementVNode"])("a",{href:e.linkTo("manageTriggers",{idTrigger:t.idtrigger}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(i["toDisplayString"])(t.name),9,Yd),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,", ",512),[[i["vShow"],n!==e.sortedTriggers.length-1]])])})),128))])):Object(i["createCommentVNode"])("",!0)]),Qd,Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers")},[eu,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_EditTriggers")),1)],8,Zd),Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers",{idTrigger:0})},[nu,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_CreateNewTrigger")),1)],8,tu)]})),_:1},8,["content-title","help-text"])])]),Object(i["createElementVNode"])("div",au,[Object(i["createElementVNode"])("div",ru,[Object(i["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.variableCount," ").concat(e.translate("TagManager_Variables")),"help-text":e.variablesHelpText},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sortedVariables,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:n},[Object(i["createElementVNode"])("a",{href:e.linkTo("manageVariables",{idVariable:t.idvariable}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(i["toDisplayString"])(t.name),9,iu),n!==e.sortedVariables.length-1?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",ou,", ")):Object(i["createCommentVNode"])("",!0)])})),128))],512),[[i["vShow"],e.variableCount]])]),lu,Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables")},[su,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_EditVariables")),1)],8,cu),Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables",{idVariable:0})},[uu,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_CreateNewVariable")),1)],8,du)]})),_:1},8,["content-title","help-text"])]),Object(i["createElementVNode"])("div",gu,[Object(i["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.versionCount," ").concat(e.translate("TagManager_Versions")),"help-text":e.versionsHelpText},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_LastVersions"))+": ",1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.lastVersions,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:n},[Object(i["createElementVNode"])("a",{title:e.lastVersionLinkTitle(t),href:e.linkTo("manageVersions",{idContainerVersion:t.idcontainerversion})},Object(i["toDisplayString"])(t.name),9,bu),n!==e.lastVersions.length-1?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",mu,", ")):Object(i["createCommentVNode"])("",!0)])})),128))],512),[[i["vShow"],e.lastVersions.length]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[pu,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("TagManager_Environments"))+": ",1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.container.releases,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:n},[Object(i["createElementVNode"])("span",{title:e.releaseTooltip(t)},Object(i["toDisplayString"])(e.ucfirst(t.environment)),9,hu),n!==e.container.releases.length-1?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",fu,", ")):Object(i["createCommentVNode"])("",!0)])})),128))],512),[[i["vShow"],e.container.releases.length]])]),vu,Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions")},[Ou,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_EditVersions")),1)],8,ju),Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions",{idContainerVersion:0})},[Vu,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_CreateNewVersion")),1)],8,Tu)]})),_:1},8,["content-title","help-text"])])])]))])}function Cu(e){e.sort((function(e,t){return e.namet.name?1:0}))}var Nu=Object(i["defineComponent"])({props:{idContainer:String,dashboardHelpText:String,tagsHelpText:String,triggersHelpText:String,variablesHelpText:String,versionsHelpText:String},components:{ActivityIndicator:u["ActivityIndicator"],EnrichedHeadline:u["EnrichedHeadline"],ContentBlock:u["ContentBlock"]},directives:{ContentIntro:u["ContentIntro"]},data:function(){return{container:null,containerVersion:null,isLoading:!1}},created:function(){var e=this;Ds.init(),this.isLoading=!0;var t=u["AjaxHelper"].fetch({method:"TagManager.getContainer",idContainer:this.idContainer}).then((function(t){e.container=t})),n=u["AjaxHelper"].fetch({method:"TagManager.exportContainerVersion",idContainer:this.idContainer}).then((function(t){e.containerVersion=t}));Promise.all([t,n]).finally((function(){e.isLoading=!1}))},methods:{linkTo:function(e,t){var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e}));return t&&(n+="#?".concat(u["MatomoUrl"].stringify(t))),"?".concat(n)},lastVersionLinkTitle:function(e){return"Created on ".concat(e.created_date_pretty)+", description: '".concat(e.description,"'")},releaseTooltip:function(e){var t=Object(u["translate"])("TagManager_ReleaseInfo",e.release_login,e.release_date_pretty),n=Object(u["translate"])("TagManager_ReleaseVersionInfo",e.version_name);return"".concat(t," ").concat(n)},ucfirst:function(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}},computed:{lastVersions:function(){var e,t;return null!==(e=this.container)&&void 0!==e&&null!==(t=e.versions)&&void 0!==t&&t.length?this.container.versions.slice(-5):[]},contexts:function(){var e={};return Ds.contexts.value.forEach((function(t){var n=t.id,a=t.name;e[n]=a})),e},containerMetaInformation:function(){var e,t,n;return Object(u["translate"])("TagManager_ContainerMetaInformation",(null===(e=this.containerVersion)||void 0===e?void 0:e.idcontainer)||"",this.contexts[(null===(t=this.container)||void 0===t?void 0:t.context)||""]||"",(null===(n=this.containerVersion)||void 0===n?void 0:n.created_date_pretty)||"")},sortedContainerVersionTags:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.tags)||[];return Cu(t),t},sortedTriggers:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.triggers)||[];return Cu(t),t},sortedVariables:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.variables)||[];return Cu(t),t},tagCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.tags.length},triggerCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.triggers.length},versionCount:function(){var e;return null===(e=this.container)||void 0===e?void 0:e.versions.length},variableCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.variables.length}}});Nu.render=yu;var Eu=Nu,Su=["title"],ku={class:"title"},wu=Object(i["createElementVNode"])("span",{class:"icon icon-chevron-down"}," ",-1),Mu={class:"dropdown positionInViewport"},_u={class:"custom_select_container"},Du={class:"custom_select_ul_list"},xu=["title"],Au=["href"];function Bu(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("ActivityIndicator"),c=Object(i["resolveDirective"])("focus-anywhere-but-here");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])(["tagContainerSelector piwikSelector borderedControl",{expanded:e.showContainerList}]),onClick:t[1]||(t[1]=function(t){e.fetchContainers(),e.showContainerList=!e.showContainerList}),title:e.translate("TagManager_ChooseContainer")},[Object(i["createElementVNode"])("a",ku,[wu,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.actualContainerName),1)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Mu,[Object(i["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),Object(i["createElementVNode"])("div",_u,[Object(i["createElementVNode"])("ul",Du,[Object(i["withDirectives"])(Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("a",{tabindex:"-1",onClick:t[0]||(t[0]=Object(i["withModifiers"])((function(){}),["prevent","stop"]))},Object(i["toDisplayString"])(e.translate("TagManager_NoContainersFound")),1)],512),[[i["vShow"],!e.isLoading&&0===e.containers.length]]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.containers,(function(t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{title:"".concat(t.name," (").concat(t.idcontainer,")"),key:t.idcontainer},[Object(i["createElementVNode"])("a",{href:e.linkTo(t.idcontainer)},Object(i["toDisplayString"])(t.name)+" ("+Object(i["toDisplayString"])(t.idcontainer)+") ",9,Au)],8,xu)})),128))])])],512),[[i["vShow"],e.showContainerList]])],10,Su)),[[c,{blur:e.onBlur}]])}var Lu=Object(i["defineComponent"])({props:{containerName:String},components:{ActivityIndicator:u["ActivityIndicator"]},directives:{FocusAnywhereButHere:u["FocusAnywhereButHere"]},data:function(){return{containers:[],isLoading:!1,showContainerList:!1}},created:function(){setTimeout((function(){window.initTopControls()}))},methods:{fetchContainers:function(){var e=this;this.isLoading=!0,this.containers=[],u["AjaxHelper"].fetch({method:"TagManager.getContainers"}).then((function(t){e.containers=t})).finally((function(){e.isLoading=!1}))},linkTo:function(e){var t=u["MatomoUrl"].urlParsed.value.action;t&&"manageContainers"!==t||(t=this.hasWriteAccess?"dashboard":"manageTags");var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{idContainer:e,action:t}));return"".concat(window.location.pathname,"?").concat(n)},onBlur:function(){this.showContainerList=!1}},computed:{actualContainerName:function(){return this.containerName?Object(u["translate"])("TagManager_ContainerX",this.containerName):Object(u["translate"])("TagManager_ChooseContainer")},hasWriteAccess:function(){return u["Matomo"].hasUserCapability("tagmanager_write")}}});Lu.render=Bu;var Uu=Lu,Iu={style:{"margin-left":"-0.75rem"}},Pu=Object(i["createElementVNode"])("br",null,null,-1),Hu=["href"],Fu=["textContent"],Gu={style:{"margin-top":"1rem"}},$u=["innerHTML"],Ru=Object(i["createElementVNode"])("br",null,null,-1),zu={target:"_blank",href:"https://matomo.org/faq/tag-manager/data-layer-in-matomo-tag-manager/"},Wu={class:"environment"},qu={class:"name"},Xu={class:"name"},Ku={class:"released_by"},Ju={class:"released_on"},Yu={key:0},Qu={colspan:"7"},Zu={class:"loadingPiwik"},eg=Object(i["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),tg={key:1},ng={colspan:"7"},ag={class:"environment"},rg={class:"name"},ig={class:"revision"},og={class:"released_by"},lg={class:"released_on"},cg={class:"date"};function sg(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("ActivityIndicator"),s=Object(i["resolveComponent"])("ContentBlock"),d=Object(i["resolveDirective"])("select-on-focus"),u=Object(i["resolveDirective"])("content-table");return Object(i["openBlock"])(),Object(i["createBlock"])(s,{class:"manageInstallTagCode",feature:"Tag Manager","content-title":"Install Code"},{default:Object(i["withCtx"])((function(){var n,a;return[Object(i["createElementVNode"])("div",Iu,[Object(i["createVNode"])(l,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.environment=t,e.fetchInstallInstructions(e.environment)}),options:e.environments,title:e.translate("TagManager_Environment")},null,8,["model-value","options","title"])]),Object(i["createVNode"])(c,{loading:e.isLoading},null,8,["loading"]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.installInstructions,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:n},[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.description)+" ",1),Pu,t.helpUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(i["toDisplayString"])(e.translate("TagManager_LearnMore")),9,Hu)):Object(i["createCommentVNode"])("",!0)]),t.embedCode?Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("pre",{key:0,class:"codeblock",textContent:Object(i["toDisplayString"])(t.embedCode),ref:"codeblock"},null,8,Fu)),[[d,{}]]):Object(i["createCommentVNode"])("",!0)])})),128)),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("TagManager_InstallCodePublishEnvironmentNote","preview"))+" "+Object(i["toDisplayString"])(e.translate("TagManager_ConfigureEnvironmentsSuperUser")),1),Object(i["createElementVNode"])("p",Gu,[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_InstallCodeDataLayerNote","",""))},null,8,$u),Ru,Object(i["createElementVNode"])("a",zu,Object(i["toDisplayString"])(e.translate("TagManager_LearnMore")),1)]),Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("TagManager_ReleasesOverview")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("table",null,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",Wu,Object(i["toDisplayString"])(e.translate("TagManager_Environment")),1),Object(i["createElementVNode"])("th",qu,Object(i["toDisplayString"])(e.translate("TagManager_VersionName")),1),Object(i["createElementVNode"])("th",Xu,Object(i["toDisplayString"])(e.translate("TagManager_VersionRevision")),1),Object(i["createElementVNode"])("th",Ku,Object(i["toDisplayString"])(e.translate("TagManager_ReleasedBy")),1),Object(i["createElementVNode"])("th",Ju,Object(i["toDisplayString"])(e.translate("TagManager_ReleasedOn")),1)])]),Object(i["createElementVNode"])("tbody",null,[e.isLoading?(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",Yu,[Object(i["createElementVNode"])("td",Qu,[Object(i["createElementVNode"])("span",Zu,[eg,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_LoadingData")),1)])])])):Object(i["createCommentVNode"])("",!0),e.isLoading||0!==(null===(n=e.container)||void 0===n||null===(a=n.releases)||void 0===a?void 0:a.length)?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",tg,[Object(i["createElementVNode"])("td",ng,Object(i["toDisplayString"])(e.translate("TagManager_NoReleasesFound")),1)])),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sortedReleases,(function(t){var n,a;return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:t.idcontainerrelease},[Object(i["createElementVNode"])("td",ag,Object(i["toDisplayString"])(e.ucfirst(t.environment)),1),Object(i["createElementVNode"])("td",rg,Object(i["toDisplayString"])(null===(n=e.releaseVersions[t.idcontainerrelease])||void 0===n?void 0:n.name),1),Object(i["createElementVNode"])("td",ig,Object(i["toDisplayString"])(null===(a=e.releaseVersions[t.idcontainerrelease])||void 0===a?void 0:a.revision),1),Object(i["createElementVNode"])("td",og,Object(i["toDisplayString"])(t.release_login),1),Object(i["createElementVNode"])("td",lg,[Object(i["createElementVNode"])("span",cg,Object(i["toDisplayString"])(t.release_date_pretty),1)])])})),128))])],512),[[u]])]})),_:1})}function dg(e){return bg(e)||gg(e)||hg(e)||ug()}function ug(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function gg(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function bg(e){if(Array.isArray(e))return fg(e)}function mg(e,t){return jg(e)||vg(e,t)||hg(e,t)||pg()}function pg(){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 hg(e,t){if(e){if("string"===typeof e)return fg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fg(e,t):void 0}}function fg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.release_date?-1:t.index-e.index})),t}}});Vg.render=sg;var yg=Vg,Cg={class:"list-style-decimal"},Ng=["innerHTML"];function Eg(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("TrackingCodeCommon");return Object(i["openBlock"])(),Object(i["createElementBlock"])("ol",Cg,[e.showContainerRow?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{key:0,innerHTML:e.$sanitize(e.setupStep1)},null,8,Ng)):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(l,{"show-container-row":e.showContainerRow,showBottom:!0,showDescription:!1,showPlainMtmSteps:!0,showTestSection:e.showTestSection,onFetchInstallInstructions:e.fetchInstallInstructions,ref:"trackingCodeCommon"},null,8,["show-container-row","showTestSection","onFetchInstallInstructions"])])}var Sg={class:"tagManagerTrackingCode"},kg={key:1,class:"row"},wg={class:"col s12 m4 "},Mg={class:"form-group row"},_g={class:"col s12 input-field"},Dg={for:"tagManagerTrackingCodeSite",class:"siteSelectorLabel"},xg={class:"sites_autocomplete"},Ag={class:"col s12 m4"},Bg={class:"col s12 m4"},Lg={key:2,class:"alert alert-info"},Ug={href:""},Ig={key:0},Pg=["href"],Hg=Object(i["createTextVNode"])(". "),Fg={key:1},Gg=["innerHTML"],$g=Object(i["createTextVNode"])(". "),Rg=["innerHTML"],zg=Object(i["createTextVNode"])(". "),Wg=["innerHTML"],qg=["textContent"],Xg={key:3},Kg=["innerHTML"],Jg={key:1};function Yg(e,t,n,a,r,o){var l=this,c=Object(i["resolveComponent"])("ActivityIndicator"),s=Object(i["resolveComponent"])("SiteSelector"),d=Object(i["resolveComponent"])("Field"),u=Object(i["resolveDirective"])("copy-to-clipboard");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Sg,[e.showContainerRow||e.environments.length>1?(Object(i["openBlock"])(),Object(i["createBlock"])(c,{key:0,style:Object(i["normalizeStyle"])({opacity:e.isLoading?1:0}),loading:!0},null,8,["style"])):Object(i["createCommentVNode"])("",!0),e.showContainerRow||e.environments.length>1?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",kg,[Object(i["createElementVNode"])("div",wg,[Object(i["createElementVNode"])("div",Mg,[Object(i["createElementVNode"])("div",_g,[Object(i["createElementVNode"])("label",Dg,Object(i["toDisplayString"])(e.translate("General_Website")),1),Object(i["createElementVNode"])("div",xg,[Object(i["createVNode"])(s,{id:"tagManagerTrackingCodeSite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),"show-all-sites-item":!1,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(i["createElementVNode"])("div",Ag,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(d,{uicontrol:"select",name:"containers","model-value":e.idContainer,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.idContainer=t,e.onContainerChange()}),options:e.containerOptions,disabled:e.containerOptions.length<=1,"full-width":!0,title:e.translate("TagManager_Container")},null,8,["model-value","options","disabled","title"])])]),Object(i["createElementVNode"])("div",Bg,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(d,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.environment=t,l.$emit("fetchInstallInstructions")}),options:e.environments,disabled:e.environments.length<=1,"full-width":!0,title:e.translate("TagManager_Environment")},null,8,["model-value","options","disabled","title"])])])])):Object(i["createCommentVNode"])("",!0),e.idContainer&&e.noReleaseFound?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Lg,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_NoReleasesFoundForContainer"))+" ",1),Object(i["createElementVNode"])("a",Ug,Object(i["toDisplayString"])(e.translate("TagManager_PublishVersionToEnvironmentToViewEmbedCode")),1)])):Object(i["createCommentVNode"])("",!0),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.installInstructions,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:n},[e.showDescription?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",Ig,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.description)+" ",1),t.helpUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(i["toDisplayString"])(e.translate("TagManager_LearnMore")),9,Pg)):Object(i["createCommentVNode"])("",!0),Hg])):Object(i["createCommentVNode"])("",!0),e.showPlainMtmSteps?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Fg,[Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.getMtmStep2)},null,8,Gg),$g,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.getLearnMoreLink)},null,8,Rg),zg]),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.getMtmStep3)},null,8,Wg)])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("pre",{class:"codeblock",textContent:Object(i["toDisplayString"])(t.embedCode),ref:"codeblock"},null,8,qg),[[u,{}]])])])})),128)),e.showBottom?Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Xg,[e.idContainer&&!e.showTestSection?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.getCongratulationsText)},null,8,Kg)):Object(i["createCommentVNode"])("",!0),e.idContainer&&e.showTestSection?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",Jg,[(Object(i["openBlock"])(),Object(i["createBlock"])(Object(i["resolveDynamicComponent"])(e.testComponent),{site:e.site},null,8,["site"]))])):Object(i["createCommentVNode"])("",!0)],512)),[[i["vShow"],!e.noReleaseFound]]):Object(i["createCommentVNode"])("",!0)])}function Qg(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}var Zg=Object(i["defineComponent"])({props:{showContainerRow:Boolean,currentAction:String,showBottom:Boolean,showDescription:Boolean,showPlainMtmSteps:Boolean,showTestSection:Boolean},components:{ActivityIndicator:u["ActivityIndicator"],SiteSelector:u["SiteSelector"],Field:g["Field"]},emits:["fetchInstallInstructions"],directives:{CopyToClipboard:u["CopyToClipboard"]},data:function(){return{containerVariables:[],isLoading:!1,idContainer:"",environment:"",environments:[],environmentNameMap:{},containerMap:{},containerOptions:[],site:{id:u["Matomo"].idSite,name:u["Matomo"].helper.htmlDecode(u["Matomo"].siteName)},matomoConfigs:[],releases:[],installInstructions:[],noReleaseFound:!1}},created:function(){var e=this;u["AjaxHelper"].fetch({method:"TagManager.getAvailableEnvironments",filter_limit:"-1"}).then((function(t){var n;n=Array.isArray(t)?t:Object.values(t),e.environmentNameMap=Object.fromEntries(n.map((function(e){var t=e.id,n=e.name;return[t,n]})))})),this.onSiteChange()},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){var e,t=this;this.installInstructions=[],this.containerOptions=[],this.containerMap={},this.environments=[],this.matomoConfigs=[],this.idContainer="",null!==(e=this.site)&&void 0!==e&&e.id&&(this.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1",idSite:this.site.id}).then((function(e){if(t.containerOptions=[],null===e||void 0===e||!e.length)return t.idContainer="",void t.containerOptions.push({key:"",value:t.translate("TagManager_NoContainersFound")});e.forEach((function(e){t.idContainer||(t.idContainer=e.idcontainer),t.containerMap[e.idcontainer]=e,t.containerOptions.push({key:e.idcontainer,value:e.name})})),t.onContainerChange()})).finally((function(){t.isLoading=!1})))},onContainerChange:function(){var e=this;if(this.noReleaseFound=!1,this.idContainer){this.installInstructions=[];var t=this.containerMap[this.idContainer],n=t.draft.idcontainerversion;this.environment="",this.environments=[];var a=t.releases||[];a.find((function(e){return"live"===e.environment}))&&(this.environment="live"),a.forEach((function(t){if("preview"!==t.environment){e.environment||(e.environment=t.environment);var n=Qg(t.environment);t.environment in e.environmentNameMap&&(n=e.environmentNameMap[t.environment]),e.environments.push({key:t.environment,value:n})}})),this.environments.length||(this.noReleaseFound=!0,this.environments.push({key:"",value:this.translate("TagManager_NoReleasesFound")})),this.$emit("fetchInstallInstructions"),this.fetchVariables(n)}},linkTo:function(e,t,n,a){var r=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n})),i="".concat(window.location.pathname,"?").concat(r);return a&&(i+="#?".concat(u["MatomoUrl"].stringify(a))),i},fetchVariables:function(e){var t,n=this;this.matomoConfigs=[],this.idContainer&&null!==(t=this.site)&&void 0!==t&&t.id&&e&&u["AjaxHelper"].fetch({method:"TagManager.getContainerVariables",filter_limit:"-1",idContainer:this.idContainer,idContainerVersion:e,idSite:this.site.id}).then((function(e){n.matomoConfigs=e.filter((function(e){return"MatomoConfiguration"===e.type}))})).finally((function(){n.isLoading=!1}))}},computed:{getLearnMoreLink:function(){return Object(u["translate"])("TagManager_CustomHtmlTagHelpText",'',"")},getMtmStep2:function(){var e=this.site&&this.site.id?this.site.id:"",t=this.linkTo("dashboard",e,this.idContainer,[]);return Object(u["translate"])("TagManager_SiteWithoutDataMtmStep2",''),"")},getMtmStep3:function(){return Object(u["translate"])("TagManager_SiteWithoutDataMtmStep3","</head>",'',"")},getCongratulationsText:function(){return Object(u["translate"])("TagManager_SiteWithoutDataReactFollowStepCompleted","","")},testComponent:function(){return this.showTestSection?Object(u["useExternalPluginComponent"])("JsTrackerInstallCheck","JsTrackerInstallCheck"):""}}});Zg.render=Yg;var eb=Zg,tb=Object(i["defineComponent"])({props:{showContainerRow:Boolean,showTestSection:Boolean},components:{TrackingCodeCommon:eb},data:function(){return{setupStep1:""}},methods:{fetchInstallInstructions:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;a.installInstructions=[],this.updateStep1Text(),null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id&&null!==a&&void 0!==a&&a.environment&&(a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id}).then((function(e){a.installInstructions=e,Object(i["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1})))},linkTo:function(e,t,n,a){var r=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n}));return a&&(r+="#?".concat(u["MatomoUrl"].stringify(a))),"?".concat(r)},updateStep1Text:function(){var e,t=this.$refs.trackingCodeCommon;if(null!==t&&void 0!==t&&null!==(e=t.site)&&void 0!==e&&e.id){var n=null!==t&&void 0!==t&&t.idContainer?t.idContainer:"",a=this.linkTo("manageContainers",t.site.id,n);this.setupStep1=Object(u["translate"])("TagManager_SPAFollowStep1","
","",''),"")}}},mounted:function(){this.updateStep1Text()}});tb.render=Eg;var nb=tb,ab={key:0},rb=["innerHTML"],ib=Object(i["createElementVNode"])("br",null,null,-1),ob=["innerHTML"],lb=Object(i["createElementVNode"])("br",null,null,-1);function cb(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("TagmanagerTrackingCode"),c=Object(i["resolveComponent"])("ContentBlock");return"siteWithoutDataTabs"===e.currentAction?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ab,[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.siteWithoutDataMtmIntro)},null,8,rb),ib,Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataCloudflareFollowStepsIntro")),1)]),Object(i["createVNode"])(l,{"show-container-row":e.showContainerRow,"current-action":e.currentAction,showTestSection:e.isJsTrackerInstallCheckAvailable},null,8,["show-container-row","current-action","showTestSection"])])):(Object(i["openBlock"])(),Object(i["createBlock"])(c,{key:1,anchor:"tagmanager","content-title":e.translate("TagManager_MatomoTagManager")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.siteWithoutDataMtmIntro)},null,8,ob),lb,Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataCloudflareFollowStepsIntro")),1)]),Object(i["createVNode"])(l,{"show-container-row":e.showContainerRow,"current-action":e.currentAction,showTestSection:!1},null,8,["show-container-row","current-action"])]})),_:1},8,["content-title"]))}var sb=Object(i["defineComponent"])({props:{currentAction:String,showContainerRow:Boolean,isJsTrackerInstallCheckAvailable:Boolean},components:{ContentBlock:u["ContentBlock"],TagmanagerTrackingCode:nb},computed:{trackingInfoTextLine1:function(){var e="?".concat(u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:"manageContainers"})));return Object(u["translate"])("TagManager_MatomoTagManagerTrackingInfoLine1",''),"")},trackingInfoTextLine2:function(){var e="?".concat(u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:"gettingStarted"})));return Object(u["translate"])("TagManager_MatomoTagManagerTrackingInfoLine2",''),"")},siteWithoutDataMtmIntro:function(){var e="?".concat(u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:"gettingStarted"})));return Object(u["translate"])("TagManager_SiteWithoutDataMtmIntro",''),"")}}});sb.render=cb;var db=sb,ub={class:"list-style-decimal"},gb=["innerHTML"],bb=["innerHTML"],mb=["innerHTML"],pb=["textContent"],hb=["innerHTML"],fb=["textContent"],vb=["innerHTML"],jb=["innerHTML"],Ob=["innerHTML"],Tb=["textContent"],Vb={style:{"list-style":"lower-alpha","list-style-position":"inside","text-indent":"1.2rem"}},yb=["innerHTML"],Cb=["innerHTML"],Nb=["innerHTML"],Eb=["textContent"],Sb=["textContent"],kb=["innerHTML"],wb=["textContent"],Mb=["innerHTML"],_b=["innerHTML"],Db=["textContent"];function xb(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("TrackingCodeCommon"),c=Object(i["resolveDirective"])("select-on-focus");return Object(i["openBlock"])(),Object(i["createElementBlock"])("ol",ub,[e.showContainerRow?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{key:0,innerHTML:e.$sanitize(e.setupStep1)},null,8,gb)):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(l,{"show-container-row":e.showContainerRow,"current-action":e.currentAction,showBottom:!1,showDescription:!1,onFetchInstallInstructions:e.fetchInstallInstructionsSPA,ref:"trackingCodeCommon"},null,8,["show-container-row","current-action","onFetchInstallInstructions"]),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep2)},null,8,bb),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep3)},null,8,mb),Object(i["createElementVNode"])("li",{textContent:Object(i["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,pb),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep5)},null,8,hb),Object(i["createElementVNode"])("li",{textContent:Object(i["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,fb),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep7)},null,8,vb),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep8)},null,8,jb),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep9)},null,8,Ob),Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("span",{textContent:Object(i["toDisplayString"])(e.fetchFollowStep10)},null,8,Tb),Object(i["createElementVNode"])("ol",Vb,[Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10a)},null,8,yb),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10b)},null,8,Cb)])]),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep11)},null,8,Nb),Object(i["createElementVNode"])("li",{textContent:Object(i["toDisplayString"])(e.fetchClickX("General_Update"))},null,8,Eb),Object(i["createElementVNode"])("li",{textContent:Object(i["toDisplayString"])(e.fetchFollowStep13)},null,8,Sb),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep14)},null,8,kb),Object(i["createElementVNode"])("li",{textContent:Object(i["toDisplayString"])(e.fetchFollowStep15)},null,8,wb),"react"===e.jsFramework?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{key:1,innerHTML:e.$sanitize(e.fetchFollowStep16React)},null,8,Mb)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{key:2,innerHTML:e.$sanitize(e.fetchFollowStep16SPA)},null,8,_b)),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.installInstructions,(function(e,t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:t},[Object(i["withDirectives"])(Object(i["createElementVNode"])("pre",{class:"codeblock",textContent:Object(i["toDisplayString"])(e.embedCode),ref:"codeblock"},null,8,Db),[[c,{}]])])})),128))])}var Ab=Object(i["defineComponent"])({props:{showContainerRow:Boolean,currentAction:String,jsFramework:String},components:{TrackingCodeCommon:eb},directives:{SelectOnFocus:u["SelectOnFocus"]},data:function(){return{setupStep1:"",setupStep2:"",setupStep7:"",installInstructions:[]}},methods:{fetchInstallInstructionsSPA:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;if(this.installInstructions=[],null!==a&&void 0!==a&&a.idContainer&&null!==a&&void 0!==a&&a.environment&&null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id){var r=this.linkTo("manageContainers",a.site.id,a.idContainer);this.setupStep1=Object(u["translate"])("TagManager_SPAFollowStep1","
","",''),"");var o=this.linkTo("manageTriggers",a.site.id,a.idContainer);this.setupStep2=Object(u["translate"])("TagManager_SPAFollowStep2",''),"");var l=this.linkTo("manageTags",a.site.id,a.idContainer);this.setupStep7=Object(u["translate"])("TagManager_SPAFollowStep7",''),""),a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id,jsFramework:this.jsFramework}).then((function(e){n.installInstructions=e,Object(i["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1}))}},linkTo:function(e,t,n,a){var r=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n}));return a&&(r+="#?".concat(u["MatomoUrl"].stringify(a))),"?".concat(r)},fetchClickX:function(e){return Object(u["translate"])("General_ClickX",Object(u["translate"])(e))}},computed:{fetchFollowStep3:function(){return Object(u["translate"])("TagManager_SPAFollowStep3","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),'',"")},fetchFollowStep5:function(){return Object(u["translate"])("TagManager_SPAFollowStep5","".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),Object(u["translate"])("TagManager_CategoryUserEngagement"))},fetchFollowStep8:function(){return Object(u["translate"])("TagManager_SPAFollowStep8","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),"".concat(Object(u["translate"])("TagManager_MatomoTagName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),'',"")},fetchFollowStep9:function(){return Object(u["translate"])("TagManager_SPAFollowStep9",Object(u["translate"])("TagManager_ConfigureWhatTagDoes"),Object(u["translate"])("TagManager_CustomTitle"),"","")},fetchFollowStep10:function(){return Object(u["translate"])("TagManager_SPAFollowStep10",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10a:function(){return Object(u["translate"])("TagManager_SPAFollowStep10a","","",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10b:function(){return Object(u["translate"])("TagManager_SPAFollowStep10b",Object(u["translate"])("TagManager_CustomUrl"),"","")},fetchFollowStep11:function(){return Object(u["translate"])("TagManager_SPAFollowStep11",Object(u["translate"])("TagManager_ConfigureWhenTagDoes"),Object(u["translate"])("TagManager_FireTriggerTitle"),"".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),"".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""))},fetchFollowStep13:function(){return Object(u["translate"])("TagManager_SPAFollowStep13",Object(u["translate"])("TagManager_Publish"))},fetchFollowStep14:function(){return Object(u["translate"])("TagManager_SPAFollowStep14",Object(u["translate"])("TagManager_VersionName"),"","")},fetchFollowStep15:function(){return Object(u["translate"])("TagManager_SPAFollowStep15",Object(u["translate"])("TagManager_CreateVersionAndPublishRelease"))},fetchFollowStep16SPA:function(){return Object(u["translate"])("TagManager_SPAFollowStep16","</head>",'',"")},fetchFollowStep16React:function(){return Object(u["translate"])("TagManager_ReactFollowStep16","","","App.js","React.useEffect","Hello World","React.js")}}});Ab.render=xb;var Bb,Lb,Ub=Ab,Ib={class:"nav-wrapper"},Pb={class:"pull-right"},Hb=Object(i["createElementVNode"])("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"},version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Object(i["createElementVNode"])("defs",null,[Object(i["createElementVNode"])("symbol",{id:"tm-icon-checkmark",viewBox:"0 0 32 32"},[Object(i["createElementVNode"])("path",{d:"M27 4l-15 15-7-7-5 5 12 12 20-20z"})])])],-1),Fb={class:"page",style:{clear:"both"}},Gb={key:0,id:"secondNavBar",class:"Menu--dashboard z-depth-1"},$b={class:"navbar",role:"menu",style:{padding:"0"}},Rb={class:"menuTab",role:"menuitem"},zb={class:"item",style:{"font-weight":"normal"}},Wb=Object(i["createTextVNode"])(" Events "),qb={key:0},Xb=Object(i["createElementVNode"])("br",null,null,-1),Kb=Object(i["createElementVNode"])("br",null,null,-1),Jb=Object(i["createElementVNode"])("label",{for:"onlyfiredTags",class:"lbl-onlyfiredTags"},"Only fired tags",-1),Yb={key:0,style:{padding:"0 0 1rem 1.2rem"}},Qb=["onClick","title"],Zb={title:"This tag was fired"},em=Object(i["createElementVNode"])("svg",{class:"tm-icon tm-icon-checkmark"},[Object(i["createElementVNode"])("use",{"xlink:href":"#tm-icon-checkmark"})],-1),tm=[em],nm={class:"pageWrap"},am={class:"home",id:"content"},rm=Object(i["createElementVNode"])("h3",null,"Fired Tags",-1),im={class:"entityTable"},om=Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",null,"Action"),Object(i["createElementVNode"])("th",null,"Name"),Object(i["createElementVNode"])("th",null,"Type"),Object(i["createElementVNode"])("th",null,"Fired count")])],-1),lm={key:0},cm=Object(i["createElementVNode"])("td",{colspan:"4"},"No tags",-1),sm=[cm],dm=Object(i["createElementVNode"])("h3",{style:{"margin-top":"30px"}},"Not Yet Fired Tags",-1),um={class:"entityTable"},gm=Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",null,"Name"),Object(i["createElementVNode"])("th",null,"Type")])],-1),bm=Object(i["createElementVNode"])("td",{colspan:"4"},"No tags",-1),mm=[bm],pm=Object(i["createElementVNode"])("h3",null,"Triggers",-1),hm={class:"entityTable"},fm=Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",null,"Name"),Object(i["createElementVNode"])("th",null,"Type")])],-1),vm={key:0},jm=Object(i["createElementVNode"])("td",{colspan:"4"},"No trigger",-1),Om=[jm],Tm={key:1},Vm=Object(i["createElementVNode"])("h3",null,"Pushed data by this event",-1),ym={class:"entityTable"},Cm={style:{"word-break":"break-all"}},Nm=Object(i["createElementVNode"])("br",null,null,-1),Em=Object(i["createElementVNode"])("h3",null,"Content after this event",-1),Sm={class:"entityTable"},km={style:{"word-break":"break-all"}},wm={class:"entityTable"},Mm=Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",null,"Name"),Object(i["createElementVNode"])("th",null,"Type"),Object(i["createElementVNode"])("th",null,"Value")])],-1),_m={key:0},Dm=Object(i["createElementVNode"])("td",{colspan:"3"},"No variables",-1),xm=[Dm],Am={style:{"word-break":"break-all"}},Bm={class:"entityTable"},Lm=Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",null,"Time"),Object(i["createElementVNode"])("th",null,"Message")])],-1),Um={style:{"word-break":"break-all"}},Im=Object(i["createElementVNode"])("br",null,null,-1);function Pm(e,t,n,a,r,o){var l,c,s,d,u,g,b,m,p,h;return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("nav",null,[Object(i["createElementVNode"])("div",Ib,[Object(i["createElementVNode"])("ul",null,[Object(i["createElementVNode"])("li",null,[Object(i["renderSlot"])(e.$slots,"logo")]),Object(i["createElementVNode"])("li",{class:Object(i["normalizeClass"])({active:"tags"===e.contentTab||!e.contentTab})},[Object(i["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(t){return e.contentTab="tags"})},"Tags")],2),Object(i["createElementVNode"])("li",{class:Object(i["normalizeClass"])({active:"triggers"===e.contentTab})},[Object(i["createElementVNode"])("a",{onClick:t[1]||(t[1]=function(t){return e.contentTab="triggers"})},"Triggers")],2),Object(i["createElementVNode"])("li",{class:Object(i["normalizeClass"])({active:"variables"===e.contentTab})},[Object(i["createElementVNode"])("a",{onClick:t[2]||(t[2]=function(t){return e.contentTab="variables"})},"Variables")],2),Object(i["createElementVNode"])("li",{class:Object(i["normalizeClass"])({active:"dataLayer"===e.contentTab})},[Object(i["createElementVNode"])("a",{onClick:t[3]||(t[3]=function(t){return e.contentTab="dataLayer"})},"Data Layer")],2),Object(i["createElementVNode"])("li",{class:Object(i["normalizeClass"])({active:"logs"===e.contentTab})},[Object(i["createElementVNode"])("a",{onClick:t[4]||(t[4]=function(t){return e.contentTab="logs"})},"Logs")],2),Object(i["createElementVNode"])("li",Pb,[Object(i["createElementVNode"])("a",{id:"mtmUpdateDebugPosition",onClick:t[5]||(t[5]=function(t){return e.mtmUpdateDebugPosition()})},Object(i["toDisplayString"])(e.positionText),1)])])])]),Hb,Object(i["createElementVNode"])("div",Fb,["logs"!==e.contentTab?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Gb,[Object(i["createElementVNode"])("ul",$b,[Object(i["createElementVNode"])("li",Rb,[Object(i["createElementVNode"])("span",zb,[Wb,e.mtmEvents.length>0?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",qb,[Xb,Kb,Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"checkbox",class:"onlyFiredTags-chk",name:"onlyfiredTags",id:"onlyfiredTags",value:"1","onUpdate:modelValue":t[6]||(t[6]=function(t){return e.onlyfiredTags=t}),style:{"margin-right":"3.5px"}},null,512),[[i["vModelCheckbox"],e.onlyfiredTags]]),Jb])):Object(i["createCommentVNode"])("",!0)])]),0===e.mtmEvents.length?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",Yb,"No event executed")):Object(i["createCommentVNode"])("",!0),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.mtmEventsReversed,(function(t,n){var a,r;return Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{class:Object(i["normalizeClass"])(["menuTab",{active:n===e.selectedEventIndex}]),role:"menuitem",key:n},[(t.tags||[]).length||!e.onlyfiredTags?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,class:"item",onClick:function(n){return e.selectEvent(t.index0)},title:"Time: ".concat(t.time,". Trigger: ").concat(null===(a=t.metTrigger)||void 0===a?void 0:a.name)},[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.index)+": "+Object(i["toDisplayString"])(t.name)+" ",1),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",Zb,tm,512),[[i["vShow"],null===(r=t.tags)||void 0===r?void 0:r.length]])],8,Qb)):Object(i["createCommentVNode"])("",!0)],2)})),128))])])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",nm,[Object(i["createElementVNode"])("div",am,[Object(i["withDirectives"])(Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.homeTabTitle),513),[[i["vShow"],"logs"!==e.contentTab]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[rm,Object(i["createElementVNode"])("table",im,[om,Object(i["createElementVNode"])("tbody",null,[null!==(l=e.selectedEvent)&&void 0!==l&&null!==(c=l.tags)&&void 0!==c&&c.length?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",lm,sm)),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])((null===(s=e.selectedEvent)||void 0===s?void 0:s.tags)||[],(function(e,t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:t},[Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.action),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.name),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.type),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.numExecuted),1)])})),128))])]),dm,Object(i["createElementVNode"])("table",um,[gm,Object(i["createElementVNode"])("tbody",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("tr",null,mm,512),[[i["vShow"],0===e.notFiredTags.length]]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.notFiredTags,(function(e,t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:t},[Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.name),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.type),1)])})),128))])])],512),[[i["vShow"],"tags"===e.contentTab||!e.contentTab]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[pm,Object(i["createElementVNode"])("table",hm,[fm,Object(i["createElementVNode"])("tbody",null,[null!==(d=e.selectedEvent)&&void 0!==d&&d.metTrigger?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",vm,Om)),null!==(u=e.selectedEvent)&&void 0!==u&&u.metTrigger?(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",Tm,[Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.selectedEvent.metTrigger.name),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.selectedEvent.metTrigger.type),1)])):Object(i["createCommentVNode"])("",!0)])])],512),[[i["vShow"],"triggers"===e.contentTab]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Vm,Object(i["createElementVNode"])("table",ym,[Object(i["createElementVNode"])("tbody",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",Cm,Object(i["toDisplayString"])(e.selectedEventData),1)])])]),Nm,Em,Object(i["createElementVNode"])("table",Sm,[Object(i["createElementVNode"])("tbody",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",km,Object(i["toDisplayString"])(e.selectedEventContainerDataLayer),1)])])])],512),[[i["vShow"],"dataLayer"===e.contentTab]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("table",wm,[Mm,Object(i["createElementVNode"])("tbody",null,[null!==(g=e.selectedEvent)&&void 0!==g&&null!==(b=g.container)&&void 0!==b&&null!==(m=b.variables)&&void 0!==m&&m.length?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",_m,xm)),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])((null===(p=e.selectedEvent)||void 0===p||null===(h=p.container)||void 0===h?void 0:h.variables)||[],(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:n},[Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.name),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.type),1),Object(i["createElementVNode"])("td",Am,Object(i["toDisplayString"])(e.stringifySelectedVariable(t)),1)])})),128))])])],512),[[i["vShow"],"variables"===e.contentTab]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("table",Bm,[Lm,Object(i["createElementVNode"])("tbody",null,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.mtmLogs,(function(e,t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:t},[Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.time),1),Object(i["createElementVNode"])("td",Um,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.messages,(function(e,t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:t},[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e),1),Im])})),128))])])})),128))])])],512),[[i["vShow"],"logs"===e.contentTab]])])])])])}function Hm(e){return Rm(e)||$m(e)||Gm(e)||Fm()}function Fm(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Gm(e,t){if(e){if("string"===typeof e)return zm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zm(e,t):void 0}}function $m(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Rm(e){if(Array.isArray(e))return zm(e)}function zm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt||n.push.apply(n,Hm(e.tags.map((function(e){return e.name}))))}));var a=[];return this.selectedEvent.container.tags.forEach((function(e){-1===n.indexOf(e.name)&&a.push(e)})),a},selectedEvent:function(){return this.mtmEvents[this.selectedEventIndex]},mtmEvents:function(){return window.mtmDbgData.mtmEvents},mtmEventsReversed:function(){var e=Hm(this.mtmEvents);return e.reverse(),e},mtmLogs:function(){return window.mtmDbgData.mtmLogs},selectedEventData:function(){var e;return(null===(e=this.selectedEvent)||void 0===e?void 0:e.eventData)&&JSON.stringify(this.selectedEvent.eventData,Jm())},selectedEventContainerDataLayer:function(){var e,t;return(null===(e=this.selectedEvent)||void 0===e||null===(t=e.container)||void 0===t?void 0:t.dataLayer)&&JSON.stringify(this.selectedEvent.container.dataLayer,Jm())}}});Ym.render=Pm;var Qm=Ym,Zm={class:"tagManagerGettingStarted"},ep=Object(i["createElementVNode"])("br",null,null,-1),tp=Object(i["createElementVNode"])("br",null,null,-1),np=Object(i["createElementVNode"])("br",null,null,-1),ap=Object(i["createElementVNode"])("br",null,null,-1),rp=Object(i["createElementVNode"])("br",null,null,-1),ip=["innerHTML"],op=Object(i["createElementVNode"])("br",null,null,-1),lp=Object(i["createElementVNode"])("br",null,null,-1),cp=Object(i["createElementVNode"])("br",null,null,-1),sp=Object(i["createElementVNode"])("br",null,null,-1),dp=["innerHTML"];function up(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("ContentBlock");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Zm,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStarted")),1),Object(i["createVNode"])(l,{"content-title":e.translate("CorePluginsAdmin_WhatIsTagManager")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedWhatIsIntro")),1),Object(i["createElementVNode"])("ul",null,[Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedAnalyticsTracking")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedConversionTracking")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedNewsletterSignups")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedExitActions")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedRemarketing")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedSocialWidgets")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedAffiliates")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedAds")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedAndMore")),1)]),Object(i["createElementVNode"])("p",null,[ep,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedMainComponents")),1)]),Object(i["createElementVNode"])("ul",null,[Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedTagComponent")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedTriggerComponent")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedVariableComponent")),1)])]})),_:1},8,["content-title"]),Object(i["createVNode"])(l,{"content-title":e.translate("TagManager_GettingStartedWhyDoINeed")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedWhyMakesLifeEasier"))+" ",1),tp,np,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedWhyThirdPartySnippets"))+" ",1),ap,rp,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedWhyAccuracyPerformance")),1)])]})),_:1},8,["content-title"]),e.canEdit?(Object(i["openBlock"])(),Object(i["createBlock"])(l,{key:0,"content-title":e.translate("TagManager_GettingStartedHowDoI")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.gettingStartedHowCreateContainerText)},null,8,ip),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedHowCopyCode"))+" ",1),op,lp,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedHowAddTagsToContainer")),1)])]})),_:1},8,["content-title"])):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(l,{"content-title":e.translate("TagManager_GettingStartedWhatIfUnsupported")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedCustomTags"))+" ",1),cp,sp,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.gettingStartedContributeTagsText)},null,8,dp)])]})),_:1},8,["content-title"])])}var gp=Object(i["defineComponent"])({props:{canEdit:Boolean},components:{ContentBlock:u["ContentBlock"]},computed:{gettingStartedHowCreateContainerText:function(){var e="?".concat(u["MatomoUrl"].stringify({module:"TagManager",action:"manageContainers"}),"}");return Object(u["translate"])("TagManager_GettingStartedHowCreateContainer",''),"")},gettingStartedContributeTagsText:function(){var e="https://developer.matomo.org/guides/tagmanager/settingup";return Object(u["translate"])("TagManager_GettingStartedContributeTags",''),"")}}});gp.render=up;var bp=gp; + */var $s=function(){function e(){var t=this;Ps(this,e),Gs(this,"privateState",Object(i["reactive"])({containers:[],isLoadingContainers:!1,isLoadingSingle:!1,isUpdating:!1})),Gs(this,"state",Object(i["computed"])((function(){return Object(i["readonly"])(t.privateState)}))),Gs(this,"isLoading",Object(i["computed"])((function(){var e=t.state.value;return e.isLoadingContainers||e.isLoadingSingle}))),Gs(this,"isUpdating",Object(i["computed"])((function(){return t.state.value.isUpdating}))),Gs(this,"containers",Object(i["computed"])((function(){return t.state.value.containers}))),Gs(this,"fetchPromise",null)}return Fs(e,[{key:"reload",value:function(){return this.privateState.containers=[],this.fetchPromise=null,this.fetchContainers()}},{key:"fetchContainers",value:function(){var e=this;return this.privateState.isLoadingContainers=!0,this.privateState.containers=[],this.fetchPromise||(this.fetchPromise=u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1"})),Promise.resolve(this.fetchPromise).then((function(t){return e.privateState.containers=t,e.privateState.isLoadingContainers=!1,e.containers.value})).finally((function(){e.privateState.isLoadingContainers=!1}))}},{key:"findContainer",value:function(e){var t=this,n=this.containers.value.find((function(t){return t.idcontainer===e}));return n?Promise.resolve(n):(this.privateState.isLoadingSingle=!0,u["AjaxHelper"].fetch({idContainer:e,method:"TagManager.getContainer",filter_limit:"-1"}).then((function(e){return t.privateState.containers=[].concat(xs(t.privateState.containers),[e]),Object(i["readonly"])(e)})).finally((function(){t.privateState.isLoadingSingle=!1})))}},{key:"deleteContainer",value:function(e){var t=this;return this.privateState.isUpdating=!0,this.privateState.containers=[],u["AjaxHelper"].fetch({idContainer:e,method:"TagManager.deleteContainer"},{withTokenInUrl:!0}).finally((function(){t.privateState.isUpdating=!1}))}},{key:"createOrUpdateContainer",value:function(e,t){var n=this;return this.privateState.isUpdating=!0,u["AjaxHelper"].post({method:t,idContainer:e.idcontainer},{name:e.name,description:e.description,context:e.context},{withTokenInUrl:!0}).finally((function(){n.privateState.isUpdating=!1}))}}]),e}(),Rs=new $s,zs="containertagmanagement",Ws=Object(i["defineComponent"])({props:{idContainer:String},components:{ContentBlock:u["ContentBlock"],Field:g["Field"],SaveButton:g["SaveButton"]},data:function(){return{isDirty:!1,editTitle:"",isUpdatingVersion:!1,container:{}}},created:function(){Ds.init(),yt.init(),this.initIdContainer()},watch:{idContainer:function(e){null!==e&&this.initIdContainer()}},methods:{removeAnyContainerNotification:function(){u["NotificationsStore"].remove(zs),u["NotificationsStore"].remove("ajaxHelper")},showNotification:function(e,t){var n=u["NotificationsStore"].show({message:e,context:t,id:zs,type:"transient"});setTimeout((function(){u["NotificationsStore"].scrollToNotification(n)}),200)},showErrorFieldNotProvidedNotification:function(e){var t=Object(u["translate"])("TagManager_ErrorXNotProvided",[e]);this.showNotification(t,"error")},initIdContainer:function(){var e=this;this.container={},u["Matomo"].helper.lazyScrollToContent(),this.edit&&this.idContainer?(this.editTitle=Object(u["translate"])("TagManager_EditContainer"),Rs.findContainer(this.idContainer).then((function(t){t&&(e.container=Object(u["clone"])(t),e.isDirty=!1)}))):this.create&&(this.editTitle=Object(u["translate"])("TagManager_CreateNewContainer"),this.container={idSite:u["Matomo"].idSite,name:"",context:"web",description:""},this.isDirty=!1)},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idContainer,u["MatomoUrl"].updateHash(e)},createContainer:function(){var e=this;this.removeAnyContainerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingVersion=!0,Rs.createOrUpdateContainer(this.container,"TagManager.addContainer").then((function(t){if(e.isUpdatingVersion=!1,t){e.isDirty=!1;var n=t.value;e.showNotification(Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Container")),"success"),u["MatomoUrl"].updateUrl(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:"dashboard",idContainer:n}))}})).finally((function(){e.isUpdatingVersion=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateContainer:function(){var e=this;this.removeAnyContainerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdating=!0,Rs.createOrUpdateContainer(this.container,"TagManager.updateContainer").then((function(t){t&&(e.isDirty=!1,e.container={},Rs.reload().then((function(){e.initIdContainer()})),e.showNotification(Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Container")),"success"))})))},checkRequiredFieldsAreSet:function(){if(!this.container.name){var e=Object(u["translate"])("General_Name");return this.showErrorFieldNotProvidedNotification(e),!1}return!0}},computed:{contexts:function(){return Ds.contextsOptions.value},create:function(){return"0"===this.idContainer},edit:function(){return!this.create},isLoading:function(){return ft.isLoading.value||yt.isLoading.value},isUpdating:function(){return ft.isUpdating.value||this.isUpdatingVersion}}});Ws.render=Es;var qs=Ws,Xs={class:"tagManagerManageList tagManagerContainerList"},Ks={class:"index"},Js={class:"name"},Ys={class:"description"},Qs={class:"created"},Zs={class:"action"},ed={colspan:"5"},td={class:"loadingPiwik"},nd=Object(i["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),ad={colspan:"5"},rd=["id"],id=["title"],od={class:"name"},ld=["title"],cd={class:"created"},sd={class:"action"},dd=["href","title"],ud=["onClick","title"],gd=["onClick","title"],bd=["onClick","title"],md={class:"tableActionBar"},pd=Object(i["createElementVNode"])("span",{class:"icon-add"}," ",-1),hd={class:"ui-confirm",id:"confirmDeleteContainer",ref:"confirmDeleteContainer"},fd=["value"],vd=["value"];function jd(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("ContentBlock"),c=Object(i["resolveDirective"])("content-table");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Xs,[Object(i["createVNode"])(l,{feature:"Tag Manager","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Containers"))},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("TagManager_ContainerUsageBenefits")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("table",null,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",Ks,Object(i["toDisplayString"])(e.translate("General_Id")),1),Object(i["createElementVNode"])("th",Js,Object(i["toDisplayString"])(e.translate("General_Name")),1),Object(i["createElementVNode"])("th",Ys,Object(i["toDisplayString"])(e.translate("General_Description")),1),Object(i["createElementVNode"])("th",Qs,Object(i["toDisplayString"])(e.translate("TagManager_CreatedDate")),1),Object(i["createElementVNode"])("th",Zs,Object(i["toDisplayString"])(e.translate("General_Actions")),1)])]),Object(i["createElementVNode"])("tbody",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",ed,[Object(i["createElementVNode"])("span",td,[nd,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[i["vShow"],e.isLoading||e.isUpdating]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",ad,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_NoContainersFound"))+" ",1),Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{class:"createContainerNow",onClick:t[0]||(t[0]=function(t){return e.createContainer()})},Object(i["toDisplayString"])(e.translate("TagManager_CreateNewContainerNow")),513),[[i["vShow"],e.hasWriteAccess]])])],512),[[i["vShow"],!e.isLoading&&0===e.containers.length]]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sortedContainers,(function(t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{id:"container".concat(t.idcontainer),class:"containers",key:t.idcontainer},[Object(i["createElementVNode"])("td",{class:"index",title:"".concat(e.translate("TagManager_Context"),": ")+e.contexts[t.context]},Object(i["toDisplayString"])(t.idcontainer),9,id),Object(i["createElementVNode"])("td",od,Object(i["toDisplayString"])(t.name),1),Object(i["createElementVNode"])("td",{class:"description",title:t.description},Object(i["toDisplayString"])(e.truncateText(t.description,50)),9,ld),Object(i["createElementVNode"])("td",cd,[Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(t.created_date_pretty),1)]),Object(i["createElementVNode"])("td",sd,[Object(i["createElementVNode"])("a",{class:"table-action icon-configure",href:"?module=TagManager&action="+e.containerDefaultAction+"&idContainer="+t.idcontainer+"&idSite="+t.idsite+"&period=day&date=yesterday",title:e.translate("TagManager_ConfigureX",e.translate("TagManager_Container"))},null,8,dd),Object(i["createElementVNode"])("a",{class:"table-action installCode icon-embed",onClick:function(n){return e.installCode(t.idcontainer)},title:e.translate("TagManager_InstallCode")},null,8,ud),Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editContainer(t.idcontainer)},title:e.translate("TagManager_EditX",e.translate("TagManager_Container"))},null,8,gd),[[i["vShow"],e.hasWriteAccess]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteContainer(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Container"))},null,8,bd),[[i["vShow"],e.hasWriteAccess]])])],8,rd)})),128))])],512),[[c]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",md,[Object(i["createElementVNode"])("a",{class:"createNewContainer",value:"",onClick:t[1]||(t[1]=function(t){return e.createContainer()})},[pd,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_CreateNewContainer")),1)])],512),[[i["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title"]),Object(i["createElementVNode"])("div",hd,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("TagManager_DeleteContainerConfirm")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,fd),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,vd)],512)])}function Od(e){return Cd(e)||yd(e)||Vd(e)||Td()}function Td(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Vd(e,t){if(e){if("string"===typeof e)return Nd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nd(e,t):void 0}}function yd(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Cd(e){if(Array.isArray(e))return Nd(e)}function Nd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.created_date?-1:0})),e}},methods:{createContainer:function(){this.editContainer("0")},editContainer:function(e){u["MatomoUrl"].updateHash(Object.assign(Object.assign({},u["MatomoUrl"].hashParsed.value),{},{idContainer:e}))},installCode:function(e){Sd.showInstallCode(e)},deleteContainer:function(e){function t(){Rs.deleteContainer(e.idcontainer).then((function(){Rs.reload()}))}u["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteContainer,{yes:t})},truncateText:function(e,t){return e.length>t?"".concat(e.substr(0,t-3),"..."):e}}});kd.render=jd;var wd=kd,Md={class:"manageContainer"};function _d(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("ContainerList"),c=Object(i["resolveComponent"])("ContainerEdit");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Md,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(l)],512),[[i["vShow"],!e.editMode]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(c,{"id-container":e.idContainer},null,8,["id-container"])],512),[[i["vShow"],e.editMode]])])}var Dd=Object(i["defineComponent"])({props:{},components:{ContainerList:wd,ContainerEdit:qs},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(i["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idContainer}),(function(t){e.onIdContainerParamChange(t)})),u["NotificationsStore"].remove("containertagmanagement"),this.onIdContainerParamChange(u["MatomoUrl"].hashParsed.value.idContainer)},computed:{idContainer:function(){var e=u["MatomoUrl"].hashParsed.value.idContainer;return this.isAddAllowed||""!==e?e:null},editMode:function(){return!!this.idContainer}},methods:{onIdContainerParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddVersion",t),this.isAddAllowed=!!t.isAllowed}}}});Dd.render=_d;var xd=Dd,Ad={class:"containerDashboard"},Bd={key:0},Ld={class:"dashboardCreationDate"},Ud={key:0},Id=Object(i["createElementVNode"])("br",null,null,-1),Pd={class:"row",style:{"margin-left":"-0.75rem"}},Hd={class:"col m6 s12"},Fd={key:0},Gd=["href","title"],$d={key:0},Rd=Object(i["createElementVNode"])("hr",null,null,-1),zd=["href"],Wd=Object(i["createElementVNode"])("span",{class:"icon-edit"}," ",-1),qd=["href"],Xd=Object(i["createElementVNode"])("span",{class:"icon-add"}," ",-1),Kd={class:"col m6 s12"},Jd={key:0},Yd=["href","title"],Qd=Object(i["createElementVNode"])("hr",null,null,-1),Zd=["href"],eu=Object(i["createElementVNode"])("span",{class:"icon-edit"}," ",-1),tu=["href"],nu=Object(i["createElementVNode"])("span",{class:"icon-add"}," ",-1),au={class:"row",style:{"margin-left":"-0.75rem"}},ru={class:"col m6 s12"},iu=["href","title"],ou={key:0},lu=Object(i["createElementVNode"])("hr",null,null,-1),cu=["href"],su=Object(i["createElementVNode"])("span",{class:"icon-edit"}," ",-1),du=["href"],uu=Object(i["createElementVNode"])("span",{class:"icon-add"}," ",-1),gu={class:"col m6 s12"},bu=["title","href"],mu={key:0},pu=Object(i["createElementVNode"])("br",null,null,-1),hu=["title"],fu={key:0},vu=Object(i["createElementVNode"])("hr",null,null,-1),ju=["href"],Ou=Object(i["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Tu=["href"],Vu=Object(i["createElementVNode"])("span",{class:"icon-add"}," ",-1);function yu(e,t,n,a,r,o){var l,c,s=Object(i["resolveComponent"])("ActivityIndicator"),d=Object(i["resolveComponent"])("EnrichedHeadline"),u=Object(i["resolveComponent"])("ContentBlock"),g=Object(i["resolveDirective"])("content-intro");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ad,[Object(i["createVNode"])(s,{loading:e.isLoading},null,8,["loading"]),e.isLoading?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Bd,[Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h2",null,[Object(i["createVNode"])(d,{"feature-name":"Tag Manager","inline-help":e.dashboardHelpText},{default:Object(i["withCtx"])((function(){var t;return[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_ContainerX",null===(t=e.container)||void 0===t?void 0:t.name)),1)]})),_:1},8,["inline-help"])]),Object(i["createElementVNode"])("p",Ld,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.containerMetaInformation)+" ",1),null!==(l=e.containerVersion)&&void 0!==l&&l.description?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Ud,[Id,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_Description"))+": "+Object(i["toDisplayString"])(null===(c=e.containerVersion)||void 0===c?void 0:c.description),1)])):Object(i["createCommentVNode"])("",!0)])],512),[[g]]),Object(i["createElementVNode"])("div",Pd,[Object(i["createElementVNode"])("div",Hd,[Object(i["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.tagCount," ").concat(e.translate("TagManager_Tags")),"help-text":e.tagsHelpText},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,[e.tagCount?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Fd,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sortedContainerVersionTags,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:n},[Object(i["createElementVNode"])("a",{href:e.linkTo("manageTags",{idTag:t.idtag}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(i["toDisplayString"])(t.name),9,Gd),n!==e.sortedContainerVersionTags.length-1?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",$d,", ")):Object(i["createCommentVNode"])("",!0)])})),128))])):Object(i["createCommentVNode"])("",!0)]),Rd,Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags")},[Wd,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_EditTags")),1)],8,zd),Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags",{idTag:0})},[Xd,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_CreateNewTag")),1)],8,qd)]})),_:1},8,["content-title","help-text"])]),Object(i["createElementVNode"])("div",Kd,[Object(i["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.triggerCount," ").concat(e.translate("TagManager_Triggers")),"help-text":e.triggersHelpText},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,[e.triggerCount?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Jd,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sortedTriggers,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:n},[Object(i["createElementVNode"])("a",{href:e.linkTo("manageTriggers",{idTrigger:t.idtrigger}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(i["toDisplayString"])(t.name),9,Yd),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,", ",512),[[i["vShow"],n!==e.sortedTriggers.length-1]])])})),128))])):Object(i["createCommentVNode"])("",!0)]),Qd,Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers")},[eu,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_EditTriggers")),1)],8,Zd),Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers",{idTrigger:0})},[nu,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_CreateNewTrigger")),1)],8,tu)]})),_:1},8,["content-title","help-text"])])]),Object(i["createElementVNode"])("div",au,[Object(i["createElementVNode"])("div",ru,[Object(i["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.variableCount," ").concat(e.translate("TagManager_Variables")),"help-text":e.variablesHelpText},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sortedVariables,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:n},[Object(i["createElementVNode"])("a",{href:e.linkTo("manageVariables",{idVariable:t.idvariable}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(i["toDisplayString"])(t.name),9,iu),n!==e.sortedVariables.length-1?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",ou,", ")):Object(i["createCommentVNode"])("",!0)])})),128))],512),[[i["vShow"],e.variableCount]])]),lu,Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables")},[su,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_EditVariables")),1)],8,cu),Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables",{idVariable:0})},[uu,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_CreateNewVariable")),1)],8,du)]})),_:1},8,["content-title","help-text"])]),Object(i["createElementVNode"])("div",gu,[Object(i["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.versionCount," ").concat(e.translate("TagManager_Versions")),"help-text":e.versionsHelpText},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_LastVersions"))+": ",1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.lastVersions,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:n},[Object(i["createElementVNode"])("a",{title:e.lastVersionLinkTitle(t),href:e.linkTo("manageVersions",{idContainerVersion:t.idcontainerversion})},Object(i["toDisplayString"])(t.name),9,bu),n!==e.lastVersions.length-1?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",mu,", ")):Object(i["createCommentVNode"])("",!0)])})),128))],512),[[i["vShow"],e.lastVersions.length]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,[pu,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("TagManager_Environments"))+": ",1),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.container.releases,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:n},[Object(i["createElementVNode"])("span",{title:e.releaseTooltip(t)},Object(i["toDisplayString"])(e.ucfirst(t.environment)),9,hu),n!==e.container.releases.length-1?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",fu,", ")):Object(i["createCommentVNode"])("",!0)])})),128))],512),[[i["vShow"],e.container.releases.length]])]),vu,Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions")},[Ou,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_EditVersions")),1)],8,ju),Object(i["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions",{idContainerVersion:0})},[Vu,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_CreateNewVersion")),1)],8,Tu)]})),_:1},8,["content-title","help-text"])])])]))])}function Cu(e){e.sort((function(e,t){return e.namet.name?1:0}))}var Nu=Object(i["defineComponent"])({props:{idContainer:String,dashboardHelpText:String,tagsHelpText:String,triggersHelpText:String,variablesHelpText:String,versionsHelpText:String},components:{ActivityIndicator:u["ActivityIndicator"],EnrichedHeadline:u["EnrichedHeadline"],ContentBlock:u["ContentBlock"]},directives:{ContentIntro:u["ContentIntro"]},data:function(){return{container:null,containerVersion:null,isLoading:!1}},created:function(){var e=this;Ds.init(),this.isLoading=!0;var t=u["AjaxHelper"].fetch({method:"TagManager.getContainer",idContainer:this.idContainer}).then((function(t){e.container=t})),n=u["AjaxHelper"].fetch({method:"TagManager.exportContainerVersion",idContainer:this.idContainer}).then((function(t){e.containerVersion=t}));Promise.all([t,n]).finally((function(){e.isLoading=!1}))},methods:{linkTo:function(e,t){var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e}));return t&&(n+="#?".concat(u["MatomoUrl"].stringify(t))),"?".concat(n)},lastVersionLinkTitle:function(e){return"Created on ".concat(e.created_date_pretty)+", description: '".concat(e.description,"'")},releaseTooltip:function(e){var t=Object(u["translate"])("TagManager_ReleaseInfo",e.release_login,e.release_date_pretty),n=Object(u["translate"])("TagManager_ReleaseVersionInfo",e.version_name);return"".concat(t," ").concat(n)},ucfirst:function(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}},computed:{lastVersions:function(){var e,t;return null!==(e=this.container)&&void 0!==e&&null!==(t=e.versions)&&void 0!==t&&t.length?this.container.versions.slice(-5):[]},contexts:function(){var e={};return Ds.contexts.value.forEach((function(t){var n=t.id,a=t.name;e[n]=a})),e},containerMetaInformation:function(){var e,t,n;return Object(u["translate"])("TagManager_ContainerMetaInformation",(null===(e=this.containerVersion)||void 0===e?void 0:e.idcontainer)||"",this.contexts[(null===(t=this.container)||void 0===t?void 0:t.context)||""]||"",(null===(n=this.containerVersion)||void 0===n?void 0:n.created_date_pretty)||"")},sortedContainerVersionTags:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.tags)||[];return Cu(t),t},sortedTriggers:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.triggers)||[];return Cu(t),t},sortedVariables:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.variables)||[];return Cu(t),t},tagCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.tags.length},triggerCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.triggers.length},versionCount:function(){var e;return null===(e=this.container)||void 0===e?void 0:e.versions.length},variableCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.variables.length}}});Nu.render=yu;var Eu=Nu,Su=["title"],ku={class:"title"},wu=Object(i["createElementVNode"])("span",{class:"icon icon-chevron-down"}," ",-1),Mu={class:"dropdown positionInViewport"},_u={class:"custom_select_container"},Du={class:"custom_select_ul_list"},xu=["title"],Au=["href"];function Bu(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("ActivityIndicator"),c=Object(i["resolveDirective"])("focus-anywhere-but-here");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:Object(i["normalizeClass"])(["tagContainerSelector piwikSelector borderedControl",{expanded:e.showContainerList}]),onClick:t[1]||(t[1]=function(t){e.fetchContainers(),e.showContainerList=!e.showContainerList}),title:e.translate("TagManager_ChooseContainer")},[Object(i["createElementVNode"])("a",ku,[wu,Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.actualContainerName),1)]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Mu,[Object(i["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),Object(i["createElementVNode"])("div",_u,[Object(i["createElementVNode"])("ul",Du,[Object(i["withDirectives"])(Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("a",{tabindex:"-1",onClick:t[0]||(t[0]=Object(i["withModifiers"])((function(){}),["prevent","stop"]))},Object(i["toDisplayString"])(e.translate("TagManager_NoContainersFound")),1)],512),[[i["vShow"],!e.isLoading&&0===e.containers.length]]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.containers,(function(t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{title:"".concat(t.name," (").concat(t.idcontainer,")"),key:t.idcontainer},[Object(i["createElementVNode"])("a",{href:e.linkTo(t.idcontainer)},Object(i["toDisplayString"])(t.name)+" ("+Object(i["toDisplayString"])(t.idcontainer)+") ",9,Au)],8,xu)})),128))])])],512),[[i["vShow"],e.showContainerList]])],10,Su)),[[c,{blur:e.onBlur}]])}var Lu=Object(i["defineComponent"])({props:{containerName:String},components:{ActivityIndicator:u["ActivityIndicator"]},directives:{FocusAnywhereButHere:u["FocusAnywhereButHere"]},data:function(){return{containers:[],isLoading:!1,showContainerList:!1}},created:function(){setTimeout((function(){window.initTopControls()}))},methods:{fetchContainers:function(){var e=this;this.isLoading=!0,this.containers=[],u["AjaxHelper"].fetch({method:"TagManager.getContainers"}).then((function(t){e.containers=t})).finally((function(){e.isLoading=!1}))},linkTo:function(e){var t=u["MatomoUrl"].urlParsed.value.action;t&&"manageContainers"!==t||(t=this.hasWriteAccess?"dashboard":"manageTags");var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{idContainer:e,action:t}));return"".concat(window.location.pathname,"?").concat(n)},onBlur:function(){this.showContainerList=!1}},computed:{actualContainerName:function(){return this.containerName?Object(u["translate"])("TagManager_ContainerX",this.containerName):Object(u["translate"])("TagManager_ChooseContainer")},hasWriteAccess:function(){return u["Matomo"].hasUserCapability("tagmanager_write")}}});Lu.render=Bu;var Uu=Lu,Iu={style:{"margin-left":"-0.75rem"}},Pu=Object(i["createElementVNode"])("br",null,null,-1),Hu=["href"],Fu=["textContent"],Gu={style:{"margin-top":"1rem"}},$u=["innerHTML"],Ru=Object(i["createElementVNode"])("br",null,null,-1),zu={target:"_blank",href:"https://matomo.org/faq/tag-manager/data-layer-in-matomo-tag-manager/"},Wu={class:"environment"},qu={class:"name"},Xu={class:"name"},Ku={class:"released_by"},Ju={class:"released_on"},Yu={key:0},Qu={colspan:"7"},Zu={class:"loadingPiwik"},eg=Object(i["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),tg={key:1},ng={colspan:"7"},ag={class:"environment"},rg={class:"name"},ig={class:"revision"},og={class:"released_by"},lg={class:"released_on"},cg={class:"date"};function sg(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("Field"),c=Object(i["resolveComponent"])("ActivityIndicator"),s=Object(i["resolveComponent"])("ContentBlock"),d=Object(i["resolveDirective"])("select-on-focus"),u=Object(i["resolveDirective"])("content-table");return Object(i["openBlock"])(),Object(i["createBlock"])(s,{class:"manageInstallTagCode",feature:"Tag Manager","content-title":"Install Code"},{default:Object(i["withCtx"])((function(){var n,a;return[Object(i["createElementVNode"])("div",Iu,[Object(i["createVNode"])(l,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.environment=t,e.fetchInstallInstructions(e.environment)}),options:e.environments,title:e.translate("TagManager_Environment")},null,8,["model-value","options","title"])]),Object(i["createVNode"])(c,{loading:e.isLoading},null,8,["loading"]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.installInstructions,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:n},[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.description)+" ",1),Pu,t.helpUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(i["toDisplayString"])(e.translate("TagManager_LearnMore")),9,Hu)):Object(i["createCommentVNode"])("",!0)]),t.embedCode?Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("pre",{key:0,class:"codeblock",textContent:Object(i["toDisplayString"])(t.embedCode),ref:"codeblock"},null,8,Fu)),[[d,{}]]):Object(i["createCommentVNode"])("",!0)])})),128)),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("TagManager_InstallCodePublishEnvironmentNote","preview"))+" "+Object(i["toDisplayString"])(e.translate("TagManager_ConfigureEnvironmentsSuperUser")),1),Object(i["createElementVNode"])("p",Gu,[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_InstallCodeDataLayerNote","",""))},null,8,$u),Ru,Object(i["createElementVNode"])("a",zu,Object(i["toDisplayString"])(e.translate("TagManager_LearnMore")),1)]),Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("TagManager_ReleasesOverview")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("table",null,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",Wu,Object(i["toDisplayString"])(e.translate("TagManager_Environment")),1),Object(i["createElementVNode"])("th",qu,Object(i["toDisplayString"])(e.translate("TagManager_VersionName")),1),Object(i["createElementVNode"])("th",Xu,Object(i["toDisplayString"])(e.translate("TagManager_VersionRevision")),1),Object(i["createElementVNode"])("th",Ku,Object(i["toDisplayString"])(e.translate("TagManager_ReleasedBy")),1),Object(i["createElementVNode"])("th",Ju,Object(i["toDisplayString"])(e.translate("TagManager_ReleasedOn")),1)])]),Object(i["createElementVNode"])("tbody",null,[e.isLoading?(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",Yu,[Object(i["createElementVNode"])("td",Qu,[Object(i["createElementVNode"])("span",Zu,[eg,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_LoadingData")),1)])])])):Object(i["createCommentVNode"])("",!0),e.isLoading||0!==(null===(n=e.container)||void 0===n||null===(a=n.releases)||void 0===a?void 0:a.length)?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",tg,[Object(i["createElementVNode"])("td",ng,Object(i["toDisplayString"])(e.translate("TagManager_NoReleasesFound")),1)])),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sortedReleases,(function(t){var n,a;return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:t.idcontainerrelease},[Object(i["createElementVNode"])("td",ag,Object(i["toDisplayString"])(e.ucfirst(t.environment)),1),Object(i["createElementVNode"])("td",rg,Object(i["toDisplayString"])(null===(n=e.releaseVersions[t.idcontainerrelease])||void 0===n?void 0:n.name),1),Object(i["createElementVNode"])("td",ig,Object(i["toDisplayString"])(null===(a=e.releaseVersions[t.idcontainerrelease])||void 0===a?void 0:a.revision),1),Object(i["createElementVNode"])("td",og,Object(i["toDisplayString"])(t.release_login),1),Object(i["createElementVNode"])("td",lg,[Object(i["createElementVNode"])("span",cg,Object(i["toDisplayString"])(t.release_date_pretty),1)])])})),128))])],512),[[u]])]})),_:1})}function dg(e){return bg(e)||gg(e)||hg(e)||ug()}function ug(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function gg(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function bg(e){if(Array.isArray(e))return fg(e)}function mg(e,t){return jg(e)||vg(e,t)||hg(e,t)||pg()}function pg(){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 hg(e,t){if(e){if("string"===typeof e)return fg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fg(e,t):void 0}}function fg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.release_date?-1:t.index-e.index})),t}}});Vg.render=sg;var yg=Vg,Cg={class:"list-style-decimal"},Ng=["innerHTML"];function Eg(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("TrackingCodeCommon");return Object(i["openBlock"])(),Object(i["createElementBlock"])("ol",Cg,[e.showContainerRow?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{key:0,innerHTML:e.$sanitize(e.setupStep1)},null,8,Ng)):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(l,{"show-container-row":e.showContainerRow,showBottom:!0,showDescription:!1,showPlainMtmSteps:!0,showTestSection:e.showTestSection,onFetchInstallInstructions:e.fetchInstallInstructions,ref:"trackingCodeCommon"},null,8,["show-container-row","showTestSection","onFetchInstallInstructions"])])}var Sg={class:"tagManagerTrackingCode"},kg={key:1,class:"row"},wg={class:"col s12 m4 "},Mg={class:"form-group row"},_g={class:"col s12 input-field"},Dg={for:"tagManagerTrackingCodeSite",class:"siteSelectorLabel"},xg={class:"sites_autocomplete"},Ag={class:"col s12 m4"},Bg={class:"col s12 m4"},Lg={key:2,class:"alert alert-info"},Ug={href:""},Ig={key:0},Pg=["href"],Hg=Object(i["createTextVNode"])(". "),Fg={key:1},Gg=["innerHTML"],$g=Object(i["createTextVNode"])(". "),Rg=["innerHTML"],zg=Object(i["createTextVNode"])(". "),Wg=["innerHTML"],qg=["textContent"],Xg={key:3},Kg=["innerHTML"],Jg={key:1};function Yg(e,t,n,a,r,o){var l=this,c=Object(i["resolveComponent"])("ActivityIndicator"),s=Object(i["resolveComponent"])("SiteSelector"),d=Object(i["resolveComponent"])("Field"),u=Object(i["resolveDirective"])("copy-to-clipboard");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Sg,[e.showContainerRow||e.environments.length>1?(Object(i["openBlock"])(),Object(i["createBlock"])(c,{key:0,style:Object(i["normalizeStyle"])({opacity:e.isLoading?1:0}),loading:!0},null,8,["style"])):Object(i["createCommentVNode"])("",!0),e.showContainerRow||e.environments.length>1?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",kg,[Object(i["createElementVNode"])("div",wg,[Object(i["createElementVNode"])("div",Mg,[Object(i["createElementVNode"])("div",_g,[Object(i["createElementVNode"])("label",Dg,Object(i["toDisplayString"])(e.translate("General_Website")),1),Object(i["createElementVNode"])("div",xg,[Object(i["createVNode"])(s,{id:"tagManagerTrackingCodeSite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),"show-all-sites-item":!1,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(i["createElementVNode"])("div",Ag,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(d,{uicontrol:"select",name:"containers","model-value":e.idContainer,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.idContainer=t,e.onContainerChange()}),options:e.containerOptions,disabled:e.containerOptions.length<=1,"full-width":!0,title:e.translate("TagManager_Container")},null,8,["model-value","options","disabled","title"])])]),Object(i["createElementVNode"])("div",Bg,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(d,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.environment=t,l.$emit("fetchInstallInstructions")}),options:e.environments,disabled:e.environments.length<=1,"full-width":!0,title:e.translate("TagManager_Environment")},null,8,["model-value","options","disabled","title"])])])])):Object(i["createCommentVNode"])("",!0),e.idContainer&&e.noReleaseFound?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Lg,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_NoReleasesFoundForContainer"))+" ",1),Object(i["createElementVNode"])("a",Ug,Object(i["toDisplayString"])(e.translate("TagManager_PublishVersionToEnvironmentToViewEmbedCode")),1)])):Object(i["createCommentVNode"])("",!0),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.installInstructions,(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:n},[e.showDescription?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",Ig,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.description)+" ",1),t.helpUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(i["toDisplayString"])(e.translate("TagManager_LearnMore")),9,Pg)):Object(i["createCommentVNode"])("",!0),Hg])):Object(i["createCommentVNode"])("",!0),e.showPlainMtmSteps?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Fg,[Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.getMtmStep2)},null,8,Gg),$g,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.getLearnMoreLink)},null,8,Rg),zg]),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.getMtmStep3)},null,8,Wg)])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("pre",{class:"codeblock",textContent:Object(i["toDisplayString"])(t.embedCode),ref:"codeblock"},null,8,qg),[[u,{}]])])])})),128)),e.showBottom?Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Xg,[e.idContainer&&!e.showTestSection?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.getCongratulationsText)},null,8,Kg)):Object(i["createCommentVNode"])("",!0),e.idContainer&&e.showTestSection?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",Jg,[(Object(i["openBlock"])(),Object(i["createBlock"])(Object(i["resolveDynamicComponent"])(e.testComponent),{site:e.site},null,8,["site"]))])):Object(i["createCommentVNode"])("",!0)],512)),[[i["vShow"],!e.noReleaseFound]]):Object(i["createCommentVNode"])("",!0)])}function Qg(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}var Zg=Object(i["defineComponent"])({props:{showContainerRow:Boolean,currentAction:String,showBottom:Boolean,showDescription:Boolean,showPlainMtmSteps:Boolean,showTestSection:Boolean},components:{ActivityIndicator:u["ActivityIndicator"],SiteSelector:u["SiteSelector"],Field:g["Field"]},emits:["fetchInstallInstructions"],directives:{CopyToClipboard:u["CopyToClipboard"]},data:function(){return{containerVariables:[],isLoading:!1,idContainer:"",environment:"",environments:[],environmentNameMap:{},containerMap:{},containerOptions:[],site:{id:u["Matomo"].idSite,name:u["Matomo"].helper.htmlDecode(u["Matomo"].siteName)},matomoConfigs:[],releases:[],installInstructions:[],noReleaseFound:!1}},created:function(){var e=this;u["AjaxHelper"].fetch({method:"TagManager.getAvailableEnvironments",filter_limit:"-1"}).then((function(t){var n;n=Array.isArray(t)?t:Object.values(t),e.environmentNameMap=Object.fromEntries(n.map((function(e){var t=e.id,n=e.name;return[t,n]})))})),this.onSiteChange()},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){var e,t=this;this.installInstructions=[],this.containerOptions=[],this.containerMap={},this.environments=[],this.matomoConfigs=[],this.idContainer="",null!==(e=this.site)&&void 0!==e&&e.id&&(this.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1",idSite:this.site.id}).then((function(e){if(t.containerOptions=[],null===e||void 0===e||!e.length)return t.idContainer="",void t.containerOptions.push({key:"",value:t.translate("TagManager_NoContainersFound")});e.forEach((function(e){t.idContainer||(t.idContainer=e.idcontainer),t.containerMap[e.idcontainer]=e,t.containerOptions.push({key:e.idcontainer,value:e.name})})),t.onContainerChange()})).finally((function(){t.isLoading=!1})))},onContainerChange:function(){var e=this;if(this.noReleaseFound=!1,this.idContainer){this.installInstructions=[];var t=this.containerMap[this.idContainer],n=t.draft.idcontainerversion;this.environment="",this.environments=[];var a=t.releases||[];a.find((function(e){return"live"===e.environment}))&&(this.environment="live"),a.forEach((function(t){if("preview"!==t.environment){e.environment||(e.environment=t.environment);var n=Qg(t.environment);t.environment in e.environmentNameMap&&(n=e.environmentNameMap[t.environment]),e.environments.push({key:t.environment,value:n})}})),this.environments.length||(this.noReleaseFound=!0,this.environments.push({key:"",value:this.translate("TagManager_NoReleasesFound")})),this.$emit("fetchInstallInstructions"),this.fetchVariables(n)}},linkTo:function(e,t,n,a){var r=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n})),i="".concat(window.location.pathname,"?").concat(r);return a&&(i+="#?".concat(u["MatomoUrl"].stringify(a))),i},fetchVariables:function(e){var t,n=this;this.matomoConfigs=[],this.idContainer&&null!==(t=this.site)&&void 0!==t&&t.id&&e&&u["AjaxHelper"].fetch({method:"TagManager.getContainerVariables",filter_limit:"-1",idContainer:this.idContainer,idContainerVersion:e,idSite:this.site.id}).then((function(e){n.matomoConfigs=e.filter((function(e){return"MatomoConfiguration"===e.type}))})).finally((function(){n.isLoading=!1}))}},computed:{getLearnMoreLink:function(){return Object(u["translate"])("TagManager_CustomHtmlTagHelpText",'',"")},getMtmStep2:function(){var e=this.site&&this.site.id?this.site.id:"",t=this.linkTo("dashboard",e,this.idContainer,[]);return Object(u["translate"])("TagManager_SiteWithoutDataMtmStep2",''),"")},getMtmStep3:function(){return Object(u["translate"])("TagManager_SiteWithoutDataMtmStep3","</head>",'',"")},getCongratulationsText:function(){return Object(u["translate"])("TagManager_SiteWithoutDataReactFollowStepCompleted","","")},testComponent:function(){return this.showTestSection?Object(u["useExternalPluginComponent"])("JsTrackerInstallCheck","JsTrackerInstallCheck"):""}}});Zg.render=Yg;var eb=Zg,tb=Object(i["defineComponent"])({props:{showContainerRow:Boolean,showTestSection:Boolean},components:{TrackingCodeCommon:eb},data:function(){return{setupStep1:""}},methods:{fetchInstallInstructions:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;a.installInstructions=[],this.updateStep1Text(),null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id&&null!==a&&void 0!==a&&a.environment&&(a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id}).then((function(e){a.installInstructions=e,Object(i["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1})))},linkTo:function(e,t,n,a){var r=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n}));return a&&(r+="#?".concat(u["MatomoUrl"].stringify(a))),"?".concat(r)},updateStep1Text:function(){var e,t=this.$refs.trackingCodeCommon;if(null!==t&&void 0!==t&&null!==(e=t.site)&&void 0!==e&&e.id){var n=null!==t&&void 0!==t&&t.idContainer?t.idContainer:"",a=this.linkTo("manageContainers",t.site.id,n);this.setupStep1=Object(u["translate"])("TagManager_SPAFollowStep1","
","",''),"")}}},mounted:function(){this.updateStep1Text()}});tb.render=Eg;var nb=tb,ab={key:0},rb=["innerHTML"],ib=Object(i["createElementVNode"])("br",null,null,-1),ob=["innerHTML"],lb=Object(i["createElementVNode"])("br",null,null,-1);function cb(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("TagmanagerTrackingCode"),c=Object(i["resolveComponent"])("ContentBlock");return"getTrackingMethodsForSite"===e.currentAction?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ab,[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.siteWithoutDataMtmIntro)},null,8,rb),ib,Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataCloudflareFollowStepsIntro")),1)]),Object(i["createVNode"])(l,{"show-container-row":e.showContainerRow,"current-action":e.currentAction,showTestSection:e.isJsTrackerInstallCheckAvailable},null,8,["show-container-row","current-action","showTestSection"])])):(Object(i["openBlock"])(),Object(i["createBlock"])(c,{key:1,anchor:"tagmanager","content-title":e.translate("TagManager_MatomoTagManager")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.siteWithoutDataMtmIntro)},null,8,ob),lb,Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("strong",null,Object(i["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataCloudflareFollowStepsIntro")),1)]),Object(i["createVNode"])(l,{"show-container-row":e.showContainerRow,"current-action":e.currentAction,showTestSection:!1},null,8,["show-container-row","current-action"])]})),_:1},8,["content-title"]))}var sb=Object(i["defineComponent"])({props:{currentAction:String,showContainerRow:Boolean,isJsTrackerInstallCheckAvailable:Boolean},components:{ContentBlock:u["ContentBlock"],TagmanagerTrackingCode:nb},computed:{trackingInfoTextLine1:function(){var e="?".concat(u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:"manageContainers"})));return Object(u["translate"])("TagManager_MatomoTagManagerTrackingInfoLine1",''),"")},trackingInfoTextLine2:function(){var e="?".concat(u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:"gettingStarted"})));return Object(u["translate"])("TagManager_MatomoTagManagerTrackingInfoLine2",''),"")},siteWithoutDataMtmIntro:function(){var e="?".concat(u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:"gettingStarted"})));return Object(u["translate"])("TagManager_SiteWithoutDataMtmIntro",''),"")}}});sb.render=cb;var db=sb,ub={class:"list-style-decimal"},gb=["innerHTML"],bb=["innerHTML"],mb=["innerHTML"],pb=["textContent"],hb=["innerHTML"],fb=["textContent"],vb=["innerHTML"],jb=["innerHTML"],Ob=["innerHTML"],Tb=["textContent"],Vb={style:{"list-style":"lower-alpha","list-style-position":"inside","text-indent":"1.2rem"}},yb=["innerHTML"],Cb=["innerHTML"],Nb=["innerHTML"],Eb=["textContent"],Sb=["textContent"],kb=["innerHTML"],wb=["textContent"],Mb=["innerHTML"],_b=["innerHTML"],Db=["textContent"];function xb(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("TrackingCodeCommon"),c=Object(i["resolveDirective"])("select-on-focus");return Object(i["openBlock"])(),Object(i["createElementBlock"])("ol",ub,[e.showContainerRow?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{key:0,innerHTML:e.$sanitize(e.setupStep1)},null,8,gb)):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(l,{"show-container-row":e.showContainerRow,"current-action":e.currentAction,showBottom:!1,showDescription:!1,onFetchInstallInstructions:e.fetchInstallInstructionsSPA,ref:"trackingCodeCommon"},null,8,["show-container-row","current-action","onFetchInstallInstructions"]),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep2)},null,8,bb),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep3)},null,8,mb),Object(i["createElementVNode"])("li",{textContent:Object(i["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,pb),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep5)},null,8,hb),Object(i["createElementVNode"])("li",{textContent:Object(i["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,fb),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep7)},null,8,vb),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep8)},null,8,jb),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep9)},null,8,Ob),Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("span",{textContent:Object(i["toDisplayString"])(e.fetchFollowStep10)},null,8,Tb),Object(i["createElementVNode"])("ol",Vb,[Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10a)},null,8,yb),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10b)},null,8,Cb)])]),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep11)},null,8,Nb),Object(i["createElementVNode"])("li",{textContent:Object(i["toDisplayString"])(e.fetchClickX("General_Update"))},null,8,Eb),Object(i["createElementVNode"])("li",{textContent:Object(i["toDisplayString"])(e.fetchFollowStep13)},null,8,Sb),Object(i["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep14)},null,8,kb),Object(i["createElementVNode"])("li",{textContent:Object(i["toDisplayString"])(e.fetchFollowStep15)},null,8,wb),"react"===e.jsFramework?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{key:1,innerHTML:e.$sanitize(e.fetchFollowStep16React)},null,8,Mb)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{key:2,innerHTML:e.$sanitize(e.fetchFollowStep16SPA)},null,8,_b)),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.installInstructions,(function(e,t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:t},[Object(i["withDirectives"])(Object(i["createElementVNode"])("pre",{class:"codeblock",textContent:Object(i["toDisplayString"])(e.embedCode),ref:"codeblock"},null,8,Db),[[c,{}]])])})),128))])}var Ab=Object(i["defineComponent"])({props:{showContainerRow:Boolean,currentAction:String,jsFramework:String},components:{TrackingCodeCommon:eb},directives:{SelectOnFocus:u["SelectOnFocus"]},data:function(){return{setupStep1:"",setupStep2:"",setupStep7:"",installInstructions:[]}},methods:{fetchInstallInstructionsSPA:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;if(this.installInstructions=[],null!==a&&void 0!==a&&a.idContainer&&null!==a&&void 0!==a&&a.environment&&null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id){var r=this.linkTo("manageContainers",a.site.id,a.idContainer);this.setupStep1=Object(u["translate"])("TagManager_SPAFollowStep1","
","",''),"");var o=this.linkTo("manageTriggers",a.site.id,a.idContainer);this.setupStep2=Object(u["translate"])("TagManager_SPAFollowStep2",''),"");var l=this.linkTo("manageTags",a.site.id,a.idContainer);this.setupStep7=Object(u["translate"])("TagManager_SPAFollowStep7",''),""),a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id,jsFramework:this.jsFramework}).then((function(e){n.installInstructions=e,Object(i["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1}))}},linkTo:function(e,t,n,a){var r=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n}));return a&&(r+="#?".concat(u["MatomoUrl"].stringify(a))),"?".concat(r)},fetchClickX:function(e){return Object(u["translate"])("General_ClickX",Object(u["translate"])(e))}},computed:{fetchFollowStep3:function(){return Object(u["translate"])("TagManager_SPAFollowStep3","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),'',"")},fetchFollowStep5:function(){return Object(u["translate"])("TagManager_SPAFollowStep5","".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),Object(u["translate"])("TagManager_CategoryUserEngagement"))},fetchFollowStep8:function(){return Object(u["translate"])("TagManager_SPAFollowStep8","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),"".concat(Object(u["translate"])("TagManager_MatomoTagName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),'',"")},fetchFollowStep9:function(){return Object(u["translate"])("TagManager_SPAFollowStep9",Object(u["translate"])("TagManager_ConfigureWhatTagDoes"),Object(u["translate"])("TagManager_CustomTitle"),"","")},fetchFollowStep10:function(){return Object(u["translate"])("TagManager_SPAFollowStep10",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10a:function(){return Object(u["translate"])("TagManager_SPAFollowStep10a","","",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10b:function(){return Object(u["translate"])("TagManager_SPAFollowStep10b",Object(u["translate"])("TagManager_CustomUrl"),"","")},fetchFollowStep11:function(){return Object(u["translate"])("TagManager_SPAFollowStep11",Object(u["translate"])("TagManager_ConfigureWhenTagDoes"),Object(u["translate"])("TagManager_FireTriggerTitle"),"".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),"".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""))},fetchFollowStep13:function(){return Object(u["translate"])("TagManager_SPAFollowStep13",Object(u["translate"])("TagManager_Publish"))},fetchFollowStep14:function(){return Object(u["translate"])("TagManager_SPAFollowStep14",Object(u["translate"])("TagManager_VersionName"),"","")},fetchFollowStep15:function(){return Object(u["translate"])("TagManager_SPAFollowStep15",Object(u["translate"])("TagManager_CreateVersionAndPublishRelease"))},fetchFollowStep16SPA:function(){return Object(u["translate"])("TagManager_SPAFollowStep16","</head>",'',"")},fetchFollowStep16React:function(){return Object(u["translate"])("TagManager_ReactFollowStep16","","","App.js","React.useEffect","Hello World","React.js")}}});Ab.render=xb;var Bb,Lb,Ub=Ab,Ib={class:"nav-wrapper"},Pb={class:"pull-right"},Hb=Object(i["createElementVNode"])("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"},version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Object(i["createElementVNode"])("defs",null,[Object(i["createElementVNode"])("symbol",{id:"tm-icon-checkmark",viewBox:"0 0 32 32"},[Object(i["createElementVNode"])("path",{d:"M27 4l-15 15-7-7-5 5 12 12 20-20z"})])])],-1),Fb={class:"page",style:{clear:"both"}},Gb={key:0,id:"secondNavBar",class:"Menu--dashboard z-depth-1"},$b={class:"navbar",role:"menu",style:{padding:"0"}},Rb={class:"menuTab",role:"menuitem"},zb={class:"item",style:{"font-weight":"normal"}},Wb=Object(i["createTextVNode"])(" Events "),qb={key:0},Xb=Object(i["createElementVNode"])("br",null,null,-1),Kb=Object(i["createElementVNode"])("br",null,null,-1),Jb=Object(i["createElementVNode"])("label",{for:"onlyfiredTags",class:"lbl-onlyfiredTags"},"Only fired tags",-1),Yb={key:0,style:{padding:"0 0 1rem 1.2rem"}},Qb=["onClick","title"],Zb={title:"This tag was fired"},em=Object(i["createElementVNode"])("svg",{class:"tm-icon tm-icon-checkmark"},[Object(i["createElementVNode"])("use",{"xlink:href":"#tm-icon-checkmark"})],-1),tm=[em],nm={class:"pageWrap"},am={class:"home",id:"content"},rm=Object(i["createElementVNode"])("h3",null,"Fired Tags",-1),im={class:"entityTable"},om=Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",null,"Action"),Object(i["createElementVNode"])("th",null,"Name"),Object(i["createElementVNode"])("th",null,"Type"),Object(i["createElementVNode"])("th",null,"Fired count")])],-1),lm={key:0},cm=Object(i["createElementVNode"])("td",{colspan:"4"},"No tags",-1),sm=[cm],dm=Object(i["createElementVNode"])("h3",{style:{"margin-top":"30px"}},"Not Yet Fired Tags",-1),um={class:"entityTable"},gm=Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",null,"Name"),Object(i["createElementVNode"])("th",null,"Type")])],-1),bm=Object(i["createElementVNode"])("td",{colspan:"4"},"No tags",-1),mm=[bm],pm=Object(i["createElementVNode"])("h3",null,"Triggers",-1),hm={class:"entityTable"},fm=Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",null,"Name"),Object(i["createElementVNode"])("th",null,"Type")])],-1),vm={key:0},jm=Object(i["createElementVNode"])("td",{colspan:"4"},"No trigger",-1),Om=[jm],Tm={key:1},Vm=Object(i["createElementVNode"])("h3",null,"Pushed data by this event",-1),ym={class:"entityTable"},Cm={style:{"word-break":"break-all"}},Nm=Object(i["createElementVNode"])("br",null,null,-1),Em=Object(i["createElementVNode"])("h3",null,"Content after this event",-1),Sm={class:"entityTable"},km={style:{"word-break":"break-all"}},wm={class:"entityTable"},Mm=Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",null,"Name"),Object(i["createElementVNode"])("th",null,"Type"),Object(i["createElementVNode"])("th",null,"Value")])],-1),_m={key:0},Dm=Object(i["createElementVNode"])("td",{colspan:"3"},"No variables",-1),xm=[Dm],Am={style:{"word-break":"break-all"}},Bm={class:"entityTable"},Lm=Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",null,"Time"),Object(i["createElementVNode"])("th",null,"Message")])],-1),Um={style:{"word-break":"break-all"}},Im=Object(i["createElementVNode"])("br",null,null,-1);function Pm(e,t,n,a,r,o){var l,c,s,d,u,g,b,m,p,h;return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("nav",null,[Object(i["createElementVNode"])("div",Ib,[Object(i["createElementVNode"])("ul",null,[Object(i["createElementVNode"])("li",null,[Object(i["renderSlot"])(e.$slots,"logo")]),Object(i["createElementVNode"])("li",{class:Object(i["normalizeClass"])({active:"tags"===e.contentTab||!e.contentTab})},[Object(i["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(t){return e.contentTab="tags"})},"Tags")],2),Object(i["createElementVNode"])("li",{class:Object(i["normalizeClass"])({active:"triggers"===e.contentTab})},[Object(i["createElementVNode"])("a",{onClick:t[1]||(t[1]=function(t){return e.contentTab="triggers"})},"Triggers")],2),Object(i["createElementVNode"])("li",{class:Object(i["normalizeClass"])({active:"variables"===e.contentTab})},[Object(i["createElementVNode"])("a",{onClick:t[2]||(t[2]=function(t){return e.contentTab="variables"})},"Variables")],2),Object(i["createElementVNode"])("li",{class:Object(i["normalizeClass"])({active:"dataLayer"===e.contentTab})},[Object(i["createElementVNode"])("a",{onClick:t[3]||(t[3]=function(t){return e.contentTab="dataLayer"})},"Data Layer")],2),Object(i["createElementVNode"])("li",{class:Object(i["normalizeClass"])({active:"logs"===e.contentTab})},[Object(i["createElementVNode"])("a",{onClick:t[4]||(t[4]=function(t){return e.contentTab="logs"})},"Logs")],2),Object(i["createElementVNode"])("li",Pb,[Object(i["createElementVNode"])("a",{id:"mtmUpdateDebugPosition",onClick:t[5]||(t[5]=function(t){return e.mtmUpdateDebugPosition()})},Object(i["toDisplayString"])(e.positionText),1)])])])]),Hb,Object(i["createElementVNode"])("div",Fb,["logs"!==e.contentTab?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Gb,[Object(i["createElementVNode"])("ul",$b,[Object(i["createElementVNode"])("li",Rb,[Object(i["createElementVNode"])("span",zb,[Wb,e.mtmEvents.length>0?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",qb,[Xb,Kb,Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"checkbox",class:"onlyFiredTags-chk",name:"onlyfiredTags",id:"onlyfiredTags",value:"1","onUpdate:modelValue":t[6]||(t[6]=function(t){return e.onlyfiredTags=t}),style:{"margin-right":"3.5px"}},null,512),[[i["vModelCheckbox"],e.onlyfiredTags]]),Jb])):Object(i["createCommentVNode"])("",!0)])]),0===e.mtmEvents.length?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",Yb,"No event executed")):Object(i["createCommentVNode"])("",!0),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.mtmEventsReversed,(function(t,n){var a,r;return Object(i["openBlock"])(),Object(i["createElementBlock"])("li",{class:Object(i["normalizeClass"])(["menuTab",{active:n===e.selectedEventIndex}]),role:"menuitem",key:n},[(t.tags||[]).length||!e.onlyfiredTags?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,class:"item",onClick:function(n){return e.selectEvent(t.index0)},title:"Time: ".concat(t.time,". Trigger: ").concat(null===(a=t.metTrigger)||void 0===a?void 0:a.name)},[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.index)+": "+Object(i["toDisplayString"])(t.name)+" ",1),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",Zb,tm,512),[[i["vShow"],null===(r=t.tags)||void 0===r?void 0:r.length]])],8,Qb)):Object(i["createCommentVNode"])("",!0)],2)})),128))])])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",nm,[Object(i["createElementVNode"])("div",am,[Object(i["withDirectives"])(Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.homeTabTitle),513),[[i["vShow"],"logs"!==e.contentTab]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[rm,Object(i["createElementVNode"])("table",im,[om,Object(i["createElementVNode"])("tbody",null,[null!==(l=e.selectedEvent)&&void 0!==l&&null!==(c=l.tags)&&void 0!==c&&c.length?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",lm,sm)),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])((null===(s=e.selectedEvent)||void 0===s?void 0:s.tags)||[],(function(e,t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:t},[Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.action),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.name),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.type),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.numExecuted),1)])})),128))])]),dm,Object(i["createElementVNode"])("table",um,[gm,Object(i["createElementVNode"])("tbody",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("tr",null,mm,512),[[i["vShow"],0===e.notFiredTags.length]]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.notFiredTags,(function(e,t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:t},[Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.name),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.type),1)])})),128))])])],512),[[i["vShow"],"tags"===e.contentTab||!e.contentTab]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[pm,Object(i["createElementVNode"])("table",hm,[fm,Object(i["createElementVNode"])("tbody",null,[null!==(d=e.selectedEvent)&&void 0!==d&&d.metTrigger?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",vm,Om)),null!==(u=e.selectedEvent)&&void 0!==u&&u.metTrigger?(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",Tm,[Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.selectedEvent.metTrigger.name),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.selectedEvent.metTrigger.type),1)])):Object(i["createCommentVNode"])("",!0)])])],512),[[i["vShow"],"triggers"===e.contentTab]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Vm,Object(i["createElementVNode"])("table",ym,[Object(i["createElementVNode"])("tbody",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",Cm,Object(i["toDisplayString"])(e.selectedEventData),1)])])]),Nm,Em,Object(i["createElementVNode"])("table",Sm,[Object(i["createElementVNode"])("tbody",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("td",km,Object(i["toDisplayString"])(e.selectedEventContainerDataLayer),1)])])])],512),[[i["vShow"],"dataLayer"===e.contentTab]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("table",wm,[Mm,Object(i["createElementVNode"])("tbody",null,[null!==(g=e.selectedEvent)&&void 0!==g&&null!==(b=g.container)&&void 0!==b&&null!==(m=b.variables)&&void 0!==m&&m.length?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",_m,xm)),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])((null===(p=e.selectedEvent)||void 0===p||null===(h=p.container)||void 0===h?void 0:h.variables)||[],(function(t,n){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:n},[Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.name),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.type),1),Object(i["createElementVNode"])("td",Am,Object(i["toDisplayString"])(e.stringifySelectedVariable(t)),1)])})),128))])])],512),[[i["vShow"],"variables"===e.contentTab]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("table",Bm,[Lm,Object(i["createElementVNode"])("tbody",null,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.mtmLogs,(function(e,t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:t},[Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.time),1),Object(i["createElementVNode"])("td",Um,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.messages,(function(e,t){return Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:t},[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e),1),Im])})),128))])])})),128))])])],512),[[i["vShow"],"logs"===e.contentTab]])])])])])}function Hm(e){return Rm(e)||$m(e)||Gm(e)||Fm()}function Fm(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Gm(e,t){if(e){if("string"===typeof e)return zm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zm(e,t):void 0}}function $m(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Rm(e){if(Array.isArray(e))return zm(e)}function zm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt||n.push.apply(n,Hm(e.tags.map((function(e){return e.name}))))}));var a=[];return this.selectedEvent.container.tags.forEach((function(e){-1===n.indexOf(e.name)&&a.push(e)})),a},selectedEvent:function(){return this.mtmEvents[this.selectedEventIndex]},mtmEvents:function(){return window.mtmDbgData.mtmEvents},mtmEventsReversed:function(){var e=Hm(this.mtmEvents);return e.reverse(),e},mtmLogs:function(){return window.mtmDbgData.mtmLogs},selectedEventData:function(){var e;return(null===(e=this.selectedEvent)||void 0===e?void 0:e.eventData)&&JSON.stringify(this.selectedEvent.eventData,Jm())},selectedEventContainerDataLayer:function(){var e,t;return(null===(e=this.selectedEvent)||void 0===e||null===(t=e.container)||void 0===t?void 0:t.dataLayer)&&JSON.stringify(this.selectedEvent.container.dataLayer,Jm())}}});Ym.render=Pm;var Qm=Ym,Zm={class:"tagManagerGettingStarted"},ep=Object(i["createElementVNode"])("br",null,null,-1),tp=Object(i["createElementVNode"])("br",null,null,-1),np=Object(i["createElementVNode"])("br",null,null,-1),ap=Object(i["createElementVNode"])("br",null,null,-1),rp=Object(i["createElementVNode"])("br",null,null,-1),ip=["innerHTML"],op=Object(i["createElementVNode"])("br",null,null,-1),lp=Object(i["createElementVNode"])("br",null,null,-1),cp=Object(i["createElementVNode"])("br",null,null,-1),sp=Object(i["createElementVNode"])("br",null,null,-1),dp=["innerHTML"];function up(e,t,n,a,r,o){var l=Object(i["resolveComponent"])("ContentBlock");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Zm,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStarted")),1),Object(i["createVNode"])(l,{"content-title":e.translate("CorePluginsAdmin_WhatIsTagManager")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedWhatIsIntro")),1),Object(i["createElementVNode"])("ul",null,[Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedAnalyticsTracking")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedConversionTracking")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedNewsletterSignups")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedExitActions")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedRemarketing")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedSocialWidgets")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedAffiliates")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedAds")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedAndMore")),1)]),Object(i["createElementVNode"])("p",null,[ep,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedMainComponents")),1)]),Object(i["createElementVNode"])("ul",null,[Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedTagComponent")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedTriggerComponent")),1),Object(i["createElementVNode"])("li",null,Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedVariableComponent")),1)])]})),_:1},8,["content-title"]),Object(i["createVNode"])(l,{"content-title":e.translate("TagManager_GettingStartedWhyDoINeed")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedWhyMakesLifeEasier"))+" ",1),tp,np,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedWhyThirdPartySnippets"))+" ",1),ap,rp,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedWhyAccuracyPerformance")),1)])]})),_:1},8,["content-title"]),e.canEdit?(Object(i["openBlock"])(),Object(i["createBlock"])(l,{key:0,"content-title":e.translate("TagManager_GettingStartedHowDoI")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.gettingStartedHowCreateContainerText)},null,8,ip),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedHowCopyCode"))+" ",1),op,lp,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedHowAddTagsToContainer")),1)])]})),_:1},8,["content-title"])):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(l,{"content-title":e.translate("TagManager_GettingStartedWhatIfUnsupported")},{default:Object(i["withCtx"])((function(){return[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("TagManager_GettingStartedCustomTags"))+" ",1),cp,sp,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.gettingStartedContributeTagsText)},null,8,dp)])]})),_:1},8,["content-title"])])}var gp=Object(i["defineComponent"])({props:{canEdit:Boolean},components:{ContentBlock:u["ContentBlock"]},computed:{gettingStartedHowCreateContainerText:function(){var e="?".concat(u["MatomoUrl"].stringify({module:"TagManager",action:"manageContainers"}),"}");return Object(u["translate"])("TagManager_GettingStartedHowCreateContainer",''),"")},gettingStartedContributeTagsText:function(){var e="https://developer.matomo.org/guides/tagmanager/settingup";return Object(u["translate"])("TagManager_GettingStartedContributeTags",''),"")}}});gp.render=up;var bp=gp; /*! * Matomo - free/libre analytics platform * diff --git a/vue/src/TagmanagerTrackingCode/TrackingCodePage.vue b/vue/src/TagmanagerTrackingCode/TrackingCodePage.vue index 250a0dfbb..021ea0084 100644 --- a/vue/src/TagmanagerTrackingCode/TrackingCodePage.vue +++ b/vue/src/TagmanagerTrackingCode/TrackingCodePage.vue @@ -5,7 +5,7 @@ -->