![]() Server : LiteSpeed System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : claqxcrl ( 523) PHP Version : 8.1.32 Disable Function : NONE Directory : /home/claqxcrl/anfangola.com/wp-content/plugins/matomo/app/plugins/Goals/vue/dist/ |
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["Goals"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["Goals"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,a){return function(e){var t={};function a(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)a.d(n,l,function(t){return e[t]}.bind(null,l));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="plugins/Goals/vue/dist/",a(a.s="fae3")}({"19dc":function(t,a){t.exports=e},"8bbf":function(e,a){e.exports=t},a5a2:function(e,t){e.exports=a},fae3:function(e,t,a){"use strict";if(a.r(t),a.d(t,"GoalPageLink",(function(){return s})),a.d(t,"ManageGoals",(function(){return Ce})),a.d(t,"ManageGoalsStore",(function(){return Te})),"undefined"!==typeof window){var n=window.document.currentScript,l=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);l&&(a.p=l[1])}var o=a("19dc"),r=window,i=r.$,c={mounted:function(e,t){if(o["Matomo"].helper.isReportingPage()){var a=i(e).text(),n=i("<a></a>");n.text(a),n.attr("title",Object(o["translate"])("Goals_ClickToViewThisGoal")),n.click((function(e){e.preventDefault(),o["MatomoUrl"].updateHash(Object.assign(Object.assign({},o["MatomoUrl"].hashParsed.value),{},{category:"Goals_Goals",subcategory:t.value.idGoal}))})),i(e).html(n[0])}}},s=c;o["Matomo"].on("Matomo.processDynamicHtml",(function(e){e.find("[goal-page-link]").each((function(e,t){if(!i(t).attr("goal-page-link-handled")){var a=i(t).attr("goal-page-link");a&&c.mounted(t,{instance:null,value:{idGoal:a},oldValue:null,modifiers:{},dir:{}}),i(t).attr("goal-page-link-handled","1")}}))}));var u=a("8bbf"),d={class:"manageGoals"},b={id:"entityEditContainer",feature:"true",class:"managegoals"},m={class:"contentHelp"},p=["innerHTML"],O={key:0},j=Object(u["createElementVNode"])("br",null,null,-1),h=Object(u["createElementVNode"])("br",null,null,-1),g=["innerHTML"],v={class:"first"},y={key:1},f={key:2},_={key:0},G={colspan:"8"},V=Object(u["createElementVNode"])("br",null,null,-1),E=Object(u["createElementVNode"])("br",null,null,-1),N=Object(u["createElementVNode"])("br",null,null,-1),w=["id"],S={class:"first"},T={class:"matchAttribute"},D={key:0},k={key:1},C=Object(u["createElementVNode"])("br",null,null,-1),x=["innerHTML"],M={key:1,style:{"padding-top":"2px"}},A=["onClick","title"],B=Object(u["createElementVNode"])("span",{class:"icon-edit"},null,-1),L=[B],H={key:2,style:{"padding-top":"2px"}},F=["onClick","title"],P=Object(u["createElementVNode"])("span",{class:"icon-delete"},null,-1),U=[P],I={key:0,class:"tableActionBar"},R=Object(u["createElementVNode"])("span",{class:"icon-add"},null,-1),z={class:"ui-confirm",ref:"confirm"},$=["value"],q=["value"],W={class:"addEditGoal"},J=["innerHTML"],Y={class:"row goalIsTriggeredWhen"},K={class:"col s12"},Q={class:"row"},X={class:"col s12 m6 goalTriggerType"},Z={class:"col s12 m6"},ee=["innerHTML"],te={class:"row whereTheMatchAttrbiute"},ae={class:"col s12"},ne={class:"row"},le={class:"col s12 m6 l4"},oe={key:0,class:"col s12 m6 l4"},re={key:1,class:"col s12 m6 l4"},ie={class:"col s12 m6 l4"},ce={id:"examples_pattern",class:"col s12"},se=Object(u["createElementVNode"])("br",null,null,-1),ue=Object(u["createElementVNode"])("br",null,null,-1),de=Object(u["createElementVNode"])("br",null,null,-1),be=Object(u["createElementVNode"])("br",null,null,-1),me=Object(u["createElementVNode"])("br",null,null,-1),pe=Object(u["createElementVNode"])("br",null,null,-1),Oe=Object(u["createElementVNode"])("br",null,null,-1),je=Object(u["createElementVNode"])("br",null,null,-1),he={ref:"endedittable"},ge=Object(u["createElementVNode"])("input",{type:"hidden",name:"goalIdUpdate",value:""},null,-1),ve={key:0},ye=["innerHTML"],fe=Object(u["createElementVNode"])("a",{id:"bottom"},null,-1);function _e(e,t,a,n,l,o){var r,i=Object(u["resolveComponent"])("ActivityIndicator"),c=Object(u["resolveComponent"])("ContentBlock"),s=Object(u["resolveComponent"])("Field"),B=Object(u["resolveComponent"])("Alert"),P=Object(u["resolveComponent"])("VueEntryContainer"),_e=Object(u["resolveComponent"])("SaveButton"),Ge=Object(u["resolveDirective"])("content-table"),Ve=Object(u["resolveDirective"])("form");return Object(u["openBlock"])(),Object(u["createElementBlock"])("div",d,[Object(u["withDirectives"])(Object(u["createElementVNode"])("div",null,[Object(u["withDirectives"])(Object(u["createElementVNode"])("div",b,[Object(u["createVNode"])(c,{"content-title":e.translate("Goals_ManageGoals")},{default:Object(u["withCtx"])((function(){return[Object(u["createVNode"])(i,{loading:e.isLoading},null,8,["loading"]),Object(u["createElementVNode"])("div",m,[Object(u["createElementVNode"])("span",{innerHTML:e.$sanitize(e.learnMoreAboutGoalTracking)},null,8,p),e.ecommerceEnabled?Object(u["createCommentVNode"])("",!0):(Object(u["openBlock"])(),Object(u["createElementBlock"])("span",O,[j,h,Object(u["createTextVNode"])(" "+Object(u["toDisplayString"])(e.translate("Goals_Optional"))+" "+Object(u["toDisplayString"])(e.translate("Goals_Ecommerce"))+": ",1),Object(u["createElementVNode"])("span",{innerHTML:e.$sanitize(e.youCanEnableEcommerceReports)},null,8,g)]))]),Object(u["withDirectives"])(Object(u["createElementVNode"])("table",null,[Object(u["createElementVNode"])("thead",null,[Object(u["createElementVNode"])("tr",null,[Object(u["createElementVNode"])("th",v,Object(u["toDisplayString"])(e.translate("General_Id")),1),Object(u["createElementVNode"])("th",null,Object(u["toDisplayString"])(e.translate("Goals_GoalName")),1),Object(u["createElementVNode"])("th",null,Object(u["toDisplayString"])(e.translate("General_Description")),1),Object(u["createElementVNode"])("th",null,Object(u["toDisplayString"])(e.translate("Goals_GoalIsTriggeredWhen")),1),Object(u["createElementVNode"])("th",null,Object(u["toDisplayString"])(e.translate("General_ColumnRevenue")),1),e.beforeGoalListActionsHeadComponent?(Object(u["openBlock"])(),Object(u["createBlock"])(Object(u["resolveDynamicComponent"])(e.beforeGoalListActionsHeadComponent),{key:0})):Object(u["createCommentVNode"])("",!0),e.userCanEditGoals?(Object(u["openBlock"])(),Object(u["createElementBlock"])("th",y,Object(u["toDisplayString"])(e.translate("General_Edit")),1)):Object(u["createCommentVNode"])("",!0),e.userCanEditGoals?(Object(u["openBlock"])(),Object(u["createElementBlock"])("th",f,Object(u["toDisplayString"])(e.translate("General_Delete")),1)):Object(u["createCommentVNode"])("",!0)])]),Object(u["createElementVNode"])("tbody",null,[Object.keys(e.goals||{}).length?Object(u["createCommentVNode"])("",!0):(Object(u["openBlock"])(),Object(u["createElementBlock"])("tr",_,[Object(u["createElementVNode"])("td",G,[V,Object(u["createTextVNode"])(" "+Object(u["toDisplayString"])(e.translate("Goals_ThereIsNoGoalToManage",e.siteName))+" ",1),E,N])])),(Object(u["openBlock"])(!0),Object(u["createElementBlock"])(u["Fragment"],null,Object(u["renderList"])(e.goals||[],(function(t){return Object(u["openBlock"])(),Object(u["createElementBlock"])("tr",{id:t.idgoal,key:t.idgoal},[Object(u["createElementVNode"])("td",S,Object(u["toDisplayString"])(t.idgoal),1),Object(u["createElementVNode"])("td",null,Object(u["toDisplayString"])(t.name),1),Object(u["createElementVNode"])("td",null,Object(u["toDisplayString"])(t.description),1),Object(u["createElementVNode"])("td",null,[Object(u["createElementVNode"])("span",T,Object(u["toDisplayString"])(e.goalMatchAttributeTranslations[t.match_attribute]||t.match_attribute),1),"visit_duration"===t.match_attribute?(Object(u["openBlock"])(),Object(u["createElementBlock"])("span",D,Object(u["toDisplayString"])(e.lcfirst(e.translate("General_OperationGreaterThan")))+" "+Object(u["toDisplayString"])(e.translate("Intl_NMinutes",t.pattern)),1)):t.pattern_type?(Object(u["openBlock"])(),Object(u["createElementBlock"])("span",k,[C,Object(u["createTextVNode"])(" "+Object(u["toDisplayString"])(e.translate("Goals_Pattern"))+" "+Object(u["toDisplayString"])(t.pattern_type)+": "+Object(u["toDisplayString"])(t.pattern),1)])):Object(u["createCommentVNode"])("",!0)]),Object(u["createElementVNode"])("td",{class:"center",innerHTML:e.$sanitize(0===t.revenue||"0"===t.revenue?"-":t.revenue_pretty)},null,8,x),e.beforeGoalListActionsBodyComponent[t.idgoal]?(Object(u["openBlock"])(),Object(u["createBlock"])(Object(u["resolveDynamicComponent"])(e.beforeGoalListActionsBodyComponent[t.idgoal]),{key:0})):Object(u["createCommentVNode"])("",!0),e.userCanEditGoals?(Object(u["openBlock"])(),Object(u["createElementBlock"])("td",M,[Object(u["createElementVNode"])("button",{onClick:function(a){return e.editGoal(t.idgoal)},class:"table-action",title:e.translate("General_Edit")},L,8,A)])):Object(u["createCommentVNode"])("",!0),e.userCanEditGoals?(Object(u["openBlock"])(),Object(u["createElementBlock"])("td",H,[Object(u["createElementVNode"])("button",{onClick:function(a){return e.deleteGoal(t.idgoal)},class:"table-action",title:e.translate("General_Delete")},U,8,F)])):Object(u["createCommentVNode"])("",!0)],8,w)})),128))])],512),[[Ge]]),e.userCanEditGoals&&!e.onlyShowAddNewGoal?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",I,[Object(u["createElementVNode"])("button",{id:"add-goal",onClick:t[0]||(t[0]=function(t){return e.createGoal()})},[R,Object(u["createTextVNode"])(" "+Object(u["toDisplayString"])(e.translate("Goals_AddNewGoal")),1)])])):Object(u["createCommentVNode"])("",!0)]})),_:1},8,["content-title"])],512),[[u["vShow"],e.showGoalList]]),Object(u["createElementVNode"])("div",z,[Object(u["createElementVNode"])("h2",null,Object(u["toDisplayString"])(e.translate("Goals_DeleteGoalConfirm",'"'.concat(null===(r=e.goalToDelete)||void 0===r?void 0:r.name,'"'))),1),Object(u["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,$),Object(u["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,q)],512)],512),[[u["vShow"],!e.onlyShowAddNewGoal]]),Object(u["withDirectives"])(Object(u["createElementVNode"])("div",null,[Object(u["withDirectives"])(Object(u["createElementVNode"])("div",W,[Object(u["createVNode"])(c,{"content-title":e.goal.idgoal?e.translate("Goals_UpdateGoal"):e.translate("Goals_AddNewGoal")},{default:Object(u["withCtx"])((function(){return[Object(u["createElementVNode"])("div",{innerHTML:e.$sanitize(e.addNewGoalIntro)},null,8,J),Object(u["withDirectives"])(Object(u["createElementVNode"])("div",null,[Object(u["createElementVNode"])("div",null,[Object(u["createVNode"])(s,{uicontrol:"text",name:"goal_name",modelValue:e.goal.name,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.goal.name=t}),maxlength:50,title:e.translate("Goals_GoalName")},null,8,["modelValue","title"])]),Object(u["createElementVNode"])("div",null,[Object(u["createVNode"])(s,{uicontrol:"text",name:"goal_description",modelValue:e.goal.description,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.goal.description=t}),maxlength:255,title:e.translate("General_Description")},null,8,["modelValue","title"])]),Object(u["createElementVNode"])("div",Y,[Object(u["createElementVNode"])("div",K,[Object(u["createElementVNode"])("h3",null,Object(u["toDisplayString"])(e.translate("Goals_GoalIsTriggered")),1)])]),Object(u["createElementVNode"])("div",Q,[Object(u["createElementVNode"])("div",X,[Object(u["createElementVNode"])("div",null,[Object(u["createVNode"])(s,{uicontrol:"select",name:"trigger_type","model-value":e.triggerType,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.triggerType=t,e.changedTriggerType()}),"full-width":!0,options:e.goalTriggerTypeOptions},null,8,["model-value","options"])])]),Object(u["createElementVNode"])("div",Z,[Object(u["withDirectives"])(Object(u["createVNode"])(B,{severity:"info"},{default:Object(u["withCtx"])((function(){return[Object(u["createElementVNode"])("span",{innerHTML:e.$sanitize(e.whereVisitedPageManuallyCallsJsTrackerText)},null,8,ee)]})),_:1},512),[[u["vShow"],"manually"===e.triggerType]]),Object(u["createElementVNode"])("div",null,[Object(u["withDirectives"])(Object(u["createVNode"])(s,{uicontrol:"radio",name:"match_attribute","full-width":!0,"model-value":e.goal.match_attribute,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.goal.match_attribute=t,e.initPatternType()}),options:e.goalMatchAttributeOptions},null,8,["model-value","options"]),[[u["vShow"],"manually"!==e.triggerType]])])])]),Object(u["withDirectives"])(Object(u["createElementVNode"])("div",te,[Object(u["createElementVNode"])("h3",ae,[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("Goals_WhereThe"))+" ",1),Object(u["withDirectives"])(Object(u["createElementVNode"])("span",null,Object(u["toDisplayString"])(e.translate("Goals_URL")),513),[[u["vShow"],"url"===e.goal.match_attribute]]),Object(u["withDirectives"])(Object(u["createElementVNode"])("span",null,Object(u["toDisplayString"])(e.translate("Goals_PageTitle")),513),[[u["vShow"],"title"===e.goal.match_attribute]]),Object(u["withDirectives"])(Object(u["createElementVNode"])("span",null,Object(u["toDisplayString"])(e.translate("Goals_Filename")),513),[[u["vShow"],"file"===e.goal.match_attribute]]),Object(u["withDirectives"])(Object(u["createElementVNode"])("span",null,Object(u["toDisplayString"])(e.translate("Goals_ExternalWebsiteUrl")),513),[[u["vShow"],"external_website"===e.goal.match_attribute]]),Object(u["withDirectives"])(Object(u["createElementVNode"])("span",null,Object(u["toDisplayString"])(e.translate("Goals_VisitDuration")),513),[[u["vShow"],"visit_duration"===e.goal.match_attribute]])])],512),[[u["vShow"],"manually"!==e.triggerType]]),Object(u["withDirectives"])(Object(u["createElementVNode"])("div",ne,[Object(u["withDirectives"])(Object(u["createElementVNode"])("div",le,[Object(u["createElementVNode"])("div",null,[Object(u["createVNode"])(s,{uicontrol:"select",name:"event_type",modelValue:e.eventType,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.eventType=t}),"full-width":!0,options:e.eventTypeOptions},null,8,["modelValue","options"])])],512),[[u["vShow"],"event"===e.goal.match_attribute]]),e.isMatchAttributeNumeric?Object(u["createCommentVNode"])("",!0):(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",oe,[Object(u["createElementVNode"])("div",null,[Object(u["createVNode"])(s,{uicontrol:"select",name:"pattern_type",modelValue:e.goal.pattern_type,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.goal.pattern_type=t}),"full-width":!0,options:e.patternTypeOptions},null,8,["modelValue","options"])])])),e.isMatchAttributeNumeric?(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",re,[Object(u["createElementVNode"])("div",null,[Object(u["createVNode"])(s,{uicontrol:"select",name:"pattern_type",modelValue:e.goal.pattern_type,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.goal.pattern_type=t}),"full-width":!0,options:e.numericComparisonTypeOptions},null,8,["modelValue","options"])])])):Object(u["createCommentVNode"])("",!0),Object(u["createElementVNode"])("div",ie,[Object(u["createElementVNode"])("div",null,[Object(u["createVNode"])(s,{uicontrol:"text",name:"pattern",modelValue:e.goal.pattern,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.goal.pattern=t}),maxlength:255,title:e.patternFieldLabel,"full-width":!0},null,8,["modelValue","title"])])]),Object(u["createElementVNode"])("div",ce,[Object(u["createVNode"])(B,{severity:"info"},{default:Object(u["withCtx"])((function(){return[Object(u["withDirectives"])(Object(u["createElementVNode"])("span",null,[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(u["toDisplayString"])(e.translate("Goals_Contains","'checkout/confirmation'"))+" ",1),se,Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(u["toDisplayString"])(e.translate("Goals_IsExactly","'http://example.com/thank-you.html'"))+" ",1),ue,Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(u["toDisplayString"])(e.translate("Goals_MatchesExpression","'(.*)\\/demo\\/(.*)'")),1)],512),[[u["vShow"],"url"===e.goal.match_attribute]]),Object(u["withDirectives"])(Object(u["createElementVNode"])("span",null,Object(u["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(u["toDisplayString"])(e.translate("Goals_Contains","'Order confirmation'")),513),[[u["vShow"],"title"===e.goal.match_attribute]]),Object(u["withDirectives"])(Object(u["createElementVNode"])("span",null,[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(u["toDisplayString"])(e.translate("Goals_Contains","'files/brochure.pdf'"))+" ",1),de,Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(u["toDisplayString"])(e.translate("Goals_IsExactly","'http://example.com/files/brochure.pdf'"))+" ",1),be,Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(u["toDisplayString"])(e.translate("Goals_MatchesExpression","'(.*)\\.zip'")),1)],512),[[u["vShow"],"file"===e.goal.match_attribute]]),Object(u["withDirectives"])(Object(u["createElementVNode"])("span",null,[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(u["toDisplayString"])(e.translate("Goals_Contains","'amazon.com'"))+" ",1),me,Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(u["toDisplayString"])(e.translate("Goals_IsExactly","'http://mypartner.com/landing.html'"))+" ",1),pe,Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(u["toDisplayString"])(e.matchesExpressionExternal),1)],512),[[u["vShow"],"external_website"===e.goal.match_attribute]]),Object(u["withDirectives"])(Object(u["createElementVNode"])("span",null,[Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(u["toDisplayString"])(e.translate("Goals_Contains","'video'"))+" ",1),Oe,Object(u["createTextVNode"])(" "+Object(u["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(u["toDisplayString"])(e.translate("Goals_IsExactly","'click'"))+" ",1),je,Object(u["createTextVNode"])(Object(u["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(u["toDisplayString"])(e.translate("Goals_MatchesExpression","'(.*)_banner'"))+'" ',1)],512),[[u["vShow"],"event"===e.goal.match_attribute]]),Object(u["withDirectives"])(Object(u["createElementVNode"])("span",null,Object(u["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(u["toDisplayString"])(e.translate("Goals_AtLeastMinutes","5","0.5")),513),[[u["vShow"],"visit_duration"===e.goal.match_attribute]])]})),_:1})])],512),[[u["vShow"],"manually"!==e.triggerType]]),Object(u["createElementVNode"])("div",null,[Object(u["withDirectives"])(Object(u["createVNode"])(s,{uicontrol:"checkbox",name:"case_sensitive",modelValue:e.goal.case_sensitive,"onUpdate:modelValue":t[9]||(t[9]=function(t){return e.goal.case_sensitive=t}),title:e.caseSensitiveTitle},null,8,["modelValue","title"]),[[u["vShow"],"manually"!==e.triggerType&&!e.isMatchAttributeNumeric]])]),Object(u["createElementVNode"])("div",null,["visit_duration"!==e.goal.match_attribute?(Object(u["openBlock"])(),Object(u["createBlock"])(s,{key:0,uicontrol:"radio",name:"allow_multiple","model-value":e.goal.allow_multiple&&"0"!==e.goal.allow_multiple?1:0,"onUpdate:modelValue":t[10]||(t[10]=function(t){return e.goal.allow_multiple=t}),options:e.allowMultipleOptions,introduction:e.translate("Goals_AllowMultipleConversionsPerVisit"),"inline-help":e.translate("Goals_HelpOneConversionPerVisit")},null,8,["model-value","options","introduction","inline-help"])):Object(u["createCommentVNode"])("",!0)]),Object(u["createElementVNode"])("h3",null,Object(u["toDisplayString"])(e.translate("Goals_GoalRevenue"))+" "+Object(u["toDisplayString"])(e.translate("Goals_Optional")),1),Object(u["createElementVNode"])("div",null,[Object(u["createVNode"])(s,{uicontrol:"number",name:"revenue",modelValue:e.goal.revenue,"onUpdate:modelValue":t[11]||(t[11]=function(t){return e.goal.revenue=t}),placeholder:e.translate("Goals_DefaultRevenueLabel"),"inline-help":e.translate("Goals_DefaultRevenueHelp")},null,8,["modelValue","placeholder","inline-help"])]),Object(u["createElementVNode"])("div",null,[Object(u["withDirectives"])(Object(u["createVNode"])(s,{uicontrol:"checkbox",name:"use_event_value",modelValue:e.goal.event_value_as_revenue,"onUpdate:modelValue":t[12]||(t[12]=function(t){return e.goal.event_value_as_revenue=t}),title:e.translate("Goals_UseEventValueAsRevenue"),"inline-help":e.useEventValueAsRevenueHelp},null,8,["modelValue","title","inline-help"]),[[u["vShow"],"event"===e.goal.match_attribute]])]),Object(u["createElementVNode"])("div",he,[e.endEditTable?(Object(u["openBlock"])(),Object(u["createBlock"])(P,{key:0,html:e.endEditTable},null,8,["html"])):Object(u["createCommentVNode"])("",!0)],512),ge,Object(u["createVNode"])(_e,{saving:e.isLoading,onConfirm:t[13]||(t[13]=function(t){return e.save()}),value:e.submitText},null,8,["saving","value"]),e.onlyShowAddNewGoal?Object(u["createCommentVNode"])("",!0):(Object(u["openBlock"])(),Object(u["createElementBlock"])("div",ve,[Object(u["withDirectives"])(Object(u["createElementVNode"])("div",{class:"entityCancel",onClick:t[14]||(t[14]=function(t){return e.showListOfReports()}),innerHTML:e.$sanitize(e.cancelText)},null,8,ye),[[u["vShow"],e.showEditGoal]])]))],512),[[Ve]])]})),_:1},8,["content-title"])],512),[[u["vShow"],e.showEditGoal]])],512),[[u["vShow"],e.userCanEditGoals]]),fe])}var Ge=a("a5a2");function Ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ee(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ne(e,t,a){return t&&Ee(e.prototype,t),a&&Ee(e,a),e}function we(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */var Se=function(){function e(){var t=this;Ve(this,e),we(this,"privateState",Object(u["reactive"])({})),we(this,"idGoal",Object(u["computed"])((function(){return t.privateState.idGoal})))}return Ne(e,[{key:"setIdGoalShown",value:function(e){this.privateState.idGoal=e}}]),e}(),Te=new Se;function De(e){return e&&"0"!==e?1:0}var ke=Object(u["defineComponent"])({inheritAttrs:!1,props:{onlyShowAddNewGoal:Boolean,userCanEditGoals:Boolean,ecommerceEnabled:Boolean,goals:{type:Object,required:!0},addNewGoalIntro:String,goalTriggerTypeOptions:Object,goalMatchAttributeOptions:Array,eventTypeOptions:Array,patternTypeOptions:Array,numericComparisonTypeOptions:Array,allowMultipleOptions:Array,showAddGoal:Boolean,showGoal:Number,beforeGoalListActionsBody:Object,endEditTable:String,beforeGoalListActionsHead:String},data:function(){return{showEditGoal:!1,showGoalList:!0,goal:{},isLoading:!1,eventType:"event_category",triggerType:"visitors",apiMethod:"",submitText:"",goalToDelete:null,addEditTableComponent:!1}},components:{SaveButton:Ge["SaveButton"],ContentBlock:o["ContentBlock"],ActivityIndicator:o["ActivityIndicator"],Field:Ge["Field"],Alert:o["Alert"],VueEntryContainer:o["VueEntryContainer"]},directives:{ContentTable:o["ContentTable"],Form:Ge["Form"]},created:function(){Te.setIdGoalShown(this.showGoal)},unmounted:function(){Te.setIdGoalShown(void 0)},mounted:function(){this.showAddGoal?this.createGoal():this.showGoal?this.editGoal(this.showGoal):this.showListOfReports()},methods:{scrollToTop:function(){setTimeout((function(){o["Matomo"].helper.lazyScrollTo(".pageWrap",200)}))},initGoalForm:function(e,t,a,n,l,r,i,c,s,u,d,b){o["Matomo"].postEvent("Goals.beforeInitGoalForm",e,b),this.apiMethod=e,this.goal={},this.goal.name=a,this.goal.description=n;var m=l;"manually"===m?(this.triggerType="manually",m="url"):this.triggerType="visitors",0===m.indexOf("event")?(this.eventType=m,m="event"):this.eventType="event_category",this.goal.match_attribute=m,this.goal.allow_multiple=u,this.goal.pattern_type=i,this.goal.pattern=r,this.goal.case_sensitive=c,this.goal.revenue=s,this.goal.event_value_as_revenue=d,this.submitText=t,this.goal.idgoal=b},showListOfReports:function(){o["Matomo"].postEvent("Goals.cancelForm"),this.showGoalList=!0,this.showEditGoal=!1,this.scrollToTop()},showAddEditForm:function(){this.showGoalList=!1,this.showEditGoal=!0},createGoal:function(){var e={isAllowed:!0};o["Matomo"].postEvent("Goals.initAddGoal",e),e&&!e.isAllowed||(this.showAddEditForm(),this.initGoalForm("Goals.addGoal",Object(o["translate"])("Goals_AddGoal"),"","","url","","contains",!1,0,!1,!1,0),this.scrollToTop())},editGoal:function(e){this.showAddEditForm();var t=this.goals["".concat(e)];this.initGoalForm("Goals.updateGoal",Object(o["translate"])("Goals_UpdateGoal"),t.name,t.description,t.match_attribute,t.pattern,t.pattern_type,!!t.case_sensitive&&"0"!==t.case_sensitive,parseInt("".concat(t.revenue),10),!!t.allow_multiple&&"0"!==t.allow_multiple,!!t.event_value_as_revenue&&"0"!==t.event_value_as_revenue,e),this.scrollToTop()},deleteGoal:function(e){var t=this;this.goalToDelete=this.goals["".concat(e)],o["Matomo"].helper.modalConfirm(this.$refs.confirm,{yes:function(){t.isLoading=!0,o["AjaxHelper"].fetch({idGoal:e,method:"Goals.deleteGoal"}).then((function(){window.location.reload()})).finally((function(){t.isLoading=!1}))}})},save:function(){var e=this,t={};t.name=this.goal.name,t.description=this.goal.description,this.isManuallyTriggered?(t.matchAttribute="manually",t.patternType="regex",t.pattern=".*",t.caseSensitive=0):(t.matchAttribute=this.goal.match_attribute,"event"===t.matchAttribute&&(t.matchAttribute=this.eventType,t.useEventValueAsRevenue=De(this.goal.event_value_as_revenue)),t.patternType=this.goal.pattern_type,t.pattern=this.goal.pattern,t.caseSensitive=De(this.goal.case_sensitive)),t.revenue=this.goal.revenue||0,t.allowMultipleConversionsPerVisit=De(this.goal.allow_multiple),t.idGoal=this.goal.idgoal,t.method=this.apiMethod;var a="Goals.addGoal"===t.method,n="Goals.updateGoal"===t.method,l={};n?o["Matomo"].postEvent("Goals.beforeUpdateGoal",{parameters:t,options:l}):a&&o["Matomo"].postEvent("Goals.beforeAddGoal",{parameters:t,options:l}),null!==t&&void 0!==t&&t.cancelRequest||(this.isLoading=!0,o["AjaxHelper"].fetch(t,l).then((function(){var t=o["MatomoUrl"].parsed.value.subcategory;"Goals_AddNewGoal"===t&&o["Matomo"].helper.isReportingPage()?o["ReportingMenuStore"].reloadMenuItems().then((function(){o["MatomoUrl"].updateHash(Object.assign(Object.assign({},o["MatomoUrl"].hashParsed.value),{},{subcategory:"Goals_ManageGoals"})),e.isLoading=!1})):window.location.reload()})).catch((function(){e.scrollToTop(),e.isLoading=!1})))},changedTriggerType:function(){this.isManuallyTriggered||this.goal.pattern_type||(this.goal.pattern_type="contains")},initPatternType:function(){this.isMatchAttributeNumeric?this.goal.pattern_type="greater_than":this.goal.pattern_type="contains"},lcfirst:function(e){return"".concat(e.slice(0,1).toLowerCase()).concat(e.slice(1))},ucfirst:function(e){return"".concat(e.slice(0,1).toUpperCase()).concat(e.slice(1))}},computed:{learnMoreAboutGoalTracking:function(){return Object(o["translate"])("Goals_LearnMoreAboutGoalTrackingDocumentation",Object(o["externalLink"])("https://matomo.org/docs/tracking-goals-web-analytics/"),"</a>")},youCanEnableEcommerceReports:function(){var e=o["MatomoUrl"].stringify(Object.assign(Object.assign({},o["MatomoUrl"].urlParsed.value),{},{module:"SitesManager",action:"index"})),t=Object(o["externalLink"])("https://matomo.org/docs/ecommerce-analytics/")+Object(o["translate"])("Goals_EcommerceReports")+"</a>",a="<a href='".concat(e,"'>").concat(Object(o["translate"])("SitesManager_WebsitesManagement"),"</a>");return Object(o["translate"])("Goals_YouCanEnableEcommerceReports",t,a)},siteName:function(){return o["Matomo"].helper.htmlDecode(o["Matomo"].siteName)},whereVisitedPageManuallyCallsJsTrackerText:function(){return Object(o["translate"])("Goals_WhereVisitedPageManuallyCallsJavascriptTrackerLearnMore",Object(o["externalLink"])("https://developer.matomo.org/guides/tracking-javascript-guide#manually-trigger-goal-conversions"),"</a>")},caseSensitiveTitle:function(){return"".concat(Object(o["translate"])("Goals_CaseSensitive")," ").concat(Object(o["translate"])("Goals_Optional"))},useEventValueAsRevenueHelp:function(){return"".concat(Object(o["translate"])("Goals_EventValueAsRevenueHelp")," <br/><br/> ").concat(Object(o["translate"])("Goals_EventValueAsRevenueHelp2"))},cancelText:function(){return Object(o["translate"])("General_OrCancel","<a class='entityCancelLink'>","</a>")},isMatchAttributeNumeric:function(){return["visit_duration"].indexOf(this.goal.match_attribute)>-1},patternFieldLabel:function(){return"visit_duration"===this.goal.match_attribute?Object(o["translate"])("Goals_TimeInMinutes"):Object(o["translate"])("Goals_Pattern")},goalMatchAttributeTranslations:function(){return{manually:Object(o["translate"])("Goals_ManuallyTriggeredUsingJavascriptFunction"),file:Object(o["translate"])("Goals_Download"),url:Object(o["translate"])("Goals_VisitUrl"),title:Object(o["translate"])("Goals_VisitPageTitle"),external_website:Object(o["translate"])("Goals_ClickOutlink"),event_action:"".concat(Object(o["translate"])("Goals_SendEvent")," (").concat(Object(o["translate"])("Events_EventAction"),")"),event_category:"".concat(Object(o["translate"])("Goals_SendEvent")," (").concat(Object(o["translate"])("Events_EventCategory"),")"),event_name:"".concat(Object(o["translate"])("Goals_SendEvent")," (").concat(Object(o["translate"])("Events_EventName"),")"),visit_duration:"".concat(this.ucfirst(Object(o["translate"])("Goals_VisitDuration")))}},beforeGoalListActionsBodyComponent:function(){var e=this;if(!this.beforeGoalListActionsBody)return{};var t={};return Object.values(this.goals).forEach((function(a){var n=e.beforeGoalListActionsBody[a.idgoal];n&&(t[a.idgoal]={template:n})})),Object(u["markRaw"])(t)},beforeGoalListActionsHeadComponent:function(){return this.beforeGoalListActionsHead?Object(u["markRaw"])({template:this.beforeGoalListActionsHead}):null},isManuallyTriggered:function(){return"manually"===this.triggerType},matchesExpressionExternal:function(){var e="'http://www.amazon.com\\/(.*)\\/yourAffiliateId'";return Object(o["translate"])("Goals_MatchesExpression",e)}}});ke.render=_e;var Ce=ke; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */}})})); //# sourceMappingURL=Goals.umd.min.js.map