1import{r as e,c as n,a,w as t,t as r,n as o}from"./CowmiXBc.js";var i=function(){return"undefined"!=typeof document&&"undefined"!=typeof window},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(n).forEach((function(a){e[a]=n[a]}))},l=e({property:null,isEnabled:!0,disableScriptLoader:!1,useDebugger:!1,globalObjectName:"gtag",dataLayerName:"dataLayer",resourceURL:"https://www.googletagmanager.com/gtag/js",preconnectOrigin:"https://www.googletagmanager.com",customResource:null,appName:null,appId:null,appVersion:null}),c=function(){return r(l)},v=n((function(){var e=c().property;if(e.value)return Array.isArray(e.value)?e.value.find((function(e){return!0===e.default}))||e.value[0]:e.value})),p=n((function(){var e=c().property;return Boolean(e.value&&null!==e.value.id)})),f=n((function(){var e=c().property;return Array.isArray(e.value)?e.value:[e.value]})),d=n((function(){var e=c().isEnabled,n=v.value;return Boolean(n&&n.id&&e.value)})),s=function(){var e;if(i()){for(var n=c(),a=n.globalObjectName,t=n.useDebugger,r=arguments.length,o=new Array(r),u=0;u<r;u++)o[u]=arguments[u];t.value,(e=window)[a.value].apply(e,o)}},g=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];f.value.forEach((function(e){s.apply(void 0,["config",e.id].concat(n))}))},w=function(e){g({custom_map:e})},h=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];i()&&f.value.forEach((function(n){window["ga-disable-".concat(n.id)]=e}))},m=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=Object.assign({},n);!a.send_to&&f.value.length>1&&(a.send_to=f.value.map((function(e){return e.id}))),s("event",e,a)},y=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];m.apply(void 0,["exception"].concat(n))},_=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];g.apply(void 0,["linker"].concat(n))},b=function(e){var n={};void 0===(n="string"==typeof e?{page_path:e,page_location:window.location.href}:e).send_page_view&&(n.send_page_view=!0),m("page_view",n)},A=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];m.apply(void 0,["purchase"].concat(n))},j=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];m.apply(void 0,["refund"].concat(n))},E=function(){for(var e=c(),n=e.appName,a=e.appId,t=e.appVersion,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var u=o[0],l={};null==(l="string"==typeof u?{screen_name:u}:u).app_name&&null!=n.value&&(l.app_name=n.value),null==l.app_id&&null!=a.value&&(l.app_id=a.value),null==l.app_version&&null!=t.value&&(l.app_version=t.value),m("screen_view",l)},N=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];s.apply(void 0,["set"].concat(n))},O=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];m.apply(void 0,["timing_complete"].concat(n))},L=Object.freeze({__proto__:null,config:g,customMap:w,disable:h,event:m,exception:y,linker:_,pageview:b,purchase:A,query:s,refund:j,screenview:E,set:N,time:O}),S=a(!1),k=a(!1),R=function(){var e=c(),n=e.disableScriptLoader,a=e.preconnectOrigin,t=e.resourceURL,r=e.dataLayerName;if(i()&&p.value&&!k.value)if(k.value=!0,f.value.forEach((function(e){var n=Object.assign({send_page_view:!1},e.params);s("config",e.id,n)})),n.value)S.value=!0;else{var o,u,l="".concat(t.value,"?id=").concat(v.value.id,"&l=").concat(r.value);(o=l,u=a.value,new Promise((function(e,n){var a=document.head||document.getElementsByTagName("head")[0],t=document.createElement("script");if(t.async=!0,t.src=o,t.charset="utf-8",u){var r=document.createElement("link");r.href=u,r.rel="preconnect",a.appendChild(r)}a.appendChild(t),t.onload=e,t.onerror=n}))).then((function(){S.value=!0}))}},P=e({template:null,useScreenview:!1,skipSamePath:!0}),x=function(){return r(P)},B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=x(),t=a.useScreenview;if(!a.skipSamePath.value||e.path!==n.path){var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=x(),t=a.template,r=a.useScreenview,o=t.value?t.value(e,n):null;return o||(r.value?{screen_name:e.name}:{page_title:e.name,page_path:e.path,page_location:window.location.href})}(e,n);t.value?E(r):b(r)}},D=function(e){u(P,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),t((function(){return d.value}),(function(n){n&&e.isReady().then((function(){o((function(){B(e.currentRoute.value)})),e.afterEach((function(e,n){o((function(){B(e,n)}))}))}))}),{immediate:!0})},C={install:function(e){u(l,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),function(){if(i()){var e=c(),n=e.globalObjectName,a=e.dataLayerName;null==window[n.value]&&(window[a.value]=window[a.value]||[],window[n.value]=function(){window[a.value].push(arguments)}
1),window[n.value]("js",new Date)}}(),t((function(){return d.value}),(function(e){return e&&R()}),{immediate:!0}),e.config.globalProperties.$gtag=L}};export{g as config,w as customMap,C as default,h as disable,m as event,y as exception,S as isReady,d as isTracking,_ as linker,b as pageview,A as purchase,s as query,j as refund,E as screenview,N as set,O as time,D as trackRouter,c as useState};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.