Changeset 2975488
- Timestamp:
- 10/06/2023 09:35:09 AM (2 years ago)
- Location:
- gtm-kit
- Files:
-
- 2 added
- 26 edited
- 1 copied
-
tags/1.14.1 (copied) (copied from gtm-kit/trunk)
-
tags/1.14.1/assets/admin/settings.asset.php (modified) (1 diff)
-
tags/1.14.1/assets/admin/settings.js (modified) (1 diff)
-
tags/1.14.1/assets/admin/wizard.asset.php (modified) (1 diff)
-
tags/1.14.1/assets/admin/wizard.js (modified) (1 diff)
-
tags/1.14.1/gtm-kit.php (modified) (2 diffs)
-
tags/1.14.1/inc/main.php (modified) (2 diffs)
-
tags/1.14.1/languages/gtm-kit.pot (modified) (8 diffs)
-
tags/1.14.1/readme.txt (modified) (3 diffs)
-
tags/1.14.1/src/Admin/AdminAPI.php (modified) (3 diffs)
-
tags/1.14.1/src/Admin/MetaBox.php (added)
-
tags/1.14.1/src/Frontend/Frontend.php (modified) (1 diff)
-
tags/1.14.1/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
tags/1.14.1/vendor/composer/autoload_static.php (modified) (1 diff)
-
tags/1.14.1/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/assets/admin/settings.asset.php (modified) (1 diff)
-
trunk/assets/admin/settings.js (modified) (1 diff)
-
trunk/assets/admin/wizard.asset.php (modified) (1 diff)
-
trunk/assets/admin/wizard.js (modified) (1 diff)
-
trunk/gtm-kit.php (modified) (2 diffs)
-
trunk/inc/main.php (modified) (2 diffs)
-
trunk/languages/gtm-kit.pot (modified) (8 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/src/Admin/AdminAPI.php (modified) (3 diffs)
-
trunk/src/Admin/MetaBox.php (added)
-
trunk/src/Frontend/Frontend.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_static.php (modified) (1 diff)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gtm-kit/tags/1.14.1/assets/admin/settings.asset.php
r2974164 r2975488 1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' efb35eb498fc3de72097');1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '492875e2cff4b97d6fff'); -
gtm-kit/tags/1.14.1/assets/admin/settings.js
r2974164 r2975488 1 !function(){"use strict";var t={n:function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},d:function(e,n){for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.wp.element,n=window.wp.components,a=window.lodash,i=window.wp.apiFetch, o=t.n(i);o().use(o().createNonceMiddleware(window.gtmkitSettings.nonce)),o().use(o().createRootURLMiddleware(window.gtmkitSettings.root));const r=async()=>{let t={};try{t=await o()({path:"gtmkit/v1/get-options",method:"POST"})}catch(t){return console.log("fetchSettings Errors:",t),{gtm_kit_settings_fetch_settings_errors:!0}}return!0===t.success?t.data:t},l=async()=>{let t={};try{t=await o()({path:"gtmkit/v1/get-site-data",method:"POST"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t};var s=window.wp.i18n,m=(t,e)=>{const n=Object.assign({},t);switch(e.type){case"FETCH_SETTINGS":n.fetchedSettings=e.payload.fetchedSettings,n.stateSettings=e.payload.stateSettings,n.siteData=e.payload.siteData,n.installData=e.payload.installData,n.isPending=!1,n.canSave=!1,void 0===e.payload.fetchedSettings.integrations&&(n.fetchedSettings.integrations={}),void 0!==e.payload.fetchedSettings.gtm_kit_settings_fetch_settings_errors&&(n.notice=(0,s.__)("An error occurred.","gtm-kit"),n.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":n.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":n.fetchedSettings=e.payload.fetchedSettings,n.stateSettings=e.payload.stateSettings,n.isPending=!1;let t=!1,a=(0,s.__)("Saved Successfully.","gtm-kit"),i=!1;void 0!==e.payload.fetchedSettings.gtm_kit_settings_update_settings_errors&&(t=!0,a=(0,s.__)("An error occurred.","gtm-kit"),i=!0),n.canSave=t,n.notice=a,n.hasError=i;break;case"UPDATE_STATE":e.payload.fetchedSettings&&(n.fetchedSettings=e.payload.fetchedSettings),e.payload.stateSettings&&(n.stateSettings=e.payload.stateSettings),void 0!==e.payload.isPending&&(n.isPending=e.payload.isPending),void 0!==e.payload.notice&&(n.notice=e.payload.notice),void 0!==e.payload.hasError&&(n.hasError=e.payload.hasError),void 0!==e.payload.canSave&&(n.canSave=e.payload.canSave)}return n};const c=(0,e.createContext)();var u,g=t=>{const[n,i]=(0,e.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:"",canSave:!1}),s=async()=>{const[t,e]=await Promise.all([r(),l()]),n="wizard"===window.gtmkitSettings.currentPage?await(async()=>{let t={};try{t=await o()({path:"gtmkit/v1/get-install-data",method:"POST"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t})():{};i({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:n}})},u=async t=>{i({type:"UPDATE_STATE",payload:t})};(0,e.useEffect)((()=>{s()}),[]);const g={useDispatch:t=>{i(t)},useUpdateSettings:async()=>{i({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(async t=>{let e={};try{e=await o()({path:"gtmkit/v1/set-options",method:"POST",data:t})}catch(t){return console.log("updateSettings Errors:",t),{gtm_kit_settings_update_settings_errors:!0}}return!0===e.success?e.data:e})(n.stateSettings);i({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:u,useUpdateStateSettings:async(t,e,i)=>{const o=JSON.parse(JSON.stringify(n.stateSettings));let r;o[t][e]=i,r=!(0,a.isEqual)(o,n.fetchedSettings),u({stateSettings:o,canSave:r})},useImportSettings:async(t,e)=>{const i=JSON.parse(JSON.stringify(n.stateSettings));let o;const r={};r.general={...i.general,...e.general},"integrations"in e&&(r.integrations={...i.integrations,...e.integrations}),o=!(0,a.isEqual)(r,n.fetchedSettings),u({stateSettings:r,canSave:o})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData};return(0,e.createElement)(c.Provider,{value:g},t.children)},d=window.React,p=t.n(d);function h(){return h=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},h.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(u||(u={}));const _="popstate";function k(t,e){if(!1===t||null==t)throw new Error(e)}function f(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function E(t,e){return{usr:t.state,key:t.key,idx:e}}function v(t,e,n,a){return void 0===n&&(n=null),h({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?y(e):e,{state:n,key:e&&e.key||a||Math.random().toString(36).substr(2,8)})}function b(t){let{pathname:e="/",search:n="",hash:a=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function y(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let a=t.indexOf("?");a>=0&&(e.search=t.substr(a),t=t.substr(0,a)),t&&(e.pathname=t)}return e}var x;function w(t,e,n){void 0===n&&(n="/");let a=L(("string"==typeof e?y(e):e).pathname||"/",n);if(null==a)return null;let i=S(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,n)=>t===e[n]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(i);let o=null;for(let t=0;null==o&&t<i.length;++t)o=M(i[t],A(a));return o}function S(t,e,n,a){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===a&&(a="");let i=(t,i,o)=>{let r={relativePath:void 0===o?t.path||"":o,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};r.relativePath.startsWith("/")&&(k(r.relativePath.startsWith(a),'Absolute route path "'+r.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),r.relativePath=r.relativePath.slice(a.length));let l=B([a,r.relativePath]),s=n.concat(r);t.children&&t.children.length>0&&(k(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),S(t.children,e,s,l)),(null!=t.path||t.index)&&e.push({path:l,score:R(l,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var n;if(""!==t.path&&null!=(n=t.path)&&n.includes("?"))for(let n of N(t.path))i(t,e,n);else i(t,e)})),e}function N(t){let e=t.split("/");if(0===e.length)return[];let[n,...a]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===a.length)return i?[o,""]:[o];let r=N(a.join("/")),l=[];return l.push(...r.map((t=>""===t?o:[o,t].join("/")))),i&&l.push(...r),l.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(x||(x={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const C=/^:\w+$/,T=3,P=2,G=1,I=10,D=-2,O=t=>"*"===t;function R(t,e){let n=t.split("/"),a=n.length;return n.some(O)&&(a+=D),e&&(a+=P),n.filter((t=>!O(t))).reduce(((t,e)=>t+(C.test(e)?T:""===e?G:I)),a)}function M(t,e){let{routesMeta:n}=t,a={},i="/",o=[];for(let t=0;t<n.length;++t){let r=n[t],l=t===n.length-1,s="/"===i?e:e.slice(i.length)||"/",m=U({path:r.relativePath,caseSensitive:r.caseSensitive,end:l},s);if(!m)return null;Object.assign(a,m.params);let c=r.route;o.push({params:a,pathname:B([i,m.pathname]),pathnameBase:F(B([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=B([i,m.pathnameBase]))}return o}function U(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[n,a]=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),f("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let a=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((t,e)=>(a.push(e),"/([^\\/]+)")));return t.endsWith("*")?(a.push("*"),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),a]}(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let o=i[0],r=o.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:a.reduce(((t,e,n)=>{if("*"===e){let t=l[n]||"";r=o.slice(0,o.length-t.length).replace(/(.)\/+$/,"$1")}return t[e]=function(t,e){try{return decodeURIComponent(t)}catch(n){return f(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),t}}(l[n]||"",e),t}),{}),pathname:o,pathnameBase:r,pattern:t}}function A(t){try{return decodeURI(t)}catch(e){return f(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function L(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,a=t.charAt(n);return a&&"/"!==a?null:t.slice(n)||"/"}function W(t,e,n,a){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(a)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function j(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}function H(t,e,n,a){let i;void 0===a&&(a=!1),"string"==typeof t?i=y(t):(i=h({},t),k(!i.pathname||!i.pathname.includes("?"),W("?","pathname","search",i)),k(!i.pathname||!i.pathname.includes("#"),W("#","pathname","hash",i)),k(!i.search||!i.search.includes("#"),W("#","search","hash",i)));let o,r=""===t||""===i.pathname,l=r?"/":i.pathname;if(a||null==l)o=n;else{let t=e.length-1;if(l.startsWith("..")){let e=l.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}o=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:n,search:a="",hash:i=""}="string"==typeof t?y(t):t,o=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)})),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:o,search:J(a),hash:K(i)}}(i,o),m=l&&"/"!==l&&l.endsWith("/"),c=(r||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const B=t=>t.join("/").replace(/\/\/+/g,"/"),F=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),J=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",K=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const z=["post","put","patch","delete"],$=(new Set(z),["get",...z]);function q(){return q=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},q.apply(this,arguments)}new Set($),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const V=d.createContext(null),Y=d.createContext(null),X=d.createContext(null),Q=d.createContext(null),Z=d.createContext({outlet:null,matches:[],isDataRoute:!1}),tt=d.createContext(null);function et(){return null!=d.useContext(Q)}function nt(){return et()||k(!1),d.useContext(Q).location}function at(t){d.useContext(X).static||d.useLayoutEffect(t)}function it(){let{isDataRoute:t}=d.useContext(Z);return t?function(){let{router:t}=function(t){let e=d.useContext(V);return e||k(!1),e}(ut.UseNavigateStable),e=dt(gt.UseNavigateStable),n=d.useRef(!1);return at((()=>{n.current=!0})),d.useCallback((function(a,i){void 0===i&&(i={}),n.current&&("number"==typeof a?t.navigate(a):t.navigate(a,q({fromRouteId:e},i)))}),[t,e])}():function(){et()||k(!1);let t=d.useContext(V),{basename:e,navigator:n}=d.useContext(X),{matches:a}=d.useContext(Z),{pathname:i}=nt(),o=JSON.stringify(j(a).map((t=>t.pathnameBase))),r=d.useRef(!1);return at((()=>{r.current=!0})),d.useCallback((function(a,l){if(void 0===l&&(l={}),!r.current)return;if("number"==typeof a)return void n.go(a);let s=H(a,JSON.parse(o),i,"path"===l.relative);null==t&&"/"!==e&&(s.pathname="/"===s.pathname?e:B([e,s.pathname])),(l.replace?n.replace:n.push)(s,l.state,l)}),[e,n,o,i,t])}()}function ot(t,e){let{relative:n}=void 0===e?{}:e,{matches:a}=d.useContext(Z),{pathname:i}=nt(),o=JSON.stringify(j(a).map((t=>t.pathnameBase)));return d.useMemo((()=>H(t,JSON.parse(o),i,"path"===n)),[t,o,i,n])}function rt(t,e,n){et()||k(!1);let{navigator:a}=d.useContext(X),{matches:i}=d.useContext(Z),o=i[i.length-1],r=o?o.params:{},l=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let s,m=nt();if(e){var c;let t="string"==typeof e?y(e):e;"/"===l||(null==(c=t.pathname)?void 0:c.startsWith(l))||k(!1),s=t}else s=m;let g=s.pathname||"/",p=w(t,{pathname:"/"===l?g:g.slice(l.length)||"/"}),h=function(t,e,n){var a;if(void 0===e&&(e=[]),void 0===n&&(n=null),null==t){var i;if(null==(i=n)||!i.errors)return null;t=n.matches}let o=t,r=null==(a=n)?void 0:a.errors;if(null!=r){let t=o.findIndex((t=>t.route.id&&(null==r?void 0:r[t.route.id])));t>=0||k(!1),o=o.slice(0,Math.min(o.length,t+1))}return o.reduceRight(((t,a,i)=>{let l=a.route.id?null==r?void 0:r[a.route.id]:null,s=null;n&&(s=a.route.errorElement||st);let m=e.concat(o.slice(0,i+1)),c=()=>{let e;return e=l?s:a.route.Component?d.createElement(a.route.Component,null):a.route.element?a.route.element:t,d.createElement(ct,{match:a,routeContext:{outlet:t,matches:m,isDataRoute:null!=n},children:e})};return n&&(a.route.ErrorBoundary||a.route.errorElement||0===i)?d.createElement(mt,{location:n.location,revalidation:n.revalidation,component:s,error:l,children:c(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):c()}),null)}(p&&p.map((t=>Object.assign({},t,{params:Object.assign({},r,t.params),pathname:B([l,a.encodeLocation?a.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:B([l,a.encodeLocation?a.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),i,n);return e&&h?d.createElement(Q.Provider,{value:{location:q({pathname:"/",search:"",hash:"",state:null,key:"default"},s),navigationType:u.Pop}},h):h}function lt(){let t=function(){var t;let e=d.useContext(tt),n=function(t){let e=d.useContext(Y);return e||k(!1),e}(gt.UseRouteError),a=dt(gt.UseRouteError);return e||(null==(t=n.errors)?void 0:t[a])}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},e),n?d.createElement("pre",{style:a},n):null,null)}const st=d.createElement(lt,null);class mt extends d.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error?d.createElement(Z.Provider,{value:this.props.routeContext},d.createElement(tt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ct(t){let{routeContext:e,match:n,children:a}=t,i=d.useContext(V);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),d.createElement(Z.Provider,{value:e},a)}var ut=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ut||{}),gt=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(gt||{});function dt(t){let e=function(t){let e=d.useContext(Z);return e||k(!1),e}(),n=e.matches[e.matches.length-1];return n.route.id||k(!1),n.route.id}function pt(t){let{to:e,replace:n,state:a,relative:i}=t;et()||k(!1);let{matches:o}=d.useContext(Z),{pathname:r}=nt(),l=it(),s=H(e,j(o).map((t=>t.pathnameBase)),r,"path"===i),m=JSON.stringify(s);return d.useEffect((()=>l(JSON.parse(m),{replace:n,state:a,relative:i})),[l,m,i,n,a]),null}function ht(t){k(!1)}function _t(t){let{basename:e="/",children:n=null,location:a,navigationType:i=u.Pop,navigator:o,static:r=!1}=t;et()&&k(!1);let l=e.replace(/^\/*/,"/"),s=d.useMemo((()=>({basename:l,navigator:o,static:r})),[l,o,r]);"string"==typeof a&&(a=y(a));let{pathname:m="/",search:c="",hash:g="",state:p=null,key:h="default"}=a,_=d.useMemo((()=>{let t=L(m,l);return null==t?null:{location:{pathname:t,search:c,hash:g,state:p,key:h},navigationType:i}}),[l,m,c,g,p,h,i]);return null==_?null:d.createElement(X.Provider,{value:s},d.createElement(Q.Provider,{children:n,value:_}))}function kt(t){let{children:e,location:n}=t;return rt(ft(e),n)}function ft(t,e){void 0===e&&(e=[]);let n=[];return d.Children.forEach(t,((t,a)=>{if(!d.isValidElement(t))return;let i=[...e,a];if(t.type===d.Fragment)return void n.push.apply(n,ft(t.props.children,i));t.type!==ht&&k(!1),t.props.index&&t.props.children&&k(!1);let o={id:t.props.id||i.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(o.children=ft(t.props.children,i)),n.push(o)})),n}function Et(){return Et=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Et.apply(this,arguments)}function vt(t,e){if(null==t)return{};var n,a,i={},o=Object.keys(t);for(a=0;a<o.length;a++)n=o[a],e.indexOf(n)>=0||(i[n]=t[n]);return i}d.startTransition,new Promise((()=>{})),d.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const bt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],yt=["aria-current","caseSensitive","className","end","style","to","children"],xt=d.startTransition;function wt(t){let{basename:e,children:n,future:a,window:i}=t,o=d.useRef();var r;null==o.current&&(o.current=(void 0===(r={window:i,v5Compat:!0})&&(r={}),function(t,e,n,a){void 0===a&&(a={});let{window:i=document.defaultView,v5Compat:o=!1}=a,r=i.history,l=u.Pop,s=null,m=c();function c(){return(r.state||{idx:null}).idx}function g(){l=u.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:l,location:p.location,delta:e})}function d(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof t?t:b(t);return k(e,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,e)}null==m&&(m=0,r.replaceState(h({},r.state,{idx:m}),""));let p={get action(){return l},get location(){return t(i,r)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(_,g),s=t,()=>{i.removeEventListener(_,g),s=null}},createHref(t){return e(i,t)},createURL:d,encodeLocation(t){let e=d(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){l=u.Push;let a=v(p.location,t,e);n&&n(a,t),m=c()+1;let g=E(a,m),d=p.createHref(a);try{r.pushState(g,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(d)}o&&s&&s({action:l,location:p.location,delta:1})},replace:function(t,e){l=u.Replace;let a=v(p.location,t,e);n&&n(a,t),m=c();let i=E(a,m),g=p.createHref(a);r.replaceState(i,"",g),o&&s&&s({action:l,location:p.location,delta:0})},go(t){return r.go(t)}};return p}((function(t,e){let{pathname:n="/",search:a="",hash:i=""}=y(t.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),v("",{pathname:n,search:a,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let n=t.document.querySelector("base"),a="";if(n&&n.getAttribute("href")){let e=t.location.href,n=e.indexOf("#");a=-1===n?e:e.slice(0,n)}return a+"#"+("string"==typeof e?e:b(e))}),(function(t,e){f("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),r)));let l=o.current,[s,m]=d.useState({action:l.action,location:l.location}),{v7_startTransition:c}=a||{},g=d.useCallback((t=>{c&&xt?xt((()=>m(t))):m(t)}),[m,c]);return d.useLayoutEffect((()=>l.listen(g)),[l,g]),d.createElement(_t,{basename:e,children:n,location:s.location,navigationType:s.action,navigator:l})}const St="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Nt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ct=d.forwardRef((function(t,e){let n,{onClick:a,relative:i,reloadDocument:o,replace:r,state:l,target:s,to:m,preventScrollReset:c}=t,u=vt(t,bt),{basename:g}=d.useContext(X),p=!1;if("string"==typeof m&&Nt.test(m)&&(n=m,St))try{let t=new URL(window.location.href),e=m.startsWith("//")?new URL(t.protocol+m):new URL(m),n=L(e.pathname,g);e.origin===t.origin&&null!=n?m=n+e.search+e.hash:p=!0}catch(t){}let h=function(t,e){let{relative:n}=void 0===e?{}:e;et()||k(!1);let{basename:a,navigator:i}=d.useContext(X),{hash:o,pathname:r,search:l}=ot(t,{relative:n}),s=r;return"/"!==a&&(s="/"===r?a:B([a,r])),i.createHref({pathname:s,search:l,hash:o})}(m,{relative:i}),_=function(t,e){let{target:n,replace:a,state:i,preventScrollReset:o,relative:r}=void 0===e?{}:e,l=it(),s=nt(),m=ot(t,{relative:r});return d.useCallback((e=>{if(function(t,e){return!(0!==t.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t))}(e,n)){e.preventDefault();let n=void 0!==a?a:b(s)===b(m);l(t,{replace:n,state:i,preventScrollReset:o,relative:r})}}),[s,l,m,a,i,n,t,o,r])}(m,{replace:r,state:l,target:s,preventScrollReset:c,relative:i});return d.createElement("a",Et({},u,{href:n||h,onClick:p||o?a:function(t){a&&a(t),t.defaultPrevented||_(t)},ref:e,target:s}))})),Tt=d.forwardRef((function(t,e){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:o=!1,style:r,to:l,children:s}=t,m=vt(t,yt),c=ot(l,{relative:m.relative}),u=nt(),g=d.useContext(Y),{navigator:p}=d.useContext(X),h=p.encodeLocation?p.encodeLocation(c).pathname:c.pathname,_=u.pathname,k=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;a||(_=_.toLowerCase(),k=k?k.toLowerCase():null,h=h.toLowerCase());let f,E=_===h||!o&&_.startsWith(h)&&"/"===_.charAt(h.length),v=null!=k&&(k===h||!o&&k.startsWith(h)&&"/"===k.charAt(h.length)),b=E?n:void 0;f="function"==typeof i?i({isActive:E,isPending:v}):[i,E?"active":null,v?"pending":null].filter(Boolean).join(" ");let y="function"==typeof r?r({isActive:E,isPending:v}):r;return d.createElement(Ct,Et({},m,{"aria-current":b,className:f,ref:e,style:y,to:l}),"function"==typeof s?s({isActive:E,isPending:v}):s)}));var Pt,Gt;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher"})(Pt||(Pt={})),function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Gt||(Gt={}));var It=({to:t,title:n})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Tt,{to:t,className:({isActive:t})=>"gtmkit-border-b-4 gtmkit-border-white gtmkit-text-color-grey gtmkit-font-semibold gtmkit-pt-5 gtmkit-pb-[18px] hover:gtmkit-border-color-grey "+(t?"gtmkit-text-color-heading gtmkit-border-b-color-primary ":"")},n)),Dt=({page:t})=>(0,e.createElement)("nav",{className:"gtmkit-flex gtmkit-items-center gtmkit-px-8 gtmkit-border-y gtmkit-bg-white gtmkit-border-color-border gtmkit-text-sm gtmkit-space-x-8"},function({page:t}){const e=[{to:"general",title:(0,s.__)("Dashboard","gtm-kit")},{to:"container",title:(0,s.__)("Container","gtm-kit")},{to:"post-data",title:(0,s.__)("Post data","gtm-kit")},{to:"user-data",title:(0,s.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,s.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,s.__)("Misc","gtm-kit")},{to:"whats-new",title:(0,s.__)("What's New","gtm-kit")}],n=[{to:"integrations",title:(0,s.__)("Integrations","gtm-kit")},{to:"woocommerce",title:"WooCommerce"},{to:"cf7",title:"Contact Form 7"},{to:"edd",title:"Easy Digital Downloads"}],a=[{to:"help",title:(0,s.__)("Help","gtm-kit")},{to:"support",title:(0,s.__)("Support","gtm-kit")}];switch(t){case"general":return e;case"integrations":return n;case"help":return a}}({page:t}).map((function(t){return(0,e.createElement)(It,{to:t.to,title:t.title})}))),Ot=({page:t})=>{let n=(0,s.__)("Settings","gtm-kit");switch(t){case"general":n=(0,s.__)("Settings","gtm-kit");break;case"integrations":n=(0,s.__)("Integrations","gtm-kit");break;case"help":n=(0,s.__)("Help","gtm-kit")}return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,e.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,e.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,e.createElement)("path",{d:"m88.659 7.002h-49.266c-2.915 0-5.378-.184-9.23 2.596l-18.743 12.752c-4.549 3.292-4.571 6.001 0 9.302l18.743 12.751c3.652 2.646 6.299 2.597 9.23 2.597h15.686 33.58c2.931-.057 5.394-1.784 5.34-3.923v-32.21c-.012-2.134-2.409-3.865-5.34-3.865z",fill:"#3969bb",transform:"matrix(-1 0 0 -1 101.999867 53.999547)"}),(0,e.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,e.createElement)("path",{d:"m18.316 23.086h4.632v6.052c-.75.245-1.459.415-2.121.514-.663.098-1.341.148-2.033.148-1.764 0-3.106-.517-4.035-1.554-.929-1.034-1.395-2.519-1.395-4.457 0-1.886.538-3.356 1.617-4.41 1.078-1.054 2.573-1.579 4.481-1.579 1.2 0 2.357.239 3.469.718l-.823 1.979c-.85-.425-1.737-.637-2.657-.637-1.071 0-1.932.358-2.572 1.077-.645.718-.968 1.685-.968 2.899 0 1.267.26 2.233.78 2.904.516.667 1.271.999 2.262.999.517 0 1.041-.052 1.572-.158v-2.435h-2.209zm11.912 6.555h-2.474v-9.614h-3.173v-2.06h8.816v2.06h-3.169zm9.908 0-2.811-9.158h-.072c.103 1.863.154 3.105.154 3.728v5.43h-2.213v-11.674h3.368l2.764 8.927h.048l2.934-8.927h3.369v11.674h-2.308v-5.525c0-.261 0-.561.009-.903.009-.341.048-1.246.112-2.716h-.074l-3.011 9.144z"}),(0,e.createElement)("path",{d:"m88.883 31.898h-3.811l-4.147-6.67-1.417 1.018v5.652h-3.357v-15.83h3.357v7.242l1.318-1.861 4.293-5.381h3.724l-5.523 7.006zm1.589-15.233c0-1.075.6-1.614 1.8-1.614 1.199 0 1.798.539 1.798 1.614 0 .512-.148.91-.45 1.196-.297.284-.749.429-1.348.429-1.2 0-1.8-.543-1.8-1.625zm3.449 15.233h-3.302v-12.104h3.302zm8.563-2.413c.578 0 1.271-.128 2.077-.38v2.456c-.82.37-1.831.552-3.031.552-1.324 0-2.28-.333-2.885-1.001-.602-.667-.902-1.668-.902-3.003v-5.835h-1.585v-1.399l1.823-1.103.949-2.557h2.115v2.579h3.388v2.48h-3.388v5.835c0 .467.129.815.393 1.041.264.222.614.335 1.046.335z"}))),n))),(0,e.createElement)(Dt,{page:t}))};function Rt(){return Rt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Rt.apply(this,arguments)}function Mt(t,e){if(null==t)return{};var n,a,i={},o=Object.keys(t);for(a=0;a<o.length;a++)n=o[a],e.indexOf(n)>=0||(i[n]=t[n]);return i}function Ut(t,e){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ut(t,e)}function At(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ut(t,e)}function Lt(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Wt=window.ReactDOM,jt=t.n(Wt),Ht=p().createContext(null),Bt=function(t){return t.scrollTop},Ft="unmounted",Jt="exited",Kt="entering",zt="entered",$t="exiting",qt=function(t){function e(e,n){var a;a=t.call(this,e,n)||this;var i,o=n&&!n.isMounting?e.enter:e.appear;return a.appearStatus=null,e.in?o?(i=Jt,a.appearStatus=Kt):i=zt:i=e.unmountOnExit||e.mountOnEnter?Ft:Jt,a.state={status:i},a.nextCallback=null,a}At(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Ft?{status:Jt}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==Kt&&n!==zt&&(e=Kt):n!==Kt&&n!==zt||(e=$t)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,n,a=this.props.timeout;return t=e=n=a,null!=a&&"number"!=typeof a&&(t=a.exit,e=a.enter,n=void 0!==a.appear?a.appear:e),{exit:t,enter:e,appear:n}},n.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e)if(this.cancelNextCallback(),e===Kt){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:jt().findDOMNode(this);n&&Bt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jt&&this.setState({status:Ft})},n.performEnter=function(t){var e=this,n=this.props.enter,a=this.context?this.context.isMounting:t,i=this.props.nodeRef?[a]:[jt().findDOMNode(this),a],o=i[0],r=i[1],l=this.getTimeouts(),s=a?l.appear:l.enter;t||n?(this.props.onEnter(o,r),this.safeSetState({status:Kt},(function(){e.props.onEntering(o,r),e.onTransitionEnd(s,(function(){e.safeSetState({status:zt},(function(){e.props.onEntered(o,r)}))}))}))):this.safeSetState({status:zt},(function(){e.props.onEntered(o)}))},n.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:jt().findDOMNode(this);e?(this.props.onExit(a),this.safeSetState({status:$t},(function(){t.props.onExiting(a),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Jt},(function(){t.props.onExited(a)}))}))}))):this.safeSetState({status:Jt},(function(){t.props.onExited(a)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(a){n&&(n=!1,e.nextCallback=null,t(a))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:jt().findDOMNode(this),a=null==t&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],r=i[1];this.props.addEndListener(o,r)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Ft)return null;var e=this.props,n=e.children,a=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,Mt(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return p().createElement(Ht.Provider,{value:null},"function"==typeof n?n(t,a):p().cloneElement(p().Children.only(n),a))},e}(p().Component);function Vt(){}qt.contextType=Ht,qt.propTypes={},qt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Vt,onEntering:Vt,onEntered:Vt,onExit:Vt,onExiting:Vt,onExited:Vt},qt.UNMOUNTED=Ft,qt.EXITED=Jt,qt.ENTERING=Kt,qt.ENTERED=zt,qt.EXITING=$t;var Yt=qt,Xt=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return a=e,void((n=t).classList?n.classList.remove(a):"string"==typeof n.className?n.className=Lt(n.className,a):n.setAttribute("class",Lt(n.className&&n.className.baseVal||"",a)));var n,a}))},Qt=function(t){function e(){for(var e,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var a=e.resolveArguments(t,n),i=a[0],o=a[1];e.removeClasses(i,"exit"),e.addClass(i,o?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var a=e.resolveArguments(t,n),i=a[0],o=a[1]?"appear":"enter";e.addClass(i,o,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var a=e.resolveArguments(t,n),i=a[0],o=a[1]?"appear":"enter";e.removeClasses(i,o),e.addClass(i,o,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,a="string"==typeof n,i=a?(a&&n?n+"-":"")+t:n[t];return{baseClassName:i,activeClassName:a?i+"-active":n[t+"Active"],doneClassName:a?i+"-done":n[t+"Done"]}},e}At(e,t);var n=e.prototype;return n.addClass=function(t,e,n){var a=this.getClassNames(e)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===n&&i&&(a+=" "+i),"active"===n&&t&&Bt(t),a&&(this.appliedClasses[e][n]=a,function(t,e){t&&e&&e.split(" ").forEach((function(e){return a=e,void((n=t).classList?n.classList.add(a):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(n,a)||("string"==typeof n.className?n.className=n.className+" "+a:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+a)));var n,a}))}(t,a))},n.removeClasses=function(t,e){var n=this.appliedClasses[e],a=n.base,i=n.active,o=n.done;this.appliedClasses[e]={},a&&Xt(t,a),i&&Xt(t,i),o&&Xt(t,o)},n.render=function(){var t=this.props,e=(t.classNames,Mt(t,["classNames"]));return p().createElement(Yt,Rt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(p().Component);Qt.defaultProps={classNames:""},Qt.propTypes={};var Zt=Qt,te=({title:t=(0,s.__)("Save","gtm-kit"),className:a="gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey"})=>{const{useUpdateSettings:i,useIsPending:o,useCanSave:r}=(0,e.useContext)(c);return(0,e.createElement)(n.Button,{className:a,onClick:()=>i(),variant:"primary",disabled:o||!r},r?(0,s.__)(t,"gtm-kit"):(0,s.__)("Saved","gtm-kit"),o?(0,e.createElement)(n.Spinner,null):"")},ee=()=>{const{useCanSave:t}=(0,e.useContext)(c);return(0,e.createElement)(Zt,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0},(0,e.createElement)("footer",{className:"gtmkit-fixed gtmkit-bottom-0 gtmkit-w-full gtmkit-z-10 gtmkit-bg-color-grey gtmkit-text-white gtmkit-p-8"},(0,e.createElement)(te,null)))},ne=({subject:t})=>{const n=!0===t||"on"===t,a=!0===n?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,e.createElement)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase "+a},n?(0,s.__)("Active","gtm-kit"):(0,s.__)("Inactive","gtm-kit"))};const ae=(0,e.forwardRef)((({children:t,className:n="",...a},i)=>(0,e.createElement)("div",{...a,className:"gtmkit-min-h-[128px] gtmkit-bg-white gtmkit-border gtmkit-border-color-border gtmkit-mb-6 gtmkit-py-4 gtmkit-px-5 gtmkit-rounded gtmkit-group gtmkit-w-full "+n,ref:i},t)));ae.Header=({as:t="h3",title:n="",children:a,className:i="",...o})=>(0,e.createElement)("div",{...o,className:"gtmkit-flex gtmkit-justify-between gtmkit-mb-5 "+i},(0,e.createElement)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},n),a),ae.Content=({as:t="div",children:n,className:a="group-hover:gtmkit-hidden",...i})=>(0,e.createElement)(t,{...i,className:a},n),ae.Button=({url:t,destination:a,newTab:i=!1,text:o,group:r="",...l})=>{const s=it();return(0,e.createElement)("div",{...l,className:"gtmkit-hidden group-hover:gtmkit-block"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full",onClick:()=>{a&&t&&!1===i?window.gtmkitSettings.current_poage===r?s(a,{replace:!0}):window.location.href=t+"#"+a:t?i?window.open(t):window.location.href=t:s(a,{replace:!0})}},(0,e.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},o)))};var ie=ae,oe=({title:t,data:n,className:a=""})=>{const{useSettings:i}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},t),(0,e.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px] "+a},n.map((t=>!1===t.featured?null:(0,e.createElement)(ie,null,(0,e.createElement)(ie.Header,{title:t.title},t.pill?(0,e.createElement)(ne,{subject:i[t.group][t.option]}):null),(0,e.createElement)(ie.Content,null,t.text.map(((t,n)=>(0,e.createElement)("p",{key:n},t)))),(0,e.createElement)(ie.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,s.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group}))))))};const re=[{title:"Woocommerce",pill:!0,group:"integrations",option:"woocommerce_integration",text:[(0,s.__)("The #1 open source eCommerce platform built for WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/woocommerce",text:(0,s.__)("Setup integration","gtm-kit")}},{title:"Contact Form 7",pill:!0,group:"integrations",option:"cf7_integration",text:[(0,s.__)("Just another contact form plugin for WordPress. Simple but flexible","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/cf7",text:(0,s.__)("Setup integration","gtm-kit")}},{title:"Easy Digital Downloads",pill:!0,group:"integrations",option:"edd_integration",text:[(0,s.__)("Easy way to sell Digital Products With WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/edd",text:(0,s.__)("Setup integration","gtm-kit")}}],le=[{title:"Getting started with GTM Kit",text:[(0,s.__)("How to get the most out of Google Tag Manager with GTM Kit.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!0},{title:(0,s.__)("WooCommerce integration","gtm-kit"),text:[(0,s.__)("Integrate WooCommerce with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=dashboard-tutorials"},featured:!0},{title:"Contact Form 7 Integration",text:[(0,s.__)("Integrate Contact Form 7 with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/contact-form-7-integration/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Easy Digital Downloads integration",text:[(0,s.__)("Integrate Easy Digital Downloads with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/set-up-easy-digital-downloads-for-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Advanced GTM container implementation",text:[(0,s.__)("Customization of the GTM container implementation and Server Side Tracking.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Settings, actions and filters for developers",text:[(0,s.__)("One of the things that makes GTM Kit a great tool for developers is the ability to override options in wp-config.php.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1}];var se=()=>{const{useSettings:t}=(0,e.useContext)(c),n=le;return n.push({title:(0,s.__)("See all tutorials…","gtm-kit"),text:[(0,s.__)("See all our tutorial and get the most out of GTM Kit","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=documentation&utm_content=dashboard-tutorials",text:(0,s.__)("Read articles","gtm-kit")},featured:!0}),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Status","gtm-kit")),(0,e.createElement)("div",{className:"lg:gtmkit-flex lg:gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px]"},(0,e.createElement)(ie,{className:"lg:gtmkit-w-1/2 2xl:gtmkit-w-1/3"},(0,e.createElement)(ie.Header,{title:"Google Tag Manager Container"},(0,e.createElement)(ne,{subject:t.general.gtm_id&&t.general.container_active})),(0,e.createElement)(ie.Content,null,t.general.gtm_id&&t.general.container_active?(0,e.createElement)("p",null,(0,s.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id):(0,e.createElement)("p",null,(0,s.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,e.createElement)(ie.Button,{destination:"/container",text:(0,s.__)("Edit container","gtm-kit")})),(0,e.createElement)(ie,{className:"lg:gtmkit-w-1/2 2xl:gtmkit-w-1/3"},(0,e.createElement)(ie.Header,{title:(0,s.__)("Help improve GTM Kit","gtm-kit")},(0,e.createElement)(ne,{subject:t.general.analytics_active})),(0,e.createElement)(ie.Content,null,(0,e.createElement)("p",null,(0,s.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,e.createElement)(ie.Button,{destination:"/misc",text:(0,s.__)("Share anonymous data","gtm-kit")}))),(0,e.createElement)(oe,{title:(0,s.__)("Tutorials","gtm-kit"),data:n}),(0,e.createElement)(oe,{title:(0,s.__)("Integrations","gtm-kit"),data:re}))},me=({title:t,placeholder:a,help:i,className:o="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:r="general",optionName:l,pluginInactive:s})=>{const{useSettings:m,useUpdateStateSettings:u}=(0,e.useContext)(c);return(0,e.createElement)(n.TextControl,{label:t,placeholder:a,help:i,className:o,value:m&&m[r][l],onChange:t=>u(r,l,t),disabled:s})},ce=({title:t,label:a,optionGroup:i="general",optionName:o,disabled:r=!1})=>{const{useSettings:l,useUpdateStateSettings:s}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,e.createElement)(n.BaseControl,{label:t},(0,e.createElement)(n.ToggleControl,{label:a,checked:!r&&l[i][o],onChange:()=>{s(i,o,!(l&&l[i][o]))},disabled:r}))))},ue=({title:t,options:a,help:i,className:o="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:r="general",optionName:l,disabled:s})=>{const{useSettings:m,useUpdateStateSettings:u}=(0,e.useContext)(c);return(0,e.createElement)(n.RadioControl,{label:t,options:a,help:i,className:o,selected:parseInt(m[r][l]),onChange:t=>u(r,l,t),disabled:s})},ge=({pluginName:t})=>(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.sprintf)((0,s.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,s.sprintf)((0,s.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)),(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-sm disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.pluginInstallUrl+t}},(0,s.sprintf)((0,s.__)("Install %s","gtm-kit"),t))));const de=(0,e.forwardRef)((({children:t,className:n="",disabled:a=!1,...i},o)=>(0,e.createElement)("div",{...i,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-w-3/4 gtmkit-border-color-grey "+n+(a?"gtmkit-opacity-60":""),ref:o},t)));de.Header=({as:t="h3",title:n="",children:a,className:i="",...o})=>(0,e.createElement)(t,{...o,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey "+i},n,a),de.Content=({as:t="div",children:n,className:a="",...i})=>(0,e.createElement)(t,{...i,className:"gtmkit-px-8 gtmkit-py-6 "+a},n);var pe=de,he=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Google Tag Manager container","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Tag Manager container code","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,s.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")),(0,e.createElement)(me,{title:(0,s.__)("Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,s.__)("Enter Container ID","gtm-kit")}),(0,e.createElement)(ce,{title:(0,s.__)("Inject Container Code","gtm-kit"),label:(0,s.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active"}),(0,e.createElement)(ce,{title:(0,s.__)("Just the container","gtm-kit"),label:(0,s.__)("Setting this to On will reduce the functionality to just the GTM container code. No additional data will be pushed to the datalayer regardless of any other settings.","gtm-kit"),optionName:"just_the_container"}),(0,e.createElement)(me,{title:(0,s.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,s.__)("The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do.","gtm-kit")}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("GTM Server Side","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(me,{title:(0,s.__)("GTM Server Side Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,s.__)("Enter domain …","gtm-kit"),help:(0,s.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit")}),(0,e.createElement)(me,{title:(0,s.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,s.__)("Enter loader name …","gtm-kit"),help:(0,s.__)("Only use if you are using a custom loader.","gtm-kit")}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Container Code Implementation","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:(0,s.__)("Container code implementation:","gtm-kit"),options:[{label:(0,s.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,s.__)("Load container when browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,s.__)("Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle.","gtm-kit"),optionName:"script_implementation"}),(0,e.createElement)(ue,{title:(0,s.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,s.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,s.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,s.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,s.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,s.__)('The preferred method to implement the <noscript> container code is just after the opening <body> tag. This requires that your theme uses the "body_open" hook. If your theme does not support this the script can be injected in the footer or you can use the function below.',"gtm-kit"),optionName:"noscript_implementation"}),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,e.createElement)("code",null,"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"))))),_e=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Post Data","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Post Data Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,s.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")),(0,e.createElement)(ce,{title:(0,s.__)("Post type","gtm-kit"),id:"post-type",label:(0,s.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type"}),(0,e.createElement)(ce,{title:(0,s.__)("Page type","gtm-kit"),id:"page-type",label:(0,s.__)('Include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. "campaign".',"gtm-kit"),optionName:"datalayer_page_type"}),(0,e.createElement)(ce,{title:(0,s.__)("Categories","gtm-kit"),id:"categories",label:(0,s.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories"}),(0,e.createElement)(ce,{title:(0,s.__)("Tags","gtm-kit"),id:"tags",label:(0,s.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags"}),(0,e.createElement)(ce,{title:(0,s.__)("Post title","gtm-kit"),id:"post-title",label:(0,s.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title"}),(0,e.createElement)(ce,{title:(0,s.__)("Post ID","gtm-kit"),id:"post-id",label:(0,s.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id"}),(0,e.createElement)(ce,{title:(0,s.__)("Post data","gtm-kit"),id:"post-date",label:(0,s.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date"}),(0,e.createElement)(ce,{title:(0,s.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,s.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name"}),(0,e.createElement)(ce,{title:(0,s.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,s.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id"})))),ke=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("User Data","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,s.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,e.createElement)("p",null,(0,s.__)("Full page caching will cache user data making it the same for all users. There are ways around this, but it depends on the chosen cache solution and is only for advanced users.","gtm-kit")))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("User Data Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,s.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in"}),(0,e.createElement)(ce,{title:(0,s.__)("User ID","gtm-kit"),id:"user-id",label:(0,s.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id"}),(0,e.createElement)(ce,{title:(0,s.__)("User role","gtm-kit"),id:"user-role",label:(0,s.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role"})))),fe=()=>{const{useSettings:t}=(0,e.useContext)(c),n=!t.general.gcm_default_settings;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Google Consent Mode","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Consent Mode Activation","gtm-kit")},(0,e.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,s.__)("Warning!","gtm-kit"))),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,s.__)("Most Consent Management Platforms will handle the Google Consent Mode settings for you and applying the default settings in both GTM Kit and you CMP will lead to unexpected behaviour or errors.","gtm-kit")),(0,e.createElement)("p",null,(0,s.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")),(0,e.createElement)("p",{className:"!gtmkit-mt-4"},(0,s.__)("GTM Kit will only set the default Consent Mode settings and you must update the settings yourself when the user has given consent.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,e.createElement)("a",{href:"https://developers.google.com/tag-platform/security/guides/consent#implementation_example",target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline gtmkit-font-semibold"},(0,s.__)("See an example of how consent is updated","gtm-kit"))),(0,e.createElement)(ce,{title:(0,s.__)("Activate GCM settings","gtm-kit"),label:(0,s.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings"}))),(0,e.createElement)(pe,{disabled:n},(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Ad Storage","gtm-kit"),label:(0,s.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Analytics Storage","gtm-kit"),label:(0,s.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Functionality Storage","gtm-kit"),label:(0,s.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Personalization Storage","gtm-kit"),label:(0,s.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Security Storage","gtm-kit"),label:(0,s.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:n}))))},Ee=({label:t,value:n,tag:a})=>(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,e.createElement)("strong",null,t)),(0,e.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===a?(0,e.createElement)("code",{className:"gtmkit-text-sm"},n):(0,e.createElement)("em",null,n))),ve=()=>{const{useSiteData:t}=(0,e.useContext)(c),n=Object.values(t.shared_data);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,s.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,s.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,e.createElement)("tbody",{className:"gtmkit-py-6"},n.map((function(t){return(0,e.createElement)(Ee,{label:t.label,value:t.value,tag:t.tag})})))))},be=()=>{const{}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Misc","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Help improve GTM Kit","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ve,null),(0,e.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,s.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,e.createElement)(ce,{title:(0,s.__)("Share anonymous data","gtm-kit"),label:(0,s.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active"}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Logging and debugging","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Console log","gtm-kit"),label:(0,s.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log"}))))};const ye=[{version:"1.14",title:(0,s.__)("New Admin GUI","gtm-kit"),slug:"gtm-kit-1-14",text:[(0,s.__)("There is a new admin GUI based on WordPress components and the admin is now more extendable.","gtm-kit"),(0,s.__)("The autoload of options has been optimized for better performance.","gtm-kit")]},{version:"1.13",title:(0,s.__)("Google Consent Mode default settings for sites not using a Consent Management Platform","gtm-kit"),slug:"gtm-kit-1-13",text:[(0,s.__)("Not all sites are using Consent Management Platform to handle user consent , and we now allow those sites to set the default Consent Mode settings.","gtm-kit"),(0,s.__)("We have put a lot of work in to improving the code quality and improving the compliance with WordPress Coding Standards.","gtm-kit")]},{version:"1.12",title:(0,s.__)("Improved support for the WooCommerce cart and checkout blocks","gtm-kit"),slug:"gtm-kit-1-12",text:[(0,s.__)("The new WooCommerce blocks evolve with every release of WooCommerce, and we are thrilled to announce that GTM Kit now support the cart and checkout blocks using the native WooCommerce events.","gtm-kit"),(0,s.__)("Using the native JavaScript events is a much more reliable method than trying to parse the HTML which is subject to design changes.","gtm-kit")]},{version:"1.11",title:(0,s.__)("GTM container import files","gtm-kit"),slug:"gtm-kit-1-11",text:[(0,s.__)("We have added a help section with Google Tag Manager import files that will help you configure GTM quickly.","gtm-kit"),(0,s.__)("The first import files cover Google Analytics 4 but more will follow.","gtm-kit")]}];var xe=({version:t,title:n,slug:a,text:i})=>{const o=encodeURI("https://gtmkit.com/"+a+"/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=changelog&utm_content=release-notes-"+t);return(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:t+": "+n}),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-1"},i.map(((t,n)=>(0,e.createElement)("p",{key:n},t))),(0,e.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-mt-4"},(0,e.createElement)("a",{href:o,target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline"},(0,s.__)("Read about all the other change in the release Notes","gtm-kit")))))},we=()=>{const{useSiteData:t}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("What's New","gtm-kit")),ye.map((function(t){return(0,e.createElement)(xe,{version:t.version,title:t.title,slug:t.slug,text:t.text})})),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Older releases","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",null,(0,e.createElement)("a",{href:"https://gtmkit.com/changelog/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=changelog&utm_content=whtats-new",target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline"},(0,s.__)("Changelog","gtm-kit"))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center"},(0,e.createElement)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2"},"(",(0,s.__)("Version:","gtm-kit")," ",t.gtmkit_version,")")),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",null,(0,s.__)("The plugin is open source (GPL v3 license) and contributions are welcome:","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-text-color-primary gtmkit-ml-2 hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,s.__)("GTM Kit Repository","gtm-kit"))))))},Se=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(oe,{title:(0,s.__)("Integrations","gtm-kit"),data:re})),Ne=({title:t,options:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:o="general",optionName:r,disabled:l=!1,help:m="",notSet:u=!1})=>{const{useSettings:g,useUpdateStateSettings:d}=(0,e.useContext)(c),p=u?[{label:(0,s.__)("(not set)","gtm-kit"),value:""},...a]:a;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.SelectControl,{label:t,value:g&&g[o][r],options:p,className:i,onChange:t=>d(o,r,t),disabled:l,help:m}))},Ce=({pluginName:t,optionName:n,pluginInactive:a})=>(0,e.createElement)(pe,{disabled:a},(0,e.createElement)(pe.Header,{title:(0,s.sprintf)((0,s.__)("%s Integration","gtm-kit"),t)}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.sprintf)((0,s.__)("Track %s","gtm-kit"),t),label:(0,s.sprintf)((0,s.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:n,disabled:a})));const Te=[{label:(0,s.__)("Retail","gtm-kit"),value:"retail"},{label:(0,s.__)("Education","gtm-kit"),value:"education"},{label:(0,s.__)("Flights","gtm-kit"),value:"flights"},{label:(0,s.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,s.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,s.__)("Local deals","gtm-kit"),value:"local"},{label:(0,s.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,s.__)("Travel","gtm-kit"),value:"travel"},{label:(0,s.__)("Custom","gtm-kit"),value:"custom"}];var Pe=()=>{const{useSettings:t}=(0,e.useContext)(c),n="WooCommerce",a=!window.gtmkitSettings.plugins.woocommerce,i=a||!t.integrations.woocommerce_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("WooCommerce","gtm-kit")),a?(0,e.createElement)(ge,{pluginName:n}):null,(0,e.createElement)(Ce,{pluginName:n,optionName:"woocommerce_integration",pluginInactive:a}),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Basic settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(Ne,{title:(0,s.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,s.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Use SKU instead of ID","gtm-kit"),label:(0,s.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_use_sku",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Exclude tax","gtm-kit"),label:(0,s.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Exclude shipping from revenue","gtm-kit"),label:(0,s.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Include customer data","gtm-kit"),label:(0,s.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_customer_data",disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Event customization","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:"view_item",options:[{label:(0,s.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,s.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,s.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,s.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:i}),(0,e.createElement)(ue,{title:"add_shipping_info ",options:[{label:(0,s.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,s.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,s.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,s.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:i}),(0,e.createElement)(ue,{title:"add_payment_info ",options:[{label:(0,s.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,s.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,s.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,s.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(Ne,{title:(0,s.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Te,help:(0,s.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:i}),(0,e.createElement)(me,{title:(0,s.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,s.__)("Enter prefix …","gtm-kit"),help:(0,s.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,s.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_dequeue_script",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Include permalink structure","gtm-kit"),label:(0,s.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_permalink_structure",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Include path of pages","gtm-kit"),label:(0,s.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_pages",disabled:i}))))},Ge=()=>{const{useSettings:t}=(0,e.useContext)(c),n="Contact Form 7",a=!window.gtmkitSettings.plugins.cf7,i=a||!t.integrations.cf7_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Contact Form 7","gtm-kit")),a?(0,e.createElement)(ge,{pluginName:n}):null,(0,e.createElement)(Ce,{pluginName:n,optionName:"cf7_integration",pluginInactive:a}),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:(0,s.__)("Load JavaScript","gtm-kit"),options:[{label:(0,s.__)("Only on pages where where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,s.__)("On all pages","gtm-kit"),value:2}],help:(0,s.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:i}))))},Ie=()=>{const t="Easy Digital downloads",n=!window.gtmkitSettings.plugins.edd,{useSettings:a}=(0,e.useContext)(c),i=n||!a.integrations.edd_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Easy Digital downloads","gtm-kit")),n?(0,e.createElement)(ge,{pluginName:t}):null,(0,e.createElement)(Ce,{pluginName:t,optionName:"edd_integration",pluginInactive:n}),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Use SKU instead of ID","gtm-kit"),label:(0,s.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"edd_use_sku",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Exclude tax","gtm-kit"),label:(0,s.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(Ne,{title:(0,s.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Te,help:(0,s.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:i}),(0,e.createElement)(me,{title:(0,s.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,s.__)("Enter prefix …","gtm-kit"),help:(0,s.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:i}))),(0,e.createElement)(pe,{disabled:n},(0,e.createElement)(pe.Header,{title:(0,s.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,s.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"edd_dequeue_script",disabled:i}))))},De=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Help","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Tag Manager templates","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,s.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit"),(0,s.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/"},(0,s.__)("Read guide","gtm-kit"))),(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,s.__)("GTM container import files:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - eCommerce","gtm-kit")))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Tutorials","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("ul",null,le.map((t=>(0,e.createElement)("li",{className:"gtmkit-mb-4"},(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:t.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline"},t.title),t.text.map((t=>(0,e.createElement)("div",null,t)))))))))),Oe=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Get support","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Support options","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,s.__)("Support forum","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,s.__)("GITHub repository","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,s.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)"),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://wordpress.org/plugins/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,s.__)("WordPress.org Plugin Page","gtm-kit")))," "))));const Re=()=>{const{useSettings:t}=(0,e.useContext)(c),a=window.gtmkitSettings.currentPage;return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ot,{page:a}),(0,e.createElement)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base"},(0,e.createElement)(kt,null,(0,e.createElement)(ht,{exact:!0,path:"/general",element:(0,e.createElement)(se,null)}),(0,e.createElement)(ht,{exact:!0,path:"/container",element:(0,e.createElement)(he,null)}),(0,e.createElement)(ht,{exact:!0,path:"/post-data",element:(0,e.createElement)(_e,null)}),(0,e.createElement)(ht,{exact:!0,path:"/user-data",element:(0,e.createElement)(ke,null)}),(0,e.createElement)(ht,{exact:!0,path:"/google-consent-mode",element:(0,e.createElement)(fe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/misc",element:(0,e.createElement)(be,null)}),(0,e.createElement)(ht,{exact:!0,path:"/whats-new",element:(0,e.createElement)(we,null)}),(0,e.createElement)(ht,{exact:!0,path:"/integrations",element:(0,e.createElement)(Se,null)}),(0,e.createElement)(ht,{exact:!0,path:"/woocommerce",element:(0,e.createElement)(Pe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/cf7",element:(0,e.createElement)(Ge,null)}),(0,e.createElement)(ht,{exact:!0,path:"/edd",element:(0,e.createElement)(Ie,null)}),(0,e.createElement)(ht,{exact:!0,path:"/help",element:(0,e.createElement)(De,null)}),(0,e.createElement)(ht,{exact:!0,path:"/support",element:(0,e.createElement)(Oe,null)}),(0,e.createElement)(ht,{path:"/",element:(0,e.createElement)(pt,{replace:!0,to:"/"+a})}))),(0,e.createElement)(ee,null)):(0,e.createElement)(n.Spinner,null)},Me=()=>(0,e.createElement)(wt,{basename:"/"},(0,e.createElement)(g,null,(0,e.createElement)(Re,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,e.render)((0,e.createElement)(Me,null),document.getElementById(window.gtmkitSettings.rootId))}))}();1 !function(){"use strict";var t={n:function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},d:function(e,n){for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.wp.element,n=window.wp.components,a=window.lodash,i=window.wp.apiFetch,r=t.n(i);r().use(r().createNonceMiddleware(window.gtmkitSettings.nonce)),r().use(r().createRootURLMiddleware(window.gtmkitSettings.root));const o=async()=>{let t={};try{t=await r()({path:"gtmkit/v1/get-options",method:"GET"})}catch(t){return console.log("fetchSettings Errors:",t),{gtm_kit_settings_fetch_settings_errors:!0}}return!0===t.success?t.data:t},l=async()=>{let t={};try{t=await r()({path:"gtmkit/v1/get-site-data",method:"GET"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t};var s=window.wp.i18n,m=(t,e)=>{const n=Object.assign({},t);switch(e.type){case"FETCH_SETTINGS":n.fetchedSettings=e.payload.fetchedSettings,n.stateSettings=e.payload.stateSettings,n.siteData=e.payload.siteData,n.installData=e.payload.installData,n.isPending=!1,n.canSave=!1,void 0===e.payload.fetchedSettings.integrations&&(n.fetchedSettings.integrations={}),void 0!==e.payload.fetchedSettings.gtm_kit_settings_fetch_settings_errors&&(n.notice=(0,s.__)("An error occurred.","gtm-kit"),n.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":n.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":n.fetchedSettings=e.payload.fetchedSettings,n.stateSettings=e.payload.stateSettings,n.isPending=!1;let t=!1,a=(0,s.__)("Saved Successfully.","gtm-kit"),i=!1;void 0!==e.payload.fetchedSettings.gtm_kit_settings_update_settings_errors&&(t=!0,a=(0,s.__)("An error occurred.","gtm-kit"),i=!0),n.canSave=t,n.notice=a,n.hasError=i;break;case"UPDATE_STATE":e.payload.fetchedSettings&&(n.fetchedSettings=e.payload.fetchedSettings),e.payload.stateSettings&&(n.stateSettings=e.payload.stateSettings),void 0!==e.payload.isPending&&(n.isPending=e.payload.isPending),void 0!==e.payload.notice&&(n.notice=e.payload.notice),void 0!==e.payload.hasError&&(n.hasError=e.payload.hasError),void 0!==e.payload.canSave&&(n.canSave=e.payload.canSave)}return n};const c=(0,e.createContext)();var u,g=t=>{const[n,i]=(0,e.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:"",canSave:!1}),s=async()=>{const[t,e]=await Promise.all([o(),l()]),n="wizard"===window.gtmkitSettings.currentPage?await(async()=>{let t={};try{t=await r()({path:"gtmkit/v1/get-install-data",method:"GET"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t})():{};i({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:n}})},u=async t=>{i({type:"UPDATE_STATE",payload:t})};(0,e.useEffect)((()=>{s()}),[]);const g={useDispatch:t=>{i(t)},useUpdateSettings:async()=>{i({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(async t=>{let e={};try{e=await r()({path:"gtmkit/v1/set-options",method:"POST",data:t})}catch(t){return console.log("updateSettings Errors:",t),{gtm_kit_settings_update_settings_errors:!0}}return!0===e.success?e.data:e})(n.stateSettings);i({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:u,useUpdateStateSettings:async(t,e,i)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let o;r[t][e]=i,o=!(0,a.isEqual)(r,n.fetchedSettings),u({stateSettings:r,canSave:o})},useImportSettings:async(t,e)=>{const i=JSON.parse(JSON.stringify(n.stateSettings));let r;const o={};o.general={...i.general,...e.general},"integrations"in e&&(o.integrations={...i.integrations,...e.integrations}),r=!(0,a.isEqual)(o,n.fetchedSettings),u({stateSettings:o,canSave:r})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData};return(0,e.createElement)(c.Provider,{value:g},t.children)},d=window.React,p=t.n(d);function h(){return h=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},h.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(u||(u={}));const _="popstate";function k(t,e){if(!1===t||null==t)throw new Error(e)}function f(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function E(t,e){return{usr:t.state,key:t.key,idx:e}}function v(t,e,n,a){return void 0===n&&(n=null),h({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?y(e):e,{state:n,key:e&&e.key||a||Math.random().toString(36).substr(2,8)})}function b(t){let{pathname:e="/",search:n="",hash:a=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function y(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let a=t.indexOf("?");a>=0&&(e.search=t.substr(a),t=t.substr(0,a)),t&&(e.pathname=t)}return e}var x;function w(t,e,n){void 0===n&&(n="/");let a=L(("string"==typeof e?y(e):e).pathname||"/",n);if(null==a)return null;let i=S(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,n)=>t===e[n]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(i);let r=null;for(let t=0;null==r&&t<i.length;++t)r=M(i[t],A(a));return r}function S(t,e,n,a){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===a&&(a="");let i=(t,i,r)=>{let o={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};o.relativePath.startsWith("/")&&(k(o.relativePath.startsWith(a),'Absolute route path "'+o.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(a.length));let l=B([a,o.relativePath]),s=n.concat(o);t.children&&t.children.length>0&&(k(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),S(t.children,e,s,l)),(null!=t.path||t.index)&&e.push({path:l,score:O(l,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var n;if(""!==t.path&&null!=(n=t.path)&&n.includes("?"))for(let n of N(t.path))i(t,e,n);else i(t,e)})),e}function N(t){let e=t.split("/");if(0===e.length)return[];let[n,...a]=e,i=n.endsWith("?"),r=n.replace(/\?$/,"");if(0===a.length)return i?[r,""]:[r];let o=N(a.join("/")),l=[];return l.push(...o.map((t=>""===t?r:[r,t].join("/")))),i&&l.push(...o),l.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(x||(x={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const C=/^:\w+$/,T=3,G=2,I=1,P=10,D=-2,R=t=>"*"===t;function O(t,e){let n=t.split("/"),a=n.length;return n.some(R)&&(a+=D),e&&(a+=G),n.filter((t=>!R(t))).reduce(((t,e)=>t+(C.test(e)?T:""===e?I:P)),a)}function M(t,e){let{routesMeta:n}=t,a={},i="/",r=[];for(let t=0;t<n.length;++t){let o=n[t],l=t===n.length-1,s="/"===i?e:e.slice(i.length)||"/",m=U({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},s);if(!m)return null;Object.assign(a,m.params);let c=o.route;r.push({params:a,pathname:B([i,m.pathname]),pathnameBase:F(B([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=B([i,m.pathnameBase]))}return r}function U(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[n,a]=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),f("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let a=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((t,e)=>(a.push(e),"/([^\\/]+)")));return t.endsWith("*")?(a.push("*"),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),a]}(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let r=i[0],o=r.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:a.reduce(((t,e,n)=>{if("*"===e){let t=l[n]||"";o=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}return t[e]=function(t,e){try{return decodeURIComponent(t)}catch(n){return f(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),t}}(l[n]||"",e),t}),{}),pathname:r,pathnameBase:o,pattern:t}}function A(t){try{return decodeURI(t)}catch(e){return f(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function L(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,a=t.charAt(n);return a&&"/"!==a?null:t.slice(n)||"/"}function W(t,e,n,a){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(a)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function j(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}function H(t,e,n,a){let i;void 0===a&&(a=!1),"string"==typeof t?i=y(t):(i=h({},t),k(!i.pathname||!i.pathname.includes("?"),W("?","pathname","search",i)),k(!i.pathname||!i.pathname.includes("#"),W("#","pathname","hash",i)),k(!i.search||!i.search.includes("#"),W("#","search","hash",i)));let r,o=""===t||""===i.pathname,l=o?"/":i.pathname;if(a||null==l)r=n;else{let t=e.length-1;if(l.startsWith("..")){let e=l.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}r=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:n,search:a="",hash:i=""}="string"==typeof t?y(t):t,r=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)})),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:r,search:J(a),hash:K(i)}}(i,r),m=l&&"/"!==l&&l.endsWith("/"),c=(o||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const B=t=>t.join("/").replace(/\/\/+/g,"/"),F=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),J=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",K=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const z=["post","put","patch","delete"],$=(new Set(z),["get",...z]);function q(){return q=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},q.apply(this,arguments)}new Set($),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const V=d.createContext(null),Y=d.createContext(null),X=d.createContext(null),Q=d.createContext(null),Z=d.createContext({outlet:null,matches:[],isDataRoute:!1}),tt=d.createContext(null);function et(){return null!=d.useContext(Q)}function nt(){return et()||k(!1),d.useContext(Q).location}function at(t){d.useContext(X).static||d.useLayoutEffect(t)}function it(){let{isDataRoute:t}=d.useContext(Z);return t?function(){let{router:t}=function(t){let e=d.useContext(V);return e||k(!1),e}(ut.UseNavigateStable),e=dt(gt.UseNavigateStable),n=d.useRef(!1);return at((()=>{n.current=!0})),d.useCallback((function(a,i){void 0===i&&(i={}),n.current&&("number"==typeof a?t.navigate(a):t.navigate(a,q({fromRouteId:e},i)))}),[t,e])}():function(){et()||k(!1);let t=d.useContext(V),{basename:e,navigator:n}=d.useContext(X),{matches:a}=d.useContext(Z),{pathname:i}=nt(),r=JSON.stringify(j(a).map((t=>t.pathnameBase))),o=d.useRef(!1);return at((()=>{o.current=!0})),d.useCallback((function(a,l){if(void 0===l&&(l={}),!o.current)return;if("number"==typeof a)return void n.go(a);let s=H(a,JSON.parse(r),i,"path"===l.relative);null==t&&"/"!==e&&(s.pathname="/"===s.pathname?e:B([e,s.pathname])),(l.replace?n.replace:n.push)(s,l.state,l)}),[e,n,r,i,t])}()}function rt(t,e){let{relative:n}=void 0===e?{}:e,{matches:a}=d.useContext(Z),{pathname:i}=nt(),r=JSON.stringify(j(a).map((t=>t.pathnameBase)));return d.useMemo((()=>H(t,JSON.parse(r),i,"path"===n)),[t,r,i,n])}function ot(t,e,n){et()||k(!1);let{navigator:a}=d.useContext(X),{matches:i}=d.useContext(Z),r=i[i.length-1],o=r?r.params:{},l=(r&&r.pathname,r?r.pathnameBase:"/");r&&r.route;let s,m=nt();if(e){var c;let t="string"==typeof e?y(e):e;"/"===l||(null==(c=t.pathname)?void 0:c.startsWith(l))||k(!1),s=t}else s=m;let g=s.pathname||"/",p=w(t,{pathname:"/"===l?g:g.slice(l.length)||"/"}),h=function(t,e,n){var a;if(void 0===e&&(e=[]),void 0===n&&(n=null),null==t){var i;if(null==(i=n)||!i.errors)return null;t=n.matches}let r=t,o=null==(a=n)?void 0:a.errors;if(null!=o){let t=r.findIndex((t=>t.route.id&&(null==o?void 0:o[t.route.id])));t>=0||k(!1),r=r.slice(0,Math.min(r.length,t+1))}return r.reduceRight(((t,a,i)=>{let l=a.route.id?null==o?void 0:o[a.route.id]:null,s=null;n&&(s=a.route.errorElement||st);let m=e.concat(r.slice(0,i+1)),c=()=>{let e;return e=l?s:a.route.Component?d.createElement(a.route.Component,null):a.route.element?a.route.element:t,d.createElement(ct,{match:a,routeContext:{outlet:t,matches:m,isDataRoute:null!=n},children:e})};return n&&(a.route.ErrorBoundary||a.route.errorElement||0===i)?d.createElement(mt,{location:n.location,revalidation:n.revalidation,component:s,error:l,children:c(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):c()}),null)}(p&&p.map((t=>Object.assign({},t,{params:Object.assign({},o,t.params),pathname:B([l,a.encodeLocation?a.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:B([l,a.encodeLocation?a.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),i,n);return e&&h?d.createElement(Q.Provider,{value:{location:q({pathname:"/",search:"",hash:"",state:null,key:"default"},s),navigationType:u.Pop}},h):h}function lt(){let t=function(){var t;let e=d.useContext(tt),n=function(t){let e=d.useContext(Y);return e||k(!1),e}(gt.UseRouteError),a=dt(gt.UseRouteError);return e||(null==(t=n.errors)?void 0:t[a])}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},e),n?d.createElement("pre",{style:a},n):null,null)}const st=d.createElement(lt,null);class mt extends d.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error?d.createElement(Z.Provider,{value:this.props.routeContext},d.createElement(tt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ct(t){let{routeContext:e,match:n,children:a}=t,i=d.useContext(V);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),d.createElement(Z.Provider,{value:e},a)}var ut=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ut||{}),gt=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(gt||{});function dt(t){let e=function(t){let e=d.useContext(Z);return e||k(!1),e}(),n=e.matches[e.matches.length-1];return n.route.id||k(!1),n.route.id}function pt(t){let{to:e,replace:n,state:a,relative:i}=t;et()||k(!1);let{matches:r}=d.useContext(Z),{pathname:o}=nt(),l=it(),s=H(e,j(r).map((t=>t.pathnameBase)),o,"path"===i),m=JSON.stringify(s);return d.useEffect((()=>l(JSON.parse(m),{replace:n,state:a,relative:i})),[l,m,i,n,a]),null}function ht(t){k(!1)}function _t(t){let{basename:e="/",children:n=null,location:a,navigationType:i=u.Pop,navigator:r,static:o=!1}=t;et()&&k(!1);let l=e.replace(/^\/*/,"/"),s=d.useMemo((()=>({basename:l,navigator:r,static:o})),[l,r,o]);"string"==typeof a&&(a=y(a));let{pathname:m="/",search:c="",hash:g="",state:p=null,key:h="default"}=a,_=d.useMemo((()=>{let t=L(m,l);return null==t?null:{location:{pathname:t,search:c,hash:g,state:p,key:h},navigationType:i}}),[l,m,c,g,p,h,i]);return null==_?null:d.createElement(X.Provider,{value:s},d.createElement(Q.Provider,{children:n,value:_}))}function kt(t){let{children:e,location:n}=t;return ot(ft(e),n)}function ft(t,e){void 0===e&&(e=[]);let n=[];return d.Children.forEach(t,((t,a)=>{if(!d.isValidElement(t))return;let i=[...e,a];if(t.type===d.Fragment)return void n.push.apply(n,ft(t.props.children,i));t.type!==ht&&k(!1),t.props.index&&t.props.children&&k(!1);let r={id:t.props.id||i.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(r.children=ft(t.props.children,i)),n.push(r)})),n}function Et(){return Et=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Et.apply(this,arguments)}function vt(t,e){if(null==t)return{};var n,a,i={},r=Object.keys(t);for(a=0;a<r.length;a++)n=r[a],e.indexOf(n)>=0||(i[n]=t[n]);return i}d.startTransition,new Promise((()=>{})),d.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const bt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],yt=["aria-current","caseSensitive","className","end","style","to","children"],xt=d.startTransition;function wt(t){let{basename:e,children:n,future:a,window:i}=t,r=d.useRef();var o;null==r.current&&(r.current=(void 0===(o={window:i,v5Compat:!0})&&(o={}),function(t,e,n,a){void 0===a&&(a={});let{window:i=document.defaultView,v5Compat:r=!1}=a,o=i.history,l=u.Pop,s=null,m=c();function c(){return(o.state||{idx:null}).idx}function g(){l=u.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:l,location:p.location,delta:e})}function d(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof t?t:b(t);return k(e,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,e)}null==m&&(m=0,o.replaceState(h({},o.state,{idx:m}),""));let p={get action(){return l},get location(){return t(i,o)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(_,g),s=t,()=>{i.removeEventListener(_,g),s=null}},createHref(t){return e(i,t)},createURL:d,encodeLocation(t){let e=d(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){l=u.Push;let a=v(p.location,t,e);n&&n(a,t),m=c()+1;let g=E(a,m),d=p.createHref(a);try{o.pushState(g,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(d)}r&&s&&s({action:l,location:p.location,delta:1})},replace:function(t,e){l=u.Replace;let a=v(p.location,t,e);n&&n(a,t),m=c();let i=E(a,m),g=p.createHref(a);o.replaceState(i,"",g),r&&s&&s({action:l,location:p.location,delta:0})},go(t){return o.go(t)}};return p}((function(t,e){let{pathname:n="/",search:a="",hash:i=""}=y(t.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),v("",{pathname:n,search:a,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let n=t.document.querySelector("base"),a="";if(n&&n.getAttribute("href")){let e=t.location.href,n=e.indexOf("#");a=-1===n?e:e.slice(0,n)}return a+"#"+("string"==typeof e?e:b(e))}),(function(t,e){f("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),o)));let l=r.current,[s,m]=d.useState({action:l.action,location:l.location}),{v7_startTransition:c}=a||{},g=d.useCallback((t=>{c&&xt?xt((()=>m(t))):m(t)}),[m,c]);return d.useLayoutEffect((()=>l.listen(g)),[l,g]),d.createElement(_t,{basename:e,children:n,location:s.location,navigationType:s.action,navigator:l})}const St="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Nt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ct=d.forwardRef((function(t,e){let n,{onClick:a,relative:i,reloadDocument:r,replace:o,state:l,target:s,to:m,preventScrollReset:c}=t,u=vt(t,bt),{basename:g}=d.useContext(X),p=!1;if("string"==typeof m&&Nt.test(m)&&(n=m,St))try{let t=new URL(window.location.href),e=m.startsWith("//")?new URL(t.protocol+m):new URL(m),n=L(e.pathname,g);e.origin===t.origin&&null!=n?m=n+e.search+e.hash:p=!0}catch(t){}let h=function(t,e){let{relative:n}=void 0===e?{}:e;et()||k(!1);let{basename:a,navigator:i}=d.useContext(X),{hash:r,pathname:o,search:l}=rt(t,{relative:n}),s=o;return"/"!==a&&(s="/"===o?a:B([a,o])),i.createHref({pathname:s,search:l,hash:r})}(m,{relative:i}),_=function(t,e){let{target:n,replace:a,state:i,preventScrollReset:r,relative:o}=void 0===e?{}:e,l=it(),s=nt(),m=rt(t,{relative:o});return d.useCallback((e=>{if(function(t,e){return!(0!==t.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t))}(e,n)){e.preventDefault();let n=void 0!==a?a:b(s)===b(m);l(t,{replace:n,state:i,preventScrollReset:r,relative:o})}}),[s,l,m,a,i,n,t,r,o])}(m,{replace:o,state:l,target:s,preventScrollReset:c,relative:i});return d.createElement("a",Et({},u,{href:n||h,onClick:p||r?a:function(t){a&&a(t),t.defaultPrevented||_(t)},ref:e,target:s}))})),Tt=d.forwardRef((function(t,e){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:r=!1,style:o,to:l,children:s}=t,m=vt(t,yt),c=rt(l,{relative:m.relative}),u=nt(),g=d.useContext(Y),{navigator:p}=d.useContext(X),h=p.encodeLocation?p.encodeLocation(c).pathname:c.pathname,_=u.pathname,k=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;a||(_=_.toLowerCase(),k=k?k.toLowerCase():null,h=h.toLowerCase());let f,E=_===h||!r&&_.startsWith(h)&&"/"===_.charAt(h.length),v=null!=k&&(k===h||!r&&k.startsWith(h)&&"/"===k.charAt(h.length)),b=E?n:void 0;f="function"==typeof i?i({isActive:E,isPending:v}):[i,E?"active":null,v?"pending":null].filter(Boolean).join(" ");let y="function"==typeof o?o({isActive:E,isPending:v}):o;return d.createElement(Ct,Et({},m,{"aria-current":b,className:f,ref:e,style:y,to:l}),"function"==typeof s?s({isActive:E,isPending:v}):s)}));var Gt,It;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher"})(Gt||(Gt={})),function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(It||(It={}));var Pt=({to:t,title:n})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Tt,{to:t,className:({isActive:t})=>"gtmkit-border-b-4 gtmkit-border-white gtmkit-text-color-grey gtmkit-font-semibold gtmkit-pt-5 gtmkit-pb-[18px] hover:gtmkit-border-color-grey "+(t?"gtmkit-text-color-heading gtmkit-border-b-color-primary ":"")},n)),Dt=({page:t})=>(0,e.createElement)("nav",{className:"gtmkit-flex gtmkit-items-center gtmkit-px-8 gtmkit-border-y gtmkit-bg-white gtmkit-border-color-border gtmkit-text-sm gtmkit-space-x-8"},function({page:t}){const e=[{to:"general",title:(0,s.__)("Dashboard","gtm-kit")},{to:"container",title:(0,s.__)("Container","gtm-kit")},{to:"post-data",title:(0,s.__)("Post data","gtm-kit")},{to:"user-data",title:(0,s.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,s.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,s.__)("Misc","gtm-kit")},{to:"whats-new",title:(0,s.__)("What's New","gtm-kit")}],n=[{to:"integrations",title:(0,s.__)("Integrations","gtm-kit")},{to:"woocommerce",title:"WooCommerce"},{to:"cf7",title:"Contact Form 7"},{to:"edd",title:"Easy Digital Downloads"}],a=[{to:"help",title:(0,s.__)("Help","gtm-kit")},{to:"support",title:(0,s.__)("Support","gtm-kit")}];switch(t){case"general":return e;case"integrations":return n;case"help":return a}}({page:t}).map((function(t){return(0,e.createElement)(Pt,{to:t.to,title:t.title})}))),Rt=({page:t})=>{let n=(0,s.__)("Settings","gtm-kit");switch(t){case"general":n=(0,s.__)("Settings","gtm-kit");break;case"integrations":n=(0,s.__)("Integrations","gtm-kit");break;case"help":n=(0,s.__)("Help","gtm-kit")}return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,e.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,e.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,e.createElement)("path",{d:"m88.659 7.002h-49.266c-2.915 0-5.378-.184-9.23 2.596l-18.743 12.752c-4.549 3.292-4.571 6.001 0 9.302l18.743 12.751c3.652 2.646 6.299 2.597 9.23 2.597h15.686 33.58c2.931-.057 5.394-1.784 5.34-3.923v-32.21c-.012-2.134-2.409-3.865-5.34-3.865z",fill:"#3969bb",transform:"matrix(-1 0 0 -1 101.999867 53.999547)"}),(0,e.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,e.createElement)("path",{d:"m18.316 23.086h4.632v6.052c-.75.245-1.459.415-2.121.514-.663.098-1.341.148-2.033.148-1.764 0-3.106-.517-4.035-1.554-.929-1.034-1.395-2.519-1.395-4.457 0-1.886.538-3.356 1.617-4.41 1.078-1.054 2.573-1.579 4.481-1.579 1.2 0 2.357.239 3.469.718l-.823 1.979c-.85-.425-1.737-.637-2.657-.637-1.071 0-1.932.358-2.572 1.077-.645.718-.968 1.685-.968 2.899 0 1.267.26 2.233.78 2.904.516.667 1.271.999 2.262.999.517 0 1.041-.052 1.572-.158v-2.435h-2.209zm11.912 6.555h-2.474v-9.614h-3.173v-2.06h8.816v2.06h-3.169zm9.908 0-2.811-9.158h-.072c.103 1.863.154 3.105.154 3.728v5.43h-2.213v-11.674h3.368l2.764 8.927h.048l2.934-8.927h3.369v11.674h-2.308v-5.525c0-.261 0-.561.009-.903.009-.341.048-1.246.112-2.716h-.074l-3.011 9.144z"}),(0,e.createElement)("path",{d:"m88.883 31.898h-3.811l-4.147-6.67-1.417 1.018v5.652h-3.357v-15.83h3.357v7.242l1.318-1.861 4.293-5.381h3.724l-5.523 7.006zm1.589-15.233c0-1.075.6-1.614 1.8-1.614 1.199 0 1.798.539 1.798 1.614 0 .512-.148.91-.45 1.196-.297.284-.749.429-1.348.429-1.2 0-1.8-.543-1.8-1.625zm3.449 15.233h-3.302v-12.104h3.302zm8.563-2.413c.578 0 1.271-.128 2.077-.38v2.456c-.82.37-1.831.552-3.031.552-1.324 0-2.28-.333-2.885-1.001-.602-.667-.902-1.668-.902-3.003v-5.835h-1.585v-1.399l1.823-1.103.949-2.557h2.115v2.579h3.388v2.48h-3.388v5.835c0 .467.129.815.393 1.041.264.222.614.335 1.046.335z"}))),n))),(0,e.createElement)(Dt,{page:t}))};function Ot(){return Ot=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Ot.apply(this,arguments)}function Mt(t,e){if(null==t)return{};var n,a,i={},r=Object.keys(t);for(a=0;a<r.length;a++)n=r[a],e.indexOf(n)>=0||(i[n]=t[n]);return i}function Ut(t,e){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ut(t,e)}function At(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ut(t,e)}function Lt(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Wt=window.ReactDOM,jt=t.n(Wt),Ht=p().createContext(null),Bt=function(t){return t.scrollTop},Ft="unmounted",Jt="exited",Kt="entering",zt="entered",$t="exiting",qt=function(t){function e(e,n){var a;a=t.call(this,e,n)||this;var i,r=n&&!n.isMounting?e.enter:e.appear;return a.appearStatus=null,e.in?r?(i=Jt,a.appearStatus=Kt):i=zt:i=e.unmountOnExit||e.mountOnEnter?Ft:Jt,a.state={status:i},a.nextCallback=null,a}At(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Ft?{status:Jt}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==Kt&&n!==zt&&(e=Kt):n!==Kt&&n!==zt||(e=$t)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,n,a=this.props.timeout;return t=e=n=a,null!=a&&"number"!=typeof a&&(t=a.exit,e=a.enter,n=void 0!==a.appear?a.appear:e),{exit:t,enter:e,appear:n}},n.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e)if(this.cancelNextCallback(),e===Kt){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:jt().findDOMNode(this);n&&Bt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jt&&this.setState({status:Ft})},n.performEnter=function(t){var e=this,n=this.props.enter,a=this.context?this.context.isMounting:t,i=this.props.nodeRef?[a]:[jt().findDOMNode(this),a],r=i[0],o=i[1],l=this.getTimeouts(),s=a?l.appear:l.enter;t||n?(this.props.onEnter(r,o),this.safeSetState({status:Kt},(function(){e.props.onEntering(r,o),e.onTransitionEnd(s,(function(){e.safeSetState({status:zt},(function(){e.props.onEntered(r,o)}))}))}))):this.safeSetState({status:zt},(function(){e.props.onEntered(r)}))},n.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:jt().findDOMNode(this);e?(this.props.onExit(a),this.safeSetState({status:$t},(function(){t.props.onExiting(a),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Jt},(function(){t.props.onExited(a)}))}))}))):this.safeSetState({status:Jt},(function(){t.props.onExited(a)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(a){n&&(n=!1,e.nextCallback=null,t(a))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:jt().findDOMNode(this),a=null==t&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=i[0],o=i[1];this.props.addEndListener(r,o)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Ft)return null;var e=this.props,n=e.children,a=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,Mt(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return p().createElement(Ht.Provider,{value:null},"function"==typeof n?n(t,a):p().cloneElement(p().Children.only(n),a))},e}(p().Component);function Vt(){}qt.contextType=Ht,qt.propTypes={},qt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Vt,onEntering:Vt,onEntered:Vt,onExit:Vt,onExiting:Vt,onExited:Vt},qt.UNMOUNTED=Ft,qt.EXITED=Jt,qt.ENTERING=Kt,qt.ENTERED=zt,qt.EXITING=$t;var Yt=qt,Xt=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return a=e,void((n=t).classList?n.classList.remove(a):"string"==typeof n.className?n.className=Lt(n.className,a):n.setAttribute("class",Lt(n.className&&n.className.baseVal||"",a)));var n,a}))},Qt=function(t){function e(){for(var e,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var a=e.resolveArguments(t,n),i=a[0],r=a[1];e.removeClasses(i,"exit"),e.addClass(i,r?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var a=e.resolveArguments(t,n),i=a[0],r=a[1]?"appear":"enter";e.addClass(i,r,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var a=e.resolveArguments(t,n),i=a[0],r=a[1]?"appear":"enter";e.removeClasses(i,r),e.addClass(i,r,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,a="string"==typeof n,i=a?(a&&n?n+"-":"")+t:n[t];return{baseClassName:i,activeClassName:a?i+"-active":n[t+"Active"],doneClassName:a?i+"-done":n[t+"Done"]}},e}At(e,t);var n=e.prototype;return n.addClass=function(t,e,n){var a=this.getClassNames(e)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===n&&i&&(a+=" "+i),"active"===n&&t&&Bt(t),a&&(this.appliedClasses[e][n]=a,function(t,e){t&&e&&e.split(" ").forEach((function(e){return a=e,void((n=t).classList?n.classList.add(a):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(n,a)||("string"==typeof n.className?n.className=n.className+" "+a:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+a)));var n,a}))}(t,a))},n.removeClasses=function(t,e){var n=this.appliedClasses[e],a=n.base,i=n.active,r=n.done;this.appliedClasses[e]={},a&&Xt(t,a),i&&Xt(t,i),r&&Xt(t,r)},n.render=function(){var t=this.props,e=(t.classNames,Mt(t,["classNames"]));return p().createElement(Yt,Ot({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(p().Component);Qt.defaultProps={classNames:""},Qt.propTypes={};var Zt=Qt,te=({title:t=(0,s.__)("Save","gtm-kit"),className:a="gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey"})=>{const{useUpdateSettings:i,useIsPending:r,useCanSave:o}=(0,e.useContext)(c);return(0,e.createElement)(n.Button,{className:a,onClick:()=>i(),variant:"primary",disabled:r||!o},o?(0,s.__)(t,"gtm-kit"):(0,s.__)("Saved","gtm-kit"),r?(0,e.createElement)(n.Spinner,null):"")},ee=()=>{const{useCanSave:t}=(0,e.useContext)(c);return(0,e.createElement)(Zt,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0},(0,e.createElement)("footer",{className:"gtmkit-fixed gtmkit-bottom-0 gtmkit-w-full gtmkit-z-10 gtmkit-bg-color-grey gtmkit-text-white gtmkit-p-8"},(0,e.createElement)(te,null)))},ne=({subject:t})=>{const n=!0===t||"on"===t,a=!0===n?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,e.createElement)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase "+a},n?(0,s.__)("Active","gtm-kit"):(0,s.__)("Inactive","gtm-kit"))};const ae=(0,e.forwardRef)((({children:t,className:n="",...a},i)=>(0,e.createElement)("div",{...a,className:"gtmkit-min-h-[128px] gtmkit-bg-white gtmkit-border gtmkit-border-color-border gtmkit-mb-6 gtmkit-py-4 gtmkit-px-5 gtmkit-rounded gtmkit-group gtmkit-w-full "+n,ref:i},t)));ae.Header=({as:t="h3",title:n="",children:a,className:i="",...r})=>(0,e.createElement)("div",{...r,className:"gtmkit-flex gtmkit-justify-between gtmkit-mb-5 "+i},(0,e.createElement)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},n),a),ae.Content=({as:t="div",children:n,className:a="group-hover:gtmkit-hidden",...i})=>(0,e.createElement)(t,{...i,className:a},n),ae.Button=({url:t,destination:a,newTab:i=!1,text:r,group:o="",...l})=>{const s=it();return(0,e.createElement)("div",{...l,className:"gtmkit-hidden group-hover:gtmkit-block"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full",onClick:()=>{a&&t&&!1===i?window.gtmkitSettings.current_poage===o?s(a,{replace:!0}):window.location.href=t+"#"+a:t?i?window.open(t):window.location.href=t:s(a,{replace:!0})}},(0,e.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},r)))};var ie=ae,re=({title:t,data:n,className:a=""})=>{const{useSettings:i}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},t),(0,e.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px] "+a},n.map((t=>!1===t.featured?null:(0,e.createElement)(ie,null,(0,e.createElement)(ie.Header,{title:t.title},t.pill?(0,e.createElement)(ne,{subject:i[t.group][t.option]}):null),(0,e.createElement)(ie.Content,null,t.text.map(((t,n)=>(0,e.createElement)("p",{key:n},t)))),(0,e.createElement)(ie.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,s.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group}))))))};const oe=[{title:"Woocommerce",pill:!0,group:"integrations",option:"woocommerce_integration",text:[(0,s.__)("The #1 open source eCommerce platform built for WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/woocommerce",text:(0,s.__)("Setup integration","gtm-kit")}},{title:"Contact Form 7",pill:!0,group:"integrations",option:"cf7_integration",text:[(0,s.__)("Just another contact form plugin for WordPress. Simple but flexible","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/cf7",text:(0,s.__)("Setup integration","gtm-kit")}},{title:"Easy Digital Downloads",pill:!0,group:"integrations",option:"edd_integration",text:[(0,s.__)("Easy way to sell Digital Products With WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/edd",text:(0,s.__)("Setup integration","gtm-kit")}}],le=[{title:"Getting started with GTM Kit",text:[(0,s.__)("How to get the most out of Google Tag Manager with GTM Kit.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!0},{title:(0,s.__)("WooCommerce integration","gtm-kit"),text:[(0,s.__)("Integrate WooCommerce with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=dashboard-tutorials"},featured:!0},{title:"Contact Form 7 Integration",text:[(0,s.__)("Integrate Contact Form 7 with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/contact-form-7-integration/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Easy Digital Downloads integration",text:[(0,s.__)("Integrate Easy Digital Downloads with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/set-up-easy-digital-downloads-for-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Advanced GTM container implementation",text:[(0,s.__)("Customization of the GTM container implementation and Server Side Tracking.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Settings, actions and filters for developers",text:[(0,s.__)("One of the things that makes GTM Kit a great tool for developers is the ability to override options in wp-config.php.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1}];var se=()=>{const{useSettings:t}=(0,e.useContext)(c),n=le;return n.push({title:(0,s.__)("See all tutorials…","gtm-kit"),text:[(0,s.__)("See all our tutorial and get the most out of GTM Kit","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=documentation&utm_content=dashboard-tutorials",text:(0,s.__)("Read articles","gtm-kit")},featured:!0}),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Status","gtm-kit")),(0,e.createElement)("div",{className:"lg:gtmkit-flex lg:gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px]"},(0,e.createElement)(ie,{className:"lg:gtmkit-w-1/2 2xl:gtmkit-w-1/3"},(0,e.createElement)(ie.Header,{title:"Google Tag Manager Container"},(0,e.createElement)(ne,{subject:t.general.gtm_id&&t.general.container_active})),(0,e.createElement)(ie.Content,null,t.general.gtm_id&&t.general.container_active?(0,e.createElement)("p",null,(0,s.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id):(0,e.createElement)("p",null,(0,s.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,e.createElement)(ie.Button,{destination:"/container",text:(0,s.__)("Edit container","gtm-kit")})),(0,e.createElement)(ie,{className:"lg:gtmkit-w-1/2 2xl:gtmkit-w-1/3"},(0,e.createElement)(ie.Header,{title:(0,s.__)("Help improve GTM Kit","gtm-kit")},(0,e.createElement)(ne,{subject:t.general.analytics_active})),(0,e.createElement)(ie.Content,null,(0,e.createElement)("p",null,(0,s.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,e.createElement)(ie.Button,{destination:"/misc",text:(0,s.__)("Share anonymous data","gtm-kit")}))),(0,e.createElement)(re,{title:(0,s.__)("Tutorials","gtm-kit"),data:n}),(0,e.createElement)(re,{title:(0,s.__)("Integrations","gtm-kit"),data:oe}))},me=({title:t,placeholder:a,help:i,className:r="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:o="general",optionName:l,pluginInactive:s})=>{const{useSettings:m,useUpdateStateSettings:u}=(0,e.useContext)(c);return(0,e.createElement)(n.TextControl,{label:t,placeholder:a,help:i,className:r,value:m&&m[o][l],onChange:t=>u(o,l,t),disabled:s})},ce=({title:t,label:a,optionGroup:i="general",optionName:r,disabled:o=!1})=>{const{useSettings:l,useUpdateStateSettings:s}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,e.createElement)(n.BaseControl,{label:t},(0,e.createElement)(n.ToggleControl,{label:a,checked:!o&&l[i][r],onChange:()=>{s(i,r,!(l&&l[i][r]))},disabled:o}))))},ue=({title:t,options:a,help:i,className:r="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:o="general",optionName:l,disabled:s})=>{const{useSettings:m,useUpdateStateSettings:u}=(0,e.useContext)(c);return(0,e.createElement)(n.RadioControl,{label:t,options:a,help:i,className:r,selected:parseInt(m[o][l]),onChange:t=>u(o,l,t),disabled:s})},ge=({pluginName:t})=>(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.sprintf)((0,s.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,s.sprintf)((0,s.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)),(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-sm disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.pluginInstallUrl+t}},(0,s.sprintf)((0,s.__)("Install %s","gtm-kit"),t))));const de=(0,e.forwardRef)((({children:t,className:n="",disabled:a=!1,...i},r)=>(0,e.createElement)("div",{...i,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-w-3/4 gtmkit-border-color-grey "+n+(a?"gtmkit-opacity-60":""),ref:r},t)));de.Header=({as:t="h3",title:n="",children:a,className:i="",...r})=>(0,e.createElement)(t,{...r,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey "+i},n,a),de.Content=({as:t="div",children:n,className:a="",...i})=>(0,e.createElement)(t,{...i,className:"gtmkit-px-8 gtmkit-py-6 "+a},n);var pe=de,he=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Google Tag Manager container","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Tag Manager container code","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,s.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")),(0,e.createElement)(me,{title:(0,s.__)("Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,s.__)("Enter Container ID","gtm-kit")}),(0,e.createElement)(ce,{title:(0,s.__)("Inject Container Code","gtm-kit"),label:(0,s.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active"}),(0,e.createElement)(ce,{title:(0,s.__)("Just the container","gtm-kit"),label:(0,s.__)("Setting this to On will reduce the functionality to just the GTM container code. No additional data will be pushed to the datalayer regardless of any other settings.","gtm-kit"),optionName:"just_the_container"}),(0,e.createElement)(me,{title:(0,s.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,s.__)("The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do.","gtm-kit")}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("GTM Server Side","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(me,{title:(0,s.__)("GTM Server Side Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,s.__)("Enter domain …","gtm-kit"),help:(0,s.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit")}),(0,e.createElement)(me,{title:(0,s.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,s.__)("Enter loader name …","gtm-kit"),help:(0,s.__)("Only use if you are using a custom loader.","gtm-kit")}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Container Code Implementation","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:(0,s.__)("Container code implementation:","gtm-kit"),options:[{label:(0,s.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,s.__)("Load container when browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,s.__)("Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle.","gtm-kit"),optionName:"script_implementation"}),(0,e.createElement)(ue,{title:(0,s.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,s.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,s.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,s.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,s.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,s.__)('The preferred method to implement the <noscript> container code is just after the opening <body> tag. This requires that your theme uses the "body_open" hook. If your theme does not support this the script can be injected in the footer or you can use the function below.',"gtm-kit"),optionName:"noscript_implementation"}),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,e.createElement)("code",null,"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"))))),_e=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Post Data","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Post Data Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,s.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")),(0,e.createElement)(ce,{title:(0,s.__)("Post type","gtm-kit"),id:"post-type",label:(0,s.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type"}),(0,e.createElement)(ce,{title:(0,s.__)("Page type","gtm-kit"),id:"page-type",label:(0,s.__)('Include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. "campaign".',"gtm-kit"),optionName:"datalayer_page_type"}),(0,e.createElement)(ce,{title:(0,s.__)("Categories","gtm-kit"),id:"categories",label:(0,s.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories"}),(0,e.createElement)(ce,{title:(0,s.__)("Tags","gtm-kit"),id:"tags",label:(0,s.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags"}),(0,e.createElement)(ce,{title:(0,s.__)("Post title","gtm-kit"),id:"post-title",label:(0,s.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title"}),(0,e.createElement)(ce,{title:(0,s.__)("Post ID","gtm-kit"),id:"post-id",label:(0,s.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id"}),(0,e.createElement)(ce,{title:(0,s.__)("Post data","gtm-kit"),id:"post-date",label:(0,s.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date"}),(0,e.createElement)(ce,{title:(0,s.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,s.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name"}),(0,e.createElement)(ce,{title:(0,s.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,s.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id"})))),ke=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("User Data","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,s.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,e.createElement)("p",null,(0,s.__)("Full page caching will cache user data making it the same for all users. There are ways around this, but it depends on the chosen cache solution and is only for advanced users.","gtm-kit")))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("User Data Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,s.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in"}),(0,e.createElement)(ce,{title:(0,s.__)("User ID","gtm-kit"),id:"user-id",label:(0,s.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id"}),(0,e.createElement)(ce,{title:(0,s.__)("User role","gtm-kit"),id:"user-role",label:(0,s.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role"})))),fe=()=>{const{useSettings:t}=(0,e.useContext)(c),n=!t.general.gcm_default_settings;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Google Consent Mode","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Consent Mode Activation","gtm-kit")},(0,e.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,s.__)("Warning!","gtm-kit"))),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,s.__)("Most Consent Management Platforms will handle the Google Consent Mode settings for you and applying the default settings in both GTM Kit and you CMP will lead to unexpected behaviour or errors.","gtm-kit")),(0,e.createElement)("p",null,(0,s.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")),(0,e.createElement)("p",{className:"!gtmkit-mt-4"},(0,s.__)("GTM Kit will only set the default Consent Mode settings and you must update the settings yourself when the user has given consent.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,e.createElement)("a",{href:"https://developers.google.com/tag-platform/security/guides/consent#implementation_example",target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline gtmkit-font-semibold"},(0,s.__)("See an example of how consent is updated","gtm-kit"))),(0,e.createElement)(ce,{title:(0,s.__)("Activate GCM settings","gtm-kit"),label:(0,s.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings"}))),(0,e.createElement)(pe,{disabled:n},(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Ad Storage","gtm-kit"),label:(0,s.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Analytics Storage","gtm-kit"),label:(0,s.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Functionality Storage","gtm-kit"),label:(0,s.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Personalization Storage","gtm-kit"),label:(0,s.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Security Storage","gtm-kit"),label:(0,s.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:n}))))},Ee=({label:t,value:n,tag:a})=>(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,e.createElement)("strong",null,t)),(0,e.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===a?(0,e.createElement)("code",{className:"gtmkit-text-sm"},n):(0,e.createElement)("em",null,n))),ve=()=>{const{useSiteData:t}=(0,e.useContext)(c),n=Object.values(t.shared_data);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,s.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,s.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,e.createElement)("tbody",{className:"gtmkit-py-6"},n.map((function(t){return(0,e.createElement)(Ee,{label:t.label,value:t.value,tag:t.tag})})))))},be=()=>{const{}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Misc","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Help improve GTM Kit","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ve,null),(0,e.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,s.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,e.createElement)(ce,{title:(0,s.__)("Share anonymous data","gtm-kit"),label:(0,s.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active"}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Logging and debugging","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Console log","gtm-kit"),label:(0,s.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log"}))))};const ye=[{version:"1.14",title:(0,s.__)("New Admin GUI","gtm-kit"),slug:"gtm-kit-1-14",text:[(0,s.__)("There is a new admin GUI based on WordPress components and the admin is now more extendable.","gtm-kit"),(0,s.__)("The autoload of options has been optimized for better performance.","gtm-kit")]},{version:"1.13",title:(0,s.__)("Google Consent Mode default settings for sites not using a Consent Management Platform","gtm-kit"),slug:"gtm-kit-1-13",text:[(0,s.__)("Not all sites are using Consent Management Platform to handle user consent , and we now allow those sites to set the default Consent Mode settings.","gtm-kit"),(0,s.__)("We have put a lot of work in to improving the code quality and improving the compliance with WordPress Coding Standards.","gtm-kit")]},{version:"1.12",title:(0,s.__)("Improved support for the WooCommerce cart and checkout blocks","gtm-kit"),slug:"gtm-kit-1-12",text:[(0,s.__)("The new WooCommerce blocks evolve with every release of WooCommerce, and we are thrilled to announce that GTM Kit now support the cart and checkout blocks using the native WooCommerce events.","gtm-kit"),(0,s.__)("Using the native JavaScript events is a much more reliable method than trying to parse the HTML which is subject to design changes.","gtm-kit")]}];var xe=({version:t,title:n,slug:a,text:i})=>{const r=encodeURI("https://gtmkit.com/"+a+"/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=changelog&utm_content=release-notes-"+t);return(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:t+": "+n}),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-1"},i.map(((t,n)=>(0,e.createElement)("p",{key:n},t))),(0,e.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-mt-4"},(0,e.createElement)("a",{href:r,target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline"},(0,s.__)("Read about all the other change in the release Notes","gtm-kit")))))},we=()=>{const{useSiteData:t}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("What's New","gtm-kit")),ye.map((function(t){return(0,e.createElement)(xe,{version:t.version,title:t.title,slug:t.slug,text:t.text})})),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Older releases","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",null,(0,e.createElement)("a",{href:"https://gtmkit.com/changelog/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=changelog&utm_content=whtats-new",target:"_blank",rel:"noreferrer",className:"gtmkit-text-color-primary hover:gtmkit-underline"},(0,s.__)("Changelog","gtm-kit"))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center"},(0,e.createElement)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2"},"(",(0,s.__)("Version:","gtm-kit")," ",t.gtmkit_version,")")),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",null,(0,s.__)("The plugin is open source (GPL v3 license) and contributions are welcome:","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-text-color-primary gtmkit-ml-2 hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,s.__)("GTM Kit Repository","gtm-kit"))))))},Se=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(re,{title:(0,s.__)("Integrations","gtm-kit"),data:oe})),Ne=({title:t,options:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:r="general",optionName:o,disabled:l=!1,help:m="",notSet:u=!1})=>{const{useSettings:g,useUpdateStateSettings:d}=(0,e.useContext)(c),p=u?[{label:(0,s.__)("(not set)","gtm-kit"),value:""},...a]:a;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.SelectControl,{label:t,value:g&&g[r][o],options:p,className:i,onChange:t=>d(r,o,t),disabled:l,help:m}))},Ce=({pluginName:t,optionName:n,pluginInactive:a})=>(0,e.createElement)(pe,{disabled:a},(0,e.createElement)(pe.Header,{title:(0,s.sprintf)((0,s.__)("%s Integration","gtm-kit"),t)}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.sprintf)((0,s.__)("Track %s","gtm-kit"),t),label:(0,s.sprintf)((0,s.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:n,disabled:a})));const Te=[{label:(0,s.__)("Retail","gtm-kit"),value:"retail"},{label:(0,s.__)("Education","gtm-kit"),value:"education"},{label:(0,s.__)("Flights","gtm-kit"),value:"flights"},{label:(0,s.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,s.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,s.__)("Local deals","gtm-kit"),value:"local"},{label:(0,s.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,s.__)("Travel","gtm-kit"),value:"travel"},{label:(0,s.__)("Custom","gtm-kit"),value:"custom"}];var Ge=()=>{const{useSettings:t}=(0,e.useContext)(c),n="WooCommerce",a=!window.gtmkitSettings.plugins.woocommerce,i=a||!t.integrations.woocommerce_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("WooCommerce","gtm-kit")),a?(0,e.createElement)(ge,{pluginName:n}):null,(0,e.createElement)(Ce,{pluginName:n,optionName:"woocommerce_integration",pluginInactive:a}),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Basic settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(Ne,{title:(0,s.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,s.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Use SKU instead of ID","gtm-kit"),label:(0,s.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_use_sku",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Exclude tax","gtm-kit"),label:(0,s.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Exclude shipping from revenue","gtm-kit"),label:(0,s.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Include customer data","gtm-kit"),label:(0,s.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_customer_data",disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Event customization","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:"view_item",options:[{label:(0,s.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,s.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,s.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,s.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:i}),(0,e.createElement)(ue,{title:"add_shipping_info ",options:[{label:(0,s.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,s.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,s.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,s.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:i}),(0,e.createElement)(ue,{title:"add_payment_info ",options:[{label:(0,s.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,s.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,s.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,s.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(Ne,{title:(0,s.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Te,help:(0,s.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:i}),(0,e.createElement)(me,{title:(0,s.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,s.__)("Enter prefix …","gtm-kit"),help:(0,s.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,s.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_dequeue_script",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Include permalink structure","gtm-kit"),label:(0,s.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_permalink_structure",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Include path of pages","gtm-kit"),label:(0,s.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_pages",disabled:i}))))},Ie=()=>{const{useSettings:t}=(0,e.useContext)(c),n="Contact Form 7",a=!window.gtmkitSettings.plugins.cf7,i=a||!t.integrations.cf7_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Contact Form 7","gtm-kit")),a?(0,e.createElement)(ge,{pluginName:n}):null,(0,e.createElement)(Ce,{pluginName:n,optionName:"cf7_integration",pluginInactive:a}),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:(0,s.__)("Load JavaScript","gtm-kit"),options:[{label:(0,s.__)("Only on pages where where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,s.__)("On all pages","gtm-kit"),value:2}],help:(0,s.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:i}))))},Pe=()=>{const t="Easy Digital Downloads",n=!window.gtmkitSettings.plugins.edd,{useSettings:a}=(0,e.useContext)(c),i=n||!a.integrations.edd_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Easy Digital Downloads","gtm-kit")),n?(0,e.createElement)(ge,{pluginName:t}):null,(0,e.createElement)(Ce,{pluginName:t,optionName:"edd_integration",pluginInactive:n}),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Use SKU instead of ID","gtm-kit"),label:(0,s.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"edd_use_sku",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Exclude tax","gtm-kit"),label:(0,s.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(Ne,{title:(0,s.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Te,help:(0,s.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:i}),(0,e.createElement)(me,{title:(0,s.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,s.__)("Enter prefix …","gtm-kit"),help:(0,s.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:i}))),(0,e.createElement)(pe,{disabled:n},(0,e.createElement)(pe.Header,{title:(0,s.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,s.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"edd_dequeue_script",disabled:i}))))},De=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Help","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Tag Manager templates","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,s.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit"),(0,s.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/"},(0,s.__)("Read guide","gtm-kit"))),(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,s.__)("GTM container import files:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - eCommerce","gtm-kit")))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Tutorials","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("ul",null,le.map((t=>(0,e.createElement)("li",{className:"gtmkit-mb-4"},(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:t.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline"},t.title),t.text.map((t=>(0,e.createElement)("div",null,t)))))))))),Re=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Get support","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Support options","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,s.__)("Support forum","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,s.__)("GITHub repository","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,s.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)"),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://wordpress.org/plugins/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,s.__)("WordPress.org Plugin Page","gtm-kit")))," "))));const Oe=()=>{const{useSettings:t}=(0,e.useContext)(c),a=window.gtmkitSettings.currentPage;return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Rt,{page:a}),(0,e.createElement)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base"},(0,e.createElement)(kt,null,(0,e.createElement)(ht,{exact:!0,path:"/general",element:(0,e.createElement)(se,null)}),(0,e.createElement)(ht,{exact:!0,path:"/container",element:(0,e.createElement)(he,null)}),(0,e.createElement)(ht,{exact:!0,path:"/post-data",element:(0,e.createElement)(_e,null)}),(0,e.createElement)(ht,{exact:!0,path:"/user-data",element:(0,e.createElement)(ke,null)}),(0,e.createElement)(ht,{exact:!0,path:"/google-consent-mode",element:(0,e.createElement)(fe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/misc",element:(0,e.createElement)(be,null)}),(0,e.createElement)(ht,{exact:!0,path:"/whats-new",element:(0,e.createElement)(we,null)}),(0,e.createElement)(ht,{exact:!0,path:"/integrations",element:(0,e.createElement)(Se,null)}),(0,e.createElement)(ht,{exact:!0,path:"/woocommerce",element:(0,e.createElement)(Ge,null)}),(0,e.createElement)(ht,{exact:!0,path:"/cf7",element:(0,e.createElement)(Ie,null)}),(0,e.createElement)(ht,{exact:!0,path:"/edd",element:(0,e.createElement)(Pe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/help",element:(0,e.createElement)(De,null)}),(0,e.createElement)(ht,{exact:!0,path:"/support",element:(0,e.createElement)(Re,null)}),(0,e.createElement)(ht,{path:"/",element:(0,e.createElement)(pt,{replace:!0,to:"/"+a})}))),(0,e.createElement)(ee,null)):(0,e.createElement)(n.Spinner,null)},Me=()=>(0,e.createElement)(wt,{basename:"/"},(0,e.createElement)(g,null,(0,e.createElement)(Oe,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,e.render)((0,e.createElement)(Me,null),document.getElementById(window.gtmkitSettings.rootId))}))}(); -
gtm-kit/tags/1.14.1/assets/admin/wizard.asset.php
r2974164 r2975488 1 <?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' a7baf0ea81142a07a9ab');1 <?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '41bbfcedb3247f67e9a1'); -
gtm-kit/tags/1.14.1/assets/admin/wizard.js
r2974164 r2975488 1 !function(){"use strict";var t={n:function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,{a:a}),a},d:function(e,a){for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.wp.element,a=window.wp.components,n=window.lodash,r=window.wp.apiFetch,i=t.n(r);i().use(i().createNonceMiddleware(window.gtmkitSettings.nonce)),i().use(i().createRootURLMiddleware(window.gtmkitSettings.root));const l=async()=>{let t={};try{t=await i()({path:"gtmkit/v1/get-options",method:" POST"})}catch(t){return console.log("fetchSettings Errors:",t),{gtm_kit_settings_fetch_settings_errors:!0}}return!0===t.success?t.data:t},o=async()=>{let t={};try{t=await i()({path:"gtmkit/v1/get-site-data",method:"POST"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t};var s=window.wp.i18n,m=(t,e)=>{const a=Object.assign({},t);switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,void 0===e.payload.fetchedSettings.integrations&&(a.fetchedSettings.integrations={}),void 0!==e.payload.fetchedSettings.gtm_kit_settings_fetch_settings_errors&&(a.notice=(0,s.__)("An error occurred.","gtm-kit"),a.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":a.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.isPending=!1;let t=!1,n=(0,s.__)("Saved Successfully.","gtm-kit"),r=!1;void 0!==e.payload.fetchedSettings.gtm_kit_settings_update_settings_errors&&(t=!0,n=(0,s.__)("An error occurred.","gtm-kit"),r=!0),a.canSave=t,a.notice=n,a.hasError=r;break;case"UPDATE_STATE":e.payload.fetchedSettings&&(a.fetchedSettings=e.payload.fetchedSettings),e.payload.stateSettings&&(a.stateSettings=e.payload.stateSettings),void 0!==e.payload.isPending&&(a.isPending=e.payload.isPending),void 0!==e.payload.notice&&(a.notice=e.payload.notice),void 0!==e.payload.hasError&&(a.hasError=e.payload.hasError),void 0!==e.payload.canSave&&(a.canSave=e.payload.canSave)}return a};const c=(0,e.createContext)();var g,u=t=>{const[a,r]=(0,e.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:"",canSave:!1}),s=async()=>{const[t,e]=await Promise.all([l(),o()]),a="wizard"===window.gtmkitSettings.currentPage?await(async()=>{let t={};try{t=await i()({path:"gtmkit/v1/get-install-data",method:"POST"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t})():{};r({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},g=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,e.useEffect)((()=>{s()}),[]);const u={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(async t=>{let e={};try{e=await i()({path:"gtmkit/v1/set-options",method:"POST",data:t})}catch(t){return console.log("updateSettings Errors:",t),{gtm_kit_settings_update_settings_errors:!0}}return!0===e.success?e.data:e})(a.stateSettings);r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:g,useUpdateStateSettings:async(t,e,r)=>{const i=JSON.parse(JSON.stringify(a.stateSettings));let l;i[t][e]=r,l=!(0,n.isEqual)(i,a.fetchedSettings),g({stateSettings:i,canSave:l})},useImportSettings:async(t,e)=>{const r=JSON.parse(JSON.stringify(a.stateSettings));let i;const l={};l.general={...r.general,...e.general},"integrations"in e&&(l.integrations={...r.integrations,...e.integrations}),i=!(0,n.isEqual)(l,a.fetchedSettings),g({stateSettings:l,canSave:i})},useSettings:a.stateSettings,useIsPending:a.isPending,useNotice:a.notice,useHasError:a.hasError,useCanSave:a.canSave,useSiteData:a.siteData,useInstallData:a.installData};return(0,e.createElement)(c.Provider,{value:u},t.children)},d=window.React;function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},p.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(g||(g={}));const h="popstate";function k(t,e){if(!1===t||null==t)throw new Error(e)}function f(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function y(t,e){return{usr:t.state,key:t.key,idx:e}}function E(t,e,a,n){return void 0===a&&(a=null),p({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?M(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function x(t){let{pathname:e="/",search:a="",hash:n=""}=t;return a&&"?"!==a&&(e+="?"===a.charAt(0)?a:"?"+a),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function M(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var N;function S(t,e,a){void 0===a&&(a="/");let n=U(("string"==typeof e?M(e):e).pathname||"/",a);if(null==n)return null;let r=v(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(r);let i=null;for(let t=0;null==i&&t<r.length;++t)i=O(r[t],A(n));return i}function v(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let r=(t,r,i)=>{let l={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:r,route:t};l.relativePath.startsWith("/")&&(k(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),l.relativePath=l.relativePath.slice(n.length));let o=B([n,l.relativePath]),s=a.concat(l);t.children&&t.children.length>0&&(k(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),v(t.children,e,s,o)),(null!=t.path||t.index)&&e.push({path:o,score:D(o,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of _(t.path))r(t,e,a);else r(t,e)})),e}function _(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,r=a.endsWith("?"),i=a.replace(/\?$/,"");if(0===n.length)return r?[i,""]:[i];let l=_(n.join("/")),o=[];return o.push(...l.map((t=>""===t?i:[i,t].join("/")))),r&&o.push(...l),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(N||(N={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const b=/^:\w+$/,w=3,T=2,j=1,L=10,C=-2,I=t=>"*"===t;function D(t,e){let a=t.split("/"),n=a.length;return a.some(I)&&(n+=C),e&&(n+=T),a.filter((t=>!I(t))).reduce(((t,e)=>t+(b.test(e)?w:""===e?j:L)),n)}function O(t,e){let{routesMeta:a}=t,n={},r="/",i=[];for(let t=0;t<a.length;++t){let l=a[t],o=t===a.length-1,s="/"===r?e:e.slice(r.length)||"/",m=z({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},s);if(!m)return null;Object.assign(n,m.params);let c=l.route;i.push({params:n,pathname:B([r,m.pathname]),pathnameBase:W(B([r,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(r=B([r,m.pathnameBase]))}return i}function z(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[a,n]=function(t,e,a){void 0===e&&(e=!1),void 0===a&&(a=!0),f("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let n=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((t,e)=>(n.push(e),"/([^\\/]+)")));return t.endsWith("*")?(n.push("*"),r+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?r+="\\/*$":""!==t&&"/"!==t&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),r=e.match(a);if(!r)return null;let i=r[0],l=i.replace(/(.)\/+$/,"$1"),o=r.slice(1);return{params:n.reduce(((t,e,a)=>{if("*"===e){let t=o[a]||"";l=i.slice(0,i.length-t.length).replace(/(.)\/+$/,"$1")}return t[e]=function(t,e){try{return decodeURIComponent(t)}catch(a){return f(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+a+")."),t}}(o[a]||"",e),t}),{}),pathname:i,pathnameBase:l,pattern:t}}function A(t){try{return decodeURI(t)}catch(e){return f(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function U(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function P(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function R(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}function G(t,e,a,n){let r;void 0===n&&(n=!1),"string"==typeof t?r=M(t):(r=p({},t),k(!r.pathname||!r.pathname.includes("?"),P("?","pathname","search",r)),k(!r.pathname||!r.pathname.includes("#"),P("#","pathname","hash",r)),k(!r.search||!r.search.includes("#"),P("#","search","hash",r)));let i,l=""===t||""===r.pathname,o=l?"/":r.pathname;if(n||null==o)i=a;else{let t=e.length-1;if(o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;r.pathname=e.join("/")}i=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:r=""}="string"==typeof t?M(t):t,i=a?a.startsWith("/")?a:function(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?a.length>1&&a.pop():"."!==t&&a.push(t)})),a.length>1?a.join("/"):"/"}(a,e):e;return{pathname:i,search:Y(n),hash:Q(r)}}(r,i),m=o&&"/"!==o&&o.endsWith("/"),c=(l||"."===o)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const B=t=>t.join("/").replace(/\/\/+/g,"/"),W=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Y=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Q=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const F=["post","put","patch","delete"],J=(new Set(F),["get",...F]);function H(){return H=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},H.apply(this,arguments)}new Set(J),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const $=d.createContext(null),Z=d.createContext(null),K=d.createContext(null),V=d.createContext(null),X=d.createContext({outlet:null,matches:[],isDataRoute:!1}),q=d.createContext(null);function tt(){return null!=d.useContext(V)}function et(){return tt()||k(!1),d.useContext(V).location}function at(t){d.useContext(K).static||d.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=d.useContext(X);return t?function(){let{router:t}=function(t){let e=d.useContext($);return e||k(!1),e}(mt.UseNavigateStable),e=gt(ct.UseNavigateStable),a=d.useRef(!1);return at((()=>{a.current=!0})),d.useCallback((function(n,r){void 0===r&&(r={}),a.current&&("number"==typeof n?t.navigate(n):t.navigate(n,H({fromRouteId:e},r)))}),[t,e])}():function(){tt()||k(!1);let t=d.useContext($),{basename:e,navigator:a}=d.useContext(K),{matches:n}=d.useContext(X),{pathname:r}=et(),i=JSON.stringify(R(n).map((t=>t.pathnameBase))),l=d.useRef(!1);return at((()=>{l.current=!0})),d.useCallback((function(n,o){if(void 0===o&&(o={}),!l.current)return;if("number"==typeof n)return void a.go(n);let s=G(n,JSON.parse(i),r,"path"===o.relative);null==t&&"/"!==e&&(s.pathname="/"===s.pathname?e:B([e,s.pathname])),(o.replace?a.replace:a.push)(s,o.state,o)}),[e,a,i,r,t])}()}function rt(t,e,a){tt()||k(!1);let{navigator:n}=d.useContext(K),{matches:r}=d.useContext(X),i=r[r.length-1],l=i?i.params:{},o=(i&&i.pathname,i?i.pathnameBase:"/");i&&i.route;let s,m=et();if(e){var c;let t="string"==typeof e?M(e):e;"/"===o||(null==(c=t.pathname)?void 0:c.startsWith(o))||k(!1),s=t}else s=m;let u=s.pathname||"/",p=S(t,{pathname:"/"===o?u:u.slice(o.length)||"/"}),h=function(t,e,a){var n;if(void 0===e&&(e=[]),void 0===a&&(a=null),null==t){var r;if(null==(r=a)||!r.errors)return null;t=a.matches}let i=t,l=null==(n=a)?void 0:n.errors;if(null!=l){let t=i.findIndex((t=>t.route.id&&(null==l?void 0:l[t.route.id])));t>=0||k(!1),i=i.slice(0,Math.min(i.length,t+1))}return i.reduceRight(((t,n,r)=>{let o=n.route.id?null==l?void 0:l[n.route.id]:null,s=null;a&&(s=n.route.errorElement||lt);let m=e.concat(i.slice(0,r+1)),c=()=>{let e;return e=o?s:n.route.Component?d.createElement(n.route.Component,null):n.route.element?n.route.element:t,d.createElement(st,{match:n,routeContext:{outlet:t,matches:m,isDataRoute:null!=a},children:e})};return a&&(n.route.ErrorBoundary||n.route.errorElement||0===r)?d.createElement(ot,{location:a.location,revalidation:a.revalidation,component:s,error:o,children:c(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):c()}),null)}(p&&p.map((t=>Object.assign({},t,{params:Object.assign({},l,t.params),pathname:B([o,n.encodeLocation?n.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?o:B([o,n.encodeLocation?n.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),r,a);return e&&h?d.createElement(V.Provider,{value:{location:H({pathname:"/",search:"",hash:"",state:null,key:"default"},s),navigationType:g.Pop}},h):h}function it(){let t=function(){var t;let e=d.useContext(q),a=function(t){let e=d.useContext(Z);return e||k(!1),e}(ct.UseRouteError),n=gt(ct.UseRouteError);return e||(null==(t=a.errors)?void 0:t[n])}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},e),a?d.createElement("pre",{style:n},a):null,null)}const lt=d.createElement(it,null);class ot extends d.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error?d.createElement(X.Provider,{value:this.props.routeContext},d.createElement(q.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function st(t){let{routeContext:e,match:a,children:n}=t,r=d.useContext($);return r&&r.static&&r.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=a.route.id),d.createElement(X.Provider,{value:e},n)}var mt=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(mt||{}),ct=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(ct||{});function gt(t){let e=function(t){let e=d.useContext(X);return e||k(!1),e}(),a=e.matches[e.matches.length-1];return a.route.id||k(!1),a.route.id}function ut(t){let{to:e,replace:a,state:n,relative:r}=t;tt()||k(!1);let{matches:i}=d.useContext(X),{pathname:l}=et(),o=nt(),s=G(e,R(i).map((t=>t.pathnameBase)),l,"path"===r),m=JSON.stringify(s);return d.useEffect((()=>o(JSON.parse(m),{replace:a,state:n,relative:r})),[o,m,r,a,n]),null}function dt(t){k(!1)}function pt(t){let{basename:e="/",children:a=null,location:n,navigationType:r=g.Pop,navigator:i,static:l=!1}=t;tt()&&k(!1);let o=e.replace(/^\/*/,"/"),s=d.useMemo((()=>({basename:o,navigator:i,static:l})),[o,i,l]);"string"==typeof n&&(n=M(n));let{pathname:m="/",search:c="",hash:u="",state:p=null,key:h="default"}=n,f=d.useMemo((()=>{let t=U(m,o);return null==t?null:{location:{pathname:t,search:c,hash:u,state:p,key:h},navigationType:r}}),[o,m,c,u,p,h,r]);return null==f?null:d.createElement(K.Provider,{value:s},d.createElement(V.Provider,{children:a,value:f}))}function ht(t){let{children:e,location:a}=t;return rt(kt(e),a)}function kt(t,e){void 0===e&&(e=[]);let a=[];return d.Children.forEach(t,((t,n)=>{if(!d.isValidElement(t))return;let r=[...e,n];if(t.type===d.Fragment)return void a.push.apply(a,kt(t.props.children,r));t.type!==dt&&k(!1),t.props.index&&t.props.children&&k(!1);let i={id:t.props.id||r.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(i.children=kt(t.props.children,r)),a.push(i)})),a}d.startTransition,new Promise((()=>{})),d.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const ft=d.startTransition;function yt(t){let{basename:e,children:a,future:n,window:r}=t,i=d.useRef();var l;null==i.current&&(i.current=(void 0===(l={window:r,v5Compat:!0})&&(l={}),function(t,e,a,n){void 0===n&&(n={});let{window:r=document.defaultView,v5Compat:i=!1}=n,l=r.history,o=g.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function u(){o=g.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:o,location:f.location,delta:e})}function d(t){let e="null"!==r.location.origin?r.location.origin:r.location.href,a="string"==typeof t?t:x(t);return k(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(p({},l.state,{idx:m}),""));let f={get action(){return o},get location(){return t(r,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return r.addEventListener(h,u),s=t,()=>{r.removeEventListener(h,u),s=null}},createHref(t){return e(r,t)},createURL:d,encodeLocation(t){let e=d(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=g.Push;let n=E(f.location,t,e);a&&a(n,t),m=c()+1;let u=y(n,m),d=f.createHref(n);try{l.pushState(u,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;r.location.assign(d)}i&&s&&s({action:o,location:f.location,delta:1})},replace:function(t,e){o=g.Replace;let n=E(f.location,t,e);a&&a(n,t),m=c();let r=y(n,m),u=f.createHref(n);l.replaceState(r,"",u),i&&s&&s({action:o,location:f.location,delta:0})},go(t){return l.go(t)}};return f}((function(t,e){let{pathname:a="/",search:n="",hash:r=""}=M(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),E("",{pathname:a,search:n,hash:r},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let a=t.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let e=t.location.href,a=e.indexOf("#");n=-1===a?e:e.slice(0,a)}return n+"#"+("string"==typeof e?e:x(e))}),(function(t,e){f("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),l)));let o=i.current,[s,m]=d.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},u=d.useCallback((t=>{c&&ft?ft((()=>m(t))):m(t)}),[m,c]);return d.useLayoutEffect((()=>o.listen(u)),[o,u]),d.createElement(pt,{basename:e,children:a,location:s.location,navigationType:s.action,navigator:o})}var Et,xt;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher"}(Et||(Et={})),function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));var Mt=()=>{const{useSettings:t,useUpdateStateSettings:n,useUpdateSettings:r,useIsPending:i}=(0,e.useContext)(c),l=nt();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 "},(0,e.createElement)(a.TextControl,{label:(0,s.__)("Container ID","gtm-kit"),placeholder:(0,s.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>n("general","gtm_id",t)})),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),l("/essential-settings",{replace:!0})},disabled:i||!t.general.gtm_id.includes("-")},(0,s.__)("Save and continue","gtm-kit"),i?(0,e.createElement)(a.Spinner,null):""))),(0,e.createElement)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-left gtmkit-text-color-grey gtmkit-text-center"},(0,e.createElement)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4"},"Need help?"),(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,s.__)("Find your GTM container ID on","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer"},"Google Tag Manager")),(0,e.createElement)("p",null,(0,s.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"))),(0,e.createElement)("div",{className:"gtmkit-mt-3 md:gtmkit-mt-10 gtmkit-text-color-grey gtmkit-text-base"},(0,e.createElement)("span",{className:"gtmkit-block"},(0,s.__)("No thanks. I know what I'm doing.","gtm-kit")),(0,e.createElement)("a",{className:"gtmkit-underline gtmkit-ml-4",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit"))))},Nt=()=>{const{useImportSettings:t,useIsPending:n,useInstallData:r}=(0,e.useContext)(c),[i,l]=(0,e.useState)(!0),o=Object.keys(r.import_data)[0],[m,g]=(0,e.useState)(o),u=[];return Object.keys(r.import_data).forEach((t=>{u.push({value:t,label:r.import_data[t].name})})),i?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-py-8 gtmkit-my-8"},(0,e.createElement)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold"},(0,s.__)("Would you like to import plugin settings?","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey"},(0,s.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,s.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,e.createElement)(a.RadioControl,{help:(0,s.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:m,options:u,onChange:t=>g(t)}),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(m,r.import_data[m]),l(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),n?(0,e.createElement)(a.Spinner,null):""),(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{l(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("No","gtm-kit")),n?(0,e.createElement)(a.Spinner,null):"")))):(0,e.createElement)(Mt,null)},St=()=>{const{useInstallData:t}=(0,e.useContext)(c),{firstInstall:a}=t,{importAvailable:n}=t;return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("You've successfully installed GTM Kit!","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit"))),a&&n?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},vt=()=>{const{useSettings:t,useUpdateStateSettings:n,useUpdateSettings:r,useIsPending:i,useInstallData:l}=(0,e.useContext)(c),o=nt();return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("Essential Settings","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("There are a lot of settings in GTM Kit and we recommend that you uses our recommended settings but you can also choose to use the default settings and go through the settings at your convenience.","gtm-kit"))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?","gtm-kit"),checked:t&&t.general.datalayer_page_type,onChange:()=>{n("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),l.woocommerce_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{n("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,l.cf7_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{n("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,l.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{n("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),o("/share-anonymous-data",{replace:!0})},disabled:i},(0,s.__)("Save and continue","gtm-kit"),i?(0,e.createElement)(a.Spinner,null):"")))},_t=()=>{const{useSettings:t,useUpdateStateSettings:n,useUpdateSettings:r,useIsPending:i,useSiteData:l}=(0,e.useContext)(c),o=nt();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Help improve GTM Kit","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey"},(0,s.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm"},(0,e.createElement)("tbody",null,(0,e.createElement)("tr",{className:""},(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Server type:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.web_server))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"PHP version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.php_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.wordpress_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress multisite:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.multisite?(0,s.__)("Yes","gtm-kit"):(0,s.__)("No","gtm-kit")))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current theme:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.current_theme))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current site language:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.locale))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Active plugins:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Plugin names of all active plugins"))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Anonymized GTM Kit settings:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Which GTM Kit settings are active"))))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto "},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{n("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),o("/getting-started",{replace:!0})},disabled:i},(0,s.__)("Save and continue","gtm-kit"),i?(0,e.createElement)(a.Spinner,null):"")))},bt=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Your are ready to use GTM Kit!","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto gtmkit-mb-8"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Google Tag Manager templates","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4"},(0,s.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit")," ",(0,e.createElement)("a",{target:"_blank",className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",rel:"noreferrer"},(0,s.__)("Read the guide","gtm-kit"))),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - eCommerce","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Tutorials","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Getting started with GTM Kit","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("WooCommerce Integration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=advanced-container-implementation&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Advanced GTM container implementation","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=settings-actions-and-filters-for-developers&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Settings, actions and filters for developers","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.dashboardUrl}},(0,s.__)("Go to the dashboard","gtm-kit"))));const wt=[{step:1,path:"/welcome",element:"Welcome",title:(0,s.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,s.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,s.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,s.__)("Getting Started","gtm-kit")}];var Tt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let r="gtmkit-h-0.5 gtmkit-w-full";return r+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,e.createElement)("div",{className:r})},jt=({step:t,currentStep:a})=>t<a?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",className:"gtmkit-w-5 gtmkit-h-5 gtmkit-text-white"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})):t===a?(0,e.createElement)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,Lt=({step:t,currentStep:a,totalSteps:n})=>{if(0===t)return;let r="gtmkit-transition-opacity gtmkit-duration-500 gtmkit-absolute gtmkit-inset-0 gtmkit-border-2 gtmkit-flex gtmkit-items-center gtmkit-justify-center gtmkit-rounded-full gtmkit-opacity-100";return r+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-white",r+=t>a?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full"},(0,e.createElement)("span",{className:r},(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(Tt,{step:t,currentStep:a,totalSteps:n}))},Ct=()=>{const t=wt.length-1+wt[0].step;let a=((t,e)=>{const a=Object.keys(e);return t.filter((function(t){for(let n=0;n<a.length;n++)if(!t.hasOwnProperty(a[n])||t[a[n]]!==e[a[n]])return!1;return!0}))})(wt,{path:et().pathname});return a=a.length?a[0].step:0,0===a?(0,e.createElement)("div",{className:"gtmkit-my-16"}):(0,e.createElement)("div",{className:"gtmkit-mt-6 gtmkit-inset-0 gtmkit-mx-auto gtmkit-my-6 gtmkit-flex gtmkit-items-center gtmkit-max-w-xl","aria-hidden":"true"},wt.map((function(n){return(0,e.createElement)(Lt,{step:n.step,currentStep:a,totalSteps:t})})))},It=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-text-center gtmkit-px-3"},(0,e.createElement)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[225px] gtmkit-inline-block"},(0,e.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,s.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,e.createElement)(Ct,null)),Dt=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey"},(0,e.createElement)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max"},(0,e.createElement)("a",{className:"gtmkit-underline",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit")))));const Ot=()=>{const{useSettings:t}=(0,e.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(It,null),(0,e.createElement)("main",{className:"gtmkit-max-w-3xl gtmkit-bg-white gtmkit-border-1 gtmkit-border-color-border gtmkit-rounded-md gtmkit-mx-auto gtmkit-py-12 gtmkit-px-16 gtmkit-text-base"},(0,e.createElement)(ht,null,(0,e.createElement)(dt,{exact:!0,path:"/welcome",element:(0,e.createElement)(St,null)}),(0,e.createElement)(dt,{exact:!0,path:"/essential-settings",element:(0,e.createElement)(vt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/share-anonymous-data",element:(0,e.createElement)(_t,null)}),(0,e.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(bt,null)}),(0,e.createElement)(dt,{path:"/",element:(0,e.createElement)(ut,{replace:!0,to:"/welcome"})}))),(0,e.createElement)(Dt,null)):(0,e.createElement)(a.Spinner,{className:"gtm-kit-settings-page-loader"})},zt=()=>(0,e.createElement)(yt,{basename:"/"},(0,e.createElement)(u,null,(0,e.createElement)(Ot,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,e.render)((0,e.createElement)(zt,null),document.getElementById(window.gtmkitSettings.rootId))}))}();1 !function(){"use strict";var t={n:function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,{a:a}),a},d:function(e,a){for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.wp.element,a=window.wp.components,n=window.lodash,r=window.wp.apiFetch,i=t.n(r);i().use(i().createNonceMiddleware(window.gtmkitSettings.nonce)),i().use(i().createRootURLMiddleware(window.gtmkitSettings.root));const l=async()=>{let t={};try{t=await i()({path:"gtmkit/v1/get-options",method:"GET"})}catch(t){return console.log("fetchSettings Errors:",t),{gtm_kit_settings_fetch_settings_errors:!0}}return!0===t.success?t.data:t},o=async()=>{let t={};try{t=await i()({path:"gtmkit/v1/get-site-data",method:"GET"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t};var s=window.wp.i18n,m=(t,e)=>{const a=Object.assign({},t);switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,void 0===e.payload.fetchedSettings.integrations&&(a.fetchedSettings.integrations={}),void 0!==e.payload.fetchedSettings.gtm_kit_settings_fetch_settings_errors&&(a.notice=(0,s.__)("An error occurred.","gtm-kit"),a.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":a.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.isPending=!1;let t=!1,n=(0,s.__)("Saved Successfully.","gtm-kit"),r=!1;void 0!==e.payload.fetchedSettings.gtm_kit_settings_update_settings_errors&&(t=!0,n=(0,s.__)("An error occurred.","gtm-kit"),r=!0),a.canSave=t,a.notice=n,a.hasError=r;break;case"UPDATE_STATE":e.payload.fetchedSettings&&(a.fetchedSettings=e.payload.fetchedSettings),e.payload.stateSettings&&(a.stateSettings=e.payload.stateSettings),void 0!==e.payload.isPending&&(a.isPending=e.payload.isPending),void 0!==e.payload.notice&&(a.notice=e.payload.notice),void 0!==e.payload.hasError&&(a.hasError=e.payload.hasError),void 0!==e.payload.canSave&&(a.canSave=e.payload.canSave)}return a};const c=(0,e.createContext)();var g,u=t=>{const[a,r]=(0,e.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:"",canSave:!1}),s=async()=>{const[t,e]=await Promise.all([l(),o()]),a="wizard"===window.gtmkitSettings.currentPage?await(async()=>{let t={};try{t=await i()({path:"gtmkit/v1/get-install-data",method:"GET"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t})():{};r({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},g=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,e.useEffect)((()=>{s()}),[]);const u={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(async t=>{let e={};try{e=await i()({path:"gtmkit/v1/set-options",method:"POST",data:t})}catch(t){return console.log("updateSettings Errors:",t),{gtm_kit_settings_update_settings_errors:!0}}return!0===e.success?e.data:e})(a.stateSettings);r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:g,useUpdateStateSettings:async(t,e,r)=>{const i=JSON.parse(JSON.stringify(a.stateSettings));let l;i[t][e]=r,l=!(0,n.isEqual)(i,a.fetchedSettings),g({stateSettings:i,canSave:l})},useImportSettings:async(t,e)=>{const r=JSON.parse(JSON.stringify(a.stateSettings));let i;const l={};l.general={...r.general,...e.general},"integrations"in e&&(l.integrations={...r.integrations,...e.integrations}),i=!(0,n.isEqual)(l,a.fetchedSettings),g({stateSettings:l,canSave:i})},useSettings:a.stateSettings,useIsPending:a.isPending,useNotice:a.notice,useHasError:a.hasError,useCanSave:a.canSave,useSiteData:a.siteData,useInstallData:a.installData};return(0,e.createElement)(c.Provider,{value:u},t.children)},d=window.React;function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},p.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(g||(g={}));const h="popstate";function k(t,e){if(!1===t||null==t)throw new Error(e)}function f(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function y(t,e){return{usr:t.state,key:t.key,idx:e}}function E(t,e,a,n){return void 0===a&&(a=null),p({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?M(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function x(t){let{pathname:e="/",search:a="",hash:n=""}=t;return a&&"?"!==a&&(e+="?"===a.charAt(0)?a:"?"+a),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function M(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var N;function v(t,e,a){void 0===a&&(a="/");let n=U(("string"==typeof e?M(e):e).pathname||"/",a);if(null==n)return null;let r=S(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(r);let i=null;for(let t=0;null==i&&t<r.length;++t)i=O(r[t],A(n));return i}function S(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let r=(t,r,i)=>{let l={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:r,route:t};l.relativePath.startsWith("/")&&(k(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),l.relativePath=l.relativePath.slice(n.length));let o=B([n,l.relativePath]),s=a.concat(l);t.children&&t.children.length>0&&(k(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),S(t.children,e,s,o)),(null!=t.path||t.index)&&e.push({path:o,score:D(o,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of _(t.path))r(t,e,a);else r(t,e)})),e}function _(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,r=a.endsWith("?"),i=a.replace(/\?$/,"");if(0===n.length)return r?[i,""]:[i];let l=_(n.join("/")),o=[];return o.push(...l.map((t=>""===t?i:[i,t].join("/")))),r&&o.push(...l),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(N||(N={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const b=/^:\w+$/,w=3,T=2,j=1,L=10,C=-2,I=t=>"*"===t;function D(t,e){let a=t.split("/"),n=a.length;return a.some(I)&&(n+=C),e&&(n+=T),a.filter((t=>!I(t))).reduce(((t,e)=>t+(b.test(e)?w:""===e?j:L)),n)}function O(t,e){let{routesMeta:a}=t,n={},r="/",i=[];for(let t=0;t<a.length;++t){let l=a[t],o=t===a.length-1,s="/"===r?e:e.slice(r.length)||"/",m=z({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},s);if(!m)return null;Object.assign(n,m.params);let c=l.route;i.push({params:n,pathname:B([r,m.pathname]),pathnameBase:W(B([r,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(r=B([r,m.pathnameBase]))}return i}function z(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[a,n]=function(t,e,a){void 0===e&&(e=!1),void 0===a&&(a=!0),f("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let n=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((t,e)=>(n.push(e),"/([^\\/]+)")));return t.endsWith("*")?(n.push("*"),r+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?r+="\\/*$":""!==t&&"/"!==t&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),r=e.match(a);if(!r)return null;let i=r[0],l=i.replace(/(.)\/+$/,"$1"),o=r.slice(1);return{params:n.reduce(((t,e,a)=>{if("*"===e){let t=o[a]||"";l=i.slice(0,i.length-t.length).replace(/(.)\/+$/,"$1")}return t[e]=function(t,e){try{return decodeURIComponent(t)}catch(a){return f(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+a+")."),t}}(o[a]||"",e),t}),{}),pathname:i,pathnameBase:l,pattern:t}}function A(t){try{return decodeURI(t)}catch(e){return f(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function U(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function P(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function R(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}function G(t,e,a,n){let r;void 0===n&&(n=!1),"string"==typeof t?r=M(t):(r=p({},t),k(!r.pathname||!r.pathname.includes("?"),P("?","pathname","search",r)),k(!r.pathname||!r.pathname.includes("#"),P("#","pathname","hash",r)),k(!r.search||!r.search.includes("#"),P("#","search","hash",r)));let i,l=""===t||""===r.pathname,o=l?"/":r.pathname;if(n||null==o)i=a;else{let t=e.length-1;if(o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;r.pathname=e.join("/")}i=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:r=""}="string"==typeof t?M(t):t,i=a?a.startsWith("/")?a:function(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?a.length>1&&a.pop():"."!==t&&a.push(t)})),a.length>1?a.join("/"):"/"}(a,e):e;return{pathname:i,search:Y(n),hash:Q(r)}}(r,i),m=o&&"/"!==o&&o.endsWith("/"),c=(l||"."===o)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const B=t=>t.join("/").replace(/\/\/+/g,"/"),W=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Y=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Q=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const F=["post","put","patch","delete"],J=(new Set(F),["get",...F]);function H(){return H=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},H.apply(this,arguments)}new Set(J),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const $=d.createContext(null),Z=d.createContext(null),K=d.createContext(null),V=d.createContext(null),X=d.createContext({outlet:null,matches:[],isDataRoute:!1}),q=d.createContext(null);function tt(){return null!=d.useContext(V)}function et(){return tt()||k(!1),d.useContext(V).location}function at(t){d.useContext(K).static||d.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=d.useContext(X);return t?function(){let{router:t}=function(t){let e=d.useContext($);return e||k(!1),e}(mt.UseNavigateStable),e=gt(ct.UseNavigateStable),a=d.useRef(!1);return at((()=>{a.current=!0})),d.useCallback((function(n,r){void 0===r&&(r={}),a.current&&("number"==typeof n?t.navigate(n):t.navigate(n,H({fromRouteId:e},r)))}),[t,e])}():function(){tt()||k(!1);let t=d.useContext($),{basename:e,navigator:a}=d.useContext(K),{matches:n}=d.useContext(X),{pathname:r}=et(),i=JSON.stringify(R(n).map((t=>t.pathnameBase))),l=d.useRef(!1);return at((()=>{l.current=!0})),d.useCallback((function(n,o){if(void 0===o&&(o={}),!l.current)return;if("number"==typeof n)return void a.go(n);let s=G(n,JSON.parse(i),r,"path"===o.relative);null==t&&"/"!==e&&(s.pathname="/"===s.pathname?e:B([e,s.pathname])),(o.replace?a.replace:a.push)(s,o.state,o)}),[e,a,i,r,t])}()}function rt(t,e,a){tt()||k(!1);let{navigator:n}=d.useContext(K),{matches:r}=d.useContext(X),i=r[r.length-1],l=i?i.params:{},o=(i&&i.pathname,i?i.pathnameBase:"/");i&&i.route;let s,m=et();if(e){var c;let t="string"==typeof e?M(e):e;"/"===o||(null==(c=t.pathname)?void 0:c.startsWith(o))||k(!1),s=t}else s=m;let u=s.pathname||"/",p=v(t,{pathname:"/"===o?u:u.slice(o.length)||"/"}),h=function(t,e,a){var n;if(void 0===e&&(e=[]),void 0===a&&(a=null),null==t){var r;if(null==(r=a)||!r.errors)return null;t=a.matches}let i=t,l=null==(n=a)?void 0:n.errors;if(null!=l){let t=i.findIndex((t=>t.route.id&&(null==l?void 0:l[t.route.id])));t>=0||k(!1),i=i.slice(0,Math.min(i.length,t+1))}return i.reduceRight(((t,n,r)=>{let o=n.route.id?null==l?void 0:l[n.route.id]:null,s=null;a&&(s=n.route.errorElement||lt);let m=e.concat(i.slice(0,r+1)),c=()=>{let e;return e=o?s:n.route.Component?d.createElement(n.route.Component,null):n.route.element?n.route.element:t,d.createElement(st,{match:n,routeContext:{outlet:t,matches:m,isDataRoute:null!=a},children:e})};return a&&(n.route.ErrorBoundary||n.route.errorElement||0===r)?d.createElement(ot,{location:a.location,revalidation:a.revalidation,component:s,error:o,children:c(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):c()}),null)}(p&&p.map((t=>Object.assign({},t,{params:Object.assign({},l,t.params),pathname:B([o,n.encodeLocation?n.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?o:B([o,n.encodeLocation?n.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),r,a);return e&&h?d.createElement(V.Provider,{value:{location:H({pathname:"/",search:"",hash:"",state:null,key:"default"},s),navigationType:g.Pop}},h):h}function it(){let t=function(){var t;let e=d.useContext(q),a=function(t){let e=d.useContext(Z);return e||k(!1),e}(ct.UseRouteError),n=gt(ct.UseRouteError);return e||(null==(t=a.errors)?void 0:t[n])}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},e),a?d.createElement("pre",{style:n},a):null,null)}const lt=d.createElement(it,null);class ot extends d.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error?d.createElement(X.Provider,{value:this.props.routeContext},d.createElement(q.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function st(t){let{routeContext:e,match:a,children:n}=t,r=d.useContext($);return r&&r.static&&r.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=a.route.id),d.createElement(X.Provider,{value:e},n)}var mt=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(mt||{}),ct=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(ct||{});function gt(t){let e=function(t){let e=d.useContext(X);return e||k(!1),e}(),a=e.matches[e.matches.length-1];return a.route.id||k(!1),a.route.id}function ut(t){let{to:e,replace:a,state:n,relative:r}=t;tt()||k(!1);let{matches:i}=d.useContext(X),{pathname:l}=et(),o=nt(),s=G(e,R(i).map((t=>t.pathnameBase)),l,"path"===r),m=JSON.stringify(s);return d.useEffect((()=>o(JSON.parse(m),{replace:a,state:n,relative:r})),[o,m,r,a,n]),null}function dt(t){k(!1)}function pt(t){let{basename:e="/",children:a=null,location:n,navigationType:r=g.Pop,navigator:i,static:l=!1}=t;tt()&&k(!1);let o=e.replace(/^\/*/,"/"),s=d.useMemo((()=>({basename:o,navigator:i,static:l})),[o,i,l]);"string"==typeof n&&(n=M(n));let{pathname:m="/",search:c="",hash:u="",state:p=null,key:h="default"}=n,f=d.useMemo((()=>{let t=U(m,o);return null==t?null:{location:{pathname:t,search:c,hash:u,state:p,key:h},navigationType:r}}),[o,m,c,u,p,h,r]);return null==f?null:d.createElement(K.Provider,{value:s},d.createElement(V.Provider,{children:a,value:f}))}function ht(t){let{children:e,location:a}=t;return rt(kt(e),a)}function kt(t,e){void 0===e&&(e=[]);let a=[];return d.Children.forEach(t,((t,n)=>{if(!d.isValidElement(t))return;let r=[...e,n];if(t.type===d.Fragment)return void a.push.apply(a,kt(t.props.children,r));t.type!==dt&&k(!1),t.props.index&&t.props.children&&k(!1);let i={id:t.props.id||r.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(i.children=kt(t.props.children,r)),a.push(i)})),a}d.startTransition,new Promise((()=>{})),d.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const ft=d.startTransition;function yt(t){let{basename:e,children:a,future:n,window:r}=t,i=d.useRef();var l;null==i.current&&(i.current=(void 0===(l={window:r,v5Compat:!0})&&(l={}),function(t,e,a,n){void 0===n&&(n={});let{window:r=document.defaultView,v5Compat:i=!1}=n,l=r.history,o=g.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function u(){o=g.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:o,location:f.location,delta:e})}function d(t){let e="null"!==r.location.origin?r.location.origin:r.location.href,a="string"==typeof t?t:x(t);return k(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(p({},l.state,{idx:m}),""));let f={get action(){return o},get location(){return t(r,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return r.addEventListener(h,u),s=t,()=>{r.removeEventListener(h,u),s=null}},createHref(t){return e(r,t)},createURL:d,encodeLocation(t){let e=d(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=g.Push;let n=E(f.location,t,e);a&&a(n,t),m=c()+1;let u=y(n,m),d=f.createHref(n);try{l.pushState(u,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;r.location.assign(d)}i&&s&&s({action:o,location:f.location,delta:1})},replace:function(t,e){o=g.Replace;let n=E(f.location,t,e);a&&a(n,t),m=c();let r=y(n,m),u=f.createHref(n);l.replaceState(r,"",u),i&&s&&s({action:o,location:f.location,delta:0})},go(t){return l.go(t)}};return f}((function(t,e){let{pathname:a="/",search:n="",hash:r=""}=M(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),E("",{pathname:a,search:n,hash:r},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let a=t.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let e=t.location.href,a=e.indexOf("#");n=-1===a?e:e.slice(0,a)}return n+"#"+("string"==typeof e?e:x(e))}),(function(t,e){f("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),l)));let o=i.current,[s,m]=d.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},u=d.useCallback((t=>{c&&ft?ft((()=>m(t))):m(t)}),[m,c]);return d.useLayoutEffect((()=>o.listen(u)),[o,u]),d.createElement(pt,{basename:e,children:a,location:s.location,navigationType:s.action,navigator:o})}var Et,xt;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher"}(Et||(Et={})),function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));var Mt=()=>{const{useSettings:t,useUpdateStateSettings:n,useUpdateSettings:r,useIsPending:i}=(0,e.useContext)(c),l=nt();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 "},(0,e.createElement)(a.TextControl,{label:(0,s.__)("Container ID","gtm-kit"),placeholder:(0,s.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>n("general","gtm_id",t)})),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),l("/essential-settings",{replace:!0})},disabled:i||!t.general.gtm_id.includes("-")},(0,s.__)("Save and continue","gtm-kit"),i?(0,e.createElement)(a.Spinner,null):""))),(0,e.createElement)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-left gtmkit-text-color-grey gtmkit-text-center"},(0,e.createElement)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4"},"Need help?"),(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,s.__)("Find your GTM container ID on","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer"},"Google Tag Manager")),(0,e.createElement)("p",null,(0,s.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"))),(0,e.createElement)("div",{className:"gtmkit-mt-3 md:gtmkit-mt-10 gtmkit-text-color-grey gtmkit-text-base"},(0,e.createElement)("span",{className:"gtmkit-block"},(0,s.__)("No thanks. I know what I'm doing.","gtm-kit")),(0,e.createElement)("a",{className:"gtmkit-underline gtmkit-ml-4",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit"))))},Nt=()=>{const{useImportSettings:t,useIsPending:n,useInstallData:r}=(0,e.useContext)(c),[i,l]=(0,e.useState)(!0),o=Object.keys(r.import_data)[0],[m,g]=(0,e.useState)(o),u=[];return Object.keys(r.import_data).forEach((t=>{u.push({value:t,label:r.import_data[t].name})})),i?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-py-8 gtmkit-my-8"},(0,e.createElement)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold"},(0,s.__)("Would you like to import plugin settings?","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey"},(0,s.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,s.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,e.createElement)(a.RadioControl,{help:(0,s.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:m,options:u,onChange:t=>g(t)}),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(m,r.import_data[m]),l(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),n?(0,e.createElement)(a.Spinner,null):""),(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{l(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("No","gtm-kit")),n?(0,e.createElement)(a.Spinner,null):"")))):(0,e.createElement)(Mt,null)},vt=()=>{const{useInstallData:t}=(0,e.useContext)(c),{firstInstall:a}=t,{importAvailable:n}=t;return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("You've successfully installed GTM Kit!","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit"))),a&&n?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},St=()=>{const{useSettings:t,useUpdateStateSettings:n,useUpdateSettings:r,useIsPending:i,useInstallData:l}=(0,e.useContext)(c),o=nt();return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("Essential Settings","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("There are a lot of settings in GTM Kit and we recommend that you uses our recommended settings but you can also choose to use the default settings and go through the settings at your convenience.","gtm-kit"))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?","gtm-kit"),checked:t&&t.general.datalayer_page_type,onChange:()=>{n("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),l.woocommerce_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{n("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,l.cf7_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{n("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,l.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{n("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),o("/share-anonymous-data",{replace:!0})},disabled:i},(0,s.__)("Save and continue","gtm-kit"),i?(0,e.createElement)(a.Spinner,null):"")))},_t=()=>{const{useSettings:t,useUpdateStateSettings:n,useUpdateSettings:r,useIsPending:i,useSiteData:l}=(0,e.useContext)(c),o=nt();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Help improve GTM Kit","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey"},(0,s.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm"},(0,e.createElement)("tbody",null,(0,e.createElement)("tr",{className:""},(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Server type:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.web_server))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"PHP version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.php_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.wordpress_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress multisite:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.multisite?(0,s.__)("Yes","gtm-kit"):(0,s.__)("No","gtm-kit")))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current theme:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.current_theme))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current site language:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.locale))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Active plugins:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Plugin names of all active plugins"))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Anonymized GTM Kit settings:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Which GTM Kit settings are active"))))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto "},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{n("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),o("/getting-started",{replace:!0})},disabled:i},(0,s.__)("Save and continue","gtm-kit"),i?(0,e.createElement)(a.Spinner,null):"")))},bt=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Your are ready to use GTM Kit!","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto gtmkit-mb-8"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Google Tag Manager templates","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4"},(0,s.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit")," ",(0,e.createElement)("a",{target:"_blank",className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",rel:"noreferrer"},(0,s.__)("Read the guide","gtm-kit"))),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - eCommerce","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Tutorials","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Getting started with GTM Kit","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("WooCommerce Integration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=advanced-container-implementation&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Advanced GTM container implementation","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=settings-actions-and-filters-for-developers&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Settings, actions and filters for developers","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.dashboardUrl}},(0,s.__)("Go to the dashboard","gtm-kit"))));const wt=[{step:1,path:"/welcome",element:"Welcome",title:(0,s.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,s.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,s.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,s.__)("Getting Started","gtm-kit")}];var Tt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let r="gtmkit-h-0.5 gtmkit-w-full";return r+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,e.createElement)("div",{className:r})},jt=({step:t,currentStep:a})=>t<a?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",className:"gtmkit-w-5 gtmkit-h-5 gtmkit-text-white"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})):t===a?(0,e.createElement)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,Lt=({step:t,currentStep:a,totalSteps:n})=>{if(0===t)return;let r="gtmkit-transition-opacity gtmkit-duration-500 gtmkit-absolute gtmkit-inset-0 gtmkit-border-2 gtmkit-flex gtmkit-items-center gtmkit-justify-center gtmkit-rounded-full gtmkit-opacity-100";return r+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-white",r+=t>a?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full"},(0,e.createElement)("span",{className:r},(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(Tt,{step:t,currentStep:a,totalSteps:n}))},Ct=()=>{const t=wt.length-1+wt[0].step;let a=((t,e)=>{const a=Object.keys(e);return t.filter((function(t){for(let n=0;n<a.length;n++)if(!t.hasOwnProperty(a[n])||t[a[n]]!==e[a[n]])return!1;return!0}))})(wt,{path:et().pathname});return a=a.length?a[0].step:0,0===a?(0,e.createElement)("div",{className:"gtmkit-my-16"}):(0,e.createElement)("div",{className:"gtmkit-mt-6 gtmkit-inset-0 gtmkit-mx-auto gtmkit-my-6 gtmkit-flex gtmkit-items-center gtmkit-max-w-xl","aria-hidden":"true"},wt.map((function(n){return(0,e.createElement)(Lt,{step:n.step,currentStep:a,totalSteps:t})})))},It=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-text-center gtmkit-px-3"},(0,e.createElement)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[225px] gtmkit-inline-block"},(0,e.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,s.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,e.createElement)(Ct,null)),Dt=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey"},(0,e.createElement)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max"},(0,e.createElement)("a",{className:"gtmkit-underline",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit")))));const Ot=()=>{const{useSettings:t}=(0,e.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(It,null),(0,e.createElement)("main",{className:"gtmkit-max-w-3xl gtmkit-bg-white gtmkit-border-1 gtmkit-border-color-border gtmkit-rounded-md gtmkit-mx-auto gtmkit-py-12 gtmkit-px-16 gtmkit-text-base"},(0,e.createElement)(ht,null,(0,e.createElement)(dt,{exact:!0,path:"/welcome",element:(0,e.createElement)(vt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/essential-settings",element:(0,e.createElement)(St,null)}),(0,e.createElement)(dt,{exact:!0,path:"/share-anonymous-data",element:(0,e.createElement)(_t,null)}),(0,e.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(bt,null)}),(0,e.createElement)(dt,{path:"/",element:(0,e.createElement)(ut,{replace:!0,to:"/welcome"})}))),(0,e.createElement)(Dt,null)):(0,e.createElement)(a.Spinner,{className:"gtm-kit-settings-page-loader"})},zt=()=>(0,e.createElement)(yt,{basename:"/"},(0,e.createElement)(u,null,(0,e.createElement)(Ot,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,e.render)((0,e.createElement)(zt,null),document.getElementById(window.gtmkitSettings.rootId))}))}(); -
gtm-kit/tags/1.14.1/gtm-kit.php
r2974164 r2975488 4 4 * 5 5 * Plugin Name: GTM Kit 6 * Version: 1.14 6 * Version: 1.14.1 7 7 * Plugin URI: https://gtmkit.com/ 8 8 * Description: Google Tag Manager implementation focusing on flexibility and pagespeed. … … 28 28 } 29 29 30 const GTMKIT_VERSION = '1.14 ';30 const GTMKIT_VERSION = '1.14.1'; 31 31 32 32 if ( ! defined( 'GTMKIT_FILE' ) ) { -
gtm-kit/tags/1.14.1/inc/main.php
r2974164 r2975488 13 13 use TLA_Media\GTM_Kit\Admin\HelpOptionsPage; 14 14 use TLA_Media\GTM_Kit\Admin\IntegrationsOptionsPage; 15 use TLA_Media\GTM_Kit\Admin\MetaBox; 15 16 use TLA_Media\GTM_Kit\Admin\SetupWizard; 16 17 use TLA_Media\GTM_Kit\Common\RestAPIServer; … … 136 137 137 138 Analytics::register( $options, $util ); 139 MetaBox::register( $options ); 138 140 SetupWizard::register(); 139 141 GeneralOptionsPage::register(); -
gtm-kit/tags/1.14.1/languages/gtm-kit.pot
r2974164 r2975488 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: GTM Kit 1.14 \n"5 "Project-Id-Version: GTM Kit 1.14.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/gtm-kit\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2023-10-0 3T08:38:27+00:00\n"12 "POT-Creation-Date: 2023-10-06T08:44:02+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.8.1\n" … … 16 16 17 17 #. Plugin Name of the plugin 18 #: src/Admin/MetaBox.php:64 18 19 #: assets/admin/wizard.js:1 19 20 msgid "GTM Kit" … … 36 37 msgstr "" 37 38 38 #: inc/main.php:7 339 #: inc/main.php:74 39 40 msgid "Go to GTM Kit Settings page" 40 41 msgstr "" 41 42 42 #: inc/main.php:7 443 #: inc/main.php:75 43 44 #: assets/admin/settings.js:1 44 45 msgid "Settings" … … 86 87 msgstr "" 87 88 89 #: src/Admin/MetaBox.php:88 90 msgid "Set page type in datalayer:" 91 msgstr "" 92 93 #: src/Admin/MetaBox.php:90 94 #: assets/admin/settings.js:1 95 #: assets/admin/wizard.js:1 96 msgid "Page type" 97 msgstr "" 98 99 #. translators: %1$s = opening strong tag, %2$s = closing strong tag. 100 #: src/Admin/MetaBox.php:95 101 msgid "%1$sNote:%2$s This will only be applied if page type has been activated in the global settings of GTM Kit." 102 msgstr "" 103 88 104 #: src/Common/Util.php:57 89 105 msgid "Server type:" … … 497 513 498 514 #: assets/admin/settings.js:1 499 #: assets/admin/wizard.js:1500 msgid "Page type"501 msgstr ""502 503 #: assets/admin/settings.js:1504 515 msgid "Include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. \"campaign\"." 505 516 msgstr "" … … 736 747 737 748 #: assets/admin/settings.js:1 738 msgid "GTM container import files"739 msgstr ""740 741 #: assets/admin/settings.js:1742 msgid "We have added a help section with Google Tag Manager import files that will help you configure GTM quickly."743 msgstr ""744 745 #: assets/admin/settings.js:1746 msgid "The first import files cover Google Analytics 4 but more will follow."747 msgstr ""748 749 #: assets/admin/settings.js:1750 749 msgid "Read about all the other change in the release Notes" 751 750 msgstr "" … … 996 995 997 996 #: assets/admin/settings.js:1 998 msgid "Easy Digital downloads"997 msgid "Easy Digital Downloads" 999 998 msgstr "" 1000 999 -
gtm-kit/tags/1.14.1/readme.txt
r2974164 r2975488 4 4 Tags: google tag manager, gtm, woocommerce, analytics, ga4, gtag, easy digital downloads 5 5 Tested up to: 6.3 6 Stable tag: 1.14 6 Stable tag: 1.14.1 7 7 License: GPLv3 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 61 61 == Screenshots == 62 62 63 1. Google Tag Manager container 64 2. Google Tag Manager container code 65 3. GTM Server Side 66 4. WooCommerce Integration 63 1. GTM Kit Dashboard 64 2. Google Tag Manager container code and server side GTM 65 3. Post data settings 66 4. Google Consent Mode 67 5. WooCommerce Integration 67 68 68 69 == Installation == … … 87 88 88 89 == Changelog == 90 91 = 1.14.1 = 92 93 Bugfixes: 94 * Set custom page type in post sidebar was removed by mistake in 1.14 95 * Fix possible naming collision with other GTM plugins 96 89 97 90 98 = 1.14 = -
gtm-kit/tags/1.14.1/src/Admin/AdminAPI.php
r2974164 r2975488 62 62 '/get-install-data', 63 63 [ 64 'methods' => ' POST',64 'methods' => 'GET', 65 65 'callback' => [ $this, 'get_install_data' ], 66 66 ] … … 70 70 '/get-options', 71 71 [ 72 'methods' => ' POST',72 'methods' => 'GET', 73 73 'callback' => [ $this, 'get_options' ], 74 74 ] … … 86 86 '/get-site-data', 87 87 [ 88 'methods' => ' POST',88 'methods' => 'GET', 89 89 'callback' => [ $this, 'get_site_data' ], 90 90 ] -
gtm-kit/tags/1.14.1/src/Frontend/Frontend.php
r2960370 r2975488 136 136 $datalayer_data = apply_filters( 'gtmkit_datalayer_content', [] ); 137 137 138 echo 'const dataLayer_content = ' . wp_json_encode( $datalayer_data ) . ";\n";139 140 echo esc_attr( $this->datalayer_name ) . '.push( dataLayer_content );' . "\n";138 echo 'const gtmkit_dataLayer_content = ' . wp_json_encode( $datalayer_data ) . ";\n"; 139 140 echo esc_attr( $this->datalayer_name ) . '.push( gtmkit_dataLayer_content );' . "\n"; 141 141 } 142 142 -
gtm-kit/tags/1.14.1/vendor/composer/autoload_classmap.php
r2974164 r2975488 14 14 'TLA_Media\\GTM_Kit\\Admin\\HelpOptionsPage' => $baseDir . '/src/Admin/HelpOptionsPage.php', 15 15 'TLA_Media\\GTM_Kit\\Admin\\IntegrationsOptionsPage' => $baseDir . '/src/Admin/IntegrationsOptionsPage.php', 16 'TLA_Media\\GTM_Kit\\Admin\\MetaBox' => $baseDir . '/src/Admin/MetaBox.php', 16 17 'TLA_Media\\GTM_Kit\\Admin\\SetupWizard' => $baseDir . '/src/Admin/SetupWizard.php', 17 18 'TLA_Media\\GTM_Kit\\Common\\RestAPIServer' => $baseDir . '/src/Common/RestAPIServer.php', -
gtm-kit/tags/1.14.1/vendor/composer/autoload_static.php
r2974164 r2975488 29 29 'TLA_Media\\GTM_Kit\\Admin\\HelpOptionsPage' => __DIR__ . '/../..' . '/src/Admin/HelpOptionsPage.php', 30 30 'TLA_Media\\GTM_Kit\\Admin\\IntegrationsOptionsPage' => __DIR__ . '/../..' . '/src/Admin/IntegrationsOptionsPage.php', 31 'TLA_Media\\GTM_Kit\\Admin\\MetaBox' => __DIR__ . '/../..' . '/src/Admin/MetaBox.php', 31 32 'TLA_Media\\GTM_Kit\\Admin\\SetupWizard' => __DIR__ . '/../..' . '/src/Admin/SetupWizard.php', 32 33 'TLA_Media\\GTM_Kit\\Common\\RestAPIServer' => __DIR__ . '/../..' . '/src/Common/RestAPIServer.php', -
gtm-kit/tags/1.14.1/vendor/composer/installed.php
r2974164 r2975488 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => ' e4aaef6e023da58d9703ba3c905aab00342a79d6',6 'reference' => '4892b79e515edc43c03a211a3abb22a12fcdf974', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-main', 15 15 'version' => 'dev-main', 16 'reference' => ' e4aaef6e023da58d9703ba3c905aab00342a79d6',16 'reference' => '4892b79e515edc43c03a211a3abb22a12fcdf974', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../', -
gtm-kit/trunk/assets/admin/settings.asset.php
r2974164 r2975488 1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' efb35eb498fc3de72097');1 <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '492875e2cff4b97d6fff'); -
gtm-kit/trunk/assets/admin/settings.js
r2974164 r2975488 1 !function(){"use strict";var t={n:function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},d:function(e,n){for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.wp.element,n=window.wp.components,a=window.lodash,i=window.wp.apiFetch, o=t.n(i);o().use(o().createNonceMiddleware(window.gtmkitSettings.nonce)),o().use(o().createRootURLMiddleware(window.gtmkitSettings.root));const r=async()=>{let t={};try{t=await o()({path:"gtmkit/v1/get-options",method:"POST"})}catch(t){return console.log("fetchSettings Errors:",t),{gtm_kit_settings_fetch_settings_errors:!0}}return!0===t.success?t.data:t},l=async()=>{let t={};try{t=await o()({path:"gtmkit/v1/get-site-data",method:"POST"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t};var s=window.wp.i18n,m=(t,e)=>{const n=Object.assign({},t);switch(e.type){case"FETCH_SETTINGS":n.fetchedSettings=e.payload.fetchedSettings,n.stateSettings=e.payload.stateSettings,n.siteData=e.payload.siteData,n.installData=e.payload.installData,n.isPending=!1,n.canSave=!1,void 0===e.payload.fetchedSettings.integrations&&(n.fetchedSettings.integrations={}),void 0!==e.payload.fetchedSettings.gtm_kit_settings_fetch_settings_errors&&(n.notice=(0,s.__)("An error occurred.","gtm-kit"),n.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":n.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":n.fetchedSettings=e.payload.fetchedSettings,n.stateSettings=e.payload.stateSettings,n.isPending=!1;let t=!1,a=(0,s.__)("Saved Successfully.","gtm-kit"),i=!1;void 0!==e.payload.fetchedSettings.gtm_kit_settings_update_settings_errors&&(t=!0,a=(0,s.__)("An error occurred.","gtm-kit"),i=!0),n.canSave=t,n.notice=a,n.hasError=i;break;case"UPDATE_STATE":e.payload.fetchedSettings&&(n.fetchedSettings=e.payload.fetchedSettings),e.payload.stateSettings&&(n.stateSettings=e.payload.stateSettings),void 0!==e.payload.isPending&&(n.isPending=e.payload.isPending),void 0!==e.payload.notice&&(n.notice=e.payload.notice),void 0!==e.payload.hasError&&(n.hasError=e.payload.hasError),void 0!==e.payload.canSave&&(n.canSave=e.payload.canSave)}return n};const c=(0,e.createContext)();var u,g=t=>{const[n,i]=(0,e.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:"",canSave:!1}),s=async()=>{const[t,e]=await Promise.all([r(),l()]),n="wizard"===window.gtmkitSettings.currentPage?await(async()=>{let t={};try{t=await o()({path:"gtmkit/v1/get-install-data",method:"POST"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t})():{};i({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:n}})},u=async t=>{i({type:"UPDATE_STATE",payload:t})};(0,e.useEffect)((()=>{s()}),[]);const g={useDispatch:t=>{i(t)},useUpdateSettings:async()=>{i({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(async t=>{let e={};try{e=await o()({path:"gtmkit/v1/set-options",method:"POST",data:t})}catch(t){return console.log("updateSettings Errors:",t),{gtm_kit_settings_update_settings_errors:!0}}return!0===e.success?e.data:e})(n.stateSettings);i({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:u,useUpdateStateSettings:async(t,e,i)=>{const o=JSON.parse(JSON.stringify(n.stateSettings));let r;o[t][e]=i,r=!(0,a.isEqual)(o,n.fetchedSettings),u({stateSettings:o,canSave:r})},useImportSettings:async(t,e)=>{const i=JSON.parse(JSON.stringify(n.stateSettings));let o;const r={};r.general={...i.general,...e.general},"integrations"in e&&(r.integrations={...i.integrations,...e.integrations}),o=!(0,a.isEqual)(r,n.fetchedSettings),u({stateSettings:r,canSave:o})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData};return(0,e.createElement)(c.Provider,{value:g},t.children)},d=window.React,p=t.n(d);function h(){return h=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},h.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(u||(u={}));const _="popstate";function k(t,e){if(!1===t||null==t)throw new Error(e)}function f(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function E(t,e){return{usr:t.state,key:t.key,idx:e}}function v(t,e,n,a){return void 0===n&&(n=null),h({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?y(e):e,{state:n,key:e&&e.key||a||Math.random().toString(36).substr(2,8)})}function b(t){let{pathname:e="/",search:n="",hash:a=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function y(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let a=t.indexOf("?");a>=0&&(e.search=t.substr(a),t=t.substr(0,a)),t&&(e.pathname=t)}return e}var x;function w(t,e,n){void 0===n&&(n="/");let a=L(("string"==typeof e?y(e):e).pathname||"/",n);if(null==a)return null;let i=S(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,n)=>t===e[n]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(i);let o=null;for(let t=0;null==o&&t<i.length;++t)o=M(i[t],A(a));return o}function S(t,e,n,a){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===a&&(a="");let i=(t,i,o)=>{let r={relativePath:void 0===o?t.path||"":o,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};r.relativePath.startsWith("/")&&(k(r.relativePath.startsWith(a),'Absolute route path "'+r.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),r.relativePath=r.relativePath.slice(a.length));let l=B([a,r.relativePath]),s=n.concat(r);t.children&&t.children.length>0&&(k(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),S(t.children,e,s,l)),(null!=t.path||t.index)&&e.push({path:l,score:R(l,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var n;if(""!==t.path&&null!=(n=t.path)&&n.includes("?"))for(let n of N(t.path))i(t,e,n);else i(t,e)})),e}function N(t){let e=t.split("/");if(0===e.length)return[];let[n,...a]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===a.length)return i?[o,""]:[o];let r=N(a.join("/")),l=[];return l.push(...r.map((t=>""===t?o:[o,t].join("/")))),i&&l.push(...r),l.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(x||(x={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const C=/^:\w+$/,T=3,P=2,G=1,I=10,D=-2,O=t=>"*"===t;function R(t,e){let n=t.split("/"),a=n.length;return n.some(O)&&(a+=D),e&&(a+=P),n.filter((t=>!O(t))).reduce(((t,e)=>t+(C.test(e)?T:""===e?G:I)),a)}function M(t,e){let{routesMeta:n}=t,a={},i="/",o=[];for(let t=0;t<n.length;++t){let r=n[t],l=t===n.length-1,s="/"===i?e:e.slice(i.length)||"/",m=U({path:r.relativePath,caseSensitive:r.caseSensitive,end:l},s);if(!m)return null;Object.assign(a,m.params);let c=r.route;o.push({params:a,pathname:B([i,m.pathname]),pathnameBase:F(B([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=B([i,m.pathnameBase]))}return o}function U(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[n,a]=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),f("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let a=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((t,e)=>(a.push(e),"/([^\\/]+)")));return t.endsWith("*")?(a.push("*"),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),a]}(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let o=i[0],r=o.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:a.reduce(((t,e,n)=>{if("*"===e){let t=l[n]||"";r=o.slice(0,o.length-t.length).replace(/(.)\/+$/,"$1")}return t[e]=function(t,e){try{return decodeURIComponent(t)}catch(n){return f(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),t}}(l[n]||"",e),t}),{}),pathname:o,pathnameBase:r,pattern:t}}function A(t){try{return decodeURI(t)}catch(e){return f(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function L(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,a=t.charAt(n);return a&&"/"!==a?null:t.slice(n)||"/"}function W(t,e,n,a){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(a)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function j(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}function H(t,e,n,a){let i;void 0===a&&(a=!1),"string"==typeof t?i=y(t):(i=h({},t),k(!i.pathname||!i.pathname.includes("?"),W("?","pathname","search",i)),k(!i.pathname||!i.pathname.includes("#"),W("#","pathname","hash",i)),k(!i.search||!i.search.includes("#"),W("#","search","hash",i)));let o,r=""===t||""===i.pathname,l=r?"/":i.pathname;if(a||null==l)o=n;else{let t=e.length-1;if(l.startsWith("..")){let e=l.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}o=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:n,search:a="",hash:i=""}="string"==typeof t?y(t):t,o=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)})),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:o,search:J(a),hash:K(i)}}(i,o),m=l&&"/"!==l&&l.endsWith("/"),c=(r||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const B=t=>t.join("/").replace(/\/\/+/g,"/"),F=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),J=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",K=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const z=["post","put","patch","delete"],$=(new Set(z),["get",...z]);function q(){return q=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},q.apply(this,arguments)}new Set($),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const V=d.createContext(null),Y=d.createContext(null),X=d.createContext(null),Q=d.createContext(null),Z=d.createContext({outlet:null,matches:[],isDataRoute:!1}),tt=d.createContext(null);function et(){return null!=d.useContext(Q)}function nt(){return et()||k(!1),d.useContext(Q).location}function at(t){d.useContext(X).static||d.useLayoutEffect(t)}function it(){let{isDataRoute:t}=d.useContext(Z);return t?function(){let{router:t}=function(t){let e=d.useContext(V);return e||k(!1),e}(ut.UseNavigateStable),e=dt(gt.UseNavigateStable),n=d.useRef(!1);return at((()=>{n.current=!0})),d.useCallback((function(a,i){void 0===i&&(i={}),n.current&&("number"==typeof a?t.navigate(a):t.navigate(a,q({fromRouteId:e},i)))}),[t,e])}():function(){et()||k(!1);let t=d.useContext(V),{basename:e,navigator:n}=d.useContext(X),{matches:a}=d.useContext(Z),{pathname:i}=nt(),o=JSON.stringify(j(a).map((t=>t.pathnameBase))),r=d.useRef(!1);return at((()=>{r.current=!0})),d.useCallback((function(a,l){if(void 0===l&&(l={}),!r.current)return;if("number"==typeof a)return void n.go(a);let s=H(a,JSON.parse(o),i,"path"===l.relative);null==t&&"/"!==e&&(s.pathname="/"===s.pathname?e:B([e,s.pathname])),(l.replace?n.replace:n.push)(s,l.state,l)}),[e,n,o,i,t])}()}function ot(t,e){let{relative:n}=void 0===e?{}:e,{matches:a}=d.useContext(Z),{pathname:i}=nt(),o=JSON.stringify(j(a).map((t=>t.pathnameBase)));return d.useMemo((()=>H(t,JSON.parse(o),i,"path"===n)),[t,o,i,n])}function rt(t,e,n){et()||k(!1);let{navigator:a}=d.useContext(X),{matches:i}=d.useContext(Z),o=i[i.length-1],r=o?o.params:{},l=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let s,m=nt();if(e){var c;let t="string"==typeof e?y(e):e;"/"===l||(null==(c=t.pathname)?void 0:c.startsWith(l))||k(!1),s=t}else s=m;let g=s.pathname||"/",p=w(t,{pathname:"/"===l?g:g.slice(l.length)||"/"}),h=function(t,e,n){var a;if(void 0===e&&(e=[]),void 0===n&&(n=null),null==t){var i;if(null==(i=n)||!i.errors)return null;t=n.matches}let o=t,r=null==(a=n)?void 0:a.errors;if(null!=r){let t=o.findIndex((t=>t.route.id&&(null==r?void 0:r[t.route.id])));t>=0||k(!1),o=o.slice(0,Math.min(o.length,t+1))}return o.reduceRight(((t,a,i)=>{let l=a.route.id?null==r?void 0:r[a.route.id]:null,s=null;n&&(s=a.route.errorElement||st);let m=e.concat(o.slice(0,i+1)),c=()=>{let e;return e=l?s:a.route.Component?d.createElement(a.route.Component,null):a.route.element?a.route.element:t,d.createElement(ct,{match:a,routeContext:{outlet:t,matches:m,isDataRoute:null!=n},children:e})};return n&&(a.route.ErrorBoundary||a.route.errorElement||0===i)?d.createElement(mt,{location:n.location,revalidation:n.revalidation,component:s,error:l,children:c(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):c()}),null)}(p&&p.map((t=>Object.assign({},t,{params:Object.assign({},r,t.params),pathname:B([l,a.encodeLocation?a.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:B([l,a.encodeLocation?a.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),i,n);return e&&h?d.createElement(Q.Provider,{value:{location:q({pathname:"/",search:"",hash:"",state:null,key:"default"},s),navigationType:u.Pop}},h):h}function lt(){let t=function(){var t;let e=d.useContext(tt),n=function(t){let e=d.useContext(Y);return e||k(!1),e}(gt.UseRouteError),a=dt(gt.UseRouteError);return e||(null==(t=n.errors)?void 0:t[a])}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},e),n?d.createElement("pre",{style:a},n):null,null)}const st=d.createElement(lt,null);class mt extends d.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error?d.createElement(Z.Provider,{value:this.props.routeContext},d.createElement(tt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ct(t){let{routeContext:e,match:n,children:a}=t,i=d.useContext(V);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),d.createElement(Z.Provider,{value:e},a)}var ut=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ut||{}),gt=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(gt||{});function dt(t){let e=function(t){let e=d.useContext(Z);return e||k(!1),e}(),n=e.matches[e.matches.length-1];return n.route.id||k(!1),n.route.id}function pt(t){let{to:e,replace:n,state:a,relative:i}=t;et()||k(!1);let{matches:o}=d.useContext(Z),{pathname:r}=nt(),l=it(),s=H(e,j(o).map((t=>t.pathnameBase)),r,"path"===i),m=JSON.stringify(s);return d.useEffect((()=>l(JSON.parse(m),{replace:n,state:a,relative:i})),[l,m,i,n,a]),null}function ht(t){k(!1)}function _t(t){let{basename:e="/",children:n=null,location:a,navigationType:i=u.Pop,navigator:o,static:r=!1}=t;et()&&k(!1);let l=e.replace(/^\/*/,"/"),s=d.useMemo((()=>({basename:l,navigator:o,static:r})),[l,o,r]);"string"==typeof a&&(a=y(a));let{pathname:m="/",search:c="",hash:g="",state:p=null,key:h="default"}=a,_=d.useMemo((()=>{let t=L(m,l);return null==t?null:{location:{pathname:t,search:c,hash:g,state:p,key:h},navigationType:i}}),[l,m,c,g,p,h,i]);return null==_?null:d.createElement(X.Provider,{value:s},d.createElement(Q.Provider,{children:n,value:_}))}function kt(t){let{children:e,location:n}=t;return rt(ft(e),n)}function ft(t,e){void 0===e&&(e=[]);let n=[];return d.Children.forEach(t,((t,a)=>{if(!d.isValidElement(t))return;let i=[...e,a];if(t.type===d.Fragment)return void n.push.apply(n,ft(t.props.children,i));t.type!==ht&&k(!1),t.props.index&&t.props.children&&k(!1);let o={id:t.props.id||i.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(o.children=ft(t.props.children,i)),n.push(o)})),n}function Et(){return Et=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Et.apply(this,arguments)}function vt(t,e){if(null==t)return{};var n,a,i={},o=Object.keys(t);for(a=0;a<o.length;a++)n=o[a],e.indexOf(n)>=0||(i[n]=t[n]);return i}d.startTransition,new Promise((()=>{})),d.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const bt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],yt=["aria-current","caseSensitive","className","end","style","to","children"],xt=d.startTransition;function wt(t){let{basename:e,children:n,future:a,window:i}=t,o=d.useRef();var r;null==o.current&&(o.current=(void 0===(r={window:i,v5Compat:!0})&&(r={}),function(t,e,n,a){void 0===a&&(a={});let{window:i=document.defaultView,v5Compat:o=!1}=a,r=i.history,l=u.Pop,s=null,m=c();function c(){return(r.state||{idx:null}).idx}function g(){l=u.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:l,location:p.location,delta:e})}function d(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof t?t:b(t);return k(e,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,e)}null==m&&(m=0,r.replaceState(h({},r.state,{idx:m}),""));let p={get action(){return l},get location(){return t(i,r)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(_,g),s=t,()=>{i.removeEventListener(_,g),s=null}},createHref(t){return e(i,t)},createURL:d,encodeLocation(t){let e=d(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){l=u.Push;let a=v(p.location,t,e);n&&n(a,t),m=c()+1;let g=E(a,m),d=p.createHref(a);try{r.pushState(g,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(d)}o&&s&&s({action:l,location:p.location,delta:1})},replace:function(t,e){l=u.Replace;let a=v(p.location,t,e);n&&n(a,t),m=c();let i=E(a,m),g=p.createHref(a);r.replaceState(i,"",g),o&&s&&s({action:l,location:p.location,delta:0})},go(t){return r.go(t)}};return p}((function(t,e){let{pathname:n="/",search:a="",hash:i=""}=y(t.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),v("",{pathname:n,search:a,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let n=t.document.querySelector("base"),a="";if(n&&n.getAttribute("href")){let e=t.location.href,n=e.indexOf("#");a=-1===n?e:e.slice(0,n)}return a+"#"+("string"==typeof e?e:b(e))}),(function(t,e){f("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),r)));let l=o.current,[s,m]=d.useState({action:l.action,location:l.location}),{v7_startTransition:c}=a||{},g=d.useCallback((t=>{c&&xt?xt((()=>m(t))):m(t)}),[m,c]);return d.useLayoutEffect((()=>l.listen(g)),[l,g]),d.createElement(_t,{basename:e,children:n,location:s.location,navigationType:s.action,navigator:l})}const St="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Nt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ct=d.forwardRef((function(t,e){let n,{onClick:a,relative:i,reloadDocument:o,replace:r,state:l,target:s,to:m,preventScrollReset:c}=t,u=vt(t,bt),{basename:g}=d.useContext(X),p=!1;if("string"==typeof m&&Nt.test(m)&&(n=m,St))try{let t=new URL(window.location.href),e=m.startsWith("//")?new URL(t.protocol+m):new URL(m),n=L(e.pathname,g);e.origin===t.origin&&null!=n?m=n+e.search+e.hash:p=!0}catch(t){}let h=function(t,e){let{relative:n}=void 0===e?{}:e;et()||k(!1);let{basename:a,navigator:i}=d.useContext(X),{hash:o,pathname:r,search:l}=ot(t,{relative:n}),s=r;return"/"!==a&&(s="/"===r?a:B([a,r])),i.createHref({pathname:s,search:l,hash:o})}(m,{relative:i}),_=function(t,e){let{target:n,replace:a,state:i,preventScrollReset:o,relative:r}=void 0===e?{}:e,l=it(),s=nt(),m=ot(t,{relative:r});return d.useCallback((e=>{if(function(t,e){return!(0!==t.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t))}(e,n)){e.preventDefault();let n=void 0!==a?a:b(s)===b(m);l(t,{replace:n,state:i,preventScrollReset:o,relative:r})}}),[s,l,m,a,i,n,t,o,r])}(m,{replace:r,state:l,target:s,preventScrollReset:c,relative:i});return d.createElement("a",Et({},u,{href:n||h,onClick:p||o?a:function(t){a&&a(t),t.defaultPrevented||_(t)},ref:e,target:s}))})),Tt=d.forwardRef((function(t,e){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:o=!1,style:r,to:l,children:s}=t,m=vt(t,yt),c=ot(l,{relative:m.relative}),u=nt(),g=d.useContext(Y),{navigator:p}=d.useContext(X),h=p.encodeLocation?p.encodeLocation(c).pathname:c.pathname,_=u.pathname,k=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;a||(_=_.toLowerCase(),k=k?k.toLowerCase():null,h=h.toLowerCase());let f,E=_===h||!o&&_.startsWith(h)&&"/"===_.charAt(h.length),v=null!=k&&(k===h||!o&&k.startsWith(h)&&"/"===k.charAt(h.length)),b=E?n:void 0;f="function"==typeof i?i({isActive:E,isPending:v}):[i,E?"active":null,v?"pending":null].filter(Boolean).join(" ");let y="function"==typeof r?r({isActive:E,isPending:v}):r;return d.createElement(Ct,Et({},m,{"aria-current":b,className:f,ref:e,style:y,to:l}),"function"==typeof s?s({isActive:E,isPending:v}):s)}));var Pt,Gt;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher"})(Pt||(Pt={})),function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(Gt||(Gt={}));var It=({to:t,title:n})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Tt,{to:t,className:({isActive:t})=>"gtmkit-border-b-4 gtmkit-border-white gtmkit-text-color-grey gtmkit-font-semibold gtmkit-pt-5 gtmkit-pb-[18px] hover:gtmkit-border-color-grey "+(t?"gtmkit-text-color-heading gtmkit-border-b-color-primary ":"")},n)),Dt=({page:t})=>(0,e.createElement)("nav",{className:"gtmkit-flex gtmkit-items-center gtmkit-px-8 gtmkit-border-y gtmkit-bg-white gtmkit-border-color-border gtmkit-text-sm gtmkit-space-x-8"},function({page:t}){const e=[{to:"general",title:(0,s.__)("Dashboard","gtm-kit")},{to:"container",title:(0,s.__)("Container","gtm-kit")},{to:"post-data",title:(0,s.__)("Post data","gtm-kit")},{to:"user-data",title:(0,s.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,s.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,s.__)("Misc","gtm-kit")},{to:"whats-new",title:(0,s.__)("What's New","gtm-kit")}],n=[{to:"integrations",title:(0,s.__)("Integrations","gtm-kit")},{to:"woocommerce",title:"WooCommerce"},{to:"cf7",title:"Contact Form 7"},{to:"edd",title:"Easy Digital Downloads"}],a=[{to:"help",title:(0,s.__)("Help","gtm-kit")},{to:"support",title:(0,s.__)("Support","gtm-kit")}];switch(t){case"general":return e;case"integrations":return n;case"help":return a}}({page:t}).map((function(t){return(0,e.createElement)(It,{to:t.to,title:t.title})}))),Ot=({page:t})=>{let n=(0,s.__)("Settings","gtm-kit");switch(t){case"general":n=(0,s.__)("Settings","gtm-kit");break;case"integrations":n=(0,s.__)("Integrations","gtm-kit");break;case"help":n=(0,s.__)("Help","gtm-kit")}return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,e.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,e.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,e.createElement)("path",{d:"m88.659 7.002h-49.266c-2.915 0-5.378-.184-9.23 2.596l-18.743 12.752c-4.549 3.292-4.571 6.001 0 9.302l18.743 12.751c3.652 2.646 6.299 2.597 9.23 2.597h15.686 33.58c2.931-.057 5.394-1.784 5.34-3.923v-32.21c-.012-2.134-2.409-3.865-5.34-3.865z",fill:"#3969bb",transform:"matrix(-1 0 0 -1 101.999867 53.999547)"}),(0,e.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,e.createElement)("path",{d:"m18.316 23.086h4.632v6.052c-.75.245-1.459.415-2.121.514-.663.098-1.341.148-2.033.148-1.764 0-3.106-.517-4.035-1.554-.929-1.034-1.395-2.519-1.395-4.457 0-1.886.538-3.356 1.617-4.41 1.078-1.054 2.573-1.579 4.481-1.579 1.2 0 2.357.239 3.469.718l-.823 1.979c-.85-.425-1.737-.637-2.657-.637-1.071 0-1.932.358-2.572 1.077-.645.718-.968 1.685-.968 2.899 0 1.267.26 2.233.78 2.904.516.667 1.271.999 2.262.999.517 0 1.041-.052 1.572-.158v-2.435h-2.209zm11.912 6.555h-2.474v-9.614h-3.173v-2.06h8.816v2.06h-3.169zm9.908 0-2.811-9.158h-.072c.103 1.863.154 3.105.154 3.728v5.43h-2.213v-11.674h3.368l2.764 8.927h.048l2.934-8.927h3.369v11.674h-2.308v-5.525c0-.261 0-.561.009-.903.009-.341.048-1.246.112-2.716h-.074l-3.011 9.144z"}),(0,e.createElement)("path",{d:"m88.883 31.898h-3.811l-4.147-6.67-1.417 1.018v5.652h-3.357v-15.83h3.357v7.242l1.318-1.861 4.293-5.381h3.724l-5.523 7.006zm1.589-15.233c0-1.075.6-1.614 1.8-1.614 1.199 0 1.798.539 1.798 1.614 0 .512-.148.91-.45 1.196-.297.284-.749.429-1.348.429-1.2 0-1.8-.543-1.8-1.625zm3.449 15.233h-3.302v-12.104h3.302zm8.563-2.413c.578 0 1.271-.128 2.077-.38v2.456c-.82.37-1.831.552-3.031.552-1.324 0-2.28-.333-2.885-1.001-.602-.667-.902-1.668-.902-3.003v-5.835h-1.585v-1.399l1.823-1.103.949-2.557h2.115v2.579h3.388v2.48h-3.388v5.835c0 .467.129.815.393 1.041.264.222.614.335 1.046.335z"}))),n))),(0,e.createElement)(Dt,{page:t}))};function Rt(){return Rt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Rt.apply(this,arguments)}function Mt(t,e){if(null==t)return{};var n,a,i={},o=Object.keys(t);for(a=0;a<o.length;a++)n=o[a],e.indexOf(n)>=0||(i[n]=t[n]);return i}function Ut(t,e){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ut(t,e)}function At(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ut(t,e)}function Lt(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Wt=window.ReactDOM,jt=t.n(Wt),Ht=p().createContext(null),Bt=function(t){return t.scrollTop},Ft="unmounted",Jt="exited",Kt="entering",zt="entered",$t="exiting",qt=function(t){function e(e,n){var a;a=t.call(this,e,n)||this;var i,o=n&&!n.isMounting?e.enter:e.appear;return a.appearStatus=null,e.in?o?(i=Jt,a.appearStatus=Kt):i=zt:i=e.unmountOnExit||e.mountOnEnter?Ft:Jt,a.state={status:i},a.nextCallback=null,a}At(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Ft?{status:Jt}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==Kt&&n!==zt&&(e=Kt):n!==Kt&&n!==zt||(e=$t)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,n,a=this.props.timeout;return t=e=n=a,null!=a&&"number"!=typeof a&&(t=a.exit,e=a.enter,n=void 0!==a.appear?a.appear:e),{exit:t,enter:e,appear:n}},n.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e)if(this.cancelNextCallback(),e===Kt){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:jt().findDOMNode(this);n&&Bt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jt&&this.setState({status:Ft})},n.performEnter=function(t){var e=this,n=this.props.enter,a=this.context?this.context.isMounting:t,i=this.props.nodeRef?[a]:[jt().findDOMNode(this),a],o=i[0],r=i[1],l=this.getTimeouts(),s=a?l.appear:l.enter;t||n?(this.props.onEnter(o,r),this.safeSetState({status:Kt},(function(){e.props.onEntering(o,r),e.onTransitionEnd(s,(function(){e.safeSetState({status:zt},(function(){e.props.onEntered(o,r)}))}))}))):this.safeSetState({status:zt},(function(){e.props.onEntered(o)}))},n.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:jt().findDOMNode(this);e?(this.props.onExit(a),this.safeSetState({status:$t},(function(){t.props.onExiting(a),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Jt},(function(){t.props.onExited(a)}))}))}))):this.safeSetState({status:Jt},(function(){t.props.onExited(a)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(a){n&&(n=!1,e.nextCallback=null,t(a))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:jt().findDOMNode(this),a=null==t&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],r=i[1];this.props.addEndListener(o,r)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Ft)return null;var e=this.props,n=e.children,a=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,Mt(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return p().createElement(Ht.Provider,{value:null},"function"==typeof n?n(t,a):p().cloneElement(p().Children.only(n),a))},e}(p().Component);function Vt(){}qt.contextType=Ht,qt.propTypes={},qt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Vt,onEntering:Vt,onEntered:Vt,onExit:Vt,onExiting:Vt,onExited:Vt},qt.UNMOUNTED=Ft,qt.EXITED=Jt,qt.ENTERING=Kt,qt.ENTERED=zt,qt.EXITING=$t;var Yt=qt,Xt=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return a=e,void((n=t).classList?n.classList.remove(a):"string"==typeof n.className?n.className=Lt(n.className,a):n.setAttribute("class",Lt(n.className&&n.className.baseVal||"",a)));var n,a}))},Qt=function(t){function e(){for(var e,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var a=e.resolveArguments(t,n),i=a[0],o=a[1];e.removeClasses(i,"exit"),e.addClass(i,o?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var a=e.resolveArguments(t,n),i=a[0],o=a[1]?"appear":"enter";e.addClass(i,o,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var a=e.resolveArguments(t,n),i=a[0],o=a[1]?"appear":"enter";e.removeClasses(i,o),e.addClass(i,o,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,a="string"==typeof n,i=a?(a&&n?n+"-":"")+t:n[t];return{baseClassName:i,activeClassName:a?i+"-active":n[t+"Active"],doneClassName:a?i+"-done":n[t+"Done"]}},e}At(e,t);var n=e.prototype;return n.addClass=function(t,e,n){var a=this.getClassNames(e)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===n&&i&&(a+=" "+i),"active"===n&&t&&Bt(t),a&&(this.appliedClasses[e][n]=a,function(t,e){t&&e&&e.split(" ").forEach((function(e){return a=e,void((n=t).classList?n.classList.add(a):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(n,a)||("string"==typeof n.className?n.className=n.className+" "+a:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+a)));var n,a}))}(t,a))},n.removeClasses=function(t,e){var n=this.appliedClasses[e],a=n.base,i=n.active,o=n.done;this.appliedClasses[e]={},a&&Xt(t,a),i&&Xt(t,i),o&&Xt(t,o)},n.render=function(){var t=this.props,e=(t.classNames,Mt(t,["classNames"]));return p().createElement(Yt,Rt({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(p().Component);Qt.defaultProps={classNames:""},Qt.propTypes={};var Zt=Qt,te=({title:t=(0,s.__)("Save","gtm-kit"),className:a="gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey"})=>{const{useUpdateSettings:i,useIsPending:o,useCanSave:r}=(0,e.useContext)(c);return(0,e.createElement)(n.Button,{className:a,onClick:()=>i(),variant:"primary",disabled:o||!r},r?(0,s.__)(t,"gtm-kit"):(0,s.__)("Saved","gtm-kit"),o?(0,e.createElement)(n.Spinner,null):"")},ee=()=>{const{useCanSave:t}=(0,e.useContext)(c);return(0,e.createElement)(Zt,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0},(0,e.createElement)("footer",{className:"gtmkit-fixed gtmkit-bottom-0 gtmkit-w-full gtmkit-z-10 gtmkit-bg-color-grey gtmkit-text-white gtmkit-p-8"},(0,e.createElement)(te,null)))},ne=({subject:t})=>{const n=!0===t||"on"===t,a=!0===n?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,e.createElement)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase "+a},n?(0,s.__)("Active","gtm-kit"):(0,s.__)("Inactive","gtm-kit"))};const ae=(0,e.forwardRef)((({children:t,className:n="",...a},i)=>(0,e.createElement)("div",{...a,className:"gtmkit-min-h-[128px] gtmkit-bg-white gtmkit-border gtmkit-border-color-border gtmkit-mb-6 gtmkit-py-4 gtmkit-px-5 gtmkit-rounded gtmkit-group gtmkit-w-full "+n,ref:i},t)));ae.Header=({as:t="h3",title:n="",children:a,className:i="",...o})=>(0,e.createElement)("div",{...o,className:"gtmkit-flex gtmkit-justify-between gtmkit-mb-5 "+i},(0,e.createElement)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},n),a),ae.Content=({as:t="div",children:n,className:a="group-hover:gtmkit-hidden",...i})=>(0,e.createElement)(t,{...i,className:a},n),ae.Button=({url:t,destination:a,newTab:i=!1,text:o,group:r="",...l})=>{const s=it();return(0,e.createElement)("div",{...l,className:"gtmkit-hidden group-hover:gtmkit-block"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full",onClick:()=>{a&&t&&!1===i?window.gtmkitSettings.current_poage===r?s(a,{replace:!0}):window.location.href=t+"#"+a:t?i?window.open(t):window.location.href=t:s(a,{replace:!0})}},(0,e.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},o)))};var ie=ae,oe=({title:t,data:n,className:a=""})=>{const{useSettings:i}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},t),(0,e.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px] "+a},n.map((t=>!1===t.featured?null:(0,e.createElement)(ie,null,(0,e.createElement)(ie.Header,{title:t.title},t.pill?(0,e.createElement)(ne,{subject:i[t.group][t.option]}):null),(0,e.createElement)(ie.Content,null,t.text.map(((t,n)=>(0,e.createElement)("p",{key:n},t)))),(0,e.createElement)(ie.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,s.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group}))))))};const re=[{title:"Woocommerce",pill:!0,group:"integrations",option:"woocommerce_integration",text:[(0,s.__)("The #1 open source eCommerce platform built for WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/woocommerce",text:(0,s.__)("Setup integration","gtm-kit")}},{title:"Contact Form 7",pill:!0,group:"integrations",option:"cf7_integration",text:[(0,s.__)("Just another contact form plugin for WordPress. Simple but flexible","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/cf7",text:(0,s.__)("Setup integration","gtm-kit")}},{title:"Easy Digital Downloads",pill:!0,group:"integrations",option:"edd_integration",text:[(0,s.__)("Easy way to sell Digital Products With WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/edd",text:(0,s.__)("Setup integration","gtm-kit")}}],le=[{title:"Getting started with GTM Kit",text:[(0,s.__)("How to get the most out of Google Tag Manager with GTM Kit.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!0},{title:(0,s.__)("WooCommerce integration","gtm-kit"),text:[(0,s.__)("Integrate WooCommerce with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=dashboard-tutorials"},featured:!0},{title:"Contact Form 7 Integration",text:[(0,s.__)("Integrate Contact Form 7 with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/contact-form-7-integration/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Easy Digital Downloads integration",text:[(0,s.__)("Integrate Easy Digital Downloads with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/set-up-easy-digital-downloads-for-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Advanced GTM container implementation",text:[(0,s.__)("Customization of the GTM container implementation and Server Side Tracking.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Settings, actions and filters for developers",text:[(0,s.__)("One of the things that makes GTM Kit a great tool for developers is the ability to override options in wp-config.php.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1}];var se=()=>{const{useSettings:t}=(0,e.useContext)(c),n=le;return n.push({title:(0,s.__)("See all tutorials…","gtm-kit"),text:[(0,s.__)("See all our tutorial and get the most out of GTM Kit","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=documentation&utm_content=dashboard-tutorials",text:(0,s.__)("Read articles","gtm-kit")},featured:!0}),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Status","gtm-kit")),(0,e.createElement)("div",{className:"lg:gtmkit-flex lg:gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px]"},(0,e.createElement)(ie,{className:"lg:gtmkit-w-1/2 2xl:gtmkit-w-1/3"},(0,e.createElement)(ie.Header,{title:"Google Tag Manager Container"},(0,e.createElement)(ne,{subject:t.general.gtm_id&&t.general.container_active})),(0,e.createElement)(ie.Content,null,t.general.gtm_id&&t.general.container_active?(0,e.createElement)("p",null,(0,s.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id):(0,e.createElement)("p",null,(0,s.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,e.createElement)(ie.Button,{destination:"/container",text:(0,s.__)("Edit container","gtm-kit")})),(0,e.createElement)(ie,{className:"lg:gtmkit-w-1/2 2xl:gtmkit-w-1/3"},(0,e.createElement)(ie.Header,{title:(0,s.__)("Help improve GTM Kit","gtm-kit")},(0,e.createElement)(ne,{subject:t.general.analytics_active})),(0,e.createElement)(ie.Content,null,(0,e.createElement)("p",null,(0,s.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,e.createElement)(ie.Button,{destination:"/misc",text:(0,s.__)("Share anonymous data","gtm-kit")}))),(0,e.createElement)(oe,{title:(0,s.__)("Tutorials","gtm-kit"),data:n}),(0,e.createElement)(oe,{title:(0,s.__)("Integrations","gtm-kit"),data:re}))},me=({title:t,placeholder:a,help:i,className:o="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:r="general",optionName:l,pluginInactive:s})=>{const{useSettings:m,useUpdateStateSettings:u}=(0,e.useContext)(c);return(0,e.createElement)(n.TextControl,{label:t,placeholder:a,help:i,className:o,value:m&&m[r][l],onChange:t=>u(r,l,t),disabled:s})},ce=({title:t,label:a,optionGroup:i="general",optionName:o,disabled:r=!1})=>{const{useSettings:l,useUpdateStateSettings:s}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,e.createElement)(n.BaseControl,{label:t},(0,e.createElement)(n.ToggleControl,{label:a,checked:!r&&l[i][o],onChange:()=>{s(i,o,!(l&&l[i][o]))},disabled:r}))))},ue=({title:t,options:a,help:i,className:o="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:r="general",optionName:l,disabled:s})=>{const{useSettings:m,useUpdateStateSettings:u}=(0,e.useContext)(c);return(0,e.createElement)(n.RadioControl,{label:t,options:a,help:i,className:o,selected:parseInt(m[r][l]),onChange:t=>u(r,l,t),disabled:s})},ge=({pluginName:t})=>(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.sprintf)((0,s.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,s.sprintf)((0,s.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)),(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-sm disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.pluginInstallUrl+t}},(0,s.sprintf)((0,s.__)("Install %s","gtm-kit"),t))));const de=(0,e.forwardRef)((({children:t,className:n="",disabled:a=!1,...i},o)=>(0,e.createElement)("div",{...i,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-w-3/4 gtmkit-border-color-grey "+n+(a?"gtmkit-opacity-60":""),ref:o},t)));de.Header=({as:t="h3",title:n="",children:a,className:i="",...o})=>(0,e.createElement)(t,{...o,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey "+i},n,a),de.Content=({as:t="div",children:n,className:a="",...i})=>(0,e.createElement)(t,{...i,className:"gtmkit-px-8 gtmkit-py-6 "+a},n);var pe=de,he=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Google Tag Manager container","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Tag Manager container code","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,s.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")),(0,e.createElement)(me,{title:(0,s.__)("Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,s.__)("Enter Container ID","gtm-kit")}),(0,e.createElement)(ce,{title:(0,s.__)("Inject Container Code","gtm-kit"),label:(0,s.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active"}),(0,e.createElement)(ce,{title:(0,s.__)("Just the container","gtm-kit"),label:(0,s.__)("Setting this to On will reduce the functionality to just the GTM container code. No additional data will be pushed to the datalayer regardless of any other settings.","gtm-kit"),optionName:"just_the_container"}),(0,e.createElement)(me,{title:(0,s.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,s.__)("The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do.","gtm-kit")}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("GTM Server Side","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(me,{title:(0,s.__)("GTM Server Side Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,s.__)("Enter domain …","gtm-kit"),help:(0,s.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit")}),(0,e.createElement)(me,{title:(0,s.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,s.__)("Enter loader name …","gtm-kit"),help:(0,s.__)("Only use if you are using a custom loader.","gtm-kit")}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Container Code Implementation","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:(0,s.__)("Container code implementation:","gtm-kit"),options:[{label:(0,s.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,s.__)("Load container when browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,s.__)("Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle.","gtm-kit"),optionName:"script_implementation"}),(0,e.createElement)(ue,{title:(0,s.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,s.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,s.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,s.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,s.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,s.__)('The preferred method to implement the <noscript> container code is just after the opening <body> tag. This requires that your theme uses the "body_open" hook. If your theme does not support this the script can be injected in the footer or you can use the function below.',"gtm-kit"),optionName:"noscript_implementation"}),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,e.createElement)("code",null,"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"))))),_e=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Post Data","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Post Data Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,s.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")),(0,e.createElement)(ce,{title:(0,s.__)("Post type","gtm-kit"),id:"post-type",label:(0,s.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type"}),(0,e.createElement)(ce,{title:(0,s.__)("Page type","gtm-kit"),id:"page-type",label:(0,s.__)('Include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. "campaign".',"gtm-kit"),optionName:"datalayer_page_type"}),(0,e.createElement)(ce,{title:(0,s.__)("Categories","gtm-kit"),id:"categories",label:(0,s.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories"}),(0,e.createElement)(ce,{title:(0,s.__)("Tags","gtm-kit"),id:"tags",label:(0,s.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags"}),(0,e.createElement)(ce,{title:(0,s.__)("Post title","gtm-kit"),id:"post-title",label:(0,s.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title"}),(0,e.createElement)(ce,{title:(0,s.__)("Post ID","gtm-kit"),id:"post-id",label:(0,s.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id"}),(0,e.createElement)(ce,{title:(0,s.__)("Post data","gtm-kit"),id:"post-date",label:(0,s.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date"}),(0,e.createElement)(ce,{title:(0,s.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,s.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name"}),(0,e.createElement)(ce,{title:(0,s.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,s.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id"})))),ke=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("User Data","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,s.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,e.createElement)("p",null,(0,s.__)("Full page caching will cache user data making it the same for all users. There are ways around this, but it depends on the chosen cache solution and is only for advanced users.","gtm-kit")))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("User Data Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,s.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in"}),(0,e.createElement)(ce,{title:(0,s.__)("User ID","gtm-kit"),id:"user-id",label:(0,s.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id"}),(0,e.createElement)(ce,{title:(0,s.__)("User role","gtm-kit"),id:"user-role",label:(0,s.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role"})))),fe=()=>{const{useSettings:t}=(0,e.useContext)(c),n=!t.general.gcm_default_settings;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Google Consent Mode","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Consent Mode Activation","gtm-kit")},(0,e.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,s.__)("Warning!","gtm-kit"))),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,s.__)("Most Consent Management Platforms will handle the Google Consent Mode settings for you and applying the default settings in both GTM Kit and you CMP will lead to unexpected behaviour or errors.","gtm-kit")),(0,e.createElement)("p",null,(0,s.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")),(0,e.createElement)("p",{className:"!gtmkit-mt-4"},(0,s.__)("GTM Kit will only set the default Consent Mode settings and you must update the settings yourself when the user has given consent.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,e.createElement)("a",{href:"https://developers.google.com/tag-platform/security/guides/consent#implementation_example",target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline gtmkit-font-semibold"},(0,s.__)("See an example of how consent is updated","gtm-kit"))),(0,e.createElement)(ce,{title:(0,s.__)("Activate GCM settings","gtm-kit"),label:(0,s.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings"}))),(0,e.createElement)(pe,{disabled:n},(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Ad Storage","gtm-kit"),label:(0,s.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Analytics Storage","gtm-kit"),label:(0,s.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Functionality Storage","gtm-kit"),label:(0,s.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Personalization Storage","gtm-kit"),label:(0,s.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Security Storage","gtm-kit"),label:(0,s.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:n}))))},Ee=({label:t,value:n,tag:a})=>(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,e.createElement)("strong",null,t)),(0,e.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===a?(0,e.createElement)("code",{className:"gtmkit-text-sm"},n):(0,e.createElement)("em",null,n))),ve=()=>{const{useSiteData:t}=(0,e.useContext)(c),n=Object.values(t.shared_data);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,s.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,s.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,e.createElement)("tbody",{className:"gtmkit-py-6"},n.map((function(t){return(0,e.createElement)(Ee,{label:t.label,value:t.value,tag:t.tag})})))))},be=()=>{const{}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Misc","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Help improve GTM Kit","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ve,null),(0,e.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,s.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,e.createElement)(ce,{title:(0,s.__)("Share anonymous data","gtm-kit"),label:(0,s.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active"}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Logging and debugging","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Console log","gtm-kit"),label:(0,s.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log"}))))};const ye=[{version:"1.14",title:(0,s.__)("New Admin GUI","gtm-kit"),slug:"gtm-kit-1-14",text:[(0,s.__)("There is a new admin GUI based on WordPress components and the admin is now more extendable.","gtm-kit"),(0,s.__)("The autoload of options has been optimized for better performance.","gtm-kit")]},{version:"1.13",title:(0,s.__)("Google Consent Mode default settings for sites not using a Consent Management Platform","gtm-kit"),slug:"gtm-kit-1-13",text:[(0,s.__)("Not all sites are using Consent Management Platform to handle user consent , and we now allow those sites to set the default Consent Mode settings.","gtm-kit"),(0,s.__)("We have put a lot of work in to improving the code quality and improving the compliance with WordPress Coding Standards.","gtm-kit")]},{version:"1.12",title:(0,s.__)("Improved support for the WooCommerce cart and checkout blocks","gtm-kit"),slug:"gtm-kit-1-12",text:[(0,s.__)("The new WooCommerce blocks evolve with every release of WooCommerce, and we are thrilled to announce that GTM Kit now support the cart and checkout blocks using the native WooCommerce events.","gtm-kit"),(0,s.__)("Using the native JavaScript events is a much more reliable method than trying to parse the HTML which is subject to design changes.","gtm-kit")]},{version:"1.11",title:(0,s.__)("GTM container import files","gtm-kit"),slug:"gtm-kit-1-11",text:[(0,s.__)("We have added a help section with Google Tag Manager import files that will help you configure GTM quickly.","gtm-kit"),(0,s.__)("The first import files cover Google Analytics 4 but more will follow.","gtm-kit")]}];var xe=({version:t,title:n,slug:a,text:i})=>{const o=encodeURI("https://gtmkit.com/"+a+"/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=changelog&utm_content=release-notes-"+t);return(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:t+": "+n}),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-1"},i.map(((t,n)=>(0,e.createElement)("p",{key:n},t))),(0,e.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-mt-4"},(0,e.createElement)("a",{href:o,target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline"},(0,s.__)("Read about all the other change in the release Notes","gtm-kit")))))},we=()=>{const{useSiteData:t}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("What's New","gtm-kit")),ye.map((function(t){return(0,e.createElement)(xe,{version:t.version,title:t.title,slug:t.slug,text:t.text})})),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Older releases","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",null,(0,e.createElement)("a",{href:"https://gtmkit.com/changelog/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=changelog&utm_content=whtats-new",target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline"},(0,s.__)("Changelog","gtm-kit"))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center"},(0,e.createElement)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2"},"(",(0,s.__)("Version:","gtm-kit")," ",t.gtmkit_version,")")),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",null,(0,s.__)("The plugin is open source (GPL v3 license) and contributions are welcome:","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-text-color-primary gtmkit-ml-2 hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,s.__)("GTM Kit Repository","gtm-kit"))))))},Se=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(oe,{title:(0,s.__)("Integrations","gtm-kit"),data:re})),Ne=({title:t,options:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:o="general",optionName:r,disabled:l=!1,help:m="",notSet:u=!1})=>{const{useSettings:g,useUpdateStateSettings:d}=(0,e.useContext)(c),p=u?[{label:(0,s.__)("(not set)","gtm-kit"),value:""},...a]:a;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.SelectControl,{label:t,value:g&&g[o][r],options:p,className:i,onChange:t=>d(o,r,t),disabled:l,help:m}))},Ce=({pluginName:t,optionName:n,pluginInactive:a})=>(0,e.createElement)(pe,{disabled:a},(0,e.createElement)(pe.Header,{title:(0,s.sprintf)((0,s.__)("%s Integration","gtm-kit"),t)}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.sprintf)((0,s.__)("Track %s","gtm-kit"),t),label:(0,s.sprintf)((0,s.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:n,disabled:a})));const Te=[{label:(0,s.__)("Retail","gtm-kit"),value:"retail"},{label:(0,s.__)("Education","gtm-kit"),value:"education"},{label:(0,s.__)("Flights","gtm-kit"),value:"flights"},{label:(0,s.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,s.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,s.__)("Local deals","gtm-kit"),value:"local"},{label:(0,s.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,s.__)("Travel","gtm-kit"),value:"travel"},{label:(0,s.__)("Custom","gtm-kit"),value:"custom"}];var Pe=()=>{const{useSettings:t}=(0,e.useContext)(c),n="WooCommerce",a=!window.gtmkitSettings.plugins.woocommerce,i=a||!t.integrations.woocommerce_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("WooCommerce","gtm-kit")),a?(0,e.createElement)(ge,{pluginName:n}):null,(0,e.createElement)(Ce,{pluginName:n,optionName:"woocommerce_integration",pluginInactive:a}),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Basic settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(Ne,{title:(0,s.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,s.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Use SKU instead of ID","gtm-kit"),label:(0,s.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_use_sku",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Exclude tax","gtm-kit"),label:(0,s.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Exclude shipping from revenue","gtm-kit"),label:(0,s.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Include customer data","gtm-kit"),label:(0,s.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_customer_data",disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Event customization","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:"view_item",options:[{label:(0,s.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,s.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,s.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,s.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:i}),(0,e.createElement)(ue,{title:"add_shipping_info ",options:[{label:(0,s.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,s.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,s.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,s.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:i}),(0,e.createElement)(ue,{title:"add_payment_info ",options:[{label:(0,s.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,s.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,s.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,s.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(Ne,{title:(0,s.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Te,help:(0,s.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:i}),(0,e.createElement)(me,{title:(0,s.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,s.__)("Enter prefix …","gtm-kit"),help:(0,s.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,s.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_dequeue_script",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Include permalink structure","gtm-kit"),label:(0,s.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_permalink_structure",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Include path of pages","gtm-kit"),label:(0,s.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_pages",disabled:i}))))},Ge=()=>{const{useSettings:t}=(0,e.useContext)(c),n="Contact Form 7",a=!window.gtmkitSettings.plugins.cf7,i=a||!t.integrations.cf7_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Contact Form 7","gtm-kit")),a?(0,e.createElement)(ge,{pluginName:n}):null,(0,e.createElement)(Ce,{pluginName:n,optionName:"cf7_integration",pluginInactive:a}),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:(0,s.__)("Load JavaScript","gtm-kit"),options:[{label:(0,s.__)("Only on pages where where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,s.__)("On all pages","gtm-kit"),value:2}],help:(0,s.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:i}))))},Ie=()=>{const t="Easy Digital downloads",n=!window.gtmkitSettings.plugins.edd,{useSettings:a}=(0,e.useContext)(c),i=n||!a.integrations.edd_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Easy Digital downloads","gtm-kit")),n?(0,e.createElement)(ge,{pluginName:t}):null,(0,e.createElement)(Ce,{pluginName:t,optionName:"edd_integration",pluginInactive:n}),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Use SKU instead of ID","gtm-kit"),label:(0,s.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"edd_use_sku",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Exclude tax","gtm-kit"),label:(0,s.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(Ne,{title:(0,s.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Te,help:(0,s.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:i}),(0,e.createElement)(me,{title:(0,s.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,s.__)("Enter prefix …","gtm-kit"),help:(0,s.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:i}))),(0,e.createElement)(pe,{disabled:n},(0,e.createElement)(pe.Header,{title:(0,s.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,s.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"edd_dequeue_script",disabled:i}))))},De=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Help","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Tag Manager templates","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,s.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit"),(0,s.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/"},(0,s.__)("Read guide","gtm-kit"))),(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,s.__)("GTM container import files:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - eCommerce","gtm-kit")))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Tutorials","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("ul",null,le.map((t=>(0,e.createElement)("li",{className:"gtmkit-mb-4"},(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:t.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline"},t.title),t.text.map((t=>(0,e.createElement)("div",null,t)))))))))),Oe=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Get support","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Support options","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,s.__)("Support forum","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,s.__)("GITHub repository","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,s.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)"),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://wordpress.org/plugins/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,s.__)("WordPress.org Plugin Page","gtm-kit")))," "))));const Re=()=>{const{useSettings:t}=(0,e.useContext)(c),a=window.gtmkitSettings.currentPage;return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ot,{page:a}),(0,e.createElement)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base"},(0,e.createElement)(kt,null,(0,e.createElement)(ht,{exact:!0,path:"/general",element:(0,e.createElement)(se,null)}),(0,e.createElement)(ht,{exact:!0,path:"/container",element:(0,e.createElement)(he,null)}),(0,e.createElement)(ht,{exact:!0,path:"/post-data",element:(0,e.createElement)(_e,null)}),(0,e.createElement)(ht,{exact:!0,path:"/user-data",element:(0,e.createElement)(ke,null)}),(0,e.createElement)(ht,{exact:!0,path:"/google-consent-mode",element:(0,e.createElement)(fe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/misc",element:(0,e.createElement)(be,null)}),(0,e.createElement)(ht,{exact:!0,path:"/whats-new",element:(0,e.createElement)(we,null)}),(0,e.createElement)(ht,{exact:!0,path:"/integrations",element:(0,e.createElement)(Se,null)}),(0,e.createElement)(ht,{exact:!0,path:"/woocommerce",element:(0,e.createElement)(Pe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/cf7",element:(0,e.createElement)(Ge,null)}),(0,e.createElement)(ht,{exact:!0,path:"/edd",element:(0,e.createElement)(Ie,null)}),(0,e.createElement)(ht,{exact:!0,path:"/help",element:(0,e.createElement)(De,null)}),(0,e.createElement)(ht,{exact:!0,path:"/support",element:(0,e.createElement)(Oe,null)}),(0,e.createElement)(ht,{path:"/",element:(0,e.createElement)(pt,{replace:!0,to:"/"+a})}))),(0,e.createElement)(ee,null)):(0,e.createElement)(n.Spinner,null)},Me=()=>(0,e.createElement)(wt,{basename:"/"},(0,e.createElement)(g,null,(0,e.createElement)(Re,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,e.render)((0,e.createElement)(Me,null),document.getElementById(window.gtmkitSettings.rootId))}))}();1 !function(){"use strict";var t={n:function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,{a:n}),n},d:function(e,n){for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.wp.element,n=window.wp.components,a=window.lodash,i=window.wp.apiFetch,r=t.n(i);r().use(r().createNonceMiddleware(window.gtmkitSettings.nonce)),r().use(r().createRootURLMiddleware(window.gtmkitSettings.root));const o=async()=>{let t={};try{t=await r()({path:"gtmkit/v1/get-options",method:"GET"})}catch(t){return console.log("fetchSettings Errors:",t),{gtm_kit_settings_fetch_settings_errors:!0}}return!0===t.success?t.data:t},l=async()=>{let t={};try{t=await r()({path:"gtmkit/v1/get-site-data",method:"GET"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t};var s=window.wp.i18n,m=(t,e)=>{const n=Object.assign({},t);switch(e.type){case"FETCH_SETTINGS":n.fetchedSettings=e.payload.fetchedSettings,n.stateSettings=e.payload.stateSettings,n.siteData=e.payload.siteData,n.installData=e.payload.installData,n.isPending=!1,n.canSave=!1,void 0===e.payload.fetchedSettings.integrations&&(n.fetchedSettings.integrations={}),void 0!==e.payload.fetchedSettings.gtm_kit_settings_fetch_settings_errors&&(n.notice=(0,s.__)("An error occurred.","gtm-kit"),n.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":n.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":n.fetchedSettings=e.payload.fetchedSettings,n.stateSettings=e.payload.stateSettings,n.isPending=!1;let t=!1,a=(0,s.__)("Saved Successfully.","gtm-kit"),i=!1;void 0!==e.payload.fetchedSettings.gtm_kit_settings_update_settings_errors&&(t=!0,a=(0,s.__)("An error occurred.","gtm-kit"),i=!0),n.canSave=t,n.notice=a,n.hasError=i;break;case"UPDATE_STATE":e.payload.fetchedSettings&&(n.fetchedSettings=e.payload.fetchedSettings),e.payload.stateSettings&&(n.stateSettings=e.payload.stateSettings),void 0!==e.payload.isPending&&(n.isPending=e.payload.isPending),void 0!==e.payload.notice&&(n.notice=e.payload.notice),void 0!==e.payload.hasError&&(n.hasError=e.payload.hasError),void 0!==e.payload.canSave&&(n.canSave=e.payload.canSave)}return n};const c=(0,e.createContext)();var u,g=t=>{const[n,i]=(0,e.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:"",canSave:!1}),s=async()=>{const[t,e]=await Promise.all([o(),l()]),n="wizard"===window.gtmkitSettings.currentPage?await(async()=>{let t={};try{t=await r()({path:"gtmkit/v1/get-install-data",method:"GET"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t})():{};i({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:n}})},u=async t=>{i({type:"UPDATE_STATE",payload:t})};(0,e.useEffect)((()=>{s()}),[]);const g={useDispatch:t=>{i(t)},useUpdateSettings:async()=>{i({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(async t=>{let e={};try{e=await r()({path:"gtmkit/v1/set-options",method:"POST",data:t})}catch(t){return console.log("updateSettings Errors:",t),{gtm_kit_settings_update_settings_errors:!0}}return!0===e.success?e.data:e})(n.stateSettings);i({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:u,useUpdateStateSettings:async(t,e,i)=>{const r=JSON.parse(JSON.stringify(n.stateSettings));let o;r[t][e]=i,o=!(0,a.isEqual)(r,n.fetchedSettings),u({stateSettings:r,canSave:o})},useImportSettings:async(t,e)=>{const i=JSON.parse(JSON.stringify(n.stateSettings));let r;const o={};o.general={...i.general,...e.general},"integrations"in e&&(o.integrations={...i.integrations,...e.integrations}),r=!(0,a.isEqual)(o,n.fetchedSettings),u({stateSettings:o,canSave:r})},useSettings:n.stateSettings,useIsPending:n.isPending,useNotice:n.notice,useHasError:n.hasError,useCanSave:n.canSave,useSiteData:n.siteData,useInstallData:n.installData};return(0,e.createElement)(c.Provider,{value:g},t.children)},d=window.React,p=t.n(d);function h(){return h=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},h.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(u||(u={}));const _="popstate";function k(t,e){if(!1===t||null==t)throw new Error(e)}function f(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function E(t,e){return{usr:t.state,key:t.key,idx:e}}function v(t,e,n,a){return void 0===n&&(n=null),h({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?y(e):e,{state:n,key:e&&e.key||a||Math.random().toString(36).substr(2,8)})}function b(t){let{pathname:e="/",search:n="",hash:a=""}=t;return n&&"?"!==n&&(e+="?"===n.charAt(0)?n:"?"+n),a&&"#"!==a&&(e+="#"===a.charAt(0)?a:"#"+a),e}function y(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let a=t.indexOf("?");a>=0&&(e.search=t.substr(a),t=t.substr(0,a)),t&&(e.pathname=t)}return e}var x;function w(t,e,n){void 0===n&&(n="/");let a=L(("string"==typeof e?y(e):e).pathname||"/",n);if(null==a)return null;let i=S(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,n)=>t===e[n]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(i);let r=null;for(let t=0;null==r&&t<i.length;++t)r=M(i[t],A(a));return r}function S(t,e,n,a){void 0===e&&(e=[]),void 0===n&&(n=[]),void 0===a&&(a="");let i=(t,i,r)=>{let o={relativePath:void 0===r?t.path||"":r,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};o.relativePath.startsWith("/")&&(k(o.relativePath.startsWith(a),'Absolute route path "'+o.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(a.length));let l=B([a,o.relativePath]),s=n.concat(o);t.children&&t.children.length>0&&(k(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),S(t.children,e,s,l)),(null!=t.path||t.index)&&e.push({path:l,score:O(l,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var n;if(""!==t.path&&null!=(n=t.path)&&n.includes("?"))for(let n of N(t.path))i(t,e,n);else i(t,e)})),e}function N(t){let e=t.split("/");if(0===e.length)return[];let[n,...a]=e,i=n.endsWith("?"),r=n.replace(/\?$/,"");if(0===a.length)return i?[r,""]:[r];let o=N(a.join("/")),l=[];return l.push(...o.map((t=>""===t?r:[r,t].join("/")))),i&&l.push(...o),l.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(x||(x={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const C=/^:\w+$/,T=3,G=2,I=1,P=10,D=-2,R=t=>"*"===t;function O(t,e){let n=t.split("/"),a=n.length;return n.some(R)&&(a+=D),e&&(a+=G),n.filter((t=>!R(t))).reduce(((t,e)=>t+(C.test(e)?T:""===e?I:P)),a)}function M(t,e){let{routesMeta:n}=t,a={},i="/",r=[];for(let t=0;t<n.length;++t){let o=n[t],l=t===n.length-1,s="/"===i?e:e.slice(i.length)||"/",m=U({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},s);if(!m)return null;Object.assign(a,m.params);let c=o.route;r.push({params:a,pathname:B([i,m.pathname]),pathnameBase:F(B([i,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(i=B([i,m.pathnameBase]))}return r}function U(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[n,a]=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),f("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let a=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((t,e)=>(a.push(e),"/([^\\/]+)")));return t.endsWith("*")?(a.push("*"),i+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==t&&"/"!==t&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),a]}(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let r=i[0],o=r.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:a.reduce(((t,e,n)=>{if("*"===e){let t=l[n]||"";o=r.slice(0,r.length-t.length).replace(/(.)\/+$/,"$1")}return t[e]=function(t,e){try{return decodeURIComponent(t)}catch(n){return f(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),t}}(l[n]||"",e),t}),{}),pathname:r,pathnameBase:o,pattern:t}}function A(t){try{return decodeURI(t)}catch(e){return f(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function L(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,a=t.charAt(n);return a&&"/"!==a?null:t.slice(n)||"/"}function W(t,e,n,a){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(a)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function j(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}function H(t,e,n,a){let i;void 0===a&&(a=!1),"string"==typeof t?i=y(t):(i=h({},t),k(!i.pathname||!i.pathname.includes("?"),W("?","pathname","search",i)),k(!i.pathname||!i.pathname.includes("#"),W("#","pathname","hash",i)),k(!i.search||!i.search.includes("#"),W("#","search","hash",i)));let r,o=""===t||""===i.pathname,l=o?"/":i.pathname;if(a||null==l)r=n;else{let t=e.length-1;if(l.startsWith("..")){let e=l.split("/");for(;".."===e[0];)e.shift(),t-=1;i.pathname=e.join("/")}r=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:n,search:a="",hash:i=""}="string"==typeof t?y(t):t,r=n?n.startsWith("/")?n:function(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?n.length>1&&n.pop():"."!==t&&n.push(t)})),n.length>1?n.join("/"):"/"}(n,e):e;return{pathname:r,search:J(a),hash:K(i)}}(i,r),m=l&&"/"!==l&&l.endsWith("/"),c=(o||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const B=t=>t.join("/").replace(/\/\/+/g,"/"),F=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),J=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",K=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const z=["post","put","patch","delete"],$=(new Set(z),["get",...z]);function q(){return q=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},q.apply(this,arguments)}new Set($),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const V=d.createContext(null),Y=d.createContext(null),X=d.createContext(null),Q=d.createContext(null),Z=d.createContext({outlet:null,matches:[],isDataRoute:!1}),tt=d.createContext(null);function et(){return null!=d.useContext(Q)}function nt(){return et()||k(!1),d.useContext(Q).location}function at(t){d.useContext(X).static||d.useLayoutEffect(t)}function it(){let{isDataRoute:t}=d.useContext(Z);return t?function(){let{router:t}=function(t){let e=d.useContext(V);return e||k(!1),e}(ut.UseNavigateStable),e=dt(gt.UseNavigateStable),n=d.useRef(!1);return at((()=>{n.current=!0})),d.useCallback((function(a,i){void 0===i&&(i={}),n.current&&("number"==typeof a?t.navigate(a):t.navigate(a,q({fromRouteId:e},i)))}),[t,e])}():function(){et()||k(!1);let t=d.useContext(V),{basename:e,navigator:n}=d.useContext(X),{matches:a}=d.useContext(Z),{pathname:i}=nt(),r=JSON.stringify(j(a).map((t=>t.pathnameBase))),o=d.useRef(!1);return at((()=>{o.current=!0})),d.useCallback((function(a,l){if(void 0===l&&(l={}),!o.current)return;if("number"==typeof a)return void n.go(a);let s=H(a,JSON.parse(r),i,"path"===l.relative);null==t&&"/"!==e&&(s.pathname="/"===s.pathname?e:B([e,s.pathname])),(l.replace?n.replace:n.push)(s,l.state,l)}),[e,n,r,i,t])}()}function rt(t,e){let{relative:n}=void 0===e?{}:e,{matches:a}=d.useContext(Z),{pathname:i}=nt(),r=JSON.stringify(j(a).map((t=>t.pathnameBase)));return d.useMemo((()=>H(t,JSON.parse(r),i,"path"===n)),[t,r,i,n])}function ot(t,e,n){et()||k(!1);let{navigator:a}=d.useContext(X),{matches:i}=d.useContext(Z),r=i[i.length-1],o=r?r.params:{},l=(r&&r.pathname,r?r.pathnameBase:"/");r&&r.route;let s,m=nt();if(e){var c;let t="string"==typeof e?y(e):e;"/"===l||(null==(c=t.pathname)?void 0:c.startsWith(l))||k(!1),s=t}else s=m;let g=s.pathname||"/",p=w(t,{pathname:"/"===l?g:g.slice(l.length)||"/"}),h=function(t,e,n){var a;if(void 0===e&&(e=[]),void 0===n&&(n=null),null==t){var i;if(null==(i=n)||!i.errors)return null;t=n.matches}let r=t,o=null==(a=n)?void 0:a.errors;if(null!=o){let t=r.findIndex((t=>t.route.id&&(null==o?void 0:o[t.route.id])));t>=0||k(!1),r=r.slice(0,Math.min(r.length,t+1))}return r.reduceRight(((t,a,i)=>{let l=a.route.id?null==o?void 0:o[a.route.id]:null,s=null;n&&(s=a.route.errorElement||st);let m=e.concat(r.slice(0,i+1)),c=()=>{let e;return e=l?s:a.route.Component?d.createElement(a.route.Component,null):a.route.element?a.route.element:t,d.createElement(ct,{match:a,routeContext:{outlet:t,matches:m,isDataRoute:null!=n},children:e})};return n&&(a.route.ErrorBoundary||a.route.errorElement||0===i)?d.createElement(mt,{location:n.location,revalidation:n.revalidation,component:s,error:l,children:c(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):c()}),null)}(p&&p.map((t=>Object.assign({},t,{params:Object.assign({},o,t.params),pathname:B([l,a.encodeLocation?a.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?l:B([l,a.encodeLocation?a.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),i,n);return e&&h?d.createElement(Q.Provider,{value:{location:q({pathname:"/",search:"",hash:"",state:null,key:"default"},s),navigationType:u.Pop}},h):h}function lt(){let t=function(){var t;let e=d.useContext(tt),n=function(t){let e=d.useContext(Y);return e||k(!1),e}(gt.UseRouteError),a=dt(gt.UseRouteError);return e||(null==(t=n.errors)?void 0:t[a])}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},e),n?d.createElement("pre",{style:a},n):null,null)}const st=d.createElement(lt,null);class mt extends d.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error?d.createElement(Z.Provider,{value:this.props.routeContext},d.createElement(tt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ct(t){let{routeContext:e,match:n,children:a}=t,i=d.useContext(V);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),d.createElement(Z.Provider,{value:e},a)}var ut=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ut||{}),gt=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(gt||{});function dt(t){let e=function(t){let e=d.useContext(Z);return e||k(!1),e}(),n=e.matches[e.matches.length-1];return n.route.id||k(!1),n.route.id}function pt(t){let{to:e,replace:n,state:a,relative:i}=t;et()||k(!1);let{matches:r}=d.useContext(Z),{pathname:o}=nt(),l=it(),s=H(e,j(r).map((t=>t.pathnameBase)),o,"path"===i),m=JSON.stringify(s);return d.useEffect((()=>l(JSON.parse(m),{replace:n,state:a,relative:i})),[l,m,i,n,a]),null}function ht(t){k(!1)}function _t(t){let{basename:e="/",children:n=null,location:a,navigationType:i=u.Pop,navigator:r,static:o=!1}=t;et()&&k(!1);let l=e.replace(/^\/*/,"/"),s=d.useMemo((()=>({basename:l,navigator:r,static:o})),[l,r,o]);"string"==typeof a&&(a=y(a));let{pathname:m="/",search:c="",hash:g="",state:p=null,key:h="default"}=a,_=d.useMemo((()=>{let t=L(m,l);return null==t?null:{location:{pathname:t,search:c,hash:g,state:p,key:h},navigationType:i}}),[l,m,c,g,p,h,i]);return null==_?null:d.createElement(X.Provider,{value:s},d.createElement(Q.Provider,{children:n,value:_}))}function kt(t){let{children:e,location:n}=t;return ot(ft(e),n)}function ft(t,e){void 0===e&&(e=[]);let n=[];return d.Children.forEach(t,((t,a)=>{if(!d.isValidElement(t))return;let i=[...e,a];if(t.type===d.Fragment)return void n.push.apply(n,ft(t.props.children,i));t.type!==ht&&k(!1),t.props.index&&t.props.children&&k(!1);let r={id:t.props.id||i.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(r.children=ft(t.props.children,i)),n.push(r)})),n}function Et(){return Et=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Et.apply(this,arguments)}function vt(t,e){if(null==t)return{};var n,a,i={},r=Object.keys(t);for(a=0;a<r.length;a++)n=r[a],e.indexOf(n)>=0||(i[n]=t[n]);return i}d.startTransition,new Promise((()=>{})),d.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const bt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],yt=["aria-current","caseSensitive","className","end","style","to","children"],xt=d.startTransition;function wt(t){let{basename:e,children:n,future:a,window:i}=t,r=d.useRef();var o;null==r.current&&(r.current=(void 0===(o={window:i,v5Compat:!0})&&(o={}),function(t,e,n,a){void 0===a&&(a={});let{window:i=document.defaultView,v5Compat:r=!1}=a,o=i.history,l=u.Pop,s=null,m=c();function c(){return(o.state||{idx:null}).idx}function g(){l=u.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:l,location:p.location,delta:e})}function d(t){let e="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof t?t:b(t);return k(e,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,e)}null==m&&(m=0,o.replaceState(h({},o.state,{idx:m}),""));let p={get action(){return l},get location(){return t(i,o)},listen(t){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(_,g),s=t,()=>{i.removeEventListener(_,g),s=null}},createHref(t){return e(i,t)},createURL:d,encodeLocation(t){let e=d(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){l=u.Push;let a=v(p.location,t,e);n&&n(a,t),m=c()+1;let g=E(a,m),d=p.createHref(a);try{o.pushState(g,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;i.location.assign(d)}r&&s&&s({action:l,location:p.location,delta:1})},replace:function(t,e){l=u.Replace;let a=v(p.location,t,e);n&&n(a,t),m=c();let i=E(a,m),g=p.createHref(a);o.replaceState(i,"",g),r&&s&&s({action:l,location:p.location,delta:0})},go(t){return o.go(t)}};return p}((function(t,e){let{pathname:n="/",search:a="",hash:i=""}=y(t.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),v("",{pathname:n,search:a,hash:i},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let n=t.document.querySelector("base"),a="";if(n&&n.getAttribute("href")){let e=t.location.href,n=e.indexOf("#");a=-1===n?e:e.slice(0,n)}return a+"#"+("string"==typeof e?e:b(e))}),(function(t,e){f("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),o)));let l=r.current,[s,m]=d.useState({action:l.action,location:l.location}),{v7_startTransition:c}=a||{},g=d.useCallback((t=>{c&&xt?xt((()=>m(t))):m(t)}),[m,c]);return d.useLayoutEffect((()=>l.listen(g)),[l,g]),d.createElement(_t,{basename:e,children:n,location:s.location,navigationType:s.action,navigator:l})}const St="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Nt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ct=d.forwardRef((function(t,e){let n,{onClick:a,relative:i,reloadDocument:r,replace:o,state:l,target:s,to:m,preventScrollReset:c}=t,u=vt(t,bt),{basename:g}=d.useContext(X),p=!1;if("string"==typeof m&&Nt.test(m)&&(n=m,St))try{let t=new URL(window.location.href),e=m.startsWith("//")?new URL(t.protocol+m):new URL(m),n=L(e.pathname,g);e.origin===t.origin&&null!=n?m=n+e.search+e.hash:p=!0}catch(t){}let h=function(t,e){let{relative:n}=void 0===e?{}:e;et()||k(!1);let{basename:a,navigator:i}=d.useContext(X),{hash:r,pathname:o,search:l}=rt(t,{relative:n}),s=o;return"/"!==a&&(s="/"===o?a:B([a,o])),i.createHref({pathname:s,search:l,hash:r})}(m,{relative:i}),_=function(t,e){let{target:n,replace:a,state:i,preventScrollReset:r,relative:o}=void 0===e?{}:e,l=it(),s=nt(),m=rt(t,{relative:o});return d.useCallback((e=>{if(function(t,e){return!(0!==t.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t))}(e,n)){e.preventDefault();let n=void 0!==a?a:b(s)===b(m);l(t,{replace:n,state:i,preventScrollReset:r,relative:o})}}),[s,l,m,a,i,n,t,r,o])}(m,{replace:o,state:l,target:s,preventScrollReset:c,relative:i});return d.createElement("a",Et({},u,{href:n||h,onClick:p||r?a:function(t){a&&a(t),t.defaultPrevented||_(t)},ref:e,target:s}))})),Tt=d.forwardRef((function(t,e){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:r=!1,style:o,to:l,children:s}=t,m=vt(t,yt),c=rt(l,{relative:m.relative}),u=nt(),g=d.useContext(Y),{navigator:p}=d.useContext(X),h=p.encodeLocation?p.encodeLocation(c).pathname:c.pathname,_=u.pathname,k=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;a||(_=_.toLowerCase(),k=k?k.toLowerCase():null,h=h.toLowerCase());let f,E=_===h||!r&&_.startsWith(h)&&"/"===_.charAt(h.length),v=null!=k&&(k===h||!r&&k.startsWith(h)&&"/"===k.charAt(h.length)),b=E?n:void 0;f="function"==typeof i?i({isActive:E,isPending:v}):[i,E?"active":null,v?"pending":null].filter(Boolean).join(" ");let y="function"==typeof o?o({isActive:E,isPending:v}):o;return d.createElement(Ct,Et({},m,{"aria-current":b,className:f,ref:e,style:y,to:l}),"function"==typeof s?s({isActive:E,isPending:v}):s)}));var Gt,It;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher"})(Gt||(Gt={})),function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(It||(It={}));var Pt=({to:t,title:n})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Tt,{to:t,className:({isActive:t})=>"gtmkit-border-b-4 gtmkit-border-white gtmkit-text-color-grey gtmkit-font-semibold gtmkit-pt-5 gtmkit-pb-[18px] hover:gtmkit-border-color-grey "+(t?"gtmkit-text-color-heading gtmkit-border-b-color-primary ":"")},n)),Dt=({page:t})=>(0,e.createElement)("nav",{className:"gtmkit-flex gtmkit-items-center gtmkit-px-8 gtmkit-border-y gtmkit-bg-white gtmkit-border-color-border gtmkit-text-sm gtmkit-space-x-8"},function({page:t}){const e=[{to:"general",title:(0,s.__)("Dashboard","gtm-kit")},{to:"container",title:(0,s.__)("Container","gtm-kit")},{to:"post-data",title:(0,s.__)("Post data","gtm-kit")},{to:"user-data",title:(0,s.__)("User data","gtm-kit")},{to:"google-consent-mode",title:(0,s.__)("Google Consent Mode","gtm-kit")},{to:"misc",title:(0,s.__)("Misc","gtm-kit")},{to:"whats-new",title:(0,s.__)("What's New","gtm-kit")}],n=[{to:"integrations",title:(0,s.__)("Integrations","gtm-kit")},{to:"woocommerce",title:"WooCommerce"},{to:"cf7",title:"Contact Form 7"},{to:"edd",title:"Easy Digital Downloads"}],a=[{to:"help",title:(0,s.__)("Help","gtm-kit")},{to:"support",title:(0,s.__)("Support","gtm-kit")}];switch(t){case"general":return e;case"integrations":return n;case"help":return a}}({page:t}).map((function(t){return(0,e.createElement)(Pt,{to:t.to,title:t.title})}))),Rt=({page:t})=>{let n=(0,s.__)("Settings","gtm-kit");switch(t){case"general":n=(0,s.__)("Settings","gtm-kit");break;case"integrations":n=(0,s.__)("Integrations","gtm-kit");break;case"help":n=(0,s.__)("Help","gtm-kit")}return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-px-8 gtmkit-py-6 gtmkit-sticky"},(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-items-center gtmkit-justify-between"},(0,e.createElement)("h1",{className:"gtmkit-flex gtmkit-items-center gtmkit-font-medium gtmkit-text-3xl"},(0,e.createElement)("svg",{className:"gtmkit-mr-8",height:"44",viewBox:"0 0 160 54",width:"128",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("rect",{fill:"#888",height:"54",rx:"4.265",width:"160"}),(0,e.createElement)("path",{d:"m88.659 7.002h-49.266c-2.915 0-5.378-.184-9.23 2.596l-18.743 12.752c-4.549 3.292-4.571 6.001 0 9.302l18.743 12.751c3.652 2.646 6.299 2.597 9.23 2.597h15.686 33.58c2.931-.057 5.394-1.784 5.34-3.923v-32.21c-.012-2.134-2.409-3.865-5.34-3.865z",fill:"#3969bb",transform:"matrix(-1 0 0 -1 101.999867 53.999547)"}),(0,e.createElement)("g",{fill:"#fff",transform:"matrix(1.465202 0 0 1.465202 -4.582436 -7.553126)"},(0,e.createElement)("path",{d:"m18.316 23.086h4.632v6.052c-.75.245-1.459.415-2.121.514-.663.098-1.341.148-2.033.148-1.764 0-3.106-.517-4.035-1.554-.929-1.034-1.395-2.519-1.395-4.457 0-1.886.538-3.356 1.617-4.41 1.078-1.054 2.573-1.579 4.481-1.579 1.2 0 2.357.239 3.469.718l-.823 1.979c-.85-.425-1.737-.637-2.657-.637-1.071 0-1.932.358-2.572 1.077-.645.718-.968 1.685-.968 2.899 0 1.267.26 2.233.78 2.904.516.667 1.271.999 2.262.999.517 0 1.041-.052 1.572-.158v-2.435h-2.209zm11.912 6.555h-2.474v-9.614h-3.173v-2.06h8.816v2.06h-3.169zm9.908 0-2.811-9.158h-.072c.103 1.863.154 3.105.154 3.728v5.43h-2.213v-11.674h3.368l2.764 8.927h.048l2.934-8.927h3.369v11.674h-2.308v-5.525c0-.261 0-.561.009-.903.009-.341.048-1.246.112-2.716h-.074l-3.011 9.144z"}),(0,e.createElement)("path",{d:"m88.883 31.898h-3.811l-4.147-6.67-1.417 1.018v5.652h-3.357v-15.83h3.357v7.242l1.318-1.861 4.293-5.381h3.724l-5.523 7.006zm1.589-15.233c0-1.075.6-1.614 1.8-1.614 1.199 0 1.798.539 1.798 1.614 0 .512-.148.91-.45 1.196-.297.284-.749.429-1.348.429-1.2 0-1.8-.543-1.8-1.625zm3.449 15.233h-3.302v-12.104h3.302zm8.563-2.413c.578 0 1.271-.128 2.077-.38v2.456c-.82.37-1.831.552-3.031.552-1.324 0-2.28-.333-2.885-1.001-.602-.667-.902-1.668-.902-3.003v-5.835h-1.585v-1.399l1.823-1.103.949-2.557h2.115v2.579h3.388v2.48h-3.388v5.835c0 .467.129.815.393 1.041.264.222.614.335 1.046.335z"}))),n))),(0,e.createElement)(Dt,{page:t}))};function Ot(){return Ot=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Ot.apply(this,arguments)}function Mt(t,e){if(null==t)return{};var n,a,i={},r=Object.keys(t);for(a=0;a<r.length;a++)n=r[a],e.indexOf(n)>=0||(i[n]=t[n]);return i}function Ut(t,e){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ut(t,e)}function At(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ut(t,e)}function Lt(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Wt=window.ReactDOM,jt=t.n(Wt),Ht=p().createContext(null),Bt=function(t){return t.scrollTop},Ft="unmounted",Jt="exited",Kt="entering",zt="entered",$t="exiting",qt=function(t){function e(e,n){var a;a=t.call(this,e,n)||this;var i,r=n&&!n.isMounting?e.enter:e.appear;return a.appearStatus=null,e.in?r?(i=Jt,a.appearStatus=Kt):i=zt:i=e.unmountOnExit||e.mountOnEnter?Ft:Jt,a.state={status:i},a.nextCallback=null,a}At(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Ft?{status:Jt}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==Kt&&n!==zt&&(e=Kt):n!==Kt&&n!==zt||(e=$t)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,n,a=this.props.timeout;return t=e=n=a,null!=a&&"number"!=typeof a&&(t=a.exit,e=a.enter,n=void 0!==a.appear?a.appear:e),{exit:t,enter:e,appear:n}},n.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e)if(this.cancelNextCallback(),e===Kt){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:jt().findDOMNode(this);n&&Bt(n)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Jt&&this.setState({status:Ft})},n.performEnter=function(t){var e=this,n=this.props.enter,a=this.context?this.context.isMounting:t,i=this.props.nodeRef?[a]:[jt().findDOMNode(this),a],r=i[0],o=i[1],l=this.getTimeouts(),s=a?l.appear:l.enter;t||n?(this.props.onEnter(r,o),this.safeSetState({status:Kt},(function(){e.props.onEntering(r,o),e.onTransitionEnd(s,(function(){e.safeSetState({status:zt},(function(){e.props.onEntered(r,o)}))}))}))):this.safeSetState({status:zt},(function(){e.props.onEntered(r)}))},n.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),a=this.props.nodeRef?void 0:jt().findDOMNode(this);e?(this.props.onExit(a),this.safeSetState({status:$t},(function(){t.props.onExiting(a),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:Jt},(function(){t.props.onExited(a)}))}))}))):this.safeSetState({status:Jt},(function(){t.props.onExited(a)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(a){n&&(n=!1,e.nextCallback=null,t(a))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:jt().findDOMNode(this),a=null==t&&!this.props.addEndListener;if(n&&!a){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],r=i[0],o=i[1];this.props.addEndListener(r,o)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===Ft)return null;var e=this.props,n=e.children,a=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,Mt(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return p().createElement(Ht.Provider,{value:null},"function"==typeof n?n(t,a):p().cloneElement(p().Children.only(n),a))},e}(p().Component);function Vt(){}qt.contextType=Ht,qt.propTypes={},qt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Vt,onEntering:Vt,onEntered:Vt,onExit:Vt,onExiting:Vt,onExited:Vt},qt.UNMOUNTED=Ft,qt.EXITED=Jt,qt.ENTERING=Kt,qt.ENTERED=zt,qt.EXITING=$t;var Yt=qt,Xt=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return a=e,void((n=t).classList?n.classList.remove(a):"string"==typeof n.className?n.className=Lt(n.className,a):n.setAttribute("class",Lt(n.className&&n.className.baseVal||"",a)));var n,a}))},Qt=function(t){function e(){for(var e,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))||this).appliedClasses={appear:{},enter:{},exit:{}},e.onEnter=function(t,n){var a=e.resolveArguments(t,n),i=a[0],r=a[1];e.removeClasses(i,"exit"),e.addClass(i,r?"appear":"enter","base"),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var a=e.resolveArguments(t,n),i=a[0],r=a[1]?"appear":"enter";e.addClass(i,r,"active"),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var a=e.resolveArguments(t,n),i=a[0],r=a[1]?"appear":"enter";e.removeClasses(i,r),e.addClass(i,r,"done"),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"appear"),e.removeClasses(n,"enter"),e.addClass(n,"exit","base"),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.resolveArguments(t)[0];e.addClass(n,"exit","active"),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.resolveArguments(t)[0];e.removeClasses(n,"exit"),e.addClass(n,"exit","done"),e.props.onExited&&e.props.onExited(t)},e.resolveArguments=function(t,n){return e.props.nodeRef?[e.props.nodeRef.current,t]:[t,n]},e.getClassNames=function(t){var n=e.props.classNames,a="string"==typeof n,i=a?(a&&n?n+"-":"")+t:n[t];return{baseClassName:i,activeClassName:a?i+"-active":n[t+"Active"],doneClassName:a?i+"-done":n[t+"Done"]}},e}At(e,t);var n=e.prototype;return n.addClass=function(t,e,n){var a=this.getClassNames(e)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===e&&"done"===n&&i&&(a+=" "+i),"active"===n&&t&&Bt(t),a&&(this.appliedClasses[e][n]=a,function(t,e){t&&e&&e.split(" ").forEach((function(e){return a=e,void((n=t).classList?n.classList.add(a):function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}(n,a)||("string"==typeof n.className?n.className=n.className+" "+a:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+a)));var n,a}))}(t,a))},n.removeClasses=function(t,e){var n=this.appliedClasses[e],a=n.base,i=n.active,r=n.done;this.appliedClasses[e]={},a&&Xt(t,a),i&&Xt(t,i),r&&Xt(t,r)},n.render=function(){var t=this.props,e=(t.classNames,Mt(t,["classNames"]));return p().createElement(Yt,Ot({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(p().Component);Qt.defaultProps={classNames:""},Qt.propTypes={};var Zt=Qt,te=({title:t=(0,s.__)("Save","gtm-kit"),className:a="gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey"})=>{const{useUpdateSettings:i,useIsPending:r,useCanSave:o}=(0,e.useContext)(c);return(0,e.createElement)(n.Button,{className:a,onClick:()=>i(),variant:"primary",disabled:r||!o},o?(0,s.__)(t,"gtm-kit"):(0,s.__)("Saved","gtm-kit"),r?(0,e.createElement)(n.Spinner,null):"")},ee=()=>{const{useCanSave:t}=(0,e.useContext)(c);return(0,e.createElement)(Zt,{in:t,timeout:500,classNames:"slide",unmountOnExit:!0},(0,e.createElement)("footer",{className:"gtmkit-fixed gtmkit-bottom-0 gtmkit-w-full gtmkit-z-10 gtmkit-bg-color-grey gtmkit-text-white gtmkit-p-8"},(0,e.createElement)(te,null)))},ne=({subject:t})=>{const n=!0===t||"on"===t,a=!0===n?"gtmkit-bg-color-success":"gtmkit-bg-color-button-disabled";return(0,e.createElement)("div",{className:"gtmkit-text-xs gtmkit-text-white gtmkit-font-bold gtmkit-rounded-full gtmkit-py gtmkit-px-2 gtmkit-h-5 gtmkit-leading-5 gtmkit-uppercase "+a},n?(0,s.__)("Active","gtm-kit"):(0,s.__)("Inactive","gtm-kit"))};const ae=(0,e.forwardRef)((({children:t,className:n="",...a},i)=>(0,e.createElement)("div",{...a,className:"gtmkit-min-h-[128px] gtmkit-bg-white gtmkit-border gtmkit-border-color-border gtmkit-mb-6 gtmkit-py-4 gtmkit-px-5 gtmkit-rounded gtmkit-group gtmkit-w-full "+n,ref:i},t)));ae.Header=({as:t="h3",title:n="",children:a,className:i="",...r})=>(0,e.createElement)("div",{...r,className:"gtmkit-flex gtmkit-justify-between gtmkit-mb-5 "+i},(0,e.createElement)(t,{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading"},n),a),ae.Content=({as:t="div",children:n,className:a="group-hover:gtmkit-hidden",...i})=>(0,e.createElement)(t,{...i,className:a},n),ae.Button=({url:t,destination:a,newTab:i=!1,text:r,group:o="",...l})=>{const s=it();return(0,e.createElement)("div",{...l,className:"gtmkit-hidden group-hover:gtmkit-block"},(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-rounded !gtmkit-py-4 !gtmkit-px-8 gtmkit-w-full",onClick:()=>{a&&t&&!1===i?window.gtmkitSettings.current_poage===o?s(a,{replace:!0}):window.location.href=t+"#"+a:t?i?window.open(t):window.location.href=t:s(a,{replace:!0})}},(0,e.createElement)("span",{className:"gtmkit-mx-auto gtmkit-text-sm gtmkit-font-bold"},r)))};var ie=ae,re=({title:t,data:n,className:a=""})=>{const{useSettings:i}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8 gtmkit-mt-6"},t),(0,e.createElement)("div",{className:"lg:gtmkit-grid lg:gtmkit-grid-cols-2 xl:gtmkit-grid-cols-3 gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px] "+a},n.map((t=>!1===t.featured?null:(0,e.createElement)(ie,null,(0,e.createElement)(ie.Header,{title:t.title},t.pill?(0,e.createElement)(ne,{subject:i[t.group][t.option]}):null),(0,e.createElement)(ie.Content,null,t.text.map(((t,n)=>(0,e.createElement)("p",{key:n},t)))),(0,e.createElement)(ie.Button,{url:t.link.url,destination:t.link.destination,text:t.link.text?t.link.text:(0,s.__)("Read article","gtm-kit"),newTab:t.link.external,group:t.group}))))))};const oe=[{title:"Woocommerce",pill:!0,group:"integrations",option:"woocommerce_integration",text:[(0,s.__)("The #1 open source eCommerce platform built for WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/woocommerce",text:(0,s.__)("Setup integration","gtm-kit")}},{title:"Contact Form 7",pill:!0,group:"integrations",option:"cf7_integration",text:[(0,s.__)("Just another contact form plugin for WordPress. Simple but flexible","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/cf7",text:(0,s.__)("Setup integration","gtm-kit")}},{title:"Easy Digital Downloads",pill:!0,group:"integrations",option:"edd_integration",text:[(0,s.__)("Easy way to sell Digital Products With WordPress","gtm-kit")],link:{internal:!0,url:window.gtmkitSettings.integrationsUrl,destination:"/edd",text:(0,s.__)("Setup integration","gtm-kit")}}],le=[{title:"Getting started with GTM Kit",text:[(0,s.__)("How to get the most out of Google Tag Manager with GTM Kit.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!0},{title:(0,s.__)("WooCommerce integration","gtm-kit"),text:[(0,s.__)("Integrate WooCommerce with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=dashboard-tutorials"},featured:!0},{title:"Contact Form 7 Integration",text:[(0,s.__)("Integrate Contact Form 7 with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/contact-form-7-integration/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Easy Digital Downloads integration",text:[(0,s.__)("Integrate Easy Digital Downloads with Google Tag Manager and Google Analytics.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/set-up-easy-digital-downloads-for-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Advanced GTM container implementation",text:[(0,s.__)("Customization of the GTM container implementation and Server Side Tracking.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1},{title:"Settings, actions and filters for developers",text:[(0,s.__)("One of the things that makes GTM Kit a great tool for developers is the ability to override options in wp-config.php.","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials"},featured:!1}];var se=()=>{const{useSettings:t}=(0,e.useContext)(c),n=le;return n.push({title:(0,s.__)("See all tutorials…","gtm-kit"),text:[(0,s.__)("See all our tutorial and get the most out of GTM Kit","gtm-kit")],link:{external:!0,url:"https://gtmkit.com/documentation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=documentation&utm_content=dashboard-tutorials",text:(0,s.__)("Read articles","gtm-kit")},featured:!0}),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Status","gtm-kit")),(0,e.createElement)("div",{className:"lg:gtmkit-flex lg:gtmkit-justify-between gtmkit-gap-6 gtmkit-border-b gtmkit-border-color-border gtmkit-pb-6 gtmkit-min-h-[175px]"},(0,e.createElement)(ie,{className:"lg:gtmkit-w-1/2 2xl:gtmkit-w-1/3"},(0,e.createElement)(ie.Header,{title:"Google Tag Manager Container"},(0,e.createElement)(ne,{subject:t.general.gtm_id&&t.general.container_active})),(0,e.createElement)(ie.Content,null,t.general.gtm_id&&t.general.container_active?(0,e.createElement)("p",null,(0,s.__)("Container ID:","gtm-kit")," ",t&&t.general.gtm_id):(0,e.createElement)("p",null,(0,s.__)("The container is not active but the datalayer is generated.","gtm-kit"))),(0,e.createElement)(ie.Button,{destination:"/container",text:(0,s.__)("Edit container","gtm-kit")})),(0,e.createElement)(ie,{className:"lg:gtmkit-w-1/2 2xl:gtmkit-w-1/3"},(0,e.createElement)(ie.Header,{title:(0,s.__)("Help improve GTM Kit","gtm-kit")},(0,e.createElement)(ne,{subject:t.general.analytics_active})),(0,e.createElement)(ie.Content,null,(0,e.createElement)("p",null,(0,s.__)("Share anonymous data with the development team to help improve GTM Kit.","gtm-kit"))),(0,e.createElement)(ie.Button,{destination:"/misc",text:(0,s.__)("Share anonymous data","gtm-kit")}))),(0,e.createElement)(re,{title:(0,s.__)("Tutorials","gtm-kit"),data:n}),(0,e.createElement)(re,{title:(0,s.__)("Integrations","gtm-kit"),data:oe}))},me=({title:t,placeholder:a,help:i,className:r="gtmkit-settings-field-wrap gtmkit-py-4 gtmkit-max-w-md",optionGroup:o="general",optionName:l,pluginInactive:s})=>{const{useSettings:m,useUpdateStateSettings:u}=(0,e.useContext)(c);return(0,e.createElement)(n.TextControl,{label:t,placeholder:a,help:i,className:r,value:m&&m[o][l],onChange:t=>u(o,l,t),disabled:s})},ce=({title:t,label:a,optionGroup:i="general",optionName:r,disabled:o=!1})=>{const{useSettings:l,useUpdateStateSettings:s}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-py-4"},(0,e.createElement)(n.BaseControl,{label:t},(0,e.createElement)(n.ToggleControl,{label:a,checked:!o&&l[i][r],onChange:()=>{s(i,r,!(l&&l[i][r]))},disabled:o}))))},ue=({title:t,options:a,help:i,className:r="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:o="general",optionName:l,disabled:s})=>{const{useSettings:m,useUpdateStateSettings:u}=(0,e.useContext)(c);return(0,e.createElement)(n.RadioControl,{label:t,options:a,help:i,className:r,selected:parseInt(m[o][l]),onChange:t=>u(o,l,t),disabled:s})},ge=({pluginName:t})=>(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.sprintf)((0,s.__)("%s is not active","gtm-kit"),t),className:"gtmkit-text-red-600"}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,s.sprintf)((0,s.__)("If you haven't installed and activated %s you must do that.","gtm-kit"),t)),(0,e.createElement)(n.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-4 !gtmkit-px-6 gtmkit-text-sm disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.pluginInstallUrl+t}},(0,s.sprintf)((0,s.__)("Install %s","gtm-kit"),t))));const de=(0,e.forwardRef)((({children:t,className:n="",disabled:a=!1,...i},r)=>(0,e.createElement)("div",{...i,className:"gtmkit-mb-12 gtmkit-border gtmkit-bg-white gtmkit-w-3/4 gtmkit-border-color-grey "+n+(a?"gtmkit-opacity-60":""),ref:r},t)));de.Header=({as:t="h3",title:n="",children:a,className:i="",...r})=>(0,e.createElement)(t,{...r,className:"gtmkit-font-bold gtmkit-text-lg gtmkit-px-8 gtmkit-py-4 gtmkit-border-b gtmkit-border-color-grey "+i},n,a),de.Content=({as:t="div",children:n,className:a="",...i})=>(0,e.createElement)(t,{...i,className:"gtmkit-px-8 gtmkit-py-6 "+a},n);var pe=de,he=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Google Tag Manager container","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Tag Manager container code","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,s.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit")),(0,e.createElement)(me,{title:(0,s.__)("Container ID:","gtm-kit"),optionName:"gtm_id",placeholder:(0,s.__)("Enter Container ID","gtm-kit")}),(0,e.createElement)(ce,{title:(0,s.__)("Inject Container Code","gtm-kit"),label:(0,s.__)("Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.","gtm-kit"),optionName:"container_active"}),(0,e.createElement)(ce,{title:(0,s.__)("Just the container","gtm-kit"),label:(0,s.__)("Setting this to On will reduce the functionality to just the GTM container code. No additional data will be pushed to the datalayer regardless of any other settings.","gtm-kit"),optionName:"just_the_container"}),(0,e.createElement)(me,{title:(0,s.__)("dataLayer variable name:","gtm-kit"),optionName:"datalayer_name",placeholder:"dataLayer",help:(0,s.__)("The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do.","gtm-kit")}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("GTM Server Side","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(me,{title:(0,s.__)("GTM Server Side Domain:","gtm-kit"),optionName:"sgtm_domain",placeholder:(0,s.__)("Enter domain …","gtm-kit"),help:(0,s.__)("Enter your custom domain name if you are using a custom server side GTM container for tracking.","gtm-kit")}),(0,e.createElement)(me,{title:(0,s.__)("sGTM container identifier:","gtm-kit"),optionName:"sgtm_container_identifier",placeholder:(0,s.__)("Enter loader name …","gtm-kit"),help:(0,s.__)("Only use if you are using a custom loader.","gtm-kit")}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Container Code Implementation","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:(0,s.__)("Container code implementation:","gtm-kit"),options:[{label:(0,s.__)("Standard implementation as recommended by Google (no delay)","gtm-kit"),value:0},{label:(0,s.__)("Load container when browser is idle (requestIdleCallback)","gtm-kit"),value:1}],help:(0,s.__)("Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle.","gtm-kit"),optionName:"script_implementation"}),(0,e.createElement)(ue,{title:(0,s.__)("Container code noscript implementation:","gtm-kit"),options:[{label:(0,s.__)("Just after the opening <body> tag","gtm-kit"),value:0},{label:(0,s.__)("Footer of the page (not recommended by Google)","gtm-kit"),value:1},{label:(0,s.__)("Custom (insert function in your template)","gtm-kit"),value:2},{label:(0,s.__)("Disable <noscript> implementation","gtm-kit"),value:3}],help:(0,s.__)('The preferred method to implement the <noscript> container code is just after the opening <body> tag. This requires that your theme uses the "body_open" hook. If your theme does not support this the script can be injected in the footer or you can use the function below.',"gtm-kit"),optionName:"noscript_implementation"}),(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,e.createElement)("code",null,"<?php if ( function_exists( 'gtmkit_the_noscript_tag' ) ) { gtmkit_the_noscript_tag(); } ?>"))))),_e=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Post Data","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Post Data Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,s.__)("Specify which post data elements you wish to include in the dataLayer for use in Google Tag Manager.","gtm-kit")),(0,e.createElement)(ce,{title:(0,s.__)("Post type","gtm-kit"),id:"post-type",label:(0,s.__)("Include the type of the current post or archive page.","gtm-kit"),optionName:"datalayer_post_type"}),(0,e.createElement)(ce,{title:(0,s.__)("Page type","gtm-kit"),id:"page-type",label:(0,s.__)('Include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. "campaign".',"gtm-kit"),optionName:"datalayer_page_type"}),(0,e.createElement)(ce,{title:(0,s.__)("Categories","gtm-kit"),id:"categories",label:(0,s.__)("Include the categories of the current post or archive page.","gtm-kit"),optionName:"datalayer_categories"}),(0,e.createElement)(ce,{title:(0,s.__)("Tags","gtm-kit"),id:"tags",label:(0,s.__)("Include the tags of the current post or archive page.","gtm-kit"),optionName:"datalayer_tags"}),(0,e.createElement)(ce,{title:(0,s.__)("Post title","gtm-kit"),id:"post-title",label:(0,s.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_title"}),(0,e.createElement)(ce,{title:(0,s.__)("Post ID","gtm-kit"),id:"post-id",label:(0,s.__)("Include the Post ID of the current post.","gtm-kit"),optionName:"datalayer_post_id"}),(0,e.createElement)(ce,{title:(0,s.__)("Post data","gtm-kit"),id:"post-date",label:(0,s.__)("Include the post date.","gtm-kit"),optionName:"datalayer_post_date"}),(0,e.createElement)(ce,{title:(0,s.__)("Post author name","gtm-kit"),id:"post-author-name",label:(0,s.__)("Include the post author name.","gtm-kit"),optionName:"datalayer_post_author_name"}),(0,e.createElement)(ce,{title:(0,s.__)("Post author ID","gtm-kit"),id:"post-author-id",label:(0,s.__)("Include the post author ID.","gtm-kit"),optionName:"datalayer_post_author_id"})))),ke=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("User Data","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Warning!","gtm-kit"),className:"gtmkit-text-red-600"}),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,s.__)("Including user data is not compatible with full page caching.","gtm-kit")),(0,e.createElement)("p",null,(0,s.__)("Full page caching will cache user data making it the same for all users. There are ways around this, but it depends on the chosen cache solution and is only for advanced users.","gtm-kit")))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("User Data Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Logged in","gtm-kit"),id:"logged-in",label:(0,s.__)("Include whether the user is logged in.","gtm-kit"),optionName:"datalayer_logged_in"}),(0,e.createElement)(ce,{title:(0,s.__)("User ID","gtm-kit"),id:"user-id",label:(0,s.__)("Include the user ID if the user is logged in.","gtm-kit"),optionName:"datalayer_user_id"}),(0,e.createElement)(ce,{title:(0,s.__)("User role","gtm-kit"),id:"user-role",label:(0,s.__)("Include the user role if the user is logged in.","gtm-kit"),optionName:"datalayer_user_role"})))),fe=()=>{const{useSettings:t}=(0,e.useContext)(c),n=!t.general.gcm_default_settings;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Google Consent Mode","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Consent Mode Activation","gtm-kit")},(0,e.createElement)("span",{className:"gtmkit-text-red-600 gtmkit-ml-2"},(0,s.__)("Warning!","gtm-kit"))),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-2"},(0,e.createElement)("p",null,(0,s.__)("Most Consent Management Platforms will handle the Google Consent Mode settings for you and applying the default settings in both GTM Kit and you CMP will lead to unexpected behaviour or errors.","gtm-kit")),(0,e.createElement)("p",null,(0,s.__)("You should only use these settings if you do not have a Consent Management Platform that supports Google Consent Mode.","gtm-kit")),(0,e.createElement)("p",{className:"!gtmkit-mt-4"},(0,s.__)("GTM Kit will only set the default Consent Mode settings and you must update the settings yourself when the user has given consent.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-my-6"},(0,e.createElement)("a",{href:"https://developers.google.com/tag-platform/security/guides/consent#implementation_example",target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline gtmkit-font-semibold"},(0,s.__)("See an example of how consent is updated","gtm-kit"))),(0,e.createElement)(ce,{title:(0,s.__)("Activate GCM settings","gtm-kit"),label:(0,s.__)("Choose this option if you would like to activate the default settings below","gtm-kit"),optionName:"gcm_default_settings"}))),(0,e.createElement)(pe,{disabled:n},(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Consent Mode Default Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Ad Storage","gtm-kit"),label:(0,s.__)("Enables storage, such as cookies, related to advertising","gtm-kit"),optionName:"gcm_ad_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Analytics Storage","gtm-kit"),label:(0,s.__)("Enables storage, such as cookies, related to analytics (for example, visit duration)","gtm-kit"),optionName:"gcm_analytics_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Functionality Storage","gtm-kit"),label:(0,s.__)("Enables storage that supports the functionality of the website or app such as language settings","gtm-kit"),optionName:"gcm_functionality_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Personalization Storage","gtm-kit"),label:(0,s.__)("Enables storage related to personalization such as video recommendations","gtm-kit"),optionName:"gcm_personalization_storage",disabled:n}),(0,e.createElement)(ce,{title:(0,s.__)("Security Storage","gtm-kit"),label:(0,s.__)("Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","gtm-kit"),optionName:"gcm_security_storage",disabled:n}))))},Ee=({label:t,value:n,tag:a})=>(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-4 gtmkit-py-2"},(0,e.createElement)("strong",null,t)),(0,e.createElement)("td",{className:"gtmkit-px-4 gtmkit-py-2"},"code"===a?(0,e.createElement)("code",{className:"gtmkit-text-sm"},n):(0,e.createElement)("em",null,n))),ve=()=>{const{useSiteData:t}=(0,e.useContext)(c),n=Object.values(t.shared_data);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,s.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-mb-2 gtmkit-text-color-grey"},(0,s.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm gtmkit-my-6 gtmkit-py-6"},(0,e.createElement)("tbody",{className:"gtmkit-py-6"},n.map((function(t){return(0,e.createElement)(Ee,{label:t.label,value:t.value,tag:t.tag})})))))},be=()=>{const{}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Misc","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Help improve GTM Kit","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ve,null),(0,e.createElement)("p",{className:"gtmkit-my-4 gtmkit-mb-2 gtmkit-text-color-grey"},(0,s.__)("GTM Kit will never transmit any domain names or container ID's.","gtm-kit")),(0,e.createElement)(ce,{title:(0,s.__)("Share anonymous data","gtm-kit"),label:(0,s.__)("I agree to share anonymous data with the development team to help improve GTM Kit.","gtm-kit"),optionName:"analytics_active"}))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Logging and debugging","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Console log","gtm-kit"),label:(0,s.__)("Log helpful messages and warnings to the browser log.","gtm-kit"),optionName:"console_log"}))))};const ye=[{version:"1.14",title:(0,s.__)("New Admin GUI","gtm-kit"),slug:"gtm-kit-1-14",text:[(0,s.__)("There is a new admin GUI based on WordPress components and the admin is now more extendable.","gtm-kit"),(0,s.__)("The autoload of options has been optimized for better performance.","gtm-kit")]},{version:"1.13",title:(0,s.__)("Google Consent Mode default settings for sites not using a Consent Management Platform","gtm-kit"),slug:"gtm-kit-1-13",text:[(0,s.__)("Not all sites are using Consent Management Platform to handle user consent , and we now allow those sites to set the default Consent Mode settings.","gtm-kit"),(0,s.__)("We have put a lot of work in to improving the code quality and improving the compliance with WordPress Coding Standards.","gtm-kit")]},{version:"1.12",title:(0,s.__)("Improved support for the WooCommerce cart and checkout blocks","gtm-kit"),slug:"gtm-kit-1-12",text:[(0,s.__)("The new WooCommerce blocks evolve with every release of WooCommerce, and we are thrilled to announce that GTM Kit now support the cart and checkout blocks using the native WooCommerce events.","gtm-kit"),(0,s.__)("Using the native JavaScript events is a much more reliable method than trying to parse the HTML which is subject to design changes.","gtm-kit")]}];var xe=({version:t,title:n,slug:a,text:i})=>{const r=encodeURI("https://gtmkit.com/"+a+"/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=changelog&utm_content=release-notes-"+t);return(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:t+": "+n}),(0,e.createElement)(pe.Content,{className:"gtmkit-space-y-1"},i.map(((t,n)=>(0,e.createElement)("p",{key:n},t))),(0,e.createElement)("p",{className:"gtmkit-text-color-primary !gtmkit-mt-4"},(0,e.createElement)("a",{href:r,target:"_blank",rel:"noreferrer",className:"hover:gtmkit-underline"},(0,s.__)("Read about all the other change in the release Notes","gtm-kit")))))},we=()=>{const{useSiteData:t}=(0,e.useContext)(c);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("What's New","gtm-kit")),ye.map((function(t){return(0,e.createElement)(xe,{version:t.version,title:t.title,slug:t.slug,text:t.text})})),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Older releases","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",null,(0,e.createElement)("a",{href:"https://gtmkit.com/changelog/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=changelog&utm_content=whtats-new",target:"_blank",rel:"noreferrer",className:"gtmkit-text-color-primary hover:gtmkit-underline"},(0,s.__)("Changelog","gtm-kit"))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("About GTM Kit","gtm-kit"),className:"gtmkit-flex gtmkit-items-center"},(0,e.createElement)("span",{className:"gtmkit-text-sm gtmkit-text-color-grey gtmkit-font-light gtmkit-ml-2"},"(",(0,s.__)("Version:","gtm-kit")," ",t.gtmkit_version,")")),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",null,(0,s.__)("The plugin is open source (GPL v3 license) and contributions are welcome:","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-text-color-primary gtmkit-ml-2 hover:gtmkit-underline",href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,s.__)("GTM Kit Repository","gtm-kit"))))))},Se=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(re,{title:(0,s.__)("Integrations","gtm-kit"),data:oe})),Ne=({title:t,options:a,className:i="gtmkit-settings-field-wrap gtmkit-py-4",optionGroup:r="general",optionName:o,disabled:l=!1,help:m="",notSet:u=!1})=>{const{useSettings:g,useUpdateStateSettings:d}=(0,e.useContext)(c),p=u?[{label:(0,s.__)("(not set)","gtm-kit"),value:""},...a]:a;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.SelectControl,{label:t,value:g&&g[r][o],options:p,className:i,onChange:t=>d(r,o,t),disabled:l,help:m}))},Ce=({pluginName:t,optionName:n,pluginInactive:a})=>(0,e.createElement)(pe,{disabled:a},(0,e.createElement)(pe.Header,{title:(0,s.sprintf)((0,s.__)("%s Integration","gtm-kit"),t)}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.sprintf)((0,s.__)("Track %s","gtm-kit"),t),label:(0,s.sprintf)((0,s.__)("Activate the %s integration","gtm-kit"),t),optionGroup:"integrations",optionName:n,disabled:a})));const Te=[{label:(0,s.__)("Retail","gtm-kit"),value:"retail"},{label:(0,s.__)("Education","gtm-kit"),value:"education"},{label:(0,s.__)("Flights","gtm-kit"),value:"flights"},{label:(0,s.__)("Hotel rental","gtm-kit"),value:"hotel_rental"},{label:(0,s.__)("Jobs","gtm-kit"),value:"jobs"},{label:(0,s.__)("Local deals","gtm-kit"),value:"local"},{label:(0,s.__)("Real estate","gtm-kit"),value:"real_estate"},{label:(0,s.__)("Travel","gtm-kit"),value:"travel"},{label:(0,s.__)("Custom","gtm-kit"),value:"custom"}];var Ge=()=>{const{useSettings:t}=(0,e.useContext)(c),n="WooCommerce",a=!window.gtmkitSettings.plugins.woocommerce,i=a||!t.integrations.woocommerce_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("WooCommerce","gtm-kit")),a?(0,e.createElement)(ge,{pluginName:n}):null,(0,e.createElement)(Ce,{pluginName:n,optionName:"woocommerce_integration",pluginInactive:a}),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Basic settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(Ne,{title:(0,s.__)("Brand","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_brand",options:window.gtmkitSettings.taxonomyOptions,help:(0,s.__)("Select the taxonomy that is used for product brands","gtm-kit"),notSet:!0,disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Use SKU instead of ID","gtm-kit"),label:(0,s.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_use_sku",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Exclude tax","gtm-kit"),label:(0,s.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_tax",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Exclude shipping from revenue","gtm-kit"),label:(0,s.__)("Exclude shipping from revenue","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_exclude_shipping",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Include customer data","gtm-kit"),label:(0,s.__)('Enable this option to include customer data in the data layer on the "purchase" event.',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_customer_data",disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Event customization","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:"view_item",options:[{label:(0,s.__)("Only push view_item on the master product","gtm-kit"),value:0},{label:(0,s.__)("Push view_item on master and variation products (higher number of views).","gtm-kit"),value:1},{label:(0,s.__)("Only push view_item on variation products.","gtm-kit"),value:2}],help:(0,s.__)('When do you want to fire the "view_item" event on variable products?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_variable_product_tracking",disabled:i}),(0,e.createElement)(ue,{title:"add_shipping_info ",options:[{label:(0,s.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,s.__)("When a shipment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,s.__)("Disable the 'add_shipment_info' event.","gtm-kit"),value:0}],help:(0,s.__)('When do you want to fire the "add_shipment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_shipping_info",disabled:i}),(0,e.createElement)(ue,{title:"add_payment_info ",options:[{label:(0,s.__)("When the 'Place order' button is clicked","gtm-kit"),value:1},{label:(0,s.__)("When a payment method is selected with fallback to the 'Place order' button.","gtm-kit"),value:2},{label:(0,s.__)("Disable the 'add_payment_info' event.","gtm-kit"),value:0}],help:(0,s.__)('When do you want to fire the "add_payment_info" event?',"gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_payment_info",disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(Ne,{title:(0,s.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_google_business_vertical",options:Te,help:(0,s.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:i}),(0,e.createElement)(me,{title:(0,s.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_product_id_prefix",placeholder:(0,s.__)("Enter prefix …","gtm-kit"),help:(0,s.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,s.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_dequeue_script",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Include permalink structure","gtm-kit"),label:(0,s.__)("Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_permalink_structure",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Include path of pages","gtm-kit"),label:(0,s.__)("Enable this option to include the path of cart, checkout, order received and my account page.","gtm-kit"),optionGroup:"integrations",optionName:"woocommerce_include_pages",disabled:i}))))},Ie=()=>{const{useSettings:t}=(0,e.useContext)(c),n="Contact Form 7",a=!window.gtmkitSettings.plugins.cf7,i=a||!t.integrations.cf7_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Contact Form 7","gtm-kit")),a?(0,e.createElement)(ge,{pluginName:n}):null,(0,e.createElement)(Ce,{pluginName:n,optionName:"cf7_integration",pluginInactive:a}),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ue,{title:(0,s.__)("Load JavaScript","gtm-kit"),options:[{label:(0,s.__)("Only on pages where where the Contact Form 7 script is registered (recommended).","gtm-kit"),value:1},{label:(0,s.__)("On all pages","gtm-kit"),value:2}],help:(0,s.__)("Where do you want load the JavaScript?","gtm-kit"),optionGroup:"integrations",optionName:"cf7_load_js",disabled:i}))))},Pe=()=>{const t="Easy Digital Downloads",n=!window.gtmkitSettings.plugins.edd,{useSettings:a}=(0,e.useContext)(c),i=n||!a.integrations.edd_integration;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Easy Digital Downloads","gtm-kit")),n?(0,e.createElement)(ge,{pluginName:t}):null,(0,e.createElement)(Ce,{pluginName:t,optionName:"edd_integration",pluginInactive:n}),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Basic Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Use SKU instead of ID","gtm-kit"),label:(0,s.__)("Use SKU instead of the product ID with fallback to ID if no SKU is set.","gtm-kit"),optionGroup:"integrations",optionName:"edd_use_sku",disabled:i}),(0,e.createElement)(ce,{title:(0,s.__)("Exclude tax","gtm-kit"),label:(0,s.__)("Exclude tax from prices and revenue","gtm-kit"),optionGroup:"integrations",optionName:"edd_exclude_tax",disabled:i}))),(0,e.createElement)(pe,{disabled:i},(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Ads Settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(Ne,{title:(0,s.__)("Google Business Vertical","gtm-kit"),optionGroup:"integrations",optionName:"edd_google_business_vertical",options:Te,help:(0,s.__)("In order to use Google Ads Remarketing you must select your business type (vertical).","gtm-kit"),notSet:!0,disabled:i}),(0,e.createElement)(me,{title:(0,s.__)("Product ID prefix","gtm-kit"),optionGroup:"integrations",optionName:"edd_product_id_prefix",placeholder:(0,s.__)("Enter prefix …","gtm-kit"),help:(0,s.__)("If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.","gtm-kit"),disabled:i}))),(0,e.createElement)(pe,{disabled:n},(0,e.createElement)(pe.Header,{title:(0,s.__)("Advanced settings","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)(ce,{title:(0,s.__)("Dequeue the default JavaScript","gtm-kit"),label:(0,s.__)("Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.","gtm-kit"),optionGroup:"integrations",optionName:"edd_dequeue_script",disabled:i}))))},De=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Help","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Google Tag Manager templates","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("p",{className:"gtmkit-mb-4"},(0,s.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit"),(0,s.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-font-semibold hover:gtmkit-underline",href:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/"},(0,s.__)("Read guide","gtm-kit"))),(0,e.createElement)("h4",{className:"gtmkit-font-bold"},(0,s.__)("GTM container import files:","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - eCommerce","gtm-kit")))))),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Tutorials","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("ul",null,le.map((t=>(0,e.createElement)("li",{className:"gtmkit-mb-4"},(0,e.createElement)("a",{className:"hover:gtmkit-underline",href:t.link.url,target:"_blank",rel:"noreferrer",className:"gtmkit-font-semibold gtmkit-text-color-primary hover:gtmkit-underline"},t.title),t.text.map((t=>(0,e.createElement)("div",null,t)))))))))),Re=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"gtmkit-text-2xl gtmkit-font-bold gtmkit-text-color-heading gtmkit-mb-8"},(0,s.__)("Get support","gtm-kit")),(0,e.createElement)(pe,null,(0,e.createElement)(pe.Header,{title:(0,s.__)("Support options","gtm-kit")}),(0,e.createElement)(pe.Content,null,(0,e.createElement)("ul",{className:"gtmkit-text-color-primary"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://wordpress.org/support/plugin/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,s.__)("Support forum","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://github.com/tlamedia/gtm-kit",target:"_blank",rel:"noreferrer"},(0,s.__)("GITHub repository","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/",target:"_blank",rel:"noreferrer"},(0,s.__)("Plugin Homepage","gtm-kit"))," ","(gtmkit.com)"),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://wordpress.org/plugins/gtm-kit/",target:"_blank",rel:"noreferrer"},(0,s.__)("WordPress.org Plugin Page","gtm-kit")))," "))));const Oe=()=>{const{useSettings:t}=(0,e.useContext)(c),a=window.gtmkitSettings.currentPage;return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Rt,{page:a}),(0,e.createElement)("main",{className:"gtmkit-max-w-[1536px] gtmkit-px-8 gtmkit-pt-8 gtmkit-text-base"},(0,e.createElement)(kt,null,(0,e.createElement)(ht,{exact:!0,path:"/general",element:(0,e.createElement)(se,null)}),(0,e.createElement)(ht,{exact:!0,path:"/container",element:(0,e.createElement)(he,null)}),(0,e.createElement)(ht,{exact:!0,path:"/post-data",element:(0,e.createElement)(_e,null)}),(0,e.createElement)(ht,{exact:!0,path:"/user-data",element:(0,e.createElement)(ke,null)}),(0,e.createElement)(ht,{exact:!0,path:"/google-consent-mode",element:(0,e.createElement)(fe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/misc",element:(0,e.createElement)(be,null)}),(0,e.createElement)(ht,{exact:!0,path:"/whats-new",element:(0,e.createElement)(we,null)}),(0,e.createElement)(ht,{exact:!0,path:"/integrations",element:(0,e.createElement)(Se,null)}),(0,e.createElement)(ht,{exact:!0,path:"/woocommerce",element:(0,e.createElement)(Ge,null)}),(0,e.createElement)(ht,{exact:!0,path:"/cf7",element:(0,e.createElement)(Ie,null)}),(0,e.createElement)(ht,{exact:!0,path:"/edd",element:(0,e.createElement)(Pe,null)}),(0,e.createElement)(ht,{exact:!0,path:"/help",element:(0,e.createElement)(De,null)}),(0,e.createElement)(ht,{exact:!0,path:"/support",element:(0,e.createElement)(Re,null)}),(0,e.createElement)(ht,{path:"/",element:(0,e.createElement)(pt,{replace:!0,to:"/"+a})}))),(0,e.createElement)(ee,null)):(0,e.createElement)(n.Spinner,null)},Me=()=>(0,e.createElement)(wt,{basename:"/"},(0,e.createElement)(g,null,(0,e.createElement)(Oe,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,e.render)((0,e.createElement)(Me,null),document.getElementById(window.gtmkitSettings.rootId))}))}(); -
gtm-kit/trunk/assets/admin/wizard.asset.php
r2974164 r2975488 1 <?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' a7baf0ea81142a07a9ab');1 <?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '41bbfcedb3247f67e9a1'); -
gtm-kit/trunk/assets/admin/wizard.js
r2974164 r2975488 1 !function(){"use strict";var t={n:function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,{a:a}),a},d:function(e,a){for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.wp.element,a=window.wp.components,n=window.lodash,r=window.wp.apiFetch,i=t.n(r);i().use(i().createNonceMiddleware(window.gtmkitSettings.nonce)),i().use(i().createRootURLMiddleware(window.gtmkitSettings.root));const l=async()=>{let t={};try{t=await i()({path:"gtmkit/v1/get-options",method:" POST"})}catch(t){return console.log("fetchSettings Errors:",t),{gtm_kit_settings_fetch_settings_errors:!0}}return!0===t.success?t.data:t},o=async()=>{let t={};try{t=await i()({path:"gtmkit/v1/get-site-data",method:"POST"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t};var s=window.wp.i18n,m=(t,e)=>{const a=Object.assign({},t);switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,void 0===e.payload.fetchedSettings.integrations&&(a.fetchedSettings.integrations={}),void 0!==e.payload.fetchedSettings.gtm_kit_settings_fetch_settings_errors&&(a.notice=(0,s.__)("An error occurred.","gtm-kit"),a.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":a.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.isPending=!1;let t=!1,n=(0,s.__)("Saved Successfully.","gtm-kit"),r=!1;void 0!==e.payload.fetchedSettings.gtm_kit_settings_update_settings_errors&&(t=!0,n=(0,s.__)("An error occurred.","gtm-kit"),r=!0),a.canSave=t,a.notice=n,a.hasError=r;break;case"UPDATE_STATE":e.payload.fetchedSettings&&(a.fetchedSettings=e.payload.fetchedSettings),e.payload.stateSettings&&(a.stateSettings=e.payload.stateSettings),void 0!==e.payload.isPending&&(a.isPending=e.payload.isPending),void 0!==e.payload.notice&&(a.notice=e.payload.notice),void 0!==e.payload.hasError&&(a.hasError=e.payload.hasError),void 0!==e.payload.canSave&&(a.canSave=e.payload.canSave)}return a};const c=(0,e.createContext)();var g,u=t=>{const[a,r]=(0,e.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:"",canSave:!1}),s=async()=>{const[t,e]=await Promise.all([l(),o()]),a="wizard"===window.gtmkitSettings.currentPage?await(async()=>{let t={};try{t=await i()({path:"gtmkit/v1/get-install-data",method:"POST"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t})():{};r({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},g=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,e.useEffect)((()=>{s()}),[]);const u={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(async t=>{let e={};try{e=await i()({path:"gtmkit/v1/set-options",method:"POST",data:t})}catch(t){return console.log("updateSettings Errors:",t),{gtm_kit_settings_update_settings_errors:!0}}return!0===e.success?e.data:e})(a.stateSettings);r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:g,useUpdateStateSettings:async(t,e,r)=>{const i=JSON.parse(JSON.stringify(a.stateSettings));let l;i[t][e]=r,l=!(0,n.isEqual)(i,a.fetchedSettings),g({stateSettings:i,canSave:l})},useImportSettings:async(t,e)=>{const r=JSON.parse(JSON.stringify(a.stateSettings));let i;const l={};l.general={...r.general,...e.general},"integrations"in e&&(l.integrations={...r.integrations,...e.integrations}),i=!(0,n.isEqual)(l,a.fetchedSettings),g({stateSettings:l,canSave:i})},useSettings:a.stateSettings,useIsPending:a.isPending,useNotice:a.notice,useHasError:a.hasError,useCanSave:a.canSave,useSiteData:a.siteData,useInstallData:a.installData};return(0,e.createElement)(c.Provider,{value:u},t.children)},d=window.React;function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},p.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(g||(g={}));const h="popstate";function k(t,e){if(!1===t||null==t)throw new Error(e)}function f(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function y(t,e){return{usr:t.state,key:t.key,idx:e}}function E(t,e,a,n){return void 0===a&&(a=null),p({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?M(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function x(t){let{pathname:e="/",search:a="",hash:n=""}=t;return a&&"?"!==a&&(e+="?"===a.charAt(0)?a:"?"+a),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function M(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var N;function S(t,e,a){void 0===a&&(a="/");let n=U(("string"==typeof e?M(e):e).pathname||"/",a);if(null==n)return null;let r=v(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(r);let i=null;for(let t=0;null==i&&t<r.length;++t)i=O(r[t],A(n));return i}function v(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let r=(t,r,i)=>{let l={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:r,route:t};l.relativePath.startsWith("/")&&(k(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),l.relativePath=l.relativePath.slice(n.length));let o=B([n,l.relativePath]),s=a.concat(l);t.children&&t.children.length>0&&(k(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),v(t.children,e,s,o)),(null!=t.path||t.index)&&e.push({path:o,score:D(o,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of _(t.path))r(t,e,a);else r(t,e)})),e}function _(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,r=a.endsWith("?"),i=a.replace(/\?$/,"");if(0===n.length)return r?[i,""]:[i];let l=_(n.join("/")),o=[];return o.push(...l.map((t=>""===t?i:[i,t].join("/")))),r&&o.push(...l),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(N||(N={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const b=/^:\w+$/,w=3,T=2,j=1,L=10,C=-2,I=t=>"*"===t;function D(t,e){let a=t.split("/"),n=a.length;return a.some(I)&&(n+=C),e&&(n+=T),a.filter((t=>!I(t))).reduce(((t,e)=>t+(b.test(e)?w:""===e?j:L)),n)}function O(t,e){let{routesMeta:a}=t,n={},r="/",i=[];for(let t=0;t<a.length;++t){let l=a[t],o=t===a.length-1,s="/"===r?e:e.slice(r.length)||"/",m=z({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},s);if(!m)return null;Object.assign(n,m.params);let c=l.route;i.push({params:n,pathname:B([r,m.pathname]),pathnameBase:W(B([r,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(r=B([r,m.pathnameBase]))}return i}function z(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[a,n]=function(t,e,a){void 0===e&&(e=!1),void 0===a&&(a=!0),f("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let n=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((t,e)=>(n.push(e),"/([^\\/]+)")));return t.endsWith("*")?(n.push("*"),r+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?r+="\\/*$":""!==t&&"/"!==t&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),r=e.match(a);if(!r)return null;let i=r[0],l=i.replace(/(.)\/+$/,"$1"),o=r.slice(1);return{params:n.reduce(((t,e,a)=>{if("*"===e){let t=o[a]||"";l=i.slice(0,i.length-t.length).replace(/(.)\/+$/,"$1")}return t[e]=function(t,e){try{return decodeURIComponent(t)}catch(a){return f(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+a+")."),t}}(o[a]||"",e),t}),{}),pathname:i,pathnameBase:l,pattern:t}}function A(t){try{return decodeURI(t)}catch(e){return f(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function U(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function P(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function R(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}function G(t,e,a,n){let r;void 0===n&&(n=!1),"string"==typeof t?r=M(t):(r=p({},t),k(!r.pathname||!r.pathname.includes("?"),P("?","pathname","search",r)),k(!r.pathname||!r.pathname.includes("#"),P("#","pathname","hash",r)),k(!r.search||!r.search.includes("#"),P("#","search","hash",r)));let i,l=""===t||""===r.pathname,o=l?"/":r.pathname;if(n||null==o)i=a;else{let t=e.length-1;if(o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;r.pathname=e.join("/")}i=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:r=""}="string"==typeof t?M(t):t,i=a?a.startsWith("/")?a:function(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?a.length>1&&a.pop():"."!==t&&a.push(t)})),a.length>1?a.join("/"):"/"}(a,e):e;return{pathname:i,search:Y(n),hash:Q(r)}}(r,i),m=o&&"/"!==o&&o.endsWith("/"),c=(l||"."===o)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const B=t=>t.join("/").replace(/\/\/+/g,"/"),W=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Y=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Q=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const F=["post","put","patch","delete"],J=(new Set(F),["get",...F]);function H(){return H=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},H.apply(this,arguments)}new Set(J),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const $=d.createContext(null),Z=d.createContext(null),K=d.createContext(null),V=d.createContext(null),X=d.createContext({outlet:null,matches:[],isDataRoute:!1}),q=d.createContext(null);function tt(){return null!=d.useContext(V)}function et(){return tt()||k(!1),d.useContext(V).location}function at(t){d.useContext(K).static||d.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=d.useContext(X);return t?function(){let{router:t}=function(t){let e=d.useContext($);return e||k(!1),e}(mt.UseNavigateStable),e=gt(ct.UseNavigateStable),a=d.useRef(!1);return at((()=>{a.current=!0})),d.useCallback((function(n,r){void 0===r&&(r={}),a.current&&("number"==typeof n?t.navigate(n):t.navigate(n,H({fromRouteId:e},r)))}),[t,e])}():function(){tt()||k(!1);let t=d.useContext($),{basename:e,navigator:a}=d.useContext(K),{matches:n}=d.useContext(X),{pathname:r}=et(),i=JSON.stringify(R(n).map((t=>t.pathnameBase))),l=d.useRef(!1);return at((()=>{l.current=!0})),d.useCallback((function(n,o){if(void 0===o&&(o={}),!l.current)return;if("number"==typeof n)return void a.go(n);let s=G(n,JSON.parse(i),r,"path"===o.relative);null==t&&"/"!==e&&(s.pathname="/"===s.pathname?e:B([e,s.pathname])),(o.replace?a.replace:a.push)(s,o.state,o)}),[e,a,i,r,t])}()}function rt(t,e,a){tt()||k(!1);let{navigator:n}=d.useContext(K),{matches:r}=d.useContext(X),i=r[r.length-1],l=i?i.params:{},o=(i&&i.pathname,i?i.pathnameBase:"/");i&&i.route;let s,m=et();if(e){var c;let t="string"==typeof e?M(e):e;"/"===o||(null==(c=t.pathname)?void 0:c.startsWith(o))||k(!1),s=t}else s=m;let u=s.pathname||"/",p=S(t,{pathname:"/"===o?u:u.slice(o.length)||"/"}),h=function(t,e,a){var n;if(void 0===e&&(e=[]),void 0===a&&(a=null),null==t){var r;if(null==(r=a)||!r.errors)return null;t=a.matches}let i=t,l=null==(n=a)?void 0:n.errors;if(null!=l){let t=i.findIndex((t=>t.route.id&&(null==l?void 0:l[t.route.id])));t>=0||k(!1),i=i.slice(0,Math.min(i.length,t+1))}return i.reduceRight(((t,n,r)=>{let o=n.route.id?null==l?void 0:l[n.route.id]:null,s=null;a&&(s=n.route.errorElement||lt);let m=e.concat(i.slice(0,r+1)),c=()=>{let e;return e=o?s:n.route.Component?d.createElement(n.route.Component,null):n.route.element?n.route.element:t,d.createElement(st,{match:n,routeContext:{outlet:t,matches:m,isDataRoute:null!=a},children:e})};return a&&(n.route.ErrorBoundary||n.route.errorElement||0===r)?d.createElement(ot,{location:a.location,revalidation:a.revalidation,component:s,error:o,children:c(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):c()}),null)}(p&&p.map((t=>Object.assign({},t,{params:Object.assign({},l,t.params),pathname:B([o,n.encodeLocation?n.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?o:B([o,n.encodeLocation?n.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),r,a);return e&&h?d.createElement(V.Provider,{value:{location:H({pathname:"/",search:"",hash:"",state:null,key:"default"},s),navigationType:g.Pop}},h):h}function it(){let t=function(){var t;let e=d.useContext(q),a=function(t){let e=d.useContext(Z);return e||k(!1),e}(ct.UseRouteError),n=gt(ct.UseRouteError);return e||(null==(t=a.errors)?void 0:t[n])}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},e),a?d.createElement("pre",{style:n},a):null,null)}const lt=d.createElement(it,null);class ot extends d.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error?d.createElement(X.Provider,{value:this.props.routeContext},d.createElement(q.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function st(t){let{routeContext:e,match:a,children:n}=t,r=d.useContext($);return r&&r.static&&r.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=a.route.id),d.createElement(X.Provider,{value:e},n)}var mt=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(mt||{}),ct=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(ct||{});function gt(t){let e=function(t){let e=d.useContext(X);return e||k(!1),e}(),a=e.matches[e.matches.length-1];return a.route.id||k(!1),a.route.id}function ut(t){let{to:e,replace:a,state:n,relative:r}=t;tt()||k(!1);let{matches:i}=d.useContext(X),{pathname:l}=et(),o=nt(),s=G(e,R(i).map((t=>t.pathnameBase)),l,"path"===r),m=JSON.stringify(s);return d.useEffect((()=>o(JSON.parse(m),{replace:a,state:n,relative:r})),[o,m,r,a,n]),null}function dt(t){k(!1)}function pt(t){let{basename:e="/",children:a=null,location:n,navigationType:r=g.Pop,navigator:i,static:l=!1}=t;tt()&&k(!1);let o=e.replace(/^\/*/,"/"),s=d.useMemo((()=>({basename:o,navigator:i,static:l})),[o,i,l]);"string"==typeof n&&(n=M(n));let{pathname:m="/",search:c="",hash:u="",state:p=null,key:h="default"}=n,f=d.useMemo((()=>{let t=U(m,o);return null==t?null:{location:{pathname:t,search:c,hash:u,state:p,key:h},navigationType:r}}),[o,m,c,u,p,h,r]);return null==f?null:d.createElement(K.Provider,{value:s},d.createElement(V.Provider,{children:a,value:f}))}function ht(t){let{children:e,location:a}=t;return rt(kt(e),a)}function kt(t,e){void 0===e&&(e=[]);let a=[];return d.Children.forEach(t,((t,n)=>{if(!d.isValidElement(t))return;let r=[...e,n];if(t.type===d.Fragment)return void a.push.apply(a,kt(t.props.children,r));t.type!==dt&&k(!1),t.props.index&&t.props.children&&k(!1);let i={id:t.props.id||r.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(i.children=kt(t.props.children,r)),a.push(i)})),a}d.startTransition,new Promise((()=>{})),d.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const ft=d.startTransition;function yt(t){let{basename:e,children:a,future:n,window:r}=t,i=d.useRef();var l;null==i.current&&(i.current=(void 0===(l={window:r,v5Compat:!0})&&(l={}),function(t,e,a,n){void 0===n&&(n={});let{window:r=document.defaultView,v5Compat:i=!1}=n,l=r.history,o=g.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function u(){o=g.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:o,location:f.location,delta:e})}function d(t){let e="null"!==r.location.origin?r.location.origin:r.location.href,a="string"==typeof t?t:x(t);return k(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(p({},l.state,{idx:m}),""));let f={get action(){return o},get location(){return t(r,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return r.addEventListener(h,u),s=t,()=>{r.removeEventListener(h,u),s=null}},createHref(t){return e(r,t)},createURL:d,encodeLocation(t){let e=d(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=g.Push;let n=E(f.location,t,e);a&&a(n,t),m=c()+1;let u=y(n,m),d=f.createHref(n);try{l.pushState(u,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;r.location.assign(d)}i&&s&&s({action:o,location:f.location,delta:1})},replace:function(t,e){o=g.Replace;let n=E(f.location,t,e);a&&a(n,t),m=c();let r=y(n,m),u=f.createHref(n);l.replaceState(r,"",u),i&&s&&s({action:o,location:f.location,delta:0})},go(t){return l.go(t)}};return f}((function(t,e){let{pathname:a="/",search:n="",hash:r=""}=M(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),E("",{pathname:a,search:n,hash:r},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let a=t.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let e=t.location.href,a=e.indexOf("#");n=-1===a?e:e.slice(0,a)}return n+"#"+("string"==typeof e?e:x(e))}),(function(t,e){f("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),l)));let o=i.current,[s,m]=d.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},u=d.useCallback((t=>{c&&ft?ft((()=>m(t))):m(t)}),[m,c]);return d.useLayoutEffect((()=>o.listen(u)),[o,u]),d.createElement(pt,{basename:e,children:a,location:s.location,navigationType:s.action,navigator:o})}var Et,xt;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher"}(Et||(Et={})),function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));var Mt=()=>{const{useSettings:t,useUpdateStateSettings:n,useUpdateSettings:r,useIsPending:i}=(0,e.useContext)(c),l=nt();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 "},(0,e.createElement)(a.TextControl,{label:(0,s.__)("Container ID","gtm-kit"),placeholder:(0,s.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>n("general","gtm_id",t)})),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),l("/essential-settings",{replace:!0})},disabled:i||!t.general.gtm_id.includes("-")},(0,s.__)("Save and continue","gtm-kit"),i?(0,e.createElement)(a.Spinner,null):""))),(0,e.createElement)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-left gtmkit-text-color-grey gtmkit-text-center"},(0,e.createElement)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4"},"Need help?"),(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,s.__)("Find your GTM container ID on","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer"},"Google Tag Manager")),(0,e.createElement)("p",null,(0,s.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"))),(0,e.createElement)("div",{className:"gtmkit-mt-3 md:gtmkit-mt-10 gtmkit-text-color-grey gtmkit-text-base"},(0,e.createElement)("span",{className:"gtmkit-block"},(0,s.__)("No thanks. I know what I'm doing.","gtm-kit")),(0,e.createElement)("a",{className:"gtmkit-underline gtmkit-ml-4",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit"))))},Nt=()=>{const{useImportSettings:t,useIsPending:n,useInstallData:r}=(0,e.useContext)(c),[i,l]=(0,e.useState)(!0),o=Object.keys(r.import_data)[0],[m,g]=(0,e.useState)(o),u=[];return Object.keys(r.import_data).forEach((t=>{u.push({value:t,label:r.import_data[t].name})})),i?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-py-8 gtmkit-my-8"},(0,e.createElement)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold"},(0,s.__)("Would you like to import plugin settings?","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey"},(0,s.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,s.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,e.createElement)(a.RadioControl,{help:(0,s.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:m,options:u,onChange:t=>g(t)}),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(m,r.import_data[m]),l(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),n?(0,e.createElement)(a.Spinner,null):""),(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{l(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("No","gtm-kit")),n?(0,e.createElement)(a.Spinner,null):"")))):(0,e.createElement)(Mt,null)},St=()=>{const{useInstallData:t}=(0,e.useContext)(c),{firstInstall:a}=t,{importAvailable:n}=t;return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("You've successfully installed GTM Kit!","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit"))),a&&n?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},vt=()=>{const{useSettings:t,useUpdateStateSettings:n,useUpdateSettings:r,useIsPending:i,useInstallData:l}=(0,e.useContext)(c),o=nt();return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("Essential Settings","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("There are a lot of settings in GTM Kit and we recommend that you uses our recommended settings but you can also choose to use the default settings and go through the settings at your convenience.","gtm-kit"))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?","gtm-kit"),checked:t&&t.general.datalayer_page_type,onChange:()=>{n("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),l.woocommerce_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{n("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,l.cf7_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{n("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,l.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{n("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),o("/share-anonymous-data",{replace:!0})},disabled:i},(0,s.__)("Save and continue","gtm-kit"),i?(0,e.createElement)(a.Spinner,null):"")))},_t=()=>{const{useSettings:t,useUpdateStateSettings:n,useUpdateSettings:r,useIsPending:i,useSiteData:l}=(0,e.useContext)(c),o=nt();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Help improve GTM Kit","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey"},(0,s.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm"},(0,e.createElement)("tbody",null,(0,e.createElement)("tr",{className:""},(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Server type:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.web_server))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"PHP version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.php_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.wordpress_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress multisite:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.multisite?(0,s.__)("Yes","gtm-kit"):(0,s.__)("No","gtm-kit")))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current theme:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.current_theme))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current site language:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.locale))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Active plugins:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Plugin names of all active plugins"))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Anonymized GTM Kit settings:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Which GTM Kit settings are active"))))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto "},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{n("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),o("/getting-started",{replace:!0})},disabled:i},(0,s.__)("Save and continue","gtm-kit"),i?(0,e.createElement)(a.Spinner,null):"")))},bt=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Your are ready to use GTM Kit!","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto gtmkit-mb-8"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Google Tag Manager templates","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4"},(0,s.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit")," ",(0,e.createElement)("a",{target:"_blank",className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",rel:"noreferrer"},(0,s.__)("Read the guide","gtm-kit"))),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - eCommerce","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Tutorials","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Getting started with GTM Kit","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("WooCommerce Integration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=advanced-container-implementation&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Advanced GTM container implementation","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=settings-actions-and-filters-for-developers&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Settings, actions and filters for developers","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.dashboardUrl}},(0,s.__)("Go to the dashboard","gtm-kit"))));const wt=[{step:1,path:"/welcome",element:"Welcome",title:(0,s.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,s.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,s.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,s.__)("Getting Started","gtm-kit")}];var Tt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let r="gtmkit-h-0.5 gtmkit-w-full";return r+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,e.createElement)("div",{className:r})},jt=({step:t,currentStep:a})=>t<a?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",className:"gtmkit-w-5 gtmkit-h-5 gtmkit-text-white"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})):t===a?(0,e.createElement)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,Lt=({step:t,currentStep:a,totalSteps:n})=>{if(0===t)return;let r="gtmkit-transition-opacity gtmkit-duration-500 gtmkit-absolute gtmkit-inset-0 gtmkit-border-2 gtmkit-flex gtmkit-items-center gtmkit-justify-center gtmkit-rounded-full gtmkit-opacity-100";return r+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-white",r+=t>a?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full"},(0,e.createElement)("span",{className:r},(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(Tt,{step:t,currentStep:a,totalSteps:n}))},Ct=()=>{const t=wt.length-1+wt[0].step;let a=((t,e)=>{const a=Object.keys(e);return t.filter((function(t){for(let n=0;n<a.length;n++)if(!t.hasOwnProperty(a[n])||t[a[n]]!==e[a[n]])return!1;return!0}))})(wt,{path:et().pathname});return a=a.length?a[0].step:0,0===a?(0,e.createElement)("div",{className:"gtmkit-my-16"}):(0,e.createElement)("div",{className:"gtmkit-mt-6 gtmkit-inset-0 gtmkit-mx-auto gtmkit-my-6 gtmkit-flex gtmkit-items-center gtmkit-max-w-xl","aria-hidden":"true"},wt.map((function(n){return(0,e.createElement)(Lt,{step:n.step,currentStep:a,totalSteps:t})})))},It=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-text-center gtmkit-px-3"},(0,e.createElement)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[225px] gtmkit-inline-block"},(0,e.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,s.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,e.createElement)(Ct,null)),Dt=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey"},(0,e.createElement)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max"},(0,e.createElement)("a",{className:"gtmkit-underline",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit")))));const Ot=()=>{const{useSettings:t}=(0,e.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(It,null),(0,e.createElement)("main",{className:"gtmkit-max-w-3xl gtmkit-bg-white gtmkit-border-1 gtmkit-border-color-border gtmkit-rounded-md gtmkit-mx-auto gtmkit-py-12 gtmkit-px-16 gtmkit-text-base"},(0,e.createElement)(ht,null,(0,e.createElement)(dt,{exact:!0,path:"/welcome",element:(0,e.createElement)(St,null)}),(0,e.createElement)(dt,{exact:!0,path:"/essential-settings",element:(0,e.createElement)(vt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/share-anonymous-data",element:(0,e.createElement)(_t,null)}),(0,e.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(bt,null)}),(0,e.createElement)(dt,{path:"/",element:(0,e.createElement)(ut,{replace:!0,to:"/welcome"})}))),(0,e.createElement)(Dt,null)):(0,e.createElement)(a.Spinner,{className:"gtm-kit-settings-page-loader"})},zt=()=>(0,e.createElement)(yt,{basename:"/"},(0,e.createElement)(u,null,(0,e.createElement)(Ot,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,e.render)((0,e.createElement)(zt,null),document.getElementById(window.gtmkitSettings.rootId))}))}();1 !function(){"use strict";var t={n:function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,{a:a}),a},d:function(e,a){for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=window.wp.element,a=window.wp.components,n=window.lodash,r=window.wp.apiFetch,i=t.n(r);i().use(i().createNonceMiddleware(window.gtmkitSettings.nonce)),i().use(i().createRootURLMiddleware(window.gtmkitSettings.root));const l=async()=>{let t={};try{t=await i()({path:"gtmkit/v1/get-options",method:"GET"})}catch(t){return console.log("fetchSettings Errors:",t),{gtm_kit_settings_fetch_settings_errors:!0}}return!0===t.success?t.data:t},o=async()=>{let t={};try{t=await i()({path:"gtmkit/v1/get-site-data",method:"GET"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t};var s=window.wp.i18n,m=(t,e)=>{const a=Object.assign({},t);switch(e.type){case"FETCH_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.siteData=e.payload.siteData,a.installData=e.payload.installData,a.isPending=!1,a.canSave=!1,void 0===e.payload.fetchedSettings.integrations&&(a.fetchedSettings.integrations={}),void 0!==e.payload.fetchedSettings.gtm_kit_settings_fetch_settings_errors&&(a.notice=(0,s.__)("An error occurred.","gtm-kit"),a.hasError=!0);break;case"UPDATE_SETTINGS_BEFORE":a.isPending=e.payload.isPending;break;case"UPDATE_SETTINGS":a.fetchedSettings=e.payload.fetchedSettings,a.stateSettings=e.payload.stateSettings,a.isPending=!1;let t=!1,n=(0,s.__)("Saved Successfully.","gtm-kit"),r=!1;void 0!==e.payload.fetchedSettings.gtm_kit_settings_update_settings_errors&&(t=!0,n=(0,s.__)("An error occurred.","gtm-kit"),r=!0),a.canSave=t,a.notice=n,a.hasError=r;break;case"UPDATE_STATE":e.payload.fetchedSettings&&(a.fetchedSettings=e.payload.fetchedSettings),e.payload.stateSettings&&(a.stateSettings=e.payload.stateSettings),void 0!==e.payload.isPending&&(a.isPending=e.payload.isPending),void 0!==e.payload.notice&&(a.notice=e.payload.notice),void 0!==e.payload.hasError&&(a.hasError=e.payload.hasError),void 0!==e.payload.canSave&&(a.canSave=e.payload.canSave)}return a};const c=(0,e.createContext)();var g,u=t=>{const[a,r]=(0,e.useReducer)(m,{fetchedSettings:{},stateSettings:{},isPending:!0,notice:"",hasError:"",canSave:!1}),s=async()=>{const[t,e]=await Promise.all([l(),o()]),a="wizard"===window.gtmkitSettings.currentPage?await(async()=>{let t={};try{t=await i()({path:"gtmkit/v1/get-install-data",method:"GET"})}catch(t){return console.log("fetchSiteData Errors:",t),{gtm_kit_settings_fetch_site_data_errors:!0}}return!0===t.success?t.data:t})():{};r({type:"FETCH_SETTINGS",payload:{fetchedSettings:t,stateSettings:t,siteData:e,installData:a}})},g=async t=>{r({type:"UPDATE_STATE",payload:t})};(0,e.useEffect)((()=>{s()}),[]);const u={useDispatch:t=>{r(t)},useUpdateSettings:async()=>{r({type:"UPDATE_SETTINGS_BEFORE",payload:{isPending:!0}});const t=await(async t=>{let e={};try{e=await i()({path:"gtmkit/v1/set-options",method:"POST",data:t})}catch(t){return console.log("updateSettings Errors:",t),{gtm_kit_settings_update_settings_errors:!0}}return!0===e.success?e.data:e})(a.stateSettings);r({type:"UPDATE_SETTINGS",payload:{fetchedSettings:t,stateSettings:t}})},useFetchSettings:s,useUpdateState:g,useUpdateStateSettings:async(t,e,r)=>{const i=JSON.parse(JSON.stringify(a.stateSettings));let l;i[t][e]=r,l=!(0,n.isEqual)(i,a.fetchedSettings),g({stateSettings:i,canSave:l})},useImportSettings:async(t,e)=>{const r=JSON.parse(JSON.stringify(a.stateSettings));let i;const l={};l.general={...r.general,...e.general},"integrations"in e&&(l.integrations={...r.integrations,...e.integrations}),i=!(0,n.isEqual)(l,a.fetchedSettings),g({stateSettings:l,canSave:i})},useSettings:a.stateSettings,useIsPending:a.isPending,useNotice:a.notice,useHasError:a.hasError,useCanSave:a.canSave,useSiteData:a.siteData,useInstallData:a.installData};return(0,e.createElement)(c.Provider,{value:u},t.children)},d=window.React;function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},p.apply(this,arguments)}!function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"}(g||(g={}));const h="popstate";function k(t,e){if(!1===t||null==t)throw new Error(e)}function f(t,e){if(!t){"undefined"!=typeof console&&console.warn(e);try{throw new Error(e)}catch(t){}}}function y(t,e){return{usr:t.state,key:t.key,idx:e}}function E(t,e,a,n){return void 0===a&&(a=null),p({pathname:"string"==typeof t?t:t.pathname,search:"",hash:""},"string"==typeof e?M(e):e,{state:a,key:e&&e.key||n||Math.random().toString(36).substr(2,8)})}function x(t){let{pathname:e="/",search:a="",hash:n=""}=t;return a&&"?"!==a&&(e+="?"===a.charAt(0)?a:"?"+a),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function M(t){let e={};if(t){let a=t.indexOf("#");a>=0&&(e.hash=t.substr(a),t=t.substr(0,a));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}var N;function v(t,e,a){void 0===a&&(a="/");let n=U(("string"==typeof e?M(e):e).pathname||"/",a);if(null==n)return null;let r=S(t);!function(t){t.sort(((t,e)=>t.score!==e.score?e.score-t.score:function(t,e){return t.length===e.length&&t.slice(0,-1).every(((t,a)=>t===e[a]))?t[t.length-1]-e[e.length-1]:0}(t.routesMeta.map((t=>t.childrenIndex)),e.routesMeta.map((t=>t.childrenIndex)))))}(r);let i=null;for(let t=0;null==i&&t<r.length;++t)i=O(r[t],A(n));return i}function S(t,e,a,n){void 0===e&&(e=[]),void 0===a&&(a=[]),void 0===n&&(n="");let r=(t,r,i)=>{let l={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:r,route:t};l.relativePath.startsWith("/")&&(k(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),l.relativePath=l.relativePath.slice(n.length));let o=B([n,l.relativePath]),s=a.concat(l);t.children&&t.children.length>0&&(k(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),S(t.children,e,s,o)),(null!=t.path||t.index)&&e.push({path:o,score:D(o,t.index),routesMeta:s})};return t.forEach(((t,e)=>{var a;if(""!==t.path&&null!=(a=t.path)&&a.includes("?"))for(let a of _(t.path))r(t,e,a);else r(t,e)})),e}function _(t){let e=t.split("/");if(0===e.length)return[];let[a,...n]=e,r=a.endsWith("?"),i=a.replace(/\?$/,"");if(0===n.length)return r?[i,""]:[i];let l=_(n.join("/")),o=[];return o.push(...l.map((t=>""===t?i:[i,t].join("/")))),r&&o.push(...l),o.map((e=>t.startsWith("/")&&""===e?"/":e))}!function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"}(N||(N={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const b=/^:\w+$/,w=3,T=2,j=1,L=10,C=-2,I=t=>"*"===t;function D(t,e){let a=t.split("/"),n=a.length;return a.some(I)&&(n+=C),e&&(n+=T),a.filter((t=>!I(t))).reduce(((t,e)=>t+(b.test(e)?w:""===e?j:L)),n)}function O(t,e){let{routesMeta:a}=t,n={},r="/",i=[];for(let t=0;t<a.length;++t){let l=a[t],o=t===a.length-1,s="/"===r?e:e.slice(r.length)||"/",m=z({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},s);if(!m)return null;Object.assign(n,m.params);let c=l.route;i.push({params:n,pathname:B([r,m.pathname]),pathnameBase:W(B([r,m.pathnameBase])),route:c}),"/"!==m.pathnameBase&&(r=B([r,m.pathnameBase]))}return i}function z(t,e){"string"==typeof t&&(t={path:t,caseSensitive:!1,end:!0});let[a,n]=function(t,e,a){void 0===e&&(e=!1),void 0===a&&(a=!0),f("*"===t||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were "'+t.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+t.replace(/\*$/,"/*")+'".');let n=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((t,e)=>(n.push(e),"/([^\\/]+)")));return t.endsWith("*")?(n.push("*"),r+="*"===t||"/*"===t?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?r+="\\/*$":""!==t&&"/"!==t&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),n]}(t.path,t.caseSensitive,t.end),r=e.match(a);if(!r)return null;let i=r[0],l=i.replace(/(.)\/+$/,"$1"),o=r.slice(1);return{params:n.reduce(((t,e,a)=>{if("*"===e){let t=o[a]||"";l=i.slice(0,i.length-t.length).replace(/(.)\/+$/,"$1")}return t[e]=function(t,e){try{return decodeURIComponent(t)}catch(a){return f(!1,'The value for the URL param "'+e+'" will not be decoded because the string "'+t+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+a+")."),t}}(o[a]||"",e),t}),{}),pathname:i,pathnameBase:l,pattern:t}}function A(t){try{return decodeURI(t)}catch(e){return f(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+e+")."),t}}function U(t,e){if("/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,n=t.charAt(a);return n&&"/"!==n?null:t.slice(a)||"/"}function P(t,e,a,n){return"Cannot include a '"+t+"' character in a manually specified `to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+a+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function R(t){return t.filter(((t,e)=>0===e||t.route.path&&t.route.path.length>0))}function G(t,e,a,n){let r;void 0===n&&(n=!1),"string"==typeof t?r=M(t):(r=p({},t),k(!r.pathname||!r.pathname.includes("?"),P("?","pathname","search",r)),k(!r.pathname||!r.pathname.includes("#"),P("#","pathname","hash",r)),k(!r.search||!r.search.includes("#"),P("#","search","hash",r)));let i,l=""===t||""===r.pathname,o=l?"/":r.pathname;if(n||null==o)i=a;else{let t=e.length-1;if(o.startsWith("..")){let e=o.split("/");for(;".."===e[0];)e.shift(),t-=1;r.pathname=e.join("/")}i=t>=0?e[t]:"/"}let s=function(t,e){void 0===e&&(e="/");let{pathname:a,search:n="",hash:r=""}="string"==typeof t?M(t):t,i=a?a.startsWith("/")?a:function(t,e){let a=e.replace(/\/+$/,"").split("/");return t.split("/").forEach((t=>{".."===t?a.length>1&&a.pop():"."!==t&&a.push(t)})),a.length>1?a.join("/"):"/"}(a,e):e;return{pathname:i,search:Y(n),hash:Q(r)}}(r,i),m=o&&"/"!==o&&o.endsWith("/"),c=(l||"."===o)&&a.endsWith("/");return s.pathname.endsWith("/")||!m&&!c||(s.pathname+="/"),s}const B=t=>t.join("/").replace(/\/\/+/g,"/"),W=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Y=t=>t&&"?"!==t?t.startsWith("?")?t:"?"+t:"",Q=t=>t&&"#"!==t?t.startsWith("#")?t:"#"+t:"";Error;const F=["post","put","patch","delete"],J=(new Set(F),["get",...F]);function H(){return H=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},H.apply(this,arguments)}new Set(J),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const $=d.createContext(null),Z=d.createContext(null),K=d.createContext(null),V=d.createContext(null),X=d.createContext({outlet:null,matches:[],isDataRoute:!1}),q=d.createContext(null);function tt(){return null!=d.useContext(V)}function et(){return tt()||k(!1),d.useContext(V).location}function at(t){d.useContext(K).static||d.useLayoutEffect(t)}function nt(){let{isDataRoute:t}=d.useContext(X);return t?function(){let{router:t}=function(t){let e=d.useContext($);return e||k(!1),e}(mt.UseNavigateStable),e=gt(ct.UseNavigateStable),a=d.useRef(!1);return at((()=>{a.current=!0})),d.useCallback((function(n,r){void 0===r&&(r={}),a.current&&("number"==typeof n?t.navigate(n):t.navigate(n,H({fromRouteId:e},r)))}),[t,e])}():function(){tt()||k(!1);let t=d.useContext($),{basename:e,navigator:a}=d.useContext(K),{matches:n}=d.useContext(X),{pathname:r}=et(),i=JSON.stringify(R(n).map((t=>t.pathnameBase))),l=d.useRef(!1);return at((()=>{l.current=!0})),d.useCallback((function(n,o){if(void 0===o&&(o={}),!l.current)return;if("number"==typeof n)return void a.go(n);let s=G(n,JSON.parse(i),r,"path"===o.relative);null==t&&"/"!==e&&(s.pathname="/"===s.pathname?e:B([e,s.pathname])),(o.replace?a.replace:a.push)(s,o.state,o)}),[e,a,i,r,t])}()}function rt(t,e,a){tt()||k(!1);let{navigator:n}=d.useContext(K),{matches:r}=d.useContext(X),i=r[r.length-1],l=i?i.params:{},o=(i&&i.pathname,i?i.pathnameBase:"/");i&&i.route;let s,m=et();if(e){var c;let t="string"==typeof e?M(e):e;"/"===o||(null==(c=t.pathname)?void 0:c.startsWith(o))||k(!1),s=t}else s=m;let u=s.pathname||"/",p=v(t,{pathname:"/"===o?u:u.slice(o.length)||"/"}),h=function(t,e,a){var n;if(void 0===e&&(e=[]),void 0===a&&(a=null),null==t){var r;if(null==(r=a)||!r.errors)return null;t=a.matches}let i=t,l=null==(n=a)?void 0:n.errors;if(null!=l){let t=i.findIndex((t=>t.route.id&&(null==l?void 0:l[t.route.id])));t>=0||k(!1),i=i.slice(0,Math.min(i.length,t+1))}return i.reduceRight(((t,n,r)=>{let o=n.route.id?null==l?void 0:l[n.route.id]:null,s=null;a&&(s=n.route.errorElement||lt);let m=e.concat(i.slice(0,r+1)),c=()=>{let e;return e=o?s:n.route.Component?d.createElement(n.route.Component,null):n.route.element?n.route.element:t,d.createElement(st,{match:n,routeContext:{outlet:t,matches:m,isDataRoute:null!=a},children:e})};return a&&(n.route.ErrorBoundary||n.route.errorElement||0===r)?d.createElement(ot,{location:a.location,revalidation:a.revalidation,component:s,error:o,children:c(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):c()}),null)}(p&&p.map((t=>Object.assign({},t,{params:Object.assign({},l,t.params),pathname:B([o,n.encodeLocation?n.encodeLocation(t.pathname).pathname:t.pathname]),pathnameBase:"/"===t.pathnameBase?o:B([o,n.encodeLocation?n.encodeLocation(t.pathnameBase).pathname:t.pathnameBase])}))),r,a);return e&&h?d.createElement(V.Provider,{value:{location:H({pathname:"/",search:"",hash:"",state:null,key:"default"},s),navigationType:g.Pop}},h):h}function it(){let t=function(){var t;let e=d.useContext(q),a=function(t){let e=d.useContext(Z);return e||k(!1),e}(ct.UseRouteError),n=gt(ct.UseRouteError);return e||(null==(t=a.errors)?void 0:t[n])}(),e=function(t){return null!=t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"boolean"==typeof t.internal&&"data"in t}(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},e),a?d.createElement("pre",{style:n},a):null,null)}const lt=d.createElement(it,null);class ot extends d.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||"idle"!==e.revalidation&&"idle"===t.revalidation?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error?d.createElement(X.Provider,{value:this.props.routeContext},d.createElement(q.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function st(t){let{routeContext:e,match:a,children:n}=t,r=d.useContext($);return r&&r.static&&r.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=a.route.id),d.createElement(X.Provider,{value:e},n)}var mt=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(mt||{}),ct=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(ct||{});function gt(t){let e=function(t){let e=d.useContext(X);return e||k(!1),e}(),a=e.matches[e.matches.length-1];return a.route.id||k(!1),a.route.id}function ut(t){let{to:e,replace:a,state:n,relative:r}=t;tt()||k(!1);let{matches:i}=d.useContext(X),{pathname:l}=et(),o=nt(),s=G(e,R(i).map((t=>t.pathnameBase)),l,"path"===r),m=JSON.stringify(s);return d.useEffect((()=>o(JSON.parse(m),{replace:a,state:n,relative:r})),[o,m,r,a,n]),null}function dt(t){k(!1)}function pt(t){let{basename:e="/",children:a=null,location:n,navigationType:r=g.Pop,navigator:i,static:l=!1}=t;tt()&&k(!1);let o=e.replace(/^\/*/,"/"),s=d.useMemo((()=>({basename:o,navigator:i,static:l})),[o,i,l]);"string"==typeof n&&(n=M(n));let{pathname:m="/",search:c="",hash:u="",state:p=null,key:h="default"}=n,f=d.useMemo((()=>{let t=U(m,o);return null==t?null:{location:{pathname:t,search:c,hash:u,state:p,key:h},navigationType:r}}),[o,m,c,u,p,h,r]);return null==f?null:d.createElement(K.Provider,{value:s},d.createElement(V.Provider,{children:a,value:f}))}function ht(t){let{children:e,location:a}=t;return rt(kt(e),a)}function kt(t,e){void 0===e&&(e=[]);let a=[];return d.Children.forEach(t,((t,n)=>{if(!d.isValidElement(t))return;let r=[...e,n];if(t.type===d.Fragment)return void a.push.apply(a,kt(t.props.children,r));t.type!==dt&&k(!1),t.props.index&&t.props.children&&k(!1);let i={id:t.props.id||r.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(i.children=kt(t.props.children,r)),a.push(i)})),a}d.startTransition,new Promise((()=>{})),d.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const ft=d.startTransition;function yt(t){let{basename:e,children:a,future:n,window:r}=t,i=d.useRef();var l;null==i.current&&(i.current=(void 0===(l={window:r,v5Compat:!0})&&(l={}),function(t,e,a,n){void 0===n&&(n={});let{window:r=document.defaultView,v5Compat:i=!1}=n,l=r.history,o=g.Pop,s=null,m=c();function c(){return(l.state||{idx:null}).idx}function u(){o=g.Pop;let t=c(),e=null==t?null:t-m;m=t,s&&s({action:o,location:f.location,delta:e})}function d(t){let e="null"!==r.location.origin?r.location.origin:r.location.href,a="string"==typeof t?t:x(t);return k(e,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,e)}null==m&&(m=0,l.replaceState(p({},l.state,{idx:m}),""));let f={get action(){return o},get location(){return t(r,l)},listen(t){if(s)throw new Error("A history only accepts one active listener");return r.addEventListener(h,u),s=t,()=>{r.removeEventListener(h,u),s=null}},createHref(t){return e(r,t)},createURL:d,encodeLocation(t){let e=d(t);return{pathname:e.pathname,search:e.search,hash:e.hash}},push:function(t,e){o=g.Push;let n=E(f.location,t,e);a&&a(n,t),m=c()+1;let u=y(n,m),d=f.createHref(n);try{l.pushState(u,"",d)}catch(t){if(t instanceof DOMException&&"DataCloneError"===t.name)throw t;r.location.assign(d)}i&&s&&s({action:o,location:f.location,delta:1})},replace:function(t,e){o=g.Replace;let n=E(f.location,t,e);a&&a(n,t),m=c();let r=y(n,m),u=f.createHref(n);l.replaceState(r,"",u),i&&s&&s({action:o,location:f.location,delta:0})},go(t){return l.go(t)}};return f}((function(t,e){let{pathname:a="/",search:n="",hash:r=""}=M(t.location.hash.substr(1));return a.startsWith("/")||a.startsWith(".")||(a="/"+a),E("",{pathname:a,search:n,hash:r},e.state&&e.state.usr||null,e.state&&e.state.key||"default")}),(function(t,e){let a=t.document.querySelector("base"),n="";if(a&&a.getAttribute("href")){let e=t.location.href,a=e.indexOf("#");n=-1===a?e:e.slice(0,a)}return n+"#"+("string"==typeof e?e:x(e))}),(function(t,e){f("/"===t.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(e)+")")}),l)));let o=i.current,[s,m]=d.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},u=d.useCallback((t=>{c&&ft?ft((()=>m(t))):m(t)}),[m,c]);return d.useLayoutEffect((()=>o.listen(u)),[o,u]),d.createElement(pt,{basename:e,children:a,location:s.location,navigationType:s.action,navigator:o})}var Et,xt;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher"}(Et||(Et={})),function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"}(xt||(xt={}));var Mt=()=>{const{useSettings:t,useUpdateStateSettings:n,useUpdateSettings:r,useIsPending:i}=(0,e.useContext)(c),l=nt();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"md:gtmkit-grid gtmkit-grid-cols-2 gtmkit-gap-16 gtmkit-mb-20"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-w-full !gtmkit-px-8 "},(0,e.createElement)(a.TextControl,{label:(0,s.__)("Container ID","gtm-kit"),placeholder:(0,s.__)("Enter Container ID","gtm-kit"),value:t&&t.general.gtm_id,className:"gtmkit-text-center",onChange:t=>n("general","gtm_id",t)})),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),l("/essential-settings",{replace:!0})},disabled:i||!t.general.gtm_id.includes("-")},(0,s.__)("Save and continue","gtm-kit"),i?(0,e.createElement)(a.Spinner,null):""))),(0,e.createElement)("div",{className:"gtmkit-mt-8 gtmkit-border gtmkit-p-6 gtmkit-text-left gtmkit-text-color-grey gtmkit-text-center"},(0,e.createElement)("h2",{className:"gtmkit-font-bold gtmkit-text-base gtmkit-mb-4"},"Need help?"),(0,e.createElement)("p",{className:"gtmkit-mb-6"},(0,s.__)("Find your GTM container ID on","gtm-kit"),(0,e.createElement)("a",{className:"gtmkit-ml-2 gtmkit-text-color-primary gtmkit-underline",href:"https://tagmanager.google.com/",target:"_blank",rel:"noreferrer"},"Google Tag Manager")),(0,e.createElement)("p",null,(0,s.__)("It should look something like this:","gtm-kit")," ","GTM-12ZM7SF4"))),(0,e.createElement)("div",{className:"gtmkit-mt-3 md:gtmkit-mt-10 gtmkit-text-color-grey gtmkit-text-base"},(0,e.createElement)("span",{className:"gtmkit-block"},(0,s.__)("No thanks. I know what I'm doing.","gtm-kit")),(0,e.createElement)("a",{className:"gtmkit-underline gtmkit-ml-4",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit"))))},Nt=()=>{const{useImportSettings:t,useIsPending:n,useInstallData:r}=(0,e.useContext)(c),[i,l]=(0,e.useState)(!0),o=Object.keys(r.import_data)[0],[m,g]=(0,e.useState)(o),u=[];return Object.keys(r.import_data).forEach((t=>{u.push({value:t,label:r.import_data[t].name})})),i?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto gtmkit-border gtmkit-py-8 gtmkit-my-8"},(0,e.createElement)("h2",{className:"gtmkit-text-lg gtmkit-text-color-heading gtmkit-font-bold"},(0,s.__)("Would you like to import plugin settings?","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-my-4 gtmkit-text-color-grey"},(0,s.__)("We have found the configuration of other plugins in the database.","gtm-kit")," ",(0,s.__)("Would you like to import your settings to GTM Kit?","gtm-kit")),(0,e.createElement)(a.RadioControl,{help:(0,s.__)("Select the plugin you want to import settings from.","gtm-kit"),selected:m,options:u,onChange:t=>g(t)}),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{t(m,r.import_data[m]),l(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("Yes","gtm-kit")),n?(0,e.createElement)(a.Spinner,null):""),(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base",onClick:()=>{l(!1)}},(0,e.createElement)("span",{className:"gtmkit-text-lg gtmkit-font-bold"},(0,s.__)("No","gtm-kit")),n?(0,e.createElement)(a.Spinner,null):"")))):(0,e.createElement)(Mt,null)},vt=()=>{const{useInstallData:t}=(0,e.useContext)(c),{firstInstall:a}=t,{importAvailable:n}=t;return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("You've successfully installed GTM Kit!","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("To start collecting data with Google Tag manager you must register the Container ID of your Google Tag Manager container.","gtm-kit"))),a&&n?(0,e.createElement)(Nt,null):(0,e.createElement)(Mt,null))},St=()=>{const{useSettings:t,useUpdateStateSettings:n,useUpdateSettings:r,useIsPending:i,useInstallData:l}=(0,e.useContext)(c),o=nt();return(0,e.createElement)("div",{className:"gtmkit-text-center"},(0,e.createElement)("h1",{className:"gtmkit-text-4xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading"},(0,s.__)("Essential Settings","gtm-kit")),(0,e.createElement)("div",{className:"gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("There are a lot of settings in GTM Kit and we recommend that you uses our recommended settings but you can also choose to use the default settings and go through the settings at your convenience.","gtm-kit"))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Page type","gtm-kit"),id:"page-type"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Include the page type i.e. page, product, category, cart, checkout etc in the datalayer?","gtm-kit"),checked:t&&t.general.datalayer_page_type,onChange:()=>{n("general","datalayer_page_type",!(t&&t.general.datalayer_page_type))}}))),l.woocommerce_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Track WooCommerce","gtm-kit"),id:"track-wooCommerce"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from WooCommerce?","gtm-kit"),checked:t&&t.integrations.woocommerce_integration,onChange:()=>{n("integrations","woocommerce_integration",!(t&&t.integrations.woocommerce_integration))}}))):null,l.cf7_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-lg gtmkit-mx-auto"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Track Contact Form 7","gtm-kit"),id:"track-cf7"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Would you like to track form submissions from Contact Form 7?","gtm-kit"),checked:t&&t.integrations.cf7_integration,onChange:()=>{n("integrations","cf7_integration",!(t&&t.integrations.cf7_integration))}}))):null,l.edd_integration?(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap"},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Track Easy Digital Downloads","gtm-kit"),id:"track-edd"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("Would you like to track e-commerce data from Easy Digital Downloads?","gtm-kit"),checked:t&&t.integrations.edd_integration,onChange:()=>{n("integrations","edd_integration",!(t&&t.integrations.edd_integration))}}))):null,(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),o("/share-anonymous-data",{replace:!0})},disabled:i},(0,s.__)("Save and continue","gtm-kit"),i?(0,e.createElement)(a.Spinner,null):"")))},_t=()=>{const{useSettings:t,useUpdateStateSettings:n,useUpdateSettings:r,useIsPending:i,useSiteData:l}=(0,e.useContext)(c),o=nt();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Help improve GTM Kit","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-4 gtmkit-text-color-grey"},(0,s.__)("GTM Kit is used together with a wide variety of server configurations and plugins. It is very helpful for us to know what some of these configurations are so we can test the most common configurations.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-sm gtmkit-mb-8 gtmkit-text-color-grey"},(0,s.__)("You can help by sharing anonymous data with us. Below is a detailed view of all data GTM Kit will collect if granted permission:","gtm-kit")),(0,e.createElement)("table",{className:"gtmkit-border-2 gtmkit-table-fixed gtmkit-w-full gtmkit-text-sm"},(0,e.createElement)("tbody",null,(0,e.createElement)("tr",{className:""},(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Server type:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.web_server))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"PHP version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.php_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress version number:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.wordpress_version))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"WordPress multisite:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.multisite?(0,s.__)("Yes","gtm-kit"):(0,s.__)("No","gtm-kit")))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current theme:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.current_theme))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Current site language:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("code",{className:"gtmkit-text-sm"},l.locale))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Active plugins:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Plugin names of all active plugins"))),(0,e.createElement)("tr",null,(0,e.createElement)("td",{className:"gtmkit-font-bold gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("strong",null,"Anonymized GTM Kit settings:")),(0,e.createElement)("td",{className:"gtmkit-px-2 gtmkit-py-1"},(0,e.createElement)("em",null,"Which GTM Kit settings are active"))))),(0,e.createElement)("div",{className:"gtmkit-settings-field-wrap gtmkit-max-w-max !gtmkit-px-8 gtmkit-mx-auto "},(0,e.createElement)(a.BaseControl,{label:(0,s.__)("Share anonymous data","gtm-kit"),id:"share-anonymous-data"},(0,e.createElement)(a.ToggleControl,{label:(0,s.__)("I agree to share anonymous data with the development team to help improve GTM Kit. ","gtm-kit"),checked:t&&t.general.analytics_active,onChange:()=>{n("general","analytics_active",!(t&&t.general.analytics_active))}}))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{r(),o("/getting-started",{replace:!0})},disabled:i},(0,s.__)("Save and continue","gtm-kit"),i?(0,e.createElement)(a.Spinner,null):"")))},bt=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h1",{className:"gtmkit-text-3xl gtmkit-font-medium gtmkit-mb-8 gtmkit-text-color-heading gtmkit-text-center"},(0,s.__)("Your are ready to use GTM Kit!","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-4 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Your Google Tag Manager Container is now sending data to Google Tag Manager.","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-mb-12 gtmkit-text-color-grey gtmkit-text-center"},(0,s.__)("Below you will find GTM container import files, with all the necessary tags, trigger, and variables to use Google Analytics 4.","gtm-kit")," "),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto gtmkit-mb-8"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Google Tag Manager templates","gtm-kit")),(0,e.createElement)("p",{className:"gtmkit-text-base gtmkit-text-color-grey gtmkit-m-4"},(0,s.__)("Please read the guide on how to use the import files and configure GTM.","gtm-kit")," ",(0,e.createElement)("a",{target:"_blank",className:"gtmkit-text-color-primary gtmkit-whitespace-nowrap",href:"https://gtmkit.com/guides/how-to-setup-google-analytics-ga4-in-google-tag-manager/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",rel:"noreferrer"},(0,s.__)("Read the guide","gtm-kit"))),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-Google-Analytics-4.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - Basic Configuration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://templates.gtmkit.com/gtm/GTM-GA4-eCommerce.json",target:"_blank",rel:"noreferrer"},(0,s.__)("Google Analytics 4 - eCommerce","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-border-2 gtmkit-max-w-md gtmkit-mx-auto"},(0,e.createElement)("h3",{className:"gtmkit-p-3 gtmkit-font-bold gtmkit-text-xl gtmkit-border-b-2"},(0,s.__)("Tutorials","gtm-kit")),(0,e.createElement)("ul",{className:"gtmkit-text-color-primary gtmkit-p-3"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Getting started with GTM Kit","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("WooCommerce Integration","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/advanced-gtm-container-implementation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=advanced-container-implementation&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Advanced GTM container implementation","gtm-kit"))),(0,e.createElement)("li",null,(0,e.createElement)("a",{href:"https://gtmkit.com/documentation/settings-actions-and-filters-for-developers/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=settings-actions-and-filters-for-developers&utm_content=help-tutorials",target:"_blank",rel:"noreferrer"},(0,s.__)("Settings, actions and filters for developers","gtm-kit"))))),(0,e.createElement)("div",{className:"gtmkit-flex gtmkit-mt-12"},(0,e.createElement)(a.Button,{variant:"primary",className:"gtmkit-mx-auto gtmkit-rounded-md !gtmkit-py-6 !gtmkit-px-8 gtmkit-text-base disabled:!gtmkit-bg-color-button-disabled disabled:!gtmkit-text-color-grey",onClick:()=>{window.location.href=window.gtmkitSettings.dashboardUrl}},(0,s.__)("Go to the dashboard","gtm-kit"))));const wt=[{step:1,path:"/welcome",element:"Welcome",title:(0,s.__)("Welcome","gtm-kit")},{step:2,path:"/essential-settings",element:"EssentialSettings",title:(0,s.__)("Essential Settings","gtm-kit")},{step:3,path:"/share-anonymous-data",element:"ShareAnonymousData",title:(0,s.__)("Help improve GTM Kit","gtm-kit")},{step:4,path:"/getting-started",element:"GettingStarted",title:(0,s.__)("Getting Started","gtm-kit")}];var Tt=({step:t,currentStep:a,totalSteps:n})=>{if(t===n)return;let r="gtmkit-h-0.5 gtmkit-w-full";return r+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-color-border",(0,e.createElement)("div",{className:r})},jt=({step:t,currentStep:a})=>t<a?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",className:"gtmkit-w-5 gtmkit-h-5 gtmkit-text-white"},(0,e.createElement)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})):t===a?(0,e.createElement)("span",{className:"gtmkit-h-2.5 gtmkit-w-2.5 gtmkit-rounded-full gtmkit-bg-color-primary"}):void 0,Lt=({step:t,currentStep:a,totalSteps:n})=>{if(0===t)return;let r="gtmkit-transition-opacity gtmkit-duration-500 gtmkit-absolute gtmkit-inset-0 gtmkit-border-2 gtmkit-flex gtmkit-items-center gtmkit-justify-center gtmkit-rounded-full gtmkit-opacity-100";return r+=t<a?" gtmkit-bg-color-primary":" gtmkit-bg-white",r+=t>a?" gtmkit-border-color-border":" gtmkit-border-color-primary",(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"gtmkit-relative gtmkit-shrink-0 gtmkit-z-10 gtmkit-w-8 gtmkit-h-8 gtmkit-rounded-full"},(0,e.createElement)("span",{className:r},(0,e.createElement)(jt,{step:t,currentStep:a,totalSteps:n}))),(0,e.createElement)(Tt,{step:t,currentStep:a,totalSteps:n}))},Ct=()=>{const t=wt.length-1+wt[0].step;let a=((t,e)=>{const a=Object.keys(e);return t.filter((function(t){for(let n=0;n<a.length;n++)if(!t.hasOwnProperty(a[n])||t[a[n]]!==e[a[n]])return!1;return!0}))})(wt,{path:et().pathname});return a=a.length?a[0].step:0,0===a?(0,e.createElement)("div",{className:"gtmkit-my-16"}):(0,e.createElement)("div",{className:"gtmkit-mt-6 gtmkit-inset-0 gtmkit-mx-auto gtmkit-my-6 gtmkit-flex gtmkit-items-center gtmkit-max-w-xl","aria-hidden":"true"},wt.map((function(n){return(0,e.createElement)(Lt,{step:n.step,currentStep:a,totalSteps:t})})))},It=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("header",{className:"gtmkit-text-center gtmkit-px-3"},(0,e.createElement)("h1",{className:"gtmkit-mt-3 md:gtmkit-mt-8 gtmkit-mb-4 gtmkit-w-[225px] gtmkit-inline-block"},(0,e.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNDY3LjEgMTU4Ni40IiBoZWlnaHQ9IjU0IiB2aWV3Qm94PSIwIDAgMTYwIDU0IiB3aWR0aD0iMTYwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9IiM4ODgiIGhlaWdodD0iNTQiIHJ4PSI0LjI2NSIgd2lkdGg9IjE2MCIvPjxwYXRoIGQ9Im04OC42NTkgNy4wMDJoLTQ5LjI2NmMtMi45MTUgMC01LjM3OC0uMTg0LTkuMjMgMi41OTZsLTE4Ljc0MyAxMi43NTJjLTQuNTQ5IDMuMjkyLTQuNTcxIDYuMDAxIDAgOS4zMDJsMTguNzQzIDEyLjc1MWMzLjY1MiAyLjY0NiA2LjI5OSAyLjU5NyA5LjIzIDIuNTk3aDE1LjY4NiAzMy41OGMyLjkzMS0uMDU3IDUuMzk0LTEuNzg0IDUuMzQtMy45MjN2LTMyLjIxYy0uMDEyLTIuMTM0LTIuNDA5LTMuODY1LTUuMzQtMy44NjV6IiBmaWxsPSIjMzk2OWJiIiB0cmFuc2Zvcm09Im1hdHJpeCgtMSAwIDAgLTEgMTAxLjk5OTg2NyA1My45OTk1NDcpIi8+PGcgZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJtYXRyaXgoMS40NjUyMDIgMCAwIDEuNDY1MjAyIC00LjU4MjQzNiAtNy41NTMxMjYpIj48cGF0aCBkPSJtMTguMzE2IDIzLjA4Nmg0LjYzMnY2LjA1MmMtLjc1LjI0NS0xLjQ1OS40MTUtMi4xMjEuNTE0LS42NjMuMDk4LTEuMzQxLjE0OC0yLjAzMy4xNDgtMS43NjQgMC0zLjEwNi0uNTE3LTQuMDM1LTEuNTU0LS45MjktMS4wMzQtMS4zOTUtMi41MTktMS4zOTUtNC40NTcgMC0xLjg4Ni41MzgtMy4zNTYgMS42MTctNC40MSAxLjA3OC0xLjA1NCAyLjU3My0xLjU3OSA0LjQ4MS0xLjU3OSAxLjIgMCAyLjM1Ny4yMzkgMy40NjkuNzE4bC0uODIzIDEuOTc5Yy0uODUtLjQyNS0xLjczNy0uNjM3LTIuNjU3LS42MzctMS4wNzEgMC0xLjkzMi4zNTgtMi41NzIgMS4wNzctLjY0NS43MTgtLjk2OCAxLjY4NS0uOTY4IDIuODk5IDAgMS4yNjcuMjYgMi4yMzMuNzggMi45MDQuNTE2LjY2NyAxLjI3MS45OTkgMi4yNjIuOTk5LjUxNyAwIDEuMDQxLS4wNTIgMS41NzItLjE1OHYtMi40MzVoLTIuMjA5em0xMS45MTIgNi41NTVoLTIuNDc0di05LjYxNGgtMy4xNzN2LTIuMDZoOC44MTZ2Mi4wNmgtMy4xNjl6bTkuOTA4IDAtMi44MTEtOS4xNThoLS4wNzJjLjEwMyAxLjg2My4xNTQgMy4xMDUuMTU0IDMuNzI4djUuNDNoLTIuMjEzdi0xMS42NzRoMy4zNjhsMi43NjQgOC45MjdoLjA0OGwyLjkzNC04LjkyN2gzLjM2OXYxMS42NzRoLTIuMzA4di01LjUyNWMwLS4yNjEgMC0uNTYxLjAwOS0uOTAzLjAwOS0uMzQxLjA0OC0xLjI0Ni4xMTItMi43MTZoLS4wNzRsLTMuMDExIDkuMTQ0eiIvPjxwYXRoIGQ9Im04OC44ODMgMzEuODk4aC0zLjgxMWwtNC4xNDctNi42Ny0xLjQxNyAxLjAxOHY1LjY1MmgtMy4zNTd2LTE1LjgzaDMuMzU3djcuMjQybDEuMzE4LTEuODYxIDQuMjkzLTUuMzgxaDMuNzI0bC01LjUyMyA3LjAwNnptMS41ODktMTUuMjMzYzAtMS4wNzUuNi0xLjYxNCAxLjgtMS42MTQgMS4xOTkgMCAxLjc5OC41MzkgMS43OTggMS42MTQgMCAuNTEyLS4xNDguOTEtLjQ1IDEuMTk2LS4yOTcuMjg0LS43NDkuNDI5LTEuMzQ4LjQyOS0xLjIgMC0xLjgtLjU0My0xLjgtMS42MjV6bTMuNDQ5IDE1LjIzM2gtMy4zMDJ2LTEyLjEwNGgzLjMwMnptOC41NjMtMi40MTNjLjU3OCAwIDEuMjcxLS4xMjggMi4wNzctLjM4djIuNDU2Yy0uODIuMzctMS44MzEuNTUyLTMuMDMxLjU1Mi0xLjMyNCAwLTIuMjgtLjMzMy0yLjg4NS0xLjAwMS0uNjAyLS42NjctLjkwMi0xLjY2OC0uOTAyLTMuMDAzdi01LjgzNWgtMS41ODV2LTEuMzk5bDEuODIzLTEuMTAzLjk0OS0yLjU1N2gyLjExNXYyLjU3OWgzLjM4OHYyLjQ4aC0zLjM4OHY1LjgzNWMwIC40NjcuMTI5LjgxNS4zOTMgMS4wNDEuMjY0LjIyMi42MTQuMzM1IDEuMDQ2LjMzNXoiLz48L2c+PC9zdmc+",alt:(0,s.__)("GTM Kit","gtm-kit"),className:"gtmkit-w-full"}))),(0,e.createElement)(Ct,null)),Dt=()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("footer",{className:"gtm-kit-settings-footer gtmkit-my-8 gtmkit-text-color-grey"},(0,e.createElement)("p",{className:"gtmkit-mx-auto gtmkit-max-w-max"},(0,e.createElement)("a",{className:"gtmkit-underline",href:window.gtmkitSettings.dashboardUrl},(0,s.__)("Go to the dashboard.","gtm-kit")))));const Ot=()=>{const{useSettings:t}=(0,e.useContext)(c);return Object.keys(t).length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(It,null),(0,e.createElement)("main",{className:"gtmkit-max-w-3xl gtmkit-bg-white gtmkit-border-1 gtmkit-border-color-border gtmkit-rounded-md gtmkit-mx-auto gtmkit-py-12 gtmkit-px-16 gtmkit-text-base"},(0,e.createElement)(ht,null,(0,e.createElement)(dt,{exact:!0,path:"/welcome",element:(0,e.createElement)(vt,null)}),(0,e.createElement)(dt,{exact:!0,path:"/essential-settings",element:(0,e.createElement)(St,null)}),(0,e.createElement)(dt,{exact:!0,path:"/share-anonymous-data",element:(0,e.createElement)(_t,null)}),(0,e.createElement)(dt,{exact:!0,path:"/getting-started",element:(0,e.createElement)(bt,null)}),(0,e.createElement)(dt,{path:"/",element:(0,e.createElement)(ut,{replace:!0,to:"/welcome"})}))),(0,e.createElement)(Dt,null)):(0,e.createElement)(a.Spinner,{className:"gtm-kit-settings-page-loader"})},zt=()=>(0,e.createElement)(yt,{basename:"/"},(0,e.createElement)(u,null,(0,e.createElement)(Ot,null)));document.addEventListener("DOMContentLoaded",(()=>{void 0!==document.getElementById(window.gtmkitSettings.rootId)&&null!==document.getElementById(window.gtmkitSettings.rootId)&&(0,e.render)((0,e.createElement)(zt,null),document.getElementById(window.gtmkitSettings.rootId))}))}(); -
gtm-kit/trunk/gtm-kit.php
r2974164 r2975488 4 4 * 5 5 * Plugin Name: GTM Kit 6 * Version: 1.14 6 * Version: 1.14.1 7 7 * Plugin URI: https://gtmkit.com/ 8 8 * Description: Google Tag Manager implementation focusing on flexibility and pagespeed. … … 28 28 } 29 29 30 const GTMKIT_VERSION = '1.14 ';30 const GTMKIT_VERSION = '1.14.1'; 31 31 32 32 if ( ! defined( 'GTMKIT_FILE' ) ) { -
gtm-kit/trunk/inc/main.php
r2974164 r2975488 13 13 use TLA_Media\GTM_Kit\Admin\HelpOptionsPage; 14 14 use TLA_Media\GTM_Kit\Admin\IntegrationsOptionsPage; 15 use TLA_Media\GTM_Kit\Admin\MetaBox; 15 16 use TLA_Media\GTM_Kit\Admin\SetupWizard; 16 17 use TLA_Media\GTM_Kit\Common\RestAPIServer; … … 136 137 137 138 Analytics::register( $options, $util ); 139 MetaBox::register( $options ); 138 140 SetupWizard::register(); 139 141 GeneralOptionsPage::register(); -
gtm-kit/trunk/languages/gtm-kit.pot
r2974164 r2975488 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: GTM Kit 1.14 \n"5 "Project-Id-Version: GTM Kit 1.14.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/gtm-kit\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2023-10-0 3T08:38:27+00:00\n"12 "POT-Creation-Date: 2023-10-06T08:44:02+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.8.1\n" … … 16 16 17 17 #. Plugin Name of the plugin 18 #: src/Admin/MetaBox.php:64 18 19 #: assets/admin/wizard.js:1 19 20 msgid "GTM Kit" … … 36 37 msgstr "" 37 38 38 #: inc/main.php:7 339 #: inc/main.php:74 39 40 msgid "Go to GTM Kit Settings page" 40 41 msgstr "" 41 42 42 #: inc/main.php:7 443 #: inc/main.php:75 43 44 #: assets/admin/settings.js:1 44 45 msgid "Settings" … … 86 87 msgstr "" 87 88 89 #: src/Admin/MetaBox.php:88 90 msgid "Set page type in datalayer:" 91 msgstr "" 92 93 #: src/Admin/MetaBox.php:90 94 #: assets/admin/settings.js:1 95 #: assets/admin/wizard.js:1 96 msgid "Page type" 97 msgstr "" 98 99 #. translators: %1$s = opening strong tag, %2$s = closing strong tag. 100 #: src/Admin/MetaBox.php:95 101 msgid "%1$sNote:%2$s This will only be applied if page type has been activated in the global settings of GTM Kit." 102 msgstr "" 103 88 104 #: src/Common/Util.php:57 89 105 msgid "Server type:" … … 497 513 498 514 #: assets/admin/settings.js:1 499 #: assets/admin/wizard.js:1500 msgid "Page type"501 msgstr ""502 503 #: assets/admin/settings.js:1504 515 msgid "Include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. \"campaign\"." 505 516 msgstr "" … … 736 747 737 748 #: assets/admin/settings.js:1 738 msgid "GTM container import files"739 msgstr ""740 741 #: assets/admin/settings.js:1742 msgid "We have added a help section with Google Tag Manager import files that will help you configure GTM quickly."743 msgstr ""744 745 #: assets/admin/settings.js:1746 msgid "The first import files cover Google Analytics 4 but more will follow."747 msgstr ""748 749 #: assets/admin/settings.js:1750 749 msgid "Read about all the other change in the release Notes" 751 750 msgstr "" … … 996 995 997 996 #: assets/admin/settings.js:1 998 msgid "Easy Digital downloads"997 msgid "Easy Digital Downloads" 999 998 msgstr "" 1000 999 -
gtm-kit/trunk/readme.txt
r2974164 r2975488 4 4 Tags: google tag manager, gtm, woocommerce, analytics, ga4, gtag, easy digital downloads 5 5 Tested up to: 6.3 6 Stable tag: 1.14 6 Stable tag: 1.14.1 7 7 License: GPLv3 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 61 61 == Screenshots == 62 62 63 1. Google Tag Manager container 64 2. Google Tag Manager container code 65 3. GTM Server Side 66 4. WooCommerce Integration 63 1. GTM Kit Dashboard 64 2. Google Tag Manager container code and server side GTM 65 3. Post data settings 66 4. Google Consent Mode 67 5. WooCommerce Integration 67 68 68 69 == Installation == … … 87 88 88 89 == Changelog == 90 91 = 1.14.1 = 92 93 Bugfixes: 94 * Set custom page type in post sidebar was removed by mistake in 1.14 95 * Fix possible naming collision with other GTM plugins 96 89 97 90 98 = 1.14 = -
gtm-kit/trunk/src/Admin/AdminAPI.php
r2974164 r2975488 62 62 '/get-install-data', 63 63 [ 64 'methods' => ' POST',64 'methods' => 'GET', 65 65 'callback' => [ $this, 'get_install_data' ], 66 66 ] … … 70 70 '/get-options', 71 71 [ 72 'methods' => ' POST',72 'methods' => 'GET', 73 73 'callback' => [ $this, 'get_options' ], 74 74 ] … … 86 86 '/get-site-data', 87 87 [ 88 'methods' => ' POST',88 'methods' => 'GET', 89 89 'callback' => [ $this, 'get_site_data' ], 90 90 ] -
gtm-kit/trunk/src/Frontend/Frontend.php
r2960370 r2975488 136 136 $datalayer_data = apply_filters( 'gtmkit_datalayer_content', [] ); 137 137 138 echo 'const dataLayer_content = ' . wp_json_encode( $datalayer_data ) . ";\n";139 140 echo esc_attr( $this->datalayer_name ) . '.push( dataLayer_content );' . "\n";138 echo 'const gtmkit_dataLayer_content = ' . wp_json_encode( $datalayer_data ) . ";\n"; 139 140 echo esc_attr( $this->datalayer_name ) . '.push( gtmkit_dataLayer_content );' . "\n"; 141 141 } 142 142 -
gtm-kit/trunk/vendor/composer/autoload_classmap.php
r2974164 r2975488 14 14 'TLA_Media\\GTM_Kit\\Admin\\HelpOptionsPage' => $baseDir . '/src/Admin/HelpOptionsPage.php', 15 15 'TLA_Media\\GTM_Kit\\Admin\\IntegrationsOptionsPage' => $baseDir . '/src/Admin/IntegrationsOptionsPage.php', 16 'TLA_Media\\GTM_Kit\\Admin\\MetaBox' => $baseDir . '/src/Admin/MetaBox.php', 16 17 'TLA_Media\\GTM_Kit\\Admin\\SetupWizard' => $baseDir . '/src/Admin/SetupWizard.php', 17 18 'TLA_Media\\GTM_Kit\\Common\\RestAPIServer' => $baseDir . '/src/Common/RestAPIServer.php', -
gtm-kit/trunk/vendor/composer/autoload_static.php
r2974164 r2975488 29 29 'TLA_Media\\GTM_Kit\\Admin\\HelpOptionsPage' => __DIR__ . '/../..' . '/src/Admin/HelpOptionsPage.php', 30 30 'TLA_Media\\GTM_Kit\\Admin\\IntegrationsOptionsPage' => __DIR__ . '/../..' . '/src/Admin/IntegrationsOptionsPage.php', 31 'TLA_Media\\GTM_Kit\\Admin\\MetaBox' => __DIR__ . '/../..' . '/src/Admin/MetaBox.php', 31 32 'TLA_Media\\GTM_Kit\\Admin\\SetupWizard' => __DIR__ . '/../..' . '/src/Admin/SetupWizard.php', 32 33 'TLA_Media\\GTM_Kit\\Common\\RestAPIServer' => __DIR__ . '/../..' . '/src/Common/RestAPIServer.php', -
gtm-kit/trunk/vendor/composer/installed.php
r2974164 r2975488 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => ' e4aaef6e023da58d9703ba3c905aab00342a79d6',6 'reference' => '4892b79e515edc43c03a211a3abb22a12fcdf974', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-main', 15 15 'version' => 'dev-main', 16 'reference' => ' e4aaef6e023da58d9703ba3c905aab00342a79d6',16 'reference' => '4892b79e515edc43c03a211a3abb22a12fcdf974', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.